47 double a, b, c, a_op, b_op, c_op, d_op, e_op, f_op, a_o,
48 b_o, c_o, d_o, e_o, f_o, g_o;
50 static double TeUsed = -1.;
61 for( ion=0; ion <= nelem; ion++ )
82 for( ion=0; ion <
LIMELM; ion++ )
122 a_op = 2.3344302e-10;
123 b_op = 2.3651505e-10;
124 c_op = -1.3146803e-10;
125 d_op = 2.9979994e-11;
126 e_op = -2.8577012e-12;
127 f_op = 1.1963502e-13;
133 ((((f_op*lnte + e_op)*lnte + d_op)*lnte + c_op)*lnte + b_op)*lnte + a_op;
163 a_o = -7.6767404e-14;
164 b_o = -3.7282001e-13;
166 d_o = -3.6606214e-12;
168 f_o = -2.6139493e-13;
175 (((((g_o*lnte + f_o)*lnte + e_o)*lnte + d_o)*lnte + c_o)*lnte + b_o)*lnte + a_o;
345 0.6340e-9*pow( log10(
phycon.
te/1500.) ,2.06 );
360 1.4589e-9*pow( log10(
phycon.
te/20000.) ,2.06 );
550 for( nelem=0; nelem<
LIMELM; ++nelem )
552 for( ion=0; ion<
LIMELM; ++ion )
590 int limit =
MIN2(4, nelem);
592 for( ion=0; ion < limit; ion++ )
614 for( ion=4; ion < nelem; ion++ )
630 int limit =
MIN2(4, nelem);
632 for( ion=0; ion < limit; ion++ )
635 double barrier_rec_eV =
CTIonData[nelem][ion][7];
657 for( ion=4; ion < nelem; ion++ )
683 enum {DEBUG_LOC=
false};
692 int limit =
MIN2(4, nelem);
694 for( ion=0; ion < limit; ion++ )
716 for( ion=4; ion < nelem; ion++ )
730 return( SumCTHeat_v );
753 fprintf(
ioQQQ,
" HCTIon doing 1-time init of charge transfer data\n");
825 fprintf(
ioQQQ,
" HCTIon doing 1-time init of charge transfer data\n");
842 return( HCTRecom_v );
846 ASSERT( ion >= 0 && ion <= nelem );
858 return( HCTRecom_v );
867 return( HCTRecom_v );
909 for( nelem=0; nelem<
LIMELM; ++nelem )
927 {
static double _itmp0[] = {2.84e-3 , 1.99 , 375.54 , -54.07 , 1
e2 , 1e4 , 0.,
930 for( i=1, _r = 0; i <= 8; i++ )
937 {
static double _itmp1[] = {1.07e-6 , 3.15 , 176.43 , -4.29 , 1e3 , 1e5 , 0. ,2.34};
938 for( i=1, _r = 0; i <= 8; i++ )
943 {
static double _itmp2[] = {4.55e-3,-0.29,-0.92,-8.38,1
e2,5e4,
945 for( i=1, _r = 0; i <= 8; i++ )
951 {
static double _itmp3[] = {7.40e-2,0.47,24.37,-0.74,1
e1,1e4,
953 for( i=1, _r = 0; i <= 8; i++ )
958 {
static double _itmp4[] = {3.34e-6,9.31,2632.31,-3.04,1e3,
960 for( i=1, _r = 0; i <= 8; i++ )
965 {
static double _itmp5[] = {9.76e-3,3.14,55.54,-1.12,5e3,3e4,
967 for( i=1, _r = 0; i <= 8; i++ )
972 {
static double _itmp6[] = {7.60e-5,0.00,-1.97,-4.32,1e4,3e5,
974 for( i=1, _r = 0; i <= 8; i++ )
979 {
static double _itmp7[] = {0.92,1.15,0.80,-0.24,1e3,2e5,0.0,
981 for( i=1, _r = 0; i <= 8; i++ )
987 {
static double _itmp8[] = {2.26 , 7.36e-2 , -0.43 , -0.11 , 2e3 , 1e5 , 3.031
989 for( i=1, _r = 0; i <= 8; i++ )
994 {
static double _itmp9[] = {1.00e-5,0.00,0.00,0.00,1e3,1e4,
996 for( i=1, _r = 0; i <= 8; i++ )
1001 {
static double _itmp10[] = {4.39,0.61,-0.89,-3.56,1e3,3e4,
1003 for( i=1, _r = 0; i <= 8; i++ )
1008 {
static double _itmp11[] = {2.83e-1,6.80e-3,6.44e-2,-9.70,
1009 1e3,3e4,2.368,-2.04};
1010 for( i=1, _r = 0; i <= 8; i++ )
1015 {
static double _itmp12[] = {2.10,7.72e-2,-0.41,-7.31,1e4,1e5,
1017 for( i=1, _r = 0; i <= 8; i++ )
1022 {
static double _itmp13[] = {1.20e-2,3.49,24.41,-1.26,1e3,3e4,
1024 for( i=1, _r = 0; i <= 8; i++ )
1038 {
static double _itmp14[] = {1.87e-6,2.06,9.93,-3.89,6e3,1e5,
1040 for( i=1, _r = 0; i <= 7; i++ )
1045 {
static double _itmp15[] = {1.00e-5,0.,0.,0.,1e3,1e7,-40.81};
1046 for( i=1, _r = 0; i <= 7; i++ )
1051 for( i=1; i <= 7; i++ )
1055 {
static double _itmp16[] = {1.26,0.96,3.02,-0.65,1e3,3e4,3.02};
1056 for( i=1, _r = 0; i <= 7; i++ )
1061 {
static double _itmp17[] = {1.00e-5,0.,0.,0.,2e3,5e4,-108.83};
1062 for( i=1, _r = 0; i <= 7; i++ )
1067 for( i=1; i <= 7; i++ )
1071 {
static double _itmp18[] = {1.00e-5,0.,0.,0.,2e3,5e4,-4.61};
1072 for( i=1, _r = 0; i <= 7; i++ )
1077 {
static double _itmp19[] = {1.00e-5,0.,0.,0.,2e3,5e4,-140.26};
1078 for( i=1, _r = 0; i <= 7; i++ )
1083 {
static double _itmp20[] = {5.17,0.82,-0.69,-1.12,2e3,5e4,
1085 for( i=1, _r = 0; i <= 7; i++ )
1090 for( i=1; i <= 7; i++ )
1094 {
static double _itmp21[] = {2.00e-2,0.,0.,0.,1e3,1e9,2.46};
1095 for( i=1, _r = 0; i <= 7; i++ )
1100 {
static double _itmp22[] = {1.00e-5,0.,0.,0.,2e3,5e4,-24.33};
1101 for( i=1, _r = 0; i <= 7; i++ )
1107 {
static double _itmp23[] = {2.74 , 0.93 , -0.61 , -1.13 , 2e3 , 5e4 ,
1109 for( i=1, _r = 0; i <= 7; i++ )
1115 {
static double _itmp24[] = {4.88e-7 , 3.25 , -1.12 , -0.21 , 5.5e3 , 1e5 ,
1117 for( i=1, _r = 0; i <= 7; i++ )
1122 {
static double _itmp25[] = {1.67e-4,2.79,304.72,-4.07,5e3,
1124 for( i=1, _r = 0; i <= 7; i++ )
1129 {
static double _itmp26[] = {3.25,0.21,0.19,-3.29,1e3,1e5,5.73};
1130 for( i=1, _r = 0; i <= 7; i++ )
1135 {
static double _itmp27[] = {332.46,-0.11,-9.95e-1,-1.58e-3,
1137 for( i=1, _r = 0; i <= 7; i++ )
1142 {
static double _itmp28[] = {1.01e-3,-0.29,-0.92,-8.38,1
e2,
1144 for( i=1, _r = 0; i <= 7; i++ )
1149 {
static double _itmp29[] = {3.05e-1,0.60,2.65,-0.93,1e3,1e5,
1151 for( i=1, _r = 0; i <= 7; i++ )
1156 {
static double _itmp30[] = {4.54,0.57,-0.65,-0.89,1
e1,1e5,
1158 for( i=1, _r = 0; i <= 7; i++ )
1164 {
static double _itmp31[] = { 2.95 , 0.55 , -0.39 , -1.07 , 1e3 , 1e6 ,
1166 for( i=1, _r = 0; i <= 7; i++ )
1171 {
static double _itmp32[] = {1.04,3.15e-2,-0.61,-9.73,1
e1,1e4,
1173 for( i=1, _r = 0; i <= 7; i++ )
1178 {
static double _itmp33[] = {1.04,0.27,2.02,-5.92,1
e2,1e5,6.65};
1179 for( i=1, _r = 0; i <= 7; i++ )
1184 {
static double _itmp34[] = {3.98,0.26,0.56,-2.62,1e3,5e4,5.};
1185 for( i=1, _r = 0; i <= 7; i++ )
1190 {
static double _itmp35[] = {2.52e-1,0.63,2.08,-4.16,1e3,3e4,
1192 for( i=1, _r = 0; i <= 7; i++ )
1197 for( i=1; i <= 7; i++ )
1201 {
static double _itmp36[] = {1.00e-5,0.,0.,0.,2e3,5e4,-21.37};
1202 for( i=1, _r = 0; i <= 7; i++ )
1207 {
static double _itmp37[] = {9.86,0.29,-0.21,-1.15,2e3,5e4,
1209 for( i=1, _r = 0; i <= 7; i++ )
1214 {
static double _itmp38[] = {7.15e-1,1.21,-0.70,-0.85,2e3,5e4,
1216 for( i=1, _r = 0; i <= 7; i++ )
1221 for( i=1; i <= 7; i++ )
1225 {
static double _itmp39[] = {1.00e-5,0.,0.,0.,5e3,5e4,-27.36};
1226 for( i=1, _r = 0; i <= 7; i++ )
1231 {
static double _itmp40[] = {14.73,4.52e-2,-0.84,-0.31,5e3,
1233 for( i=1, _r = 0; i <= 7; i++ )
1238 {
static double _itmp41[] = {6.47,0.54,3.59,-5.22,1e3,3e4,8.60};
1239 for( i=1, _r = 0; i <= 7; i++ )
1244 for( i=1; i <= 7; i++ )
1248 {
static double _itmp42[] = {1.00e-5,0.,0.,0.,2e3,5e4,-33.68};
1249 for( i=1, _r = 0; i <= 7; i++ )
1254 {
static double _itmp43[] = {1.33,1.15,1.20,-0.32,2e3,5e4,6.25};
1255 for( i=1, _r = 0; i <= 7; i++ )
1260 {
static double _itmp44[] = {1.01e-1,1.34,10.05,-6.41,2e3,5e4,
1262 for( i=1, _r = 0; i <= 7; i++ )
1267 for( i=1; i <= 7; i++ )
1271 {
static double _itmp45[] = {8.58e-5,2.49e-3,2.93e-2,-4.33,
1273 for( i=1, _r = 0; i <= 7; i++ )
1278 {
static double _itmp46[] = {6.49,0.53,2.82,-7.63,1e3,3e4,5.73};
1279 for( i=1, _r = 0; i <= 7; i++ )
1284 {
static double _itmp47[] = {6.36,0.55,3.86,-5.19,1e3,3e4,8.60};
1285 for( i=1, _r = 0; i <= 7; i++ )
1290 for( i=1; i <= 7; i++ )
1294 {
static double _itmp48[] = {1.00e-5,0.,0.,0.,1e3,3e4,-5.23};
1295 for( i=1, _r = 0; i <= 7; i++ )
1300 {
static double _itmp49[] = {7.11e-5,4.12,1.72e4,-22.24,1e3,
1302 for( i=1, _r = 0; i <= 7; i++ )
1307 {
static double _itmp50[] = {7.52e-1,0.77,6.24,-5.67,1e3,3e4,
1309 for( i=1, _r = 0; i <= 7; i++ )
1314 for( i=1; i <= 7; i++ )
1319 {
static double _itmp51[] = {6.77 , 7.36e-2 , -0.43 , -0.11 , 5
e2 , 1e5 ,
1321 for( i=1, _r = 0; i <= 7; i++ )
1326 {
static double _itmp52[] = {4.90e-1,-8.74e-2,-0.36,-0.79,1e3,
1328 for( i=1, _r = 0; i <= 7; i++ )
1333 {
static double _itmp53[] = {7.58,0.37,1.06,-4.09,1e3,5e4,7.49};
1334 for( i=1, _r = 0; i <= 7; i++ )
1339 for( i=1; i <= 7; i++ )
1343 {
static double _itmp54[] = {1.74e-4,3.84,36.06,-0.97,1e3,3e4,
1345 for( i=1, _r = 0; i <= 7; i++ )
1350 {
static double _itmp55[] = {9.46e-2,-5.58e-2,0.77,-6.43,1e3,
1352 for( i=1, _r = 0; i <= 7; i++ )
1357 {
static double _itmp56[] = {5.37,0.47,2.21,-8.52,1e3,3e4,9.71};
1358 for( i=1, _r = 0; i <= 7; i++ )
1363 {
static double _itmp57[] = {3.82e-7,11.10,2.57e4,-8.22,1e3,
1365 for( i=1, _r = 0; i <= 7; i++ )
1370 {
static double _itmp58[] = {1.00e-5,0.,0.,0.,1e3,3e4,-9.73};
1371 for( i=1, _r = 0; i <= 7; i++ )
1376 {
static double _itmp59[] = {2.29,4.02e-2,1.59,-6.06,1e3,3e4,
1378 for( i=1, _r = 0; i <= 7; i++ )
1383 {
static double _itmp60[] = {6.44,0.13,2.69,-5.69,1e3,3e4,8.60};
1384 for( i=1, _r = 0; i <= 7; i++ )
1389 for( i=1; i <= 7; i++ )
1393 {
static double _itmp61[] = {1.00e-5,0.,0.,0.,1e3,3e4,-10.21};
1394 for( i=1, _r = 0; i <= 7; i++ )
1399 {
static double _itmp62[] = {1.88,0.32,1.77,-5.70,1e3,3e4,8.};
1400 for( i=1, _r = 0; i <= 7; i++ )
1405 {
static double _itmp63[] = {7.27,0.29,1.04,-10.14,1e3,3e4,
1407 for( i=1, _r = 0; i <= 7; i++ )
1412 for( i=1; i <= 7; i++ )
1416 {
static double _itmp64[] = {1.00e-5,0.,0.,0.,1e3,3e4,-14.03};
1417 for( i=1, _r = 0; i <= 7; i++ )
1422 {
static double _itmp65[] = {4.57,0.27,-0.18,-1.57,1e3,3e4,
1424 for( i=1, _r = 0; i <= 7; i++ )
1429 {
static double _itmp66[] = {6.37,0.85,10.21,-6.22,1e3,3e4,
1431 for( i=1, _r = 0; i <= 7; i++ )
1436 for( i=1; i <= 7; i++ )
1440 {
static double _itmp67[] = {1.00e-5,0.,0.,0.,1e3,3e4,-18.02};
1441 for( i=1, _r = 0; i <= 7; i++ )
1446 {
static double _itmp68[] = {4.76,0.44,-0.56,-0.88,1e3,3e4,
1448 for( i=1, _r = 0; i <= 7; i++ )
1453 {
static double _itmp69[] = {1.00e-5,0.,0.,0.,1e3,3e4,-47.3};
1454 for( i=1, _r = 0; i <= 7; i++ )
1459 for( i=1; i <= 7; i++ )
1463 {
static double _itmp70[] = {0.,0.,0.,0.,1
e1,1e9,0.};
1464 for( i=1, _r = 0; i <= 7; i++ )
1469 {
static double _itmp71[] = {3.17e-2,2.12,12.06,-0.40,1e3,3e4,
1471 for( i=1, _r = 0; i <= 7; i++ )
1476 {
static double _itmp72[] = {2.68,0.69,-0.68,-4.47,1e3,3e4,
1478 for( i=1, _r = 0; i <= 7; i++ )
1483 for( i=1; i <= 7; i++ )
1487 {
static double _itmp73[] = {0.,0.,0.,0.,1
e1,1e9,0.};
1488 for( i=1, _r = 0; i <= 7; i++ )
1493 {
static double _itmp74[] = {7.22e-3,2.34,411.50,-13.24,1e3,
1495 for( i=1, _r = 0; i <= 7; i++ )
1500 {
static double _itmp75[] = {1.20e-1,1.48,4.00,-9.33,1e3,3e4,
1502 for( i=1, _r = 0; i <= 7; i++ )
1507 for( i=1; i <= 7; i++ )
1511 {
static double _itmp76[] = {0.,0.,0.,0.,1
e1,1e9,0.};
1512 for( i=1, _r = 0; i <= 7; i++ )
1517 {
static double _itmp77[] = {6.34e-1,6.87e-3,0.18,-8.04,1e3,
1519 for( i=1, _r = 0; i <= 7; i++ )
1524 {
static double _itmp78[] = {4.37e-3,1.25,40.02,-8.05,1e3,3e4,
1526 for( i=1, _r = 0; i <= 7; i++ )
1531 for( i=1; i <= 7; i++ )
1535 {
static double _itmp79[] = {1.00e-5,0.,0.,0.,1e3,3e4,-1.05};
1536 for( i=1, _r = 0; i <= 7; i++ )
1541 {
static double _itmp80[] = {5.12,-2.18e-2,-0.24,-0.83,1e3,
1543 for( i=1, _r = 0; i <= 7; i++ )
1548 {
static double _itmp81[] = {1.96e-1,-8.53e-3,0.28,-6.46,1e3,
1550 for( i=1, _r = 0; i <= 7; i++ )
1555 for( i=1; i <= 7; i++ )
1559 {
static double _itmp82[] = {5.27e-1,0.61,-0.89,-3.56,1e3,3e4,
1561 for( i=1, _r = 0; i <= 7; i++ )
1566 {
static double _itmp83[] = {10.90,0.24,0.26,-11.94,1e3,3e4,
1568 for( i=1, _r = 0; i <= 7; i++ )
1573 {
static double _itmp84[] = {1.18,0.20,0.77,-7.09,1e3,3e4,6.6};
1574 for( i=1, _r = 0; i <= 7; i++ )
1579 for( i=1; i <= 7; i++ )
1583 {
static double _itmp85[] = {1.65e-1,6.80e-3,6.44e-2,-9.70,
1585 for( i=1, _r = 0; i <= 7; i++ )
1590 {
static double _itmp86[] = {14.20,0.34,-0.41,-1.19,1e3,3e4,
1592 for( i=1, _r = 0; i <= 7; i++ )
1597 {
static double _itmp87[] = {4.43e-1,0.91,10.76,-7.49,1e3,3e4,
1599 for( i=1, _r = 0; i <= 7; i++ )
1604 for( i=1; i <= 7; i++ )
1608 {
static double _itmp88[] = {1.26,7.72e-2,-0.41,-7.31,1e3,1e5,
1610 for( i=1, _r = 0; i <= 7; i++ )
1615 {
static double _itmp89[] = {3.42,0.51,-2.06,-8.99,1e3,1e5,
1617 for( i=1, _r = 0; i <= 7; i++ )
1622 {
static double _itmp90[] = {14.60,3.57e-2,-0.92,-0.37,1e3,
1624 for( i=1, _r = 0; i <= 7; i++ )
1629 for( i=1; i <= 7; i++ )
1633 {
static double _itmp91[] = {5.30,0.24,-0.91,-0.47,1e3,3e4,
1635 for( i=1, _r = 0; i <= 7; i++ )
1640 {
static double _itmp92[] = {3.26,0.87,2.85,-9.23,1e3,3e4,6.};
1641 for( i=1, _r = 0; i <= 7; i++ )
1646 {
static double _itmp93[] = {1.03,0.58,-0.89,-0.66,1e3,3e4,
1648 for( i=1, _r = 0; i <= 7; i++ )
1653 for( i=1; i <= 7; i++ )
1657 {
static double _itmp94[] = {1.05,1.28,6.54,-1.81,1e3,1e5,3.0};
1658 for( i=1, _r = 0; i <= 7; i++ )
1663 {
static double _itmp95[] = {9.73,0.35,0.90,-5.33,1e3,3e4,5.2};
1664 for( i=1, _r = 0; i <= 7; i++ )
1669 {
static double _itmp96[] = {6.14,0.25,-0.91,-0.42,1e3,3e4,
1671 for( i=1, _r = 0; i <= 7; i++ )
1676 for( i=1; i <= 7; i++ )
1680 {
static double _itmp97[] = {1.47e-3,3.51,23.91,-0.93,1e3,3e4,
1682 for( i=1, _r = 0; i <= 7; i++ )
1687 {
static double _itmp98[] = {9.26,0.37,0.40,-10.73,1e3,3e4,
1689 for( i=1, _r = 0; i <= 7; i++ )
1694 {
static double _itmp99[] = {11.59,0.20,0.80,-6.62,1e3,3e4,
1696 for( i=1, _r = 0; i <= 7; i++ )
1701 for( i=1; i <= 7; i++ )
1705 {
static double _itmp100[] = {1.00e-5,0.,0.,0.,1e3,3e4,-4.37};
1706 for( i=1, _r = 0; i <= 7; i++ )
1711 {
static double _itmp101[] = {6.96e-4,4.24,26.06,-1.24,1e3,
1713 for( i=1, _r = 0; i <= 7; i++ )
1718 {
static double _itmp102[] = {1.33e-2,1.56,-0.92,-1.20,1e3,
1720 for( i=1, _r = 0; i <= 7; i++ )
1737 if( strcmp( chSave,
"CHAR") == 0 )
1746 fprintf( ipPnunit,
"#element\tion\n");
1747 for( j=1; j <
LIMELM; j++ )
1754 for( jj=0; jj < j; jj++ )
1764 fprintf( ipPnunit,
"\n#ionization rates, atomic number\n");
1765 for( j=1; j <
LIMELM; j++ )
1768 for( jj=0; jj < j; jj++ )
1779 else if( strcmp( chSave,
"CHAG") == 0 )
1782 double BreakEnergy = 100./13.0;
1786 long int nelem, ion;
1789 fprintf(ipPnunit,
"H ioniz\n X+i\\Te");
1790 while( te1 <= tefinal )
1792 fprintf(ipPnunit,
"\t%.0f K",te1);
1808 for( ion=0; ion<=nelem; ++ion )
1852 fprintf(ipPnunit,
"H recom\n X+i\\Te");
1853 while( te1 <= tefinal )
1855 fprintf(ipPnunit,
"\t%.0f K",te1);
1867 for( ion=0; ion<=nelem; ++ion )
1911 fprintf(ipPnunit,
"He recom\n Elem\\Te");
1912 while( te1 <= tefinal )
1914 fprintf(ipPnunit,
"\t%.0f",te1);
1926 for( ion=0; ion<=nelem; ++ion )
1953 fprintf(ipPnunit,
"He ioniz\n Elem\\Te");
1954 while( te1 <= tefinal )
1956 fprintf(ipPnunit,
"\t%.0f",te1);
1968 for( ion=0; ion<=nelem; ++ion )
t_mole_global mole_global
char chIonStage[LIMELM+1][CHARS_ION_STAGE]
static double CTRecombData[LIMELM][4][7]
long int IonHigh[LIMELM+1]
void ion_trim_untrim(long nelem)
double ChargTranSumHeat(void)
sys_float sexp(sys_float x)
void TempChange(double TempNew, bool lgForceUpdate)
static double CTIonData[LIMELM][4][8]
t_elementnames elementnames
t_iso_sp iso_sp[NISO][LIMELM]
double xIonDense[LIMELM][LIMELM+1]
bool fp_equal(sys_float x, sys_float y, int n=3)
long int IonLow[LIMELM+1]
double HCharExcRecTo_N0_2D
char chElementSym[LIMELM][CHARS_ELEMENT_SYM]
STATIC void MakeHCTData(void)
static bool lgCTDataDefined
void ChargTranPun(FILE *ipPnunit, char *chSave)
double Valence_IP_Ryd[LIMELM][LIMELM]
#define DEBUG_ENTRY(funcname)
STATIC double HCTIon(long int ion, long int nelem)
int fprintf(const Output &stream, const char *format,...)
sys_float SDIV(sys_float x)
double hmrate4(double a, double b, double c, double te)
double CharExcIonOf[NCX][LIMELM][LIMELM+1]
STATIC double HCTRecom(long int ion, long int nelem)
double CharExcRecTo[NCX][LIMELM][LIMELM+1]