4.3 The Pseudospectral Method
191
4.3 The Pseudospectral Method
The speetral method uses orthogonal expansion funetions to represent the numerieal solution and eonstrains the residual error to be orthogonal to eaeh of the
expansion funetions . As diseussed in Seetion 3.1, there are alternative strategies
for eonstraining the size of the residual. The pseudospeetral method utilizes one
of these alternative strategies : the eolloeation approximation, which requires the
residual to be zero at every point on some fixed mesh. Speetral and pseudospeetral
methods might both represent the solution with the same orthogonal expansion
funetions; however, as a eonsequenee of the eollocation approximation, the pseudospeetral method is basieally a grid-point seheme-series expansion functions
are used only to compute derivatives .
In order to iIIustrate the pseudospeetral procedure, suppose that solutions are
sought to the advection equation (4.11) on the periodic doma in 0
x
2Jr
and that the approximate solution f/J and the spatially varying wind speed c(x) are
represented by Fourier series truncated at wave number K :
K
K
f/J(x, t) = L ane
inx, c(x,t)= L cme
imx .
n=-K
m= -K
The coIIoeation requirement at grid point j is
(4.35)
Enforcing R(f/J(xj» = 0 at 2K + 1 points on the physical-spaee grid leads to
a solvable linear system for the time derivatives of the 2K + 1 Fourier eoefficients . In the ease of the Fourier speetral method, the most efficient ehoice for the
loeation of these points is the equally spaeed mesh
xj = j (2:: 1 ), j = 1,2, ...,2K + I.
(4.36)
There is no need aetually to solve the linear system for the dak/dt . It is more
efficient to write (4.35) in the equivalent form
8f/J
df/J
-(x ·) + c(x ·) -
dt J
J 8x
(x ·) = 0,
J
(4.37)
where
(4.38)
191
4.3 The Pseudospectral Method
The speetral method uses orthogonal expansion funetions to represent the numerieal solution and eonstrains the residual error to be orthogonal to eaeh of the
expansion funetions . As diseussed in Seetion 3.1, there are alternative strategies
for eonstraining the size of the residual. The pseudospeetral method utilizes one
of these alternative strategies : the eolloeation approximation, which requires the
residual to be zero at every point on some fixed mesh. Speetral and pseudospeetral
methods might both represent the solution with the same orthogonal expansion
funetions; however, as a eonsequenee of the eollocation approximation, the pseudospeetral method is basieally a grid-point seheme-series expansion functions
are used only to compute derivatives .
In order to iIIustrate the pseudospeetral procedure, suppose that solutions are
sought to the advection equation (4.11) on the periodic doma in 0
x
2Jr
and that the approximate solution f/J and the spatially varying wind speed c(x) are
represented by Fourier series truncated at wave number K :
K
K
f/J(x, t) = L ane
inx, c(x,t)= L cme
imx .
n=-K
m= -K
The coIIoeation requirement at grid point j is
(4.35)
Enforcing R(f/J(xj» = 0 at 2K + 1 points on the physical-spaee grid leads to
a solvable linear system for the time derivatives of the 2K + 1 Fourier eoefficients . In the ease of the Fourier speetral method, the most efficient ehoice for the
loeation of these points is the equally spaeed mesh
xj = j (2:: 1 ), j = 1,2, ...,2K + I.
(4.36)
There is no need aetually to solve the linear system for the dak/dt . It is more
efficient to write (4.35) in the equivalent form
8f/J
df/J
-(x ·) + c(x ·) -
dt J
J 8x
(x ·) = 0,
J
(4.37)
where
(4.38)
