How to automatically stop a simulation if the residuals go below a threshold?

Is it possible to automatically pause a simulation after the residuals go below a certain value in SimScale? In short, the answer is yes.

For simulations based in OpenFOAM solvers, the definition of the residual threshold is done under the Numerics > Residual controls:

In the image above, the simulation is going to be automatically canceled if all the absolute residuals go below their respective absolute tolerances (in this case, 1e-5).

For example, in the image below, the end time of the simulation was 3000 iterations. However, at iteration 2645, all equations have a residual smaller than 1e-5, causing the simulation to stop:

Furthermore, in the subsonic solver, the stopping criteria is defined under the Simulation Control settings:


Likewise, if the residuals of all equations fall below this threshold, the simulation stops automatically.

It is worth noting that assessing convergence exclusively through residuals is not a good practice. Using result controls to monitor physical quantities of interest, and visually inspecting the simulation results are also important steps to take.

1 Like