Lax–Wendroff method

From HandWiki

The Lax–Wendroff method, named after Peter Lax and Burton Wendroff,[1] is a numerical method for the solution of hyperbolic partial differential equations, based on finite differences. It is second-order accurate in both space and time. This method is an example of explicit time integration where the function that defines the governing equation is evaluated at the current time.

Definition

Suppose one has an equation of the following form: [math]\displaystyle{ \frac{\partial u(x,t)}{\partial t} + \frac{\partial f(u(x,t))}{\partial x} = 0 }[/math] where x and t are independent variables, and the initial state, u(x, 0) is given.

Linear case

In the linear case, where f(u) = Au, and A is a constant,[2] [math]\displaystyle{ u_i^{n+1} = u_i^n - \frac{\Delta t}{2\Delta x} A\left[ u_{i+1}^{n} - u_{i-1}^{n} \right] + \frac{\Delta t^2}{2\Delta x^2} A^2\left[ u_{i+1}^{n} -2 u_{i}^{n} + u_{i-1}^{n} \right]. }[/math] Here [math]\displaystyle{ n }[/math] refers to the [math]\displaystyle{ t }[/math] dimension and [math]\displaystyle{ i }[/math] refers to the [math]\displaystyle{ x }[/math] dimension. This linear scheme can be extended to the general non-linear case in different ways. One of them is letting [math]\displaystyle{ A(u) = f'(u) = \frac{\partial f}{\partial u} }[/math]

Non-linear case

The conservative form of Lax-Wendroff for a general non-linear equation is then: [math]\displaystyle{ u_i^{n+1} = u_i^n - \frac{\Delta t}{2\Delta x} \left[ f(u_{i+1}^{n}) - f(u_{i-1}^{n}) \right] + \frac{\Delta t^2}{2\Delta x^2} \left[ A_{i+1/2} \left(f(u_{i+1}^{n}) - f(u_{i}^{n})\right) - A_{i-1/2}\left( f(u_{i}^{n})-f(u_{i-1}^{n})\right) \right]. }[/math] where [math]\displaystyle{ A_{i\pm 1/2} }[/math] is the Jacobian matrix evaluated at [math]\displaystyle{ \frac{1}{2} (u^n_i + u^n_{i\pm 1}) }[/math].

Jacobian free methods

To avoid the Jacobian evaluation, use a two-step procedure.

Richtmyer method

What follows is the Richtmyer two-step Lax–Wendroff method. The first step in the Richtmyer two-step Lax–Wendroff method calculates values for f(u(x, t)) at half time steps, tn + 1/2 and half grid points, xi + 1/2. In the second step values at tn + 1 are calculated using the data for tn and tn + 1/2.

First (Lax) steps: [math]\displaystyle{ u_{i+1/2}^{n+1/2} = \frac{1}{2}(u_{i+1}^n + u_{i}^n) - \frac{\Delta t}{2\,\Delta x}( f(u_{i+1}^n) - f(u_{i}^n) ), }[/math] [math]\displaystyle{ u_{i-1/2}^{n+1/2}= \frac{1}{2}(u_{i}^n + u_{i-1}^n) - \frac{\Delta t}{2\,\Delta x}( f(u_{i}^n) - f(u_{i-1}^n) ). }[/math]

Second step: [math]\displaystyle{ u_i^{n+1} = u_i^n - \frac{\Delta t}{\Delta x} \left[ f(u_{i+1/2}^{n+1/2}) - f(u_{i-1/2}^{n+1/2}) \right]. }[/math]

MacCormack method

Main page: MacCormack method

Another method of this same type was proposed by MacCormack. MacCormack's method uses first forward differencing and then backward differencing:

First step: [math]\displaystyle{ u_{i}^{*}= u_{i}^n - \frac{\Delta t}{\Delta x}( f(u_{i+1}^n) - f(u_{i}^n) ). }[/math] Second step: [math]\displaystyle{ u_i^{n+1} = \frac{1}{2} (u_{i}^n + u_{i}^*) - \frac{\Delta t}{2 \Delta x} \left[ f(u_{i}^{*}) - f(u_{i-1}^{*}) \right]. }[/math]

Alternatively, First step: [math]\displaystyle{ u_{i}^{*} = u_{i}^n - \frac{\Delta t}{\Delta x}( f(u_{i}^n) - f(u_{i-1}^n) ). }[/math] Second step: [math]\displaystyle{ u_i^{n+1} = \frac{1}{2} (u_{i}^n + u_{i}^*) - \frac{\Delta t}{2 \Delta x} \left[ f(u_{i+1}^{*}) - f(u_{i}^{*}) \right]. }[/math]

References