File vorticity.hxx#
Defines
-
VORTICITY_H#
-
struct Vorticity : public Component#
- #include <vorticity.hxx>
Evolve electron density in time
Public Functions
-
Vorticity(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)?
hyper_z: float, default -1.0 Hyper-viscosity in Z. < 0 means off
laplacian: subsection Options for the Laplacian phi solver
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?
split_n0: bool, default false Split phi into n=0 and n!=0 components?
viscosity: Field2D, default 0.0 Kinematic viscosity [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 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.
-
inline virtual void restartVars(Options &state) override#
Add extra fields to restart files.
Private Members
-
Field3D Vort#
-
Field3D phi#
-
std::unique_ptr<Laplacian> phiSolver#
-
Field3D Pi_hat#
Contribution from ion pressure, weighted by atomic mass / charge.
-
bool exb_advection#
-
bool exb_advection_simplified#
-
bool diamagnetic#
-
bool diamagnetic_polarisation#
-
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?
-
bool split_n0#
-
std::unique_ptr<LaplaceXY> laplacexy#
-
Field2D Bsq#
-
Vector2D Curlb_B#
-
BoutReal hyper_z#
Hyper-viscosity in Z.
-
Field2D viscosity#
Kinematic viscosity.
-
Field3D DivJdia#
-
Field3D DivJcol#
-
bool diagnose#
Output additional diagnostics?
-
Vorticity(std::string name, Options &options, Solver *solver)#