Skip to main content

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


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.7.tar.gz (34.0 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.7-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: msg_nbody-0.2.7.tar.gz
  • Upload date:
  • Size: 34.0 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.7.tar.gz
Algorithm Hash digest
SHA256 6ef5b4bbb294eb03516b6cd5416783cf4a88265df9e8181f9e4f2826b68a8ad3
MD5 7834ce4db486c0f3aaca18e6dcd414d7
BLAKE2b-256 8d6c74525604552035050b4cc2f6eff89201d8eeabc0beaa32a0665a803cc4dd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msg_nbody-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 30.3 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e3eb81adab04a50d04dd06b24916af4b24725c5e5c36e0a2d22e02dc229d19d2
MD5 68cdfe4aacc0e34750734ae4c730f558
BLAKE2b-256 a59cd18c5f377c5a7fe05964d95aa180ebef2668c944eaf0f9d3ed4432bf069d

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