Skip to main content

Module limiters

Module limiters 

Source
Expand description

TVD flux limiters — field-agnostic psi(r) functions on plain f64.

A flux limiter psi(r) blends a high-order (linear/central) face flux with first-order upwind to suppress spurious oscillations near sharp gradients, where r is the ratio of successive solution gradients. psi = 0 is first-order upwind; psi = 1 recovers second-order (linear) differencing.

This is a pure-f64, mesh-free API so any finite-volume code (e.g. the outram-park-fork-pflotran solute/energy transport) can build higher-order TVD advection without depending on this crate’s field/mesh types. A separate, field-tied limiter for rhoCentralFoam reconstruction lives at crate::fv_operators::fvc::Limiter; this module is the reusable, general one, and the two should be consolidated eventually.

§Provenance (translated from OpenFOAM upstream source)

Each limiter here is a Rust translation of the corresponding limiter() method in OpenFOAM’s src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/<name>/<name>.H, Copyright (C) 2011-2022 OpenFOAM Foundation, GNU General Public License version 3 or later (this crate is GPL-3.0). Source read from github.com/OpenFOAM/OpenFOAM-dev (master) on 2026-07-22. OpenFOAM® is a registered trademark of OpenCFD Ltd (ESI Group); this is an independent translation, not an official OpenFOAM product (see the workspace TRADEMARKS.md).

The exact upstream expression is quoted in each variant’s doc comment. Only OpenFOAM’s r-based limiters are ported: OpenFOAM’s NVD-based schemes (QUICK, Gamma, SFCD, Phi) use actual cell values rather than a pure psi(r) and are not representable here, so they are deliberately omitted rather than approximated.

Enums§

FluxLimiter
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).