The Spectral-Element Method: Introduction

Similar documents
The Pseudospectral Method

seismic wave propagation through spherical sections including anisotropy and visco-elastic dissipation 3D heterogeneities of all Earth model

The Pseudospectral Method

Method in 1D. Introduction of the Basic Concepts and Comparison to Optimal FD Operators

Spectral Elements. Introduction recalling the elastic wave equation

A High-Order Galerkin Solver for the Poisson Problem on the Surface of the Cubed Sphere

The Finite Difference Method

The Spectral Element Method for Seismic Wave Propagation

THE SPECTRAL ELEMENT METHOD (SEM): FORMULATION AND IMPLEMENTATION OF THE METHOD FOR ENGINEERING SEISMOLOGY PROBLEMS

Scientific Computing I

Spectral Element Methods (SEM) May 12, D Wave Equations (Strong and Weak form)

Lehrstuhl Informatik V. Lehrstuhl Informatik V. 1. solve weak form of PDE to reduce regularity properties. Lehrstuhl Informatik V

Wave propagation near a fluid-solid interface: A spectral-element approach

256 Summary. D n f(x j ) = f j+n f j n 2n x. j n=1. α m n = 2( 1) n (m!) 2 (m n)!(m + n)!. PPW = 2π k x 2 N + 1. i=0?d i,j. N/2} N + 1-dim.

Simulation of anisotropic wave propagation based upon a spectral element method

Elements of Continuum Elasticity. David M. Parks Mechanics and Materials II February 25, 2004

SPECTRAL METHODS ON ARBITRARY GRIDS. Mark H. Carpenter. Research Scientist. Aerodynamic and Acoustic Methods Branch. NASA Langley Research Center

JEPPIAAR ENGINEERING COLLEGE

An Empirical Chaos Expansion Method for Uncertainty Quantification

Spectral-Element Analysis in Seismology

Introduction to Finite Element Method

Spectral Representation of Random Processes

Workshop on Geophysical Data Analysis and Assimilation

WRT in 2D: Poisson Example

A MODIFIED DECOUPLED SCALED BOUNDARY-FINITE ELEMENT METHOD FOR MODELING 2D IN-PLANE-MOTION TRANSIENT ELASTODYNAMIC PROBLEMS IN SEMI-INFINITE MEDIA

8 A pseudo-spectral solution to the Stokes Problem

Fast Sparse Spectral Methods for Higher Dimensional PDEs

Matrix assembly by low rank tensor approximation

PART IV Spectral Methods

Numerical Methods I Orthogonal Polynomials

Computational Seismology: An Introduction

A High Order Conservative Semi-Lagrangian Discontinuous Galerkin Method for Two-Dimensional Transport Simulations

Overlapping Schwarz preconditioners for Fekete spectral elements

MA2501 Numerical Methods Spring 2015

Efficient hp-finite elements

Energy Preserving Numerical Integration Methods

Algorithms for Scientific Computing

Computational Seismology: A Practical Introduction. Heiner Igel Computational Seismology 1 / 18

Pseudospectral and High-Order Time-Domain Forward Solvers

Lecture notes: GE 263 Computational Geophysics The spectral element method

Modelling mechanical systems with nite elements

School on spectral methods,

Free Vibration Analysis of Kirchoff Plates with Damaged Boundaries by the Chebyshev Collocation Method. Eric A. Butcher and Ma en Sari

Solving the steady state diffusion equation with uncertainty Final Presentation

Spectral-Element and Adjoint Methods in Seismology

Multistage Methods I: Runge-Kutta Methods

CIV-E1060 Engineering Computation and Simulation Examination, December 12, 2017 / Niiranen

ON THE BENEFIT OF THE SUMMATION-BY-PARTS PROPERTY ON INTERIOR NODAL SETS

Numerical Analysis Comprehensive Exam Questions

STABLE SPECTRAL METHODS ON TETRAHEDRAL ELEMENTS

Well-balanced DG scheme for Euler equations with gravity

Stochastic Spectral Approaches to Bayesian Inference

Non-Conforming Finite Element Methods for Nonmatching Grids in Three Dimensions

Preface. 2 Linear Equations and Eigenvalue Problem 22

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by

SPECTRAL METHODS: ORTHOGONAL POLYNOMIALS

Lectures 9-10: Polynomial and piecewise polynomial interpolation

Geophysical Journal International

Fast Numerical Methods for Stochastic Computations

Introduction. J.M. Burgers Center Graduate Course CFD I January Least-Squares Spectral Element Methods

LECTURE 16 GAUSS QUADRATURE In general for Newton-Cotes (equispaced interpolation points/ data points/ integration points/ nodes).

AProofoftheStabilityoftheSpectral Difference Method For All Orders of Accuracy

which arises when we compute the orthogonal projection of a vector y in a subspace with an orthogonal basis. Hence assume that P y = A ij = x j, x i

LEAST-SQUARES FINITE ELEMENT MODELS

Implementation of the dg method

AN ALTERNATIVE TECHNIQUE FOR TANGENTIAL STRESS CALCULATION IN DISCONTINUOUS BOUNDARY ELEMENTS

Section 6.6 Gaussian Quadrature

Chapter 1: The Finite Element Method

A new class of highly accurate differentiation schemes based on the prolate spheroidal wave functions

Part IV: Numerical schemes for the phase-filed model

Numerical Methods in Geophysics. Introduction

Well-balanced DG scheme for Euler equations with gravity

Numerical Analysis and Methods for PDE I

K. BLACK To avoid these diculties, Boyd has proposed a method that proceeds by mapping a semi-innite interval to a nite interval [2]. The method is co

International Journal of Advanced Engineering Technology E-ISSN

A Nodal High-Order Discontinuous Galerkin Dynamical Core for Climate Simulations

Introduction to Uncertainty Quantification in Computational Science Handout #3

Spectral Element simulation of rupture dynamics

Vector, Matrix, and Tensor Derivatives

Kasetsart University Workshop. Multigrid methods: An introduction

Fourier Spectral Computing for PDEs on the Sphere

Elastic Wave Theory. LeRoy Dorman Room 436 Ritter Hall Tel: Based on notes by C. R. Bentley. Version 1.

Appendix C: Recapitulation of Numerical schemes

Introduction to Spectral Element Methods

Weight-adjusted DG methods for elastic wave propagation in arbitrary heterogeneous media

arxiv:gr-qc/ v1 6 Sep 2006

A Study on Numerical Solution to the Incompressible Navier-Stokes Equation

Interpolation and function representation with grids in stochastic control

An Accurate Fourier-Spectral Solver for Variable Coefficient Elliptic Equations

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

Wave Equations Explicit Formulas In this lecture we derive the representation formulas for the wave equation in the whole space:

Time-dependent variational forms

MA8502 Numerical solution of partial differential equations. The Poisson problem: Mixed Dirichlet/Neumann boundary conditions along curved boundaries

A Gauss Lobatto quadrature method for solving optimal control problems

INFINITE ELEMENT METHODS FOR HELMHOLTZ EQUATION PROBLEMS ON UNBOUNDED DOMAINS

Chapter 17. Finite Volume Method The partial differential equation

Chapter 2 Finite Element Formulations

Numerical Integration in Meshfree Methods

The Finite Element Method for the Wave Equation

Efficient Solvers for Stochastic Finite Element Saddle Point Problems

Transcription:

The Spectral-Element Method: Introduction Heiner Igel Department of Earth and Environmental Sciences Ludwig-Maximilians-University Munich Computational Seismology 1 / 59

Outline 1 Introduction 2 Lagrange Interpolation 3 Numerical Integration: The Gauss-Lobatto-Legendre Approach 4 Weak Form of the Elastic Equation 5 Getting Down to the Element Level 6 Global Assembly and Solution Computational Seismology 2 / 59

Introduction Motivation High accuracy for wave propagation problems (exact interpolation) Flexibility with Earth model geometries (cubed sphere, curved elements) Accurate implementation of boundary conditions (implicit) Efficient parallelization possible (explicit time integration) Computational Seismology 3 / 59

Introduction History Originated in fluid dynamics (Patera, 1984, Maday and Patera, 1989) First applications to seismic wave propagation by Priolo, Carcione and Seriani, 1994) Initial concepts around Chebyshev polynomials (Faccioli, Maggio, Quarteroni and Tagliani, 1996) Use of Lagrange polynomials (diagonal mass matrix) by Komatitsch and Vilotte (1998) Application to spherical geometry using the cubed sphere concept (Chaljub and Vilotte, 2004) Global wave simulations using axisymmetry (Nissen-Meyer et al. (2007) Spectral elements in spherical coordinates by Fichtner et al. (2009) Community code "specfem" widely used for simulaton and inversion (e.g., Peter et al. 2011). After 2017 Salvus revolutionizes computational seismology Computational Seismology 4 / 59

Introduction History Originated in fluid dynamics (Patera, 1984, Maday and Patera, 1989) First applications to seismic wave propagation by Priolo, Carcione and Seriani, 1994) Initial concepts around Chebyshev polynomials (Faccioli, Maggio, Quarteroni and Tagliani, 1996) Use of Lagrange polynomials (diagonal mass matrix) by Komatitsch and Vilotte (1998) Application to spherical geometry using the cubed sphere concept (Chaljub and Vilotte, 2004) Global wave simulations using axisymmetry (Nissen-Meyer et al. (2007) Spectral elements in spherical coordinates by Fichtner et al. (2009) Community code "specfem" widely used for simulaton and inversion (e.g., Peter et al. 2011). After 2017 Salvus revolutionizes computational seismology Computational Seismology 4 / 59

Introduction History Originated in fluid dynamics (Patera, 1984, Maday and Patera, 1989) First applications to seismic wave propagation by Priolo, Carcione and Seriani, 1994) Initial concepts around Chebyshev polynomials (Faccioli, Maggio, Quarteroni and Tagliani, 1996) Use of Lagrange polynomials (diagonal mass matrix) by Komatitsch and Vilotte (1998) Application to spherical geometry using the cubed sphere concept (Chaljub and Vilotte, 2004) Global wave simulations using axisymmetry (Nissen-Meyer et al. (2007) Spectral elements in spherical coordinates by Fichtner et al. (2009) Community code "specfem" widely used for simulaton and inversion (e.g., Peter et al. 2011). After 2017 Salvus revolutionizes computational seismology Computational Seismology 4 / 59

Introduction History Originated in fluid dynamics (Patera, 1984, Maday and Patera, 1989) First applications to seismic wave propagation by Priolo, Carcione and Seriani, 1994) Initial concepts around Chebyshev polynomials (Faccioli, Maggio, Quarteroni and Tagliani, 1996) Use of Lagrange polynomials (diagonal mass matrix) by Komatitsch and Vilotte (1998) Application to spherical geometry using the cubed sphere concept (Chaljub and Vilotte, 2004) Global wave simulations using axisymmetry (Nissen-Meyer et al. (2007) Spectral elements in spherical coordinates by Fichtner et al. (2009) Community code "specfem" widely used for simulaton and inversion (e.g., Peter et al. 2011). After 2017 Salvus revolutionizes computational seismology Computational Seismology 4 / 59

Introduction History Originated in fluid dynamics (Patera, 1984, Maday and Patera, 1989) First applications to seismic wave propagation by Priolo, Carcione and Seriani, 1994) Initial concepts around Chebyshev polynomials (Faccioli, Maggio, Quarteroni and Tagliani, 1996) Use of Lagrange polynomials (diagonal mass matrix) by Komatitsch and Vilotte (1998) Application to spherical geometry using the cubed sphere concept (Chaljub and Vilotte, 2004) Global wave simulations using axisymmetry (Nissen-Meyer et al. (2007) Spectral elements in spherical coordinates by Fichtner et al. (2009) Community code "specfem" widely used for simulaton and inversion (e.g., Peter et al. 2011). After 2017 Salvus revolutionizes computational seismology Computational Seismology 4 / 59

Introduction History Originated in fluid dynamics (Patera, 1984, Maday and Patera, 1989) First applications to seismic wave propagation by Priolo, Carcione and Seriani, 1994) Initial concepts around Chebyshev polynomials (Faccioli, Maggio, Quarteroni and Tagliani, 1996) Use of Lagrange polynomials (diagonal mass matrix) by Komatitsch and Vilotte (1998) Application to spherical geometry using the cubed sphere concept (Chaljub and Vilotte, 2004) Global wave simulations using axisymmetry (Nissen-Meyer et al. (2007) Spectral elements in spherical coordinates by Fichtner et al. (2009) Community code "specfem" widely used for simulaton and inversion (e.g., Peter et al. 2011). After 2017 Salvus revolutionizes computational seismology Computational Seismology 4 / 59

Introduction History Originated in fluid dynamics (Patera, 1984, Maday and Patera, 1989) First applications to seismic wave propagation by Priolo, Carcione and Seriani, 1994) Initial concepts around Chebyshev polynomials (Faccioli, Maggio, Quarteroni and Tagliani, 1996) Use of Lagrange polynomials (diagonal mass matrix) by Komatitsch and Vilotte (1998) Application to spherical geometry using the cubed sphere concept (Chaljub and Vilotte, 2004) Global wave simulations using axisymmetry (Nissen-Meyer et al. (2007) Spectral elements in spherical coordinates by Fichtner et al. (2009) Community code "specfem" widely used for simulaton and inversion (e.g., Peter et al. 2011). After 2017 Salvus revolutionizes computational seismology Computational Seismology 4 / 59

Introduction History Originated in fluid dynamics (Patera, 1984, Maday and Patera, 1989) First applications to seismic wave propagation by Priolo, Carcione and Seriani, 1994) Initial concepts around Chebyshev polynomials (Faccioli, Maggio, Quarteroni and Tagliani, 1996) Use of Lagrange polynomials (diagonal mass matrix) by Komatitsch and Vilotte (1998) Application to spherical geometry using the cubed sphere concept (Chaljub and Vilotte, 2004) Global wave simulations using axisymmetry (Nissen-Meyer et al. (2007) Spectral elements in spherical coordinates by Fichtner et al. (2009) Community code "specfem" widely used for simulaton and inversion (e.g., Peter et al. 2011). After 2017 Salvus revolutionizes computational seismology Computational Seismology 4 / 59

Introduction History Originated in fluid dynamics (Patera, 1984, Maday and Patera, 1989) First applications to seismic wave propagation by Priolo, Carcione and Seriani, 1994) Initial concepts around Chebyshev polynomials (Faccioli, Maggio, Quarteroni and Tagliani, 1996) Use of Lagrange polynomials (diagonal mass matrix) by Komatitsch and Vilotte (1998) Application to spherical geometry using the cubed sphere concept (Chaljub and Vilotte, 2004) Global wave simulations using axisymmetry (Nissen-Meyer et al. (2007) Spectral elements in spherical coordinates by Fichtner et al. (2009) Community code "specfem" widely used for simulaton and inversion (e.g., Peter et al. 2011). After 2017 Salvus revolutionizes computational seismology Computational Seismology 4 / 59

Introduction Spectral Elements in a Nutshell Ingredients: Exact interpolation with Lagrange polynomials Numerical Integration (Gauss-Lobatto-Legendre) Weak formulation of wave equation Time extrapolation using finite-differences Computational Seismology 5 / 59

Introduction Elastic wave propagation 1-D elastic wave equation ρ(x)ü(x, t) = x [µ(x) x u(x, t)] + f (x, t) u displacement f external force ρ mass density µ shear modulus Computational Seismology 6 / 59

Introduction Boundary condition traction-free surface σ ij n j = 0 σ ij symmetric stress tensor µ x u(x, t) x=0,l = 0 boundaries are at x = 0, L Computational Seismology 7 / 59

Lagrange Interpolation Discretizing the wave field The approximate displacement field u(x, t) u(x, t) = n u i (t) ψ i (x). i=1 Discretization of space introduced with this step Specific basis function not yet specified In principle basis functions defined on entire domain (-> PS method) Locality of basis functions lead to finite-element type method Computational Seismology 8 / 59

Local basis functions Lagrange Interpolation 3 elements (length 2) Local basis functions defined inside element only Linear basis function (dashed) Lagrange basis function (solid) Computational Seismology 9 / 59

Lagrange Interpolation Lagrange polynomials Remember we seek to approximate u(x, t) by a sum over space-dependent basis functions ψ i weighted by time-dependent coefficients u i (t). u(x, t) u(x, t) = n u i (t) ψ i (x) i=1 Our final choice: Lagrange polynomials: ψ i l (N) i := N+1 k=1, k i ξ ξ k ξ i ξ k, i = 1, 2,..., N + 1 where x i are fixed points in the interval [ 1, 1]. Computational Seismology 10 / 59

Lagrange Interpolation Orthogonality of Lagrange polynomials l (N) i (ξ j ) = δ ij They fulfill the condition that they exactly interpolate (or approximate) the function at N+1 collocation points. Compare with discrete Fourier series on regular grids or Chebyshev polynomials on appropriate grid points (-> pseudospectral method). Computational Seismology 11 / 59

Lagrange Interpolation Lagrange polynomials graphically Top: Family of N +1 Lagrange polynomials for N = 2 defined in the interval ξ [ 1, 1]. Note their maximum value in the whole interval does not exceed unity. Bottom: Same for N = 6. The domain is divided into N intervals of uneven length. When using Lagrange polynomials for function interpolation the values are exactly recovered at the collocation points (squares). Computational Seismology 12 / 59

Lagrange Interpolation Gauss-Lobatto-Legendre points Illustration of the spatial distribution of Gauss-Lobatto-Legendre points in the interval [-1,1] from top to bottom for polynomial order 2 to 12 (from left to right). Note the increasing difference of largest to smallest interval between collocation points! Consequences? Computational Seismology 13 / 59

Lagrange Interpolation Lagrange polynomials: some properties Mathematically the collocation property is expressed as l (N) i (ξ i ) = 1 and l (N) i (ξ i ) = 0 where the dot denotes a spatial derivative. The fact that l (N) i (ξ) 1, ξ [ 1, 1] minimizes the interpolation error in between the collocation points due to numerical inaccuracies. Computational Seismology 14 / 59

Lagrange Interpolation Function approximation This is the final mathematical description of the unknown field u(x, t) for the spectral-element method based on Lagrange polynomials. u e (ξ) = N+1 i=1 u e (ξ i )l i (ξ) Other options at this point are the Chebyhev polynomials. They have equally good approximation properties (but...) Computational Seismology 15 / 59

Lagrange Interpolation Interpolation with Lagrange Polynomials The function to be approximated is given by the solid lines. The approximation is given by the dashed line exactly interpolating the function at the GLL points (squares). Top: Order N = 2 with three grid points. Bottom: Order N = 6 with seven grid points. Computational Seismology 16 / 59

Lagrange Interpolation Exercise: Lagrange Interpolation Visualize Lagrange polynomials Interpolate arbitrary function using Lagrange polynomials Understand benefit of GLL points (Runge phenomenon) Computational Seismology 17 / 59

Numerical Integration: The Gauss-Lobatto-Legendre Approach Integration scheme for an arbitrary function f (x) 1 1 f (x)dx 1 1 P N (x)dx = defined in the interval x [ 1, 1] with N+1 i=1 w i f (x i ) P N (x) = N+1 i=1 f (x i )l (N) i (x) w i = 1 1 l (N) i (x)dx. Computational Seismology 18 / 59

Numerical Integration: The Gauss-Lobatto-Legendre Approach Collocation points and integration weights N ξ i w i 2: 0 4/3 ± 1 1/3 3: ± 1/5 5/6 ± 1 1/6 4: 0 32/45 ± 3/7 49/90 ± 1 1/10 Collocation points and integration weights of the Gauss-Lobatto-Legendre quadrature for order N = 2,..., 4. Computational Seismology 19 / 59

Numerical Integration: The Gauss-Lobatto-Legendre Approach Numerical integration scheme Exact function (thick solid line) Approximation by Lagrange polynomials (thin solid line) Difference between true and approximate function (light gray) Computational Seismology 20 / 59

Numerical Integration: The Gauss-Lobatto-Legendre Approach Exercise: Numerical integration Appreciate simple GLL quadrature rule Numerically integrate arbitrary function Understand that this is one source of error in SEM Computational Seismology 21 / 59

Weak Form of the Elastic Equation Weak Form of the Elastic Equation Computational Seismology 22 / 59

Galerkin Principle Weak Form of the Elastic Equation The underlying principle of the finite-element method Developed in context with structural engineering (Boris Galerkin, 1871-1945) Also developed by Walther Ritz (1909) - variational principle Conversion of a continuous operator problem (such as a differential equation) to a discrete problem Constraints on a finite set of basis functions Computational Seismology 23 / 59

Weak Form of the Elastic Equation Weak Formulations Multiplication of pde with test function w(x) on both sides. G is here the complete computational domain defined with x G = [0, L]. w ρ ü dx w x (µ x u) dx = w f dx G G G Computational Seismology 24 / 59

Weak Form of the Elastic Equation Integration by parts G w ρ ü dx + µ x w x u dx = G G where we made use of the boundary condition w f dx x u(x, t) x=0 = x u(x, t) x=l = 0 Computational Seismology 25 / 59

Weak Form of the Elastic Equation The approximate displacement field u(x, t) u(x, t) = n u i (t) ψ i (x). i=1 Discretization of space introduced with this step Specific basis function not yet specified In principle basis functions defined on entire domain (-> PS method) Locality of basis functions lead to finite-element type method Computational Seismology 26 / 59

Weak Form of the Elastic Equation Global system after discretization Use approximation of u in weak form and (!) use the same basis function as test function, w ψ i ψ i ρüdx + µ x ψ i x udx = ψ i f dx G G G with the requirement that the medium is at rest a t=0. Computational Seismology 27 / 59

Weak Form of the Elastic Equation Including the function approximation for u(x, t)... leads to an equation for the unknown coefficients u i (t) + n i=1 n i=1 = G [ ü i (t) [ u i (t) ψ i f (x, t) dx ] ρ(x) ψ j (x) ψ i (x) dx G e ] µ(x) x ψ j (x) x ψ i (x) dx G e for all basis functions ψ j with j = 1,..., n. This is the classical algebro-differential equation for finite-element type problems. Computational Seismology 28 / 59

Matrix notation Weak Form of the Elastic Equation This system of equations with the coefficients of the basis functions (meaning?!) as unknowns can be written in matrix notation M ü(t) + K u(t) = f(t) M Mass matrix K Stiffness matrix terminology originates from structural engineering problems Computational Seismology 29 / 59

Weak Form of the Elastic Equation Matrix system graphically The figure gives an actual graphical representation of the matrices for our 1D problem. The unknown vector of coefficients u is found by a simple finite-difference procedure. The solution requires the inversion of mass matrix M which is trivial as it is diagonal. That is the key feature of the spectral element method. Computational Seismology 30 / 59

Weak Form of the Elastic Equation Mass and stiffness matrix Definition of the - at this point - global mass matrix M ji = ρ(x) ψ j (x) ψ i (x) dx G and the stiffness matrix K ji = G µ(x) x ψ j (x) x ψ i (x) dx and the vector containing the volumetric forces f (x, t) f j (t) = ψ i f (x, t) dx. G Computational Seismology 31 / 59

Weak Form of the Elastic Equation Mapping A simple centred finite-difference approximation of the 2nd derivative and the following mapping u new u(t + dt) u u(t) u old u(t dt) leads us to the solution for the coefficient vector u(t + dt) for the next time step as already well known from the other solution schemes in previous schemes. Computational Seismology 32 / 59

Solution scheme Weak Form of the Elastic Equation [ ] u new = dt 2 M 1 (f K u) + 2u u old General solution scheme for finite-element method (wave propagation) Independent of choice of basis functions Mass matrix needs to be inverted! To Do: good choice of basis function, integration scheme for calculation of M and K Computational Seismology 33 / 59

Getting Down to the Element Level Getting Down to the Element Level Computational Seismology 34 / 59

Element level Getting Down to the Element Level In order to facilitate the calculation of the space-dependent integrals we transform each element onto the standard interval [-1,1], illustrated here for n e = 3 elements. The elements share the boundary points. Computational Seismology 35 / 59

Getting Down to the Element Level System at element level + n n e ü i (t) i=1 e=1 G e n n e u i (t) i=1 n e = e=1 e=1 G e G e ψ j (x)f (x, t)dx. ρ(x)ψ j (x)ψ i (x)dx µ(x) x ψ j (x) x ψ i (x)dx Because of the sum over n e there is a global dependence of the coefficients. How can we avoid this? Computational Seismology 36 / 59

Getting Down to the Element Level Local basis functions Illustration of local basis functions. By defining basis functions only inside elements the integrals can be evaluated in a local coordinate system. The graph assumes three elements of length two. A finite-element type linear basis function (dashed line) is shown along side a spectral-element type Lagrange polynomial basis function of degree N=5 (solid line). Computational Seismology 37 / 59

u inside element Getting Down to the Element Level u(x, t) x Ge = n ui e (t)ψi e (x) i=1 Now we can proceed with all calculations locally in G e (inside one element) Here is the difference to pseudospectral methods Sum is now over all basis functions inside one element (n turns out to be the order of the polynomial scheme) Computational Seismology 38 / 59

Getting Down to the Element Level Local system of equations + n i=1 üi e (t) G e n ui e (t) i=1 = G e G e ψ e j (x)f (x, t)dx. ρ(x)ψ e j (x)ψ e i (x)dx µ(x) x ψ e j (x) x ψ e i (x)dx Computational Seismology 39 / 59

Getting Down to the Element Level Matrix notation for local system M e ü e (t) + K e u e (t) = f e (t), e = 1,..., n e Here u e, K e, M e, and f e are the coefficients of the unknown displacement inside the element, stiffness and mass matrices with information on the density and stiffnesses, and the forces, respectively. Computational Seismology 40 / 59

Getting Down to the Element Level Coordinate transformation F e : [ 1, 1] G e, x = F e (ξ), ξ = ξ(x) = F 1 e (ξ), e = 1,..., n e from our global system x G to our local coordinates that we denote ξ F e (ξ + 1) x(ξ) = F e (ξ) = h e + x e 2 where n e is the number of elements, and ξ [ 1, 1]. Thus the physical coordinate x can be related to the local coordinate ξ via ξ(x) = 2(x x e) h e 1 Computational Seismology 41 / 59

Getting Down to the Element Level Integration of arbitrary function G e f (x)dx = 1 1 f e (ξ) dx dξ dξ the integrand has to be multiplied by the Jabobian J before integration. J = dx dξ = h e 2. we will also need J 1 = dξ dx = 2 h e. Computational Seismology 42 / 59

Getting Down to the Element Level Skewed 3D elements In 3D elements might be skewed and have curved boundaries. The calculation of the Jacobian is then carried out analytically by means of shape functions. Computational Seismology 43 / 59

Getting Down to the Element Level Assembly of system of equations + n i=1 n i=1 1 = 1 1 üi e (t) 1 1 ui e (t) 1 ρ [x(ξ)] ψ e j [x(ξ)] ψ e i [x(ξ)] dx dξ dξ µ [x(ξ)] dψe j [x(ξ)] dψi e [x(ξ)] dξ dξ ψ e j [x(ξ)] f [(x(ξ)), t] dx dξ dξ. ( ) dξ 2 dx dx dξ dξ System of n equations for each index j corresponding to one particular basis function. We need to find basis functions that allows efficient and accurate calculation of the required integrals. Computational Seismology 44 / 59

Getting Down to the Element Level Spectral-element system with basis functions Including the Legendre polynomials in our local (element-based) system leads to + N+1 i=1 N+1 i,k=1 1 = 1 1 üi e (t) 1 1 ui e (t) 1 l j (ξ)f (ξ, t) dx dξ dξ ρ(ξ)l j (ξ)l i (ξ) dx dξ dξ µ(ξ) l j (ξ) l i (ξ) ( ) dξ 2 dx dx dξ dξ Because we want that ρ, µ, and f vary inside one element there is no way out carrying out the integration numerically. Computational Seismology 45 / 59

Getting Down to the Element Level With the numerical integration scheme we obtain N+1 üi e (t)w k ρ(ξ)l j (ξ)l i (ξ) dx dξ i,k=1 ξ=ξk N+1 ( ) dξ 2 + w k ui e dx (t)µ(ξ)l j (ξ)l i (ξ) dx dξ i,k=1 N+1 w k l j (ξ)f (ξ, t) dx dξ i,k=1 ξ=ξk ξ=ξk What is still missing is a formulation for the derivative of the Lagrange polynomials at the collocation points. But: Major progress! We have replaced the integrals by sums! Computational Seismology 46 / 59

Getting Down to the Element Level Solution equation for our spectral-element system at the element level N+1 i=1 N+1 Mji e üe i (t) + i=1 K e ji ue i (t) = f e j (t), e = 1,..., n e with M e ji K e ji = f e j = w j ρ(ξ) dx dξ δ ij N+1 k=1 ξ=ξj w k µ(ξ)l j (ξ)l i (ξ) = w j f (ξ, t) dx dξ ξ=ξj ( dξ dx ) 2 dx dξ ξ=ξ k Computational Seismology 47 / 59

Getting Down to the Element Level Illustration of Legendre Polynomials The Legendre polynomials are used to calculate the first derivatives of the Legendre polynomials. They can also be used to calculate the integration weights of the GLL quadrature. l(ξ i ) = x u e (ξ) = N j=1 N+1 i=1 d (1) ij l(ξ j ) u e (ξ i ) l i (ξ) Computational Seismology 48 / 59

Global Assembly and Solution Global Assembly and Solution Computational Seismology 49 / 59

Global Assembly and Solution Global Assembly for the diagonal of the mass matrix M g = M (1) 1,1 M (1) 2,2 M (1) 3,3 + M (2) 1,1 M (2) 2,2 M (2) 3,3 + M (3) 1,1 M (3) 2,2 M (3) 3,3 = M (1) 1,1 M (1) 2,2 M (1) 3,3 + M(2) 1,1 M (2) 2,2 M (2) 3,3 + M(3) 1,1 M (3) 2,2 M (3) 3,3 Computational Seismology 50 / 59

Global Assembly and Solution Global Assembly for the diagonal of the stiffness matrix K g = K (1) 1,1 K (1) 1,2 K (1) 1,3 K (1) 2,1 K (1) 2,2 K (1) 2,3 0 K (1) 3,1 K (1) 3,2 K (1) 3,3 + K (2) 1,1 K (2) 1,2 K (2) 1,3 K (2) 2,1 K (2) 2,2 K (2) 2,3 K (2) 3,1 K (2) 3,2 K (2) 3,3 + K (3) 1,1 K (3) 1,2 K (3) 1,3 0 K (3) 2,1 K (3) 2,2 K (3) 2,3 K (2) 3,1 K (2) 3,2 K (2) 3,3 Computational Seismology 51 / 59

Global Assembly and Solution Vector with information on the source f g = f (1) 1 f (1) 2 f (1) 3 + f (2) 1 f (2) 2 f (2) 3 + f (3) 1 f (3) 2 f (3) 3 Computational Seismology 52 / 59

Global Assembly and Solution Global assembly graphically Stiffness Matrix Mass Matrix Computational Seismology 53 / 59

Global Assembly and Solution Extrapolation for time-dependent coefficients u g This is our final algorithm as it is implemented using Matlab or Python [ ] u g (t + dt) = dt 2 M 1 g (f g (t) K g u g (t)) + 2u g (t) u g (t dt) Looks fairly simple, no? Computational Seismology 54 / 59

Global Assembly and Solution Spectral elements: work flow A substantial part consists of preparing the interpolation and integration procedures required to initialize the global mass- and stiffness matrices. The final time-extrapolation is extremely compact and does not require the inversion of a global matrix as is the case in classic finite-element methods. Computational Seismology 55 / 59

Global Assembly and Solution Point source initialization Top: A point-source polynomial representation (solid line) of a δ-function (red bar). Bottom: A finite-source polynomial representation (solid line) as a superposition of point sources injected at some collocation points. For comparison with analytical solutions it is important to note that the spatial source function actually simulated is the polynomial representation of the (sum over) δ-function(s). Computational Seismology 56 / 59

Global Assembly and Solution Simulation examples: Varying order N Computational Seismology 57 / 59

Global Assembly and Solution Summary Geometrical flexibility as with finite-element method Spectral convergence of Lagrange basis functions (exact interpolation) Diagonal structure of the mass matrix (there is a price to pay!) No global system matrix inversion necessary Errors from numerical integration and time extrapolation The spectral-element method is particularly useful where free surface boundaries are important Applications in all domains of general and applied elastic wave propagation problems Computational Seismology 58 / 59

Global Assembly and Solution Exercise: 1D Elastic wave equation with spectral elements Calculation of local mass and stiffness matrices Global assembly of mass and stiffness matrices Time extrapolation scheme Influence of polynomial order on accuracy Computational Seismology 59 / 59