Lax–Friedrichs method explained

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: u_t + a u_x = 0on the domain b \leq x \leq c,\; 0 \leq t \leq dwith initial conditionu(x,0) = u_0(x)\,and the boundary conditions\beginu(b,t) &= u_b(t) \\u(c,t) &= u_c(t).\end

If one discretizes the domain

(b,c) x (0,d)

to a grid with equally spaced points with a spacing of

\Deltax

in the

x

-direction and

\Deltat

in the

t

-direction, we introduce an approximation

\tildeu

of

u

u_i^n = \tilde u(x_i, t^n) ~~\text~~\beginx_i = b + i\,\Delta x,\\ t^n = n\,\Delta t\end~~\text~~\begini = 0,\ldots,N,\\ n = 0,\ldots,M,\end where N = \frac,\, M = \frac are integers representing the number of grid intervals. Then the Lax–Friedrichs method to approximate the partial differential equation is given by:\frac + a\frac = 0

Or, rewriting this to solve for the unknown

n+1
u
i

,

u_i^ = \frac \left(u_^n + u_^n\right) - a\frac \left(u_^n - u_^n\right)

Where the initial values and boundary nodes are taken from\beginu_i^0 &= u_0(x_i) \\u_0^n &= u_b(t^n) \\u_N^n &= u_c(t^n).\end

Extensions to Nonlinear Problems

A nonlinear hyperbolic conservation law is defined through a flux function

f

: u_t + (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] u_i^ = \frac \left(u_^n + u_^n\right) - \frac \left(f(u_^n) - f(u_^n) \right).

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: u_i^ = u^n_i - \frac \left(\hat^n_ - \hat^n_ \right), where \hat^n_ = \frac \left(f_ + f_ \right) - \frac \left(u^n_ - u^n_ \right).

Without the extra terms

n
u
i
and
n
u
i-1

in the discrete flux,
n
\hat{f}
i-1/2

, one ends up with the FTCS scheme, which is well known to be unconditionally unstable for hyperbolic problems.

Stability and accuracy

This method is explicit and first order accurate in time and first order accurate in space (

O(\Deltat)+O({\Deltax2}/{\Deltat}))

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: \left| a\frac \right| \leq 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. For functions that have discontinuities, the scheme displays strong dissipation and dispersion; see figures at right.

Notes and References

  1. Book: LeVeque, Randall J. . Numerical methods for conservation laws . 1992 . Birkhäuser Verlag . 978-3-0348-8629-1 . 125 . Basel . 828775522.