Skip to contents

System Setup

Create a simulation and add bodies

create_system()
Initialize an orbitr simulation system
add_sun()
Add the Sun to the system
add_body()
Add a physical body to the system
remove_body()
Remove one or more bodies from the system
add_body_keplerian()
Add a body using Keplerian orbital elements
add_planet()
Add a known solar system body by name
load_solar_system()
Load a pre-built solar system
get_bodies()
Extract the body table from a system
print(<orbit_system>)
Print an orbit_system

Simulation

Run the N-body simulation

simulate_system()
Simulate kinematics for an orbitr system

Analysis

Re-center, measure, check, and continue a run

shift_reference_frame()
Shift the coordinate reference frame of the simulation
get_orbital_elements()
Osculating orbital elements of a body relative to a parent
get_energy()
Total energy of a simulated system
get_momentum() get_angular_momentum()
Total linear and angular momentum of a simulated system
conserved_quantities()
Conserved quantities and how well a simulation conserved them
continue_simulation()
Continue a simulation from its last state
system_from_simulation()
Rebuild an orbit_system from a simulation snapshot

Visualization

Plot and animate results

plot_orbits()
Plot Orbital Trajectories (Smart 2D/3D Dispatch)
plot_orbits_3d()
Plot 3D Interactive Orbital Trajectories
plot_system()
Plot System Snapshot at a Single Time (Smart 2D/3D Dispatch)
plot_system_3d()
Plot 3D Interactive System Snapshot at a Single Time
animate_system()
Animate the System Over Time (Smart 2D/3D Dispatch)
animate_system_3d()
Animate the System Over Time in Interactive 3D

Save & Export

Save systems and export body data

save_system()
Save an orbit_system to disk
load_system()
Load an orbit_system from disk
export_bodies()
Export body states to CSV

Physical Constants

Built-in masses, distances, and orbital speeds