# Maximum number of iterations exceeded

@1318980 yes,that is correct

inlet=0.025 m
diameter water tank cylinder= 0.56 m

i just write all of these just in case it can help you with my problem

inlet flow rate values:
m=0.27532204 kg/s
c=0.0696 m/s
p=4901325 pa
T=519 K

Best,
Azmel

ok this is your convergence plot for a transient case:

Please note the courant max and mean. It should be no greater than 1 and it actually reaches 1e9.

there is a fantastic blog here from simscale:

Kind regards,
Darren

1 Like

Hello @1318980,

i already did the new simulation under “convective heat transfer 3” and still got the error of “maximum numver of iterations exceeded” and also “the courant number exceeded the limit of 1”…
could you see my simulation here and also why i always got this error, i thought i already followed properly the instructions in the blog,but still got the errors.

Azmel

Hi @azmelfadzil, so the instability (exceeding iterations) is caused by the fact that the Courant number it above 1, although a lot closer now. Did you use the velocity and cell size of the inlet/outlet pipe? Alternately have you tried using auto time step? this allows you to specify the desired courant number and calulate the time step on a step by step basis?

Kind regards,
Darren

1 Like

hello sir @1318980,

Regarding the automatic time stepping, can you show me or explain to me how can i do the automatic time stepping?
it is because i cannot find the settings for the automatic time stepping for my simulation.

Azmel

You can find information about the automatic timestepping here: Adjustable Timestep - Doc.

Best,

Jousef

2 Likes

hello sir @jousefm,

i already did the simulation with the adjustable timestep turn to “yes”…
as you can see it at my simulation under “convective heat transfer 3” “run1” and “run 3”…

in “run 1”, i set the adjustable timestep to “yes” and set the “write interval” to almost 30000 because lower than that i got warning message indicate that my write interval is too small.
and it still until now in computing after almost 22 hours.

as for the “run 3”, i set the write control to adjustable runtime and got the message “maximum number of iterations exceeded”.

would you help me on how i can avoid this problem

kind regards,
Azmel

@azmelfadzil, yes running a transient simulation will take a long time in your case. The reason is the refinement level on the inlets being so fine to capture the detail, in contrast, the velocity and cell size in the midsection would give a very low courant number and therefore, the courant mean is very low and the courant max is high (approximately 0.7). This is a good indication that the small timesteps are due to local refinement. So your options to speed up sim time are:

1. Increase the inlet diameters to allow a coarser mesh (most likely not plausible as the design is set)
2. Reduce mesh fineness and rely on wall inflation to give longer cells along the inlet (Best option IMO)
3. Persevere with long solve times (at this rate you will use all core hours before it finishes)

Also, I noticed this in your log:

Time = 5.21883520648
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG: Solving for Ux, Initial residual = 0.000228965005081, Final residual = 4.65944785789e-08, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 6.57670160256e-05, Final residual = 1.88060413802e-08, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.000237544242542, Final residual = 4.56967381546e-08, No Iterations 1
DILUPBiCG: Solving for h, Initial residual = 4.31390217522e-06, Final residual = 4.31390217522e-06, No Iterations 0
DICPCG: Solving for p_rgh, Initial residual = 0.86259815061, Final residual = 0.00852855212221, No Iterations 141
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 2.31113354054e-08, global = 3.75739473196e-09, cumulative = -1.11793259451e-06
PIMPLE: iteration 2
DILUPBiCG: Solving for Ux, Initial residual = 0.000614955008655, Final residual = 2.7366729585e-07, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 8.15662048865e-05, Final residual = 3.13228806837e-08, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.000629081856036, Final residual = 2.29218901758e-07, No Iterations 1
DILUPBiCG: Solving for h, Initial residual = 8.3972983374e-06, Final residual = 8.3972983374e-06, No Iterations 0
DICPCG: Solving for p_rgh, Initial residual = 0.673074697906, Final residual = 0.00665125091491, No Iterations 9
diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.43444759189e-08, global = 3.617096382e-09, cumulative = -1.11431549813e-06
DILUPBiCG: Solving for omega, Initial residual = 9.91959535527e-06, Final residual = 9.91959535527e-06, No Iterations 0
DILUPBiCG: Solving for k, Initial residual = 2.11488131674e-05, Final residual = 5.17521087506e-07, No Iterations 1
bounding k, min: -3.81004897356e-06 max: 0.000835148885464 average: 3.01735840141e-06
PIMPLE: not converged within 2 iterations
ExecutionTime = 81581.65 s ClockTime = 82921 s
Courant Number mean: 0.00025597738298 max: 0.70129914236
deltaT = 0.00208412875748

This means that each timestep is not converging before it moves on, if you increase the number of correctors in numerics then this will likely go away at the expense of computation time. I set mine to 20 however it does stop iterating if convergence is met so it wont always do 20 it will likely drop down to 5 or less (at the momment you are using just 2)

Hope all this helps, and let me know how it goes.
Darren

1 Like

Hello sir @1318980,

i want to ask you something about the value of Turbulent kinetic energy value [m²/s²] and Turbulence dissipation [m²/s³].
It is these two values always constant as for the k=0.00375 and as for the epsilon=0.0125?
although there are no velocity at the beginning.

Azmel

you could set initial turbulence conditions based upon calculations of an incredibly small velocity, and your inlet turbulent conditions based upon inlet velocity. Its hard to say how critical this is however. Does your inlet velocity vary?

kind regards,
Darren

1 Like

i´m just thinking about the turbulence condition at my water tank here, i made to two calculation for the k value and epsilon value based on different diameter. it is because my inlet diameter is about 0.025m and the diameter of water tank is 0.56 m.
and also the value of k and epsilon depend on the inlet velocity.
so i thought if at initial condition…there are no velocity,there are also no value for k and epsilon.
and then at my boundary condition,i can choose the custom and set the velocity,k,epsilon according to my calculation with the inlet diameter which is 0.025m .

kind regards,
Azmel

I think you are correct in everything you said except there being no value for k and epsilon, or more accurately the ability to put no value (zero) in. In turbulence modelling we need there to be a value, it could be really small but it needs to be bigger than zero (If I remember correctly). so what I was saying is you could calculate k epsilon on a very small velocity say 0.0001 \frac{m}{s} and use those as your initial conditions.

Kind regards,
Darren

1 Like

Hello Darren,

Do you have any tips on how to speed up the transient simulation?
because here in my simulation that in reality only take one hour…but the transient simulation here almost take two days,
maybe you have tips on how to lower the time step or increase the write interval…

kind regards,
Azmel

There really is not much else you can do but this:

Hopefully this helps you, but do expect long solve times for transient simulations.
Darren