Nbody simulation code for galaxy interactions
Project description
MSG_Nbody
MSG_Nbody offers an efficient, fully vectorized and parallelized 3D NumPy implementation of the particle-particle N-body simulation algorithm. The simulation integrates the motion of stellar particles under their combined gravitational attraction in discretized timesteps. The acceleration computation is batch processed and compiled with Numba for fast calculation times. On a reasonably powerful personal computer, the code can support up to ~100,000 - 200,000 particles with runtimes on the order of a couple of days. Lowering the number of particles (N<60,000) will yield computation times from a couple minutes to a couple of hours. This package aims to provide an accessible N-body simulation code in Python that is simple to set up and modify yet still simulates the effects of gravity with reasonable accuracy. Additionally, initial conditions for different galaxy models in equilibrium are provided, including a spherical Hernquist galaxy and a simple disk galaxy. The algorithm for generating spherical galaxy initial conditions of different masses and scale lengths is also provided for further customizations, however, any set of initial conditions can be used as inputs to the simulation code. The package also comes with a fully integrated Python plotting library to analyze simulation snapshots.
Installation
You can install MSG_Nbody via pip:
pip install MSG-Nbody
The full documentation can be found on github at https://github.com/elkogerville/MSG_Nbody
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 msg_nbody-0.2.5.tar.gz.
File metadata
- Download URL: msg_nbody-0.2.5.tar.gz
- Upload date:
- Size: 33.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27c4b7b63d49484604921f1461e9460d214a9deeecbeee128d1c871639dc7e12
|
|
| MD5 |
9c67b32e5d8bf65eaa0e1b47860874db
|
|
| BLAKE2b-256 |
2292ed6d991b2204314ada75d5d40ff57264cd7fa56321dbfa707fb5a61268dc
|
File details
Details for the file msg_nbody-0.2.5-py3-none-any.whl.
File metadata
- Download URL: msg_nbody-0.2.5-py3-none-any.whl
- Upload date:
- Size: 30.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6cf6fef6121f864e5d1d305f17fe40e732d2ace64f5f9021d2e8300761cc861
|
|
| MD5 |
5660fcdce51ebbc53843b5bd59f979c3
|
|
| BLAKE2b-256 |
32c80c2c18ac93b71a1828399dc38a0e99b368e313df679ce6617191a22cc1bc
|