Skip to main content

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

Metadata

Release files for MSG-Nbody 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MSG-Nbody 0.2.7
File Size Uploaded
msg_nbody-0.2.7.tar.gz 34.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for MSG-Nbody 0.2.7
File Interpreter ABI Platform
msg_nbody-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 64.3 kB

Release files / msg_nbody-0.2.7.tar.gz

Download URL msg_nbody-0.2.7.tar.gz
Size 34.0 kB
Tags Source
SHA-256 checksum
How to use checksums
6ef5b4bbb294eb03516b6cd5416783cf4a88265df9e8181f9e4f2826b68a8ad3
BLAKE2b-256 checksum
How to use checksums
8d6c74525604552035050b4cc2f6eff89201d8eeabc0beaa32a0665a803cc4dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / msg_nbody-0.2.7-py3-none-any.whl

Download URL msg_nbody-0.2.7-py3-none-any.whl
Size 30.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3eb81adab04a50d04dd06b24916af4b24725c5e5c36e0a2d22e02dc229d19d2
BLAKE2b-256 checksum
How to use checksums
a59cd18c5f377c5a7fe05964d95aa180ebef2668c944eaf0f9d3ed4432bf069d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page