Initializes equilibrium distribution functions used by marker loading and pushing.
More...
#include "background.hpp"
|
| static void | get_background_flow (Real s, Real chi, Real phi, Real &vpar, Real &vperp) |
| | Query equilibrium parallel and perpendicular flow.
|
| |
| static Real | get_background_potential (Real s, Real chi, Real phi) |
| | Query the equilibrium electrostatic potential.
|
| |
| static Real | get_KE (Real ut, Real mu, Real b) |
| | Convert parallel velocity and magnetic moment to kinetic energy.
|
| |
| static Real | get_mu (Real ut, Real ze, Real b) |
| | Recover magnetic moment from energy and parallel velocity.
|
| |
| static Real | get_uabs (Real mu, Real ze, Real b) |
| | Recover the magnitude of parallel velocity from invariants.
|
| |
| static void | init_background () |
| | Initialize all species background distributions and emit the f0 dump.
|
| |
| static void | load_background_fields (const std::string &fname) |
| | Validate a tabulated background-distribution HDF5 file.
|
| |
| static Real | vf0_local_maxwellian (Real vth2, Real nval, Real ze) |
| | Evaluate an isotropic local Maxwellian.
|
| |
Initializes equilibrium distribution functions used by marker loading and pushing.
This facade implements the background-distribution stage of ORB5X: it initializes analytic or tabulated \(f_0\) data for every species, supplies normalized velocity-coordinate identities, and writes the reference distribution diagnostics. Equilibrium density, temperature, magnetic-field, and flow profiles are obtained from Equil; marker operations consume the resulting SpeciesVariables state through ParticleModule.
◆ get_background_flow()
| static void orb5x::BackgroundModule::get_background_flow |
( |
Real |
s, |
|
|
Real |
chi, |
|
|
Real |
phi, |
|
|
Real & |
vpar, |
|
|
Real & |
vperp |
|
) |
| |
|
static |
Query equilibrium parallel and perpendicular flow.
- Parameters
-
| [in] | s | Normalized radial coordinate. |
| [in] | chi | Poloidal angle [rad]. |
| [in] | phi | Toroidal angle [rad]. |
| [out] | vpar | Normalized parallel flow; currently set to zero. |
| [out] | vperp | Normalized perpendicular flow; currently set to zero. |
- Note
- This compatibility entry point is presently a stub, not Equil::profiles.
◆ get_background_potential()
| static Real orb5x::BackgroundModule::get_background_potential |
( |
Real |
s, |
|
|
Real |
chi, |
|
|
Real |
phi |
|
) |
| |
|
static |
Query the equilibrium electrostatic potential.
- Parameters
-
| [in] | s | Normalized radial coordinate. |
| [in] | chi | Poloidal angle [rad]. |
| [in] | phi | Toroidal angle [rad]. |
- Returns
- Currently zero; spatial background-potential interpolation is not implemented.
◆ get_KE()
Convert parallel velocity and magnetic moment to kinetic energy.
- Parameters
-
| [in] | ut | Normalized parallel velocity. |
| [in] | mu | Normalized magnetic moment per unit mass. |
| [in] | b | Normalized magnetic-field magnitude. |
- Returns
- \(u_\parallel^2/2+\mu B\) in normalized energy-per-mass units.
◆ get_mu()
Recover magnetic moment from energy and parallel velocity.
- Parameters
-
| [in] | ut | Normalized parallel velocity. |
| [in] | ze | Normalized kinetic energy per unit mass. |
| [in] | b | Normalized magnetic-field magnitude. |
- Returns
- \((\mathcal{E}-u_\parallel^2/2)/B\), or zero when B is singular.
◆ get_uabs()
Recover the magnitude of parallel velocity from invariants.
- Parameters
-
| [in] | mu | Normalized magnetic moment per unit mass. |
| [in] | ze | Normalized kinetic energy per unit mass. |
| [in] | b | Normalized magnetic-field magnitude. |
- Returns
- \(\sqrt{2(\mathcal{E}-\mu B)}\), clipped to zero outside its domain.
◆ init_background()
| static void orb5x::BackgroundModule::init_background |
( |
| ) |
|
|
static |
Initialize all species background distributions and emit the f0 dump.
◆ load_background_fields()
| static void orb5x::BackgroundModule::load_background_fields |
( |
const std::string & |
fname | ) |
|
|
static |
Validate a tabulated background-distribution HDF5 file.
- Parameters
-
| [in] | fname | Path containing /f0/psi, /f0/u, and /f0/ze datasets. |
- Exceptions
-
| std::runtime_error | if the path or required HDF5 objects are absent. |
◆ vf0_local_maxwellian()
| static Real orb5x::BackgroundModule::vf0_local_maxwellian |
( |
Real |
vth2, |
|
|
Real |
nval, |
|
|
Real |
ze |
|
) |
| |
|
static |
Evaluate an isotropic local Maxwellian.
- Parameters
-
| [in] | vth2 | Squared normalized thermal speed \(v_{th}^2\). |
| [in] | nval | Local normalized density. |
| [in] | ze | Normalized kinetic energy per unit mass. |
- Returns
- \(n(2\pi v_{th}^2)^{-3/2}\exp(-\mathcal{E}/v_{th}^2)\), or zero for non-positive density or thermal speed.
The documentation for this class was generated from the following file: