Skip to main content

A package for N-body integration using the Runge-Kutta 4th Order Method

Project description

codecov

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 src.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.

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NOrbit-1.0.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

NOrbit-1.0.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file NOrbit-1.0.1.tar.gz.

File metadata

  • Download URL: NOrbit-1.0.1.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

Hashes for NOrbit-1.0.1.tar.gz
Algorithm Hash digest
SHA256 feb12bc8722b8fb234eb29dcb9843a7e180ed594d15488550416ca47c34d8af2
MD5 c9f77f8542282f068c4a3e0846a4fb33
BLAKE2b-256 34535199a3293e7e5b531efee554c6bb39fe298a18ef52bae95c43e12bf126f7

See more details on using hashes here.

File details

Details for the file NOrbit-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: NOrbit-1.0.1-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

Hashes for NOrbit-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1354ee3f8b20bbfce23c215c1c4ec66f30898ac8cc77f1cd600ddf976747edb5
MD5 9504edbb1b81435e32e3e8e2ab04af9d
BLAKE2b-256 028c8636ba6530ce9b6907680c4fabd26bccd60479cf78647562ce5091334490

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page