An N-Body Simulation is a type of computer simulation of planets or stars or other objects and their gravitational interaction. The N-Body Problem is not generally solvable by equation, so simulation is the means to solutions.
A simple N-body simulation might be to calculate the gravitational force on each body and thus its acceleration, then estimate where it will be after a small time increment, then repeat. To handle many bodies, e.g., stars in a simulated Galaxy, methods of optimizing this have been devised.
Some software that also includes Hydrodynamics:
An example simulation is Millennium Run.
A very early N-body simulation was carried out in 1941 by Eric Holmberg using an analog method: light bulbs represented the bodies, using the light as an analog of the Inverse Square Law-force of Gravity, and adjusting the positions of all the light bulbs after measuring light received and determining net forces.