Skip to content

WHFAST512

WHFast512 is a highly optimized implementation of the symplectic Wisdom & Holman (1991) integrator. It supports simulations with up to 9 particles (8 planets + 1 central object). Note that by default WHFast512 combines 1e6 timesteps to improve speed. You can set concatenate_steps to a lower value for more fine grained output. WHFast512 uses Jacobi coordinates and support symplectic correctors as well as general relativistic corrections.

The algorithm is described in two papers Javaheri et al. (2023) and Dagli & Rein (in prep). Note that in July 2026 significant changes have been made. See Dagli & Rein (in prep) for details on WHFast512 version 2.

Attributes

gr_potential (uint)

If this flag is set to 1 (default is 0) then general relativistic corrections are included. The corrections are in the form of an additional potential term and reproduce the correct precession rate. The constants are hard coded for this effect and assume that the simulation is in units of G=1 and one length unit corresponds to one astronomical unit.

corrector (uint)

If this flag is set to 17 (default is 0), then symplectic correctors are used.

concatenate_steps (ulong)

If this is set to a number other than 1 then timesteps are combined. By doing multiple timesteps in a row, WHFast512 can keep all simulation data in registers which significantly speeds up the calculation. This number should be as large as the output cadence allows. The default is 1e6.

N_systems (uint)

By default this value is set to 1, implying all 8 particles in the simulation correspond to one system. By setting N_systems to either 2 or 4, one can integrate multiple planetary systems with 2, 3, or 4 particles at the same time. See the example problems on how to setup the particles for this case.