Body Module
The body module provides light-weight representation of a celestial body participating in a circular restricted three body problem (CR3BP) or standalone dynamical simulation.
The module defines the Body
class, a minimal container that stores basic physical quantities and plotting attributes while preserving the hierarchical relation to a central body through the parent
attribute.
Body()
Celestial body container for CR3BP systems.
-
class hiten.system.body.Body[source]
Bases: _HitenBase
Celestial body container bound to a lightweight persistence adapter.
- Parameters:
name (str) – The name of the body.
mass (float) – The mass of the body.
radius (float) – The radius of the body.
color (str) – The color of the body.
parent (Body
) – The parent of the body.
-
property name: str
Return the name of the body.
-
property mass: float
Return the mass of the body in kg.
-
property radius: float
Return the radius of the body in km.
-
property color: str
Return the color of the body.
-
property parent: Body
Return the parent of the body.
-
__setstate__(state)[source]
Restore the Body instance after unpickling.
The heavy, non-serialisable dynamics is reconstructed lazily
using the stored value of name, mass, radius, color and parent.
- Parameters:
state (dict[str, Any]) – Dictionary containing the serialized state of the Body.
-
classmethod load(filepath, **kwargs)[source]
Load a Body from a file (new instance).
- Parameters:
filepath (str | Path)
- Return type:
Body