hannorein / rebound

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

Calculting impact velocity distributions using MERCURIUS integrator #669

Closed richard17a closed 1 year ago

richard17a commented 1 year ago

Hi all,

Hopefully this is a quick question - I am using REBOUND to generate the impact velocity distribution of test-particles onto an Earth-like planet, and I am using the MERCURIUS integrator (and the default direct collision detection module). My understanding is that when this switches over to the IAS15 integrator, it should accurately resolve close encounters and collisions, as it adaptively changes its timestep.

I have attached an example distribution below - and my question is regarding the small fraction of the impacts below the planet's escape velocity (black dotted line), which shouldn't really be possible. I am currently switching to the IAS15 integrator at 5Rhill - do you think that if I increased this value, or just used the IAS15 integrator throughout, this would prevent these low velocities? (A rough calculation suggests that if the planet is not completely picked up by WHFast, this could possibly explain these lower velocities - but it would be great to get your opinions on this in case anything else is at play).

Thanks very much, Richard

impact_velocity_distribution.pdf

hannorein commented 1 year ago

Hi Richard,

Are you sure the velocities are actually below the escape velocity? It looks like the centre of the bin is actually above the line.

In any case, I would not be surprised if you see a few impact just below the escape velocity. Keep in mind that this is a three body system, so the energy of your impactors is not perfectly conserved. Running a few tests with a different integrator or a larger switching radius is a good idea to confirm that it's not a numerical issue.

Hanno

richard17a commented 1 year ago

Hi Hanno,

Thanks very much for the quick reply! The minimum velocity is 10.98 km/s (compared to the escape velocity ~11.2 km/s) - so it's not just a binning artefact or anything like that. You are right that these low velocities might not be quite as strange as I initially thought, but will make sure to run some tests to make sure it isn't a numerical effect.

Thanks again, Richard

hannorein commented 1 year ago

It can of course be a bug or a numerical issued, but I think it's perfectly reasonable to expect this kind of velocity due to three body dynamics. So I wouldn't be worried. But if you want to make sure, you could do the following test (I assume these are small test particles?): Make the simulations reproducible, but finding out which particle will be the one with the low velocity, restart the simulation with just this one test particle (+ planet + star), then play around with different integrators, timesteps, etc. Start 1/4 orbit before the encounter, so your results are not affected by chaos in the system.

hannorein commented 1 year ago

I'll close this issue for now but feel free to reopen if there still is a problem.