The HLLC Riemann Solver Eleuterio TORO Laboratory of Applied Mathematics University of Trento, Italy toro@ing.unitn.it http://www.ing.unitn.it/toro August 26, 212
Abstract: This lecture is about a method to solve approximately the Riemann problem for the Euler equations in order to derive a numerical flux for a conservative method: The HLLC Riemann solver REFERENCES: E F Toro, M Spruce and W Speares. Restoration of the contact surface in the HLL Riemann solver. Technical report CoA 924. Department of Aerospace Science, College of Aeronautics, Cranfield Institute of Technology. UK. June, 1992. E F Toro, M Spruce and W Speares. Restoration of the contact surface in the Harten-Lax-van Leer Riemann solver. Shock Waves. Vol. 4, pages 25-34, 1994.
Consider the general Initial Boundary Value Problem (IBVP) PDEs : U t + F(U) x =, x L, t >, ICs : U(x, ) = U () (x), BCs : U(, t) = U l (t), U(L, t) = U r (t), with appropriate boundary conditions, as solved by the explicit conservative scheme U n+1 i = U n i t x [F i+ 1 2 The choice of numerical flux F i+ 1 2 two classes of fluxes: (1) F i 1 ]. (2) 2 determines the scheme. There Upwind or Godunov-type fluxes (wave propagation information used explicitly) and Centred or non-upwind (wave propagation information NOT used explicitly).
Godunov s flux (Godunov 1959) is F i+ 1 2 = F(U i+ 1 ()), (3) 2 in which U i+ 1 () is the exact similarity solution U 2 i+ 1 (x/t) of the 2 Riemann problem U t + F(U) x =, U L if x <, (4) U(x, ) = U R if x >, evaluated at x/t =.
Example: 3D Euler equations. ρ ρu U = ρv ρw, F = E ρu ρu 2 + p ρuv ρuw u(e + p). (5) The piece wise constant initial data, in terms of primitive variables, is ρ L ρ R u L W L = v L w L, W u R R = v R w R. (6) p L p R
The Godunov flux F(U i+ 1 ()) results from evaluation U 2 i+ 1 (x/t) 2 at x/t =, that is along the t axis. (u-a) p * t u * (u,u,u) (u+a) ρ u v w p L L L L L ρ v w ρ *L *R L vr L Fig. 1. Structure of the exact solution U i+ 1 (x/t) of the Riemann 2 problem for the x split three dimensional Euler equations. There are five wave families associated with the eigenvalues u a, u (of multiplicity 3) and u + a. w R ρ u v w p R R R R R x
Integral Relations Consider the control volume V = [x L, x R ] [, T ] depicted in Fig. 2, with x L TS L, x R TS R, (7) S L and S R are the fastest signal velocities and T is a chosen time. The integral form of the conservation laws in (4) in V reads xr xr T T U(x, T )dx = U(x, )dx+ F(U(x L, t))dt F(U(x R, t))dt. x L x L (8) Evaluation of the right hand side of this expression gives xr U(x, T )dx = x R U R x L U L + T (F L F R ), (9) x L where F L = F(U L ) and F R = F(U R ). We call (9) the consistency condition.
Now split left hand side of (8) into three integrals, namely xr TSL TSR xr U(x, T )dx = U(x, T )dx + U(x, T )dx + U(x, T )dx x L x L TS L TS R S L t S R T x L TS L TS R Fig. 2. Control volume [x L, x R ] [, T ] on x t plane. S L and S R are the fastest signal velocities arising from the solution of the Riemann problem. x R x
Evaluate the first and third terms on the right hand side to obtain xr TSR U(x, T )dx = U(x, T )dx+(ts L x L )U L +(x R TS R )U R. x L TS L Comparing (1) with (9) gives (1) TSR TS L U(x, T )dx = T (S R U R S L U L + F L F R ). (11) On division through by the length T (S R S L ), which is the width of the wave system of the solution of the Riemann problem between the slowest and fastest signals at time T, we have 1 TSR U(x, T )dx = S RU R S L U L + F L F R. (12) T (S R S L ) TS L S R S L
Thus, the integral average of the exact solution of the Riemann problem between the slowest and fastest signals at time T is a known constant, provided that the signal speeds S L and S R are known; such constant is the right hand side of (12) and we denote it by U hll = S RU R S L U L + F L F R S R S L. (13) We now apply the integral form of the conservation laws to the left portion of Fig. 1.2, that is the control volume [x L, ] [, T ]. We obtain TS L U(x, T )dx = TS L U L + T (F L F L ), (14) where F L is the flux F(U) along the t axis. Solving for F L we find F L = F L S L U L 1 T TS L U(x, T )dx. (15)
Evaluation of the integral form of the conservation laws on the control volume [, x R ] [, T ] yields F R = F R S R U R + 1 T TSR The reader can easily verify that the equality F L = F R U(x, T )dx. (16) results in the consistency condition (9). All relations so far are exact, as we are assuming the exact solution of the Riemann problem.
The Harten-Lax-van Leer (HLL) Approximate Riemann Solver (1983). x U L if t S L, Ũ(x, t) = U hll if S L x t S R, x U R if t S R, Fig. 3 shows the two-wave structure of this approximate Riemann solver. (17) t S L SR hll U U L U R Fig. 3. Two-wave model. Approximate HLL Riemann solver. Solution in the Star Region consists of a single state U hll separated from data states by two waves of speeds S L and S R. x
The HLL flux F hll for the subsonic case S L S R is found by inserting U hll in (13) into (15) or (16) to obtain or F hll = F L + S L (U hll U L ), (18) F hll = F R + S R (U hll U R ). (19) Use of (13) in (18) or (19) gives the HLL flux F hll = S RF L S L F R + S L S R (U R U L ) S R S L (2) for the subsonic case S L S R.
The corresponding HLL intercell flux for the approximate Godunov method is then given by F L if S L, F hll i+ 1 2 = S R F L S L F R + S L S R (U R U L ) S R S L, if S L S R, F R if S R. (21) Given the speeds S L and S R we have an approximate intercell flux (21) to be used in the conservative formula (2) to produce an approximate Godunov method. A shortcoming of the HLL scheme, with its two-wave model, is exposed by contact discontinuities, shear waves and material interfaces, or any type of intermediate waves.
The HLLC Approximate Riemann Solver (Toro et al, 1992). The HLLC scheme is a modification of the HLL scheme whereby the missing contact and shear waves in the Euler equations are restored. HLLC for the Euler equations has a three-wave model t S L S* S R U * L U*R U L U R Fig. 4. HLLC approximate Riemann solver. Solution in the Star Region consists of two constant states separated from each other by a middle wave of speed S. x
Useful Relations. Consider Fig. 2. Evaluation of the integral form of the conservation laws in the control volume reproduces the result of equation (12), even if variations of the integrand across the wave of speed S are allowed. Note that the consistency condition (9) effectively becomes the condition (12). By splitting the left hand side of integral (12) into two terms we obtain 1 T (S R S L ) TSR TS L U(x, T )dx = U L + U R, (22)
where the following integral averages are introduced U L = U R = 1 TS U(x, T )dx, T (S S L ) TS L 1 TSR U(x, T )dx. T (S R S ) TS (23) Use of (23) into (22) and use of (12), make condition (9) ( ) ( ) S SL SR S U L + U R = U hll, (24) S R S L S R S L The HLLC approximate Riemann solver is given as follows x U L, if t S L, U Ũ(x, t) = L, if S L x t S, U R, if S x t S R, x U R, if t S R. (25)
Now we seek a corresponding HLLC numerical flux of the form F L, if S L, F hllc F = L, if S L S, (26) i+ 1 2 F R, if S S R, F R, if S R, with the intermediate fluxes F L and F R still to be determined, see Fig. 4. By integrating over appropriate control volumes we obtain F L = F L + S L (U L U L ), (27) F R = F L + S (U R U L ), (28) F R = F R + S R (U R U R ). (29) These are three equations for the four unknowns vectors U L, F L, U R, F R.
We seek the solution for the two unknown intermediate fluxes F L and F R. There are more unknowns than equations and some extra conditions need to be imposed, in order to solve the algebraic problem. We impose p L = p R = p, u L = u R = u, v L = v L, v R = v R, w L = w L, w R = w R. } for pressure and normal velocity (3) } for tangential velocities (31) Conditions (3), (31) are identically satisfied by the exact solution. In addition we impose S = u (32) and thus if an estimate for S is known, the normal velocity component u in the Star Region is known.
Now equations (27) and (29) can be re arranged as S L U L F L = S L U L F L, (33) S R U R F R = S R U R F R, (34) where the right hand sides of (33) and (34) are known constant vectors (data). We also note the useful relation F(U) = uu + pd, D = [, 1,,, u] T. (35) Assuming S L and S R to be known and performing algebraic manipulations of the first and second components of equations (33) (34) one obtains p L = p L +ρ L (S L u L )(S u L ), p R = p R +ρ R (S R u R )(S u R ). (36)
From (3) p L = p R, which from (36) gives S = p R p L + ρ L u L (S L u L ) ρ R u R (S R u R ) ρ L (S L u L ) ρ R (S R u R ). (37) Manipulation of (33) and (34) and using p L and p R from (36) gives F K = F K + S K (U K U K ), (38) for K=L and K=R, with the intermediate states given as 1 S v K U K = ρ K ( SK u K S K S ) E K ρ K + (S u K ) w K [ S + ] p K ρ K (S K u K ) The final choice of the HLLC flux is made according to (26).. (39)
Variation 1 of HLLC. From equations (33) and (34) we may write the following solutions for the state vectors U L and U R U K = S K U K F K + p K D S L S, D = [, 1,,, S ], (4) with p L and p R as given by (36). Substitution of p K from (36) into (4) followed by use of (27) and (29) gives direct expressions for the intermediate fluxes as F K = S (S K U K F K ) + S K (p K + ρ L (S K u K )(S u K ))D, S K S (41) with the final choice of the HLLC flux made again according to (26).
Variation 2 of HLLC. A different HLLC flux is obtained by assuming a single mean pressure value in the Star Region, and given by the arithmetic average of the pressures in (36), namely P LR = 1 2 [p L + p R + ρ L (S L u L )(S u L ) + ρ R (S R u R )(S u R )]. Then the intermediate state vectors are given by (42) U K = S K U K F K + P LR D S K S. (43) Substitution of these into (27) and (29) gives the fluxes F L and F R as F K = S (S K U K F K ) + S K P LR D S K S. (44) Again the final choice of HLLC flux is made according to (26).
Remarks. The original HLLC formulation (38) (39) enforces the condition p L = p R, which is satisfied by the exact solution. In the alternative HLLC formulation (41) we relax such condition, being more consistent with the pressure approximations (36). There is limited practical experience with the alternative HLLC formulations (41) and (44). General equation of state. All manipulations, assuming that wave speed estimates for S L and S R are available, are valid for any equation of state; this only enters when prescribing estimates for S L and S R.
Multidimensional multicomponent flow. Consider the advection of a chemical species of concentrations q l by the normal flow speed u. Then we can write the following advection equation t q l + u x q l =, for l = 1,..., m. Note that these equations are written in non conservative form. However, by combining these with the continuity equation we obtain a conservative form of these equations, namely (ρq l ) t + (ρuq l ) x =, for l = 1,..., m. The eigenvalues of the enlarged system are as before, with the exception of λ 2 = u, which now, in three space dimensions, has multiplicity m + 3.
These conservation equations can then be added as new components to the conservation equations in (1) or (4), with the enlarged vectors of conserved variables and fluxes given as U = ρ ρu ρv ρw E ρq 1... ρq l... ρq m, F = ρu ρu 2 + p ρuv ρuw u(e + p) ρuq 1... ρuq l... ρuq m. (45)
The HLLC flux accommodates these new equations in a very natural way, and nothing special needs to be done. If the HLLC flux (38) is used, with F as in (45), then the intermediate state vectors are given by U K = ρ K ( SK u K S K S for K = L and K = R. ) E K ρ K + (S u K ) 1 S v K w K [ S + (q 1 ) K... (q l ) K... (q m ) K ] p K ρ K (S K u K ). (46)
Wave Speed Estimates
We need estimates S L, S and S R. Davis (1988) suggested S L = u L a L, S R = u R + a R, (47) S L = min {u L a L, u R a R }, S R = max {u L + a L, u R + a R }. (48) Both Davis (1988) and Einfeldt (1988), proposed S L = ũ ã, S R = ũ + ã, (49) ũ and ã are the Roe average particle and sound speeds respectively ũ = ρl u L + [ ρ R u R ρl +, ã = (γ 1)( H 1 1/2 )] 2ũ2, (5) ρ R with the enthalpy H = (E + p)/ρ approximated as H = ρl H L + ρ R H R ρl + ρ R. (51)
Einfeldt (1988) proposed the estimates for his HLLE solver, where S L = ū d, S R = ū + d, (52) d 2 = ρl a 2 L + ρ R a 2 R ρl + ρ R + η 2 (u R u L ) 2 (53) and η 2 = 1 ρl ρr 2 ( ρ L + ρ R ) 2. (54) These wave speed estimates are reported to lead to effective and robust Godunov type schemes.
One-wave model. Consider a one-wave model with single speed S + >. Rusanov: By choosing S L = S + and S R = S + in the HLL flux (2) one obtains a Rusanov flux (1961) F i+1/2 = 1 2 (F L + F R ) 1 2 S + (U R U L ). (55) Lax-Friedrichs: Another possibility is S + = S n max, the wave speed for imposing the CFL condition, which satisfies S n max = C cfl x t, (56) where C cfl is the CFL coefficient. For C cfl = 1, S + = x t, which gives the Lax Friedrichs numerical flux F i+1/2 = 1 2 (F L + F R ) 1 x 2 t (U R U L ). (57)
Pressure Based Wave Speed Estimates Toro et al. (1994) suggested to first find an estimate p for the pressure in the Star Region and then take q K = S L = u L a L q L, S R = u R + a R q R, (58) [ 1 + γ + 1 2γ (p /p K 1) 1 if p p K ] 1/2 if p > p K. This choice discriminates between shocks and rarefactions. (59) If the K wave is a rarefaction then the speed S K is the speed of the head of the rarefaction, the fastest signal. If the K wave is a shock wave then the speed is an approximation of the shock speed.
A simple, acoustic type approximation for pressure is (Toro, 1991) p = max(, p pvrs ), p pvrs = 1 2 (p L + p R ) 1 2 (u R u L ) ρā, (6) where ρ = 1 2 (ρ L + ρ R ), ā = 1 2 (a L + a R ). (61) Another choice is furnished by the Two Rarefaction Riemann solver, namely [ al + a R γ 1 2 p = p tr = (u ] 1/z R u L ) a L /pl z + a R/pR z, (62) where P LR = ( pl p R ) z ; z = γ 1 2γ. (63)
The Two Shock Riemann solver gives p = p ts = g L(p )p L + g R (p )p R u g L (p ) + g R (p ), (64) where g K (p) = [ AK for K = L and K = R. p + B K ] 1/2, p = max(, p pvrs), (65)
Summary of HLLC Fluxes Step I: pressure estimate p. Step II: wave speed estimates: with q K = and S L = u L a L q L, S R = u R + a R q R, (66) [ 1 + γ + 1 2γ (p /p K 1) 1 if p p K ] 1/2 if p > p K. S = p R p L + ρ L u L (S L u L ) ρ R u R (S R u R ) ρ L (S L u L ) ρ R (S R u R ) (67). (68) Step III: HLLC flux. Compute the HLLC flux, according to F L if S L, F hllc F = L if S L S, (69) i+ 1 2 F R if S S R, F R if S R,
F K = F K + S K (U K U K ) (7) and U K = ρ K ( SK u K S K S ) 1 S v K w K [ E K + (S u K ) S + ρ K p K ] ρ K (S K u K ) (71).
There are two variants of the HLLC flux in the third step, as seen below. Step III: HLLC flux, Variant 1. Compute the numerical fluxes as F K = S (S K U K F K ) + S K (p K + ρ L (S K u K )(S u K ))D S K S, D = [, 1,,, S ] T, (72) and the final HLLC flux chosen according to (69). Step III: HLLC flux, Variant 2. Compute the numerical fluxes as F K = S (S K U K F K ) + S K P LR D, (73) S K S with D as in (72) and P LR = 1 2 [p L+p R +ρ L (S L u L )(S u L )+ρ R (S R u R )(S u R )]. The final HLLC flux is chosen according to (69). (74)
Numerical Results
Test problems: Test ρ L u L p L ρ R u R p R 1 1..75 1..125..1 2 1. -2..4 1. 2..4 3 1.. 1. 1...1 4 5.99924 19.5975 46.894 5.99242-6.19633 46.95 5 1. -19.59745 1. 1. -19.59745.1 6 1.4. 1. 1.. 1. 7 1.4.1 1. 1..1 1. Table 1. Data for seven test problems with exact solution
1 1.6 Density.5 Velocity.8.5 1 Position.5 1 Position 1 3.8 Pressure.5 Internal energy.5 1 Position 1.8.5 1 Position Godunov s method with HLLC Riemann solver applied to Test 1, with x =.3. Numerical (symbol) and exact (line) solutions are compared at time.2.
1 2 Density.5 Velocity.5 1 Position -2.5 1 Position.5 Pressure.25.5 1 Position Internal energy 1.5.5 1 Position Godunov s method with HLLC Riemann solver applied to Test 2, with x =.5. Numerical (symbol) and exact (line) solutions are compared at time.15.
25 6 Density 3 Velocity 12.5.5 1 Position.5 1 Position 1 25 Pressure 5 Internal energy 125.5 1 Position.5 1 Position Godunov s method with HLLC Riemann solver applied to Test 3, with x =.5. Numerical (symbol) and exact (line) solutions are compared at time.12.
3 2 Density 15 Velocity 1.5 1 Position -1.5 1 Position 18 3 Pressure 9 Internal energy 15.5 1 Position.5 1 Position Godunov s method with HLLC Riemann solver applied to Test 4, with x =.4. Numerical (symbol) and exact (line) solutions are compared at time.35.
5 6 Density 3 Velocity -2.5 1 Position.5 1 Position 1 25 Pressure 5 Internal energy 125.5 1 Position.5 1 Position Godunov s method with HLLC Riemann solver applied to Test 5, with x =.8. Numerical (symbol) and exact (line) solutions are compared at time.12.
5 6 Density 3 Velocity -2.5 1 Position.5 1 Position 1 25 Pressure 5 Internal energy 125.5 1 Position.5 1 Position Godunov s method with HLL Riemann solver applied to Test 5, with x =.8. Numerical (symbol) and exact (line) solutions are compared at time.12.
HLL density 1.4 1 HLLC density 1.4 1.5 1 position.5 1 position HLL density 1.4 1 HLLC density 1.4 1.5 1 position.5 1 position Godunov s method with HLL (left) and HLLC (right) Riemann solvers applied to Tests 6 and 7. Numerical (symbol) and exact (line) solutions are compared at time 2..
Closing Remarks:
We have presented HLLC for the Euler equations. For the 2D shallow water equations see Toro E F Shock capturing methods for free-surface shallow flows. Wiley and Sons, 21. For Turbulent flow applications (implicit version of HLLC), see Batten, Leschziner and Goldberg (1997). For extensions to MHD equations see Gurski (24), Li (25), Mignone et al. (26++). For application to two-phase flow see Tokareva and Toro, JCP (21). For extensions see Takahiro (25) and Bouchut (27), Mignone (25).