Computes the fluid “current” given from fluid variables, particle mass, charge and permittivity. This current would be used as a source term for Maxwell’s equations.

\[\notag \begin{align} s=-\frac{1}{\epsilon_{0}}\frac{q}{m}\left( \begin{array}{c} \rho\,u_{x} \\ \rho\,u_{y} \\ \rho\,u_{z} \\ \end{array} \right) \end{align}\]

where \(q\) is the species charge, \(m\) is the species mass \(\epsilon_{0}\) is the permittivity, \(\rho\) is the fluid mass density, \(u_{x}\) is the fluid x velocity, \(u_{y}\) is the fluid y velocity and \(u_{z}\) is the fluid z velocity.


epsilon0 (float)
permittivity of free space
mass (float)
The mass of the fluid particles
charge (float)
The charge of the fluid particles
startIndex (integer)
Tells USim which variable in the input vector should be set to the zero position. For example, if you pass in \(q\) from the eulerEqn then startIndex would be 1 as the momentum density terms correspond to indexes 1, 2, 3. In that case the 0 index corresponds to mass density. The default value for startIndex is 0.

Parent Updater Data

in (string vector, required)

1st Variable

  1. \(\rho\,u_{x}\) x momentum density
  2. \(\rho\,u_{y}\) y momentum density
  3. \(\rho\,u_{z}\) z momentum density


<Source ionCurrents>
  kind = current
  startIndex = 1
  charge = ION_CHARGE
  mass = ION_MASS
  epsilon0 = 1.0