implementations.problem_classes.FullSolarSystem module

class full_solar_system(sun_only=False)[source]

Bases: outer_solar_system

The \(N\)-body problem describes the mutual influence of the motion of \(N\) bodies. Formulation of the problem is based on Newton’s second law. Therefore, the \(N\)-body problem is formulated as

\[m_i \frac{d^2 {\bf r}_i}{d t^2} = \sum_{j=1, i\neq j}^N G \frac{m_i m_j}{|{\bf r}_i - {\bf r}_j|^3}({\bf r}_i - {\bf r}_j),\]

where \(m_i\) is the \(i\)-th mass point with position described by the vector \({\bf r}_i\), and \(G\) is the gravitational constant. If only the sun influences the motion of the bodies gravitationally, the equations become

\[m_i \frac{d^2 {\bf r}_i}{d t^2} = G \frac{m_1}{|{\bf r}_i - {\bf r}_1|^3}({\bf r}_i - {\bf r}_1).\]

This class implements the full solar system containing all planets including Earth’s moon, i.e., \(N=10\). Initial conditions are taken from [1], and masses relative to the sun taken from [2].

Parameters:

sun_only (bool, optional) – If False, only the sun is taken into account for the influence of the motion.

G

Gravitational constant.

Type:

float

References

dtype_f

alias of acceleration

dtype_u

alias of particles

u_exact(t)[source]

Routine to compute the exact/initial trajectory at time \(t\). Values here are taken from [1], [2].

Parameters:

t (float) – Time of the exact/initial trajectory.

Returns:

me – Exact/initial position and velocity.

Return type:

dtype_u