# A variable expressing time steps in UDF?

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

 January 13, 2006, 06:01 A variable expressing time steps in UDF? #1 lcw Guest   Posts: n/a N_TIME is the all time steps starting from beginning of unsteady computation. But, we usually choose data sampling by specifing number of time steps after many time steps. What's the variable expressing time steps starting from 1 in the specific number of time steps during the unsteady compution? Thank you very nuch! LCW

 January 13, 2006, 08:37 Re: A variable expressing time steps in UDF? #2 Frank Guest   Posts: n/a CURRENT_TIME real current flow time (in seconds) CURRENT_TIMESTEP real current physical time step size (in seconds) PREVIOUS_TIME real previous flow time (in seconds) PREVIOUS_2_TIME real flow time two steps back in time (in seconds) PREVIOUS_TIMESTEP real previous physical time step size (in seconds) N_TIME integer number of time steps N_ITER integer number of iterations Frank

 January 13, 2006, 09:35 Re: A variable expressing time steps in UDF? #3 lcw Guest   Posts: n/a Thanks, Frank, Above macros you mentioned are not what I want. N_TIME can give all time steps from the beginning of unsteady computation, but it can not give the numbered time steps from the beginning (named as 1)of the specified time steps used for unsteady statistics. For example, after many time steps, we specify 20 time steps for unsteady statistics, the first timestep is 1, then N=1, the next timestep is 2, then N=2, and so on. I want to find this macro N that can express the number of timesteps from the beginning of these 20 timesteps computation.

 January 16, 2006, 09:32 Re: A variable expressing time steps in UDF? #4 Frank Guest   Posts: n/a Hello Icw, why don't you define a variable at the beginning of your simulation and add 1 each timestep? Frank

 January 16, 2006, 13:19 Re: A variable expressing time steps in UDF? #5 LCW Guest   Posts: n/a Hi, Frank: I am doing the simulation of cyclone separator using FLUENT, the flow field in cyclones is quasi-periodical. When iterating at the beginning of simulation, the residuals will decrease in a whole and keep many time steps. In general, we specify requested time steps when residuals reach stability in a whole, certainly the residuals decrease in each time step. So if we do the statistics of requested time steps by UDF code, the beginning time step should be assigned to 1 and add 1 each timestep.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post enry Fluent UDF and Scheme Programming 0 November 14, 2009 07:51 moe FLUENT 0 September 2, 2009 11:19 David FLUENT 0 August 14, 2007 11:54 msrinath80 OpenFOAM Running, Solving & CFD 2 November 7, 2006 16:15 Sanjay Padhiar Main CFD Forum 1 March 31, 1999 12:32

All times are GMT -4. The time now is 02:32.