sailfish.physics.kepler.OrbitalState

class sailfish.physics.kepler.OrbitalState(primary, secondary)[source]

Bases: NamedTuple

__init__()

Methods

__init__()

count(value, /)

Return number of occurrences of value.

gravitational_acceleration(x, y, ...)

Return the combined gravitational acceleration at a point, with softening.

gravitational_potential(x, y, softening_length)

Return the combined gravitational potential at a point, with softening.

index(value[, start, stop])

Return first index of value.

orbital_parameters(t)

Compute the inverse Kepler two-body problem.

perturb(dm1, dm2, dpx1, dpx2, dpy1, dpy2)

Returns a new orbital state vector if this one is perturbed by the given masses and momenta.

Attributes

angular_momentum

The total anuglar momentum of the system

kinetic_energy

The total kinetic energy of the system

mass_ratio

The system mass ratio, secondary / primary

primary

Alias for field number 0

secondary

Alias for field number 1

separation

The orbital separation

total_energy

The system total energy

total_mass

The sum of the two point masses

property angular_momentum: float

The total anuglar momentum of the system

count(value, /)

Return number of occurrences of value.

gravitational_acceleration(x: float, y: float, softening_length: float) float[source]

Return the combined gravitational acceleration at a point, with softening.

gravitational_potential(x: float, y: float, softening_length: float) float[source]

Return the combined gravitational potential at a point, with softening.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

property kinetic_energy: float

The total kinetic energy of the system

property mass_ratio: float

The system mass ratio, secondary / primary

orbital_parameters(t: float)[source]

Compute the inverse Kepler two-body problem.

This function determines the orbital elements and orientation from the orbital state vector and an absolute time.

perturb(dm1: float, dm2: float, dpx1: float, dpx2: float, dpy1: float, dpy2: float) OrbitalState[source]

Returns a new orbital state vector if this one is perturbed by the given masses and momenta.

  • dm1 Mass added to the primary

  • dm2 Mass added to the secondary

  • dpx1 Impulse (x) added to the primary

  • dpx2 Impulse (x) added to the secondary

  • dpy1 Impulse (y) added to the primary

  • dpy2 Impulse (y) added to the secondary

primary: PointMass

Alias for field number 0

secondary: PointMass

Alias for field number 1

property separation: float

The orbital separation

This will always be the semi-major axis if the eccentricity is zero.

property total_energy: float

The system total energy

property total_mass: float

The sum of the two point masses