2.4 Numerical Methods for System of Conservation Laws
2.4.8 Approximate Riemann solvers
The application of Godunov’s method to a system of equations requires the simi- larity solution of a Riemann problem at each cell interface, that is, a state denoted
RP(xt, ul, ur) along xt = 0 based on Riemann data ul and ur. In general, one does not need the entire structure of the Riemann problem. Typically, this state is one of the intermediary states in the Riemann solution obtained in the process of connect- ing ul to ur by a sequence of shocks or rarefactions or contact discontinuity. Many approximate Riemann solvers have been proposed that can be applied more cheaply than the exact Riemann solver and yet give results that in many cases are equally good when used in the Godunov or high resolution methods.
The key idea behind the definition of approximate Riemann solver is to replace the nonlinear problemut+f(u)x= 0 by some linearized problem defined locally at each cell interface,
ˆ
ut+ ˆAi+1
2uˆx= 0. (2.59)
The matrix ˆAi+1
2 is chosen to be some approximation of the Jacobian matrix of the flux f′(u) valid in the neighborhood of the data ui and ui+1. The linear problem (2.59) is easy to solve using the technique described in Section 2.2. The problem now is to choose the matrix ˆAi+1
2 such that the approximate system (2.59) is locally equivalent to the original system. Roe suggested in [78] the following conditions on Aˆi+1
2
(i) Aˆi+1
2 is diagonalizable with real eigenvalues so that (2.59) is hyperbolic, (ii) Aˆi+1
2 →f′(¯u) smoothly as ui, ui+1 →u,¯ (iii) Aˆi+1
2(ui+1−ui) =f(ui+1)−f(ui).
Condition (iii) ensures that if ui and ui+1 are connected in the exact solution of the Riemann problem by a single wave, then the jump ui+1−ui should also be an eigenvector of the matrix ˆAi+1
2.The general way to construct the matrix ˆAi+1
2 was
introduced by Roe, Harten, Lax and consists in choosing an appropriate integration path in the phase plane connecting ui and ui+1 and writing the flux difference as an integral of the Jacobian of the flux computed along this path [79]. To illustrate the general construction, we present below the Roe solver for the shallow water equation.
Roe solver for the shallow water equations
We use here the notation v for the velocity of the water waves and h for the water height. The shallow water equations have the form (2.25) with
u=
"
h hv
#
=
"
u1 u2
#
, f(u) =
"
hv hv2+12gh2
#
=
"
u2
(u2)2/u1+12g(u1)2
#
and
f′(u) =
"
0 1
−(u2/u1)2+gu1 2u2/u1
#
=
"
0 1
−v2+gh 2v
# . As a parameter vector, we take
z =h−1/2u, so that
"
z1 z2
#
=
"√
√h hv
#
. (2.60)
We can then see that
u(z) =
"
(z1)2 z1z2
#
⇒ ∂u
∂z =
"
2z1 0 z2 z1
#
(2.61)
and
f(z)=. f(u(z)) =
"
z1z2 (z2)2+ 12g(z1)4
#
⇒ ∂f
∂z =
"
z2 z1 2g(z1)3 2z2
#
. (2.62)
We now consider the path
zp =Zip+ (Zi+1p −Zip)ξ for p= 1,2
where Zi =z(ui) and integrate each element of these matrices from ξ= 0 to ξ = 1.
Except for the (2,1) element of ∂f /∂z which is cubic, all elements are linear in ξ.
Integrating the linear term zp(ξ) yields Z 1
0
zp(ξ)dξ = 1
2(Zip+Zi+1p )≡Z¯p,
simply the average between the endpoints. For the cubic term we obtain R1
0(z1(ξ))3dξ = 14
(Zi+11 )4−(Zi1)4 Zi+11 −Zi1
= 12(Zi1+Zi+11 )12
(Zi1)2+ (Zi+11 )2
= Z¯1¯h, where
¯h= 1
2(hi+hi+1).
Hence the Roe matrix can be computed as the product of the two matrices Bˆi+1/2 =
"
2 ¯Z1 0 Z¯2 Z¯1
#
, Cˆi+1/2 =
"
Z¯2 Z¯1 2gZ¯1h¯ 2 ¯Z2
#
(2.63) as
Aˆi+1/2 = ˆCi+1/2Bˆi+1/2−1 =
"
0 1
−( ¯Z2/Z¯1)2+gh¯ 2 ¯Z2/Z¯1
#
=
"
0 1
−vˆ2+g¯h 2ˆv
#
. (2.64) Here ¯h is the arithmetic average of hi and hi+1, but ˆv is a different sort of average of the velocities, the Roe average:
ˆ v = Z¯2
Z¯1 =
√hivi+p
hi+1vi+1
√hi+p hi+1
. (2.65)
One can see that the matrix ˆAi+1/2 is simply the Jacobian matrix f′(ˆu) evaluated at the special state ˆu = (¯h,¯hˆv). In particular, if ui =ui+1 =u, then ˆAi+1/2 reduces to f′(u).
When solving the shallow water equations with an upwind method, at each cell interface, the approximate Riemann problem (2.59) is solved using the method de- scribed in Section 2.2 and this constitutes the approximate Riemann solver of Roe for the shallow water equations.
2.4.9 Relaxation methods for system of conservation laws
In this section, we investigate the relaxation methods for the solution of system of conservation laws in the form (2.1):
ut+f(u)x= 0 (2.66)
The motivation for relaxation methods comes from physics. Indeed, in many physical problems there is an equilibrium relationship between the variables that is essentially maintained at all times. If the solution is perturbed away from this equilibrium, then it rapidly relaxes back towards the equilibrium, see [79]. A simple relaxation model for (2.66) is given by the system [69]
ut+vx = 0
vt+A2ux = −1ε(v−f(u)) (2.67) where v is a relaxation variable, ε the relaxation parameter and A2 = diag(a21, . . . , a2N) is a diagonal matrix of real numbers. When ε goes to zero, we obtain from the second equation in (2.67) that v = f(u) and (2.67) reduces to (2.66). Therefore, we can obtain approximate solutions of the system (2.66) as solu- tion of (2.67) for small values ofε.In fact, this is true provided thesub-characteristic condition is satisfied
Df(u)2−A2 ≤0. (2.68)
This inequality means that for each eigenvalue λi(u) of the Jacobian matrixDf(u), we have λi(u)2 ≤ a2i. The derivation of (2.68) is done using the Chapman Enskog expansion. Indeed, we can expand the variable v as
v =f(u) +εv1+ε2v2+. . . (2.69) and substituting in the first equation in (2.67), we have
ut+
f(u) +εv1+ε2v2+. . .
x = 0 (2.70)
or
ut+f(u)x =−ε(v1)x−ε2(v2)x+. . . (2.71) Inserting (2.69) in the second equation of (2.67), we obtain
f(u) +εv1+ε2v2 +. . .
t+A2ux=−(v1 +εv2+. . .) (2.72) or
Df(u) [−Df(u)ux−ε(v1)x−ε2(v2)x+. . .] +ε(v1)t+ε2(v2)t+· · ·+A2ux
= −(v1 +εv2+. . .).
(2.73)
Collecting the first order terms obtained for ε≪1 gives (A2−Df(u)2)ux=−v1
and then, using (2.71), we obtain ut+f(u)x =ε
(A2−Df(u)2)ux
x+O(ε2). (2.74) This system is dissipative if and only if
A2−Df(u)2≥0.
This condition says that the characteristic speeda2i of (2.67) interlaces with those of the system (2.66). When the sub-characteristic condition is violated, then for some cases, the solution will blow up along the characteristic of the relaxing system.
2.4.10 The relaxation scheme of Jin and Xin
The discretization of the relaxation system (2.67), which depend on the relaxation rate ε are called relaxing schemes and their zero relaxation limits are called relaxed schemes. The relaxed schemes are theoretically stable and conservative discretiza- tion of the original balance law. Thus they are independent of ε and the artificial variable v. To obtain the relaxing schemes, one uses the spatial discretization of (2.67) given by
∂tuj+h1(vj+1
2 −vj−1
2) = 0,
∂tvj +h1A2(uj+1
2 −uj−1
2) = −1ε(vj−Fj), (2.75) where the average quantities
Fj = 1 h
Z xj+ 1
2
xj−1 2
f(u)dx=f
1 h
Z xj+ 1
2
xj−1 2
udx
+O(h2) =F(uj) +O(h2). (2.76) The point value quantities uj+1
2 and vj+1
2 are defined below using the variables characteristics
v±Au
of the system (2.67). A second order scheme for the approximations of (2.67) uses the piecewise linear interpolation which, applied to thep-th components of v±Au, denoted as v±apu, gives respectively
(v+apu)j+1
2 = (v+apu)j +12hs+j (v−apu)j+1
2 = (v−apu)j+1+ 12hs−j+1. (2.77) Here s±j is the slope of v±au on thejth cell. The slopes are given by
s±j = 1
h(vj+1±apuj+1−vj ∓apuj)φ(θ±j ), (2.78) θj±= vj ±apuj −vj−1∓apuj−1
vj+1±apuj+1−vj ∓apuj
. (2.79)
The map φ is the slope-limiter and it satisfies the general condition [100]
0≤ φ(θ)
θ ≤2 and 0≤φ(θ)≤2 (2.80)
for the scheme (2.75) to be total variation diminishing. Examples of slopes limiters are given by the minmod limiter and the van Leer limiter
φ(θ) = max(0,min(1, θ)), and φ(θ) = |θ|+θ 1 +|θ|, respectively. Solving (2.77) for uj+1
2 and vj+1
2 gives uj+1
2 = 12(uj+uj+1)− 2a1p(vj+1−vj) + 4ahp(s+j +s−j+1) vj+1
2 = 12(vj +vj+1)− a2p(uj+1−uj) + h4(s+j +s−j+1). (2.81) By inserting these values in the numerical scheme (2.75), we obtain the semi-discrete form of the relaxation scheme. We point out that when the slopes± = 0,the scheme (2.75) reduces to a first order upwind scheme. For time discretization, we use the second order TVD Runge-Kutta splitting scheme introduced by Jin [68]. It takes two implicit stiff source steps and two explicit convection step alternatively. If we denote
D+wj = 1
∆x(wj+1
2 −wj−1
2),
the fully discrete relaxation scheme reads with initial data Un= (unj)j and Vn =f(Un) = (f(unj))j
U∗ = Un, (2.82)
V∗ = Vn+ ∆t
ε (V∗−f(U∗)); (2.83)
U(1) = U∗−∆tD+V∗+ ∆tS(U∗), (2.84)
V(1) = V∗−∆tA2D+U∗; (2.85)
U∗∗ = U(1), (2.86)
V∗∗ = V(1)−∆t
ε (V∗∗−f(U∗∗))−2∆t
ε (V∗−f(U∗)); (2.87) U(2) = U∗∗−∆tD+V∗∗+ ∆tS(U∗∗), (2.88)
V(2) = V∗∗−∆tA2D+U∗∗; (2.89)
Un+1 = 1
2(Un+U(2)), (2.90)
Vn+1 = 1
2(Vn+V(2)). (2.91)
Because of the implicit treatment of the source term, this time discretization is stable, independently of ε, given that the CFL condition from the convective part is satisfied. As ε → 0, V = f(U) and the relaxing schemes (2.82)–(2.91) converge to a consistent and stable discretization of the original balance law, see [69]. If we assume thatε ≪1 and ε/∆x≪1, ε/∆t≪1,then we can prove as in Jin [68] that
V∗ =f(U∗) +O( ε
∆t), V∗∗=f(U∗∗) +O( ε
∆t). (2.92)
Applying (2.92) to the scheme (2.82)–(2.91) we obtain, ignoring the error O(∆tε ), the relaxed schemes
U(1) = Un−∆tD+Vn|Vn=f(Un)+ ∆tS(Un), U(2) = U(1) −∆tD+V(1)|V(1)=f(U(1))+ ∆tS(U(1)), Un+1 = 12(Un+U(2)).
(2.93)