Binary Star System

  • Thread starter jjb123
  • Start date
  • #1
7
0

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 distance that would result in a stable, closed orbit.

Homework Equations


Not sure because I don't believe the equation for a circular orbit applies here because both masses are moving.

The Attempt at a Solution


Don't even know where to start.

Any help with this would be greatly appreciated!
 

Answers and Replies

  • #2
ehild
Homework Helper
15,543
1,909
It is a two-body system, you can google it. The stars interact and there is no external force. Both stars orbit around their common centre of mass which you can consider fixed. It can be show that the problem can be reduced to a single point mass

m=(m1*m2)/(m1+m2)

orbiting around the central mass of M=m1+m2. The distance between this central mass and the orbiting one is equal to the distance between the stars.

ehild
 
  • #3
7
0
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?
 
  • #4
ehild
Homework Helper
15,543
1,909
You have two bodies with masses m1 and m2 and, rotating around the common CM, like a dumbbell. The centre of mass is between them. How far are m1 and m2 from the CM, if the distance between the bodies is r?

There is a mistake in the period you wrote: r is on the third power.

ehild
 
  • #5
7
0
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 distance from m? Then I can just use that in v=sqrt((G*m)/r) to get the initial velocity?
 
  • #6
ehild
Homework Helper
15,543
1,909
The central mass is M=m1+m2. The orbiting mass is m= (m1*m2)/(m1+m2). r is the distance between the stars, r=D. The distance of m1 from the common centre of mass is r1=m2*D/(m1+m2) and that of m2 is r2=m1*D/(m1+m2). The stars are at opposite sides of the CM. The angular velocity is the same for both stars, their velocity is w*r1 and w*r2, respectively.
 

Attachments

  • #7
7
0
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:
sjWnP.png


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 clarification. Everything after line 28 I know already works from other programs, so I don't think the problem is there. Everything you told me is on lines 18-23
 
  • #8
7
0
The center of mass is right in the middle and it looks like they are orbiting it, but I think the initial velocity is too small.
 
Last edited:
  • #9
ehild
Homework Helper
15,543
1,909
Plese, give the problem.Do you need to show the motion of the stars for fixed angular velocities?

ehild
 
  • #10
7
0
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 will be very similar to
that used for the moon orbiting the earth, with one important difference: now you cannot make
the approximation that the more massive star does not accelerate due to the force placed on it by
the other star. Why can you not make this assumption?"

My problem was that it needs to be a closed orbit for the period to make any sense, right?
 
  • #11
ehild
Homework Helper
15,543
1,909
You can use the same program as in the case of the moon orbiting around a fixed earth, and calculate the separate positions of the stars by the formula for vec(r1) = m2/(m1+m2)*vec(r) and vec(r2)=-m1/(m1+m2)*vec(r). This will keep the CM at the origin.

You assumed constant angular velocity, w=2pi/T. That means the orbits are circular. For the single-body problem (like Moon orbiting around a fixed Earth) you can not assume arbitrary distance between the central star and the planet in this case. The centripetal force equals the force of gravity which means that
m r w^2 = gmM/r^2. You can choose either the period or the separation, but not both.
If you have arbitrary initial velocity and position, the orbit will not be circular and the angular velocity will change along the orbit, so that r^2*w= constant. And you have closed orbit if the total energy is negative: 1/2 mv^2-GmM/r^2<0.

ehild
 
  • #12
7
0
Cool, thanks! That really helped.
 

Related Threads on Binary Star System

  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
6K
  • Last Post
Replies
6
Views
3K
Replies
2
Views
10K
Replies
2
Views
4K
  • Last Post
Replies
5
Views
806
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
12
Views
3K
  • Last Post
Replies
1
Views
3K
  • Last Post
Replies
16
Views
12K
Top