cloudy
trunk
|
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 /*IonNicke ionization balance for nickel */ 00004 #include "cddefines.h" 00005 #include "dense.h" 00006 #include "ionbal.h" 00007 00008 void IonNicke(void) 00009 { 00010 const int NDIM = ipNICKEL+1; 00011 00012 static const double dicoef[2][NDIM] = { 00013 {1.41e-3,5.2e-3,.0138,.023,.0419,.0683,.122,.300,.15,.697,.709,.644,.525, 00014 .446,.363,.302,.102,.27,.0467,.0835,.0996,.199,.24,.115,.0316,.803,.575,0.}, 00015 {.469,.357,.281,.128,.0417,.0558,.0346,0.,1.9,.277,.135,.134,.192,.332,.337, 00016 .121,.0514,.183,7.56,4.55,4.87,2.19,1.15,1.23,.132,.289,.286,0.} 00017 }; 00018 static const double dite[2][NDIM] = { 00019 {9.82e4,2.01e5,3.05e5,4.20e5,5.56e5,6.72e5,7.93e5,9.00e5,1.00e6,7.81e5,7.64e5, 00020 7.44e5,6.65e5,5.97e5,5.24e5,4.96e5,4.46e5,8.46e6,1.36e6,1.23e6,1.06e6,1.25e6, 00021 1.23e6,3.32e5,6.45e5,6.65e7,6.81e7,0.}, 00022 {1.01e5,1.91e5,2.32e5,3.18e5,4.55e5,5.51e5,5.28e5,0.,5.50e5,8.87e5,1.80e6,1.25e6, 00023 1.89e6,8.84e5,1.29e6,6.24e5,1.59e6,8.01e6,9.32e6,9.45e6,9.45e6,8.01e6,7.57e6, 00024 2.64e6,1.93e6,1.19e7,9.08e6,0.} 00025 }; 00026 static const double ditcrt[NDIM] = {6e3,2e4,4e4,5e4,7e4,8e4,8e4,3e4,3e4,3e4,3e4, 00027 9e4,4e4,5e4,3e4,9e5,2e5,2e5,2e5,2e5,1e5,7e4,4e4,6e6,6e6,1e20,1e20,1e20}; 00028 static const double aa[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0., 00029 0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; 00030 static const double bb[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0., 00031 0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; 00032 static const double cc[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0., 00033 0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; 00034 static const double dd[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0., 00035 0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; 00036 static const double ff[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0., 00037 0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; 00038 00039 DEBUG_ENTRY( "IonNicke()" ); 00040 00041 /* nickel, nelem=28 00042 * 00043 * all rates from Shull and Van Steenberg apj sup 48, 95. */ 00044 00045 /* Pequignot and Aldrovandi Ast Ap 161, 169. */ 00046 00047 if( !dense.lgElmtOn[ipNICKEL] ) 00048 { 00049 return; 00050 } 00051 00052 ion_zero(ipNICKEL); 00053 00054 ion_photo(ipNICKEL,false); 00055 00056 /* find collisional ionization rates */ 00057 ion_collis(ipNICKEL); 00058 00059 /* get recombination coefficients */ 00060 ion_recomb(false,(const double*)dicoef,(const double*)dite,ditcrt,aa,bb,cc,dd,ff,ipNICKEL); 00061 00062 /* solve for ionization balance */ 00063 ion_solver(ipNICKEL,false); 00064 return; 00065 }