+ All Categories
Home > Documents > The Discontinuous Galerkin Method and Hyperbolic...

The Discontinuous Galerkin Method and Hyperbolic...

Date post: 01-Aug-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
51
The Discontinuous Galerkin Method and Hyperbolic Problems Trial Lecture 2014-06-27 Martin Lilleeng Sætra
Transcript
Page 1: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

The Discontinuous Galerkin Method

and Hyperbolic Problems

Trial Lecture

2014-06-27

Martin Lilleeng Sætra

Page 2: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Outline

• Introduction

– Hyperbolic Conservation Laws

– Numerical Methods for PDEs

• The Discontinuous Galerkin (DG) Method

– Introduction in 1D

– Extension to higher order and higher dimensions

– Parallel Computation

• Summary and Further Reading

2014-06-27

Boris Galerkin

1871–1945

Page 3: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Introduction

1. Continuous problem

2. Impose spatial discretization

3. Approximate solution on each cell

4. Compute fluxes across cell interfaces

5. Evolve solution in time

6. (Do all this as efficiently as possible)

2014-06-27

Page 4: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

The DG Method – Short History

• DG was first proposed by Reed and Hill in 1973

𝜎𝑢 + 𝛻 ∗ 𝑎𝑢 = 𝑓

• First analysis (LeSaint and Raviart,1974) showing order 𝑘accurate in general and often 𝑘 + 1 accurate for smooth

solutions (𝑘 polynomial degree of piecewise approximation)

• Sharp analysis (Johnson, 1986) showed 𝑘 +1

2-order accurate

• However, the schemes did not enjoy much use early on

2014-06-27

Page 5: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

The DG Method – Short History

• Extension from scalar conservation laws in late 1980s to

systems in late 1990s (Cockburn and Shu)

• Development of limiters and Runge-Kutta DG methods for

nonlinear conservation laws

• New application areas, e.g., Maxwell’s equations, magneto-

hydrodynamics, water waves, and elasticity

2014-06-27

Page 6: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

The DG Method – Short History

• The last decade has seen an explosion in activities

– Higher order problems

– Hamilton-Jacobi equations

– Non-coercive problems and spectral accuracy

– Adaptive solution techniques

– Improved solvers

– Advanced time-integration methods

– Large scale production codes

– Etc.

2014-06-27

Page 7: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Classes of PDEs

2014-06-27

Elliptic

• Infinite speed of

propagation

• All cells coupled

• Must assemble and solve

a linear system

• Prototypical example:

Laplace’s Equation

Parabolic

• Typically describe

diffusion phenomena

• Can use explicit time

stepping methods

• Prototypical example:

The Heat Equation

Page 8: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Hyperbolic Conservation Laws

• Fundamental in nature

• Conservation laws arise in a multitude of

different scientific areas

• For example:– Magneto-hydrodynamics

– Elastic waves

– Acoustic waves

– Gravitational waves

– Fluid dynamics (Euler eq’s, etc.)

• Discontinuities propagate without being

smoothed, e.g., shock waves

• Solution propagates with a finite speed

– Enables explicit time-stepping schemes

– Finite domains of influence and dependence

2014-06-27

Page 9: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Hyperbolic Conservation Laws

A conservation law states that the sum of a particular quantity within an isolated

system does not change as the system evolves in time, e.g., mass, momentum,

and energy

A general nonlinear hyperbolic conservation law in 1D can be written in differential

form as 𝑢𝑡 + 𝐹 𝑢 𝑥 = 𝑆(𝑢),

in which 𝑢(𝑥, 𝑡) is a vector of conserved variables, 𝐹 is the flux vector, and 𝑆 is a

source vector

Solutions generally defined in a weak sense only

2014-06-27

Page 10: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Hyperbolic Conservation Laws

• The Shallow Water Equations (written in 1D)

2014-06-27

Fresnel visualization (2D)

Page 11: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Hyperbolic Conservation Laws

• The Euler Equations of compressible gas dynamics (written in 1D)

2014-06-27

Schlieren visualization (2D)

Page 12: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Numerically Solving PDEs

In general, we cannot find an analytical solution

In the following we consider the 1D scalar conservation law

in which 𝑓 𝑢 is the flux function and s 𝑥, 𝑡 is a source function

We will now briefly investigate three classical methods for solving this

PDE numerically and list some benefits and problems associated with

each method

2014-06-27

𝜕𝑢

𝜕𝑡+

𝜕𝑓

𝜕𝑥= 𝑠, 𝑥 ∈ Ω,

Page 13: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Numerically Solving PDEs

• To construct a numerical method for solving PDEs we need to

consider

– How to represent the solution 𝑢(𝑥, 𝑡) by an approximate solution 𝑢ℎ(𝑥, 𝑡)?

– In which sense will the approximate solution 𝑢ℎ(𝑥, 𝑡) satisfy the PDE?

• These two choices separate and define the properties of different

numerical methods

• Bottom line is that we need ways to

– Generate a system of algebraic equations from the well-posed PDE

– Incorporate boundary conditions

– Solve the system of equations while minimizing unavoidable errors that are

introduced in the process

2014-06-27

Page 14: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Finite Difference Methods (FDM)

• Domain is represented by a set of points

• Solution approximated by function values at these points

• The equation is satisfied in a pointwise manner

𝑑𝑢ℎ(𝑥𝑗 , 𝑡)

𝑑𝑡+

𝑓ℎ 𝑥𝑗+1, 𝑡 − 𝑓ℎ 𝑥𝑗−1, 𝑡

ℎ𝑗 + ℎ𝑗−1= 𝑠(𝑥𝑗 , 𝑡)

2014-06-27

𝑥𝑗−1 𝑥𝑗 𝑥𝑗+1

ℎ𝑗

Page 15: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Finite Difference Methods (FDM)

• Main benefits

– Simple to understand

– Straightforward implementation on structured meshes

– Method is local and can be made explicit in time

– Simple techniques for local adaptivity (upwinding)

– Extensive body of theoretical and practical work on these methods since

the 1960s

• Main problems

– Implementation complexity increases for irregularly shaped geometry

– Less well-suited for problems with discontinuities

– Grid smoothness requirements

2014-06-27

Page 16: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Finite Volume Methods (FVM)

• Domain is represented by non-overlapping cells

• The local approximation is a cell average

𝑥

𝑗−12

𝑥𝑗+

12 𝑢ℎ 𝑥 𝑑𝑥 = ℎ𝑗 𝑢𝑗

• The equation is satisfied on conservation form

ℎ𝑗

𝑑 𝑢𝑗

𝑑𝑡+ 𝑓

𝑗+12

− 𝑓𝑗−

12

= ℎ𝑗 𝑠𝑗2014-06-27

𝑢𝑗

𝑢𝑗+1

ℎ𝑗𝑥𝑗−

1

2

𝑥𝑗+

12

Page 17: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Finite Volume Methods (FVM)

• Not straightforward to evaluate the fluxes on cell interfaces

• Numerical flux functions are generally used:

𝑓𝑗+

12

= 𝐹(𝑢𝑗+

12

− , 𝑢𝑗+

12

+ )

2014-06-27

𝑥𝑗+

1

2

𝑢𝑗

𝑢𝑗+1

Page 18: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Finite Volume Methods (FVM)

• Main benefits

– Robust and fast due to locality

– Support resolution of complex geometries

– Well-suited for hyperbolic conservation laws (local upwinding)

– Method is local and can be made explicit in time

– Method is locally conservative

– Extensive theoretical framework since the 1970s

• Main problems

– Difficult to achieve high-order accuracy in a straightforward way on general

grids due to requirement for extended stencils (reconstruction problem)

– Grid smoothness requirements

2014-06-27

Page 19: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Finite Element Methods (FEM)

• Domain is represented by non-overlapping elements

• The solution is defined in a non-local manner, using piecewise

continuous polynomials:

𝑢ℎ 𝑥 =

𝑗=1

𝐽

𝑢 𝑥𝑗 𝑁𝑗(𝑥)

• The equation is satisfied globally:

Ω

𝜕𝑢ℎ

𝜕𝑡+

𝜕𝑓ℎ

𝜕𝑥− 𝑠ℎ 𝑁𝑘 𝑥 𝑑𝑥 = 0

2014-06-27

Page 20: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Finite Element Methods (FEM)

• Main benefits

– Robust

– Systematic implementation on unstructured meshes

– High-order accuracy can be combined with complex geometries

– Well-suited for elliptic problems (global statement)

– Extensive theoretical framework since the 1970s

• Main problems

– Standard Galerkin not well-suited for problems with direction (global

statement), but there are techniques to handle such problems, like Petrov-

Galerkin, streamline diffusion, etc.

2014-06-27

Page 21: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Summary of Numerical Methods

• Want a scheme that combines:– The high-order element of FEM

– The geometric flexibility of FEM and FVM

– The local statement on the equation for FVM

2014-06-27

The Discontinuous Galerkin Finite Element Method

Complex

geometries

High-order

accuracy and

𝒉𝒑-adaptivity

Explicit semi-

discrete form

Conservation

laws

Elliptic

problems

FDM ✖ ✔ ✔ ✔ ✔

FVM ✔ ✖ ✔ ✔ (✔)

FEM ✔ ✔ ✖ (✔) ✔

DG ✔ ✔ ✔ ✔ (✔)

Page 22: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

The Discontinuous Galerkin Method

We start with a 1D homogeneous scalar conservation law

𝑢𝑡 + 𝑓 𝑢 𝑥 = 0

Multiply with a test function 𝑣 and integrate over some cell 𝐼𝑗 = [𝑥𝑗−

1

2

, 𝑥𝑗+

1

2

]

𝐼𝑗

𝑢𝑡𝑣 + 𝑓 𝑢 𝑥𝑣𝑑𝑥 = 0

Then integrate by parts

𝐼𝑗

𝑢𝑡𝑣𝑑𝑥 − 𝐼𝑗

𝑓(𝑢) 𝑣𝑥𝑑𝑥 + 𝑓(𝑢𝑗+

12) 𝑣

𝑗+12

− 𝑓(𝑢𝑗−

12)𝑣

𝑗−12

= 0

2014-06-27

Page 23: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

The Discontinuous Galerkin Method

Next, we assume that both the solution 𝑢 and the test function 𝑣 comes from a

finite dimensional approximation space 𝑉ℎ, usually the space of piecewise

polynomials of degree up to 𝑘:

𝑉ℎ = {𝑣: 𝑣 𝐼𝑗

∈ 𝑃𝑘 𝐼𝑗 , 𝑗 = 1, … , 𝑁}

2014-06-27

0 1

ℎ𝑗

For example 𝑃2 = {1, 𝑥, 𝑥2}

Assume unit cell to simplify

the further derivation𝐼𝑗

Page 24: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Let us start with the simple basis of 𝑃0 = {1}:

𝐼𝑗

𝑢𝑡𝑣𝑑𝑥 − 𝐼𝑗

𝑓(𝑢) 𝑣𝑥𝑑𝑥 + 𝑓(𝑢𝑗+

12) 𝑣

𝑗+12

− 𝑓(𝑢𝑗−

12)𝑣

𝑗−12

= 0

𝐼𝑗

𝑢𝑡1𝑑𝑥 − 𝐼𝑗

𝑓(𝑢) 0𝑑𝑥 + 𝑓(𝑢𝑗+

12) 𝑣

𝑗+12

− 𝑓(𝑢𝑗−

12)𝑣

𝑗−12

= 0

𝐼𝑗

𝑢𝑡𝑑𝑥 + 𝑓(𝑢𝑗+

12)𝑣

𝑗+12

− 𝑓(𝑢𝑗−

12)𝑣

𝑗−12

= 0

Example: DG(0)

2014-06-27

𝑢𝑗

𝑓𝑗+

12

= 𝐹(𝑢𝑗+

12

− , 𝑢𝑗+

12

+ )

This is nothing else than the finite volume method

Page 25: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Example: DG(1)

We try again, using a different basis, P1 = {1, x}:

𝐼𝑗

𝑢𝑡𝑣𝑑𝑥 − 𝐼𝑗

𝑓(𝑢) 𝑣𝑥𝑑𝑥 + 𝑓(𝑢𝑗+

12) 𝑣

𝑗+12

− 𝑓(𝑢𝑗−

12)𝑣

𝑗−12

= 0

𝑣 = 1

𝐼𝑗

𝑢𝑡𝑑𝑥 + 𝑓(𝑢𝑗+

12)𝑣

𝑗+12

− 𝑓(𝑢𝑗−

12)𝑣

𝑗−12

= 0

𝑣 = 𝑥

𝐼𝑗

𝑢𝑡𝑥𝑑𝑥 − 𝐼𝑗

𝑓(𝑢) 𝑑𝑥 + 𝑓(𝑢𝑗+

12) 𝑣

𝑗+12

− 𝑓(𝑢𝑗−

12)𝑣

𝑗−12

= 0

2014-06-27

New term

Page 26: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Example: DG(1)

By rearranging and inserting

𝑢 𝑥, 𝑡 = 𝑎0 𝑡 ∗ 1 + 𝑎1 𝑡 ∗ 𝑥

we get

𝑣 = 1𝑑𝑎0

𝑑𝑡 𝐼𝑗

1𝑑𝑥 +𝑑𝑎1

𝑑𝑡 𝐼𝑗

𝑥𝑑𝑥 = −𝑓(𝑢𝑗+

12)𝑣

𝑗+12

+𝑓(𝑢𝑗−

12)𝑣

𝑗−12

𝑣 = 𝑥

𝑑𝑎0

𝑑𝑡 𝐼𝑗

𝑥𝑑𝑥 +𝑑𝑎1

𝑑𝑡 𝐼𝑗

𝑥2𝑑𝑥 = 𝐼𝑗

𝑓(𝑎0 𝑡 + 𝑎1 (𝑡)𝑥) 𝑑𝑥 − 𝑓(𝑢𝑗+

12)𝑣

𝑗+12

+𝑓(𝑢𝑗−

12)𝑣

𝑗−12

2014-06-27

1

2

1

3

1

21

Assuming

unit cell

1 0

01

Page 27: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Example: DG(1)

𝑣 = 𝑥

1

2

𝑑𝑎0

𝑑𝑡+

1

3

𝑑𝑎1

𝑑𝑡=

𝐼𝑗

𝑓(𝑎0 + 𝑎1𝑥) 𝑑𝑥 − 𝑓(𝑢𝑗+

12)

For 1D we can simply use:

Approximate with an

internal quadrature

2014-06-27

Trapezoidal

≈1

2[𝑓(𝑢

𝑗−12) + 𝑓(𝑢

𝑗+12)]

=1

2[𝑓(𝑎0) + 𝑓(𝑎0 + 𝑎1)]

Simpsons

≈1

6[𝑓(𝑢

𝑗−12) + 4𝑓(

1

2[𝑢

𝑗−12

+ 𝑢𝑗+

12]) + 𝑓(𝑢

𝑗+12)]

=1

6[𝑓(𝑎0) + 4𝑓(

1

2[2𝑎0 + 𝑎1]) + 𝑓(𝑎0 + 𝑎1)]

𝑢𝑗−

12

𝑢𝑗+

12

Page 28: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

• Now we have an explicit spatial discretization per cell

• Can view each cell as a separate entity that needs boundary

data from its neighbors

• Next, find the fluxes across cell interfaces

Example: DG(1) – Interfaces

2014-06-27

𝑥𝑗−1 𝑥𝑗 𝑥𝑗+1

Page 29: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Example: DG(1) – Numerical Flux

𝑣 = 𝑥

1

2

𝑑𝑎0

𝑑𝑡+

1

3

𝑑𝑎1

𝑑𝑡=

1

2[𝑓(𝑎0

𝑛 ) + 𝑓(𝑎0𝑛 + 𝑎1

𝑛 )] − 𝑓(𝑢𝑗+

12)

In general we

approximate the

flux with a

numerical flux

function

2014-06-27

𝑓(𝑢𝑗+

12) ≈ 𝐹

𝑗+12(𝑢

𝑗+12

− , 𝑢𝑗+

12

+ )

𝑢−

𝑢+

𝐼𝑗 𝐼𝑗+1

Page 30: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Choice of Numerical Flux Function

• Builds on extensive knowledge from development of numerical fluxes

for FVM schemes

• Problem dependent

• Some examples:

Lax-Friedrichs:

𝐹𝐿𝐹 𝑢−, 𝑢+ =1

2𝑓 𝑢− + 𝑓 𝑢+ − 𝛼 𝑢+ − 𝑢− , 𝛼 = max

𝑢|𝑓′(𝑢)|

Godunov:

𝐹𝐺 𝑢−, 𝑢+ = min

𝑢−≤𝑢≤𝑢+𝑓 𝑢 , 𝑖𝑓 𝑢− < 𝑢+

max𝑢+≤𝑢≤𝑢−

𝑓 𝑢 , 𝑖𝑓 𝑢− ≥ 𝑢+

2014-06-27

𝑢−

𝑢+

Page 31: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Semi-Discrete Formulation

After inserting quadrature and numerical flux function, we are now left with two

ODEs to solve in time:

𝑣 = 1𝑑𝑎0

𝑑𝑡+

1

2

𝑑𝑎1

𝑑𝑡= −𝐹

𝑗+12(𝑢

𝑗+12

− , 𝑢𝑗+

12

+ )

𝑣 = 𝑥

1

2

𝑑𝑎0

𝑑𝑡+

1

3

𝑑𝑎1

𝑑𝑡=

1

2[𝑓(𝑎0

𝑛 ) + 𝑓(𝑎0𝑛 + 𝑎1

𝑛 )] − 𝐹𝑗+

12(𝑢

𝑗+12

− , 𝑢𝑗+

12

+ )

2014-06-27

Page 32: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Explicit Discontinous Galerkin

• Hyperbolic PDEs

– Finite speed of propagation

– Solution will propagate a certain distance over a period of time, Δ𝑡

• Locality of DG Method

• Use explicit time stepping/integration

• In the following we will use simple Euler time integration to

evolve the solution in time

2014-06-27

Page 33: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Time Integration

We then use an explicit solver in time, simple forward Euler in this case:

𝑣 = 1𝑎0

𝑛+1 − 𝑎0𝑛

Δ𝑡+

1

2

𝑎1𝑛+1 − 𝑎1

𝑛

Δ𝑡= −𝐹

𝑗+12(𝑢

𝑗+12

− , 𝑢𝑗+

12

+ )

𝑣 = 𝑥

1

2

𝑎0𝑛+1 − 𝑎0

𝑛

Δ𝑡+

1

3

𝑎1𝑛+1 − 𝑎1

𝑛

Δ𝑡=

1

2[𝑓(𝑎0

𝑛 ) + 𝑓(𝑎0𝑛 + 𝑎1

𝑛 )] − 𝐹𝑗+

12(𝑢

𝑗+12

− , 𝑢𝑗+

12

+ )

2014-06-27

𝑅(𝑢)

Compute 𝑅 𝑢

and solve linear system for 𝑎0𝑛+1 and 𝑎1

𝑛+1

Page 34: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Higher Order in Time

• For higher order in time, we can use, e.g., Runge-Kutta (RK)

• For the semi-discrete scheme:𝑑𝑢

𝑑𝑡= 𝑅 𝑢 ,

in which 𝑅 𝑢 is the spatial DG discretization, the 3rd order RK is:

𝑢(1) = 𝑢𝑛 + Δ𝑡𝑅 𝑢𝑛

𝑢(2) =3

4𝑢𝑛 +

1

4𝑢 1 +

1

4Δ𝑡𝑅(𝑢 1 )

𝑢𝑛+1 =1

3𝑢𝑛 +

2

3𝑢 2 +

2

3Δ𝑡𝑅(𝑢 2 )

2014-06-27

CFL condition in 1D for up-to 2nd order spatial discretization: 𝑐Δ𝑡

h≤

1

2𝑝+1,

in which |𝑐| is the wave speed for the given problem, and DG spatial discretization

polynomials of degree 𝑝 = 𝑘 − 1 and RK method of order 𝑘 are used

Page 35: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Higher Order in Space

1. Modal: Solutions are represented by sums of modal coefficients

multiplied by a set of polynomials, e.g., 𝑢 𝑥, 𝑡 = 𝑖=1𝑁 𝑢𝑖 𝑡 𝑃𝑖(𝑥)

– 𝑃𝑖 is often orthogonal polynomials, e.g., Legendre (see left figure below)

2. Nodal: Cells are comprised of multiple nodes on which the solution is

defined. Reconstruction of the cell is then based on fitting an

interpolating polynomial, e.g., 𝑢 𝑥, 𝑡 = 𝑖=1𝑁 𝑢𝑖 𝑡 𝑙𝑖(𝑥)

– 𝑙𝑖 is a Lagrange polynomial (see right figure below)

2014-06-27

Page 36: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Higher Order in Space

For the general case, in which we have 𝑈 ∈ ℝ and 𝑃 ∈ 𝑃𝑘, we get a

(𝑘 + 1) × (𝑘 + 1) system:

(1,1) ⋯ (𝑥𝑘 , 1)⋮ ⋱ ⋮

(1, 𝑥𝑘) ⋯ (𝑥𝑘 , 𝑥𝑘)

𝑎0(𝑡)⋮

𝑎𝑘(𝑡)=

𝑟0⋮𝑟𝑘

𝑝, 𝑞 = 𝐼𝑗

𝑝 𝑥 𝑞 𝑥 𝑑𝑥

2014-06-27

Remember: This system is local

per cell

An orthogonal basis yields a

diagonal matrix

Example of an orthogonal basis in 2D on

triangles (generated with modepy)

Page 37: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Limiters

• For computing solutions with strong discontinuities, it is generally

necessary to apply a limiter to prevent spurious numerical oscillations

• This is typically done in a postprocessing step for DG schemes

• Main idea: Replace the original DG-polynomial in «troubled cells» with

another polynomial of the same order that is less oscillatory than the

original

2014-06-27

After applying limiter

Original DG-polynomial

Page 38: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Limiters

• The original cell average should be maintained for conservation

• Choice of limiter is highly problem dependent

• Builds upon knowledge from developing slope limiters for FVM

• For example: Minmod, generalized minmod, WENO

• See, e.g., A simple weighted essentially nonoscillatory limiter for Runge-Kutta

discontinuous Galerkin methods, X. Zhong and C.-W. Shu

2014-06-27

Page 39: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Extension to Higher Dimensions

We again start with a scalar conservation law, now in 2D

𝑢𝑡 + 𝑓 𝑢 𝑥 + 𝑔 𝑢 𝑦 = 0

Multiply with a test function 𝑣 and integrate over some cell

𝐼𝑗𝑘 = [𝑥𝑗−

1

2

, 𝑥𝑗+

1

2

] × [𝑦𝑘−

1

2

, 𝑦𝑘+

1

2

]

𝐼𝑗𝑘

𝑢𝑡𝑣 + 𝑓 𝑢 𝑥𝑣 + 𝑔 𝑢 𝑦𝑣𝑑𝑥 = 0

Then integrate by parts

𝐼𝑗𝑘

𝑢𝑡𝑣𝑑𝑉 − 𝐼𝑗𝑘

[𝑓 𝑢 , 𝑔(𝑢)] ∗ 𝛻𝑣 𝑑𝑉 + 𝜕𝐼𝑗𝑘

𝒏 ∗ [𝑓 𝑢 , 𝑔(𝑢)] 𝑣 𝑑𝑆 = 0

…and follow the derivation of the 1D scheme

2014-06-27

Page 40: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Extension to Higher Dimensions

𝐼𝑗𝑘

𝑢𝑡𝑣𝑑𝑥 − 𝐼𝑗𝑘

[𝑓 𝑢 , 𝑔(𝑢)] ∗ 𝛻𝑣 𝑑𝑉 + 𝜕𝐼𝑗𝑘

𝒏 ∗ [𝑓 𝑢 , 𝑔(𝑢)] 𝑣 𝑑𝑆 = 0

Use a suitable quadrature rule (e.g., Gauss)

𝐼𝑗𝑘

[𝑓 𝑢 , 𝑔(𝑢)] ∗ 𝛻𝑣 𝑑𝑉 =

𝑚=0

1

𝑛=0

1

𝜔𝑚𝑛 [𝑓 𝑢𝑚𝑛 (𝑣𝑥)𝑚𝑛 + 𝑔 𝑢𝑚𝑛 (𝑣𝑦)𝑚𝑛 ]

2014-06-27

𝑁(𝑢) 𝑆(𝑢)

Page 41: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Parallel Computation

• DG almost perfectly parallel

• Divide into three computational kernels:

𝑑𝑢

𝑑𝑡= 𝑅 𝑢 = 𝑁 𝑢 + 𝑆(𝑢− , 𝑢+ )

• GPU Accelerated Discontinuous Galerkin Methods for Shallow Water

Equations, R. Gandham, D. Medinay, and T. Warburton

• Parallel Implementation of the Discontinuous Galerkin Method, A. Baggag, H.

Atkins, and D. Keyes

2014-06-27

3. Surface integral

2. Volume integral

1. Time integration

(solve ODEs)

𝑢− 𝑢+

Page 42: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Parallel Computation

• Surface integrals depends only on neighboring cells, regardless of the

order of the scheme

• For a structured 2D grid this leads to the following data dependency,

assuming a block decomposition of the domain:

• Very similar to 1st order finite volume methods

2014-06-27

Stencil

Apron

Page 43: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Parallel Computation

• FVM (FDM)

– Special treatment of

boundaries necessary

– Store one value per cell

(per conserved variable)

– High-order solution

requires reconstruction

larger stencil

2014-06-27

• DG

– Easy boundary

conditions (choose a

suitable boundary flux)

– The higher DOF, the

more values must be

stored per cell

– High-order solution in

each cell

Page 44: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Parallel Computation

• New multi-core and many-core architectures can greatly speed up

performance for parallel algorithms

• Since explicit DG is an embarrassingly parallel algorithm, it should run

very efficiently on these architectures

2014-06-27

Architecture

Domain

decomposition

Multi-core CPUs Xeon Phi GPUs

Page 45: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

• National Center for Atmospheric Research’s (CISL’s Technology Development Division)

evaluation of accelerator technology within existing weather and climate model codes

• DG_KERNEL benchmark performs a gradient operation from the Discontinuous

Galerkin version of the High Order Methods Modeling Environment (HOMME)

• Specialized versions of the kernel were written for each target architecture (in

cooperation with Intel for the Sandy Bridge CPU and the Xeon Phi)

From 2013 CISL Annual Report

Page 46: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

PDE Frameworks Supporting RKDG

• Diffpack– Non-free license

– Collection of C++ libraries and utility programs

– Mature software & large community of users

– Visualization: vtk, matlab, gnuplot, and more

• Dune– GPL 2-licensed (free)

– C++ libraries with separation of data structures

and algorithms by abstract interfaces

– Mature software & large community of users

– Visualization: vtk, GRAPE

• Hedge– MIT licensed (almost free)

– Focus: Fast and easy to use

– Python «front-end» and C++ «back-end»

– Can run on CUDA-capable graphics card

– Visualization: vtk, silo

2014-06-27

Page 47: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Goals for Numerical Methods

1. Sufficient accuracy

– High order and/or high grid resolution

– Does the solution match analytical solutions? (Verification)

– Does the solution replicate experimental data? (Validation)

2. Flexibility

– Make solvers as generic as possible

– Solve classes of problems using the same code

3. Robustness

– Can we always expect a solution from our model?

– Will it break down for, e.g., discontinuities or wet/dry-interfaces?

2014-06-27

Page 48: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Goals for Numerical Methods

4. Efficiency & Scaling

– How long does it take to compute a solution?

– Convergence rate?

– Consider computational platform: Desktop PC vs. MPI and supercomputer

5. Easy problem prototyping and code maintenance

– Avoid ad-hoc solutions

– Should be easy to set up a simulation (e.g., few lines of code)

• Choice of method is often dictated by physical problem, domain

complexity, required levels of accuracy, and available

computational resources

2014-06-27

Page 49: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Summary

• Hyperbolic problems

– Arise in a multitude of different scientific areas

– Typically form discontinuities – need to handle without smoothing

the solution

– Finite speed of propagation, which enables explicit time stepping

• Discontinuous Galerkin

– Locality of FVM combined with variable DOF per element

– General and flexible framework for solving large classes of PDEs

– Conceptually no difference between 1D, 2D or N-D

– Support for locally adaptive numerical solutions (ℎ𝑝-adaptivity),

and meshes can be both non-conforming and unstructured

– The method is highly suitable for parallel computations – only

depends on nearest neighbors in grid

2014-06-27

Page 50: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Further Reading

• Book by Hesthaven and Warburton

• PhD-course slides by Hesthaven

(inspired some of my slides)

2014-06-27

Page 51: The Discontinuous Galerkin Method and Hyperbolic Problemsmartinsa.at.ifi.uio.no/files/trial_lecture.pdf · Finite Volume Methods (FVM) • Main benefits – Robust and fast due to

Further Reading

• Essay for a wider audience: – COCKBURN, B: Discontinuous Galerkin Methods

• Runge-Kutta Discontinuous Galerkin Method:– COCKBURN, B.; SHU, C.-W., et al.: The Runge-Kutta discontinuous Galerkin method for

conservation laws. Series of articles I–V.

– COCKBURN, B.: Discontinuous Galerkin methods for convection-dominated problems. In: BARTH,

T.; DECONINK, H. (eds.): High-Order Methods for Computational Physics. Lecture Notes in

Computational Science and Engineering, 9. Springer Verlag, 1999, pp. 69–224.

• Development and state-of-the-art pre-1999: – COCKBURN, B.; KARNIADAKIS, G.; SHU, C.-W.: The development of discontinuous Galerkin

methods. In: COCKBURN, B.; KARNIADAKIS, G.; SHU, C.-W. (eds.): Discontinuous Galerkin

Methods. Theory, Computation and Applications. Lecture Notes in Computational Science and

Engineering, 11. Springer Verlag, February 2000, pp. 3–50.

• Updated review:– COCKBURN, B.; SHU, C.-W.: Runge-Kutta discontinuous Galerkin methods for convection-

dominated problems. J. Sci. Comput., 16 (2001), 173–261.

2014-06-27


Recommended