Neutrinos and relativistic relics
The effective number of neutrino species
$N_{\rm eff} = 3.044$ is usually quoted; here it can also be computed. neff() solves the neutrino decoupling era directly — the coupled evolution of the neutrino and electromagnetic temperatures through $e^+e^-$ annihilation, including the finite-temperature QED corrections to the photon–electron equation of state (qed_pressure, qed_energy_density) and the energy-transfer integrals F_ann and F_scat. The no-oscillation value this yields, $N_{\rm eff} = 3.0428$, is the honest output of the physics implemented; the remaining $+0.001$ from flavour oscillations requires the full quantum-kinetic treatment. Passing N_eff = :derived to cosmology() uses the computed value instead of the standard 3.044.
Distribution functions
The momentum distribution $f_0(q)$ a neutrino is born with enters the physics in exactly one place, the NeutrinoDistribution abstraction, and everything downstream — background density and pressure, and the momentum-resolved free-streaming hierarchy — is built from it.
FermiDirac(ξ) carries a degeneracy parameter $\xi = \mu/T$ (a lepton asymmetry). A nonzero $\xi$ enhances the relativistic energy density by the exact factor
\[\frac{\rho_\nu(\xi)}{\rho_\nu(0)} = 1 + \frac{30}{7}\left(\frac{\xi}{\pi}\right)^2 + \frac{15}{7}\left(\frac{\xi}{\pi}\right)^4,\]
which is what degenerate_Neff_factor returns and what a degenerate species contributes as extra $\Delta N_{\rm eff}$. Set per-species asymmetries with cosmology(ξ_ν = [ξ1, ξ2, ξ3]) or one common value with ξ_ν = 0.1.
TabulatedNu(f0, dlnf0) accepts an arbitrary distribution — non-thermal relics, sterile admixtures — as callables for $f_0(q)$ and $d\ln f_0/d\ln q$.
Massive neutrinos in the perturbations
A massive free-streaming species cannot be described by a fluid: particles of different momenta move at different speeds through the same point, and that velocity dispersion is what erases small-scale structure. The Boltzmann hierarchy is therefore solved per momentum bin (MassiveNuGrid), with the background and perturbation sectors built from the same quadrature so the two are consistent by construction. The warm-dark-matter species of the background page reuses this machinery unchanged.
Reference
Cosmic.F_ann — Method
F_ann(T; flavour = :e)Finite-electron-mass suppression of the annihilation energy-transfer rate, F = rate(me)/rate(0). Tends to 1 for T ≫ me and to 0 once the electrons are gone.
Cosmic.F_scat — Method
F_scat(T; flavour = :e)Finite-electron-mass suppression of the scattering energy-transfer rate, F = rate(m_e)/rate(0), evaluated in the linear-response regime (a small temperature difference between the two baths, which is where the T⁴T⁴(T₁-T₂) form is valid anyway).
Cosmic.N_eff_sm — Method
N_eff_sm()The Standard-Model prediction for N_eff, from neff. Cached: the underlying solve is a several-minute collision-integral computation whose answer never changes.
cosmology(N_eff = :derived)uses this instead of the literature value.
Cosmic.decoupling_history — Method
Compute (or load) the tabulated neutrino decoupling history Tνe(Tγ), Tνμ(Tγ).
Cosmic.neff — Method
neff(; order = 3, T_start = 10.0, T_end = 5e-3)Solve for Neff from scratch: evolve Tγ, Tνe and Tνμ through e± annihilation with the QED-corrected plasma and the weak energy-transfer rates, and read off
N_eff = (ρ_νe + 2 ρ_νμ) / ρ_γ / [ (7/8) (4/11)^{4/3} ]Nothing about the answer is put in. If the weak rates were switched off entirely, the neutrinos would decouple instantaneously and this would return exactly 3.
Cosmic.nu_temperatures — Method
nu_temperatures(T_γ)(Tνe, Tνμ) at photon temperature T_γ (MeV), from the solved decoupling history. This is the non-instantaneous decoupling: no ramp, no (4/11)^{1/3} assumption.
Cosmic.qed_energy_density — Method
qed_energy_density(T; order = 3)δρ = T ∂(δP)/∂T - δP, the thermodynamic identity. Nothing new goes in here: given the pressure, the energy density is fixed.
Cosmic.qed_pressure — Method
qed_pressure(T; order = 3)Total QED interaction pressure of the e±γ plasma, in MeV⁴, for T in MeV. order = 2, 3 or 4 selects how far the expansion in e is carried.
Cosmic.scale_factor_at — Method
scale_factor_at(T_γ)Scale factor (a = 1 today) at photon temperature T_γ (MeV), from the decoupling solve. Normalised by a·T_γ = const after e± annihilation, which is the only epoch in which that statement is exactly true.