ASCOT5
|
Atomic reaction data from local files. More...
#include <stdio.h>
#include <stdlib.h>
#include "../ascot5.h"
#include "../print.h"
#include "../error.h"
#include "../spline/interp.h"
#include "../consts.h"
#include "../math.h"
#include "../physlib.h"
#include "../suzuki.h"
#include "../asigma.h"
#include "asigma_loc.h"
Go to the source code of this file.
Functions | |
int | asigma_loc_init (asigma_loc_data *data, int nreac, int *z1, int *a1, int *z2, int *a2, int *reactype, int *ne, real *emin, real *emax, int *nn, real *nmin, real *nmax, int *nT, real *Tmin, real *Tmax, real *sigma) |
Initialize local file atomic data and check inputs. | |
void | asigma_loc_free (asigma_loc_data *data) |
Free allocated resources. | |
void | asigma_loc_offload (asigma_loc_data *data) |
Offload data to the accelerator. | |
a5err | asigma_loc_eval_sigma (real *sigma, int z_1, int a_1, int z_2, int a_2, real E_coll_per_amu, int reac_type, int extrapolate, asigma_loc_data *asigma_data) |
Evaluate atomic reaction cross-section. | |
a5err | asigma_loc_eval_sigmav (real *sigmav, int z_1, int a_1, real m_1, int z_2, int a_2, real E, real T_e, real T_0, real n_i, int reac_type, int extrapolate, asigma_loc_data *asigma_data) |
Evaluate atomic reaction rate coefficient. | |
a5err | asigma_loc_eval_cx (real *ratecoeff, int z_1, int a_1, real E, real mass, int nspec, const int *znum, const int *anum, real T_0, real *n_0, int extrapolate, asigma_loc_data *asigma_data) |
Evaluate atomic reaction rate coefficient. | |
a5err | asigma_loc_eval_bms (real *ratecoeff, int z_1, int a_1, real E, real mass, int nion, const int *znum, const int *anum, real T_e, real *n_i, int extrapolate, asigma_loc_data *asigma_data) |
Evaluate beam stopping rate coefficient. | |
Atomic reaction data from local files.
Atomic reaction data (sigmas) originating from local files and interpolated using splines. If the data for a reaction is missing, a corresponding analytical model implemented in ASCOT5 might be used.
Definition in file asigma_loc.c.
int asigma_loc_init | ( | asigma_loc_data * | data, |
int | nreac, | ||
int * | z1, | ||
int * | a1, | ||
int * | z2, | ||
int * | a2, | ||
int * | reactype, | ||
int * | ne, | ||
real * | emin, | ||
real * | emax, | ||
int * | nn, | ||
real * | nmin, | ||
real * | nmax, | ||
int * | nT, | ||
real * | Tmin, | ||
real * | Tmax, | ||
real * | sigma ) |
Initialize local file atomic data and check inputs.
data | pointer to the data struct |
Definition at line 29 of file asigma_loc.c.
void asigma_loc_free | ( | asigma_loc_data * | data | ) |
Free allocated resources.
offload_data | pointer to the data struct |
Definition at line 114 of file asigma_loc.c.
void asigma_loc_offload | ( | asigma_loc_data * | data | ) |
Offload data to the accelerator.
data | pointer to the data struct |
Definition at line 141 of file asigma_loc.c.
a5err asigma_loc_eval_sigma | ( | real * | sigma, |
int | z_1, | ||
int | a_1, | ||
int | z_2, | ||
int | a_2, | ||
real | E_coll_per_amu, | ||
int | reac_type, | ||
int | extrapolate, | ||
asigma_loc_data * | asigma_data ) |
Evaluate atomic reaction cross-section.
This function evaluates the cross-section (sigma) for the atomic reaction corresponding to the reaction identifiers given as parameters at the given mass-normalized collision energy.
This is a SIMD function.
sigma | pointer to evaluated cross-section |
z_1 | atomic number of fast particle |
a_1 | atomic mass number of fast particle |
z_2 | atomic number of bulk particle |
a_2 | atomic mass number of bulk particle |
E_coll_per_amu | energy per amu corresponding to collision speed |
reac_type | reaction type |
extrapolate | don't raise error but set values outside abscissae to zero |
asigma_data | pointer to atomic data struct |
Definition at line 166 of file asigma_loc.c.
a5err asigma_loc_eval_sigmav | ( | real * | sigmav, |
int | z_1, | ||
int | a_1, | ||
real | m_1, | ||
int | z_2, | ||
int | a_2, | ||
real | E, | ||
real | T_e, | ||
real | T_0, | ||
real | n_i, | ||
int | reac_type, | ||
int | extrapolate, | ||
asigma_loc_data * | asigma_data ) |
Evaluate atomic reaction rate coefficient.
This function evaluates the rate coefficient (<sigma*v>) for the atomic reaction corresponding to the reaction identifiers given as parameters at the given fast particle energy and bulk plasma conditions.
This is a SIMD function.
sigmav | pointer to evaluated rate coefficient |
z_1 | atomic number of fast particle |
a_1 | atomic mass number of fast particle |
m_1 | mass of fast particle |
z_2 | atomic number of bulk particle |
a_2 | atomic mass number of bulk particle |
E | energy of fast particle |
T_e | electron temperature of bulk plasma |
T_0 | temperature of bulk neutrals |
n_i | ion density of bulk plasma |
reac_type | reaction type |
extrapolate | don't raise error but set values outside abscissae to zero |
asigma_data | pointer to atomic data struct |
Definition at line 241 of file asigma_loc.c.
a5err asigma_loc_eval_cx | ( | real * | ratecoeff, |
int | z_1, | ||
int | a_1, | ||
real | E, | ||
real | mass, | ||
int | nspec, | ||
const int * | znum, | ||
const int * | anum, | ||
real | T_0, | ||
real * | n_0, | ||
int | extrapolate, | ||
asigma_loc_data * | asigma_data ) |
Evaluate atomic reaction rate coefficient.
This function evaluates the rate coefficient (<sigma*v>) for the atomic reaction corresponding to the reaction identifiers given as parameters at the given fast particle energy and bulk plasma conditions.
This is a SIMD function.
ratecoeff | pointer to evaluated rate coefficient |
z_1 | atomic number of fast particle |
a_1 | atomic mass number of fast particle |
E | energy of fast particle |
mass | mass of fast particle |
znum | atomic numbers of bulk neutrals |
anum | atomic mass numbers of bulk neutrals |
T_0 | temperature of bulk neutrals |
n_0 | neutral densities |
extrapolate | don't raise error but set values outside abscissae to zero |
asigma_data | pointer to atomic data struct |
Definition at line 334 of file asigma_loc.c.
a5err asigma_loc_eval_bms | ( | real * | ratecoeff, |
int | z_1, | ||
int | a_1, | ||
real | E, | ||
real | mass, | ||
int | nion, | ||
const int * | znum, | ||
const int * | anum, | ||
real | T_e, | ||
real * | n_i, | ||
int | extrapolate, | ||
asigma_loc_data * | asigma_data ) |
Evaluate beam stopping rate coefficient.
This function first tries to evaluate BMS with ADAS data. If not present, the Suzuki model is used instead.
This is a SIMD function.
ratecoeff | pointer to evaluated rate coefficient |
z_1 | atomic number of fast particle |
a_1 | atomic mass number of fast particle |
E | energy of fast particle |
mass | mass of fast particle |
nion | number of bulk ion species |
znum | atomic numbers of bulk particles |
anum | atomic mass numbers of bulk particles |
T_e | electron temperature of bulk plasma |
n_i | densities of bulk ions |
extrapolate | don't raise error but set values outside abscissae to zero |
asigma_data | pointer to atomic data struct |
Definition at line 406 of file asigma_loc.c.