nuclear
- class nuclear.NuclearRates(reactions=None, nuclear_net=None, interp_type='linear', max_i_species=None)[source]
Bases:
ModuleNuclear net and rates.
- max_i_species
Number of nuclear species to track. Convention is 0:n, 1:p, 2:d, 3:t, 4:He3, 5:a, 6:Li7, 7:Be7, 8: Li6, 9: He6, 10: Li8, 11: B8. max_i_species = 8 would go up to Be7, for example.
- Type:
int
- interp_type
Interpolation method for nuclear rates with spline data. Either ‘linear’ or ‘log’.
- Type:
str
- in_states
Nuclear species on the LHS of each reaction.
- Type:
dict of tuple
- out_states
Nuclear species on the RHS of each reaction.
- Type:
dict of tuple
- frwrd_symmetry_fac
Symmetry factor for forward direction of reaction.
- Type:
dict of float
- bkwrd_symmetry_fac
Symmetry factor for backward direction of reaction.
- Type:
dict of float
- frwrd_rate
Dictionary of forward rate parameter (Gamma, <sigma v> or <sigma v^2> divided by (1 amu)^(N_in-1)) for each reaction, units (s^-1/g, cm^3/s/g or cm^6/s/g^2)
- Type:
dict of callable
- bkwrd_rate
Dictionary of backward rate parameter for each reaction.
- Type:
dict of callable
- __call__(Y, T_t, rhoBBN, T_interval, nTOp_frwrd_vec, nTOp_bkwrd_vec, tau_n_fac=1.0, nuclear_rates_q=None)[source]
Returns the rate of change of the abundances.
- Parameters:
Y (Array) – Current abundance of species (n_species/n_b).
T_t (float) – Current temperature in MeV.
rhoBBN (float) – Number density of baryons x 1amu in g/cm^3.
T_interval (array of float) – Interval over which n<->p rates were calculated in MeV.
nTOp_frwrd_vec (array of float) – n -> p dimensionless rates corresponding to T_interval, normalized to the neutron decay width, i.e. Yn * nTOp_frwrd / tau_n + … = -dYn/dt.
nTOp_bkwrd_vec (array of float) – p -> n dimensionless rates corresponding to T_interval.
tau_n_fac (float) – Rescaling parameter for neutron decay lifetime.
nuclear_rates_q (array) – Rescaling parameter of expsigma in nuclear rate. If None, no rescaling is assumed.
- Returns:
dY/dt in s^-1. Same dimensions as Y.
- Return type:
Array
- get_dYdt_rxn(rxn, Y, rhoBBN, frwrd_rate_param, bkwrd_rate_param)[source]
Returns the rate of change of abundances due to a particular reaction.
- Parameters:
rxn (str) – Name of the reaction.
Y (Array) – Current abundance of species (n_species/n_b).
rhoBBN (float) – Number density of baryons x 1amu in g/cm^3.
frwrd_rate_param (callable) – Function returning the forward rate (either <sigma v> or <sigma v^2>). Takes two arguments, T for EM temperature in K and p for rescaling of the rate.
bkwrd_rate_param (callable) – Similar to frwrd_rate_param, but for the backward rate.
- Returns:
dY/dt in s^-1. Same dimensions as Y.
- Return type:
Array
- populate(network)[source]
Populate the nuclear rates.
- Parameters:
network (str) – Nuclear network of interest. Choices are: ‘key_PRIMAT_2018’: PRIMAT 2018 key network rates, also used by PRyMordial. ‘key_YOF’: YOF key network rates, also used by PRyMordial. ‘key_PRIMAT_2023’: PRIMAT 2023 key network rates. ‘key_PArthENoPE’: PArthENoPE key network rates. ‘full_PRIMAT_2023’: PRIMAT 2023 full network rates.
- Return type:
list of Reaction