Fundamentals / Numerical mathematics / Numerical partial differential equations / Spatial discretisation and field equations

Which waves are allowed to enter a numerical boundary?

Diagonalise linear acoustics, impose one physical condition per incoming wave and compare diffusive and dispersive transport schemes on the same spatial Fourier mode.

Separate acoustic waves by their directions

For small perturbations in a uniform fluid, \(p_t+\rho c^2v_x=0,\ v_t+p_x/\rho=0\) with density \(\rho>0\), speed \(c>0\). Add and subtract \(\rho c\) times the second equation. The combinations \(w_\pm=p\pm\rho c v\) satisfy \(\partial_t w_\pm\pm c\,\partial_x w_\pm=0\). Reconstruct \(p=(w_++w_-)/2,\ v=(w_+-w_-)/(2\rho c)\). At the left boundary \(w_+\) enters and \(w_-\) leaves. These roles exchange at the right boundary.

For a rigid wall \(v=0\), set the incoming characteristic equal to the outgoing one. The reflected pressure has the same sign. At a pressure-release boundary \(p=0\), it has opposite sign. Prescribing \(p\) and \(v\) independently at the same boundary generally overspecifies a first-order system. For a diagonalizable hyperbolic matrix \(A=R\Lambda R^{-1}\) the same counting follows from \(R^{-1}u\), subject to independent boundary conditions on incoming components. Zero-speed or glancing modes require separate analysis.

Derive one amplitude and phase experiment for three methods

For scalar right-going \(u_t+a u_x=0\), set \(\nu=ah/\Delta x\). First-order upwind uses the upstream difference. Lax–Friedrichs replaces the central value by the average of its neighbours before taking the centred first derivative. Lax–Wendroff expands time to second order and uses \(u_{tt}=a^2u_{xx}\). With Fourier angle \(\theta=k\Delta x\), the three amplification factors are

\[G_U=1-\nu(1-e^{-i\theta}),\]
\[G_F=\cos\theta-i\nu\sin\theta,\quad\]

G_W=1-i\nu\sin\theta+\nu^2(\cos\theta-1).

For \(0\le\nu\le1\) these are stable in the periodic discrete \(L^2\) norm. For the last factor direct expansion gives \(|G_W|^2=1-4\nu^2(1-\nu^2)\sin^4(\theta/2)\). The exact factor \(e^{-i\nu\theta}\) has modulus one. At \(\nu=1/2,\theta=\pi/2\), upwind gives \(0.5-0.5i\), Lax–Friedrichs gives \(-0.5i\) and Lax–Wendroff gives \(0.75-0.5i\). Their magnitudes and arguments distinguish loss of contrast from arrival-time error.

Transfer the calculation to both members of the system

On a uniform grid update \(w_+\) by a right-going scheme and \(w_-\) by its mirrored left-going counterpart. For first-order upwind the outgoing stencil at either wall uses only interior data. Supply the incoming value using the physical relation. For centred and second-order stencils, ghost values or one-sided closures must also approximate derivatives at the boundary with a compatible accuracy and stability. A periodic amplification test alone cannot certify them.

Why can a second-order scheme create negative overshoots?

In Lax–Wendroff the downstream coefficient \((\nu^2-\nu)/2\) is negative for \(0<\nu<1\). At a step discontinuity the update can leave the interval spanned by neighbouring data. Its Fourier stability bound controls a norm and does not imply a maximum principle.

Amplitude and phase of three transport rules at Courant number one half.
Perfect propagation has unit amplitude and phase advance νθ. Near the shortest resolved wavelengths, amplitude loss and phase error select different methods even at identical Courant number.

Tutorial on waves in an acoustic tube

Calculate one update next to a marked step

Work through the solution

Take \(\nu=1/2\) and \(u_{j-1}=u_j=0,\ u_{j+1}=1\). Upwind gives zero, Lax–Friedrichs gives \(1/4\), Lax–Wendroff gives \(-1/8\). The exact right-going step has not reached this upstream cell centre.

Infer the reflected wave from a non-ideal termination

Work through the solution

At the right boundary impose \(p=Zv\). Substituting the characteristic pair gives \(w_-=(Z-\rho c)w_+/(Z+\rho c)\). A matched termination \(Z=\rho c\) transmits the wave with zero reflection. Verify the rigid and pressure-release limits before using this relation in ghost cells.

LeVeque · advection equations and hyperbolic systems

Change parameters · Which waves are allowed to enter a numerical boundary?

Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.