File adas_reaction.hxx#
Defines
-
ADAS_REACTION_H#
-
struct OpenADASRateCoefficient#
- #include <adas_reaction.hxx>
Represent a 2D rate coefficient table (T,n) Reads data from a file, then interpolates at required values.
Public Functions
-
OpenADASRateCoefficient(const std::string &filename, std::size_t level)#
Read the file, extracting data for the given ionisation level
Read and interpolate
OpenADAS rate coefficientsParts of this code are based on atomic++ by Thomas Body (2017) TBody/atomicpp Copyright (c) 2017 Tom Body That was based on the TBody/atomic1D code, TBody/atomicpp which is in turn based on the cfe316/atomic code cfe316/atomic Copyright (c) 2016 David Wagner wagdav@gmail.com Copyright (c) 2016 Jacob Schwartz jschwart@pppl.gov
- Parameters:
filename – The file to read. Path relative to run working directory
level – The first index in the log coefficient array (ionisation level)
-
BoutReal evaluate(BoutReal T, BoutReal n)#
Inputs:
- Parameters:
n – Electron density in m^-3
T – Electron temperature in eV
- Returns:
rate in units of m^3/s or eV m^3/s
-
OpenADASRateCoefficient(const std::string &filename, std::size_t level)#
-
struct OpenADAS : public ReactionBase#
- #include <adas_reaction.hxx>
Read in and perform calculations with OpenADAS data https://open.adas.ac.uk/
Uses the JSON files produced by: TBody/OpenADAS_to_JSON
Subclassed by ADASCarbonIonisation< level >, ADASCarbonRecombination< level >, ADASLithiumIonisation< level >, ADASLithiumRecombination< level >, ADASNeonIonisation< level >, ADASNeonRecombination< level >
Public Functions
-
inline OpenADAS(const Options &units, const std::string &rate_file, const std::string &radiation_file, std::size_t level, BoutReal electron_heating)#
Inputs
Notes
The rate and radiation file names have “json_database/” prepended
- Parameters:
units – Options tree containing normalisation constants
rate_file – A JSON file containing reaction rate <σv> rates (e.g. SCD, ACD)
radiation_file – A JSON file containing radiation loss rates (e.g. PLT, PRB)
level – The lower ionisation state in the transition e.g. 0 for neutral -> 1st ionisation and 1st -> neutral recombination
electron_heating – The heating of the electrons per reaction [eV] This is the ionisation energy, positive for recombination and negative for ionisation
-
void calculate_rates(Options &electron, Options &from_ion, Options &to_ion)#
Perform the calculation of rates, and transfer of particles/momentum/energy
- Parameters:
electron – The electron species e.g. state[“species”][“e”]
from_ion – The ion on the left of the reaction
to_ion – The ion on the right of the reaction
Private Members
-
OpenADASRateCoefficient rate_coef#
Reaction rate coefficient.
-
OpenADASRateCoefficient radiation_coef#
Energy loss (radiation) coefficient.
-
BoutReal electron_heating#
Heating per reaction [eV].
-
BoutReal Tnorm#
-
BoutReal Nnorm#
-
BoutReal FreqNorm#
Normalisations.
-
inline OpenADAS(const Options &units, const std::string &rate_file, const std::string &radiation_file, std::size_t level, BoutReal electron_heating)#
-
struct OpenADASChargeExchange : public ReactionBase#
- #include <adas_reaction.hxx>
Subclassed by ADASCarbonCX< level, Hisotope >, ADASLithiumCX< level, Hisotope >, ADASNeonCX< level, Hisotope >
Public Functions
-
inline OpenADASChargeExchange(const Options &units, const std::string &rate_file, std::size_t level)#
-
void calculate_rates(Options &electron, Options &from_A, Options &from_B, Options &to_A, Options &to_B)#
Perform charge exchange
from_A + from_B -> to_A + to_B
from_A and to_A must have the same atomic mass from_B and to_B must have the same atomic mass The charge of from_A + from_B must equal the charge of to_A + to_B
-
inline OpenADASChargeExchange(const Options &units, const std::string &rate_file, std::size_t level)#