4.2 The Spectral Method
177
The choice of some particular family of orthogonal expansion functions is
largely dictated by the geometry of the problem and by the boundary conditions.
Fourier series are weIl suited to reetangular domains with periodic boundary conditions. Chebyshev polynomials are a possibility for nonperiodic domains. Asso -
ciated Legendre functions are useful for representing the latitudinal dependence
of a function on the spherical Earth . Since Fourier series lead to the simplest formulae , they will be used to illustrate the elementary properties of the spectral
method. The special problems associated with spherical geometry will be discussed in Section 4.4.
4.2.1 Comparison with Finite-Difference Methods
In Chapter 2, a variety of finite-difference methods were tested on the one-dimensional advection equation
o1{! + c o1{! = O.
ot
ox
(4.11)
Particular emphasis was placed on the simplest case , in which c was constant.
When c is constant, it is easy to find expansion functions that are eigenfunctions of
the spatial derivative term in (4.11). As a consequence, the problem of advection
by a constant wind is almost too simple for the spectral method. Nevertheless, the
constant-wind case reveals some of the fundamental strengths and weaknesses of
the spectral method and allows a close comparison between the spectral method
and finite-difference schemes.
Suppose, therefore, that c is constant and solutions are sought to (4.11) on the
periodic domain -Jr x
tt , subject to the initial condition 1{!(x. 0) = j(x) . A
Fourier series expansion
rjJ(x, t) =
N
L ak(t)e
ikx
k=-N
(4.12)
is the natural choice for this problem. Since individual Fourier modes are eigenfunctions of the differential operator in (4.11), evolution equations for the Fourier
coefficients of the form
-
dak
dt
+ ickas = 0
(4.13)
may be obtained by directly substituting (4.12) into the advection equation. In this
atypically simple case, the residual is zero, and it is not necessary to adopt any
particular procedure to minimize its norm. Nevertheless, (4.13) can also be obtained through the Galerkin requirement that the residual be orthogonal to each of
the expansion functions. In order to apply the Galerkin formulation it is necessary
to generalize the definition of orthogonality to include complex-valued functions.
Two complex-valued functions g(x) and h(x) are orthogonal over the domain S
if
fs g(x)h*(x)dx = 0,
Précédent

- 191/476

Suivant