Running a UDF only once per timestep
Is there any possibility to tun a UDF (like DEFINE_SOURCE for example) only ONCE every timestep and not on every iteration?
|
Try this:
if ( first_iteration ) { enter your calculations here } I got this from: http://willem.engen.nl/uni/fluent/do...ips-Tricks.pdf Let me know how it goes. |
Either what Daniel suggested or you can use the macro EXECUTE_AT_END. Depends on your need, whether you want to execute at beginning or at the end of a time-step.
DEFINE_EXECUTE_AT_END(name) { ... } DEFINE_EXECUTE_AT_END is a general-purpose macro that is executed at the end of an iteration in a steady state run, or at the end of a time step in a transient run. https://www.sharcnet.ca/Software/Flu...udf/node22.htm |
All times are GMT -4. The time now is 08:41. |