/home66/gary/public_html/cloudy/c08_branch/source/ion_helium.cpp

Go to the documentation of this file.
00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
00002  * others.  For conditions of distribution and use see copyright notice in license.txt */
00003 /*IonHelium solve ionization balance for helium */
00004 #include "cddefines.h"
00005 #include "dense.h"
00006 #include "trace.h"
00007 #include "conv.h"
00008 #include "iso.h"
00009 #include "ionbal.h"
00010 
00011 void IonHelium( void )
00012 {
00013         bool lgDebugPrint=false;
00014 
00015         DEBUG_ENTRY( "IonHelium()" );
00016 
00017         /* option to "turn off" helium */
00018         if( !dense.lgElmtOn[ipHELIUM] )
00019         {
00020                 dense.xIonDense[ipHELIUM][0] = 0.;
00021                 dense.xIonDense[ipHELIUM][1] = 0.;
00022                 dense.xIonDense[ipHELIUM][2] = 0.;
00023                 return;
00024         }
00025 
00026         /* populations */
00027         /* >>chng 01 may 09, add option to set ionization with element name ioniz cmnd */
00028         if( dense.lgSetIoniz[ipHELIUM] )
00029         {
00030                 dense.xIonDense[ipHELIUM][2] = dense.SetIoniz[ipHELIUM][2]*dense.gas_phase[ipHELIUM];
00031                 dense.xIonDense[ipHELIUM][1] = dense.SetIoniz[ipHELIUM][1]*dense.gas_phase[ipHELIUM];
00032                 dense.xIonDense[ipHELIUM][0] = dense.SetIoniz[ipHELIUM][0]*dense.gas_phase[ipHELIUM];
00033                 return;
00034         }
00035 
00036         lgDebugPrint = false;
00037 #       if 0
00038         if( nzone > 197 )
00039                 lgDebugPrint = true;
00040 #       endif
00041 
00042         /* find ionization balance */
00043         ion_solver( ipHELIUM , lgDebugPrint );
00044 
00045         if( trace.lgHeBug )
00046         {
00047                 fprintf( ioQQQ, "  %li IonHelium returns;  He0:%.4e He+:%.4e He+2:%.4e",
00048                         conv.nTotalIoniz ,
00049                         dense.xIonDense[ipHELIUM][0]/dense.gas_phase[ipHELIUM] ,
00050                         dense.xIonDense[ipHELIUM][1]/dense.gas_phase[ipHELIUM] ,
00051                         dense.xIonDense[ipHELIUM][2]/dense.gas_phase[ipHELIUM] );
00052 
00053                 fprintf( ioQQQ, "     He+/0:%s %.2e smp:%.2e rec:%.2e ion:%.2e ",
00054                         iso.chTypeAtomUsed[ipHE_LIKE][ipHELIUM],
00055                         iso.pop_ion_ov_neut[ipHE_LIKE][ipHELIUM] ,
00056                         iso.xIonSimple[ipHE_LIKE][ipHELIUM],
00057                         ionbal.RateRecomTot[ipHELIUM][0],
00058                         iso.RateLevel2Cont[ipHE_LIKE][ipHELIUM][ipH1s] );
00059 
00060                 fprintf( ioQQQ, " He+/+2:%s %.4e smp:%.4e rec:%.4e ion:%.4e rad rec:%.4e",
00061                         iso.chTypeAtomUsed[ipH_LIKE][ipHELIUM],
00062                         iso.pop_ion_ov_neut[ipH_LIKE][ipHELIUM] ,
00063                         iso.xIonSimple[ipH_LIKE][ipHELIUM] ,
00064                         ionbal.RateRecomTot[ipHELIUM][1],
00065                         iso.RateLevel2Cont[ipH_LIKE][ipHELIUM][ipH1s] ,
00066                         ionbal.RR_rate_coef_used[ipHELIUM][1] );
00067 
00068                 fprintf( ioQQQ, "\n" );
00069         }
00070         return;
00071 }

Generated on Mon Feb 16 12:01:17 2009 for cloudy by  doxygen 1.4.7