Gravity simulation
Python package for calculation and simulation of n-bodies interaction under the influence of Gravity force.Written in NumPy and Numba.
Installing :
pip install gravity-simulation==2.0.1
Example :
#random example together with one body bigger mass than others
from gravity_simulation.gravity import *
field.generate_random(15, mass=[20, 500], r=[-5, 5], velocity=[-5, 5], alpha=[0, 360])
field.add_body(Body(x0=0, y0=0,v_x=0, v_y=0, mass = 3000))
field.run(1300, C=0.01)
field.save_animation(frames=50,name='my_example',reduce_size_body=50,frames=150)
Docs
in progress
My personal opinion is that the Nympy is an incredible library and without it, The Python is nothing (just an easy programming language and so on), but with the Numpy, The Python is able to solve serious processes involved a huge number of iterations. When the application was written in common Python then the results were quite bad, for example, when the number of bodies is 2000 and number of the iterations is 10000 the duration of the process takes about 2 days because of the app was useless now when the processes are vectorized with NumPy and Numba the execution time takes about 2 hours.
Metadata
Release files for gravity-simulation 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gravity-simulation-2.0.1.tar.gz | 7.3 kB | Without provenance | Details for gravity-simulation-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gravity_simulation-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for gravity_simulation-2.0.1-py3-none-any.whl |
Total release size: 16.8 kB
Release files / gravity-simulation-2.0.1.tar.gz
| Download URL | gravity-simulation-2.0.1.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3dcd6247af26059aa61b88fd2b83df4b6f3cf3dfa4fd9febd5d25bca7ff702d
|
|
BLAKE2b-256 checksum How to use checksums |
1bd3a0fd9688da4e69135304babcff181d142cdb242f36e50a69b850bca42a1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / gravity_simulation-2.0.1-py3-none-any.whl
| Download URL | gravity_simulation-2.0.1-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7dad062e7a2b6cf7811ff81e0444c8c06b18491f64436b5ade940382612eb575
|
|
BLAKE2b-256 checksum How to use checksums |
90f044e1e6eaaaaf2fc994f17cf61e870ceaca84ff90915e5120cb26bcff68eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Security for gravity-simulation 2.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.