cloudy trunk
|
00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 00004 #ifndef _IONBAL_H_ 00005 #define _IONBAL_H_ 00006 00007 00010 void ion_recom_calculate( void ); 00011 00015 void ion_trim( 00016 long int nelem ); 00017 00019 void ion_zero(long int nelem); 00020 00024 void ion_collis( 00025 long nelem); 00026 00031 void ion_solver(long int nelem, 00032 bool lgPrintIt); 00033 00038 void ion_photo( 00039 long int nelem , 00040 bool lgPrintIt ); 00041 00043 void ion_recomb(bool,const double*,const double*,const double[],const double[], 00044 const double[],const double[],const double[],const double[],long); 00045 00047 void ion_recombAGN( FILE * io ); 00048 00052 void Badnell_rec_init( void ); 00053 00054 /* routines to do heavy element ionization balance */ 00055 void IonAlumi(void); 00056 void IonArgon(void); 00057 void IonBeryl(void); 00058 void IonBoron(void); 00059 void IonCalci(void); 00060 void IonCarbo(void); 00061 void IonChlor(void); 00062 void IonChrom(void); 00063 void IonCobal(void); 00064 void IonCoppe(void); 00065 void IonFluor(void); 00066 void IonHelium(void); 00067 void IonIron(void); 00068 void IonLithi(void); 00069 void IonMagne(void); 00070 void IonManga(void); 00071 void IonNeon(void); 00072 void IonNicke(void); 00073 void IonNitro(void); 00074 void IonOxyge(void); 00075 void IonPhosi(void); 00076 void IonPotas(void); 00077 void IonScand(void); 00078 void IonSilic(void); 00079 void IonSodiu(void); 00080 void IonSulph(void); 00081 void IonTitan(void); 00082 void IonVanad(void); 00083 void IonZinc(void); 00084 00086 #define NSHELLS 7 00087 00089 EXTERN struct t_ionbal { 00090 00098 double trimhi, 00099 00102 trimlo; 00103 00105 bool lgTrimhiOn; 00106 00107 /* ============================================================== 00108 * all following deals with ionization processes */ 00109 00121 double ****PhotoRate_Shell; 00122 00126 bool lgPhotoIoniz_On; 00127 00130 bool lgHO_ct_chem; 00131 00134 double ***CollIonRate_Ground; 00135 00137 double CosRayIonRate; 00138 00141 double CosRayHeatNeutralParticles; 00142 00145 double CosRayHeatThermalElectrons; 00146 00148 double ExtraHeatRate; 00149 00152 double xNeutronHeatRate; 00153 00155 double PairProducPhotoRate[3]; 00156 00157 /* ============================================================== 00158 * following deal with Compton recoil ionization of bound electrons */ 00159 00163 bool lgCompRecoil; 00164 00166 double CompRecoilHeatLocal; 00167 00169 long int **ipCompRecoil; 00170 00172 double **CompRecoilIonRate; 00173 00175 double **CompRecoilIonRateSave; 00176 00178 double **CompRecoilHeatRate; 00179 00181 double **CompRecoilHeatRateSave; 00182 00184 double **UTA_ionize_rate; 00186 double **UTA_heat_rate; 00187 00189 bool lgInnerShellLine_on; 00191 bool lgInnerShell_Kisielius; 00194 bool lgInnerShell_Gu06; 00195 00197 double **RateIonizTot; 00198 00201 long int nCompRecoilElec[LIMELM]; 00202 00203 double CompHeating_Max; 00204 /* ============================================================== 00205 * end Compton recoil ionization of bound electrons */ 00206 00207 /* ============================================================== 00208 * all following deals with recombination */ 00209 00211 double **RateRecomTot; 00212 00214 double **RR_Badnell_rate_coef , 00215 **DR_Badnell_rate_coef, 00216 *DR_Badnell_rate_coef_mean_ion; 00217 00219 int **lgDR_Badnell_rate_coef_exist , 00220 **lgRR_Badnell_rate_coef_exist; 00221 00223 bool lg_use_DR_Badnell_rate_coef_mean_ion; 00224 00226 bool lgDR_recom_Badnell_use, 00227 lgRR_recom_Badnell_use, 00229 lgRecom_Badnell_print; 00230 00232 double **DR_old_rate_coef; 00233 00235 double **RR_rate_coef_used, 00236 **DR_rate_coef_used; 00237 00239 double **RR_Verner_rate_coef; 00240 00245 int nDR_S_guess; 00246 realnum DR_S_scale[5]; 00247 00249 realnum **GrainCreat, 00250 **GrainDestr; 00251 00252 int 00254 lgGrainIonRecom; 00255 00258 realnum DielSupprs[2][LIMELM]; 00259 00261 realnum lg_guess_coef; 00263 realnum guess_noise; 00264 00267 bool lgSupDie[2]; 00268 00271 realnum GuessDiel[4]; 00272 00275 bool lgNoCota; 00276 00278 realnum CotaRate[LIMELM]; 00279 00281 long int ilt, 00282 iltln, 00283 ilthn, 00284 ihthn, 00285 ifail; 00286 00287 } ionbal; 00288 00289 00290 #endif /* _IONBAL_H_ */