Skip to content

WHFAST

WHFast is an implementation of the symplectic Wisdom & Holman (1991) integrator. It is the best choice for systems in which there is a dominant central object and perturbations to the Keplerian orbits are small. It supports first and second symplectic correctors as well as the kernel method of Wisdom et al. (1996) with various different kernels. The basic implementation of WHFast is described in detail in Rein & Tamayo (2015). The higher order aspects of it are described in Rein, Tamayo & Brown (2019). WHFast also supports first order variational equations which can be used in chaos estimators. See Rein & Tamayo (2016). The user can choose between Jacobi, Democratic Heliocentric, WHDS, and barycentric coordinates. Because WHFast is not an adaptive integrator, the user needs to set an appropriaye timestep. Typically, this should be a small fraction (a few percent) of the smallest dynamical timescale in the problem.

Attributes

corrector (uint)

This flag sets the order of the symplectic corrector in the WHFast integrator. By default, the symplectic correctors are turned off (=0). For high accuracy simulation set this value to 11 or 17. For more details read Rein and Tamayo (2015).

safe_mode (uint)

If this flag is set to 1 (default) particle positions and velocities are always synchronized and particles can be modified between timesteps. If this flag is set to 0, the speed and accuracy of WHFast improve. However, one needs to make sure to call synchronize before an output is required or before particles are modified. Read the iPython tutorial on advanced WHFast usage to learn more.

coordinates (int)

This option chooses the internal coordinate system that WHFast is using for splitting the Keplerian from the Interaction and Jump parts. By default, it uses JACOBI coordinates. See Rein & Tamayo 2019 and Hernandez & Dehnen (2017) for more information.

Supported values

enum constant identifier
0 JACOBI
1 DEMOCRATICHELIOCENTRIC
2 WHDS
3 BARYCENTRIC

corrector2 (uint)

This flag chooses the second correctors (C2 of Wisdom et al 1996). By default, the second symplectic correctors are turned off (=0). Set to 1 to turn them on.

kernel (int)

This flag chooses the kernel. The default is DEFAULT which corresponds to the normal 2nd order WH kernel (i.e. a standard kick step). See Rein, Tamayo & Brown 2019 for details and references.

Supported values

enum constant identifier
0 DEFAULT
1 MODIFIEDKICK
2 COMPOSITION
3 LAZY

keep_unsynchronized (uint)

By default the keep_unsynchronized flag is 0. If set to 1 synchronization of the simulation is done on a copy of the particle data. This allows the simulation to continue integrating as if the simulation were never synchronized. This allows for bit-wise reproducibility in long term simulations.