convertToSingleFluid

Converts variables written as a two-fluid into a single fluid. The single 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 converted from 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=\rho_{0}+\rho_{1}\]
\[\notag m_{x}=\rho_{0}m_{x\,0}+\rho_{1}m_{x\,1}\]
\[\notag m_{y}=\rho_{0}m_{y\,0}+\rho_{1}m_{y\,1}\]
\[\notag m_{z}=\rho_{0}m_{z\,0}+\rho_{1}m_{z\,1}\]
\[\notag \rho_{c}=\frac{q_{0}}{m_{0}}\rho_{0}+\frac{q_{1}}{m_{1}}\rho_{1}\]
\[\notag j_{x}=\frac{q_{0}}{m_{0}}\rho_{0}u_{x\,0}+\frac{q_{1}}{m_{1}}\rho_{1}u_{x\,1}\]
\[\notag j_{y}=\frac{q_{0}}{m_{0}}\rho_{0}u_{y\,0}+\frac{q_{1}}{m_{1}}\rho_{1}u_{y\,1}\]
\[\notag j_{z}=\frac{q_{0}}{m_{0}}\rho_{0}u_{z\,0}+\frac{q_{1}}{m_{1}}\rho_{1}u_{z\,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.

Primary Variables

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

Outputs

  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

Parameters

mass0 (float)

ion mass

mass1 (float)

electron mass

charge0 (float)

ion charge

charge1 (float)

electron charge

Example

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