Closed sabaronett closed 4 years ago
That's right. Mercurius only supports forces. The reason is that for a hybrid integrator, where you're switching between different integrators at close encounters, in cases where the perturbation depends on the close approach distance, it's crucial to incorporate that into the adaptive scheme (IAS15). That can't be done right now with IAS15, but in principle could for perturbations like mass loss.
So basically this is currently a limitation of REBOUND/REBOUNDx that applies to all operators (as opposed to forces) that we need to think through to do correctly. The nice thing about adding your effect in the REBOUNDx framework is that if REBOUND gets updated to deal with this case, then your effect automatically will work from that version on! Let me know if you have other questions.
@dtamayo , thanks for the response. That all makes sense!
I'm curious, though, why in our original Python-version REBOUND simulation we were able to use Mercurius, modify the mass of the star in-between steps, and observe orbital expansion, even before writing/adding our custom force for the tidal interaction. I'm guessing it's because those mass changes weren't acting as an "operator"?
I've uploaded our old code for reference here: https://github.com/sabaronett/reboundx/blob/mass_loss/examples/mass_loss_test_run/Main_Rebound_Simulation_Program_v1.py
It's because we hadn't realized that particular issue with the hybrid integrator, so we changed the logic in the new version of REBOUND and REBOUNDx :)
Do you have a use case that specifically requires Mercurius with these modifications?
Ahh, I see :) . So our old simulation might not work with the latest version of REBOUND. We were using 3.8.3 at the time.
No, we shouldn't actually need Mercurius for the effects we're currently writing. It was more of a curiosity and wanting to make sure we weren't missing something fundamental before we got too deep into development.
Thanks again for the insight!
Sounds good. The new REBOUNDx only works with newer versions of REBOUND, but you can always get back what you had by checking out older versions of REBOUND and REBOUNDx.
modify_mass
effect doesn't seem to work withREB_INTEGRATOR_MERCURIUS
orREB_INTEGRATOR_EOS
(i.e., no orbital expansion).REB_INTEGRATOR_WHFAST
andREB_INTEGRATOR_IAS15
work (i.e., orbital expansion).