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

A variable expressing time steps in UDF?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2006, 06:01
Default 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

  Reply With Quote

Old   January 13, 2006, 08:37
Default 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
  Reply With Quote

Old   January 13, 2006, 09:35
Default 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.

  Reply With Quote

Old   January 16, 2006, 09:32
Default 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
  Reply With Quote

Old   January 16, 2006, 13:19
Default 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.

  Reply With Quote

Old   March 28, 2020, 04:05
Default
  #6
New Member
 
Join Date: May 2015
Posts: 3
Rep Power: 11
asemoonjol is on a distinguished road
current_timestep
asemoonjol is offline   Reply With Quote

Old   March 28, 2020, 04:07
Default
  #7
New Member
 
Join Date: May 2015
Posts: 3
Rep Power: 11
asemoonjol is on a distinguished road
For future use:


CURRENT_TIMESTEP
asemoonjol 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
UDF extern variable - mean time moment coefficient enry Fluent UDF and Scheme Programming 0 November 14, 2009 07:51
variable time stepping text commands moe FLUENT 0 September 2, 2009 12:19
UDF for time steps David FLUENT 0 August 14, 2007 12:54
AMG versus ICCG msrinath80 OpenFOAM Running, Solving & CFD 2 November 7, 2006 16:15
unsteady calcs in FLUENT Sanjay Padhiar Main CFD Forum 1 March 31, 1999 13:32


All times are GMT -4. The time now is 19:10.