File polarisation_drift.hxx#
Defines
-
POLARISATION_DRIFT_H#
-
struct PolarisationDrift : public Component#
- #include <polarisation_drift.hxx>
Calculates polarisation drift terms for all charged species, both ions and electrons.
Approximates the polarisation drift by a generalised flow potential
phi_polv_pol = - (A / (Z * B^2)) * Grad_perp(phi_pol)
phi_pol is approximately the time derivative of the electric potential in the frame of the flow, plus an ion diamagnetic contribution
phi_pol is calculated using:
Div(mass_density / B^2 * Grad_perp(phi_pol)) = Div(Jpar) + Div(Jdia) + …
Where the divergence of currents on the right is calculated from:
species[…][“momentum”] The parallel momentum of charged species
DivJdia, diamagnetic current, calculated in vorticity component
DivJcol collisional current, calculated in vorticity component
DivJextra Other currents, eg. 2D parallel closures
The mass_density quantity is the sum of density * atomic mass for all charged species (ions and electrons)
Public Functions
-
PolarisationDrift(std::string name, Options &options, Solver *solver)#
-
virtual void outputVars(Options &state) override#
Add extra fields for output, or set attributes e.g docstrings.
-
Field3D calcDivJ(GuardedOptions &state)#
Calculate divergence of all currents except polarisation.
-
void diamagneticCompression(GuardedOptions &state, Field3D DivJ)#
Calculate energy exchange term nonlinear in pressure due to compression of polarisation drift (3 / 2) ddt(Pi) += (Pi * m_i / n0 / Z) * DivJ
Adds energy_source for all species that have charge, mass and pressure Throws a BoutException if boussinesq=true
-
Field3D calcMassDensity(GuardedOptions &state)#
Solve for time derivative of potential Using Div(mass_density / B^2 Grad_perp(dphi/dt)) = DivJ
-
Field3D calcPolFlowPotential(Field3D mass_density, Field3D DivJ)#
Calculate poloidal drift potential-flow approximation.
-
void polarisationAdvection(GuardedOptions &state, Field3D phi_pol)#
Polarisation drift approximated by a potential flow
v_p = - (m_i / (Z_i * B^2)) * Grad(phi_pol)
Sets density_source, energy_source and momentum_source for all species with mass and charge.
Private Functions
-
virtual void transform_impl(GuardedOptions &state) override#
Inputs
species
… All species with both charge and mass
AA
charge
density
momentum (optional)
fields
DivJextra (optional)
DivJdia (optional)
DivJcol (optional)
Sets
species
… All species with both charge and mass
density_source
energy_source (if pressure set)
momentum_source (if momentum set)
Private Members
-
std::unique_ptr<Laplacian> phiSolver#
-
Field2D Bsq#
-
bool diagnose#
Save diagnostic outputs?
-
Field3D DivJ#
Divergence of all other currents.
-
Field3D phi_pol#
Polarisation drift potential.
-
Options diagnostics#
Other diagnostic outputs.
-
bool boussinesq#
-
BoutReal average_atomic_mass#
-
BoutReal density_floor#
-
bool advection#
-
bool diamagnetic_polarisation#