-
Notifications
You must be signed in to change notification settings - Fork 3
/
const.py
executable file
·33 lines (28 loc) · 1.06 KB
/
const.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# physical constants
H_PLANCK = 6.6261e-27 # Planck constant
C_LIGHT = 2.99792e10 # speed of light
M_PROTON = 1.673e-24 # proton mass
ME = 9.1094e-28 # electron's rest mass
ME_over_MP = ME/M_PROTON
CHARGE_e = 4.80321e-10 # electron charge
A_RAD = 7.5646e-15 # radiation density constant
K_B = 1.3807e-16 # Boltzmann constant
SIGMA_SB = 5.6705e-5 # Stefan-Boltzmann constant
G_NEWTON = 6.674e-8 # Newton's constant
KAPPA_T = 0.34 # opacity from Thomson scattering
KAPPA_BF = 4.3e25 # bound-free opacity = KAPPA_BF*rho*T^(-3.5)
SIGMA_T = 6.65246e-25 # Thomson cross section
H_HUBBLE = 7.0e9/3.09e27 # Hubble's constant, in s^-1
OMEGA_M = 0.27 # cosmological mass fraction of matter
OMEGA_LAMBDA = 0.73 # cosmological constant
M_SUN = 1.98847e33 # solar mass
R_SUN = 6.96e10 # solar radius
kpc2cm = 3.0856776e21
pc2cm = 3.0856776e18
eV2erg = 1.60218e-12
erg2eV = 1./eV2erg
day2sec = 86400.
yr2sec = 365*day2sec
au2cm = 1.49597871e13
rad2arcsec = 206264.80624709
ME_C2 = 8.187e-7 # electron's rest mass energy