cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 const double EE = 2.718281828459045235360287;
24 
26 const double EULER = 0.577215664901532860606512090082;
27 
29 const double PI = 3.141592653589793238462643;
30 
32 const double PI2 = 6.283185307179586476925287;
33 
35 const double PI4 = 12.56637061435917295385057;
36 
38 const double PI8 = 25.13274122871834590770115;
39 
41 const double SQRT2 = 1.414213562373095048801689;
42 
44 const double SQRTPI = 1.772453850905516027298167;
45 
47 const double SQRTPIBY2 = 1.253314137315500251207883;
48 
50 const double LN_TWO = 0.6931471805599453094172321;
51 
53 const double LN_TEN = 2.302585092994045684017991;
54 
56 const double LOG10_E = 0.4342944819032518276511289;
57 
60 const double OPTDEP2EXTIN = 1.085736204758129569127822;
61 
63 const double RADIAN = 57.29577951308232087679815;
64 
65 /*********************************************************************
66  * astronomical constants go here *
67  *********************************************************************/
68 
71 const double SOLAR_MASS = 1.9884e33;
72 
75 const double SOLAR_LUMINOSITY = 3.8427e33;
76 
79 /* >>refer phys const http://pdg.lbl.gov/2010/reviews/rpp2010-rev-astrophysical-constants.pdf */
80 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 const double ATOMIC_MASS_UNIT = 1.660538921e-24;
89 
91 const double ELECTRON_MASS = 9.10938291e-28;
92 
94 const double PROTON_MASS = 1.672621777e-24;
95 
97 const double BOLTZMANN = 1.3806488e-16;
98 
100 const double SPEEDLIGHT = 2.99792458e10;
101 
103 const double HPLANCK = 6.62606957e-27;
104 
106 const double AVOGADRO = 6.0221415e23;
107 
109 const double GRAV_CONST = 6.67384e-8;
110 
112 const double ELEM_CHARGE = 1.602176565e-19;
113 
115 const double RYD_INF = 1.0973731568539e5;
116 
119 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 const double AS1RAD = RADIAN*3600.;
130 
132 const double SQAS1SR = pow2(AS1RAD);
133 
135 const double SQAS_SKY = PI4*SQAS1SR;
136 
138 const double PARSEC = AU*AS1RAD;
139 
141 const double MEGAPARSEC = 1.e6*PARSEC;
142 
144 const double H_BAR = HPLANCK/(2.*PI);
145 
148 
150 const double ELECTRIC_CONST = 1.e11/(PI4*pow2(SPEEDLIGHT));
151 
158 
161 const double SAHA = sqrt(pow3(HION_LTE_POP));
162 
164 const double ERG1CM = HPLANCK*SPEEDLIGHT;
165 
167 const double T1CM = HPLANCK*SPEEDLIGHT/BOLTZMANN;
168 
170 const double KJMOL1CM = ERG1CM*AVOGADRO/1e10;
171 
173 const double WAVNRYD = 1./RYD_INF;
174 
176 const double RYDLAM = 1.e8/RYD_INF;
177 
179 const double EN1RYD = HPLANCK*SPEEDLIGHT*RYD_INF;
180 
183 const double TE1RYD = HPLANCK*SPEEDLIGHT*RYD_INF/BOLTZMANN;
184 
186 const double EVDEGK = ELEM_CHARGE*1.e7/BOLTZMANN;
187 
189 const double EVRYD = HPLANCK*SPEEDLIGHT*RYD_INF/ELEM_CHARGE*1.e-7;
190 
192 const double EN1EV = EN1RYD/EVRYD;
193 
195 const double FR1RYD = SPEEDLIGHT*RYD_INF;
196 
198 const double HNU3C2 = 2.*HPLANCK*SPEEDLIGHT*pow3(RYD_INF);
199 
201 const double FR1RYDHYD = SPEEDLIGHT*RYD_INF*HIONPOT;
202 
204 const double HBAReV = H_BAR/EN1EV;
205 
207 const double RYDLAMHYD = RYDLAM/HIONPOT;
208 
210 const double STEFAN_BOLTZ = pow2(PI*pow2(BOLTZMANN))/(60.*pow3(H_BAR)*pow2(SPEEDLIGHT));
211 
213 const double FREQ_1EV = SPEEDLIGHT*RYD_INF/EVRYD;
214 
216 const double FINE_STRUCTURE = pow2(ELEM_CHARGE_ESU)/SPEEDLIGHT/H_BAR;
217 
219 const double FINE_STRUCTURE2 = pow2(FINE_STRUCTURE);
220 
222 const double BOHR_RADIUS_CM = FINE_STRUCTURE/(PI4*RYD_INF);
223 
225 const double TWO_PHOT_CONST = 9.*pow3(FINE_STRUCTURE2)*FR1RYD/2048.;
226 
230 
233 const double MILNE_CONST = SPEEDLIGHT*sqrt(pow3(FINE_STRUCTURE2)*pow3(TE1RYD)/PI);
234 
237 const double TRANS_PROB_CONST = PI4*HPLANCK*FINE_STRUCTURE/ELECTRON_MASS;
238 
239 #endif /* PHYSCONST_H_ */
const double TWO_PHOT_CONST
Definition: physconst.h:225
const double H_BAR
Definition: physconst.h:144
const double AS1RAD
Definition: physconst.h:129
const double PI2
Definition: physconst.h:32
const double AVOGADRO
Definition: physconst.h:106
const double OPTDEP2EXTIN
Definition: physconst.h:60
const double KJMOL1CM
Definition: physconst.h:170
const double MILNE_CONST
Definition: physconst.h:233
const double COLL_CONST
Definition: physconst.h:229
const double RADIAN
Definition: physconst.h:63
T pow3(T a)
Definition: cddefines.h:942
const double ELECTRIC_CONST
Definition: physconst.h:150
const double RYDLAM
Definition: physconst.h:176
const double EVDEGK
Definition: physconst.h:186
const double SPEEDLIGHT
Definition: physconst.h:100
const double FINE_STRUCTURE
Definition: physconst.h:216
const double PI4
Definition: physconst.h:35
const double SQAS_SKY
Definition: physconst.h:135
const double EVRYD
Definition: physconst.h:189
const double FR1RYD
Definition: physconst.h:195
const double AU
Definition: physconst.h:80
const double ERG1CM
Definition: physconst.h:164
const double STEFAN_BOLTZ
Definition: physconst.h:210
const double TRANS_PROB_CONST
Definition: physconst.h:237
const double RYD_INF
Definition: physconst.h:115
const double WAVNRYD
Definition: physconst.h:173
const double PARSEC
Definition: physconst.h:138
const double T1CM
Definition: physconst.h:167
const double HIONPOT
Definition: physconst.h:119
const double HION_LTE_POP
Definition: physconst.h:157
const double SQRT2
Definition: physconst.h:41
const double FINE_STRUCTURE2
Definition: physconst.h:219
const double SOLAR_MASS
Definition: physconst.h:71
const double SOLAR_LUMINOSITY
Definition: physconst.h:75
const double EN1RYD
Definition: physconst.h:179
const double LN_TWO
Definition: physconst.h:50
const double EN1EV
Definition: physconst.h:192
const double HNU3C2
Definition: physconst.h:198
const double LOG10_E
Definition: physconst.h:56
const double FR1RYDHYD
Definition: physconst.h:201
const double BOHR_RADIUS_CM
Definition: physconst.h:222
T pow2(T a)
Definition: cddefines.h:935
const double SQRTPI
Definition: physconst.h:44
const double ELECTRON_MASS
Definition: physconst.h:91
const double ELEM_CHARGE_ESU
Definition: physconst.h:147
const double EULER
Definition: physconst.h:26
const double BOLTZMANN
Definition: physconst.h:97
const double SQRTPIBY2
Definition: physconst.h:47
const double FREQ_1EV
Definition: physconst.h:213
const double HBAReV
Definition: physconst.h:204
const double RYDLAMHYD
Definition: physconst.h:207
const double PROTON_MASS
Definition: physconst.h:94
const double MEGAPARSEC
Definition: physconst.h:141
const double GRAV_CONST
Definition: physconst.h:109
const double ATOMIC_MASS_UNIT
Definition: physconst.h:88
const double ELEM_CHARGE
Definition: physconst.h:112
const double HPLANCK
Definition: physconst.h:103
const double PI
Definition: physconst.h:29
const double SAHA
Definition: physconst.h:161
const double LN_TEN
Definition: physconst.h:53
const double TE1RYD
Definition: physconst.h:183
const double SQAS1SR
Definition: physconst.h:132
const double PI8
Definition: physconst.h:38
const double EE
Definition: physconst.h:23