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

Help with executing macros at specific timesteps during the solution run

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2014, 06:45
Default Help with executing macros at specific timesteps during the solution run
  #1
New Member
 
Join Date: Apr 2014
Posts: 2
Rep Power: 0
Codophobia is on a distinguished road
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.
Codophobia is offline   Reply With Quote

Old   April 28, 2014, 07:16
Default
  #2
Member
 
Join Date: Jul 2013
Posts: 80
Rep Power: 13
upeksa is on a distinguished road
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
upeksa 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
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


All times are GMT -4. The time now is 22:26.