van_leer_split_both Subroutine

private pure subroutine van_leer_split_both(q, fp, fm, gam)

Fused van Leer flux splitting: returns F^+ and F^- in one call.

Extracts primitives once and evaluates both split fluxes, handling all Mach-number regimes (supersonic positive, subsonic, supersonic negative).

NOTE (energy flux): the mass and momentum splits are the classic van Leer (1982) polynomials, but the energy flux uses F^±_E = ṁ^± · H (mass flux × total enthalpy) — the Hänel, Schwane & Seider (1987) modification — rather than van Leer's original closed-form energy term ṁ^± ((γ-1)u ± 2c)² / (2(γ²-1)). A reader validating against van Leer (1982) will not find this energy closure there; see Hänel et al. (1987).

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: q(:)
real(kind=wp), intent(out) :: fp(:)
real(kind=wp), intent(out) :: fm(:)
real(kind=wp), intent(in) :: gam

Ratio of specific heats.