You will compute orbits for a binary star system using two different techniques. (1) You will use Newton's Law of Gravitation to compute the force on each star and numerically solve Newton's Second Law for each star. (2) You will model the system as a single particle and will numerically solve the equivalent one-dimensional problem derived from the Lagrangian. From the motion of the single particle, you will compute the orbits of the stars.
By comparing the orbital solutions using the two techniques, you may observe that it is much easier to compute the orbits directly using Newtonian mechanics. The value of using Lagrangian mechanics is simplicity of the analytic solution. The Lagrangian gives no advantage for computing the orbits numerically. However, computing orbits using Lagrangian mechanics can give you insight into the nature of the single particle model and how the single particle contains all of the information needed to compute the motion of both stars.

Subject Area

Mechanics

Level

Beyond the First Year

Available Implementation

IPython/Jupyter Notebook

Learning Objectives

Students will be able to:
- Compute orbits for a binary star system by solving Newton's Second Law numerically. (Exercises 1 and 2)
- Compute angular momentum for a binary star system, write the differential equations for $\dot{\phi}$ and $\ddot{r}$ for the equivalent one-body system, and numerically solve these differential equations to find the orbit of the one-body system. (Exercise 3)
- Use the equivalent one-body system to compute the positions of the two stars in the binary system. (Exercise 4)

Login or register as a verified educator for free to access instructor-only material.

Login or register as a verified educator for free to access instructor-only material.

### Exercise 1
First, let's decide what parameters we will use for our binary star system. Assume Star 1 is one solar mass and Star 2 is twice the mass of Star 1. Place the center of mass of the system at the origin. Use the initial position and velocity of Star 1 given in the table below.
| Parameter | Value |
| -- | -- |
| $m_1$ | $2\times 10^{30}$ kg |
| $m_2$ | $2m_1$ |
| $\vec{r}_1$ | $<1.5\times 10^{11},0,0>$ m |
| $\vec{v}_1$ | $<0,3.3 \times 10^4,0>$ m/s |
Compute the initial position and initial velocity of Star 2 given that the center of mass of the system should be at the origin and the center-of-mass velocity should be zero.
### Exercise 2
Model the motion of the stars using Newton's Second Law and Newton's Law of Gravitation. Plot their orbits. Create graphs of the total energy $E$, kinetic energy $K$, and potential energy $U$ as a function of separation distance $r$ for the system.
### Exercise 3
Represent the system as a single particle and model its motion by numerically solving:
$$\mu\ddot{r}=-\frac{Gm_1m_2}{r^2}+\frac{L^2}{\mu r^3}$$
and
$$\mu \dot{\phi}=\frac{L}{r^2}$$
where $L=|\vec{L}|$ is the magnitude of the angular momentum of the system. Create graphs of the total energy $E$, kinetic energy $K$, and potential energy $U$ of the system as a function of $r$.
### Exercise 4
**Now here is the big deal! This single star and its motion can be used to tell you what the two-star system is doing without using Newton's Second Law.** (Admittedly, this is a bigger deal from a theoretical perspective than a computational perspective, perhaps.)
Starting with your program in Exercise 3, during each time step, calculate the position of Stars 1 and 2 in Cartesian Coordinates based on the polar coordinates $r$ and $\phi$. Show the orbits of both stars along with the single particle model.
Numerically computing the orbits of stars from the single particle model is more difficult perhaps than using Newton's Second Law as you did in Exercise 2. In some ways, this exercise demonstrates that the single particle model is far more useful theoretically than computationally. The potential energy graph for the single particle model can give useful insights. Furthermore, treating a two-body problem as a one-body problem has applications for analyzing diatomic molecules and applying the Bohr model to determine energy states of positronium.

Code

Login or register as a verified educator for free to access instructor-only material.

Solutions

Login or register as a verified educator for free to access instructor-only material.

References

Login or register as a verified educator for free to access instructor-only material.

Appreciate if the code in .py or even txt format

Author: Rajendra Pokharel
Posted: July 15, 2018 at 8:28PM

The reason I am asking is I am using vim editor and just want to copy the paste and run from command line. Thanks.

X/Y labels in solution are flipped

Author: Thomas Finzell
Posted: July 13, 2017 at 3:45PM

The X and Y labels in the solution code are flipped for both the one body and two body problems. X should be "r(m)" and Y should be "E(J)."