Skip to content

Latest commit

 

History

History
90 lines (62 loc) · 2.2 KB

math_background.md

File metadata and controls

90 lines (62 loc) · 2.2 KB

Mathematical Background

This document summarizes the key equations behind GRLens. We use geometric units throughout, where G = c = 1.

1. Schwarzschild Metric

The Schwarzschild solution describes the spacetime outside a static, spherically symmetric mass M.

$$ ds^2 = -f(r),dt^2 + \frac{dr^2}{f(r)} + r^2,(d\theta^2 + \sin^2\theta,d\phi^2), \qquad f(r) = 1 - \frac{2M}{r} $$

In the equatorial plane ((\theta = \pi/2)), this reduces to:

$$ ds^2 = -f(r),dt^2 + \frac{dr^2}{f(r)} + r^2,d\phi^2 $$

2. Geodesic Equation

The motion of a particle or photon follows a geodesic, defined by

$$ \frac{d^2 x^\mu}{d\lambda^2} + \Gamma^{\mu}_{\alpha\beta} \frac{dx^\alpha}{d\lambda} \frac{dx^\beta}{d\lambda} = 0 $$

where the Christoffel symbols are

$$ \Gamma^{\mu}{\alpha\beta} = \frac{1}{2},g^{\mu\nu} \left( \partial\alpha g_{\nu\beta}

  • \partial_\beta g_{\nu\alpha}
  • \partial_\nu g_{\alpha\beta} \right) $$

The metric tensor $g_{\mu\nu}$ determines how spacetime is curved by mass and energy.

3. Null Geodesics (Light Rays)

Photons move along null paths where the spacetime interval vanishes:

$$ ds^2 = 0 $$

This condition provides a numerical check for the ray-tracing integrator: the quantity ds^2 should remain approximately zero throughout the trajectory.

4. Gravitational Time Dilation

A stationary clock at radius r runs slower than one far from the mass:

$$ \frac{d\tau}{dt} = \sqrt{1 - \frac{2M}{r}} $$

This equation powers the grlens dilation command.

5. Weak-Field Light Deflection

For large r (weak gravity), the bending angle (\alpha) of a photon with impact parameter b approaches

$$ \alpha \approx \frac{4M}{b} $$

This serves as a reference for validating the numerical integrator.

6. Units and Conventions

  • Metric signature: (-,+,+,+)
  • Units: geometric (G = c = 1)
  • Coordinates: Schwarzschild
  • Integration variable (\lambda): affine parameter for null rays

References