N Body Problem
A quick implementation of the N Body Problem of Celestial Mechanics
Features
-
Create Bodies with 3 initial parameters:
param dtype description mass float mass of the body pos np.array position vector <i, j, k> vel np.array scape velocity vector <i, j, k> -
Create an NBPSolver with two parameters:
param dtype description bodies list list of bodies ts float time step -
Utilize the NBPSolver method solve_timestep() to update each body's position after the specified time step has passed.
-
Call the method plot_animation(time_lim, frame_size, output), where the parameters are:
param dtype description time_lim int limit number of seconds frame_size int amount of iterations before recording a frame output string output file name (include file extension, e.g. output.gif) -
This package offers flexibility in terms of handling the output, as well as dinamically adding or removing bodies during run time.
TODO:
- Add different integration methods
- Add efficiency monitoring (*hint: create a context manager to monitor execution times)
Metadata
Release files for hynbp 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hynbp-0.0.3.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hynbp-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 kB
Release files / hynbp-0.0.3.tar.gz
| Download URL | hynbp-0.0.3.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3725eef05119917f43fe09a0139bf071c40b07d94cbc842e8f73f56ed594809e
|
|
BLAKE2b-256 checksum How to use checksums |
4725748a2c6276b76ce9efdd6408d0f11d6bc0cc997efdd49e6c2cfde38f2cf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.2
|
Release files / hynbp-0.0.3-py3-none-any.whl
| Download URL | hynbp-0.0.3-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3f780cb5790ea0aa46f7a69719fc0773696f6e868426030cefbec59bd239c5d
|
|
BLAKE2b-256 checksum How to use checksums |
f9ee4310ce4223f4fafec3f5a4d4aebb42183153f1d0639448fa9dce5b5f3e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.2
|