ASCOT5
|
Atomic reactions model. More...
#include <stdlib.h>
#include <stdio.h>
#include "../ascot5.h"
#include "../math.h"
#include "../physlib.h"
#include "../consts.h"
#include "../error.h"
#include "../print.h"
#include "../particle.h"
#include "../plasma.h"
#include "../random.h"
#include "../asigma.h"
#include "atomic.h"
Go to the source code of this file.
Functions | |
a5err | atomic_rates (real *rate_eff_ion, real *rate_eff_rec, int z_1, int a_1, real m_1, const int *z_2, const int *a_2, const real *m_2, asigma_data *asigmadata, int q, real E, int N_pls_spec, int N_ntl_spec, real *T, real *T_0, real *n, real *n_0) |
Determines atomic reaction rates. | |
DECLARE_TARGET_SIMD a5err | atomic_react (int *q, real dt, real rate_eff_ion, real rate_eff_rec, int z_1, real rnd) |
Determines if an atomic reaction occurs during one time step. | |
void | atomic_fo (particle_simd_fo *p, real *h, plasma_data *p_data, neutral_data *n_data, random_data *r_data, asigma_data *asigmadata) |
Determine if atomic reactions occur during time-step and change charge. | |
Atomic reactions model.
The atomic module models atomic reactions for the simulated test particles. Using atomic reaction data supplied by the asigma (atomicsigma) helper module, reaction probabilities are calculated and tested against a random number. If a reaction occurs, the particle charge state is changed.
The terms ionization and recombination are used loosely in variable names. Ionization (ion) stands for all charge-increasing reactions, and recombination (rec) for all charge-decreasing reactions.
Definition in file atomic.c.
a5err atomic_rates | ( | real * | rate_eff_ion, |
real * | rate_eff_rec, | ||
int | z_1, | ||
int | a_1, | ||
real | m_1, | ||
const int * | z_2, | ||
const int * | a_2, | ||
const real * | m_2, | ||
asigma_data * | asigmadata, | ||
int | q, | ||
real | E, | ||
int | N_pls_spec, | ||
int | N_ntl_spec, | ||
real * | T, | ||
real * | T_0, | ||
real * | n, | ||
real * | n_0 ) |
Determines atomic reaction rates.
The reaction rates are determined based on the charge state. The terms "ionization" and "recombination" are used loosely, where "ionization" refers to all charge-increasing reactions, and "recombination" to all charge-decreasing reactions.
rate_eff_ion | pointer to evaluated reaction rate for ionization |
rate_eff_rec | pointer to evaluated reaction rate for recombination |
z_1 | atomic number of fast particle |
a_1 | atomic mass number of fast particle |
m_1 | mass of fast particle |
z_2 | atomic numbers of bulk particle species |
a_2 | atomic mass numbers of bulk particle species |
m_2 | masses of bulk particle species |
asigmadata | pointer to atomic data struct |
q | charge of fast particle |
E | energy of fast particle |
N_pls_spec | number of species in bulk plasma |
N_ntl_spec | number of species in bulk neutrals |
T | temperature of bulk plasma species |
T_0 | temperature of bulk neutral species |
n | density of bulk plasma species |
n_0 | density of bulk neutral species |
Determines if an atomic reaction occurs during one time step.
The terms ionization and recombination are used loosely in variable names. Ionization (ion) stands for all charge-increasing reactions, and recombination (rec) for all charge-decreasing reactions.
q | charge of fast particle |
dt | time-step |
rate_eff_ion | reaction rate for ionization |
rate_eff_rec | reaction rate for recombination |
z_1 | atomic number of fast particle |
rnd | random number |
void atomic_fo | ( | particle_simd_fo * | p, |
real * | h, | ||
plasma_data * | p_data, | ||
neutral_data * | n_data, | ||
random_data * | r_data, | ||
asigma_data * | asigmadata ) |
Determine if atomic reactions occur during time-step and change charge.
p | fo struct |
h | time-steps from NSIMD markers |
p_data | pointer to plasma data |
n_data | pointer to neutral data |
r_data | pointer to random-generator data |
asigmadata | pointer to atomic reaction data |