Skip to main content

Nbody simulation code for galaxy interactions

Project description

MSG_Nbody

MSG_Nbody is a Python package offers an efficient, fully vectorized 3-dimensional NumPy implementation of the particle-particle N-body simulation algorithm by integrating the motion of stellar particles under their combined gravitational attraction. Initial conditions of different galaxy models in equilibrium are provided, including a Hernquist spherical 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. Yet, any set of initial conditions can be used as inputs to the simulation code, which will integrate their motions and save snapshot files directly to a directory. On a reasonably powerful personal computer, the code can support up to ~20,000 - 30,000 particles with runtimes on the order of a couple of days, using the numba compiler. Lowering the number of particles (N<15,000) will yield computation times of a couple minutes to a couple of hours. Therefore, 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. The package also comes with a fully integrated Python toolkit 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


Download files

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

Source Distribution

msg_nbody-0.2.2.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

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

msg_nbody-0.2.2-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

Details for the file msg_nbody-0.2.2.tar.gz.

File metadata

  • Download URL: msg_nbody-0.2.2.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for msg_nbody-0.2.2.tar.gz
Algorithm Hash digest
SHA256 f26ce7e3cf7d58c16010799127247c8f47d67f60a6a08ca8b59e1995db430242
MD5 38cfab4a8bf8a5418784ed5c863488f9
BLAKE2b-256 ecd4c956fe974d318d8cdb2660a71a24f2251eb15c72ec348a93b4e3d1c9776f

See more details on using hashes here.

File details

Details for the file msg_nbody-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: msg_nbody-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 27.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for msg_nbody-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6ab73b8298d177af4074fe4cd2246b8b6939a01df594d924dc35bb9520e0d1ef
MD5 7359e9bd8f6f2e93c780066af9601b96
BLAKE2b-256 a4b138e805c06693cc930e7500b8c41336943c37e2081fa487cad29f24f38ccd

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