00001 /* This file is part of Cloudy and is copyright (C)1978-2010 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 00004 #ifndef DENSE_H_ 00005 #define DENSE_H_ 00006 00007 /* dense.h density related variables */ 00008 00013 double dense_fabden(double radius, 00014 double depth); 00015 00020 double dense_tabden(double r0, 00021 double depth); 00022 00023 /*dense_parametric_wind called by dlaw command, returns density for any density law */ 00024 double dense_parametric_wind(double rad); 00025 00026 const int LIMTABDLAW = 500; 00027 00029 EXTERN struct t_dense 00030 { 00031 t_dense() { 00032 /* list of atomic weights, mass in AMU, used for thermal line widths */ 00033 /* >>refer all atomic weight Coplen, T.B. 2001, J. Phys. Chem REf Data, 30, 701 */ 00034 AtomicWeight[0] = 1.00794f; 00035 AtomicWeight[1] = 4.0026022f; 00036 AtomicWeight[2] = 6.9412f; 00037 AtomicWeight[3] = 9.0121823f; 00038 AtomicWeight[4] = 10.8117f; 00039 AtomicWeight[5] = 12.01078f; 00040 AtomicWeight[6] = 14.00672f; 00041 AtomicWeight[7] = 15.99943f; 00042 AtomicWeight[8] = 18.9984032f; 00043 AtomicWeight[9] = 20.17976f; 00044 AtomicWeight[10] = 22.989770f; 00045 AtomicWeight[11] = 24.30506f; 00046 AtomicWeight[12] = 26.9815382f; 00047 AtomicWeight[13] = 28.08553f; 00048 AtomicWeight[14] = 30.9737612f; 00049 AtomicWeight[15] = 32.0655f; 00050 AtomicWeight[16] = 35.4532f; 00051 AtomicWeight[17] = 39.9481f; 00052 AtomicWeight[18] = 39.09831f; 00053 AtomicWeight[19] = 40.0784f; 00054 AtomicWeight[20] = 44.9559108f; 00055 AtomicWeight[21] = 47.8671f; 00056 AtomicWeight[22] = 50.94151f; 00057 AtomicWeight[23] = 51.99616f; 00058 AtomicWeight[24] = 54.9380499f; 00059 AtomicWeight[25] = 55.8472f; 00060 AtomicWeight[26] = 58.9332009f; 00061 AtomicWeight[27] = 58.69342f; 00062 AtomicWeight[28] = 63.5463f; 00063 AtomicWeight[29] = 65.392f; 00064 } 00065 00069 realnum gas_phase[LIMELM]; 00070 00072 realnum AtomicWeight[LIMELM]; 00073 00076 realnum xMolecules[LIMELM]; 00077 00079 realnum H_sum_in_CO; 00080 00082 realnum xMassDensity; 00083 00086 realnum xMassDensity0; 00087 00089 realnum pden; 00090 00092 realnum wmole; 00093 00095 realnum xNucleiTotal; 00096 00098 realnum xMassTotal; 00099 00102 realnum HCorrFac; 00103 00110 long int IonLow[LIMELM+1]; 00111 long int IonHigh[LIMELM+1]; 00112 00122 realnum xIonDense[LIMELM+3][LIMELM+1]; 00123 00125 bool lgIonChiantiOn[LIMELM][LIMELM+1]; 00126 00130 realnum AbundanceLimit; 00131 00137 bool lgElmtOn[LIMELM]; 00138 00140 bool lgSetIoniz[LIMELM]; 00141 00145 realnum SetIoniz[LIMELM][LIMELM+1]; 00146 00149 char chDenseLaw[5]; 00150 00151 /* this says keep initial density constant, 00152 * so pressure from iter to iter not really const */ 00153 bool lgDenseInitConstant; 00154 00155 // let initial pressure vary with time 00156 bool lgPressureVaryTime; 00157 00158 // required number is timescale for time variation 00159 double PressureVaryTimeTimescale; 00160 // optional number is index for time variation 00161 double PressureVaryTimeIndex; 00162 00164 double DensityLaw[10]; 00165 00167 bool lgAsChoose[LIMELM][LIMELM]; 00168 bool lgCSChoose[LIMELM][LIMELM]; 00169 00171 realnum frad[LIMTABDLAW]; 00172 realnum fhden[LIMTABDLAW]; 00173 00175 long int nvals; 00176 00178 bool lgDLWDepth; 00179 00181 double eden; 00182 00184 double EdenMax , EdenMin; 00185 00187 realnum eden_f; 00188 00191 double density_low_limit; 00192 00194 long int nzEdenBad; 00195 00197 realnum EdenSet; 00198 00200 realnum EdenExtra; 00201 00203 double SqrtEden; 00204 00207 double EdenHCorr; 00208 00210 double EdenTrue; 00211 00213 double eden_from_metals; 00214 00216 bool lgEdenBad; 00217 00219 double edensqte; 00220 00224 double cdsqte; 00225 00228 realnum DensityPower; 00229 realnum rscale; 00230 realnum den0; 00231 00233 bool lgDenFlucOn; 00234 00237 bool lgDenFlucRadius; 00238 00240 realnum flong; 00241 realnum cfirst; 00242 realnum csecnd; 00243 realnum flcPhase; 00244 00245 } dense; 00246 00247 00248 #endif /* DENSE_H_ */