0% found this document useful (0 votes)
82 views67 pages

The Spectral-Element Method: Introduction: Heiner Igel

The document discusses the spectral element method for seismic wave propagation simulations. It originated in fluid dynamics and was first applied to seismology in 1994. Key developments included the use of Lagrange polynomials in 1998 and applying the method to spherical geometries in 2004. The widely used community code SPECFEM solves the weak formulation of the elastic wave equation using spectral elements with exact interpolation, Gaussian numerical integration, and time stepping via finite differences. In 2017, the Salvus code revolutionized computational seismology.

Uploaded by

juka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views67 pages

The Spectral-Element Method: Introduction: Heiner Igel

The document discusses the spectral element method for seismic wave propagation simulations. It originated in fluid dynamics and was first applied to seismology in 1994. Key developments included the use of Lagrange polynomials in 1998 and applying the method to spherical geometries in 2004. The widely used community code SPECFEM solves the weak formulation of the elastic wave equation using spectral elements with exact interpolation, Gaussian numerical integration, and time stepping via finite differences. In 2017, the Salvus code revolutionized computational seismology.

Uploaded by

juka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 67

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 nj = 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


n
X
u(x, t) ≈ u(x, t) = ui (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
Lagrange Interpolation

Local basis functions

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 ui (t).
n
X
u(x, t) ≈ u(x, t) = ui (t) ψi (x)
i=1

Our final choice: Lagrange polynomials:


N+1
(N)
Y ξ − ξk
ψi → `i := , i = 1, 2, . . . , N + 1
ξi − ξk
k =1, k 6=i

where xi are fixed points in the interval [−1, 1].

Computational Seismology 10 / 59
Lagrange Interpolation

Orthogonality of Lagrange polynomials

(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 in-
terval does not exceed unity.
Bottom: Same for N = 6. The do-
main is divided into N intervals of uneven
length. When using Lagrange polynomi-
als 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


(N) (N)
`i (ξi ) = 1 and `˙i (ξi ) = 0

where the dot denotes a spatial derivative. The fact that


(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.
N+1
X
e
u (ξ) = u e (ξi )`i (ξ)
i=1

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 approxi-
mation is given by the dashed line ex-
actly 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)

Z1 Z1 N+1
X
f (x)dx ≈ PN (x)dx = wi f (xi )
−1 −1 i=1

defined in the interval x ∈ [−1, 1] with


N+1
(N)
X
PN (x) = f (xi )`i (x)
i=1

Z1
(N)
wi = `i (x)dx .
−1

Computational Seismology 18 / 59
Numerical Integration: The Gauss-Lobatto-Legendre Approach

Collocation points and integration weights

N ξi wi
2: 0 4/3
±1 1/3
p
3: ± 1/5 5/6
±1 1/6

4: 0p 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
Weak Form of the Elastic Equation

Galerkin Principle

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].
Z Z Z
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

Z Z Z
w ρ ü dx + µ ∂x w ∂x u dx = w f dx
G
G G

where we made use of the boundary condition

∂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


n
X
u(x, t) ≈ u(x, t) = ui (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
Z Z Z
ψ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 ui (t)


n 
X Z 
üi (t) ρ(x) ψj (x) ψi (x) dx
i=1 Ge

Xn  Z 
+ ui (t) µ(x) ∂x ψj (x) ∂x ψi (x) dx
Ge
Zi=1
= ψi f (x, t) dx
G

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
Weak Form of the Elastic Equation

Matrix notation

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
Z
Mji = ρ(x) ψj (x) ψi (x) dx
G

and the stiffness matrix


Z
Kji = µ(x) ∂x ψj (x) ∂x ψi (x) dx
G

and the vector containing the volumetric forces f (x, t)


Z
fj (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

unew → u(t + dt)


u → u(t)
uold → 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
Weak Form of the Elastic Equation

Solution scheme

h i
unew = dt 2 M−1 (f − K u) + 2u − uold

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
Getting Down to the Element Level

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 ne = 3 elements.
The elements share the boundary points.

Computational Seismology 35 / 59
Getting Down to the Element Level

System at element level

 
n
X ne Z
X
üi (t) ρ(x)ψj (x)ψi (x)dx 
 
i=1 e=1G
e
 
n
X ne Z
X
+ ui (t) µ(x)∂x ψj (x)∂x ψi (x)dx 
 
i=1 e=1G
e
ne Z
X
= ψj (x)f (x, t)dx .
e=1G
e

Because of the sum over ne 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
Getting Down to the Element Level

u inside element

n
X
u(x, t)|x∈Ge = uie (t)ψie (x)
i=1

Now we can proceed with all calculations locally in Ge (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
X Z
üie (t) ρ(x)ψje (x)ψie (x)dx
i=1 Ge
n
X Z
+ uie (t) µ(x)∂x ψje (x)∂x ψie (x)dx
i=1 Ge
Z
= ψje (x)f (x, t)dx .
Ge

Computational Seismology 39 / 59
Getting Down to the Element Level

Matrix notation for local system

Me · üe (t) + Ke · ue (t) = fe (t), e = 1, . . . , ne

Here ue , Ke , Me , and fe 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

Fe : [−1, 1] → Ge , x = Fe (ξ),
ξ = ξ(x) = Fe−1 (ξ), e = 1, . . . , ne
from our global system x ∈ G to our local coordinates that we denote
ξ ∈ Fe

(ξ + 1)
x(ξ) = Fe (ξ) = he + xe
2
where ne is the number of elements, and ξ ∈ [−1, 1]. Thus the physical
coordinate x can be related to the local coordinate ξ via

2(x − xe )
ξ(x) = −1
he

Computational Seismology 41 / 59
Getting Down to the Element Level

Integration of arbitrary function

Z Z1
dx
f (x)dx = f e (ξ) dξ

Ge −1

the integrand has to be multiplied by the Jabobian J before integration.

dx he
J = = .
dξ 2

we will also need


dξ 2
J −1 = = .
dx he

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 Z1
X dx
üie (t) ρ [x(ξ)] ψje [x(ξ)] ψie [x(ξ)] dξ

i=1 −1

n Z1 dψje [x(ξ)] dψie [x(ξ)]


 2
X dξ dx
+ uie (t) µ [x(ξ)] dξ
dξ dξ dx dξ
i=1 −1
Z1
dx
= ψje [x(ξ)] f [(x(ξ)), t] dξ .

−1

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 Z1
X dx
üie (t) ρ(ξ)`j (ξ)`i (ξ) dξ

i=1 −1

N+1 Z1  2
X dξ dx
+ uie (t) µ(ξ)`˙j (ξ)`˙i (ξ) dξ
dx dξ
i,k =1 −1
Z1
dx
= `j (ξ)f (ξ, t) dξ

−1

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
X
e dx
üi (t)wk ρ(ξ)`j (ξ)`i (ξ)

i,k =1 ξ=ξk

N+1  2
X dξ dx
+ wk uie (t)µ(ξ)`j (ξ)`i (ξ)
dx dξ
i,k =1 ξ=ξk

N+1
X dx
≈ wk `j (ξ)f (ξ, t)

i,k =1 ξ=ξ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
X N+1
X
Mjie üie (t) + Kjie uie (t) = fje (t), e = 1, . . . , ne
i=1 i=1

with

dx
Mjie = wj ρ(ξ) δij
dξ ξ=ξj

N+1  2
X dξ dx
Kjie = wk µ(ξ)`j (ξ)`i (ξ)
dx dξ

k =1 ξ=ξk

dx
fje = wj f (ξ, t)
dξ ξ=ξj

Computational Seismology 47 / 59
Getting Down to the Element Level

Illustration of Legendre Polynomials

The Legendre polynomials are


used to calculate the first deriva-
tives of the Legendre polynomials.
They can also be used to calculate
the integration weights of the GLL
quadrature.
N
(1)
X
˙ i) =
`(ξ d̃ij `(ξj )
j=1

N+1
X
∂x u e (ξ) = u e (ξi )`˙i (ξ)
i=1

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

 (1)

 (1)
     M1,1
M1,1  (1) 
 (1)       M2,2 
 M2,2  
  (2)
   
  (1) (2)

  M1,1   M3,3 + M1,1
   
(1)
M3,3
   
   (2)     (2)

Mg =  + M
  2,2
+
  (3)
= M2,2 
  M1,1
   
  (2)   (2) (3)
  M3,3   M3,3 + M1,1
 
   (3) 
     M   (3)

     2,2   M2,2 
(3)  
M3,3 (3)
M3,3

Computational Seismology 50 / 59
Global Assembly and Solution

Global Assembly for the diagonal of the stiffness


matrix

(1) (1) (1)


 
K1,1 K1,2 K1,3
(1) (1) (1)
K2,1 K2,2 K2,3 0
 
 
(1) (1) (1) (2) (2) (2)
 

 K3,1 K3,2 K3,3 + K1,1 K1,2 K1,3 

(2) (2) (2)
Kg =  K2,1 K2,2 K2,3
 

(2) (2) (2) (3) (3) (3)
 

 K3,1 K3,2 K3,3 + K1,1 K1,2 K1,3 

(3) (3) (3)
0 K2,1 K2,2 K2,3
 
 
(2) (2) (2)
K3,1 K3,2 K3,3

Computational Seismology 51 / 59
Global Assembly and Solution

Vector with information on the source

 
(1)
f1
 (1) 

 f2 

(1) (2)

 f3 + f1 

(2)
fg =  f2
 

(2) (3)
 

 f3 + f1 

(3)
f2
 
 
(3)
f3

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 ug

This is our final algorithm as it is implemented using Matlab or Python


h i
ug (t + dt) = dt 2 Mg −1 (fg (t) − Kg ug (t))
+ 2ug (t) − ug (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

You might also like