Applied on the FDS path (AUSM+, HLL, HLLC, Roe) after reconstruction. Scales each reconstructed face state toward the adjacent cell average so that density and pressure remain non-negative, preventing NaN propagation on challenging flows.
The limiter is a no-op when the reconstructed state is already physical, so it does not degrade accuracy in smooth regions.
Usage: set state%use_positivity_lim = .true. before calling compute_resid(state).
Reference: X. Zhang & C.-W. Shu, "On maximum-principle-satisfying high order schemes for scalar conservation laws," J. Comput. Phys. 229:3091-3120, 2010.
Scale a reconstructed face state toward the cell average to ensure density ρ ≥ ε and pressure p ≥ ε (Zhang-Shu 2010).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | q_face(:) | |||
| real(kind=wp), | intent(in) | :: | q_avg(:) | |||
| real(kind=wp), | intent(in) | :: | gam |
Ratio of specific heats (used for pressure calculation). |