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

How much do massless test particles increase integration overhead? #816

Closed
void4 opened this issue Feb 8, 2025 · 4 comments
Closed

How much do massless test particles increase integration overhead? #816

void4 opened this issue Feb 8, 2025 · 4 comments
Labels

Comments

@void4
Copy link

void4 commented Feb 8, 2025

Theoretically, increasing the number of massless particles should only increase the computational overhead linearly (and not quadratically), since they do not affect each other. Is this true for REBOUND when adding massless particles?

@void4 void4 added the question label Feb 8, 2025
@hannorein
Copy link
Owner

The answer depends on various settings, so without more details I cannot provide any an answer.

@void4
Copy link
Author

void4 commented Feb 9, 2025

Could you mention which settings/sim.add() parameters may influence this? I'm very new to REBOUND and have not found an explanation of this in the documentation. I'm basically following these tutorials:

https://rebound.readthedocs.io/en/latest/ipython_examples/Horizons/
https://rebound.readthedocs.io/en/latest/ipython_examples/OrbitalElements/

, adding major bodies via JPL and a bunch of minor bodies by supplying orbital parameters to sim.add(), supplying no m(ass) parameter (data via https://ssd.jpl.nasa.gov/tools/sbdb_query.html tables), checking for close approaches to major bodies (non-Earth impact events do not seem to currently well monitored by anyone).

Code is still a fresh mess, but here: https://github.com/void4/impactprediction/blob/main/main.py

Naively, I'd expect adding objects with mass to increase the computation time quadratically (?), and ideally massless objects to only increase the runtime linearly (in each integration step, first computing interactions of objects with mass, and then for each massless object the gravitational pull to them)

@hannorein
Copy link
Owner

You might want to read the tutorial on test particles:
https://rebound.readthedocs.io/en/latest/ipython_examples/Testparticles/

Make sure you set N_active.

@void4
Copy link
Author

void4 commented Feb 9, 2025

Ah, very nice, this is exactly what I needed - thank you very much :) Closed!

Edit: I just saw the 3d web interface - so cool! Awesome work!

@void4 void4 closed this as completed Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants