cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ion_boron.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 /*IonBoron ionization balance for boron */
4 #include "cddefines.h"
5 #include "dense.h"
6 #include "trace.h"
7 #include "ionbal.h"
8 
9 void IonBoron(void)
10 {
11  const int NDIM = ipBORON+1;
12 
13  static const double dicoef[2][NDIM] = {
14  {2.54e-3,6.15e-3,1.62e-3,4.78e-2,0.}, {4.42e-2,5.88e-2,0.343,0.362,0.}
15  };
16  static const double dite[2][NDIM] = {
17  {1.57e5,1.41e5,8.19e4,3.44e6,0.}, {3.74e5,1.41e5,1.59e5,5.87e5,0.}
18  };
19  static const double ditcrt[NDIM] = {1.2e4,1.2e4,1.1e4,4.4e5,1e20};
20  static const double aa[NDIM] = {1.8267,2.3196,0.,0.,0.};
21  static const double bb[NDIM] = {4.1012,10.7328,0.,0.,0.};
22  static const double cc[NDIM] = {4.8443,6.8830,0.,0.,0.};
23  static const double dd[NDIM] = {.2261,-0.1824,0.,0.,0.};
24  static const double ff[NDIM] = {0.5960,0.4101,0.1,0.1,0.};
25 
26  DEBUG_ENTRY( "IonBoron()" );
27 
28  /* boron nelem=5
29  * data are for carbon
30  *
31  * real CollidRate(nelem,2)
32  *
33  * rates from Shull and van Steenberg, Ap.J. Sup 48, 95. */
34  /* DATA GRDEFF/0.10,0.10,0.10,0.053,0.10/
35  * GRDEFF is fraction of recombinations to ground state, used for
36  * outward diffuse fields
37  *
38  * rec from +3, +4 from Arnaud et al Ast Ap Sup 60 425. (1985)
39  * rec from fully ionized uses Seaton '79 in ionrat */
40  /* Pequignot and Aldrovandi Ast Ap 161, 169. */
41 
42  if( !dense.lgElmtOn[ipBORON] )
43  {
44  return;
45  }
46 
47  /* zero out ionization balance arrays */
49 
50  ion_photo(ipBORON,false);
51 
52  /* find collisional ionization rates */
54 
55  /* get recombination coefficients */
56  ion_recomb(false,(const double*)dicoef,(const double*)dite,ditcrt,aa,bb,cc,dd,ff,ipBORON);
57 
58  /* solve for ionization balance */
59  ion_solver(ipBORON,false);
60 
61  if( trace.lgTrace && trace.lgHeavyBug )
62  {
63  fprintf( ioQQQ, " Boroni returns; frac=" );
64  for( int i=0; i < ipBORON+2; i++ )
65  {
66  fprintf( ioQQQ, "%10.3e", dense.xIonDense[ipBORON][i]/
67  dense.gas_phase[ipBORON] );
68  }
69  fprintf( ioQQQ, "\n" );
70  }
71  return;
72 }

Generated for cloudy by doxygen 1.8.3.1