eulerEqn

Defines the equations of inviscid compressible hydrodynamics:

\[\notag \begin{align} \frac{\partial \rho}{\partial t} + \nabla\cdot\left[ \rho\,\mathbf{u} \right] = 0 \\ \frac{\partial \rho\,\mathbf{u}}{\partial t} + \nabla\cdot\left[ \rho\,\mathbf{u}\,\mathbf{u}^{T} + \mathbb{I} P \right] = 0 \\ \frac{\partial E}{\partial t} + \nabla\cdot\left[ \left(E + P \right) \mathbf{u} \right] = 0 \end{align}\]

Here, \(\mathbb{I}\) is the identity matrix, \(P = \rho\epsilon(\gamma-1)\) is the pressure of an ideal gas, \(\epsilon\) is the specific internal energy and \(\gamma\) is the adiabatic index (ratio of specific heats).

Parameters

gasGamma (float)
Specifies the adiabatic index (ratio of specific heats), \(\gamma\). Defaults to 5/3.
basementPressure (float, optional)
The minimum pressure allowed. Pressures below this value will be replaced with this value for primitive state, eigensystem and flux computations. Defaults to zero.
basementDensity (float, optional)
The minimum density allowed. Densities below this value will be replaced with this value for primitive state, eigensystem and flux computations. Defaults to zero.

Parent Updater Data

in (string vector, required)
Vector of Conserved Quantities (nodalArray, 5-components, required)
The vector of conserved quantities, \(\mathbf{q}\) has 5 entries:
  1. \(\rho\): mass density
  2. \(\rho\,u_{\hat{\mathbf{i}}} = \rho \mathbf{u} \cdot \hat{\mathbf{i}}\): momentum density in the \(\hat{\mathbf{i}}\) direction
  3. \(\rho\,u_{\hat{\mathbf{j}}} = \rho \mathbf{u} \cdot \hat{\mathbf{j}}\): momentum density in the \(\hat{\mathbf{j}}\) direction
  4. \(\rho\,u_{\hat{\mathbf{k}}} = \rho \mathbf{u} \cdot \hat{\mathbf{k}}\): momentum density in the \(\hat{\mathbf{k}}\) direction
  5. \(E = \frac{P}{\gamma -1} + \tfrac{1}{2}\rho|\mathbf{u}|^2\): total energy density
out (string vector, required)

For the eulerEqn, one of four output variables are computed, depending on whether the equation is combined with an updater capable of computing fluxes (classicMusclUpdater (1d, 2d, 3d)), primitive variables (computePrimitiveState(1d, 2d, 3d)), the time step associated with the CFL condition (timeStepRestrictionUpdater (1d, 2d, 3d)) or the fastest wave speed in the grid (timeStepRestrictionUpdater (1d, 2d, 3d)).

Vector of Fluxes (nodalArray, 5-components)

When combined with an updater that computes \(\nabla \cdot \mathcal{F}\left(\mathbf{w} \right)\) (e.g. classicMusclUpdater (1d, 2d, 3d)), the equation system returns:

  1. \(\nabla \cdot \mathcal{F}\left( \rho \right)\): mass flux
  2. \(\nabla \cdot \mathcal{F}\left( \rho\,u_{\hat{\mathbf{i}}} \right)\): \(\hat{\mathbf{i}}\) momentum flux
  3. \(\nabla \cdot \mathcal{F}\left( \rho\,u_{\hat{\mathbf{j}}} \right)\): \(\hat{\mathbf{j}}\) momentum flux
  4. \(\nabla \cdot \mathcal{F}\left( \rho\,u_{\hat{\mathbf{k}}} \right)\): \(\hat{\mathbf{k}}\) momentum flux
  5. \(\nabla \cdot \mathcal{F}\left( E \right)\): total energy flux
Vector of Primitive States (nodalArray, 5-components)

When combined with an updater that computes \(\mathbf{w} = \mathbf{w}(\mathbf{q})\) (e.g. computePrimitiveState(1d, 2d, 3d)), the equation systen returns:

  1. \(\rho\): mass density
  2. \(u_{\hat{\mathbf{i}}} = \mathbf{u} \cdot \hat{\mathbf{i}}\): velocity in the \(\hat{\mathbf{i}}\) direction
  3. \(u_{\hat{\mathbf{j}}} = \mathbf{u} \cdot \hat{\mathbf{j}}\): velocity in the \(\hat{\mathbf{j}}\) direction
  4. \(u_{\hat{\mathbf{k}}} = \mathbf{u} \cdot \hat{\mathbf{k}}\): velocity in the \(\hat{\mathbf{k}}\) direction
  5. \(P = \rho\epsilon(\gamma-1)\): ideal gas pressure
Time Step (dynVector, 1-component)
When combined with the kind=hyperblic, model=eulerEqn timeStepRestrictionUpdater (1d, 2d, 3d), and storeTimeStep is true, the equation system returns the time step consistent with the CFL condition across the entire simulation domain.
Fastest Wave Speed (dynVector, 1-component)
When combined with the kind=hyperbolic, model=eulerEqn timeStepRestrictionUpdater (1d, 2d, 3d), and storeWaveSpeed is true, the equation system returns the fastest wave speed across the entire simulation domain, \(c_{\mathrm{fast}}\).

Example

The following block demonstrates the eulerEqn used in combination with classicMusclUpdater (1d, 2d, 3d) to compute \(\nabla \cdot \mathcal{F}\left(\mathbf{w} \right)\):

<Updater hyper>
  kind=classicMuscl1d
  onGrid=domain
  timeIntegrationScheme=none
  numericalFlux=roeFlux
  limiter=[muscl]
  variableForm=primitive
  in=[q]
  out=[qnew]
  cfl=0.3
  equations=[euler]

  <Equation euler>
    kind=eulerEqn
    gasGamma=1.4
    basementDensity = 1.0e-5
    basementPressure = 1.0e-6
  </Equation>

</Updater>