# Simulating how comets travel with Newtonian physics

Imagine that a comet enters the solar system from Oort cloud, what concepts and laws does one need to take into consideration to simulate how it travels?

I'm about to start researching how to write such a simulation. Of course there is the force of gravity between the comet and the planets. Ideas for what other things I need to take into consideration?

If you know any introductory books that deal with the physics of how comets travel through the solar system that would be very welcome as well.

• How accurate a result are you wanting? – Kyle Kanos Jan 21 '14 at 20:51
• @KyleKanos I want as accurate as I can get with Newtonian physics. I understand that relativistic effects will probably affect comets some, but I don't want the physics to get too complicated. – user714 Jan 21 '14 at 20:53
• To do that, you can take a look to the N-Body Problem and some methods to solve differential equations numerically with the computer: Runge-Kutta, Euler or Taylor expansion. That depends of the precision you want. – VictorSeven Jan 21 '14 at 20:57
• Then you'll have to track the $F=GmM/r^2$ forces of the planets as they move in their orbit, which is no small task – Kyle Kanos Jan 21 '14 at 20:58
• Yes, you've reason. However, that's why I said him to investigate on N-Body problem. It's an unsolved problem, but some approaches has been made; that could simplify a bit the problem. Maybe it isn't the most efficient way, but I think it's a good place to start with. – VictorSeven Jan 21 '14 at 21:30

You write your differential equations for the gravity forces acting on all the masses you care about (sun, comet, planets, moons-maybe) and use an ordinary differential equation (ODE) solver. Runge-Kutta (routine DVERK) should be sufficiently accurate if you make the tolerance small. I wouldn't think a stiff solver like DLSODE/DLSODA would be necessary unless the comet is allowed to get really really close to any other body.

You might find more with a little googling.

I had heard a long time ago of people using conic curve integration. In other words, normal ODE solving works in terms of straight-line (i.e. first derivative) local approximations to the path. It is possible to make a local approximation to the path which is a conic curve. Conics are better because orbits, to a first approximation, are conics, i.e. ellipses, hyperbolas, etc.

Check out a program called "Dance of the Planets". It's very old but will run in Dosbox, I think. It won't tell you how to do it, but it will show you that it has been done.