joergbuchwald / ogs6py

Python-API for the OpenGeoSys (http://www.opengeosys.org) software.
BSD 3-Clause "New" or "Revised" License
16 stars 23 forks source link

Handling of non-converged simulations #30

Closed dominik-kern closed 2 years ago

dominik-kern commented 2 years ago

It is important to check, whether a simulation converged or not, so this should be returned in a status flag. However, a non-converged solution should not thrown a RuntimeError and exit the script, since parameter studies may enter ranges of invalid parameter values and still continue.

dominik-kern commented 2 years ago

An non-converged solution ends with the output

warning: The nonlinear solver failed in time step #1 at t = 86400 s for process #0.
info: [time] Time step #1 took 0.0674464 s.
warning: Time step will be rejected due to nonlinear solver divergence.
critical: /home/dominik/OGS/ogs/ProcessLib/TimeLoop.cpp:470 computeTimeStepping() 
error: The new step size of 86400 is the same as that of the previous rejected time step. 
Please re-run ogs with a proper adjustment in the numerical settings, 
e.g those for time stepper, local or global non-linear solver.
info: OGS terminated on 2021-11-26 13:23:27+0100.
error: OGS terminated with error.

In contrast to a converged solution

info: The whole computation of the time stepping took 10 steps, in which
     the accepted steps are 10, and the rejected steps are 0.

info: [time] Execution took 0.12598 s.
info: OGS terminated on 2021-11-26 13:25:32+0100.