Dg Notes
Dg Notes
Praveen Chandrashekar
∗
Starred subsections are optional.
Chapter One
Scalar conservation law
The flux is a linear function of the conserved variable, f(u) = cu, where c = constant
ut + cux = 0, u(x, 0) = u0 (x)
The exact solution is given by
u(x, t) = u0 (x − ct)
u0 (x)
u(x, t)
ct
The initial condition is transported with velocity c without change of form.
2 Chapter One. Scalar conservation law
1
u t + ( u 2 )x = 0 or ut + uux = 0 if u is smooth
2
As long as the solution is smooth, it is given by
which is an implicit solution. In many cases, even if the initial condition is infinitely
smooth, the solution at future times cannot remain smooth and discontinuities can
develop in finite time.
Solution at times t=0, t=tc and t>tc
2.0 2.0
1.5 1.5
1.0 1.0
0.5 0.5
2 Weak solution
t Supp(φ)
a O b x
Perform an integration by parts on both terms in the equation so that the derivatives
are transfered to the test function. This motivates the following definition.
Section 3. Kruzkov’s result 3
d
s= x(t) = shock speed
dt
Then the two values u(x− (t), t) and u(x+ (t), t) satisfy the RH condition
f(u(x+ (t), t)) − f(u(x− (t), t)) = s(u(x+ (t), t) − u(x− (t), t))
1.1 Definition (Weak solution) A weak solution u is a piecewise smooth solution which
satisfies the RH condition at the points of discontinuity of u.
3 Kruzkov’s result
ut + f(u)x = 0, f ∈ C1 (R)
then Z Z
|u(t, x) − v(t, x)|dx 6 |u0 (x) − v0 (x)|dx
|x|6R |x|6R+Mt
Chapter Two
DG scheme in 1-D
In finite volume methods, there is one solution variable per cell, the cell average
value, and the solution is assumed to be piecewise constant. To obtain high order
accuracy, we reconstruct the solution by a polynomial inside each cell by making
use of the cell averages in a small stencil around the current cell. IN DG methods
we start with a polynomials solution in each cell which evolved forward in time
by the scheme. DG methods are finite element methods, where we approximate
some function in terms of certain basis functions with compact support. The basis
functions are taken to be polynomials and are allowed to be discontinuous. The
compact support property ensures that the stencil of the scheme is small which
leads to efficient methods for solution. Let us consider a general conservation law of
the form
∂u ∂f
+ =0
∂t ∂x
and try to construct the DG scheme for this problem.
x=0 Ii x=1
1 i−1 i i+1 N
1 1 1 1
2
i− 2
i+ 2
N+ 2
Ii−1 Ii Ii−1
1 1
i− 2
i+ 2
Note that these functions can be discontinuous on the boundary of the elements as
shown in the figure (Two.2). Define the left and right limits
2 Semi-discrete DG scheme
Multiply conservation law by a smooth test function v
Z
∂u ∂f
+ vdx = 0
Ii ∂t ∂x
and integrate by parts on flux derivative term
Z Z
∂u ∂v
vdx− f(u) dx
Ii ∂t Ii ∂x
+ f(xi+ 12 , t)v(x−
i+ 1
) − f(xi− 21 , t)v(x+
i− 1
)=0
2 2
2.1 Definition (Semi-discrete DG scheme) Find uh (·, t) ∈ Vhk such that for all vh ∈ Vhk
Z Z
∂uh ∂vh
vh dx− f(uh ) dx
Ii ∂t Ii ∂x (Two.1)
− +
+ f̂i+ 21 (t)vh (xi+ 1 ) − f̂i− 21 (t)vh (xi− 1 ) = 0
2 2
Note that the numerical flux couples the solution in Ii to those in the neighbouring
elements.
4 Conservation property
Finite volume schemes are conservative which is necessary to compute correct weak
solutions. We will now show that DG schemes are also conservative. Let degree
k > 0. Take the test function vh ∈ Vhk of the form
1 x ∈ Ii
vh =
0 otherwise
(3) monotone
2 Riemann solver
One way to obtain a numerical flux is to solve a Riemann problem. To compute the
flux f̂i+ 21 , we solve the Riemann problem
∂w ∂f(w) u(x− 1 , t) x < xi+ 12
i+
+ = 0, w(x, τ = t) = 2
, τ>t
∂τ ∂x u(x+ 1 , t) x > xi+ 12
i+ 2
The flux is linear f(u) = au where a = constant and the equation is of the form
∂u ∂u
+a =0
∂t ∂x
au− if a > 0
f̂(u− , u+ ) =
au+ if a < 0
1 1
f̂(u− , u+ ) = [f(u− ) + f(u+ )] − |a|(u+ − u− )
|2 {z } |2 {z }
centered flux dissipative flux
The second part of the flux contributes to the numerical dissipation that gives rise
to stability.
Here we list some standard numerical fluxes and the reader must consult the literature
on finite volume schemes for more details.
This is obtained by exactly solving the Riemann problem. The general formula is
min f(u), if u− 6 u+
−
u∈[u ,u+ ]
f̂(u− , u+ ) =
max f(u), if u − > u+
+ −
u∈[u ,u ]
For convex flux, we can give simpler expression as follows. Let u∗ be the only sonic
point, i.e., f 0 (u∗ ) = 0. Then the Godunov flux is given by
This may be considered as a generalization of the upwind flux formula by using the
wave speed to be ∆x/∆t
1 1 ∆x +
f̂(u− , u+ ) = [f(u− ) + f(u+ )] − (u − u− )
2 2 ∆t
This flux is also refered to as a local Lax-Friedrich flux and it makes use of a local
wave speed estimate in the dissipative flux
1 1
f̂ = [f(u− ) + f(u+ )] − λ(u+ − u− )
2 2
where
λ= max |f 0 (ξ)|
ξ∈(u− ,u+ )
1 d a X ha
N−1 i
kuh k2 + u2h (x 12 , t) − f̂ 21 (t)uh (x 12 , t) + Ju2h Ki+ 21 − f̂i+ 21 (t)Juh Ki+ 12
2 dt 2 i=1
2
a
− u2h (xN+ 12 , t) + f̂N+ 21 (t)uh (xN+ 12 , t) = 0
2
where the jump term is defined as
JvKi+ 21 = v(x+
i+ 1
) − v(x−
i+ 1
)
2 2
1 d 2 a 2
X |a|
N−1
kuh k + uh (x 21 , t) − f̂ 21 (t)uh (x 12 , t) + Juh K2i+ 1
2 dt 2 i=1
2 2
(Four.1)
a
− u2h (xN+ 21 , t) + f̂N+ 12 (t)uh (xN+ 21 , t) = 0
2
14 Chapter Four. Stability
In this case
f̂ 21 = f̂N+ 12 = f̂(uh (xN+ 21 , t), uh (x 12 , t))
and (Four.1) simpifies to
|a| X
N
1 d
kuh k2 + Juh K2i+ 1 = 0
2 dt 2 i=1 2
where
Juh KN+ 12 = uh (xN+ 21 ) − uh (x 12 )
Integrating over time
N ZT
X
2
kuh (T )k + |a| Juh K2i+ 1 dt = kuh (0)k2
2
i=1 0
The use of upwind scheme together with discontinuous basis functions leads to L2
stability. If we use the central flux
a
f̂i+ 21 = [uh (x−
i+ 12
, t) + uh (x+
i+ 12
, t)]
2
then we conclude that
1 d
kuh k2 = 0
2 dt
and in this case, the energy is conserved, kuh (T )k = kuh (0)k. The scheme does not
have any dissipation and is neutrally stable. However, the central flux should not
be used in practice since it gives less accurate solutions than the upwind flux and
will be unstable for non-linear problems.
Assume that a > 0. In this case, we can specify boundary conditions only at
x = x 21 = 0, i.e.,
u(0, t) = g(t)
We take the numerical flux at the boundaries as
|a| X
N−1
1 d a a
kuh k2 + u2h (x 21 , t) − ag(t)uh (x 12 , t) + Juh K2i+ 1 + u2h (xN+ 12 , t) = 0
2 dt 2 2 i=1 2 2
Section 2. Non-linear conservation law 15
|a| X
N−1
1 d 2 a 2 a 2 a
kuh k + [g(t) − uh (x 21 , t)] − g (t) + Juh K2i+ 1 + u2h (xN+ 12 , t) = 0
2 dt 2 2 2 i=1 2 2
Let U(u) be a convex entropy function and let F(u) be an associated entropy flux
such that
F 0 (u) = U 0 (u)f 0 (u) (Four.2)
If u is a smooth solution, then it satisfies the equation
∂u ∂u
+ f 0 (u) =0
∂t ∂x
Multiplying throughout by U 0 (u)
∂u ∂u ∂U ∂F
U 0 (u) + U 0 (u) f 0 (u) =0 =⇒ + =0
∂t | {z ∂x} ∂t ∂x
∂f
∂x
we see that the smooth solution satisfies an additional conservation law. For a
discontinuous solution, we will demand that it satisfy the entropy inequality
∂U ∂F
+ 60
∂t ∂x
in the sense of distributions with equality in smooth regions. Then Kruzkov theory
shows that the weak solution is unique.
16 Chapter Four. Stability
4.1 Theorem (Cell entropy inequality) The solution uh of the semi-discrete DG scheme
satisfies Z
d
U(uh )dx + F̂i+ 21 (t) − F̂i− 12 (t) 6 0
dt Ii
for the square entropy U(u) = 21 u2 with some consistent numerical entropy flux
F̂i+ 12 (t) = F̂(uh (x−
i+ 1
, t), uh (x+
i+ 1
, t)).
2 2
Define Zu
F̃(u) = f(s)ds =⇒ F̃ 0 (u) = f(u)
0
Ignoring the constant term F(0) we have F(u) = uf(u) − F̃(u). Then
Z Z
∂uh ∂uh
− f(uh ) dx = − F̃ 0 (uh ) dx = −F̃(uh (x−
i+ 12
, t)) + F̃(uh (x+
i− 12
, t))
Ii ∂x Ii ∂x
and
and hence Θ > 0. In the case u+ 6 ξ 6 u− we can again show that Θ > 0. Thus
the semi-discrete DG scheme satisfies the entropy condition for any order of
the basis functions k. QED
4.2 Remark To obtain entropy inequality, we can also use the E-flux condition
4.3 Corollary (L2 stability) For periodic or compactly supported boundary conditions,
the semi-discrete DG scheme satisfies
Z
d
u2 dx 6 0
dt Ω h
which implies that
kuh (t)k 6 kuh (0)k 6 ku(0)k
Proof: Adding the cell entropy inequality from all the cells
XN Z XN
d
U(uh )dx + [F̂i+ 12 (t) − F̂i− 12 (t)] 6 0
i=1
dt I i i=1
For periodic case, F̂ 12 = F̂N+ 12 , while for compactly supported case F̂ 12 = F̂N+ 12 = 0,
we obtain desired result. QED
Chapter Five
Error estimates
We have to construct basis functions for Vhk for which there are two approaches:
nodal and modal. The DG solution has the form
X
N
x ∈ Ii : uh (x, t) = uij (t)φij (x), N = dim(Vhk ) = k + 1
j=1
and we refer to the set of values {uij : 1 6 j 6 N} as the degrees of freedom or dof
associated with the i’th cell.
xij ∈ Ii , j = 1, 2, . . . , N
These nodes can be used to define the Lagrange polynomials of degree k which have
the interpolation property
so that the dofs in this case as the solution values at the nodes as shown in
figure (Six.1). The location of the N nodal points xij can be
Once the nodal points are chosen, the basis functions can be obtained from Lagrange
interpolation.
22 Chapter Six. Basis functions
Ii−1 Ii Ii−1
6.1 Remark It is efficient to compute the shape functions on a reference cell. Let us
map cell Ii to [−1, +1] by
x − xi 1−ξ 1+ξ
ξ= 1
, x= xi− 12 + xi+ 12
2
∆xi 2 2
Choose a set of distinct nodes ξ0 , ξ1 , . . . , ξk ∈ [−1, +1]. The j’th basis function is
given by
6.2 Remark If nodes are located at the element boundaries, then we have multiple
dofs at the boundary since the solution is in general discontinuous.
Section 2. Taylor basis functions 23
• Heirarchical representation
These polynomials satisfy the following recurrence relation which is useful for
numerical computation
2n − 1 n−1
Pn (ξ) = ξPn−1 (ξ) − Pn−2 (ξ), n = 2, 3, . . .
n n
A very useful property of these polynomials is that they are mutually orthogonal,
i.e.,
Z +1
0 j 6= k
Pj (ξ)Pk (ξ)dξ =
2
−1
2j+1
j=k
Using these polynomials, we can define our basis functions as: j = 0, 1, 2, . . .
Z
p x − xi 0 j 6= k
φij (x) = 2j + 1Pj , φij φik dx =
∆xi /2 Ii ∆xi j = k
In [Link], the FE_DGP space makes use of these basis functions. It is convenient
to define the functions on the reference cell [−1, +1] as
p x − xi
φij (x) = ϕ̂j (ξ) = 2j + 1Pj (ξ), ξ= 1
2
∆xi
Many authors use the following definition for the basis functions
Z
x − xi 0 j 6= k
φij (x) = Pj , φij φik dx = ∆x
∆xi /2 Ii i
j=k
2j+1
Chapter Seven
Implementation in 1-D
1 ODE system
Plugging the solution uh in the DG scheme, the first term is of the form
Z XN Z XN
∂uh duik (i) duik
φij dx = φij φik dx = Mjk
Ii ∂t k=1
dt Ii k=1
dt
(i)
The quantities Mjk form the elements of the mass matrix M(i) ∈ RN×N . This is
evaluated using a q-point quadrature rule as
Z X
(i)
Mjk = φij φik = ωiq φij (xiq )φik (xiq ), 1 6 j, k 6 N
Ii q
where {xiq } are the quadrature nodes in element Ii and ωiq are the corresponding
weights. The remaining terms which we will put on the right hand side are computed
as
Z
(i) 0
L (U(t))j = f(uh )φij − f̂i+ 21 (t)φij (x−
i+ 12
) + f̂i− 12 (t)φij (x+
i− 12
)
Ii
X
0
≈ ωiq f(uh (xiq , t))φij (xiq ) − f̂i+ 12 (t)φij (x−i+ 1
)
2
q
dU(i) (t)
M(i) = L(i) (U(t))
dt
The mass matrix is obviously symmetric, and it is also positive definite. For any
vector U = [u1 , . . . , uN ]> ∈ RN
Z X
n
>
U M U= (i)
| uj φij |2 dx > 0, U 6= 0
Ii j=1
Hence we can invert the mass matrix and write the ODE as
dU(i) (t)
= [M(i) ]−1 L(i) (U(t)) = R(i) (U(t))
dt
2 Quadrature rules
The quadrature rule must be chosen such that mass matrix is evaluated exactly.
Moreover, in order to achieve the optimal convergence rate, the integral inside the
cell must be computed with a quadrature rule which is exact for polynomials of
degree 2k. These requirements are satisfied by using
The quadrature rules are explained in section (1). The elements of the mass matrix
can be computed as
Z X
(i)
Mjk = φij φik = ωiq φij (xiq )φik (xiq ), 1 6 j, k 6 N
Ii q
where
1 1 − ξq 1 + ξq
ωiq = ωq ∆xi , xiq = xi− 12 + xi+ 12
2 2 2
and {ξq } are the quadrature points in the reference element [−1, +1]. If we use the
orthogonal Legendre basis, then the mass matrix can be computed directly as
Z
(i)
Mjk = φij φik dx = ∆xi δjk
Ii
In this case, the mass matrix is diagonal, i.e., M(i) = ∆xi IN×N . If we use nodal
Lagrange basis at Gauss-Legendre points and if the quadrature is exact, then the
mass matrix is again diagonal. Using (k + 1)-point Gauss-Legendre quadrature,
which should give the exact mass matrix, we get
Z X
(i)
Mjk = φij φik = ωiq φij (xiq )φik (xiq ), 1 6 j, k 6 N
Ii q
X
= ωiq δjq δkq = ωij δjk
q
Section 3. Setting initial condition 27
and if f(u) is non-linear, then the quadrature is not exact. The derivative of the
test function is given by
∂ dξ d 1
φij (xiq ) = ϕ̂j (ξq ) = ∆xi ϕ̂j0 (ξq )
∂x dx dξ 2
and hence the quadrature is given by
Z X
0 0 1X
f(uh )φij dx ≈ ωiq f(uh (xiq , t))φij (xiq ) = ωq f(uh (ξq ))ϕ̂j0 (ξq )
Ii q
2 q
Thus, all of computations involving basis functions can be done on the reference
cell which is common to all the cells.
4 Boundary condition
We can specify Dirichlet boundary condition at some boundary point if the charac-
teristics are entering the domain (inflow boundary) at that point. For example, at
x = 0 if f 0 > 0, then we can specify the boundary condition on u. In general let us
take the boundary conditions
The boundary conditions are incorporated in the DG scheme via the boundary fluxes
f̂ 12 (t) = f̂(a(t), uh (0+ , t)), f̂N+ 21 (t) = f̂(uh (1− , t), b(t))
Un+1 = Un + ∆t R(Un , tn )
U(1) = Un + ∆t R(Un , tn )
1 n 1 (1)
Un+1 = U + [U + ∆t R(U(1) , tn + ∆t)]
2 2
• 3-stage, third order RK
U(1) = Un + ∆t R(Un , tn )
3 n 1 (1)
U(2) = U + [U + ∆t R(U(1) , tn + ∆t)]
4 4
n+1 1 n 2 (2)
U = U + [U + ∆t R(U(2) , tn + 12 ∆t)]
3 3
7.1 Lemma (SSP Runge-Kutta) If the forward Euler scheme is stable in some norm
and under some time step condition, i.e.,
then the SSPRK scheme is stable under a CFL condition ∆t 6 α∆tc . For the second
and third order schemes, α = 1.
Section 6. CFL condition 29
Proof: Let us show this for the 2-stage scheme. Since the forward Euler scheme is
stable if ∆t 6 ∆tc , and as first stage resembles a forward Euler scheme, we get
But we do not know U(1) at the beginning of the time step. In practice, we can put
a margin of safety, e.g., ∆t = α∆tc (Un ) where α = 0.9 for example, which usually
works in practice. If it turns out after the first stage, that the ∆t we have chosen is
larger than ∆tc (U(1) ), then we can reduce it further and restart the time step from
the first stage.
7.3 Remark The above SSPRK scheme require storage for three steps of vectors,
• Un
• Residual R
7.4 Remark There exist higher order SSPRK schemes but they need more steps.
There is a 5-stage, 4-th order SSPRK scheme [2].
6 CFL condition
Explicit time integration schemes are stable only under a restriction on the time step
∆t. For k = 0, the scheme is L2 stable under CFL number of one. For k > 1, the
forward Euler scheme (RK1) is known to be unconditionally unstable in L2 (Chavent
and Cockburn, 1989) if the CFL number is of order unity. It is L2 stable for finite
time intervals if the CFL number is O h1/2 which means that ∆t = O h3/2 which
is very restrictive. For DG space discretizations using polynomials of degree k, and
a (k + 1)-stage RK method of order k + 1, a Von-Neumann stability analysis for the
one-dimensional linear case
f(u) = cu
with upwind flux gives the CFL condition
∆t 1
|c| 6
∆x 2k + 1
Theoretical proof of this is available only for k = 0, 1, 2. For k > 3 the above
condition is close to the numerically determined values of CFL numbers.
stable and high-order accurate in time method. We must say also that there
are anecdotal reports of other time discretizations that seem to work just
fine. However, the fact remains that only with this special class of TVD–
30 Chapter Seven. Implementation in 1-D
RK methods can the non-linear stability of the method actually be proven.
Let us The
7.1• Remark alsoCFLstress the fact
number that the
for SSPRK generalized
scheme to be TVDM slope limiterthan
is higher is likewise
that
an required
essentialforingredient
L [Link] However,
2
the method without
to control which
round-off its stability
errors, the smaller CFL be
cannot
2
guaranteed. Although
condition from our has
L stability numerical
to be usedexperience
in practical indicates that second-order
computations.
k 0 1 2
7 Algorithm
• For n = 0, 1, . . .
un,r n,r+1
h → uh
8 Numerical example
Let us apply the DG scheme to linear and non-linear problems with smooth and
discontinuous initial conditions.
When the solution is discontinuous or has large gradients, the higher order DG
scheme produces oscillatory solution. This situation is similar to high order finite
volume schemes and is related to loss of TVD property. The oscillatory numerical
solution has more total variation than the initial condition. In the case of finite
volume schemes, this problem is resolved by reducing the slope of the reconstructed
solution by appropriate limiter functions so that the scheme becomes TVD. In DG
schemes we do not have to perform any reconstruction since we have a polynomial
inside each cell. But we can borrow the limiter idea and reduce the slope of the
solution in each cell to achieve TVD property. The approach we will take is to
construct a limiter so that the DG scheme with forward Euler discretization is TVD.
The use of an SSPRK scheme then automatically gives TVD property for higher
order versions of the DG scheme.
un+1
h = ΛΠh (wn+1
h )
We require that the limiter ΛΠh () satisfy some basic properties as follows.
Properties of ΛΠh (·)
ûi = uh (x−
i+ 1
) − ūi , ǔi = ūi − uh (x+
i− 1
)
2 2
(m) (m)
ath. Mech. 83, No. 11For k=
(2003) 1, we have ûi = ǔi
/ [Link] . The effect of the limiter is to reduce
749 the slope of
0.75
0.5
0.25
-0.25
0.1 0.125 0.15 0.075 0.1 0.125 0.15
Example of slope limiters: The MUSCL limiter (left) and the less restrictive ΛΠ1h limiter (right). Displayed are the
ans of uh (thick line),Figure
the linearEight.1:
function uh Effect
in the element of the middle
of applying TVD before limitingis
limiter (dotted line), andthe
to reduce the resulting
slope of the solution
after limiting (solid line).
so that it is less oscillatory
olutions that are not necessarily piecewise-constant, the above result still holds provided that the following
atisfied: the solution in case it is larger than the finite difference slope of the cell average
"values as# shown in $ figure (Eight.1). If the cell averages are monotone around cell i,
u+ +
j+1/2 − uj−1/2 = sign uj+1 − uj ,
"
then the limited linear polynomial satisfies
# $
u− −
j+1/2 − uj−1/2 = sign uj − uj−1 . (m)
min{ūi−1 , ūi+1 } 6 uh (x) 6 max{ūi−1 , ūi+1 }, x ∈ Ii
ns are not necessarily satisfied it is necessary to enforce them by means of what will be called a generalized
For k = 0, 1, 2, this procedure uniquely determines a new polynomial of degree
e what happened in k.
the previous
For k =section,
1, letthe
usintroduction
denote the of the numerical
limited traces is not
function by enough tohguarantee
ΛΠ1h (u ). For k > 3 there is
DG method. For non-linear hyperbolic problems, the use of a generalized slope limiter is indispensable,
more freedom since the cell average and the two trace values do not completely
own for the so-called high-resolution methods. See also [27] for a motivation of the introduction of this
determine the polynomial. One approach is to determine the remaining dofs by an
L2 projection. A more simple approach that works well in practice is the following.
he generalized slope limiter
functions
v j + (x − xj ) vx,j ,
Section 1. Limiter for DG scheme 35
(1) If the limiter does not modify the trace values, i.e.,
(m) (m)
uh (x+
i− 1
) = uh (x+
i− 1
) and uh (x−
i+ 1
) = uh (x−
i+ 1
)
2 2 2 2
(m)
then take uh = uh for x ∈ Ii .
(m)
(2) Otherwise, let u1h ∈ P1 (Ii ) be the L2 projection of uh |Ii . Take uh |Ii =
ΛΠ1h (u1h ).
If the DG solution has been processed by the above limiter, then we can prove a
TVD property. Let us first recall Harten’s sufficient conditions for a finite volume
scheme to be total variation diminishing.
ūn+1
i = ūn n n n n
i + Ci+ 1 ∆+ ūi − Di− 1 ∆− ūi
2 2
ūn+1
i+1 = ūn
i+1 + C
n n n n
3 ∆+ ūi+1 − Di+ 1 ∆− ūi+1
i+ 2
2
ūn+1
i = ūn
i + Cn ∆
i+ 1 + i
ūn − Dn ∆ ūn
i− 1 − i
2 2
∆+ ūn+1
i = ∆+ ūn
i +C
n n
3 ∆+ ūi+1 − Dn ∆ ūn − Cn
i+ 1 − i+1
∆ ūn + Dn
i+ 1 + i
∆ ūn
i− 1 − i
i+ 2 2 2
2
= ∆+ ūn
i + C 3 ∆+ ūn
n
i+1 − Dn ∆ ūn
i+ 21 + i
− Cn ∆ ūn
i+ 21 + i
+ Dn ∆ ūn
i− 12 + i−1
i+
2
= (1 − Ci+ 12 − Di+ 12 )∆+ ūn
i +C
n n
3 ∆+ ūi+1 + Dn ∆ ūn
i− 1 + i−1
i+ 2
2
Applying triangle inequality and noting that all the coefficients are positive according
to our assumption
|∆+ ūn+1
i | 6 (1 − Ci+ 21 − Di+ 21 )|∆+ ūn
i |+C
n
3 |∆+ ūi+1 |
n
+ Dn
i− 1
|∆+ ūn
i−1 |
i+ 2
2
Summing over all cells, all the terms on the right cancel except the first one, yielding
X X
|∆+ ūn+1
i |6 |∆+ ūn
i |
i i
8.2 Remark Consider the first order upwind finite volume scheme for ut + aux = 0
which is identical to the DG scheme for degree k = 0. This scheme can be written
in the incremental form with
∆t |a| − a ∆t |a| + a
Ci+ 12 = , Di+ 21 =
∆x 2 ∆x 2
The coefficients and the condition
|a|∆t
Ci+ 12 + Di+ 21 = 61
∆x
leads to the CFL condition.
8.3 Definition (TVM) For DG solution uh , let us define the total variation of the means
by X
TVM(uh ) = |∆+ ūi |
i
We will show that the TVM does not increase with time if the limiter is applied.
For this we make use of the monotone flux property. Since f̂(u, v) is increasing
function of u and decreasing function of v, we have
Similarly
f̂(a, b) − f̂(a, c) ∂
− = − f̂(a, η), η ∈ I(b, c)
b−c ∂v
so that
f̂(a, b) − f̂(a, c) ∂
− 6 max f̂(a, η) =: L2 (a)
b−c η∈I(b,c) ∂v
TVM(un+1
h ) 6 TVM(un
h)
where
f̂(ūi + ûi , ūi+1 − ǔi+1 ) − f̂(ūi + ûi , ūi − ǔi )
0 6 −f̂2 = − 6 L2
(ūi+1 − ǔi+1 ) − (ūi − ǔi )
Since un
h has been pre-processed by the minmod limiter, we have
TVM(wn+1
h ) 6 TVM(un
h)
TVM(un+1
h ) = TVM(wn+1
h ) 6 TVM(un
h)
2 Limiters: Implementation
Degree k = 1: Let us write the solution in terms of Taylor or Legendre basis
!
x − xi
uh = ūi + 1 si
2
∆xi
Note that uh (x−
i+ 21
) = ūi + si and uh (x+
i− 12
) = ūi − si . We limit the slope with the
minmod function
(m)
si = minmod (si , ūi − ūi−1 , ūi+1 − ūi )
The limited solution is
!
x − xi (m)
ΛΠ1h (uh ) = ūi + 1
si
2
∆xi
Degree k > 1: Let us write the solution in terms of Taylor or Legendre basis
!
x − xi
uh = ūi + 1 si + HOT
2
∆xi
We obtain a limited slope
(m)
si = minmod (si , ūi − ūi−1 , ūi+1 − ūi )
(m)
If si = si then
ΛΠh (uh ) = uh ∈ Pk
else !
x − xi (m)
ΛΠh (uh ) = ūi + 1
si ∈ P1
2
∆xi
8.1 Remark If we use the Legendre polynomials to form the basis functions as
√
ϕ̂j (ξ) = 2j + 1Pj (ξ), then the linear solution is of the form
!
√ x − xi
uh = ūi + 3 1 si
2
∆x i
3 Numerical example
Discontinuous solution and smooth solution
Numerical example
If the solution in cell Ii has an extremum, see figure (xxx), then the slope in the
cell has a different sign compared to ∆− ūi , ∆+ ūi and the limiter returns zero slope.
The limited solution becomes constant and equal to the cell average value. Thus
there is loss of accuracy at smooth extrema due to TVD limiter. We have to modify
the limiter so that it does not change the solution at smooth extrema.
4 TVB Limiter
In smooth regions of the solution, the differences inside the cell are
1 1
ûi = ux (xi )∆xi + O h2 , ǔi = ux (xi )∆xi + O h2
2 2
while the differences of cell averages are
1
∆+ ūi = ux (xi )(∆xi + ∆xi+1 ) + O h2
2
1
∆− ūi = ux (xi )(∆xi + ∆xi−1 ) + O h2
2
If the solution is smooth and monotone around Ii , and since the O h2 term is
small, all the above quantities have the same sign, so that the limiter yields
(m) (m)
ûi = ûi , ǔi = ǔi
Since the solution is not modified by the limiter, we obtain the full accuracy of the
scheme. However, if there is a smooth extremum in cell Ii , then ux (xi ) ≈ 0 and the
sign is determined by the second derivative. If M is the magnitude of the second
derivative at smooth extrema, then ûi = O Mh2 . This motivates the definition of
the TVB limiter function as
a1 if |a1 | 6 Mh2
m̃(a1 , a2 , . . . , al ) =
m(a1 , a2 , . . . , al ) otherwise
If we are near a smooth extremum, the TVB limiter returns the original slope and
the solution is not modified in that cell. With the above limiter, the scheme is no
longer TVDM and the TVM can increase. However this violation is small and of
the other of the mesh size.
8.1 Lemma (TVB property) With the TVB limiter, if the CFL condition
1
∆t 6 , ∀i
2( ∆xLi+1
1
+ L2
∆xi
)
is satisfied, then
TVM(un+1
h ) 6 TVM(un
h ) + CMh
40 Chapter Eight. Limiters and TVD property
TVM(un
h ) 6 TV(u0 ) + CMT, ∀ n∆t 6 T
so that the numerical solutions have bounded variation. This is sufficient to prove
convergence to a weak solution.
8.3 Remark The quantity M is an estimate of the second derivative of the solution
at smooth extrema. This can be based on the initial condition, e.g.,
Ideally M should be estimated from the numerical solution but there is no reliable
way to do this. The solution may have several extrema with different magnitude of
the second derivatives. In practice people choose the value of M by some trial and
error. But this is still a weak point of the TVB limiter.
Numerical example
5 Algorithm
The DG scheme together with the TVD/TVB limiter is as follows.
• Find u0h from w0h by applying the limiter, u0h = ΛΠh (w0h )
• For n = 0, 1, . . .
un,r n,r+1
h → wh
∗ Apply limiter
un,r+1
h = ΛΠh (wn,r+1
h )
Appendix A
Quadrature rules
1 Quadrature in 1-D
The DG scheme involves integrals which must be approximated by quadrature. Let
f : [−1, +1] → R
• Gauss-Legendre quadrature
• Gauss-Lobatto-Legendre quadrature
1−ξ 1+ξ
x(ξ) = a+ b, ξ ∈ [−1, +1]
2 2
and
Zb Z +1
1
f(x)dx = (b − a) f(x(ξ))dξ
a 2 −1
1 X
n
≈ (b − a) ωq f(x(ξq ))
2 q=1
X
n
1
= ω̃q f(x(ξq )), ω̃q = (b − a)ωq
q=1
2
Bibliography
[1] B. Cockburn and C.-W. Shu, TVB Runge-Kutta local projection discon-
tinuous Galerkin finite element method for conservation laws II: General
framework, Mathematics of Computation, 52 (1989), pp. pp. 411–435.