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_pol

v_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 transform(Options &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)

virtual void outputVars(Options &state) override#

Add extra fields for output, or set attributes e.g docstrings.

Private Members

std::unique_ptr<Laplacian> phiSolver#
Field2D Bsq#
bool diagnose#

Save diagnostic outputs?

Field3D DivJ#
Field3D phi_pol#
bool boussinesq#
BoutReal average_atomic_mass#
BoutReal density_floor#
bool advection#
bool diamagnetic_polarisation#