I am writing a simulation of 2 bodies in coplanar parabolic orbits in their centre of mass frame (in C++) and am having difficulties setting up the initial conditions for the velocities.

The total energy of the system should be 0 for a parabolic orbit, and the total momentum must also be 0 for the orbit to have a fixed CoM, with a straight line joining the two bodies through the CoM throughout.

I am unsure however, as to how the initial velocities can then be worked out from this information?


  • $\begingroup$ Have you considered working it out in a stationary/lab frame and then converting to the CoM frame? $\endgroup$ – Kyle Kanos Mar 18 '16 at 12:06
  • 1
    $\begingroup$ @KyleKanos Not yet, it ideally needs to be starting off in the CoM frame to make things more straightforward, eg. only having to specify results in this frame and plotting them $\endgroup$ – user111699 Mar 18 '16 at 12:54

The simplest place to set initial conditions is at the moment of closest approach because the symmetry greatly simplifies the calculation. If you'll pardon the rather crude attempt at parabolas the situation at the closest approach looks like this:

Closest approach

The spacing $d$ gives you the potential energy, and you know the directions of the velocities so you can use the fact the momenta and total energy must sum to zero. This allows you to calculate the velocities from $d$ or conversely $d$ from the velocities. This is particularly simple if the masses are equal but not much harder with unequal masses.

To specify the initial conditions at any other point is hard because you need to know the orbital equation. However if you know the orbital equation there's no need to do a numerical simulation.

  • $\begingroup$ I think this is the main part that I'm stuck at- the initial conditions at any other point probably need to be known as I want to plot the time evolution of the system from the starting positions (will be adding test masses surrounding these central masses after this step). $\endgroup$ – user111699 Mar 18 '16 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.