/home66/gary/public_html/cloudy/c08_branch/source/atmdat.h

Go to the documentation of this file.
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 _ATMDAT_H_
00005 #define _ATMDAT_H_
00006 
00007 
00014 double atmdat_2phot_shapefunction( double EbyE2nu, long ipISO, long nelem );
00015 
00021 void atmdat_2phot_rate(
00022         long ipZ , 
00023         long ipISO );
00024 
00028 void atmdat_readin(void);
00029 
00034 void atmdat_Chianti_readin( long intNS );
00035 
00040 void atmdat_lamda_readin( long intNS );
00041 
00042 
00053 void atmdat_outer_shell(
00054   long int iz, 
00055   long int in,
00056   long int *imax,
00057   long int *ig0, 
00058   long int *ig1);
00059 
00065 void ChargTranEval( double *O_HIonRate );
00066 
00071 double ChargTranSumHeat(void);
00072 
00073 /*ChargTranPun punch charge transfer rate coefficients */
00079 void ChargTranPun( FILE* ipPnunit , char* chPunch );
00080 
00086 double atmdat_dielrec_fe(long int ion, double t);
00087 
00090 void atmdat_H_phot_cs(void);
00091 
00093 void atmdat_3body(void);
00094 
00105 double atmdat_HS_caseB( 
00106         long int iHi, long int iLo, long int iZ, double TempIn,
00107         double DenIn,
00108         char chCase 
00109         );
00110 
00112 void atmdat_DielSupres(void);
00113 
00114 /* these are the vectors that store the original Hummer and Storey case B
00115  * line data for H and He - the declaration for the interpolator follows */
00116 #define NHSDIM 15 
00117 #define NLINEHS 300  
00118 #define HS_NZ 8 
00119 #define NHCSTE  8 
00121 EXTERN struct t_atmdat {
00122 
00142         double HCharExcIonOf[LIMELM][LIMELM+1], //(cm3 s-1)
00143           HCharExcRecTo[LIMELM][LIMELM+1],              //(cm3 s-1)
00144           HCharHeatMax, 
00145           HCharCoolMax, 
00146           HCharHeatOn;
00147 
00148         /* rate coefficient (cm3 s-1) for N+(3P) + H+ -> N(2D) + H+ charge transfer*/
00149         double HCharExcRecTo_N0_2D;
00150 
00152         double HCharExcIonTotal,
00153           HCharExcRecTotal;
00154 
00156         double HeCharExcIonTotal,
00157           HeCharExcRecTotal;
00158 
00160         double HIonFrac;
00161 
00163         double HIonFracMax;
00164 
00171         double HeCharExcIonOf[LIMELM][LIMELM], 
00172           HeCharExcRecTo[LIMELM][LIMELM];
00173 
00176         double HCTAlex;
00177 
00180         bool lgCTOn;
00181 
00184         double Density[2][HS_NZ][NHSDIM], 
00185                 ElecTemp[2][HS_NZ][NHSDIM],
00187                 Emiss[2][HS_NZ][NHSDIM][NHSDIM][NLINEHS];
00188 
00191         long int nDensity[2][HS_NZ] , ntemp[2][HS_NZ] , ncut[2][HS_NZ];
00192 
00196         bool lgHCaseBOK[2][HS_NZ];
00197 
00199         long int nsbig;
00200 
00203         bool lgCollIonOn;
00204 
00206         realnum WaveLengthCaseB[8][25][24];
00207 
00209         realnum *CaseBWlHeI;
00211         long int nCaseBHeI;
00212 
00213         }       atmdat;
00214 
00215 typedef enum { PHFIT_UNDEF, PHFIT95, PHFIT96 } phfit_version;
00216 
00217 class t_ADfA : public Singleton<t_ADfA>
00218 {
00219         friend class Singleton<t_ADfA>;
00220 protected: 
00221         t_ADfA();
00222 private:
00223         phfit_version version;
00224         /* phfit.dat */
00225         long int L[7];
00226         long int NINN[30];
00227         long int NTOT[30];
00228         realnum PH1[7][30][30][6];
00229         realnum PH2[30][30][7];
00230         /* hpfit.dat */
00231         realnum PHH[NHYDRO_MAX_LEVEL][5];
00232         /* rec_lines.dat */
00233         realnum P[8][110];
00234         realnum ST[9][405];
00235         /* rad_rec.dat */
00236         realnum rrec[30][30][2];
00237         realnum rnew[30][30][4];
00238         realnum fe[13][3];
00239         /* h_rad_rec */
00240         realnum HRF[NHYDRO_MAX_LEVEL][9];
00241         /* h_phot_cs.dat */
00244         realnum STH[NHYDRO_MAX_LEVEL];
00245         /* coll_ion.dat */
00246         double CF[30][30][5];
00247         /* h_coll_str.dat */
00250         /* >>refer      H1      cs      Anderson, H., Ballance, C.P., Badnell, N.R., & Summers, H.P., 
00251          * >>refercon   2000, J Phys B, 33, 1255; erratum, 2002 */
00252         double HCS[14][10][8];
00253 public:
00257         void set_version(phfit_version val) { version = val; }
00258 
00260         phfit_version get_version() const { return version; }
00261 
00268         realnum ph1(int i, int j, int k, int l) const { return PH1[i][j][k][l]; }
00269 
00274         realnum sth(int i) const { return STH[i]; }
00275 
00284         double phfit(long int nz, long int ne, long int is, double e);
00285 
00292         double hpfit(long int iz, long int n, double e);
00293 
00300         double hpfit_rel(long int iz, long int n, double e);
00301 
00307         void rec_lines(double t, realnum r[][471]);
00308 
00315         double rad_rec(long int iz, long int in, double t);
00316 
00323         double H_rad_rec(long int iz, long int n, double t);
00324 
00331         double coll_ion(long int iz, long int in, double t);
00332 
00338         realnum h_coll_str( long ipLo, long ipHi, long ipTe );
00339 };
00340 
00341 #endif /* _ATMDAT_H_ */

Generated on Mon Feb 16 12:01:12 2009 for cloudy by  doxygen 1.4.7