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 /*IonCobal do ionization balance for cobalt */ 00004 #include "cddefines.h" 00005 #include "dense.h" 00006 #include "ionbal.h" 00007 00008 void IonCobal(void) 00009 { 00010 const int NDIM = ipCOBALT+1; 00011 00012 static const double dicoef[2][NDIM] = { 00013 {5.2e-3,1.38e-3,2.3e-2,4.19e-2,6.83e-2,0.122,0.30,0.15,0.697,0.709,0.644,0.525,0.446, 00014 0.363,0.302,0.102,0.270,0.0467,0.0835,0.0996,0.199,0.240,0.115,0.0316,0.803,0.575,0.}, 00015 {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.} 00016 }; 00017 static const double dite[2][NDIM] = { 00018 {2.01e5,3.05e5,4.20e5,5.56e5,6.72e5,7.93e5,9.00e5,1.00e6,7.81e5,7.64e5,7.44e5,6.65e5, 00019 5.97e5,5.24e5,4.96e5,4.46e5,8.49e6,1.36e6,1.23e6,1.06e6,1.25e6,1.23e6,3.32e5,6.45e5, 00020 6.65e7,6.81e7,0.}, 00021 {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.} 00022 }; 00023 static const double ditcrt[NDIM] = {2e4,4e4,5e4,7e4,8e4,8e4,3e4,3e4, 00024 3e4,3e4,9e4,4e4,5e4,3e4,9e5,2e5,2e5,2e5,2e5,1e5,7e4,4e4,6e6, 00025 6e6,1e20,1e20,1e20}; 00026 static const double aa[NDIM] = {0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0., 00027 0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.,0.}; 00028 static const double bb[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.}; 00030 static const double cc[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.}; 00032 static const double dd[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.}; 00034 static const double ff[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.}; 00036 00037 DEBUG_ENTRY( "IonCobal()" ); 00038 00039 /* cobalt nelem=27 00040 * 00041 * rates for ni from Shull and van Steenberg, Ap.J. Sup 48, 95. */ 00042 00043 /* DATA FYIELD/1*.34,2*.35,.36,2*.37,.38,.39,.40,.41,.42,.43,.44, 00044 * 4.45,.46,2*.47,2*.48,2*.49, .11,.75,5*0./ 00045 * above fluorescent yields quoted in Krolik+Kallman Ap.J.(Let) 320, L5. 00046 * they are correct for iron, not ni 00047 * 00048 * GRDEFF is fraction of recombinations to ground state, used for 00049 * DATA GRDEFF/27*0.2/ 00050 * 00051 * all rates from Shull and Van Steenberg apj sup 48, 95. for Ni 00052 * assumed to have same cs per stage of ionization */ 00053 00054 /* Pequignot and Aldrovandi Ast Ap 161, 169. */ 00055 00056 if( !dense.lgElmtOn[ipCOBALT] ) 00057 { 00058 return; 00059 } 00060 00061 ion_zero(ipCOBALT); 00062 00063 ion_photo(ipCOBALT,false); 00064 00065 /* find collisional ionization rates */ 00066 ion_collis(ipCOBALT); 00067 00068 /* get recombination coefficients */ 00069 ion_recomb(false,(const double*)dicoef,(const double*)dite,ditcrt,aa,bb,cc,dd,ff,ipCOBALT); 00070 00071 /* solve for ionization balance */ 00072 ion_solver(ipCOBALT,false); 00073 return; 00074 }