1
#include "Physics_Functions.hpp"
2

3
#include <cmath>
4
#include <iostream>
5
#include <functional>
6
#include <cstdlib>
7

8
#include "Numerics_Functions.hpp"
9

10
//1. Units:
11
	//Energy
12
	const double GeV=1.0;
13
	const double eV=1.0E-9*GeV;
14
	const double keV=1.0E-6*GeV;
15
	const double MeV=1.0E-3*GeV;
16
	const double TeV=1.0E3*GeV;
17 2
	const double erg=gram*pow(cm/sec,2);
18 2
	const double Joule=kg*pow(meter/sec,2);
19
	//Mass
20
	const double gram=5.617977528089887E23*GeV;
21
	const double kg=1e3*gram;
22
	//Length
23
	const double cm=5.068e13/GeV;
24
	const double meter=100*cm;
25
	const double km=1000*meter;
26
	const double fm=1e-15*meter;
27
	const double pb=1e-36*pow(cm,2);
28
	const double parsec=3.0857e16*meter;
29
	const double kpc=1e3*parsec;
30
	const double Mpc=1e6*parsec;
31
	const double a0 = 5.29177e-11*meter; //Bohr radius
32
	//Time
33
	const double sec=299792458*meter;
34
	const double minute=60*sec;
35
	const double hour=60*minute;
36
	const double day=24*hour;
37
	const double year=365.24*day;
38
	//Temperature
39
	const double Kelvin=8.62E-14*GeV;
40
	//Angle
41
	const double deg=M_PI/180.0;
42
	
43

44
//2. Specific Parameters:
45
	//Masses
46
	const double mPlanck= 1.2209E19*GeV;
47
	const double mProton=0.938*GeV ;
48
	const double mElectron= 0.511*MeV;
49
	const double mNucleon = 0.932*GeV;
50
	//Coupling constants
51
	const double aEM = 1.0/137.035999139;
52
	const double GNewton=pow(mPlanck,-2);
53
	const double GFermi = 1.16637e-5/GeV/GeV;
54
	//Geographic Parameters
55
	const double mEarth=5.972E24*kg;
56
	const double rEarth=6371*km;
57
	const double rhoEarth=5.51*gram*pow(cm,-3);
58
	const double rhoCrust=2.7*gram*pow(cm,-3);
59
	//Solar Parameters
60
	const double mSun=1.989E30*kg;
61
	const double rSun=6.957E8*meter;
62
	//Dark Matter Halo Parameters (are defined in the cfg file)
63
	double v0=0.0;
64
	double vesc=0.0;
65
	double vEarth =0.0;
66
	double rhoDM=0.0;
67
	double Nesc=0.0;
68
	//Dark matter form factor reference momentum transfer
69
	const double qRef = aEM*mElectron;
70
//3. Unit Conversion
71 2
	double InUnits(double quantity, double dimension)
72
	{
73 2
		return quantity/dimension;
74
	}
75

76
//5. Simple Physics functions
77 2
	double Reduced_Mass(double m1,double m2)
78
	{
79 2
		return m1*m2/(m1+m2);
80
	}
81 2
	double NucleusMass(double A)
82
	{
83 2
		return A*mNucleon;
84
	}
85 2
	double Thomas_Fermi_Radius(int Z)
86
	{
87 2
		return pow(9*M_PI*M_PI/2.0/Z,1.0/3.0)/4.0*a0;
88
	}
89
			

Read our documentation on viewing source code .

Loading