twoFluidSrc

Applies the implicit source operator to the 5 moment two-fluid (ion, electron, EM) system or the two-fluid system written as combined variables twoFluidEqn or the 10-5 system which is 10 moment ions and 5 moment electrons and EM.

We want to solve the hyperbolic part of the multi-fluid equations explicitly and the source term implicitly. For a first order scheme the discretization becomes.

\[\begin{equation} Q^{n+1}=Q^{n}+\Delta t\nabla f^{n}+\Delta t\psi^{n+1} \end{equation}\]

In the case of the two-fluid and 10 moment systems \(\psi^{n+1}\) can be re-written exactly as \(A^{n+1}Q^{n+1}\) where \(A\) is a matrix. As a result the equation can be re-written

\[\begin{equation} \left(1-\Delta t A^{n+1}\right)Q^{n+1}=\Delta t\nabla f^{n} \end{equation}\]

and therefore

\[\begin{equation} Q^{n+1}=\left(1-\Delta t A^{n+1}\right)^{-1}\Delta t\nabla f^{n} \end{equation}\]

Now, for a Runge-Kutta scheme this update is performed for each substep and \(\Delta t\) is replaced by \(\alpha \Delta t\) where \(\alpha\) is the fractional \(\Delta t\) for each substep. The result is a high order time accurate implicit integration of the source terms.

For the 5 moment system (and combined system) only one call to this source term is required. For the 10-5 system the update must be performed in 2 steps. Examples are given below. The technique used was originally described for the 5 moment two-fluid system in

Kumar, Harish, and Siddhartha Mishra. “Entropy Stable Numerical Schemes for Two-Fluid Plasma Equations.” Journal of Scientific Computing 52.2 (2012): 401-425.

Parameters (All types)

type string
Specifies the type of implicit matrix. Options are 5Moment for the 5 moment two-fluid system, 10MomentIonsStep1 for the first step of the 10 moment ion, 5 moment electron system. 10MomentIonStep2 for the second step of the 10 moment ion, 5 moment electron two-fluid system.

Parameters (5Moment or 5MomentCombined or 10MomentIonStep1)

useImposedField (bool)
Tell USim if there will be an imposed magnetic field applied to the model. If true an imposed field will be assumed, if false there is no imposed field.
electronCharge (float)
The charge of the electron
electronMass (float)
The mass of the electron
ionCharge (float)
The charge of the ion
ionMass (float)
The mass of the ion
epsilon0
Permittivity of free space

Parameters (10MomentIonStep2)

ionCharge (float)
The charge of the ion
ionMass (float)
The mass of the ion

Parent Updater Data (5Moment)

in (string vector, required)

1st Variable

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

2nd Variable

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

3rd Variable

  1. \(E_{x}\) x electric field
  2. \(E_{y}\) y electric field
  3. \(E_{z}\) z electric field
  4. \(B_{x}\) x magnetic field
  5. \(B_{y}\) y magnetic field
  6. \(B_{z}\) z magnetic field
  7. \(\Psi_{E}\) electric field correction potential
  8. \(\Psi_{B}\) magnetic field correction potential

4th Variable (if useImposedField = true)

This term stores the perturbed field (the total field - the imposed field)

  1. \(E_{x}\) x electric field
  2. \(E_{y}\) y electric field
  3. \(E_{z}\) z electric field
  4. \(B_{x}\) x magnetic field
  5. \(B_{y}\) y magnetic field
  6. \(B_{z}\) z magnetic field
  7. \(\Psi_{E}\) electric field correction potential
  8. \(\Psi_{B}\) magnetic field correction potential
out (string vector, required)
In all cases the output is \(Q^{n+1}\). For the 5 moment system there are 3 outputs corresponding to electrons, ions and em (in that order).

Parent Updater Data (5Moment Combined)

in (string vector, required)

1st Variable

  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

2nd Variable

  1. \(E_{x}\) x electric field
  2. \(E_{y}\) y electric field
  3. \(E_{z}\) z electric field
  4. \(B_{x}\) x magnetic field
  5. \(B_{y}\) y magnetic field
  6. \(B_{z}\) z magnetic field
  7. \(\Psi_{E}\) electric field correction potential
  8. \(\Psi_{B}\) magnetic field correction potential

3rd Variable (if useImposedField = true)

This term stores the externally imposed field

  1. \(E_{x}\) x electric field
  2. \(E_{y}\) y electric field
  3. \(E_{z}\) z electric field
  4. \(B_{x}\) x magnetic field
  5. \(B_{y}\) y magnetic field
  6. \(B_{z}\) z magnetic field
  7. \(\Psi_{E}\) electric field correction potential
  8. \(\Psi_{B}\) magnetic field correction potential
out (string vector, required)
In all cases the output is \(Q^{n+1}\). For the combined 5 moment systems there are 2 outputs, one for the combined fluid and the other for em (in that order).

Parent Updater Data (10MomentIonsStep1)

in (string vector, required)

1st Variable

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

2nd Variable

  1. \(\rho\) ion mass density
  2. \(\rho\,u_{x}\) ion x momentum density
  3. \(\rho\,u_{y}\) ion y momentum density
  4. \(\rho\,u_{z}\) ion z momentum density
  5. \(\rho\,u_{x}^{2}+P_{x\,x}\) ion xx energy density
  6. \(\rho\,u_{x}\,u_{y}+P_{x\,y}\) ion xy energy density
  7. \(\rho\,u_{x}\,u_{z}+P_{x\,z}\) ion xz energy density
  8. \(\rho\,u_{y}^{2}+P_{y\,y}\) ion yy energy density
  9. \(\rho\,u_{y}\,u_{z}+P_{y\,z}\) ion yz energy density
  10. \(\rho\,u_{z}^{2}+P_{z\,z}\) ion zz energy density

3rd Variable

  1. \(E_{x}\) x electric field
  2. \(E_{y}\) y electric field
  3. \(E_{z}\) z electric field
  4. \(B_{x}\) x magnetic field
  5. \(B_{y}\) y magnetic field
  6. \(B_{z}\) z magnetic field

4th Variable (if useImposedField = true)

This term stores the externally imposed field

  1. \(E_{x}\) x electric field
  2. \(E_{y}\) y electric field
  3. \(E_{z}\) z electric field
  4. \(B_{x}\) x magnetic field
  5. \(B_{y}\) y magnetic field
  6. \(B_{z}\) z magnetic field
  7. \(\Psi_{E}\) electric field correction potential
  8. \(\Psi_{B}\) magnetic field correction potential
out (string vector, required)
In all cases the output is \(Q^{n+1}\). For the 5 moment electron, 10 moment ion system in the case where type=10MomentIonStep1 the output is 5 moment electrons, 10 moment ions and 8 component EM system.

Parent Updater Data (10MomentIonsStep2)

in (string vector, required)

1st Variable

  1. \(\rho\) ion mass density
  2. \(\rho\,u_{x}\) ion x momentum density
  3. \(\rho\,u_{y}\) ion y momentum density
  4. \(\rho\,u_{z}\) ion z momentum density
  5. \(\rho\,u_{x}^{2}+P_{x\,x}\) ion xx energy density
  6. \(\rho\,u_{x}\,u_{y}+P_{x\,y}\) ion xy energy density
  7. \(\rho\,u_{x}\,u_{z}+P_{x\,z}\) ion xz energy density
  8. \(\rho\,u_{y}^{2}+P_{y\,y}\) ion yy energy density
  9. \(\rho\,u_{y}\,u_{z}+P_{y\,z}\) ion yz energy density
  10. \(\rho\,u_{z}^{2}+P_{z\,z}\) ion zz energy density

2nd Variable

  1. \(E_{x}\) x electric field
  2. \(E_{y}\) y electric field
  3. \(E_{z}\) z electric field
  4. \(B_{x}\) x magnetic field
  5. \(B_{y}\) y magnetic field
  6. \(B_{z}\) z magnetic field

3rd Variable (if useImposedField = true)

This term stores the externally imposed field

  1. \(E_{x}\) x electric field
  2. \(E_{y}\) y electric field
  3. \(E_{z}\) z electric field
  4. \(B_{x}\) x magnetic field
  5. \(B_{y}\) y magnetic field
  6. \(B_{z}\) z magnetic field
  7. \(\Psi_{E}\) electric field correction potential
  8. \(\Psi_{B}\) magnetic field correction potential
out (string vector, required)
In all cases the output is \(Q^{n+1}\). In the case where type=10MomentIonStep2 the output is 10 moment ions.

Example

<Equation twofluidLorentz>
  kind = twoFluidSrc
  type = 5Moment
  electronCharge = ELECTRON_CHARGE
  electronMass = ELECTRON_MASS
  ionCharge = ION_CHARGE
  ionMass = ION_MASS
  epsilon0 = EPSILON0
</Equation>

<Equation twofluidLorentz>
  kind = twoFluidSrc
  type = 5MomentCombined
  useImposedField = false
  electronCharge = ELECTRON_CHARGE
  electronMass = ELECTRON_MASS
  ionCharge = ION_CHARGE
  ionMass = ION_MASS
  epsilon0 = EPSILON0
</Equation>

<Equation twofluidLorentz>
  kind = twoFluidSrc
  type = 10MomentIonsStep1
  electronCharge = ELECTRON_CHARGE
  electronMass = ELECTRON_MASS
  ionCharge = ION_CHARGE
  ionMass = ION_MASS
  epsilon0 = EPSILON0
</Equation>

<Equation twofluidLorentz>
  kind = twoFluidSrc
  type = 10MomentIonsStep2
  ionCharge = ION_CHARGE
  ionMass = ION_MASS
</Equation>