# firstOrderMusclUpdater (1d, 2d, 3d)¶

The firstOrderMusclUpdater computes an first order upwind discretization 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 firstOrderMuscl 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)$$
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 firstOrderMuscl 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=firstOrderMuscl1d
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

# list of equations to solve
equations=[mhd]

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

</Updater>