hdg

Definitions of conservative hdg discretizations.

class ConservativeDG_HDG(mesh, root=None, **default)
property scheme: IMEXRK_ARS443

Time scheme for the HDG method depending on the choosen time routine.

Getter:

Returns the time scheme

Setter:

Sets the time scheme

class ConservativeHDG(mesh, root=None, **default)

Conservative hybridizable Discontinuous Galerkin method for compressible flow.

Find \(\left(\vec{U}_h,\hat{\vec{U}}_h, \vec{Q}_h \right) \in U_h \times \hat{U}_h \times Q_h\) such that

\[\begin{split}\sum_{T \in \mesh} \int_{T} \frac{\partial \vec{U}_h}{\partial t} \cdot \vec{V}_h \, d\bm{x} - \int_{T} \left(\vec{F}(\vec{U}_h) - \vec{G}(\vec{U}_h, \vec{Q}_h)\right) : \grad{\vec{V}_h} \, d\bm{x}+ \int_{\partial T} (\hat{\vec{F}}_h - \hat{\vec{G}}_h) \vec{n} \cdot \vec{V}_h \, d\bm{s} & = 0, \\ - \sum_{F \in \facets^{\text{int}}} \int_{F} \jump{(\hat{\vec{F}}_h - \hat{\vec{G}}_h) \vec{n}} \cdot \hat{\vec{V}}_h \, d\bm{s} + \sum_{F \in \facets^{\text{ext}}} \int_{F} \hat{\vec{\Gamma}}_h \cdot \hat{\vec{V}}_h \, d\bm{s} & = 0, \end{split}\]

for all \(\left(\vec{V}_h,\hat{\vec{V}}_h \right) \in U_h \times \hat{U}_h\). With the discrete spaces choosen as

\[\begin{split}U_h & := L^2\left( (0, t_{end}] ; \mathbb{P}^k(\mesh, \mathbb{R}^{d+2}) \right), \\ \hat{U}_h & := L^2\left( (0, t_{end}] ; \mathbb{P}^k(\facets, \mathbb{R}^{d+2}) \right). \end{split}\]

In the formulation, \(\hat{\vec{\Gamma}}_h\) represents the boundary operator.

Note:

See MixedMethod for the definition of \(\vec{Q}_h\) and \(Q_h\).

property scheme: ImplicitEuler | BDF2 | IMEXRK_ARS443 | SDIRK22 | SDIRK33 | SDIRK54 | DIRK34_LDD | DIRK43_WSO2

Time scheme for the HDG method depending on the choosen time routine.

Getter:

Returns the time scheme

Setter:

Sets the time scheme

property mixed_method: Inactive | StrainHeat | Gradient

The mixed method to be used for the compressible flow solver.

add_farfield_formulation(blf: dict[str, dict[str, SumOfIntegrals]], lf: dict[str, dict[str, SumOfIntegrals]], bc: FarField, bnd: str)

Implementation of the farfield boundary condition FarField.

On the boundary \(\Gamma\) we solve [4, 5]

\[\int_{\Gamma} \left[ \widehat{\mat{A}}^+_n (\widehat{\vec{U}}_h - \vec{U}_h) - \widehat{\mat{A}}^-_n(\widehat{\vec{U}}_h - \vec{U}_\infty) \right] \cdot \widehat{\vec{V}}_h = \vec{0},\]

where \(\widehat{\mat{A}}^\pm_n\) are the convective Jacobians in normal direction \(\vec{n}\).

To increse the stability of the farfield condition on boundaries which are aligned with the flow, the identity Jacobian can be used instead of the convective Jacobian [P1]

\[\int_{\Gamma} \left[\widehat{\vec{U}}_h - \frac{\vec{U}_h + \vec{U}_\infty}{2} - \widehat{\mat{Q}}_n \frac{\vec{U}_h - \vec{U}_\infty}{2} \right] \cdot \widehat{\vec{V}}_h = \vec{0}.\]
get_convective_numerical_flux(U: flowfields, Uhat: flowfields, unit_vector: CoefficientFunction)

Convective numerical flux

\[\hat{\vec{F}}_h \vec{n}^\pm := \vec{F}(\hat{\vec{U}}_h) \vec{n}^\pm + \mat{\tau}_c(\hat{\vec{U}}_h) (\vec{U}_h - \hat{\vec{U}}_h)\]
Note:

See equation \((E22a)\) in [5].

Note:

See riemann_solver for more details on the definition of \(\mat{\tau}_c\).

get_diffusive_numerical_flux(U: flowfields, Uhat: flowfields, Q: flowfields, unit_vector: CoefficientFunction)

Diffusive numerical flux

\[\hat{\vec{G}}_h \vec{n}^\pm := \vec{G}(\hat{\vec{U}_h}, \vec{Q}_h) \vec{n}^\pm + \mat{\tau}_d (\vec{U}_h - \hat{\vec{U}}_h).\]
Note:

See equation \((E22b)\) in [5].

Note:

See MixedMethod for more details on the definition of \(\mat{\tau}_d\).

class Gradient(mesh: Mesh, root: Configuration = None, **default)
class Inactive(mesh: Mesh, root: Configuration = None, **default)
class MixedMethod(mesh: Mesh, root: Configuration = None, **default)
class StrainHeat(mesh: Mesh, root: Configuration = None, **default)

Strain-tensor and temperature gradient mixed method for compressible flow.

This mixed method is based on the strain-rate tensor

\[\mat{\varepsilon} = \frac{1}{2} \left( \grad{\vec{u}} + \grad{\vec{u}}^\T \right) - \frac{1}{3} \div{(\vec{u})} \mat{I}\]

and the temperature gradient \(\phi = \grad{T}\) as additional variables to the conservative variables. It is used to solve the compressible Navier-Stokes equations with viscous effects.

Find \(\left(\vec{U}_h,\hat{\vec{U}}_h, (\mat{\varepsilon}_h, \vec{\phi}_h) \right) \in U_h \times \hat{U}_h \times Q_h\) such that

\[\begin{split}\sum_{T \in \mesh} \int_{T} \mat{\varepsilon}_h : \mat{\zeta}_h \, d\bm{x} + \int_{T} \vec{u}_h \cdot \div(\mat{\zeta}_h - \frac{1}{3}\tr(\mat{\zeta}_h)\I) \, d\bm{x} - \int_{\partial T} \hat{\vec{u}}_h \cdot \left[\mat{\zeta}_h - \frac{1}{3}\tr(\mat{\zeta}_h)\mat{I} \right] \vec{n} \, d\bm{s} & = 0, \\ \sum_{T \in \mesh} \int_{T} \vec{\phi}_h \cdot \vec{\varphi}_h \, d\bm{x} + \int_{T} T_h \div(\vec{\varphi}_h) \, d\bm{x} - \int_{\partial T} \hat{T}_h \vec{\varphi}_h \cdot \vec{n} \, d\bm{s} & = 0,\end{split}\]

for all \((\mat{\zeta}_h, \vec{\varphi}_h ) \in Q_h\). With the discrete space choosen as

\[\begin{split}Q_h & := \Xi_h \times \Theta_h, \\ \Xi_h & := L^2\left( (0, t_{end}] ; \mathbb{P}^k(\mesh, \mathbb{R}^{d \times d}_{\mathrm{sym}}) \right), \\ \Theta_h & := L^2\left( (0, t_{end}] ; \mathbb{P}^k(\mesh, \mathbb{R}^{d}) \right).\end{split}\]

The discrete velocities \(\vec{u}_h := \vec{u}(\vec{U}_h)\), \(\hat{\vec{u}}_h := \vec{u}(\hat{\vec{U}}_h)\), and the discrete temperatures \(\theta_h := \theta(\vec{U}_h)\), \(\hat{\theta}_h := \theta(\hat{\vec{U}}_h)\) are functions of the conservative fields \(\vec{U}_h\) and \(\hat{\vec{U}}_h\), respectively.

Note:

See HDG for the definition of the conservative spaces \(U_h\) and \(\hat{U}_h\).