CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   Time step size and max iterations per time step (http://www.cfd-online.com/Forums/fluent/37373-time-step-size-max-iterations-per-time-step.html)

pUl| July 25, 2005 22:35

Time step size and max iterations per time step
 
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?

zxaar July 25, 2005 22:40

Re: Time step size and max iterations per time ste
 
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.

Luca July 26, 2005 03:36

Re: Time step size and max iterations per time ste
 
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

nehru n July 26, 2005 04:07

Re: Time step size and max iterations per time ste
 

edi ghirardi July 26, 2005 04:15

Re: Time step size and max iterations per time ste
 
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.

zxaar July 26, 2005 04:25

Re: Time step size and max iterations per time ste
 
kya hua, bolti band ho gayi ?????

edi ghirardi July 26, 2005 04:30

errata corrige
 
"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.

pUl| July 26, 2005 13:02

Re: errata corrige
 
Thank you all for sharing your experiences :)

Crank-Shaft November 27, 2012 05:08

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.

LuckyTran November 27, 2012 19:47

Quote:

Originally Posted by Crank-Shaft (Post 394343)
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).

Crank-Shaft November 27, 2012 22:17

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.

LuckyTran November 27, 2012 22:45

Quote:

Originally Posted by Crank-Shaft (Post 394529)
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).

yunusrulz February 15, 2013 04:43

Regarding No. of Iterations in Time step
 
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

flotus1 February 15, 2013 05:05

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.

star July 25, 2013 10:15

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

flotus1 July 25, 2013 10:32

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

star July 25, 2013 11:57

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

flotus1 July 25, 2013 17:42

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.

star July 26, 2013 11:54

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.

flotus1 July 26, 2013 16:27

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.


All times are GMT -4. The time now is 15:46.