This repo is a learning-by-coding implementation of a small thermonuclear reaction network (an α-capture chain) using REAClib rates and a simple one‑zone (parameterized) thermodynamic trajectory. The goal is to connect the physics definitions and equations (Iliadis) to the actual numbers your code evolves.
Primary reference: Christian Iliadis, Nuclear Physics of Stars (2nd ed., 2015).
-
Number density of species i:
$$N_i \equiv \text{nuclei of species } i \text{ per unit volume}\quad [\mathrm{cm^{-3}}]$$ -
Mass density:
$$\rho = \frac{1}{N_A}\sum_i N_i M_i$$ where$M_i$ is the relative atomic mass (in u) and$N_A$ is Avogadro’s constant.
Iliadis defines:
-
$X_i$ : fraction of mass in species (i) (dimensionless) -
$Y_i$ : mole fraction / molar abundance (often treated as “mol per gram” in practice); it stays constant under pure expansion/compression if no reactions occur (useful numerically).
Useful identity (from
For a two‑body reaction (0+1 \to ...), Iliadis starts with:
(where
For identical reactants, the number of distinct pairs is reduced by 1/2; Iliadis writes the general expression using a Kronecker‑delta factor.
(In our α‑captures, reactants are different, so this factor is 1.)
At thermodynamic equilibrium (non‑degenerate, non‑relativistic), relative velocities are Maxwellian:
With that, Iliadis obtains the standard Maxwellian average:
In practice, the literature typically tabulates:
-
$N_A\langle\sigma v\rangle$ in$[\mathrm{cm^3,mol^{-1},s^{-1}}]$
Iliadis also gives a convenient numerical form:
(with
And explicitly:
Interpretation:
Using
This is exactly the structure implemented in ratelab/network.py for each α‑capture step.
A photodisintegration (reverse) reaction acts like a decay with rate (decay constant)
(see Iliadis’ general decay‑constant definition).
For capture ↔ photodisintegration pairs, Iliadis shows that the reverse photodisintegration decay constant can be computed from the forward stellar rate using spin factors, partition functions, masses, and an exponential Boltzmann factor in
For learning and rapid prototyping, we allow two options:
-
Use REAClib-provided reverse fits: if the library already provides the reverse reaction as its own fit, we can evaluate
$\lambda_\gamma(T_9)$ directly with the same 7‑parameter form (this is what your current network code structure assumes). -
Derive
$\lambda_\gamma$ from the forward rate (more “physics transparent”): implement the detailed‑balance formula (as in Iliadis Example 3.2) using$Q$ -values, spins, and partition functions.
Option (1) is fast and consistent with how large networks are often wired; option (2) is excellent for mastery because you see every physical factor.
REAClib rates are provided as fits to tabulated
(as implemented in ratelab/reaclib.py).
Many reactions have multiple sets (different temperature regions / components). We sum them:
ratelab/rates.py).
We also compute:
We start with a minimal α‑chain relevant to O/Si‑region processing:
$$^{16}\mathrm{O}(\alpha,\gamma)^{20}\mathrm{Ne}$$ $$^{20}\mathrm{Ne}(\alpha,\gamma)^{24}\mathrm{Mg}$$ $$^{24}\mathrm{Mg}(\alpha,\gamma)^{28}\mathrm{Si}$$ $$^{28}\mathrm{Si}(\alpha,\gamma)^{32}\mathrm{S}$$
Forward ODE structure is in ratelab/network.py.
A common approach in explosive nucleosynthesis is to prescribe
In this repo we use a simplified “shock_trajectory” parameterization in code (see ratelab/trajectory.py), and wire it into the integrator in scripts/run_onezone.py.
A helpful diagnostic is the abundance flux for each reaction, i.e. the instantaneous flow of material through a link.
For an α‑capture
For a photodisintegration
(Your fluxes() helper in network.py should return these as a dictionary so run_onezone.py can plot them.)
python scripts/plot_rates.py
**** NOTE : AI GENERATED README PLACE HOLDER ****