Numerical flux (source code)

= Numerical flux
{title2=$F(a,b)$}

A <numerical flux> estimates the rate of transfer across a cell face from nearby states. In the <finite volume method> update, $F_{j+1/2}^n$ approximates the <conservation law flux> averaged over the time step; $kF_{j+1/2}^n$ is the transferred amount. For a two-state <numerical flux> $F(L,R)$ approximating a <scalar conservation law> with <conservation law flux> $f$, <consistency of a numerical method> requires $F(U,U)=f(U)$. Thus equal states recover the physical transfer rate. With constant equal-width cells, this also preserves a constant state because its incoming and outgoing <numerical fluxes> agree.<Riemann Problems and Jupyter Solutions by David I. Ketcheson, Randall J. LeVeque, and Mauricio J. del Razo>[Approximate solvers, §Finite volume methods, consistency paragraph after equation FVupdate]{ref}

Consistency and <shared face flux cancellation> answer different questions: matching $f$ at equal states approximates the intended equation, while sharing one oriented face value preserves the total. The example <periodic upwind finite volume advection> uses $F(L,R)=aL$ for $a>0$, so the arriving state comes from the left. The <Godunov numerical flux> uses an <entropy solution> of a local <Riemann problem>; the <Engquist-Osher flux> provides a different construction for a <scalar conservation law>. A <monotone conservative scheme> uses a <numerical flux> nondecreasing in its left state and nonincreasing in its right state, together with a time step that makes the complete update monotone. Neither two-state consistency nor conservation by itself supplies that time-step restriction or a general <stability> or <order of a numerical method> guarantee.