riemann_solver
Definitions of Riemann solvers for compressible flow.
This module provides a set of Riemann solver classes for use in the discretization of compressible flow equations, particularly in the context of hybridizable discontinuous Galerkin (HDG) and discontinuous Galerkin (DG) methods. Each solver implements different numerical flux and stabilization strategies for the convective terms, following various classical and modern approaches from the literature.
Representation of the Riemann problem solution in the x-t plane for the one-dimensional, transient Euler equations. [9]
For HDG methods, the approximate Riemann solver is incorporated into the numerical flux
by means of the convective stabilization matrix \(\mat{\tau}^\pm_c\), where \(\widehat{\vec{U}}_h\) are the conservative facet variables and \(\vec{U}^\pm_h\) are the conservative element variables. The transmission condition
then assures the continuity of the numerical flux across the facet.
For DG methods, an example for a numerical flux is given by
\[\vec{F}^*(\vec{U}_i, \vec{U}_j) := \frac{1}{2} \left( \vec{F}(\vec{U}_i) + \vec{F}(\vec{U}_j) \right) \vec{n} - \frac{|\lambda_{max}|}{2} ( \vec{U}_j - \vec{U}_i ),\]where, \(\vec{U}_i\) and \(\vec{U}_j\) correspond to the local solution and its neighboring solution, respectively.
- Available Riemann solvers:
Upwind: Standard upwind flux for convective stabilization.
LaxFriedrich: Lax-Friedrichs (Rusanov) flux, providing robust stabilization.
Roe: Roe’s approximate Riemann solver, based on characteristic decomposition.
HLL: Harten-Lax-van Leer (HLL) flux, using estimates of the fastest wave speeds.
HLLEM: Harten-Lax-van Leer-Contact (HLLEM) flux, with improved contact wave resolution.
- Each solver provides methods to compute:
The convective stabilization matrix for HDG methods.
A simplified stabilization matrix for inviscid flows or special boundary conditions.
The numerical flux for standard DG methods (where implemented).
- class HLL(mesh: Mesh, root: Configuration = None, **default)
HLL scheme for the convective flux.
- get_convective_stabilisation_matrix_hdg(U: flowfields, unit_vector: CoefficientFunction) CoefficientFunction
Returns the convective stabilisation matrix \(\mat{\tau}_c\) for HDG.
\[\bm{\tau}_c := \max(u_n + c, 0) \bm{I}\]- Note:
See equation \((38)\) in [5]
- get_simplified_convective_stabilisation_matrix_hdg(U: flowfields, unit_vector: CoefficientFunction) CoefficientFunction
Returns the simplified convective stabilisation matrix \(\mat{\tau}_{cs}\) for HDG.
This stabilisation matrix is used in an inviscid flow to overcome the issue of indefiniteness of the facet variable, when the flow is parallel to the facet [P1].
\[\bm{\tau}_{cs} := (1 + \Ma_n) \bm{I}, \quad \Ma_n := -1 \leq \frac{u_n}{c} \leq 1\]
- class HLLEM(mesh, root=None, **default)
HLLEM scheme for the convective flux.
- property theta_0
Defines a threshold value \(\theta_0\) used to stabilize contact waves, when the eigenvalue tends to zero. This can occur if the flow is parallel to the element or domain boundary!
- Note:
See Remark \(11\) in [5]
- get_convective_stabilisation_matrix_hdg(U: flowfields, unit_vector: CoefficientFunction) CoefficientFunction
Returns the convective stabilisation matrix \(\mat{\tau}_c\) for HDG.
\[\begin{align*} \theta &:= \max\left(\frac{|u_n|}{|u_n| + c}, \theta_0\right), & \Theta &:= \text{diag}(1, \theta, \ldots, \theta, 1), & \bm{\tau}_c &:= \bm{P} \bm{\Theta} \bm{P}^{-1} \end{align*}\]- Note:
See equation \((40)\) in [5]
- get_simplified_convective_stabilisation_matrix_hdg(U: flowfields, unit_vector: CoefficientFunction) CoefficientFunction
Returns the simplified convective stabilisation matrix \(\mat{\tau}_{cs}\) for HDG.
This stabilisation matrix is used in an inviscid flow to overcome the issue of indefiniteness of the facet variable, when the flow is parallel to the facet [P1].
\[\bm{\tau}_{cs} := (1 + \Ma_n) \bm{I}, \quad \Ma_n := -1 \leq \frac{u_n}{c} \leq 1\]
- class LaxFriedrich(mesh: Mesh, root: Configuration = None, **default)
Lax-Friedrich scheme for the convective flux.
- get_convective_stabilisation_matrix_hdg(U: flowfields, unit_vector: CoefficientFunction) CoefficientFunction
Returns the convective stabilisation matrix \(\mat{\tau}_c\) for HDG.
\[\bm{\tau}_c := (|u_n| + c) \bm{I}\]- Note:
See equation \((35)\) in [5]
- get_simplified_convective_stabilisation_matrix_hdg(U: flowfields, unit_vector: CoefficientFunction) CoefficientFunction
Returns the simplified convective stabilisation matrix \(\mat{\tau}_{cs}\) for HDG.
This stabilisation matrix is used in an inviscid flow to overcome the issue of indefiniteness of the facet variable, when the flow is parallel to the facet [P1].
\[\bm{\tau}_{cs} := \bm{I}\]
- class RiemannSolver(mesh: Mesh, root: Configuration = None, **default)
Base class for Riemann solvers in compressible flow.
- class Roe(mesh: Mesh, root: Configuration = None, **default)
Roe scheme for the convective flux.
- get_convective_stabilisation_matrix_hdg(U: flowfields, unit_vector: CoefficientFunction) CoefficientFunction
Returns the convective stabilisation matrix \(\mat{\tau}_c\) for HDG.
\[\bm{\tau}_c := |\mat{A}_n|\]- Note:
See equation \((36)\) in [5]
- get_simplified_convective_stabilisation_matrix_hdg(U: flowfields, unit_vector: CoefficientFunction) CoefficientFunction
Returns the simplified convective stabilisation matrix \(\mat{\tau}_{cs}\) for HDG.
This stabilisation matrix is used in an inviscid flow to overcome the issue of indefiniteness of the facet variable, when the flow is parallel to the facet [P1].
\[\bm{\tau}_{cs} := \bm{I}\]
- class Upwind(mesh: Mesh, root: Configuration = None, **default)
Upwind scheme for the convective flux.
- get_convective_stabilisation_matrix_hdg(U: flowfields, unit_vector: CoefficientFunction) CoefficientFunction
Returns the convective stabilisation matrix \(\mat{\tau}_c\) for HDG.
\[\bm{\tau}_c := \bm{A}_n^+\]
- get_simplified_convective_stabilisation_matrix_hdg(U, unit_vector)
Returns the simplified convective stabilisation matrix \(\mat{\tau}_{cs}\) for HDG.
This stabilisation matrix is used in an inviscid flow to overcome the issue of indefiniteness of the facet variable, when the flow is parallel to the facet [P1].
\[\bm{\tau}_{cs} := \bm{Q}_n + \bm{I}\]