77 fixit(
"need to get rid of brems_heat_total");
87 for( nelem=0; nelem<
LIMELM; ++nelem )
123 linadd(0.f,0,
"zero",
'i' ,
"null placeholder");
128 linadd( 1.e-10 , 1 ,
"Unit" ,
'i' ,
"unit integration placeholder");
129 static long int ipOneAng=-1;
131 ipOneAng =
ipoint( RYDLAM );
132 lindst( 1.e-10 , 1. ,
"UntD" , ipOneAng ,
'i' ,
false,
"unit integration placeholder");
156 "extra Lyman lines ");
161 for(
long nelem=ipISO; nelem <
LIMELM; ++nelem )
180 fprintf(
ioQQQ,
"ipHi\tipLo\tnu\tlu\tsu\tnl\tll\tsl\tWL\tintens\n" );
183 for(
long ipLo=0; ipLo<ipHi; ipLo++ )
187 double relint, absint;
204 if ( ((l== lp+1 || l == lp-1) && l==n-3 && s== sp))
206 fprintf(
ioQQQ,
"lines %li\t%li\t%li\t%li\t%li\t%li\t%li\t%li\t%e\t%e\n",
238 for (
int ipSpecies=0; ipSpecies <
nSpecies; ++ipSpecies)
241 em !=
dBaseTrans[ipSpecies].Emis().end(); ++em)
243 if( (*em).Tran().ipCont() > 0)
248 string chComment =
"";
252 +
", " + (*em).Tran().getComment();
262 " start level 1 lines" );
270 "recombination lines");
314 "recombination line");
324 double ExtraCool = 0.;
325 double BigstExtra = 0.;
331 if(
TauLine2[i].Coll().cool() > BigstExtra )
333 BigstExtra =
TauLine2[i].Coll().cool();
336 ExtraCool +=
TauLine2[i].Coll().cool();
345 "hyperfine structure lines ");
349 "total cooling all hyperfine structure lines ");
358 "hyperfine structure line");
364 "inner shell lines");
430 const bool lgBandBlends =
false;
435 LinSv *lineMg2 =
linadd(0.0,2798,
"Blnd",
'i',
"Blend" );
449 LinSv *lineMg10 =
linadd(0.0,615,
"Blnd",
'i',
"Blend" );
463 LinSv *lineS2Red =
linadd(0.0,6720,
"Blnd",
'i',
"Blend" );
477 LinSv *lineS2Blue =
linadd(0.0,4074,
"Blnd",
'i',
"Blend" );
482 lineS2Blue->
makeBlend(
"S 2",4074.0,10.0);
491 LinSv *lineS2IR =
linadd(0.0,10330,
"Blnd",
'i',
"Blend" );
507 LinSv *lineS2UV =
linadd(0.0,1256,
"Blnd",
'i',
"Blend" );
522 LinSv *lineS31198 =
linadd(0.0,1198,
"Blnd",
'i',
"Blend" );
527 lineS31198->
makeBlend(
"S 3",1198.0,10.0);
540 LinSv *lineS31720 =
linadd(0.0,1720,
"Blnd",
'i',
"Blend" );
545 lineS31720->
makeBlend(
"S 3",1720.0,20.0);
555 LinSv *lineS33722 =
linadd(0.0,3722,
"Blnd",
'i',
"Blend" );
560 lineS33722->
makeBlend(
"S 3",3722.0,80.0);
569 LinSv *lineS4UV =
linadd(0.0,1406,
"Blnd",
'i',
"Blend" );
586 LinSv *lineS5UV =
linadd(0.0,1199,
"Blnd",
'i',
"Blend" );
600 LinSv *lineNaD =
linadd(0.0,5892,
"Blnd",
'i',
"Blend" );
614 LinSv *lineAl2 =
linadd(0.0,2665,
"Blnd",
'i',
"Blend" );
628 LinSv *lineAl3 =
linadd(0.0,1860,
"Blnd",
'i',
"Blend" );
642 LinSv *lineAl11 =
linadd(0.0,556,
"Blnd",
'i',
"Blend" );
656 LinSv *lineAr4One =
linadd(0.0,4725,
"Blnd",
'i',
"Blend" );
661 lineAr4One->
makeBlend(
"Ar 4",4725.0,20.0);
670 LinSv *lineAr4Two =
linadd(0.0,2860,
"Blnd",
'i',
"Blend" );
675 lineAr4Two->
makeBlend(
"Ar 4",2860.0,10.0);
684 LinSv *lineAr4Three =
linadd(0.0,7250,
"Blnd",
'i',
"Blend" );
689 lineAr4Three->
makeBlend(
"Ar 4",7250.0,100.0);
700 LinSv *lineSiII =
linadd(0.0,2335,
"Blnd",
'i',
"Blend" );
710 LinSv *lineSiIII =
linadd(0.0,1888,
"Blnd",
'i',
"Blend" );
717 LinSv *lineSiIV =
linadd(0.0,1397,
"Blnd",
'i',
"Blend" );
724 LinSv *lineNeIV =
linadd(0.0, 2424,
"Blnd",
'i',
"Blend");
731 LinSv *lineNeVII =
linadd(0.0,895,
"Blnd",
'i',
"Blend" );
738 LinSv *lineNeVIII =
linadd(0.0,774,
"Blnd",
'i',
"Blend" );
745 LinSv *lineClIIIa =
linadd(0.0,3350,
"Blnd",
'i',
"Blend" );
752 LinSv *lineClIIIb =
linadd(0.0,5525,
"Blnd",
'i',
"Blend" );
759 LinSv *lineClIIIc =
linadd(0.0,8494,
"Blnd",
'i',
"Blend" );
774 lindst(eff, 3933.,
"Ca2R", ipnt,
't',
false,
775 " recombination contribution to CaII emission" );
778 LinSv *lineCaII8579 =
linadd(0.0,8579,
"Blnd",
'i',
"Blend" );
783 LinSv *lineCaII7306 =
linadd(0.0,7306,
"Blnd",
'i',
"Blend" );
787 LinSv *lineCaII3933 =
linadd(0.0,3933,
"Blnd",
'i',
"Blend" );
794 double pump = 0, fac = 0;
799 LinSv *lineCIa =
linadd(0.0,1657,
"Blnd",
'i',
"Blend" );
806 lindst(rec, 1656.,
"C 1R", ipnt,
't',
false,
807 " C 1 1656 recomb; n.b. coll deexcitation not in" );
826 double c19850WL = 9850.26;
827 double recCoeff = A*
pow(t4,-1*B*(1+C*log10(t4)));
832 LinSv *lineCIb =
linadd(0.0,9850,
"Blnd",
'i',
"Blend" );
839 " C I 9850 recombination contribution" );
848 " photoproduction, Hofmann and Trefftz");
851 LinSv *lineCIIb =
linadd(0.0,2326,
"Blnd",
'i',
"Blend" );
864 LinSv *lineCIIa =
linadd(0.0,1335,
"Blnd",
'i',
"Blend" );
873 lindst(rec, 1335.,
"C 2R", ipnt,
't',
false,
874 " C 2 1335 recombination," );
897 lindst(pump*0.387 * 5.08e-12/(1.+
dense.
eden/1e12) ,3920,
"C 2P",ipnt,
'r',
true ,
898 " CII 3918.98/3920.68 is only pumped, no recombination part");
901 pump *= 0.305 * 0.387 * 3.02e-12;
904 " pumped part of line C II 6580" );
906 LinSv *lineCIIc =
linadd(0.0,6580,
"Blnd",
'i',
"Blend" );
913 " recombination part of C II 6580 line " );
922 LinSv *lineCIIIc =
linadd(0.0,977,
"Blnd",
'i',
"Blend" );
928 lindst(rec, 977.,
"C 3R", ipnt,
't',
false,
929 " dielectronic recombination contribution to C 3 977 " );
936 LinSv *lineCIII =
linadd(0.0,1909,
"Blnd",
'i',
"Blend" );
945 lindst( 3.1e-19*fac*corr, 1909.,
"C 3R", ipnt,
't',
false,
946 " C 3 1909 recombination from Storey" );
949 " C 3 1909 following relax following inner shell photoionization" );
958 LinSv *lineCIIIb =
linadd(0.0,1176,
"Blnd",
'i',
"Blend" );
973 lindst(rec, 1175.,
"C 3R", ipnt,
't',
false,
974 " dielectronic recombination contribution to C 3 1175 " );
981 LinSv *lineCIV =
linadd(0.0,1549,
"Blnd",
'i',
"Blend" );
982 LinSv *lineCIVInwd =
linadd(0.0,1549,
"Inwd",
'i',
"inward part of Blend" );
992 lindst(rec, 1549.,
"C 4R", ipnt,
't',
false,
993 " recombination C 4 1549 from CV" );
1012 LinSv *lineNI3467 =
linadd(0.0,3467,
"Blnd",
'i',
"Blend" );
1025 double eff_recrate_2D = 1.108e-13 *
pow(
phycon.
te*1e-4, -0.6085) /
1027 double eff_recrate_2P = 0.659e-13 *
pow(
phycon.
te*1e-4, -0.6158);
1035 double rec14 = eff_recrate_2P * fac_n1 * 2./6.;
1036 double rec15 = eff_recrate_2P * fac_n1 * 4./6.;
1037 double rec13 = eff_recrate_2D * fac_n1 * 4./10.;
1038 double rec12 = eff_recrate_2D * fac_n1 * 6./10.;
1040 LinSv *lineNI5199 =
linadd(0.0,5199,
"Blnd",
'i',
"Blend" );
1049 3.82e-12*emit_frac_5197;
1054 " estimate of contribution to [N I] 5199 by recombination" );
1062 " upper limit to [N I] 5199 produced by chemistry" );
1067 3.82e-12 * emit_frac_5197;
1069 " upper limit to [N I] 5199 produced by charge transfer" );
1087 LinSv *lineNI10403 =
linadd(0.0,10403,
"Blnd",
'i',
"Blend" );
1103 " N 2 6584 alone, recombination contribution" );
1118 " N 2 5755 charge transfer contribution " );
1120 LinSv *lineNII5755 =
linadd(0.0,5755,
"Blnd",
'i',
"Blend" );
1155 " N 2 5755 recombination contribution" );
1167 LinSv *lineNII1085 =
linadd(0.0,1085,
"Blnd",
'i',
"Blend" );
1180 lindst(
MAX2(0.,rec), 1085.,
"N 2R", ipnt,
't',
false,
1181 " dielectronic recombination contribution to N 2 1085" );
1188 LinSv *lineNIIIa =
linadd(0.0,1750,
"Blnd",
'i',
"Blend" );
1203 LinSv *lineNIIIb =
linadd(0.0,990,
"Blnd",
'i',
"Blend" );
1212 lindst(rec, 990.,
"N 3R", ipnt,
't',
false,
1213 " part of N 3 990 due to recombination " );
1224 LinSv *lineNIV765 =
linadd(0.0,765,
"Blnd",
'i',
"Blend" );
1234 lindst(
MAX2(0.,rec), 765.,
"N 4R", ipnt,
't',
false,
1235 " N 4 765 recombination," );
1244 LinSv *lineNIV1486 =
linadd(0.0,1486,
"Blnd",
'i',
"Blend" );
1252 LinSv *lineNV =
linadd(0.0,1240,
"Blnd",
'i',
"Blend" );
1261 LinSv *lineNVInwd =
linadd(0.0,1240,
"Inwd",
'i',
"inward part of Blend" );
1277 LinSv *lineOI1304 =
linadd(0.0,1304,
"Blnd",
'i',
"Blend" );
1288 LinSv *lineOI6300 =
linadd(0.0,6300,
"Blnd",
'i',
"Blend" );
1299 LinSv *lineOI8446 =
linadd(0.0,8446,
"Blnd",
'i',
"Blend" );
1309 double rec7323 , rec7332, rec3730 , rec3726 , rec2471, reco23tot , reco22tot;
1311 static const bool debug2471 =
false;
1312 static const bool debug7323 =
false;
1313 static const bool debug7332 =
false;
1321 LinSv *lineOII2471 =
linadd(0.0,2471,
"Blnd",
'i',
"Blend" );
1329 LinSv *lineOII3726 =
linadd(0.0,3726,
"Blnd",
'i',
"Blend" );
1336 LinSv *lineOII3728 =
linadd(0.0,3728,
"Blnd",
'i',
"Blend" );
1343 LinSv *lineOII7323 =
linadd(0.0,7323,
"Blnd",
'i',
"Blend" );
1351 LinSv *lineOII7332 =
linadd(0.0,7332,
"Blnd",
'i',
"Blend" );
1367 double chO2471 = 0.0;
1368 double chO7323 = 0.0;
1369 double chO7332 = 0.0;
1370 double chO3726 = 0.0;
1371 double chO3730 = 0.0;
1372 double O2_Lev45_rad = 0.0;
1373 double O2_Lev45_coll = 0.0;
1374 double O2_Lev23_rad = 0.0;
1375 double O2_Lev23_coll = 0.0;
1425 O2_Lev45_rad += tr.
Hi()->Pop()*tr.
Emis().
Aul();
1431 O2_Lev45_rad += tr.
Hi()->Pop()*tr.
Emis().
Aul();
1440 O2_Lev23_rad += tr.
Hi()->Pop()*tr.
Emis().
Aul();
1446 O2_Lev23_rad += tr.
Hi()->Pop()*tr.
Emis().
Aul();
1450 double chO3727 = chO3726 + chO3730;
1451 double chO7325 = chO7323 + chO7332;
1454 double O2_Lev45_radTot = O2_Lev45_rad/
SDIV(O2_Lev45_rad + O2_Lev45_coll);
1458 double O2_Lev23_radTot = O2_Lev23_rad/
SDIV(O2_Lev23_rad + O2_Lev23_coll);
1467 reco23tot = O2_Lev45_radTot * HBeta *
1475 if(debug2471 || debug7323 || debug7332 )
1478 fprintf(
ioQQQ,
"O2_Lev45_radTot\t%e\t%e\t%e\n",O2_Lev45_radTot,O2_Lev45_rad,O2_Lev45_coll);
1481 sum = chO2471*2471./7325. + chO7323 + chO7332;
1493 if(debug2471 || debug7323 || debug7332 )
1495 fprintf(
ioQQQ,
"reco23tot\t%e\tsum\t%e\n",reco23tot,sum);
1498 rec7332 = reco23tot * chO7332;
1499 linadd(rec7332,
wlAirVac(7332.),
"O 2R",
'i',
" P1/2-D3/2 and P3/2-D3/2 together " );
1501 rec7323 = reco23tot * chO7323;
1502 linadd(rec7323,
wlAirVac(7323.),
"O 2R",
'i',
" P1/2-D5/2 and P3/2-D5/2 together " );
1510 sum = chO3726 + chO3730;
1515 rec3726 = reco22tot * fracO3726 * 5.34e-12;
1516 rec3730 = reco22tot * fracO3730 * 5.34e-12;
1523 LinSv *lineOII833 =
linadd(0.0,833,
"Blnd",
'i',
"Blend" );
1537 " line produced by photoionization of Oo; already in TOTL" );
1539 linadd( rec3726 ,3726,
"O 2R",
'i',
" D3/2 - S3/2 transition" );
1542 lindst( rec3730 ,3729.,
"O 2R", ipnt,
't',
false,
1543 " recombination contribution refer o2 rec Liu, X-W., Storey, P.J., Barlow, M.J., Danziger, I.J.,refercon Cohen, M., & Bryce, M., 2000, MNRAS, 312, 585 recombination contributions five level atom calculations; D5/2 - S3/2 " );
1546 " O II 3727, all lines of multiplet together" );
1552 rec2471 = reco23tot * chO2471*2471./7325. * 8.05e-12/2.72e-12;
1553 linadd(rec2471,
wlAirVac(2471.),
"O 2R",
'i',
" both 2P 1/2 and 3/2 to ground " );
1564 " line produced by photoionization of Oo;" );
1566 linadd(chO7325+rec7323+rec7332,7325,
"Blnd",
'i',
1567 " O II 7325, all lines of multiplet together" );
1598 lindst(pump*0.336 * 6.37e-12/(1.+
dense.
eden/1e12) ,3120,
"O 2P",ipnt,
'r',
true,
1599 " OII 3113.62 - 3139.68 (8 lines) are only pumped, no recombination part" );
1602 lindst(pump*0.147 * 6.03e-12/(1.+
dense.
eden/1e12) ,3300,
"O 2P",ipnt,
'r',
true,
1603 " OII 3277.56 - 3306.45 (6 lines) are only pumped, no recombination part" );
1606 lindst(pump*0.087 * 5.29e-12/(1.+
dense.
eden/1e12) ,3762,
"O 2P",ipnt,
'r',
true,
1607 " OII 3739.76/3762.47/3777.42 (3 lines) are only pumped, no recombination part" );
1612 lindst(rec, 4651.,
"O 2R",ipnt,
't',
true,
1613 " O II 4651 total recombination, 4638.86-4696.35 (8 lines) " );
1617 linadd(pump* 0.336 * 0.933 * 4.27e-12/(1.+
dense.
eden/1e12),4651,
"O 2P",
'i',
1618 " pumped part of line O II 4651 " );
1624 LinSv *lineOII4341 =
linadd(0.0,4341,
"Blnd",
'i',
"Blend" );
1633 " recombination contribution to O II 4341 line " );
1636 " pumped part of line O II 4341 " );
1644 LinSv *lineOII3736 =
linadd(0.0,3736,
"Blnd",
'i',
"Blend" );
1654 " recombination part of O II 3736 line " );
1656 " pumped part of line O II 3736" );
1668 LinSv *lineOIII1666 =
linadd(0.0,1666,
"Blnd",
'i',
"Blend" );
1680 " contribution to OIII 1665 due to inner shell (2s^2) ionization " );
1683 " contribution to OIII 1665 due to K-shell ionization " );
1695 LinSv *lineOIII5007 =
linadd(0.0,5007,
"Blnd",
'i',
"Blend" );
1717 linadd(d5007t/1.25,5007,
"LOST",
'i',
1718 " O III 5007 lost through excited state photo" );
1743 " O III 4363 recombination, coefficient from Burgess and Seaton " );
1746 " call linadd( c4363*0.236 , 2321 , 'O 3','c') charge exchange, Dalgarno+Sternberg ApJ Let 257, L87. ");
1748 LinSv *lineOIII4363 =
linadd(0.0,4363,
"Blnd",
'i',
"Blend" );
1761 wlAirVac(5592.),
"O 3C",
'i',
" charge exchange rate, D+S " );
1763 LinSv *lineOIII5592 =
linadd(0.0,5592,
"Blnd",
'i',
"Blend" );
1774 LinSv *lineOIII835 =
linadd(0.0,835,
"Blnd",
'i',
"Blend" );
1788 lindst(
MAX2(0.,rec), 835.,
"O 3R", ipnt,
't',
false,
1789 " O III 834A, dielectronic recombination only" );
1800 " inner shell photoionization, relaxation " );
1802 LinSv *lineOIV1402 =
linadd(0.0,1402,
"Blnd",
'i',
"Blend" );
1816 LinSv *lineOIV789 =
linadd(0.0,789,
"Blnd",
'i',
"Blend" );
1824 lindst(
MAX2(0.,rec), 789.,
"O 4R", ipnt,
't',
false,
1825 " O IV 789A, dielectronic recombination only" );
1837 LinSv *lineOV630 =
linadd(0.0,630,
"Blnd",
'i',
"Blend" );
1844 lindst(
MAX2(0.,rec), 630.,
"O 5R", ipnt,
't',
false,
1845 " O V 630A, dielectronic recombination only" );
1855 LinSv *lineOV1218 =
linadd(0.0,1218,
"Blnd",
'i',
"Blend" );
1865 LinSv *lineOVI1035 =
linadd(0.0,1035,
"Blnd",
'i',
"Blend" );
1869 LinSv *lineInwd1035 =
linadd(0.0,1035,
"Inwd",
'i',
"Blend" );
1883 "Stoy method energy sum ");
1888 static long nLineSave=-1 , ndLineSave=-1;
1898 if( nLineSave<= 0 || ndLineSave < 0 )
1906 fprintf(
ioQQQ,
"DISASTER number of lines in LineSave.nsum changed between pass 0 and 1 - this is impossible\n" );
1907 fprintf(
ioQQQ,
"DISASTER LineSave.nsum is %li and nLineSave is %li\n",
1915 fprintf(
ioQQQ,
"DISASTER number of lines in LineSave.nsum changed between pass 0 and 1 - this is impossible\n" );
1916 fprintf(
ioQQQ,
"DISASTER LineSave.nsum is %li and ndLineSave is %li\n",
1937 double absval , rel;
1946 if( lgMustPrintHeader )
1949 lgMustPrintHeader =
false;
1955 fprintf(
ioQQQ,
" Thanks for checking on the cdLine routine!\n" );
1985 "total intensity of K-alpha line" );
1988 linadd(fela*1.11e-8,2,
"FeLr",
'i' ,
1989 " recombination from fully stripped ion ");
1993 " Auger hot iron, assumes case b for H and He-like ");
1996 " Auger production of cold iron, less than or 17 times ionized " );
1999 " grain production of cold iron ");
string chIonLbl(const TransitionProxy &t)
TransitionList UTALines("UTALines",&AnonStates)
double emit_frac(const TransitionProxy &t)
NORETURN void TotalInsanity(void)
double RecomInducCool_Rate
void lindst(double xEmiss, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment)
TransitionList HFLines("HFLines",&AnonStates)
TransitionList TauLine2("TauLine2",&AnonStates)
void lines_continuum(void)
realnum energy(long n) const
void PntForLine(double wavelength, const char *chLabel, long int *ipnt)
t_iso_sp iso_sp[NISO][LIMELM]
double xIonDense[LIMELM][LIMELM+1]
bool lgdBaseSourceExists[LIMELM][LIMELM+1]
ColliderList colliders(dense)
long ipoint(double energy_ryd)
long int nLyman_max[NISO]
const TransitionProxy getComponent(long ind)
double energy(const genericState &gs)
EmissionList::reference Emis() const
LinSv * linadd(double xEmiss, realnum wavelength, const char *chLab, char chInfo, const char *chComment)
multi_arr< int, 3 > ipExtraLymanLines
void iso_satellite_update(long nelem)
double HCharExcRecTo_N0_2D
qList::iterator Hi() const
realnum wlAirVac(double wlAir)
sys_float safe_div(sys_float x, sys_float y, sys_float res_0by0)
static bool lgMustPrintHeader
double heating(long nelem, long ion)
double **** PhotoRate_Shell
TransitionProxy trans(const long ipHi, const long ipLo)
double GetLineRec(long int ip, long int lWl)
void PutLine(const TransitionProxy &t, const char *chComment, const char *chLabelTemp, const ExtraInten &extra)
void lines_molecules(void)
long int cdLine(const char *chLabel, realnum wavelength, double *relint, double *absint)
vector< vector< TransitionList > > ExtraLymanLines
realnum RecCoefCNO[4][NRECCOEFCNO]
CollisionProxy Coll() const
#define DEBUG_ENTRY(funcname)
void addComponent(const char *species, const double wavelength)
vector< species > dBaseSpecies
int fprintf(const Output &stream, const char *format,...)
double dissoc_rate(const char chSpecies[]) const
double & xObsIntensity() const
STATIC void Drive_cdLine(void)
sys_float SDIV(sys_float x)
double pow(double x, int i)
void SpeciesPseudoContAccum()
void rec_lines(double t, realnum r[][NRECCOEFCNO])
realnum yield(long n) const
vector< TransitionList > dBaseTrans
STATIC void lines_iron_Ka()
void makeBlend(const char *species, const double wavelength, const double width)
long int nCollapsed_local
double ColUL(const ColliderList &colls) const
long int StuffComment(const char *chComment)