1
$\begingroup$

Lets say I have one planet of mass $m_A$ and another of mass $m_B$. Lets say the distance between each of them is $r$.

How would I calculate the initial velocity needed for each in order to make them orbit around each other (relative to a center of mass)? When I run my simulation, and do the basic equation $ v = \sqrt{\frac{G m}{r}} $ for both, they would fly away from each other.

EDIT: I should also say that I want to be able to scale this to more than 2 masses. At that point, I think I'm approaching (or have already reached) the 3-Body problem, which makes my life much more interesting.

$\endgroup$
3
  • $\begingroup$ How is your $m$ related to your $m_A$ and $m_B$? And why do you call that “the basic equation”? $\endgroup$
    – G. Smith
    Commented Mar 16, 2020 at 0:39
  • $\begingroup$ @G.Smith the $m$ is just a placeholder variable. I use it to calculate the speed required for a mass to orbit another mass (for example, $m_A$ around $m_B$). Its basic because while it works for the Sun and the Earth, it doesn't work for very similar-sized masses. $\endgroup$ Commented Mar 16, 2020 at 1:09
  • $\begingroup$ Which mass is more heavier? $\endgroup$ Commented Mar 16, 2020 at 3:00

1 Answer 1

6
$\begingroup$

NOTE: This answer is for the OP’s original question, which was about two masses. The question was completely changed after this answer was posted.

To get an ellipse with semi-major axis $a$, the initial relative speed should be

$$v=\sqrt{G(m_A+m_B)\left(\frac2r-\frac1a\right)}.$$

This is known as the vis-viva equation and is an expression of energy conservation when rewritten as

$$\frac12\frac{m_Am_B}{m_A+m_B}v^2-\frac{Gm_Am_B}{r}=-\frac{Gm_Am_B}{2a}.$$

The first term is the sum of the kinetic energies of the two masses in the center of mass frame, expressed in terms of their relative speed. The second term is the potential energy, expressed in terms of their separation. The right side of the equation is the constant value of the total energy, expressed in terms of the semi-major axis.

$\endgroup$
8
  • $\begingroup$ Unfortunately, I was looking for a more general solution, with an arbitrary number of masses most likely greater than 2 or 3. $\endgroup$ Commented Mar 16, 2020 at 1:10
  • 4
    $\begingroup$ You changed the question after I answered, which is not polite. $\endgroup$
    – G. Smith
    Commented Mar 16, 2020 at 1:17
  • $\begingroup$ BTW, the title still clearly says “two masses”. $\endgroup$
    – G. Smith
    Commented Mar 16, 2020 at 1:26
  • 5
    $\begingroup$ @explodingfilms101 It is not acceptable behavior on Physics SE to make a major change in a question that invalidates existing answers. You should have asked a new question. Also note the 3-body problem and N-body problem have no general solutions and hence there is no way to provide a more general answer to you. $\endgroup$ Commented Mar 16, 2020 at 1:50
  • 1
    $\begingroup$ There is no known general way to do this, as far as I know. However, there are some known special solutions, such as these for three bodies. $\endgroup$
    – G. Smith
    Commented Mar 16, 2020 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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