If I use ode() to simulate the two-body problem sun-earth (state vector of 12 barycentric coordinates), there is a large discrepancy between the numerical and the analytical solution: In a simulation time of 550 (analytically calculated) orbital periods, the Earth completes 551 orbits. The circular orbit shape is fine. I used ode( ) with the default solver and the default tolerances. By narrowing the tolerances, the result becomes not more accurate. Can another solver help here that improves the numerical precision?
Yes! Stéphane recommended arkode( ) which allowed much higher precision. I achieved very good fit with the analytical solution, using method=“ERK_8” and rtol=1.D-12.
No more extra orbits! Problem solved.
I have granted you the possibility to upload files, can you edit your above post (copy/paste won’t work well with formatted text, please remove it) and drag/drop the file ?