Skip to content

ladanuzhna/Black-Holes-simulations

Repository files navigation

Black Hole Binary Simulations

Computational physics tools for modeling compact binary systems orbiting supermassive black holes. Computes Keplerian orbits, Schwarzschild geodesics, effective gravitational potentials, and gravitational waveforms.

Modules

Module Description
Orbit.c Solves Kepler's equation (bisection method) for elliptical orbit positions
Effective_Potential.c Newtonian + Schwarzschild-corrected gravitational potential, energy, angular momentum
Geodesic_Orbit.c Integrates geodesic equations in Schwarzschild spacetime using GSL (RKF45)
Gravitational_waveform.c Computes h+ and hx gravitational wave polarizations via harmonic expansion
g1.m MATLAB reference implementation for geodesic orbits

Dependencies

Build

make

Usage

# Run with default parameters (10^6 + 10^5 solar mass binary, e=0.7)
make run

# Custom parameters
./blackhole_sim [M_BH] [m_companion] [eccentricity] [semi_major_axis_AU] [dt_seconds] [total_time_years] [distance_parsecs]

# Example: equal-mass binary, circular orbit
./blackhole_sim 1e6 1e6 0.1 0.05 30 0.01 8000

Output Files (in output/)

File Contents
gravitational_waveform.csv h_cross and h_plus polarizations
Newtonian.csv Newtonian effective potential vs radius
Relativistic.csv Schwarzschild-corrected potential vs radius
xgeodesic.csv, ygeodesic.csv Cartesian geodesic trajectory
geodesic_polar.csv Polar coordinates (r, phi) of geodesic
energy.csv, angular_momentum.csv Orbital constants
time_vector.csv Time steps
pos1.csv Orbital positions

Physics

The simulation progresses through four layers:

  1. Keplerian Orbits - Classical two-body problem via Kepler's equation E - e sin(E) = M
  2. Effective Potential - V_eff = L^2/(2ur^2) - GMm/r with Schwarzschild correction term -GML^2/(c^2 r^3)
  3. Schwarzschild Geodesics - Full GR trajectories: dr/dT and dphi/dT from the Schwarzschild metric
  4. Gravitational Waveforms - Quadrupole formula with harmonic expansion in eccentricity

License

MIT

About

Utilities for creating models of black holes with desirable parameters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors