Geography Reference
In-Depth Information
Because the difference approximations in (13.4) and (13.5) involve points at equal
distances on either side of x 0 , they are called centered differences . These approxi-
mations neglect terms of order (δx) 2 . We thus say that the truncation error is order
(δx) 2 . Higher accuracy can be obtained by decreasing the grid interval, but at the
cost of increasing the density of grid points. Alternatively, it is possible to obtain
higher order accuracy without decreasing the grid spacing by writing formulas
analogous to (13.2) and (13.3) for the interval 2δx and using these together with
(13.2) and (13.3) to eliminate error terms less than order (δx) 4 . This approach,
however, has the disadvantage of producing more complicated expressions and
can be difficult to implement near boundary points.
13.3.2
Centered Differences: Explicit Time Differencing
As a prototype model we consider the linear one-dimensional advection equation
∂q/∂t
+
c∂q/∂x
=
0
(13.6)
with c a specified speed and q(x, 0) a known initial condition. This equation can
be approximated to second-order accuracy in x and t by the centered difference
equation
[q (x, t
δx, t)] / (2δx)
(13.7)
The original differential equation (13.6) is thus replaced by a set of algebraic
equations (13.7), which can be solved to determine solutions for a finite set of points
that define a grid mesh in x and t (see Fig. 13.1). For notational convenience it is
useful to identify points on the grid mesh by indices m, s. These are defined by
letting x
+
δt)
q (x, t
δt)] / (2δt)
=−
c [q (x
+
δx, t)
q (x
=
mδx
;
m
=
0, 1, 2, 3,..., M, and t
=
sδt
;
s
=
0, 1, 2, 3,..., S,
and writing
q m,s
ˆ
q (mδx, sδt). The difference equation (13.7) can then be
expressed as
σ ˆ
q m 1,s
q m,s + 1 −ˆ
ˆ
q m,s 1 =−
q m + 1,s −ˆ
(13.8)
where σ
cδt/δx is the Courant number . This form of time differencing is
referred to as the leapfrog method, as the tendency at time step s is given by the
difference in values computed for time steps s
+
1 and s
1 (i.e., by leaping across
point s).
Leapfrog differencing cannot be used for the initial time t
q m, 1
is not known. For the first time step, an alternative method is required such as the
forward difference approximation
=
0 (s
=
0),as
ˆ
(σ/2) ˆ
q m 1,0
q m,1 −ˆ
ˆ
q m,0 ≡−
q m + 1,0 −ˆ
(13.9)
Search WWH ::




Custom Search