Posidonius is a N-body code for simulating planetary and/or binary systems which implements the WHFAST integrator (Rein & Tamayo 2015) and the tidal model used in Mercury-T (Bolmont et al. 2015).

TRAPPIST-1: Example of a planetary systems with several planets in compact orbital configurations.


Similarly to Mercury-T, the bodies in the simulation can be static or follow predefined evolutionary models matching FGKML stars and gaseous planets. The simulations can account for several different effects:

  • Tidal forces
  • Rotational-flattening effects
  • General relativity corrections

Posidonius has a better spin integration than Mercury-T, it's more than six times faster, it conserves the total angular momentum of the system one order of magnitude better and the spin to rotational-fattening evolution five orders of magnitude better.


The N-body code is written in Rust, a systems programming language that runs as fast as Fortran/C, prevents segmentation faults, and guarantees thread safety. Its main characteristics are:

  • Zero-cost abstractions
  • Guaranteed memory safety
  • Threads without data races

Rust benefits for the astronomical community were already exposed in Blanco-Cuaresma et al. 2017. Posidonius also provides a Python package to easily define simulation cases in JSON format, which can be read by the Posidonius integrator and ensures reproducibility.

ACKNOWLEDGEMENT This work has been directed by Dr. Emeline Bolmont, who has been key for the scientific assessment of Posidonius with her profound understanding of exoplanetary simulations.