+ All Categories
Home > Documents > Finite Element methods for hyperbolic systems · introduce the classical methods for numerically...

Finite Element methods for hyperbolic systems · introduce the classical methods for numerically...

Date post: 22-Jun-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
56
Finite Element methods for hyperbolic systems Eric Sonnendr¨ ucker Max-Planck-Institut f¨ ur Plasmaphysik und Zentrum Mathematik, TU M¨ unchen Lecture notes Wintersemester 2014-2015 January 19, 2015
Transcript
Page 1: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Finite Element methods for hyperbolic systems

Eric SonnendruckerMax-Planck-Institut fur Plasmaphysik

undZentrum Mathematik, TU Munchen

Lecture notesWintersemester 2014-2015

January 19, 2015

Page 2: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Contents

1 Introduction 3

2 1D linear advection 52.1 Finite Difference schemes for the advection equation . . . . . . . . . . . . 5

2.1.1 Obtaining a Finite Difference scheme . . . . . . . . . . . . . . . . . 52.1.2 The first order explicit upwind scheme . . . . . . . . . . . . . . . . 52.1.3 The first order upwind implicit scheme . . . . . . . . . . . . . . . . 62.1.4 The method of lines . . . . . . . . . . . . . . . . . . . . . . . . . . 72.1.5 Convergence of finite difference schemes . . . . . . . . . . . . . . . 72.1.6 High-order time schemes . . . . . . . . . . . . . . . . . . . . . . . . 13

2.2 The Finite Element method . . . . . . . . . . . . . . . . . . . . . . . . . . 162.2.1 Theoretical background . . . . . . . . . . . . . . . . . . . . . . . . 162.2.2 Galerkin discretisation of the 1D advection-diffusion equation . . . 18

2.3 The Discontinuous Galerkin (DG) method . . . . . . . . . . . . . . . . . . 22

3 Linear systems 263.1 Expressions of the Maxwell equations . . . . . . . . . . . . . . . . . . . . 26

3.1.1 The 3D Maxwell equations . . . . . . . . . . . . . . . . . . . . . . 263.1.2 The 2D Maxwell equations . . . . . . . . . . . . . . . . . . . . . . 263.1.3 The 1D Maxwell equations . . . . . . . . . . . . . . . . . . . . . . 273.1.4 Mixed Finite Element discretisation . . . . . . . . . . . . . . . . . 273.1.5 B-spline Finite Elements . . . . . . . . . . . . . . . . . . . . . . . . 313.1.6 Variationnal formulations for the 2D Maxwell equations . . . . . . 333.1.7 Discretization using conforming finite elements . . . . . . . . . . . 353.1.8 A remark on the stability of mixed formulations related to exact

sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393.2 The discontinuous Galerkin method . . . . . . . . . . . . . . . . . . . . . 40

3.2.1 The Riemann problem for a 1D linear system . . . . . . . . . . . . 403.2.2 Setting up the discontinuous Galerkin method . . . . . . . . . . . 42

4 Non linear conservation laws 444.1 Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444.2 Weak solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

4.2.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.2.2 The Rankine-Hugoniot condition . . . . . . . . . . . . . . . . . . . 454.2.3 Entropy solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

4.3 The Riemann problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.4 Numerical methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

1

Page 3: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

4.4.1 The Godunov method . . . . . . . . . . . . . . . . . . . . . . . . . 504.4.2 Approximate Riemann solvers . . . . . . . . . . . . . . . . . . . . . 524.4.3 Higher order methods . . . . . . . . . . . . . . . . . . . . . . . . . 534.4.4 Strong stability preserving (SSP) Runge-Kutta methods. . . . . . . 53

4.5 Nonlinear systems of conservation laws . . . . . . . . . . . . . . . . . . . . 544.5.1 The Rusanov flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544.5.2 The Roe flux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

2

Page 4: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Chapter 1

Introduction

Hyperbolic systems arise naturally from the conservation laws of physics. Writing downthe conservation of mass, momentum and energy yields a system of equations that needsto be solved in order to describe the evolution of the system. In this lecture we willintroduce the classical methods for numerically solving such systems. Up to a few yearsago these were essentially finite difference methods and finite volume methods. Butin the last decades a new class of very efficient and flexible method has emerged, theDiscontinuous Galerkin method, which shares some features both with Finite Volumesand Finite Elements.

In 1D the systems of conservation laws we consider have the form

∂u

∂t+∂F(u)

∂x= 0,

where u is a vector of unknown values. This can be written also

∂u

∂t+A(u)

∂u

∂x= 0,

where A(u) is the Jacobian matrix with components ((∂Fi∂uj))i,j . The system is called

hyperbolic if for all u the matrix A has only real eigenvalues and is diagonalisable. It iscalled strictly hyperbolic if all eigenvalues are distinct.

Examples:

• 1D Maxwell’s equation

∂E

∂t+∂B

∂x= J

∂B

∂t+∂E

∂x= 0

• 1D Euler equations

∂t

ρρuE

+∂

∂x

ρuρu2 + pEu+ pu

= 0,

where ρ, u and E are the density, velocity and energy density of the gas and p isthe pressure which is a known function of ρ.

3

Page 5: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

The idea behind all numerical methods for hyperbolic systems is to use the fact thatthe system is locally diagonalisable, with real eigenvalues, and thus can be reduced toa set of scalar equations. For this reason, before going to systems it will be useful tofirst understand the scalar case and then see how it can be extended to systems by localdiagonalization.

The first part of the lecture will be devoted to the linear case, starting with thescalar case which boils down to linear advection for which the core methods will be firstintroduced. This is fairly straightforward.

Many additional problems arise in the nonlinear case. Indeed in this case even start-ing from a smooth initial condition discontinuities can appear in the solution. In thiscase the concept of weak solutions need to be introduced and there can be several solu-tions only one of which is physical. We thus need a criterion to find the physical solutionand numerical schemes that capture the physical solution. The notion of conservativityplays an essential role there. These will be addressed in the second part.

4

Page 6: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Chapter 2

1D linear advection

2.1 Finite Difference schemes for the advection equation

We consider first the linear 1D advection equation

∂u

∂t+ a

∂u

∂x= 0 pour x ∈ [0, L], t ≥ 0. (2.1)

Let us assume for simplicity that the boundary conditions are periodic. This means thatu and all its derivatives are periodic of period L. We have in particular u(0) = u(L). Theconstant a is given. As the problem is time dependent we also need an initial conditionu(x, 0) = u0(x).

2.1.1 Obtaining a Finite Difference scheme

We first consider a uniform mesh of the 1D computational domain, i.e. of the interval[a, b] where we want to compute the solution, see Figure 2.1. The cell size or space step

. .

0 L

x1x0 x2 xNxN−1

Figure 2.1: Uniform mesh of [a, b]

is defined by ∆x = LN where N is the number of cells in the mesh. The coordinates of

the grid points are then defined by xi = x0 + i∆x. We then need a time step ∆t and wewill compute approximations of the solution at discrete times tn = n∆t, n ∈ N. As weassume the solution to be periodic of period L it will be defined by its values at xi for0 ≤ i ≤ N − 1 and we shall have u(xN , tn) = u(x0, tn).

We shall denote by unj = u(xj , tn).

2.1.2 The first order explicit upwind scheme

A Finite Difference scheme is classically obtained by approximating the derivatives ap-pearing in the partial differential equation by a Taylor expansion up to some given orderwhich will give the order of the scheme. As we know only the values of the unknown

5

Page 7: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

function at the grid points, we use Taylor expansion at different grid points and linearlycombine them so as to eliminate all derivatives up to the needed order.

The same can be done for the time discretisation. For an approximation of order 1in space and time, we can simply write

∂u

∂t(xj , tn) =

u(xj , tn+1)− u(xj , tn)

∆t+O(∆t), (2.2)

∂u

∂x(xj , tn) =

u(xj , tn)− u(xj−1, tn)

∆x+O(∆x). (2.3)

Denoting by unj , the approximation of the solution at point xj and time tn and usingthe above formulas for the approximation of the partial derivatives we get the followingapproximation (2.1) at point xj and time tn:

un+1j − unj

∆t+ a

unj − unj−1

∆x= 0. (2.4)

We thus obtain the following explicit formula which enables to compute un+1j in function

of the values of u at time tn and points xj−1, xj and xj−1 :

un+1j = unj − a

∆t

∆x(unj − unj−1). (2.5)

Denote by Un the vector of RN whose components are un0 , . . . , unN−1 and

A =

(1− a∆t

∆x ) 0 a∆t∆x

a∆t∆x

. . .. . .

. . .. . . 0

0 a∆t∆x (1− a∆t

∆x )

.

The terms at the end of the first line comes from the periodic boundary conditions. Weuse that un−1 = unN−1 and unN = un0 . Except on the two diagonals all the terms vanish

In this case the scheme (2.5) can be written in matrix form

Un+1 = AUn.

2.1.3 The first order upwind implicit scheme

When using an uncentered difference scheme in the other direction for the time derivative,we get

∂u

∂t(xj , tn) =

u(xj , tn)− u(xj , tn−1)

∆t+O(∆t), (2.6)

We use the same finite difference approximation for the space derivative. We then getthe following formula

unj + a∆t

∆x(unj − unj−1) = un−1

j . (2.7)

In this case the unj are defined implicitly from the un−1j as solutions of a linear system.

This is why this scheme is called implicit.

6

Page 8: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Denote by B the matrix of the linear system:

B =

(1 + a∆t

∆x ) 0 −a∆t∆x

−a∆t∆x

. . .. . .

. . .. . . 0

0 −a∆t∆x (1 + a∆t

∆x )

.

The term at the end of the first line comes from the periodic boundary conditions. Weuse that un−1 = unN−1 and unN = un0 . The terms not on the two diagonals vanish.

Going now from time step n to n+ 1 the implicit scheme in matrix form becomes

BUn+1 = Un.

2.1.4 The method of lines

As we saw, the time discretisation can be performed by finite differences as for the spacediscretisation. However it is generally more convenient to separate the space and timediscretisation for a better understanding. The method of lines consists in applying only adiscretisation scheme in space first (this can be Finite Differences or any other scheme).Then one obtains a system of ordinary differential equations of the form

dU

dt= AU,

where U(t) is the vector whose components are ui(t) the unknown values at the gridpoint at any time t. Then one can use any Ordinary Differential Equation (ODE) solverfor the time discretisation. For example using an explicit Euler method with the upwindmethod in space yields the previous explicit upwind scheme and when we use an implicitEuler method we get the implicit upwind scheme.

2.1.5 Convergence of finite difference schemes

So as to include explicit and implicit schemes, we consider a linear scheme in the followinggeneric matrix form

LUn+1 = MUn, (2.8)

where the matrices L and M , are normalised such that the coefficient of unj , is 1.Let us denote by

V (tn) =

u(x0, tn)...

u(xN−1, tn),

where u is the exact solution of the Partial Differential Equation (PDE) that is approx-imated by the scheme (2.8).

Definition 1 The scheme (2.8) is called consistent of order (q, p) if

‖LV (tn+1)−MV (tn)‖ = ∆tO(∆tq + ∆xp).

Proposition 1 If the exact solution is of class C3, the schemes (2.5) and (2.7) areconsistent of order 1 in t and in x.

7

Page 9: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Proof. Let’s start with (2.5). Using the Taylor formulas (2.2) and (2.3), we obtain forthe ith line of V (tn+1)−AV (tn),

(V (tn+1)−AV (tn))i = u(xi, tn+1)− u(xi, tn) +a∆t

∆x(u(xi, tn)− u(xi−1, tn))

= ∆t

(∂u

∂t(xi, tn) +O(∆t) + a

∂u

∂x(xi, tn) +O(∆x)

).

The result follows as u is a solution of our equation. We thus get the (1,1) consistencyof this scheme.

Then for (2.7), we use (2.6) and (2.3). The ith line of BV (tn)− V (tn−1),

(BV (tn)− V (tn−1))i = u(xi, tn)− u(xi, tn−1) +a∆t

∆x(u(xi, tn)− u(xi−1, tn))

= ∆t

(∂u

∂t(xi, tn) +O(∆t) + a

∂u

∂x(xi, tn) +O(∆x)

).

The result follows as u is a solution of the equation. We thus get the (1,1) consistencyof this scheme.

Definition 2 The scheme (2.8) is called stable for some given norm ‖.‖ if there existconstants K and τ independent of ∆t such that

‖Un‖ ≤ K‖U0‖ ∀∆t such that 0 < ∆t < τ.

Proposition 2 The scheme (2.5) is stable for the L∞ norm provided

a∆t

∆x≤ 1.

This condition is called the Courant-Friedrichs-Lewy or CFL condition.Proof. Consider the scheme (2.5). Grouping the terms in unj−1, unj and unj+1, thisscheme (2.5) becomes

un+1j =

a∆t

∆xunj−1 + (1− a∆t

∆x)unj .

As, a, ∆t and ∆x are positive, if a∆t∆x ≤ 1 the two factors of unj−1, unj are positive and

equal to their absolute value. Hence

|un+1j | ≤ a∆t

∆x|unj−1|+ (1− a∆t

∆x)|unj | ≤

(a∆t

∆x+ (1− a∆t

∆x))

maxj|unj |,

and somaxj|un+1j | ≤ max

j|unj |,

from which it follows that maxj |unj | ≤ maxj |u0j | for all n, which yields the L∞ stability.

8

Page 10: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

von Neumann stability analysis. Due to the fact that the discrete Fourier trans-form conserves the L2 norm because of the discrete Plancherel inequality and that itdiagonalises the Finite Difference operators (provided the original PDE has constant co-efficients), it is particularly well adapted for studying the L2 stability. The von Neumannanalysis consists in applying the discrete Fourier transform to the discretised equation.To make this more precise we first recall the definition and main properties of the discreteFourier transform.

Let P be the symmetric matrix formed with the powers of the nth roots of unity

the coefficients of which are given by Pjk = 1√ne

2iπjkn . Denoting by ωn = e

2iπn , we have

Pjk = 1√nωjkn .

Notice that the columns of P , denoted by Pi, 0 ≤ i ≤ n − 1 are the vectors Xi

normalised so that P ∗i Pj = δi,j . On the other hand the vector Xk corresponds to adiscretisation of the function x 7→ e−2iπkx at the grid points xj = j/n of the interval[0, 1]. So the expression of a periodic function in the base of the vectors Xk is thusnaturally associated to the Fourier series of a periodic function.

Definition 3 Discrete Fourier Transform.

• The dicrete Fourier transform of a vector x ∈ Cn is the vector y = P ∗x.

• The inverse discrete Fourier transform of a vector y ∈ Cn is the vectorx = P ∗−1x = Px.

Lemma 1 The matrix P is unitary and symmetric, i.e. P−1 = P ∗ = P .

Proof. We clearly have P T = P , so P ∗ = P . There remains to prove that PP = I.But we have

(PP )jk =1

n

n−1∑l=0

ωjlω−lk =1

n

n−1∑l=0

e2iπnl(j−k) =

1

n

1− e2iπnn(j−k)

1− e2iπn

(j−k),

and so (PP )jk = 0 if j 6= k and (PP )jk = 1 if j = k.

Corollary 1 Let F,G ∈ Cn and denote by F = P ∗F and G = P ∗G, their discreteFourier transforms. Then we have

• the discrete Parseval identity:

(F,G) = F T G = F T¯G = (F , G), (2.9)

• The discrete Plancherel identity:

‖F‖ = ‖F‖, (2.10)

where (., .) and ‖.‖ denote the usual euclidian dot product and norm in Cn.

Proof. The dot product in Cn of F = (f1, . . . , gn)T and G = (g1, . . . , gn)T is defined by

(F,G) =

N∑i=1

figi = F T G.

9

Page 11: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Then using the definition of the inverse discrete Fourier transform, we have F = PF ,G = PG, we get

F T G = (PF )TPG = F TP T P¯G = F T

¯G,

as P T = P and P = P−1. The Plancherel identity follows from the Parseval identity bytaking G = F .

Remark 1 The discrete Fourier transform is defined as a matrix-vector multiplication.Its computation hence requires a priori n2 multiplications and additions. But because ofthe specific structure of the matrix there exists a very fast algorithm, called Fast FourierTransform (FFT) for performing it in O(n log2 n) operations. This makes it particularlyinteresting for many applications, and many fast PDE solvers make use of it.

Let us now consider the generic matrix form of the Finite Difference scheme intro-duced above:

LUn+1 = MUn.

Note that on a uniform grid if the PDE coefficients do not explicitly depend on x thescheme is identical at all the grid points. This implies that L and M have the samecoefficients on any diagonal including the periodicity. Such matrices, which are of theform

C =

c0 c1 c2 . . . cn−1

cn−1 c0 c1 cn−2

cn−2 cn−1 c0 cn−3...

. . ....

c1 c2 c3 . . . c0

with c0, c1, . . . , cn−1 ∈ R are called circulant.

Proposition 3 The eigenvalues of the circulant matrix C are given by

λk =

n−1∑j=0

cjωjk, (2.11)

where ω = e2iπ/n.

Proof. Let J be the circulant matrix obtained from C by taking c1 = 1 and cj = 0 forj 6= 1. We notice that C can be written as a polynomial in J

C =n−1∑j=0

cjJj .

As Jn = I, the eigenvalues of J are the n-th roots of unity that are given by ωk = e2ikπ/n.Looking for Xk such that JXk = ωkXk we find that an eigenvector associated to theeigenvalue λk is

Xk =

1ωk

ω2k

...

ω(n−1)k

.

10

Page 12: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

We then have that

CXk =

n−1∑j=0

cjJjXk =

n−1∑j=0

cjωjkXk,

and so the eigenvalues of C associated to the eigenvectors Xk are

λk =n−1∑j=0

cjωjk.

Proposition 4 Any circulant matrix C can be written in the form C = PΛP ∗ whereP is the matrix of the discrete Fourier transform and Λ is the diagonal matrix of theeigenvalues of C. In particular all circulant matrices have the same eigenvectors (whichare the columns of P ), and any matrix of the form PΛP ∗ is circulant.

Corollary 2 We have the following properties:

• The product of two circulant matrix is circulant matrix.

• A circulant matrix whose eigenvalues are all non vanishing is invertible and itsinverse is circulant.

Proof. The key point is that all circulant matrices can be diagonalized in the samebasis of eigenvectors. If C1 and C2 are two circulant matrices, we have C1 = PΛ1P

∗ andC2 = PΛ2P

∗ so C1C2 = PΛ1Λ2P∗.

If all eigenvalues of C = PΛP ∗ are non vanishing, Λ−1 is well defined and

PΛP ∗PΛ−1P ∗ = I.

So the inverse of C is the circulant matrix PΛ−1P ∗.

Now applying the discrete Fourier transform to our generic scheme yields:

P ∗LUn+1 = P ∗MUn ⇔ P ∗LPP ∗Un+1 = P ∗MPP ∗Un

which is equivalent toΛLU

n+1 = ΛM Un,

where ΛL and ΛM are the diagonal matrices containing the eigenvalues of the circu-lant matrices M and L which are given explicitly from the matrix coefficients. It fol-lows because ‖U‖ = ‖U‖ for any vector U that the scheme is L2 stable if and only if

maxi|λM,i||λL,i| ≤ 1, where λM,i and λL,i are the eigenvalues of M and L.

Let us now apply this technique to the scheme (2.7):

Proposition 5 The scheme (2.7) is stable for the L2 norm for all strictly positive valuesof ∆x and ∆t.

Proof. Let us denote by α = a∆t∆x . We notice that matrix B is circulant with c0 = 1+α,

cn−1 = −α, the other ci being 0.

11

Page 13: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

The eigenvalues of B thus are λk = c0 + cn−1ω−2ikπ/n. Which implies that

<λk = 1 + α(1− cos2kπ

n) ≥ 1,

as α ≥ 0. It follows that all eigenvalues of B have a modulus larger or equal to 1, whichimplies that B is invertible Moreover the eigenvalues of its inverse all have modulus lessor equal to 1, which implies the L2 stability of the scheme.

Proposition 6 The explicit centred scheme second order in space and first order intime:

un+1j = unj −

a∆t

2∆x(unj+1 − unj−1).

is unstable in L2.

Proof. Let us denote by α = a∆t∆x . The first order in time centred scheme becomes

in matrix form Un+1 = AUn where A is the circulant matrix with three non vanishing

diagonals corresponding to c0 = 1, c1 = −cn−1 = α2 e

2iπkn . Hence its eigenvalues are

λk = 1− α2 (e

2iπkn −e−

2iπkn ) = 1− iα sin 2kπ

n so that |λk| > 1 for all k such that sin 2kπn 6= 0

if α 6= 0. Hence the scheme is unstable.

Theorem 1 (Lax) The scheme (2.8) is convergent if it is stable and consistent.

Proof. Let V (tn) be the vector whose components are the exact solution at the gridpoints at time tn. The, as the scheme is consistent, we have

LV (tn+1) = MV (tn) + ∆tO(∆tq + ∆xp).

Note En = Un − V (tn) the vector containing the errors at each point at time tn, thenas LUn+1 = MUn, we have LEn+1 = MEn + ∆tO(∆tq + ∆xp). Hence

En+1 = L−1MEn + ∆tK1(∆tq + ∆xp),

= L−1M(En−1 + ∆tK1(∆tq + ∆xp)) + ∆tK1(∆tq + ∆xp),

= (L−1M)n+1E0 + (1 + · · ·+ (L−1M)n)∆tK1(∆tq + ∆xp).

Hence

‖En+1‖ ≤ ‖(L−1M)n+1E0‖+ ‖(1 + · · ·+ (L−1M)n)∆tK1(∆tq + ∆xp)‖. (2.12)

The stability implies that for any initial condition U0, as Un = (L−1M)nU0, we have

‖(L−1M)nU0‖ ≤ K‖U0‖,

which means that ‖(L−1M)n‖ ≤ K for all n. Plugging this into (2.12), we obtain:

‖En+1‖ ≤ K‖E0‖+ nKK1∆t(∆tq + ∆xp).

Then as on the one hand E0 taking as an initial in the scheme U0 = V (0), and on theother hand n∆t ≤ T the maximal considered time, we have

‖En+1‖ ≤ KK1T (∆tq + ∆xp),

whence convergence.

Corollary 3 If the exact solution is of class C3, the schemes (2.5) and (2.7) converge.

Proof. This follows immediately from the Lax theorem by applying propositions 1 and2.

12

Page 14: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

2.1.6 High-order time schemes

When working with linear homogeneous equations with no source term, the simplestway to derive high order time schemes is to use a Taylor expansion in time and plug inthe expression of the successive time derivatives obtained from the differential systemresulting from the semi-discretization in space. Consider for example that after semi-discretization in space using Finite Differences (or any other space discretisation method)we obtain the differential systems

dU

dt= AU, with U =

u0(t)...

un−1(t)

,

and A the appropriate matrix coming from the semi-discretization in space. Then aTaylor expansion in time up to order p yields

U(tn+1) = U(tn) + ∆tdU

dt(tn) + · · ·+ ∆tp

p!

dpU

dtp(tn) +O(∆tp+1).

Now if A does not depend on time and dUdt = AU , we get that

dpU

dtp= ApU, for any integer p.

Hence, denoting Un an approximation of U(tn), we get a time scheme of order p usingthe formula

Un+1 = Un + ∆tAUn + · · ·+ ∆tp

p!ApUn = (I + ∆tA+ · · ·+ ∆tp

p!Ap)Un. (2.13)

For p = 1 this boils down to the standard explicit Euler scheme.Writing Un the solution in vector form at time tn, we define the propagation matrix

A such thatUn+1 = AUn.

Proposition 7 The numerical scheme defined by the propagation matrix A is stable ifthere exists τ > 0 such that for all ∆t < τ all eigenvalues of A are of modulus less orequal to 1.

Stability of Taylor schemes. For a Taylor scheme of order p applied to dUdt = AU ,

we have A = I + ∆tA + · · · + ∆tp! A

p. Then denoting by λ an eigenvalue of A, the

corresponding eigenvalue of A is µ = 1 +λ∆t+ · · ·+λp∆tp

p! . And one can plot the regionof the complex plane in which |µ(λ∆t)| ≤ 1 using for example ezplot in Matlab, whichare the stability regions. This means that the time scheme associate to the semi-discreteform dU

dt = AU is stable provided all the eigenvalues λ of A are such that λ∆t is in thestability region.

Examples.

1. The Upwind scheme: dui(t)dt = −aui(t)−ui−1(t)

∆x corresponds to the circulant matrix

A with c0 = − a∆x = −c1. So its eigenvalues verify λk∆t = −a∆t

∆x (1 − e2iπkn ).

13

Page 15: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Obviously, for any integer value of k, λk∆t is on a circle in the complex plane ofradius a∆t

∆x centred at (−a∆t∆x , 0). The stability region of the explicit Euler method

is the circle of radius 1 centred at (−1, 0), so that in this case we see again thatthe scheme is stable provided a∆t

∆x ≤ 1. For the higher order schemes the limit ofthe stability region is reached when the circle of the eigenvalues of A is tangentto the left side of the stability region. The radius corresponding to the maximalstability can thus be found by computing the second real root (in addition to 0)α of the equation |µ(λ∆t)| = 1, see Fig. 2.2. We find that for the order 2 schemeα = −2, so that the stability condition is the same as for the order 1 scheme. Forthe order 3 scheme we find that α = −2.5127 and for the order 4 scheme we findthat α = −2.7853. The value of α corresponds to the diameter of the largest circleof eigenvalues that is still completely enclosed in the stability region. This yieldsthe stability condition a∆t

∆x ≤|α|2 . We notice that the maximal stable time step is

larger for the schemes of order 3 and 4.

x

y

Maximal stability, order 2

−4 −3 −2 −1 0 1 2−3

−2

−1

0

1

2

3

x

y

Maximal stability, order 3

−4 −3 −2 −1 0 1 2−3

−2

−1

0

1

2

3

x

y

Maximal stability, order 4

−4 −3 −2 −1 0 1 2−3

−2

−1

0

1

2

3

Figure 2.2: Location of eigenvalues (blue circle) corresponding to maximal stability zonefor explicit time schemes of order 2, 3, 4 (left to right).

2. The centred scheme: dui(t)dt = −aui+1(t)−ui−1(t)

2∆x corresponds to the circulant matrixA with c1 = − a

2∆x = −cn−1. The corresponding eigenvalues are such that

λk∆t = − a∆t

2∆x(e

2iπjkn − e

−2iπjkn ) = − ia∆t

∆xsin

2πjk

n.

Hence the eigenvalues are all purely imaginary and the modulus of the largest oneis a∆t

∆x . The stability zones for the schemes of order 1 to 6 are represented in Fig.2.3. Note that for the order 1 and 2 scheme the intersection of the stability zonewith the imaginary axis is reduced to the point 0. So that when all eigenvaluesare purely imaginary as is the case here, these schemes are not stable for anypositive ∆t. On the other hand the schemes of order 3 and 4 have a non vanishingstability zone on the imaginary axis, larger for the order 4 scheme. By computingthe intersection of the curve |µ(λ∆t)| = 1 with the imaginary axis we find thestability conditions for the order 3 scheme: a∆t

∆x ≤√

3 and for the order 4 schemea∆t∆x ≤ 2

√2.

14

Page 16: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Remark 2 The order 5 and 6 schemes are more problematic for eigenvalues of Aon the imaginary axis as the zooms of Figure 2.4 tell us. Even though there is a partof the imaginary axis in the stability zone, there is also a part in the neighborhood of0 which is not. Therefore small eigenvalues of A will lead to instability on longertime scales. This is problematic, as unlike usual Courant condition instabilityproblems which reveal themselves very fast, this leads to a small growth in time.

0.0

0.0

−1.0 −0.5−1.5−2.0

1.0

0.5

y

−1.0

x

−0.5y

−0.5

1.5

x

−0.5−1.5

0.0

0.5

−1.5

−1.0

0.0−2.0 −1.0

1.0

−1.0

1

−2.5

x

−1.5

y

0.0−2.0

0

2

−2

−0.5

−1

x

0

−0.5−2.0

−1

2

−2

−1.5

y

−2.5

3

0.0

1

−3

−1.0 −3.2 −1.6

−1

0.0−2.4

1

−3

−0.4−1.2

2

0

−2.0−2.8 −0.8

y

x

3

−2

0.4

2.4

1.6

4.0

−2.4

1−3

3.2

−1

0.0

−3.2

−0.8x

0−2

y

−4.0

−1.6

0.8

Figure 2.3: Stability zone for Taylor schemes. From top to bottom and left to rightorder 1, 2, 3, 4, 5, 6.

3

5−5

−3

2010

−2y

0

−10

10−3

15

−1

1

x

0

2

−0.5

−1*10−4 −5*10−5

0.0

x

y

0*100

0.5

Figure 2.4: Stability zone for Taylor schemes. Zoom around imaginary axis. Left order5, right order 6.

15

Page 17: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

2.2 The Finite Element method

2.2.1 Theoretical background

The finite element method is based on a variational formulation, which consists in seekingthe solution of a boundary value problem in some function space, typically H1 or H1

0 forthe Poisson equation with Neumann or Dirichlet boundary conditions. This variationalproblem is reduced to a finite dimensional problem, which are the only ones that can behandled by a computer, by seeking the solution in a finite dimensional subspace of theoriginal function space. The variational formulation itself being unmodified or slightlyperturbed by a term with tends to 0 at convergence. For this reasons the mathematicaltools for proving convergence are closely related to the tools for proving existence anduniqueness of the solution of the initial problem. A detailed description can be foundfor example in the book by Ern and Guermond that we follow.

Consider the variational problem: Find u ∈W such that

a(u, v) = f(v) ∀v ∈ V. (2.14)

For elliptic problems, with V = W , the classical theorem for this is the Lax-Milgramtheorem that reads as follows.

Theorem 2 (Lax-Milgram) Let V be a Hilbert space. Assume a is a continuous bi-linear form on V and f is a continuous linear form on V and that a is coercive i.e.

∃α > 0, ∀u ∈ V, a(u, u) ≥ α‖u‖2V .

Then the variational problem admits a unique solution and we have the a priori estimate

∀f ∈ V ′, ‖u‖V ≤1

α‖f‖V ′ .

In the case of hyperbolic problem it is often mandatory or more efficient to have thetrial space, where the solution is sought, be different from the test space in which thetest functions live. In this case the appropriate theoretical tool, called Banach-Necas-Babuska (BNB) theorem in Ern and Guermond.

Theorem 3 (Banach-Necas-Babuska) Let W be a Banach space and let V be a re-flexive Banach space. Assume a is a continuous bilinear form on W × V and f is acontinuous linear form on V and that the following two hypotheses are verified

1) ∃α > 0, infw∈W

supv∈V

a(w, v)

‖w‖W ‖v‖V≥ α.

2) a(w, v) = 0 ∀w ∈W ⇒ v = 0.

Then the variational problem admits a unique solution and we have the a priori estimate

∀f ∈ V ′, ‖u‖V ≤1

α‖f‖V ′ .

The Lax-Milgran theorem is a special case of the BNB theorem. Indeed if V = Wand a is coercive, then for any w ∈ V \ 0 we have

α‖w‖V ≤a(w,w)

‖w‖V≤ sup

v∈V

a(w, v)

‖w‖V.

16

Page 18: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Dividing by ‖w‖V and taking the infimum give condition 1 of BNB. Then if the conditionon the left hand side of the implication of 2 is satisfied, we have for w = v a(v, v) = 0and because of coercivity this implies v = 0.

Condition 1 will play an essential role throughout the lecture. This condition beingsatisfied at the discrete level with a constant α that does not depend on the mesh sizebeing essential for a well behaved Finite Element method. This condition is usuallycalled the inf-sup condition in the literature and this is the name we will use in thislecture. It can be written equivalently

α‖w‖W ≤ supv∈V

a(w, v)

‖v‖V∀w ∈W. (2.15)

And often, a simple way to verify it is, given any w ∈W , to find a specific v(w) dependingon w such that

α‖w‖W ≤a(w, v(w))

‖v(w)‖V≤ sup

v∈V

a(w, v)

‖v‖Vwith a constant α independent of w. For example, when a is coercive, with coercivityconstant α, the inf-sup condition is proven by taking v(w) = w.

Let us now come to the Galerkin discretisation. The principle is simply to constructfinite dimensional subspaces Wh ⊂W and Vh ⊂ V and to write the variational formula-tion (2.14) replacing W by Wh and V by Vh. The finite dimensional space Wh is usuallycalled trial space and Vh is called test space. Expanding the functions on bases of Wh

and Vh this yields a finite dimensional linear system that can be solved with standardmethods if a is bilinear and f is linear. The method can also be extended to the nonlinearcase.

Let us denote by u the solution of the variational problem in W : a(u, v) = f(v) ∀v ∈V , and uh the solution of the variational problem in Wh: a(uh, vh) = f(vh) ∀v ∈ Vh.Then we get by linearity and because Vh ⊂ V that

a(u− uh, vh) = 0, ∀vh ∈ Vh.

This condition is called Galerkin orthogonality.We are now ready to prove using simple arguments a convergence theorem for the

Galerkin approximation:

Theorem 4 Let W , Wh ⊂W , V and Vh ⊂ V be Banach spaces and let a be a continuousbilinear form on W×V with continuity constant C > 0. Assume the exact solution u ∈Wand the approximate solution uh ∈Wh satisfy the Galerkin orthogonality condition:

a(u− uh, vh) = 0, ∀vh ∈ Vh,

and that a satisfies the discrete inf-sup condition for α > 0

α‖wh‖W ≤ supvh∈Wh

a(wh, vh)

‖vh‖V∀wh ∈Wh.

Then the following error estimate holds:

‖u− uh‖W ≤ (1 +C

α) infwh∈Wh

‖u− wh‖W .

17

Page 19: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Proof. For any wh ∈Wh we have

‖u− uh‖W ≤ ‖u− wh‖W + ‖wh − uh‖W .

Then, using first the discrete inf-sup condition and then the Galerkin orthogonality

‖wh − uh‖W ≤1

αsupvh∈Wh

a(wh − uh, vh)

‖vh‖V=

1

αsupvh∈Wh

a(wh − u, vh)

‖vh‖V.

Finally the continuity of the bilinear form a can be expressed as

a(wh − u, vh) ≤ C‖wh − u‖W ‖vh‖V .

It then follows that

‖u− uh‖W ≤ (1 +C

α)‖u− wh‖W .

This being true for all wh ∈Wh the result follows by taking the infimum.

The problem is now reduced to finding a trial space Wh which approximates wellW . This is typically done in the finite element method by choosing an approximationspace containing piecewise polynomials of degree k in which case it can be proven thatinfwh∈Wh

‖u − wh‖L2 ≤ chk+1, where h is related to the cell size. Details can be foundin any Finite Element book, like for example Ern and Guermond. If the discrete inf-supconstant α does not depend on h, the error in the Finite Element approximation is thesame, up to a constant, as the best approximation. The error is said to be optimal inthis case.

Remark 3 In some situations the bilinear form a and the linear form f need to beapproximated in the finite dimensional context, but we will not consider these here. Inpractice if the approximations are consistent the theory remains similar.

2.2.2 Galerkin discretisation of the 1D advection-diffusion equation

The Galerkin discretisation is based on a weak (or variational form of the equation). Inorder to obtain the weak form, the idea is to multiply by a smooth test function andintegrate over the whole domain, with a possible integration by parts to eliminate thehighest derivatives. As in the case of Finite Differences, we consider here only a semi-discretisation in space by Finite Elements. The discretisation in time being handled byan appropriate ODE solver.

Let us describe it on the advection-diffusion problem (assuming periodic boundaryconditions on the domain [0, L]):

∂u

∂t+ a

∂u

∂x− ν ∂

2u

∂x2= 0.

Multiplying by a test function v which does not depend on t and integrating, with anintegration by parts in the last integral and periodic boundary conditions, yields

d

dt

∫ L

0uv dx+ a

∫ L

0

∂u

∂xv dx+ ν

∫ L

0

∂u

∂x

∂v

∂xdx = 0.

18

Page 20: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

The natural space in which this formulation is defined isH1([0, L]) = u ∈ L2([0, L]) | ∂u∂x ∈L2([0, L]). The variational problem thus reads Find u ∈ H1([0, L]) such that

d

dt

∫ L

0uv dx+ a

∫ L

0

∂u

∂xv dx+ ν

∫ L

0

∂u

∂x

∂v

∂xdx = 0 ∀v ∈ H1([0, L]).

Now in order to define a Finite Element approximation, we need to construct a sequenceof subspaces Vh of H1([0, L]) which is dense in H1([0, L]) (in order to get convergence).One subspace is of course enough to compute a numerical approximation. There aremany ways to construct such subspaces. The classical Lagrange Finite Element methodconsists in building a mesh of the computational domain and to assume that the approx-imating function is polynomial say of degree k in each cell. For the piecewise polynomialfunction space to be a included in H1([0, L]) the only additional requirement is thatthe functions are continuous at the cell interfaces. So the subspace Vh on the meshx0 < x1 < · · · < xn−1 is defined by

Vh =vh ∈ C0([a, b]) | vh|[xi,xi+1] ∈ Pk([xi, xi+1])

.

In order to express a function vh ∈ Vh we need a basis of Vh. This can be constructedeasily combining bases of Pk([xi, xi+1]). In order to impose the continuity requirement atthe cell interface, the simplest is to use a Lagrange basis Pk([xi, xi+1]) with interpolationpoints on the edge of the intervals. Given k + 1 interpolation points xi = y0 < y1 <· · · < yk = xi+1 the Lagrange basis functions of degree k denoted by lk,i, 0 ≤ i ≤ k, arethe unique polynomials of degree k verifying lk,i(yj) = δi,j . Because of this property,

any polynomial p(x) ∈ Pk([xi, xi+1]) can be expressed as p(x) =∑k

j=0 p(yj)lj,k(x) andconversely any polynomial p(x) ∈ Pk([xi, xi+1]) is uniquely determined by its valuesat the interpolation points yj , 0 ≤ j ≤ k. Hence in order to ensure the continuityof the piecewise polynomial at the cell interface xi it is enough that the values of thepolynomials on both sides of xi have the same value at xi. This constraint removes onedegree of freedom in each cell, so that the total dimension of Vh is nk and the functionsof Vh are uniquely defined in each cell by their value at the degrees of freedom (whichare the interpolation points) in all the cells. The basis functions denoted of Vh denotedby (ϕi)0≤j≤nk are such that their restriction on each cell is a Lagrange basis function.

Note that for k = 1, corresponding to P1 finite elements, the degrees of freedom arejust the grid points. For higher order finite elements internal degrees of freedom areneeded. For stability and conveniency issues this are most commonly taken to be theGauss-Lobatto points on each cell.

In order to obtain a discrete problem that can be solved on a computer, the Galerkinprocedure consist in replacing H1 by Vh in the variational formulation. The discretevariational problem thus reads: Find uh ∈ Vh such that

d

dt

∫ L

0uv dx+ a

∫ L

0

∂u

∂xv dx+ ν

∫ L

0

∂u

∂x

∂v

∂xdx = 0 ∀vh ∈ Vh.

Now expressing uh (and vh) in the basis of Vh as uh(t, x) =∑nk

j=1 uj(t)ϕj(x), vh(x) =∑nkj=1 vjϕj(x) and plugging these expression in the variational formulation, denoting by

19

Page 21: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

U = (u0, u1, · · · , unk)T and similarly for V yields: Find U ∈ Rnk such that

d

dt

∑i,j

ujvi

∫ L

0ϕi(x)ϕj(x) dx+ a

∑i,j

ujvi

∫ L

0

∂ϕj(x)

∂xϕi(x) dx

+ ν∑i,j

ujvi

∫ L

0

∂ϕi(x)

∂x

∂ϕj(x)

∂xdx = 0 ∀V ∈ Rnk,

which can be expressed in matrix form

V T (MdU

dt+DU +AU) = 0 ∀V ∈ Rnk,

which is equivalent to

MdU

dt+DU +AU = 0

where the square nk × nk matrices are defined by

M = (

∫ L

0ϕj(x)ϕi(x) dx)i,j , D = (a

∫ L

0

∂ϕj(x)

∂xϕi(x) dx)i,j , A = (ν

∫ L

0

∂ϕi(x)

∂x

∂ϕj(x)

∂xdx)i,j .

Note that these matrices can be computed exactly as they involve integration ofpolynomials on each cell. Moreover because the Gauss-Lobatto quadrature rule is exactfor polynomials of degree up to 2k− 1, both A and D can be computed exactly with theGauss-Lobatto quadrature rule. Moreover, approximating the mass matrix M with theGauss-Lobatto rule introduces an error which does not decrease the order of accuracyof the scheme [4] and has the big advantage of yielding a diagonal matrix. This is whatis mostly done in practice.

Matrix Assembly. Usually for Finite Elements the matrices M , D and A are com-puted from the corresponding elementary matrices which are obtained by change ofvariables onto the reference element [−1, 1] for each cell. So∫ L

0ϕi(x)ϕj(x) dx =

n−1∑ν=0

∫ xν+1

ϕi(x)ϕj(x) dx,

and doing the change of variable x = xν+1−xν2 x+ xν+1+xν

2 , we get∫ xν+1

ϕi(x)ϕj(x) dx =xν+1 − xν

2

∫ 1

−1ϕα(x)ϕβ(x) dx,

where ϕα(x) = ϕi(xν+1−xν

2 x+ xν+1+xν2 ). The local indices α on the reference element go

from 0 to k and the global numbers of the basis functions not vanishing on element νare j = kν + α. The ϕα are the Lagrange polynomials at the Gauss-Lobatto points inthe interval [−1, 1].

The mass matrix in Vh can be approximated with no loss of order of the finiteelement approximation using the Gauss-Lobatto quadrature rule. Then because theproducts ϕα(x)ϕβ(x) vanish for α 6= β at the Gauss-Lobatto points by definition of the

20

Page 22: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

ϕα which are the Lagrange basis functions at these points, the elementary matrix M isdiagonal and we have ∫ 1

−1ϕα(x)2 dx ≈

k∑β=0

wGLβ ϕα(xβ)2 = wGLα

using the quadrature rule, where wGLα is the Gauss-Lobatto weight at Gauss-Lobattopoint (xα) ∈ [−1, 1]. So that finally M = diag(wGL0 , . . . wGLk ) is the matrix with k + 1lines and columns with the Gauss-Lobatto weights on the diagonal.

Let us now compute the elements of D. As previously we go back to the interval[−1, 1] with the change of variables x = xν+1−xν

2 x + xν+1+xν2 and we define ϕα(x) =

ϕi(xν+1−xν

2 x+ xν+1+xν2 ). Note that a global basis function ϕi associated to a grid point

has a support which overlaps two cells and is associated to two local basis functions.Thus one needs to be careful to add the two contributions as needed in the final matrix.

We get ϕ′α(x) = xν+1−xν2 ϕ′i(

xν+1−xν2 (x+ 1) + xν). It follows that∫ xν+1

ϕ′j(x)ϕi(x) dx =

∫ 1

−1

2

xν+1 − xνϕ′β(x)ϕα(x)

xν+1 − xν2

dx =

∫ 1

−1ϕ′β(x)ϕα(x) dx.

The polynomial ϕα(x) is of degree k so that ϕ′β(x) is of degree k− 1 so that the Gauss-Lobatto quadrature rule with k + 1 points is exact for the product which is of order2k − 1. Using this rule∫ 1

−1ϕ′β(x)ϕα(x) dx =

k∑m=0

wGLm ϕ′β(xm)ϕα(xm) = wGLα ϕ′β(xα),

As before, because ϕα are the Lagrange polynomials at the Gauss-Lobatto points, onlythe value at xα in the sum is one and the others are 0. On the other hand evaluatingthe derivatives of the Lagrange polynomial at the Gauss-Lobatto points at these Gauss-Lobatto points can be done using the formula

ϕ′α(xβ) =pβ/pαxβ − xα

for β 6= α and ϕ′α(xα) = −∑β 6=α

ϕ′β(xα),

where pα =∏β 6=α(xα − xβ). This formula is obtained straightforwardly by taking the

derivative of the explicit formula for the Lagrange polynomial

ϕα(x) =

∏β 6=α

(x− xβ)∏β 6=α

(xα − xβ)

and using this expression at the Gauss-Lobatto point xβ 6= xα. We refer to [3] for adetailed description.

We can now conclude with the computation of the stiffness matrix A. Having alreadycomputed the expression of the change of variable of the derivatives we can quickly goto the result. We have in each element∫ xν+1

ϕ′j(x)ϕ′i(x) dx =

∫ 1

−1

(2

xν+1 − xν

)2

ϕ′β(x)ϕ′α(x)xν+1 − xν

2dx

=2

xν+1 − xν

∫ 1

−1ϕ′β(x)ϕ′α(x) dx =

2

xν+1 − xν

k∑m=0

wGLm ϕ′β(xm)ϕ′α(xm).

21

Page 23: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

As the polynomial being integrated is of degree 2(k − 1) = 2k − 2 the Gauss-Lobattoquadrature is exact. Here no simplifications occurs in the sum, which has to be computed.Still the expressions of the derivatives at the Gauss-Lobatto points computed above canthen be plugged in.

Time advance and stability. At the end we get as for the finite difference method asystem of differential equations that can be solved with any ODE solver. Let us make afew remarks concerning the stability of the scheme (once discretised in time). As we sawpreviously this depends on whether the eigenvalues of the matrix A is included in thestability zone of the ODE solver. HereA = −M−1(D+A). Note that the matricesM andA are obviously symmetric and thus have only real eigenvalues. On the other hand, for

periodic boundary conditions and integration by parts, yields that∫ ∂ϕj(x)

∂x ϕi(x) dx =

−∫ϕj(x)∂ϕi(x)

∂x dx. Hence D is skew symmetric and has only imaginary eigenvalues.Remember that the stability zones of our explicit ODE solvers lie mostly on the left-hand side of the imaginary axis in the complex plane, and that only the third and fourthorder schemes have a stability zone including a part of the imaginary axis. Hence in thepure advection case ν = 0 A has purely imaginary eigenvalues and the order one andtwo time schemes are always unstable. In order to stabilise the method a procedure thatis often used with a finite element discretisation of a pure advection problem is to adda diffusive term that goes to 0 with the cell size, i.e take ν = α∆x, in this case a smallnegative real part is added to the eigenvalues which are thus pushed into the left half ofthe complex plane and the stability zone is enhanced.

Suboptimality of Finite Element approximation of advection. In the case whenWh = Vh are standard Lagrange Finite Elements the discrete inf-sup constant αh is ofthe order of the space step h. Then one order of approximation is lost, the approximationis not optimal. For P1 finite elements Ern and Guermond [7] (Theorem 5.3. p 222)prove that

c1h < infuh∈Vh

supvh∈Vh

a(uh, vh)

‖uh‖1‖vh‖1< c2h,

where c1 and c2 are two constants independent of h and ‖.‖1 denotes the H1 norm.Better approximations can be found by changing the test space while keeping the

same trial space, in order to find a discrete inf-sup constant that does not depend on h.

2.3 The Discontinuous Galerkin (DG) method

The DG method represents the unknowns like the Finite Element method by piecewisepolynomial functions, but unlike Finite Element methods the polynomials are discon-tinuous at the cell interfaces and a numerical flux is defined at the cell interface in thesame way as for Finite Volume methods.

So on each cell the discrete unknown uh is represented as a linear combination of wellchosen basis functions of the space of polynomials of degree k Pk. The dimension of thisspace is k+1. As no continuity is enforced at the element interface, there is no constrainton the basis functions and generally two kinds of basis functions are used: either theLegendre polynomials which form an orthogonal basis, we then speak of modal DG orone can use a Lagrange basis defined on a set of interpolation points within the cell wethen speak of nodal DG. The interpolation points are generally chosen to be either the

22

Page 24: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Gauss points or the Gauss-Lobatto points which are both very convenient as they allowto express the integrals appearing in the formulation exactly (for Gauss) or almost (forGauss-Lobatto) using the associated quadrature rule.

For the derivation of a DG scheme, the equation is multiplied by a polynomial testfunction on each cell and and integration by parts is used so that a boundary termappears which will allow the coupling between two neighbouring cells. Let us apply ithere to the conservation law

∂u

∂t+∂f(u)

∂x= 0.

We then get

d

dt

∫ xν+1

uv dx+

∫ xν+1

∂f(u)

∂xv dx

=d

dt

∫ xν+1

uv dx−∫ xν+1

f(u)∂v

∂xdx+ (f(u(xν+1))v(xν+1)− f(u(xν))v(xν)) = 0.

(2.16)

The DG method has then two key ingredients.

1. Choose on each cell a finite dimensional representation, usually by a polynomialas said previously.

2. Define a unique numerical flux denoted by gν = g(uL(xν), uR(xν))) at the cellinterface which is constructed from the two values coming from the cells sharingthe interface on the left and on the right. Indeed the approximation of u beingdiscontinuous at the cell interface, the values u(xν) and f(u(xν)) are not definedin a natural way and ingredient of the scheme is to approximate the flux f(u(xν))by the numerical flux gν

At the interface between two cells xν , the Discontinuous Galerkin approximationprovides two values of u(xν), uL coming from the approximation of u on the left of xν anduR corresponding to the value at xν from the right-hand cell. The numerical flux at eachcell interface gν needs to be consistent with f(xν), i.e. gν = f(u(xν))+O(∆xp) for somepositive integer p. A numerical flux of order 2 is the centred flux gν = 1

2(f(uL)+f(uR)).The centred flux amounts to projecting the discontinuous approximation to a continuousFinite Element basis and with yield a skew symmetric derivative matrix. Thus thisscheme is unstable for explicit time discretisations of order 1 and 2. In order to getstable scheme in this case, we need to introduce the notion of unwinding like for FiniteDifferences. This can be done very easily in the definition of the numerical flux bysimply choosing the value of u in the upwind cell only to define the numerical flux. Wehave ∂f(u)

∂x = f ′(u)∂u∂x . This means that locally at each cell interface the direction of thetransport is defined by the sign of f ′(u) (in the case of the linear advection f ′(u) = aand the upwind direction is determined by the sign of a). So the upwind numerical fluxis defined by

gν = g(uL(xν), uR(xν))) =

∣∣∣∣ f(uL) if f ′(uL+uR2 ) ≥ 0,

f(uR) if f ′(uL+uR2 ) < 0.

Choosing as local representation for u and the test function v the Lagrange polyno-mials at the Gauss-Lobatto points simplifies the computation of the fluxes, as in this case

23

Page 25: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

only the Lagrange polynomial associated to the edge node does not vanish at the edge.This situation is different when using Legendre polynomials or Lagrange polynomials atonly interior nodes (like the Gauss points). Note however that Legendre polynomialshave the advantage of having exactly a diagonal mass matrix. This is obtained alsowith Lagrange polynomials at the Gauss-Lobatto points but in this case at the price ofa small quadrature error.

As opposite to the Finite Element method, only local matrices on each element,in practice only the elementary matrices on the [−1, 1] reference interval need to beassembled. The elementary mass matrix M on cell on the reference interval has thecomponents

Mα,β =

∫ 1

−1ϕα(x)ϕβ(x) dx, 0 ≤ α, β ≤ k.

When the basis functions are the Legendre polynomials which form an orthonormalbasis.

The mass matrix in Vh can be approximated with no loss of order of the finiteelement approximation using the Gauss-Lobatto quadrature rule. Then because theproducts ϕα(x)ϕβ(x) vanish for α 6= β at the Gauss-Lobatto points by definition of theϕα which are the Lagrange basis functions at these points, the elementary matrix M isdiagonal and we have ∫ 1

−1ϕα(x)2 dx ≈

k∑β=0

wGLβ ϕα(xβ)2 = wGLα

using the quadrature rule, where wGLα is the Gauss-Lobatto weight at Gauss-Lobattopoint (xα) ∈ [−1, 1]. So that finally M = diag(wGL0 , . . . wGLk ) is the matrix with k + 1lines and columns with the Gauss-Lobatto weights on the diagonal. From this matrix,the local mass matrix Mν+ 1

2on cell [xν , xν+1] can be expressed as

Mν+ 12

=xν+1 − xν

2M.

Let us denote by Kν+ 12

the local matrix containing the derivative of v. In order to get

an expression for the components of Kν+ 12

we introduce the local basis functions and

compute using again the affine change of variable to the reference interval [−1, 1]:∫ xν+1

f(u)∂ϕi∂x

dx =

∫ 1

−1f(u(x))

2

xν+1 − xνϕ′α(x)

xν+1 − xν2

dx =

∫ 1

−1f(u(x))ϕ′α(x) dx.

Then using the Gauss-Lobatto quadrature rule this becomes∫ 1

−1f(u(x))ϕ′α(x) dx ≈

k∑β=0

wGLβ f(u(xβ))ϕ′α(xβ) =k∑

β=0

wGLβ f(uβ)ϕ′α(xβ),

where uβ = u(xβ) is the βth component of u on the Lagrange basis. Denoting Uν+ 12

=

(u0, u1, . . . , uk) on the cell [xν , xν+1], thus defining the component of matrix Kν+ 12

at

line α and column β as being wGLβ ϕ′α(xβ), we get that∫ 1

−1f(u(x))ϕ′α(x) dx ≈

k∑β=0

wGLβ f(uβ)ϕ′α(xβ) = (Kν+ 12f(Uν+ 1

2))α,

where f(Uν+ 12) = (f(u0), f(u1), . . . , f(uk)).

24

Page 26: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Remark 4 Because the Gauss-Lobatto quadrature is exact in this case, we notice thatthe matrix Kν+ 1

2is exactly the matrix associated to the compotents

∫ xν+1

ϕj(x)∂ϕi∂x

dx =

∫ 1

−1ϕβ(x)ϕ′α(x) dx = wGLβ ϕ′α(xβ).

We also notice that this matrix does not depend on the specific interval and is equal tothe matrix on the reference element K = Kν+ 1

2for all ν.

Now plugging all this into the formula (2.16) we get on each cell

V Tν+ 1

2

Mν+ 12

dUν+ 12

dt= V T

ν+ 12

Kf(Uν+ 12)− (gν+1vk − gνv0).

Then introducing the vector Gν+ 12∈ Rk whose only non zero components are the first

which is gν and the last which is gν+1, we get the following system of ODE

xν+1 − xν2

MdUν+ 1

2

dt= Kf(Uν+ 1

2) +Gν+ 1

2.

The numerical flux gν depends on values of u coming from the neighbouring cell, this iswhere the coupling between the cells takes place. The matrix M being diagonal there isno linear system to solve. Simple examples of fluxes in the linear case f(u) = au are thesame as for the finite volume method with the centred or upwind fluxes, the two valuesbeing used here are the values of u on the interface coming from the two cells sharingthe interface, this will be the local value of uk from the left cell and the local value ofu0 from the right cell.

25

Page 27: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Chapter 3

Linear systems

3.1 Expressions of the Maxwell equations

3.1.1 The 3D Maxwell equations

The general expression for the Maxwell equations reads

−∂D

∂t+∇× H = J, (3.1)

∂B

∂t+∇× E = 0, (3.2)

∇ · D = ρ, (3.3)

∇ · B = 0, (3.4)

D = εE (3.5)

B = µH. (3.6)

Initial and boundary conditions are needed in addition to fully determine the solution.The last two relations are called the constitutive laws and permittivity ε and the

permeability µ depend on the material. They can be discontinuous if several materialsare considered. In vacuum ε = ε0 and µ = µ0 are constants and they verify ε0µ0c

2 = 0where c is the speed of light. Then D and H are generally eliminated of the system.

Note that taking the divergence of (3.1) yields

∂∇ ·D∂t

= −∇ · J =∂ρ

∂t

using the continuity equation ∂ρ∂t + ∇ · J = 0. Hence if (3.3) is satisfied at time t = 0

it will be satisfied at all times. In the same way if ∇ · B = 0 at the initial time it willremain so for all times.

3.1.2 The 2D Maxwell equations

We consider the Maxwell equations in vacuum on a two dimensional domain Ω on whichthe fields are independent of the z variable. Then the electromagnetic field obeys to twosets of decoupled equations, the first of which involving the (Ex, Ey, Bz) components (TEmode) and the second involving the (Ez, Bx, By) components (TM mode). We present

26

Page 28: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

only the first system, the other can be dealt with in a similar manner. This system reads

∂E

∂t− c2curlB = − 1

ε0J, (3.7)

∂B

∂t+ curl E = 0, (3.8)

div E =ρ

ε0. (3.9)

where E = (Ex, Ey)T , B = Bz, curlBz = (∂yBz,−∂xBz)T , curl E = ∂xEy − ∂yEx, and

div E = ∂xEx + ∂yEy.In 2D Maxwell’s equations can be split into two independent parts called the TE

(transverse electric) mode and TM (transverse magnetic) mode. Mathematically theyhave the same structure. So it will be enough to study one of them. Let us for exampleconsider the TE mode that writes

∂E

∂t− c2curlBz = − 1

ε0J, (3.10)

∂Bz∂t

+ curl E = 0, (3.11)

div E =ρ

ε0. (3.12)

A condition for well-posedness of the Maxwell equations is that the sources J and ρverify the continuity equation

∂ρ

∂t+ div J = 0. (3.13)

3.1.3 The 1D Maxwell equations

The system can be further decoupled in 1D, assuming that the fields only depend on x.Then (3.7) becomes

∂Ex∂t

= − 1

ε0Jx, (3.14)

∂Ey∂t

+ c2∂Bz∂x

= − 1

ε0Jy, (3.15)

∂Bz∂t

+∂Ey∂x

= 0, (3.16)

∂Ex∂x

ε0. (3.17)

Note that here we decouple completely the propagative part of the electric field which isin 1D only Ey from its ”static” part Ex. Components Ey and Bz are coupled by equations(3.15) and (3.16) and Ex is given either by the first component of the Ampere equation(3.14) or by Gauss’s law (3.17), which are equivalent provided the initial conditionsatisfies Gauss’s law and the 1D continuity equation ∂ρ

∂t+∂Jx∂x = 0, which are compatibility

conditions.

3.1.4 Mixed Finite Element discretisation

We shall construct an arbitrary order mixed Finite Element approximation of the 1DMaxwell equations (3.15)-(3.16). For this we define a mesh 0 = x0 < x1 < x2 < · · · <

27

Page 29: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

xN−1 < L of the periodic interval [0, L[. As we consider periodic boundary conditionsthe values at L will be the values at 0.

A Finite Element method is based on a variational formulation. In the case of mixedFinite Elements, one of the equation is kept in strong form (in our case (3.15)) andthe other is put in weak form by integrating by parts after having multiplied by a testfunction. This yields the following variational formulation:Find (E,B) ∈ H1

] ([0, L])× L2] ([0, L]) such that

d

dt

∫ L

0E(x, t)F (x) dx− c2

∫ L

0B(x, t)

∂F

∂x(x) dx (3.18)

= − 1

ε0

∫ L

0J(x, t)F (x) dx ∀F ∈ H1

] ([0, L]),

d

dt

∫ L

0B(x, t)C(x) dx+

∫ L

0

∂E

∂x(x, t)C(x) dx = 0 ∀C ∈ L2

] ([0, L]). (3.19)

The ] subscript stands for spaces of periodic functions.We define the discrete subpaces Vk ⊂ H1

] ([0, L]) and Wk ⊂ L2] ([0, L]) as follows

Vk = F ∈ C0] ([0, L]) | F|[xi,xi+1] ∈ Pk,

Wk = C ∈ L2] ([0, L]) | C|[xi,xi+1] ∈ Pk−1,

where we denote by Pk the space of polynomials of degree less or equal to k. Thefunctions of Vk are continuous and piecewise polynomials of degree k and the functionsof Wk piecewise polynomials of degree k− 1 with no continuity requirements at the gridpoints. The dimension of Pk the space of polynomials of one variable of degree less orequal to k is k+ 1. It follows that, due to the continuity requirement at the grid points,the dimension of Vk is Nk for N cells, and the dimension of W0 is also Nk. Notice thatthe derivatives of functions of Vk are in Wk.

The discrete variational formulation in the spaces Vk and Wk then readsFind (Eh, Bh) ∈ Vk ×Wk such that

d

dt

∫ L

0Eh(x, t)F (x) dx− c2

∫ L

0Bh(x, t)

∂F

∂x(x) dx = − 1

ε0

∫ L

0J(x, t)F (x) dx ∀F ∈ Vk,

(3.20)

d

dt

∫ L

0Bh(x, t)C(x) dx+

∫ L

0

∂Eh∂x

(x, t)C(x) dx = 0 ∀C ∈Wk.

(3.21)

We shall now express this variational formulations in finite dimensional spaces inmatrix form using appropriate basis functions of the spaces Vk and Wk. In the case ofhigh order methods we need to keep in mind that the condition number of the elementarymass matrices should be kept as low as possible in order to avoid problems coming fromround-off errors. We shall consider here for simplicity only Lagrange Finite Elements,where the degrees of freedom are point values at Lagrange interpolating points.

It is well known in particular that Lagrange Finite Elements with uniformly dis-tributed interpolation points (degrees of freedom) lead to very ill conditioned matricesfor moderately large values of k. A much better option is to use Lagrange polynomialsat Gauss points. This is the best choice for Wk. For Vk we have the additional continuitycondition at the grid points which forces us to put degrees of freedom at the grid points.Then the best choice is the Gauss-Lobatto points.

28

Page 30: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Remark 5 Note that if one does not want to stick to Lagrange Finite Elements a naturalchoice of basis functions for Wk would be the orthonormal Legendre polynomials for whichthe mass matrix would be identity.

Let us denote by (ϕi)0≤kN−1 the basis of Vk and (ψj)0≤j≤kN−1 the basis of Wk.Let us know compute the different integrals appearing in the variational formulation

(3.20)-(3.21) using the basis functions. Expressing Eh and F using the basis (ϕi) andBh and C in the basis (ψj). We get

Eh(x, t) =

kN−1∑j=0

Ej(t)ϕj(x), F (x) =

kN−1∑i=0

Fiϕi(x),

Bh(x, t) =

kN−1∑j=0

Bj(t)ψj(x), C(x) =

kN−1∑i=0

Fiψi(x).

Note that as both bases are Lagrange bases the coefficients Ei, Fi, Bi, Ci are simply thevalues of the corresponding functions Eh, F , Bh and C at the corresponding points.

Plugging these expression into (3.20)-(3.21) we obtain

kN−1∑i=0

kN−1∑j=0

[dEj(t)

dtFi

∫ L

0ϕi(x)ϕj(x) dx−Bj(t)Fi

∫ L

0ϕ′i(x)ψj(x) dx

](3.22)

=

N−1∑i=0

Fi

∫ L

0J(x)ϕi(x) dx

kN−1∑i=0

kN−1∑j=0

[dBj(t)

dtCi

∫ L

0ψi(x)ψj(x) dx+ Ej(t)Ci

∫ L

0ϕ′j(x)ψi(x) dx

]= 0. (3.23)

Denote by

E(t) =

E0(t)...

EN−1(t)

, B(t) =

B0(t)...

BN−1(t)

, F =

F0...

FN−1

, C =

C0...

CN−1

,

and

J(t) =

∫ L

0 J(t, x)ϕ0(x) dx...∫ L

0 J(t, x)ϕN−1(x) dx

.

Let us now introduce the mass matrices

ME = ((

∫ L

0ϕi(x)ϕj(x)))0≤i≤Nk−1,0≤j≤Nk−1, MB = ((

∫ L

0ψi(x)ψj(x)))0≤i≤Nk−1,0≤j≤Nk−1,

and the derivative matrix

K = ((

∫ L

0ϕ′j(x)ψi(x)))0≤i≤Nk−1,0≤j≤Nk−1.

29

Page 31: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

The variational formulations (3.22)-(3.23) then become

FTMEdE(t)

dt− c2FTKTB = − 1

ε0FT J ∀F ∈ RN−1,

CTMBdB(t)

dt+ CTKE = 0 ∀C ∈ RN−1.

As ME and MB are non singular matrices this can be written equivalently

dE(t)

dt−M−1

E KTB = 0, (3.24)

dB(t)

dt+M−1

B KE = 0. (3.25)

As usual for Finite Elements the matrices MB, ME and K are computed from thecorresponding elementary matrices that are obtained by change of variables onto thereference element [−1, 1] for each cell. So∫ L

0ϕi(x)ϕj(x) dx =

N−1∑n=0

∫ xn+1

xn

ϕi(x)ϕj(x) dx,

and doing the change of variable x = xn+1−xn2 x+ xn+1+xn

2 , we get∫ xn+1

xn

ϕi(x)ϕj(x) dx =xn+1 − xn

2

∫ 1

−1ϕα(x)ϕβ(x) dx,

where ϕα(x) = ϕi(xn+1−xn

2 x + xn+1+xn2 ). The local indices α on the reference element

go from 0 to k and the global numbers of the basis functions not vanishing on elementn are j = kn+α. The ϕα are the Lagrange polynomials at the Gauss-Lobatto points inthe l’interval [−1, 1].

The mass matrix in Vk can be approximated with no loss of order of the finite elementapproximation using the Gauss-Lobatto quadrature rule. Then because the productsϕα(x)ϕβ(x) vanish for α 6= β at the Gauss-Lobatto points by definition of the ϕα which

are the Lagrange basis functions at these points, the elementary matrix ME is diagonaland we have ∫ 1

−1ϕα(x)2 dx ≈

k∑β=0

wGLβ ϕα(xβ)2 = wGLα

using the quadrature rule, where wGLα is the Gauss-Lobatto weight at Gauss-Lobattopoint (xα) ∈ [−1, 1]. So that finally ME = diag(wGL0 , . . . wGLk ) is the matrix with k + 1lines and columns with the Gauss-Lobatto weights on the diagonal.

In the same spirit we use Gauss quadrature to compute the mass matrix in Wk. Inthis case, the quadrature is exact and we get in the same way an elementary matrixwhich is diagonal of order k where the diagonal terms are the Gauss weights: MB =diag(wG0 , . . . w

GLk−1).

Let us now compute the elements of K. As previously we go back to the interval[−1, 1] with the change of variables x = xn+1−xn

2 x + xn+1+xn2 and we define ϕα(x) =

ϕi(xn+1−xn

2 x+ xn+1+xn2 ) and the same for ψi. Note however that a global basis function

ϕi associated to a grid point has a support which overlaps two cells and is associated to

30

Page 32: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

two local basis functions whereas the global basis functions ψi have all only a supporton one cell and are only associated to one local basis functions. This is the reason whythere are k+ 1 local basis functions ϕα and only k local basis functions ψα even thoughthere are in our case the same number of global basis functions for Vk and Wk.

We then get ϕ′α(x) = xn+1−xn2 ϕ′i(

xn+1−xn2 (x+ 1) + xn). It follows that∫ xn+1

xn

ϕ′j(x)ψi(x) dx =

∫ 1

−1

2

xn+1 − xnϕ′β(x)ψα(x)

xn+1 − xn2

dx =

∫ 1

−1ϕ′β(x)ψα(x) dx.

Both ϕ′β(x) and ψα(x) are of degree k − 1 so that the Gauss-Lobatto quadrature rulewith k + 1 points is exact. Using this rule∫ 1

−1ϕ′β(x)ψα(x) dx =

k∑m=0

wGLm ϕ′β(xGLm )ψα(xGLm ).

In this case there is no vanishing term, but this expression can be used to compute theelementary matrix K along with the formula for the Lagrange polynomial at the Gausspoints

ψα(xGLm ) =πβ 6=α(xGLm − xGβ )

πβ 6=α(xGα − xGβ ).

On the other hand evaluating the derivatives of the Lagrange polynomial at the Gauss-Lobatto points at these Gauss-Lobatto points can be done using the formula

ϕ′α(xGLβ ) =pβ/pα

xGLβ − xGLαfor β 6= α and l′α(xα) = −

∑β 6=α

l′β(xα).

Note that the support of a function ψj is restricted to only one cell [xn, xn+1], of themesh. Therefore matrix K is consists in blocks of size k × (k + 1) with only one blockby group of k lines and with a common column corresponding to a grid point for twosuccessive blocks.

3.1.5 B-spline Finite Elements

Let us now construct a different kind of Finite Element discretization using B-Splines asbasis functions.

In order to define a family of n B-splines of degree k, we need (xi)06i6n+k a non-decreasing sequence of points on the real line called knots in the spline terminology.There can be several knots at the same position. In the case when there are m knots atthe same point, we say that the knot has multiplicity m.

Definition 4 (B-Spline) Let (xi)06i6n+k be a non-decreasing sequence of knots. Thenthe j-th B-Spline (0 ≤ j ≤ n− 1) denoted by Nk

j of degree k is defined by the recurrencerelation:

Nkj (x) = wkj (x)Nk−1

j (x) + (1− wkj+1(x))Nk−1j+1 (x)

where,

wkj (x) =x− xj

xj+k − xjN0j (x) = χ[xj ,xj+1[(x)

We note some important properties of a B-splines basis:

31

Page 33: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

• B-splines are piecewise polynomial of degree k,

• B-splines are non negative

• Compact support; the support of Nkj is contained in [tj , .., tj+k+1]

• Partition of unity:∑n−1

i=0 Nki (x) = 1, ∀x ∈ R

• Local linear independence

• If a knot xi has a multiplicity m then the B-spline is C(k−m) at xi.

Figure 3.1: All B-splines functions associated to a knot sequence defined by n = 9, k = 2,T = 000, 1

414 ,

12

12 ,

34

34 , 111

A key point for constructing discrete Finite Element spaces for the Maxwell equationcomes from the recursion formula for the derivatives:

Nki′(x) = k

(Nk−1i (x)

xi+k − xi−

Nk−1i+1 (x)

xi+k+1 − xi+1

). (3.26)

It will be convenient to introduce the notation Dki (x) = k

Nk−1i (x)

xi+k−xi . Then the recursion

formula for derivative simply becomes

Nki′(x) = Dk

i (x)−Dki+1(x). (3.27)

Remark 6 In the case where all knots, except the boundary knots are of multiplicity 1,the set (Nk

i )0≤i≤n−1 of B-splines of degree k forms a basis of the spline space defined by

Sk = v ∈ Ck−1([x0, xn]) |v|[xi,xi+1] ∈ Pk([xi, xi+1]).

The boundary knots are chosen to have multiplicity k + 1 so that the spline becomesinterpolatory on the boundary in order to simplify the application of Dirichlet boundaryconditions.

Then due to the definitions if follows immediately that (Dki )1≤i≤n−1 is a basis of

Sk−1. Note that if the first knot has multiplicity k+ 1, Dk0 will have a support restricted

to one point and be identically 0.

32

Page 34: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Remark 7 Splines can be easily defined in the case of periodic boundary conditions bytaking a periodic knot sequence.

Assuming only knots of multiplicity 1 and denoting by Sk] the set of periodic splines

associated to a periodic knot sequences, we can take Vk = Sk] whose basis functions are

the Nki and Wk = Sk−1

] with basis functions the Dki . This defines the Finite Element

spaces that we can use with the discrete variational formulation of Maxwell’s equations(3.20)-(3.21). We can then construct the mass and derivative matrices like for theLagrange Finite Elements, just replacing the basis functions by their spline counterparts,i.e. ϕi by Nk

i and ψi by Dki . The matrices can be computed with no quadrature error

using adequate Gauss or Gauss-Lobato formulas. We then get a linear system which hasthe form (3.24)-(3.25). Note that in this case the mass matrices will not become diagonalthanks to the quadrature formula. However, as one of the two variational formulations,the Faraday equation (3.21) in our case (but it could have been the other one), hasnot been integrated by part it can be written in strong form in the discretization spacethanks to the choice of the spaces. Indeed, we have that the derivatives of the functionsof Vk are in Wk. Hence ∂Eh

∂x ∈ Wk and (3.21) implies that ∂Bh∂t + ∂Eh

∂x is a function ofWk which is orthogonal to all functions of Wk and thus vanishes. The second variationalformulation is thus equivalent to the strong form

∂Bh∂t

+∂Eh∂x

= 0.

Let us now write the expressions ofBh and Eh in their respective basis: Bh =∑

i Bi(t)Dki (x)

and Eh =∑

i Ei(t)Nki (x). Note that unlike for Lagrange finite elements, the coefficients

Bi(t) and Ei(t) on the bases are not values of the discrete functions at some given points.Then taking the derivative with respect to x of Eh and using the B-spline derivative for-mula (3.27) we find

∂Eh∂x

=∑i

Ei(t)(Nki )′(x) =

∑i

Ei(t)(Dki (x)−Dk

i+1(x)) =∑i

(Ei(t)− Ei−1)Dki (x).

Hence identifying the coefficients of the basis, the discrete Faraday equation reduces inthis case to

dBidt

= Ei(t)− Ei−1(t).

On the other hand, as in the case of the mixed Lagrange Finite Elements the discretematrix form of Ampere’s law writes

MVdEdt

= KTB,

where MV = ((∫Nki (x)Nk

j (x) dx))0≤i,j≤n−1 and K = ((∫

(Nki )′(x)Dk

j (x) dx))0≤i,j≤n−1.

3.1.6 Variationnal formulations for the 2D Maxwell equations

In order to introduce the Finite Element formulation, we need the variational form ofMaxwell’s equations (3.10)-(3.12). The unknowns of Maxwell’s equations live in relatedfunction spaces.

33

Page 35: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Indeed in two dimensions we have the following diagrams, which are called exactsequences:

H1(Ω)grad−→ H(curl ,Ω)

curl−→ L2(Ω)

andH(curl ,Ω)

curl−→ H(div ,Ω)div−→ L2(Ω).

Note that curlϕ ∈ L2(Ω)2 is equivalent to∇ϕ ∈ L2(Ω)2 and hence the spacesH(curl ,Ω)and H1(Ω) are identical.

The exact sequences mean that the image of the space on the left hand side of thearrow by the operator on top of the arrow is included in the space on the right handside of the arrow and moreover that it is equal to the kernel of the following operator.

In order to conserve at the discrete level the properties of the continuous equations,it is necessary to look for the unknowns in the spaces associated to one of the exactsequence and introduce discrete spaces satisfying the same exact sequence property.This will be convenient in practice as one of Ampere’s law or Faraday’s law can be keptin strong form removing the need for inverting a mass matrix. Moreover this settingenables to prove stability and convergence in a very general manner [1, 2].

Thus, we have two choices for the variational form, either to use a weak form ofAmpere’s law and keep Faraday’s law as it is or the opposite. The first option thenconsists in looking for E ∈ H(curl ,Ω) and Bz ∈ L2(Ω) using the last arrow of thefirst diagram and the second option in looking for E ∈ H(div,Ω) and Bz ∈ H1(Ω) =H(curl ,Ω) using the first arrow of the second diagram. Let us consider here the firstoption.

We shall need the following 2D Green formulae to derive the variational formulations:∫Ω

F · curlC −∫

Ωcurl FC =

∫∂Ω

(F · τ )C ∀F ∈ H(curl ,Ω), C ∈ H1(Ω), (3.28)

∫Ω

div F q +

∫Ω

F · ∇q =

∫∂Ω

(F · n) q ∀F ∈ H(div ,Ω), q ∈ H1(Ω). (3.29)

We shall look for E ∈ H(curl ,Ω) and Bz ∈ L2(Ω). In order to get the weak form,we take the scalar product of (3.10) with a test function F ∈ H(curl,Ω) and integrateon Ω

d

dt

∫Ω

E · F− c2

∫Ω

curlBz · F = − 1

ε0

∫Ω

J · F.

Using the Green formula (3.28) this becomes, assuming the boundary term vanishes,which is the case for perfect conductor or periodic boundary conditions

d

dt

∫Ω

E · F + c2

∫ΩBz curl F = − 1

ε0

∫Ω

J · F ∀F ∈ H(curl ,Ω). (3.30)

For Faraday’s law, we multiply by C ∈ L2(Ω) and integrate on Ω which yields

d

dt

∫ΩBz C +

∫Ω

curl EC = 0 ∀C ∈ L2(Ω). (3.31)

For Gauss’s law, we multiply by q ∈ H1(Ω) and integrate on Ω which yields∫Ω

div E q =1

ε0

∫Ωρ q.

34

Page 36: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

And using (3.29) and assuming that E · n = 0 on the boundary or periodic boundaryconditions, we obtain that

−∫

ΩE · ∇q =

1

ε0

∫Ωρ q ∀q ∈ H1(Ω). (3.32)

Finally, let us also write the weak form of the continuity equation (3.13), that wemultiply by q ∈ H1(Ω) and integrate using (3.29) and the fact that J · n = 0 on theboundary or periodic boundary conditions, like in the previous case. We then get

d

dt

∫Ωρ q =

∫Ω

J · ∇q ∀q ∈ H1(Ω). (3.33)

Remark 8 Let us note that if the weak form of Gauss’ law (3.32) is verified at t = 0 andif the weak continuity equation (3.33) is verified, the weak form of Gauss’ law is verifiedfor all times. Indeed, for any q ∈ H1(Ω), curl∇q = 0 and hence ∇q ∈ H(curl ,Ω), thenwe can use ∇q as a test function in (3.30), which becomes

d

dt

∫Ω

E · ∇q = −∫

ΩJ · ∇q ∀q ∈ H1(Ω).

Then, using (3.33),d

dt

(∫Ω

E · ∇q +

∫Ωρ q)∀q ∈ H1(Ω),

which gives the desired result.

Let us now introduce the second variational formulation which involves E ∈ H(div,Ω)and Bz ∈ H1(Ω)(= H(curl ,Ω)). In order to get the variationl form, we take the scalarproduct of (3.10) with a test function F ∈ H(div,Ω) and integrate on Ω

d

dt

∫Ω

E · F− c2

∫Ω

curlBz · F = − 1

ε0

∫Ω

J · F, ∀F ∈ H(div,Ω). (3.34)

For Faraday’s law, we multiply by C ∈ L2(Ω) and integrate on Ω which yields

d

dt

∫ΩBz C +

∫Ω

curl EC = 0,

Using the Green formula (3.28) this becomes

d

dt

∫ΩBz C +

∫Ω

E · curlC = 0 ∀C ∈ H1(Ω). (3.35)

3.1.7 Discretization using conforming finite elements

In order to keep the specific features of Maxwell’s equations at the discrete level whichare useful in different contexts, we shall consider finite dimensional subspaces endowedwith the same exact sequence structure as in the continuous level [2, 1, 10]. Let us firstderive the linear system that comes out of this discretization. Let ψii=1...N be a basisof W ⊂ H(curl,Ω) and ϕkk=1...M a basis of V ⊂ L2(Ω). Then denoting by σWi thedegrees of freedom associated to ψii=1...N and by σVk the degrees of freedom associated

35

Page 37: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

to ϕkk=1...M . In the case of Lagrange Finite Elements, this degrees of freedom are justpoint values. We can write elements of W and V respectively

Eh =N∑i=1

σWi (Eh)ψi, Bh =M∑k=1

σVk (Bh)ϕk.

Replacing the continuous spaces by the discrete spaces in the variational formulations(3.30) and (3.31) we get the following discrete problem:Find (Eh, Bh) ∈W × V such that

d

dt

∫Ω

E ·ψi dx−∫

ΩB (curlψi) dx = −

∫Ω

J ·ψi dx, ∀i = 1 . . . N, (3.36)

d

dt

∫ΩB ϕk dx +

∫Ω

(curl E)ϕk dx = 0, ∀k = 1 . . .M, (3.37)

which becomes when E and B are decomposed on the respective bases of W and V

MWdE

dt−KB = J (3.38)

MVdB

dt+ KTE = 0 (3.39)

where E = (σWi (Eh))1≤i≤N (resp. B = (σVk (Bh))1≤k≤M ) denote vectors of degrees offreedom for the discrete electric and magnetic fields, with

(MW )1≤i,j≤N =

∫Ωψj ·ψi dx, (MV )1≤i,j≤M =

∫Ωϕiϕj dx,

(K)1≤i≤N, 1≤j≤M =

∫Ωϕj(curlψi) dx.

Remark 9 Notice that the structure of this linear system is exactly the same as in the1D case. Hence the same time schemes with the same properties can be used.

As we already noticed in the 1D case, the exact sequence structure of our FiniteElement spaces enables us to express the discrete variational formulation where no Greenformula (or integration by parts) was used (3.37) in our case by a strong form. Indeedthe exact sequence structure of our discrete spaces implies in particular that if Eh ∈W ,we have curl Eh ∈ V . Hence we can express curl Eh on the basis ϕkk=1,...,M of V whichyields

curl Eh =

M∑l=1

σVl (curl Eh)ϕl =

M∑l=1

σVl (

N∑j=1

σWj (Eh)(curlψj))ϕl =

M∑l=1

N∑j=1

σWj (Eh)σVl (curlψj)ϕl.

In particular we get that σVl (curl Eh) =∑N

j=1 σWj (Eh)σVl (curlψj), and injecting this

expression in the discrete Faraday law∫Ω

(curl E)ϕk dx =

∫Ω

M∑l=1

N∑j=1

σWj (E)σVl (curlψj)ϕlϕk dx

=

M∑l=1

N∑j=1

∫Ωϕlϕk dx σ

Vl (curlψj) σ

Wj (E),

36

Page 38: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

which is the kth line (for k from 1 to M) of the vector MVRE where R is the matrixdefined by

(R)1≤i≤M, 1≤j≤N = σVi (curlψj),

so that, as MV is non singular, the system (3.38)-(3.39) is algebraically equivalent to thesystem

MWdE

dt−KB = J, (3.40)

dB

dt+RE = 0, (3.41)

This new formulation yields an explicit expression of B which can then be computedwithout solving a linear system.

Now having expressed the general structure that we want our Finite Element spacesto have and its consequences, there is still a wide variety of choices of Finite Elementspaces that verify these exact sequence property. Let us define some classical spaces onquads and triangles.

On rectangular meshes the cells of which are denoted by Ki, 1 ≤ i ≤ r, the threeactual subspaces of the exact sequence X ⊂ H1(Ω), W ⊂ H(curl,Ω) and V ⊂ L2(Ω)can be defined as follows

X = χ ∈ H1(Ω) | χ|Ki ∈ Qk(Ki),

W = ψ ∈ H(curl,Ω) | ψ|Ki ∈(

Qk−1,k(Ki)Qk,k−1(Ki)

), ∀i = 1, . . . , r,

V = ϕ ∈ L2(Ω) | ϕ|Ki ∈ Qk−1(Ki) , ∀i = 1, . . . , r.

where Qm,n =xiyj , 0 ≤ i ≤ m, 0 ≤ j ≤ n

, with the particular case Qm,m is simply

denoted by Qm in the classical way.All these Finite Element spaces are piecewise polynomials for scalar fields in the case

of X and V and for each component of a field for W . In the case of V which is just inL2(Ω) there is no additional continuity requirement at the cell interface. In the case ofX the inclusion in H1(Ω) imposes continuity at the cell interface and in the case of Wthe inclusion in H(curl ,Ω) imposes continuity of the tangential component of the fieldat the cell interface.

The space Qk is the standard continuous Lagrange Finite Element space on quads.The space W is known as the first family of edge elements H(curl)-conforming of Nedelec[13] and the space V is the space of discontinuous functions which restrict to a polynomialof degree k−1 with respect to each variable on each cell. This is the kind of approximationused in Discontinuous Galerkin methods.

After having defined the spaces there are still many choices for the degrees of freedomwhich define the actual basis functions. In the interpretation of Maxwell’s equations asdifferential forms it is natural to take the degrees of freedom for X which correspondsto 0-forms as point values, the degrees of freedom for W which corresponds to 1-formsas edge integrals, and the degrees of freedom for V which corresponds to 2-forms as cellintegrals. But such a choice is not mandatory. The Cohen Monk Finite Elements forW are based on Lagrange degrees of freedom (point values) for Maxwell at Gauss orGauss-Lobatto points. This has the advantage of leading to a diagonal mass matrix MW

if the mesh is cartesian thanks to the Gauss-Lobatto quadrature formula [4, 5].

37

Page 39: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Let us now introduce in detail the degrees of freedom that are obtained by an inter-pretation in terms of differential forms, which have very convenient properties. For this,two types of 1D basis functions are needed in a tensor product construction on quads,first the nodal basis functions which typically are the standard Lagrange basis functionsand then the edge basis functions, which are constructed from the nodal basis functionsand whose degrees of freedom are edge integrals. Let us consider the 1D reference ele-ment [−1, 1] on which we define the Gauss-Lobatto points (xi)0≤i≤k. Note that uniforminterpolation points could also be used for the construction, but they are not stable forhigher degrees. We denote by lk,i, 0 ≤ i ≤ k the Lagrange basis functions associated tothese points. This will define the local basis, on each element, of the discrete space X.This is a standard Lagrange Finite Element for which the degrees of freedom are thepoint values at the interpolation points and we have lk,i(xj) = δi,j .

Our aim is now to use this Lagrange basis to construct a basis ei 0 ≤ i ≤ k − 1 forW the next space in the sequence. This should be such that the derivatives of linearcombinations of the Lagrange basis functions are exactly represented. It will be naturalto define the degrees of freedom of this space to be integrals between two successiveinterpolation points, so that the degrees of freedom of a derivative u = dφ

dx can beexpressed directly with respect to the degrees of freedom of φ in X. Indeed∫ xν+1

dx(x) dx = φ(xν+1)− φ(xν).

Next we find that the basis associated to these degrees of freedom, i.e. verifying∫ xj

xj−1

ei(x) dx = δi,j , 1 ≤ j ≤ k.

This can be expressed (see [8]) by

ei(x) = −i−1∑ν=0

dlk,νdx

(x), 1 ≤ j ≤ k. (3.42)

Indeed, we have for 1 ≤ i, j ≤ k

∫ xj

xj−1

ei(x) dx = −i−1∑ν=0

∫ xj

xj−1

dlk,νdx

(x) dx = −i−1∑ν=0

(lk,ν(xj)− lk,ν(xj−1))

= −i−1∑ν=0

(δν,j − δν+1,j) = −(δ0,j − δi, j) = δi,j

as δ0,j = 0 for all 1 ≤ j ≤ k.Now having the local 1D basis functions (lk,i)0≤i≤k and (ei)1≤i≤k, the local 2D basis

functions are defined using products of this basis functions.The local basis functions defining X are the classical Qk basis functions lk(x, y) =

lk,i(x)lk,j(y) and the degrees of freedom the values at the points xiyj 0 ≤ i, j ≤ k, wherethe xi as well as the yj are the k + 1 Gauss-Lobatto points.

Let us denote by P the set of local basis functions on which W is build

P =

p =

(p1

p2

), with p1 ∈ Qk−1,k, p2 ∈ Qk,k−1

.

38

Page 40: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Hence the basis functions are of two forms

e1i,j =

(ei(x)lk,j(y)

0

), 1 ≤ i ≤ k, 0 ≤ j ≤ k e2

i,j =

(0

lk,i(x)ej(y)

), 0 ≤ i ≤ k, 1 ≤ j ≤ k.

The degrees of freedom associated to the first set of basis functions are of the form

p 7→∫ xi

xi−1

p1(x, yj) dx 1 ≤ i ≤ k, 0 ≤ j ≤ k,

and the degrees of freedom associated to the second set of basis functions are of the form

p 7→∫ yj

yj−1

p2(xi, y) dy 0 ≤ i ≤ k, 1 ≤ j ≤ k.

Finally for V the local polynomial space is Qk−1 and the degrees of freedom arecell integrals. Hence the local basis functions can be expressed as s(x, y) = ei(x)ej(y)1 ≤ i, j ≤ k and the corresponding degrees of freedom are defined by

p ∈ Qk−1 7→∫ xi

xi−1

∫ yj

yj−1

p(x, y) dx dy.

These compatible Finite Element spaces enable to express the strong form of one of theMaxwell’s equations in a very simple for directly relating the degrees of freedom usingonly the connectivity of the mesh and no geometric information like distances, lengthsor areas. It is not modified by a compatible mapping.

On more general quad meshes the Finite Elements are defined via a bilinear trans-formation from a rectangular reference element associated to the spaces defined for onesingle element in the rectangular case. This is straightforward for the spaces of scalarfields X and V . But care must be taken for the space of vector fields W for which thevector valued basis functions need to be transformed in a covariant way to preserve theinclusion in H(curl ,Ω) of the discrete space W .

On triangular cells the discrete spaces are defined by

W = ψ ∈ H(curl,Ω) | ψ|Ti ∈ P2k−1(Ti) + Pk−1(Ti)

(y−x

), ∀i = 1, . . . , r,

V = ϕ ∈ L2(Ω) | ϕ|Ti ∈ Pk−1(Ti) , ∀i = 1, . . . , r,

where Pk−1 denotes the set of polynomials of degree exactly k− 1. The space V is Pk−1

on each element and discontinuous across element boundaries (conforming in L2(Ω)), sois straightforward to construct. For the space W , we have again used the first familyof edge elements of Nedelec [13], conforming in H(curl,Ω), but we have changed thedegrees of freedom.

3.2 The discontinuous Galerkin method

3.2.1 The Riemann problem for a 1D linear system

A general linear system of conservation laws in 1D can be written in the general form

∂U

∂t+A

∂U

∂x= 0,

39

Page 41: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

where U(t, x) is a vector in Rn and A a given matrix with constant coefficients. We willfocus in the following on the Discontinuous Galerkin method, which includes the firstorder Finite Volume method when polynomials of degree 0, i.e. constants are taken oneach cell.

The main numerical issue when constructing a Discontinuous Galerkin scheme is tofind a good numerical flux that is consistent (i.e. converges towards the exact flux whenthe cell size goes to 0) and stable. As we saw previously in the linear scalar case enhancedstability is given by upwinding. We now need to generalise the idea of upwind to thecase of systems.

The construction of a numerical flux is a local procedure at the interface betweentwo cells, where a different value is given on the left side and on the right side fromthe polynomial approximation (or reconstruction for Finite Volumes). In order to getinformation from the equation itself the idea is to solve it locally using an initial condi-tion which is a step function. The Riemann problem is the corresponding initial valueproblem:

∂U

∂t+A

∂U

∂x= 0,

U(0, x) =

∣∣∣∣ UL if x < 0,UR if x ≥ 0,

where UL and UR are two given constant vectors.The system being hyperbolic implies that A has real eigenvalues and can be diago-

nalised. Hence A = PΛP−1, where Λ is the diagonal matrix containing the eigenvalues.Then introducing the so-called characteristic variables V = P−1U , and multiplying thesystem by P−1 on the left we get

P−1∂U

∂t+ P−1APP−1∂U

∂x=∂V

∂t+ Λ

∂V

∂x= 0.

So in the variable V the system is diagonal and reduces to the set of linear advectionequations

∂vi∂t

+ λi∂vi∂x

= 0, 1 ≤ i ≤ n

where the vi are the components of V and the λi the eigenvalues of A. The exactsolution of these equations is given by vi(t, x) = vi(0, x− λit), where the vi(0, x) are thecomponents of the initial vector which take the constant values VL = P−1UL if x < 0and VR = P−1UR if x ≥ 0. In other terms

vi(t, x) =

∣∣∣∣ vi,L if x < λit,vi,R if x ≥ λit.

In practice we want to use the Riemann problem to determine the value of V (and U) atthe cell interface, corresponding to x = 0, the discontinuity point at any strictly positivetime. And we deduce from the previous solution that

vi(t, 0) =

∣∣∣∣ vi,L if 0 < λi,vi,R if 0 ≥ λi.

In order to get a vector expression, we introduce the diagonal matrices Λ+ where thenegative eigenvalues are replaced by 0 and Λ− where the positive eigenvalues are replacedby 0. Obviously Λ = Λ+ + Λ−. Then for t > 0 we have

ΛV (t, 0) = Λ+V (t, 0) + Λ−V (t, 0) = Λ+VL + Λ−VR,

40

Page 42: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

as for all positive eigenvalues the corresponding component of V (t, 0) is vi,L and forall negative eigenvalues the corresponding component of V (t, 0) is vi,R. Note that asV (t, 0) is multiplied by Λ the components of V (t, 0) corresponding to 0 eigenvalues donot need to be considered as they are multiplied by 0 anyway. So the side where thestrict inequality is used for the initial condition of the Riemann problem plays no role.

Denoting by A+ = PΛ+P−1 and A− = PΛ−P

−1 the flux AU(t, 0) associated to thesolution of the Riemann problem at the cell interface can also be expressed convenientlydirectly in terms of U

AU(t, 0) = PΛ+V (t, 0) + PΛ−V (t, 0) = PΛ+VL + PΛ−VR = A+UL +A−UR.

This expression AU(t, 0) = A+UL + A−UR can be used to define the numerical fluxat the cell interface, using the value UL coming from the left-hand side of the interfaceand UR coming from the right-hand side of the interface. For actual computations,the matrices A+ and A− need to be computed explicitely from the eigenvalues andeigenvectors of the matrix A. Notice that in the case of a scalar equation the matrixA is reduced to the scalar a which is then obviously the only eigenvalue of the 1 × 1matrix and if a > 0 we have A+ = a and A− = 0, so that the numerical flux becomesau(t, 0) = auL and the same way if a < 0 au(t, 0) = auR, so that the numerical fluxobtained from the solution of the Riemann problem reduces to the upwind flux.

Example. We consider the 1D Maxwell equations which can be written in dimension-less units:

∂E

∂t+∂B

∂x= 0,

∂B

∂t+∂E

∂x= 0.

This can be written in the form of a linear system

∂U

∂t+A

∂U

∂x= 0, with U =

(EB

), A =

(0 11 0

).

The eigenvalues of A are the solutions of det(A−λI) = 0, i.e. λ2 = 1. So the eigenvaluesare λ1 = −1 and λ2 = 1. They are real and distinct so that the system is strictlyhyperbolic. Let Vi be a normalised eigenvector associated to the eigenvalue λi, i = 1, 2.We have AV1 = −V1 so that V1 = 1√

2(1,−1)T and AV2 = V2 so that V1 = 1√

2(1, 1)T . We

define P the matrix whose columns are V1 and V2. P is obviously orthonormal, so thatits inverse is its transpose. Then we have PA = ΛP . So that we can define:

A+ = PΛ+PT =

1

2

(1 1−1 1

)(0 00 1

)(1 −11 1

)=

1

2

(1 11 1

),

A− = PΛ−PT =

1

2

(1 1−1 1

)(−1 00 0

)(1 −11 1

)=

1

2

(−1 11 −1

)Hence, the upwind flux is given by

AU(t, 0) = A+UL +A−UR =1

2

(UL,1 + UL,2 + (−UR,1 + UR,2)UL,1 + UL,2 + (UR,1 − UR,2)

).

41

Page 43: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Remark 10 As for the scalar problem, the numerical flux can be taken as a linearcombination of the centred flux and the upwind flux (solution the Riemann problem):

Gj = µ1

2A(UL + UR) + (1− µ)(A+UL +A−UR), 0 ≤ µ ≤ 1.

3.2.2 Setting up the discontinuous Galerkin method

The discontinuous Galerkin method can be generalised to a system in a straightforwardmanner. Each component of the approximate solution vector that we shall denote by Uh

is defined locally in each cell as a polynomial of degree k, i.e. an element of Pk[xν , xν+1].Denoting by ϕ0, . . . , ϕk a basis of Pk[xν , xν+1], the restriction of Uh to the cell [xν , xν+1],

that we shall denote by Uν+ 1

2h can be expressed as

Uν+ 1

2h (t, x) =

k∑j=0

ϕj(x)Uν+ 1

2j (t), with U

ν+ 12

j (t) =

uν+ 1

2j,1 (t)

...

uν+ 1

2j,d (t)

.

The unknown function Uh(t, x) is completely determined by its components Uν+ 1

2j (t).

In order to determine those we proceed like in the scalar case and plug this expression inthe equation, multiply by each of the basis functions and integrate the derivative termby part to let the flux through the interface appear:

dUν+ 1

2j (t)

dt

∫ xν+1

ϕi(x)ϕj(x) dx−∫ xν+1

AUν+ 1

2j (t)ϕ′i(x)ϕj(x) dx

+ Gν+1ϕi(xν+1)−Gνϕi(xν) = 0.

The numerical flux Gν is a consistent approximation of the real flux AU(t, xν) at thecell interface xν which is identical for both cells sharing xν .

Choice of the numerical flux: As in the scalar case, there are many possiblechoices of the numerical flux.

1. Centred flux: Use an average from the fluxes coming from both cells Gν =12A(Uν− 1

2(t, xν) + Uν+ 1

2(t, xν)

).

2. Solution of the Riemann problem corresponding to UL = Uν− 12(t, xν) and UR =

Uν+ 12(t, xν). This is the generalisation of the upwind flux to systems. Better

stability properties but more diffusive.

3. Linear combination of the above to combine good stability properties of the latterand lower diffusion properties of former.

4. Generalised Lax-Friedrichs flux (also called Rusanov flux).

Gν =1

2

[A(Uν− 1

2(t, xν) + Uν+ 1

2(t, xν)

)− αν

(Uν+ 1

2(t, xν)−Uν− 1

2(t, xν)

)],

with αν = max |λk|, where the λk are the eigenvalues of A. This solver has goodstability properties without needing to solve the Riemann problem. Especiallyinteresting in the non linear case when the Riemann problem is hard to solve.

42

Page 44: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Chapter 4

Non linear conservation laws

4.1 Characteristics

We consider a generic scalar conservation law of the form

∂u

∂t+∂f(u)

∂x= 0, with the initial condition u(0, x) = u0(x).

Assuming f ∈ C1(R) and denoting by a(u) = f ′(u), u also verifies

∂u

∂t+ a(u)

∂u

∂x= 0.

We now define the characteristic curves (or characteristics) associated to the conser-vation law the solution of the differential equation

dX

dt= a(u(t,X)).

Then using the chain rule we have

d

dt(u(t,X(t)) =

∂u

∂t(t,X(t))+

dX

dt

∂u

∂x(t,X(t)) =

∂u

∂t(t,X(t))+a(u(t,X(t))

∂u

∂x(t,X(t)) = 0,

if u is a solution of the equation. From this we deduce that u(t,X(t)) = u(0, X(0)) =u0(X(0)) which is independent of t. It follows that the characteristic curves are thestraight lines in the (t, x) plane of equation:

X(t) = X(0) + a(u0(X(0)))t.

And it follows that the solutions of the conservation law satisfy u(t,X(t)) = u0(X(0)).This allows us to get the solution at a given point x and time t if the characteristic curvecan be traced back in the (t, x) plane to the line t = 0. This is not always the case whenf is non linear.

Remark 11 In the linear case we have f(u) = au, then the characteristics are theparallel lines of slope a. They obey the equation X(t) = X(0) + at. So they never crossand so taking X(t) = x, we have X(0) = x− at, and we recover the classical solution ofthe linear advection equation

u(t, x) = u0(x− at).

43

Page 45: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Example. Burgers equation. It corresponds to f(u) = 12u

2, so that a(u) = f ′(u) = u.Then the characteristic X(t;x) such that X(0) = x satisfies X(t;x) = x+ tu0(x). Henceif we consider x2 > x1, we have

X(t;x2)−X(t;x1) = x2 − x1 + t(u0(x2)− u0(x1)).

Then if u0 is non decreasing we have X(t;x2) > X(t;x1) for all positive times, but if u0 isstrictly decreasing then X(t;x2) = X(t;x1) for t∗ = x2−x1

u0(x1)−u0(x2) . So the characteristicscan cross and in this case the method of characteristics cannot be used to compute thesolution which is then no more C1.

4.2 Weak solutions

4.2.1 Definition

As we have seen in the case of Burgers equation, the characteristics associated to a nonlinear conservation law can cross, in which case the method of characteristics can nonlonger be used to find a solution. Actually when this happens the solution is no longer ofclass C1 and can even become discontinuous. We thus need another form of the equation∂u∂u + ∂f(u)

∂x = 0 associated to the initial condition u(0, x) = u0(x) to make it well definedfor such absolution.

Let us first recall the definition of a classical solution:

Definition 5 Let u0 ∈ C1(R), then u is called a classical solution if u ∈ C1(R+ × R)and u satisfies

∂u

∂u+∂f(u)

∂x= 0, and U(0, x) = u0(x)

in the classical sense.

Now we can define the notion of weak solution:

Definition 6 Let u0 ∈ L∞(R), then u ∈ L∞(R+ × R) is called a weak solution of ourscalar conservation law if u satisfies∫ T

0

∫ +∞

−∞u∂ϕ

∂t+ f(u)

∂ϕ

∂xdt dx+

∫ +∞

−∞u0(x)ϕ(0, x) dx = 0 ∀ϕ ∈ C1

c ([0, T [×R.

Multiplying the equation ∂u∂u + ∂f(u)

∂x = 0 by ϕ and integrating by parts, it is easy toverify that a classical C1 solution is also a weak solution. So the notion of weak solutionsgeneralises the notion of classical solutions.

4.2.2 The Rankine-Hugoniot condition

In most physical cases the solution is actually piecewise C1 and there is only one (or afew) lines of discontinuities in the space-time plane. The Rankine-Hugoniot conditiongives a constraint on the discontinuity along a line for the piecewise smooth solution tobe a weak solution of the equation.

Theorem 5 Assume the half space R+×R is split into two parts M1 and M2 by a smoothcurve S parametrized by (t, σ(t)) with σ ∈ C1(R+). We also assume that u ∈ L∞(R+×R)

44

Page 46: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

and that u1 = u|M1∈ C1(M1) and u2 = u|M2

∈ C1(M2) with u1 and u2 two classicalsolutions of our equation in respectively M1 and M2.

Then u is a weak solution if and only if

[u1(t, σ(t))− u2(t, σ(t))]σ′(t) = f(u1(t, σ(t)))− f(u2(t, σ(t))) ∀t ∈ R∗+. (4.1)

Relation (4.1) is called the Rankine-Hugoniot condition. It is often written in thesimplified manner

(u1 − u2)s = f(u1)− f(u2),

where s = σ′(t) is the propagation speed of the discontinuity.Proof. Assume u is a weak solution of our equation. Then by definition∫ T

0

∫ +∞

−∞u∂ϕ

∂t+ f(u)

∂ϕ

∂xdt dx+

∫ +∞

−∞u0(x)ϕ(0, x) dx = 0 ∀ϕ ∈ C1

c ([0, T [×R.

Then we can split the first double integral into an integral on M1 and an integral on M2

and integrate these integrals by parts as u is C1 on each of these domains. We then getusing Green’s divergence formula, with ν denoting the outward unit normal vector,∫

Ωψ∇ · v dx = −

∫Ω

v · ∇ψ dx

∫∂Ω

v · νψ ds

that∫M1

u∂ϕ

∂t+ f(u)

∂ϕ

∂xdt dx = −

∫M1

(∂u

∂t+∂f(u)

∂x

)ϕdt dx+

∫∂M1

(u

f(u)

)· ν1ϕds

Because u = u1 is a classical solution in M1 the first term on the right hand side vanishes.The boundary term is composed of a part on the t = 0 line which cancels with the part ofthe integral on the initial condition which is in M1 and a part that can be parametrizedusing σ. A tangent vector to the parametrized curve S is given by (1, σ′(t)). Hence theoutward unit normal is given by

ν1 =1√

1 + σ′(t)2

(σ′(t)−1

).

Recall that the integral over a curve parametrized by γ : [a, b]→ Rn is defined by∫SF ds =

∫ b

aF (γ(t))‖γ(t))‖2 dt.

Thus the part of the boundary integral corresponding to the integral on S which isparametrized by γ(t) = (t, σ(t)) becomes∫

S

(u1

f(u1)

)· ν1ϕds =

∫ T

0

1√1 + σ′(t)2

[σ′(t)u1(t, σ(t))− f(u1(t, σ(t)))

]ϕ(t, σ(t))√

1 + σ′(t)2 dt,

=

∫ T

0

[σ′(t)u1(t, σ(t))− f(u1(t, σ(t)))

]ϕ(t, σ(t)) dt.

45

Page 47: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

In the same way for the part on M2 for which the outward normal is ν2 = −ν1 we get∫S

(u1

f(u1)

)· ν1ϕds =

∫ T

0

[−σ′(t)u2(t, σ(t)) + f(u2(t, σ(t)))

]ϕ(t, σ(t)) dt.

Adding the two pieces we find∫ T

0

[σ′(t)(u1(t, σ(t))− u2(t, σ(t))) + f(u2(t, σ(t)))− f(u1(t, σ(t)))

]ϕ(t, σ(t)) dt = 0.

This is true for all C1 functions ϕ, hence its factor in the integral vanishes. This corre-sponds to the Rankine-Hugoniot relation.

Conversely, the same calculation proves that if the Rankine-Hugoniot relation issatisfied then u is a weak solution.

Example: Consider the Burgers equation which corresponds to f(u) = u2

2 :

∂u

∂t+

1

2

∂u2

∂x= 0,

with the initial condition

u0(x) =

∣∣∣∣ 0 if x < 0,1 if x ≥ 0.

1. Using the Rankine-Hugoniot relation let us see under what condition a piecewiseconstant solution can be a weak solution of this problem. Because the character-istics of the Burgers equation are straight lines, it is natural to look for piecewisesmooth solutions which are separated by a straight line in the t − x plane. Astraight line can be parametrized by (t, αt). Then the candidate piecewise solutionwrites

u(t, x) =

∣∣∣∣ 0 if x < αt,1 if x ≥ αt.

As σ(t) = αt, we have s = σ′(t) = α and so the Rankine-Hugoniot condition(u1 − u2)s = f(u1)− f(u2) becomes

(0− 1)α =1

2(0− 1)

and thus the only weak solution consisting of two constant states is u correspondingto α = 1

2 . Such a discontinuous solution is called a shock.

2. Let us now define

u(t, x) =

∣∣∣∣∣∣0 if x < 0,

x/t if 0 ≤ x < t,1 if x ≥ t.

The two constant values are obviously classical solutions in their part of the do-main. On the other hand u(t, x) = x/t verifies ∂u

∂t (t, x) = − xt2

and ∂u2

∂x (t, x) = 2xt2

so that∂u

∂t(t, x) +

1

2

∂u2

∂x(t, x) = − x

t2+

1

2

2x

t2= 0

and u(t, x) = x/t is also a classical solution on its domain of definition. It isstraightforward to verify that this solution is continuous on the lines x = 0 and

46

Page 48: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

x = t, so that the Rankine-Hugoniot conditions are automatically verified (nojump) but not C1. This solution which goes continuously from one constant stateto the other, but is not C1 on two lines is called a rarefaction wave.

So we proved that this is also a weak solution of the Burgers equation, whichmeans that the equation we are considering in this example has at least two weaksolutions. In practice it is possible to construct other weak solutions with severalconstant states separated by a line of discontinuity (see [9] for examples).

4.2.3 Entropy solution

The last example shows us that the uniqueness of a weak solution is not guaranteed.However the physical solution is unique. This means that there is a piece missing in ourtheory that will enable us to characterise the physically correct weak solution. The ideathat will lead us there is that an exact conservation law is unlikely to be physical. Thereis always a small amount of dissipation. Mathematically this can be modelled by addinga small diffusion term to our conservation law: for a small positive ε we consider

∂u

∂t+∂f(u)

∂x− ε∂

2u

∂x2= 0. (4.2)

Associated to a smooth initial condition this equation has a unique smooth solution. Andthe physically correct solution of our conservation law, will be the unique limit of thissolution (which depends on ε) when ε → 0. This unique solution can be characterisedusing the notion of entropy.

Definition 7 Let U,F ∈ C2(R) such that

(i) U is strictly convex,

(ii) F ′ = U ′f ′

Then U is called an entropy and F an entropy flux associated to the conservation law

∂u

∂t+∂f(u)

∂x= 0.

Theorem 6 Assume the conservation law ∂u∂t + ∂f(u)

∂x = 0 can be associated to an entropyU with entropy flux F . Then if (uε)ε is a sequence of smooth solutions of (4.2) suchthat ‖uε‖L∞ is bounded uniformly in ε and uε → u almost everywhere then u is a weaksolution of the conservation law and verifies the entropy condition

∂U(u)

∂t+∂F (u)

∂x≤ 0 (4.3)

in the weak sense, i.e.∫ T

0

∫ +∞

−∞(U(u)

∂ϕ

∂t+ F (u)

∂ϕ

∂x) dt dx ≥ 0 ∀ϕ ∈ C1

c (]0, T [×R), ϕ ≥ 0.

Definition 8 A weak solution that verifies the entropy condition (4.3) is called an en-tropy solution.

47

Page 49: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

It has been proven by Kruzhkov (see [9] and references therein) that for a boundedinitial condition u0 and a smooth flux f(u), there exists a unique entropy solution of thescalar conservation law.

In the case of a strictly convex flux (f ′′(u) > 0) which is verified by the Burgersequation, there is a simple characterisation of the entropy condition for a shock, whichis called the Lax entropy condition:

f ′(uL) > s > f ′(uR), with s =f(uR)− f(uL)

uR − uL.

This is the Rankine-Hugoniot setting and s is the shock speed. This tells us that theshock is the entropy solution provided the characteristics lines cross at the shock linex = st. Else the entropy solution is a rarefaction wave.

Remark 12 Because f is strictly convex f ′ is increasing and the entropy condition canbe satisfied only if uL > uR and in this case because of the strict convexity, s which is theslope of the line joining (uL, f(uL)) and (uR, f(uR)) on the graph of f lies necessarilybetween f ′(uR) and f ′(uL).

Example: Consider again the Burgers equation ∂u∂t + 1

2∂u2

∂x = 0 with piecewise constantinitial conditions u0(x) = uL for x < 0 and u0(x) = uR for x ≥ 0. We compute previouslythe characteristics for Burgers equation which are given by X(t;x) = x+ tu0(x). So inour case we have two families of characteristics, those issued from the negative values ofx at t = 0 which become X(t;x) = x+ tuL and those issued from the positive values of xat t = 0 which become X(t;x) = x+ tuR. The flux of the Burgers equation f(u) = 1

2u2

is strictly convex, so the Lax criterion applies and the Lax entropy condition can besatisfied only if uL > uR which is the case when the characteristics cross.

Remark 13 In the case of a linear flux f(u) = au for some constant a. If U is anentropy, the associated entropy flux is F = au and we have, as u satisfies ∂u

∂t + a∂u∂x = 0,

∂U

∂t+∂F

∂x=∂U

∂t+ a

∂U

∂x= U ′(t)(

∂u

∂t+ a

∂u

∂x) = 0.

So the entropy condition is always verified in this case.This is a simple case, which also can appear for some of the waves in non linear

systems. In this case two different values are just propagated side by side without inter-fering. This case is called a contact discontinuity.

We will restrict in this lecture to the two simplest cases of scalar conservation laws,namely the cases of a strictly convex flux and of a linear flux. These often occur inapplications, but not always. A more complex study is needed in other cases. We referto the book of Leveque [11] for details.

4.3 The Riemann problem

Let us here compute the exact entropy solution of the Riemann problem for a strictlyconvex flux i.e. f ′′(u) > 0.

The Riemann problem for the 1D scalar non linear conservation laws reads

∂u

∂t+∂f(u)

∂x= 0,

48

Page 50: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

u0(x) =

∣∣∣∣ uL if x < 0,uR if x ≥ 0.

Case 1: uL < uR. We saw previously that in this case the shock does not satisfy theLax entropy condition and is not entropic. We thus look for a rarefaction wave which iscontinuous across each of the characteristics issued from the left and right of 0. Betweenthese two characteristics, we look for an explicit solution of the form u(t, x) = v(x/t).Plugging this function into our equation, we get

− xt2v′(x

t) + f ′(v(

x

t))

1

tv′(x

t) = 0.

Setting ξ = x/t this becomes

(f ′(v(ξ))− ξ)v′(ξ) = 0.

So we get two kinds of solution, either v(ξ) = C (C constant), or v such that f ′(v(ξ))−ξ =0. The constant solution is not possible as it would yield non entropic shocks. As f ′′ > 0,f ′ is strictly increasing and thus invertible. Hence the solution can be expressed asv(ξ) = (f ′)−1(ξ).

Finally the entropy solution of the Riemann problem in this case is the rarefactionwave defined by

u(t, x) =

∣∣∣∣∣∣uL if x < f ′(uL)t,

(f ′)−1(x/t) if f ′(uL)t ≤ x < f ′(uR)t,uR if x ≥ f ′(uR)t.

Case 2: uL > uR. In this case we saw that the shock separating the two constant statesuL and uR and propagating at the speed defined by the Rankine-Hugoniot condition

s =f(uL)− f(uR)

uL − uR

is entropic and so is the unique physical solution. This is defined by

u(t, x) =

∣∣∣∣ uL if x < st,uR if x ≥ st.

4.4 Numerical methods

4.4.1 The Godunov method

The idea of the Godunov method is that if one is looking for piecewise constant solutionsthen as the solution is propagating at a finite speed which is known, the solution can becomputed exactly by solving a Riemann problem for each cell interface. If s = max |f ′(u)|denotes the fastest possible wave then the neighbouring Riemann problems do noteinteract provided the time step ∆t verifies s∆t ≤ 1

2∆x. In principle the solution at timetn+1 could be computed by integrating over the solutions of all the Riemann problems atthis time to find the new constant value on each cell by averaging. However, this could

49

Page 51: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

be quite complicated. The Godunov method can be expressed in a much simpler wayby integrating the starting equation in space and time over one cell and one time step:∫ tn+1

tn

∫ xi+1

xi

(∂u

∂t+∂f(u)

∂x

)dx dt = 0.

Denoting by uni+ 1

2

= 1∆x

∫ xi+1

xiu(tn, x) dx the average of u over a cell at time tn = n∆t,

this yields

∆x(un+1i+ 1

2

− uni+ 1

2

) +

∫ tn+1

tn

(f(u(t, xi+1))− f(u(t, xi))) dt = 0.

Now as u is assumed to be constant on each cell and equal to its average, the value ofthe flux f(u(t, xi)) can be exactly computed by solving the Riemann problem betweenthe left value un

i− 12

and the right value uni+ 1

2

at the interface xi. Note that we only need

the solution of the Riemann problem exactly on the interface and this solution does notdepend on time as long as there is no interaction with the neighbouring problem onthe interface, which cannot occur if s∆t ≤ ∆x. Here because we are only interested inthe solution directly at the interface we gain a factor 1

2 as we do not care about otherinteractions.

As we saw previously, assuming that the flux f(u) is strictly convex, the entropysolution of the Riemann problem can be either a shock or a rarefaction wave, but u(t, xi)will take a value different from un

i− 12

or uni+ 1

2

only if the rarefaction wave has an interaction

with x = xi which is the case only if f ′(uL) < 0 and f ′(uR) > 0. Let us clearly distinguishthe cases and express the solution of the local Riemann problem at the interface x = xi.Recall that we consider the local Riemann problem with the initial condition (at timetn)

u(tn, x) =

∣∣∣∣∣ uni− 1

2

if x < xi,

uni+ 1

2

if x ≥ xi.

If uni− 1

2

< uni+ 1

2

the entropy solution is a rarefaction wave so that

u(t, xi) =

∣∣∣∣∣∣∣∣uni− 1

2

if f ′(uni− 1

2

) > 0,

(f ′)−1(0) if f ′(uni− 1

2

) ≤ 0 ≤ f ′(uni+ 1

2

),

uni+ 1

2

if f ′(uni+ 1

2

) < 0.

If uni− 1

2

> uni+ 1

2

the entropy solution is a shock wave so that

u(t, xi) =

∣∣∣∣∣ uni− 1

2

if s > 0,

uni+ 1

2

if s < 0,

where s is the shock speed given by the Rankine-Hugoniot condition: s = f(uL)−f(uR)uL−uR .

Using the exact solution of the Riemann problem, the numerical flux gni = g(uni− 1

2

, uni+ 1

2

)

is taken to be the flux associated to the exact solution of the Riemann problem, i.e.f(u(t, xi)) for x = xi and t > tn. Noticing that for a strictly convex flux, the minimumof f is reached at the points (f ′)−1(0) and going through the different cases we find that

gni =

∣∣∣∣∣∣∣min

u∈[ui− 1

2,ui+1

2]f(u) if ui− 1

2< ui+ 1

2,

maxu∈[u

i− 12,ui+1

2]f(u) if ui− 1

2> ui+ 1

2.

50

Page 52: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

With this, the flux at the interface can be computed and the Godunov scheme iswell defined (here in the case of a strictly convex flux). In the case of a linear flux, theGodunov scheme amounts to the first order upwind scheme. For other smooth fluxes,the Riemann problem can generally also be solved even though it is more complicated.

4.4.2 Approximate Riemann solvers

Computing the exact solution of the local Riemann problems is in principle the bestmethod. However it can be complicated or numerically expensive. Moreover, as thereare other sources of numerical errors anyway, it might be numerically as good or almostas good to replace the solution of the exact Riemann problem by some approximation.

1. The Rusanov flux (also called Local Lax-Friedrichs flux). The idea behind this flux,instead of approximating the exact Riemann solver, is to recall that the entropysolution is the limit of viscous solutions and to take a centred flux to which someviscosity (with the right sign) is added. This flux is given by

gni = g(uni− 1

2

, uni+ 1

2

) =1

2

[f(ui− 1

2) + f(ui+ 1

2)− max

u∈[ui− 1

2,ui+1

2]|f ′(u)|(ui+ 1

2− ui− 1

2)

].

Taking the viscosity parameter as the largest local wave speed guarantees thestability of the scheme. On the other hand taking the largest local wave speed(instead of globally) adds less viscosity in regions where the solution is smoothand ui− 1

2is close to ui+ 1

2.

2. The Roe flux (also called Murman or Murman-Roe in the scalar case): the idea hereis to linearise the flux f(u) around the cell interface and then use the upwind flux.Assuming two constant values uL and uR on each side, this amounts to replacingf(u) by a(uL, uR)u with a well chosen velocity a(uL, uR) that will enable us to geta flux which is close to the flux given by the solution of the exact Riemann problem.Looking at the solution of the exact Riemann problem an approximation that looksinteresting for both rarefaction wave and shocks is to take the Rankine-Hugoniotvelocity

a(uL, uR) =f(uL)− f(uR)

uL − uR,

if there is a discontinuity i.e. uL 6= uR, and simply a(uL, uR) = f ′(uL) = f ′(uR) ifuL = uR. Indeed if uL and uR are close, which will be the case in smooth regionsa(uL, uR) defines a good approximation of both f ′(uL) and f ′(uR). Moreover ifboth f ′(uL) and f ′(uR) have the same sign a(uL, uR) will also have this sign, sothat the same value of the numerical flux will be obtained as in the exact Riemannproblem was solved. The only case where this does not yield the same solution asthe exact Riemann solver is the case of a rarefaction wave with f ′(uL) and f ′(uR) ofdifferent signs. In this case, it is possible that the solution obtained by the schemeis not the correct entropy solution, the non entropic shock being approximatedinstead of the rarefaction wave. So a fix, known as entropy fix, is needed. For thislet us express the Murman-Roe flux as a centred flux with some added viscosity.

51

Page 53: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

The Murman-Roe flux is an upwind flux for the linearised problem we just intro-duced. The case uL = uR being trivial, we consider only uL 6= uR. Then

g(uL, uR) =

∣∣∣∣ f(uL) if a(uL, uR) > 0,f(uR) if a(uL, uR) ≤ 0.

If a(uL, uR) = f(uL)−f(uR)uL−uR > 0 and uL 6= uR we have

f(uL) =1

2

(f(uL) + f(uR)− f(uR)− f(uL)

uR − uL(uR − uL)

),

and if a(uL, uR) = f(uL)−f(uR)uL−uR < 0 and uL 6= uR we have

f(uR) =1

2

(f(uL) + f(uR) +

f(uR)− f(uL)

uR − uL(uR − uL)

),

so that we can define the numerical flux in all cases by

g(uL, uR) =1

2(f(uL) + f(uR)− |a(uL, uR)|(uR − uL)) .

Here we also see that the numerical viscosity vanishes when a(uL, uR) ≈ 0 whichcan happen close to the minimum of the convex function f . Then a non entropicshock might be selected by the scheme. A simple fix, introduced by Harten, consistsin smoothing the graph of the absolute value close to 0 (see [11] for details). Thisconsists in replacing the absolute value in the formula defining the flux by

φ(λ) =

∣∣∣∣ |λ| |λ| ≥ ε,(λ2 + ε2)/(2ε) |λ| < ε.

This ensures that φ(λ) ≥ ε and that there is always some dissipation. This worksand yields the correct entropy solution provided ε is well tuned to the problem athand.

4.4.3 Higher order methods

Higher order methods can be designed using the Finite Volume or the DiscontinuousGalerkin methodology. In both cases what needs to be defined is the numerical fluxconstructed from the two values uL and uR on each side of the interface. The samenumerical fluxes as previously can be used in this case. However for the scheme to bestable close to discontinuities a limiting procedure needs to be introduced so that thescheme falls back to first order in the cells where a discontinuity is detected. There is avast literature on limiters that we shall not detail here.

4.4.4 Strong stability preserving (SSP) Runge-Kutta methods.

Fluxes are generally constructed so that the associated scheme has some stability proper-ties when used with a first order explicit Euler time solver. When higher order methodsin x are used, it makes sense to use also higher order methods in time. A specific classof Runge-Kutta methods has been developed to keep the strong stability properties ofthe explicit Euler solver at each stage (See [12]).

52

Page 54: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

4.5 Nonlinear systems of conservation laws

Going from the scalar case to systems in the non linear case, is similar to what is donein the linear case. The hyperbolicity of the system is essential so that the system canbe locally diagonalised and the eigenvalues explicitely used in the definition of the flux.

The derivation of a Finite Volume or Discontinuous Galerkin scheme can be donecomponent by component and so reduces to the scalar case except for the definitionof the numerical flux which in general mixes the different components and needs to bespecific to the system at hand. We shall restrict in this lecture to the introduction oftwo of the most used numerical fluxes, namely the Rusanov (or local Lax-Friedrichs)flux and the Roe flux.

4.5.1 The Rusanov flux

As in the scalar case, the main idea here is to use a centred flux to which just enoughdissipation is added to ensure stability in all cases. In the scalar case the needed viscositywas given by the largest local wave speed. A system of n components corresponds tothe superposition of n waves the local speed of each being given by the correspondingeigenvalue. So taking the viscosity coefficient in the flux as the maximum over alleigenvalues should do the job. This yields the Rusanov flux for systems, which is thesimplest stable flux. It is defined for a linear system of the form

∂U

∂t+∂F(U)

∂x= 0,

as

G(UL,UR) =1

2

(F(UL) + F(UR)− max

U∈[UL,UR]|λ(F′(U))|(UR −UL)

),

where maxU∈[UL,UR] |λ(F′(U))| denotes the maximum modulus of the eigenvalues of theJacobian matrix F′(U).

4.5.2 The Roe flux

Roe’s method consists in locally linearising the non linear flux with a well chosen pro-cedure. The linearised matrix between two constant states UL and UR is denoted byA(UL,UR) and constructed such that the following properties are verified:

• F(UR)− F(UL) = A(UL,UR)(UR −UL).

• A(U,U) = F′(U).

• A(UL,UR) is diagonalisable, has real eigenvalues and a complete system of eigen-vectors.

Such a matrix is not always easy to find, but there are procedures, described in [11] forexample, to construct them. Moreover classical Roe matrices are known for the mostusual systems [11].

Once the Roe matrix is defined, the flux can be computed by solving the correspond-ing linear Riemann problem that we treated in Chapter 3. Let us rewrite the formula,so that we can also include the entropy fix, which as in the scalar case is needed for nonlinear systems to make sure that the scheme always converges to the correct entropysolution.

53

Page 55: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

In the case of linear systems, the flux was defined as AU(t, 0) = A+UL + A−UR.Defining the absolute value of a matrix as |A| = A+−A−, the flux can also be expressedas

AU(t, 0) =1

2(AUL +AUR − |A|(UR − UL)) .

Using the properties of the Roe matrix in the non linear case, the same expressionwill be used to define the Roe flux:

G(UL,UR) =1

2(A(UL,UR)UL +A(UL,UR)UR − |A(UL,UR)|(UR −UL)) .

The same entropy fix consisting in replacing the absolute value by the function φ whichis bounded away from 0 can be applied in this formula.

54

Page 56: Finite Element methods for hyperbolic systems · introduce the classical methods for numerically solving such systems. Up to a few years ago these were essentially nite di erence

Bibliography

[1] D. N. Arnold, R. S. Falk, R. Winther. Finite element exterior calculus, homologicaltechniques, and applications. Acta Numer. 15 (2006) 1–155.

[2] D. N. Arnold, R. S. Falk, R. Winther. Finite element exterior calculus: From Hodgetheory to numerical stability Bull. AMS 47 (April 2010) 281–354.

[3] J.-P. Berrut, L.N. Trefethen. Barycentric Lagrange Interpolation, SIAM Rev. 46(3), pp. 501–517.

[4] G. Cohen. Higher-Order Numerical Methods for Transient Wave equation, Springer-Verlag, 2001.

[5] G. Cohen, P. Monk. Efficient Edge Finite Element Schemes in Computational Elec-tromagnetism, Proc. of the 3rd Conf. on Mathematical and Numerical Aspects ofWave Propagation Phenomena, SIAM, april 1995.

[6] D. A. Di Pietro and A. Ern. Mathematical Aspects of Discontinuous Galerkin Meth-ods, vol. 69 SMAI Mathematiques et Applications, Springer, 2012.

[7] A. Ern, J.-L. Guermond. Theory and Practice of Finite Elements, Springer 2004.

[8] M. Gerritsma, Edge functions for spectral element methods. In: Spectral and HighOrder Methods for Partial Differential Equations. Springer Berlin Heidelberg, 2011.S. 199-207.

[9] E. Godlewski and P.A. Raviart. Numerical Approximation of Hyperbolic Systems ofConservation Laws, Springer, 1996.

[10] R. Hiptmair. Finite elements in computational electromagnetism, Acta Numerica(2002), pp. 237-339.

[11] R. J. Leveque. Finite Volume Methods for Hyperbolic Problems, Cambridge Textsin Applied Mathematics, 2002.

[12] J. S. Hesthaven and T. Warburton. Nodal Discontinuous Galerkin methods,Springer, 2008.

[13] J.-C. Nedelec. Mixed finite elements in R3. Numer. Math. 35 (1980), pp. 315–341.

[14] J.-C. Nedelec. A new family of mixed finite elements in R3. Numer. Math. 50 (1986),no. 1, 57–81.

[15] Chi-Wang Shu. High Order Weighted Essentially Nonoscillatory Schemes for Con-vection Dominated Problems. SIAM Rev. 51 (1), pp. 82–126.

55


Recommended