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

Time step size and max iterations per time step

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

Like Tree34Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 25, 2005, 23: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, 23: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.
rajann_786 and THA SEANGHAI like this.
  Reply With Quote

Old   July 26, 2005, 04: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
  Reply With Quote

Old   July 26, 2005, 05:15
Default Re: Time step size and max iterations per time ste
  #4
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.
Cobra and Dodul like this.
  Reply With Quote

Old   July 26, 2005, 05:30
Default errata corrige
  #5
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, 14:02
Default Re: errata corrige
  #6
pUl|
Guest
 
Posts: n/a
Thank you all for sharing your experiences
  Reply With Quote

Old   November 27, 2012, 05:08
Post
  #7
Senior Member
 
Crank-Shaft's Avatar
 
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 166
Rep Power: 14
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.
johnwesly119 likes this.
__________________
--
Mechanical Engineering
Sydney, Australia


Crank-Shaft is offline   Reply With Quote

Old   November 27, 2012, 19:47
Default
  #8
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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 13 others like this.

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

Old   November 27, 2012, 22:17
Default
  #9
Senior Member
 
Crank-Shaft's Avatar
 
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 166
Rep Power: 14
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
  #10
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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, pinkucfd and m.uzair like this.
LuckyTran is online now   Reply With Quote

Old   February 15, 2013, 04:43
Default Regarding No. of Iterations in Time step
  #11
New Member
 
Yunusrulz
Join Date: Apr 2012
Posts: 10
Rep Power: 14
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
  #12
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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, 11:15
Default
  #13
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 13
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, 11:32
Default
  #14
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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, 12:57
Default
  #15
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 13
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 14:40.
star is offline   Reply With Quote

Old   July 25, 2013, 18:42
Default
  #16
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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, 12:54
Default
  #17
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 13
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 14:46.
star is offline   Reply With Quote

Old   July 26, 2013, 17:27
Default
  #18
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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

Old   July 27, 2013, 12:52
Default
  #19
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 13
star is on a distinguished road
I will work out with this. Thanks..
In transient flow in the convergence history graph (the coefficient of lift (CL) vs Flow time) the calibrations on CL is very high i.e scale of 100 is used, so CL line looks like straight (but there is some oscillation which i cannot see precisely), how can I change or set the CL scale?
star is offline   Reply With Quote

Old   January 16, 2014, 07:10
Question
  #20
Senior Member
 
Anna Tian's Avatar
 
Meimei Wang
Join Date: Jul 2012
Posts: 494
Rep Power: 16
Anna Tian is on a distinguished road
Quote:
Originally Posted by flotus1 View Post
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.
I have a question related to this for my special case.

For my case, the transient behavior is not significant. The solution of my simulation is not time dependent according to the transient simulation results. But I have to run the transient simulation just because the steady state solution doesn't not converge. In this case, I'm wondering will large time step bring me faster to the steady solution than the small time step (here we assume they converge to the same residual level every time step with the same iteration number)? If I choose the large time step as 0.0001, and the smaller one as 0.00001. Will the large time step transient simulation bring me to the steady solution almost 10 times faster then the small one?
__________________
Best regards,
Meimei
Anna Tian is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
icoLagrangianFoam OF1.6 myNewParticleSolver heavy_user OpenFOAM 23 June 2, 2020 03:18
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 17, 2019 00:12
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 15:49
Time step, Number of time step, Maxximum Iterations per time step sandisk FLUENT 0 July 18, 2011 03:57


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