ASTR630 Planetary Science, Spring 2023
Homework Assignment #1, N-Body Code


1. Acquire an N-body Integration Code. Lots of options here, including codes written or obtained by a classmate. State your code's origins. If you download my hnbody code from the class website, I can help you troubleshoot getting it up and running.

2. Test your code by reproducing the figure from my solution to HW#1 Problem 2.10. Here take Uranus and Neptune to be on circular uninclined orbits, include both planetary masses, and start both planets on the x-axis. This is the nominal simulation.

3. Explore the results of adding additional effects. First, make educated guesses for the change in Uranus's semimajor axis, da, from da for the nominal simulation for the situations listed below. Choose from expected changes of 0.1%, 1%, 10%, factor of 2, factor of 10, factor of 100. Then run the following simulations.
i) Set Uranus's mass to zero
ii) Add the actual eccentricities to each orbit
iii) Add the actual inclinations to each orbit
iv) Add Jupiter and Saturn to the simulation
Compare the numerical differences in da to your estimates above. By what percentage does the nominal da for Uranus change?

4. Optional. Explore, using your new N-body tool!
i) Put in the actual circumstances from the discovery of Neptune, using the positions of Uranus and Neptune at the times of their discoveries as the start and stop times for your integration.
ii) Plot the distance between Uranus and Neptune as a function of the difference in their orbital longitudes. Where is the distance minimum?
iii) Follow up your own ideas!

Combine a short description of your code and methodology, any plotting code that you wrote, and your output plots into a single PDF and submit here.


Return to ASTR630 Home Page