- #1
CAF123
Gold Member
- 2,948
- 88
Homework Statement
I am constructing an N-body simulation in Java that will ultimately model the solar system. I am testing the reliability of it by slowly increasing the number of bodies in the simulation. So I am starting off with the Sun, Mercury and Venus. I am looking to find the initial position, velocity and masses of these three planets. Masses are easy enough to find, however I still need to find the initial position and velocity.
Homework Equations
I am told to find the initial velocity of the planets via, $$v = \sqrt{\frac{\mu}{r}},$$where ##\mu = m_1 + m_2## and ##G = 1## and I think ##r## is the distance of body 1 from body 2.
The Attempt at a Solution
If ##\mu = m_1 + m_2## then if one of the masses is the Sun, this will dominate the other planet. I think I can find the mean distance of each of Venus and Mercury from the Sun online. (Can I take this to be r?) So I can use the above formula to obtain the initial velocity. I am a bit confused though because this is a 3 body system, so how should I compute the resultant initial velocity using that formula?
Also, I can see that this eqn was derived redefining G=1, (that makes the equation dimensionally correct) but this does not alter the units of the quantities.
Many thanks