Skip to content

Sitnikov problem

A light body moving on the axis through the mass centre of two equal primaries.

  • Class: SitnikovSystem
  • Import: from skcomplex.systems.physics.celestial_mechanics import SitnikovSystem
  • Field: physics/celestial_mechanics
  • Topics: mechanics, ode, second order, gravity, chaos
  • References:
    • Dilão 2023
    • Sitnikov 1960

Use this system

The block imports the class and simulates the system with its default parameters and its tuned run settings.

from skcomplex.systems.physics.celestial_mechanics import SitnikovSystem

trajectory = SitnikovSystem().prepare().simulate()

Parameters

The model parameters take these defaults, and set_params changes them.

Parameter Default
z 0.5
vz 0.0
e 0.0
solver 'auto'
backend 'auto'

Tags

The system with its default parameters has these capability tags, which solvers and analyses check.

Tag Values
Time continuous
Space none
Laws rate
Randomness deterministic
Domains real
Structure fixed

Class

The source of the class shows how it builds its components from its model parameters.

class SitnikovSystem(BaseSystem):
    """A light body moving on the axis through the mass centre of two equal primaries.

    The axis is normal to their orbit.

    The primaries of mass 1/2 orbit their centre of mass with unit mean separation and period `2π`, at distance `r(t) =
    (1 - e cos t) / 2` from it to first order in the eccentricity `e`, and the light body follows `z'' = -z / (z² +
    r(t)²)^(3/2)`. For circular primaries the energy `z'²/2 - 1 / √(z² + 1/4)` is conserved and the motion is
    integrable, and eccentric primaries make bounded orbits chaotic. The system has the height `body.z` and the vertical
    velocity `body.z'`.

    Args:
        z:
            The initial height above the plane of the primaries.

        vz:
            The initial vertical velocity.

        e:
            The eccentricity of the primaries' orbits.

        label:
            The label of the system, which names it when it is nested in another one.

        solver:
            The solver of the problem, or `'auto'` for the one the system chooses.

        backend:
            The backend that evaluates the compiled functions, or `'auto'` for the one the system chooses.

    Examples:
        >>> from skcomplex.systems.physics.celestial_mechanics import SitnikovSystem
        >>> SitnikovSystem(e=0.1).prepare().system_.elements[0].e
        0.1
    """

    field = 'physics/celestial_mechanics'
    topics = ('mechanics', 'ode', 'second order', 'gravity', 'chaos')
    references = ('Dilão 2023', 'Sitnikov 1960')
    until = 50.0
    dt = 0.05

    def __init__(
        self,
        z: float = 0.5,
        vz: float = 0.0,
        *,
        e: float = 0.0,
        label: str = 'system',
        solver: BaseSolver | str = 'auto',
        backend: BaseBackend | str = 'auto',
    ) -> None:
        super().__init__(label, solver=solver, backend=backend)
        self.z = z
        self.vz = vz
        self.e = e

    def _prepare(self, context: Sequence[Observable] | None = None) -> None:
        """Set the system of a light body on the axis of two equal primaries.

        Args:
            context:
                The observables to compile with the problem, or `None` for none.
        """
        super()._prepare(context)
        self.system_ = System(
            self.label,
            elements=[SitnikovBodyElement('body', z=self.z, e=self.e, values={"z'": self.vz})],
            interactions=[SitnikovGravityInteraction('gravity', target='body')],
        )

Components

The system uses these element and interaction classes, each with its nearest class of the core.

Elements:

  • SitnikovBodyElement, from Element

Interactions:

  • SitnikovGravityInteraction, from Interaction
class SitnikovBodyElement(Element):
    """Light body at the height `z` on the axis of two equal primaries.

    The axis runs through the centre of mass of the primaries, which orbit with the eccentricity `e`. The vertical
    velocity is `z'`.

    Args:
        label:
            The label of the body.

        z:
            The initial height.

        e:
            The eccentricity of the primaries' orbits.

        values:
            Further values by name, such as an initial velocity named with a prime, or `None`.

    Examples:
        >>> from skcomplex.systems.physics.celestial_mechanics import SitnikovBodyElement
        >>> SitnikovBodyElement('body', e=0.1).e
        0.1
    """

    def __init__(
        self,
        label: str,
        *,
        z: float = 0.5,
        e: Annotated[float, RealSet.closed_open(0, oo)] = 0.0,
        values: Mapping[str, object] | None = None,
    ) -> None:
        super().__init__(label, values=values)
        self.z = z
        self.e = e

class SitnikovGravityInteraction(Interaction):
    """Pull of two equal primaries on a light body on their axis, `z'' = -dV/dz`.

    The primaries of mass 1/2 sit at the distance `r(t) = (1 - e cos t) / 2` from the axis, with the eccentricity `e` of
    the target, so the body at the height `z` has the potential `V = -1 / sqrt(z² + r(t)²)`.

    Args:
        label:
            The label of the interaction.

        target:
            The path of the body.

    Examples:
        >>> from skcomplex.systems.physics.celestial_mechanics import SitnikovGravityInteraction
        >>> SitnikovGravityInteraction('gravity', target='body').target
        'body'
    """

    law_classes = (RateLaw,)

    def __init__(self, label: str, *, target: Role) -> None:
        super().__init__(label)
        self.target = target

    def _prepare(self, context: SimpleNamespace) -> None:
        """Set the acceleration of the height of the body.

        Args:
            context:
                The namespace of the body and the time `t`.
        """
        super()._prepare(context)
        body, t = context.target, context.t
        height = SR.symbol('_z')
        distance = (1 - body.e * cos(t)) / 2
        potential = -1 / sqrt(height**2 + distance**2)
        self.laws_ = [RateLaw(body.z.diff(t, 2), -potential.diff(height).subs({height: body.z}))]

Equations

The equations are those that symbolic returns for the system with its default parameters.

body.z: diff(z_body(t), t, t) == -8*z_body(t)/((e_body*cos(t) - 1)^2 + 4*z_body(t)^2)^(3/2)