Should $N$-body integrators be symplectic everywhere in phase space?
David M. Hernandez (Harvard-Smithsonian CfA)

TL;DR
This paper examines the impact of breaking symplecticity in hybrid $N$-body integrators, demonstrating that such violations can undermine their advantages and proposing a solution via Lipschitz continuity to preserve symplectic properties.
Contribution
It identifies how symplecticity breaks in hybrid integrators affect their benefits and introduces a method to maintain symplecticity through Lipschitz continuity in equations of motion.
Findings
Symplecticity breaks at few points can destroy integrator benefits.
Requiring Lipschitz continuity preserves symplectic structure.
Broken symplecticity should be acknowledged by $N$-body simulators.
Abstract
Symplectic integrators are the preferred method of solving conservative -body problems in cosmological, stellar cluster, and planetary system simulations because of their superior error properties and ability to compute orbital stability. Newtonian gravity is scale free, and there is no preferred time or length scale: this is at odds with construction of traditional symplectic integrators, in which there is an explicit timescale in the time-step. Additional timescales have been incorporated into symplectic integration using various techniques, such as hybrid methods and potential decompositions in planetary astrophysics, integrator sub-cycling in cosmology, and block time-stepping in stellar astrophysics, at the cost of breaking or potentially breaking symplecticity at a few points in phase space. The justification provided, if any, for this procedure is that these trouble pointsâŚ
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Should -body integrators be symplectic everywhere in phase space?
David M. Hernandez
HarvardâSmithsonian Center for Astrophysics, 60 Garden St., MS 51, Cambridge, MA 02138, USA Email: [email protected]
Abstract
Symplectic integrators are the preferred method of solving conservative -body problems in cosmological, stellar cluster, and planetary system simulations because of their superior error properties and ability to compute orbital stability. Newtonian gravity is scale free, and there is no preferred time or length scale: this is at odds with construction of traditional symplectic integrators, in which there is an explicit timescale in the time-step. Additional timescales have been incorporated into symplectic integration using various techniques, such as hybrid methods and potential decompositions in planetary astrophysics, integrator sub-cycling in cosmology, and block time-stepping in stellar astrophysics, at the cost of breaking or potentially breaking symplecticity at a few points in phase space. The justification provided, if any, for this procedure is that these trouble points where the symplectic structure is broken should be rarely or never encountered in practice. We consider the case of hybrid integrators, which are used ubiquitously in astrophysics and other fields, to show that symplecticity breaks at a few points are sufficient to destroy beneficial properties of symplectic integrators, which is at odds with some statements in the literature. We show how to solve this problem in the case of hybrid integrators by requiring Lipschitz continuity of the equations of motion. For other techniques, like time step subdivision, consequences to this this problem are not explored here, and the fact that symplectic structure is broken should be taken into account by -body simulators, who may find an alternative non-symplectic integrator performs similarly.
keywords:
methods: numericalâcelestial mechanicsâglobular clusters: generalâgalaxies:evolutionâGalaxy: kinematics and dynamicsâ-planets and satellites: dynamical evolution and stability
1 Introduction
The -body problem is the problem of solving for the motion in time of -point particles, interacting through pairwise gravitational forces. This problem describes, at 0th order, a wide range of astrophysical dynamics, from the motion of stars in galaxies, to planets orbiting stars (Heggie & Hut, 2003). Since the -body problem is generally non-integrable, astrophysicists have employed a number of approximate techniques to solve it. Perhaps the most robust and successful program to solve the -body problem is to use numerical integrators which approximately solve the system of -body ordinary differential equations. Other approaches exist and have been used with varied levels of success. One can solve the collisionless Boltzmann equation for dark matter (Hahn et al., 2013), treating the dark matter as a collisionless fluid. The Fokker-Planck approximation solves the Boltzmann equation with a collision term and can be applied to stellar clusters (Binney & Tremaine, 2008). -body secular behavior can be studied by orbit-averaging Hamiltonians (Hamers & Portegies Zwart, 2016).
Numerical integrators suffer from errors due to their approximations, and also from errors due to the limitations of computer memory and the amount of digits a computer can store for a number. Thus, their arithmetic is not exactly precise. Symplectic integrators have been employed in astrophysics since at least the 1980âs and have been a preferred integrator for describing a wide range of dynamics. Symplectic integrators preserve geometric features (Hairer et al., 2006) in phase space of the ordinary differential equations they solve. As a result, they have excellent error properties and reproduce orbits faithfully. Symplectic integrators are used for long term investigations of Solar System chaos and for cosmological simulations, among many other uses. In their traditional construction, for example, by operator splitting (Yoshida, 1990), they require an input timescale in the form of a timestep. However, Newtonian gravity has no characteristic time of length scale so this input timestep is generally unphysical. This problem can be mitigated by decomposing the -body problem into -body problems (Hernandez & Bertschinger, 2015; Hernandez, 2016). For problems with well-defined timescales, like the planets orbiting the Sun, a traditional symplectic integrator with a timestep of, say, 1 year, is highly successful for studying the long-term dynamics of this problem (Wisdom & Holman, 1991; Hernandez & Dehnen, 2017). For other problems that involve binary stars or scattering of planets, a given timestep runs the risk of being unable to resolve these dynamical phenomena. At the same time, using too small a timestep can be computationally prohibitive.
Because of the extreme limitation of specifying a timescale, astrophysicists developed new methods that can introduce additional timescales into symplectic integrators. Block timestep integrators (Farr & Bertschinger, 2007), hybrid symplectic integrators (Chambers, 1999), timestep subdivision methods (Springel, 2005), and potential decomposition methods (Duncan et al., 1998) are examples of methods that have become standard in the dynamical astrophysics toolbox. However, there is a cost to using these methods: symplecticity can be broken at some number of phase space points. Some have justified the use of these methods by noting the problem points are rare and should not pose practical problems, while others have not acknowledged any potential problems.
We test the assumption that breaking symplecticity at a finite number of points is not problematic in this paper. While the results apply to all the multiple timescale methods above, we focus on hybrid integrators in this paper. These integrators use a transition function to switch from a method with a long time scale to a method that resolves short timescales. The transition function determines if the integrator breaks symplecticity at a number of points, while remaining symplectic elsewhere. We show the hybrid integrators with symplecticity breaks perform substantially worse than the fully symplectic hybrid integrators. -body code developers and users should be aware of the impact of breaking symplecticity at some points which can make their supposed symplectic code behave similarly to non-symplectic alternatives. For hybrid integrators, fortunately, full symplecticity is ensured by enforcing Lipschitz continuity of the equations of motion. In the case of block or multiple time-stepping schemes, we do not present a solution to their limitation.
In Section 2 we discuss the Kepler problem and how symplectic Euler can be used to solve it. We define symplectic maps according to whether the Hamiltonian ordinary differential equations are Lipschitz continuous. Then we present a hybrid integrator to solve the Kepler problem. In Section 3 we present the switching functions we use, some yielding symplectic integrators and some not. In Section 4, we present numerical experiments with the hybrid integrators. We show only the fully symplectic ones have the desired stability properties. We conclude in Section 5.
2 Solving the Kepler problem
The Kepler problem describes the two-body problem, in which the bodies are treated as point particles, and they interact through Newtonian gravity. This problem has six degrees of freedom, three describing the relative motion of the bodies, and three describing the center of mass coordinates. The latter three are removed by a Galilean transformation to the center of mass frame. In spherical polar coordinates, we use the fact that the angular momentum is conserved to deduce the motion is planar and rotate to the plane of motion. In polar coordinates, the angular momentum is seen to be a constant, so our final system is an integrable, one-degree of freedom system. We choose a simplified system of units, similar to -body units (Heggie & Hut, 2003). In that case, the gravitational constant , the total mass and total energy is (putting a constraint on the virial radius). In our case, the reduced mass, , the gravitational constant is reciprocal to the total mass , and the semi-major axis . The Hamiltonian is then,
[TABLE]
where is the distance from the focus at the origin, and is its conjugate momentum, , where indicates the time derivative of . is the angular momentum, conjugate to the polar angle. In terms of the eccentricity, it is for elliptic motion, and for hyperbolic motion. For parabolic motion, . Hyperbolic orbits have . We concern ourselves with elliptic motion in this work to study periodic motion. The value of the Hamiltonian is and the period is .
In this paper, we will also relax the assumption that is constant. In this case, the Hamiltonian has two degrees of freedom, described by the vector . In the same units, the Hamiltonian is
[TABLE]
The coordinate systems are related by and .
2.1 ArnoldâLiouville theorem and symplecticity
A Hamiltonian is a function that does not need to be continuous. Hamiltonâs equations are a coupled set of first order ordinary differential equations (ODEs):
[TABLE]
Consider the Hamiltonian, , where is the Heaviside function. In the motion in time, there is a jump discontinuity in , so that the trajectory is defined everywhere except at a point . In astrophysics, we are frequently concerned with periodic orbits for which action-angle variables are defined. Two examples of periodic orbits are Kepler orbits and the orbits in Stäckel potentials, which are models of galactic potentials. The notion of an integrable Hamiltonian exists if the ArnoldâLiouville theorem holds, which places restrictions on the Hamiltonian. Arnaud & Xue (2016) show it is sufficient that the Hamiltonian is of class for the ArnoldâLiouville theorem to hold. means the Hamiltonian is at least continuously differentiable in phase space once, or , and those derivatives are Lipschitz continuous. This is weaker than a requirement of the Hamiltonian. Lipschitz continuity is a stronger condition than continuity. It places a bound on the variation of a function and ensures the existence and uniqueness of a solution to ODEs like Eq. (3), according to the CauchyâLipschitz theorem.
Let be one of the differential equations in (3), where is a phase space vector. The number of degrees of freedom is . If is Lipschitz continuous, there exists a positive constant such that,
[TABLE]
for all . is the maximum of . In the Lipschitz condition, the independent variable, time in our case, is less of a concern, and we will concern ourselves with autonomous Hamiltonians anyway. The Kepler Hamiltonian is when is restricted to . Similarly, the -body Hamiltonian is for the domain where particle separations are greater than 0.
Symplecticity is a statement about conservation of invariants; when they are smooth, they are denoted PoincarÊ invariants. Hamiltonian flow is symplectic. In classical mechanics and astrophysics, the symplecticity is often described by the Jacobian matrix (Farr & Bertschinger, 2007; Sussman & Wisdom, 2001; Hernandez & Bertschinger, 2015; Hairer et al., 2006). If a Hamiltonian is smooth enough, any map of phase space onto itself has an associated Jacobian matrix of size . This Jacobian matrix has constraints if the map is derived from a time-independent Hamiltonian. The constraints are summarized by,
[TABLE]
where the form of the constant matrix depends on the phase space basis. By conserving PoincarÊ invariants, symplectic integrators can aid the study of orbital stability while conventional integrators cannot, and symplectic integrators ensure bounded energy error (Hairer et al., 2006).
We find our first difficulty: if the Hamiltonian ODEs are Lipschitz continuous, Rademacherâs theorem guarantees the existence of a Jacobian matrix almost everywhere, but not everywhere. This is a limitation of using Eq. (5) as a description of symplecticity. In fact, a notion of symplecticity exists even when the Hamiltonian is (Buhovsky et al., 2018). In this paper, we define symplectic integrators as those associated with Hamiltonians of smoothness of at least , because these are known to satisfy the ArnoldâLiouville theorem, which applies to the -body problem. Our numerical experiments support that this minimum smoothness is required for periodic orbits to exist, with some caveats we describe.
HĂŠnon & Wisdom (1983) studied a map describing a billiard table with discontinuous curvature. The Jacobian was not defined everywhere and the emergence of chaos was observed.
2.2 Symplectic integration of Kepler problem
Eq. (1) is solved with Hamiltonâs equations:
[TABLE]
Solving for the motion in time explicitly is possible, since the problem is integrable, but is inconvenient. A more convenient solution involves solving the implicit Kepler equation, whose form depends on whether the motion is elliptic or hyperbolic. The Kepler equation is implicit, so to solve it, one usually guesses a solution, and iterates to refine it. By transforming the time variable to a universal variable (Danby, 1988), a generalization of the Kepler equation can be written that doesnât depend on whether the motion is bound.
For the purposes of exploring hybrid symplectic integrators, we instead solve (1) using a symplectic Euler method (Hairer et al., 2006), using operator splitting. Thus, we now solve two Hamiltonians,
[TABLE]
successively, which gives an approximation to the solution (1); the energy error is accurate to first order in the time of integration, or the timestep (Hairer et al., 2006). Note . Of course, and are still integrable, but their respective solutions from Hamiltonâs equations are now trivial to write. We require and to be Lipschitz in order for the integrator to be considered symplectic according to our definition. For an example of how symplectic Euler works, see Hernandez & Bertschinger (2015). In more precise notation, let the phase space be , the updated phase space, the timestep, and , where is the total time, a multiple of . The integrator can be represented as,
[TABLE]
where is an operator. A symplectic map can be studied outside the context of a computer and its finite memory. Its dynamics are specified exactly through its modified differential equation (Hernandez & Bertschinger, 2018; Hairer et al., 2006).
2.3 Hybrid symplectic integration of the Kepler problem
Now we do a hybrid (Chambers, 1999; Kvaerno & Leimkuhler, 2000; Duncan et al., 1998; Hernandez, 2016; Wisdom, 2017) symplectic integration of the Kepler problem. Instead of splitting into (7), we can instead split into
[TABLE]
(If does not satisfy certain smoothness requirements, the integrator will not be symplectic according to our definition). The hybrid integrator transfers pieces from to and vice-versa. In real world applications, this strategy allows one to resolve small timescales in -body problems when needed, but not all that time so that the integrator is too costly and impractical. The range of is .
The solution from the equations of motion is easy to write:
[TABLE]
The solution from is easy to write when :
[TABLE]
But suppose becomes non-zero during the step; then (11) will no longer be valid; the correct equations to solve will be,
[TABLE]
with a more complicated solution map in general. The map is guaranteed to exist, however, because the Hamiltonian is integrable. Practitioners would want to use map (11) as much as possible for fast calculations, but switch to map (12) otherwise, which is always correct. However, a failsafe way to guarantee that we havenât used map (11) incorrectly does not exist (Chambers, 1999; Wisdom, 2017). We will not focus on this limitation of hybrid symplectic integrators here, but instead overcome this limitation by always solving (12), which is inefficient.
We can solve (12) using a high accuracy method like Bulirsch-Stoer, which uses Richardson extrapolation to estimate a map in the limit of the stepsize going to 0. We will also experiment later with adaptive RungeâKuttaâFehlberg methods, which combines a fourth and fifth order RungeâKutta method and is more suitable for non-smooth functions (Press et al., 2002), and other alternatives.
3 Switching functions
We have yet to specify the form of , subject to the Hamiltonian constraints of Sec. 2.1. First, consider . In the exact problem described by , remains within the interval . Let . We consider the following :
A Heaviside function, . If , , and if , . everywhere except at . With this , Eq. (12b) is not Lipschitz continuous. Thus, the hybrid integrator (9) is nonsymplectic. 2. 2.
A modified version of 1. The difference with 1 is that whatever value takes at the start of the step remains the same during the step. This choice cannot be described by Hamiltonians. 3. 3.
A linear function. If , and if , . Otherwise . The term of (12b) is not Lipschitz continuous so the hybrid integrator is not symplectic. 4. 4.
A polynomial function. If , and if , . Otherwise . The term of (12b) is differentiable. The term of (12b) is continuous but not differentiable at and , so we check its Lipschitz continuity. For ,
[TABLE]
which is near . For , . To verify Lipschitz continuity (4) near , consider and near 0. We need to find an such that
[TABLE]
where and are [math] or depending on whether are positive or negative. If , then any satisfies (14). Otherwise satisfies (14). Using similar, analysis, (12b) is Lipschitz continuous near . Thus, the integrator is symplectic with this switching function. 5. 5.
A smooth function. with . never actually reaches [math] or . (12) is infinitely differentiable. This yields a symplectic integrator. The larger is, the closer we approach function 1 (while retaining smoothness).
We plot the in Fig. 1.
4 Numerical experiments
We have defined five transition functions; two are not symplectic at just two points in phase space, two are symplectic everywhere, and 2 is not described by Hamiltonians. Our goal is to study the error properties of the hybrid integrator (9), over a long time in a periodic Kepler problem. We will set up our tests so that during an orbit, the integrator has to integrate over (but not necessarily exactly hit) one of the problem points twice. Note that landing on the point itself is unlikely, but the chances are not 0. The reason is that there are only a finite number of double precision numbers; this is a reason it would not be useful to characterize these discontinuities as having Lebesgue measure 0.
Choose , , and . We initialize at apoapse: and . Recall is in units of the semimajor axis. We check during each time step deviations from symplecticity using Eq. (5), but recall it is not a perfect measure of symplecticity, according to the discussion of Section 2.1. Eq. (5) describes matrices for Hamiltonian (1), with only one constraint, . To calculate deviations from this constraint, we consider four initial conditions, separated by a small distance in phase space from the phase space point at the start of the step. The distance cannot be too small or the computer finite precision will not keep track of the differences in the trajectories. If is too large, the trajectories are no longer nearby. A balance must be struck between these two effects (Press et al., 2002, Section 5.7), and an analytic answer to the optimal is difficult to obtain, so we search it numerically. We use a symmetric and second order approximation to the Jacobian. For one variable , the approximation is:
[TABLE]
where means the initial condition to calculate was . The indicates the approximation is second order. For two variables, such as our Kepler case, there are four Jacobian elements:
[TABLE]
We choose numerically by varying it in the range and choosing the value which gives the smallest to ensure weâre not overestimating . We calculate the energy error, , , , and as a function of time. Also we calculate the phase space trajectories of the orbits. We show the results for smoothing functions 3, 14, and 5 in Figâs. 2, 3, and 4, respectively.
As expected, never reaches , because does not exceed in the exact solution but does reach [math]. The slope of can only be or [math] for function 3. The energy error and phase space trajectory are stable in case 14 and 5, because they are calculated using symplectic algorithms. We also see that the optimal varies across the spectrum of allowed values. A more interesting story is shown in the plots of . There are 20 symplecticity error spikes, two per orbit, in all three cases, although the magnitude of those spikes decreases as the function becomes smoother. The spikes happen during the transition from to and back to , at . We also show the same plots for symplectic Euler, Eq. (7), or, equivalently, Eq. (9) with , in Fig. 5. There are small symplecticity error spikes with different origin: these occur when the particle reaches periapse.
Does the appearance of the symplecticity spikes in all integrators mean our prediction of which functions are symplectic was wrong? The answer is no: our measure of symplecticity is imperfect in a few ways. To explore this issue further, let us take a look at the Jacobian elements of the hybrid integrators with functions 3 and 5 in Figâs. 6 and 7, respectively.
The Jacobian elements with the greatest variation are in the top two panels, and . This is explained because they measure variations of , which depend on the potentially rapidly evolving and . These two matrix elements have spikes at the same times of the symplecticity spikes. The variations in are greater than the other matrix elements, so we use a scale to view its variations. If we look closely, we note that the topology of as a function of time is rugged in Fig. 6 while it is smoother in Fig. 7. The ruggedness of for the linear function explains where its symplecticity errors come from. changes more gradually for the function, but finite differencing approximations to derivatives make appear rougher than it is, leading to unphysical symplecticity errors. Note the integrator proceeds normally and is symplectic or not regardless of the accuracy of our Jacobian estimates.
We look more closely at some of the numerical issues we encounter in these tests. For case 3, at the th step, the BulirschâStoer integrator uses values of both and in its polynomial extrapolation for the estimate of the state. The rapid change in the derivative breaks symplecticity and leads to energy drift. BulirschâStoer is not as suitable as other high-accuracy integrators for evaluating non-smooth functions. We repeated this test by substituting BulirschâStoer for an adaptive step fourth and fifth order RungeâKuttaâFehlberg (RKF) method, which is more suitable for navigating the terrain of non-smooth functions (Press et al., 2002). Our conclusions are the same when we use this RKF method instead. An error tolerance of was used for both BulirschâStoer and the RKF method.
We explore this 38th step further. The following refers to methods for solving this one step. Rather than use a BulirschâStoer or RKF method, we take small symplectic Euler steps that solve Eq. (12) alone. We verify the method of taking small Euler steps converges by doing the following: we run (instead of 100) symplectic Euler steps to solve (12) only. is the first Hamiltonian to get solved, so the initial conditions are those at the start of step 38. is a positive integer. The size of each Euler step is . We obtain solution . Then we run steps of stepsize , yielding . A quantity is calculated. If the method converges, we expect to scale linearly with . Note that is a constant, independent of . Indeed, we calculate a slope of on a â plot using the points to . but with a weak correlation . With a twice differentiable transition function (not described in Section 3), the slope is with better correlation . The small Euler step method still converges despite the discontinuities present. We made sure not to use too large such that roundoff error would affect the power law calculation: the difference was always greater than . By using leapfrog steps instead of symplectic Euler steps, we again verify linear convergence when discontinuities are present (convergence is quadratic with the twice differentiable smoothing function). Having verified the 100 Euler step method converges, we rerun the Kepler test, substituting this method for BulirschâStoer. The linear transition function still yields unstable energy error, while the twice differentiable function yields stable energy error. Thus, we checked through various methods that the method for solving Eq. (12) does not affect our conclusions.
When an integrator is non-symplectic, there is a sudden and rapid change in the equations of motion, leading to a rapid dynamical timescale the integrator cannot resolve. Even if a transition function is symplectic, if it transitions too rapidly, the timescale will also not be resolved by the integrator and the energy error will grow secularly. In the linear transition function test, there is a jump in the first term of (12b), while the second term is approximately 0. For a case where the first term is approximately [math], while the second jumps, we use function 5 with . In this case, the energy error also grows secularly. In fact, it grows for . At , (12b) gives at , so that jumps about of its total range during the crossing timestep. During the jump, the denominators in (12b) are . Finally, we can vary the size of the jump in this test by using and changing the to a constant in 5. One might suspect if the jump discontinuity is small enough, no secular drift will occur because the numerical method cannot detect the non-smoothness. Indeed, a secular drift is detected only if . Thus, violations in the Lipschitz continuity of the ODEs were allowed if the jump discontinuities are small enough.
The Heaviside 1 and modified Heaviside 2 functions lead to energy drift and symplecticity error jumps as expected. For the modified Heaviside function, the integrator transitions from to at the following steps with irregular spacing: 82, 180, 276, 370, 463, 554, 644, 733, 821, 909, 997. For the integrator to be symplectic, these steps would need to be regularly spaced. is always [math] for this integrator.
Another question is whether a problem point is actually hit. For integrations with transition function 1, we verified this situation did not occur in our tests. To get a sense of the probabilities for landing on a potentially problematic point, consider an orbit. The circle is described by approximately double precision numbers. The chance of randomly picking a particular point is . Landing or not on a point with discontinuities is not a main concern in this work.
There are other causes of energy drift for symplectic integrators related to rapid timescales. For example, symplectic Euler gives a secular error increase when solving a Kepler problem that is too eccentric. For a given eccentricity, a minimum timestep resolves periapse (see also, Wisdom (2015) for requirements so that an integrator resolves periapse). Indeed, rapid timescales are the reason close encounters are so problematic in -body problems in the first place, they occur on timescales that are too rapid for the integrator to resolve. A rigorous analysis of what timescales are problematic for an integrator of given stepsize is beyond the scope of this work, but clues on how to approach this problem are given in (Leimkuhler & Reich, 2004, Section 2.3).
4.1 Long term energy drift
We do a long term energy error test with selected non-symplectic and symplectic transition functions. We use the same eccentricity and timestep, run for , and calculate the energy error at each step. To avoid large variations in energy errors, we plot the median absolute energy error every 100 steps (so about one point per period). The conclusions of this test are unchanged by instead studying the mean. The result is shown in Fig. 8.
Itâs seen the integrators that are non-symplectic at the two points have an erratic error behavior while the fully symplectic integrators have no clear energy drift. No clear energy drift is seen even after zooming in vertically by over a factor of 100.
One option we can consider is whether the drifts are caused by being too large, leading to stepsize chaos. If this is true, we should be able to reduce and find one of the irregular curves of Fig. 8 becomes regular. We repeated the linear transition function integration with step times smaller, and still found no regularity. According to Section 2.1, without Lipschitz continuity in the ODEs, notion of periodic orbits are undefined. We ran the linear function integration for a longer time and found that by , the orbit had become hyperbolic, which is unphysical. Symplectic integrators are used over long dynamical timescales, such as the Solar system age. These results indicate that over only 10,000 periods, which equates to 10,000 years for Earthâs orbit, or the Solar system age, certain hybrid integrators give unphysical solutions.
We also tested whether our results hold for more degrees of freedom. We considered the two degree of freedom Hamiltonian from (2). A hybrid integrator is constructed using,
[TABLE]
Now, solving each Hamiltonian requires solving a system of four first order ODEs. Note and are integrable. The initial conditions at apoapse in these coordinates are chosen to be , , , and . After constructing this hybrid integrator, and leaving all other integration parameters the same, we found the linear transition function still yields energy drift, while function 14 does not.
Over one period, the difference between the four curves of Fig. 8 is arguably less clear. We plot the energy error for the four integrators each time step for one period in Fig. 9. The symplectic curves show nearly symmetric error behavior for the region . This symmetry is lost in the other curves. The symmetry in the symplectic curves ensures long-term error conservation. 9.
We wish to confirm our results with different Hamiltonians. We test the simple harmonic oscillator, with Hamiltonian . The period is again . We can use the symplectic Euler method again, with splitting,
[TABLE]
For initial conditions, we choose and , so that . is solved easily while, again, BulirschâStoer is used to solve . is the same as before, but now . In the exact solution, . In our experiments, will be able to take on negative values and values each period. In order, the four discontinuities we integrate over each period are encountered in the transitions,
- â˘
to
- â˘
to
- â˘
to
- â˘
to .
The stepsize is chosen as and the runtime is . We measure deviations in the energy from . The conclusions we tested from the previous experiments stayed the same. In particular, periodic energy errors are found using transition function 14, while energy drift is observed with function 3.
5 Conclusion
This paper seeks to test the assumption that symplectic integrators can safely break symplecticity if the breaks are only at a few points in phase space. This assumption is made in a wide variety of -body codes at all scales; for example in hybrid or multiple time-stepping codes. We considered a hybrid symplectic integrator which is symplectic everywhere or breaks symplecticity at two points in phase space. The hybrid integrators with symplecticity breaks were significantly less stable. They did not necessarily hit the problem points, but they integrated over them. Breaking symplecticity introduces unresolved timescales in the integrators. Physical or numerical mechanisms, such as scattering of planets, also can introduce such unresolved timescales and lead to deterioration in the integrator performance. We showed how to correct this deterioration in the case of hybrid symplectic integrators, by ensuring the Lipschitz continuity of the equations of motion. Lipschitz continuity is only required over the domain of the -body map: if a discontinuity exists but an -body method does not integrate over it, there is no problem. In the case of multiple time stepping cosmological schemes (Springel, 2005) or block time-step schemes (Farr & Bertschinger, 2007), this paper does not offer a solution to this problem, nor does it study how serious the problem is. It is worth mentioning the Hamiltonian splits in this paper involved splitting an integrable Hamiltonian into two integrable pieces. It is conceivable to split an integrable Hamiltonian into nonintegrable pieces, but we could not concoct a practical situation in which this would be useful. So we have not tested this scenario, which could hypothetically change some result. When possible, fully symplectic integrators should be utilized to solve the -body problem.
6 Acknowledgements
I appreciate discussions with Hanno Rein, Dan Tamayo, Scott Tremaine, Ed Bertschinger, Walter Dehnen, Matt Payne, and MarieâClaude Arnaud. I appreciate feedback from the anonymous referee.
Appendix A Comparison with previous result
Hernandez (2016) found that the hybrid code MERCURY (Chambers, 1999) was non symplectic, a result explained in other work (Rein et al., 2019). Hernandez (2016) stated that unless a hybrid integrator is over some domain, its perturbed Hamiltonian (Hairer et al., 2006) is undefined, and it was concluded the integrator cannot be exactly symplectic. How we define symplecticity is clearly important. We discussed in Section 2.1 that a notion of symplecticity can exist even for Hamiltonians. We have decided in this paper to define symplectic integrators as those derived from at least Hamiltonians. According to this definition, hybrid methods can be symplectic. The concept of symplecticity is an active area of research (Buhovsky et al., 2018). Numerically, we have found in this work even a symplectic Euler method shows breaks in symplecticity, but argued this is due to our limitation in measuring Jacobians.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Arnaud & Xue (2016) Arnaud M.-C., Xue J., 2016, A C 1 Arnolâd-Liouville theorem, working paper or preprint, https://hal-univ-avignon.archives-ouvertes.fr/hal-01422530
- 2Binney & Tremaine (2008) Binney J., Tremaine S., 2008, Galactic Dynamics: Second Edition. Princeton University Press
- 3Buhovsky et al. (2018) Buhovsky L., Humilière V., Seyfaddini S., 2018, ar Xiv e-prints, p. ar Xiv:1808.09790
- 4Chambers (1999) Chambers J. E., 1999, MNRAS , 304, 793 ¡ doi â
- 5Danby (1988) Danby J. M. A., 1988, Fundamentals of celestial mechanics, 2nd rev. amp. enl. edn. Willmann-Bell, Richmond, Va., U.S.A.
- 6Duncan et al. (1998) Duncan M. J., Levison H. F., Lee M. H., 1998, AJ , 116, 2067 ¡ doi â
- 7Farr & Bertschinger (2007) Farr W. M., Bertschinger E., 2007, Ap J, 663, 1420
- 8Hahn et al. (2013) Hahn O., Abel T., Kaehler R., 2013, Monthly Notices of the Royal Astronomical Society , 434, 1171 ¡ doi â
