2.5 Combined Time- and Space-Differencing
97
(a)
FIGURE 2.19. Leapfrog, second-order space (solid), Lax-Wendroff (dashed), and exact
solution (dot-dashed) for the advection of the sum of equal-amplitude 7.5t:u and lOt.x
sine waves over a distance of twelve grid points using a Courant number of (a) O. I , and (b)
0.75 .
from which it follows that the Lax-Wendroff scheme is stable for 1L
2 ::; 1. Short
wavelengths are damped most rapidly; the 2t.x wave is completely eliminated in
a single time step if 1J1.1 = 1/./2. Since the shortest wavelengths are seriously in
error--once again the phase speed of the 2t.x wave is zero-this scale-selective
damping can be advantageous. Indeed, the scale-selectivity of the dissipation in
the Lax-Wendroff scheme is the same as that of a fourth-order spatial filter. Unfortunately, the numerical analyst has little control over the actual magnitude of
the dissipation because it is a function of the Courant number, and in most practical problems, IL will vary throughout the computational domain. The dependence
of the damping on the Courant number is illustrated in Fig. 2.19, which compares
solutions generated by the Lax-Wendroffmethod and the leapfrog scheme (2.91)
using Courant numbers of 0.75 and 0.1. When IL = 0.1, the 1eapfrog and LaxWendroff schemes give essentially the same result, but when IL is increased to
0.75, the damping of the Lax-Wendroff solution relative to the leapfrog scheme
is clearly evident. Fig. 2.19 also demonstrates how the phase-speed error in both
numerical solutions is reduced as the Courant number increases toward unity.
The term that cancels the O(t.t) truncation error in a Lax-Wendroff scheme
must be specifically reformulated for each new problem. The following three examples illustrate the general approach. If the flow velocity in (2.102) is a function
of x, then
97
(a)
FIGURE 2.19. Leapfrog, second-order space (solid), Lax-Wendroff (dashed), and exact
solution (dot-dashed) for the advection of the sum of equal-amplitude 7.5t:u and lOt.x
sine waves over a distance of twelve grid points using a Courant number of (a) O. I , and (b)
0.75 .
from which it follows that the Lax-Wendroff scheme is stable for 1L
2 ::; 1. Short
wavelengths are damped most rapidly; the 2t.x wave is completely eliminated in
a single time step if 1J1.1 = 1/./2. Since the shortest wavelengths are seriously in
error--once again the phase speed of the 2t.x wave is zero-this scale-selective
damping can be advantageous. Indeed, the scale-selectivity of the dissipation in
the Lax-Wendroff scheme is the same as that of a fourth-order spatial filter. Unfortunately, the numerical analyst has little control over the actual magnitude of
the dissipation because it is a function of the Courant number, and in most practical problems, IL will vary throughout the computational domain. The dependence
of the damping on the Courant number is illustrated in Fig. 2.19, which compares
solutions generated by the Lax-Wendroffmethod and the leapfrog scheme (2.91)
using Courant numbers of 0.75 and 0.1. When IL = 0.1, the 1eapfrog and LaxWendroff schemes give essentially the same result, but when IL is increased to
0.75, the damping of the Lax-Wendroff solution relative to the leapfrog scheme
is clearly evident. Fig. 2.19 also demonstrates how the phase-speed error in both
numerical solutions is reduced as the Courant number increases toward unity.
The term that cancels the O(t.t) truncation error in a Lax-Wendroff scheme
must be specifically reformulated for each new problem. The following three examples illustrate the general approach. If the flow velocity in (2.102) is a function
of x, then
