ax 3
6
2 ax 2
Bx
!:lx
80
2. Basic Finite-Difference Methods
(b)
(a)
\I I I
" \I I I I
,
I I/
FIGURE 2.14. Exact solution and differential-d ifference solutions for (a) advection of a
spike over a distance of five grid points, and (b) advection of the surn of equal-amplitude
7.5ßx and lOßx sine waves over a distance of twelve grid points. Exact solution
(dot-dashed), one-sided first-order (short-dashed), centered second-order (long-dashed),
and one-sided third-order (solid).
be beneficial, because it largely eliminates the dispersive trail of waves found in
the centered difference solutions. On the other hand, the damping of intermediate wavelengths is sufficiently weak that the third-order solution retains almost
the same amplitude in the region of the spike as the "nondamping" second- and
fourth-order schemes. The situation in Fig. 2.l4b is somewhat different, and it
is not entirely obvious whether the third-order results should be preferred over
the second-order scheme. The third-order scheme clearly exhibits less phasespeed error, but it also shows more amplitude error than the centered second-order
method.
2.4.2 Dissipation, Dispersion, and the Modijied Equation
One way to estimate phase-speed and amplitude error is to derive the differentialdifference dispersion relation, as described in the preceding section. Another way
to characterize the relative magnitude ofthe these errors is to examine the lowestorder terms in the truncation error of the finite-difference formula. The truncation
errors for each of the finite-difference approximations considered in the preceding
section are as folIows. One-sided, first-order:
1{!j -1{!j-1 = a1{! _ !:lx a
21{!
+ !:lx
2 a
31{!
+ 0 [(!:lx)3] .
(2.71)
6
2 ax 2
Bx
!:lx
80
2. Basic Finite-Difference Methods
(b)
(a)
\I I I
" \I I I I
,
I I/
FIGURE 2.14. Exact solution and differential-d ifference solutions for (a) advection of a
spike over a distance of five grid points, and (b) advection of the surn of equal-amplitude
7.5ßx and lOßx sine waves over a distance of twelve grid points. Exact solution
(dot-dashed), one-sided first-order (short-dashed), centered second-order (long-dashed),
and one-sided third-order (solid).
be beneficial, because it largely eliminates the dispersive trail of waves found in
the centered difference solutions. On the other hand, the damping of intermediate wavelengths is sufficiently weak that the third-order solution retains almost
the same amplitude in the region of the spike as the "nondamping" second- and
fourth-order schemes. The situation in Fig. 2.l4b is somewhat different, and it
is not entirely obvious whether the third-order results should be preferred over
the second-order scheme. The third-order scheme clearly exhibits less phasespeed error, but it also shows more amplitude error than the centered second-order
method.
2.4.2 Dissipation, Dispersion, and the Modijied Equation
One way to estimate phase-speed and amplitude error is to derive the differentialdifference dispersion relation, as described in the preceding section. Another way
to characterize the relative magnitude ofthe these errors is to examine the lowestorder terms in the truncation error of the finite-difference formula. The truncation
errors for each of the finite-difference approximations considered in the preceding
section are as folIows. One-sided, first-order:
1{!j -1{!j-1 = a1{! _ !:lx a
21{!
+ !:lx
2 a
31{!
+ 0 [(!:lx)3] .
(2.71)
