calculate_newtonian_potential#

pride.astro.calculate_newtonian_potential(massive_bodies_gm: numpy.ndarray, relative_distances: numpy.ndarray) numpy.ndarray#

Newtonian potential from GMs and relative distances

The Newtonian gravitational potential at distance r from a point mass M is given by: U = GM/r. This function calculates the total potential at a target point due to multiple massive bodies by summing their individual potentials.

In the description of the arguments, M is the number of massive bodies, N is the number of points at which the potential is calculated, and the tuples indicate the dimensions of the arrays.

Parameters:
  • massive_bodies_gm – Gravitational parameters of the massive bodies (M,)

  • relative_distances – Relative distances from the target point to the massive bodies (N,)

Returns:

Total Newtonian potential (N,)