SpectraSim Documentation
Parameter · 07 Run Settings

Per-field residual tolerances

simulation_control.residual_per_field Step 07 · Run Settings

When on, every equation is judged against its own absolute tolerance (velocity, pressure, kk, ω\omega and, for compressible runs, energy) instead of the single residual target. A field left on auto uses the single target.

Last updated

Theory

The equations of a muffler flow converge at different rates: the pressure and velocity of the jets often stall around 10−210^{-2} while kk and ω\omega fall further. One target for all of them is either too strict for some or too loose for others. With this switch on, gate 2 maps every residual the solver prints to its equation, equation (1), and compares it with that equation's tolerance: Velocity tolerance, Pressure tolerance, Turbulent kinetic energy tolerance, Specific dissipation rate tolerance, Energy tolerance. The test itself is unchanged (largest initial residual of the last 50 iterations, or the residual drop), see Residual target.

The report's residual chart then draws one dashed line per distinct tolerance, and the convergence table shows each field's own target. OpenFOAM's own residualControl stays at its fixed 10−510^{-5} floor: the tolerances are judged by the program, never by the solver.

Equations

rϕ<rtarget(g(ϕ)),g(Ux)=g(Uy)=g(Uz)=U,g(h)=e,g(prgh)=p,g(ϕ)=ϕ otherwiser_{\phi} < r_{target}(g(\phi)), \qquad g(U_x) = g(U_y) = g(U_z) = U,\quad g(h) = e,\quad g(p_{rgh}) = p,\quad g(\phi) = \phi\ \text{otherwise}
(1)
wheremeaningunit
rϕr_\phiLargest initial residual of field ϕ\phi over the last 50 iterations-
ggEquation group of a solver field-
rtarget(g)r_{target}(g)Tolerance of that group (its own, or the single target when on auto)-

Default and rule

Default
off
Rule

Off. When it is off, every field is judged against the single residual target.

Source

The option follows from the program's residual-sensitivity study. The defaults deliberately do not use the uniform 10−610^{-6} of some commercial CFD codes, which a real muffler does not reach. Residual definition: (OpenFOAM user guide, 2026).

Valid range on | off

Choice

On or off. Steady runs only: a transient run is judged on its time-averaged pressure drop, not on residuals.

References 1

  1. OpenCFD Ltd. (2026). OpenFOAM user guide. openfoam.com. Web page