File relax_potential.hxx

Defines

RELAX_POTENTIAL_H
struct RelaxPotential : public Component
#include <relax_potential.hxx>

Evolve vorticity and potential in time.

Uses a relaxation method for the potential, which is valid for steady state, but not for timescales shorter than the relaxation timescale.

Public Functions

RelaxPotential(std::string name, Options &options, Solver *solver)

Options

  • <name>

    • diamagnetic

    • diamagnetic_polarisation

    • average_atomic_mass

    • bndry_flux

    • poloidal_flows

    • split_n0

    • laplacian Options for the Laplacian phi solver

virtual void transform(Options &state) override

Optional inputs

  • species

    • pressure and charge => Calculates diamagnetic terms [if diamagnetic=true]

    • pressure, charge and mass => Calculates polarisation current terms [if diamagnetic_polarisation=true]

Sets in the state

  • species

    • [if has pressure and charge]

      • energy_source

  • fields

    • vorticity

    • phi Electrostatic potential

    • DivJdia Divergence of diamagnetic current [if diamagnetic=true]

Note: Diamagnetic current calculated here, but could be moved to a component with the diamagnetic drift advection terms

virtual void finally(const Options &state) override

Optional inputs

  • fields

    • DivJextra Divergence of current, including parallel current Not including diamagnetic or polarisation currents

virtual void outputVars(Options &state) override

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

Private Members

Field3D Vort
Field3D phi1
Field3D phi
bool exb_advection
bool diamagnetic
bool diamagnetic_polarisation
bool boussinesq

Use the Boussinesq approximation?

BoutReal average_atomic_mass
bool poloidal_flows

Include poloidal ExB flow?

bool bndry_flux

Allow flows through radial boundaries?

bool sheath_boundary

Set outer boundary to j=0?

Field2D Bsq

SQ(coord->Bxy)

Vector2D Curlb_B

Curvature vector Curl(b/B)

BoutReal lambda_1
BoutReal lambda_2

Relaxation parameters.