|
[Sponsors] |
Help with executing macros at specific timesteps during the solution run |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 25, 2014, 06:45 |
Help with executing macros at specific timesteps during the solution run
|
#1 |
New Member
Join Date: Apr 2014
Posts: 2
Rep Power: 0 |
Hi,
I have a set of macros which I managed to output from the 'Calculation Activities' tab using the 'file/write-macros' command in the GUI. Now, I want to execute each macro at specific timestep intervals, i.e. if I have 4 macros (w,x,y,z) and I run macro w for the first time at timestep 7600, I want it so that macro x runs a certain no. of timesteps after macro w, macro y a certain no. of timesteps after macro x, and so on. This would run as a continuous loop for as long the transient solution is running. Is this possible ? And if so, how would I go about doing it ? Can I include some additional 'IF statements' or anything like that within the macro file itself or would I need to create a separate UDF file ? Are there any other ways of going about this ? Thanks. |
|
April 28, 2014, 07:16 |
|
#2 |
Member
Join Date: Jul 2013
Posts: 80
Rep Power: 13 |
You can use a single UDF using if-statements and the following solver macros:
CURRENT_TIME CURRENT_TIMESTEP PREVIOUS_TIME PREVIOUS_2_TIME PREVIOUS_TIMESTEP N_TIME N_ITER You can also use the general-purspose macro DEFINE_DETAT if necessary. Check you UDF manual for further information. Cheers |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 21:02 |
air bubble is disappear increasing time using vof | xujjun | CFX | 9 | June 9, 2009 08:59 |
error using combination of step function | xujjun | CFX | 1 | January 15, 2008 17:46 |
IcoFoam parallel woes | msrinath80 | OpenFOAM Running, Solving & CFD | 9 | July 22, 2007 03:58 |
Transient Run solution diverges | Narmin | Siemens | 1 | February 15, 2005 06:31 |