![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Iterative Riemann solver for GSPH (van Leer 1997). More...
Go to the source code of this file.
Classes | |
| struct | shammodels::gsph::riemann::RiemannResult< Tscal > |
| Result of Riemann solver. More... | |
Namespaces | |
| namespace | shammodels |
| namespace for models | |
Functions | |
| template<class Tscal> | |
| RiemannResult< Tscal > | shammodels::gsph::riemann::iterative_solver (Tscal u_L, Tscal rho_L, Tscal p_L, Tscal u_R, Tscal rho_R, Tscal p_R, Tscal gamma, Tscal tol=Tscal{1.0e-6}, u32 max_iter=20) |
| Approximate ("two-shock") iterative Riemann solver (van Leer 1997). | |
| template<class Tscal> | |
| RiemannResult< Tscal > | shammodels::gsph::riemann::hllc_solver (Tscal u_L, Tscal rho_L, Tscal p_L, Tscal u_R, Tscal rho_R, Tscal p_R, Tscal gamma) |
| HLL approximate Riemann solver. | |
Iterative Riemann solver for GSPH (van Leer 1997).
Implements an approximate ("two-shock") iterative Riemann solver for ideal gas: the same shock-relation impedance formula is used on both sides regardless of whether that side is physically a shock or a rarefaction, solved via Newton-Raphson to find (p*, v*). This is close to exact for shock-dominated pairs, but can be significantly inaccurate for strong rarefactions / near-vacuum conditions – see math/riemann/exact.hpp for the true exact solver (Toro-style, case-classified shock/rarefaction relations solved via bisection).
References:
Definition in file iterative.hpp.
|
inline |
HLL approximate Riemann solver.
Harten-Lax-van Leer approximate solver following the reference implementation. Uses Roe-averaged wave speeds for better wave speed estimates.
| u_L | Left state velocity |
| rho_L | Left state density |
| p_L | Left state pressure |
| u_R | Right state velocity |
| rho_R | Right state density |
| p_R | Right state pressure |
| gamma | Adiabatic index |
Definition at line 196 of file iterative.hpp.
|
inline |
Approximate ("two-shock") iterative Riemann solver (van Leer 1997).
Solves for an ideal gas using Newton-Raphson iteration on the shock relation applied to both sides. Returns the interface pressure and velocity (p*, v*). See math/riemann/exact.hpp for the true exact solver.
The left/right convention is:
| u_L | Left state velocity (normal component) |
| rho_L | Left state density |
| p_L | Left state pressure |
| u_R | Right state velocity (normal component) |
| rho_R | Right state density |
| p_R | Right state pressure |
| gamma | Adiabatic index |
| tol | Convergence tolerance (default: 1e-6) |
| max_iter | Maximum iterations (default: 20) |
Definition at line 75 of file iterative.hpp.