Changeset 2086 for branches/newmole/source/iso_level.cpp
- Timestamp:
- 05/19/08 12:39:03 (8 months ago)
- Files:
-
- 1 modified
-
branches/newmole/source/iso_level.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/newmole/source/iso_level.cpp
r2080 r2086 334 334 } 335 335 336 for( long ion=0; ion<=nelem+1; ++ion ) 337 { 338 if( ion!=nelem-ipISO ) 339 { 340 /* recombination must be multiplied by a ratio of densities to get proper rate. */ 341 source += mole.xMoleChTrRate[nelem][ion][nelem-ipISO] * 342 dense.xIonDense[nelem][ion] ; 343 /* take ionization out of every level. */ 344 sink += mole.xMoleChTrRate[nelem][nelem-ipISO][ion]; 345 } 346 } 347 336 348 /* add in source and sink terms from molecular network. */ 337 if( nelem-ipISO < N_MOLE_ION)349 if( conv.nTotalIoniz > 1 || iteration > 1) 338 350 { 339 351 source += mole.source[nelem][nelem-ipISO]; … … 350 362 } 351 363 } 364 } 365 366 if( nelem-ipISO >= 1 && ionbal.RateIonizTot[nelem][nelem-ipISO-1] > 0.) 367 { 368 /* now add ionization from next lower stage */ 369 source += ionbal.RateIonizTot[nelem][nelem-ipISO-1]* 370 dense.xIonDense[nelem][nelem-ipISO-1]; 371 372 /* now add recombination to next lower stage */ 373 sink += ionbal.RateRecomTot[nelem][nelem-ipISO-1]; 352 374 } 353 375
