cloudy  trunk
physconst.h
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 
4 #ifndef PHYSCONST_H_
5 #define PHYSCONST_H_
6 
16 /*#include "physconst.h"*/
17 
18 /*********************************************************************
19  * first come math constants *
20  *********************************************************************/
21 
23 UNUSED const double EE = 2.718281828459045235360287;
24 
26 UNUSED const double EULER = 0.577215664901532860606512090082;
27 
29 UNUSED const double PI = 3.141592653589793238462643;
30 
32 UNUSED const double PI2 = 6.283185307179586476925287;
33 
35 UNUSED const double PI4 = 12.56637061435917295385057;
36 
38 UNUSED const double PI8 = 25.13274122871834590770115;
39 
41 UNUSED const double SQRT2 = 1.414213562373095048801689;
42 
44 UNUSED const double SQRTPI = 1.772453850905516027298167;
45 
47 UNUSED const double SQRTPIBY2 = 1.253314137315500251207883;
48 
50 UNUSED const double LN_TWO = 0.6931471805599453094172321;
51 
53 UNUSED const double LN_TEN = 2.302585092994045684017991;
54 
56 UNUSED const double LOG10_E = 0.4342944819032518276511289;
57 
60 UNUSED const double OPTDEP2EXTIN = 1.085736204758129569127822;
61 
63 UNUSED const double RADIAN = 57.29577951308232087679815;
64 
65 /*********************************************************************
66  * astronomical constants go here *
67  *********************************************************************/
68 
71 UNUSED const double SOLAR_MASS = 1.9884e33;
72 
75 UNUSED const double SOLAR_LUMINOSITY = 3.8427e33;
76 
79 /* >>refer phys const http://pdg.lbl.gov/2010/reviews/rpp2010-rev-astrophysical-constants.pdf */
80 UNUSED const double AU = 1.49597870700e13;
81 
82 /*********************************************************************
83  * fundamental constants go next, eventually rest should be defined *
84  * in terms of these, these are Codata 2010 values. *
85  *********************************************************************/
86 
88 UNUSED const double ATOMIC_MASS_UNIT = 1.660538921e-24;
89 
91 UNUSED const double ELECTRON_MASS = 9.10938291e-28;
92 
94 UNUSED const double PROTON_MASS = 1.672621777e-24;
95 
97 UNUSED const double BOLTZMANN = 1.3806488e-16;
98 
100 UNUSED const double SPEEDLIGHT = 2.99792458e10;
101 
103 UNUSED const double HPLANCK = 6.62606957e-27;
104 
106 UNUSED const double AVOGADRO = 6.0221415e23;
107 
109 UNUSED const double GRAV_CONST = 6.67384e-8;
110 
112 UNUSED const double ELEM_CHARGE = 1.602176565e-19;
113 
115 UNUSED const double RYD_INF = 1.0973731568539e5;
116 
119 UNUSED const double HIONPOT = 0.999466508345;
120 
121 /*********************************************************************
122  * below here should be derived constants *
123  * *
124  * NB - explicit values in comments are approximate *
125  * and are not maintained ! *
126  *********************************************************************/
127 
129 UNUSED const double AS1RAD = RADIAN*3600.;
130 
132 UNUSED const double SQAS1SR = pow2(AS1RAD);
133 
135 UNUSED const double SQAS_SKY = PI4*SQAS1SR;
136 
138 UNUSED const double PARSEC = AU*AS1RAD;
139 
141 UNUSED const double MEGAPARSEC = 1.e6*PARSEC;
142 
144 UNUSED const double H_BAR = HPLANCK/(2.*PI);
145 
148 
150 UNUSED const double ELECTRIC_CONST = 1.e11/(PI4*pow2(SPEEDLIGHT));
151 
158 
161 UNUSED const double SAHA = sqrt(pow3(HION_LTE_POP));
162 
165 
168 
170 UNUSED const double KJMOL1CM = ERG1CM*AVOGADRO/1e10;
171 
173 UNUSED const double WAVNRYD = 1./RYD_INF;
174 
176 UNUSED const double RYDLAM = 1.e8/RYD_INF;
177 
180 
184 
186 UNUSED const double EVDEGK = ELEM_CHARGE*1.e7/BOLTZMANN;
187 
190 
192 UNUSED const double EN1EV = EN1RYD/EVRYD;
193 
196 
199 
202 
204 UNUSED const double HBAReV = H_BAR/EN1EV;
205 
208 
211 
214 
217 
220 
223 
226 
230 
234 
238 
239 #endif /* PHYSCONST_H_ */
ELEM_CHARGE_ESU
const UNUSED double ELEM_CHARGE_ESU
Definition: physconst.h:147
FR1RYD
const UNUSED double FR1RYD
Definition: physconst.h:195
ELEM_CHARGE
const UNUSED double ELEM_CHARGE
Definition: physconst.h:112
FINE_STRUCTURE2
const UNUSED double FINE_STRUCTURE2
Definition: physconst.h:219
STEFAN_BOLTZ
const UNUSED double STEFAN_BOLTZ
Definition: physconst.h:210
PI8
const UNUSED double PI8
Definition: physconst.h:38
UNUSED
#define UNUSED
Definition: cpu.h:14
LOG10_E
const UNUSED double LOG10_E
Definition: physconst.h:56
EULER
const UNUSED double EULER
Definition: physconst.h:26
SOLAR_MASS
const UNUSED double SOLAR_MASS
Definition: physconst.h:71
HIONPOT
const UNUSED double HIONPOT
Definition: physconst.h:119
EVDEGK
const UNUSED double EVDEGK
Definition: physconst.h:186
TWO_PHOT_CONST
const UNUSED double TWO_PHOT_CONST
Definition: physconst.h:225
HBAReV
const UNUSED double HBAReV
Definition: physconst.h:204
RADIAN
const UNUSED double RADIAN
Definition: physconst.h:63
T1CM
const UNUSED double T1CM
Definition: physconst.h:167
SQRT2
const UNUSED double SQRT2
Definition: physconst.h:41
SAHA
const UNUSED double SAHA
Definition: physconst.h:161
SQAS_SKY
const UNUSED double SQAS_SKY
Definition: physconst.h:135
KJMOL1CM
const UNUSED double KJMOL1CM
Definition: physconst.h:170
PI4
const UNUSED double PI4
Definition: physconst.h:35
FR1RYDHYD
const UNUSED double FR1RYDHYD
Definition: physconst.h:201
ATOMIC_MASS_UNIT
const UNUSED double ATOMIC_MASS_UNIT
Definition: physconst.h:88
PROTON_MASS
const UNUSED double PROTON_MASS
Definition: physconst.h:94
HION_LTE_POP
const UNUSED double HION_LTE_POP
Definition: physconst.h:157
PI
const UNUSED double PI
Definition: physconst.h:29
PARSEC
const UNUSED double PARSEC
Definition: physconst.h:138
SQAS1SR
const UNUSED double SQAS1SR
Definition: physconst.h:132
WAVNRYD
const UNUSED double WAVNRYD
Definition: physconst.h:173
EN1EV
const UNUSED double EN1EV
Definition: physconst.h:192
FREQ_1EV
const UNUSED double FREQ_1EV
Definition: physconst.h:213
H_BAR
const UNUSED double H_BAR
Definition: physconst.h:144
MILNE_CONST
const UNUSED double MILNE_CONST
Definition: physconst.h:233
FINE_STRUCTURE
const UNUSED double FINE_STRUCTURE
Definition: physconst.h:216
SPEEDLIGHT
const UNUSED double SPEEDLIGHT
Definition: physconst.h:100
ELECTRON_MASS
const UNUSED double ELECTRON_MASS
Definition: physconst.h:91
SQRTPIBY2
const UNUSED double SQRTPIBY2
Definition: physconst.h:47
LN_TWO
const UNUSED double LN_TWO
Definition: physconst.h:50
SQRTPI
const UNUSED double SQRTPI
Definition: physconst.h:44
RYDLAM
const UNUSED double RYDLAM
Definition: physconst.h:176
pow2
T pow2(T a)
Definition: cddefines.h:931
RYD_INF
const UNUSED double RYD_INF
Definition: physconst.h:115
PI2
const UNUSED double PI2
Definition: physconst.h:32
HPLANCK
const UNUSED double HPLANCK
Definition: physconst.h:103
ELECTRIC_CONST
const UNUSED double ELECTRIC_CONST
Definition: physconst.h:150
RYDLAMHYD
const UNUSED double RYDLAMHYD
Definition: physconst.h:207
EE
const UNUSED double EE
Definition: physconst.h:23
COLL_CONST
const UNUSED double COLL_CONST
Definition: physconst.h:229
SOLAR_LUMINOSITY
const UNUSED double SOLAR_LUMINOSITY
Definition: physconst.h:75
LN_TEN
const UNUSED double LN_TEN
Definition: physconst.h:53
AU
const UNUSED double AU
Definition: physconst.h:80
HNU3C2
const UNUSED double HNU3C2
Definition: physconst.h:198
AS1RAD
const UNUSED double AS1RAD
Definition: physconst.h:129
OPTDEP2EXTIN
const UNUSED double OPTDEP2EXTIN
Definition: physconst.h:60
MEGAPARSEC
const UNUSED double MEGAPARSEC
Definition: physconst.h:141
TRANS_PROB_CONST
const UNUSED double TRANS_PROB_CONST
Definition: physconst.h:237
ERG1CM
const UNUSED double ERG1CM
Definition: physconst.h:164
AVOGADRO
const UNUSED double AVOGADRO
Definition: physconst.h:106
TE1RYD
const UNUSED double TE1RYD
Definition: physconst.h:183
GRAV_CONST
const UNUSED double GRAV_CONST
Definition: physconst.h:109
EVRYD
const UNUSED double EVRYD
Definition: physconst.h:189
BOLTZMANN
const UNUSED double BOLTZMANN
Definition: physconst.h:97
BOHR_RADIUS_CM
const UNUSED double BOHR_RADIUS_CM
Definition: physconst.h:222
pow3
T pow3(T a)
Definition: cddefines.h:938
EN1RYD
const UNUSED double EN1RYD
Definition: physconst.h:179