How simulations stop
A simulation stops when it meets a solver criterion, receives a stop request, or cannot continue. Its terminal status records why it stopped, not whether the result is physically correct.
Solver stopping criteria
A full solve can end in three normal ways:
- Maximum iterations:
max_iterationsis a hard iteration limit. Reaching it producesmax_iterations_reached; it does not imply convergence. - Residual convergence: all scaled SIMPLE residuals must meet
target_residual. This producesresidual_converged. - Monitored-quantity convergence: all monitors and junction temperatures configured for stopping must settle over
convergence_window. This producesmonitor_converged.
A monitor without an exit_tolerance is recorded but cannot stop the run.
Monitor and junction-temperature tolerances
exit_tolerance uses the same stability test wherever it is configured, but attaches to different quantities:
exit_tolerancebelongs to a maximum, minimum, mean, point probe, mass-balance, or energy-balance monitor.- On an individual compact thermal model,
exit_tolerancemeasures its junction temperature in °C.
For each stopping quantity, the solver:
- takes the last
convergence_windowvalues; - calculates their mean;
- finds the largest absolute deviation from that mean; and
- considers the quantity settled when the deviation is at or below its tolerance.
For example, junction temperatures of 70.00, 70.02, and 69.98 °C have a mean of 70.00 °C and a largest deviation of 0.02 °C. They satisfy a tolerance of 0.05 °C, but not 0.01 °C.
Important consequences:
- A tolerance measures stability, not magnitude.
exit_tolerance: 0.01on a temperature monitor means variation within 0.01 °C, not a temperature below 0.01 °C. - Tolerances use the monitored quantity’s units; relative mass and energy balances are dimensionless.
- The solver cannot use this test until the complete window exists.
convergence_windowmust be greater than 1 and no greater thanmax_iterations.- To stop with
monitor_converged, every monitor and active CTMexit_tolerancemust pass on the same iteration. Each uses its own tolerance over the shared window.
How the criteria interact
The criteria are alternatives. A normal solve stops as soon as any of these is true:
max_iterationshas been reached;- all residuals have converged; or
- all configured monitor and junction-temperature stopping quantities have converged.
Monitor or junction-temperature convergence can therefore stop a run while residuals remain above target. Residual convergence can likewise stop it before monitored quantities settle.
If several conditions become true on the same terminal iteration, status records one reason. The current tie-breaking order is:
max_iterations_reached;residual_converged; thenmonitor_converged.
This order only selects the status label; it does not delay any stopping criterion. Use iteration_info.csv to inspect all residual, monitor, and junction-temperature histories.
Cancellation, timeouts, and failures
- Cancel stops at an iteration boundary, produces
canceled, and preserves partial results.timeout_cancelcan request this automatically. - Kill stops the worker immediately, produces
killed, and preserves no result bundle.timeout_killis the corresponding hard deadline. If it is not later thantimeout_cancel, the timeout policy goes directly to killing. - Divergence means numerical fields became non-finite. Diagnostic fields and histories are preserved with
divergedstatus, but they are not a valid solution. - Execution errors produce
errorand no result bundle.
Terminal statuses and results
| Status | Meaning | Result bundle |
|---|---|---|
dry_run | Meshing completed without a physical solve | Yes, with placeholder fields |
residual_converged | All residuals met their target | Yes |
monitor_converged | All stopping monitors and junction temperatures settled | Yes |
max_iterations_reached | The iteration limit was reached | Yes |
canceled | Graceful cancellation completed | Yes, with partial results |
diverged | The numerical solution became non-finite | Yes, for diagnosis |
killed | The worker stopped immediately | No |
error | Preparation or execution failed | No |
A dry_run stops after meshing, before any convergence criteria are evaluated. completed means persisted results are available; it does not mean the solution converged or is correct.
See also
- Residuals and linear-solver convergence for residual scaling,
atol,rtol, andtarget_residual. - Monitors and derived quantities for reduction domains, probes, balances, and CTM junction-temperature histories.
- Monitor a result and stop when it settles to configure monitor-based stopping.
- Model an electronic package with a compact thermal model to configure junction-temperature convergence.
- API reference for exact fields, values, and limits.