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

Setting time step and number of time steps

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

Like Tree2Likes
  • 1 Post By srjp
  • 1 Post By srjp

Reply
 
LinkBack Thread Tools Display Modes
Old   March 21, 2009, 23:21
Default Setting time step and number of time steps
  #1
New Member
 
Mavis Milton
Join Date: Mar 2009
Posts: 10
Rep Power: 8
milton.tafadzwa is on a distinguished road
I want to model unsteady heat flow in an evacuated tube solar water heater. My problem is on setting time step, number of time steps and and maximum iterations per time step. I have read the modelling and tutorial guide but failed to understand what is considered when setting these parameters.
Please may you assist me with some guidelines on how to solve my problem.
Thank you.
milton.tafadzwa is offline   Reply With Quote

Old   March 22, 2009, 02:01
Default
  #2
New Member
 
Prakash Ayappan
Join Date: Mar 2009
Posts: 25
Rep Power: 8
technocrat.prakash is on a distinguished road
Well Mavis, time step, no. of time steps, maximum iterations per step are simple terms.

Time step plays a vital role in explicit method, since its determines the stability criterion. Implicit method is always stable. Make sure you give a low time step value otherwise the solution may diverge. Its a good practise to give a low time step value.

Number of time steps is based on the time upto which the analysis has to be done.

For example, time step be 5 milli seconds (0.005) and number of steps be 2000. So you are doing the analysis for (0.005 x 2000=) 10 seconds.

For each time step there will be some equations has to be numerical solved. So iterations of the equations has to be done and we need some convergence criteria. Some times instead of convergence criteria we will specify the maximum number of iterations. Within the time step, if the equations is not converged with in the maximum iterations, solver will stop iterate after this maximum number of iterations and proceed to next time step. Higher the maximum number of iterations higher the accuracy of solution but time taken may increase.
technocrat.prakash is offline   Reply With Quote

Old   March 24, 2009, 09:59
Default
  #3
Member
 
JP
Join Date: Mar 2009
Posts: 57
Rep Power: 9
srjp is on a distinguished road
The time step you define, depends on the mesh and the velocities. i.e. the time step should be able to resolve the flow in the smallest cell.
As a rule of thumb, del t < del x / v
(del t = time step, del x = smallest mesh size, v = velocity)
so if you have the minimum mesh size as 1mm, and velocity as 2 m/s, then your time step should be lower than 1mm/(2m/s) = 0.0005 sec.
Any value higher than this may lead to divergence.

Number of time steps depend on how long you want to run the simulation (flow time required)

Number of iterations required depends on how fast the solution converges. It is a trade-off. At smaller time steps, it takes less number of iterations, but you need to run for more number of time steps any way.
My suggestion is to run for a few time steps with large number of iterations and find out how many iterations it normally takes to converge, and then set this as the limit.
Al-Hashimi likes this.
srjp is offline   Reply With Quote

Old   March 24, 2009, 12:24
Default
  #4
New Member
 
Prakash Ayappan
Join Date: Mar 2009
Posts: 25
Rep Power: 8
technocrat.prakash is on a distinguished road
Quote:
Originally Posted by srjp View Post
The time step you define, depends on the mesh and the velocities. i.e. the time step should be able to resolve the flow in the smallest cell.
As a rule of thumb, del t < del x / v
(del t = time step, del x = smallest mesh size, v = velocity)
so if you have the minimum mesh size as 1mm, and velocity as 2 m/s, then your time step should be lower than 1mm/(2m/s) = 0.0005 sec.
Any value higher than this may lead to divergence.

Number of time steps depend on how long you want to run the simulation (flow time required)

Number of iterations required depends on how fast the solution converges. It is a trade-off. At smaller time steps, it takes less number of iterations, but you need to run for more number of time steps any way.
My suggestion is to run for a few time steps with large number of iterations and find out how many iterations it normally takes to converge, and then set this as the limit.
Hope thats a better explanation.
technocrat.prakash is offline   Reply With Quote

Old   November 8, 2009, 11:02
Default
  #5
New Member
 
Join Date: Aug 2009
Posts: 5
Rep Power: 8
tang400 is on a distinguished road
Quote:
Originally Posted by technocrat.prakash View Post
Hope thats a better explanation.
Hi Prakash Ayappan,
Your reply is also very helpful for me. But for the single unsteady heat conduction ,how to set the time step? can i set a bigger time step, e.g.60s?
Looking forward to your reply!
Thanks!
tang400 is offline   Reply With Quote

Old   November 9, 2009, 02:05
Default
  #6
New Member
 
Santosh
Join Date: Nov 2009
Location: Netherlands
Posts: 16
Rep Power: 7
santoshgoku is on a distinguished road
Quote:
Originally Posted by tang400 View Post
Hi Prakash Ayappan,
Your reply is also very helpful for me. But for the single unsteady heat conduction ,how to set the time step? can i set a bigger time step, e.g.60s?
Looking forward to your reply!
Thanks!
As said before, it again depends on your grid size and other conditions. IMO 60 s is too high in general problems. Time step in the order of milliseconds is used for standard problems of unsteady heat conduction.
santoshgoku is offline   Reply With Quote

Old   November 9, 2009, 03:20
Default
  #7
New Member
 
Join Date: Aug 2009
Posts: 5
Rep Power: 8
tang400 is on a distinguished road
Quote:
Originally Posted by santoshgoku View Post
As said before, it again depends on your grid size and other conditions. IMO 60 s is too high in general problems. Time step in the order of milliseconds is used for standard problems of unsteady heat conduction.
Thanks for your quickly reply.
There are 70 millions 3D cells in my model,and we want to know the temperature distribution after 24 hours later.If time step is in the order of milliseconds,you know,it will cost too long computer time to get the results.And one of my friends,he set time step in the order of milliseconds when simulating the fluidized bed .
Just single conduction exists in my case, can i set time step to several seconds or tens of seconds? can you give me the detail about the time step and grid size?
Thank you very much!
tang400 is offline   Reply With Quote

Old   November 9, 2009, 03:35
Default
  #8
Senior Member
 
Philipov's Avatar
 
Svetlin Philipov
Join Date: Mar 2009
Location: United Kingdom
Posts: 176
Rep Power: 8
Philipov is on a distinguished road
70 millions CV?!?!?!?! how you intend to solve this!!!
Revise the domain and use adaptive time step if the problem allows...
Philipov is offline   Reply With Quote

Old   November 9, 2009, 04:56
Default
  #9
Member
 
JP
Join Date: Mar 2009
Posts: 57
Rep Power: 9
srjp is on a distinguished road
As said by other members before, the optimum timestep can be found by trial and error. It is best to start with a low timestep, run for few iterations. Check if there are no convergence problems, then you can increase the timestep. In three to four revisions, you would have settled on the optimum timestep.

If your problem involves conduction/convection you can use some thumbrules like delt ~ (delx^2)/alpha

In natural convection
delt ~ sqrt(delx/(g.beta.deltaT))

where:
delt = approximate time step in seconds
delx = ave cell length (m)
alpha = thermal diffusivity = k/(rho.Cp)
k = thermal conductivity
rho = density
Cp = Specific heat of fluid
g = gravitational accelaration
beta = coefficient of thermal expansion
deltaT = temperature difference between the surface and freestream.

If your fluid is air, for a cell size of 1mm, you get delt around 0.05 seconds.
May be you can start with this, and keep increasing.
Ravindra123 likes this.
srjp is offline   Reply With Quote

Old   November 9, 2009, 08:17
Default
  #10
New Member
 
Prakash Ayappan
Join Date: Mar 2009
Posts: 25
Rep Power: 8
technocrat.prakash is on a distinguished road
Before thinking about the time consumed for producing the results, make sure the analysis is converging (the results are atable). So start from the smaller time and try to increase the time.

You can use srjp reply.
technocrat.prakash is offline   Reply With Quote

Old   November 11, 2009, 08:42
Default
  #11
New Member
 
Join Date: Aug 2009
Posts: 5
Rep Power: 8
tang400 is on a distinguished road
Quote:
Originally Posted by technocrat.prakash View Post
Before thinking about the time consumed for producing the results, make sure the analysis is converging (the results are atable). So start from the smaller time and try to increase the time.

You can use srjp reply.
hi guys,i took your advice and set time step to 0.005s. Result is converging, this is my residuals curve:
now,can i set the time step to a bigger one,for example 0.5s or 5s?
BTW,my cells number is 0.7 millons not 70 millions,hoho,i am sorry.
tang400 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
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 00:36
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 12 September 17, 2007 17:48
DPM: Particle Tracking Madhukar FLUENT 1 July 24, 2007 03:51
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


All times are GMT -4. The time now is 21:38.