Here is the assignment:
"1. A binary star. A binary star consists of one star with a mass of 2×1030 kg and the other with
a mass of 1×1030 kg. The orbital period (time to return to the same spot) of the stars is 15 days.
Your task is to simulate the binary-star system numerically. Your code...
Thanks for the reply! I think I almost have it but something isn't quite right.
Here is what I get when I try to run this:
And here is the code: http://pastebin.com/JBxTjqmy Even if you don't know programming, you should be able to see what I'm doing. Let me know if needs any...
Let's see, so I should calculate m=(m1*m2)/(m1+m2) and use that as my central mass, and then solve the the period expression for both of them, treating them each as a simple orbit around a stationary mass (m)? Then the r I would get out of each of the period expressions would be that objects...
How do I work the period into it though? The equation for orbital period is T = (2pi)sqrt(r^2/(G(M+m))) Wouldn't that mean that I get the exact same distance from the center of mass for both bodies?
Homework Statement
I have to write a computer program to simulate a binary star system and I can not assume that the larger mass is stationary. I am given their respective masses, and the period of the system. I am just wondering how to find the write combination of initial velocity and...