A slow-down time-transformed symplectic integrator for solving the few-body problem
Abstract
An accurate and efficient method dealing with the few-body dynamics is important for simulating collisional -body systems like star clusters and to follow the formation and evolution of compact binaries. We describe such a method which combines the time-transformed explicit symplectic integrator (Preto & Tremaine, 1999; Mikkola & Tanikawa, 1999) and the slow-down method (Mikkola & Aarseth, 1996). The former conserves the Hamiltonian and the angular momentum for a long-term evolution, while the latter significantly reduces the computational cost for a weakly perturbed binary. In this work, the Hamilton equations of this algorithm are analyzed in detail. We mathematically and numerically show that it can correctly reproduce the secular evolution like the orbit averaged method and also well conserve the angular momentum. For a weakly perturbed binary, the method is possible to provide a few order of magnitude faster performance than the classical algorithm. A publicly available code written in the c++ language, sdar, is available on GitHub. It can be used either as a standalone tool or a library to be plugged in other -body codes. The high precision of the floating point to digits is also supported.
keywords:
methods: numerical – software: simulations – Galaxy: globular clusters: general1 Introduction
Few-body dynamics embedded in -body systems like star clusters is important for many research topics: the formation of high-velocity stars via the ejections by interacting with binaries or massive black holes (e.g. Poveda, Ruiz & Allen, 1967; Leonard & Duncan, 1988, 1990; Yu & Tremaine, 2003; Gualandris, Portegies Zwart & Sipior, 2005; Gvaramadze, Gualandris & Portegies Zwart, 2009; Fujii & Portegies Zwart, 2011); the mergers of binaries that produce exotic objects like blue stragglers (e.g. Bailyn, 1995; Davies, Piotto & de Angeli, 2004; Hurley, et al., 2005; Heggie & Giersz, 2008; Leigh, Sills & Knigge, 2011; Hypki & Giersz, 2013) and gravitational wave sources (e.g. Portegies Zwart & McMillan, 2000; O’Leary et al., 2006; Banerjee, Baumgardt & Kroupa, 2010; Antonini, et al., 2016; Askar, Szkudlarek, Gondek-Rosińska, Giersz & Bulik, 2017; Di Carlo, et al., 2019); and the energy generation source that controls the dynamical evolution of star clusters (e.g. Hénon, 1961; Heggie, 1975; Hills, 1975; Spitzer, 1987; Binney & Tremaine, 1987; Breen & Heggie, 2013; Wang, 2020).
However, few-body systems are also challenging to handle in the numerical simulations. Firstly, they can have a much shorter dynamical timescale than that of the host environment. For example, an open cluster with a few thousand stars has a typical dynamical (crossing) time of few Myrs, but a close binary can have a period of few days. It is very time consuming to accurately follow the lifetime of the cluster with a time resolution less than the binary period. Secondly, the numerical error introduced by the integrator can accumulate after many binary orbits and cause an artificial drift of the orbital parameters.
To avoid these issues, the -body codes for simulating star clusters, such as nbody6 (Aarseth, 2003), artificially “freeze” the orbits of weakly perturbed binaries and hierarchical systems, i.e., if the perturbation is below a threshold and the hierarchical systems satisfy a stability criterion, the internal motion of the systems are not evolved until the perturbation becomes strong. Such trick can significantly reduce the computational cost, but it ignores the long-term effect of weak perturbation. In particular, the evolution of angular momentum, and thus the eccentricity, can be completely wrong. Besides, whether the instability of hierarchical systems is properly treated depends on the quality of the stability criterion.
There are two approximate solutions that can properly handle the few-body systems and also avoid the time consuming calculation. The first method is using the orbit averaged Hamiltonian. In the case of a hierarchical triple, instead of tracing the positions and velocities of individual components by integrating the classical Newtonian equation of motion, the orbits of inner and outer binaries can be evolved by using the Hamilton equation written in the Delaunay’s elements. The short-period terms in the Hamiltonian can be eliminated (orbit averaged) by the Von Zeipel transformation (e.g. Naoz, et al., 2013; Naoz, 2016). For example, the orbit averaged method with a quadruple-level perturbation term is provided in Naoz, et al. (2013). Because the timescale of secular evolution is longer than the periods of binaries, such method can be very efficient to integrate the orbital evolution of a stable hierarchical triple.
Another method is called “slow-down” introduced by Mikkola & Aarseth (1996). For a perturbed binary, by artificially slowing down the orbital motion (scaling the time) while keeping the orbital parameters unchanged, the external perturbation is effectively enlarged. In such case, the effect of perturbation on one binary orbit can represent the average effect of several orbits. When the perturbation is weak, this method can properly approximate the secular evolution. The benefit is rich: it is easy to be implemented in a -body code; can be applied for a general few-body system with an arbitrary number of binaries and singles; is not only for a kepler binary, but also for any type of periodic orbits. In Mikkola & Aarseth (1996), a constant slow-down factor is tested for a binary with a post-Newtonian type of perturbation. However, it is not well discussed and tested how we can change the slow-down factor, even though it is crucial for the actual use of the slow-down method. Especially, this is important for dealing with the common few-body systems in a star cluster, such as triples with high-eccentric or hyperbolic orbits of perturbers. When the perturbation to a binary becomes smaller, we start from no slow-down to a larger slow-down factor. But how to change it properly is not well understood. Mikkola & Aarseth (1996) discuss a factor-of-two change, but such a way would cause the non-conservative change in the total energy of the system.
These two methods not only can reduce the computing cost, but also avoid the large accumulate error due to much less integration steps. But as the price of approximation, both methods lose the phase information of the orbits, thus the mean motion resonance cannot be correctly reproduced. They also have different disadvantages. The orbit averaged method was used to study a limited type of stable hierarchical systems, e.g. stable hierarchical triples and the Lunar system. For a more general case like the hyperbolic encounters, systems with more than three bodies, or strongly perturbed few-body systems, to derive the equation of motion with high-order perturbation terms is unpractical. The slow-down method is much more flexible but it cannot avoid the issue of the singularity of Newtonian force, i.e., to integrate the motion of a high-eccentric binary, a large numerical error appears at the peri-center unless the integration step is significantly reduced.
The solution for the issue of singularity is to apply the regularization algorithm. The key idea of regularization is to remove the singularity by a transformation of the equation of motion. The Burdet-Heggie regularization (Burdet, 1967, 1968; Heggie, 1973) for solving the Kepler problem uses a time-transformation, , where is a fictitious time. By using the eccentric vector in the equation of motion together, the singularity term can be eliminated. Kustaanheimo & Stiefel (1965) introduce the KS regularization method, which transforms the equation of motion of the Kepler orbit to a form of harmonic oscillator without singularity. Mikkola & Aarseth (1996) show how to combine the KS regularization together with the slow-down method to have an efficient solution for integrating a few-body system. Mikkola & Tanikawa (1999) and Preto & Tremaine (1999) introduce the time-transformed explicit symplectic integrator (TSI) or “Algorithmic regularization” (AR), which can be used for any potential that only depends on the coordinates of particles.
Here we describe the TSI (AR) method in a bit more detail. The symplectic integrator can conserve the Hamiltonian and the angular momentum of a system. Thus it is very suitable for simulating the long-term evolution of a system. However, it requires a constant integration step. In the classical symplectic method, time step, , is also the integration step, . This leads to a low efficiency in integrating an eccentric Kepler orbit. In order to be accurately enough, has to be fixed to the smallest value determined at the pericenter. The solution is to apply a time transformation, , which decouples and with a function (e.g Hairer, 1997). Thus, can vary to avoid the issue of low efficiency while is fixed to keep the symplectic property. This method can be described by the extended phase space Hamiltonian, where is treated as a coordinate and need to be integrated. The disadvantage is that the time transformation usually results in an inseparable Hamiltonian and only the expensive implicit integrator can be used. Mikkola & Tanikawa (1999) and Preto & Tremaine (1999) find a solution by defining a specific type of (see Section 3) that the Hamiltonian can be written in a separable style, in order to use the explicit symplectic integrator. Especially, for an isolated binary system, if , where is the absolute value of the binary potential energy (similar like the Burdet-Heggie time transformation), the integrator behaviors dramatically well for the Kepler orbit, i.e., the numerical trajectory follows the exact one with a phase error of time.
In this work, we develop an efficient method for simulating few-body systems by combining the slow-down and the TSI (AR) schemes. In Section 2, we show the slow-down Hamiltonian and the equation of motion for several types of few-body systems, such as perturbed binaries, triples and general hierarchical systems. We demonstrate that the slow-down method can correctly reproduce the secular evolution and conserve the angular momentum. In Section 3, the TSI (AR) method is described in detail. The combination of two, the slow-down time-transformed symplectic method, is discussed in Section 4. The implementation and numerical tests are shown in Section 5 and 6. Finally, we discuss our results and draw conclusions in Section 7.
To be convenient, hereafter , , and represent coordinates, conjugate momenta, velocities and masses of particles separately. We define the phase-space vector as . The suffix of a variable using an index (e.g. , , , …) represents a specific particle while no suffix represents all particles in a -body system. For exmample, (, ,…, ).
2 Slow-down Hamiltonian
The slow-down method can be described by a modified Hamiltonian (Mikkola & Aarseth, 1996). For a perturbed binary, the slow-down Hamiltonian is
(1) |
where is the original Hamiltonian of the system, is the Hamiltonian of the binary and is the slow-down factor. The equation of motion is
(2) |
where is the Possion bracket. When , . The important point is that although the Hamiltonian is modified, keeps the original definition. Thus, the slow-down affects the time evolution of orbital phase, but the positions and velocities of particles are not scaled.
2.1 Perturbed binary system
We first consider a simple example of one binary with an external potential and a fixed ,
(3) |
where the suffixes “1” and “2” denote the two components of the binary, and is replaced by .
Applying Eq. 2, the evolution of and can be described by
(4) | |||||
Thus, in the reference frame of the perturber, the motion of binary is slowed down by a factor of , while in the view of the binary, the perturbation is enhanced by times. We can understand this better by considering the cumulative effect of perturbation to on one slow-down orbit.
The effective period of the slow-down binary has , where is the original period. By integrating of Eq. 4, the change of after one is
(5) |
In the case of no perturbation, . Thus
(6) |
When the effect of is weak,
(7) |
Then is only determined by the integrated effect of perturbation. Here only passes one cycle, but the integration time is . Thus, the effect the perturbation is amplified by times on one orbit of binary.
On the other hand, when is an integer, we can measure in the original case (no slow-down; denoted as ) after the same physical time by a summation of pieces of integral, where each piece represents one orbit:
(8) | ||||
If the perturbation does not change significantly,
(9) |
This means the effect of perturbation can be represented by the integration of one orbit () multiplied by times. Thus, it is equivalent to the treatment of the slow-down method and . In other words, the slow-down method approximates the perturbation in an orbit averaged way. However, when the external potential changes significantly within the time interval of , Eq. 9 becomes invalid. Thus, there is a threshold of . We discuss the criterion in Section 2.4.
2.2 Triple system
For a hierarchical triple,
(10) | ||||
where the suffixes “1” and “2” denote the two components of the inner binary and “3” represents the third body, and is the center-of-the-mass velocity of the inner binary. Because the slow-down affects only the internal motion of the binary in its rest frame, is subtracted from the slow-down term.
Applying Eq. 2 (with a fixed to Eq. 10), the evolution of and can be described by
-
•
binary components ():
(11) -
•
third body ():
(12)
The form of the third body is identical to the original one.

We demonstrate how the perturbation force is calculated in the slow-down and the original integration methods in Fig. 1. Along the binary orbit (one of the component), sample points with an equal angular separation are chosen for the demonstration. When the binary finish two cycles in the original case, each sample point has twice force calculations from the perturber at the corresponding positions shown with the same number along its track. In the slow-down case with , the binary finish one orbit when the perturber passes the same track. Thus, the corresponding position of the perturber (with same colors) for each sample point is different from that of the original case. If the sample points indicate the step sizes in an integrator, the slow-down method reduces the step sizes by times.
The two types of lines that connect the dark blue point represent one example of the perturbation calculation in the two methods separately. If the solid and dashed lines have very close length and direction, the slow-down method give a good approximation of the perturbation force. This is the case when the perturber is far away (), i.e., the perturbation is weak.
2.2.1 Orbit averaged Hamiltonian
For a hierarchical triple, we can also describe the slow-down method in terms of the orbit averaged method. By using the Legendre expansion for the perturbation term (e.g. Harrington, 1968; Naoz, et al., 2013; Naoz, 2016), can be written as the combination of three components:
(13) | ||||
where is the Legendre polynomials, the suffixes “in” and “out” indicate the inner and outer binaries, represents the semi-major axis, , , is the center-of-the-mass position of the inner binary and is the angle between and . The mass coefficient sequence,
(14) |
Using the Delaunay’s elements, the two binary terms of Hamiltonian have the form
(15) | ||||
where the conjugate momenta,
(16) | ||||
Applying the equation of motion, the time derivations of their corresponding coordinates, and , are
(17) | ||||
The effect of slow-down is reflected on the first term of , which represents the mean motion of the inner binary. Without the perturbation term, Eq. 17 indicates that the mean motion of the inner binary is times slower of that in the original case, as discussed in Section 2.1. The orbit averaged method uses a canonical transformation (Von Zeipel transformation) to remove the short-period terms ( and ) in (e.g. Naoz, et al., 2013):
(18) |
Since and do not appear in and and is independent of (the fixed) , the transformation results in the same form of in the slow-down and original cases. Thus, the slow-down method provides the same secular evolution as the orbit averaged way.
2.3 -body system with multiple slow-down binaries
For a general few-body system containing binaries, each binary can have an individual slow-down factor, . The slow-down Hamiltonian has the general form:
(19) | ||||
where the suffixes “” and “” represent the two components in the binary. To be convenient, we use the first indices to indicate binary components and others to indicate singles, i.e., “1,i” and “2,i” are equivalent to and separately.
Applying Eq. 2 with all being fixed, the equation of motion is
-
•
binary components ():
(20) -
•
single body ():
(21)
This general form suggests that only explicitly affects the internal motion of the binary . The force calculations of singles and other binaries do not explicitly depend on .
2.4 Varying in the integration
In previous sections, we assume that is constant. In many few-body systems, the perturbation to a binary can vary significantly, especially when a nearby perturber has a highly eccentric or hyperbolic orbit. Thus, varying during the integration is necessary to balance the performance and accuracy. Mikkola & Aarseth (1996) suggests to calculate based on the ratio between the tidal force from perturbers and the internal force of the binary assuming the separation is . For a system with one binary and perturbers, we define a modified version by including the eccentricity (),
(22) |
where is a constant coefficient.
Since this depends on , one might think that the additional terms of (, ) should appear in the equation of motion. However, these terms actually should not be included to ensure a correct secular evolution. In the case of a triple system, by applying Eq. 22 in the Hamiltonian form of Eq. 13,
(23) |
becomes to depend on (from ) in the same order as that of the perturbation term in with . The additional terms including then affects the orbital average of (Eq. 18), which may not result in the same secular evolution as the orbit averaged method.
On the other hand, when Eq. 9 is satisfied, is expected to evolve slowly in one step. As the first order approximation, can be treated as a temporary constant and is only updated at the end of one integration step. Essentially, is only a step function of time. Then the unwarranted effect can be avoided. We can describe this Jumping- method for a system with binaries as:
-
1.
advance with fixed measured at .
-
2.
update at the new time ;
-
3.
apply an instant correction of by
(24)
With the step (iii), even is not conserved, the cumulative numerical error of can still be properly tracked as
(25) |
where is the total step count.
In this method, although the unwarranted effect on the secular evolution is not included in one integration step, the instant change of may still introduce an additional effect. Thus, it is necessary to limit the change rate of for safety. We estimate how changes depending on the orbital parameters. With Eq. 22, the differential of ,
(26) | ||||
Typically, in the weak perturbation condition, does not change significantly but may vary a lot if the perturber has an eccentric or hyperbolic orbit. In the case of one perturber, Eq. 26 can be simplified as
(27) |
Thus, the time derivation of depends on . The evolution timescale is the order of the crossing time of the perturber.
The slow change of requires that the strength of perturbation does not vary significantly within at least one . Based on Eq. 27, we can introduce a timescale criterion to limit the maximum value of for safety:
(28) |
where is a constant coefficient; and represent the mass weighted average of velocities and positions of all perturbers referring to the center-of-the-mass of the binary separately. If a binary is the perturber, the mass weights help to remove the velocity fluctuations caused by the internal motion of the two components of the perturber. For the Jumping- method, Eq. 22 and 28 together provide the criterion to estimate . In Section 6, we show that the numerical tests by using the Jumping- method indeed provide a correct secular evolution.
2.5 Conserved quantities
2.5.1 Energy
It is important to know, with the irregular form of , what are conserved quantities during the evolution that can be used to check the quality of the integration. When is a constant, does not explicitly depend on time. Thus the “slow-down energy”, , is a conserved quantity, which means that the physical energy, , changes during the evolution. The variation of can be calculated by
(29) |
Thus, oscillates in a timescale of the secular evolution of the binaries.
When is not fixed, whether is conserved depends on how is evaluated. If follows Eq. 22 exactly and the equation of motion contains the additional terms of (, ), would not explicitly depend on time, thus is conserved. However, this also indicates that a significant variation of results in a large change of binary energy. Such behaviour is introduced by the unwarranted effect discussed in Section 2.4. Instead, the Jumping- method that exclude the additional term can avoid such problem, although explicitly depends on time and is not conserved. Since the physical energy is anyway not conserved, it is more important to ensure the correct behaviour of secular evolution rather than to conserve . On the other hand, we can still follow the integration error by using Eq. 25 in the absence of the energy conservation.
2.5.2 Angular momentum
The angular momentum defined by
(30) |
is a conserved quantity in the original case since
(31) |
where is a zero vector. Interestingly, it can be proved that is also conserved with (Eq. 19; see Appendix), i.e.
(32) |
This conservation is not only valid for an invariant . With the help of a symbolic calculator 111We use python.sympy to prove Eq. 32., it can be shown that for defined in Eq. 22, Eq. 32 is also satisfied. On the other hand, if explicitly depends on time, is still conserved because the differential in Eq. 32 is independent of time. Thus, is generally conserved in the slow-down method and can be used to validate the quality of the integration.
3 Time transformed symplectic (AR) method
The TSI (AR) method is accurate for solving the long-term evolution of few-body systems. It can be described by the extended phase-space Hamiltonian (e.g. Hairer, 1997; Preto & Tremaine, 1999):
(33) |
where is the standard Hamiltonian and is time-transformation function. The extended phase-space vector, , is defined by including an additional pair of the coordinate, , and the conjugate momentum, (negative initial energy). is the initial value of .
With the new differential variable ,
(34) |
A special type of introduced by Preto & Tremaine (1999),
(35) |
leads to a separable :
(36) |
where the kinetic energy, , and the potential energy, .
Putting in the equation of motion,
(37) |
the derivatives of with respect to are
(38) |

Preto & Tremaine (1999) and Mikkola & Tanikawa (1999) showed that by choosing
(39) |
the Leap-Frog method with drift-kick-drift (DKD) mode can ensure that the numerical trajectory of a Kepler orbit follows the exact one, , with only a phase error of time. Hereafter we use “LogH” to represent this algorithm. If the time error is not important, the LogH method is very efficient to integrate a weakly perturbed Kepler orbit. Fig. 2 shows the schedule of one DKD loop.
When does not explicitly depends on , , and . Thus . Mikkola & Aarseth (2002) found that instead of calculating , one can also define a variable,
(40) |
Then . The integration schedule of this method for one DKD step is shown in Fig. 3.

3.1 Geometric feature
Via the Taylor expansion, Eq. 35 can be approximated as (Preto & Tremaine, 1999)
(41) |
By applying Eq. 39 for a Kepler orbit system, the relation between and is
(42) |
This is equivalent to the case in Burdet-Heggie regularization method (Burdet, 1967, 1968; Heggie, 1973). It can be shown that this time transformation can remove the singularity by including the energy and the eccentric vector in the equation of motion. This suggests that the LogH method can well handle the high-eccentric orbit.
On the other hand, we can show that has a geometric meaning. For a Kepler orbit.
(43) |
where is eccentric anomaly. If indicates time zero, the relation between and is
(44) |
The differential of this equation results in
(45) |
By using Eq. 43, the time derivative of is
(46) |
This suggests that represents a scaled :
(47) |
Thus, the fixed in the symplectic integrator indicates a constant step of . Since is unknown before the integration finish, it is difficult to determine to stop the integration at a given . However, the geometric meaning of provides a way to stop at a certain . This is very useful for determining the number of steps per orbit in order to control the numerical accuracy of the integration.
3.2 Conservation of energy
Although the LogH method ensures that the numerical trajectory follows the exact Kepler orbit, the numerical is not perfectly conserved. Especially, when the orbit reaches the pericenter, the error of is large due to the truncation of floating points. Actually, based on the definition, the exact conserved “energy” is . With Eq. 33, 39 and 41,
(48) |
Since reaches the minimum at the pericenter, the large error of is cancelled out in . In Section 6, we show the numerical test of such behaviour. This feature indicates that we should avoid the calculation the orbital parameters or stop the integration at the pericenter in order to avoid a large numerical error of the orbital elements.
4 Slow-Down time-transformed symplectic (SDAR) method
The slow-down method helps to solve the large timescale issue of a hierarchical system, while the TSI (AR) method can conserve and . The combination of two (SDAR method) is expected to be an efficient algorithm to deal with the long-term evolution of few-body systems. In the TSI method, can take any separable Hamiltonian, thus it is straight forward to implement into . With Eq. 19 and 36, we can obtain the time transformed slow-down Hamiltonian for a -body system with binaries:
(49) | ||||
where
(50) | ||||
The equation of motion of is the same as Eq. 38 except that and are replaced by and separately.
5 Implementation
Based on the SDAR method, we develop a software library, sdar, written in the C++ language with the object oriented programming 222URL: https://github.com/lwang-astro/SDAR. This library contains three modules: ar, hermite and kepler.
ar is the implementation of the SDAR method shown in Eq. 50 with the Jumping- algorithm. The high-order explicit symplectic integrator introduced by Yoshida (1990) is used. Both the LogH and the Mikkola & Aarseth (2002) methods are implemented.
hermite is a hybrid integrator which combines a order block-time-step Hermite method and the ar module. The Hermite integrator is for the global -body system and ar deals with the compact subgroups (few-body systems). The subgroup can contain inner binaries with individual , while the system as a whole can also apply the slow-down method if it has a periodical evolution. Thus, hermite allows a nested two-level slow-down treatment. This can accelerate the integration of a weakly perturbed stable hierarchical system.
kepler is a tool to construct a Hierarchical (Kepler) binary tree for a group of particles. It is used to identify the inner binaries and calculate .
The quadruple-double precision library, qd (Hida, Li & Bailey, 2001), is included in the code. Thus the user can switch on the high-precision support (up to -digit precision). Notice that when qd is used, the performance is reduced and also it is not thread-safe.
6 Numerical test

In this section, we check whether the slow-down method can correctly reproduce the secular evolution of few-body systems. The comparison between the slow-down and original algorithms is done by using the ar module with the -order symplectic method (Solution A in Table 1 from Yoshida, 1990). We use the Delaunay’s elements to describe the geometric information of the binary orbits. By selecting the Cartesian coordinate system (--), the three angles are (see Fig. 4):
-
•
: inclination; the angle from -axis to .
-
•
: longitude of the ascending node (often denoted as ); the angle from -axis to the intersection of the orbital plane and the - plane (-axis).
-
•
: argument of periapsis (often denoted as ); the angle from eccentric vector to the -axis.
6.1 Hierarchical triple (B-S)
The Kozai-Lidov effect is one of the most important feature appearing in a family of hierarchical triple systems (Kozai, 1962; Lidov, 1962). For example, when the outer binary has a circular orbit and the secondary of the inner binary has a negligible mass compared to the other two bodies, the component of the orbit averaged angular momentum of the inner binary is a conserved quantity:
(52) |
Where the axis is defined in the invariable plane. When is in the range of , significant oscillations of and can happen. In the astrophysical environment, such oscillation can result in a high eccentricity that may trigger the merger of the inner binary. Thus, it is important to validate that the slow-down method can correctly reproduce the Kozai-Lidov effect.
We perform a simulation of a hierarchical triple (B-S). The formula from Antognini (2015) is used to estimate the Kozai-Lidov oscillation timescale:
(53) |
For the purpose of test, parameters which allow a large and a short is preferred. Thus, smaller and or higher eccentricity of outer binary are better. However, the former also reduce the maximum (Eq. 22), thus the latter is good for both requirements.
One suitable initial condition is shown in Table 1, where . For convenience, we use the scale-free unit (gravitational constant is one). This is also applied for all numerical tests discussed below.
in | 0.900 | 0.100 | 0.00100 | 0.900 | 1.50 | 0.00 | 0.00 | 3.14 | |
out | 2.00 | 1.00 | 1.00 | 0.990 | 0.10 | 0.00 | 0.00 | 3.14 | 3.63 |
Both the inner and outer binaries are initially near the apo-centre positions (). By choosing as suggested by Mikkola & Aarseth (1996) in Eq. 22, when the outer body is at the apo-centers. As the outer eccentricity, , is large, decreases to below one based on Eq. 22 at the pericenter position. This should be avoided, thus we let . To obtain a high numerical accuracy, we use steps per orbit of the inner binary. This results in . To reach about , the total number of integration step without slow-down is about . In the slow-down case, it is about steps which is times smaller.

Fig. 5 shows the simulation result of the B-S system by using the LogH method with and without slow-down (hereafter named as “SD” and “ORG” methods) 333The scientific notation in the plotting style of -axis (described in Fig. 5) is defined by the python module matplotlib.ticker (see https://matplotlib.org/ for reference). In all figures, we follow this style in order to save space.. The Kozai-Lidov oscillation appears in the evolution of the orbital parameters. The comparison between red (SD) and black (ORG) curves clearly indicates that the SD method can well reproduce the Kozai-Lidov effect with the correct timescale. All orbital parameters, including , and three Euler angles of both inner and outer binaries are consistent with each others. The oscillation timescale is not exacted as predicted by Eq. 53. Since the secondary of the inner binary has a small but none zero mass, the B-S system does not exactly satisfy the test-particle condition that is assumed in Eq. 53.

There are a few sharp peaks in the evolution of and . This is due to the low time resolution of the plotting (only few thousands data points along the -axis). Fig. 6 shows the high-time-resolution evolution of and with in by using the ORG method. When the inner binary passes the pericenter, sharp peaks appear. The amplitude of peaks depends on the orbital phase of both inner and outer binaries. Since the time interval of one peak is very short, most of the peaks are not sampled in the low-time-resolution plot and they appear by chance. These peaks also exist in other orbital parameters but cannot be seen in the plots due to a large amplitude of the secular variation. As the peaks do not affect the secular evolution, they can be safely ignored.

oscillates when the third body cycles between the apo-center and the pericenter, as shown in the upper panel of Fig. 7. The evolution of follows the pattern of as described by Eq. 29. Although the scatter of is large, the behaviour of the secular evolution is correct. This indicates that whether is conserved does not matter.

However, we still can trace the numerical error by using . In Fig. 8 the evolution of the cumulative numerical errors of different definitions of Hamiltonian, , and , are compared. is the error of original Hamiltonian, defined as . After pass the maximum value for the first time, large oscillations appears on both and . of the SD method has a much larger scatter compared to the ORG method, while in the case of , both have a similar amplitude. This is consistent with the expectation as discussed in Section 2.5.1. On the other hand, the scatter of or is two order of magnitude smaller than without oscillations, which indicates that the conserved quantities are (ORG) and (SD) within one integration step. Thus, represents the numerical errors of the integrator.

The angular momentum conservation is also checked in Fig. 9. The normalized cumulative error of three components,
(54) |
and the total one,
(55) |
are shown. Both the SD and the ORG methods provide a similar level of relative numerical errors () in the three components of and also in . Besides, the error is independent of the variation of . This is consistent as we proved in Section 2.5.2.
6.2 Hierarchical quadruple (B-B)
The mean motion resonance cannot be properly reproduced by the slow-down method. When there are multiple binaries, the orbital resonance between inner binaries can occur if their periods are in resonance ratios. We investigate this effect by simulating a quadruple system (B-B). The initial condition (Table 2) is generated by splitting the third body of the B-S system to a binary, which has the same period as another. Here after the suffixes “in1” and “in2” indicate the two inner binaries. of the two binaries are about and . We evolve the system to with the same used in the integration of the B-S system. The ORG method takes about steps while the SD method takes about steps ( times faster).
in1 | 0.900 | 0.100 | 0.00100 | 0.900 | 1.50 | 0.00 | 0.00 | 3.14 | |
in2 | 1.800 | 0.200 | 0.00126 | 0.900 | 0.10 | 0.00 | 0.00 | 3.14 | |
out | 2.00 | 1.00 | 1.00 | 0.990 | 0.100 | 0.00 | 0.00 | 3.14 | 3.63 |

The orbital evolution is shown in Fig. 10. of the simulated result is a much larger than the prediction of Eq. 53. The behaviour of the first inner binary is similar to the case of the B-S system. Compared to the case of B-S system, the cumulative divergence of for the SD and ORG methods becomes obvious. After about two , the relative difference is the order of for and . However, this error can be neglected since the Kozai-Lidov effect dominates the secular evolution. Thus, the SD method can still provide a reasonable result.

On the other hand, since of two inner binaries do not evolve significantly, it is easy to observe the difference caused by the orbital resonance between the SD and the ORG method. Although the SD method cannot keep the original period ratio of the two binaries, the mean motion resonance still exist because of the two binaries are related by Eq. 22. The upper panel of Fig. 11 shows the variation of , where is twice of . Therefore, the period ratio changes from to . Since the orbits are slowed down, the resonance becomes stronger, which results in the larger drift in the SD case.
keeps the order of . Both SD and ORG methods show jumps when passes the maximum value due to the large numerical error at the pericenter of the first inner binary. Such error can be reduced with a smaller (not shown here). The behaviour of is independent of and its relative error has an order of .
6.3 Hyperbolic encounter (HB-B)
in1 | 0.900 | 0.100 | 0.00100 | 0.900 | 1.50 | 0.00 | 0.00 | 3.14 | |
in2 | 0.00900 | 0.00100 | 0.00200 | 0.900 | 1.50 | 0.00 | 0.00 | 3.00, 3.50, 3.14 | |
out | 1.00 | 0.0100 | -1.00 | 1.02500 | 0.100 | 0.00 | 0.00 | -2.00 | 1.71 |
In star clusters, hyperbolic encounters between stars and binaries are frequent. Thus we investigate whether the slow-down method can provide an acceptable result in such case. The encounter happens in a short time interval. When a perturber is far away, the binary has a weak perturbation so that is large. Once the encounter starts, drops fast. Thus, it is necessary to limit the change rate of , for example, by using the timescale criterion (Eq. 28).
We test a hyperbolic encounter between a massive binary and a low-mass binary (HB-B). The initial condition is shown in Table 3. The mass ratio between the two inner binaries is . The hyperbolic (outer) orbit has an initial separation of and a pericenter distance of ( times of ). Initially so that the time to reach the pericenter is about . Based on Eq. 22, has the maximum value of about and can reaches the minimum limit of . Thus, varies about four order of magnitude in one encounter. By using the timescale criterion with in Eq. 28, is limited to about , which is one magnitude smaller.
Due to the high mass ratio, the second inner binary feel a strong perturbation from the first inner binary. The final fate of the second binary depends on its orbital phase during the encounter. In the ORG case, three values of are used to test the effect of orbital phases. The SD model use the third value of listed in Table 3.
The result of orbital revolution is shown in Fig. 12. After the encounter, a jump appears in all orbital parameters. The initial significantly influences the final orbit of the secondary inner binary (a large divergence appears). However, the SD and ORG method (SD-3 and ORG-3) can provide a similar result when the initial are same (). Because the SD method loses the real orbital phase of the first binary, the result suggests that although the first binary is much more massive, its orbital phase has a minor impact on the evolution of the second binary. Therefore, the SD method can provide an acceptable result.

The upper panel of 13 compared (for the SD-3 model) calculated by the perturbation criterion (Eq. 22) and by both the perturbation and the timescale criterion. The timescale criterion ensures that changes more smoothly during the encounter. has a larger error of () compared to at the beginning because is large. It would be worse if the timescale criterion is not applied. Although is not small, is still well conserved (error has an order of ), which again suggests that the conservation of is independent of .

With , the ORG method requires about steps to reach while the SD method only needs steps. Thus, the SD method provides a times faster performance. Notice here we only evolve the system in a short time interval around the time of encounter. In a star cluster, most of the time the binaries are weakly perturbed, thus averagely . Therefore, the total integration steps of binaries are significantly reduced during the long-term evolution. This example suggests that in the simulation of star clusters with many binaries, the SD method can dramatically improves the performance while the statistical result of encounters can be well reproduced.
7 Discussion and conclusion
In this work, we mathematically and numerically describe the slow-down time-transformed explicit symplectic (SDAR) method. It combines the benefit of the symplectic integrator which conserves the Hamiltonian and angular momentum and the high efficiency of the slow-down method to handle the long-term evolution of hierarchical systems and close encounters. An implementation of the method written in the c++ language, sdar, is publicly available. The code modularized for easily plugging in other -body codes.
The Hamiltonian and the corresponding equation of motion are discussed in detail. Although the physical energy () is not conserved, the method can provide a correct secular evolution. We mathematically prove that is always conserved with the slow-down method. We also discussed how to measure the numerical error, , in the absence of energy conservation.
We show that in the LogH method, for a Kepler orbit the integration step has the geometric meaning of eccentric anomaly(Eq. 47). Using this feature, we can determine the number of steps per orbit by setting using Eq. 47. This is very useful for controlling the integration error.
On the other hand, when the LogH method is implemented in a hybrid -body integrator, it is necessary to ensure that the integration can stop at a given time, in order to calculate the interactions between the members of few-body systems and the global system. However, because time is an integrated value, before the integration finishes, the next time is unknown. A few iteration of integration is needed to converge the next time to a certain value with a given limit of error. Such iteration can be expensive if the time synchronization is frequent. Thus, in order to avoid too many synchronization requests, it is necessary to design a good criterion for determination of the subsystems that need to be handled by the SDAR method. Especially, the number of iteration steps should be much less than the number of integration steps.
By using the ar code, we show three numerical examples (B-S, B-B and HB-B) to indicate that the SDAR method can well reproduce the Kozai-Lidov oscillation and can give an acceptable result of a hyperbolic encounter between two binaries. When the averaged value of is large, the slow-down method can provide significant performance improvement. Especially, for binaries with weak perturbations, the method can provide a few order of magnitude less integration steps. Thus, by combining this algorithm in an hybrid integrator for simulating a large -body system, it is expected that a large fraction of binaries and hierarchical systems can be efficiently handled. Such a code will be available soon in our following-up work.
Acknowledgments
L.W. thanks the financial support from JSPS International Research Fellow (School of Science, The university of Tokyo).
References
- Aarseth (2003) Aarseth S. J., 2003, Gravitational N-Body Simulations, Cambridge University Press
- Antognini (2015) Antognini J. M. O., 2015, MNRAS, 452, 3610
- Antonini, et al. (2016) Antonini F., Chatterjee S., Rodriguez C. L., Morscher M., Pattabiraman B., Kalogera V., Rasio F. A., 2016, ApJ, 816, 65
- Askar, Szkudlarek, Gondek-Rosińska, Giersz & Bulik (2017) Askar A., Szkudlarek M., Gondek-Rosińska D., Giersz M., Bulik T., 2017, MNRAS, 464, L36
- Bailyn (1995) Bailyn C. D., 1995, ARA&A, 33, 133
- Banerjee, Baumgardt & Kroupa (2010) Banerjee S., Baumgardt H., Kroupa P., 2010, MNRAS, 402, 371
- Breen & Heggie (2013) Breen P. G., Heggie D. C., 2013, MNRAS, 432, 2779
- Binney & Tremaine (1987) Binney J., Tremaine S., 1987, Princeton, NJ, Princeton University Press
- Burdet (1967) Burdet C. A., 1967, ZaMP, 18, 434
- Burdet (1968) Burdet C. A., 1968, ZaMP, 19, 345
- Davies, Piotto & de Angeli (2004) Davies M. B., Piotto G., de Angeli F., 2004, MNRAS, 349, 129
- Di Carlo, et al. (2019) Di Carlo U. N., Giacobbo N., Mapelli M., Pasquato M., Spera M., Wang L., Haardt F., 2019, MNRAS, 487, 2947
- Fujii & Portegies Zwart (2011) Fujii M. S., Portegies Zwart S., 2011, Sci, 334, 1380
- Gualandris, Portegies Zwart & Sipior (2005) Gualandris A., Portegies Zwart S., Sipior M. S., 2005, MNRAS, 363, 223
- Gvaramadze, Gualandris & Portegies Zwart (2009) Gvaramadze V. V., Gualandris A., Portegies Zwart S., 2009, MNRAS, 396, 570
- Hairer (1997) Hairer, E., 1997, Applied Numerical Mathematics, 25, 219-227
- Harrington (1968) Harrington R. S., 1968, AJ, 73, 190
- Heggie (1973) Heggie D. C., 1973, ASSL, 34, ASSL…39
- Heggie (1975) Heggie D. C., 1975, MNRAS, 173, 729
- Heggie & Giersz (2008) Heggie D. C., Giersz M., 2008, MNRAS, 389, 1858
- Hénon (1961) Hénon M., 1961, AnAp, 24, 369
- Hida, Li & Bailey (2001) Hida Y., Li X. S., Bailey D. H., 2001, ”Algorithms for quad-double precision floating point arithmetic,” Proceedings 15th IEEE Symposium on Computer Arithmetic. ARITH-15 2001, Vail, CO, USA, 2001, pp. 155-162.
- Hills (1975) Hills J. G., 1975, AJ, 80, 809
- Hurley, et al. (2005) Hurley J. R., Pols O. R., Aarseth S. J., Tout C. A., 2005, MNRAS, 363, 293
- Hypki & Giersz (2013) Hypki A., Giersz M., 2013, MNRAS, 429, 1221
- Kozai (1962) Kozai Y., 1962, AJ, 67, 591
- Kustaanheimo & Stiefel (1965) Kustaanheimo P., Stiefel E., 1965, J. Reine Angew. Math., 218, 204
- Leigh, Sills & Knigge (2011) Leigh N., Sills A., Knigge C., 2011, MNRAS, 416, 1410
- Leonard & Duncan (1988) Leonard P. J. T., Duncan M. J., 1988, AJ, 96, 222
- Leonard & Duncan (1990) Leonard P. J. T., Duncan M. J., 1990, AJ, 99, 608
- Lidov (1962) Lidov M. L., 1962, P&SS, 9, 719
- Mikkola & Aarseth (1996) Mikkola S., Aarseth S. J., 1996, CeMDA, 64, 197
- Mikkola & Tanikawa (1999) Mikkola S., Tanikawa K., 1999, MNRAS, 310, 745
- Mikkola & Aarseth (2002) Mikkola S., Aarseth S., 2002, CeMDA, 84, 343
- Naoz, et al. (2013) Naoz S., Farr W. M., Lithwick Y., Rasio F. A., Teyssandier J., 2013, MNRAS, 431, 2155
- Naoz (2016) Naoz S., 2016, ARA&A, 54, 441
- Spitzer (1987) Spitzer L., 1987, Dynamical evolution of globular clusters, Princeton University Press
- O’Leary et al. (2006) O’Leary R. M., Rasio F. A., Fregeau J. M., Ivanova N., O’Shaughnessy R., 2006, ApJ, 637, 937
- Portegies Zwart & McMillan (2000) Portegies Zwart S. F., McMillan S. L. W., 2000, ApJL, 528, L17
- Poveda, Ruiz & Allen (1967) Poveda A., Ruiz J., Allen C., 1967, BOTT, 4, 86
- Preto & Tremaine (1999) Preto M., Tremaine S., 1999, AJ, 118, 2532
- Wang (2020) Wang L., 2020, MNRAS, 491, 2413
- Yoshida (1990) Yoshida H., 1990, PhLA, 150, 262
- Yu & Tremaine (2003) Yu Q., Tremaine S., 2003, ApJ, 599, 1129
Appendix A Proof for the conservation of angular momentum
Here we provide the proof for the conservation of angular momentum in the slow-down method. First, the conservation of angular momentum for an isolated binary can be described as
(56) | ||||
where , are the angular momentum and Hamiltonian of a binary system in the center-of-the-mass frame.
After a slow-down factor is included,
(57) |
is still conserved. When the center-of-the-mass term is included,
(58) | ||||
it can be shown that the conservation (Eq. 56) still exists.
If a new body is added to form a triple, the additional term appears in the angular momentum:
(59) |
Then
(60) |
Since is independent of binary position and velocity,
(61) |
The additional term to from the third body is
(62) |
It can be proved that
(63) |
Thus,
(64) |
The angular momentum is conserved for the triple.
For systems with one binary and many singles, particles can be added one by one, and for the particle, the additional Hamiltonian term is
(65) |
Since the second term in is a linear combination of pair potential energy, it is not difficult to show that
(66) |
Eventually,
(67) |
Thus, is conserved in such system.
On the other hand, here we add many singles to a slow-down binary and indicate that is conserved. We can consider this process in an opposite way: add one slow-down binary to a systems of many singles, the new is still conserved. Thus, it can be proved that adding arbitrary slow-down binaries to the systems, is always conserved.