- the pseudo-spectral(PS) methods are methods to solve partial differential equantions(PDE)
- they originate roughly in 1970
- the PS methods have successfully been applied to

- fluid dynamics(turbulence modeling, weather predictions)
- non-linear waves
- seismic modeling
- MHD
- ...

- the ‘pseudo-spectral’ in the method refers to the spatial part of a PDE
- example: a apatial PDE:

L: a spatial differential operator(e.g. , etc. )

- wanted: numerical solution such that the residual R:

is small-but how do we difine the smallness?

- general procedure:

- choose a finite set of trial functions(expansion functions) and expand in these functions

- choose a set of test functions and demand that

- ‘spectral methods’ means that the trial functions form a basis for a certain space of global, smooth functions (e.g. Fourier polynomials)(global: extending over the whole spatial domain of interest)
- there are various spectral methods, classified according to the
*test functions*:

Galerkin method, tau method, collocation or pseudo-spectral method

- collocation or pseudo-spectral method:

where the are special points, the collocation points

- the smallness condition for the residual becomes:

N equations to determine the unknown N coeffients

- remark: the solution at the collocation points is exact, in between them we interpolate the solution
- what trial functions to choose?

- periodic b.c.: trigonometric functions (Fourier series)
- non-periodic b.c.: orthogonal polynomials(main candidate: Chebyshev polynomials)

- in

assume 1-D, and e.g. ,

- Fourier transform:

- in principle, we want to do this numerically, but we have to make sure about a few points...

- the aim is to find the expansion coefficients such that the residual

or

vanishes. If L is linear, then

the ‘trick’ is to choose (turning now to 1D for simplicity)

and

- and are equi-spaced, and the condition on the residual becomces:

- we define the discrete Foureier Transform DFT as

- with , and the inverse as

- it can be shown that with the specific choice of and

[algebraic proof, using ]

so that

(but just and only at the collocation points, actually )

- then the condition on the residual

can thus, using the DFT, be written as:

and, on applying DFT,

-> we can maipulate our equations numerically with the DFT analogously as we do treat equations analytically with the Fourier transform

- Remark:
- and are equi-spaced only for trigonometric polynomials, every set of expansion functions has its own characteristic distribution of collocation points-equi-distribution is an exception (Chebychev, Legendre polynomials etc)
- the sets {} and {} are completely equivalent, they contain the same information

- example: diffusion equation in 1D:

- we consider the euqation only at the collocation points writing symbolically

apply a spatial DFT:

where

we have a set of N ODEs the temporal integration is done in Fourier space

- The idea is to move the initial condition to Fourier space, and to do the temporal integration in Fourier space, since there we have ODEs
- since we ahve a set of ODEs, in principle every numerical scheme for integrating ODEs can be applied
- often good is Runge-Kutta 4th order, adaptive step-size
- 4th order RK:

- adaptive step-size:(for efficiency of the code)

advance , and also ,compare the results with prescribed accuracy, depending on the result make smaller or larger.

- assume there is a term in the original PDE
- we are working in F-space, using DFT, so at a given time we have available and
- corresponds to a convolution in F-space, but convolutions are expensive(CPU time) and must be avoided (~:math:N^2 )
- the procedure to calculate is as follow(~ ):

- given at time t are and
- calculate and
- multiply and store
- move to F-space,
- use

- the Foureier modes used are:

- at the grid points equals:

this implies that modes with:

contribute to the DFT as if they had

i.e. high k modes alias/bias the amplitude a lower k modes!

- example: for , our wave vectors are

now e.g. to also the modes etc. contribute! i.e. modes outside the k-range we model bias the modeled k-range

example: grid of N=8 points, :

and appear as being the same function when sampled.

First consequence of the aliasing effect:

prescribed functions such as initial conditions or source functions are best provided as superpositions fo the explicitly available modes,

- assume we have a non-linear term in our PDE, and

with form our set of available wave-vectors

- now

and may lie outside our range of k’s, and the available Foureier amplitudes might get aliased!

- outside range if and the amplitude appears wrongly in the range of ks at the DFT is aliased

- several methods exist to prevent aliasing:

zero-padding(3/2-rule), truncating(2/3-rule), phase shift

- we apply 2/3-rule:

- simple to apply
- low cost in computing time

- Basic idea:

set part of the amplitudes to zero always prior to (non-linear) multiplications:

full index range of k-vectors: -> keep the sub-range free of aliasing method: set Fourier amplitudes

- why does this work? and how to choose K?
- let j and s be in
- if (outside range), then the amplitude corresponding to j+s will be aliased to j+s-N
- we demand that (in the not used part of the spectrum), the largest j, s in the range are i.e.
- we set : ‘2/3-rule`
- for in the amplitude is aliased to , which may lie in , but we do not have to care, the amplitudes at j and s are set to zero-> the range is free of aliasing.

- assume you need to evaluate , having given the Fourier transforms and :

- ... theory on stability on convergence ...
- reproduce analytically known cases
- reproduce results of others, or results derived in different ways
- test the individual sub-tasks the code performs
- monitor conserved quantities (if there are any)
- apply fantasy and pysical intuition to the concrete problem you study, try to be as critical as you can against your results

- for analytic functions (solutions), the errors decay exponentially with N, i.e. very fast
- non-smoothness of even discontinuities in coeficients ro the solutions seem note to cause problems
- often, less grid points are needed with the PS method than with finite difference methods to achieve the same accuracy(computing time and memory!)

- certain boundary condition s may cause difficulties
- irregular domains(simulation boxes) can be difficult or impossible to implement
- strong shocks can cause problems
- local grid refinement (for cases where it is needed) seems not possible, so-far

[1] | Here is a nice tutorial |

[2] | Wikipedia page for pseudo spectral method |

[3] | Press, WH; Teukolsky, SA; Vetterling, WT; Flannery, BP (2007). “Section 20.7. Spectral Methods”. Numerical Recipes: The Art of Scientific Computing (3rd ed.) . New York: Cambridge University Press. ISBN 978-0-521-88068-8. |