CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Stop calculation when liquid_fraction=0 in a line

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2016, 15:24
Default Stop calculation when liquid_fraction=0 in a line
  #1
Senior Member
 
Jordi Pina
Join Date: Mar 2015
Posts: 157
Rep Power: 11
jpina is on a distinguished road
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
jpina is offline   Reply With Quote

Old   May 11, 2016, 00:41
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,672
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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.
LuckyTran is offline   Reply With Quote

Reply


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
[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


All times are GMT -4. The time now is 23:45.