/home66/gary/public_html/cloudy/c08_branch/source/ion_chlor.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 /*IonChlor ionization balance for chlorine */
00004 #include "cddefines.h"
00005 #include "dense.h"
00006 #include "atmdat.h"
00007 #include "ionbal.h"
00008 
00009 void IonChlor(void)
00010 {
00011         const int NDIM = ipCHLORINE+1;
00012 
00013         static const double dicoef[2][NDIM] = {
00014                 {5.5e-5,1.0e-2,1.1e-2,1.0e-2,5.0e-2,3.2e-2,3.4e-2,1.6e-2,2.4e-2,4.0e-2,
00015                  4.0e-2,3.8e-2,6.8e-2,2.6e-2,4.6e-1,11.,0.},
00016                 {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}
00017         };
00018         static const double dite[2][NDIM] = {
00019                 {1.3e5,1.4e5,1.4e5,1.4e5,2.0e5,1.8e5,2.3e5,7.2e5,6.4e5,6.0e5,4.9e5,
00020                  4.6e5,5.3e5,3.2e5,2.6e7,2.8e7,0.},
00021                 {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}
00022         };
00023         static const double ditcrt[NDIM] = {3.0e4,2.5e4,2.5e4,1.8e4,1.8e4,2.2e4,
00024           5.0e5,1.6e5,1.5e5,1.5e5,1.3e5,1.3e5,1.1e5,7.6e4,6.5e6,1.4e7,1e20};
00025         static const double aa[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
00026         static const double bb[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
00027         static const double cc[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
00028         static const double dd[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
00029         static const double ff[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
00030 
00031         double ct_save;
00032 
00033         DEBUG_ENTRY( "IonChlor()" );
00034 
00035         /* chlorine, element number 17
00036          *
00037          * rates from Shull and van Steenberg, Ap.J. Sup 48, 95.
00038          * these are for argon, but no better can be done today */
00039 
00040         /* fits to Aldrovandi and Pequignot Rev Bras Fisica 4, 491 */
00041 
00042         /* Pequignot and Aldrovandi Ast Ap 161, 169. */
00043 
00044         if( !dense.lgElmtOn[ipCHLORINE] )
00045         {
00046                 return;
00047         }
00048 
00049         ion_zero(ipCHLORINE);
00050 
00051         ion_photo(ipCHLORINE,false);
00052 
00053         /* find collisional ionization rates */
00054         ion_collis(ipCHLORINE);
00055 
00056         /* save the CT recom rate for H only */
00057         ct_save = atmdat.HCharExcRecTo[ipCHLORINE][0];
00058 
00059         /* >>chng 05 mar 23 add process Cl+ + H2 -> Cl0 + several molecules 
00060          * rate is rate for first step with H2 from UMIST
00061         atmdat.HCharExcRecTo[ipCHLORINE][0] += 
00062                 1e-9 * hmi.H2_total / SDIV(StatesElem[ipH_LIKE][ipHYDROGEN][ipH1s].Pop*dense.xIonDense[ipHYDROGEN][1]); */
00063 
00064         /* get recombination coefficients */
00065         ion_recomb(false,(const double*)dicoef,(const double*)dite,ditcrt,aa,bb,cc,dd,ff,ipCHLORINE);
00066 
00067         /* solve for ionization balance */
00068         ion_solver(ipCHLORINE,false);
00069 
00070         /* reset the rate */
00071         atmdat.HCharExcRecTo[ipCHLORINE][0] = ct_save;
00072         return;
00073 }

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