The Model¶
The \(N\)-body problem¶
The classical \(N\)-body problem describes the motion of \(N\) punctual masses under the action of Newton’s gravitation law of attraction. Let \(r_j\in \mathbb{R}^d\), \(j=1,\dots,N\) the positions of the bodies and \(m_j>0\) their respective masses. The equations of motion are:
\[\ddot r_j = \sum_{i=1,i\neq j}^N m_i(r_i-r_j)r_{i,j}^{-3},\]
where \(r_{i,j}=|r_i-r_j|\), \(| |\) being the Euclidean norm and where the gravitational constant is taken equal to 1.
In the model of this package, we consider the ODE of order one, we introduce the velocity \(v_i=\dot r_i\) for all \(i\in 1\dots N\) and we define \(z_i=(r_i,v_i)\in \mathbb{R}^{2d}\).
We get the following ODE:
\[\begin{split}\dot r_j &= v_j \qquad \forall j\in 1\dots N\\
\dot v_j &= \sum_{i=1,i\neq j}^N m_i(r_i-r_j)r_{i,j}^{-3} \qquad
\forall j\in 1\dots N\end{split}\]
This is this dynamical system which is implemented in the nbodypy python package.