92
2. Basic Finite-Difference Methods
Suppose that the advection equation is approximated with leapfrog-time and
second-order centered-space differencing such that
cP,!+1 - cP'!-1
)
) + C )+ I
cP' !
2M
- cP":
)-1 = O.
2ßx
(2.91)
Substitution of (2.89) into this finite-difference scheme gives
or, equivalently,
sin wßt = /-L sin k ßX ,
(2.92)
where /-L = ctst] ßx. Inspection of (2.92) demonstrates that if I/-LI < 1, w will be
real and the scheme will be neutral. The scheme also appears to be neutral when
I/-LI = I, but this is a special case. When /-L = I , (2.92) reduces to
C
* = -
Sx =C,
ßt
showing that the numerical solution propagates at the correct phase speed. AIthough there are no phase-speed errors when I/-LI = 1, the two roots of (2.92)
become identical if k ßx = n /2, and as a consequence of this double root, the
scheme admits a weakly unstable 4ßx wave. When /-L = 1, the weakly growing
mode has the form
cP'j = n cos [7f(j - n)/2] .
(2.93)
The distinction between the sufficient condition for stability I/-LI < 1 and the more
easily derived necessary condition I/-LI :::: 1 is, however, of little practical significance because uncertainties about the magnitudes of the spatially and temporally
varying velocities in real-world applications usually make it impossible to choose
a time step such that I/-LI = 1.
The frequencies resolvable in the discretized time domain lie in the interval
o :::: w, :::: n / M . Except for the special case just considered when I/-LI = 1 and
k S» = 7f/2, there are two resolvable frequencies that satisfy (2.92). Dividing
these frequencies by k gives the phase speed of the physical and computational
modes
C
*
phys
==
Wphys
- -
k = -
1
kßt
.
.
arcsinü, smkßx)
f'"
and
c comp
* == w comp
-k- = kßt 1 [ 7f - arcsm /-L sm
. (
. k A
tsx
)] .
As in the differential-difference problem, the 2ßx physical mode does not propagate. The 2ßx computational mode flips sign each time step, or equivalently, it
moves at the speed ßx/ßt. In the limit of good spatial resolution (k Sx
0),
2. Basic Finite-Difference Methods
Suppose that the advection equation is approximated with leapfrog-time and
second-order centered-space differencing such that
cP,!+1 - cP'!-1
)
) + C )+ I
cP' !
2M
- cP":
)-1 = O.
2ßx
(2.91)
Substitution of (2.89) into this finite-difference scheme gives
or, equivalently,
sin wßt = /-L sin k ßX ,
(2.92)
where /-L = ctst] ßx. Inspection of (2.92) demonstrates that if I/-LI < 1, w will be
real and the scheme will be neutral. The scheme also appears to be neutral when
I/-LI = I, but this is a special case. When /-L = I , (2.92) reduces to
C
* = -
Sx =C,
ßt
showing that the numerical solution propagates at the correct phase speed. AIthough there are no phase-speed errors when I/-LI = 1, the two roots of (2.92)
become identical if k ßx = n /2, and as a consequence of this double root, the
scheme admits a weakly unstable 4ßx wave. When /-L = 1, the weakly growing
mode has the form
cP'j = n cos [7f(j - n)/2] .
(2.93)
The distinction between the sufficient condition for stability I/-LI < 1 and the more
easily derived necessary condition I/-LI :::: 1 is, however, of little practical significance because uncertainties about the magnitudes of the spatially and temporally
varying velocities in real-world applications usually make it impossible to choose
a time step such that I/-LI = 1.
The frequencies resolvable in the discretized time domain lie in the interval
o :::: w, :::: n / M . Except for the special case just considered when I/-LI = 1 and
k S» = 7f/2, there are two resolvable frequencies that satisfy (2.92). Dividing
these frequencies by k gives the phase speed of the physical and computational
modes
C
*
phys
==
Wphys
- -
k = -
1
kßt
.
.
arcsinü, smkßx)
f'"
and
c comp
* == w comp
-k- = kßt 1 [ 7f - arcsm /-L sm
. (
. k A
tsx
)] .
As in the differential-difference problem, the 2ßx physical mode does not propagate. The 2ßx computational mode flips sign each time step, or equivalently, it
moves at the speed ßx/ßt. In the limit of good spatial resolution (k Sx
0),
