hannorein / rebound

💫 An open-source multi-purpose N-body code.
https://rebound.readthedocs.io/
GNU General Public License v3.0
817 stars 216 forks source link

Different integrators obtain different orbits #761

Closed ntsimon closed 3 weeks ago

ntsimon commented 3 months ago

I try to use two integrators (whfast and ias15), to simulate a solar system with several planets and one comet for their orbits. However, the result shows that for whfast, the comet leaves the system while for ias15, it moves around the Sun. why? The other parameters such as time step remain unchanged Any comments are welcome. thanks.

Simon

hannorein commented 3 months ago

The two integrators are very different and are expected to give different results, especially if your system is chaotic and sensitive to initial conditions. A few things:

ntsimon commented 3 months ago

Thanks,

If all interested solar planets with a comet àre added onto the system, and just do the following two codes for changing to the center-of-mass frame and plotting the orbits without selecting integrators.

sim. move_to_com() op=rebound. OrbitPlot(sim).

then the status shows IAS15 integrator and the orbits are displayed.

How do I know then whether the resulting orbits are accurate?

Is there any parameter setup in order to simulate much more periods?

Can the resulting raw data be extracted for references? If yes, how to get them?

Further advice are welcome, thank.

Simon.

hannorein commented 3 weeks ago

As mentioned above, regardless of what integrator you use, you should make sure your results are converged and do not depend on numerical fudge factors.