3.5 Linear Equations with Variable Coefficients
147
turbation theorem that the stability condition sufficient to guarantee convergence
cannot depend on r, The value of r may, nevertheless, have a dramatic impact on
the maximum stable time step when D.x is finite.
3.5 Linear Equations with Variable Coefficients
Some of the simplest equations of practical interest are linear equations with variable coefficients. Consider, for example, one-dirnensional advection by a spatially
varying wind speed, which is govemed by the partial differential equat ion
otfr + c(x) otfr = O.
(3.87)
8t
8x
Suppose ifJj(t) is the numerical approximation to tfr(t , jD.x) and that C is available at the same set of spatial grid points. One obvious differential-difference
approximation to the preceding is
difJj
dt + Cj 02xifJj = O.
(3.88)
The stability of this scheme is often assessed by "freezing" c(x) at some constant
value Co and studying the stability of the family of frozen-coefficient problems
obtained by varying Co over the range of all possible c(x) . It should be noted,
however, that in some pathological exampies there is no relation between the stability of the variable-coefficient problem and the corresponding family of frozencoefficient problems (see Problem 10).
Suppose that the time derivative in (3.88) is replaced by leapfrog time-differencing ; then a necessary condition for the stability of the resulting scheme is
6.t
max Ic(x)1 -
< I.
x
6.x
If this stability condition is violated in some small region of the flow, the instability will initially be confined to the same region and will appear as a packet of
rapidly amplifying short waves typically having wavelengths between 2D.x and
4D.x. If the numerical solution and the variable coefficients remain smooth and
well-resolved, the frozen-coefficient analysis can also yield sufficient conditions
for stability. In order to guarantee stability via a frozen-coefficient analysis, the
numerical scheme must include some dissipative smoothing (Gustafsson et aI.
1995, p. 235) . The stability of some completely nondissipative methods can, nevertheless, be established by the energy method (see Section 3.5.2).
A second reasonable differential-difference approximation to (3.87) may be
written in the form
d
((}X Cj oxifJj }X = 0,
(3. 89)
dt ifJ j +
where the averaging operator ( )X is defined in (A.2) of the Appendix. When C is a
constant, the preceding is identical to (3.88). If identical time differences are em-
147
turbation theorem that the stability condition sufficient to guarantee convergence
cannot depend on r, The value of r may, nevertheless, have a dramatic impact on
the maximum stable time step when D.x is finite.
3.5 Linear Equations with Variable Coefficients
Some of the simplest equations of practical interest are linear equations with variable coefficients. Consider, for example, one-dirnensional advection by a spatially
varying wind speed, which is govemed by the partial differential equat ion
otfr + c(x) otfr = O.
(3.87)
8t
8x
Suppose ifJj(t) is the numerical approximation to tfr(t , jD.x) and that C is available at the same set of spatial grid points. One obvious differential-difference
approximation to the preceding is
difJj
dt + Cj 02xifJj = O.
(3.88)
The stability of this scheme is often assessed by "freezing" c(x) at some constant
value Co and studying the stability of the family of frozen-coefficient problems
obtained by varying Co over the range of all possible c(x) . It should be noted,
however, that in some pathological exampies there is no relation between the stability of the variable-coefficient problem and the corresponding family of frozencoefficient problems (see Problem 10).
Suppose that the time derivative in (3.88) is replaced by leapfrog time-differencing ; then a necessary condition for the stability of the resulting scheme is
6.t
max Ic(x)1 -
< I.
x
6.x
If this stability condition is violated in some small region of the flow, the instability will initially be confined to the same region and will appear as a packet of
rapidly amplifying short waves typically having wavelengths between 2D.x and
4D.x. If the numerical solution and the variable coefficients remain smooth and
well-resolved, the frozen-coefficient analysis can also yield sufficient conditions
for stability. In order to guarantee stability via a frozen-coefficient analysis, the
numerical scheme must include some dissipative smoothing (Gustafsson et aI.
1995, p. 235) . The stability of some completely nondissipative methods can, nevertheless, be established by the energy method (see Section 3.5.2).
A second reasonable differential-difference approximation to (3.87) may be
written in the form
d
((}X Cj oxifJj }X = 0,
(3. 89)
dt ifJ j +
where the averaging operator ( )X is defined in (A.2) of the Appendix. When C is a
constant, the preceding is identical to (3.88). If identical time differences are em-
