File electromagnetic.hxx#
Defines
-
ELECTROMAGNETIC_H#
-
struct Electromagnetic : public Component#
- #include <electromagnetic.hxx>
Electromagnetic potential A||
Reinterprets all species’ parallel momentum as a combination of a parallel flow and a magnetic contribution, i.e. canonical momentum.
Changes the “momentum” of each species so that after this component the momentuum of each species is justm n v_{||} + Z e n A_{||}
This component should be run after all species have set their momentum, but before the momentum is used e.g to set boundary conditions.m n v_{||}
Calculates the electromagnetic potential A_{||} using
Laplace(Apar) - alpha_em * Apar = -Ajpar
By default outputs Apar every timestep. When
diagnose = truein also saves alpha_em and Ajpar.Public Functions
-
Electromagnetic(std::string name, Options &options, Solver *solver)#
Options
units
<name>
diagnose Saves Ajpar and alpha_em time-dependent values
-
virtual void transform(Options &state) override#
Inputs
species
<..> All species with charge and parallel momentum
charge
momentum
density
AA
Sets
species
<..> All species with charge and parallel momentum
momentum (modifies) to m n v||
velocity (modifies) to v||
fields
Apar Electromagnetic potential
-
virtual void restartVars(Options &state) override#
Add extra fields to restart files.
-
virtual void outputVars(Options &state) override#
Add extra fields for output, or set attributes e.g docstrings.
Private Members
-
Field3D Apar#
-
Field3D Ajpar#
-
Field3D alpha_em#
-
BoutReal beta_em#
-
std::unique_ptr<Laplacian> aparSolver#
-
bool const_gradient#
-
BoutReal apar_boundary_timescale#
-
BoutReal last_time#
-
bool magnetic_flutter#
Set the magnetic flutter term?
-
Field3D Apar_flutter#
-
bool diagnose#
Output additional diagnostics?
-
Electromagnetic(std::string name, Options &options, Solver *solver)#