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.