DOI: https://doi.org/10.26089/NumMet.v25r430

Non-conservation of linear momentum in widely used hierarchical methods in gravitational gas dynamics

Authors

  • Marat S. Potashov
  • Andrey V. Yudin

Keywords:

tree code
fast multipole method
FMM
N-body
smoothed particle hydrodynamics
SPH
PHANTOM
momentum conservation

Abstract

The paper considers the implementation of the fast multipole method (FMM) in the PHANTOM code for the calculation of forces in a self-gravitating system. The gravitational interaction forces are divided into short-range and long-range interactions depending on the value of the tree opening parameter of the hierarchical kd-tree. It was demonstrated that Newton's third law holds for any pair of cells of the kd-tree engaged in mutual interaction. However, for the entire system, linear momentum is not conserved. The result is an unphysical force that causes the centre of mass to migrate. In the case of compact objects, such as a pair of neutron stars, the displacement of the system's centre of mass is found to be comparable to the radii of the objects at times of a few tens of Keplerian revolutions. This displacement cannot be reduced by increasing the number of particles for values of the tree opening parameter greater than 0.2. For smaller values, the time required for the calculation is significantly longer.


Downloads

Published

2024-10-17

Issue

Section

Methods and algorithms of computational mathematics and their applications

Author Biographies

Marat S. Potashov

Andrey V. Yudin


References

  1. J. Barnes and P. Hut, “A Hierarchical O(Nlog N) Force-Calculation Algorithm,” Nature 324, 446-449 (1986).
    doi 10.1038/324446a0.
  2. L. Greengard and V. Rokhlin, “A Fast Algorithm for Particle Simulations,” J. Comput. Phys. 135 (2), 280-292 (1997).
    doi 10.1006/jcph.1997.5706.
  3. R. Capuzzo-Dolcetta and P. Miocchi, “A Comparison between the Fast Multipole Algorithm and the Tree-Code to Evaluate Gravitational Forces in 3-D,” J. Comput. Phys. 143 (1), 29-48 (1998).
    doi 10.1006/jcph.1998.5949.
  4. N. A. Gumerov and R. Duraiswami, Fast Multipole Methods for the Helmholtz Equation in Three Dimensions (Elsevier, Amsterdam, 2005).
  5. R. W. Hockney and J. W. Eastwood, Computer Simulation Using Particles (Adam Hilger, Bristiol, 1988).
  6. K. Nitadori, “Particle Mesh Multipole Method: An Efficient Solver for Gravitational/Electrostatic Forces Based on Multipole Method and Fast Convolution over a Uniform Mesh,” (2014).
    https://arxiv.org/pdf/1409.5981 . Cited October 4, 2024.
  7. Q. Wang, “A Hybrid Fast Multipole Method for Cosmological N-body Simulations,” Res. Astron. Astrophys. 21 (1), Article Number 003 (2021).
    doi 10.1088/1674-4527/21/1/3.
  8. W. Dehnen, “A Very Fast and Momentum-Conserving Tree Code,” Astrophys. J. 536 (1), L39-L42 (2000).
    doi 10.1086/312724.
  9. W. Dehnen, “A Hierarchical O(N) Force Calculation Algorithm,” J. Comput. Phys. 179 (1), 27-42 (2002).
    doi 10.1006/jcph.2002.7026.
  10. E. Gafton and S. Rosswog, “A Fast Recursive Coordinate Bisection Tree for Neighbour Search and Gravity,” Mon. Notices Royal Astron. Soc. 418 (2), 770-781 (2011).
    doi 10.1111/j.1365-2966.2011.19528.x.
  11. W. Dehnen, “A Fast Multipole Method for Stellar Dynamics,” Comput. Astrophys. Cosmol. 1, Article Number 1 (2014).
    doi 10.1186/s40668-014-0001-7.
  12. D. C. Marcello, S. Shiber, O. De Marco, et al., “OCTO-TIGER: A New, 3D Hydrodynamic Code for Stellar Mergers That Uses HPX Parallelization,” Mon. Notices Royal Astron. Soc. 504 (4), 5345-5382 (2021).
    doi 10.1093/mnras/stab937.
  13. J. L. Bentley, “Multidimensional Binary Search Trees Used for Associative Searching,” Commun. ACM 18 (9), 509-517 (1975).
    doi 10.1145/361002.361007.
  14. D. Potter, J. Stadel, and R. Teyssier, “PKDGRAV3: Beyond Trillion Particle Cosmological Simulations for the Next Era of Galaxy Surveys,” Comput. Astrophys. Cosmol. 4, Article Number 2 (2017).
    doi 10.1186/s40668-017-0021-1.
  15. D. J. Price, “Smoothed Particle Hydrodynamics and Magnetohydrodynamics,” J. Comput. Phys. 231 (3), 759-794 (2012).
    doi 10.1016/j.jcp.2010.12.011.
  16. D. J. Price, J. Wurster, T. S. Tricco, et al., “PHANTOM: A Smoothed Particle Hydrodynamics and Magnetohydrodynamics Code for Astrophysics,” Publ. Astron. Soc. Aust. 35, Article Number e031 (2018).
    doi 10.1017/pasa.2018.25.
  17. C. Pinte, D. J. Price, F. Ménard, et al., “Kinematic Evidence for an Embedded Protoplanet in a Circumstellar Disk,” Astrophys. J. Lett. 860 (1), Article Number L13 (2018).
    doi 10.3847/2041-8213/aac6dc.
  18. E. C. A. Golightly, E. R. Coughlin, and C. J. Nixon, “Tidal Disruption Events: The Role of Stellar Spin,” Astrophys. J. 872 (2), Article Number 163 (2019).
    doi 10.3847/1538-4357/aafd2f.
  19. R. M. Heath and C. J. Nixon, “On the Orbital Evolution of Binaries with Circumbinary Discs,” Astron. Astrophys. 641, Article Number A64 (2020).
    doi 10.1051/0004-6361/202038548.
  20. S. Blinnikov, A. Yudin, N. Kramarev, and M. Potashov, “Stripping Model for Short Gamma-Ray Bursts in Neutron Star Mergers,” Particles 5 (2), 198-209 (2022).
    doi 10.3390/particles5020018.
  21. M. Sh. Potashov and A. V. Yudin, Algorithm for Taking into Account Back-Reaction of Gravitational Waves Emission during the Merger of Neutron Stars , Preprint No. 40 (Keldysh Institute of Applied Mathematics, Moscow, 2023) [in Russian].
    doi 10.20948/prepr-2023-40.
  22. A. V. Yudin, S. I. Blinnikov, N. I. Kramarev, and M. Sh. Potashov, “Merging and Stripping Regimes in Close Pairs of Relativistic Stars: Prospects for Models of Short Gamma-Ray Bursts,” Radiophys. Quantum El. 66 (9), 650-663 (2024).
    doi 10.1007/s11141-024-10325-8.
  23. M. Sh. Potashov, Non-Conservation of Momentum in the FMM Method in the PHANTOM Code , Preprint No. 43 (Keldysh Institute of Applied Mathematics, Moscow, 2024) [in Russian].
    doi 10.20948/prepr-2024-43.
  24. D. J. Price and J. J. Monaghan, “An Energy-Conserving Formalism for Adaptive Gravitational Force Softening in Smoothed Particle Hydrodynamics and N-Body Codes,” Mon. Notices Royal Astron. Soc. 374 (4), 1347-1358 (2007).
    doi 10.1111/j.1365-2966.2006.11241.x.
  25. A. N. Bogolyubov, N. T. Levashova, I. E. Mogilevskii, et al., Green’s Function of Laplace Operator (Mosk. Gos. Univ., Moscow, 2012) [in Russian].
  26. G. B. Folland, Advanced Calculus (Prentice-Hall, Upper Saddle River, 2002).
  27. M. Lange and S. M. Rump, “Error Estimates for the Summation of Real Numbers with Application to Floating-Point Summation,” BIT Numer. Math. 57 (3), 927-941 (2017).
    doi 10.1007/s10543-017-0658-9.
  28. J. Rhyne, “Probabilistic Error Analysis for Sequential Summation of Real Floating Point Numbers,” (2021).
    https://arxiv.org/pdf/2101.11738 . Cited October 5, 2024.
  29. E. Hallman and I. C. F. Ipsen, “Deterministic and Probabilistic Error Bounds for Floating Point Summation Algorithms,” (2021).
    https://arxiv.org/pdf/2107.01604 . Cited October 5, 2024.
  30. J. Loiseau, H. Lim, M. A. Kaltenborn, et al., “FleCSPH: The Next Generation FleCSIble Parallel Computational Infrastructure for Smoothed Particle Hydrodynamics,” SoftwareX 12, Article Number 100602 (2020).
    doi 10.1016/j.softx.2020.100602.
  31. P. V. Popov, Diffusion (MIPT, Moscow, 2016).
    https://old.mipt.ru/education/chair/physics/S_II/method/diff_full.pdf . Cited October 5, 2024.
  32. J. C. Lattanzio, J. J. Monaghan, H. Pongracic, and M. P. Schwarz, “Controlling Penetration,” SIAM Journal on Scientific and Statistical Computing 7 (2), 591-598 (2024).
    doi 10.1137/0907039.
  33. J. VonNeumann and R. D. Richtmyer, “A Method for the Numerical Calculation of Hydrodynamic Shocks,” J. Appl. Phys. 21 (3), 232-237 (1950).
    doi 10.1063/1.1699639.
  34. S. K. Greif, K. Hebeler, J. M. Lattimer, et al., “Equation of State Constraints from Nuclear Physics, Neutron Star Masses, and Future Moment of Inertia Measurements,” Astrophys. J. 901 (2), 155-1-155-9 (2020).
    doi 10.3847/1538-4357/abaf55.
  35. I. J. Schoenberg, “Contributions to the Problem of Approximation of Equidistant Data by Analytic Functions. Part A. On the Problem of Smoothing or Graduation. A First Class of Analytic Approximation Formulae,” Quart. Appl. Math. 4 (1), 45-99 (1946).
    doi 10.1090/qam/15914.
  36. Ya. B. Zel’dovich and I. D. Novikov, Relativistic Astrophysics (Chicago Univ. Press, Chicago, 1971).
  37. S. Rosswog, “SPH Methods in the Modelling of Compact Objects,” Living Rev. Comput. Astrophys. 1, Article Number 1 (2015).
    doi 10.1007/lrca-2015-1.
  38. D. C. Marcello, “A Very Fast and Angular Momentum Conserving Tree Code,” Astron. J. 154 (3), 92-1-92-6 (2017).
    doi 10.3847/1538-3881/aa7b2f.