Populate the empty top-level __init__.py so `import naturedynamics as nd; nd.constants.SPEED_OF_LIGHT` works as documented in the README, fix carnot_efficiency's over-indented return (was unreachable dead code, always returning None), set the package author to the current maintainer, sync dev extras with requirements-dev.txt, and ignore build/ dist/ output. Claude-Session: https://claude.ai/code/session_016HKXv2RYErNkLLGYuBmusE |
||
|---|---|---|
| naturedynamics | ||
| .gitignore | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| requirements-dev.txt | ||
| requirements.txt | ||
naturedynamics — A Comprehensive Physics Library in Python
naturedynamics is a Python library that offers an extensive collection of physical constants, equations, and formulas. It is a fork of https://github.com/reumer06/fphysics. @reumer06 did an amazing job in compiling an exhaustive collection of laws and formulas. This was exactly what I envisioned too, so I am very grateful to build on that and extend it in all kind of directions.
Key Features
Constants Database
Includes essential physical constants — SI base units, quantum constants, astronomical parameters, and more.
Modular Formula Collections
Separate modules for mechanics, thermodynamics, electromagnetism, atomic physics, nuclear physics, relativity, statistical mechanics, and beyond.
Unit Conversion
Convert seamlessly between SI, CGS, and natural units.
Built for Learning and Worldbuilding
Perfect for integration into scientific calculators, simulations and teaching aids.
Quick Start
import naturedynamics as nd
from naturedynamics.relativity.general import schwarzschild_radius
from naturedynamics.thermodynamics.heat_engines import carnot_efficiency
# Access fundamental constants
print(nd.constants.SPEED_OF_LIGHT)
# Calculate Schwarzschild radius
print(schwarzschild_radius(10))
#Calulate the Carnot Efficiency
print(carnot_efficiency(500, 300))
Contributing
I welcome all contributions — from adding new formulas to refining documentation.
- Fork the repository
- Create a feature branch
- Submit a pull request
- Report issues or suggest enhancements
License
MIT License - see LICENSE file for details.