hannorein / rebound

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

Floating points on orbital elements #464

Closed gacarita closed 3 years ago

gacarita commented 3 years ago

Hello,

I am trying to interpret some results that I am getting with REBOUND and I would like to know if this could be a problem or not.

For the given system:

 m=0.7 x=-0.3 y=0.0 z=0.0 vx=0.0 vy=-0.3 vz=0.0
 m=0.3 x=0.7 y=0.0 z=0.0 vx=0.0 vy=0.7 vz=0.0
 m=0.0 x=0.85 y=0.0 z=0.0 vx=0.0 vy=-1.822057503937336 vz=0.0

The initial orbital elements for the third body is:

inc = 3.141592653589793, a= -1.0341771009628695, e= 1.8219095155062017

I'm getting the following orbit for the third particle in synodic frame.

image

image

image

Do these results make sense or could it be a problem? Otherwise, is it an orbit that is being ejected? what is the reason for these variations and negative semi-major axis.

Gabriel.

hannorein commented 3 years ago

This looks aright to me. Your trajectory does not really look like a Keplerian orbit. That's why your orbital elements might not be what you're expecting. You get negative semi-major axes if the orbit is unbound (unbound here is in the abstract 2 body case, so in your case the particle might never actually get ejected).

gacarita commented 3 years ago

Okay. It makes sense. It was one of the things I was thinking about.

Thanks very much for the help