Nonlinear Correction, Relaxation and Admissibility
Why this matters. Solving the coupled block linear system does not by itself guarantee a physically admissible nonlinear state. CMPS applies the solved cell correction as one coupled direction and limits that direction when temperature, species or VOF composition constraints would be violated.
Global explicit correction relaxation
Let the linear solve return a cell correction \(\Delta\mathbf q_i\). Before cell-local admissibility checks, CMPS applies the explicit relaxation coefficient
The current default is \(\mathrm{ERC}=0.75\). Subsequent positivity/simplex controls can only reduce the cell correction further.
Temperature positivity rate limit
If a proposed negative temperature correction is too large, CMPS scales the complete cell correction block. With current temperature \(T_i\), correction \(\Delta T_i<0\), and positivity-rate parameter \(r_T\), limiting is triggered when
The cell scale is
The current default is \(r_T=0.2\). This is a rate limit on the Newton correction; the committed primitive update subsequently also enforces configured absolute temperature bounds.
Species-simplex control
For \(N_s\) species, CMPS solves only the first \(N_s-1\) mass fractions and reconstructs the dependent species:
For each solved species with negative correction, the candidate scale is bounded by
Let
The dependent-species lower bound requires
Thus, for \(\Delta Y_\Sigma>0\),
The source also guards the lower bound of the solved-fraction sum for negative \(\Delta Y_\Sigma\). The smallest admissible \(\alpha\) scales the full coupled cell correction, retaining the solved pressure/velocity/temperature/species direction.
VOF fraction-to-boundary update
With \(N-1\) independent phase fractions and reference phase
the complete phase composition must remain inside the closed unit simplex. For proposed independent-fraction corrections \(\Delta\alpha_k\), every negative component gives
Let \(\Delta\alpha_\Sigma=\sum_k\Delta\alpha_k\). If that sum is positive, the reference phase gives the additional bound
CMPS takes
and, when limiting is needed, moves slightly inside the feasible boundary using the fixed fraction-to-boundary factor 0.99:
If roundoff still prevents a valid candidate, the factor is applied again for a bounded number of retries. Crucially, the resulting \(\lambda\) multiplies the entire coupled correction block, not only the fraction entries.
Atomic VOF state commit
After correction limiting, the current source constructs a complete candidate VOF state before changing cell-owned data. Candidate velocity, pressure, temperature, independent fractions, reconstructed reference fraction, mixture properties and acoustic data are all checked first. A failed candidate leaves the old cell state intact. This prevents partially updated mixture thermodynamics from becoming visible to later assembly stages.
Absolute primitive limits
The ordinary primitive-commit and VOF primitive-commit paths clamp temperature to the configured interval
and, for compressible flow, explicitly floor pressure:
The current general fluid defaults are \(T_{min}=5\,\mathrm K\), \(T_{max}=5000\,\mathrm K\), \(p_{min}=1\,\mathrm{Pa}\) and \(p_{max}=10^9\,\mathrm{Pa}\); case settings may override them. The audited ordinary/VOF primitive commit explicitly applies the pressure lower bound rather than a symmetric upper clamp. By contrast, the learned primitive correction map clamps its predicted pressure to the configured \([p_{min},p_{max}]\) interval before the state is accepted.
Why CMPS scales the complete block
Suppose the coupled linearization gives
Scaling only one variable after the solve would rotate the correction away from the coupled Newton direction. CMPS instead uses
so admissibility changes step length while preserving the local direction and its pressure-velocity-temperature-species/VOF coupling.