Skip to content

feat(physics): add cosmology module (FLRW model + distances + cosmic …#10

Open
backlundtransform wants to merge 1 commit into
masterfrom
feat/cosmology
Open

feat(physics): add cosmology module (FLRW model + distances + cosmic …#10
backlundtransform wants to merge 1 commit into
masterfrom
feat/cosmology

Conversation

@backlundtransform

Copy link
Copy Markdown
Owner

…time)

New Physics.Cosmology namespace — the next Tier 1 piece of the astro expansion.

  • FlrwModel: a flat/curved FLRW cosmology specified by H0 (km/s/Mpc) and the density parameters (curvature fixed by flatness). Provides:
    • expansion history E(z) and H(z), scale factor, critical density ρ_c = 3H²/8πG;
    • cosmological distances — comoving, transverse-comoving (sinh/sin for curvature), luminosity, angular-diameter — and the distance modulus, via composite-Simpson integration of dz/E(z);
    • cosmic time — age of the universe, age at redshift z, and lookback time, via the scale-factor integral.
    • FlrwModel.Planck2018() factory for the concordance flat ΛCDM parameters.
  • PhysicsConstants: add Megaparsec, CMB temperature, and the Planck mass/length/time.
  • Document the module in Physics/README.md.

Validated against known values: age ≈ 13.8 Gyr, present critical density ≈ 8.5e-27 kg/m³, comoving distance at z=1 ≈ 3402 Mpc, distance modulus ≈ 44.2 at z=1, exact Etherington duality D_L = (1+z)²·D_A. 13 new tests, all passing.

…time)

New Physics.Cosmology namespace — the next Tier 1 piece of the astro expansion.

- FlrwModel: a flat/curved FLRW cosmology specified by H0 (km/s/Mpc) and the
  density parameters (curvature fixed by flatness). Provides:
  * expansion history E(z) and H(z), scale factor, critical density ρ_c = 3H²/8πG;
  * cosmological distances — comoving, transverse-comoving (sinh/sin for curvature),
    luminosity, angular-diameter — and the distance modulus, via composite-Simpson
    integration of dz/E(z);
  * cosmic time — age of the universe, age at redshift z, and lookback time, via
    the scale-factor integral.
  * FlrwModel.Planck2018() factory for the concordance flat ΛCDM parameters.
- PhysicsConstants: add Megaparsec, CMB temperature, and the Planck mass/length/time.
- Document the module in Physics/README.md.

Validated against known values: age ≈ 13.8 Gyr, present critical density
≈ 8.5e-27 kg/m³, comoving distance at z=1 ≈ 3402 Mpc, distance modulus ≈ 44.2 at
z=1, exact Etherington duality D_L = (1+z)²·D_A. 13 new tests, all passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant