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

Uploaded Python 3

File details

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

File metadata

  • Download URL: msg_nbody-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ccb47e15d503c1f34241b3ac26a4829a6db29fd2fe6aa77053582ffef6975b7b
MD5 de572321109dae6c2c55f31315c50b2f
BLAKE2b-256 d3aed58e8f1b5f33a8166676ff8731780b308d0b3b2daa0033e9448ae1ed5e3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msg_nbody-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4ed10665e79f181f5c08542b18bea950b03936322eda4ce7c58ecf3dd2cf532
MD5 1b1b688d37734e4ce1bb888c123eee6c
BLAKE2b-256 60bbe45cacd5f80dc7d6c182befe734ef6d1706b3bfdadf2ce9d247c2b800283

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