HOME

TheInfoList



OR:

Spectral methods are a class of techniques used in
applied mathematics Applied mathematics is the application of mathematical methods by different fields such as physics, engineering, medicine, biology, finance, business, computer science, and industry. Thus, applied mathematics is a combination of mathemati ...
and
scientific computing Computational science, also known as scientific computing or scientific computation (SC), is a field in mathematics that uses advanced computing capabilities to understand and solve complex problems. It is an area of science that spans many disc ...
to numerically solve certain
differential equation In mathematics, a differential equation is an equation that relates one or more unknown functions and their derivatives. In applications, the functions generally represent physical quantities, the derivatives represent their rates of change, an ...
s. The idea is to write the solution of the differential equation as a sum of certain " basis functions" (for example, as a Fourier series which is a sum of sinusoids) and then to choose the coefficients in the sum in order to satisfy the differential equation as well as possible. Spectral methods and
finite element method The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling. Typical problem areas of interest include the traditional fields of structural analysis, heat ...
s are closely related and built on the same ideas; the main difference between them is that spectral methods use basis functions that are generally nonzero over the whole domain, while finite element methods use basis functions that are nonzero only on small subdomains ( compact support). Consequently, spectral methods connect variables ''globally'' while finite elements do so ''locally''. Partially for this reason, spectral methods have excellent error properties, with the so-called "exponential convergence" being the fastest possible, when the solution is
smooth Smooth may refer to: Mathematics * Smooth function, a function that is infinitely differentiable; used in calculus and topology * Smooth manifold, a differentiable manifold for which all the transition maps are smooth functions * Smooth algebrai ...
. However, there are no known three-dimensional single domain spectral
shock capturing In computational fluid dynamics, shock-capturing methods are a class of techniques for computing inviscid flows with shock waves. The computation of flow containing shock waves is an extremely difficult task because such flows result in sharp, disco ...
results (shock waves are not smooth).pp 235, Spectral Methods
evolution to complex geometries and applications to fluid dynamics, By Canuto, Hussaini, Quarteroni and Zang, Springer, 2007.
In the finite element community, a method where the degree of the elements is very high or increases as the grid parameter ''h'' increases is sometimes called a
spectral element method In the numerical solution of partial differential equations, a topic in mathematics, the spectral element method (SEM) is a formulation of the finite element method (FEM) that uses high degree piecewise polynomials as basis functions. The spectral ...
. Spectral methods can be used to solve differential equations (PDEs, ODEs, eigenvalue, etc) and
optimization problem In mathematics, computer science and economics, an optimization problem is the problem of finding the ''best'' solution from all feasible solutions. Optimization problems can be divided into two categories, depending on whether the variables ...
s. When applying spectral methods to time-dependent PDEs, the solution is typically written as a sum of basis functions with time-dependent coefficients; substituting this in the PDE yields a system of ODEs in the coefficients which can be solved using any numerical method for ODEs. Eigenvalue problems for ODEs are similarly converted to matrix eigenvalue problems . Spectral methods were developed in a long series of papers by Steven Orszag starting in 1969 including, but not limited to, Fourier series methods for periodic geometry problems, polynomial spectral methods for finite and unbounded geometry problems, pseudospectral methods for highly nonlinear problems, and spectral iteration methods for fast solution of steady-state problems. The implementation of the spectral method is normally accomplished either with collocation or a Galerkin or a
Tau Tau (uppercase Τ, lowercase τ, or \boldsymbol\tau; el, ταυ ) is the 19th letter of the Greek alphabet, representing the voiceless dental or alveolar plosive . In the system of Greek numerals, it has a value of 300. The name in English ...
approach . For very small problems, the spectral method is unique that solutions may be written out symbolically, yielding a practical alternative to series solutions for differential equations. Spectral methods can be computationally less expensive and easier to implement than finite element methods; they shine best when high accuracy is sought in simple domains with smooth solutions. However, because of their global nature, the matrices associated with step computation are dense and computational efficiency will quickly suffer when there are many degrees of freedom (with some exceptions, for example if matrix applications can be written as Fourier transforms). For larger problems and nonsmooth solutions, finite elements will generally work better due to sparse matrices and better modelling of discontinuities and sharp bends.


Examples of spectral methods


A concrete, linear example

Here we presume an understanding of basic multivariate
calculus Calculus, originally called infinitesimal calculus or "the calculus of infinitesimals", is the mathematical study of continuous change, in the same way that geometry is the study of shape, and algebra is the study of generalizations of arithm ...
and Fourier series. If 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\pi,y)=g(x,y+2\pi)) then we are interested in finding a function ''f''(''x'',''y'') so that :\left(\frac+\frac\right)f(x,y)=g(x,y)\quad \text 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 Poisson's equation is an elliptic partial differential equation of broad utility in theoretical physics. For example, the solution to Poisson's equation is the potential field caused by a given electric charge or mass density distribution; with t ...
, 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=:\sum a_e^ :g=:\sum b_e^ and substitute into the differential equation, we obtain this equation: :\sum -a_(j^2+k^2)e^=\sum b_e^ 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 which is an explicit formula for the Fourier coefficients ''a''''j'',''k''. With periodic boundary conditions, the
Poisson equation Poisson's equation is an elliptic partial differential equation of broad utility in theoretical physics. For example, the solution to Poisson's equation is the potential field caused by a given electric charge or mass density distribution; with t ...
possesses a solution only if ''b''0,0 = 0. Therefore, we can freely choose ''a''0,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, where h := 1/n and n is the highest frequency treated.


Algorithm

# Compute the Fourier transform (''bj,k'') of ''g''. # Compute the Fourier transform (''aj,k'') of ''f'' via the formula (). # 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


Nonlinear example

We wish to solve the forced, transient, nonlinear
Burgers' equation Burgers' equation or Bateman–Burgers equation is a fundamental partial differential equation and convection–diffusion equation occurring in various areas of applied mathematics, such as fluid mechanics, nonlinear acoustics, gas dynamics, and tr ...
using a spectral approach. Given u(x,0) on the periodic domain x\in\left[0,2\pi\right), find u \in \mathcal such that :\partial_ u + u \partial_ u = \rho \partial_ 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 :\left\langle \partial_ u , v \right\rangle = \left\langle \partial_x \left(-\frac u^2 + \rho \partial_ u\right) , v \right\rangle + \left\langle f, v \right\rangle \quad \forall v\in \mathcal, \forall t>0 where following
inner product In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, often ...
notation.
Integrating by parts In calculus, and more generally in mathematical analysis, integration by parts or partial integration is a process that finds the integral of a product of functions in terms of the integral of the product of their derivative and antiderivative. ...
and using periodicity grants :\langle \partial_ u , v \rangle = \left\langle \frac u^2 - \rho \partial_ u , \partial_x v\right\rangle+\left\langle f, v \right\rangle \quad \forall v\in \mathcal, \forall t>0. To apply the Fourier–
Galerkin method In mathematics, in the area of numerical analysis, Galerkin methods, named after the Russian mathematician Boris Galerkin, convert a continuous operator problem, such as a differential equation, commonly in a weak formulation, to a discrete prob ...
, choose both :\mathcal^N := \left\ and :\mathcal^N :=\operatorname\left\ where \hat_k(t):=\frac\langle u(x,t), e^ \rangle. This reduces the problem to finding u\in\mathcal^N such that :\langle \partial_ u , e^ \rangle = \left\langle \frac u^2 - \rho \partial_ u , \partial_x e^ \right\rangle + \left\langle f, e^ \right\rangle \quad \forall k\in \left\, \forall t>0. Using the orthogonality relation \langle e^, e^ \rangle = 2 \pi \delta_ where \delta_ is the
Kronecker delta In mathematics, the Kronecker delta (named after Leopold Kronecker) is a function of two variables, usually just non-negative integers. The function is 1 if the variables are equal, and 0 otherwise: \delta_ = \begin 0 &\text i \neq j, \\ 1 & ...
, we simplify the above three terms for each k to see : \begin \left\langle \partial_ u , e^\right\rangle &= \left\langle \partial_ \sum_ \hat_ e^ , e^ \right\rangle = \left\langle \sum_ \partial_ \hat_ e^ , e^ \right\rangle = 2 \pi \partial_t \hat_k, \\ \left\langle f , e^ \right\rangle &= \left\langle \sum_ \hat_ e^ , e^\right\rangle= 2 \pi \hat_k, \text \\ \left\langle \frac u^2 - \rho \partial_ u , \partial_x e^ \right\rangle &= \left\langle \frac \left(\sum_ \hat_p e^\right) \left(\sum_ \hat_q e^\right) - \rho \partial_x \sum_ \hat_l e^ , \partial_x e^ \right\rangle \\ &= \left\langle \frac \sum_ \sum_ \hat_p \hat_q e^ , i k e^ \right\rangle - \left\langle \rho i \sum_ l \hat_l e^ , i k e^ \right\rangle \\ &= -\frac \left\langle \sum_ \sum_ \hat_p \hat_q e^ , e^ \right\rangle - \rho k \left\langle \sum_ l \hat_l e^ , e^ \right\rangle \\ &= - i \pi k \sum_ \hat_p \hat_q - 2\pi\rhok^2\hat_k. \end Assemble the three terms for each k to obtain : 2 \pi \partial_t \hat_k = - i \pi k \sum_ \hat_p \hat_q - 2\pi\rhok^2\hat_k + 2 \pi \hat_k \quad k\in\left\, \forall t>0. Dividing through by 2\pi, we finally arrive at : \partial_t \hat_k = - \frac \sum_ \hat_p \hat_q - \rhok^2\hat_k + \hat_k \quad k\in\left\, \forall t>0. With Fourier transformed initial conditions \hat_(0) and forcing \hat_(t), this coupled system of ordinary differential equations may be integrated in time (using, e.g., a
Runge Kutta Runge may refer to: Locations * Runge, Texas, a town, United States *Runge (crater), a lunar crater Mare Smythii Other uses *Runge Newspapers, a newspaper chain in Ontario, Canada *Inspector Heinrich Runge (though it is more often spelled ...
technique) to find a solution. The nonlinear term is a
convolution In mathematics (in particular, functional analysis), convolution is a mathematical operation on two functions ( and ) that produces a third function (f*g) that expresses how the shape of one is modified by the other. The term ''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 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<\infty such that the error is less than C_nh^n for all sufficiently small values of h. We say that the spectral method is of order n, for every n>0. Because a
spectral element method In the numerical solution of partial differential equations, a topic in mathematics, the spectral element method (SEM) is a formulation of the finite element method (FEM) that uses high degree piecewise polynomials as basis functions. The spectral ...
is a
finite element method The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling. Typical problem areas of interest include the traditional fields of structural analysis, heat ...
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 problem In mathematics, an elliptic boundary value problem is a special kind of boundary value problem which can be thought of as the stable state of an evolution problem. For example, the Dirichlet problem for the Laplacian gives the eventual distri ...
s.


See also

*
Finite element method The finite element method (FEM) is a popular method for numerically solving differential equations arising in engineering and mathematical modeling. Typical problem areas of interest include the traditional fields of structural analysis, heat ...
* Gaussian grid *
Pseudo-spectral method Pseudo-spectral methods, also known as discrete variable representation (DVR) methods, are a class of numerical methods used in applied mathematics and scientific computing for the solution of partial differential equations. They are closely rel ...
*
Spectral element method In the numerical solution of partial differential equations, a topic in mathematics, the spectral element method (SEM) is a formulation of the finite element method (FEM) that uses high degree piecewise polynomials as basis functions. The spectral ...
*
Galerkin method In mathematics, in the area of numerical analysis, Galerkin methods, named after the Russian mathematician Boris Galerkin, convert a continuous operator problem, such as a differential equation, commonly in a weak formulation, to a discrete prob ...
*
Collocation method In mathematics, a collocation method is a method for the numerical solution of ordinary differential equations, partial differential equations and integral equations. The idea is to choose a finite-dimensional space of candidate solutions (usually ...


References

* 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
A Spectral Element Method for the Navier–Stokes Equations with Improved Accuracy


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 * * Jie Shen, Tao Tang and Li-Lian Wang (2011) "Spectral Methods: Algorithms, Analysis and Applications" (Springer Series in Computational Mathematics, V. 41, Springer), * Lloyd N. Trefethen (2000) ''Spectral Methods in MATLAB.'' SIAM, Philadelphia, PA {{DEFAULTSORT:Spectral Method Numerical analysis Numerical differential equations