pub enum FluxLimiter {
Upwind,
Linear,
VanLeer,
VanAlbada,
Minmod,
SuperBee,
Muscl,
Umist,
Ospre,
LimitedLinear(f64),
}Expand description
A TVD flux limiter psi(r), translated from OpenFOAM’s r-based
limitedSchemes. psi = 0 is first-order upwind, psi = 1 is second-order
linear; the TVD variants clip extrema (psi(r) = 0 for r <= 0).
Variants§
Upwind
First-order upwind: psi = 0.
Linear
Unlimited linear (central) differencing: psi = 1 (2nd order, not TVD).
VanLeer
vanLeer: upstream (r + mag(r))/(1 + mag(r)). Smooth, symmetric.
VanAlbada
vanAlbada: upstream r*(r + 1)/(sqr(r) + 1) with r = max(0, r). Symmetric.
Minmod
Minmod: upstream max(min(r, 1), 0). Most diffusive TVD limiter. Symmetric.
SuperBee
SuperBee: upstream max(max(min(2r, 1), min(r, 2)), 0). Most compressive. Symmetric.
Muscl
MUSCL: upstream max(min(min(2r, 0.5r + 0.5), 2), 0). Symmetric.
Umist
UMIST: upstream max(min(min(min(2r, 0.75r + 0.25), 0.25r + 0.75), 2), 0).
Third-order biased (not symmetric).
Ospre
OSPRE: upstream 1.5 r (r + 1)/(r (r + 1) + 1) with r = max(0, r). Symmetric.
LimitedLinear(f64)
limitedLinear(k): upstream max(min((2/k) r, 1), 0), coefficient
k in [0, 1] (k -> 0 approaches unlimited linear, k = 1 most
limited). A k-blended bounded scheme — not strictly within the classic
psi <= 2r Sweby envelope for small k.
Implementations§
Source§impl FluxLimiter
impl FluxLimiter
Sourcepub fn psi(&self, r: f64) -> f64
pub fn psi(&self, r: f64) -> f64
The flux-limiter function psi(r). r may be any f64; a non-finite r
returns 0. For the TVD limiters r <= 0 (a local extremum) returns 0.
The result is clamped non-negative.
Sourcepub fn is_symmetric(&self) -> bool
pub fn is_symmetric(&self) -> bool
True if the limiter is symmetric (psi(r)/r == psi(1/r)), the
property of the second-order symmetric TVD limiters. UMIST is
third-order-biased (asymmetric); limitedLinear is a k-blend and not in
this set.