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

Uploaded Python 3

File details

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

File metadata

  • Download URL: msg_nbody-0.2.6.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.6.tar.gz
Algorithm Hash digest
SHA256 78659102c8bd234f3e2cd7cf61ce480018918a1726eab0f05587837c4f8aafb1
MD5 83060193847f1fe2c23a8bfc9961d737
BLAKE2b-256 96a63dbf33c3b0abc4460893c62bdc0a82351432d455dfe3996c44202c8ca565

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msg_nbody-0.2.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b417e6822b895ca52adf2e3c44d6e8efb881683bde61ca60d82c140e2045b6e8
MD5 8d2ecb7f9e953ad0efce91d699a057ec
BLAKE2b-256 099f7b49e9153df46cd73a7813f6188e3805cb9cf692950332dd77d97bbc3031

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