Spaces:
Sleeping
Sleeping
Download constants.py from j25aiml013/physics-simulation: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/spaces/j25aiml013/physics-simulation/resolve/main/constants.py
- Command line
-
hf download hf://spaces/j25aiml013/physics-simulation/constants.py
-
curl -L -o constants.py https://huggingface.co/spaces/j25aiml013/physics-simulation/resolve/main/constants.py
1.04 kB
| # ------------------------------------------------------ | |
| # Fundamental constants | |
| # ------------------------------------------------------ | |
| HBAR = 1.054571817e-34 # Reduced Planck constant (J·s) | |
| PLANCK = 6.62607015e-34 # Full Planck constant (J·s) | |
| MASS_ELECTRON = 9.10938356e-31 # Electron mass (kg) | |
| E_CHARGE = 1.602176634e-19 # Electron charge magnitude (C) | |
| # ------------------------------------------------------ | |
| # Length scale constants | |
| # ------------------------------------------------------ | |
| BOHR_RADIUS = 5.29177210903e-11 # Bohr radius (m) | |
| # ------------------------------------------------------ | |
| # Energy conversions | |
| # ------------------------------------------------------ | |
| J_TO_EV = 1 / E_CHARGE # Joules → eV | |
| EV_TO_J = E_CHARGE # eV → Joules | |
| # ------------------------------------------------------ | |
| # Hydrogen potentials constant | |
| # ------------------------------------------------------ | |
| COULOMB_CONSTANT = 1 / (4 * 3.141592653589793 * 8.8541878128e-12) | |