Numerical Methods in Astrophysics
Graduate Lecture Notes
Practical numerical methods for astrophysical simulations: ODE integration, spectral methods, finite-volume schemes, N-body algorithms, and Monte Carlo techniques. Notes for the Part III course at the University of Cambridge.
These notes cover the core numerical algorithms used in modern astrophysical simulation codes. The emphasis is on understanding why methods work — convergence, stability, conservation properties — not just how to call them.
All examples are implemented in Python. Full notebooks are available on GitHub.
Topics
- ODE integration — Runge-Kutta, symplectic integrators, adaptive timestepping
- Spectral methods — Fourier transforms, Chebyshev polynomials, pseudospectral schemes
- Finite volume methods — conservation laws, Riemann solvers, Godunov schemes
Prerequisites
- Basic calculus and linear algebra
- Python (numpy, scipy, matplotlib)
- Some familiarity with classical mechanics