CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Dynamic Change of Boundary Conditions

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By me3840

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2014, 05:51
Default Dynamic Change of Boundary Conditions
  #1
New Member
 
Join Date: Jul 2014
Posts: 4
Rep Power: 11
SimonP is on a distinguished road
Hi everyone,

I'm working with STAR-CCM+ and am running a VOF-based simulation. I would like to change a boundary condition type from Pressure to Wall after I have reached an quasi-static state.

I'm controlling my simulation via an external Java-File already, so some coding effort won't be the problem.

I need something like this:
If Updateevent_1 = True
change boundary_condition_type to "Wall"


But at this point I face the problem that I'm not too sure (and it didn't work so far), whether this external Script can actually call the current state of a variable which would be necessary in this case. My efforts so far have failed, since Starccm+ Macro recorder generates its own variable-types which are incompatible with common Java-if-loops.

Any ideas on tackling this problem via the script (or an alternate possibility?)

Cheers
Simon
SimonP is offline   Reply With Quote

Old   July 28, 2014, 11:58
Default
  #2
Senior Member
 
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 24
me3840 is on a distinguished road
Just do something like:

Code:
Simulation sim = getActiveSimulation();
        
        LogicUpdateEvent logicUpdateEvent =((LogicUpdateEvent) sim.getUpdateEventManager().getUpdateEvent("Logic Event"));
        
        if (!(logicUpdateEvent.getEvaluatedState())) {
            Region region = sim.getRegionManager().getRegion("RegionName");
            Boundary boundary = region.getBoundaryManager().getBoundary("Boundary");
            boundary.setBoundaryType(WallBoundary.class);
        }
arvindpj likes this.
me3840 is offline   Reply With Quote

Old   July 31, 2014, 05:15
Default Cheers
  #3
New Member
 
Join Date: Jul 2014
Posts: 4
Rep Power: 11
SimonP is on a distinguished road
Thanks for your help, since I wanted to add some more function features I did sth like this:

public void execute() {
execute0();
execute1();

}

private void execute0() {

Boundary Condition A
Stopping Crtieria A
}

private void execute1() {

Boundary Condition B
Stopping Crtieria B
}
SimonP is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
Domain Imbalance HMR CFX 5 October 10, 2016 06:57
non reflective boundary conditions for incompresible flow Pascal_doran OpenFOAM Programming & Development 16 August 25, 2015 06:35
Run Time Change of Boundary Conditions Matteo Tugnoli OpenFOAM Programming & Development 0 July 15, 2013 08:10
change boundary conditions adrien FLUENT 3 May 2, 2007 08:52


All times are GMT -4. The time now is 17:35.