Skip to main content

An open-source multi-purpose N-body code

Project description

Version PyPI GPL Paper Paper Paper Paper Paper Paper Paper Paper Docs Binder REBOUND (C) REBOUND (python)

Welcome to REBOUND

REBOUND Examples

REBOUND is an N-body integrator, i.e. a software package that can integrate the motion of particles under the influence of gravity. The particles can represent stars, planets, moons, ring or dust particles. REBOUND is very flexible and can be customized to accurately and efficiently solve many problems in astrophysics.

REBOUND 24 Meeting

REBOUND 24 Virtual Meeting

Join us for the first virtual 2-day REBOUND meeting, aimed to bring REBOUND developers and users together. 1 day of science talks, 1 day of technical/hands-on talks, discussions on REBOUND's future + social events!

Abstract submission and registration are now open at https://hannorein.github.io/rebound24/.

Features

  • No dependencies on external libraries.
  • Runs natively on Linux, MacOS, and Windows.
  • Symplectic integrators WHFast, SEI, LEAPFROG, EOS.
  • Hybrid symplectic integrators for planetary dynamics with close encounters MERCURIUS
  • High order symplectic integrators for integrating planetary systems SABA, WH Kernel methods.
  • High accuracy non-symplectic integrator with adaptive time-stepping IAS15.
  • Can integrate arbitrary user-defined ODEs that are coupled to N-body dynamics for tides, spin, etc
  • Support for collisional/granular dynamics, various collision detection routines
  • The computationally intensive parts of the code are written entirely in C, conforming to the ISO standard C99, and can be used as a thread-safe shared library
  • Easy-to-use Python module, installation in 3 words: pip install rebound
  • Real-time, 3D visualization, for both C and Python.
  • Extensive set of example problems for both C and Python. You can run examples directly from your browser without the need to download or install anything.
  • Parallelized WHFast512 integrator for super fast integrations of planetary systems with SIMD AVX512 instructions
  • Parallelized with OpenMP (for shared memory systems)
  • Parallelized with MPI is supported for some special use cases only (using an essential tree for gravity and collisions)
  • The code is 100% open-source. All features are included in the public repository on github.

Try out REBOUND

You can try out REBOUND without installing it. Simply head over to readthedocs.org. All the C examples have been compiled with emscripten and can run directly in your browser.

One minute installation

You can install REBOUND with pip if you want to only use the python version of REBOUND:

pip install rebound

Then, you can run a simple REBOUND simulation such as

import rebound
sim = rebound.Simulation()
sim.add(m=1.0)
sim.add(m=1.0e-3, a=1.0)
sim.integrate(1000.)
sim.status()

If you want to use the C version of REBOUND simply copy and paste this line into your terminal (it won't do anything bad, we promise):

git clone https://github.com/hannorein/rebound && cd rebound/examples/shearing_sheet && make && ./rebound

Documentation

The full documentation with many examples, changelogs and tutorials can be found at

https://rebound.readthedocs.org

If you have trouble installing or using REBOUND, please open an issue on github and we'll try to help as much as we can.

There are also short YouTube videos describing various aspects of REBOUND available at https://www.youtube.com/channel/UCNmrCzxcmWVTBwtDPPLxkkw .

Related projects

Additional physics

To easily incorporate additional physics modules such as migration forces, GR effects and spin into your REBOUND simulations, see REBOUNDx at https://github.com/dtamayo/reboundx

Analytical and semianalytical tools

If you're interested in comparing numerical simulations to analytical and semianalytical tools for celestial mechanics, see Celmech at https://github.com/shadden/celmech

Ephemeris-quality integrations of test particles

To generate ephemeris-quality integrations of test particles in the Solar System with a precision on par with JPL's small body integrator, see ASSIST at https://github.com/matthewholman/assist

Papers

There are several papers describing the functionality of REBOUND.

  1. Rein & Liu 2012 (Astronomy and Astrophysics, Volume 537, A128) describes the code structure and the main feature including the gravity and collision routines for many particle systems. http://adsabs.harvard.edu/abs/2012A%26A...537A.128R

  2. Rein & Tremaine 2011 (Monthly Notices of the Royal Astronomical Society, Volume 415, Issue 4, pp. 3168-3176) describes the Symplectic Epicycle integrator for shearing sheet simulations. https://ui.adsabs.harvard.edu/abs/2011MNRAS.415.3168R

  3. Rein & Spiegel 2015 (Monthly Notices of the Royal Astronomical Society, Volume 446, Issue 2, p.1424-1437) describes the versatile high order integrator IAS15 which is now part of REBOUND. http://adsabs.harvard.edu/abs/2015MNRAS.446.1424R

  4. Rein & Tamayo 2015 (Monthly Notices of the Royal Astronomical Society, Volume 452, Issue 1, p.376-388) describes WHFast, the fast and unbiased implementation of a symplectic Wisdom-Holman integrator for long term gravitational simulations. http://adsabs.harvard.edu/abs/2015MNRAS.452..376R

  5. Rein & Tamayo 2016 (Monthly Notices of the Royal Astronomical Society, Volume 459, Issue 3, p.2275-2285) develop the framework for second order variational equations. https://ui.adsabs.harvard.edu/abs/2016MNRAS.459.2275R

  6. Rein & Tamayo 2017 (Monthly Notices of the Royal Astronomical Society, Volume 467, Issue 2, p.2377-2383) describes the Simulationarchive for exact reproducibility of N-body simulations. https://ui.adsabs.harvard.edu/abs/2017MNRAS.467.2377R

  7. Rein & Tamayo 2018 (Monthly Notices of the Royal Astronomical Society, Volume 473, Issue 3, p.3351–3357) describes the integer based JANUS integrator. https://ui.adsabs.harvard.edu/abs/2018MNRAS.473.3351R

  8. Rein, Hernandez, Tamayo, Brown, Eckels, Holmes, Lau, Leblanc & Silburt 2019 (Monthly Notices of the Royal Astronomical Society, Volume 485, Issue 4, p.5490-5497) describes the hybrid symplectic integrator MERCURIUS. https://ui.adsabs.harvard.edu/abs/2019MNRAS.485.5490R

  9. Rein, Tamayo & Brown 2019 (Monthly Notices of the Royal Astronomical Society, Volume 489, Issue 4, November 2019, Pages 4632-4640) describes the implementation of the high order symplectic integrators SABA, SABAC, SABACL, WHCKL, WHCKM, and WHCKC. https://ui.adsabs.harvard.edu/abs/

Acknowledgments

If you use this code or parts of this code for results presented in a scientific publication, we would greatly appreciate a citation. please cite REBOUND. The simplest way to find the citations relevant to the specific setup of your REBOUND simulation is:

sim = rebound.Simulation()
-your setup-
sim.cite()

Contributors

REBOUND is open source and you are invited to contribute to this project!

License

REBOUND is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

REBOUND is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with REBOUND. If not, see http://www.gnu.org/licenses/.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rebound-4.3.2.tar.gz (305.9 kB view hashes)

Uploaded Source

Built Distributions

rebound-4.3.2-pp310-pypy310_pp73-win_amd64.whl (283.8 kB view hashes)

Uploaded PyPy Windows x86-64

rebound-4.3.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (311.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rebound-4.3.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (289.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-pp310-pypy310_pp73-macosx_10_9_x86_64.whl (252.5 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

rebound-4.3.2-pp39-pypy39_pp73-win_amd64.whl (283.8 kB view hashes)

Uploaded PyPy Windows x86-64

rebound-4.3.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (311.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rebound-4.3.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (289.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-pp39-pypy39_pp73-macosx_10_9_x86_64.whl (252.5 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

rebound-4.3.2-pp38-pypy38_pp73-win_amd64.whl (283.7 kB view hashes)

Uploaded PyPy Windows x86-64

rebound-4.3.2-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (311.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rebound-4.3.2-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (289.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-pp38-pypy38_pp73-macosx_10_9_x86_64.whl (252.5 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

rebound-4.3.2-pp37-pypy37_pp73-win_amd64.whl (283.8 kB view hashes)

Uploaded PyPy Windows x86-64

rebound-4.3.2-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (313.5 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rebound-4.3.2-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (291.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-pp37-pypy37_pp73-macosx_10_9_x86_64.whl (252.5 kB view hashes)

Uploaded PyPy macOS 10.9+ x86-64

rebound-4.3.2-cp312-cp312-win_amd64.whl (283.7 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

rebound-4.3.2-cp312-cp312-win32.whl (244.6 kB view hashes)

Uploaded CPython 3.12 Windows x86

rebound-4.3.2-cp312-cp312-musllinux_1_1_x86_64.whl (695.7 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

rebound-4.3.2-cp312-cp312-musllinux_1_1_i686.whl (625.1 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ i686

rebound-4.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (744.9 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

rebound-4.3.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (670.5 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-cp312-cp312-macosx_11_0_arm64.whl (239.4 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

rebound-4.3.2-cp312-cp312-macosx_10_9_x86_64.whl (259.6 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

rebound-4.3.2-cp311-cp311-win_amd64.whl (283.7 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

rebound-4.3.2-cp311-cp311-win32.whl (244.6 kB view hashes)

Uploaded CPython 3.11 Windows x86

rebound-4.3.2-cp311-cp311-musllinux_1_1_x86_64.whl (695.7 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

rebound-4.3.2-cp311-cp311-musllinux_1_1_i686.whl (625.0 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

rebound-4.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (744.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

rebound-4.3.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (670.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-cp311-cp311-macosx_11_0_arm64.whl (239.4 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

rebound-4.3.2-cp311-cp311-macosx_10_9_x86_64.whl (259.6 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

rebound-4.3.2-cp310-cp310-win_amd64.whl (283.7 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

rebound-4.3.2-cp310-cp310-win32.whl (244.6 kB view hashes)

Uploaded CPython 3.10 Windows x86

rebound-4.3.2-cp310-cp310-musllinux_1_1_x86_64.whl (695.7 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

rebound-4.3.2-cp310-cp310-musllinux_1_1_i686.whl (625.0 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

rebound-4.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (744.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

rebound-4.3.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (670.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-cp310-cp310-macosx_11_0_arm64.whl (239.4 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

rebound-4.3.2-cp310-cp310-macosx_10_9_x86_64.whl (259.6 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

rebound-4.3.2-cp39-cp39-win_amd64.whl (283.7 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

rebound-4.3.2-cp39-cp39-win32.whl (244.6 kB view hashes)

Uploaded CPython 3.9 Windows x86

rebound-4.3.2-cp39-cp39-musllinux_1_1_x86_64.whl (695.7 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

rebound-4.3.2-cp39-cp39-musllinux_1_1_i686.whl (625.0 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

rebound-4.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (744.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

rebound-4.3.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (670.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-cp39-cp39-macosx_11_0_arm64.whl (239.4 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

rebound-4.3.2-cp39-cp39-macosx_10_9_x86_64.whl (259.6 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

rebound-4.3.2-cp38-cp38-win_amd64.whl (283.7 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

rebound-4.3.2-cp38-cp38-win32.whl (244.6 kB view hashes)

Uploaded CPython 3.8 Windows x86

rebound-4.3.2-cp38-cp38-musllinux_1_1_x86_64.whl (695.7 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

rebound-4.3.2-cp38-cp38-musllinux_1_1_i686.whl (625.0 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

rebound-4.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (744.9 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

rebound-4.3.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (670.5 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-cp38-cp38-macosx_11_0_arm64.whl (239.4 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

rebound-4.3.2-cp38-cp38-macosx_10_9_x86_64.whl (259.6 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

rebound-4.3.2-cp37-cp37m-win_amd64.whl (283.7 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

rebound-4.3.2-cp37-cp37m-win32.whl (244.6 kB view hashes)

Uploaded CPython 3.7m Windows x86

rebound-4.3.2-cp37-cp37m-musllinux_1_1_x86_64.whl (695.7 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

rebound-4.3.2-cp37-cp37m-musllinux_1_1_i686.whl (625.0 kB view hashes)

Uploaded CPython 3.7m musllinux: musl 1.1+ i686

rebound-4.3.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (744.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

rebound-4.3.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (670.5 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-cp37-cp37m-macosx_10_9_x86_64.whl (259.6 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

rebound-4.3.2-cp36-cp36m-win_amd64.whl (288.5 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

rebound-4.3.2-cp36-cp36m-win32.whl (248.6 kB view hashes)

Uploaded CPython 3.6m Windows x86

rebound-4.3.2-cp36-cp36m-musllinux_1_1_x86_64.whl (697.0 kB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ x86-64

rebound-4.3.2-cp36-cp36m-musllinux_1_1_i686.whl (623.8 kB view hashes)

Uploaded CPython 3.6m musllinux: musl 1.1+ i686

rebound-4.3.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (748.1 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

rebound-4.3.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (672.9 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

rebound-4.3.2-cp36-cp36m-macosx_10_9_x86_64.whl (258.4 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page