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.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: msg_nbody-0.2.0.tar.gz
  • Upload date:
  • Size: 21.9 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.0.tar.gz
Algorithm Hash digest
SHA256 1c5472a4d022a5911dc37da0f80cbe3e547b11d3fd4aa00550808a2a71c611dd
MD5 b0349327354c4be2c7d4b94f57708e92
BLAKE2b-256 aec43c98bc14e0b8136a9c803fa8b9f7fdf2e897a4a86c2e5488f8abb7b72bd4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msg_nbody-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a685bf16f7694d8b15918f2a205275930e150a1b7443b990c48e0abc52afd071
MD5 18220e8703cc2028cfbbfc8ab11632c8
BLAKE2b-256 2cf7030f10b273d8e0832a7f7c1ce4293dcd7adc9605fc83f224fd8d9c99e2b4

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