|
[Sponsors] |
Stop calculation when liquid_fraction=0 in a line |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 10, 2016, 15:24 |
Stop calculation when liquid_fraction=0 in a line
|
#1 |
Senior Member
Jordi Pina
Join Date: Mar 2015
Posts: 157
Rep Power: 11 |
Dear all,
I have a profile file where I have programmed a batch of simulations. My interest is to jump from one simulation to the next instead not when the simulation reaches a number of time steps or a given time but when a control-line of my simulation is a solid (i.e., when liquid_fraction=0). How could I do this? I will appreciate your help |
|
May 11, 2016, 00:41 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,672
Rep Power: 65 |
There were some old articles in the Fluent customer support portal on how to do this, but it would be hard to dig them up.
The workaround is to setup a scheme that will evaluate whether your convergence condition is true and if it is true, to evaluate a command that will exit the simulation (wcd y exit). Setup the Executing Commands During the Calculation option. You would need to create a monitor for your criteria (surface integral or whatever). And then utilize an (rpgetvar 'var_name) to check if it has been satisfied. Then the execute would be something like: (if (expression that evaluates to true) (exit) () ) For example the following: (if (positive? 1) (exit) () ) will exit if 1 is positive or output () if 1 is not positive. Of course you also need to make sure you do a wcd first so that you don't get warnings that will mess up this sequence. Just spam the execute command several times or make a really complicated one. You just need to get creative with your rpgetvar and monitor so that you can easily access it through a scheme command. Sorry I don't remember how to do this part off the top of my head. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] No cells read from file ".msh" | hwsv07 | OpenFOAM Meshing & Mesh Conversion | 5 | August 13, 2018 15:42 |
simpleFoam parallel | AndrewMortimer | OpenFOAM Running, Solving & CFD | 12 | August 7, 2015 18:45 |
[General] 2 datas on one plot | Akuji | ParaView | 46 | December 1, 2013 14:06 |
Regarding FoamX running Kindly help out | hariya03 | OpenFOAM Pre-Processing | 0 | April 18, 2008 04:26 |
Problems of Duns Codes! | Martin J | Main CFD Forum | 8 | August 14, 2003 23:19 |