Spectral Methods Chaiwoot Boonyasiriwat April 10, 2019 Weighted - - PowerPoint PPT Presentation

spectral methods
SMART_READER_LITE
LIVE PREVIEW

Spectral Methods Chaiwoot Boonyasiriwat April 10, 2019 Weighted - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

Chaiwoot Boonyasiriwat

April 10, 2019

Spectral Methods

slide-2
SLIDE 2

▪ 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

  • rthogonal to the test functions k

Weighted Residual Methods

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

slide-3
SLIDE 3

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

slide-4
SLIDE 4

▪ “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)

slide-5
SLIDE 5

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

slide-6
SLIDE 6

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

slide-7
SLIDE 7

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

slide-8
SLIDE 8

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

slide-9
SLIDE 9

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

slide-10
SLIDE 10

▪ 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

  • r spectral convergence rate.

Spectral Method and FDM

slide-11
SLIDE 11

▪ 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

slide-12
SLIDE 12

▪ 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

slide-13
SLIDE 13

▪ 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

  • n irregular grids such as Chebyshev grid leading to the

Chebyshev spectral method.

Spectral Collocation Methods

slide-14
SLIDE 14

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

slide-15
SLIDE 15

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

slide-16
SLIDE 16

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

Aliasing

Trefethen (2000, p. 11)

slide-17
SLIDE 17

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

slide-18
SLIDE 18

Given the Kronecker delta function It can be shown that for and the corresponding interpolant is which is called the sinc function.

Sinc Interpolation

slide-19
SLIDE 19

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

slide-20
SLIDE 20

Sinc interpolation is accurate only for smooth function. The Gibbs phenomenon can be observed.

Trefethen (2000, p. 14)

Sinc Interpolation

slide-21
SLIDE 21

Given a periodic grid such that For simplicity, let N is even. So the grid spacing is

Periodic Grids

Trefethen (2000, p. 18)

slide-22
SLIDE 22

Fourier analysis: Fourier synthesis:

Discrete Fourier Transforms

slide-23
SLIDE 23

In this case, and we obtain the interpolant

Impulse Response

Trefethen (2000, p. 21)

slide-24
SLIDE 24

Differentiating the interpolant yields the differentiation matrix

Trefethen (2000, p. 5)

Spectral Differentiation

slide-25
SLIDE 25

Spectral differentiation of rough and smooth functions

Trefethen (2000, p. 22)

Spectral Differentiation

slide-26
SLIDE 26

Trefethen (2000, p. 26)

Wave Propagation

slide-27
SLIDE 27

Chebyshev Spectral Method

slide-28
SLIDE 28

▪ 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

slide-29
SLIDE 29

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

slide-30
SLIDE 30

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

  • nto x axis.
slide-31
SLIDE 31

Chebyshev nodes are extreme points of Chebyshev polynomial.

Chebyshev Nodes

slide-32
SLIDE 32

“Given a function f on the interval [-1,1] and points , there is a unique interpolation polynomial

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

slide-33
SLIDE 33

Comparing the monic polynomials of uniform and Chebyshev nodes shows large errors near boundaries for uniform nodes.

Why Chebyshev Nodes?

Trefethen (2000, p. 47)

slide-34
SLIDE 34

Using the Chebyshev grid, we obtain an interpolant p(x) whose derivatives are the approximation to the derivatives

  • f a given function u(x).

Chebyshev Spectral Differentiation

Image source: Trefethen (2000, p. 56)

Chebyshev differentiation of

slide-35
SLIDE 35

Chebyshev Differentiation Matrix

Trefethen (2000, p. 53)

slide-36
SLIDE 36

Program 20

Linear Wave Propagation

Trefethen (2000, p. 84)

slide-37
SLIDE 37

Program 27: Solitary waves from KdV equation

Nonlinear Wave Propagation

Trefethen (2000, p. 112)

slide-38
SLIDE 38

Radial : Chebyshev Angular: Fourier

Chebyshev-Fourier Spectral Method

Trefethen (2000, p. 116, 123)

slide-39
SLIDE 39

Program 37: Fourier in x, Chebyshev in y

Chebyshev-Fourier Spectral Method

Trefethen (2000, p. 144)

slide-40
SLIDE 40

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

Reference