This module simulates a homogeneous, isotropic universe under the Friedmann-Lemaitre-Robertson-Walker (FLRW) metric. The governing equation is the first Friedmann equation, here in dimensionless form:
H(a)^2 / H0^2 = Or/a^4 + Om/a^3 + Ok/a^2 + ODE * a^(-3(1+w))
where Or, Om, Ok and ODE are the present-day density parameters for radiation, matter, spatial curvature and dark energy, and w is the dark-energy equation-of-state parameter. The default configuration uses the spatially flat Lambda-CDM concordance model with w = -1.
Default values are taken from the Planck 2018 cosmological analysis (TT,TE,EE+lowE+lensing, Table 2):
- H0 = 67.4 +/- 0.5 km/s/Mpc
- Omega-matter = 0.315 +/- 0.007
- Omega-Lambda = 0.685 (flat closure)
- Omega-radiation = 9.2e-5 (CMB photons + 3 neutrino species)
- w = -1.0 (cosmological constant)
The "SH0ES" preset uses the locally calibrated distance-ladder value H0 = 73.0 km/s/Mpc (Riess et al. 2022), reflecting the ongoing Hubble tension. The "Einstein-de Sitter" preset reproduces the matter-only flat model historically favored before 1998.
The scale factor evolution is integrated in logarithmic time
using a fourth-order Runge-Kutta scheme on
d(ln a)/dt = H(a), which is numerically stable across
many decades of a. The cosmic age integral
t(a) = integral of da' / (a' H(a')) is evaluated with
Simpson quadrature on 4096 sub-intervals between a-min = 1e-8 and
a-max determined by the selected fate. Relative truncation error
is bounded below 1e-5 within the displayed range.
- a - dimensionless scale factor, a(today) = 1
- z - redshift, z = 1/a - 1
- t - cosmic time measured from the Big Bang singularity, in Gyr
- H(t) - Hubble parameter at epoch t, in km/s/Mpc
- q - deceleration parameter q = -a*a'' / (a')^2, where prime denotes d/dt; for a flat model q = Om/2 + Or + ODE*(1 + 3w)/2
- Treats the universe as exactly homogeneous and isotropic on all scales (no structure formation, no perturbation theory).
- Dark energy uses a constant w; quintessence with time-varying w(a) is not modelled.
- Pre-recombination physics is approximated by a single radiation component; neutrino mass and free-streaming are folded into Or.
- Does not solve for inflation, reheating, baryogenesis or nucleosynthesis; pre-BBN epochs are extrapolated from the radiation term only.
- Visual particle field is illustrative of comoving structure; particle positions are not derived from N-body integration.
Default-parameter outputs were cross-checked against published benchmarks:
- Cosmic age 13.791 Gyr (Planck 18 reports 13.787 +/- 0.020 Gyr; agreement within 0.03%).
- Matter-Lambda equality at z = 0.296 (literature: z ~ 0.30).
- Deceleration parameter q0 = -0.527 (literature: -0.53).
- Radiation-matter equality at z = 3423 (literature: z ~ 3400).
- Einstein-de Sitter age reproduces the analytic 2/(3 H0) result to within 0.01%.
Released for educational and non-commercial use on the Astrophyzix Digital Observatory. When citing attribute as:
Redistribution not allowed. Copyright registered © 2026
Maintained by the Astrophyzix editorial board. Cosmological parameters are reviewed against the latest CMB and distance-ladder publications on a 12-month cadence; out-of-cycle updates are issued when consensus values shift by more than 1 sigma. Each release carries a semantic version: MAJOR for equation-of-motion changes, MINOR for parameter or UI changes, PATCH for fixes. Issues and corrections may be submitted via the Astrophyzix contributor channel.
This simulation is a pedagogical instrument. It is not intended for use in primary research, telescope time proposals, or any decision that requires cosmological precision beyond the reported tolerance. Outputs have no statistical uncertainty propagation; slider positions reflect point estimates only.