Computational Astrophysics: N-Body Exercise

Example: Stardard vs Advanced? We should change the structure of this lab.

Background

It is a remarkable and sobering thought that it is impossible to solve the equations for three or more bodies flying around in space under the influence of their mutual gravity. In special cases you can make useful approximations, but in general, the problem is insoluble.

This is a major menace in astronomy, which after all is the study of large numbers of objects flying around in space under the influence of gravity.

In the late 18th century, a partial solution was found. While it is impossible to calculate the orbits exactly, you can calculate a good approximation valid for a short period of time. You start by putting all your bodies in their starting positions. You then work out the gravitational force on each object at this time. Using this force, you work out the acceleration on each body. Using this acceleration, you work out the velocity of each body. Using this velocity, you work out where each body will be a short time in the future. You move each body to its new position. You then go through the whole process again, starting at the new position.

In this slow, tedious way you can calculate trajectories for even the most complex situations, though thousands of calculations are required. In the past, teams of students would sit at rows of desks, each calculating one tiny stage over and over again, these were the original computers. Though it sounds like a monstrous waste of time, the rewards were great  –  it was from calculations such as these that the planet Neptune was discovered.

Luckily for you, computers have evolved from rooms full of hapless students into the silicon chip-based devices we know and love. They are perfectly suited for this job; computers love nothing more than doing simple calculations over and over again. In this exercise, you will use a computer program that will do in seconds the same calculations that took some of the greatest astronomers of the 19th and 20th centuries most of their lives.