DISPATCH
constants.py
1
#
2
"""
3
Useful physical constants with units given in the comments.
4
"""
5
6
# radiation and atomic physics:
7
clight = 2.99792e10
# speed of light [cm s**-1]
8
SBc = 5.670373e-5
# Stefan-Boltzmann constant [erg s**-1 cm**-2 K**-4]
9
arad = 4.0 * SBc / clight
# radiation constant [erg cm**-3 K**-4]
10
kBoltz = 1.3807e-16
# Boltzmann's constant [erg/K]
11
mpro = 1.6726e-24
# proton mass [g]
12
mamu = 1.66054e-24
# atomic mass unit [g]
13
hPlanck = 6.6260755e-27
# Planck's constant [erg s]
14
15
# astronomical:
16
au = 1.49598e13
# astronomical unit [cm]
17
m_sun = 1.98892e33
# mass of the Sun [g]
18
r_sun = 6.9598e10
# radius of the Sun [cm]
19
l_sun = 3.839e33
# luminosity of the Sun [erg s**-1]
20
gcnst = 6.67e-8
# gravitational constant [cm**3 g**-1 s**-2]
21
pc = 3.0856776e18
# parsec [cm]
22
m_earth = 5.972e27
# mass of the Earth [g]
23
r_earth = 6.371e8
# radius of the Earth [cm]
24
25
# conversion factors:
26
eV_to_K = 1.1604505e9
# electron volts to Kelvin
27
Habing = 1.6e-3
# CGS units of flux [erg cm**-3 s**-1] to Habing units
28
yr_to_s = 3.156e7
# years to seconds
utilities
python
constants.py
Generated by
1.8.13