Changeset 2027 for branches/newmole
- Timestamp:
- 05/06/08 14:47:46 (8 months ago)
- Location:
- branches/newmole/source
- Files:
-
- 3 modified
-
mole_drive.cpp (modified) (5 diffs)
-
mole_reactions.cpp (modified) (2 diffs)
-
mole_species.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/newmole/source/mole_drive.cpp
r1849 r2027 29 29 #include "co.h" 30 30 31 /* says whether the co network is currently set to zero */32 static bool lgMoleZeroed=true;33 34 31 /* this is the error tolerance for reporting non-convergence */ 35 32 static const double MOLETOLER = 0.10; … … 38 35 STATIC void MolecSetup (void); 39 36 STATIC void mole_effects(void); 40 41 STATIC void mole_null_results(void);42 37 STATIC void mole_h_rate_diagnostics(void); 43 38 … … 51 46 52 47 DEBUG_ENTRY( "mole_drive()" ); 53 54 /* this branch we will not do the CO equilibrium, set some variables that55 * would be calculated by the chemistry, zero others, and return */56 mole_null_results();57 48 58 49 MolecSetup(); … … 95 86 /* >>chng 05 jul 15, do not init if we have never evaluated CO in this iteration 96 87 * and we are below limit where it should be evaluated */ 97 if( mole.iteration < 0 || lgMoleZeroed )88 if( mole.iteration < 0 || true ) /* ???? */ 98 89 { 99 90 … … 157 148 } 158 149 159 return;160 }161 162 STATIC void mole_null_results(void)163 {164 DEBUG_ENTRY( "mole_null_results()" );165 /* these are heavy - heavy charge transfer rate that will still be needed166 * for recombination of Si+, S+, and C+ */167 long int nelem , ion, i;168 169 /* heating due to CO photodissociation */170 /* do we need to zero out the arrays and vars? */171 if( !lgMoleZeroed )172 {173 lgMoleZeroed = true;174 for( i=0; i<mole.num_calc; ++i )175 {176 mole.list[i]->den = 0.;177 }178 /* heating due to CO photodissociation */179 thermal.heating[0][9] = 0.;180 /* CO cooling */181 CoolHeavy.C12O16Rot = 0.;182 CoolHeavy.dC12O16Rot = 0.;183 CoolHeavy.C13O16Rot = 0.;184 CoolHeavy.dC13O16Rot = 0.;185 co.CODissHeat = 0.;186 187 /** \todo 2 use TransitionZero here? */188 for( i=0; i < nCORotate; i++ )189 {190 C12O16Rotate[i].Lo->Pop = 0.;191 C13O16Rotate[i].Lo->Pop = 0.;192 /* population of upper level */193 C12O16Rotate[i].Hi->Pop = 0.;194 C13O16Rotate[i].Hi->Pop = 0.;195 /* population of lower level with correction for stimulated emission */196 C12O16Rotate[i].Emis->PopOpc = 0.;197 C13O16Rotate[i].Emis->PopOpc = 0.;198 /* following two heat exchange excitation, deexcitation */199 C12O16Rotate[i].Coll.cool = 0.;200 C12O16Rotate[i].Coll.heat = 0.;201 C13O16Rotate[i].Coll.cool = 0.;202 C13O16Rotate[i].Coll.heat = 0.;203 /* intensity of line */204 C12O16Rotate[i].Emis->xIntensity = 0.;205 C13O16Rotate[i].Emis->xIntensity = 0.;206 /* number of photons emitted in line */207 C12O16Rotate[i].Emis->phots = 0.;208 C13O16Rotate[i].Emis->phots = 0.;209 }210 for( nelem=ipLITHIUM; nelem<LIMELM; ++nelem )211 {212 for( ion=0; ion<nelem+2; ++ion )213 {214 mole.source[nelem][ion] = 0.;215 mole.sink[nelem][ion] = 0.;216 }217 }218 }219 220 if( trace.nTrConvg>=4 )221 {222 /* trace ionization */223 fprintf( ioQQQ,224 " mole_drive4 do not evaluate CO chemistry.\n");225 }226 227 150 return; 228 151 } -
branches/newmole/source/mole_reactions.cpp
r1846 r2027 1893 1893 { 1894 1894 struct mole_reaction_s *rate; 1895 enum { DEBUG_MOLE = false }; 1895 1896 1896 1897 DEBUG_ENTRY("mole_update_rks()"); … … 1906 1907 { 1907 1908 rate = p->second; 1909 realnum oldrk = rate->rk; 1908 1910 ASSERT(rate->fun != NULL); 1909 1911 rate->rk = rate->a*rate->fun(rate); 1912 if (DEBUG_MOLE) 1913 { 1914 if (fabs(rate->rk-oldrk) > 0.1*rate->rk) 1915 fprintf(ioQQQ,"%s: %15.8g => %15.8g\n", 1916 rate->label,oldrk,rate->rk); 1917 } 1910 1918 } 1911 1919 } -
branches/newmole/source/mole_species.cpp
r1938 r2027 616 616 DEBUG_ENTRY("mole_update_species_cache()"); 617 617 618 enum { DEBUG_MOLE = false }; 619 618 620 mole.eden_f = (realnum)dense.eden; /* Need floating point version for compatibility with all other values */ 619 621 … … 621 623 { 622 624 if(mole.list[i]->location != NULL) 625 { 623 626 mole.list[i]->den = *(mole.list[i]->location); 627 if (DEBUG_MOLE) 628 fprintf(ioQQQ,"%s: %f\n",mole.list[i]->label,mole.list[i]->den); 629 } 624 630 } 625 631 … … 665 671 mole.grain_saturation = 1.0; 666 672 } 673 if (DEBUG_MOLE) 674 fprintf(ioQQQ,"Dust: %f %f %f\n", 675 mole.grain_area,mole.grain_density,mole.grain_saturation); 667 676 668 677 }
