- #1

- 15

- 0

## Homework Statement

A binary star system consists of two unequal mass stars that orbit about their center of mass. One star has a mass of 2e30 kg and the other has mass of 1e30 kg. Take the orbital period of the system to be 15 days. Your task is to simulate the binary-star system numerically, assuming that the stars are moving in the x-y plane.

The mass of one star does not dominate the total mass of the system, so you cannot make the approximation that the more massive object does not accelerate due to the force placed on it by the less massive one.

## Homework Equations

Calculate initial velocities for the two stars assuming zero total momentum for the two-body system and a period of 15 days. Evolve the system for 45 days. Use two spheres of different sizes to represent the two stars, and track their orbits.

Make a graph of the x-component of its momentum vs. time. Is either of these graphs constant? Now add the x-components of the momentum of the two particles together and graph the time behavior of the x-component of the total momentum of the binary system. Is this constant in time? Why or why not? Compute the magnitude of the total system momentum and plot it versus time. How close is it to remaining constant? Should it change with time?

## The Attempt at a Solution

Unfortunately, I'm not quite sure how to approach the problem beyond the elementary basics. I am aware that there is a gravitational force between the two stars that must be continuously calculated. However, I suspect center of mass of the two-star system must also be considered, but I don't quite know how, in terms of calculating position.

With any guidance, I'll try my best to proceed and continue as far as I can, but I currently feel stuck at a fairly early stage of programming this simulation. Any assistance will be much-appreciated.