
[Sponsors] 
Time step size and max iterations per time step 

LinkBack  Thread Tools  Search this Thread  Display Modes 
July 25, 2005, 23:35 
Time step size and max iterations per time step

#1 
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 1520 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 1525.
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 2040 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 timedependant 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 1520 iterations per time step' guideline is valid only when the default Fluent URFs are used? Any suggestions? 

July 25, 2005, 23:40 
Re: Time step size and max iterations per time ste

#2 
Guest
Posts: n/a

i have been using 7 iterations per step and with step size 1E05 for almost all my les calculations, never had any problem with the results.


July 26, 2005, 04:36 
Re: Time step size and max iterations per time ste

#3 
Guest
Posts: n/a

Hi! I'm your same situation. I run flutter analysis and since I'm doing fluidstructure silmulation, I use a fixed timestep. The question is: I know the maximum timestep 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 subiterations in the pseudotime will be fewer. I think you should make some trials and understand what happens using differet timestep size. Another question is: what should I look at to judge convergence during the pseudotime iterations? If you use a couple solver and look at the residuals probably they will (at least in my case) be about 103,104. 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 106,107, even if residuals are about 104. 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 timeiterations I run even more than 50 subiteration to satisfy my criteria, than this number is about 20:30. I hope this can help you, good luck! Luca


July 26, 2005, 05:07 
Re: Time step size and max iterations per time ste

#4 
Guest
Posts: n/a



July 26, 2005, 05:15 
Re: Time step size and max iterations per time ste

#5 
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 2040 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 restarting 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 "1520" guideline is valid only when default URFs are used. Hope this helps, Edi. 

July 26, 2005, 05:25 
Re: Time step size and max iterations per time ste

#6 
Guest
Posts: n/a

kya hua, bolti band ho gayi ?????


July 26, 2005, 05:30 
errata corrige

#7 
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. 

July 26, 2005, 14:02 
Re: errata corrige

#8 
Guest
Posts: n/a

Thank you all for sharing your experiences


November 27, 2012, 05:08 

#9 
Senior Member
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 166
Rep Power: 10 
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 openflow domain over a hump, which induces a separation bubble at the rear. The hump effective chord length is 300 mm and the freestream 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 timesteps and set 40 iterations/timestep. This appears to violate the Fluent guideline for 1520 iterations per timestep 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 timestep value of 0.000136 would be ideal for this. When I changed the timestep setting to 0.001 from 0.002 I noticed that the number of iterations taken to converge each timestep decrease to ~1920 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 

November 27, 2012, 19:47 

#10  
Senior Member
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 4,052
Rep Power: 49 
Quote:
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 timestep size, the residuals typically decrease faster. The initial guess to the next iteration uses the final solution from the previous timestep. Since the difference in physical time between timesteps is smaller, the difference in solution between the previous timestep and current time step is smaller and this causes the residuals to decrease faster when the timestep is shortened. The recommendation of ~20 iterations per timesteps is only a recommendation, but it is a pretty darn good one (you should avoid calculating less than 20 iterations per timestep). You can do 100 or 1000 if you like. Generally rather than doing say 40 iterations in one timestep, it is desirable to reduce the timestep size to half the amount to do 20 iterations for twosteps (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 timestep (lower Courant number). Last edited by LuckyTran; November 27, 2012 at 22:40. 

November 27, 2012, 22:17 

#11 
Senior Member
Ovi
Join Date: Oct 2012
Location: Sydney, Australia
Posts: 166
Rep Power: 10 
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 timestep. Based on the observations here, I will try to use the smaller timesteps which give me a Courant Number close to 1 and maybe decrease the max iterations/timestep 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 flowthrough times. Thanks and I will post some updates soon after these steps are implemented.
__________________
 Mechanical Engineering Sydney, Australia 

November 27, 2012, 22:45 

#12 
Senior Member
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 4,052
Rep Power: 49 
Regardless of timestep 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).


February 15, 2013, 04:43 
Regarding No. of Iterations in Time step

#13 
New Member
Yunusrulz
Join Date: Apr 2012
Posts: 10
Rep Power: 10 
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 

February 15, 2013, 05:05 

#14 
Senior Member
Alex
Join Date: Jun 2012
Location: Germany
Posts: 2,677
Rep Power: 38 
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. 

July 25, 2013, 11:15 

#15 
Member
Harry
Join Date: May 2013
Posts: 68
Rep Power: 9 
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 

July 25, 2013, 11:32 

#16 
Senior Member
Alex
Join Date: Jun 2012
Location: Germany
Posts: 2,677
Rep Power: 38 
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). 

July 25, 2013, 12:57 

#17 
Member
Harry
Join Date: May 2013
Posts: 68
Rep Power: 9 
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. 

July 25, 2013, 18:42 

#18 
Senior Member
Alex
Join Date: Jun 2012
Location: Germany
Posts: 2,677
Rep Power: 38 
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 timedependent, 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. 

July 26, 2013, 12:54 

#19 
Member
Harry
Join Date: May 2013
Posts: 68
Rep Power: 9 
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. 

July 26, 2013, 17:27 

#20 
Senior Member
Alex
Join Date: Jun 2012
Location: Germany
Posts: 2,677
Rep Power: 38 
Again, I doubt that you want to resolve any timedependent 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 timedependent, I would not know how to estimate a suitable time step size. 

Thread Tools  Search this Thread 
Display Modes  


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 