Dear DelphinTeam,
I have a rather general question concerning the simulation process. Just recently I have started to familiarise myself with Delphin, and unfortunately I haven´t really worked with the CVODE Integrator module so far. Often I do obtain the following error message, when simulating my model:
Error in CVODE Integrator module 'CVODE', function 'CVode':
At t = 1.79678e+06 and h = 0.00211726, the corrector convergence test failed repeatedly or with h = hmin.
Error during integrator step call.
Error during integration.
Critical error, simulation aborted.
What does this mean exactly? I do understand that at the given time step a problem occurred, but unfortunately I do not know where I need to focus within my model to tackle this problem.
Weirdly, after the calculation is automatically stopped by the solver and the calculation again started by me without any changes of the model, the simulation runs for some time again.
I am grateful for any help!
Kind regards,
Markus.
General issue with the CVODE Integrator module
Moderatoren: ghorwin, fechner, ruisinger

 Beiträge: 7
 Registriert: Do 28. Nov 2019, 13:32
Re: General issue with the CVODE Integrator module
Hi,
> Error in CVODE Integrator module 'CVODE', function 'CVode':
> At t = 1.79678e+06 and h = 0.00211726, the corrector convergence test failed repeatedly or with h = hmin.
CVODE attempts to reduce the time step below the userdefined minimum step size. The minimum step size is a consistency check criterion, and basically means "If the solver has to reduce the time step below this limit, something is wrong with my parameters or model setup".
The minimum step size does not tell the solver to keep its step sizes above this limit  the step size is determined based on the tolerance settings and the actual physics and time evolution of the differential equations.
Bye,
Andreas
> Error in CVODE Integrator module 'CVODE', function 'CVode':
> At t = 1.79678e+06 and h = 0.00211726, the corrector convergence test failed repeatedly or with h = hmin.
CVODE attempts to reduce the time step below the userdefined minimum step size. The minimum step size is a consistency check criterion, and basically means "If the solver has to reduce the time step below this limit, something is wrong with my parameters or model setup".
The minimum step size does not tell the solver to keep its step sizes above this limit  the step size is determined based on the tolerance settings and the actual physics and time evolution of the differential equations.
Bye,
Andreas

 Beiträge: 7
 Registriert: Do 28. Nov 2019, 13:32
Re: General issue with the CVODE Integrator module
Dear Andreas, dear DelphinTeam,
first of all, thank you very much for the quick response!
The performance setups contain the parameter "Lower time step boundary (model consistency)" which can be adjusted. I assume that is exactly the userdefined minimum step size.
If I reduce this parameter, e.g. from 1e10 to 1e15 s, I can avoid the model to fail, as long as the solver tries not to reduce its time steps even below 1e15 s, right?
However, the question that arises based on this adaptation: is this a valid approach to solve the problem I had had or will I thereby commit some basic mistake, which I might not consider?
I appreciate any kind of help.
Thanks. =)
first of all, thank you very much for the quick response!
The performance setups contain the parameter "Lower time step boundary (model consistency)" which can be adjusted. I assume that is exactly the userdefined minimum step size.
If I reduce this parameter, e.g. from 1e10 to 1e15 s, I can avoid the model to fail, as long as the solver tries not to reduce its time steps even below 1e15 s, right?
However, the question that arises based on this adaptation: is this a valid approach to solve the problem I had had or will I thereby commit some basic mistake, which I might not consider?
I appreciate any kind of help.
Thanks. =)
Re: General issue with the CVODE Integrator module
Correct, a value of 1e15 s is surely extreme (basically disables the check), and if indeed the solver takes such very small time step, there's probably something wrong with the parameters in the model.
Even if the simulation is made to work with such small time steps, it is very likely that for longer simulations a rounding error problem appears.
Suppose you run the simulation for 1e7 s, and the solver attempts to reduce the step size to 1e9. Adding 1e7 and 1e9 using double precision computer numbers, will simply round away the 1e9 and the solver would stop. CVODE protects against that and will, in such cases, raise an error.
So, as a general rule of thumb: choose the lower time step size such, that the anticipated simulation end time (in seconds) is at maximum 13 orders of magnitude larger than the minimum time step size. So, if solver runs until 1e7 > minimum time step size should be selected no smaller than 1e6.
Andreas
Even if the simulation is made to work with such small time steps, it is very likely that for longer simulations a rounding error problem appears.
Suppose you run the simulation for 1e7 s, and the solver attempts to reduce the step size to 1e9. Adding 1e7 and 1e9 using double precision computer numbers, will simply round away the 1e9 and the solver would stop. CVODE protects against that and will, in such cases, raise an error.
So, as a general rule of thumb: choose the lower time step size such, that the anticipated simulation end time (in seconds) is at maximum 13 orders of magnitude larger than the minimum time step size. So, if solver runs until 1e7 > minimum time step size should be selected no smaller than 1e6.
Andreas
Re: General issue with the CVODE Integrator module
and try to check out why you have such problems.
 exchange some of the materials in order to check for strange material functions
 change discretisation
 maybe you have special climatic conditions, in this case change also this
 try to simulate with different 'maximum method order' in 'performance options'
 exchange some of the materials in order to check for strange material functions
 change discretisation
 maybe you have special climatic conditions, in this case change also this
 try to simulate with different 'maximum method order' in 'performance options'