8.8. The Lax-Wendroff 1-step approach from Taylor expansions#

The Lax-Wendroff 1-step approach start with the equation of interest (here, the linear advection equation) and the Taylor expansion for \(u_m^{n+1}\):

(8.26)#\[\frac{\partial u}{\partial t}=-a\frac{\partial u}{\partial x}\]
(8.27)#\[u_m^{n+1}=u_m^n+\Delta t\frac{\partial u}{\partial t}\mid_m^n+\frac{\Delta t^2}{2!}\frac{\partial^2 u}{\partial t^2}\mid_m^n+\frac{\Delta t^3}{3!}\frac{\partial^3 u}{\partial t^3}\mid_m^n+h.o.t\]

To get a higher order scheme, we can replace both the first and second derivatives of \(u\) by first expressing them in terms of spatial derivatives, which we can get from {eq} ´eq:LinAdv´.

To obtain an expression for the first derivative, we can simply use {eq} ´eq:LinAdv´ and insert a central space scheme for the spatial derivative:

(8.28)#\[\frac{\partial u}{\partial t}\mid_m^n=-a\frac{u_{m+1}^n-u_{m-1}^n}{2\Delta x}\]

To obtain an expression for the second derivative, we can differentiate {eq} ´eq:LinAdv´ once with respect to time and once with respect to space and then combine the two results:

(8.29)#\[\begin{split}\begin{aligned} \frac{\partial^2 u}{\partial t^2}&=-a{\color{salmon}{\frac{\partial^2 u}{\partial x\partial t}}}\\ {\color{salmon}{\frac{\partial^2 u}{\partial t\partial x}}}&=-a\frac{\partial^2 u}{\partial x^2} \end{aligned}\end{split}\]

The second equation of (8.29) gives us an expression of \({\color{salmon}{\frac{\partial^2 u}{\partial t\partial x}}}\) which we can insert into the forst equation of (8.29) to obtain:

(8.30)#\[\begin{split}\frac{\partial^2 u}{\partial t^2}=-a^2\frac{\partial^2 u}{\partial x^2}\\\end{split}\]

If we now insert a central in time scheme for the right hand side of eq:advection2diff, we obtain;

(8.31)#\[\frac{\partial^2 u}{\partial t^2}\mid_m^n \sim a^2\frac{u_{m+1}^n-2u_m^n+u_{m-1}^n}{\Delta x^2}\]

We can now insert (8.28) and (8.31) into (8.27) to get the 1-step scheme:

\[u_m^{n+1}=u_m^n-\frac{a \Delta t}{2\Delta x}\left( u_{m+1}^n-u_{m-1}^n\right)+\frac{a^2\Delta t^2}{2\Delta x^2}\left( u_{m+1}^n-2u_m^2+u_{m-1}^n \right)+h.o.t\]

By further massaging an incorporating the \(C=\frac{a\Delta t}{\Delta x}\), we get:

\[u_m^{n+1}=\frac{C}{2}(1+C)u_{m-1}^n+(1-C^2)u_m^n-\frac{C}{2}(1-C)u_{m+1}^n+h.o.t\]

8.8.1. Truncation error for the Lax-Wendroff scheme#

To find the order of the Lax-Wendroff scheme, we can look at the Taylor expansion and the order of the terms we have used. We can rewrite the Taylor expoansion to only show the terms we use and the truncation error:

\[\frac{u_m^{n+1}-u_m^n}{\Delta t}=\frac{\partial u}{\partial t}\mid_m^n+\frac{\Delta t}{2!}\frac{\partial^2 u}{\partial t^2}\mid_m^n+\frac{\Delta t^2}{3!}\frac{\partial^3 u}{\partial t^3}\mid_m^n\]

The last term is not included in the Lax-Wendroff scheme, and we see that the error is of second order (\(\Delta t^2\)). However, we also have approximations in the numerical schemes we insert for \(\frac{\partial u}{\partial t}\mid_m^n\) and \(\frac{\partial^2 u}{\partial t^2}\mid_m^n\) which leads to additional truncation error terms. We must check the error of these schemes to know the error/order of the complete Lax-Wendroff scheme.

  • We used a CS scheme for the first derivative, which is second order. This gives us a second order spatial error, \(\Delta x^2\)

  • We used a CS scheme for the second derivatie, which is second order. This also gives us a second order spatial error, \(\Delta x^2\)

The Lax-Wendroff scheme is, therefore, a second order scheme in both time (\(\Delta t^2\)) and space (\(\Delta x^2\)).

8.8.2. Consistency, stability and convergence for the Lax-Wendroff scheme#

To determine its stability we can express the scheme as:

\[ u_m^{n+1} = \alpha u_{m-1}^n + \beta u_m^n + \gamma u_{m+1}^n \]

with

\[\begin{split}\begin{aligned} \alpha &= \frac{\sigma}{2}(\sigma + 1),\\ \beta &= 1- \sigma^2, \\ \gamma &= \frac{\sigma}{2}(\sigma - 1) \end{aligned}\end{split}\]

Assuming a solution of the type \(B^n e^{i\lambda m \Delta x}\), the amplification factor is

\[ G=(1+\sigma^2(\cos \lambda \Delta x - 1)) - i\sigma \sin \lambda \Delta x\]

which has a norm

\[ |G|^2 = 1-\sigma^2(1-\sigma^2)(1 - \cos \lambda \Delta x)^2.\]

For the method to be stable, the condition is \(|G|^2 \leq 1\) which provides the following stability condition

\[ 1-\sigma^2 \ge 0 \Leftrightarrow \sigma = \frac{a\Delta t}{\Delta x} \leq 1.\]

which is the well-known CFL condition.