Roe approximate Riemann solver with Harten entropy fix.
Computes the face flux using Roe-averaged states and characteristic wave decomposition. An entropy fix prevents non-physical expansion shocks at sonic points by smoothing acoustic eigenvalues that change sign.
Roe averages (√ρ-weighted): ũ = (√ρ_L u_L + √ρ_R u_R) / (√ρ_L + √ρ_R) H̃ = (√ρ_L H_L + √ρ_R H_R) / (√ρ_L + √ρ_R) c̃ = √((γ-1)(H̃ - ũ²/2)), ρ̃ = √(ρ_L ρ_R)
Harten entropy fix for acoustic eigenvalues λ₁ = ũ-c̃, λ₃ = ũ+c̃ (Harten & Hyman 1983, J. Comput. Phys. 50): δ = 2 ε c̃ (ε = 0.1) |λ|_fix = (λ² + δ²)/(2δ) if |λ| < δ, else |λ|
Roe flux: F_Roe = ½(F_L + F_R) - ½ Σₖ |λₖ|_fix Δwₖ rₖ
See Roe (1981), J. Comput. Phys. 43, 357–372. See Harten & Hyman (1983), J. Comput. Phys. 50, 235–269.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | q_L(:) | |||
| real(kind=wp), | intent(in) | :: | q_R(:) | |||
| real(kind=wp), | intent(out) | :: | flux(:) | |||
| real(kind=wp), | intent(in) | :: | gam |
Ratio of specific heats |