A package for N-body integration using the Runge-Kutta 4th Order Method
Project description
NOrbit
NOrbit is a Python package designed for simulating the N-body problem using a Runge-Kutta 4th order integration scheme. The code provides functions for converting between Keplerian and Cartesian coordinates, calculating accelerations, calculating derivatives, and simulating the orbits of objects in an N-body system.
Installation
Clone the repository and install the required dependencies using the following commands:
pip install NOrbit
or with plotting dependencies
pip install NOrbit[plot]
Usage
Here's an example of how to use the NOrbit package:
import numpy as np
from NOrbit import NOrbit, Object
planets_inner_solar_system = Object.planets_inner_solar_system # list of orbital elements and masses of inner solar system planets
m_sun = 1.0 # mass of sun in solar masses
solar_system = NOrbit(object_elements = planets_inner_solar_system, m_primary = m_sun) # base model of solar system
dt = 1/100 # time-step of integration
n_orbits = 100 # number of orbits of first planet (Merkury) around Sun
inner_solar_system_positions = solar_system.orbit(dt = dt, n_orbits = n_orbits)[0] # orbital position calculations for inner planets and Sun
For a more detailed example, please check the Example Notebook (NOrbit example.ipynb)
Objects
Object.mercury
Object.venus
Object.earth
Object.mars
Object.jupiter
Object.saturn
Object.uranus
Object.neptune
Grouped Objects
Object.planets_solar_system
Object.planets_solar_system_names
Object.planets_inner_solar_system
Object.planets_inner_solar_system_names
Object.planets_outer_solar_system
Object.planets_outer_solar_system_names
License
Distributed under the MIT License. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file NOrbit-1.0.2.tar.gz.
File metadata
- Download URL: NOrbit-1.0.2.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2bf4409cd2c0590d1620f6c5320ee6d97357d44f1b0752694e69713784478e1
|
|
| MD5 |
e0cbfbe480af63c0769b181901be9f76
|
|
| BLAKE2b-256 |
a5553cba189a1c8c92ad3655f6a5230c479ff6b5751906e21f42da0743dcd2d7
|
File details
Details for the file NOrbit-1.0.2-py3-none-any.whl.
File metadata
- Download URL: NOrbit-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f6b0dcdc1776a94898198810da12c6df4c1db0cddfd8579021de96895e655f6
|
|
| MD5 |
5867e55b61592dc5cc0a80626423f937
|
|
| BLAKE2b-256 |
739dbe01d3f5897c2a437feadfdd9fe47f15f30ee1a1e29e5c736ae631faa823
|