Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collision detection: all overlapping particles vs only approaching overlapping particles #88

Open
rieder opened this issue Feb 1, 2017 · 4 comments

Comments

@rieder
Copy link
Member

rieder commented Feb 1, 2017

There seems to be a discrepancy between a code that has Rebound's collision detections enabled (e.g. "code->collision = reb_simulation::REB_COLLISION_DIRECT;" in "initialize_code()") and one that only enables collision detections in AMUSE. Both return collisions, but the result is not the same (and seems incorrect if Rebound's collision detection is not enabled).
This is at least the case when using the WHFast integrator.
I am not sure why this is though...
Maybe we should add Rebound's collision detection mechanism as a parameter? And/or auto-set it if the AMUSE collision_detection stopping condition is set?

@rieder
Copy link
Member Author

rieder commented Feb 2, 2017

Issue traced to a difference between what classifies as a collision between AMUSE and Rebound: Rebound excludes particles moving away from each other. This is the behaviour I needed, but I can do this in post-processing.
This behaviour seems to be different between community codes: ph4 also only reports particles approaching each other.

@rieder rieder changed the title Rebound: use Rebound internal collision detection? Collision detection: all overlapping particles vs only approaching overlapping particles Feb 2, 2017
@rieder
Copy link
Member Author

rieder commented Feb 2, 2017

It's not very "AMUSE-y" when behaviour changes between codes...
Could we standardise this (maybe add a parameter to choose the behaviour)?
Or is ph4 is the only odd one of the bunch and is this really a ph4 bug?

@arjenve
Copy link
Contributor

arjenve commented Feb 2, 2017

ph4 is the only odd one out (this was done for performance reasons).
The best solution is to have a parameter that would alter the collision detection algorithm if supported by a code, with all code defaulting to the one we have in all coe and some codes having options (i.e. to only stop if particles are moving towards each other)

@rieder
Copy link
Member Author

rieder commented Feb 2, 2017

Ok, sounds good! I'd be happy to take a shot at implementing this parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants