Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Convergence: when should I stop the model?

Please login with a confirmed email address before reporting spam

Hi everyone

I have been working on models that take several days to solve. One of them is running at the moment, and I just have a general question.

When I look at the Convergence Plot 2, which is "Reciprocal of step size" vs "Time step", I can see the reciprocal of step size is between 10^5 and 10^6. It has been like this for several hours, and the progress value is at 2% without increasing.

I need results for this simulation by the beginning of next week. When do you know if you should stop the simulation or let it run and solve this convergence difficulty eventually? If I stop it, and the model could have advanced and solved, then I'll lose several hours of solving. But if I don't stop it, it might be at 2% for more than a day.

What should I do? What are the general guidelines on convergence?

Thank you so much!
Sylvana

11 Replies Last Post 2 mai 2016, 07:09 UTC−4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 mars 2012, 18:05 UTC−4

But if I don't stop it, it might be at 2% for more than a day.


Moreover, tomorrow it might be 20% as well :)

Rules for convergence is really governed by your problem. If you think 5% error is tolerable for your task, just set this limit. But if you want to get 0.1% you got to either wait or somehow optimize your model.
[QUOTE] But if I don't stop it, it might be at 2% for more than a day. [/QUOTE] Moreover, tomorrow it might be 20% as well :) Rules for convergence is really governed by your problem. If you think 5% error is tolerable for your task, just set this limit. But if you want to get 0.1% you got to either wait or somehow optimize your model.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 mars 2012, 11:04 UTC−4
I am running highly non-linear 3D time-dependent (upto 30days with 1[h] increments) heat transfer models. It takes 13 hours in one of my computers and 21 hours in another. However, when I start solving, the overall progress stays at 0% to 4% for the first half time (6 to 10 hours of runtime) and then after that, solving speed increases as well as the solver time increments.

Using a probe, I checked the solver time steps. At the very beginning, time increments are 3 to 24 seconds for the first hour of solver time and then they gradually increase and reach 1800 to 3600 seconds (which is my limit) in around 30 hours of solver time and then stay in these steps. This is around 4% of entire solution progress and after this point it takes much less time for the solver to continue.

P.S. Runtime is the actual time which the solution takes and solver time is the time I designate in the solver settings. I use 1e-3 as tolerance in my solver settings and update Jacobian in each solver time step.

Hope this helps,
--
Tolga
I am running highly non-linear 3D time-dependent (upto 30days with 1[h] increments) heat transfer models. It takes 13 hours in one of my computers and 21 hours in another. However, when I start solving, the overall progress stays at 0% to 4% for the first half time (6 to 10 hours of runtime) and then after that, solving speed increases as well as the solver time increments. Using a probe, I checked the solver time steps. At the very beginning, time increments are 3 to 24 seconds for the first hour of solver time and then they gradually increase and reach 1800 to 3600 seconds (which is my limit) in around 30 hours of solver time and then stay in these steps. This is around 4% of entire solution progress and after this point it takes much less time for the solver to continue. P.S. Runtime is the actual time which the solution takes and solver time is the time I designate in the solver settings. I use 1e-3 as tolerance in my solver settings and update Jacobian in each solver time step. Hope this helps, -- Tolga

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26 mars 2012, 14:00 UTC−4
Thanks everyone for the responses. They really helped!

Sylvana
Thanks everyone for the responses. They really helped! Sylvana

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 mars 2013, 12:07 UTC−5
Hi dear All,
I have the same problem, could anybody please let me know what is the meaning of "Reciprocal of time step size"?
And what is the meaning when it shows a horizontal line, and when it shows fluctuation?
Thank you,
Giti
Hi dear All, I have the same problem, could anybody please let me know what is the meaning of "Reciprocal of time step size"? And what is the meaning when it shows a horizontal line, and when it shows fluctuation? Thank you, Giti

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 5 mars 2013, 13:26 UTC−5
Hi Giti,

The reciprocal of the time step size is one divided by the time step size. The bigger the steps the smaller the value. In most default transient solvers COMSOL has the flexibility to increase or decrease the time step size as it sees fit. It increases the step size when the analysis is going well (I am sure there is a more technical description for that), and decreases it when the solver either fails to converge or converges but the time integration error is large.

Nagi Elabbasi
Veryst Engineering
Hi Giti, The reciprocal of the time step size is one divided by the time step size. The bigger the steps the smaller the value. In most default transient solvers COMSOL has the flexibility to increase or decrease the time step size as it sees fit. It increases the step size when the analysis is going well (I am sure there is a more technical description for that), and decreases it when the solver either fails to converge or converges but the time integration error is large. Nagi Elabbasi Veryst Engineering

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 6 mars 2013, 01:20 UTC−5
Hi

the choice of time steps and time step progression, can change drastically the time to solution. If you have a diffusion type problem, a logarithmic or power series is often faster than a linear time step

examples: a linear:

range(1,1,1000) range(2000,1000,100000)

a power series;
0 2^{ range(-4,1,12) range(14,2,18) }

or any combination

--
Good luck
Ivar
Hi the choice of time steps and time step progression, can change drastically the time to solution. If you have a diffusion type problem, a logarithmic or power series is often faster than a linear time step examples: a linear: range(1,1,1000) range(2000,1000,100000) a power series; 0 2^{ range(-4,1,12) range(14,2,18) } or any combination -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 mars 2013, 19:30 UTC−4
Hi Ivar,
I was wondering if the time step could have some effect on the transient model's results?
Thank you,
Giti
Hi Ivar, I was wondering if the time step could have some effect on the transient model's results? Thank you, Giti

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 15 mars 2013, 19:31 UTC−4
Hi Nagi,
Thank you so much. Your explanation was so helpful.
Regards,
Giti
Hi Nagi, Thank you so much. Your explanation was so helpful. Regards, Giti

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16 mars 2013, 04:10 UTC−4
Hi

yes it can in particularaly if the time step "jumps over" some changes in the boundary conditions. This happens typically with harmonic type time dependent BC's and automatic time stepping, as COMSOL tries to double regularly the step duration, and then you might get aliasing. Else my impression is "just" that the steps must be small enough for the convergence criteria to control the algorithm that is why COMSOl often makes many, even hundred of intermediaqte time steps between each value it send "out" and stores as your demanded time value

--
Good luck
Ivar
Hi yes it can in particularaly if the time step "jumps over" some changes in the boundary conditions. This happens typically with harmonic type time dependent BC's and automatic time stepping, as COMSOL tries to double regularly the step duration, and then you might get aliasing. Else my impression is "just" that the steps must be small enough for the convergence criteria to control the algorithm that is why COMSOl often makes many, even hundred of intermediaqte time steps between each value it send "out" and stores as your demanded time value -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 17 mars 2013, 11:33 UTC−4
Thank you Ivar.
Thank you Ivar.

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2 mai 2016, 07:09 UTC−4
Hi everyone,

I am also having a similar problem. My question is can we not obtain a simple error v/s time step-type convergence plot and how does one interpret this kind of convergence plot i.e. the reciprocal of time step v/s time step. How does it inform us whether the solution has converged or not?

Thanks,
Mahvash

PS: I am using Comsol 5.2
Hi everyone, I am also having a similar problem. My question is can we not obtain a simple error v/s time step-type convergence plot and how does one interpret this kind of convergence plot i.e. the reciprocal of time step v/s time step. How does it inform us whether the solution has converged or not? Thanks, Mahvash PS: I am using Comsol 5.2

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.