Algorithmadvanced
HLLC Riemann solver
Also called HLLC flux.
Restores the contact wave in the HLL solver with two intermediate states, giving sharp contacts and shear layers.
- Time
- O(m M K) worst
- Space
- O(m M) extra
- Where
- K = the number of time steps (O(M) for a fixed end time and Courant number); M = the number of cells; m = the number of conserved components
- Model
- Real RAM
- Properties
- conservativedeterministicexact isolated contactexplicitkeeps stationary contact
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Eleuterio F. Toro, M. Spruce, W. Speares, 1994
The HLLC solver is the HLL solver with the contact wave put back. HLL replaces the fan of the Riemann problem by one constant state between a left speed and a right speed . That state cannot hold a contact discontinuity, so HLL smears contacts. HLLC (the C is for contact) splits the middle into two states and at a contact speed . The two states have the same velocity and the same pressure , but different densities. The jump conditions across the three waves then fix everything. Toro, Spruce and Speares (1994) introduced it. It keeps an isolated contact exactly, like the Roe solver, and it keeps most of the robustness of HLL, so it is a default solver in many gas dynamics codes.
In plain words
HLL treats everything between the fastest left wave and the fastest right wave as one blended state. For gas this blends hot and cold gas at a contact, so the contact spreads out over time. HLLC adds one more wave in the middle that moves with the gas. Gas to the left of this wave keeps its own density, gas to the right keeps its own, and only the pressure and the velocity are shared. If the data are already just a contact, the method sees that and moves it without any smearing at the face.
The problem
Given cell averages of the Euler equations with , , , and , compute a face flux from and for the conservative update . The flux should be exact for an isolated contact.
The algorithm
HLLC-FLUX(U_L, U_R)- 1
(S_L, S_R) <- WAVE-SPEEDS(U_L, U_R) ▷ Einfeldt estimates - 2
if S_L >= 0: return F(U_L) - 3
if S_R <= 0: return F(U_R) - 4
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)) - 5
if S* >= 0: K <- L else K <- R - 6
U*_K <- ρ_K (S_K - u_K)/(S_K - S*) · (1, S*, E_K/ρ_K + (S* - u_K)(S* + p_K/(ρ_K (S_K - u_K)))) - 7
return F(U_K) + S_K (U*_K - U_K) FV-STEP(U, Δt, Δx)- 8
add one ghost cell on each side (copy for outflow, wrap for periodic) - 9
for each face j+1/2: F_{j+1/2} <- HLLC-FLUX(U_j, U_{j+1}) - 10
for each cell j: U_j <- U_j - (Δt/Δx)(F_{j+1/2} - F_{j-1/2})
The speeds of line L1 are and with the Roe averages , and . The time step is with forward Euler. The middle pressure is , the same for and ; line L4 is the condition that the two are equal.
Example
The flux by hand. Take Sod's states and . The Einfeldt speeds are and (computed on the HLL page). Both velocities are zero, so line L4 is
Since , . Line L6 gives , so the middle state is . The middle pressure is . Line L7 gives the flux
The exact solution has and and the exact Godunov flux is . The HLL flux with the same speeds is . The HLLC mass flux is closer to the exact one.
Sod's tube. On , outflow boundaries, Courant number 0.9, , the density errors against exact cell averages, measured with the code on this page, are:
| cells | steps | HLLC | HLL (Einfeldt) |
|---|---|---|---|
| 100 | 48 | 0.01387 | 0.01505 |
| 200 | 97 | 0.00919 | 0.00994 |
| 400 | 194 | 0.00581 | 0.00629 |
The observed orders are 0.59 and 0.66. The gain over HLL comes from the contact.
A moving contact. On a periodic grid of 100 cells, put for and elsewhere, with and . After 149 steps () the density error is 0.0459 for HLLC and 0.0578 for HLL. In both, and stay exact to . A moving contact is still smeared by HLLC, because the scheme averages over a cell each step. Only the face flux is exact.
A contact at rest. With on the left half and on the right half, and , every face flux is and the solution does not change at all. HLL, on the same data, gives around the contact after 8 steps.
A smooth wave. For , , on a periodic grid, the density errors at for are , , and , with orders 1.01, 0.99 and 1.00. The HLL errors are .
Correctness
The proof is in proofs/correctness.md. Theorem: with , and , the middle states of lines L4 and L6 are the unique states with a common velocity and a common pressure that satisfy the Rankine-Hugoniot conditions across and . The jump across also satisfies them, so the average of the two middle states over the fan is the HLL state: the solver is consistent with the integral form of the law. The flux is consistent, , it is continuous across the switch , and the scheme is conservative. For data with and , the solver returns the exact flux, and a contact at rest is a steady solution of the scheme. The middle densities are positive. Positivity of the middle pressures is shown by Batten et al. (1997) for these speeds and is not proved on this page.
Proof: The HLLC flux is consistent and conservative, its middle states satisfy the jump conditions, and it resolves an isolated contact exactlyfull
Setting. The system is the 1D Euler equations with , and . At a face with states and , line L1 gives speeds . If or , lines L2 and L3 return the upwind flux. Otherwise lines L4 to L7 use the contact speed
the middle states, for ,
and the flux with if and if . The approximate Riemann solution is , , , on the four intervals cut by , , . The scheme is with (line L10).
We assume , and . The Einfeldt speeds of line L1 give the first two, since and . Batten, Clarke, Lambert and Causon (1997) discuss the third. The denominator of is then , so is defined.
Lemma 1 (the middle states are the unique solution of the jump conditions). Look for two middle states , with the same velocity and the same pressure , such that the Rankine-Hugoniot conditions
hold, where means . Then , and are the ones above, and
Proof. The mass condition is , so , which gives . The momentum condition is . Use :
The two values of , for and , must be equal. This is one linear equation in :
whose solution is the formula for . The energy condition is , so
Put in . The numerator becomes , and dividing by gives the third component of above.
The test checks the equal velocity, the equal and the jump conditions on 50 random pairs of states.
Note that is the pressure in the momentum flux, not the pressure that the equation of state gives for . The two differ in general.
Lemma 2 (consistency with the integral form). . So the average of over the fan is the HLL state.
Proof. Write as in Lemma 1. The jump across also satisfies the Rankine-Hugoniot condition: , because the velocity and are the same on both sides. Add the three conditions across , and :
Collect the terms.
Lemma 3 (the flux). The flux of at is if and if . At the two are equal, so the flux is a continuous function of the data across the switch of line L5.
Proof. The first two statements are the jump conditions of Lemma 1. At , the condition across of Lemma 2 gives .
Theorem 1 (consistency and conservation). , and on a periodic grid .
Proof. With , the formula gives , since numerator and denominator both reduce to a multiple of : the numerator is and the denominator is . Then , the velocity is , and the energy is , so and the flux is . In the supersonic cases the flux is directly. Conservation: each face flux enters two cells with opposite signs, and the sum telescopes.
Theorem 2 (an isolated contact is exact). Let and , with any densities, and . Then , and . So the HLLC flux is if and if , which is the exact Godunov flux of this Riemann problem. In particular, for every face flux of the scheme is , and a contact at rest is a steady solution of the scheme.
Proof. With equal and , the numerator of is , which is times the denominator. So . Then , the velocity is , and the energy component is . So , and Lemma 3 gives . The exact solution of this Riemann problem is the contact moving at speed , and its flux at is for and for . For both are . In the scheme every face then has the flux , so every flux difference is zero.
Theorem 3 (positive density and convex averages). Assume the speeds satisfy the conditions of the setting at every face and . Then (1) every middle density is positive, and (2) is the average over cell of the approximate solutions of its two faces. So if all the states , and have positive density and pressure, so does .
Proof. (1) is a ratio of two negative numbers, and is a ratio of two positive numbers. (2) With the fans of two faces do not meet inside a cell. By Lemma 3 and the jump conditions, the integral of over the part of each fan inside cell changes by exactly times the flux difference across that part. Summing the two parts gives . The set of states with positive density and pressure is convex (the pressure is a concave function of for , see Lemma 5 of the proof on the HLL page), so an average of such states is such a state.
Remark. Theorem 3 does not prove that the pressures of and are positive. Batten, Clarke, Lambert and Causon (1997) show that HLLC with the Einfeldt speeds is positively conservative. The proof here does not repeat their argument, and the test checks positivity only on the 123 problem. Unlike HLL, the HLLC middle states are not averages of the exact solution, so the cell entropy inequality of the HLL proof does not carry over.
Complexity
Theorem, in the real-RAM model: one HLLC flux costs operations and a constant number of square roots for the speeds, a few more operations than HLL. One step costs and the memory is . A fixed end time at a fixed Courant number takes steps, so the total is .
Properties
- Keeps contacts and shear waves. A contact at rest is exact. In 2D and 3D the transverse velocity is carried by the two middle states like the density, so a shear layer at rest is also kept.
- Upwind for supersonic flow. For or it returns or .
- Positive in practice. On the 123 problem (, , , ) the smallest density is 0.0186 and the smallest pressure is 0.0069. The exact density at the center is 0.0219.
- First order. The measured order on the smooth wave is 0.99 to 1.01.
- Not entropy stable by proof. The middle states are not averages of the exact solution, so the entropy argument of HLL does not apply.
Variants and improvements
- Other speed estimates. Davis speeds or pressure-based speeds (Toro 2009, Chapter 10) can replace the Einfeldt speeds of line L1.
- Low Mach corrections. At low Mach number the dissipation on the acoustic waves is too large. Rescaled forms reduce it.
- Hybrids for the carbuncle. HLLC, like Roe, can give the carbuncle at strong shocks aligned with the grid. Codes switch to HLL in the direction normal to such a shock.
- HLLD and multi-state solvers. For magnetohydrodynamics, more middle states give the HLLD solver.
- High order. Use the flux on MUSCL or WENO values with a Runge-Kutta method.
When to use it
Use HLLC as the default flux for compressible gas dynamics: it keeps contacts and shear layers like Roe, it needs no eigenvectors and no entropy fix, and it is robust near vacuum. Use HLL instead at strong grid-aligned shocks where the carbuncle appears, or for systems where the middle wave structure is not known.
Pitfalls
- The pressure of the middle state. The pressure in the flux is not the pressure that the equation of state gives for . Do not recompute it from .
- The sign of the denominator. The denominator of is negative when and . Estimates that break these conditions can make it zero.
- Choosing . At both choices give the same flux (Lemma 3 of the proof), so the switch is safe. A test on or in place of is wrong.
- Expecting a sharp moving contact. The face flux of an isolated contact is exact, but a moving contact still smears at first order because of the cell averages. Only a contact at rest stays sharp.
Implementations
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/hllc-riemann-solver/. The authors are listed in prov/HQEZ7E.jsonl.
"""HLLC approximate Riemann solver for the 1D Euler equations (Toro, Spruce and Speares 1994).
Two middle states, separated by a contact at speed S*, replace the one HLL state.
The outer speeds are the estimates of Einfeldt (1988) with Roe averages.
"""
from math import sqrt
GAMMA = 1.4
def prim_to_cons(w, g=GAMMA):
rho, u, p = w
return (rho, rho * u, p / (g - 1.0) + 0.5 * rho * u * u)
def cons_to_prim(q, g=GAMMA):
rho, m, e = q
u = m / rho
return (rho, u, (g - 1.0) * (e - 0.5 * m * u))
def euler_flux(q, g=GAMMA):
rho, m, e = q
u = m / rho
p = (g - 1.0) * (e - 0.5 * m * u)
return (m, m * u + p, u * (e + p))
def wave_speeds(ql, qr, g=GAMMA):
"""Einfeldt estimates (S_L, S_R) with the Roe averages of u and H."""
rl, ul, pl = cons_to_prim(ql, g)
rr, ur, pr = cons_to_prim(qr, g)
cl, cr = sqrt(g * pl / rl), sqrt(g * pr / rr)
wl, wr = sqrt(rl), sqrt(rr)
u = (wl * ul + wr * ur) / (wl + wr)
h = (wl * (ql[2] + pl) / rl + wr * (qr[2] + pr) / rr) / (wl + wr)
c = sqrt((g - 1.0) * (h - 0.5 * u * u))
return min(ul - cl, u - c), max(ur + cr, u + c)
def contact_speed(ql, qr, sl, sr, g=GAMMA):
"""S* from the jump conditions across S_L and S_R with equal middle pressure and velocity."""
rl, ul, pl = cons_to_prim(ql, g)
rr, ur, pr = cons_to_prim(qr, g)
return (pr - pl + rl * ul * (sl - ul) - rr * ur * (sr - ur)) / (rl * (sl - ul) - rr * (sr - ur))
def star_state(q, s, ss, g=GAMMA):
"""The middle state U*_K next to the outer wave of speed s = S_K, for the contact speed ss = S*."""
rho, u, p = cons_to_prim(q, g)
r = rho * (s - u) / (s - ss)
return (r, r * ss, r * (q[2] / rho + (ss - u) * (ss + p / (rho * (s - u)))))
def hllc_flux(ql, qr, g=GAMMA):
"""The HLLC flux at the face between the conserved states ql and qr."""
sl, sr = wave_speeds(ql, qr, g) # @line L1
if sl >= 0.0: # @line L2
return euler_flux(ql, g)
if sr <= 0.0: # @line L3
return euler_flux(qr, g)
ss = contact_speed(ql, qr, sl, sr, g) # @line L4
if ss >= 0.0: # @line L5
q, s = ql, sl
else:
q, s = qr, sr
st = star_state(q, s, ss, g) # @line L6
return tuple(f + s * (a - b) for f, a, b in zip(euler_flux(q, g), st, q)) # @line L7
def step(cells, dt, dx, flux, periodic=False):
"""One forward Euler step of the conservative scheme with one ghost cell on each side."""
ext = ([cells[-1]] + list(cells) + [cells[0]]) if periodic else ([cells[0]] + list(cells) + [cells[-1]]) # @line L8
faces = [flux(ext[j], ext[j + 1]) for j in range(len(ext) - 1)] # @line L9
lam = dt / dx
return [tuple(q - lam * (b - a) for q, a, b in zip(cells[j], faces[j], faces[j + 1])) for j in range(len(cells))] # @line L10
def solve_euler(cells, dx, t_end, cfl=0.9, g=GAMMA, periodic=False):
"""March to t_end with dt = cfl dx / max(|u| + c). Returns (cells, number of steps)."""
t, n = 0.0, 0
flux = lambda a, b: hllc_flux(a, b, g)
while t < t_end - 1e-14:
smax = 0.0
for q in cells:
rho, u, p = cons_to_prim(q, g)
smax = max(smax, abs(u) + sqrt(g * p / rho))
dt = min(cfl * dx / smax, t_end - t)
cells = step(cells, dt, dx, flux, periodic)
t += dt
n += 1
return cells, n
test_hllc_riemann_solver.py 181 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/hllc-riemann-solver/. The authors are listed in prov/HQEZ7E.jsonl.
import random
from math import cos, log2, pi, sqrt
from hllc_riemann_solver import (
cons_to_prim,
contact_speed,
euler_flux,
hllc_flux,
prim_to_cons,
solve_euler,
star_state,
wave_speeds,
)
SOD = ((1.0, 0.0, 1.0), (0.125, 0.0, 0.1))
def exact_solution(left, right, g=1.4):
"""Reference: the exact Riemann solution. Returns a function of xi = x / t giving (rho, u, p)."""
(rl, ul, pl), (rr, ur, pr) = left, right
cl, cr = sqrt(g * pl / rl), sqrt(g * pr / rr)
z = (g - 1.0) / (2.0 * g)
def fk(p, rk, pk, ck):
if p > pk:
return (p - pk) * sqrt(2.0 / ((g + 1.0) * rk) / (p + (g - 1.0) / (g + 1.0) * pk))
return 2.0 * ck / (g - 1.0) * ((p / pk) ** z - 1.0)
lo, hi = 1e-12, 1e4
for _ in range(200):
mid = 0.5 * (lo + hi)
if fk(mid, rl, pl, cl) + fk(mid, rr, pr, cr) + ur - ul > 0.0:
hi = mid
else:
lo = mid
ps = 0.5 * (lo + hi)
us = 0.5 * (ul + ur) + 0.5 * (fk(ps, rr, pr, cr) - fk(ps, rl, pl, cl))
def sample(xi):
rk, uk, pk, ck, sg = (rl, ul, pl, cl, 1.0) if xi <= us else (rr, ur, pr, cr, -1.0)
xs, uss, uks = sg * xi, sg * us, sg * uk
if ps > pk:
if xs <= uks - ck * sqrt((g + 1.0) / (2.0 * g) * ps / pk + z):
return (rk, uk, pk)
r, gg = ps / pk, (g - 1.0) / (g + 1.0)
return (rk * (r + gg) / (gg * r + 1.0), us, ps)
if xs <= uks - ck:
return (rk, uk, pk)
if xs >= uss - ck * (ps / pk) ** z:
return (rk * (ps / pk) ** (1.0 / g), us, ps)
w = 2.0 / (g + 1.0) + (g - 1.0) / ((g + 1.0) * ck) * (uks - xs)
return (rk * w ** (2.0 / (g - 1.0)), sg * 2.0 / (g + 1.0) * (ck + 0.5 * (g - 1.0) * uks + xs), pk * w ** (2.0 * g / (g - 1.0)))
return sample
def sod_l1(m, t=0.2):
"""L1 error of the density against exact cell averages (16-point midpoint rule per cell)."""
sample = exact_solution(*SOD)
cells = [prim_to_cons(SOD[0] if (j + 0.5) / m < 0.5 else SOD[1]) for j in range(m)]
cells, _ = solve_euler(cells, 1.0 / m, t)
err = 0.0
for j, q in enumerate(cells):
ex = sum(sample(((j + (k + 0.5) / 16) / m - 0.5) / t)[0] for k in range(16)) / 16
err += abs(q[0] - ex) / m
return err
def density_wave(m, t):
"""Exact cell averages of rho = 1 + 0.2 sin(2 pi (x - t)), with u = 1 and p = 1."""
dx = 1.0 / m
return [1.0 + 0.2 * (cos(2 * pi * (j * dx - t)) - cos(2 * pi * ((j + 1) * dx - t))) / (2 * pi * dx) for j in range(m)]
def random_state(rng):
return prim_to_cons((rng.uniform(0.1, 2), rng.uniform(-1, 1), rng.uniform(0.1, 2)))
def test_flux_at_the_sod_interface_by_hand() -> None:
ql, qr = prim_to_cons(SOD[0]), prim_to_cons(SOD[1])
sl, sr = wave_speeds(ql, qr)
ss = contact_speed(ql, qr, sl, sr)
assert abs(ss - (0.1 - 1.0) / (sl - 0.125 * sr)) < 1e-14 # both velocities are 0
st = star_state(ql, sl, ss)
assert abs(st[0] - sl / (sl - ss)) < 1e-14
f = hllc_flux(ql, qr)
assert abs(f[0] - st[0] * ss) < 1e-14 # the mass flux through the face is rho*_L S*
assert all(abs(a - (b + sl * (c - d))) < 1e-14 for a, b, c, d in zip(f, euler_flux(ql), st, ql))
assert abs(ss - 0.678118) < 1e-6
assert abs(f[0] - 0.431067) < 1e-6 and abs(f[1] - 0.489954) < 1e-6 and abs(f[2] - 1.162864) < 1e-6
def test_consistency() -> None:
rng = random.Random(1)
for _ in range(50):
q = random_state(rng)
assert all(abs(a - b) < 1e-12 for a, b in zip(hllc_flux(q, q), euler_flux(q)))
def test_middle_states_have_equal_pressure_and_velocity_and_match_the_hll_average() -> None:
rng = random.Random(3)
for _ in range(50):
ql, qr = random_state(rng), random_state(rng)
sl, sr = wave_speeds(ql, qr)
ss = contact_speed(ql, qr, sl, sr)
a, b = star_state(ql, sl, ss), star_state(qr, sr, ss)
assert abs(a[1] / a[0] - ss) < 1e-12 and abs(b[1] / b[0] - ss) < 1e-12
(rl, ul, pl), (rr, ur, pr) = cons_to_prim(ql), cons_to_prim(qr)
p_left = pl + rl * (sl - ul) * (ss - ul) # the middle pressure from the momentum jump condition
p_right = pr + rr * (sr - ur) * (ss - ur)
assert abs(p_left - p_right) < 1e-12 * (1 + abs(p_left))
fl, fr = euler_flux(ql), euler_flux(qr)
for q, s, st in ((ql, sl, a), (qr, sr, b)): # the jump conditions across S_L and S_R
fs = (st[1], st[1] * ss + p_left, ss * (st[2] + p_left))
assert all(abs((fs[i] - euler_flux(q)[i]) - s * (st[i] - q[i])) < 1e-10 for i in range(3))
for i in range(3): # (S* - S_L) U*_L + (S_R - S*) U*_R = S_R U_R - S_L U_L - (F_R - F_L)
lhs = (ss - sl) * a[i] + (sr - ss) * b[i]
rhs = sr * qr[i] - sl * ql[i] - (fr[i] - fl[i])
assert abs(lhs - rhs) < 1e-10 * (1 + abs(rhs))
def test_an_isolated_contact_gives_the_exact_flux() -> None:
for u in (0.3, -0.3):
ql, qr = prim_to_cons((1.0, u, 1.0)), prim_to_cons((0.5, u, 1.0))
want = euler_flux(ql) if u > 0 else euler_flux(qr)
assert all(abs(a - b) < 1e-13 for a, b in zip(hllc_flux(ql, qr), want))
def test_stationary_contact_is_kept_exactly() -> None:
m = 40
cells = [prim_to_cons((1.0 if j < m // 2 else 0.5, 0.0, 1.0)) for j in range(m)]
cells, _ = solve_euler(cells, 1.0 / m, 0.1)
w = [cons_to_prim(q) for q in cells]
assert all(abs(x[0] - (1.0 if j < m // 2 else 0.5)) < 1e-13 for j, x in enumerate(w))
assert all(abs(x[1]) < 1e-13 and abs(x[2] - 1.0) < 1e-13 for x in w)
def test_moving_contact_keeps_u_and_p() -> None:
m = 100
cells = [prim_to_cons((1.0 if 0.25 < (j + 0.5) / m < 0.75 else 0.5, 1.0, 1.0)) for j in range(m)]
cells, _ = solve_euler(cells, 1.0 / m, 0.5, periodic=True)
exact = [0.5 if 0.25 < ((j + 0.5) / m) % 1.0 < 0.75 else 1.0 for j in range(m)] # moved by 0.5
err = sum(abs(q[0] - e) for q, e in zip(cells, exact)) / m
assert err < 0.05
assert all(abs(cons_to_prim(q)[1] - 1.0) < 1e-13 and abs(cons_to_prim(q)[2] - 1.0) < 1e-13 for q in cells)
def test_sod_l1_error_decreases() -> None:
e100, e200 = sod_l1(100), sod_l1(200)
assert e200 < 0.0095 and e100 < 0.0142
assert 0.4 < log2(e100 / e200) < 0.8
def test_first_order_on_a_smooth_wave() -> None:
t, errs = 0.1, []
for m in (25, 50, 100):
cells = [prim_to_cons((r, 1.0, 1.0)) for r in density_wave(m, 0.0)]
cells, _ = solve_euler(cells, 1.0 / m, t, periodic=True)
errs.append(sum(abs(q[0] - e) for q, e in zip(cells, density_wave(m, t))) / m)
orders = [log2(errs[i] / errs[i + 1]) for i in range(2)]
assert all(abs(p - 1.0) < 0.2 for p in orders)
def test_conservation_on_a_periodic_grid() -> None:
m = 64
cells = [prim_to_cons((r, 1.0, 1.0)) for r in density_wave(m, 0.0)]
before = [sum(q[k] for q in cells) for k in range(3)]
cells, _ = solve_euler(cells, 1.0 / m, 0.05, periodic=True)
after = [sum(q[k] for q in cells) for k in range(3)]
assert all(abs(a - b) <= 1e-12 * abs(a) for a, b in zip(before, after))
def test_positivity_on_the_123_problem() -> None:
m = 100
cells = [prim_to_cons((1.0, -2.0, 0.4) if j < m // 2 else (1.0, 2.0, 0.4)) for j in range(m)]
cells, _ = solve_euler(cells, 1.0 / m, 0.15)
w = [cons_to_prim(q) for q in cells]
assert min(x[0] for x in w) > 0.01 and min(x[2] for x in w) > 0.0
History
Harten, Lax and van Leer (1983) noted that a solver with one middle state loses the contact and suggested that more states would help. Toro, Spruce and Speares (1994) built the solver with two middle states for the Euler equations and named it HLLC. Batten, Clarke, Lambert and Causon (1997) studied the choice of the outer speeds and of , and showed positivity with the Einfeldt speeds. The solver is described in detail in Toro (2009, Chapter 10).
References
- E. F. Toro, M. Spruce and W. Speares, Restoration of the contact surface in the HLL-Riemann solver, Shock Waves 4(1) (1994) 25-34, the two middle states, the contact speed and the flux; doi:10.1007/BF01414629
- P. Batten, N. Clarke, C. Lambert and D. M. Causon, On the choice of wavespeeds for the HLLC Riemann solver, SIAM Journal on Scientific Computing 18(6) (1997) 1553-1570, the speed estimates, the contact speed and positivity of HLLC; doi:10.1137/S1064827593260140
- Eleuterio F. Toro, Riemann Solvers and Numerical Methods for Fluid Dynamics, third edition, Springer, 2009, Chapter 10 (the HLLC solver for the Euler equations, the middle states and the wave speed estimates)
- Amiram Harten, Peter D. Lax and Bram van Leer, On upstream differencing and Godunov-type schemes for hyperbolic conservation laws, SIAM Review 25(1) (1983) 35-61, approximate Riemann solvers consistent with the integral form of the conservation law; doi:10.1137/1025002
- Bernd Einfeldt, On Godunov-type methods for gas dynamics, SIAM Journal on Numerical Analysis 25(2) (1988) 294-318, the outer speed estimates with Roe averages; doi:10.1137/0725021
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag HQEZ7E Edit this page History Report an error Markdown