# $N$-body simulation in General Relativity

How would one perform an $N$-body simulation in General Relativity (GR) for something like galaxy formation or galactic dynamics?

Suppose one wants to simulate the rotation curve $v(r)$ for galaxies with an $N$-body simulation, and wants to do it in the framework of GR / the Einstein equations.

-
You should be a bit more specific than that. If the conditions are mild than all you need is Newtonian gravity plus some corrections. If the situation is complex (like dynamics of black hole collision, or star collapse) then one needs to discretize full GR equations and this is not simple at all... –  Marek Jul 24 '11 at 7:35
This isn't a standard reply. As for any physical problem there 10 different approaches with increasing complexity possible. When solving hydrogen atom in QM, you can just solve classical electron picture, you can add relativistic effects, you can add spin-interactions, nucleus composition, QFT effects, etc., etc. Most of these are completely irrelevant for standard purposes. That's why I am asking again: what level of complexity are you after? There's no one single correct approach to numerical GR, there are dozens. If you don't know answer to this then you have no question... –  Marek Jul 24 '11 at 7:56
okay, now that is some context. It would be nice if you added this (and more) information to the question. –  Marek Jul 24 '11 at 9:01
The question is still awfully broad. Are you looking for some references on how to enter the field of numerical GR? Looking for references for particular recipes? Looking for known results? –  Willie Wong Jul 24 '11 at 14:08
For galaxy rotation curves, I'm guessing that low order post-Newtonian terms (en.wikipedia.org/wiki/Parameterized_post-Newtonian_formalism) are sufficient as corrections (as pointed out by @Marek). For formation, I would guess that having accurate equations of state would be far more important than any gravitational corrections. –  genneth Jul 26 '11 at 9:04

Light++ It is not open source but you can try to contact the author, Werner Benger.

A few years ago we have access to the source code of 'light++'. Not anymore :(

Light++ Raytracer! (general relativistic raytracing)

Simulation of a Black Hole by Raytracing

About the simulation of galactic close encounters, or a n-body general simulation, under the constraints of GR I found nothing.

"I found nothing" can be read like this "there is not a single software package" because, AFAIK,
no one knows how to apply GR in the computation of planetary and galaxy dynamics (small scale with matter).
The Zeldovich approximation is used in the linearization of GR (with caveats):

and has been successfully applied to describe the large scale clustering in the distribution of galaxy clusters. ..However, within the Zeldovich prescription, after a pancake forms in correspondence of crossing of particle orbits, such particles continue travelling along straight lines, ..

I think that your aim is hopeless because GR is around since 1917 and no one succeeded.
Interesting questions, imo:
How close to the reality are the simulations that are performed with Newtonian codes.
What kind of problems we may expect if we are gonna try to do a simulation code.