Lesson 7 of 15
Critical Density
Critical Density
The critical density ρ_c is the exact matter density required for a spatially flat universe — the boundary between a universe that expands forever and one that eventually recollapses.
The Critical Density Formula
From the Friedmann equation with zero spatial curvature (k = 0):
With H₀ = 70 km/s/Mpc and G = 6.674 × 10⁻¹¹ m³/(kg·s²):
This is incredibly sparse — roughly 5–6 hydrogen atoms per cubic metre.
Converting H₀ to SI
The Hubble constant in SI units:
The Density Parameter Ω
The density parameter normalises matter density to the critical density:
A flat universe has Ω_total = 1. Observations give Ω_m ≈ 0.3 (matter) and Ω_Λ ≈ 0.7 (dark energy).
Your Task
Implement three functions. All constants must be defined inside each function body.
critical_density_kg_m3(H0_km_s_Mpc)— returns ρ_c in kg/m³omega_matter(rho_m_kg_m3, H0_km_s_Mpc)— returns Ω_m = ρ_m / ρ_crho_from_omega(Omega, H0_km_s_Mpc)— returns ρ = Ω × ρ_c in kg/m³
Python runtime loading...
Loading...
Click "Run" to execute your code.