|October 1, 2012, 17:17||
Variable definition in UDF
Join Date: Apr 2010
Posts: 297Rep Power: 9
I am implementing a Define_execute_at_end macro in a transient simulation.
I have a variable, named "j" which has an certain initial value at first time step. But inside the macro, it's value changes and this variable is updated.
Now for second time step I need to use the updated value of "j" and the problem is here. If I define "j" as a static variable and assign an initial value to it inside the macro, how is it possible to access the updated value of "j" for the second time step? As I know the variables are all reset at each new time step unless they're already defined as "static", but how to skip that initial value for the second time step?
I appreciate any kind of help.
|Thread||Thread Starter||Forum||Replies||Last Post|
|global variable in udf||mohsen zendehbad||FLUENT||2||November 22, 2009 06:30|
|UDF extern variable - mean time moment coefficient||enry||Fluent UDF and Scheme Programming||0||November 14, 2009 07:56|
|UDF extern variable - mean time moment coefficient||enry||Fluent UDF and Scheme Programming||0||November 14, 2009 07:51|
|Do I need to use UDF to get time-averaged variable?||ivanbuz||Fluent UDF and Scheme Programming||0||August 11, 2009 14:26|
|Variable for AVERAGE VELOCITY, Pressure etc. in UDF?||aam||Fluent UDF and Scheme Programming||0||May 15, 2009 05:21|