physicskit.nuclear#

physicskit.nuclear: nuclear structure, radioactivity, reactions and fission.

Energies are in MeV and lengths in fm throughout (see physicskit.nuclear.units); the formulas follow K. S. Krane, Introductory Nuclear Physics (Wiley, 1988) unless a docstring says otherwise.

These functions used to live in physicskit.particle, which still re-exports every one of its old names.

class physicskit.nuclear.ShellLevel(n, l, j, energy)[source]#

Bases: NamedTuple

A single-particle level \(n\ell_j\) of the shell model.

Parameters:
property degeneracy: int#

Number of nucleons the level holds, \(2j+1\).

Type:

int

energy: float#

Single-particle energy, in MeV.

Type:

float

j: float#

Total angular momentum, \(\ell \pm 1/2\).

Type:

float

l: int#

Orbital angular momentum.

Type:

int

property label: str#

Spectroscopic label, e.g. "1d5/2".

Type:

str

n: int#

Radial quantum number, counting from 1 for each \(\ell\).

Type:

int

property parity: str#

"+" or "-", from \((-1)^\ell\).

Type:

str

physicskit.nuclear.activity(N, decay_constant_)[source]#

Decay rate (activity), \(A=\lambda N\).

Examples

>>> activity(100.0, 0.01)
1.0
physicskit.nuclear.alpha_half_life(Z, A, Q, r0=1.2, V0=35.0)[source]#

Alpha-decay half-life from the Gamow-Gurney-Condon tunnelling model.

\(\lambda = f\,e^{-2G}\), with \(G\) from gamow_factor() for the daughter charge \(Z-2\), the alpha-daughter reduced mass, and the touching-spheres radius \(a = r_0[(A-4)^{1/3} + 4^{1/3}]\). The assault frequency \(f = v/2a\) uses the alpha’s speed inside a well of depth \(V_0\), \(\tfrac12 mv^2 = Q + V_0\) (Krane section 8.4). The model reaches the measured half-lives to within one or two orders of magnitude over a range of more than twenty.

Parameters:
  • Z (int) – Proton and mass numbers of the parent.

  • A (int) – Proton and mass numbers of the parent.

  • Q (float or array_like) – Alpha-decay Q value, in MeV.

  • r0 (float) – Radius parameter, in fm.

  • V0 (float) – Depth of the nuclear well felt by the alpha, in MeV.

Returns:

float or ndarray – Half-life, in seconds.

Examples

>>> t = alpha_half_life(92, 238, 4.2697)
>>> 1e8 < t / 3.156e7 < 1e11  # uranium-238: measured 4.46e9 years
True
physicskit.nuclear.animate_decay_chain_bars(t, populations, labels=None, interval=150, ax=None)[source]#

Animate each species’ population evolving over time in a decay chain.

Parameters:
  • t (ndarray of shape (n_t,)) – Times.

  • populations (ndarray of shape (n_species, n_t)) – Population of each species over time, e.g. from physicskit.nuclear.radioactivity.bateman_decay_chain().

  • labels (sequence of str, optional) – Bar labels; defaults to "species 1", "species 2", …

  • interval (int, default=150) – Delay between frames, in milliseconds.

  • ax (matplotlib.axes.Axes, optional) – Axes to draw into; a new figure is created if omitted.

Returns:

matplotlib.animation.FuncAnimation

Examples

>>> import numpy as np
>>> from physicskit.nuclear.radioactivity import bateman_decay_chain
>>> t = np.linspace(0, 10, 30)
>>> N = bateman_decay_chain(1000.0, [0.5, 0.2], t)
>>> anim = animate_decay_chain_bars(t, N)
>>> anim.__class__.__name__
'FuncAnimation'
physicskit.nuclear.bateman_decay_chain(N0, decay_constants, t)[source]#

Population of every species in a linear radioactive decay chain.

Solves the Bateman equations for a chain \(1\to2\to\cdots\to n\) with decay constants decay_constants (species 1 starts with population N0, all daughters start at zero):

\[N_k(t) = N_0\Big(\prod_{i=1}^{k-1}\lambda_i\Big) \sum_{i=1}^{k}\frac{e^{-\lambda_i t}} {\prod_{j=1,j\neq i}^{k}(\lambda_j-\lambda_i)}\]

with \(N_1(t)=N_0e^{-\lambda_1 t}\). A zero decay constant for the final species represents a stable end product.

Parameters:
  • N0 (float) – Initial population of species 1.

  • decay_constants (sequence of float) – Decay constant of each of the n species in the chain. Must be pairwise distinct among the species actually populated (the closed-form sum divides by lambda_j - lambda_i).

  • t (array_like) – Times at which to evaluate the populations.

Returns:

ndarray of shape (n, len(t)) – Population of each species over time.

Examples

>>> t = np.array([0.0, 1.0])
>>> N = bateman_decay_chain(100.0, [1.0, 2.0], t)
>>> N.shape
(2, 2)
>>> round(float(N[0, 0]), 6)
100.0
physicskit.nuclear.bethe_stopping_power(T, mass=938.27208816, z=1, Z_over_A=0.55509, I_eV=75.0)[source]#

Bethe mass stopping power of a heavy charged particle, in MeV cm^2/g.

Parameters:
  • T (array_like) – Kinetic energy of the projectile, MeV.

  • mass (float, default=M_PROTON) – Projectile rest mass, MeV.

  • z (int, default=1) – Projectile charge number.

  • Z_over_A (float, default=WATER_Z_OVER_A) – Ratio of atomic number to atomic mass of the absorber, mol/g.

  • I_eV (float, default=WATER_I_EV) – Mean excitation energy of the absorber, eV.

Returns:

ndarray or float – \(-\frac{1}{\rho}\frac{dE}{dx}\), MeV cm^2/g.

Notes

Without shell corrections the formula is reliable for protons above a few MeV; below roughly 0.1 MeV in water the logarithm turns negative and the formula no longer applies.

Examples

>>> S = bethe_stopping_power(100.0)  # 100 MeV proton in water
>>> 7.0 < S < 7.5  # NIST PSTAR: 7.29 MeV cm^2/g
True
physicskit.nuclear.binding_energy_per_nucleon(Z, A)[source]#

Binding energy per nucleon, semf_binding_energy(Z, A) / A, in MeV.

Examples

>>> bpn = binding_energy_per_nucleon(26, 56)
>>> 8.0 < bpn < 9.0
True
physicskit.nuclear.bragg_curve(T0, mass=938.27208816, z=1, Z_over_A=0.55509, I_eV=75.0, T_min=1.0, n=2000)[source]#

Stopping power as a function of depth along a particle’s track.

Builds the range-energy relation \(R(T)\) once on a logarithmic grid, so the depth at which the particle has kinetic energy \(T\) is \(x = R(T_0) - R(T)\); the stopping power climbs as \(T\) falls, which is the Bragg peak at the end of the track.

Parameters:
Returns:

  • depth (ndarray) – Depth, g/cm^2, increasing from 0 to the CSDA range.

  • stopping (ndarray) – Mass stopping power at that depth, MeV cm^2/g.

  • energy (ndarray) – Remaining kinetic energy at that depth, MeV.

Examples

>>> depth, S, T = bragg_curve(100.0)
>>> bool(S[-1] > 3 * S[0])  # the peak at the end of the track
True
physicskit.nuclear.breit_wigner_cross_section(E, E_R, Gamma, Gamma_a, Gamma_b, mu, g=1.0)[source]#

Single-level Breit-Wigner cross section for \(a+X\to C^*\to b+Y\), fm^2.

Parameters:
  • E (array_like) – Centre-of-mass kinetic energy, MeV (positive).

  • E_R (float) – Resonance energy, MeV.

  • Gamma (float) – Total width \(\Gamma\), MeV.

  • Gamma_a (float) – Partial widths of the entrance and exit channels, MeV.

  • Gamma_b (float) – Partial widths of the entrance and exit channels, MeV.

  • mu (float) – Reduced mass of the entrance channel, MeV.

  • g (float, default=1.0) – Spin statistical factor, see spin_statistical_factor().

Returns:

ndarray or float

Notes

\(k^2\sigma\) is an exact Lorentzian in \(E\) with full width at half maximum \(\Gamma\), peaking at \(4\pi g\Gamma_a\Gamma_b/\Gamma^2\); for elastic scattering (\(\Gamma_a=\Gamma_b=\Gamma\)) that is the unitarity limit \(4\pi g/k^2\).

Examples

>>> sig = breit_wigner_cross_section(1.0, 1.0, 0.1, 0.1, 0.1, mu=500.0)
>>> k2 = 2 * 500.0 * 1.0 / 197.3269804**2
>>> round(float(sig * k2 / (4 * np.pi)), 12)
1.0
physicskit.nuclear.coulomb_energy(Z, A)[source]#

Coulomb energy of the uniformly charged sphere, \(E_C^0=a_CZ^2/A^{1/3}\), MeV.

Uses \(Z^2\) rather than the \(Z(Z-1)\) of the mass formula, as Bohr and Wheeler did for the classical charged drop.

physicskit.nuclear.critical_z2_over_a()[source]#

The \(Z^2/A=2a_S/a_C\) at which the fission barrier vanishes (\(x=1\)).

Examples

>>> round(critical_z2_over_a(), 1)
50.1
physicskit.nuclear.csda_range(T, mass=938.27208816, z=1, Z_over_A=0.55509, I_eV=75.0, T_min=1.0, n=2000)[source]#

Continuous-slowing-down (CSDA) range, in g/cm^2.

\[R(T) = \int_{T_{\min}}^{T}\frac{dT'}{S(T')}\]

with \(S\) from bethe_stopping_power(), integrated by the trapezoid rule on a logarithmic grid. The part of the track below T_min, where the Bethe formula without shell corrections fails, is left out; for a proton in water it is \(2.5\times10^{-3}\) g/cm^2 below 1 MeV, negligible next to a therapy-scale range.

Parameters:
Returns:

float

Examples

>>> R = csda_range(100.0)  # NIST PSTAR: 7.718 g/cm^2
>>> abs(R - 7.718) / 7.718 < 0.02
True
physicskit.nuclear.decay_constant(half_life_)[source]#

Decay constant from half-life, \(\lambda=\ln2/t_{1/2}\).

Examples

>>> round(decay_constant(np.log(2)), 6)
1.0
physicskit.nuclear.deformation_energy(Z, A, alpha2)[source]#

Energy change of a quadrupole deformation, to second order, MeV.

\[\Delta E = \tfrac25E_S^0\alpha_2^2 - \tfrac15E_C^0\alpha_2^2 = \tfrac25E_S^0(1-x)\alpha_2^2\]

Positive (the sphere is stable) for \(x<1\).

Examples

>>> bool(deformation_energy(92, 236, 0.1) > 0)
True
physicskit.nuclear.deuteron_binding_energy(V0, R)[source]#

Ground-state binding energy of the n-p square well, MeV.

Inverse of deuteron_well_depth().

Raises:

ValueError – If the well is too shallow to hold a bound state, \(V_0R^2<\pi^2\hbar^2/8\mu\).

Examples

>>> round(deuteron_binding_energy(deuteron_well_depth(2.1), 2.1), 6)
2.224566
physicskit.nuclear.deuteron_kappa(B=2.224566)[source]#

Decay constant \(\kappa=\sqrt{2\mu B}/\hbar c\) of the exterior wavefunction, fm^-1.

\(1/\kappa\) is the deuteron’s size scale.

Examples

>>> round(1 / deuteron_kappa(), 2)  # fm
4.32
physicskit.nuclear.deuteron_wavefunction(r, R, B=2.224566)[source]#

Normalised radial wavefunction \(u(r)\) of the square-well deuteron, fm^-1/2.

Normalised so that \(\int_0^\infty u^2\,dr=1\); the radial probability density is \(u^2\).

Parameters:
  • r (array_like) – Radius, fm.

  • R (float) – Well radius, fm (the depth follows from deuteron_well_depth()).

  • B (float, default=DEUTERON_BINDING) – Binding energy, MeV.

Returns:

ndarray

Examples

>>> r = np.linspace(0, 60, 60001)
>>> u = deuteron_wavefunction(r, 2.1)
>>> round(float(np.trapezoid(u**2, r)), 4)
1.0
physicskit.nuclear.deuteron_well_depth(R, B=2.224566)[source]#

Square-well depth \(V_0\) that gives binding energy B for radius R, MeV.

Solves \(k\cot kR=-\kappa\) for the ground state, whose interior wavenumber lies in \(\pi/2<kR<\pi\).

Parameters:
  • R (float) – Well radius, fm.

  • B (float, default=DEUTERON_BINDING) – Binding energy, MeV.

Returns:

float

Examples

>>> round(deuteron_well_depth(2.1), 1)  # Krane quotes "about 35 MeV"
33.7
physicskit.nuclear.fissility(Z, A)[source]#

Bohr-Wheeler fissility \(x=E_C^0/(2E_S^0)=\frac{a_C}{2a_S}\frac{Z^2}{A}\).

Examples

>>> round(float(fissility(92, 236)), 3)
0.716
physicskit.nuclear.fission_barrier(Z, A, order=2)[source]#

Liquid-drop fission barrier from Bohr and Wheeler’s expansion in \(1-x\), MeV.

Parameters:
  • Z (array_like) – Proton and mass numbers.

  • A (array_like) – Proton and mass numbers.

  • order ({1, 2}, default=2) – Keep only the \((1-x)^3\) term, or also the \((1-x)^4\) one.

Returns:

ndarray or float – Barrier height, zero where \(x\ge1\).

Notes

The expansion is exact as \(x\to1\) and overestimates the barrier for lighter nuclei. For the actinides (\(x\approx0.7\)) it gives about 10 MeV against the measured 5-6 MeV; the difference is the shell correction Strutinsky added in 1967.

Examples

>>> round(float(fission_barrier(92, 236)), 1)
9.8
physicskit.nuclear.gamma_recoil_energy(E, A)[source]#

Recoil energy \(E_R=E_\gamma^2/(2Mc^2)\) of a free nucleus, MeV.

Parameters:
  • E (array_like) – Gamma-ray energy, MeV.

  • A (float) – Mass number; \(Mc^2 = A\,u\).

Examples

>>> round(gamma_recoil_energy(14.4125e-3, 57) * 1e9, 3)  # 57Fe, in meV
1.956
physicskit.nuclear.gamow_factor(Z, Q, z=2, mass=3727.379, radius=0.0)[source]#

WKB Gamow factor \(G\) for tunnelling through a Coulomb barrier.

The transmission probability is \(e^{-2G}\) with

\[G = \sqrt{\frac{2mc^2}{Q}}\;zZ\alpha \left[\arccos\sqrt{x} - \sqrt{x(1-x)}\right], \qquad x = \frac{a}{b} = \frac{aQ}{zZ\alpha\hbar c},\]

the WKB integral from the nuclear radius \(a\) to the outer turning point \(b\) (Krane eq. 8.17). For a point nucleus (\(a = 0\)) it is \(G = \pi\eta\), with the Sommerfeld parameter \(\eta = zZ\alpha\sqrt{mc^2/2Q}\).

Parameters:
  • Z (int or array_like) – Charge number of the nucleus left behind (the daughter, for alpha decay).

  • Q (float or array_like) – Kinetic energy of relative motion, in MeV.

  • z (int) – Charge number of the tunnelling particle.

  • mass (float) – Reduced mass of the pair, in MeV.

  • radius (float) – Inner turning point \(a\), in fm.

Returns:

float or ndarray

Raises:

ValueError – If Q is not positive, or radius is at or beyond the outer turning point.

Examples

>>> round(float(gamow_factor(90, 4.27, radius=9.3)), 1)
44.4
physicskit.nuclear.geiger_nuttall_fit(Z, Q, half_life)[source]#

Fit of the Geiger-Nuttall law, \(\log_{10} t_{1/2} = a\,Z/\sqrt{Q} + b\).

Geiger and Nuttall (1911) found the logarithm of an alpha emitter’s decay constant linear in the logarithm of the alpha’s range; in the form it took once tunnelling explained it, \(\log_{10} t_{1/2}\) is linear in \(Z/\sqrt{Q}\), the large-barrier limit of \(2G/\ln 10\).

Parameters:
  • Z (array_like) – Charge numbers (the same convention for every point).

  • Q (array_like) – Q values, in MeV.

  • half_life (array_like) – Half-lives, in any one unit.

Returns:

slope, intercept, r (float) – The least-squares line and its Pearson correlation coefficient.

Examples

>>> Q = [4.27, 4.86, 5.41]  # uranium-238, -234, -232
>>> t = [4.46e9, 2.46e5, 68.9]  # years
>>> slope, intercept, r = geiger_nuttall_fit([90, 90, 90], Q, t)
>>> r > 0.99
True
physicskit.nuclear.half_life(decay_constant_)[source]#

Half-life from decay constant, \(t_{1/2}=\ln2/\lambda\).

Examples

>>> round(half_life(1.0), 6)
0.693147
physicskit.nuclear.impact_parameter(theta, Z1, Z2, E_kin, alpha=0.0072973525692838015)[source]#

Classical Rutherford impact parameter producing scattering angle theta.

\[b(\theta) = \frac{Z_1Z_2\alpha}{2E_{\rm kin}}\cot(\theta/2)\]
Parameters:
  • theta (array_like) – Scattering angle (radians).

  • Z1 (float) – Projectile and target charge numbers.

  • Z2 (float) – Projectile and target charge numbers.

  • E_kin (float) – Projectile kinetic energy.

  • alpha (float, default=ALPHA_FS) – Coupling constant.

Returns:

ndarray or float

Examples

>>> round(float(impact_parameter(np.pi, Z1=1, Z2=79, E_kin=5.0)), 6)
0.0
physicskit.nuclear.internal_conversion_coefficient(multipolarity, E, Z)[source]#

Order-of-magnitude K-shell internal conversion coefficient \(\alpha_K\).

Krane’s unscreened, non-relativistic Born estimate (chapter 10, with \(n=1\) for the K shell):

\[\alpha_K(EL) \approx Z^3\,\frac{L}{L+1}\,\alpha^4 \left(\frac{2m_ec^2}{E}\right)^{L+5/2},\qquad \alpha_K(ML) \approx Z^3\,\alpha^4 \left(\frac{2m_ec^2}{E}\right)^{L+3/2}.\]
Parameters:
  • multipolarity (str) – "E1", "M1", …

  • E (array_like) – Transition energy, MeV (the formula assumes \(E\ll m_ec^2\) but well above the K binding energy).

  • Z (float) – Atomic number.

Returns:

ndarray or float – \(\alpha_K = \lambda_{e,K}/\lambda_\gamma\).

Notes

Screening and relativity are neglected, so for heavy atoms the estimate falls below the tabulated (Dirac-Fock) values by up to an order of magnitude. It does show the trends of the tables: conversion grows as \(Z^3\), falls steeply with energy, and grows with multipole order.

Examples

>>> a1 = internal_conversion_coefficient("E1", 0.1, 50)
>>> a2 = internal_conversion_coefficient("E2", 0.1, 50)
>>> bool(a2 > a1)
True
physicskit.nuclear.last_nucleon_spin_parity(levels, n_nucleons)[source]#

Ground-state \(j^\pi\) given by the last nucleon of an odd-\(A\) nucleus.

Filling the levels in order of energy with \(2j+1\) nucleons each, the paired nucleons couple to zero and the odd one sets the spin and parity of the nucleus (the extreme single-particle model, Krane section 5.1).

Parameters:
Return type:

str

Returns:

str – E.g. "5/2+".

Raises:

ValueError – If n_nucleons < 1, if the levels hold fewer than n_nucleons nucleons, or if the last nucleon’s level is degenerate with its spin-orbit partner (levels computed without spin-orbit), so that \(j\) is undetermined.

Examples

>>> last_nucleon_spin_parity(shell_model_levels(17), 9)  # oxygen-17
'5/2+'
physicskit.nuclear.meson_mass_from_range(range_fm)[source]#

Rest energy of the boson whose exchange gives a force of the given range, MeV.

Inverse of yukawa_range(): \(mc^2=\hbar c/a\).

Parameters:

range_fm (float or array_like) – Range of the force, fm.

Returns:

float or ndarray

Examples

>>> round(meson_mass_from_range(1.4), 1)
140.9
physicskit.nuclear.mossbauer_fraction(E, A, theta_D, T)[source]#

Lamb-Mössbauer recoil-free fraction \(f\) in a Debye solid.

\[f = \exp\!\left\{-\frac{6E_R}{k_B\Theta_D}\left[\frac14 + \left(\frac{T}{\Theta_D}\right)^2\int_0^{\Theta_D/T} \frac{x\,dx}{e^x-1}\right]\right\}\]

the Debye-Waller factor \(e^{-k^2\langle x^2\rangle}\) of the emitting nucleus, with \(E_R\) from gamma_recoil_energy() (Krane, chapter 10; Frauenfelder, The Mössbauer Effect, 1962).

Parameters:
  • E (float) – Gamma-ray energy, MeV.

  • A (float) – Mass number of the emitting nucleus.

  • theta_D (float) – Debye temperature of the lattice, K.

  • T (array_like) – Temperature, K (non-negative).

Returns:

ndarray or float

Notes

At \(T=0\), \(f=\exp(-3E_R/2k_B\Theta_D)\); for \(T\gg\Theta_D\), \(-\ln f\to 6E_RT/(k_B\Theta_D^2)\), the classical equipartition limit.

Examples

>>> round(mossbauer_fraction(14.4125e-3, 57, 470.0, 0.0), 3)  # 57Fe in iron
0.93
physicskit.nuclear.plot_decay_chain(t, populations, labels=None, ax=None)[source]#

Plot each species’ population over time in a radioactive decay chain.

Parameters:
  • t (ndarray of shape (n_t,)) – Times.

  • populations (ndarray of shape (n_species, n_t)) – Population of each species over time, e.g. from physicskit.nuclear.radioactivity.bateman_decay_chain().

  • labels (sequence of str, optional) – Label for each species; defaults to "species 1", "species 2", …

  • ax (matplotlib.axes.Axes, optional) – Axes to draw into; a new figure is created if omitted.

Returns:

  • fig (matplotlib.figure.Figure)

  • ax (matplotlib.axes.Axes)

Examples

>>> import numpy as np
>>> from physicskit.nuclear.radioactivity import bateman_decay_chain
>>> t = np.linspace(0, 10, 50)
>>> N = bateman_decay_chain(1000.0, [0.5, 0.2], t)
>>> fig, ax = plot_decay_chain(t, N, labels=["Parent", "Daughter"])
>>> isinstance(fig, plt.Figure)
True
physicskit.nuclear.q_value(reactant_masses, product_masses)[source]#

Reaction Q-value, \(Q=\sum m_{\rm reactants}-\sum m_{\rm products}\).

A positive Q means the reaction is exothermic (releases energy); a negative Q means it is endothermic and requires that much additional kinetic energy to proceed. Masses (or mass-energies) may be in any consistent unit.

Parameters:
  • reactant_masses (iterable of float) – Masses of the reactants.

  • product_masses (iterable of float) – Masses of the products.

Returns:

float

Examples

>>> round(q_value([2.014102, 3.016049], [4.002602, 1.008665]), 6)  # D + T -> He4 + n
0.018884
physicskit.nuclear.radioactive_decay_number(N0, decay_constant_, t)[source]#

Surviving population, \(N(t)=N_0e^{-\lambda t}\).

Parameters:
  • N0 (float) – Initial population.

  • decay_constant_ – Decay constant \(\lambda\).

  • t (array_like) – Time(s), same units as \(1/\lambda\).

Returns:

ndarray or float

Examples

>>> round(float(radioactive_decay_number(100.0, 1.0, 0.693147)), 4)
50.0
physicskit.nuclear.rutherford_dsigma_domega(theta, Z1, Z2, E_kin, alpha=0.0072973525692838015)[source]#

Rutherford differential cross section, in natural units.

\[\frac{d\sigma}{d\Omega} = \left(\frac{Z_1Z_2\alpha}{4E_{\rm kin}}\right)^2 \frac{1}{\sin^4(\theta/2)}\]
Parameters:
  • theta (array_like) – Scattering angle (radians). theta=0 gives inf – the genuine, integrable-but-divergent small-angle Rutherford behavior.

  • Z1 (float) – Projectile and target charge numbers.

  • Z2 (float) – Projectile and target charge numbers.

  • E_kin (float) – Projectile kinetic energy.

  • alpha (float, default=ALPHA_FS) – Coupling constant (the fine-structure constant, by default).

Returns:

ndarray or float

Examples

>>> import numpy as np
>>> theta = np.array([np.pi / 4, np.pi / 2])
>>> vals = rutherford_dsigma_domega(theta, Z1=1, Z2=79, E_kin=5.0)
>>> ratio = (vals[0] * np.sin(theta[0] / 2) ** 4) / (vals[1] * np.sin(theta[1] / 2) ** 4)
>>> round(float(ratio), 6)
1.0
physicskit.nuclear.semf_binding_energy(Z, A)[source]#

Semi-empirical (Weizsacker) total nuclear binding energy, in MeV.

\[B(Z,A) = a_V A - a_S A^{2/3} - a_C\frac{Z(Z-1)}{A^{1/3}} - a_A\frac{(A-2Z)^2}{A} + \delta(A,Z)\]

with the standard coefficients \(a_V=15.75\), \(a_S=17.8\), \(a_C=0.711\), \(a_A=23.7\) MeV, and the pairing term \(\delta=+a_PA^{-1/2}\) for even-even nuclei, \(\delta=-a_PA^{-1/2}\) for odd-odd nuclei, and \(\delta=0\) for odd-\(A\) nuclei, with \(a_P\approx11.18\) MeV.

Parameters:
  • Z (int) – Atomic (proton) number.

  • A (int) – Mass number.

Returns:

float – Total binding energy, in MeV.

Examples

>>> B = semf_binding_energy(26, 56)  # Iron-56
>>> 8.0 < B / 56 < 9.0
True
physicskit.nuclear.shell_closures(levels, A, min_gap=0.3)[source]#

Nucleon numbers at which a shell closes: the magic numbers.

A shell closes after a level when the next one is more than min_gap times the major-shell spacing \(\hbar\omega = 41A^{-1/3}\) MeV above it. The gaps scale differently with \(A\) from shell to shell, so which closures pass the threshold depends on A and min_gap: the default was tuned for medium-heavy nuclei (\(A \approx 100\)-150), and a light nucleus shows extra subshell gaps while a heavy one can lose the weak closure at 28.

Parameters:
Return type:

list[int]

Returns:

list of int – Cumulative occupation \(\sum(2j+1)\) at each closure.

Examples

>>> shell_closures(shell_model_levels(100, well="oscillator"), 100)[:4]
[2, 8, 20, 40]
physicskit.nuclear.shell_model_levels(A, well='woods_saxon', spin_orbit=None, Z=0, l_max=7, V0=51.0, r0=1.25, a=0.65, lambda_so=0.44, n_grid=500)[source]#

Single-particle levels of a nucleon in the mean field of a nucleus.

The radial equation for \(u(r) = rR(r)\),

\[-\frac{\hbar^2}{2m}u'' + \Big[V(r) + \frac{\hbar^2\ell(\ell+1)}{2mr^2} + V_{\ell s}(r)\,\langle\boldsymbol\ell\cdot\mathbf s\rangle\Big]u = Eu, \qquad u(0) = 0,\]

is solved for each \((\ell, j)\) with NumerovSolver, where \(\langle\boldsymbol\ell\cdot\mathbf s\rangle = [j(j+1) - \ell(\ell+1) - 3/4]/2\).

  • "oscillator": \(V = \tfrac12 m\omega^2 r^2\) with \(\hbar\omega = 41A^{-1/3}\) MeV; levels \((N + 3/2)\hbar\omega\) with \(N = 2(n-1) + \ell \le\) l_max, which close shells at 2, 8, 20, 40, 70, 112.

  • "woods_saxon": \(V = -V_0 f(r)\), \(f = 1/(1 + e^{(r-R)/a})\), \(R = r_0A^{1/3}\), with the Thomas-form spin-orbit term \(V_{\ell s} = \lambda V_0 r_0^2\,\frac{1}{r}\frac{df}{dr}\) (Bohr and Mottelson, Nuclear Structure vol. 1, eq. 2-182). The surface-peaked, attractive \(\ell\cdot s\) force lowers \(j = \ell + 1/2\) and moves the closures to 2, 8, 20, 28, 50, 82, 126 (Krane section 5.1). Only bound levels (\(E < 0\)) are returned.

Parameters:
  • A (int) – Mass number, which sets the size of the well.

  • well (str)

  • spin_orbit (bool | None) – Include the spin-orbit term. Defaults to True for the Woods-Saxon well; the oscillator has no surface for it to act on, and asking for it there raises.

  • Z (int) – Proton number of the nucleus, for a proton. The well is deepened by the symmetry term \(33(N-Z)/A\) MeV (Bohr and Mottelson, eq. 2-182) and the Coulomb potential of the other \(Z-1\) protons, a uniformly charged sphere of radius \(R\), is added. Leave at 0 for a neutron.

  • l_max (int) – Largest orbital angular momentum (and, for the oscillator, the largest major shell \(N\)) included.

  • V0 (float) – Woods-Saxon depth (MeV), radius parameter (fm) and diffuseness (fm).

  • r0 (float) – Woods-Saxon depth (MeV), radius parameter (fm) and diffuseness (fm).

  • a (float) – Woods-Saxon depth (MeV), radius parameter (fm) and diffuseness (fm).

  • lambda_so (float) – Spin-orbit strength \(\lambda\) relative to \(V_0\).

  • n_grid (int) – Radial grid points.

Return type:

list[ShellLevel]

Returns:

list of ShellLevel – Levels sorted by energy.

Raises:

ValueError – If well is unknown or spin_orbit=True with the oscillator.

Examples

>>> levels = shell_model_levels(17)
>>> [lv.label for lv in levels[:4]]
['1s1/2', '1p3/2', '1p1/2', '1d5/2']
physicskit.nuclear.spin_statistical_factor(J, s_a, s_b)[source]#

Statistical factor \(g=(2J+1)/((2s_a+1)(2s_b+1))\).

Parameters:
  • J (float) – Spin of the compound-nucleus resonance.

  • s_a (float) – Spins of the projectile and the target.

  • s_b (float) – Spins of the projectile and the target.

Examples

>>> spin_statistical_factor(0.5, 0.5, 0.0)  # s-wave neutron on an even-even target
1.0
physicskit.nuclear.surface_energy(A)[source]#

Surface energy of the spherical drop, \(E_S^0=a_SA^{2/3}\), MeV.

physicskit.nuclear.weisskopf_rate(multipolarity, E, A)[source]#

Weisskopf single-particle estimate of a gamma-transition rate, 1/s.

Parameters:
  • multipolarity (str) – "E1", "E2", …, "M1", "M2", …

  • E (array_like) – Gamma-ray energy, MeV.

  • A (float) – Mass number; the nuclear radius is \(1.2A^{1/3}\) fm.

Returns:

ndarray or float – Decay constant \(\lambda\) (the mean life is \(1/\lambda\)).

Notes

See the module docstring for the formula. The ratio of successive multipoles of one type is a pure number times \((kR)^2\), so each step up in \(L\) costs a factor of order \(10^{-5}\) to \(10^{-3}\) for MeV gammas.

Examples

>>> round(weisskopf_rate("E1", 1.0, 1.0) / 1e14, 2)
1.03
>>> round(weisskopf_rate("M1", 1.0, 100.0) / 1e13, 2)
5.6
physicskit.nuclear.yukawa_potential(r, g2=1.0, mass=139.57039)[source]#

Yukawa potential \(V(r)=-g^2e^{-r/a}/r\), with \(a=\hbar c/mc^2\).

Parameters:
  • r (array_like) – Separation, fm (positive).

  • g2 (float, default=1.0) – Coupling strength \(g^2\), in MeV fm. With g2 = E2 and mass -> 0 the potential becomes the (attractive) Coulomb one.

  • mass (float, default=M_PION) – Rest energy of the exchanged boson, MeV.

Returns:

ndarray or float – Potential energy, MeV.

Examples

>>> a = yukawa_range()
>>> round(float(yukawa_potential(a) * a / (-1.0 / np.e)), 12)
1.0
physicskit.nuclear.yukawa_range(mass=139.57039)[source]#

Range of a Yukawa force, \(a=\hbar c/(mc^2)\), in fm.

Parameters:

mass (float or array_like, default=M_PION) – Rest energy of the exchanged boson, MeV.

Returns:

float or ndarray

Examples

>>> round(yukawa_range(), 3)  # charged pion
1.414

Constants for nuclear physics in MeV and fm.

Nuclear energies are quoted in MeV and lengths in fm (\(10^{-15}\) m), so \(\hbar c\) and \(e^2/4\pi\varepsilon_0\) are the two numbers that connect them. Values are CODATA 2018 / PDG.

physicskit.nuclear.units.ALPHA_FS = 0.0072973525692838015#

The fine-structure constant, \(\alpha\approx1/137.036\).

Type:

float

physicskit.nuclear.units.AMU = 931.494#

Atomic mass unit in MeV.

Type:

float

physicskit.nuclear.units.E2 = 1.4399645474109544#

\(e^2/4\pi\varepsilon_0 = \alpha\hbar c\) in MeV fm (1.44).

Type:

float

physicskit.nuclear.units.HBARC = 197.3269804#

\(\hbar c\) in MeV fm.

Type:

float

physicskit.nuclear.units.M_ALPHA = 3727.379#

Alpha-particle mass in MeV.

Type:

float

physicskit.nuclear.units.M_ELECTRON = 0.51099895#

Electron mass in MeV.

Type:

float

physicskit.nuclear.units.M_NEUTRON = 939.56542052#

Neutron mass in MeV.

Type:

float

physicskit.nuclear.units.M_NUCLEON = 938.919#

Mean nucleon mass in MeV.

Type:

float

physicskit.nuclear.units.M_PION = 139.57039#

Charged-pion mass in MeV.

Type:

float

physicskit.nuclear.units.M_PROTON = 938.27208816#

Proton mass in MeV.

Type:

float

The radioactive decay law and the Bateman equations for decay chains.

Times are in whatever unit the decay constants are the inverse of.

physicskit.nuclear.radioactivity.activity(N, decay_constant_)[source]#

Decay rate (activity), \(A=\lambda N\).

Examples

>>> activity(100.0, 0.01)
1.0
physicskit.nuclear.radioactivity.bateman_decay_chain(N0, decay_constants, t)[source]#

Population of every species in a linear radioactive decay chain.

Solves the Bateman equations for a chain \(1\to2\to\cdots\to n\) with decay constants decay_constants (species 1 starts with population N0, all daughters start at zero):

\[N_k(t) = N_0\Big(\prod_{i=1}^{k-1}\lambda_i\Big) \sum_{i=1}^{k}\frac{e^{-\lambda_i t}} {\prod_{j=1,j\neq i}^{k}(\lambda_j-\lambda_i)}\]

with \(N_1(t)=N_0e^{-\lambda_1 t}\). A zero decay constant for the final species represents a stable end product.

Parameters:
  • N0 (float) – Initial population of species 1.

  • decay_constants (sequence of float) – Decay constant of each of the n species in the chain. Must be pairwise distinct among the species actually populated (the closed-form sum divides by lambda_j - lambda_i).

  • t (array_like) – Times at which to evaluate the populations.

Returns:

ndarray of shape (n, len(t)) – Population of each species over time.

Examples

>>> t = np.array([0.0, 1.0])
>>> N = bateman_decay_chain(100.0, [1.0, 2.0], t)
>>> N.shape
(2, 2)
>>> round(float(N[0, 0]), 6)
100.0
physicskit.nuclear.radioactivity.decay_constant(half_life_)[source]#

Decay constant from half-life, \(\lambda=\ln2/t_{1/2}\).

Examples

>>> round(decay_constant(np.log(2)), 6)
1.0
physicskit.nuclear.radioactivity.half_life(decay_constant_)[source]#

Half-life from decay constant, \(t_{1/2}=\ln2/\lambda\).

Examples

>>> round(half_life(1.0), 6)
0.693147
physicskit.nuclear.radioactivity.radioactive_decay_number(N0, decay_constant_, t)[source]#

Surviving population, \(N(t)=N_0e^{-\lambda t}\).

Parameters:
  • N0 (float) – Initial population.

  • decay_constant_ – Decay constant \(\lambda\).

  • t (array_like) – Time(s), same units as \(1/\lambda\).

Returns:

ndarray or float

Examples

>>> round(float(radioactive_decay_number(100.0, 1.0, 0.693147)), 4)
50.0

Alpha decay as quantum tunnelling through the Coulomb barrier.

Energies in MeV, lengths in fm, following K. S. Krane, Introductory Nuclear Physics (Wiley, 1988), chapter 8.

physicskit.nuclear.alpha_decay.alpha_half_life(Z, A, Q, r0=1.2, V0=35.0)[source]#

Alpha-decay half-life from the Gamow-Gurney-Condon tunnelling model.

\(\lambda = f\,e^{-2G}\), with \(G\) from gamow_factor() for the daughter charge \(Z-2\), the alpha-daughter reduced mass, and the touching-spheres radius \(a = r_0[(A-4)^{1/3} + 4^{1/3}]\). The assault frequency \(f = v/2a\) uses the alpha’s speed inside a well of depth \(V_0\), \(\tfrac12 mv^2 = Q + V_0\) (Krane section 8.4). The model reaches the measured half-lives to within one or two orders of magnitude over a range of more than twenty.

Parameters:
  • Z (int) – Proton and mass numbers of the parent.

  • A (int) – Proton and mass numbers of the parent.

  • Q (float or array_like) – Alpha-decay Q value, in MeV.

  • r0 (float) – Radius parameter, in fm.

  • V0 (float) – Depth of the nuclear well felt by the alpha, in MeV.

Returns:

float or ndarray – Half-life, in seconds.

Examples

>>> t = alpha_half_life(92, 238, 4.2697)
>>> 1e8 < t / 3.156e7 < 1e11  # uranium-238: measured 4.46e9 years
True
physicskit.nuclear.alpha_decay.gamow_factor(Z, Q, z=2, mass=3727.379, radius=0.0)[source]#

WKB Gamow factor \(G\) for tunnelling through a Coulomb barrier.

The transmission probability is \(e^{-2G}\) with

\[G = \sqrt{\frac{2mc^2}{Q}}\;zZ\alpha \left[\arccos\sqrt{x} - \sqrt{x(1-x)}\right], \qquad x = \frac{a}{b} = \frac{aQ}{zZ\alpha\hbar c},\]

the WKB integral from the nuclear radius \(a\) to the outer turning point \(b\) (Krane eq. 8.17). For a point nucleus (\(a = 0\)) it is \(G = \pi\eta\), with the Sommerfeld parameter \(\eta = zZ\alpha\sqrt{mc^2/2Q}\).

Parameters:
  • Z (int or array_like) – Charge number of the nucleus left behind (the daughter, for alpha decay).

  • Q (float or array_like) – Kinetic energy of relative motion, in MeV.

  • z (int) – Charge number of the tunnelling particle.

  • mass (float) – Reduced mass of the pair, in MeV.

  • radius (float) – Inner turning point \(a\), in fm.

Returns:

float or ndarray

Raises:

ValueError – If Q is not positive, or radius is at or beyond the outer turning point.

Examples

>>> round(float(gamow_factor(90, 4.27, radius=9.3)), 1)
44.4
physicskit.nuclear.alpha_decay.geiger_nuttall_fit(Z, Q, half_life)[source]#

Fit of the Geiger-Nuttall law, \(\log_{10} t_{1/2} = a\,Z/\sqrt{Q} + b\).

Geiger and Nuttall (1911) found the logarithm of an alpha emitter’s decay constant linear in the logarithm of the alpha’s range; in the form it took once tunnelling explained it, \(\log_{10} t_{1/2}\) is linear in \(Z/\sqrt{Q}\), the large-barrier limit of \(2G/\ln 10\).

Parameters:
  • Z (array_like) – Charge numbers (the same convention for every point).

  • Q (array_like) – Q values, in MeV.

  • half_life (array_like) – Half-lives, in any one unit.

Returns:

slope, intercept, r (float) – The least-squares line and its Pearson correlation coefficient.

Examples

>>> Q = [4.27, 4.86, 5.41]  # uranium-238, -234, -232
>>> t = [4.46e9, 2.46e5, 68.9]  # years
>>> slope, intercept, r = geiger_nuttall_fit([90, 90, 90], Q, t)
>>> r > 0.99
True

Nuclear binding energy, reaction Q-values and the nuclear shell model.

Masses and energies here are in MeV, the universal convention for the semi-empirical mass formula’s fitted coefficients; lengths are in fm.

The shell-model formulas follow K. S. Krane, Introductory Nuclear Physics (Wiley, 1988), chapter 5.

class physicskit.nuclear.structure.ShellLevel(n, l, j, energy)[source]#

Bases: NamedTuple

A single-particle level \(n\ell_j\) of the shell model.

Parameters:
property degeneracy: int#

Number of nucleons the level holds, \(2j+1\).

Type:

int

energy: float#

Single-particle energy, in MeV.

Type:

float

j: float#

Total angular momentum, \(\ell \pm 1/2\).

Type:

float

l: int#

Orbital angular momentum.

Type:

int

property label: str#

Spectroscopic label, e.g. "1d5/2".

Type:

str

n: int#

Radial quantum number, counting from 1 for each \(\ell\).

Type:

int

property parity: str#

"+" or "-", from \((-1)^\ell\).

Type:

str

physicskit.nuclear.structure.binding_energy_per_nucleon(Z, A)[source]#

Binding energy per nucleon, semf_binding_energy(Z, A) / A, in MeV.

Examples

>>> bpn = binding_energy_per_nucleon(26, 56)
>>> 8.0 < bpn < 9.0
True
physicskit.nuclear.structure.last_nucleon_spin_parity(levels, n_nucleons)[source]#

Ground-state \(j^\pi\) given by the last nucleon of an odd-\(A\) nucleus.

Filling the levels in order of energy with \(2j+1\) nucleons each, the paired nucleons couple to zero and the odd one sets the spin and parity of the nucleus (the extreme single-particle model, Krane section 5.1).

Parameters:
Return type:

str

Returns:

str – E.g. "5/2+".

Raises:

ValueError – If n_nucleons < 1, if the levels hold fewer than n_nucleons nucleons, or if the last nucleon’s level is degenerate with its spin-orbit partner (levels computed without spin-orbit), so that \(j\) is undetermined.

Examples

>>> last_nucleon_spin_parity(shell_model_levels(17), 9)  # oxygen-17
'5/2+'
physicskit.nuclear.structure.q_value(reactant_masses, product_masses)[source]#

Reaction Q-value, \(Q=\sum m_{\rm reactants}-\sum m_{\rm products}\).

A positive Q means the reaction is exothermic (releases energy); a negative Q means it is endothermic and requires that much additional kinetic energy to proceed. Masses (or mass-energies) may be in any consistent unit.

Parameters:
  • reactant_masses (iterable of float) – Masses of the reactants.

  • product_masses (iterable of float) – Masses of the products.

Returns:

float

Examples

>>> round(q_value([2.014102, 3.016049], [4.002602, 1.008665]), 6)  # D + T -> He4 + n
0.018884
physicskit.nuclear.structure.semf_binding_energy(Z, A)[source]#

Semi-empirical (Weizsacker) total nuclear binding energy, in MeV.

\[B(Z,A) = a_V A - a_S A^{2/3} - a_C\frac{Z(Z-1)}{A^{1/3}} - a_A\frac{(A-2Z)^2}{A} + \delta(A,Z)\]

with the standard coefficients \(a_V=15.75\), \(a_S=17.8\), \(a_C=0.711\), \(a_A=23.7\) MeV, and the pairing term \(\delta=+a_PA^{-1/2}\) for even-even nuclei, \(\delta=-a_PA^{-1/2}\) for odd-odd nuclei, and \(\delta=0\) for odd-\(A\) nuclei, with \(a_P\approx11.18\) MeV.

Parameters:
  • Z (int) – Atomic (proton) number.

  • A (int) – Mass number.

Returns:

float – Total binding energy, in MeV.

Examples

>>> B = semf_binding_energy(26, 56)  # Iron-56
>>> 8.0 < B / 56 < 9.0
True
physicskit.nuclear.structure.shell_closures(levels, A, min_gap=0.3)[source]#

Nucleon numbers at which a shell closes: the magic numbers.

A shell closes after a level when the next one is more than min_gap times the major-shell spacing \(\hbar\omega = 41A^{-1/3}\) MeV above it. The gaps scale differently with \(A\) from shell to shell, so which closures pass the threshold depends on A and min_gap: the default was tuned for medium-heavy nuclei (\(A \approx 100\)-150), and a light nucleus shows extra subshell gaps while a heavy one can lose the weak closure at 28.

Parameters:
Return type:

list[int]

Returns:

list of int – Cumulative occupation \(\sum(2j+1)\) at each closure.

Examples

>>> shell_closures(shell_model_levels(100, well="oscillator"), 100)[:4]
[2, 8, 20, 40]
physicskit.nuclear.structure.shell_model_levels(A, well='woods_saxon', spin_orbit=None, Z=0, l_max=7, V0=51.0, r0=1.25, a=0.65, lambda_so=0.44, n_grid=500)[source]#

Single-particle levels of a nucleon in the mean field of a nucleus.

The radial equation for \(u(r) = rR(r)\),

\[-\frac{\hbar^2}{2m}u'' + \Big[V(r) + \frac{\hbar^2\ell(\ell+1)}{2mr^2} + V_{\ell s}(r)\,\langle\boldsymbol\ell\cdot\mathbf s\rangle\Big]u = Eu, \qquad u(0) = 0,\]

is solved for each \((\ell, j)\) with NumerovSolver, where \(\langle\boldsymbol\ell\cdot\mathbf s\rangle = [j(j+1) - \ell(\ell+1) - 3/4]/2\).

  • "oscillator": \(V = \tfrac12 m\omega^2 r^2\) with \(\hbar\omega = 41A^{-1/3}\) MeV; levels \((N + 3/2)\hbar\omega\) with \(N = 2(n-1) + \ell \le\) l_max, which close shells at 2, 8, 20, 40, 70, 112.

  • "woods_saxon": \(V = -V_0 f(r)\), \(f = 1/(1 + e^{(r-R)/a})\), \(R = r_0A^{1/3}\), with the Thomas-form spin-orbit term \(V_{\ell s} = \lambda V_0 r_0^2\,\frac{1}{r}\frac{df}{dr}\) (Bohr and Mottelson, Nuclear Structure vol. 1, eq. 2-182). The surface-peaked, attractive \(\ell\cdot s\) force lowers \(j = \ell + 1/2\) and moves the closures to 2, 8, 20, 28, 50, 82, 126 (Krane section 5.1). Only bound levels (\(E < 0\)) are returned.

Parameters:
  • A (int) – Mass number, which sets the size of the well.

  • well (str)

  • spin_orbit (bool | None) – Include the spin-orbit term. Defaults to True for the Woods-Saxon well; the oscillator has no surface for it to act on, and asking for it there raises.

  • Z (int) – Proton number of the nucleus, for a proton. The well is deepened by the symmetry term \(33(N-Z)/A\) MeV (Bohr and Mottelson, eq. 2-182) and the Coulomb potential of the other \(Z-1\) protons, a uniformly charged sphere of radius \(R\), is added. Leave at 0 for a neutron.

  • l_max (int) – Largest orbital angular momentum (and, for the oscillator, the largest major shell \(N\)) included.

  • V0 (float) – Woods-Saxon depth (MeV), radius parameter (fm) and diffuseness (fm).

  • r0 (float) – Woods-Saxon depth (MeV), radius parameter (fm) and diffuseness (fm).

  • a (float) – Woods-Saxon depth (MeV), radius parameter (fm) and diffuseness (fm).

  • lambda_so (float) – Spin-orbit strength \(\lambda\) relative to \(V_0\).

  • n_grid (int) – Radial grid points.

Return type:

list[ShellLevel]

Returns:

list of ShellLevel – Levels sorted by energy.

Raises:

ValueError – If well is unknown or spin_orbit=True with the oscillator.

Examples

>>> levels = shell_model_levels(17)
>>> [lv.label for lv in levels[:4]]
['1s1/2', '1p3/2', '1p1/2', '1d5/2']

The range of the nuclear force: Yukawa’s meson-exchange potential.

  • yukawa_potential() – the static potential of a massive exchanged boson, \(V(r)=-g^2e^{-r/a}/r\).

  • yukawa_range() – the range \(a=\hbar/mc\) set by the exchanged mass.

  • meson_mass_from_range() – Yukawa’s (1935) inverse argument: a force of range \(a\) needs a carrier of mass \(\hbar c/a\).

H. Yukawa, “On the interaction of elementary particles. I”, Proc. Phys.-Math. Soc. Japan 17, 48 (1935); Krane, Introductory Nuclear Physics, section 4.5. Energies in MeV, lengths in fm.

physicskit.nuclear.forces.meson_mass_from_range(range_fm)[source]#

Rest energy of the boson whose exchange gives a force of the given range, MeV.

Inverse of yukawa_range(): \(mc^2=\hbar c/a\).

Parameters:

range_fm (float or array_like) – Range of the force, fm.

Returns:

float or ndarray

Examples

>>> round(meson_mass_from_range(1.4), 1)
140.9
physicskit.nuclear.forces.yukawa_potential(r, g2=1.0, mass=139.57039)[source]#

Yukawa potential \(V(r)=-g^2e^{-r/a}/r\), with \(a=\hbar c/mc^2\).

Parameters:
  • r (array_like) – Separation, fm (positive).

  • g2 (float, default=1.0) – Coupling strength \(g^2\), in MeV fm. With g2 = E2 and mass -> 0 the potential becomes the (attractive) Coulomb one.

  • mass (float, default=M_PION) – Rest energy of the exchanged boson, MeV.

Returns:

ndarray or float – Potential energy, MeV.

Examples

>>> a = yukawa_range()
>>> round(float(yukawa_potential(a) * a / (-1.0 / np.e)), 12)
1.0
physicskit.nuclear.forces.yukawa_range(mass=139.57039)[source]#

Range of a Yukawa force, \(a=\hbar c/(mc^2)\), in fm.

Parameters:

mass (float or array_like, default=M_PION) – Rest energy of the exchanged boson, MeV.

Returns:

float or ndarray

Examples

>>> round(yukawa_range(), 3)  # charged pion
1.414

The deuteron as a bound neutron-proton pair in a square well.

Bethe and Peierls (1935) showed that the deuteron’s small binding energy alone fixes most of its properties: the wavefunction outside the short-range force is \(u(r)\propto e^{-\kappa r}\) with \(\kappa=\sqrt{2\mu B}/\hbar\), so the deuteron is far larger than the range of the force. With an attractive square well of depth \(V_0\) and radius \(R\) (Krane, Introductory Nuclear Physics, section 4.2),

\[\begin{split}u(r) = \begin{cases} A\sin kr & r<R \\ Ce^{-\kappa r} & r>R\end{cases}, \qquad k=\frac{\sqrt{2\mu(V_0-B)}}{\hbar}, \qquad k\cot kR = -\kappa .\end{split}\]

H. A. Bethe and R. Peierls, “Quantum theory of the diplon”, Proc. R. Soc. A 148, 146 (1935). Energies in MeV, lengths in fm.

physicskit.nuclear.deuteron.DEUTERON_BINDING = 2.224566#

Measured deuteron binding energy, MeV.

Type:

float

physicskit.nuclear.deuteron.MU_NP = 469.45915447919396#

Neutron-proton reduced mass, MeV.

Type:

float

physicskit.nuclear.deuteron.deuteron_binding_energy(V0, R)[source]#

Ground-state binding energy of the n-p square well, MeV.

Inverse of deuteron_well_depth().

Raises:

ValueError – If the well is too shallow to hold a bound state, \(V_0R^2<\pi^2\hbar^2/8\mu\).

Examples

>>> round(deuteron_binding_energy(deuteron_well_depth(2.1), 2.1), 6)
2.224566
physicskit.nuclear.deuteron.deuteron_kappa(B=2.224566)[source]#

Decay constant \(\kappa=\sqrt{2\mu B}/\hbar c\) of the exterior wavefunction, fm^-1.

\(1/\kappa\) is the deuteron’s size scale.

Examples

>>> round(1 / deuteron_kappa(), 2)  # fm
4.32
physicskit.nuclear.deuteron.deuteron_wavefunction(r, R, B=2.224566)[source]#

Normalised radial wavefunction \(u(r)\) of the square-well deuteron, fm^-1/2.

Normalised so that \(\int_0^\infty u^2\,dr=1\); the radial probability density is \(u^2\).

Parameters:
  • r (array_like) – Radius, fm.

  • R (float) – Well radius, fm (the depth follows from deuteron_well_depth()).

  • B (float, default=DEUTERON_BINDING) – Binding energy, MeV.

Returns:

ndarray

Examples

>>> r = np.linspace(0, 60, 60001)
>>> u = deuteron_wavefunction(r, 2.1)
>>> round(float(np.trapezoid(u**2, r)), 4)
1.0
physicskit.nuclear.deuteron.deuteron_well_depth(R, B=2.224566)[source]#

Square-well depth \(V_0\) that gives binding energy B for radius R, MeV.

Solves \(k\cot kR=-\kappa\) for the ground state, whose interior wavenumber lies in \(\pi/2<kR<\pi\).

Parameters:
  • R (float) – Well radius, fm.

  • B (float, default=DEUTERON_BINDING) – Binding energy, MeV.

Returns:

float

Examples

>>> round(deuteron_well_depth(2.1), 1)  # Krane quotes "about 35 MeV"
33.7

Rutherford scattering off a point Coulomb charge.

Natural units (\(\hbar=c=1\)): the coupling is the dimensionless fine-structure constant, and lengths come out in inverse units of E_kin.

physicskit.nuclear.scattering.impact_parameter(theta, Z1, Z2, E_kin, alpha=0.0072973525692838015)[source]#

Classical Rutherford impact parameter producing scattering angle theta.

\[b(\theta) = \frac{Z_1Z_2\alpha}{2E_{\rm kin}}\cot(\theta/2)\]
Parameters:
  • theta (array_like) – Scattering angle (radians).

  • Z1 (float) – Projectile and target charge numbers.

  • Z2 (float) – Projectile and target charge numbers.

  • E_kin (float) – Projectile kinetic energy.

  • alpha (float, default=ALPHA_FS) – Coupling constant.

Returns:

ndarray or float

Examples

>>> round(float(impact_parameter(np.pi, Z1=1, Z2=79, E_kin=5.0)), 6)
0.0
physicskit.nuclear.scattering.rutherford_dsigma_domega(theta, Z1, Z2, E_kin, alpha=0.0072973525692838015)[source]#

Rutherford differential cross section, in natural units.

\[\frac{d\sigma}{d\Omega} = \left(\frac{Z_1Z_2\alpha}{4E_{\rm kin}}\right)^2 \frac{1}{\sin^4(\theta/2)}\]
Parameters:
  • theta (array_like) – Scattering angle (radians). theta=0 gives inf – the genuine, integrable-but-divergent small-angle Rutherford behavior.

  • Z1 (float) – Projectile and target charge numbers.

  • Z2 (float) – Projectile and target charge numbers.

  • E_kin (float) – Projectile kinetic energy.

  • alpha (float, default=ALPHA_FS) – Coupling constant (the fine-structure constant, by default).

Returns:

ndarray or float

Examples

>>> import numpy as np
>>> theta = np.array([np.pi / 4, np.pi / 2])
>>> vals = rutherford_dsigma_domega(theta, Z1=1, Z2=79, E_kin=5.0)
>>> ratio = (vals[0] * np.sin(theta[0] / 2) ** 4) / (vals[1] * np.sin(theta[1] / 2) ** 4)
>>> round(float(ratio), 6)
1.0

Gamma decay: Weisskopf estimates, internal conversion and the Mössbauer effect.

Weisskopf’s estimate takes one proton in a uniform sphere of radius \(R=1.2A^{1/3}\) fm (Krane, Introductory Nuclear Physics, chapter 10):

\[\begin{split}\lambda(\sigma L) = \frac{2(L+1)}{L[(2L+1)!!]^2}\,\alpha c\,k^{2L+1}\times \begin{cases} \left(\frac{3}{L+3}\right)^2 R^{2L} & \sigma=E\\[4pt] 10\left(\frac{\hbar}{m_pc}\right)^2\left(\frac{3}{L+2}\right)^2 R^{2L-2} & \sigma=M \end{cases}\end{split}\]

with \(k=E/\hbar c\); the factor 10 stands for \((\mu_p-1/(L+1))^2\). With \(E\) in MeV this gives Krane’s table, \(\lambda(E1)=1.0\times10^{14}A^{2/3}E^3\) and \(\lambda(M1)=5.6\times10^{13}E^3\) per second.

V. F. Weisskopf, “Radiative transition probabilities in nuclei”, Phys. Rev. 83, 1073 (1951); R. L. Mössbauer, “Kernresonanzfluoreszenz von Gammastrahlung in Ir191”, Z. Phys. 151, 124 (1958); W. E. Lamb, “Capture of neutrons by atoms in a crystal”, Phys. Rev. 55, 190 (1939). Energies in MeV, temperatures in K.

physicskit.nuclear.gamma.K_B_MEV = 8.617333262e-11#

Boltzmann constant in MeV/K.

Type:

float

physicskit.nuclear.gamma.gamma_recoil_energy(E, A)[source]#

Recoil energy \(E_R=E_\gamma^2/(2Mc^2)\) of a free nucleus, MeV.

Parameters:
  • E (array_like) – Gamma-ray energy, MeV.

  • A (float) – Mass number; \(Mc^2 = A\,u\).

Examples

>>> round(gamma_recoil_energy(14.4125e-3, 57) * 1e9, 3)  # 57Fe, in meV
1.956
physicskit.nuclear.gamma.internal_conversion_coefficient(multipolarity, E, Z)[source]#

Order-of-magnitude K-shell internal conversion coefficient \(\alpha_K\).

Krane’s unscreened, non-relativistic Born estimate (chapter 10, with \(n=1\) for the K shell):

\[\alpha_K(EL) \approx Z^3\,\frac{L}{L+1}\,\alpha^4 \left(\frac{2m_ec^2}{E}\right)^{L+5/2},\qquad \alpha_K(ML) \approx Z^3\,\alpha^4 \left(\frac{2m_ec^2}{E}\right)^{L+3/2}.\]
Parameters:
  • multipolarity (str) – "E1", "M1", …

  • E (array_like) – Transition energy, MeV (the formula assumes \(E\ll m_ec^2\) but well above the K binding energy).

  • Z (float) – Atomic number.

Returns:

ndarray or float – \(\alpha_K = \lambda_{e,K}/\lambda_\gamma\).

Notes

Screening and relativity are neglected, so for heavy atoms the estimate falls below the tabulated (Dirac-Fock) values by up to an order of magnitude. It does show the trends of the tables: conversion grows as \(Z^3\), falls steeply with energy, and grows with multipole order.

Examples

>>> a1 = internal_conversion_coefficient("E1", 0.1, 50)
>>> a2 = internal_conversion_coefficient("E2", 0.1, 50)
>>> bool(a2 > a1)
True
physicskit.nuclear.gamma.mossbauer_fraction(E, A, theta_D, T)[source]#

Lamb-Mössbauer recoil-free fraction \(f\) in a Debye solid.

\[f = \exp\!\left\{-\frac{6E_R}{k_B\Theta_D}\left[\frac14 + \left(\frac{T}{\Theta_D}\right)^2\int_0^{\Theta_D/T} \frac{x\,dx}{e^x-1}\right]\right\}\]

the Debye-Waller factor \(e^{-k^2\langle x^2\rangle}\) of the emitting nucleus, with \(E_R\) from gamma_recoil_energy() (Krane, chapter 10; Frauenfelder, The Mössbauer Effect, 1962).

Parameters:
  • E (float) – Gamma-ray energy, MeV.

  • A (float) – Mass number of the emitting nucleus.

  • theta_D (float) – Debye temperature of the lattice, K.

  • T (array_like) – Temperature, K (non-negative).

Returns:

ndarray or float

Notes

At \(T=0\), \(f=\exp(-3E_R/2k_B\Theta_D)\); for \(T\gg\Theta_D\), \(-\ln f\to 6E_RT/(k_B\Theta_D^2)\), the classical equipartition limit.

Examples

>>> round(mossbauer_fraction(14.4125e-3, 57, 470.0, 0.0), 3)  # 57Fe in iron
0.93
physicskit.nuclear.gamma.weisskopf_rate(multipolarity, E, A)[source]#

Weisskopf single-particle estimate of a gamma-transition rate, 1/s.

Parameters:
  • multipolarity (str) – "E1", "E2", …, "M1", "M2", …

  • E (array_like) – Gamma-ray energy, MeV.

  • A (float) – Mass number; the nuclear radius is \(1.2A^{1/3}\) fm.

Returns:

ndarray or float – Decay constant \(\lambda\) (the mean life is \(1/\lambda\)).

Notes

See the module docstring for the formula. The ratio of successive multipoles of one type is a pure number times \((kR)^2\), so each step up in \(L\) costs a factor of order \(10^{-5}\) to \(10^{-3}\) for MeV gammas.

Examples

>>> round(weisskopf_rate("E1", 1.0, 1.0) / 1e14, 2)
1.03
>>> round(weisskopf_rate("M1", 1.0, 100.0) / 1e13, 2)
5.6

Resonant nuclear reactions: the Breit-Wigner formula.

\[\sigma(E) = \frac{\pi}{k^2}\,g\, \frac{\Gamma_a\Gamma_b}{(E-E_R)^2+\Gamma^2/4}, \qquad k=\frac{\sqrt{2\mu E}}{\hbar}\]

G. Breit and E. Wigner, “Capture of slow neutrons”, Phys. Rev. 49, 519 (1936); Krane, Introductory Nuclear Physics, section 11.10. Energies in MeV (centre-of-mass kinetic energy), cross sections in fm^2 (1 b = 100 fm^2).

physicskit.nuclear.reactions.breit_wigner_cross_section(E, E_R, Gamma, Gamma_a, Gamma_b, mu, g=1.0)[source]#

Single-level Breit-Wigner cross section for \(a+X\to C^*\to b+Y\), fm^2.

Parameters:
  • E (array_like) – Centre-of-mass kinetic energy, MeV (positive).

  • E_R (float) – Resonance energy, MeV.

  • Gamma (float) – Total width \(\Gamma\), MeV.

  • Gamma_a (float) – Partial widths of the entrance and exit channels, MeV.

  • Gamma_b (float) – Partial widths of the entrance and exit channels, MeV.

  • mu (float) – Reduced mass of the entrance channel, MeV.

  • g (float, default=1.0) – Spin statistical factor, see spin_statistical_factor().

Returns:

ndarray or float

Notes

\(k^2\sigma\) is an exact Lorentzian in \(E\) with full width at half maximum \(\Gamma\), peaking at \(4\pi g\Gamma_a\Gamma_b/\Gamma^2\); for elastic scattering (\(\Gamma_a=\Gamma_b=\Gamma\)) that is the unitarity limit \(4\pi g/k^2\).

Examples

>>> sig = breit_wigner_cross_section(1.0, 1.0, 0.1, 0.1, 0.1, mu=500.0)
>>> k2 = 2 * 500.0 * 1.0 / 197.3269804**2
>>> round(float(sig * k2 / (4 * np.pi)), 12)
1.0
physicskit.nuclear.reactions.spin_statistical_factor(J, s_a, s_b)[source]#

Statistical factor \(g=(2J+1)/((2s_a+1)(2s_b+1))\).

Parameters:
  • J (float) – Spin of the compound-nucleus resonance.

  • s_a (float) – Spins of the projectile and the target.

  • s_b (float) – Spins of the projectile and the target.

Examples

>>> spin_statistical_factor(0.5, 0.5, 0.0)  # s-wave neutron on an even-even target
1.0

The liquid-drop theory of fission of Bohr and Wheeler (1939).

A charged liquid drop deformed into a spheroid with \(R(\theta)=R_0[1+\alpha_2P_2(\cos\theta)]\) gains surface energy and loses Coulomb energy (Bohr and Wheeler, eq. 9):

\[E_S = E_S^0\left(1+\tfrac25\alpha_2^2\right),\qquad E_C = E_C^0\left(1-\tfrac15\alpha_2^2\right),\]

so the sphere is stable only while the fissility \(x=E_C^0/2E_S^0<1\), i.e. while \(Z^2/A<2a_S/a_C\approx50\). For \(x\) near 1 the saddle-point height above the sphere is (their eq. 19)

\[\frac{E_f}{E_S^0} = \frac{98}{135}(1-x)^3 - \frac{11368}{34425}(1-x)^4 + \cdots\]

[check] The two coefficients and the equation number were written from memory and have not been checked against the 1939 paper.

N. Bohr and J. A. Wheeler, “The mechanism of nuclear fission”, Phys. Rev. 56, 426 (1939). Uses the liquid-drop coefficients of physicskit.nuclear.structure.semf_binding_energy(). Energies in MeV.

physicskit.nuclear.fission.coulomb_energy(Z, A)[source]#

Coulomb energy of the uniformly charged sphere, \(E_C^0=a_CZ^2/A^{1/3}\), MeV.

Uses \(Z^2\) rather than the \(Z(Z-1)\) of the mass formula, as Bohr and Wheeler did for the classical charged drop.

physicskit.nuclear.fission.critical_z2_over_a()[source]#

The \(Z^2/A=2a_S/a_C\) at which the fission barrier vanishes (\(x=1\)).

Examples

>>> round(critical_z2_over_a(), 1)
50.1
physicskit.nuclear.fission.deformation_energy(Z, A, alpha2)[source]#

Energy change of a quadrupole deformation, to second order, MeV.

\[\Delta E = \tfrac25E_S^0\alpha_2^2 - \tfrac15E_C^0\alpha_2^2 = \tfrac25E_S^0(1-x)\alpha_2^2\]

Positive (the sphere is stable) for \(x<1\).

Examples

>>> bool(deformation_energy(92, 236, 0.1) > 0)
True
physicskit.nuclear.fission.fissility(Z, A)[source]#

Bohr-Wheeler fissility \(x=E_C^0/(2E_S^0)=\frac{a_C}{2a_S}\frac{Z^2}{A}\).

Examples

>>> round(float(fissility(92, 236)), 3)
0.716
physicskit.nuclear.fission.fission_barrier(Z, A, order=2)[source]#

Liquid-drop fission barrier from Bohr and Wheeler’s expansion in \(1-x\), MeV.

Parameters:
  • Z (array_like) – Proton and mass numbers.

  • A (array_like) – Proton and mass numbers.

  • order ({1, 2}, default=2) – Keep only the \((1-x)^3\) term, or also the \((1-x)^4\) one.

Returns:

ndarray or float – Barrier height, zero where \(x\ge1\).

Notes

The expansion is exact as \(x\to1\) and overestimates the barrier for lighter nuclei. For the actinides (\(x\approx0.7\)) it gives about 10 MeV against the measured 5-6 MeV; the difference is the shell correction Strutinsky added in 1967.

Examples

>>> round(float(fission_barrier(92, 236)), 1)
9.8
physicskit.nuclear.fission.surface_energy(A)[source]#

Surface energy of the spherical drop, \(E_S^0=a_SA^{2/3}\), MeV.

Energy loss of fast charged particles in matter: the Bethe formula.

  • bethe_stopping_power() – the Bethe (1930) mass stopping power \(S=-\frac{1}{\rho}\frac{dE}{dx}\), in MeV cm^2/g.

  • csda_range() – the continuous-slowing-down range \(R(E)=\int dE/S\), in g/cm^2.

  • bragg_curve() – stopping power against depth, peaking just before the particle stops (the Bragg peak).

The formula is the one in the Particle Data Group review “Passage of particles through matter” (R. L. Workman et al., PTEP 2022, 083C01, eq. 34.5), without the density-effect and shell corrections, which matter only above a few GeV and below a few MeV respectively:

\[S = K z^2\frac{Z}{A}\frac{1}{\beta^2}\left[\frac12 \ln\frac{2m_ec^2\beta^2\gamma^2T_{\max}}{I^2} - \beta^2\right], \qquad T_{\max} = \frac{2m_ec^2\beta^2\gamma^2}{1+2\gamma m_e/M+(m_e/M)^2},\]

with \(K=4\pi N_Ar_e^2m_ec^2=0.307075\) MeV mol^-1 cm^2. Energies are kinetic energies in MeV.

physicskit.nuclear.stopping.K_BETHE = 0.307075#

\(4\pi N_Ar_e^2m_ec^2\) in MeV mol^-1 cm^2 (PDG).

Type:

float

physicskit.nuclear.stopping.WATER_I_EV = 75.0#

Mean excitation energy of liquid water, eV (ICRU 73 / PDG).

Type:

float

physicskit.nuclear.stopping.WATER_Z_OVER_A = 0.55509#

\(\langle Z/A\rangle\) of liquid water, mol/g (PDG).

Type:

float

physicskit.nuclear.stopping.bethe_stopping_power(T, mass=938.27208816, z=1, Z_over_A=0.55509, I_eV=75.0)[source]#

Bethe mass stopping power of a heavy charged particle, in MeV cm^2/g.

Parameters:
  • T (array_like) – Kinetic energy of the projectile, MeV.

  • mass (float, default=M_PROTON) – Projectile rest mass, MeV.

  • z (int, default=1) – Projectile charge number.

  • Z_over_A (float, default=WATER_Z_OVER_A) – Ratio of atomic number to atomic mass of the absorber, mol/g.

  • I_eV (float, default=WATER_I_EV) – Mean excitation energy of the absorber, eV.

Returns:

ndarray or float – \(-\frac{1}{\rho}\frac{dE}{dx}\), MeV cm^2/g.

Notes

Without shell corrections the formula is reliable for protons above a few MeV; below roughly 0.1 MeV in water the logarithm turns negative and the formula no longer applies.

Examples

>>> S = bethe_stopping_power(100.0)  # 100 MeV proton in water
>>> 7.0 < S < 7.5  # NIST PSTAR: 7.29 MeV cm^2/g
True
physicskit.nuclear.stopping.bragg_curve(T0, mass=938.27208816, z=1, Z_over_A=0.55509, I_eV=75.0, T_min=1.0, n=2000)[source]#

Stopping power as a function of depth along a particle’s track.

Builds the range-energy relation \(R(T)\) once on a logarithmic grid, so the depth at which the particle has kinetic energy \(T\) is \(x = R(T_0) - R(T)\); the stopping power climbs as \(T\) falls, which is the Bragg peak at the end of the track.

Parameters:
Returns:

  • depth (ndarray) – Depth, g/cm^2, increasing from 0 to the CSDA range.

  • stopping (ndarray) – Mass stopping power at that depth, MeV cm^2/g.

  • energy (ndarray) – Remaining kinetic energy at that depth, MeV.

Examples

>>> depth, S, T = bragg_curve(100.0)
>>> bool(S[-1] > 3 * S[0])  # the peak at the end of the track
True
physicskit.nuclear.stopping.csda_range(T, mass=938.27208816, z=1, Z_over_A=0.55509, I_eV=75.0, T_min=1.0, n=2000)[source]#

Continuous-slowing-down (CSDA) range, in g/cm^2.

\[R(T) = \int_{T_{\min}}^{T}\frac{dT'}{S(T')}\]

with \(S\) from bethe_stopping_power(), integrated by the trapezoid rule on a logarithmic grid. The part of the track below T_min, where the Bethe formula without shell corrections fails, is left out; for a proton in water it is \(2.5\times10^{-3}\) g/cm^2 below 1 MeV, negligible next to a therapy-scale range.

Parameters:
Returns:

float

Examples

>>> R = csda_range(100.0)  # NIST PSTAR: 7.718 g/cm^2
>>> abs(R - 7.718) / 7.718 < 0.02
True

Plots and animations for physicskit.nuclear.

Every function returns its figure (or animation) rather than calling show().

physicskit.nuclear.visualizers.animate_decay_chain_bars(t, populations, labels=None, interval=150, ax=None)[source]#

Animate each species’ population evolving over time in a decay chain.

Parameters:
  • t (ndarray of shape (n_t,)) – Times.

  • populations (ndarray of shape (n_species, n_t)) – Population of each species over time, e.g. from physicskit.nuclear.radioactivity.bateman_decay_chain().

  • labels (sequence of str, optional) – Bar labels; defaults to "species 1", "species 2", …

  • interval (int, default=150) – Delay between frames, in milliseconds.

  • ax (matplotlib.axes.Axes, optional) – Axes to draw into; a new figure is created if omitted.

Returns:

matplotlib.animation.FuncAnimation

Examples

>>> import numpy as np
>>> from physicskit.nuclear.radioactivity import bateman_decay_chain
>>> t = np.linspace(0, 10, 30)
>>> N = bateman_decay_chain(1000.0, [0.5, 0.2], t)
>>> anim = animate_decay_chain_bars(t, N)
>>> anim.__class__.__name__
'FuncAnimation'
physicskit.nuclear.visualizers.plot_decay_chain(t, populations, labels=None, ax=None)[source]#

Plot each species’ population over time in a radioactive decay chain.

Parameters:
  • t (ndarray of shape (n_t,)) – Times.

  • populations (ndarray of shape (n_species, n_t)) – Population of each species over time, e.g. from physicskit.nuclear.radioactivity.bateman_decay_chain().

  • labels (sequence of str, optional) – Label for each species; defaults to "species 1", "species 2", …

  • ax (matplotlib.axes.Axes, optional) – Axes to draw into; a new figure is created if omitted.

Returns:

  • fig (matplotlib.figure.Figure)

  • ax (matplotlib.axes.Axes)

Examples

>>> import numpy as np
>>> from physicskit.nuclear.radioactivity import bateman_decay_chain
>>> t = np.linspace(0, 10, 50)
>>> N = bateman_decay_chain(1000.0, [0.5, 0.2], t)
>>> fig, ax = plot_decay_chain(t, N, labels=["Parent", "Daughter"])
>>> isinstance(fig, plt.Figure)
True