Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 The Spectral Method. 2 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 * :

Similar presentations


Presentation on theme: "1 The Spectral Method. 2 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 * :"— Presentation transcript:

1 1 The Spectral Method

2 2 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 (consistent if the e m ’s are appropriately ordered)

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

4 4 One-dimensional linear advection equation periodic boundary conditions Analytical solution phase speed: γ=cte (rad/s) Basis functions: Fourier functions e imλ (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 5 One-dimensional linear advection equation (2) Exact solution ω n (0) nγ/2π - in physical space the same form as the analytical solution no dispersion due to the space discretization because the derivatives are computed analytically

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

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

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

9 9 Graphical representation

10 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 F m m>M are not used but no aliassing produced because of misrepresentation

11 11 Non-linear advection equation (cont) Calculation of F k Interaction coefficients I jnk ---> interaction coeff. matrix I is not a sparse matrix Transform method I. FFT f(λ l ); l=1, … L 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 12 One-dimensional gravity-wave equations Galerkin procedure no need to discretize in time

13 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 14 One-dimensional gravity-wave equations (cont) Implicit time stepping substituting Decoupled set of equations because the basis functions e imλ 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 15 Shallow water equations Linearize about a basic state U 0, V 0, Φ 0 and assume f=cte=f 0 (f-plane approx) substitute and neglect products of perturbations

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

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

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

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

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

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

22 22 Some spherical harmonics (n=5)

23 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 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 m n M m n M m n M m n M pentagonal triangular rhomboidaltrapezoidal K=J=M K K K=J J J

25 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 26 The reduced Gaussian grid Full gridReduced grid Triangular truncation is isotropic Associated Legendre functions are very small when m is large and |μ| near 1

27 27 The linear Gaussian grid

28 28 Two resolutions using the same Gaussian grid T213 orographyT L 319 orography

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


Download ppt "1 The Spectral Method. 2 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 * :"

Similar presentations


Ads by Google