1 / 29

The Spectral Method

The Spectral Method. Definition. where (e m ,e n )= δ m,n. e n = basis of a Hilbert space (.,.): scalar product in this space. In L 2 space. where f * : complex conjugate of f. Discretization: limit the sum to a finite number of terms.

Download Presentation

The Spectral Method

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Spectral Method

  2. Definition where (em,en)=δm,n en= basis of a Hilbert space (.,.): scalar product in this space In L2 space where f*: complex conjugate of f Discretization: limit the sum to a finite number of terms (consistent if the em’s are appropriately ordered)

  3. The Galerkin procedure H: linear space operator R: discretization error • Linear case • If em’s are eigenfunctions of H: Hem=λmem we assume R to be a function of the omitted em’s only therefore R is orthogonal to em (m ≤ M) (alternatively we minimize ||R||2) || 0 || || δm,n compute once and store analytical solution (no need to discretize in t)

  4. periodic boundary conditions One-dimensional linear advection equation • Analytical solution phase speed: γ=cte (rad/s) • Basis functions: Fourier functions eimλ (eigenfunctions of ∂/∂λ) ω being a real field ==> ω-m(t)= ωm*(t); we need to solve only for 0≤m ≤M • Galerkin procedure this is a system of 2M+1 equations (decoupled) for the (complex) ωn coefficients

  5. nγ/2π ωn(0) One-dimensional linear advection equation (2) • Exact solution - in physical space the same form as the analytical solution no dispersion due to the space discretization because the derivatives are computed analytically

  6. Calculation of the initial conditions • computation of ωm(0) given ω(λ,0) - Direct Fourier transform where Am: normalization factor - Inverse Fourier transform Bm: normalization factors • Discrete Fourier transforms Procedure: Fast Fourier Transform (FFT) algorithm - Direct : - Inverse : Transformations are exact if K2M+1 Products of two functions have no aliassing if K3M+1

  7. The linear grid 3M+1 points in λ ensure no aliassing in computations of quadratic terms (case of Eulerian advection) Quadratic grid Unfitted function Fitted with quadratic grid 2M+1 points in λ ensure exact transforms of linear terms to grid-point and back Linear grid Fitted with linear grid

  8. Stability analysis no need to discretize in time if we do not have other terms in the equation • Leapfrog scheme Substituting and dividing by W(n-1) conditionally stable and neutral U0=Rγ M~N/2 Δx=2πR/N - Comparison with finite differences if using the quadratic grid M~N/3 ---->

  9. Graphical representation

  10. Non-linear advection equation = there are more wavenumbers on the r.h.s. than in the original function Galerkin procedure k=0 …. M therefore Fm m>M are not used but no aliassing produced because of misrepresentation

  11. Non-linear advection equation (cont) Calculation of Fk • Interaction coefficients Ijnk ---> interaction coeff. matrix I is not a sparse matrix • Transform method f(λl); l=1, … L I. FFT g(λl); l=1, … L I. FFT F(λl) = - f(λl)•g(λl) D. FFT can be shown to have no aliassing if L  3M+1

  12. One-dimensional gravity-wave equations • Galerkin procedure no need to discretize in time

  13. One-dimensional gravity-wave equations (cont) • Explicit time stepping (leapfrog) no need to transform to grid-point space • Stability and dispersion (von Neumann method) assume substituting: smaller than with finite differences dispersion due solely to the time discretization

  14. One-dimensional gravity-wave equations (cont) • Implicit time stepping substituting Decoupled set of equations because the basis functions eimλare eigenfunctions of the space operator ∂/ ∂λ with eigenvalues im • Stability and dispersion using von Neumann we get stable dispersion larger than in leapfrog scheme

  15. Shallow water equations Linearize about a basic state U0, V0, Φ0 and assume f=cte=f0 (f-plane approx) substitute and neglect products of perturbations

  16. Stability according to von Neumann Leapfrog (explicit) time scheme and substitute assume

  17. Leapfrog (explicit) time scheme stability (cont) or, calling where

  18. Leapfrog (explicit) time scheme stability (cont) calling this system has non-trivial solutions if for α to have a real solution which gives The most restrictive case is when

  19. Semi-implicit time scheme stability Following the same steps as in the explicit scheme we arrive at: therefore if

  20. Spherical harmonics Orthogonal basis for spherical geometry m: zonal wavenumber n: total wavenumber λ= longitude μ= sin(θ) θ: latitude Pnm: Associated Legendre functions of the first kind

  21. Spectral representation n-|m|: effective meridional wavenumber spectral transform Since X is a real field, Xn-m=(Xnm)* • Fourier coefficients direct Fourier transform or inverse Legendre transform

  22. Some spherical harmonics (n=5)

  23. Spherical harmonics (cont) • Properties of the spherical harmonics eigenfunctions of the operator ∂/ ∂λ eigenfunctions of the laplacian operator semi-implicit method leads to a decoupled set of equations latitudinal derivatives easy to compute although the spherical harmonics are not eigenfunctions of the latitudinal derivative operator

  24. Spherical harmonics (cont.) • Usual truncations N=min(|m|+J, K) pentagonal truncation M=J=K triangular K=J+M rhomboidal K=J>M trapezoidal n n K=J=M K J M m m pentagonal triangular M n K n K=J J M M m m rhomboidal trapezoidal

  25. Gaussian grid Use of the transform method for non-linear terms • Integrals with respect to λ ---> 3M+1 points equally spaced in λ • Integrals with respect to μ computed exactly by means of Gaussian quadrature using the values at the points where Gaussian latitudes In triangular truncation NG  (3N+1)/2 Gaussian latitudes are approximately equally spaced same spacing as for λ

  26. The reduced Gaussian grid • Triangular truncation is isotropic • Associated Legendre functions are very small when m is large and |μ| near 1 Full grid Reduced grid

  27. The linear Gaussian grid

  28. Two resolutions using the same Gaussian grid T213 orography TL319 orography

  29. Diffusion very simple to apply •Stability - Leapfrog physical solution 0≤λ≤1 stable computational solution λ≤-1 unstable - Forward - Backward (implicit) decoupled system of equations 0≤λ≤1 Stable

More Related