heyoka.model.fixed_centres#
- heyoka.model.fixed_centres(Gconst: expression | str | numpy.single | float | numpy.longdouble = 1., masses: collections.abc.Sequence[expression | str | numpy.single | float | numpy.longdouble] = [], positions: collections.abc.Iterable = numpy.empty((0, 3), dtype=float)) list[tuple[expression, expression]] #
Produces the expression for the dynamics in a fixed-centres problem.
In the fixed-centres problem, a test particle moves in the Newtonian gravitational field generated by a number of massive particles whose positions are fixed in space. The test particle’s Cartesian position and velocity are represented by the variables
[x, y, z]
and[vx, vy, vz]
respectively.Several checks are run on the input arguments:
positions must be convertible into an
N x 3
array, with each row containing the Cartesian position vector of a mass,the number of elements in masses must be equal to the number of three-dimensional position vectors in positions.
- Parameters:
Gconst – the gravitational constant.
masses – the list of mass values (one for each particle).
positions – the positions of the particles.
- Returns:
the dynamics of the Newtonian fixed centres problem.
- Raises:
ValueError – if one or more input arguments are malformed, as explained above.