Changeset 2034 for branches/c08_branch/source/ion_silic.cpp
- Timestamp:
- 05/10/08 09:03:02 (2 months ago)
- Files:
-
- branches/c08_branch/source/ion_silic.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/c08_branch/source/ion_silic.cpp
r1732 r2034 3 3 /*IonSilic determine ionization balance of Silicon */ 4 4 #include "cddefines.h" 5 #include "trace.h"6 5 #include "dense.h" 7 #include "sil.h"8 6 #include "ionbal.h" 9 7 … … 37 35 38 36 bool lgPrtDebug=false; 39 static long nzUsed = -1;40 static double OldRate = 0.;41 double save_rec;42 37 43 38 DEBUG_ENTRY( "IonSilic()" ); … … 45 40 /* silicon, atomic number 14 */ 46 41 if( !dense.lgElmtOn[ipSILICON] ) 47 {48 sil.p1895 = 0.;49 42 return; 50 }51 43 52 44 ion_zero(ipSILICON); 53 45 54 46 ion_photo(ipSILICON,false); 47 48 # if 0 49 static long nzUsed = -1; 50 static double OldRate = 0.; 51 52 /* 2008 apr 18, this appears to try to damp out changes in the valence 53 * shell photo rate - perhaps due to Lya oscillations in dust free 54 * environments? */ 55 55 if( nzone > 1 && OldRate > 0. ) 56 56 { … … 67 67 } 68 68 OldRate = ionbal.PhotoRate_Shell[ipSILICON][0][4][0]; 69 # endif 69 70 70 71 /* find collisional ionization rates */ … … 72 73 73 74 /* get recombination coefficients */ 74 /*lint -e740 unusual pointer cast */75 75 /*lint -e64 type mismatch */ 76 76 ion_recomb(false,(const double*)dicoef,(const double*)dite,ditcrt,aa,bb,cc,dd,ff,ipSILICON); 77 /*lint +e740 unusual pointer cast */78 77 /*lint +e64 type mismatch */ 79 80 /* pumping to 3p of Si III */81 sil.p1895 = ionbal.PhotoRate_Shell[ipSILICON][1][2][0];82 83 /* >>chng 03 sep 29, synch up ion and co solvers.84 * the co solver will have a different C/C+ balance that85 * is strongly affected by the chemistryif we are in neutral gas86 * in this case use co solver's C/C+ balance */87 save_rec = ionbal.RateRecomTot[ipSILICON][0];88 /*>>chng 04 apr 27, do not test for ionhigh being 1,89 * no reason for test on upper stage of ionization,90 * if codrive called but not evaluted then hevmol is all zero */91 /* >>chng 04 sep 10, rm check on search phase, no reason for it */92 # if 093 if( dense.IonLow[ipSILICON]==0 && /*!conv.lgSearch &&*/94 co.hevmol[ipSIP] > SMALLFLOAT &&95 ionbal.RateIonizTot[ipSILICON][0]*co.hevmol[ipATSI]>0.)96 {97 /* >>chng 04 sep 11, use damped ratio, were Si+ oscillations deep in molecular cloud,98 * where Si+ is dominant electron donor */99 ionbal.RateRecomTot[ipSILICON][0] =100 ionbal.RateIonizTot[ipSILICON][0]*101 co.hevmol[ipATSI]/co.hevmol[ipSIP];102 /*fprintf(ioQQQ,"DEBUG sil atm\t%.2f\t%.3e\t%.3e\t%.3e\n",103 fnzone ,104 co.hevmol[ipATSI],105 co.hevmol[ipSIP],106 ionbal.RateIonizTot[ipSILICON][0]);*/107 }108 # endif109 78 110 79 /* solve for ionization balance */ … … 112 81 ion_solver(ipSILICON,lgPrtDebug); 113 82 114 /* reset the var we just hosed */ 115 if( save_rec > 0. ) 116 ionbal.RateRecomTot[ipSILICON][0] = save_rec; 117 118 /* get pmp rate cm-3 s-1 */ 119 sil.p1895 *= dense.xIonDense[ipSILICON][1]*0.85; 120 83 # if 0 84 /* 2008 apr 18, this is all dead code from when co network fed back from 85 * the ionization */ 121 86 if( trace.lgTrace && trace.lgHeavyBug ) 122 87 { … … 128 93 fprintf( ioQQQ, "\n" ); 129 94 } 130 # if 0131 95 fprintf( ioQQQ, "DEBUG silicon\t%.2f",fnzone ); 132 96 for( i=0; i < 2; i++ )
