Maximum number of iterations exceeded

Hello sir @1318980 , @jousefm

i already made a copy from your meshing of my project and also did the simulation, so far the simulation ran smoothly thanks to you.
Here i paste my link of the simulation project

Could you check the simulation “Run 1” for me please…
i actually thought that after 3040 s, all of the tank will be full with the temperature of 519.25 K,but it is only half of the tank…
could you please help me with this?..is that the mass flow rate is too small?
and also how do i get after 3040 s,all the water temperature in the tank get average of 519 K?

thanks in advance,

Azmel

Hi @azmelfadzil, what is driving the mass flow rate in this design? I was struggling with convergence so I checked the results:

Although not converged it does show where the problems lie, with an inlet speed exceeding 1000m/s .

I applied this point:

And indeed the temperature was what you expected, to do this the way you were doing would have required much more iterations.

Kind regards,
Darren

2 Likes

Hello @1318980 @jousefm,
Thank you very much Darren for your help.
Maybe i need to explain more detail about the project so you guys can further assist me.

Firstly the water tank already filled with water
at 0 s themperature is 416 K, there is no water flow or whatever.
and then the water tank storage will be begin to fill with water that have about…mass flow rate with 0.2753 m/s and with T=519.25 K and with P=49 bar

and after 3040 s,all the water in the storage will completely become 519.25 K.

so i want to run the simulation and see what happen when for example at 500 s,maybe just half the water will warm and after completely about 3040 s,the water inside the tank storage will be completely get 519.25 K.

So i need the advice from you guys about this project…

i already did the simulation according to the advice from sir Darren and it still in computing.
if someone can help or give some advice about how to properly do the simulation…please do so…

thanks in advance,

Azmel

Oh, that is the relevance of the 3040s end time!!

Ok, so for this you need a transient simulation. What you have been solving was a steady state simulation, this is time independent and therefore, the end result is the result of many iterations. In a steady state you cannot think of the time steps as actual time but more like how many time steps it has run.

A transient solution with velocity this high at the inlet might be very computationally expensive.

Kind regards,
Darren

1 Like

Hello sir @1318980,

Thank you very much sir for your help! :grinning: .
I already did the transient simulation under “convective heat transfer 2” “Run 2”…
and also have calculated my water flow velocity with 0.0696 m/s…
I did the simulation with this velocity value at inlet within 3040 s and still didnt get the results that i expect.

Would you check for me please the simulation that i ran and correct me if i have done something wrong with the simulation…

thank you very much sir.

kind regards,
Azmel

1 Like

@azmelfadzil how wide is your inlet? In my CAD system is says it is 0.025m diameter, is that correct?

Just want to confirm the basics first checking inlet.

Best,
Darren

1 Like

@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

thanks in advance,

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.:cold_sweat:

thanks in advance,

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,

thank you very much for your advice and explanation.
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.

thanks in advance

Azmel

Hi @azmelfadzil!

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

Best,

Jousef

2 Likes

hello sir @jousefm,

thank you very much for your reply sir

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 :anguished:

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.

thanks in advance,
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 .

what is your opinion sir?,please correct me if i`m wrong…

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