cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion_chlor.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*IonChlor ionization balance for chlorine */
4 #include "cddefines.h"
5 #include "dense.h"
6 #include "atmdat.h"
7 #include "ionbal.h"
8 
9 void IonChlor(void)
10 {
11  const int NDIM = ipCHLORINE+1;
12 
13  static const double dicoef[2][NDIM] = {
14  {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,
15  4.0e-2,3.8e-2,6.8e-2,2.6e-2,4.6e-1,11.,0.},
16  {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}
17  };
18  static const double dite[2][NDIM] = {
19  {1.3e5,1.4e5,1.4e5,1.4e5,2.0e5,1.8e5,2.3e5,7.2e5,6.4e5,6.0e5,4.9e5,
20  4.6e5,5.3e5,3.2e5,2.6e7,2.8e7,0.},
21  {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}
22  };
23  static const double ditcrt[NDIM] = {3.0e4,2.5e4,2.5e4,1.8e4,1.8e4,2.2e4,
24  5.0e5,1.6e5,1.5e5,1.5e5,1.3e5,1.3e5,1.1e5,7.6e4,6.5e6,1.4e7,1e20};
25  static const double aa[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
26  static const double bb[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
27  static const double cc[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
28  static const double dd[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
29  static const double ff[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
30 
31  double ct_save;
32 
33  DEBUG_ENTRY( "IonChlor()" );
34 
35  /* chlorine, element number 17
36  *
37  * rates from Shull and van Steenberg, Ap.J. Sup 48, 95.
38  * these are for argon, but no better can be done today */
39 
40  /* fits to Aldrovandi and Pequignot Rev Bras Fisica 4, 491 */
41 
42  /* Pequignot and Aldrovandi Ast Ap 161, 169. */
43 
44  if( !dense.lgElmtOn[ipCHLORINE] )
45  {
46  return;
47  }
48 
50 
51  ion_photo(ipCHLORINE,false);
52 
53  /* find collisional ionization rates */
55 
56  /* save the CT recom rate for H only */
57  ct_save = atmdat.HCharExcRecTo[ipCHLORINE][0];
58 
59  /* >>chng 05 mar 23 add process Cl+ + H2 -> Cl0 + several molecules
60  * rate is rate for first step with H2 from UMIST
61  atmdat.HCharExcRecTo[ipCHLORINE][0] +=
62  1e-9 * hmi.H2_total / SDIV(StatesElem[ipH_LIKE][ipHYDROGEN][ipH1s].Pop*dense.xIonDense[ipHYDROGEN][1]); */
63 
64  /* get recombination coefficients */
65  ion_recomb(false,(const double*)dicoef,(const double*)dite,ditcrt,aa,bb,cc,dd,ff,ipCHLORINE);
66 
67  /* solve for ionization balance */
68  ion_solver(ipCHLORINE,false);
69 
70  /* reset the rate */
71  atmdat.HCharExcRecTo[ipCHLORINE][0] = ct_save;
72  return;
73 }

Generated for cloudy by doxygen 1.8.3.1