Skip to main content

grav_sim

N-body gravity simulation library with C and Python API

Target Audience:

  • Physics students
  • Anyone interested in N-body simulations

Features:

  • Ten integrators including WHFast and IAS15
  • Barnes-Hut algorithm with linear octree
  • Particle-Mesh method for cosmological structure formation
  • Multiple sample projects

5 steps to N-body simulation

A short course to teach beginners how to write fast and clean N-body gravity simulations code in Python.

Homepage: https://alvinng4.com/grav_sim/5_steps_to_n_body_simulation/

Contents

Image Image

Sample projects

Evolving the solar system for 1 million years

Image Image

Asteroid belt animation

Asteroid belt animation 0
Asteroid belt animation 1
Asteroid belt animation 2

Formation of Kirkwood gaps

Kirkwood gaps 1
Kirkwood gaps 2

Galaxy collision

Galaxy collision

Cosmological structure formation

Cosmological structure formation

Feedback and Bugs

If you found any bugs or want to leave some feedback, please feel free to let me know by opening an issue or sending an email to alvinng324(at)gmail.com.

Metadata

Release files for grav_sim 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for grav_sim 1.0.1
File Size Uploaded Provenance
grav_sim-1.0.1.tar.gz 15.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for grav_sim 1.0.1
File Interpreter ABI Platform
grav_sim-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 33.2 kB

Release files / grav_sim-1.0.1.tar.gz

Download URL grav_sim-1.0.1.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
aba3fc97f2c8ee86dbd2971e3dbad6acbef6227c8fd45bc13f4a45463e1b01b5
BLAKE2b-256 checksum
How to use checksums
487fc69ff8d0b25173d3eb45f84934ebc8d5e3892b551eff3ae235303dc82d6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / grav_sim-1.0.1-py3-none-any.whl

Download URL grav_sim-1.0.1-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31c18796f34fda0e512b7074aebc3eaba00c09874680c59895fb2d4dba203b56
BLAKE2b-256 checksum
How to use checksums
aeb6f014042d7b8a64a2afe0930be81eda714eb0c75dfe296d4e69e8fd9e5278
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for grav_sim 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page