00001
00002
00003
00004 #include "cddefines.h"
00005 #include "dense.h"
00006 #include "ca.h"
00007 #include "ionbal.h"
00008
00009 void IonCalci(void)
00010 {
00011 const int NDIM = ipCALCIUM+1;
00012
00013 static const double dicoef[2][NDIM] = {
00014 {3.28e-4,.0584,.122,.132,.133,.126,.139,.0955,.0402,.0419,.0257,
00015 .0445,.0548,.0713,.0903,.110,.0205,.549,.355,0.},
00016 {.0907,.110,.0174,.132,.114,.162,.0878,.263,.0627,.0616,2.77,2.23,
00017 2.00,1.82,.424,.243,.185,.292,.275,0.}
00018 };
00019 static const double dite[2][NDIM] = {
00020 {3.46e4,3.84e5,4.08e5,3.82e5,3.53e5,3.19e5,3.22e5,2.47e5,2.29e5,3.73e6,
00021 9.26e5,7.96e5,6.90e5,6.70e5,4.72e5,5.67e5,4.21e5,3.65e7,3.78e7,0.},
00022 {1.64e4,2.45e5,4.27e5,6.92e5,8.78e5,7.43e5,6.99e5,4.43e5,2.81e5,5.84e6,
00023 4.89e6,4.62e6,4.52e6,3.32e6,1.37e6,4.41e6,2.27e6,7.25e6,7.68e6,0.}
00024 };
00025 static const double ditcrt[NDIM] = {6e3,2e4,4e4,5e4,7e4,8e4,8e4,3e4,
00026 3e4,3e4,3e4,9e4,4e4,5e4,3e4,9e5,2e5,2e5,2e5,1e20};
00027 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.};
00028 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.};
00029 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.};
00030 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.};
00031 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.};
00032
00033 DEBUG_ENTRY( "IonCalci()" );
00034
00035
00036
00037
00038
00039
00040
00041
00042 if( !dense.lgElmtOn[ipCALCIUM] )
00043 {
00044 return;
00045 }
00046
00047 ion_zero(ipCALCIUM);
00048
00049
00050 ion_photo(ipCALCIUM,false);
00051
00052
00053
00054
00055
00056 long ns = 6, ion = 1, nelem = 19;
00057 ionbal.PhotoRate_Shell[nelem][ion][ns][0] += ca.dstCala;
00058
00059
00060 ion_collis(ipCALCIUM);
00061
00062
00063 ion_recomb(false,(const double*)dicoef,(const double*)dite,ditcrt,aa,bb,cc,dd,ff,ipCALCIUM);
00064
00065
00066 # if 0
00067
00068 if( phycon.te < 1e3 )
00069 {
00070 ionbal.RateRecomTot[ipCALCIUM][1] += ((5.49e-10*(pow(phycon.te,-0.647f)) -
00071 rec[1]*(pow((double)phycon.te,pl[1])))*dense.eden);
00072 }
00073 # endif
00074
00075
00076 ion_solver(ipCALCIUM,false);
00077 return;
00078 }