cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion_calci.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 /*IonCalci perform ionization balance for calcium */
4 #include "cddefines.h"
5 #include "dense.h"
6 #include "ca.h"
7 #include "ionbal.h"
8 
9 void IonCalci(void)
10 {
11  const int NDIM = ipCALCIUM+1;
12 
13  static const double dicoef[2][NDIM] = {
14  {3.28e-4,.0584,.122,.132,.133,.126,.139,.0955,.0402,.0419,.0257,
15  .0445,.0548,.0713,.0903,.110,.0205,.549,.355,0.},
16  {.0907,.110,.0174,.132,.114,.162,.0878,.263,.0627,.0616,2.77,2.23,
17  2.00,1.82,.424,.243,.185,.292,.275,0.}
18  };
19  static const double dite[2][NDIM] = {
20  {3.46e4,3.84e5,4.08e5,3.82e5,3.53e5,3.19e5,3.22e5,2.47e5,2.29e5,3.73e6,
21  9.26e5,7.96e5,6.90e5,6.70e5,4.72e5,5.67e5,4.21e5,3.65e7,3.78e7,0.},
22  {1.64e4,2.45e5,4.27e5,6.92e5,8.78e5,7.43e5,6.99e5,4.43e5,2.81e5,5.84e6,
23  4.89e6,4.62e6,4.52e6,3.32e6,1.37e6,4.41e6,2.27e6,7.25e6,7.68e6,0.}
24  };
25  static const double ditcrt[NDIM] = {6e3,2e4,4e4,5e4,7e4,8e4,8e4,3e4,
26  3e4,3e4,3e4,9e4,4e4,5e4,3e4,9e5,2e5,2e5,2e5,1e20};
27  static const double aa[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
28  static const double bb[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
29  static const double cc[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
30  static const double dd[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
31  static const double ff[NDIM] = {0.,0.1,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.};
32 
33  DEBUG_ENTRY( "IonCalci()" );
34 
35  /* calcium nelem=20
36  *
37  * rates from Shull and van Steenberg, Ap.J. Sup 48, 95. */
38 
39  /* rates from Shull and van Steenberg, Ap.J. Sup 48, 95. */
40  /* Pequignot and Aldrovandi Ast Ap 161, 169. */
41 
42  if( !dense.lgElmtOn[ipCALCIUM] )
43  {
44  return;
45  }
46 
48 
49  /* last par is option to print info about photo rates */
50  ion_photo(ipCALCIUM,false);
51 
52  /* >>chng 01 feb 08, had put into charge tranfer array, move to photo array where it
53  * should have been all along */
54  /* Ly-alpha photoionization of Ca+
55  * valence shell is reevaluated by ion_photo on every call, so this does not double count */
56  long ns = 6, ion = 1, nelem = 19;
57  ionbal.PhotoRate_Shell[nelem][ion][ns][0] += ca.dstCala;
58 
59  /* find collisional ionization rates */
61 
62  /* get recombination coefficients */
63  ion_recomb(false,(const double*)dicoef,(const double*)dite,ditcrt,aa,bb,cc,dd,ff,ipCALCIUM);
64 
65  /* >>chng 03 nov 02, rm pl and rec components, were old */
66 # if 0
67  /* correct low temp rad rec coef */
68  if( phycon.te < 1e3 )
69  {
70  ionbal.RateRecomTot[ipCALCIUM][1] += ((5.49e-10*(pow(phycon.te,-0.647f)) -
71  rec[1]*(pow((double)phycon.te,pl[1])))*dense.eden);
72  }
73 # endif
74 
75  /* solve for ionization balance */
76  ion_solver(ipCALCIUM,false);
77  return;
78 }

Generated for cloudy by doxygen 1.8.3.1