00001 /* This file is part of Cloudy and is copyright (C)1978-2007 by Gary J. Ferland 00002 * For conditions of distribution and use see copyright notice in license.txt */ 00014 void Hydrogenic(void); 00015 00019 void HydroLevel(long int ipZ); 00020 00024 void HydroLevelPop(long int nelem ); 00025 00029 void HydroCollid(long int ipZ); 00030 00034 void HydroT2Low(long int nelem ); 00035 00040 double HydroRecCool(long int n, long int ipZ); 00041 00045 double HCoolRatio( 00046 double t ); 00047 00048 static const int NDIM1 = 14; 00049 static const int NDIM2 = 15; 00050 00051 class t_hydrobranch : public Singleton<t_hydrobranch> 00052 { 00053 friend class Singleton<t_hydrobranch>; 00054 protected: 00055 t_hydrobranch(); 00056 private: 00057 /* Arrays A,B,C satisfy the equation y=A+B*x+C*x**2, x=LOG10(temp) 00058 * for the low density branching ratio. 00059 * Each line or pair of lines are for an upper level shown 00060 * by the continue number on the left. Reading from left to 00061 * right the fit for the ratio to 2, then 3, etc.. */ 00062 double Alow[NDIM1][NDIM2]; 00063 double Blow[NDIM1][NDIM2]; 00064 double Clow[NDIM1][NDIM2]; 00065 00066 /* High density limit: */ 00067 /* The array Ahigh is the high density branching ratio */ 00068 double Ahigh[NDIM1][NDIM2]; 00069 00070 /* Intermediate limit: */ 00071 /* Arrays Aint,Bint,Cint are the linear fits A + B*x + C*x^2, x=LOG10(Te) 00072 * to the branching ratios at the density of DenCut below. */ 00073 double Aint[NDIM1][NDIM2]; 00074 double Bint[NDIM1][NDIM2]; 00075 double Cint[NDIM1][NDIM2]; 00076 00077 /* Zero density limit: */ 00078 /* The zero density BR for He+ fit to a1 + a2*x + a3*x^2, LOG10(Te) */ 00079 double Azero[NDIM1][NDIM2]; 00080 double Bzero[NDIM1][NDIM2]; 00081 double Czero[NDIM1][NDIM2]; 00082 00083 /* the intermediate density for cutting the 00084 * interpolation. Only used for ipHi=4,5,6,7,8. */ 00085 double DenCut[NDIM2]; 00086 00087 void ReadBlock(FILE* in, double x[][NDIM2]); 00088 public: 00089 double HydroBranchFunc(long int nHi, long int nLo, long int ipZPhys) const; 00090 }; 00091 00097 inline double HydroBranch(long int nHi, long int nLo, long int ipZPhys) 00098 { 00099 return t_hydrobranch::Inst().HydroBranchFunc( nHi, nLo, ipZPhys ); 00100 } 00101 00105 void HydroRecom(long int ipZ); 00106 00108 void HydroRenorm( void ); 00109 00111 EXTERN struct t_hydro { 00112 00116 bool lgHydEmiss; 00117 00119 bool lgHColionImp; 00120 00123 bool lgHiPop2; 00124 float pop2mx; 00125 00128 bool lgReevalRecom; 00129 00131 float **strkar; 00132 double **pestrk; 00133 00136 float dstfe2lya; 00137 00139 float HLineWidth; 00140 00142 float TexcLya; 00143 00145 long int nLyaHot; 00146 00148 float TLyaMax, 00150 TeLyaMax; 00151 00153 long int nZTLaMax; 00154 00156 char chHTopType[5]; 00157 00159 float H_ion_frac_photo; 00160 00162 float HCollIonMax; 00163 00165 float H_ion_frac_collis; 00166 00176 double HyLife[NHYDRO_MAX_LEVEL]; 00177 00179 double cintot; 00180 00182 bool lgHInducImp; 00183 00185 double D2H_ratio; 00186 00188 float DampOnFac; 00189 00191 float FracInd; 00192 long int ndclev; 00193 float fbul; 00194 long int nbul; 00195 00198 bool lgLymanPumping; 00199 00203 float xLymanPumpingScaleFactor; 00204 00205 } hydro;