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

Uploaded Python 3

File details

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

File metadata

  • Download URL: msg_nbody-0.2.3.tar.gz
  • Upload date:
  • Size: 32.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.3.tar.gz
Algorithm Hash digest
SHA256 10be6027db097f90051111794b322350e569e2fcdf7edc7381171da993861c68
MD5 18f9cd14d61f7b7e96bfc3f6784b26a4
BLAKE2b-256 bae6f23fb8c0e0b21e58b07980a7f06f11c6a4086f537c76d710de4b785453c1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msg_nbody-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 28.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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b23c1b625054d368da31fa2e5ac0c2968e561682e1022afb5b8facba3596401
MD5 9d8452eaf605591c4ad0afc18a179a81
BLAKE2b-256 a6e2bd7fd166d4ec301ea080db25853f3548786ef161eab8a2172b0c3df6bb15

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