next up previous
Next: The Lax scheme Up: The wave equation Previous: Introduction

The 1-d advection equation

The wave equation is closely related to the so-called advection equation, which in one dimension takes the form
\begin{displaymath}
\frac{\partial u}{\partial t} = -v\,\frac{\partial u}{\partial x}.
\end{displaymath} (234)

This equation describes the passive advection of some scalar field $u(x,t)$ carried along by a flow of constant speed $v$. Since the advection equation is somewhat simpler than the wave equation, we shall discuss it first. The advection equation possesses the formal solution
\begin{displaymath}
u(x,t) = F(x-v\,t),
\end{displaymath} (235)

where $F$ is an arbitrary function. This solution describes an arbitrarily shaped pulse which is swept along by the flow, at constant speed $v$, without changing shape.

We seek the solution of Eq. (234) in the region $x_l\leq x\leq x_h$, subject to the simple Dirichlet boundary conditions $u(x_l) = u(x_h)=0$. As usual, we discretize in time on the uniform grid $t_n=t_0+n\,\delta t$, for $n=0,1,2,\cdots$. Furthermore, in the $x$-direction, we discretize on the uniform grid $x_i = x_l + i\,\delta x$, for $i=0,N+1$, where $\delta x = (x_h-x_l)/(N+1)$. Adopting an explicit temporal differencing scheme, and a centered spatial differencing scheme, Eq. (234) yields

\begin{displaymath}
\frac{u_i^{n+1} - u_i^n}{\delta t} = - v\,\frac{u_{i+1}^n-u_{i-1}^n}{2\,\delta x},
\end{displaymath} (236)

where $u_i^n\equiv u(x_i,t_n)$. The above equation can be rewritten
\begin{displaymath}
u_i^{n+1} = u_i^n -\frac{C}{2}\,(u_{i+1}^n-u_{i-1}^n),
\end{displaymath} (237)

where $C= v\,\delta t/\delta x$.

Let us perform a von Neumann stability analysis of the above differencing scheme. Writing $u(x,t)= \hat{u}(t)\,\exp ({\rm i}\,k\,x)$, we obtain $\hat{u}_i^{n+1}=A\,\hat{u}_i^n$, where

\begin{displaymath}
A = 1 - {\rm i} \,C\,\sin (k \,\delta x).
\end{displaymath} (238)

Note that
\begin{displaymath}
\vert A\vert^2 = 1 + C^2\,\sin^2(k\,\delta x) > 1.
\end{displaymath} (239)

Thus, the magnitude of the amplification factor is greater than unity for all $k$. This implies, unfortunately, that the simple differencing scheme (237) is unconditionally unstable.


next up previous
Next: The Lax scheme Up: The wave equation Previous: Introduction
Richard Fitzpatrick 2006-03-29