These tests were run with the Sun and Earth alone, for a duration of 100 years.
Method Timestep (seconds) 225 450 900 1800 3600 --------------------------------------------------------------------------- Euler_1 5.08E-02 9.26E-02 1.58E-01 2.48E-01 3.54E-01 Euler_2 -7.14E-11 -5.68E-10 -4.54E-09 -3.63E-08 -2.90E-07 (increase timestep by factor of 10 to prevent numerical roundoff from dominating, so times are 225*10 = 2250, etc.) RK4 -5.73E-14 7.49E-14 -2.91E-13 -1.04E-11 -3.31E-10 ---------------------------------------------------------------------------
We see that if we cut the stepsize in half, then the accumulated error in total energy is cut
These tests were run with the Sun and Earth alone, for a duration of 1,000 years. The timestep for each method was chosen so that the entire simulation would complete in very close to the same real clock time, 20 seconds.
Method timestep fractional change in (sec) energy after 1000 years ---------------------------------------------------------- Euler_1 6,000 7.2E-01 Euler_2 13,000 -6.8E-05 RK4 29,000 -5.6E-10 ----------------------------------------------------------