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):

ρc=3H28πG\rho_c = \frac{3H^2}{8\pi G}

With H₀ = 70 km/s/Mpc and G = 6.674 × 10⁻¹¹ m³/(kg·s²):

ρc9.20×1027 kg/m3\rho_c \approx 9.20 \times 10^{-27} \text{ kg/m}^3

This is incredibly sparse — roughly 5–6 hydrogen atoms per cubic metre.

Converting H₀ to SI

The Hubble constant in SI units:

H0=70km/sMpc=70×1033.0857×1022 s12.27×1018 s1H_0 = 70 \frac{\text{km/s}}{\text{Mpc}} = \frac{70 \times 10^3}{3.0857 \times 10^{22}} \text{ s}^{-1} \approx 2.27 \times 10^{-18} \text{ s}^{-1}

The Density Parameter Ω

The density parameter normalises matter density to the critical density:

Ω=ρρc\Omega = \frac{\rho}{\rho_c}

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 / ρ_c
  • rho_from_omega(Omega, H0_km_s_Mpc) — returns ρ = Ω × ρ_c in kg/m³
Python runtime loading...
Loading...
Click "Run" to execute your code.