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
- \(\rho\) electron mass density
- \(\rho\,u_{x}\) electron x momentum density
- \(\rho\,u_{y}\) electron y momentum density
- \(\rho\,u_{z}\) electron z momentum density
- \(e\) electron energy density
2nd Variable
- \(\rho\) ion mass density
- \(\rho\,u_{x}\) ion x momentum density
- \(\rho\,u_{y}\) ion y momentum density
- \(\rho\,u_{z}\) ion z momentum density
- \(e\) ion energy density
3rd Variable
- \(E_{x}\) x electric field
- \(E_{y}\) y electric field
- \(E_{z}\) z electric field
- \(B_{x}\) x magnetic field
- \(B_{y}\) y magnetic field
- \(B_{z}\) z magnetic field
- \(\Psi_{E}\) electric field correction potential
- \(\Psi_{B}\) magnetic field correction potential
4th Variable (if useImposedField = true)
This term stores the perturbed field (the total field - the imposed field)
- \(E_{x}\) x electric field
- \(E_{y}\) y electric field
- \(E_{z}\) z electric field
- \(B_{x}\) x magnetic field
- \(B_{y}\) y magnetic field
- \(B_{z}\) z magnetic field
- \(\Psi_{E}\) electric field correction potential
- \(\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
- \(\rho\) mass density
- \(\rho\,u_{x}\) x momentum density
- \(\rho\,u_{y}\) y momentum density
- \(\rho\,u_{z}\) z momentum density
- \(\rho_{c}\) total charge density
- \(j_{x}\) x current density
- \(j_{y}\) y current density
- \(j_{z}\) z current density
- \(e_{i}\) ion energy density
- \(e_{e}\) electron energy density
2nd Variable
- \(E_{x}\) x electric field
- \(E_{y}\) y electric field
- \(E_{z}\) z electric field
- \(B_{x}\) x magnetic field
- \(B_{y}\) y magnetic field
- \(B_{z}\) z magnetic field
- \(\Psi_{E}\) electric field correction potential
- \(\Psi_{B}\) magnetic field correction potential
3rd Variable (if useImposedField = true)
This term stores the externally imposed field
- \(E_{x}\) x electric field
- \(E_{y}\) y electric field
- \(E_{z}\) z electric field
- \(B_{x}\) x magnetic field
- \(B_{y}\) y magnetic field
- \(B_{z}\) z magnetic field
- \(\Psi_{E}\) electric field correction potential
- \(\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
- \(\rho\) electron mass density
- \(\rho\,u_{x}\) electron x momentum density
- \(\rho\,u_{y}\) electron y momentum density
- \(\rho\,u_{z}\) electron z momentum density
- \(e\) electron energy density
2nd Variable
- \(\rho\) ion mass density
- \(\rho\,u_{x}\) ion x momentum density
- \(\rho\,u_{y}\) ion y momentum density
- \(\rho\,u_{z}\) ion z momentum density
- \(\rho\,u_{x}^{2}+P_{x\,x}\) ion xx energy density
- \(\rho\,u_{x}\,u_{y}+P_{x\,y}\) ion xy energy density
- \(\rho\,u_{x}\,u_{z}+P_{x\,z}\) ion xz energy density
- \(\rho\,u_{y}^{2}+P_{y\,y}\) ion yy energy density
- \(\rho\,u_{y}\,u_{z}+P_{y\,z}\) ion yz energy density
- \(\rho\,u_{z}^{2}+P_{z\,z}\) ion zz energy density
3rd Variable
- \(E_{x}\) x electric field
- \(E_{y}\) y electric field
- \(E_{z}\) z electric field
- \(B_{x}\) x magnetic field
- \(B_{y}\) y magnetic field
- \(B_{z}\) z magnetic field
4th Variable (if useImposedField = true)
This term stores the externally imposed field
- \(E_{x}\) x electric field
- \(E_{y}\) y electric field
- \(E_{z}\) z electric field
- \(B_{x}\) x magnetic field
- \(B_{y}\) y magnetic field
- \(B_{z}\) z magnetic field
- \(\Psi_{E}\) electric field correction potential
- \(\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
- \(\rho\) ion mass density
- \(\rho\,u_{x}\) ion x momentum density
- \(\rho\,u_{y}\) ion y momentum density
- \(\rho\,u_{z}\) ion z momentum density
- \(\rho\,u_{x}^{2}+P_{x\,x}\) ion xx energy density
- \(\rho\,u_{x}\,u_{y}+P_{x\,y}\) ion xy energy density
- \(\rho\,u_{x}\,u_{z}+P_{x\,z}\) ion xz energy density
- \(\rho\,u_{y}^{2}+P_{y\,y}\) ion yy energy density
- \(\rho\,u_{y}\,u_{z}+P_{y\,z}\) ion yz energy density
- \(\rho\,u_{z}^{2}+P_{z\,z}\) ion zz energy density
2nd Variable
- \(E_{x}\) x electric field
- \(E_{y}\) y electric field
- \(E_{z}\) z electric field
- \(B_{x}\) x magnetic field
- \(B_{y}\) y magnetic field
- \(B_{z}\) z magnetic field
3rd Variable (if useImposedField = true)
This term stores the externally imposed field
- \(E_{x}\) x electric field
- \(E_{y}\) y electric field
- \(E_{z}\) z electric field
- \(B_{x}\) x magnetic field
- \(B_{y}\) y magnetic field
- \(B_{z}\) z magnetic field
- \(\Psi_{E}\) electric field correction potential
- \(\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>