1
1
from math import pi
2
2
3
+ from mat3ra .esse .models .definitions .constants import FundamentalConstants
4
+
3
5
4
6
class Coefficients :
5
7
# Same as used in: JS/TS
@@ -13,18 +15,19 @@ class Coefficients:
13
15
# and originally taken from https://github.com/hplgit/physical-quantities/blob/master/PhysicalQuantities.py
14
16
15
17
# Internal, for convenience purposes
16
- _c = 299792458.0 # speed of light, m/s
17
- _mu0 = 4.0e-7 * pi # permeability of vacuum
18
- _eps0 = 1 / _mu0 / _c ** 2 # permittivity of vacuum
19
- _Grav = 6.67259e-11 # gravitational constant
20
- _hplanck = 6.6260755e-34 # Planck constant, J s
21
- _hbar = _hplanck / (2 * pi ) # Planck constant / 2pi, J s
22
- _e = 1.60217733e-19 # elementary charge
23
- _me = 9.1093897e-31 # electron mass
18
+ _c = FundamentalConstants .c # speed of light, m/s
19
+ _Grav = FundamentalConstants .G # gravitational constant
20
+ _hplanck = FundamentalConstants .h # Planck constant, J s
21
+ _e = FundamentalConstants .e # elementary charge
22
+ _me = FundamentalConstants .me # electron mass
23
+ _mu0 = 4.0e-7 * pi # permeability of vacuum, atomic units
24
+
24
25
_mp = 1.6726231e-27 # proton mass
25
26
_Nav = 6.0221367e23 # Avogadro number
26
27
_k = 1.380658e-23 # Boltzmann constant, J/K
27
28
_amu = 1.6605402e-27 # atomic mass unit, kg
29
+ _eps0 = 1 / _mu0 / _c ** 2 # permittivity of vacuum
30
+ _hbar = _hplanck / (2 * pi ) # Planck constant / 2pi, J s
28
31
29
32
# External
30
33
BOHR = 4e10 * pi * _eps0 * _hbar ** 2 / _me / _e ** 2 # Bohr radius in angstrom
0 commit comments