Lax–Friedrichs method

From testwiki
Jump to navigation Jump to search

Template:Short description The Lax–Friedrichs method[1], 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 b≤x≤c,0≤t≤d 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=c−bΔ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+1−12(ui+1n+ui−1n)Δt+aui+1n−ui−1n2Δx=0

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

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[2] uin+1=12(ui+1n+ui−1n)−Δt2Δx(f(ui+1n)−f(ui−1n)).

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/2n−f̂i−1/2n), where f̂i−1/2n=12(fi−1+fi)−Δx2Δt(uin−ui−1n).

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

Stability and accuracy

File:LF-Initial.png
Example problem initial condition
File:LF-Solution.png
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.[3] For functions that have discontinuities, the scheme displays strong dissipation and dispersion;[4] see figures at right.

References

Template:Reflist

Template:Numerical PDE