Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

[Phys-l] Calculating planetary orbits (was gravitational force)



Krishna Chowdary wrote:



"If you're fine with numerical stuff like on a spreadsheet, have the
students use an Euler step method and plot orbits around a gravitational
force center (... making their own simulation).

This is tricky because of rounding; it is hard to get closed orbits.
The advantage is that students can change the force law and see what
happens."



*****



A modified Euler step method is much more effective than simple Euler,
getting good accuracy with a much larger time step. One simple
modification is the "leapfrog" method described by Michael Fowler:



http://galileo.phys.virginia.edu/classes/581/



http://galileo.phys.virginia.edu/classes/581/SHOtoPlanets.html



Leapfrog is discussed in the second link, and a spreadsheet is provided
in the first link. The idea is to calculate velocities at times halfway
between positions. Setting this up in a spreadsheet requires changes in
the formulas in only two cells.



For an Earth-like example in which the length unit is the AU and the
time unit is one year, the product GM_sun = 39.4784176. Change Fowler's
spreadsheet as follows: enter this value for his G and change the time
step to 0.05. Make y_init = 1 and v_x_init = 2 pi. The velocity units
are AU/year. These data give a circular orbit.



One gets essentially a closed but not a perfect orbit in 20 steps.



Be cautious about conclusions about orbit eccentricity with a step size
this large, though. With only 20 steps, there is apparent eccentricity
even for an orbit that is actually circular. It's better to use 80 steps
to discuss eccentricity. The errors in orbit radius and speed are about
proportional to the inverse of the square of the step size.



-Herschel



Herschel Neumann

Physics and Astronomy

University of Denver

hneumann@du.edu