mhdSym

The mhdSym source computes additional (source) terms associated with curvilinear coordinate systems for magnetohydrodynamics. Currently only cylindrical coordinates are supported. The mhdSym source is combined with classicMusclUpdater (1d, 2d, 3d) and mhdDednerEqn. Note that formulation of the cylindrical source term assumes axisymmetry and so can be used in 1- and 2-dimensions.

Parameters

symmetryType (string, required)
The curvilinear cordinate system to be used. Available options are cylindrical.
model (string, required)

Determines the equation that the source term will be computed for. Available options are:

mhdDednerEqn Compute curvilinear source terms associated with mhdDednerEqn.

gasGamma (float, required)
Specifies the adiabatic index (ratio of specific heats), \(\gamma\).
basementPressure (float, optional)
The minimum pressure allowed. Pressures below this value will be replaced with this value. Defaults to zero.
basementDensity (float, optional)
The minimum density allowed. Densities below this value will be replaced with this value. Defaults to zero.

Parent Updater Data

in (string vector, required)
Vector of Conserved Quantities (nodalArray, 9-components, required)

The vector of conserved quantities, \(\mathbf{q}\) has 9 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 + \tfrac{1}{2}|\mathbf{b}|^2\): total energy density
  6. \(b_{\hat{\mathbf{i}}} = \mathbf{b} \cdot \hat{\mathbf{i}} = \mu^{-1/2}_{0} \mathbf{B} \cdot \hat{\mathbf{i}}\): magnetic field normalized by permeability of free-space in the \(\hat{\mathbf{i}}\) direction
  7. \(b_{\hat{\mathbf{j}}} = \mathbf{b} \cdot \hat{\mathbf{j}} = \mu^{-1/2}_{0} \mathbf{B} \cdot \hat{\mathbf{j}}\): magnetic field normalized by permeability of free-space in the \(\hat{\mathbf{j}}\) direction
  8. \(b_{\hat{\mathbf{k}}} = \mathbf{b} \cdot \hat{\mathbf{k}} = \mu^{-1/2}_{0} \mathbf{B} \cdot \hat{\mathbf{k}}\): magnetic field normalized by permeability of free-space in the \(\hat{\mathbf{k}}\) direction
  9. \(\psi\): correction potential
out (string vector, required)
model = mhdDednerEqn
Vector of Source terms (nodalArray, 9-components, required)

When symmetryType = cylindrical, the output source vector has components:

  1. \(\mathcal{S} \left(\rho \right) = -r^{-1} \rho\,u_{\hat{\mathbf{i}}}\): mass source
  2. \(\mathcal{S}\left( \rho\,u_{\hat{\mathbf{i}}} \right) = -r^{-1} \left( \rho\,u_{\hat{\mathbf{i}}}^{2} - b^2_{\hat{\mathbf{i}}} +\rho\,u_{\hat{\mathbf{j}}}^{2} - b^2_{\hat{\mathbf{j}}} + \left| \mathbf{b} \cdot \mathbf{b} \right| \right)\): \(\hat{\mathbf{i}}\) momentum source
  3. \(\mathcal{S}\left( \rho\,u_{\hat{\mathbf{j}}} \right) = -2r^{-1}\left( \rho\,u_{\hat{\mathbf{i}}}\,u_{\hat{\mathbf{j}}} - b_{\hat{\mathbf{i}}} b_{\hat{\mathbf{j}}} \right)\): \(\hat{\mathbf{j}}\) momentum source
  4. \(\mathcal{S}\left( \rho\,u_{\hat{\mathbf{k}}} \right) = -r^{-1} \left( \rho\,u_{\hat{\mathbf{i}}}\,u_{\hat{\mathbf{k}}} - b_{\hat{\mathbf{i}}} b_{\hat{\mathbf{k}}} \right)\): \(\hat{\mathbf{k}}\) momentum source
  5. \(\mathcal{S}\left( E \right) = -r^{-1} \left[ u_{\hat{\mathbf{i}}}\,\left(E+P\right) + \left( \mathbf{e} \times \mathbf{b} \right) \cdot {\hat{\mathbf{i}}} \right]\): total energy source
  6. \(\mathcal{S}\left( b_{\hat{\mathbf{i}}} \right) = 0\): \(\hat{\mathbf{i}}\) magnetic field source
  7. \(\mathcal{S}\left( b_{\hat{\mathbf{j}}} \right) = 0\): \(\hat{\mathbf{j}}\) magnetic field source
  8. \(\mathcal{S}\left( b_{\hat{\mathbf{k}}} \right) = -e_{\hat{\mathbf{j}}}\): \(\hat{\mathbf{k}}\) magnetic field source
  9. \(\mathcal{S}\left(\psi \right) = -c^2_{\mathrm{fast}} b_{\hat{\mathbf{i}}}\): correction potential source

Example

The following block demonstrates the mhdSym source used in combination with classicMusclUpdater (1d, 2d, 3d) and mhdDednerEqn to compute \(\nabla\cdot\left[ \mathcal{F} \left( \mathbf{w} \right) \right] - \mathcal{S} \left( \mathbf{w}, x, y, z, t \right)\):

<Updater hyper>
  kind = classicMuscl2d
  timeIntegrationScheme = none
  onGrid = domain
  limiter = [muscl,none,none]

  variableForm = primitive
  numericalFlux = roeFlux
  preservePositivity = true
  correctUnphysicalCells = false

  orderAccuracy = 3
  numberOfInterpolationPoints = 20
  formulation = spline
  leastSquaresBasisOrder = 6

  in = [q,divB,gradPsi]
  out = [qnew]
  waveSpeeds = [waveSpeed]

  cfl = CFL

  equations = [mhd]
  sources = [axisymmetricSource]

  <Equation mhd>
    kind = mhdDednerEqn
    mu0 = 1.0
    gasGamma = ADIABATIC_INDEX
    correctionSpeed = CORRECTION_SPEED
    basementdensity = BASEMENTDENSITY
    basementpressure = BASEMENTPRESSURE
  </Equation>

   <Source axisymmetricSource>
     kind = mhdSym
     symmetryType = cylindrical
     model = mhdDednerEqn
     gasGamma = ADIABATIC_INDEX
     correctionSpeed = CORRECTION_SPEED
   </Source>

</Updater>