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

Time step size and max iterations per time step

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

Like Tree16Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   July 25, 2005, 22:35
Default Time step size and max iterations per time step
  #1
pUl|
Guest
 
Posts: n/a
We all know that the Fluent maual typically recommends that the ideal time step size would be one which yields convergence within 15-20 iterations. I wish to know the basis for such a statement. My experience with unsteady state eulerian simulations of turbulent bubbly flows in pipes, seems to indicate that more iterations per time step are required for the first few time steps. Later, as the solution proceeds, I find that the number of iterations per time step hovers around 15-25.

So far so good.

However, I've noticed that a solution which was happily converging within 20 iterations in a time step suddenly starts to take more iterations (say around 20-40 more) to converge. And as the solution proceeds, I can no longer converge within a time step (no matter how high the 'maximum iterations per time step' is set to).

So when this happens, should one:

a. reduce the URFs and continue iterating?

b. reduce the time step size and continue iterating?

c. reduce both and continue iterating?

d. stop the solution altogether and restart the simulation with a finer time step size?

Another observation is the if you start a time-dependant solution with lower URF's, the solution almost always needs more iterations to converge in a time step. Can it then be speculated that the 'max 15-20 iterations per time step' guideline is valid only when the default Fluent URFs are used?

Any suggestions?
  Reply With Quote

Old   July 25, 2005, 22:40
Default Re: Time step size and max iterations per time ste
  #2
zxaar
Guest
 
Posts: n/a
i have been using 7 iterations per step and with step size 1E-05 for almost all my les calculations, never had any problem with the results.
  Reply With Quote

Old   July 26, 2005, 03:36
Default Re: Time step size and max iterations per time ste
  #3
Luca
Guest
 
Posts: n/a
Hi! I'm your same situation. I run flutter analysis and since I'm doing fluid-structure silmulation, I use a fixed time-step. The question is: I know the maximum time-step I can use to solve structural dynamic, but I don't know the minimum value to use. Clearly using a smaller time step will make you analysis longer, but usually sub-iterations in the pseudo-time will be fewer. I think you should make some trials and understand what happens using differet time-step size. Another question is: what should I look at to judge convergence during the pseudo-time iterations? If you use a couple solver and look at the residuals probably they will (at least in my case) be about 10-3,10-4. So if you use Fluent default settings, you may think you haven't converged yet. Personally I wrote a UDF to judge convergence by integrating aerodyamic forces. To me convergence is when, for example, aerodynamic forces converge within 10-6,10-7, even if residuals are about 10-4. So I think there's not a unique answer to your important questions. It's up to you and to your experience to understand the problem and to find a trick to save time. Usually in the first time-iterations I run even more than 50 sub-iteration to satisfy my criteria, than this number is about 20:30. I hope this can help you, good luck! Luca
Piyush Jadhav likes this.
  Reply With Quote

Old   July 26, 2005, 04:07
Default Re: Time step size and max iterations per time ste
  #4
nehru n
Guest
 
Posts: n/a
ellessedi likes this.
  Reply With Quote

Old   July 26, 2005, 04:15
Default Re: Time step size and max iterations per time ste
  #5
edi ghirardi
Guest
 
Posts: n/a
From my little experience:

-It's true, more time steps are often required for the first time steps to converge (in my experience, only the first). It shold be somewhat a matter of initialization, in my opinion. But once the solution proceeds, everything should work fine.

-"However, I've noticed that a solution which was happily converging within 20 iterations in a time step suddenly starts to take more iterations (say around 20-40 more) to converge" It happens also to me when my multiphase problems start to face some "extreme" flow conditions as the simulation goes (turbulent splashing, high pressure or velocity gradient and so on...). Lowering the URFs usually overcomes the problem only momentarily. Personally I solved it refining the mesh (and re-starting the whole thing again...) or lowering the time step size (sometimes they have to be VERY small).

-More you reduce the URFs, more iterations are required per time step (it's numeric...).

-Yes, I'm personally convinced that the "15-20" guideline is valid only when default URFs are used.

Hope this helps,

Edi.
  Reply With Quote

Old   July 26, 2005, 04:25
Default Re: Time step size and max iterations per time ste
  #6
zxaar
Guest
 
Posts: n/a
kya hua, bolti band ho gayi ?????
  Reply With Quote

Old   July 26, 2005, 04:30
Default errata corrige
  #7
edi ghirardi
Guest
 
Posts: n/a
"It's true, more time steps are often required for the first time steps to converge" should be "It's true, more ITERATIONS are often required for the first time steps to converge", obviously.

Sorry

Edi.
  Reply With Quote

Old   July 26, 2005, 13:02
Default Re: errata corrige
  #8
pUl|
Guest
 
Posts: n/a
Thank you all for sharing your experiences
  Reply With Quote

Old   November 27, 2012, 05:08
Post
  #9
Senior Member
 
Crank-Shaft's Avatar
 
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 141
Rep Power: 4
Crank-Shaft is on a distinguished road
I know I am reviving a really old thread however, I need some guidance on choosing time steps for a transient simulation. I am currently working with an open-flow domain over a hump, which induces a separation bubble at the rear. The hump effective chord length is 300 mm and the free-stream velocity is 4.5 m/s. The Reynolds Number calculated was 80 000 in Standard ambient air at 25 deg. C.

Currently I am using a steady state solution to initialise the transient analysis. I also made sure that the steady state residuals and transport variables all fell below 10^-3 however, they all seem to plateau and do not change at all after this point. After 2000 iterations the mass flux difference at the inlet and outlet boundaries fell below 10^-8.

I ran my transient simulations with 0.002 second steps for 100 time-steps and set 40 iterations/timestep. This appears to violate the Fluent guideline for 15-20 iterations per time-step for convergence. The transient analysis also appears to oscillate with a very high frequency in the residual monitors plot and even after 200 time steps there appears to be no noticeable change to this.

Using the average cell sizes and Courant Number = 1 I approximated that a time-step value of 0.000136 would be ideal for this. When I changed the time-step setting to 0.001 from 0.002 I noticed that the number of iterations taken to converge each time-step decrease to ~19-20 however, the oscillations are still present without much change to the residuals.

Do you think I am taking a valid approach to this? If not, can someone please explain the possible sources of such oscillations and also provide guidance on choosing the transient setting. Help is greatly appreciated.

Thanks all.
__________________
--
Mechanical Engineering
Sydney, Australia


Crank-Shaft is offline   Reply With Quote

Old   November 27, 2012, 19:47
Default
  #10
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 606
Rep Power: 12
LuckyTran is on a distinguished road
Quote:
Originally Posted by Crank-Shaft View Post
I ran my transient simulations with 0.002 second steps for 100 time-steps and set 40 iterations/timestep. This appears to violate the Fluent guideline for 15-20 iterations per time-step for convergence. The transient analysis also appears to oscillate with a very high frequency in the residual monitors plot and even after 200 time steps there appears to be no noticeable change to this.

Using the average cell sizes and Courant Number = 1 I approximated that a time-step value of 0.000136 would be ideal for this. When I changed the time-step setting to 0.001 from 0.002 I noticed that the number of iterations taken to converge each time-step decrease to ~19-20 however, the oscillations are still present without much change to the residuals.

Do you think I am taking a valid approach to this? If not, can someone please explain the possible sources of such oscillations and also provide guidance on choosing the transient setting. Help is greatly appreciated.

Thanks all.
Your simulation seems to be proceeding well. Fluent will report residuals per iteration. Per time-step the residuals should decrease rapidly. The initial guess to the next iteration uses the final solution from the previous time-step. Once the solver proceeds to the next time-step, all the residuals should increase and then decrease again. Is this what you are seeing and calling it oscillating? It looks more like a sawtooth. This is normal and expected behavior. Residuals will repeat the sawtooth pattern forever unless you have a perfectly stationary flow (unlikely).

You should maintain Courant number around or less than 1 to be safe (seems like you are already doing this). I would recommend Courant number = 0.5 to be even safer unless you cannot afford the increased computation time.

As you decrease the time-step size, the residuals typically decrease faster. The initial guess to the next iteration uses the final solution from the previous time-step. Since the difference in physical time between time-steps is smaller, the difference in solution between the previous time-step and current time step is smaller and this causes the residuals to decrease faster when the time-step is shortened.

The recommendation of ~20 iterations per time-steps is only a recommendation, but it is a pretty darn good one (you should avoid calculating less than 20 iterations per time-step). You can do 100 or 1000 if you like. Generally rather than doing say 40 iterations in one time-step, it is desirable to reduce the time-step size to half the amount to do 20 iterations for two-steps (2x20=40 instead of 1x40=40). The overall computational time and cost is the same with the advantage that the solution is more accurate because of the smaller time-step (lower Courant number).
wanna88, Anna Tian, jipaz and 4 others like this.

Last edited by LuckyTran; November 27, 2012 at 22:40.
LuckyTran is offline   Reply With Quote

Old   November 27, 2012, 22:17
Default
  #11
Senior Member
 
Crank-Shaft's Avatar
 
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 141
Rep Power: 4
Crank-Shaft is on a distinguished road
Thanks for the wonderful guidance Lucky Tran. I think it makes sense that the smaller time steps lead to smaller changes in the flow field and hence the residuals will be faster in convergence.

The oscillations I mentioned are indeed like a classical sawtooth wave however, this behaviour was unchanged for the smaller time-step. Based on the observations here, I will try to use the smaller time-steps which give me a Courant Number close to 1 and maybe decrease the max iterations/time-step value. I don't believe I can afford to use a Courant Number of 0.5 since the flow domain is large than 2 metres and it would take too long for the simulation with a desired number of flow-through times.

Thanks and I will post some updates soon after these steps are implemented.
jipaz likes this.
__________________
--
Mechanical Engineering
Sydney, Australia


Crank-Shaft is offline   Reply With Quote

Old   November 27, 2012, 22:45
Default
  #12
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 606
Rep Power: 12
LuckyTran is on a distinguished road
Quote:
Originally Posted by Crank-Shaft View Post
The oscillations I mentioned are indeed like a classical sawtooth wave however, this behaviour was unchanged for the smaller time-step.
Regardless of time-step size, you should always get the sawtooth wave unless the problem is tending towards a stationary solution. For example, approaching the stationary solution (steady state).
jipaz and pinkucfd like this.
LuckyTran is offline   Reply With Quote

Old   February 15, 2013, 04:43
Default Regarding No. of Iterations in Time step
  #13
New Member
 
Yunusrulz
Join Date: Apr 2012
Posts: 10
Rep Power: 5
yunusrulz is on a distinguished road
Hi, I am working on edge tones. I got almost exact result when the default iteration per time step is 20. then I saw, actually the edge tone frequency is getting bigger and bigger when i increase the inner iterations per time step. so what is the best no. of iterations per time step for my case?

My time step size is 0.0001 second
I have worked up to 20, 30, 40, 50 iterations per time step
yunusrulz is offline   Reply With Quote

Old   February 15, 2013, 05:05
Default
  #14
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,098
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
As long as your solution changes while increasing the number of iterations, you havent found the "best" number.
It just means that your number of iterations is not sufficient to achieve convergence within one timestep.
If you are still having this issue at 50 inner iterations, your time step size might be too high.
Anna Tian and karimnejad like this.
flotus1 is offline   Reply With Quote

Old   July 25, 2013, 10:15
Default
  #15
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 4
star is on a distinguished road
Hi I am working on transient flow around 2D airfoil. I have a confusion regarding number of iterations.
I used time step size 0.00005, number of time steps 2000 and i tried two different no. of max iterations per time steps i.e 20 and 10. In case of 20, it stopped (i think converged) at about 24000 iterations and from about 17 thousand onwards it constantly wrote solution is converged after every tenth iteration.
Similar case was when i used 10 iterations/time step but this time it stopped after 19572 iterations. The results were almost same with a very little difference.
So my question is that what is logic that it stopped after these much iterations because i noted that they start converging very early than these iterations?
and why it converged quickly with 10 iterations/time step than 20?
I will be thankful for help
star is offline   Reply With Quote

Old   July 25, 2013, 10:32
Default
  #16
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,098
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
In a transient simulation like this, you have 2 conditions that can break the iteration loop within a timestep: the residuals and the maximum number of inner iterations.

If you set the maximum number of inner iterations to 50, but the residual targets are crossed after 20 Iterations, the solution is considered converged (well the residual targets are met, yet this doesnt necessarily indicate a converged solution).
That is why fluent tells you that the solution is converged in the case where you set 20 inner iterations maximum.

For the case with only 10 maximum iterations, the residual targets are obviously not met within 10 iterations in most of the timesteps. That is why the total number of iterations is almost 20000 (2000 timesteps * 10 iterations).
karimnejad likes this.
flotus1 is offline   Reply With Quote

Old   July 25, 2013, 11:57
Default
  #17
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 4
star is on a distinguished road
Thanks Alex for reply. I got almost same results( CL, Cd and Cp) with 10 and 20 maximum iterations.
Is it better to use 10 max iterations because the total iterations it take is less than with 20 max iterations?
Also, as you said if we set the maximum inner iteration to 50 but the residual targets are crossed after 20 so the solution is considered as converged, so if we set max iteration less than 50 but greater than 20 e.g 25 or 30 then it will give same result (because residual targets are crossed after 20)?
Is there any special rule for assigning time step size or it's just a matter of trial and error?
I hope you will help

Last edited by star; July 26, 2013 at 13:40.
star is offline   Reply With Quote

Old   July 25, 2013, 17:42
Default
  #18
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,098
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
With the same amount of iterations performed, why should the solution be any different for two cases with identical setups?
Nevertheless, my spider senses tell me that the case you are running is not time-dependent, so there is no need to run a transient simulation. Consequently, the usual rules of thumb to estimate an appropriate time step size do not apply here.
Correct me if my assumption was wrong.
flotus1 is offline   Reply With Quote

Old   July 26, 2013, 11:54
Default
  #19
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 4
star is on a distinguished road
My viscous model is Laminar and I set time to Transient and Transient formulation to Bounded second order implicit, ( I also tried NITA with both Pressure and momentum's RF to 1 and got same result though the residual graphs are different). What do you think about this? You have enough knowledge and I am just a beginner type. Thanks for your patience.. I hope you will guide me better.

Last edited by star; July 26, 2013 at 13:46.
star is offline   Reply With Quote

Old   July 26, 2013, 16:27
Default
  #20
Senior Member
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,098
Rep Power: 19
flotus1 will become famous soon enoughflotus1 will become famous soon enough
Again, I doubt that you want to resolve any time-dependent effects in your simulation. Most probably, there are no transient effects in the flow you are simulating.
In this case, it is an unnecessary burden to do a transient simulation because you have to choose more simulation parameters (time step size, number of iterations, transient numerical scheme...).
If the physics are not time-dependent, I would not know how to estimate a suitable time step size.
flotus1 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
Superlinear speedup in OpenFOAM 13 msrinath80 OpenFOAM Running, Solving & CFD 18 March 3, 2015 06:36
Time step size, number of time steps and max iterations per time step guido_88 FLUENT 4 August 30, 2012 14:49
icoLagrangianFoam OF1.6 myNewParticleSolver heavy_user OpenFOAM 16 February 11, 2012 06:15
Time step, Number of time step, Maxximum Iterations per time step sandisk FLUENT 0 July 18, 2011 02:57
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 12 September 17, 2007 17:48


All times are GMT -4. The time now is 00:56.