unstructMusclUpdater (1d, 2d, 3d)

The unstructMusclUpdater computes an second order upwind discretization (that is suitable for use on general unstructured tetrahedral and hexahedral meshes) of the spatial component of a non-linear hyperbolic system, possibly with source terms:

\[\notag \begin{align} \nabla\cdot\left[ \mathcal{F} \left( \mathbf{w} \right) \right] - \mathcal{S} \left( \mathbf{w} \right) \end{align}\]

where \(\mathbf{q}\) is a vector of conserved variables (e.g. density, momentum, total energy), \(\mathcal{F}\left( \mathbf{w} \right)\) is a non-linear flux tensor computed from a vector of primitive variables, (e.g. density, velocity, pressure), \(\mathbf{w} = \mathbf{w}(\mathbf{q})\) and \(\mathcal{S} \left( \mathbf{w} \right)\) is some source term.

The unstructMuscl updater accepts the parameters below, in addition to those required by Updater.

Data

in (string vector, required)
Input 1 to N are input nodalArrays which will be supplied to the equation. Defined by the choice of Hyperbolic Equations.
out (string vector, required)
Output is a nodalArray which will contain \(\nabla\cdot\left[ \mathcal{F} \left( \mathbf{w} \right) \right] - \mathcal{S} \left( \mathbf{w} \right)\). The number of components is defined by the choice of Hyperbolic Equations.
waveSpeeds (string vector, optional)
Defines the dynVector containing the fastest wave speeds in the mesh required by some equation systems (e.g. mhdDednerEqn).

Parameters

equations (string vector, required)
List of equation systems to solve. Accepts at most one equation
numericalFlux (string, required)
Defines the numerical flux need to compute an upwind approximation to the non-linear flux \(\mathcal{F}\left( \mathbf{w}\right)\)
limiter (string vector, required)
Defines the limiter to be applied to the input variables; one entry required per input variable.
variableForm (string, required)
Whether the reconstruction will occur in primitive or conservative variables. All systems can be reconstructed in conservative form. A number of fluid systems can be also be solved in primitive form.
preservePositivity (boolean, optional)
A number of equation systems can produce negative densities or pressures. The preservePositivity option checks whether the reconstructed values produce positive values for pressure and density. If they do not then it drops the order of reconstruction to first order.
numberOfInterpolationPoints (integer, required)

Number of points to be considerd for the least squares fit. This parameter varies from mesh to mesh and should be determined by computing a known function on the mesh.

The numberOfInterpolationPoints must be greater than (or equal to) the number of coefficients in the polynomial approximation. This means that in 1d the value is 4, in 2D the value is at least 6 and in 3D the value is at least 10.

These choices do not guarantee that a matrix inverse will be found. The following values though appear to be adequate in general: in 1D 4; in 2D 8 and in 3D 20.

orderAccuracy (integer, option)
Order of the polynomial that is used to form the operator. Choice of 1, 2 or 3 corresponding, respectively to first, second and third order accuracy. The appropriate choice of order varies on the problem type and the mesh used. Defaults to 2.
formulation (string, optional)

Whether to use a reconstruction based on constant or spline interpolation. Defaults to constant.

If formulation = “spline”, then the following options can be specified:

leastSquaresBasis (string, optional) The spline basis to use for the least squares problem. Options are: wendland, wu and bumann. Defaults to buhmann.

leastSquaresBasisOrder (string, optional) Order of polynomial to use for the least squares basis. Can accept up to 6th order polynomials, dependent on the choice of spline basis.

cfl (float, optional)
Defines the CFL condition for the finite volume scheme. The updater returns an error code if this condition is violated during a timestep. Defaults to \((\mathrm{\#\ of\ dimensions})^{-1}\).
checkCfl (bool, optional)
Whether to check the CFL condition during an updater, defaults to true. Should be set to false if combined with implicitMultiUpdater (1d, 2d, 3d).
sources (string vector, optional)
List of sources to apply. Each source listed here must be associated with a Source block (see below).

Sub-Blocks

Equation (block, required)
The Hyperbolic Equations that defines \(\mathbf{q}\), \(\mathcal{F}\left(\mathbf{w} \right)\), \(\mathbf{w} =\mathbf{w}(\mathbf{q})\), along with the eigensystem associated with \(\mathcal{F}\left( \mathbf{w}\right)\).
Source (block)
Adds a Algebraic Equations to the hyperbolic equation system.

Example

The following block demonstrates the classicMuscl updater used in combination with the mhdDednerEqn to compute \(\nabla \cdot \mathcal{F}\left(\mathbf{w} \right)\) with an externally supplied magnetic field:

<Updater hyper>
  kind=classicMuscl1d
  onGrid=domain

  # input nodal component arrays
  in=[q   backgroundB]

  # output nodal component array
  out=[qnew]

  # input dynVector containing fastest wave speed
  waveSpeeds=[waveSpeed]

  # the numerical flux to use
  numericalFlux= hlldFlux

  # CFL number to use
  cfl=0.3
  # Form of variables to limit
  variableForm= primitive

  # Limiter; one per input nodal component array
  limiter=[minmod   minmod]

  # list of equations to solve
  equations=[mhd]

  <Equation mhd>
    kind=mhdDednerEqn
    gasGamma=1.4
    externalBfield="backgroundB"
  </Equation>

</Updater>