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>
average_atomic_mass: float, default 2.0 Weighted average ion atomic mass for polarisation current
bndry_flux: bool, default true Allow flows through radial (X) boundaries?
collisional_friction: bool, default false Damp vorticity based on mass-weighted collision frequency?
diagnose: bool, false Output additional diagnostics?
diamagnetic: bool, default true Include diamagnetic current, using curvature vector?
diamagnetic_polarisation: bool, default true Include ion diamagnetic drift in polarisation current?
exb_advection: bool, default true Include ExB advection (nonlinear term)?
phi_boundary_relax: bool, default false Relax radial phi boundaries towards zero-gradient?
phi_boundary_timescale: float, 1e-4 Timescale for phi boundary relaxation [seconds]
phi_core_averagey: bool, default false Average phi core boundary in Y? (if phi_boundary_relax)
phi_dissipation: bool, default true Parallel dissipation of potential (Recommended)
poloidal_flows: bool, default true Include poloidal ExB flow?
sheath_boundary: bool, default false If phi_boundary_relax is false, set the radial boundary to the sheath potential?
viscosity_perp: Field2D, default 0.0 Kinematic viscosity in perpendicular diraction [m^2/s]
viscosity_par: Field2D, default 0.0 Kinematic viscosity in parallel diraction [m^2/s]
vort_dissipation: bool, default false Parallel dissipation of vorticity?
damp_core_vorticity: bool, default false Damp axisymmetric component of vorticity in cell next to core boundary
-
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 Functions
-
virtual void transform_impl(GuardedOptions &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
Private Members
-
Field3D Vort#
-
Field3D phi1#
-
Field3D phi#
-
Field3D Pi_hat#
Contribution from ion pressure, weighted by atomic mass / charge.
-
bool exb_advection#
-
bool exb_advection_simplified#
-
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 collisional_friction#
Damping of vorticity due to collisional friction.
-
bool sheath_boundary#
Set outer boundary to j=0?
-
bool vort_dissipation#
Parallel dissipation of vorticity.
-
bool phi_dissipation#
Parallel dissipation of potential.
-
bool phi_sheath_dissipation#
Dissipation at the sheath if phi < 0.
-
bool damp_core_vorticity#
Damp axisymmetric component of vorticity.
-
bool phi_boundary_relax#
Relax boundary to zero-gradient.
-
BoutReal phi_boundary_timescale#
Relaxation timescale [normalised].
-
BoutReal phi_boundary_last_update#
Time when last updated.
-
bool phi_core_averagey#
Average phi core boundary in Y?
-
Field2D Bsq#
SQ(coord->Bxy)
-
Vector2D Curlb_B#
Curvature vector Curl(b/B)
-
BoutReal hyper_z#
Hyper-viscosity in Z.
-
Field2D viscosity#
Perpendicular Kinematic viscosity.
-
Field2D viscosity_par#
Parallel Kinematic viscosity.
-
BoutReal lambda_1#
Relaxation parameters. NOTE: lambda_1 has dimensions!
-
BoutReal lambda_2#
Relaxation parameters.
-
Field3D DivJdia#
-
Field3D DivJcol#
-
bool diagnose#
Output additional diagnostics?
-
RelaxPotential(std::string name, Options &options, Solver *solver)#