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.

m n v_{||} + Z e n A_{||}
Changes the “momentum” of each species so that after this component the momentuum of each species is just
m n v_{||}
This component should be run after all species have set their momentum, but before the momentum is used e.g to set boundary conditions.

Calculates the electromagnetic potential A_{||} using

Laplace(Apar) - alpha_em * Apar = -Ajpar

By default outputs Apar every timestep. When diagnose = true in 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

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 diagnose

Output additional diagnostics?