convertToTwoFluid

Converts variables written as a combined two-fluid into two separate fluids. The combined two fluid use variables \((\rho,\rho\,u_{x},\rho\,u_{y},\rho\,u_{z},\rho_{c},j_{x},j_{y},j_{z},e_{0},e_{1})\) which is then converted to the individual fluids \((\rho_{0},\rho_{0}\,u_{x\,0},\rho_{0}\,u_{y\,0},\rho_{0}\,u_{z\,0},e_{0})\) and \((\rho_{1},\rho_{1}\,u_{x\,1},\rho_{1}\,u_{y\,1},\rho_{1}\,u_{z\,1},e_{1})\).

The exact conversion is

\[\notag \rho_{0}=\frac{m_{0} \left(m_{1}\rho_{c}-\rho q_{1}\right)}{m_{1} q_{0}-m_{0} q_{1}}\]
\[\notag m_{x\,0}= \frac{m_{0} (j_{x} m_{1}-m_{x} q_{1})}{m_{1} q_{0}-m_{0} q_{1}}\]
\[\notag m_{y\,0}= \frac{m_{0} (j_{y} m_{1}-m_{y} q_{1})}{m_{1} q_{0}-m_{0} q_{1}}\]
\[\notag m_{z\,0}= \frac{m_{0} (j_{z} m_{1}-m_{z} q_{1})}{m_{1} q_{0}-m_{0} q_{1}}\]
\[\notag \rho_{1}= \rho -\frac{m_{0} (m_{1} \rho_{c}-\rho q_{1})}{m_{1} q_{0}-m_{i} q_{1}}\]
\[\notag m_{x\,1}= m_{x}-\frac{m_{0} (j_{x} m_{1}-m_{x} q_{1})}{m_{1} q_{0}-m_{0} q_{1}}\]
\[\notag m_{y\,1}= m_{y}-\frac{m_{0} (j_{y} m_{1}-m_{y} q_{e})}{m_{1} q_{0}-m_{0} q_{1}}\]
\[\notag m_{z\,1}= m_{z}-\frac{m_{0} (j_{z} m_{1}-m_{z} q_{1})}{m_{1} q_{0}-m_{0} q_{1}}\]

where \(m_{0}\) is the mass of the first species, \(m_{1}\) is the mass of the second species \(m_{x\,\alpha}=u_{x\,\alpha}\rho_{\alpha}\), \(m_{y\,\alpha}=u_{y\,\alpha}\rho_{\alpha}\), \(m_{z\,\alpha}=u_{z\,\alpha}\rho_{\alpha}\) is the momentum density in the x,y, or z directions of the \(\alpha\) species and \(q_{\alpha}\) is the charge of the \(\alpha\) species. In particular, these conversions show that if the mass and charge of each species are identical (and the charge of the same sign), this particular conversion is invalid.

Primary Variables (10)

  1. \(\rho\) mass density
  2. \(\rho\,u_{x}\) x momentum density
  3. \(\rho\,u_{y}\) y momentum density
  4. \(\rho\,u_{z}\) z momentum density
  5. \(\rho_{c}\) total charge density
  6. \(j_{x}\) x current density
  7. \(j_{y}\) y current density
  8. \(j_{z}\) z current density
  9. \(e_{i}\) ion energy density
  10. \(e_{e}\) electron energy density

Outputs

1st Variable

  1. \(\rho\) mass density of species 0
  2. \(\rho\,u_{x}\) x momentum density of species 0
  3. \(\rho\,u_{y}\) y momentum density of species 0
  4. \(\rho\,u_{z}\) z momentum density of species 0
  5. \(e\) e is the energy density of species 0

2nd Variable

  1. \(\rho\) mass density of species 1
  2. \(\rho\,u_{x}\) x momentum density of species 1
  3. \(\rho\,u_{y}\) y momentum density of species 1
  4. \(\rho\,u_{z}\) z momentum density of species 1
  5. \(e\) e is the energy density of species 1

Parameters

mass0 (float)

ion mass

mass1 (float)

electron mass

charge0 (float)

ion charge

charge1 (float)

electron charge

Example

<Equation convert>
  kind = convertToTwoFluid
  charge0 = ION_CHARGE
  charge1 = ELECTRON_CHARGE
  mass0 = ION_MASS
  mass1 = ELECTRON_MASS
</Equation>