4.2 The Spectral Method
181
df/>(Xj, t) = i: _da_ n einxj
dt
n=-N dt
N
= - L incan(t)einXj
n=-N
= -c L
N in
(
n=-N
2N+1
1
2N+l
L f/>(Xk, t)e- lnXk "
ZN + I k=l
= -c L Cj,k f/>(Xk. t),
k=l
) e
lnXj "
where
N
c., =
s.
ZN + 1 L....J
'""" inein(xr xkl.
n=-N
The finite-difference coefficient Cj,k depends only on the difference between j
and k, and is zero if j = k. If j "I- k, a simpler expression for C j,jH can be
obtained by defining
s = x j - x jH = -l(Z:: 1) ,
in which case
1
d
Cj,jH = ZN + 1 ds
e
1
d ( -iNs
= ZN + 1 ds e
is n)
(e)
.
Using (4.17) to sum the finite geometric series, differentiating, and noting that
e i (2N+l)s = 1, the preceding becomes
Cj,jH = (Zsin
)'
which imp1ies that since Cj,jH = -Cj,j-l, the equivalent finite-difference formula is centered in space.
Two grid-point values are used in the centered second-order finite-difference
approximation to 01/1lox. A fourth-order centered difference utilizes four points;
the sixth-order difference requires six grid points. Every grid-point on the numerical mesh (except the central point) is involved in the spectral approximation of
01/11ox. As will be shown in the next section, the use of all these grid points allows
the spectral method to compute derivatives of smooth functions with very high accuracy. Merilees and Orszag (1979) have compared the weighting coefficients for
the spectral method on a seventeen -point periodic grid with the weighting coefficients for second- through sixteenth-order centered finite differences. Their calculations appear in Table 4.1, which shows that the influence of remote grid points
on the spectral calculation is much greater than the remote influence in any of the
Précédent

- 195/476

Suivant