-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.py
More file actions
53 lines (51 loc) · 1.66 KB
/
constants.py
File metadata and controls
53 lines (51 loc) · 1.66 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import numpy as np
boltzmann_eV = 8.617332478e-5 #eV / K
boltzmann_J = 1.380648e-23 #J / K
boltzmann_erg = 1.380648e-16 #erg / K
iboltzmann_eV = 1.0/boltzmann_eV #K / eV
iboltzmann_erg = 1.0/boltzmann_erg #K / erg
planck_eV = 4.135667516e-15 #eV s
planck_J = 6.62606957e-34 #J s
planck_erg = 6.62606957e-27 #erg s
iplanck_eV = 1.0/planck_eV #1 / eV / s
iplanck_J = 1.0/planck_J #1 / J / s
iplanck_erg = 1.0/planck_erg #1 / erg / s
gravity = 6.674e-8 #cm3 / g / s2
e_mass = 9.10938188e-28 #g
p_mass = 1.67262158e-24 #g
n_mass = 1.674920e-24 #g
ip_mass = 1.0/p_mass #1/g
clight = 2.99792458e10 #cm/s
eV_to_erg = 1.60217646e-12 #eV -> erg
ry_to_eV = 13.605690 #rydberg -> eV
ry_to_erg = 2.179872e-11 #rydberg -> erg
seconds_per_year = 365.0*24.0*3600.0 #yr -> s
km_to_cm = 1e5 #km -> cm
cm_to_Mpc = 1.0/3.08e24 #cm -> Mpc
kvgas_erg = 8.0*boltzmann_erg/np.pi/p_mass #
pre_kvgas_sqrt = np.sqrt(8.0*boltzmann_erg/np.pi) #
pre_planck = 2.0*planck_erg/clight**2 #erg/cm2*s3
exp_planck = planck_erg / boltzmann_erg #s*K
stefboltz_erg = 5.670373e-5 #erg/s/cm2/K4
N_avogadro = 6.0221e23 ##
Rgas_J = 8.31446210 #J/K/mol
Rgas_kJ = 8.3144621e-3 #kJ/K/mol
Rgas_cgs = 8.31446210e7 #cgs
hubble = 0.7040 #dimensionless
Omega0 = 1.0 #dimensionless
Omegab = 0.0456 #dimensionless
Hubble0 = 1e2*hubble*km_to_cm*cm_to_Mpc #1/s
mass_elec = 9.10938188e-28 #mass in g
mass_hp = 1.67262158e-24
mass_h = 1.67353251819e-24
mass_hm = 1.67444345638e-24
mass_dp = 3.34512158e-24
mass_d = 3.34603251819e-24
mass_h2p = 3.34615409819e-24
mass_dm = 3.34694345638e-24
mass_h2 = 3.34706503638e-24
mass_hdp = 5.01865409819e-24
mass_hd = 5.01956503638e-24
mass_hepp = 6.69024316e-24
mass_hep = 6.69115409819e-24
mass_he = 6.69206503638e-24