Lax–Friedrichs method

From HandWiki

The Lax–Friedrichs method, named after Peter Lax and Kurt O. Friedrichs, is a numerical method for the solution of hyperbolic partial differential equations based on finite differences. The method can be described as the FTCS (forward in time, centered in space) scheme with a numerical dissipation term of 1/2. One can view the Lax–Friedrichs method as an alternative to Godunov's scheme, where one avoids solving a Riemann problem at each cell interface, at the expense of adding artificial viscosity.

Illustration for a Linear Problem

Consider a one-dimensional, linear hyperbolic partial differential equation for u(x,t) of the form: ut+aux=0 on the domain bxc,0td with initial condition u(x,0)=u0(x) and the boundary conditions u(b,t)=ub(t)u(c,t)=uc(t).

If one discretizes the domain (b,c)×(0,d) to a grid with equally spaced points with a spacing of Δx in the x-direction and Δt in the t-direction, we introduce an approximation u~ of u uin=u~(xi,tn) with xi=b+iΔx,tn=nΔt for i=0,,N,n=0,,M, where N=cbΔx,M=dΔt are integers representing the number of grid intervals. Then the Lax–Friedrichs method to approximate the partial differential equation is given by: uin+112(ui+1n+ui1n)Δt+aui+1nui1n2Δx=0

Or, rewriting this to solve for the unknown uin+1, uin+1=12(ui+1n+ui1n)aΔt2Δx(ui+1nui1n)

Where the initial values and boundary nodes are taken from ui0=u0(xi)u0n=ub(tn)uNn=uc(tn).

Extensions to Nonlinear Problems

A nonlinear hyperbolic conservation law is defined through a flux function f: ut+(f(u))x=0.

In the case of f(u)=au, we end up with a scalar linear problem. Note that in general, u is a vector with m equations in it. The generalization of the Lax-Friedrichs method to nonlinear systems takes the form[1] uin+1=12(ui+1n+ui1n)Δt2Δx(f(ui+1n)f(ui1n)).

This method is conservative and first order accurate, hence quite dissipative. It can, however be used as a building block for building high-order numerical schemes for solving hyperbolic partial differential equations, much like Euler time steps can be used as a building block for creating high-order numerical integrators for ordinary differential equations.

We note that this method can be written in conservation form: uin+1=uinΔtΔx(f^i+1/2nf^i1/2n), where f^i1/2n=12(fi1+fi)Δx2Δt(uinui1n).

Without the extra terms uin and ui1n in the discrete flux, f^i1/2n, one ends up with the FTCS scheme, which is well known to be unconditionally unstable for hyperbolic problems.

Stability and accuracy

Example problem initial condition
Lax-Friedrichs solution

This method is explicit and first order accurate in time and first order accurate in space (O(Δt)+O(Δx2/Δt)) provided u0(x),ub(t),uc(t) are sufficiently-smooth functions. Under these conditions, the method is stable if and only if the following condition is satisfied: |aΔtΔx|1.

(A von Neumann stability analysis can show the necessity of this stability condition.) The Lax–Friedrichs method is classified as having second-order dissipation and third order dispersion.[2] For functions that have discontinuities, the scheme displays strong dissipation and dispersion;[3] see figures at right.

References

  1. LeVeque, Randall J. (1992). Numerical methods for conservation laws. Basel: Birkhäuser Verlag. p. 125. ISBN 978-3-0348-8629-1. OCLC 828775522. https://www.worldcat.org/oclc/828775522. 
  2. Chu, C. K. (1978), Numerical Methods in Fluid Mechanics, Advances in Applied Mechanics, 18, New York: Academic Press, p. 304, ISBN 978-0-12-002018-8 
  3. Thomas, J. W. (1995), Numerical Partial Differential Equations: Finite Difference Methods, Texts in Applied Mathematics, 22, Berlin, New York: Springer-Verlag, §7.8, ISBN 978-0-387-97999-1