40
The The S S pectral pectral E E lement lement M M ethod ethod in 1D in 1D Introduction of the Basic Concepts and Comparison to Optimal FD Operators Seismology and Seismics Seminar 17.06.2003 Ludwigs-Maximilians-Universitt München by Bernhard Schuberth

The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

  • Upload
    buinhan

  • View
    217

  • Download
    5

Embed Size (px)

Citation preview

Page 1: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

TheTheSSpectralpectral EElementlement MMethodethod

in 1Din 1D

Introduction of the Basic Concepts andComparison to Optimal FD Operators

Seismology and Seismics Seminar 17.06.2003Ludwigs-Maximilians-Universität München

by

Bernhard Schuberth

Page 2: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

OutlineOutline

! Motivation! Mathematical Concepts and Implementation

Weak Formulation Mapping Function → irregular grids Interpolation and integration Diagonal mass matrix??? What about the stiffness matrix? Assembly of the global linear system Boundary conditions examples

! Summary of SEM

Page 3: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Outline contOutline cont´d´d

! Comparison to Optimal FD Operators Setup Seismograms How to compare the performance? Results of for a homogeneous and a two layered

model

! Conclusions

! Future Work

Page 4: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

! High accuracy

! Parallel implementation is fairly easy ↔diagonal mass matrix

! Advantages of meshing like in FEM Better representation of topography and interfaces Possibility of deformed elements

Pictures taken from Komatitsch and Vilotte (1998) and Komatitsch and Tromp (2002a-b)

Motivation Motivation whywhy SEM?SEM?

Page 5: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Motivation Motivation WhyWhy still still lookinglooking at 1D?at 1D?

! Simple analytical solution Quantitative comparisons

! Educational aspect all concepts can be explained considering a 1D case Extensions to higher dimension are then rather

straightforward formulas are looking simpler

Page 6: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

From theFrom the Weak FormulationWeak Formulation to a Global to a Global Linear SystemLinear System

Aim of SEM (FEM) formulation: invertible linear system of equations

Starting with 1D wave equation:

Free surface boundary conditions:

Weak Formulation:

Linear System of equations matrix formulation

Page 7: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

5 5 StepsSteps to to get theget the Global Matrix Global Matrix EquationEquation

1. Domain decomposition → Mesh of elements→ Transformation between physical

and local element coordinates= Mapping

2. Interpolation of functions → Lagrange polynomialson the elements → Gauss-Lobatto-Legendre (GLL) points

3. Integration over the → GLL integration quadratureelement GLL points and weights

4. The elemental matrices:- mass matrix → diagonal using Lagrange polynomials

and GLL quadrature- stiffness matrix → can be used as in FEM but it is easier

to calculate forces (see later)

5. Assembly → Connectivity Matrix

→→→→ Global linear system

Page 8: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Domain Ω

1D „meshing“Subdividing Ω into elements

Mapping Function

Ω1 Ω2 Ω3

ne = 1 ne = 2 ne = 3

0 1 2 3 4 5 6 7 8

-1 0 1

coordinate transformation

1. Domain1. Domain DecompositionDecomposition Mapping Mapping FunctionFunction

Page 9: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

non deformed elements

deformed elements

! Now 2D!

product of degree 1 Lagrange polynomials

product of degree 2 Lagrange polynomials

Notice! In 3D it is a triple product!

Examples

-1 1

1

-1 10

0

1

0

0

Mapping FunctionMapping Function CoordinateCoordinateTransformationTransformation

Page 10: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Shape FunctionShape Function 2D 2D ExamplesExamples

!02 !

22

!02 !

12

-1 1

1

0

-1

Page 11: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

CoordinateCoordinate Transformation Transformation contcont´d´dJacobi Matrix and Jacobian Jacobi Matrix and Jacobian DeterminantDeterminant

1D 3D

Later, when calculating derivatives and integrals, we will have to correct for thecoordinate transformation. HOW is it done?

Jacobi Matrix and its determinantcalled Jacobian

The Jacobian describes the volumechange of the element

Page 12: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

2. Interpolation on 2. Interpolation on thethe ElementsElements

Interpolation is done using Lagrange polynomials defined on theGauss-Lobatto-Legendre points.

interpolation interpolating functions

Polynomial degree N for interpolation is usually higher than that for the mapping

GLL points: The N+1 roots of the Legendre polynomial of degree N

Page 13: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Lagrange PolynomialsLagrange Polynomials -- ExamplesExamples

-1 10

1

0

-1 10

1

0

All 6 Lagrange polynomialsof degree 5

Lagrange polynomial !7

of degree 8

Page 14: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

3. Integration 3. Integration Over theOver the ElementElement

Gauss-Lobatto-Legendre quadrature for spatial integration!BIG advantage!

(compared to quadratures using Chebychev polynomials)

same collocation points for interpolation and integration→ diagonal mass matrix

(this we will see on the next slides remember )

GLL weights of integration

Page 15: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

4. 4. The ElementalThe Elemental Matrices Matrices MassMass MatrixMatrix

Now - the most important issue of SEM How does it become diagonal?(Sorry, nasty formulas inevitable ;-)

Starting with 1. term of the weak formulation:

integration quadrature

interpolating v and u

coordinate transformation

weights

Page 16: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Mass Marix contMass Marix cont´d´d

Thanks to Kronecker delta theformula is getting simpler!

Rearranging we get which can be expressed as

Finally the world is simple again!

Page 17: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

4. 4. The ElementalThe Elemental Matrices Matrices StiffnessStiffness MatrixMatrix

Having to factorize an even more complicated equation we obtain thestiffness matrix

Note! The Kronecker delta relation does not hold for the derivativesof the Lagrange polynomials

→ the stiffness matrix is not diagonal!

All elements of the elemental stiffness matrix are therefore nonzero

Page 18: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

5. 5. The Assembly ProcessThe Assembly Process ConnectivityConnectivity MatrixMatrix

How do the elemental matrices contribute to the global system?

Important information we need: - How are the elements connected?- Which elements share nodes- To which elements contributes

a certain node?

→ Connectivity Matrix

#1#2

#3 #4

Page 19: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Assembling Assembling thethe Global MatricesGlobal Matrices

How do we use the information contained in the Connectivity Matrix?

i indicates element numberj and k indicate the N+1 nodes

Page 20: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Two WaysTwo Ways to to get theget the Global Matrix Global Matrix EquationEquation

1. Explicitly calculating the global stiffness matrix once for the whole simulation

2. Calculating the forces at all nodes for every timestep and then summing the forcesat each node (= assembling the global force vector F)Advantage: much easier to implement in 2- and 3DDrawback: CPU time increases

Calculation of Forces

strain at node i:

Hooke´s Law → stress:

Note: Here we need to correct for the coordinate transformation (same for stiffness matrix)→ 2 x Jacobi Matrix of inverse transformation → 1 x Jacobian Determinant

1. x

2. x

Page 21: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Boundary ConditionsBoundary Conditions

Implementation of different boundary conditions in the SEM formulation is very easy

1. Free surface boundary conditions are implicitly included in the weak formulation→ nothing to be done → time integration (explicit Newmark scheme)

2. Rigid boundaries are easily applied by not inverting the linear system for boundary nodes

This corresponds to setting U(1) and U(ng) equal to zero for all times.

Page 22: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Boundary Conditions contBoundary Conditions cont´d´d

3. Periodic boundary conditions: sum forces and masses at the edges

→ F(1)periodic = F(1) fs + F(ng) fs same for F(ng)periodic

→ M(1)periodic = M(1) fs + M(ng) fs and M(ng)periodic

4. Absorbing boundary conditions:

stress conditions at the edges:

→ F(1)absorbing = F(1) fs +

→ F(1)absorbing = F(1) fs +

Page 23: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

SummarySummary of SEM of SEM ConceptsConcepts

! Weak formulation! Therefore few problems with boundary

conditions! Use forces instead of the stiffness matrix! Additional information is needed

Connectivity! Assembly is time consuming! Lagrange polynomials in connection with

Gauss-Lobatto-Legendre quadrature! Most important: the diagonal mass matrix

Page 24: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

ComparisonComparison of SEM and Optimal FD of SEM and Optimal FD OperatorsOperators

!Why comparing to Optimal Operators(Opt. Op.) ? Both methods are said to be more accurate

than conventional FE and FD methods Both were developed in the last 10 years

and are still not commonly used (especiallyOpt. Op. are not fully established in computational Seismology)

Page 25: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

ComparisionComparisionTheThe SetupSetup

! Model size 1200 grid points

! Source Delta peak in space and time

! Receiver Array every 5th gridpoint → 240 receivers

! Effective Courant 0.5 (grid spacing varies in SEM)

Number 0.82 used in stability criterion

! Filtering 5 to 40 points per wavelength (ppw)

frequencies chosen correspondingly

! Propagation length 1 to 40 propageted wavelengths (npw)

! Analytical solution Heaviside shaped

(displacement) first arrival in seismogram at time

Page 26: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

SeismogramsSeismogramsHomogeneousHomogeneous and and Two LayeredTwo Layered MediumMedium

Page 27: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

HowHow to check to check for performancefor performance??

synthetic seismograms + analytical solution → relative solution error (rse)

The used setup allows for a uge databaseof rse covering a wide range of ppw and npw

What determines the perfomance of anumerical method?

The effort (or CPU time) it takes to achieve a certain accuracy for a given problem i.e. the points per wavelength one has to use to reach an

acceptable error after propagating the signal a wanted number ofwavelengths

and the memory usage.

Page 28: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

CPU CPU CostCost

Benchmarking the CPU time

Several runs with different model sizes (1000 20000 nodes) → CPU time per grid node

CPU

tim

e pe

r tim

est

ep

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 x 104

model size

0

-2

2

4

6

8

10

12 x 10-3

SEM 12

SEM 8 SEM 5Opt. Op. 5pt

Taylor 5pt

Page 29: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

ResultsResults Homogeneous CaseHomogeneous Case

Page 30: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

HomogeneousHomogeneous ModelModel RSERSE DifferenceDifferenceand Relative CPU timeand Relative CPU time

c

difference RSE(SEM) RSE(Opt. Op.)

∆rs

e[%

]

npw ppw

010

2030

40

01

23

npwrse [%]

1.8

1

1.4

0.8

1.6

1.2

54

relative CPU time

Page 31: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Two LayeredTwo Layered ModelModel RSERSE DifferenceDifference and and Relative CPU timeRelative CPU time

difference RSE(SEM) RSE(Opt. Op.)

npw

∆rs

e[%

]

ppw

relative CPU time

40

21.8

1

1.4

1.6

1.2

5 30

010

20

012

3

npwrse [%]

4

Page 32: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

ConclusionsConclusions

! Memory → no big role in 1D, but may be in 3D! Similar behaviour of errors

SEM slightly better for less than 20 npw and for 7ppw and less

! CPU cost is much higher for SEM→ Opt. Op. win for the used setup (without boundaries) in 1D→ SEM in heterogeneous model better than in

homogeneous compared to Opt. Op.! Simulations including surface waves in 3D

models may be better with SEM! Perhaps better approximation of interfaces

Page 33: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

FutureFuture WorkWork1D

! Comparison of several subroutines for the calculation of the GLL points and weights

! Comparison of stiffness matrix and calculationof forces implementations

3D! Installation of a 3D code written by Komatitsch

and Tromp (2003) on the Hitachi! Comparison of 3D SEM-simulations in the

Cologne Basin model with the results of the FDsimulations performed by Michael Ewald

Page 34: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

TThank hank YYououFForor YYour our AAttentionttention!!

Bernhard Schuberth

Page 35: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation
Page 36: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Boundary ConditionsBoundary Conditions ExamplesExamplesFreeFree SurfaceSurface

back

Page 37: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Boundary ConditionsBoundary Conditions ExamplesExamplesRigid BoundariesRigid Boundaries

back

Page 38: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Boundary ConditionsBoundary Conditions ExamplesExamplesPeriodic BoundariesPeriodic Boundaries

back

Page 39: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

Boundary ConditionsBoundary Conditions ExamplesExamplesAbsorbing BoundariesAbsorbing Boundaries

back

Page 40: The · PDF fileThe —Kronecker delta relationfi does not hold for the derivatives ... Free surface boundary conditions are implicitly included in the weak formulation

ResultsResults Two LayeredTwo Layered MediumMedium