|
[Sponsors] |
July 28, 2014, 04:51 |
Dynamic Change of Boundary Conditions
|
#1 |
New Member
Join Date: Jul 2014
Posts: 4
Rep Power: 12 |
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 |
|
July 28, 2014, 10:58 |
|
#2 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 24 |
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); } |
|
July 31, 2014, 04:15 |
Cheers
|
#3 |
New Member
Join Date: Jul 2014
Posts: 4
Rep Power: 12 |
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 } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 07:38 |
Domain Imbalance | HMR | CFX | 5 | October 10, 2016 05:57 |
non reflective boundary conditions for incompresible flow | Pascal_doran | OpenFOAM Programming & Development | 16 | August 25, 2015 05:35 |
Run Time Change of Boundary Conditions | Matteo Tugnoli | OpenFOAM Programming & Development | 0 | July 15, 2013 07:10 |
change boundary conditions | adrien | FLUENT | 3 | May 2, 2007 07:52 |