Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Spectral method
Class of methods used in numerical analysis and scientific computing to solve ODE/PDE

Spectral methods, a key technique in applied mathematics and scientific computing, solve differential equations by expressing solutions as sums of basis functions, such as Fourier series. Unlike finite-element methods that use locally supported bases, spectral methods employ globally supported bases, enabling exponential convergence for smooth solutions. They are applied to PDEs, ODEs, and optimization problems, often reducing PDEs to systems solvable by numerical methods for ODEs. Developed by Steven Orszag, implementations typically use collocation or Galerkin methods. While spectral methods offer high accuracy and efficiency in smooth, simple domains, their global nature leads to dense matrices, making them less suitable for large or nonsmooth problems compared to finite elements.

We don't have any images related to Spectral method yet.
We don't have any YouTube videos related to Spectral method yet.
We don't have any PDF documents related to Spectral method yet.
We don't have any Books related to Spectral method yet.
We don't have any archived web articles related to Spectral method yet.

Examples of spectral methods

A concrete, linear example

Here we presume an understanding of basic multivariate calculus and Fourier series. If g ( x , y ) {\displaystyle g(x,y)} is a known, complex-valued function of two real variables, and g is periodic in x and y (that is, g ( x , y ) = g ( x + 2 π , y ) = g ( x , y + 2 π ) {\displaystyle g(x,y)=g(x+2\pi ,y)=g(x,y+2\pi )} ) then we are interested in finding a function f(x,y) so that

( ∂ 2 ∂ x 2 + ∂ 2 ∂ y 2 ) f ( x , y ) = g ( x , y ) for all  x , y {\displaystyle \left({\frac {\partial ^{2}}{\partial x^{2}}}+{\frac {\partial ^{2}}{\partial y^{2}}}\right)f(x,y)=g(x,y)\quad {\text{for all }}x,y}

where the expression on the left denotes the second partial derivatives of f in x and y, respectively. This is the Poisson equation, and can be physically interpreted as some sort of heat conduction problem, or a problem in potential theory, among other possibilities.

If we write f and g in Fourier series:

f =: ∑ a j , k e i ( j x + k y ) , g =: ∑ b j , k e i ( j x + k y ) , {\displaystyle {\begin{aligned}f&=:\sum a_{j,k}e^{i(jx+ky)},\\[5mu]g&=:\sum b_{j,k}e^{i(jx+ky)},\end{aligned}}}

and substitute into the differential equation, we obtain this equation:

∑ − a j , k ( j 2 + k 2 ) e i ( j x + k y ) = ∑ b j , k e i ( j x + k y ) . {\displaystyle \sum -a_{j,k}(j^{2}+k^{2})e^{i(jx+ky)}=\sum b_{j,k}e^{i(jx+ky)}.}

We have exchanged partial differentiation with an infinite sum, which is legitimate if we assume for instance that f has a continuous second derivative. By the uniqueness theorem for Fourier expansions, we must then equate the Fourier coefficients term by term, giving

a j , k = − b j , k j 2 + k 2 {\displaystyle a_{j,k}=-{\frac {b_{j,k}}{j^{2}+k^{2}}}} *

which is an explicit formula for the Fourier coefficients aj,k.

With periodic boundary conditions, the Poisson equation possesses a solution only if b0,0 = 0. Therefore, we can freely choose a0,0 which will be equal to the mean of the resolution. This corresponds to choosing the integration constant.

To turn this into an algorithm, only finitely many frequencies are solved for. This introduces an error which can be shown to be proportional to h n {\displaystyle h^{n}} , where h := 1 / n {\displaystyle h:=1/n} and n {\displaystyle n} is the highest frequency treated.

Algorithm

  1. Compute the Fourier transform (bj,k) of g.
  2. Compute the Fourier transform (aj,k) of f via the formula (*).
  3. Compute f by taking an inverse Fourier transform of (aj,k).

Since we're only interested in a finite window of frequencies (of size n, say) this can be done using a fast Fourier transform algorithm. Therefore, globally the algorithm runs in time O(n log n).

Nonlinear example

We wish to solve the forced, transient, nonlinear Burgers' equation using a spectral approach.

Given u ( x , 0 ) {\displaystyle u(x,0)} on the periodic domain x ∈ [ 0 , 2 π ) {\displaystyle x\in \left[0,2\pi \right)} , find u ∈ U {\displaystyle u\in {\mathcal {U}}} such that

∂ t u + u ∂ x u = ρ ∂ x x u + f ∀ x ∈ [ 0 , 2 π ) , ∀ t > 0 {\displaystyle \partial _{t}u+u\partial _{x}u=\rho \partial _{xx}u+f\quad \forall x\in \left[0,2\pi \right),\forall t>0}

where ρ is the viscosity coefficient. In weak conservative form this becomes

⟨ ∂ t u , v ⟩ = ⟨ ∂ x ( − 1 2 u 2 + ρ ∂ x u ) , v ⟩ + ⟨ f , v ⟩ ∀ v ∈ V , ∀ t > 0 {\displaystyle \left\langle \partial _{t}u,v\right\rangle ={\Bigl \langle }\partial _{x}\left(-{\tfrac {1}{2}}u^{2}+\rho \partial _{x}u\right),v{\Bigr \rangle }+\left\langle f,v\right\rangle \quad \forall v\in {\mathcal {V}},\forall t>0}

where following inner product notation. Integrating by parts and using periodicity grants

⟨ ∂ t u , v ⟩ = ⟨ 1 2 u 2 − ρ ∂ x u , ∂ x v ⟩ + ⟨ f , v ⟩ ∀ v ∈ V , ∀ t > 0. {\displaystyle \langle \partial _{t}u,v\rangle =\left\langle {\tfrac {1}{2}}u^{2}-\rho \partial _{x}u,\partial _{x}v\right\rangle +\left\langle f,v\right\rangle \quad \forall v\in {\mathcal {V}},\forall t>0.}

To apply the Fourier–Galerkin method, choose both

U N := { u : u ( x , t ) = ∑ k = − N / 2 N / 2 − 1 u ^ k ( t ) e i k x } {\displaystyle {\mathcal {U}}^{N}:={\biggl \{}u:u(x,t)=\sum _{k=-N/2}^{N/2-1}{\hat {u}}_{k}(t)e^{ikx}{\biggr \}}}

and

V N := span ⁡ { e i k x : k ∈ − 1 2 N , … , 1 2 N − 1 } {\displaystyle {\mathcal {V}}^{N}:=\operatorname {span} \left\{e^{ikx}:k\in -{\tfrac {1}{2}}N,\dots ,{\tfrac {1}{2}}N-1\right\}}

where u ^ k ( t ) := 1 2 π ⟨ u ( x , t ) , e i k x ⟩ {\displaystyle {\hat {u}}_{k}(t):={\frac {1}{2\pi }}\langle u(x,t),e^{ikx}\rangle } . This reduces the problem to finding u ∈ U N {\displaystyle u\in {\mathcal {U}}^{N}} such that

⟨ ∂ t u , e i k x ⟩ = ⟨ 1 2 u 2 − ρ ∂ x u , ∂ x e i k x ⟩ + ⟨ f , e i k x ⟩ ∀ k ∈ { − 1 2 N , … , 1 2 N − 1 } , ∀ t > 0. {\displaystyle \langle \partial _{t}u,e^{ikx}\rangle =\left\langle {\tfrac {1}{2}}u^{2}-\rho \partial _{x}u,\partial _{x}e^{ikx}\right\rangle +\left\langle f,e^{ikx}\right\rangle \quad \forall k\in \left\{-{\tfrac {1}{2}}N,\dots ,{\tfrac {1}{2}}N-1\right\},\forall t>0.}

Using the orthogonality relation ⟨ e i l x , e i k x ⟩ = 2 π δ l k {\displaystyle \langle e^{ilx},e^{ikx}\rangle =2\pi \delta _{lk}} where δ l k {\displaystyle \delta _{lk}} is the Kronecker delta, we simplify the above three terms for each k {\displaystyle k} to see

⟨ ∂ t u , e i k x ⟩ = ⟨ ∂ t ∑ l u ^ l e i l x , e i k x ⟩ = ⟨ ∑ l ∂ t u ^ l e i l x , e i k x ⟩ = 2 π ∂ t u ^ k , ⟨ f , e i k x ⟩ = ⟨ ∑ l f ^ l e i l x , e i k x ⟩ = 2 π f ^ k ,  and ⟨ 1 2 u 2 − ρ ∂ x u , ∂ x e i k x ⟩ = ⟨ 1 2 ( ∑ p u ^ p e i p x ) ( ∑ q u ^ q e i q x ) − ρ ∂ x ∑ l u ^ l e i l x , ∂ x e i k x ⟩ = ⟨ 1 2 ∑ p ∑ q u ^ p u ^ q e i ( p + q ) x , i k e i k x ⟩ − ⟨ ρ i ∑ l l u ^ l e i l x , i k e i k x ⟩ = − 1 2 i k ⟨ ∑ p ∑ q u ^ p u ^ q e i ( p + q ) x , e i k x ⟩ − ρ k ⟨ ∑ l l u ^ l e i l x , e i k x ⟩ = − i π k ∑ p + q = k u ^ p u ^ q − 2 π ρ k 2 u ^ k . {\displaystyle {\begin{aligned}\left\langle \partial _{t}u,e^{ikx}\right\rangle &={\biggl \langle }\partial _{t}\sum _{l}{\hat {u}}_{l}e^{ilx},e^{ikx}{\biggr \rangle }={\biggl \langle }\sum _{l}\partial _{t}{\hat {u}}_{l}e^{ilx},e^{ikx}{\biggr \rangle }=2\pi \partial _{t}{\hat {u}}_{k},\\\left\langle f,e^{ikx}\right\rangle &={\biggl \langle }\sum _{l}{\hat {f}}_{l}e^{ilx},e^{ikx}{\biggr \rangle }=2\pi {\hat {f}}_{k},{\text{ and}}\\\left\langle {\tfrac {1}{2}}u^{2}-\rho \partial _{x}u,\partial _{x}e^{ikx}\right\rangle &={\biggl \langle }{\tfrac {1}{2}}{\Bigl (}\sum _{p}{\hat {u}}_{p}e^{ipx}{\Bigr )}{\Bigl (}\sum _{q}{\hat {u}}_{q}e^{iqx}{\Bigr )}-\rho \partial _{x}\sum _{l}{\hat {u}}_{l}e^{ilx},\partial _{x}e^{ikx}{\biggr \rangle }\\&={\biggl \langle }{\tfrac {1}{2}}\sum _{p}\sum _{q}{\hat {u}}_{p}{\hat {u}}_{q}e^{i\left(p+q\right)x},ike^{ikx}{\biggr \rangle }-{\biggl \langle }\rho i\sum _{l}l{\hat {u}}_{l}e^{ilx},ike^{ikx}{\biggr \rangle }\\&=-{\tfrac {1}{2}}ik{\biggl \langle }\sum _{p}\sum _{q}{\hat {u}}_{p}{\hat {u}}_{q}e^{i\left(p+q\right)x},e^{ikx}{\biggr \rangle }-\rho k{\biggl \langle }\sum _{l}l{\hat {u}}_{l}e^{ilx},e^{ikx}{\biggr \rangle }\\&=-i\pi k\sum _{p+q=k}{\hat {u}}_{p}{\hat {u}}_{q}-2\pi \rho {}k^{2}{\hat {u}}_{k}.\end{aligned}}}

Assemble the three terms for each k {\displaystyle k} to obtain

2 π ∂ t u ^ k = − i π k ∑ p + q = k u ^ p u ^ q − 2 π ρ k 2 u ^ k + 2 π f ^ k k ∈ { − 1 2 N , … , 1 2 N − 1 } , ∀ t > 0. {\displaystyle 2\pi \partial _{t}{\hat {u}}_{k}=-i\pi k\sum _{p+q=k}{\hat {u}}_{p}{\hat {u}}_{q}-2\pi \rho {}k^{2}{\hat {u}}_{k}+2\pi {\hat {f}}_{k}\quad k\in \left\{-{\tfrac {1}{2}}N,\dots ,{\tfrac {1}{2}}N-1\right\},\forall t>0.}

Dividing through by 2 π {\displaystyle 2\pi } , we finally arrive at

∂ t u ^ k = − i k 2 ∑ p + q = k u ^ p u ^ q − ρ k 2 u ^ k + f ^ k k ∈ { − 1 2 N , … , 1 2 N − 1 } , ∀ t > 0. {\displaystyle \partial _{t}{\hat {u}}_{k}=-{\frac {ik}{2}}\sum _{p+q=k}{\hat {u}}_{p}{\hat {u}}_{q}-\rho {}k^{2}{\hat {u}}_{k}+{\hat {f}}_{k}\quad k\in \left\{-{\tfrac {1}{2}}N,\dots ,{\tfrac {1}{2}}N-1\right\},\forall t>0.}

With Fourier transformed initial conditions u ^ k ( 0 ) {\displaystyle {\hat {u}}_{k}(0)} and forcing f ^ k ( t ) {\displaystyle {\hat {f}}_{k}(t)} , this coupled system of ordinary differential equations may be integrated in time (using, e.g., a Runge Kutta technique) to find a solution. The nonlinear term is a convolution, and there are several transform-based techniques for evaluating it efficiently. See the references by Boyd and Canuto et al. for more details.

A relationship with the spectral element method

One can show that if g {\displaystyle g} is infinitely differentiable, then the numerical algorithm using Fast Fourier Transforms will converge faster than any polynomial in the grid size h. That is, for any n>0, there is a C n < ∞ {\displaystyle C_{n}<\infty } such that the error is less than C n h n {\displaystyle C_{n}h^{n}} for all sufficiently small values of h {\displaystyle h} . We say that the spectral method is of order n {\displaystyle n} , for every n>0.

Because a spectral element method is a finite element method of very high order, there is a similarity in the convergence properties. However, whereas the spectral method is based on the eigendecomposition of the particular boundary value problem, the finite element method does not use that information and works for arbitrary elliptic boundary value problems.

See also

  • Bengt Fornberg (1996) A Practical Guide to Pseudospectral Methods. Cambridge University Press, Cambridge, UK
  • Chebyshev and Fourier Spectral Methods by John P. Boyd.
  • Canuto C., Hussaini M. Y., Quarteroni A., and Zang T.A. (2006) Spectral Methods. Fundamentals in Single Domains. Springer-Verlag, Berlin Heidelberg
  • Javier de Frutos, Julia Novo (2000): A Spectral Element Method for the Navier–Stokes Equations with Improved Accuracy
  • Polynomial Approximation of Differential Equations, by Daniele Funaro, Lecture Notes in Physics, Volume 8, Springer-Verlag, Heidelberg 1992
  • D. Gottlieb and S. Orzag (1977) "Numerical Analysis of Spectral Methods : Theory and Applications", SIAM, Philadelphia, PA
  • J. Hesthaven, S. Gottlieb and D. Gottlieb (2007) "Spectral methods for time-dependent problems", Cambridge UP, Cambridge, UK
  • Steven A. Orszag (1969) Numerical Methods for the Simulation of Turbulence, Phys. Fluids Supp. II, 12, 250–257
  • 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.
  • Jie Shen, Tao Tang and Li-Lian Wang (2011) "Spectral Methods: Algorithms, Analysis and Applications" (Springer Series in Computational Mathematics, V. 41, Springer), ISBN 354071040X
  • Lloyd N. Trefethen (2000) Spectral Methods in MATLAB. SIAM, Philadelphia, PA
  • Muradova A. D. (2008) "The spectral method and numerical continuation algorithm for the von Kármán problem with postbuckling behaviour of solutions", Advances in Computational Mathematics, 29, pp. 179–206, https://doi.org/10.1007/s10444-007-9050-7.
  • Muradova A. D. (2015) "A time spectral method for solving the nonlinear dynamic equations of a rectangular elastic plate", Journal of Engineering Mathematics, 92, pp. 83–101, https://doi.org/10.1007/s10665-014-9752-z.

References

  1. pp 235, Spectral Methods: evolution to complex geometries and applications to fluid dynamics, By Canuto, Hussaini, Quarteroni and Zang, Springer, 2007. https://books.google.com/books?id=7COgEw5_EBQC

  2. Muradova, Aliki D. (2008). "The spectral method and numerical continuation algorithm for the von Kármán problem with postbuckling behaviour of solutions". Adv Comput Math. 29 (2): 179–206, 2008. doi:10.1007/s10444-007-9050-7. hdl:1885/56758. S2CID 46564029. /wiki/Doi_(identifier)

  3. Muradova, Aliki D. (2015). "A time spectral method for solving the nonlinear dynamic equations of a rectangular elastic plate". Journal of Engineering Mathematics. 92: 83–101, 2015. doi:10.1007/s10665-014-9752-z. /wiki/Doi_(identifier)