Top Banner
Chaiwoot Boonyasiriwat April 10, 2019 Spectral Methods
40

Spectral Methods · 2020. 11. 12. · •Legendre spectral method: •Laguerre spectral method: ... The truncated Fourier series can be expressed in the convolution form as ... Spectral

Feb 17, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • Chaiwoot Boonyasiriwat

    April 10, 2019

    Spectral 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

    Weighted Residual Methods

    Shen et al. (2011, p.1-2)

  • ▪ 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.

    Spectral Methods

    Shen et al. (2011, p.3)

  • ▪ “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 xj are

    collocation points.

    Spectral Methods

    Shen et al. (2011, p.3)

  • ▪ Consider the problem

    ▪ Let xj, 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 Lk are the Lagrange basis polynomials or nodal

    basis functions with

    Spectral Collocation Methods

    Shen et al. (2011, p.4)

  • ▪ Substituting into yields

    ▪ Assuming the Dirichlet boundary conditions

    ▪ We then obtain a linear system of N + 1 algebraic

    equations in N + 1 unknowns.

    Spectral Collocation Methods

    Shen et al. (2011, p.4)

  • ▪ The complex exponential are defined as

    where

    ▪ The set forms a complete orthogonal

    system in the complex Hilbert space L2(0,), equipped

    with the inner product and norm

    ▪ The orthogonality of Ek is

    Fourier Series

    Shen et al. (2011, p.23)

  • “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

    Fourier Series

    Shen et al. (2011, p.23)

  • “For any complex-valued function , its

    truncated

    converges to u in the L2 sense, and there holds the

    Parseval’s identity:

    The truncated Fourier series can be expressed in the

    convolution form as

    where Dirichlet kernel is

    Truncated Fourier Series

    Shen et al. (2011, p.25)

  • ▪ 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 FDM

  • ▪ 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.

    Spectral Method and FEM

  • ▪ 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.

    Types of Spectral Methods

  • ▪ Let p be a single function such that p( xj ) = uj for all j.

    ▪ Set wj = p'( xj )

    ▪ 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.

    Spectral Collocation Methods

  • Fourier analysis:

    The Fourier transform of a function u(x), x , is defined

    by

    Fourier synthesis:

    The function u(x) can be reconstructed by

    Fourier Transforms

  • 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

    Semidiscrete Fourier Transform

  • When , two complex exponentials

    have the same values as long as

    where m is an integer.

    Example: sin(x) and sin(9x) on the discrete grid

    Aliasing

    Trefethen (2000, p. 11)

  • An interpolant can be obtained by

    The Fourier transform is given by

    Spectral differentiation can be performed by

    differentiating the interpolant p(x) or

    Spectral Differentiation

  • 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)

    Sinc Interpolation

  • Given a periodic grid such that

    For simplicity, let N is even. So the grid spacing is

    Periodic Grids

    Trefethen (2000, p. 18)

  • Fourier analysis:

    Fourier synthesis:

    Discrete Fourier Transforms

  • In this case, and we obtain the interpolant

    Impulse Response

    Trefethen (2000, p. 21)

  • Differentiating the interpolant

    yields the differentiation matrix

    Trefethen (2000, p. 5)

    Spectral Differentiation

  • Spectral differentiation of rough and smooth functions

    Trefethen (2000, p. 22)

    Spectral Differentiation

  • Trefethen (2000, p. 26)

    Wave Propagation

  • Chebyshev Spectral

    Method

  • ▪ 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 {ai}.

    Polynomial Interpolation

  • ▪ 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.

    Runge Phenomenon

    Trefethen (2000, p. 44)

  • The Runge phenomenon can be avoided by using a

    clustered grid, e.g., Chebyshev nodes defined by

    Chebyshev Nodes

    Trefethen (2000, p. 43-44)

    Chebyshev nodes are projections of

    equispaced points on a unit circle

    onto x axis.

  • Chebyshev nodes are extreme points of Chebyshev

    polynomial.

    Chebyshev Nodes

  • “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.

    Polynomial Interpolation

    http://en.wikipedia.org/wiki/Chebyshev_nodes

  • Comparing the monic polynomials of uniform and

    Chebyshev nodes shows large errors near boundaries

    for uniform nodes.

    Why Chebyshev Nodes?

    Trefethen (2000, p. 47)

  • 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 Spectral Differentiation

    Image source: Trefethen (2000, p. 56)

    Chebyshev differentiation of

  • Chebyshev Differentiation Matrix

    Trefethen (2000, p. 53)

  • Program 20

    Linear Wave Propagation

    Trefethen (2000, p. 84)

  • Program 27: Solitary waves from KdV equation

    Nonlinear Wave Propagation

    Trefethen (2000, p. 112)

  • Radial : Chebyshev

    Angular: Fourier

    Chebyshev-Fourier Spectral Method

    Trefethen (2000, p. 116, 123)

  • Program 37: Fourier in x, Chebyshev in y

    Chebyshev-Fourier Spectral Method

    Trefethen (2000, p. 144)

  • ▪ Trefethen, L. N., 2000, Spectral Methods in MATLAB,

    SIAM.

    Reference