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_ */
UNUSED const double LN_TEN
Definition: physconst.h:53
UNUSED const double ELEM_CHARGE_ESU
Definition: physconst.h:147
UNUSED const double SAHA
Definition: physconst.h:161
UNUSED const double EN1EV
Definition: physconst.h:192
UNUSED const double FR1RYD
Definition: physconst.h:195
UNUSED const double TRANS_PROB_CONST
Definition: physconst.h:237
UNUSED const double ERG1CM
Definition: physconst.h:164
UNUSED const double PARSEC
Definition: physconst.h:138
UNUSED const double EVDEGK
Definition: physconst.h:186
UNUSED const double ELECTRON_MASS
Definition: physconst.h:91
UNUSED const double PI4
Definition: physconst.h:35
UNUSED const double FINE_STRUCTURE
Definition: physconst.h:216
T pow3(T a)
Definition: cddefines.h:938
UNUSED const double HION_LTE_POP
Definition: physconst.h:157
UNUSED const double FINE_STRUCTURE2
Definition: physconst.h:219
UNUSED const double AS1RAD
Definition: physconst.h:129
UNUSED const double RADIAN
Definition: physconst.h:63
UNUSED const double EE
Definition: physconst.h:23
UNUSED const double PI8
Definition: physconst.h:38
UNUSED const double WAVNRYD
Definition: physconst.h:173
UNUSED const double BOHR_RADIUS_CM
Definition: physconst.h:222
UNUSED const double OPTDEP2EXTIN
Definition: physconst.h:60
UNUSED const double PI
Definition: physconst.h:29
UNUSED const double ATOMIC_MASS_UNIT
Definition: physconst.h:88
UNUSED const double SQRTPIBY2
Definition: physconst.h:47
UNUSED const double ELECTRIC_CONST
Definition: physconst.h:150
UNUSED const double SOLAR_LUMINOSITY
Definition: physconst.h:75
UNUSED const double HPLANCK
Definition: physconst.h:103
UNUSED const double EVRYD
Definition: physconst.h:189
UNUSED const double TWO_PHOT_CONST
Definition: physconst.h:225
UNUSED const double AVOGADRO
Definition: physconst.h:106
UNUSED const double SQAS1SR
Definition: physconst.h:132
UNUSED const double LOG10_E
Definition: physconst.h:56
UNUSED const double PROTON_MASS
Definition: physconst.h:94
UNUSED const double COLL_CONST
Definition: physconst.h:229
UNUSED const double PI2
Definition: physconst.h:32
UNUSED const double STEFAN_BOLTZ
Definition: physconst.h:210
UNUSED const double SQAS_SKY
Definition: physconst.h:135
UNUSED const double FREQ_1EV
Definition: physconst.h:213
UNUSED const double SPEEDLIGHT
Definition: physconst.h:100
UNUSED const double ELEM_CHARGE
Definition: physconst.h:112
UNUSED const double SQRTPI
Definition: physconst.h:44
UNUSED const double EN1RYD
Definition: physconst.h:179
T pow2(T a)
Definition: cddefines.h:931
UNUSED const double LN_TWO
Definition: physconst.h:50
UNUSED const double RYDLAM
Definition: physconst.h:176
UNUSED const double TE1RYD
Definition: physconst.h:183
UNUSED const double KJMOL1CM
Definition: physconst.h:170
UNUSED const double AU
Definition: physconst.h:80
UNUSED const double MEGAPARSEC
Definition: physconst.h:141
UNUSED const double H_BAR
Definition: physconst.h:144
UNUSED const double HIONPOT
Definition: physconst.h:119
UNUSED const double HNU3C2
Definition: physconst.h:198
UNUSED const double GRAV_CONST
Definition: physconst.h:109
UNUSED const double HBAReV
Definition: physconst.h:204
UNUSED const double EULER
Definition: physconst.h:26
UNUSED const double MILNE_CONST
Definition: physconst.h:233
UNUSED const double RYDLAMHYD
Definition: physconst.h:207
UNUSED const double FR1RYDHYD
Definition: physconst.h:201
UNUSED const double RYD_INF
Definition: physconst.h:115
UNUSED const double BOLTZMANN
Definition: physconst.h:97
UNUSED const double T1CM
Definition: physconst.h:167
UNUSED const double SOLAR_MASS
Definition: physconst.h:71
#define UNUSED
Definition: cpu.h:14
UNUSED const double SQRT2
Definition: physconst.h:41