Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Week 1 Exercises

Part 1

Work in pairs. Start with the notebook provided which uses REBOUND to integrate a binary with primary of mass 1 and secondary of mass 0.1. You should see a plot showing the instantaneous orbit (produced by rebound.OrbitPlot) and the trajectory of the secondary animated over two orbits.

(a) You should see in the output the orbital period (the line that prints o.P) which has a numerical value of 18.98\approx 18.98. Check that this value makes sense given the units that REBOUND uses which have G=1 (see here for more explanation).

(b) After setting up the two particles, one with m=1m=1 at rest at the origin, the other with m=0.1m=0.1 at x=1x=1, y=0y=0 with vx=0v_x=0, vy=1.3v_y=1.3, we ask REBOUND to move to the centre of mass frame using sim.move_to_com(). Comment out this line and rerun. What happens? Does it make sense?

(c) Now add two more curves to the plot to show (i) the trajectory of the primary star and (ii) the trajectory of the vector r=r2r1\vec{r}=\vec{r}_2 - \vec{r}_1, the relative position between the two stars. Then, rescale the primary trajectory by a factor (1+m1/m2)-(1+m_1/m_2) and the secondary trajectory by a factor 1+m2/m11+m_2/m_1. Explain what you find. What is rebound.OrbitPlot plotting when it plots the instantaneous orbit of the secondary?

(d) You should also see some output giving information about the orbit. Use equations (2.134) and (2.135) to check that aa and ee are as expected given the initial conditions. What velocity vcircv_\mathrm{circ} would you have to give m2m_2 to obtain a circular orbit? What is the difference between choosing an initial velocity <vcirc< v_\mathrm{circ} compared to an initial velocity >vcirc> v_\mathrm{circ}?

Part 2

Divide into three groups to work on the following problems. You will have 10 minutes at the end of class to present your results. In all three cases, you can take the limit where the primary is much more massive than the secondary (set m2=0m_2=0) to keep things simple. Also, you might find it useful to initialize the orbit with specific aa and ee rather than position and velocity, e.g. sim.add(m=0, a=1, e=0.01).

  1. Guiding centre approximation. The guiding centre approximation is discussed in Section 2.6. Test this approximation numerically by making plots in the rotating frame that rotates with the guiding centre. Check numerically that the error in the approximation scales e2\propto e^2.

  2. Applying forces to a particle in orbit. Introduce an external force and investigate the effect on the orbital elements. The example notebook on the Stark problem included with REBOUND shows how to add an external force. Two cases to check are: (1) an initially circular orbit subject to either a radial or a tangential force, and (2) an inclined eccentric orbit subject to a force normal to the orbital plane. Qualitatively does the evolution match the predictions in section 2.9?

  3. Orbits in velocity space. Study the shape, size and location of the orbits in velocity space and how they depend on semi-major axis aa and eccentricity ee. Compare against the analytic predictions for the velocities in Murray and Dermott. Their expression is for the case where the semi-major axis is along the xx-axis; can you generalize this to other cases?