-
Notifications
You must be signed in to change notification settings - Fork 224
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
Identifying conjunctions in REBOUND simulations #584
Comments
I'm not sure if this is the optimal method (i.e. it may be quite slow) but I'd look into using a custom This would allow you to check for conjunction during every time step (you'll probably want to include some reasonable range that is sufficiently close to zero) and then maybe you can save those 'close conjunctions' to a simarchive and finish your more precise analysis from there? If this becomes prohibitively slow, I'd also encourage you to look into doing this in C since this should be a relatively simple simulation and the heartbeat function is more obviously accessed in the C side of rebound. I hope that helps! I'm sure someone has a more clever solution than this brute-force check... but that's how I'd start. Best, |
Hi, I think the Poincare Map example does exactly what you want to do. But let me know if I'm missing something. There might be ways to speed this up, but I'd need to know what accuracy you need. Hanno |
If you're ok with a time precision of +/- one timestep, then @Rmelikyan's idea should work well. But yes, I'd implement it in C if speed is an issue. |
Thanks Hanno and Robert for your suggestions! The simulations are short, just a few hundred orbits, so I used the heartbeat method In Python with a fixed WHFast timestep of ~1e-3 orbital periods (which gives good enough precision in calculating the time of conjunction). |
Hi all,
I am integrating two-planet systems near first-order resonance:
and trying to identify all the times between
t = 0
and some givent_max
when the longitude of conjunctions = 3 x lambda_prime - 2 x lambda (e.g. equation 3 here) is equal to zero. When this quantity is zero, the longitude of conjunctions points along the reference direction = x-axis.I've been struggling to come up with a simple and reliable method to identify these events, at some user-specified time precision, for the simulation setup above. I tried modifying the bisecting algorithm used to identify TTVs provided in the REBOUND examples, but I wasn't successful. Any help would be appreciated.
Thanks in advance and apologies if this ends up having a trivial solution!
The text was updated successfully, but these errors were encountered: