TRACE
TRACE is a hybrid (almost) time-reversible integrator, based on the algorithm described in Hernandez & Dehnen (2023). It uses WHFast for long term integrations but switches to BS or IAS15 for all close encounters. TRACE is appropriate for systems with a dominant central mass if particles occasionally have close encounters. This TRACE implementation is described in Lu, Hernandez & Rein (2024).
Attributes
r_crit_hill (double)
The critical switchover radii of non-central particles are calculated based on a modified Hill radii criteria. This modified Hill radius for each particle is calculated and then multiplied by this parameter. The parameter is in units of the modified Hill radius. This value is used by the default switching function. The default value is 4.
peri_crit_eta (double)
The criteria for a pericenter approach with the central body. This criteria is used in the default pericenter switching condition. It flags a particle as in a close pericenter approach if the ratio of the timestep to the condition described in Pham, Rein, and Spiegel (2024). The default value is 1.
peri_mode (int)
This flag determines how TRACE integrates close approaches with the central star.
Supported values
| enum constant | identifier |
|---|---|
| 0 | PARTIAL_BS |
| 1 | FULL_BS |
| 2 | FULL_IAS15 |
S (void*)
This is a function pointer to the switching function for close encounters between non-central bodies. If NULL (the default), the default switching function will be used.The default switching function is a similar (but slightly modified) switching function used by MERCURY. It uses a modified Hill radius criteria, with heliocentric distance replacing the semimajor axis.
The arguments i and j are the indices of the two particles considered. The return value is either 0 or 1. A return value of 1 means a close encounter has been flagged. If the return values of both this function and the central switching function are always 0, then the integrator effectively becomes the standard Wisdom-Holman integrator.
S_peri (void*)
This is a function pointer to the switching function for close encounters involving the central body. If NULL (the default), the default switching function will be used. The default switching function checks if a body is close to its pericenter by considering a timescale derived from high-order derivatives of the particle's herliocentric position, inspired by Pham, Rein, and Spiegel (2024). The argument j is the index of the non-central particle considered. The return value is either 0 or 1. A return value of 1 means a close encounter has been flagged.