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

Variable definition in UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2012, 17:17
Default Variable definition in UDF
  #1
Senior Member
 
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Hi friends,

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.
tnx.
syavash 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
global variable in udf mohsen zendehbad FLUENT 2 November 22, 2009 05:30
UDF extern variable - mean time moment coefficient enry Fluent UDF and Scheme Programming 0 November 14, 2009 06:56
UDF extern variable - mean time moment coefficient enry Fluent UDF and Scheme Programming 0 November 14, 2009 06: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


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