Show
Ignore:
Timestamp:
05/06/08 14:47:46 (8 months ago)
Author:
rjrw
Message:

Add optional diagnostics for rate and chemical balance controlling
species update.

Remove logically dead code.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/newmole/source/mole_drive.cpp

    r1849 r2027  
    2929#include "co.h" 
    3030 
    31 /* says whether the co network is currently set to zero */ 
    32 static bool lgMoleZeroed=true; 
    33  
    3431/* this is the error tolerance for reporting non-convergence */ 
    3532static const double MOLETOLER = 0.10; 
     
    3835STATIC void MolecSetup (void); 
    3936STATIC void mole_effects(void); 
    40  
    41 STATIC void mole_null_results(void); 
    4237STATIC void mole_h_rate_diagnostics(void); 
    4338 
     
    5146 
    5247        DEBUG_ENTRY( "mole_drive()" ); 
    53  
    54         /* this branch we will not do the CO equilibrium, set some variables that 
    55          * would be calculated by the chemistry, zero others, and return */ 
    56         mole_null_results(); 
    5748 
    5849        MolecSetup(); 
     
    9586        /* >>chng 05 jul 15, do not init if we have never evaluated CO in this iteration 
    9687         * and we are below limit where it should be evaluated */ 
    97         if( mole.iteration < 0 || lgMoleZeroed ) 
     88        if( mole.iteration < 0 || true ) /* ???? */ 
    9889        { 
    9990 
     
    157148        } 
    158149         
    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 needed 
    166          * 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  
    227150        return; 
    228151}