flux_1d_ppm
Stencil

{-3, -2, -1, 0, 1, 2}
relative to the right cell of the interface F_{i+1/2}.
Cells {-2, -1, 0, 1} drive the 4th-order CW84 edge interpolation
q_{i+1/2}; the additional {-3, +2} cells are needed
for the left-cell and right-cell parabolic reconstructions that feed the
CW84 limiter and the Courant-fraction flux integral.Continuous form
flux_1d_ppm discretizes the conservative 1D advective flux on a uniform
Cartesian grid,
using the piecewise-parabolic method of Colella & Woodward (1984): each
cell carries a sub-grid parabolic profile reconstructed from cell-averaged
data, the §4 monotonicity limiter clips the parabola when an extremum sits
on the wrong side of the cell, and the face flux is the area-averaged
value of the upwind cell’s profile over the swept volume |c|·dx of one
time step:
Upwind cell selection is encoded directly in the AST via
ifelse(c >= 0, int_left, int_right) — no caller-side branching on the
sign of the Courant number.
Discrete operator
The closed-form composition is recorded in the JSON rule’s
edge_value_stencil, limiter, flux_integral, and flux_form blocks.
At a high level:
4th-order edge interpolation (CW84 eq. 1.6) — same coefficients as
$$q_{i+1/2}\;=\;\tfrac{7}{12}(q_{i-1}+q_i)\;-\;\tfrac{1}{12}(q_{i-2}+q_{i+1}).$$ppm_reconstruction’sq_right_edgestencil:The same formula shifted by
±1cell yields the left and right edges of each upwind cell’s parabola (ql_L_raw,qr_L_raw,ql_R_raw,qr_R_raw).Colella & Woodward (1984) §4 monotonicity limiter — applied independently to each upwind cell’s reconstruction. The
is_extremumcase flattens to a constant whenq_iis a local extremum within the stencil; theovershoot_left/overshoot_rightcases pull the offending edge inward when the parabola’s interior extremum sits past the opposite edge. Encoded as a closed-formifelseAST identical to thevertical_remaplimiterblock and bit-for-bit equivalent to the former_ppm_limit_cw84_sym(retired fromsrc/operators/reconstruction.jlin the operator-porting campaign).Courant-fraction flux integral — closed-form parabolic antiderivative evaluated over the swept volume of the upwind cell. With
$$\text{int\_left}\;=\;qr - \tfrac{|c|}{2}\!\left[dq - q_6\!\left(1 - \tfrac{2}{3}|c|\right)\right],$$ $$\text{int\_right}\;=\;ql + \tfrac{|c|}{2}\!\left[dq + q_6\!\left(1 - \tfrac{2}{3}|c|\right)\right].$$dq = qr - qlandq_6 = 6·(q_i − (ql + qr)/2),Upwind selection + face velocity —
$$F_{i+1/2}\;=\;v\cdot\text{ifelse}(c \ge 0,\;\text{int\_left},\;\text{int\_right}).$$
The full machine-readable AST lives in the JSON rule file.
Bindings
| Binding | Resolved by |
|---|---|
$q | cell-averaged scalar field, ghost-extended by Ng = 3 along the stencil axis |
$c | per-face Courant number c_{i+1/2} = u_{i+1/2}·dt/dx (uniform Cartesian) |
$v | per-face velocity v_{i+1/2} |
The face-staggered $c and $v follow the same per-face binding contract
as lax_friedrichs_flux — the
analog of the slope-ratio $r in the limiter rules. The 6-point stencil
reaches three cells past the right cell of the interface; the former imperative
reference flux_1d_ppm_arrayop (retired from
src/operators/flux_1d.jl in the operator-porting campaign)
resolved this with a ghost-extended q_ext. ESS does not yet declare how
a rule consumes ghost cells — see the rule’s schema_gaps block.
Composition
flux_1d_ppm is the high-order PPM sibling of
lax_friedrichs_flux: same
op = flux shape and per-face binding contract, but composes
ppm_reconstruction edge
values, the Colella-Woodward §4 monotonicity limiter (same closed-form
AST as the vertical_remap
limiter block), and a Courant-fraction flux integral, with ifelse
upwind selection in place of the LF abs-based first-order upwind. The
cell-centred tendency follows from the FV divergence
$T_i = -(F_{i+1/2}\cdot\Delta x_{i+1/2} - F_{i-1/2}\cdot\Delta x_{i-1/2})/A_i$
(or composes with
divergence_arakawa_c on a
C-grid).
Convergence
Numeric coverage today lives in the rule’s own test
test/test_flux_1d_ppm_rule.jl,
which exercises the closed-form face flux (positive- and negative-Courant
cases, CW84 limiter inactive and active). The former imperative
flux_1d_ppm! / flux_1d_ppm_arrayop operators and their cubed-sphere
transport tests were retired (operator-porting campaign and the
cubed-sphere grid retirement).
The hand-pinned single-face fixture at
fixtures/canonical/
documents the closed-form face flux on a smooth sinusoidal profile
(positive- and negative-Courant cases; CW84 limiter inactive); the same
values are exercised inline in
test/test_flux_1d_ppm_rule.jl
against the closed-form CW84 limiter AST + the closed-form Courant integral.
$c, $v), (2) a ghost-extended input contract
(the 6-point stencil reaches three cells past the right cell of the
face), and (3) a Layer-B′ MMS-transport fixture kind — PPM flux + FV
divergence + RK time stepping — to verify convergence on a smooth
profile. Until those land, the convergence fixture under
[fixtures/convergence/](https://github.com/EarthSciML/EarthSciDiscretizations/blob/main/discretizations/finite_volume/flux_1d_ppm/fixtures/convergence)
declares applicable: false and the rendered convergence
plot is suppressed.Reference
- Former imperative reference:
flux_1d_ppm!andflux_1d_ppm_arrayopinsrc/operators/flux_1d.jl; symbolic-tracing-safe limiter_ppm_limit_cw84_syminsrc/operators/reconstruction.jl. Both files were retired in the operator-porting campaign (commit dce15e6). - Theory: Colella & Woodward (1984), JCP 54(1):174-201, eqs. (1.5)-(1.10) for the parabolic reconstruction and the (1.7)-(1.10) monotonicity limiter; the §4 Courant-fraction flux integral is the standard PPM upwind flux. Flux-form 1D advection composition follows Lin & Rood (1996) MWR.
- First-order sibling:
lax_friedrichs_flux(F_{i+1/2} = max(c,0)·q_i + min(c,0)·q_{i+1}). - Shares its edge interpolation with
ppm_reconstructionand its monotonicity limiter withvertical_remap.