Barnesův-Hutův algoritmus pro řešení problému mnoha těles

Abstract

The goal of an N-body problem is to find trajectories of a number of bodies (e.g. planets, stars) interacting only by their mutual gravitational forces. This problem is analytically solvable for at most two bodies. To predict the motion of a larger number of bodies, numerical methods have to be used. In this work we cover several numerical methods for solution of an initial value problem, which is necessary for finding the numerical solution of an N-body problem. Furthermore, we analyze two algorithms for calculating mutual forces acting on particles -- direct method with O(n^2) time complexity and mainly the Barnes-Hut algorithm with more favorable O(n log(n)) time complexity. A solver for the N-body problem is implemented in C++ and paralelized using OpenMP. The efficiency of the program is demonstrated on several numerical experiments.

Description

Subject(s)

N-body problem, particle simulation, Barnes-Hut algorithm, initial value problem, C++, OpenMP, parallelization

Citation