Computational Problem Set 1
Computational Problem Set 1
Physics Department
Earth, Atmospheric, and Planetary Sciences Department
Optional
Suggested Procedure:
The differential equation of motion for the Kepler problem, in vector form, is:
d2�r GM r̂ GM�r
=− 2 =− 3 (1)
dt2 r r
In Cartesian coordinates we have:
d2 x GM x
2
=− 3 (2)
dt r
d2 y GM y
=− 3 (3)
dt2 r
As four, firstorder, coupled equations:
dx
= vx (4)
dt
dy
= vy (5)
dt
dvx GM x
= − (6)
dt r3
dvy GM y
= − 3 (7)
dt r
Equations (4) through (7) can be solved by a simple 4thorder RungeKutta integration scheme.
A few pages of text describing this method, taken from the Numerical Recipes book, are attached.
In the language of the RK4 program (Numerical Recipes’ RungeKutta program):
Or, you can use the canned integrators in mathematical packages such as Matlab, Mathematica,
IDL, etc.
1
Before carrying out any integrations, it is convenient to cast the equations in dimensionless
form. One possible choice of scaling parameters is:
[length] → a (semimajor axis)
[mass] → M
[speed] → ΩK a
[time] → 1/Ω�K
where ΩK ≡ GM/r3 .
The time steps can be made either fixed (e.g., some small fraction of 1/ΩK ), or variable,
depending on how rapidly the motion is changing. One possible variable timestep scheme is:
depending on whether you are integrating the one or twobody problem. The choice of ξ basically
determines the approximate number of integration steps that will be taken around an orbit. A
choice of ξ = 0.01 should produce rather accurate results.
For all three parts, you should display your results graphically.
Part 1
For the case of an infinite central mass and an orbiting test mass, integrate a circular orbit and
an eccentric orbit. Carry out the integration for several orbits, in both the circular and eccentric
orbit cases, to verify that the orbits close. Check that energy and angular momentum are conserved
around the orbit.
Part 2
Compute the orbits of two objects of comparable (but unequal) mass orbiting their common
center of mass. Carry out the calculations for both circular and eccentric orbits.
Part 3
Compute the precessing orbit of the mass in Part 1, if the potential is of the form
GM
φ=− (9)
(r − Rg )
where Rg ≡ 2GM/c2 , is the Schwarzschild radius associated with mass M . This is a postNewtonian
potential suggested by Paczynski (1980; A&A, 88, 23) that approximates General Relativistic dy
namics in strong gravitational fields. Treat every other aspect of the problem with simple Newtonian
mechanics.
Consider cases where a/Rg = 5, 10, and 50. Make the orbit eccentric enough to be able to
discern the precession, but avoid periastron distances near 3 Rg .
Expand the potential (or the force) in a series involving terms in Rg ; retain only the first
postNewtonian term. Use this form of the potential to find an analytic expression for the angular
precession per orbit. Compare the analytic and numerical results.
Finally, for fun, try to produce a circular orbit with r � 3 Rg , and with r � 3 Rg , and contrast
the results.