EPApr 19, 2011
Symplectic integrators in the shearing sheetHanno Rein, Scott Tremaine
The shearing sheet is a model dynamical system that is used to study the small-scale dynamics of astrophysical disks. Numerical simulations of particle trajectories in the shearing sheet usually employ the leapfrog integrator, but this integrator performs poorly because of velocity-dependent (Coriolis) forces. We describe two new integrators for this purpose; both are symplectic, time-reversible and second-order accurate, and can easily be generalized to higher orders. Moreover, both integrators are exact when there are no small-scale forces such as mutual gravitational forces between disk particles. In numerical experiments these integrators have errors that are often several orders of magnitude smaller than competing methods. The first of our new integrators (SEI) is well-suited for disks in which the typical inter-particle separation is large compared to the particles' Hill radii (e.g., planetary rings), and the second (SEKI) is designed for disks in which the particles are on bound orbits or the separation is smaller than the Hill radius (e.g., irregular satellites of the giant planets).
EPJan 11, 2021Code
A Bayesian neural network predicts the dissolution of compact planetary systemsMiles Cranmer, Daniel Tamayo, Hanno Rein et al.
Despite over three hundred years of effort, no solutions exist for predicting when a general planetary configuration will become unstable. We introduce a deep learning architecture to push forward this problem for compact systems. While current machine learning algorithms in this area rely on scientist-derived instability metrics, our new technique learns its own metrics from scratch, enabled by a novel internal structure inspired from dynamics theory. Our Bayesian neural network model can accurately predict not only if, but also when a compact planetary system with three or more planets will go unstable. Our model, trained directly from short N-body time series of raw orbital elements, is more than two orders of magnitude more accurate at predicting instability times than analytical estimators, while also reducing the bias of existing machine learning algorithms by nearly a factor of three. Despite being trained on compact resonant and near-resonant three-planet configurations, the model demonstrates robust generalization to both non-resonant and higher multiplicity configurations, in the latter case outperforming models fit to that specific set of integrations. The model computes instability estimates up to five orders of magnitude faster than a numerical integrator, and unlike previous efforts provides confidence intervals on its predictions. Our inference model is publicly available in the SPOCK package, with training code open-sourced.
EPOct 15, 2014Code
IAS15: A fast, adaptive, high-order integrator for gravitational dynamics, accurate to machine precision over a billion orbitsHanno Rein, David S. Spiegel
We present IAS15, a 15th-order integrator to simulate gravitational dynamics. The integrator is based on a Gauß-Radau quadrature and can handle conservative as well as non-conservative forces. We develop a step-size control that can automatically choose an optimal timestep. The algorithm can handle close encounters and high-eccentricity orbits. The systematic errors are kept well below machine precision and long-term orbit integrations over $10^9$ orbits show that IAS15 is optimal in the sense that it follows Brouwer's law, i.e. the energy error behaves like a random walk. Our tests show that IAS15 is superior to a mixed-variable symplectic integrator (MVS) and other popular integrators, including high-order ones, in both speed and accuracy. In fact, IAS15 preserves the symplecticity of Hamiltonian systems better than the commonly-used nominally symplectic integrators to which we compared it. We provide an open-source implementation of IAS15. The package comes with several easy-to-extend examples involving resonant planetary systems, Kozai-Lidov cycles, close encounters, radiation pressure, quadrupole moment, and generic damping functions that can, among other things, be used to simulate planet-disc interactions. Other non-conservative forces can be added easily.
EPJan 25, 2025
SPOCK 2.0: Update to the FeatureClassifier in the Stability of Planetary Orbital Configurations KlassifierElio Thadhani, Yolanda Ba, Hanno Rein et al.
The Stability of Planetary Orbital Configurations Klassifier (SPOCK) package collects machine learning models for predicting the stability and collisional evolution of compact planetary systems. In this paper we explore improvements to SPOCK's binary stability classifier (FeatureClassifier), which predicts orbital stability by collecting data over a short N-body integration of a system. We find that by using a system-specific timescale (rather than a fixed $10^4$ orbits) for the integration, and by using this timescale as an additional feature, we modestly improve the model's AUC metric from 0.943 to 0.950 (AUC=1 for a perfect model). We additionally discovered that $\approx 10\%$ of N-body integrations in SPOCK's original training dataset were duplicated by accident, and that $<1\%$ were misclassified as stable when they in fact led to ejections. We provide a cleaned dataset of 100,000+ unique integrations, release a newly trained stability classification model, and make minor updates to the API.
EPJun 2, 2015
WHFast: A fast and unbiased implementation of a symplectic Wisdom-Holman integrator for long term gravitational simulationsHanno Rein, Daniel Tamayo
We present WHFast, a fast and accurate implementation of a Wisdom-Holman symplectic integrator for long-term orbit integrations of planetary systems. WHFast is significantly faster and conserves energy better than all other Wisdom-Holman integrators tested. We achieve this by significantly improving the Kepler-solver and ensuring numerical stability of coordinate transformations to and from Jacobi coordinates. These refinements allow us to remove the linear secular trend in the energy error that is present in other implementations. For small enough timesteps we achieve Brouwer's law, i.e. the energy error is dominated by an unbiased random walk due to floating-point round-off errors. We implement symplectic correctors up to order eleven that significantly reduce the energy error. We also implement a symplectic tangent map for the variational equations. This allows us to efficiently calculate two widely used chaos indicators the Lyapunov characteristic number (LCN) and the Mean Exponential Growth factor of Nearby Orbits (MEGNO). WHFast is freely available as a flexible C package, as a shared library, and as an easy-to-use python module.