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

Variable definition in UDF

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 1, 2012, 17:17
Default Variable definition in UDF
  #1
Senior Member
 
Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 176
Rep Power: 6
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

Thread Tools
Display Modes

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 On
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 00:56.