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

Uploaded Python 3

File details

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

File metadata

  • Download URL: msg_nbody-0.2.4.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.4.tar.gz
Algorithm Hash digest
SHA256 f96d6dbd69e353ee2a3ba023b29411fcc0e9b996c97d2458e309b06a7bc75f3b
MD5 018263f2996fc6de3a199de61ed313d2
BLAKE2b-256 4b143dd2aebd43e4549a044a045a37dd2b4d6a0c9ccac42b8dfb7f48694c3cd7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msg_nbody-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 30.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 47d36610f4a83aca7b6b9a60988a0c8a5cdd94b3370a2aa2640a76df46b3b8b9
MD5 08e9f6627c0c329f826440c03eb02860
BLAKE2b-256 ba627b6e08a6bfe9eb411ab521d44eee68da00878bec3deaf6266c549141ea94

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