Spectral Methods Chaiwoot Boonyasiriwat April 10, 2019
Weighted Residual Methods ▪ Consider the problem where L and is a spatial derivative operator. ▪ Approximate the solution by a finite sum ▪ Substitute the approximate solution in to the differential equation yields the residual ▪ The weighted residual method forces the residual to be orthogonal to the test functions k Shen et al. (2011, p.1-2)
Spectral Methods ▪ Spectral methods use globally smooth function (such as trigonometric functions or orthogonal polynomials) as the test functions while finite element methods use local functions. ▪ Examples of spectral methods • Fourier spectral method: • Chebyshev spectral method: • Legendre spectral method: • Laguerre spectral method: • Hermite spectral method: where the polynomials are of degree k . Shen et al. (2011, p.3)
Spectral Methods ▪ “The choice of test function distinguishes the following formulations.” • Bubnov-Galerkin: test functions are the same as the basis functions • Petrov-Galerkin: test functions are different from the basis functions. The tau method is in this class. • Collocation: test functions are the Lagrange basis polynomial such that where x j are collocation points. Shen et al. (2011, p.3)
Spectral Collocation Methods ▪ Consider the problem ▪ Let x j , j = 0, 1, …, N be the collocation points. ▪ The spectral collocation method forces the residual to vanish at the collocation points ▪ The spectral collocation method usually approximates the solution as where L k are the Lagrange basis polynomials or nodal basis functions with Shen et al. (2011, p.4)
Spectral Collocation Methods ▪ Substituting into yields ▪ Assuming the Dirichlet boundary conditions ▪ We then obtain a linear system of N + 1 algebraic equations in N + 1 unknowns. Shen et al. (2011, p.4)
Fourier Series ▪ The complex exponential are defined as where ▪ The set forms a complete orthogonal system in the complex Hilbert space L 2 (0, ), equipped with the inner product and norm ▪ The orthogonality of E k is Shen et al. (2011, p.23)
Fourier Series “For any complex -valued function , its Fourier series is defined by where the Fourier coefficients are given by “If u ( x ) is a real-valued function, its Fourier coefficients satisfy Shen et al. (2011, p.23)
Truncated Fourier Series “For any complex -valued function , its truncated converges to u in the L 2 sense, and there holds the Parseval’s identity: The truncated Fourier series can be expressed in the convolution form as where Dirichlet kernel is Shen et al. (2011, p.25)
Spectral Method and FDM ▪ Finite difference (FD) coefficients can be obtained by differentiating a polynomial interpolant passing through points in the domain. ▪ When all domain points are used, FDM becomes a spectral method called spectral collocation method . ▪ Spectral method has an exponential rate of convergence or spectral convergence rate .
Spectral Method and FEM ▪ Spectral methods and finite element methods (FEM) are closely related in that the solutions are written as a linear combination of basis functions ▪ Spectral methods use global functions while FEM uses local functions. ▪ A main drawback of spectral methods is that it is highly accurate only when solutions are smooth.
Types of Spectral Methods ▪ Collocation method : solutions satisfy PDEs at a number of points in the domain called collocation points. The resulting method is also called pseudospectral method. ▪ Galerkin method : solution satisfies given where is a set of linearly independent basis functions. ▪ Tau method : similar to Galerkin except basis functions are orthogonal polynomials.
Spectral Collocation Methods ▪ Let p be a single function such that p ( x j ) = u j for all j . ▪ Set w j = p '( x j ) ▪ We are free to choose p to fit the problem. ▪ For a periodic domain, we use a trigonometric polynomial on an equispaced grid resulting to the Fourier spectral method . ▪ For nonperiodic domains, we use algebraic polynomials on irregular grids such as Chebyshev grid leading to the Chebyshev spectral method .
Fourier Transforms Fourier analysis : The Fourier transform of a function u ( x ), x , is defined by Fourier synthesis : The function u ( x ) can be reconstructed by
Semidiscrete Fourier Transform Fourier analysis : The semidiscrete Fourier transform of a function u ( x ), x , is defined by Fourier synthesis : The function u ( x ) can be reconstructed by
Aliasing When , two complex exponentials have the same values as long as where m is an integer. Example: sin( x ) and sin(9 x ) on the discrete grid Trefethen (2000, p. 11)
Spectral Differentiation An interpolant can be obtained by The Fourier transform is given by Spectral differentiation can be performed by differentiating the interpolant p ( x ) or
Sinc Interpolation Given the Kronecker delta function It can be shown that for and the corresponding interpolant is which is called the sinc function .
Sinc Interpolation The band-limited interpolant of is A discrete function can be written as “So the band -limited interpolant of u is a linear combination of translated sinc functions” Differentiating this interpolant we obtain the differentiation matrix. Trefethen (2000, p. 13)
Sinc Interpolation Sinc interpolation is accurate only for smooth function. The Gibbs phenomenon can be observed. Trefethen (2000, p. 14)
Periodic Grids Given a periodic grid such that For simplicity, let N is even. So the grid spacing is Trefethen (2000, p. 18)
Discrete Fourier Transforms Fourier analysis : Fourier synthesis :
Impulse Response In this case, and we obtain the interpolant Trefethen (2000, p. 21)
Spectral Differentiation Differentiating the interpolant yields the differentiation matrix Trefethen (2000, p. 5)
Spectral Differentiation Spectral differentiation of rough and smooth functions Trefethen (2000, p. 22)
Wave Propagation Trefethen (2000, p. 26)
Chebyshev Spectral Method
Polynomial Interpolation ▪ When the boundary condition is non-periodic, algebraic polynomial interpolation is used instead of Fourier polynomials. ▪ Polynomial interpolation • Given a set of points • Find an interpolating polynomial of order n , given by • This leads to a linear system of equations whose solution is the polynomial coefficients { a i }.
Runge Phenomenon ▪ When a uniform grid of points is used for higher-order polynomial interpolation, large vibrations occur near the boundaries. ▪ This is known as the Runge phenomenon . Trefethen (2000, p. 44)
Chebyshev Nodes The Runge phenomenon can be avoided by using a clustered grid, e.g., Chebyshev nodes defined by Chebyshev nodes are projections of equispaced points on a unit circle onto x axis. Trefethen (2000, p. 43-44)
Chebyshev Nodes Chebyshev nodes are extreme points of Chebyshev polynomial.
Polynomial Interpolation “Given a function f on the interval [-1,1] and points , there is a unique interpolation polynomial of degree n with error where .” So we want to minimize the infinity norm of a monic polynomial g ( x ), i.e. http://en.wikipedia.org/wiki/Chebyshev_nodes
Why Chebyshev Nodes? Comparing the monic polynomials of uniform and Chebyshev nodes shows large errors near boundaries for uniform nodes. Trefethen (2000, p. 47)
Chebyshev Spectral Differentiation Using the Chebyshev grid, we obtain an interpolant p ( x ) whose derivatives are the approximation to the derivatives of a given function u ( x ). Chebyshev differentiation of Image source: Trefethen (2000, p. 56)
Chebyshev Differentiation Matrix Trefethen (2000, p. 53)
Linear Wave Propagation Program 20 Trefethen (2000, p. 84)
Nonlinear Wave Propagation Program 27: Solitary waves from KdV equation Trefethen (2000, p. 112)
Chebyshev-Fourier Spectral Method Radial : Chebyshev Angular: Fourier Trefethen (2000, p. 116, 123)
Chebyshev-Fourier Spectral Method Program 37: Fourier in x , Chebyshev in y Trefethen (2000, p. 144)
Reference ▪ Trefethen, L. N., 2000, Spectral Methods in MATLAB, SIAM.
Recommend
More recommend