-
Notifications
You must be signed in to change notification settings - Fork 99
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 discrepancies #114
Comments
Follow-up: |
Is there any way to bypass the collision detection issue for either PhiGRAPE or ph4? |
Yes, You can run these codes without collision detection (in fact these do not run with collision detection, it needs to be enabled) See these lines:
The last line can be
In which case no collisions will be detected. |
In general note that the order in which collisions are reported will never be standard, collision detection is closely coupled to the integrator in question. PH4 can be build to support detecting all collisions, but currently it is closely coupled to the multiples module and will only detect "viable" collisions (i.e. those that are most likely to lead to a new multiples system), see https://github.com/amusecode/amuse/blob/master/src/amuse/community/ph4/src/jdata.cc#L810. It would be interesting to determine why BHTree and PhiGrape miss some of the collisions (Stepsize and particle order are very important in the collision detection mechanism). Could you debug these? (add some prints around the collision detection code) |
@arjenve I'll try that. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 28 days if no further activity occurs. Thank you for your contributions. |
Related to #88:
There seems to be a discrepancy in which collisions are detected by different codes.
Expected result:
Collision between p0 and p1 is reported if p0.radius + p1.radius > (p1.position - p0.position).length(), and this may only depend on some expected roundoff/accuracy errors.
Possibly, a switch can be used to detect only approaching collisions (negative relative velocity)
Actual result:
Hermite does this perfectly
Rebound as well, but it reports p0 and p1 in reverse
ph4 misses most of the collisions, and not just the ones that are receding from each other
PhiGRAPE misses some of the collisions
BHTree misses some of the collisions
I didn't test other codes so far.
The text was updated successfully, but these errors were encountered: