Open In Colab

BBN abundance evolution

Plots \(A_i Y_i(t)\) for each nuclide vs cosmic time, for the small (12-reaction, 8-nuclide), large, amax=8 (68-reaction, 12-nuclide, equivalent to the old “medium” network) and large (~429-reaction, ~59-nuclide) networks, with a secondary axis showing \(T_\gamma\) in MeV.

import importlib.util, subprocess, sys

# In Colab (or any environment without a local primat checkout), pip-install
# the released package; local dev runs already have it importable (editable
# install / repo on sys.path via the cell below), so this is a no-op there.
if importlib.util.find_spec("primat") is None:
    subprocess.run([sys.executable, "-m", "pip", "install", "-q", "primat"], check=True)
import sys, os
sys.path.insert(0, os.path.abspath('..'))

import numpy as np
import matplotlib.pyplot as plt
from primat.backend import run_bbn
from primat.plotting import abundance_evolution_curves   # shared, backend-agnostic curve computation
from primat.evolution import t_of_T_interpolator
from primat.config import PRIMATConfig

# Uses primat.backend.run_bbn() only (works on either backend); the curve data
# (t, A_i*Y_i, colour, linestyle, label) comes from the same
# primat.plotting.abundance_evolution_curves() helper the GUI uses, built on
# the EvolutionResult returned as result["evolution"] (output_time_evolution=True).
def add_temperature_axis(ax, evolution, T_ticks_MeV):
    """Add a top x-axis showing T_gamma in MeV."""
    t_of_T = t_of_T_interpolator(evolution)
    t_ticks = [float(t_of_T(T)) for T in T_ticks_MeV]
    ax2 = ax.twiny()
    ax2.set_xscale('log')
    ax2.set_xlim(ax.get_xlim())
    ax2.set_xticks(t_ticks)
    ax2.set_xticklabels([str(T) for T in T_ticks_MeV])
    ax2.set_xlabel(r'$T_\gamma$ [MeV]')
    return ax2

t = np.logspace(0, 6, 500)   # 1 s to 1e6 s
T_ticks_MeV = [1.0, 0.5, 0.2, 0.1, 0.05, 0.02, 0.01]

Small network (12 reactions, 8 nuclides)

result_small = run_bbn({'network': 'small', 'verbose': True, 'output_time_evolution': True, 'output_file': None})
cfg_small = PRIMATConfig({'network': 'small'})
A_small = {name: NZ[0] + NZ[1] for name, NZ in cfg_small.Nuclides.items()}
names_small = list(result_small['evolution'].Y)
#The following is a simple example of how to plot the evolution of He4 (YP = 4 Y_He4) abundance and D abundance over time using the results from the BBN simulation.
tlist = result_small['evolution'].t
He4list = 4*result_small['evolution'].Y['He4']
dlist = result_small['evolution'].Y['H2']
plt.loglog(tlist, He4list, label='He4 (YP)', color='blue')
plt.loglog(tlist, dlist, label='D (YP)', color='red')
plt.ylim(1e-14, 1e0)
plt.xlim(1e0, 1e6)
plt.xlabel('Time (s)')
plt.ylabel('Abundance')
plt.legend()
plt.show()
/var/folders/x_/t8nzcr8d7_91h7fdrxdr8b180000gp/T/ipykernel_95861/1751529369.py:12: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
  plt.show()
#But we can use the abundance_evolution_curves function to get the curves for all nuclides in the small network.
curves = abundance_evolution_curves(result_small['evolution'], A_small, names_small, t)

fig, ax = plt.subplots(figsize=(9, 6))
for name in names_small:
    t_vals, vals, color, ls, label = curves[name]
    if t_vals.size:
        ax.plot(t_vals, vals, color=color, linestyle=ls, label=label)

ax.set_xscale('log')
ax.set_yscale('log')
ax.set_xlabel('Time [s]')
ax.set_ylabel(r'$A_i Y_i$')
ax.set_xlim(1, 1e6)
ax.set_ylim(1e-22, 2)
ax.legend(ncol=2)
ax.set_title('BBN abundance evolution — small network')
add_temperature_axis(ax, result_small['evolution'], T_ticks_MeV)

plt.tight_layout()
plt.savefig('plots/abundance_evolution_small.pdf', bbox_inches='tight')
plt.show()
/var/folders/x_/t8nzcr8d7_91h7fdrxdr8b180000gp/T/ipykernel_95861/1281847218.py:22: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
  plt.show()

Large network, amax=8 (68 reactions, 12 nuclides)

result_amax8 = run_bbn({'network': 'large', 'amax': 8, 'verbose': True, 'output_time_evolution': True, 'output_file': None})
cfg_amax8 = PRIMATConfig({'network': 'large', 'amax': 8})
A_amax8 = {name: NZ[0] + NZ[1] for name, NZ in cfg_amax8.Nuclides.items()}
names_amax8 = list(result_amax8['evolution'].Y)
curves = abundance_evolution_curves(result_amax8['evolution'], A_amax8, names_amax8, t)

fig, ax = plt.subplots(figsize=(9, 6))
for name in names_amax8:
    t_vals, vals, color, ls, label = curves[name]
    if t_vals.size:
        ax.plot(t_vals, vals, color=color, linestyle=ls, label=label)
ax.set_xscale('log'); ax.set_yscale('log')
ax.set_xlabel('Time [s]'); ax.set_ylabel(r'$A_i Y_i$')
ax.set_xlim(1, 1e6); ax.set_ylim(1e-22, 2)
ax.legend(ncol=2); add_temperature_axis(ax, result_amax8['evolution'], T_ticks_MeV)
ax.set_title('BBN abundance evolution — large network, amax=8')
plt.tight_layout(); plt.show()
/var/folders/x_/t8nzcr8d7_91h7fdrxdr8b180000gp/T/ipykernel_95861/1512855745.py:13: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
  plt.tight_layout(); plt.show()

Large network (~429 reactions, ~59 nuclides)

Every tracked nuclide is plotted. The light elements match the large network, amax=8; the heavy-nuclide tail is approximate (limited by the AC2024 rate floors). Lower atol_large_LT (default 1e-25) to resolve smaller abundances at extra cost.

result_large = run_bbn({'network': 'large', 'verbose': True, 'output_time_evolution': True, 'output_file': None})
# To resolve tinier nuclides, e.g.: run_bbn({'network':'large','atol_large_LT':1e-30, 'output_time_evolution': True, 'output_file': None})
cfg_large = PRIMATConfig({'network': 'large'})
A_large = {name: NZ[0] + NZ[1] for name, NZ in cfg_large.Nuclides.items()}
names_large = list(result_large['evolution'].Y)   # all ~59 tracked nuclides
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                              ┃
┃         ░█▀█░█▀▄░▀█▀░█▄█░█▀█░▀█▀             ┃
┃         ░█▀▀░█▀▄░░█░░█░█░█▀█░░█░             ┃
┃         ░▀░░░▀░▀░▀▀▀░▀░▀░▀░▀░░▀░             ┃
┃                                              ┃
┃    Welcome to PRIMAT (C backend) v0.3.2      ┃
┃                                              ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

[opts-c] backend              = c
[opts-c] network              = small (amax=None)
[opts-c] numerical_precision  = 1e-07
[opts-c] radiative_corrections    = True
[opts-c] finite_mass_corrections  = True
[opts-c] thermal_corrections      = True
[opts-c] spectral_distortions     = True
[opts-c] tau_n_normalization      = True
[opts-c] tau_n                = 878.4 s
[opts-c] Omegabh2             = 0.02242 (eta0b=6.13744e-10)
[opts-c] DeltaNeff            = 0
[init-c] Electron-thermo tables loaded from cache (2000 points).
[init-c] QED pressure corrections tables loaded.
[rates-c] MT network: 12 reactions over 8 nuclides.
[rates-c] LT network: 12 reactions over 8 nuclides.
[rates-c] MT nuclides: n, p, H2, H3, He3, He4, Li7, Be7
[rates-c] LT nuclides: n, p, H2, H3, He3, He4, Li7, Be7
------------------------------------------------------------
Loaded 13 reactions (LT network):
------------------------------------------------------------
  n <-> p              
  n + p <-> H2            [Ando et al. 2006]
  H2 + p <-> He3          [Moscoso et al. 2021]
  H2 + H2 <-> He3 + n     [Gómez et al. 2017]
  H2 + H2 <-> H3 + p      [Gómez et al. 2017]
  H3 + p <-> He4          [Serpico et al. 2004]
  H3 + H2 <-> He4 + n     [de Souza et al. 2019]
  H3 + He4 <-> Li7        [Descouvemont et al. 2004]
  He3 + n <-> H3 + p      [Descouvemont et al. 2004]
  He3 + H2 <-> He4 + p    [de Souza et al. 2019]
  He3 + He4 <-> Be7       [Iliadis et al. 2016]
  Be7 + n <-> Li7 + p     [de Souza et al. 2020]
  Li7 + p <-> He4 + He4   [Descouvemont et al. 2004]
[bg-c] Solving cosmological background a(t,T) ...
[bg-c] Background a(t,T) ready in 0.00 s
[weak-c] background n<->p weak rates: loaded from cache.
[weak-c] n <--> p thermal corrections loaded from cache.
[nucl-c] Solving neutron decoupling at high temperature era (T = 10 -> 1 MeV)
[nucl-c] [HT] Finished in 0.00 s
[nucl-c] Solving nuclear network at mid temperature era (T = 1 -> 0.11 MeV)
[nucl-c] [MT] Finished (small network, 8 nuclides) in 0.02 s
[nucl-c] Solving nuclear network at low temperature era (T = 0.11 -> 0.001 MeV)
[nucl-c] [LT] Finished (small network, 8 nuclides) in 0.01 s
--------------------------------------------------
Predicted primordial abundances at the end of BBN (8 numerically solved nuclides)
--------------------------------------------------
  Yn    = 3.997469e-16
  Yp    = 7.529428e-01
  YH2   = 1.834100e-05
  YH3   = 5.852036e-08
  YHe3  = 7.771620e-06
  YHe4  = 6.174925e-02
  YLi7  = 2.181379e-11
  YBe7  = 3.966364e-10

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                              ┃
┃         ░█▀█░█▀▄░▀█▀░█▄█░█▀█░▀█▀             ┃
┃         ░█▀▀░█▀▄░░█░░█░█░█▀█░░█░             ┃
┃         ░▀░░░▀░▀░▀▀▀░▀░▀░▀░▀░░▀░             ┃
┃                                              ┃
┃    Welcome to PRIMAT (C backend) v0.3.2      ┃
┃                                              ┃
┗━━���━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

[opts-c] backend              = c
[opts-c] network              = large (amax=8)
[opts-c] numerical_precision  = 1e-07
[opts-c] radiative_corrections    = True
[opts-c] finite_mass_corrections  = True
[opts-c] thermal_corrections      = True
[opts-c] spectral_distortions     = True
[opts-c] tau_n_normalization      = True
[opts-c] tau_n                = 878.4 s
[opts-c] Omegabh2             = 0.02242 (eta0b=6.13744e-10)
[opts-c] DeltaNeff            = 0
[init-c] Electron-thermo tables loaded from cache (2000 points).
[init-c] QED pressure corrections tables loaded.
[rates-c] MT network: 17 reactions over 12 nuclides.
[rates-c] LT network: 67 reactions over 12 nuclides.
[rates-c] MT nuclides: n, p, H2, H3, He3, He4, Li7, Be7, He6, Li8, Li6, B8
[rates-c] LT nuclides: n, p, H2, H3, He3, He4, Li7, Be7, He6, Li8, Li6, B8
------------------------------------------------------------
Loaded 68 reactions (LT network):
------------------------------------------------------------
  n <-> p                        
  B8 <-> He4 + He4                  [Audi et al. 2003]
  B8 + H2 <-> Be7 + He3             [TALYS2, Koning et al. 2023]
  B8 + n <-> Be7 + H2               [TALYS2, Koning et al. 2023]
  B8 + n <-> Li6 + He3              [TALYS2, Koning et al. 2023]
  B8 + n <-> He4 + He4 + p          [TALYS2, Koning et al. 2023]
  B8 + H3 <-> Be7 + He4             [TALYS2, Koning et al. 2023]
  B8 + H3 <-> He4 + He4 + He3       [TALYS2, Koning et al. 2023]
  Be7 + He3 <-> He4 + He4 + p + p   [Caughlan& Fowler 1988 & Malaney& Fowler 1989]
  Be7 + He3 <-> p + p + He4 + He4   [TALYS2, Koning et al. 2023]
  Be7 <-> Li7                       [Audi et al. 2003]
  Be7 + H2 <-> He4 + He4 + p        [Rijal et al. 2019]
  Be7 + n <-> Li7 + p               [de Souza et al. 2020]
  Be7 + n <-> He4 + He4             [Barbagallo et al. 2016]
  Be7 + p <-> B8                    [NACRE, Xu et al. 2010, 2011]
  Be7 + H3 <-> Li6 + He4            [TALYS2, Koning et al. 2023]
  Be7 + H3 <-> Li7 + He3            [TALYS2, Koning et al. 2023]
  Be7 + H3 <-> He4 + He4 + H2       [TALYS2, Koning et al. 2023]
  Be7 + H3 <-> He4 + He4 + n + p    [Caughlan& Fowler 1988 & Malaney& Fowler 1989]
  He3 + He3 <-> He4 + p + p         [NACRE, Xu et al. 2010, 2011]
  He3 + He4 <-> Be7                 [Iliadis et al. 2016]
  He3 + H2 <-> He4 + p              [de Souza et al. 2019]
  He3 + n <-> He4                   [Wagoner 1969]
  He3 + n <-> H3 + p                [Descouvemont et al. 2004]
  He3 + H3 <-> Li6                  [Fukugita& Kajino 1990]
  He3 + H3 <-> He4 + H2             [Caughlan& Fowler 1988]
  He3 + H3 <-> He4 + n + p          [Caughlan& Fowler 1988]
  He6 <-> Li6                       [Audi et al. 2003]
  Li6 + He3 <-> Be7 + H2            [TALYS2, Koning et al. 2023]
  Li6 + He3 <-> He4 + He4 + p       [TALYS2, Koning et al. 2023]
  Li6 + H2 <-> Be7 + n              [Malaney& Fowler 1989]
  Li6 + H2 <-> Li7 + p              [Malaney& Fowler 1989]
  Li6 + n <-> Li7                   [Malaney& Fowler 1989]
  Li6 + n <-> H3 + He4              [Caughlan& Fowler 1988]
  Li6 + p <-> Be7                   [NACRE, Xu et al. 2010, 2011]
  Li6 + p <-> He3 + He4             [NACRE, Xu et al. 2010, 2011]
  Li6 + H3 <-> Li7 + H2             [TALYS2, Koning et al. 2023]
  Li6 + H3 <-> Li8 + p              [TALYS2, Koning et al. 2023]
  Li6 + H3 <-> He4 + He4 + n        [TALYS2, Koning et al. 2023]
  Li7 + He3 <-> Li6 + He4           [TALYS2, Koning et al. 2023]
  Li7 + He3 <-> He4 + He4 + H2      [TALYS2, Koning et al. 2023]
  Li7 + He3 <-> He4 + He4 + n + p   [Caughlan& Fowler 1988 & Malaney& Fowler 1989]
  Li7 + H2 <-> Li8 + p              [Malaney& Fowler 1989]
  Li7 + H2 <-> He4 + He4 + n        [Coc et al. 2012]
  Li7 + n <-> Li8                   [Malaney& Fowler 1989 & Heil et al. 1998]
  Li7 + p <-> He4 + He4             [Descouvemont et al. 2004]
  Li7 + p <-> He4 + He4             [NACRE, Xu et al. 2010, 2011]
  Li7 + H3 <-> He4 + He4 + n + n    [Caughlan& Fowler 1988 & Malaney& Fowler 1989]
  Li8 + He3 <-> Li7 + He4           [TALYS2, Koning et al. 2023]
  Li8 + He3 <-> He4 + He4 + H3      [TALYS2, Koning et al. 2023]
  Li8 <-> He4 + He4                 [Audi et al. 2003]
  Li8 + H2 <-> Li7 + H3             [Hashimoto et al. 2009]
  Li8 + p <-> He4 + He4 + n         [Mendes et al. 2012]
  He4 + n + n <-> He6               [Efros et al. 1996]
  He4 + n + p <-> Li6               [Caughlan& Fowler 1988]
  H2 + He4 <-> Li6                  [Trezzi et al. (Luna) 2017]
  H2 + H2 <-> He3 + n               [Gómez et al. 2017]
  H2 + H2 <-> He4                   [NACRE, Xu et al. 2010, 2011]
  H2 + H2 <-> H3 + p                [Gómez et al. 2017]
  H2 + n <-> H3                     [Nagai et al. 2006]
  H2 + p <-> He3                    [Moscoso et al. 2021]
  n + p <-> H2                      [Ando et al. 2006]
  p + p + n <-> H2 + p              [Caughlan& Fowler 1988]
  H3 <-> He3                        [Audi et al. 2003]
  H3 + He4 <-> Li7                  [Descouvemont et al. 2004]
  H3 + H2 <-> He4 + n               [de Souza et al. 2019]
  H3 + p <-> He4                    [Serpico et al. 2004]
  H3 + H3 <-> He4 + n + n           [Nagai et al. 2006]
[bg-c] Solving cosmological background a(t,T) ...
[bg-c] Background a(t,T) ready in 0.00 s
[weak-c] background n<->p weak rates: loaded from cache.
[weak-c] n <--> p thermal corrections loaded from cache.
[nucl-c] Solving neutron decoupling at high temperature era (T = 10 -> 1 MeV)
[nucl-c] [HT] Finished in 0.00 s
[nucl-c] Solving nuclear network at mid temperature era (T = 1 -> 0.11 MeV)
[nucl-c] [MT] Finished (large network, 12 nuclides) in 0.02 s
[nucl-c] Solving nuclear network at low temperature era (T = 0.11 -> 0.001 MeV)
[nucl-c] [LT] Finished (large network, 12 nuclides) in 0.09 s
--------------------------------------------------
Predicted primordial abundances at the end of BBN (12 numerically solved nuclides)
--------------------------------------------------
  Yn    = 3.996514e-16
  Yp    = 7.529389e-01
  YH2   = 1.834604e-05
  YH3   = 5.839097e-08
  YHe3  = 7.770214e-06
  YHe4  = 6.175022e-02
  YLi7  = 9.178081e-11
  YBe7  = 3.223613e-10
  YHe6  = 1.101476e-60
  YLi8  = 8.641954e-33
  YLi6  = 5.878313e-15
  YB8   = 9.046550e-34

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                              ┃
┃         ░█▀█░█▀▄░▀█▀░█▄█░█▀█░▀█▀             ┃
┃         ░█▀▀░█▀▄░░█░░█░█░█▀█░░█░             ┃
┃         ░▀░░░▀░▀░▀▀▀░▀░▀░▀░▀░░▀░             ┃
┃                                              ┃
┃    Welcome to PRIMAT (C backend) v0.3.2      ┃
┃                                              ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

[opts-c] backend              = c
[opts-c] network              = large (amax=None)
[opts-c] numerical_precision  = 1e-07
[opts-c] radiative_corrections    = True
[opts-c] finite_mass_corrections  = True
[opts-c] thermal_corrections      = True
[opts-c] spectral_distortions     = True
[opts-c] tau_n_normalization      = True
[opts-c] tau_n                = 878.4 s
[opts-c] Omegabh2             = 0.02242 (eta0b=6.13744e-10)
[opts-c] DeltaNeff            = 0
[init-c] Electron-thermo tables loaded from cache (2000 points).
[init-c] QED pressure corrections tables loaded.
[rates-c] MT network: 17 reactions over 12 nuclides.
[rates-c] LT network: 428 reactions over 59 nuclides.
[rates-c] MT nuclides: n, p, H2, H3, He3, He4, Li7, Be7, He6, Li8, Li6, B8
[rates-c] LT nuclides: n, p, H2, H3, He3, He4, Li7, Be7, He6, Li8, Li6, B8, Li9, Be9, Be10, Be11, Be12, B10, B11, B12, B13, B14, B15, C9, C10, C11, C12, C13, C14, C15, C16, N12, N13, N14, N15, N16, N17, O13, O14, O15, O16, O17, O18, O19, O20, F17, F18, F19, F20, Ne18, Ne19, Ne20, Ne21, Ne22, Ne23, Na20, Na21, Na22, Na23
------------------------------------------------------------
Loaded 429 reactions (LT network):
------------------------------------------------------------
  n <-> p                        
  B10 + He3 <-> C11 + H2            [TALYS2, Koning et al. 2023]
  B10 + He3 <-> C12 + p             [TALYS2, Koning et al. 2023]
  B10 + He3 <-> N12 + n             [TALYS2, Koning et al. 2023]
  B10 + He3 <-> N13                 [TALYS2, Koning et al. 2023]
  B10 + He4 <-> C12 + H2            [TALYS2, Koning et al. 2023]
  B10 + He4 <-> C13 + p             [TALYS2, Koning et al. 2023]
  B10 + He4 <-> N13 + n             [Caughlan& Fowler 1988]
  B10 + He4 <-> N14                 [TALYS2, Koning et al. 2023]
  B10 + H2 <-> B11 + p              [TALYS2, Koning et al. 2023]
  B10 + H2 <-> C11 + n              [TALYS2, Koning et al. 2023]
  B10 + H2 <-> C12                  [TALYS2, Koning et al. 2023]
  B10 + H2 <-> He4 + He4 + He4      [TALYS2, Koning et al. 2023]
  B10 + n <-> B11                   [TALYS2, Koning et al. 2023]
  B10 + n <-> Be10 + p              [TALYS2, Koning et al. 2023]
  B10 + n <-> He4 + He4 + H3        [TALYS2, Koning et al. 2023]
  B10 + p <-> Be7 + He4             [NACRE, Xu et al. 2010, 2011]
  B10 + p <-> C11                   [NACRE, Xu et al. 2010, 2011]
  B10 + p <-> He4 + He4 + He3       [TALYS2, Koning et al. 2023]
  B10 + H3 <-> B11 + H2             [TALYS2, Koning et al. 2023]
  B10 + H3 <-> B12 + p              [TALYS2, Koning et al. 2023]
  B10 + H3 <-> Be9 + He4            [TALYS2, Koning et al. 2023]
  B10 + H3 <-> C12 + n              [TALYS2, Koning et al. 2023]
  B10 + H3 <-> C13                  [TALYS2, Koning et al. 2023]
  B11 + He3 <-> B10 + He4           [TALYS2, Koning et al. 2023]
  B11 + He3 <-> C12 + H2            [TALYS2, Koning et al. 2023]
  B11 + He3 <-> C13 + p             [TALYS2, Koning et al. 2023]
  B11 + He3 <-> N13 + n             [TALYS2, Koning et al. 2023]
  B11 + He3 <-> N14                 [TALYS2, Koning et al. 2023]
  B11 + He4 <-> C14 + p             [Wang et al. 1991]
  B11 + He4 <-> N14 + n             [NACRE, Xu et al. 2010, 2011]
  B11 + He4 <-> N15                 [Wang et al. 1991]
  B11 + H2 <-> B12 + p              [Coc et al. 2012]
  B11 + H2 <-> Be9 + He4            [TALYS2, Koning et al. 2023]
  B11 + H2 <-> C12 + n              [Coc et al. 2012]
  B11 + H2 <-> C13                  [TALYS2, Koning et al. 2023]
  B11 + n <-> B12                   [Coc et al. 2012]
  B11 + p <-> C11 + n               [NACRE, Angulo et al. 1999]
  B11 + p <-> C12                   [NACRE, Xu et al. 2010, 2011]
  B11 + p <-> He4 + He4 + He4       [NACRE, Xu et al. 2010, 2011]
  B11 + H3 <-> B13 + p              [TALYS2, Koning et al. 2023]
  B11 + H3 <-> Be10 + He4           [TALYS2, Koning et al. 2023]
  B11 + H3 <-> C13 + n              [TALYS2, Koning et al. 2023]
  B11 + H3 <-> C14                  [TALYS2, Koning et al. 2023]
  B12 + He3 <-> B11 + He4           [TALYS2, Koning et al. 2023]
  B12 + He3 <-> C14 + p             [TALYS2, Koning et al. 2023]
  B12 + He3 <-> N14 + n             [TALYS2, Koning et al. 2023]
  B12 + He3 <-> N15                 [TALYS2, Koning et al. 2023]
  B12 <-> C12                       [Audi et al. 2003]
  B12 + He4 <-> N15 + n             [TALYS2, Koning et al. 2023]
  B12 + He4 <-> N16                 [TALYS2, Koning et al. 2023]
  B12 + H2 <-> B13 + p              [TALYS2, Koning et al. 2023]
  B12 + H2 <-> Be10 + He4           [TALYS2, Koning et al. 2023]
  B12 + H2 <-> C13 + n              [TALYS2, Koning et al. 2023]
  B12 + H2 <-> C14                  [TALYS2, Koning et al. 2023]
  B12 + n <-> B13                   [TALYS2, Koning et al. 2023]
  B12 + p <-> Be9 + He4             [TALYS2, Koning et al. 2023]
  B12 + p <-> C12 + n               [TALYS2, Koning et al. 2023]
  B12 + p <-> C13                   [TALYS2, Koning et al. 2023]
  B12 + H3 <-> Be11 + He4           [TALYS2, Koning et al. 2023]
  B12 + H3 <-> C14 + n              [TALYS2, Koning et al. 2023]
  B12 + H3 <-> C15                  [TALYS2, Koning et al. 2023]
  B13 <-> C13                       [Audi et al. 2003]
  B14 <-> C14                       [Audi et al. 2003]
  B15 <-> C15                       [Audi et al. 2003]
  B8 + He3 <-> C10 + p              [TALYS2, Koning et al. 2023]
  B8 <-> He4 + He4                  [Audi et al. 2003]
  B8 + He4 <-> C11 + p              [TALYS2, Koning et al. 2023]
  B8 + He4 <-> N12                  [TALYS2, Koning et al. 2023]
  B8 + H2 <-> Be7 + He3             [TALYS2, Koning et al. 2023]
  B8 + H2 <-> C10                   [TALYS2, Koning et al. 2023]
  B8 + n <-> Be7 + H2               [TALYS2, Koning et al. 2023]
  B8 + n 
<-> Li6 + He3              [TALYS2, Koning et al. 2023]
  B8 + n <-> He4 + He4 + p          [TALYS2, Koning et al. 2023]
  B8 + p <-> C9                     [Descouvemont 1999 & Beaumel et al. 2001]
  B8 + H3 <-> B10 + p               [TALYS2, Koning et al. 2023]
  B8 + H3 <-> Be7 + He4             [TALYS2, Koning et al. 2023]
  B8 + H3 <-> C10 + n               [TALYS2, Koning et al. 2023]
  B8 + H3 <-> C11                   [TALYS2, Koning et al. 2023]
  B8 + H3 <-> He4 + He4 + He3       [TALYS2, Koning et al. 2023]
  Be10 + He3 <-> B10 + H3           [TALYS2, Koning et al. 2023]
  Be10 + He3 <-> B11 + H2           [TALYS2, Koning et al. 2023]
  Be10 + He3 <-> B12 + p            [TALYS2, Koning et al. 2023]
  Be10 + He3 <-> Be9 + He4          [TALYS2, Koning et al. 2023]
  Be10 + He3 <-> C12 + n            [TALYS2, Koning et al. 2023]
  Be10 + He3 <-> C13                [TALYS2, Koning et al. 2023]
  Be10 <-> B10                      [NUBASE2020, Kondev et al. 2021]
  Be10 + He4 <-> C13 + n            [TALYS2, Koning et al. 2023]
  Be10 + He4 <-> C14                [TALYS2, Koning et al. 2023]
  Be10 + H2 <-> B11 + n             [TALYS2, Koning et al. 2023]
  Be10 + H2 <-> B12                 [TALYS2, Koning et al. 2023]
  Be10 + H2 <-> Li8 + He4           [TALYS2, Koning et al. 2023]
  Be10 + n <-> Be11                 [Rauscher et al. 1994]
  Be10 + p <-> B11                  [TALYS2, Koning et al. 2023]
  Be10 + p <-> Li7 + He4            [TALYS2, Koning et al. 2023]
  Be10 + p <-> He4 + He4 + H3       [TALYS2, Koning et al. 2023]
  Be10 + H3 <-> B12 + n             [TALYS2, Koning et al. 2023]
  Be10 + H3 <-> B13                 [TALYS2, Koning et al. 2023]
  Be10 + H3 <-> Li9 + He4           [TALYS2, Koning et al. 2023]
  Be11 + He3 <-> B13 + p            [TALYS2, Koning et al. 2023]
  Be11 + He3 <-> Be10 + He4         [TALYS2, Koning et al. 2023]
  Be11 + He3 <-> C13 + n            [TALYS2, Koning et al. 2023]
  Be11 + He3 <-> C14                [TALYS2, Koning et al. 2023]
  Be11 <-> B11                      [Audi et al. 2003]
  Be11 + He4 <-> C14 + n            [TALYS2, Koning et al. 2023]
  Be11 + He4 <-> C15                [TALYS2, Koning et al. 2023]
  Be11 + H2 <-> B12 + n             [TALYS2, Koning et al. 2023]
  Be11 + H2 <-> B13                 [TALYS2, Koning et al. 2023]
  Be11 + H2 <-> Be12 + p            [TALYS2, Koning et al. 2023]
  Be11 + H2 <-> Li9 + He4           [TALYS2, Koning et al. 2023]
  Be11 + n <-> Be12                 [Rauscher et al. 1994]
  Be11 + p <-> B11 + n              [TALYS2, Koning et al. 2023]
  Be11 + p <-> B12                  [TALYS2, Koning et al. 2023]
  Be11 + p <-> Be10 + H2            [TALYS2, Koning et al. 2023]
  Be11 + p <-> Be9 + H3             [TALYS2, Koning et al. 2023]
  Be11 + p <-> Li8 + He4            [TALYS2, Koning et al. 2023]
  Be11 + H3 <-> B13 + n             [TALYS2, Koning et al. 2023]
  Be11 + H3 <-> B14                 [TALYS2, Koning et al. 2023]
  Be12 + He3 <-> B14 + p            [TALYS2, Koning et al. 2023]
  Be12 + He3 <-> Be11 + He4         [TALYS2, Koning et al. 2023]
  Be12 + He3 <-> C14 + n            [TALYS2, Koning et al. 2023]
  Be12 + He3 <-> C15                [TALYS2, Koning et al. 2023]
  Be12 <-> B12                      [Audi et al. 2003]
  Be12 + He4 <-> C15 + n            [TALYS2, Koning et al. 2023]
  Be12 + He4 <-> C16                [TALYS2, Koning et al. 2023]
  Be12 + H2 <-> B13 + n             [TALYS2, Koning et al. 2023]
  Be12 + H2 <-> B14                 [TALYS2, Koning et al. 2023]
  Be12 + p <-> B12 + n              [TALYS2, Koning et al. 2023]
  Be12 + p <-> B13                  [TALYS2, Koning et al. 2023]
  Be12 + p <-> Be10 + H3            [TALYS2, Koning et al. 2023]
  Be12 + p <-> Li9 + He4            [TALYS2, Koning et al. 2023]
  Be12 + H3 <-> B14 + n             [TALYS2, Koning et al. 2023]
  Be12 + H3 <-> B15                 [TALYS2, Koning et al. 2023]
  Be7 + He3 <-> C10                 [TALYS2, Koning et al. 2023]
  Be7 + He3 <-> He4 + He4 + p + p   [Caughlan& Fowler 1988 & Malaney& Fowler 1989]
  Be7 + He3 <-> p + p + He4 + He4   [TALYS2, Koning et al. 2023]
  Be7 <-> Li7                       [Audi et al. 2003]
  Be7 + He4 <-> C11                 [NACRE, Xu et al. 2010, 2011]
  Be7 + H2 <-> He4 + He4 + p        [Rijal et al. 2019]
  Be7 + n <-> Li7 + p               [de Souza et al. 2020]
  Be7 + n <-> He4 + He4             [Barbagallo et al. 2016]
  Be7 + p <-> B8                    [NACRE, Xu et al. 2010, 2011]
  Be7 + H3 <-> B10                  [TALYS2, Koning et al. 2023]
  Be7 + H3 <-> Be9 + p              [Coc et al. 2012]
  Be7 + H3 <-> Li6 + He4            [TALYS2, Koning et al. 2023]
  Be7 + H3 <-> Li7 + He3            [TALYS2, Koning et al. 2023]
  Be7 + H3 <-> He4 + He4 + H2       [TALYS2, Koning et al. 2023]
  Be7 + H3 <-> He4 + He4 + n + p    [Caughlan& Fowler 1988 & Malaney& Fowler 1989]
  Be9 + He3 <-> B10 + H2            [TALYS2, Koning et al. 2023]
  Be9 + He3 <-> B11 + p             [TALYS2, Koning et al. 2023]
  Be9 + He3 <-> C11 + n             [TALYS2, Koning et al. 2023]
  Be9 + He3 <-> C12                 [TALYS2, Koning et al. 2023]
  Be9 + He3 <-> He4 + He4 + He4     [TALYS2, Koning et al. 2023]
  Be9 + He4 <-> C12 + n             [NACRE, Xu et al. 2010, 2011]
  Be9 + He4 <-> C13                 [TALYS2, Koning et al. 2023]
  Be9 + H2 <-> B10 + n              [TALYS2, Koning et al. 2023]
  Be9 + H2 <-> B11                  [TALYS2, Koning et al. 2023]
  Be9 + H2 <-> Be10 + p             [TALYS2, Koning et al. 2023]
  Be9 + H2 <-> Li7 + He4            [TALYS2, Koning et al. 2023]
  Be9 + H2 <-> He4 + He4 + H3       [TALYS2, Koning et al. 2023]
  Be9 + n <-> Be10                  [Rauscher et al. 1994]
  Be9 + p <-> B10                   [NACRE, Xu et al. 2010, 2011]
  Be9 + p <-> Li6 + He4             [NACRE, Xu et al. 2010, 2011]
  Be9 + p <-> He4 + He4 + H2        [NACRE, Xu et al. 2010, 2011]
  Be9 + p <-> He4 + He4 + p + n     [NACRE, Angulo et al. 1999]
  Be9 + H3 <-> B11 + n              [TALYS2, Koning et al. 2023]
  Be9 + H3 <-> B12                  [TALYS2, Koning et al. 2023]
  Be9 + H3 <-> Be10 + H2            [TALYS2, Koning et al. 2023]
  Be9 + H3 <-> Li8 + He4            [TALYS2, Koning et al. 2023]
  C10 <-> B10                       [Audi et al. 2003]
  C11 + He3 <-> C10 + He4           [TALYS2, Koning et al. 2023]
  C11 + He3 <-> N13 + p             [TALYS2, Koning et al. 2023]
  C11 + He3 <-> O14                 [TALYS2, Koning et al. 2023]
  C11 <-> B11                       [Audi et al. 2003]
  C11 + He4 <-> N14 + p             [NACRE, Angulo et al. 1999]
  C11 + He4 <-> O15                 [TALYS2, Koning et al. 2023]
  C11 + H2 <-> C12 + p              [Coc et al. 2012]
  C11 + H2 <-> N13                  [TALYS2, Koning et al. 2023]
  C11 + n <-> C12                   [Rauscher et al. 1994]
  C11 + n <-> He4 + He4 + He4       [Coc et al. 2012]
  C11 + p <-> N12                   [Tang et al. 2003]
  C11 + H3 <-> B10 + He4            [TALYS2, Koning et al. 2023]
  C11 + H3 <-> B11 + He3            [TALYS2, Koning et al. 2023]
  C11 + H3 <-> C12 + H2             [TALYS2, Koning et al. 2023]
  C11 + H3 <-> C13 + p              [TALYS2, Koning et al. 2023]
  C11 + H3 <-> N13 + n              [TALYS2, Koning et al. 2023]
  C11 + H3 <-> N14                  [TALYS2, Koning et al. 2023]
  C12 + He3 <-> C11 + He4           [TALYS2, Koning et al. 2023]
  C12 + He3 <-> N14 + p             [TALYS2, Koning et al. 2023]
  C12 + He3 <-> O15                 [TALYS2, Koning et al. 2023]
  C12 + He4 <-> O16                 [NACRE, Xu et al. 2010, 2011]
  C12 + H2 <-> C13 + p              [TALYS2, Koning et al. 2023]
  C12 + H2 <-> N14                  [TALYS2, Koning et al. 2023]
  C12 + n <-> C13                   [TALYS2, Koning et al. 2023]
  C12 + p <-> N13                   [NACRE, Xu et al. 2010, 2011]
  C12 + H3 <-> B11 + He4            [TALYS2, Koning et al. 2023]
  C12 + H3 <-> C14 + p              [TALYS2, Koning et al. 2023]
  C12 + H3 <-> N14 + n              [TALYS2, Koning et al. 2023]
  C12 + H3 <-> N15                  [TALYS2, Koning et al. 2023]
  C13 + He3 <-> C12 + He4           [TALYS2, Koning et al. 2023]
  C13 + He3 <-> N15 + p             [TALYS2, Koning et al. 2023]
  C13 + He3 <-> O15 + n             [TALYS2, Koning et al. 2023]
  C13 + He3 <-> O16                 [TALYS2, Koning et al. 2023]
  C13 + He4 <-> O16 + n             [NACRE, Xu et al. 2010, 2011]
  C13 + He4 <-> O17                 [TALYS2, Koning et al. 2023]
  C13 + H2 <-> B11 + He4            [TALYS2, Koning et al. 2023]
  C13 + H2 <-> C14 + p              [TALYS2, Koning et al. 2023]
  C13 + H2 <-> N14 + n              [TALYS2, Koning et al. 2023]
  C13 + H2 <-> N15                  [TALYS2, Koning et al. 2023]
  C13 + n <-> C14                   [TALYS2, Koning et al. 2023]
  C13 + p <-> N14                   [NACRE, Xu et al. 2010, 2011]
  C13 + H3 <-> B12 + He4            [TALYS2, Koning et al. 2023]
  C13 + H3 <-> C15 + p              [TALYS2, Koning et al. 2023]
  C13 + H3 <-> N15 + n              [TALYS2, Koning et al. 2023]
  C13 + H3 <-> N16                  [TALYS2, Koning et al. 2023]
  C14 + He3 <-> C13 + He4           [TALYS2, Koning et al. 2023]
  C14 + He3 <-> N16 + p             [TALYS2, Koning et al. 2023]
  C14 + He3 <-> O16 + n             [TALYS2, Koning et al. 2023]
  C14 + He3 <-> O17                 [TALYS2, Koning et al. 2023]
  C14 <-> N14                       [NUBASE2020, Kondev et al. 2021]
  C14 + He4 <-> O18                 [Iliadis et al. 2010]
  C14 + H2 <-> B12 + He4            [TALYS2, Koning et al. 2023]
  C14 + H2 <-> N15 + n              [Kawano et al. 1991]
  C14 + H2 <-> N16                  [TALYS2, Koning et al. 2023]
  C14 + n <-> C15                   [Kawano et al. 1991]
  C14 + p <-> N15                   [Iliadis et al. 2010]
  C14 + H3 <-> N16 + n              [TALYS2, Koning et al. 2023]
  C14 + H3 <-> N17                  [TALYS2, Koning et al. 2023]
  C15 <-> N15                       [Audi et al. 2003]
  C15 + He4 <-> O18 + n             [TALYS2, Koning et al. 2023]
  C15 + He4 <-> O19                 [TALYS2, Koning et al. 2023]
  C15 + n <-> C16                   [TALYS2, Koning et al. 2023]
  C15 + p <-> B12 + He4             [TALYS2, Koning et al. 2023]
  C15 + p <-> C14 + H2              [TALYS2, Koning et al. 2023]
  C15 + p <-> N15 + n               [TALYS2, Koning et al. 2023]
  C15 + p <-> N16                   [TALYS2, Koning et al. 2023]
  C16 <-> N16                       [Audi et al. 2003]
  C9 <-> He4 + He4 + p              [Audi et al. 2003]
  C9 + He4 <-> N12 + p              [Wiescher et al. 1989]
  C9 + He4 <-> O13                  [TALYS2, Koning et al. 2023]
  C9 + H2 <-> C10 + p               [TALYS2, Koning et al. 2023]
  C9 + n <-> B8 + H2                [TALYS2, Koning et al. 2023]
  C9 + n <-> Be7 + He3              [TALYS2, Koning et al. 2023]
  C9 + n <-> C10                    [TALYS2, Koning et al. 2023]
  C9 + H3 <-> B8 + He4              [TALYS2, Koning et al. 2023]
  C9 + H3 <-> C11 + p               [TALYS2, Koning et al. 2023]
  C9 + H3 <-> N12                   [TALYS2, Koning et al. 2023]
  F17 <-> O17                       [Audi et al. 2003]
  F17 + He4 <-> Na21                [TALYS2, Koning et al. 2023]
  F17 + He4 <-> Ne20 + p            [TALYS2, Koning et al. 2023]
  F17 + n <-> F18                   [TALYS2, Koning et al. 2023]
  F17 + n <-> N14 + He4             [NACRE, Angulo et al. 1999]
  F17 + n <-> O17 + p               [TALYS2, Koning et al. 2023]
  F17 + p <-> Ne18                  [Iliadis et al. 2010]
  F18 <-> O18                       [Audi et al. 2003]
  F18 + He4 <-> Na22                [TALYS2, Koning et al. 2023]
  F18 + He4 <-> Ne21 + p            [TALYS2, Koning et al. 2023]
  F18 + n <-> F19                   [TALYS2, Koning et al. 2023]
  F18 + n <-> N15 + He4             [Caughlan& Fowler 1988]
  F18 + n <-> O18 + p               [TALYS2, Koning et al. 2023]
  F18 + p <-> Ne19                  [Iliadis et al. 2010]
  F18 + p <-> O15 + He4             [Iliadis et al. 2010]
  F19 + He4 <-> Na23                [TALYS2, Koning et al. 2023]
  F19 + He4 <-> Ne22 + p            [TALYS2, Koning et al. 2023]
  F19 + n <-> F20                   [TALYS2, Koning et al. 2023]
  F19 + p <-> Ne20                  [NACRE, Angulo et al. 1999]
  F19 + p <-> O16 + He4             [NACRE, Angulo et al. 1999]
  F20 <-> Ne20                      [Audi et al. 2003]
  He3 + He3 <-> He4 + p + p         [NACRE, Xu et al. 2010, 2011]
  He3 + He4 <-> Be7                 [Iliadis et al. 2016]
  He3 + H2 <-> He4 + p              [de Souza et al. 2019]
  He3 + n <-> He4                   [Wagoner 1969]
  He3 + n <-> H3 + p                [Descouvemont et al. 2004]
  He3 + H3 <-> Li6                  [Fukugita& Kajino 1990]
  He3 + H3 <-> He4 + H2             [Caughlan& Fowler 1988]
  He3 + H3 <-> He4 + n + p          [Caughlan& Fowler 1988]
  He6 <-> Li6                       [Audi et al. 2003]
  Li6 + He3 <-> Be7 + H2            [TALYS2, Koning et al. 2023]
  Li6 + He3 <-> He4 + He4 + p       [TALYS2, Koning et al. 2023]
  Li6 + He4 <-> B10                 [Caughlan& Fowler 1988]
  Li6 + H2 <-> Be7 + n              [Malaney& Fowler 1989]
  Li6 + H2 <-> Li7 + p              [Malaney& Fowler 1989]
  Li6 + n <-> Li7                   [Malaney& Fowler 1989]
  Li6 + n <-> H3 + He4              [Caughlan& Fowler 1988]
  Li6 + p <-> Be7                   [NACRE, Xu et al. 2010, 2011]
  Li6 + p <-> He3 + He4             [NACRE, Xu et al. 2010, 2011]
  Li6 + H3 <-> Be9                  [TALYS2, Koning et al. 2023]
  Li6 + H3 <-> Li7 + H2             [TALYS2, Koning et al. 2023]
  Li6 + H3 <-> Li8 + p              [TALYS2, Koning et al. 2023]
  Li6 + H3 <-> He4 + He4 + n        [TALYS2, Koning et al. 2023]
  Li7 + He3 <-> B10                 [TALYS2, Koning et al. 2023]
  Li7 + He3 <-> Be9 + p             [TALYS2, Koning et al. 2023]
  Li7 + He3 <-> Li6 + He4           [TALYS2, Koning et al. 2023]
  Li7 + He3 <-> He4 + He4 + H2      [TALYS2, Koning et al. 2023]
  Li7 + He3 <-> He4 + He4 + n + p   [Caughlan& Fowler 1988 & Malaney& Fowler 1989]
  Li7 + He4 <-> B10 + n             [NACRE, Angulo et al. 1999]
  Li7 + He4 <-> B11                 [NACRE, Xu et al. 2010, 2011]
  Li7 + H2 <-> Be9                  [Coc et al. 2012]
  Li7 + H2 <-> Li8 + p              [Malaney& Fowler 1989]
  Li7 + H2 <-> He4 + He4 + n        [Coc et al. 2012]
  Li7 + n <-> Li8                   [Malaney& Fowler 1989 & Heil et al. 1998]
  Li7 + p <-> He4 + He4             [Descouvemont et al. 2004]
  Li7 + p <-> He4 + He4             [NACRE, Xu et al. 2010, 2011]
  Li7 + H3 <-> Be10                 [TALYS2, Koning et al. 2023]
  Li7 + H3 <-> Be9 + n              [Coc et al. 2012]
  Li7 + H3 <-> He4 + He4 + n + n    [Caughlan& Fowler 1988 & Malaney& Fowler 1989]
  Li8 + He3 <-> B10 + n             [TALYS2, Koning et al. 2023]
  Li8 + He3 <-> B11                 [TALYS2, Koning et al. 2023]
  Li8 + He3 <-> Be10 + p            [TALYS2, Koning et al. 2023]
  Li8 + He3 <-> Be9 + H2            [TALYS2, Koning et al. 2023]
  Li8 + He3 <-> Li7 + He4           [TALYS2, Koning et al. 2023]
  Li8 + He3 <-> He4 + He4 + H3      [TALYS2, Koning et al. 2023]
  Li8 <-> He4 + He4                 [Audi et al. 2003]
  Li8 + He4 <-> B11 + n             [Coc et al. 2012]
  Li8 + He4 <-> B12                 [TALYS2, Koning et al. 2023]
  Li8 + H2 <-> Be10                 [TALYS2, Koning et al. 2023]
  Li8 + H2 <-> Be9 + n              [Balbes et al. 1995]
  Li8 + H2 <-> Li7 + H3             [Hashimoto et al. 2009]
  Li8 + H2 <-> Li9 + p              [Balbes et al. 1995]
  Li8 + n <-> Li9             
curves = abundance_evolution_curves(result_large['evolution'], A_large, names_large, t)

fig, ax = plt.subplots(figsize=(11, 7))
for name in names_large:
    t_vals, vals, color, ls, label = curves[name]
    mask = vals > 1e-40                        # only drop curves below the y-axis floor
    if mask.any():
        ax.plot(t_vals[mask], vals[mask], color=color, linestyle=ls, lw=1.0, label=label)
ax.set_xscale('log'); ax.set_yscale('log')
ax.set_xlabel('Time [s]'); ax.set_ylabel(r'$A_i Y_i$')
ax.set_xlim(1, 1e6); ax.set_ylim(1e-40, 2)
ax.legend(ncol=5, fontsize=6, loc='lower left')
ax.set_title('BBN abundance evolution — large network')
add_temperature_axis(ax, result_large['evolution'], T_ticks_MeV)
plt.tight_layout(); plt.show()
/var/folders/x_/t8nzcr8d7_91h7fdrxdr8b180000gp/T/ipykernel_95861/3126458551.py:15: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown
  plt.tight_layout(); plt.show()