diffusion

Definitions of conservative hdg discretizations.

class Gradient(mesh: Mesh, root: Configuration = None, **default)
class InteriorPenalty(mesh, root=None, **default)
property interior_penalty_coefficient: float

Sets the interior penalty constant.

Getter:

Returns the interior penalty constant

Setter:

Sets the interior penalty constant, defaults to 1.0

get_diffusive_flux_from_conservative_jump(U: flowfields, Ujump: CoefficientFunction, unit_vector: CoefficientFunction) CoefficientFunction

Returns the conservative diffusive flux from given states and jump in the conservative variables along the unit normal vector.

\[\bm{G}(\bm{U}, \jump{U} \otimes \bm{n})\]
Parameters:
  • U (flowfields) – A dictionary containing the flow quantities

  • dU (CoefficientFunction) – A CoefficientFunction containing the jump in the conservative variables

class InteriorPenaltyHDG(mesh, root=None, **default)
class InteriorPenaltySDG(mesh, root=None, **default)

This is based on the implementation in:

Hartmann, R. and Houston, P., 2008. An optimal order interior penalty discontinuous Galerkin discretization of the compressible Navier–Stokes equations. Journal of Computational Physics, 227(22), pp.9670-9685.

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\).

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 [4].

set_initial_conditions()

Set initial conditions for the mixed fields based on the initial condition of the conservative fields.

class ViscousTreatment(mesh: Mesh, root: Configuration = None, **default)