hannorein / rebound

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

Softening in Rebound #611

Closed ruaSulaiman closed 1 year ago

ruaSulaiman commented 1 year ago

Hello,

I am trying to use the softening parameter in an N-body simulation. The simulation setup is as follows: a sun-like star, a Jupiter-like planet, and a debris disk of planetesimals. I noticed that the softening parameter is applied to all the objects including the star and the planet which I think is Physically wrong. Can you explain to me why is that the case? or is it possible to limit the softening to the gravitational interactions between the particles and the planet?

Thank you

hannorein commented 1 year ago

Well, softening is always physically wrong. It's just a numerically trick to avoid having to resolve small scale dynamics. In REBOUND you can only set one softening parameter and it applies to all particle pairs. If you want to use it only for specific particle pairs, you'd need to add that functionality in the code yourself.

ruaSulaiman commented 1 year ago

Thank you for the quick reply! Yes, I agree that softening is always physically wrong :) however, my concern is that applying softening to the interaction between the star and the planet would create unphysical consequences on its orbit (for example precession as I have noticed in the integration) which might result in a change in the Physics of the problem. My point is that applying softening globally on a system where in one of its parts there are no collisions (the planet and the star) to worry about, and in another part where planetesimals are having a lot of collisions amongst themselves (where softening might be helpful) would create unnecessary perturbations on the planet-star and planetesimal-star interactions that we can avoid. Moreover, since we have N particles in the debris disk (where N is a 'big' number), what we care about is the statistical outcome such that it might be a good idea to use softening in that part of the system. This is my understanding of softening, I would be happy to hear your opinion on that in case you think I am mistaken.

hannorein commented 1 year ago

You're right. But I encourage you to make sure that your results do not depend on the softening. You could do that by running multiple simulations with different softening lengths and then checking that statistical results are unchanged.

ruaSulaiman commented 1 year ago

I see, thank you!