-body linear force law allowing analytic solutions
Abstract
We present a pair-wise force law in a system of particles that produces analytic solutions for arbitrary number of particles, masses, and initial conditions. Each pair of particles interacts via a force that is proportional to the product of their masses and their separation distance, with the force directed radially. We show that, despite the -body interaction, each particle behaves as if it interacts only with the center of mass of the system. This effective two-body interaction behaves as Hookeβs Law with a common frequency for all particles, with the familiar analytic solutions for the trajectories. With these analytic solutions, it is possible to efficiently simulate a collection of these particles and incorporate other external forces. As an example, we simulate the particles within an adiabatically expanding container and calculate pressure and temperature in both the attractive and repulsive cases.
1 Introduction
The general -body problem has long been a challenge in analytical mechanics. Newtonian gravity has been of particular interest, where the three-body problem admits analytical solutions only in special cases [1, 2, 3, 4, 5, 6, 7, 8, 9] and interactions between a sphere and a hoop generates intricate orbital motions [10]. Even with numerical solutions, the chaotic nature of -body problems means that arbitrary systems will be unstable, presenting pedagogical challenges for students interested in simulating such a system.
This paper presents an investigation of a pairwise force law with analytic solutions in an -body system. Intriguingly, this force law is shown to be equivalent to a central force acting on each particle, and each individual particle exhibits motion independent of its immediate neighbors.
Given their mathematical simplicity, these solutions can be conveniently integrated into undergraduate courses on advanced mechanics, within units on harmonic oscillators or gravitational interactions. Moreover, due to their computational efficiency, these systems can be accurately simulated with large values on personal computers, thus rendering them suitable for inclusion in computational projects or courses on numerical methods.
The absence of short range interactions, while convenient for quantum systems based on similar interactions [11, 12, 13, 14, 15], presents a lack of dynamism in the classical case. For this reason, further applications of this force law are most intriguing when paired with an external interaction. In this paper, we explore a thermodynamic application with the system in an expanding container, and suggest follow-up student projects.
The paper is organized as follows. In Section 2 the force law is introduced, and equivalence of an -body interaction to a 2-body interaction with the center of mass is shown. In Section 3, we present thermodynamic results for attractive and repulsive systems in an expanding container. Conclusions are provided in Section 4. Supplemental materials include a number of short python programs. These include one for plotting the orbits of an N-particle system given a specified set of mass and initial condition values based on the analytic trajectories; a similar program that runs a numerical simulation of a similar system directly from the pair-wise forces. The collision algorithm is presented in Appendix A, while ideas for possible research projects for advanced undergraduate students involving these two systems are discussed in Appendix B.
2 Force Law and General Solution
Bertrandβs theorem shows that the only central forces that guarantee closed orbits are the inverse square and linear force laws [16]. Inspired by this, we introduce a toy model of a linear gravity-like force
(1) |
where is a constant with units of N/kg2m and can be positive (attractive force) or negative (repulsive). The force is that on mass due to mass , and is the vector from to . The force is gravity-like in that the force between particles is proportional to the mass of both particles. It is spring-like in that it is linear. In the attractive case, the force is equivalent to a system of masses connected pair-wise by springs with spring constants
(2) |
for each pair, as illustrated in Fig. 1.
2.1 Solutions for point particles
We solve the -body problem by showing that it is equivalent to one-body problems. Consider a collection of particles with total mass . The equation of motion of particle is
(3) |
The contribution from is zero, so it may be included for convenience. Including this term, the sum becomes
(4) | |||||
(5) |
The sum in the second term is recognizable from the definition of the center of mass, and the equation of motion becomes
(6) |
where is the total mass of the system, and is the position of the center of mass, which need not be stationary. Thus, the particle behaves as if it is governed by Hookeβs Law centered at , with effective spring constant as illustrated in Figure 1.
The solutions are the harmonic oscillator solutions
(7) |
where for all particles, and the constant vectors are determined as usual from initial conditions. In the absence of external forces, the center of mass of the system moves at constant velocity, and we can use coordinates with so that the particles move in closed elliptical orbits with a common frequency, consistent with Bertrandβs Theorem [3, 17, 18, 19].
Thus, the -body interaction has an analytical solution, with the motion of each particle effectively described as an interaction with the center of mass of the system, and the trajectories are described by analytical expressions. This differs from the general -body problem, which cannot be solved analytically. Additionally, particles in this system remain bound, in contrast to the inverse-square law, which can eject particles from the system.
2.2 Particle interacting with continuous mass distribution
We now generalize the above results to a particle interacting with a continuous mass distribution. Consider placing the point mass m at the origin, and it interacts with a mass distributed in space within a volume , with a position-dependent density . In that case, the force on due to a small volume element within the extended body is
(8) |
The total force is found by integrating over the volume of the extended body
(9) |
Notice, due to the linear nature of the force law, there is no concern of singularities in allowing the particle of interest to be located within the larger mass distribution. From (9), it is clear that the shape, size, and orientation of the mass distribution have no effect on the motion of test mass . The distributed mass does not need to be a rigid body, and it may rotate in any arbitrary manner, as long as it is rotating about its center of mass, which is how unconstrained bodies rotate [3, 20, 21].
2.3 Potential energy
The potential energy , of the system is also found analytically. The potential energy of a system of particles attached via the properly chosen springs is
(10) |
where the additional factor of corrects for double counting. The case does not contribute to the sum, so it need not be removed. Expanding the product,
(11) |
and separating the terms yields
(12) |
The last term is the expression for the location of the center of mass, which is set to be zero. The summations over mass alone in the first two terms gives the total mass , so the first two terms are identical. The resulting potential energy
(13) |
is identical to independent harmonic oscillators with effective spring constant .
Alternatively, we calculate the work to move the particles from the origin to their positions from the force law (1) directly, with the assumption that the center of mass remains at the origin. The work done in moving a single particle is
(14) |
as the work is non-zero only for the radial component of displacement. Performing the integration and summing over all particles,
(15) |
which is equal to the potential energy calculation (13).
2.4 Repulsive Case
For a repulsive interaction, the above analysis is repeated with . The solutions become exponentials
(16) |
where . The energy analysis is the same as in Section 2.2, with . Unless , the particle escapes to infinity, with exponentially increasing velocity. The potential energy of a particle is always negative
(17) |
which explains why the kinetic energy grows without bound as the particle escapes to infinity.
3 Applications
The existence of analytic solutions allows for efficient simulation of large numbers of particles, effectively modeling a gas of strongly interacting particles. In this section, we use analytic simulations to study thermodynamic properties of such a large collection.
Numerical techniques explicitly evolve the system forward in time given the current state of positions and velocities. It is pedagogically useful to show that this numerical technique produces results that match the analytic solutions of Section 2. Animating the trajectories using VPython is also instructive, as it effectively illustrates the βnon-interactionβ of nearby particles. This also demonstrates the benefits of the Euler-Cromer method, which conserves energy in oscillatory motion, while the Euler method does not. Numerical techniques are also needed if the system is subjected to external forces. Examples of these applications are described in Appendix B.
Any numerical technique using the original pair-wise force law (1) must calculate the distance between each particle pair, a problem that scales as . Additionally, errors in the differential equation solver depend on the time step, with the Euler-Cromer method having errors . Thus, simulating a large number of particles interacting for a long time is computationally intensive for a student project. This motivates the use of the analytic solutions when possible.
In the case of an isolated system, the analytic solutions (7) and (16) give the position and velocity of any particle at arbitrary time. In the case of a system inside a container, a continuous collision algorithm is used to handle any particles that collide with the container during a given time step. Any particle colliding with the wall affects the rest of the masses, because the change in velocity of that single particle affects the center of mass. The effects of the collisions on the velocity of the center of mass are accumulated while the check for collisions is made. The analytic solutions are updated to account for the change in center of mass velocity. The effects of a moving wall are also incorporated. This collision algorithm is elaborated in Appendix A.
3.1 Thermodynamics
Here the attractive and repulsive systems are examined in a 3D spherical container. A spherical container is necessary because a rectangular prism will not thermalize the motion of the particles, as the motion along each of the Cartesian coordinates is independent. A collection of 4,000 particles is created with spherically symmetric initial positions and velocities. The masses are chosen at random to be between 4 and 5 base units.
![Refer to caption](https://cdn.statically.io/img/arxiv.org/x1.png)
![Refer to caption](https://cdn.statically.io/img/arxiv.org/x2.png)
![Refer to caption](https://cdn.statically.io/img/arxiv.org/x3.png)
In contrast to the ideal gas model, systems with long-range interactions do not have well-defined thermodynamic quantities that apply to the entire system [22, 23, 24]. Instead, we examine the pressure and temperature at the boundary of the container. The pressure is calculated by summing over the momentum of the particles that hit the wall in each time step,
(18) |
where is the radial component of the particleβs momentum R, is the radius of the container, and is the computational time step. The temperature is determined by averaging the kinetic energy of the particles that hit the wall in a given time interval. The pressure and temperature are therefore only defined in terms of the interaction with the environment via the walls of the container. This is similar to the definition of thermodynamic parameters for bound gravitational systems [22, 23, 24]. In the attractive case, pressure and temperature are well defined only when the container is sufficiently small that the particles interact with the walls of the container.
We change the container radius quickly, allowing the particles to undergo free expansion into the increased volume. The system is then given time after each free expansion to come back to equilibrium. The thermalization time is particularly long for the repulsive case, as expanding the container changes the kinetic energy of the system notably. The values presented in the Figures 2 and 3 are the values at the end of the time segment used to equilibrate. All quantities are scaled by their values after an initial thermalization period. It is worthwhile to note that the only quantities being held fixed in these simulations is the number of particles and the total energy of the system.
![Refer to caption](https://cdn.statically.io/img/arxiv.org/x4.png)
![Refer to caption](https://cdn.statically.io/img/arxiv.org/x5.png)
![Refer to caption](https://cdn.statically.io/img/arxiv.org/x6.png)
In examining Figures 2-3, it is evident that there is more scatter in the temperature values than in the pressure values. This is because the pressure depends on the radial component of the velocity of the particles that hit the wall, which will equilibrate due to collisions with the spherical container. The temperature also depends on the tangential component of the velocity, which is unaffected by contact with the wall.
For the attractive case, the relationships among pressure, temperature, and volume share some similarity with those for the ideal gas model (see Figure 2). However, log-log plots reveal the relationships between pressure and volume and pressure and temperature do not follow power laws.
For the repulsive case, an increase in the volume allows the potential energy to grow very large and negative, so that the kinetic energy of the particles impacting the wall of the container increases. As such, Figure 3 shows that the pressure and the temperature both increase with increasing volume, contrary to the behavior of attractive systems and ideal gases. The relationship between pressure and volume appears linear on visual inspection of Figure 3(b), but a log-log fit reveals that for this data.
4 Conclusions
We present a pair-wise -body interaction that is shown to be equivalent to one-body interactions with the center of mass of the system. In both attractive and repulsive case, the analytical trajectories are given by harmonic oscillator solutions. This is in stark contrast to other long-range interactions such Newtonian gravity, where only special case solutions exist for .
It is counter-intuitive that the motion of each particle is independent of the location and motion of all of the other particles of the system, except through the common center of mass location. The particles all interact with each other, and yet experience no scattering. This behavior was confirmed with a numerical simulation of the system.
For the attractive system, the relationships found among the pressure, temperature, and volume are qualitatively similar to what one would expect, pressure and temperature decreasing with increasing volume, and reaching zero for some critical size, as the bound particles have an upper limit on their distance from the center of mass. A more detailed study comparing the thermodynamics of this system for small containers with that of the ideal gas, or van der Waals gas would be interesting. For small volumes, the system is expected to behave as free particles in a gas.
The mathematical form of the solutions, indicating the independent classical motion of each of the masses, implies a separable Hamiltonian. It has been known for some time that, with identical particles, the attractive case leads to a separable Hamiltonian. [13] The results presented here show that such a solution for the quantum equivalent [11, 12, 13, 14, 15] is also possible for N particles with arbitrary masses. The repulsive case is not bound, so there is not an equivalent quantum mechanical model system.
Appendix A Collision handling algorithm for particles in a container
This algorithm uses event-driven collision detection and elastic collision handling to simulate interactions between particles and the walls of a container. This is a discrete collision detection algorithm [25, 26], as opposed to the more computationally expensive continuous collision detection algorithm [27].
The algorithm begins by using the analytical trajectories to determine which particles will collide with the container wall in the next time step. This is done by checking if the future position of each particle, , exceeds the containerβs radius . For each of these particles, the collision is treated as elastic. The new velocity of the particle is computed on the assumption that it occurs at position and time .
The change in momentum for each particle due to the collision is calculated, and the total change in momentum is summed for all particles. This summed momentum change is used to update the velocity of the center of mass (). To this point, no particle positions have been changed.
Using the updated center of mass velocity and the current positions and velocities of the particles, new parameters for each particleβs trajectories are calculated. The positions and velocities of all particles are then advanced to , ensuring that no further collisions occur within this time step. The algorithm then repeats this process for subsequent time steps.
As an example, the data provided involves 40,000 particles over 500,000 time steps. This simulation runs on a standard laptop in less than 40 seconds. For scenarios involving fixed walls, or when expansion into a larger container is permitted, energy conservation is confirmed within computational precision.
Appendix B Suggested student projects
The thermodynamic application of Section 3 suggests several other investigations for a student researcher. Including elastic hard-sphere collisions would affect individual trajectories, but the state variables of the system would not be affected. This is similar to the model of the ideal gas. This might lead to thermalization on a shorter time scale. The container wall can be moved more quickly, allowing work to be done on the system. It would be interesting to explore possible hysteresis effects of a container moving inward and then allowed to expand.
Additionally, these systems can be simulated in situations that include outside forces. For example, linear drag could be applied to one or more of the particles, allowing students to illustrate known results, such as the ultimate dissipation of all energy in a system experiencing linear drag, and the return of the affected particle to its initial position [28]. One could also simulate an -body attractive system released in a uniform gravitational field and allowed to bounce on a hard surface, tracking the motion of the center of mass and the characteristic size of the system as it experiences these outside forces.
A selection of glowscript programs is included [29], which simulate interactions with an external environment. Due to external interactions, these simulations rely on traditional numerical integration, rather than the analytic form of the solutions. As anticipated, these simulation run times scale as , in contrast with the simulations that make use of the analytic solution, which scale linearly with .
References
- [1] K. F. Sundman, βMΓ©moire sur le problΓ¨me des trois corps,β Acta Mathematica 36 no. 0, (1913) 105β179. http://dx.doi.org/10.1007/BF02422379.
- [2] C. Moore, βBraids in classical dynamics,β Phys. Rev. Lett. 70 (Jun, 1993) 3675β3679. https://link.aps.org/doi/10.1103/PhysRevLett.70.3675.
- [3] G. R. Fowles and G. L. Cassiday, Analytical Mechanics. Saunders, New York, 6 ed., 1999.
- [4] M. Przybylska and A. J. Maciejewski, βNon-integrability of the planar elliptic restricted three-body problem,β Celestial Mechanics and Dynamical Astronomy 135 no. 2, (Mar., 2023) 13. http://dx.doi.org/10.1007/s10569-022-10120-5.
- [5] M. Ε uvakov and V. DmitraΕ‘inoviΔ, βA guide to hunting periodic three-body orbits,β American Journal of Physics 82 no. 6, (June, 2014) 609β619. https://doi.org/10.1119/1.4867608.
- [6] A. Delshams, V. Kaloshin, A. de la Rosa, and T. M. Seara, βGlobal instability in the restricted planar elliptic three body problem,β Communications in Mathematical Physics 366 no. 3, (Sept., 2018) 1173β1228. https://doi.org/10.1007/s00220-018-3248-z.
- [7] W. J. Wild, βEulerβs three-body problem,β American Journal of Physics 48 no. 4, (Apr., 1980) 297β301. https://doi.org/10.1119/1.12144.
- [8] N. J. Harmon, C. Leidel, and J. F. Lindner, βOptimal exit: Solar escape as a restricted three-body problem,β American Journal of Physics 71 no. 9, (Aug., 2003) 871β877. https://doi.org/10.1119/1.1557304.
- [9] D. C. Khandekar and S. V. Lawande, βSolution of a one-dimensional three-body problem in classical mechanics,β American Journal of Physics 40 no. 3, (Mar., 1972) 458β462. https://doi.org/10.1119/1.1986573.
- [10] R. W. Tobin and J. West, βClosed orbits about a massive thin ring,β European Journal of Physics 27 no. 2, (Jan., 2006) 215β223. http://dx.doi.org/10.1088/0143-0807/27/2/004.
- [11] F. Calogero, βSolution of a three-body problem in one dimension,β Journal of Mathematical Physics 10 no. 12, (Dec., 1969) 2191β2196. https://doi.org/10.1063/1.1664820.
- [12] F. Calogero, βSolution of the One-Dimensional N-Body Problems with Quadratic and/or Inversely Quadratic Pair Potentials,β Journal of Mathematical Physics 12 no. 3, (Mar., 1971) 419β436. https://doi.org/10.1063/1.1665604.
- [13] I. Bialynicki-Birula, βExact solutions of nonrelativistic classical and quantum field theory with harmonic forces,β Letters in Mathematical Physics 10 no. 2-3, (1985) 189β194. https://doi.org/10.1007/bf00398157.
- [14] T. K. Lim, βAn exactly soluble quantum-mechanical three-body problem,β American Journal of Physics 39 no. 8, (Aug., 1971) 932β935. https://doi.org/10.1119/1.1986328.
- [15] T. Vladimiroff, ββthree-bodyβ problem for beginning students in quantum mechanics,β American Journal of Physics 42 no. 3, (Mar., 1974) 250β251. https://doi.org/10.1119/1.1987659.
- [16] J. Bertrand, βThΓ©orΓ¨me relatif au mouvement dβun point attirΓ© vers un centre fixe,β C. R. Acad. Sci. 77 (1873) 849β853.
- [17] J. R. Taylor, Classical Mechanics. University Science Books, Mill Valley, CA, 2005.
- [18] H. Goldstein, C. Poole, and J. Safko, Classical Mechanics. Pearson, 3 ed., 2001.
- [19] N. Grossman, The Sheer Joy of Celestial Mechanics. BirkhΓ€user, Boston, MA, 1996.
- [20] S. T. Thornton and J. B. Marion, Classical Dynamics of Particles and Systems. Cengage Learning, paperback ed., 1, 2022.
- [21] P. Hamill, Intermediate Dynamics. Cambridge University Press, Cambridge, England, 2 ed., Apr., 2022.
- [22] M. N. Berberan-Santos, E. N. Bodunov, and L. Pogliani, βOn the barometric formula,β American Journal of Physics 65 no. 5, (May, 1997) 404β412. http://dx.doi.org/10.1119/1.18555.
- [23] G. Lente and K. Εsz, βBarometric formulas: various derivations and comparisons to environmentally relevant observations,β ChemTexts 6 no. 2, (Apr., 2020) 13. http://dx.doi.org/10.1007/s40828-020-0111-6.
- [24] S. Meneses JoΓ£o, J. P. Santos Pires, and J. M. Viana Parente Lopes, βA new microscopic look into pressure fields and local buoyancy,β American Journal of Physics 90 no. 3, (Mar., 2022) 179β186. http://dx.doi.org/10.1119/5.0060479.
- [25] A. Garcia-Alonso, N. Serrano, and J. Flaquer, βSolving the collision detection problem,β IEEE Computer Graphics and Applications 14 no. 3, (May, 1994) 36β43. http://dx.doi.org/10.1109/38.279041.
- [26] T. Uchiki, T. Ohashi, and M. Tokoro, βCollision detection in motion simulation,β Computers & Graphics 7 no. 3β4, (Jan., 1983) 285β293. http://dx.doi.org/10.1016/0097-8493(83)90023-7.
- [27] S. Redon, A. Kheddar, and S. Coquillart, βFast continuous collision detection between rigid bodies,β Computer Graphics Forum 21 no. 3, (Sept., 2002) 279β287. http://dx.doi.org/10.1111/1467-8659.t01-1-00587.
- [28] J. West, βN -coupled masses with resistive forces linear in velocity: Exact expression for the final system position,β American Journal of Physics 71 no. 4, (Mar., 2003) 402β404. http://dx.doi.org/10.1119/1.1533051.
- [29] S. P. Bartz and J. West, βN-body linear interactions examples with external forces,β 2024. https://figshare.com/articles/software/N-body_linear_interactions_examples_with_external_forces/26082073.