The pseudo-spectral method is a powerful numerical technique used to solve partial differential equations (PDEs), especially in fluid simulations. It combines the advantages of spectral methods (high accuracy) and finite difference methods (simplicity in handling nonlinearities).
The pseudo-spectral method is based on representing the solutions of PDEs as series of basis functions, generally trigonometric functions using the Fourier transform or orthogonal polynomials such as Chebyshev polynomials. These basis functions allow transforming the PDEs in physical space into a system of algebraic equations in spectral space.
-
Transformation to Spectral Space
The problem variables are projected onto a spectral basis using, for example, the Fourier transform. For a periodic function$s(x)$ , a Fourier series is used:
where
-
Solving in Spectral Space
Spatial derivatives are computed directly in spectral space thanks to the properties of the basis functions. For example, the derivative of a function$s(x)$ in spectral space is given by:
-
Return to Physical Space for Nonlinearities
Nonlinear terms, such as$s \frac{\partial s}{\partial x}$ , are computed in physical space. This requires an inverse transform to return to physical space, followed by a new transform to return to spectral space.
When computing nonlinear products in physical space, aliasing errors can appear when returning to spectral space.
To limit these errors, a de-aliasing filter is generally applied (for example, the "2/3-rule" method by Orszag: the highest frequency modes are set to zero before returning to spectral space).
In the context of the dimensionless
- Poisson equation for the dimensionless stream function
$\psi$ :
- Transport equation for the dimensionless vorticity
$\omega$ :
We can decompose our vorticity and stream function quantities in Fourier space for a 2D periodic domain:
With
Taking the Fourier transform of these equations, we obtain:
$$ \begin{aligned} \begin{cases} \large{\frac{\partial \widehat{\omega}}{\partial t} = \widehat{NL} - Re^{-1} (k_x^2+k_y^2) \widehat{\omega}} \
(k_x^2+k_y^2) \widehat{\psi} = \widehat{\omega}
\end{cases} \end{aligned} $$
For time discretization, a second-order Adams-Bashforth scheme is used for the nonlinear term (
and
To compute the nonlinear term, the derivatives with respect to
Advantages:
- Very high accuracy for smooth solutions.
- Fast computation of derivatives (simple multiplication in spectral space).
- Ideal for periodic domains.
Disadvantages:
- Less suitable for complex geometries or non-periodic boundary conditions.
- Aliasing management required for nonlinearities.
- Can become memory-intensive for very high resolutions.