22 #define PRT_POPS false
24 #define LIM_H2_POP_LOOP 10
27 #define H2_DISS_ALLISON_DALGARNO 6e-19f
70 double source_so_far = 0.;
74 for(
long ipHi=0; ipHi < nLevels_per_elec[0]; ++ipHi )
106 pop_tot +=
states[ipHi].Pop();
112 double sink_left = sink_tot - sink_so_far;
115 sink_left /= pop_tot;
116 if( sink_left >= 0. )
118 for(
long ipHi=0; ipHi < nLevels_per_elec[0]; ++ipHi )
123 for(
long ipHi=0; ipHi < nLevels_per_elec[0]; ++ipHi )
124 H2_X_sink[ipHi] *= sink_tot / sink_so_far;
127 double sink_so_far_s = 0.;
128 double pop_tot_s = 0.;
129 for(
long ipHi=0; ipHi < nLevels_per_elec[0]; ++ipHi )
134 pop_tot_s +=
states[ipHi].Pop();
141 double sink_left_s = sink_tot_s - sink_so_far_s;
144 sink_left_s /= pop_tot_s;
147 if( sink_left_s >= 0. )
149 for(
long ipHi=0; ipHi < nLevels_per_elec[0]; ++ipHi )
158 double source_left = source_tot - source_so_far;
159 if( source_left >= 0. )
161 for(
long ipHi=0; ipHi < nLevels_per_elec[0]; ++ipHi )
163 long iElec =
states[ipHi].n();
164 long iVib =
states[ipHi].v();
165 long iRot =
states[ipHi].J();
177 DEBUG_ENTRY(
"diatomics::H2_X_coll_rate_evaluate()" );
204 fprintf(
ioQQQ,
" Collider densities are:");
219 for(
long ipLo=0; ipLo<ipHi; ++ipLo )
222 double colldown = 0.;
228 ASSERT( CollRate[nColl]*collider_density[nColl] >= 0. );
262 ASSERT( (*tr).Emis().Aul() > 0. );
264 (*tr).Emis().ipFine() =
ipFineCont( (*tr).EnergyRyd());
285 ASSERT( (*tr).ipCont() > 0 );
286 drive += (*tr).Emis().pump() * (*tr).Emis().PopOpc() * (*tr).EnergyErg();
311 ASSERT( (*tr).ipCont() > 0 );
312 if( (*(*tr).Hi()).Pop() > smallfloat && (*tr).Emis().PopOpc() > smallfloat )
320 " H2_RadPress returns, radiation pressure is %.2e\n",
338 energy += st->Pop() * st->energy();
357 (*tr).outline_resonance();
407 ASSERT( (*tr).ipCont() > 0 );
457 double rot_cooling , dCoolDT;
474 " The total number of levels used in the matrix solver must be <= %li, the number of levels within X.\n Sorry.\n",
522 fprintf(
ioQQQ,
" H2_Level_low_matrix has been called with the number of rotor levels greater than space allocated.\n");
594 if( (abs(iRotHi-iRot)==2 || (iRotHi-iRot)==0 ) && (iVib<=iVibHi) )
599 ASSERT( (*tr).ipCont() > 0 );
606 AulEscp[ihi][ilo] = (*tr).Emis().Aul()*(
607 (*tr).Emis().Pesc() +
608 (*tr).Emis().Pelec_esc());
609 AulDest[ihi][ilo] = (*tr).Emis().Aul()*(*tr).Emis().Pdest();
610 AulPump[ilo][ihi] = (*tr).Emis().pump();
624 if( (abs(iRotHi-iRot)==2 || (iRotHi-iRot)==0 ) && (iVib<=iVibHi) )
629 ASSERT( (*tr).ipCont() > 0 );
635 (*(*tr).Hi()).Pop() * (
636 (*tr).Emis().Aul()*( (*tr).Emis().Pesc() + (*tr).Emis().Pelec_esc() + (*tr).Emis().Pdest() ) +
637 (*tr).Emis().pump() * (*(*tr).Lo()).
g() / (*(*tr).Hi()).
g() );
670 if(lgDeBug)fprintf(
ioQQQ,
"DEBUG H2_Level_low_matrix, ilo=%li",ilo);
686 if(lgDeBug)fprintf(
ioQQQ,
"\n");
698 if(lgDeBug)fprintf(
ioQQQ,
"\t%.1e",ratein);
701 double rateout = ratein *
709 if(lgDeBug)fprintf(
ioQQQ,
"\n");
745 enum {DEBUG_LOC=
false};
746 if( DEBUG_LOC || lgDeBug)
748 fprintf(
ioQQQ,
"DEBUG H2 matexcit");
751 fprintf(
ioQQQ,
"\t%li",ilo );
765 fprintf(
ioQQQ,
"AulEscp[n][]\\[][n] = Aul*Pesc\n");
768 fprintf(
ioQQQ,
"\t%li",ilo );
773 fprintf(
ioQQQ,
"%li", ihi);
781 fprintf(
ioQQQ,
"AulPump [n][]\\[][n]\n");
784 fprintf(
ioQQQ,
"\t%li",ilo );
789 fprintf(
ioQQQ,
"%li", ihi);
797 fprintf(
ioQQQ,
"CollRate_levn [n][]\\[][n]\n");
800 fprintf(
ioQQQ,
"\t%li",ilo );
805 fprintf(
ioQQQ,
"%li", ihi);
812 fprintf(
ioQQQ,
"SOURCE");
817 fprintf(
ioQQQ,
"\nSINK");
862 fprintf(
ioQQQ,
"\n DEBUG H2_Level_lowJ dense_total: %.3e matrix rel pops\n", *
dense_total);
863 fprintf(
ioQQQ,
"v\tJ\tpop\n");
868 fprintf(
ioQQQ,
"%3li\t%3li\t%.3e\t%.3e\t%.3e\n",
876 fprintf(
ioQQQ,
" H2_Level_low_matrix called atom_levelN which returned negative populations.\n");
896 double old_solomon_rate=-1.;
897 long int n_pop_oscil = 0;
904 lgOrthoParaRatioConv;
905 double quant_old=-1.,
908 bool lgH2_pops_oscil=
false,
909 lgH2_pops_ever_oscil=
false;
912 double PopChgMax_relative=0. , PopChgMaxOld_relative=0., PopChgMax_total=0., PopChgMaxOld_total=0.;
913 long int iRotMaxChng_relative , iVibMaxChng_relative,
914 iRotMaxChng_total , iVibMaxChng_total,
916 double popold_relative , popnew_relative , popold_total , popnew_total;
921 double converge_pops_relative=1e-2,
922 converge_pops_total=1e-3,
923 converge_ortho_para=1e-2;
930 "\n***************H2_LevelPops %s call %li this iteration, zone is %.2f, H2/H:%.e Te:%e ne:%e\n",
934 dens_rel_to_lim_react,
941 static long int nzone_prt=-1;
942 if(
nzone!=nzone_prt )
945 fprintf(
ioQQQ,
"DEBUG zone %li species %s rel_to_lim:%.3e Te:%.3e *ne:%.3e n(%s):%.3e\n",
948 dens_rel_to_lim_react,
971 " H2_LevelPops %s pops too small, not computing, set to LTE and return, H2/H is %.2e and H2_to_H_limit is %.2e.",
973 dens_rel_to_lim_react,
1020 fprintf(
ioQQQ,
"%s 1st call - using LTE level pops\n",
label.c_str() );
1026 long iElec = (*st).n();
1027 long iVib = (*st).v();
1028 long iRot = (*st).J();
1063 double pop_total = 0.;
1066 long iElec = (*st).n();
1067 long iVib = (*st).v();
1069 pop_total += (*st).Pop();
1080 "%s H2_renorm_chemistry is %.4e, *dense_total is %.4e pops_per_elec[0] is %.4e\n",
1089 long iElec = (*st).n();
1090 long iVib = (*st).v();
1091 long iRot = (*st).J();
1099 " H2 entry, old pops sumed to %.3e, renorm to htwo den of %.3e\n",
1107 converge_pops_relative *= 2.;
1108 converge_pops_total *= 3.;
1109 converge_ortho_para *= 3.;
1123 lgConv_h2_soln =
false;
1125 long loop_h2_pops = 0;
1136 lgConv_h2_soln =
true;
1181 fprintf(
ioQQQ,
" Rel pop(e=%li)" ,iElecHi);
1193 long iElec = (*st).n();
1194 if( iElec > 0 )
continue;
1195 long iVib = (*st).v();
1203 fprintf(
ioQQQ,
"\t%.2e", *it/(*dense_total));
1210 fprintf(
ioQQQ,
"\n");
1212 fprintf(
ioQQQ,
" Rel pop(0,J)");
1215 long iElec = (*st).n();
1216 if( iElec > 0 )
continue;
1217 long iVib = (*st).v();
1218 if( iVib > 0 )
continue;
1219 fprintf(
ioQQQ,
"\t%.2e", (*st).Pop()/(*dense_total) );
1221 fprintf(
ioQQQ,
"\n");
1227 double sum_pops_matrix = 0.;
1230 sum_pops_matrix +=
states[i].Pop();
1239 double pop_total = 0.;
1241 pop_total += (*st).Pop();
1244 double H2_renorm_conserve = *dense_total/
SDIV(pop_total);
1253 (*st).Pop() *= H2_renorm_conserve;
1254 long iElec = (*st).n();
1255 long iVib = (*st).v();
1262 PopChgMaxOld_relative = PopChgMax_relative;
1263 PopChgMaxOld_total = PopChgMax_total;
1264 PopChgMax_relative = 0.;
1265 PopChgMax_total = 0.;
1266 iRotMaxChng_relative =-1;
1267 iVibMaxChng_relative = -1;
1268 iRotMaxChng_total =-1;
1269 iVibMaxChng_total = -1;
1270 popold_relative = 0.;
1271 popnew_relative = 0.;
1293 long iElec = (*st).n();
1294 long iVib = (*st).v();
1295 long iRot = (*st).J();
1304 SDIV(pop) > fabs(PopChgMax_relative) &&
1310 pop/
SDIV(*dense_total)>1e-6 )
1312 PopChgMax_relative =
1314 iRotMaxChng_relative = iRot;
1315 iVibMaxChng_relative = iVib;
1317 popnew_relative = pop;
1325 if( fabs(rel_change) > fabs(PopChgMax_total) )
1327 PopChgMax_total = rel_change;
1328 iRotMaxChng_total = iRot;
1329 iVibMaxChng_total = iVib;
1354 else if( rel_change> 0.1 )
1373 double H2_renorm_conserve_init = *dense_total/sumold;
1380 long iElec = (*st).n();
1381 long iVib = (*st).v();
1382 long iRot = (*st).J();
1396 long iElec = (*st).n();
1397 long iVib = (*st).v();
1398 long iRot = (*st).J();
1399 const double& pop = (*st).Pop();
1442 if( loop_h2_pops>2 && (
1444 (PopChgMax_relative*PopChgMaxOld_relative<0. ) ) )
1446 lgH2_pops_oscil =
true;
1447 if( loop_h2_pops > 6 )
1450 lgH2_pops_ever_oscil =
true;
1456 lgH2_pops_oscil =
false;
1460 lgH2_pops_ever_oscil =
false;
1473 lgConv_h2_soln =
true;
1474 lgPopsConv_total =
true;
1475 lgPopsConv_relative =
true;
1477 lgSolomonConv =
true;
1478 lgOrthoParaRatioConv =
true;
1482 if( fabs(PopChgMax_relative)>converge_pops_relative )
1485 lgConv_h2_soln =
false;
1486 lgPopsConv_relative =
false;
1489 quant_old = PopChgMaxOld_relative;
1491 quant_new = PopChgMax_relative;
1493 strcpy( chReason ,
"rel pops changed" );
1498 else if( fabs(PopChgMax_total)>converge_pops_total)
1500 lgConv_h2_soln =
false;
1501 lgPopsConv_total =
false;
1504 quant_old = PopChgMaxOld_total;
1506 quant_new = PopChgMax_total;
1508 strcpy( chReason ,
"tot pops changed" );
1519 lgConv_h2_soln =
false;
1520 lgOrthoParaRatioConv =
false;
1523 strcpy( chReason ,
"ortho/para ratio changed" );
1536 lgConv_h2_soln =
false;
1540 strcpy( chReason ,
"heating changed" );
1559 lgConv_h2_soln =
false;
1560 lgSolomonConv =
false;
1561 quant_old = old_solomon_rate;
1563 strcpy( chReason ,
"Solomon rate changed" );
1567 if( !lgConv_h2_soln )
1578 fprintf(
ioQQQ,
" %s loop %3li no conv oscl?%c why:%s ",
1581 TorF(lgH2_pops_ever_oscil),
1583 if( !lgPopsConv_relative )
1584 fprintf(
ioQQQ,
" PopChgMax_relative:%.4e v:%li J:%li old:%.4e new:%.4e",
1586 iVibMaxChng_relative,
1587 iRotMaxChng_relative ,
1590 else if( !lgPopsConv_total )
1591 fprintf(
ioQQQ,
" PopChgMax_total:%.4e v:%li J:%li old:%.4e new:%.4e",
1597 else if( !lgHeatConv )
1598 fprintf(
ioQQQ,
" heat:%.4e old:%.4e new:%.4e",
1603 else if( !lgSolomonConv )
1605 else if( !lgOrthoParaRatioConv )
1606 fprintf(
ioQQQ,
" current, old, older ratios are %.4e %.4e %.4e",
1610 fprintf(
ioQQQ,
"\n");
1618 " H2 5lev %li Conv?%c",
1620 TorF(lgConv_h2_soln) );
1622 if( fabs(PopChgMax_relative)>0.1 )
1623 fprintf(
ioQQQ,
" pops, rel chng %.3e",PopChgMax_relative);
1625 fprintf(
ioQQQ,
" rel heat %.3e rel chng %.3e H2 heat/cool %.2e",
1631 " Oscil?%c Ever Oscil?%c",
1632 TorF(lgH2_pops_oscil) ,
1633 TorF(lgH2_pops_ever_oscil) );
1634 fprintf(
ioQQQ,
"\n");
1640 "H2 loop\t%li\tkase pop chng\t%i\tchem renorm fac\t%.4e\tortho/para ratio:\t%.3e\tfrac of pop in matrix: %.3f\n",
1648 if( iVibMaxChng_relative>=0 && iRotMaxChng_relative>=0 && PopChgMax_relative>1e-10 )
1650 "end loop %li H2 max rel chng=%.3e from %.3e to %.3e at v=%li J=%li\n\n",
1652 PopChgMax_relative ,
1655 iVibMaxChng_relative , iRotMaxChng_relative
1665 lgPopsConverged =
false;
1666 old_val = quant_old;
1667 new_val = quant_new;
1672 ASSERT( (*st).Pop() >= 0. );
1678 (*tr).Coll().cool() = 0.;
1679 (*tr).Coll().heat() = 0.;
1681 (*tr).Emis().PopOpc() = (*(*tr).Lo()).Pop() - (*(*tr).Hi()).Pop() * (*(*tr).Lo()).
g() / (*(*tr).Hi()).
g();
1684 (*tr).Emis().phots() = (*tr).Emis().Aul() * ((*tr).Emis().Pesc() + (*tr).Emis().Pelec_esc()) * (*(*tr).Hi()).Pop();
1687 (*tr).Emis().xIntensity() = (*tr).Emis().phots() * (*tr).EnergyErg();
1696 double popTimesE = (*st).Pop() * (*st).energy().WN();
1704 if(
H2_den_s > 1e-30 * (*dense_total) )
1730 static long ip_cut_off = -1;
1731 if( ip_cut_off < 0 )
1734 ip_cut_off =
ipoint( 1.14 );
1739 double flux_accum_photodissoc_BigH2_H2s = 0;
1741 long ip_H2_level =
ipoint( 1.07896 - 2.5 /
EVRYD);
1742 for(
long i= ip_H2_level; i < ip_cut_off; ++i )
1751 long iElec = (*st).n();
1752 if( iElec > 0 )
continue;
1753 long iVib = (*st).v();
1754 long iRot = (*st).J();
1755 const double &pop = (*st).Pop();
1757 const double mass_stat_factor = 3.634e-5/(2*2);
1774 if( arg_ratio > 0. )
1778 H2_stat[0][iVib][iRot] * mass_stat_factor;
1785 double flux_accum_photodissoc_BigH2_H2g = 0;
1787 ip_H2_level =
ipoint( 1.07896 - (*st).energy().Ryd() );
1789 for(
long i= ip_H2_level; i < ip_cut_off; ++i )
1806 if( arg_ratio > 0. )
1809 H2_stat[0][iVib][iRot] * mass_stat_factor;
1853 fprintf(
ioQQQ,
" H2_LevelPops exit1 %8.2f loops:%3li H2/H:%.3e Sol dis old %.3e new %.3e Sol dis star %.3e g-to-s %.3e photodiss star %.3e\n",
1856 dens_rel_to_lim_react,
1886 const double FRAC = 0.99999;
1888 double sum_pop = 0.;
1891 const bool PRT =
false;
1892 if( PRT ) fprintf(
ioQQQ,
"DEBUG pops ");
1903 if( PRT ) fprintf(
ioQQQ,
"\n");
1916 DEBUG_ENTRY(
"diatomics::SolveExcitedElectronicLevels()" );
1927 long iElecLo = (*Lo).n();
1928 long iVibLo = (*Lo).v();
1929 long iRotLo = (*Lo).J();
1931 long iElecHi = (*Hi).n();
1932 if( iElecHi < 1 )
continue;
1933 long iVibHi = (*Hi).v();
1934 long iRotHi = (*Hi).J();
1941 double rate_up = (*tr).Emis().pump() + CosmicRayHILyaExcitationRate * (*tr).Coll().col_str();
1943 (*tr).Emis().Aul() * ( (*tr).Emis().Pesc() + (*tr).Emis().Pelec_esc() + (*tr).Emis().Pdest() ) +
1944 rate_up * (*(*tr).Lo()).
g() / (*(*tr).Hi()).
g();
1950 rate_in[iElecHi][iVibHi][iRotHi] +=
H2_old_populations[iElecLo][iVibLo][iRotLo]*rate_up;
1961 ASSERT( rate_up >= 0. && rate_down >= 0. );
1969 long iElec = (*st).n();
1970 long iVib = (*st).v();
1971 long iRot = (*st).J();
2000 fprintf(
ioQQQ,
" Pop(e=%li):",iElec);
2003 fprintf(
ioQQQ,
"\n");
2010 if( (*Lo).n() != 0 )
continue;
2012 if( (*Hi).n() < 1 )
continue;
2015 double rate = (*Hi).Pop() *
2016 ((*tr).Emis().Aul() * ( (*tr).Emis().Pesc() + (*tr).Emis().Pelec_esc() + (*tr).Emis().Pdest() ) +
2017 (*tr).Emis().pump() * (*Lo).g() / (*Hi).g());
2027 DEBUG_ENTRY(
"diatomics::SolveSomeGroundElectronicLevels()");
2043 double H2boltz =
H2_Boltzmann[iElecHi][iVibHi][iRotHi];
2045 for(
long ipLo=0; ipLo<ipHi; ++ipLo )
2054 H2stat /
H2_stat[0][iVibLo][iRotLo] *
2061 H2_col_rate_in[iVibHi][iRotHi] += collup * H2_old_populations[0][iVibLo][iRotLo];
2071 long nEner = nLevels_per_elec[0];
2081 if( nEner+1 < nLevels_per_elec[0] )
2103 else if( nEner == 1 )
2120 double pump_from_below = 0.;
2121 for(
long ipLo = 0; ipLo<nEner; ++ipLo )
2130 if( ( abs(iRotLo-iRot) == 2 || iRotLo == iRot ) && (iVibLo <= iVib) && (*tr).ipCont() > 0 )
2132 double rateone = (*tr).Emis().Aul() * ( (*tr).Emis().Pesc() + (*tr).Emis().Pelec_esc() + (*tr).Emis().Pdest() );
2136 double pump_up = (*tr).Emis().pump() + CosmicRayHILyaExcitationRate * (*tr).Coll().col_str();
2138 rateone += pump_up * (*(*tr).Lo()).
g() / (*(*tr).Hi()).
g();
2141 H2_rad_rate_in[iVibLo][iRotLo] += rateone * H2_old_populations[iElec][iVib][iRot];
2161 #if defined(__ICC) && defined(__i386)
2162 #pragma optimization_level 1
2168 const char *chRoutine)
2185 fprintf(
ioQQQ,
"DEBUG H2_Cooling called by %s.\n", chRoutine );
2191 long iElec = (*st).n();
2192 long iVib = (*st).v();
2193 long iRot = (*st).J();
2216 double H2boltzHi =
H2_Boltzmann[iElecHi][iVibHi][iRotHi];
2217 double H2popHi =
states[ipHi].Pop();
2218 double ewnHi =
states[ipHi].energy().WN();
2220 for(
long ipLo=0; ipLo<ipHi; ++ipLo )
2224 double rate_dn_heat = 0.;
2233 double rate_up_cool = rate_dn_heat *
states[ipLo].Pop() *
2235 H2statHi /
H2_stat[iElecLo][iVibLo][iRotLo] *
2238 rate_dn_heat *= H2popHi;
2244 double conversion = (ewnHi -
states[ipLo].energy().WN() ) *
ERG1CM;
2245 double heatone = rate_dn_heat * conversion;
2246 double coolone = rate_up_cool * conversion;
2248 double oneline = heatone - coolone;
2258 (rate_up_cool==0 && rate_dn_heat==0) ||
2259 (
states[ipHi].energy().WN() >
states[ipLo].energy().WN()) );
2266 " DEBUG H2 heat fnzone\t%.2f\trenorm\t%.3e\tte\t%.4e\tdexc\t%.3e\theat/tot\t%.3e\n",
2279 " H2_Cooling Ctot\t%.4e\t HeatDiss \t%.4e\t HeatDexc \t%.4e\n" ,
2329 fprintf(
ioQQQ,
" iRot must be 0 (total), 1 (ortho), or 2 (para), returning -1.\n");
2349 if( iRot <0 || iVib >
nVib_hi[iElec] || iRot >
nRot_hi[iElec][iVib])
2351 fprintf(
ioQQQ,
" iVib and iRot must lie within X, returning -2.\n");
2352 fprintf(
ioQQQ,
" iVib must be <= %li and iRot must be <= %li.\n",
2369 if( strcmp(chLabel,
"ZERO") == 0 )
2376 else if( strcmp(chLabel,
"ADD ") == 0 )
2381 long iElec = (*st).n();
2382 if( iElec > 0 )
continue;
2383 long iVib = (*st).v();
2384 long iRot = (*st).J();
2395 else if( strcmp(chLabel,
"PRIN") != 0 )
2397 fprintf(
ioQQQ,
" H2_Colden does not understand the label %s\n",
2427 (*tr).Emis().ots() = (*(*tr).Hi()).Pop() * (*tr).Emis().Aul() * (*tr).Emis().Pdest();
2440 double sumpop1 = 0.;
2441 double sumpopA1 = 0.;
2442 double sumpopcollH2O_deexcit = 0.;
2443 double sumpopcollH2p_deexcit = 0.;
2444 double sumpopcollH_deexcit = 0.;
2446 double sumpopcollH2O_excit = 0.;
2447 double sumpopcollH2p_excit = 0.;
2448 double sumpopcollH_excit = 0.;
2453 long iElecHi = (*stHi).n();
2454 if( iElecHi > 0 )
continue;
2455 long iVibHi = (*stHi).v();
2456 long iRotHi = (*stHi).J();
2457 double ewnHi = (*stHi).energy().WN();
2460 long iVibLo = (*stLo).v();
2461 long iRotLo = (*stLo).J();
2462 double ewnLo2 = (*stLo).energy().WN();
2473 double popHi = (*(*tr).Hi()).Pop();
2474 double popLo = (*(*tr).Lo()).Pop();
2482 sumpopcollH2O_deexcit += popHi * CollRateCoeff[ihi][ilo][2];
2483 sumpopcollH2p_deexcit += popHi * CollRateCoeff[ihi][ilo][3];
2485 double temp = popLo *
2490 sumpopcollH_excit += temp * CollRateCoeff[ihi][ilo][0];
2491 sumpopcollH2O_excit += temp * CollRateCoeff[ihi][ilo][2];
2492 sumpopcollH2p_excit += temp * CollRateCoeff[ihi][ilo][3];
2497 sumpopA1 += popHi * (*tr).Emis().Aul();
2523 double H2_sum_excit_elec_den = 0.;
2530 return H2_sum_excit_elec_den;
multi_arr< double, 2 > H2_rad_rate_in
iterator begin(size_type i1)
multi_arr< double, 2 > H2_col_rate_out
multi_arr< double, 2 >::const_iterator md2ci
double sink_rate_tot(const char chSpecies[]) const
t_mole_global mole_global
multi_arr< realnum, 3 > H2_dissprob
const double ENERGY_H2_STAR
realnum GetXColden(long iVib, long iRot)
double H2_DissocEnergies[N_ELEC]
void SolveExcitedElectronicLevels(void)
NORETURN void TotalInsanity(void)
double Average_collH2_excit
void H2_LevelPops(bool &lgPopsConverged, double &old_value, double &new_value)
bool lgLeiden_Keep_ipMH2s
multi_arr< double, 2 > pops_per_vib
multi_arr< realnum, 2 > H2_coll_dissoc_rate_coef_H2
valarray< long > ipVib_H2_energy_sort
void RT_line_one(const TransitionProxy &t, bool lgShield_this_zone, realnum pestrk, realnum DopplerWidth)
bool fp_equal_tol(sys_float x, sys_float y, sys_float tol)
double rate_grain_op_conserve
multi_arr< realnum, 3 >::const_iterator mr3ci
sys_float sexp(sys_float x)
long ipFineCont(double energy_ryd)
molezone * findspecieslocal(const char buf[])
multi_arr< realnum, 2 > H2_coll_dissoc_rate_coef
#define H2_DISS_ALLISON_DALGARNO
double source_rate_tot(const char chSpecies[]) const
static realnum collider_density[N_X_COLLIDER]
double Average_collH2_dissoc_g
void H2_X_sink_and_source(void)
double xIonDense[LIMELM][LIMELM+1]
double Average_collH2_deexcit
multi_arr< realnum, 2 > H2_X_formation
double Solomon_dissoc_rate_g
multi_arr< realnum, 3 > CollRateCoeff
const double *const dense_total
multi_arr< realnum, 3 > H2_stat
static realnum collider_density_total_not_H2
valarray< realnum > H2_X_sink
multi_arr< double, 3 > Cont_Dissoc_Rate
multi_arr< long int, 3 > ipEnergySort
multi_arr< double, 3 > H2_old_populations
bool lgTemperatureConstant
double GetExcitedElecDensity(void)
double Average_collH2_dissoc_s
void H2_CollidRateEvalAll(void)
const multi_geom< d, ALLOC > & clone() const
bool fp_equal(sys_float x, sys_float y, int n=3)
multi_arr< realnum, 3 > H2_disske
long ipoint(double energy_ryd)
double cdH2_colden(long iVib, long iRot)
void H2_RT_tau_reset(void)
double photodissoc_BigH2_H2s
long int nLevels_per_elec[N_ELEC]
long ipLineEnergy(double energy, const char *chLabel, long ipIonEnergy)
multi_arr< double, 3 > H2_populations_LTE
double Average_collH_deexcit
long int nCall_this_iteration
double H2_InterEnergy(void)
valarray< class molezone > species
multi_arr< realnum, 2 > H2_X_colden_LTE
double photodissoc_BigH2_H2g
multi_arr< bool, 2 > lgH2_radiative
multi_arr< realnum, 2 > H2_X_Hmin_back
double PressureRadiationLine(const TransitionProxy &t, realnum DopplerWidth)
multi_arr< double, 3 > H2_rad_rate_out
void RT_OTS_AddLine(double ots, long int ip)
diatomics h2("h2", 4100.,&hmi.H2_total, Yan_H2_CS)
realnum GetDopplerWidth(realnum massAMU)
valarray< long > ipElec_H2_energy_sort
realnum HeatCoolRelErrorAllowed
void RT_line_one_tauinc(const TransitionProxy &t, long int mas_species, long int mas_ion, long int mas_hi, long int mas_lo, realnum DopplerWidth)
void ConvFail(const char chMode[], const char chDetail[])
double rate_grain_J1_to_J0
void H2_Calc_Average_Rates(void)
double ortho_para_current
void atom_levelN(long int nLevelCalled, realnum abund, const double g[], const double ex[], char chExUnits, double pops[], double depart[], double ***AulEscp, double ***col_str, double ***AulDest, double ***AulPump, double ***CollRate, const double source[], const double sink[], bool lgCollRateDone, double *cooltl, double *coolder, const char *chLabel, int *nNegPop, bool *lgZeroPop, bool lgDeBug, bool lgLTE, multi_arr< double, 2 > *Cool, multi_arr< double, 2 > *dCooldT)
void H2_Solomon_rate(void)
vector< double > stat_levn
multi_arr< double, 2 > H2_X_rate_to_elec_excited
void H2_zero_pops_too_low(void)
multi_arr< double, 2 > H2_X_rate_from_elec_excited
void H2_Colden(const char *chLabel)
static double ** CollRate
double Average_collH_excit
void H2_X_coll_rate_evaluate(void)
#define DEBUG_ENTRY(funcname)
double Solomon_dissoc_rate_s
void H2_Level_low_matrix(realnum abundance)
iterator end(size_type i1)
multi_arr< double, 2 >::iterator md2i
multi_arr< long int, 2 > ipTransitionSort
void mole_update_species_cache(void)
void H2_Cooling(const char *chString)
TransitionList::iterator rad_end
valarray< long > nRot_hi[N_ELEC]
double pops_per_elec[N_ELEC]
sys_float SDIV(sys_float x)
double H2_renorm_chemistry
double Average_collH_dissoc_g
valarray< long > ipRot_H2_energy_sort
valarray< realnum > H2_X_source
long int nzone_nlevel_set
double Average_collH_dissoc_s
void CalcPhotoionizationRate(void)
t_secondaries secondaries
multi_arr< double, 3 > H2_Boltzmann
void RT_line_one_tau_reset(const TransitionProxy &t)
multi_arr< realnum, 2 > H2_X_coll_rate
void SolveSomeGroundElectronicLevels(void)
multi_arr< double, 2 > H2_col_rate_in
multi_arr< realnum, 2 > H2_X_colden
multi_arr< int, 2 > H2_ipPhoto
multi_arr< bool, 3 > H2_lgOrtho