118 double VolComputed , VolExpected , ConComputed , ConExpected;
131 fprintf(
ioQQQ,
" PrtComment called.\n" );
147 " !This is beta test version %ld and is intended for testing only.",
157 sprintf( chLine,
" !The code needs to be fixed - search for fixit()." );
166 sprintf( chLine,
" !New code needs to be reviewed - search for CodeReview()." );
174 sprintf(
warnings.
chRgcln[0],
" W-Calculation stopped because %s Iteration%3ld of %ld",
176 sprintf( chLine,
" W-Calculation stopped because %s",
179 sprintf( chLine,
" W-This was not intended." );
189 " Calculation stopped because %s Iteration %ld of %ld, not converged due to %s",
198 " Calculation stopped because %s Iteration %ld of %ld",
209 " W-Calculation stopped because default number of zones reached. Was this intended???" );
212 " W-Default limit can be increased while retaining this check with the SET NEND command." );
223 " W-Calculation stopped zone thickness became too thin. This was not intended." );
226 " W-The most likely reason was an uncontrolled oscillation." );
234 " W-This happened because the globule scale became very small relative to the depth." );
237 " W-This problem is described in Hazy." );
257 else if( rel >= 0.1 && rel < 3. )
275 sprintf( chLine,
" W-The code is broken - search for broken()." );
284 sprintf( chLine,
" C-The assumed electron density was incorrect for the last zone." );
286 sprintf( chLine,
" C-Did a temperature discontinuity occur??" );
291 sprintf( chLine,
" W-The assumed electron density was incorrect during the calculation. This is bad." );
299 sprintf( chLine,
" W-The calculation aborted. Something REALLY went wrong!" );
306 sprintf( chLine,
" !The thermal map had changes in slope - check map output." );
314 sprintf( chLine,
" !Fudge factors were used or were checked. Why?" );
322 sprintf( chLine,
" C-Density greater than 10**15, heavy elements are very uncertain." );
327 sprintf( chLine,
" C-Density greater than 10**13" );
333 if(
cdLine(
"Pump",4861.36f,&relfl,&absint)<=0 )
335 fprintf(
ioQQQ,
" PROBLEM Did not find Pump H-beta, set to unity\n" );
343 if(
cdLine(
"H 1",4861.36f,&HBeta,&absint)<=0 )
345 fprintf(
ioQQQ,
" NOTE Did not find H 1 H-beta - set intensity to unity, "
346 "will not check on importance of H 1 pumping.\n" );
358 sprintf( chLine,
" !Continuum fluorescent production of H-beta was very important." );
361 else if(flur > 0.01 )
363 sprintf( chLine,
" Continuum fluorescent production of H-beta was significant." );
372 sprintf( chLine ,
" Iteration not converged because %s.",
380 sprintf( chLine,
" C-Wind velocity below sonic point; solution is not valid." );
388 if( fabs(1.-rel)> 0.02 )
390 sprintf( chLine,
" C-Wind mass flux error is %g%%",fabs(1.-rel)*100. );
392 fprintf(
ioQQQ,
"DEBUG emdot\t%.3e\t%.3e\t%.3e\t%.3e\n",
408 fprintf(
ioQQQ,
"\n\n Enable per zone energy conservation check by setting "
409 "CHECK_ENERGY_EVERY_ZONE=true in cloudy.cpp, recompile, then rerun.\n");
417 " !Magnetic field & cosmic rays both present. Their interactions are not treated." );
425 " !Background cosmic rays are not included - is this physical? It affects the chemistry." );
433 " C-Model is thick to cosmic rays, which are on." );
441 " !Ionization rate fell below background cosmic ray ionization rate. Should this be added too?" );
444 " ! Use the COSMIC RAY BACKGROUND command." );
451 sprintf( chLine,
" !Test code is in place." );
459 " !Compton cooling rate underflows to zero. Is this important?" );
467 " !Some input lines contained underscores, these were changed to spaces." );
475 " !Some input lines contained [ or ], these were changed to spaces." );
483 " !There is no hydrogen-ionizing radiation. Was this intended?" );
491 " Derivative of net cooling negative and so possibly thermally unstable in%4ld zones.",
501 " !A large fraction of the zones were possibly thermally unstable,%4ld out of%4ld",
510 " !Negative cooling reached %6.1f%% of the local heating, due to %4.4s %.1f",
517 " Negative cooling reached %6.1f%% of the local heating, due to %4.4s %.2f",
526 " !Advection heating reached %.2f%% of the local heating.",
533 " Advection heating reached %.2f%% of the local heating.",
542 " !Advection cooling reached %.2f%% of the local cooling.",
549 " Advection cooling reached %.2f%% of the local heating.",
561 " W-Time dependent ionization front cannot now handle strong-R cases - the ionization parameter is too large." );
567 " C-Time dependent ionization front cannot now handle strong-R cases - the ionization parameter is too large." );
576 " !Thermal collisional ionization of H reached %.2f%% of the local ionization rate.",
583 " Thermal collisional ionization of H reached %.2f%% of the local ionization rate.",
592 " Te-ne bounds of Case B lookup table exceeded, H I Case B line intensities set to zero." );
598 " Te-ne bounds of Case B lookup table exceeded, He II Case B line intensities set to zero." );
605 " !The high electron density makes the Nussbaumer/Storey CNO recombination predictions unreliable." );
613 " !Suprathermal collisional ionization of H reached %.2f%% of the local H ionization rate.",
620 " Suprathermal collisional ionization of H reached %.2f%% of the local H ionization rate.",
629 " !H2 vib deexec heating reached %.2f%% of the local heating.",
636 " H2 vib deexec heating reached %.2f%% of the local heating.",
645 " !H2 deexec cooling reached %.2f%% of the local heating.",
652 " H2 deexec cooling reached %.2f%% of the local heating.",
661 " !Charge transfer ionization of H reached %.1f%% of the local H ionization rate.",
668 " Charge transfer ionization of H reached %.2f%% of the local H ionization rate.",
677 " !Charge transfer heating reached %.2f%% of the local heating.",
684 " Charge transfer heating reached %.2f%% of the local heating.",
692 " !Charge transfer cooling reached %.2f%% of the local heating.",
699 " Charge transfer cooling reached %.2f%% of the local heating.",
708 " !Photoionization of upper level of Mg II 2798 reached %.1f%% of the total Mg+ photo rate.",
715 " Photoionization of upper level of Mg II 2798 reached %.1f%% of the total Mg+ photo rate.",
724 " !Photoionization of upper levels of [O I] reached %.1f%% of the total O destruction rate.",
731 " Photoionization of upper levels of [O I] reached %.1f%% of the total O destruction rate.",
740 " !Photoionization of upper levels of [O III] reached %.1f%% of the total O++ photo rate.",
747 " Photoionization of upper levels of [O III] reached %.1f%% of the total O++ photo rate.",
756 " !Destruction of He 2TriS reached %.1f%% of the total He0 dest rate"
757 " at zone %li, %.1f%% of that was photoionization.",
766 " Destruction of He 2TriS reached %.1f%% of the total He0 dest rate"
767 " at zone %li, %.1f%% of that was photoionization.",
780 " The density is too low to l-mix the lowest %s I collapsed level. "
781 " More resolved levels are needed for accurate line ratios.",
790 for( nelem=ipISO; nelem<
LIMELM; ++nelem )
794 sprintf( chLine,
" !Continuum was lowered into model %s-like %s due to high density. Highest n is %li",
802 sprintf( chLine,
" !Continuum was lowered into model %s-like %s due to high density at SOME point but NOT at the last zone.",
810 for( nelem=ipISO; nelem<
LIMELM; ++nelem )
812 if(
iso_sp[ipISO][nelem].lgPopsRescaled )
815 sprintf( chLine,
" C-Populations were rescaled for %s-like %s due to \"element ionization\" command.",
827 " C-Continuum not defined in extreme infrared - Compton scat, grain heating, not treated properly?" );
834 " C-Continuum not defined at photon energies which ionize excited states of H, important for H- and ff heating." );
841 " C-Continuum not defined at X-Ray energies - Compton scattering and Auger ionization wrong?" );
848 " C-Continuum not defined at gamma-ray energies - pair production and Compton scattering OK?" );
854 sprintf( chLine,
" C-Continuum zero at some energies." );
860 sprintf( chLine ,
" C-CoStarInterpolate interpolated between non-adjoining tracks, this may not be valid." );
867 " !The continuum occupation number at 1 Ryd is greater than unity." );
875 " C-The thickness of the first zone was set larger than optimal by a SET DR command." );
881 " C-Consider using the STOP THICKNESS command instead." );
886 if(
cdLine(
"TOTL",4363,&t4363,&absint)<=0 )
888 fprintf(
ioQQQ,
" PrtComment could not find total O III 4363 with cdLine.\n" );
893 if(
cdLine(
"Coll",4363,&c4363,&absint)<=0 )
895 fprintf(
ioQQQ,
" PrtComment could not find collisional O III 4363 with cdLine.\n" );
906 ratio = (t4363 - c4363)/t4363;
910 " !Non-collisional excitation of [O III] 4363 reached %.2f%% of the total.",
914 else if( ratio > 0.001 )
917 " Non-collisional excitation of [O III] 4363 reached %.2f%% of the total.",
928 " !The largest plasma frequency was %.2e Ryd = %.2e micron The continuum is set to 0 below this.",
940 " !The largest continuum occupation number was %.3e at %.3e Ryd.",
949 " The largest continuum occupation number was %.3e at %.3e Ryd.",
961 " The continuum occupation number fell below 1 at %.3e microns.",
968 " The continuum occupation number fell below 1 at %.3e Angstroms.",
975 " The continuum occupation number fell below 1 at %.3e Ryd.",
984 " !The largest continuum brightness temperature was %.3eK at %.3e Ryd.",
995 " The continuum brightness temperature fell below 10000K at %.3e microns.",
1002 " The continuum brightness temperature fell below 10000K at %.3e Angstroms.",
1009 " The continuum brightness temperature fell below 10000K at %.3e Ryd.",
1019 " !Both constant pressure and turbulence makes no physical sense?" );
1027 " !Both constant pressure and a filling factor makes no physical sense?" );
1035 " !Grains are present, but the gas phase abundances were left at the solar default. This is not physical." );
1043 " !Grains are not present, but the gas phase abundances were depleted. This is not physical." );
1049 long nBin=0L, nFail=0L;
1050 for(
size_t nd=0; nd <
gv.
bin.size(); nd++ )
1052 if(
gv.
bin[nd]->QHeatFailures > 0L )
1055 nFail +=
gv.
bin[nd]->QHeatFailures;
1061 " !The grain quantum heating treatment failed to converge %ld time(s) in %ld bin(s).", nFail, nBin );
1072 bool lgPAHsPresent_and_constant =
false;
1073 for(
size_t nd=0; nd <
gv.
bin.size(); nd++ )
1075 lgPAHsPresent_and_constant = lgPAHsPresent_and_constant ||
1077 (
gv.
bin[nd]->lgPAHsInIonizedRegion );
1079 if( lgPAHsPresent_and_constant )
1082 " C-PAH's were present in the ionized region, this has never been observed in H II regions." );
1092 " C-The continuum energy density temperature (%g K)"
1093 " is greater than the gas kinetic temperature (%g K).",
1096 sprintf( chLine,
" C-This is unphysical." );
1104 " Grains were not present but might survive in this environment (energy density temperature was %.2eK)",
1117 sprintf( chLine,
" H-eps and Ca H overlap." );
1124 sprintf( chLine,
" !A physical process has been disabled." );
1134 " !Photoionization of upper level of [O III] 5007 reached %.2e%% of the radiative lifetime.",
1141 " Photoionization of upper level of [O III] 5007 reached %.2e%% of the radiative lifetime.",
1148 " !Photoionization of upper level of [O III] 4363 reached %.2e%% of the radiative lifetime.",
1155 " Photoionization of upper level of [O III] 4363 reached %.2e%% of the radiative lifetime.",
1169 " !Heating - cooling mismatch =%5.1f%%. Caused by constant temperature assumption. ",
1177 if( error > 0.05 && error < 0.2 )
1179 sprintf( chLine,
" C-Heating - cooling mismatch =%.1f%%. What\'s wrong?",
1183 else if( error >= 0.2 )
1185 sprintf( chLine,
" W-Heating - cooling mismatch =%.2e%%. What\'s wrong????",
1195 " Photoionization of Ca+ 2D level by Ly-alpha reached %6.1f%% of the total rate out.",
1206 " !The excitation temp of Lya exceeded the electron temp, largest value was %.2eK (gas temp there was %.2eK, zone%4ld)",
1216 if(
cdLine(
"Line",0,&SumNeg,&absint)<=0 )
1218 fprintf(
ioQQQ,
" did not get sumneg cdLine\n" );
1224 if(
cdLine(
"TotH",0,&GetHeat,&absint)<=0 )
1226 fprintf(
ioQQQ,
" did not get GetHeat cdLine\n" );
1237 " !Line absorption heating reached %.2f%% of the global heating.",
1241 else if( SumNeg > 0.01 )
1244 " Line absorption heating reached %.2f%% of the global heating.",
1254 " !NO BUFFERING command was entered - this increases exec time by LARGE amounts.");
1265 " !G-bar cooling lines reached %.2f%% of the local cooling. Line=%.10s",
1275 " G-bar cooling lines reached %.2f%% of the local cooling. Line=%.10s",
1284 " !Hyperfine structure line cooling reached %.2f%% of the local cooling.",
1292 " Hyperfine structure line cooling reached %.2f%% of the local cooling.",
1305 " !Line absorption heating reached %.2f%% of the local heating - largest by level%2ld line %.10s",
1313 " Line absorption heating reached %.2f%% of the local heating.",
1321 " !Bound Compton heating reached %.2f%% of the local heating.",
1328 " Bound Compton heating reached %.2f%% of the local heating.",
1336 for( nelem=ipISO; nelem<
LIMELM; ++nelem )
1344 for( ipHi=1; ipHi < nmax - 1; ++ipHi )
1346 for( ipLo=0; ipLo < ipHi; ++ipLo )
1352 if(
iso_sp[ipISO][nelem].trans(ipHi,ipLo).Emis().TauIn() < -0.1 )
1355 " !Some iso-structure lines mased: %s-like %s, line %li-%li had optical depth %.2e",
1378 if(
TauLines[i].EnergyWN() < 10000. )
1380 if(
TauLines[i].Emis().TauIn() > 1. )
1383 alpha =
MAX2(alpha,(
double)
TauLines[i].Emis().TauIn());
1396 " !Some infrared fine structure lines are optically thick: largest tau was %.2e",
1401 if( tauneg < -0.01 )
1404 " !Some fine structure lines mased: line %s had optical depth %.2e",
1416 if(
TauLines[i].EnergyWN() >= 10000. )
1427 if( tauneg < -0.01 )
1430 " !Some level1 lines mased: most negative ion and tau were: %s %.2e",
1441 sprintf( chLine,
" C-I must iterate when SPHERE STATIC is set." );
1449 sprintf( chLine,
" C-I must iterate when save continuum output is done." );
1460 sprintf( chLine,
" !Rate of induced H 2-photon emission reached %.2e s^-1",
1466 sprintf( chLine,
" Rate of induced H 2-photon emission reached %.2e s^-1",
1476 " Induced recombination was %5.1f%% of the total for H level%3ld",
1484 " Stimulated emission was%6.1f%% of the total for H transition%3ld -%3ld",
1491 if(
cdLine(
"Fe 2",1216,&fedest,&absint)<=0 )
1493 fprintf(
ioQQQ,
" Did not find Fe II Lya\n" );
1499 if(
cdLine(
"TOTL",1215.68f,&relhm,&absint)<=0 )
1501 fprintf(
ioQQQ,
" Did not find Lya\n" );
1508 ratio = fedest/(fedest + relhm);
1511 sprintf( chLine,
" !Fe II destruction of Ly-a removed %.1f%% of the line.",
1515 else if( ratio > 0.01 )
1517 sprintf( chLine,
" Fe II destruction of Ly-a removed %.1f%% of the line.",
1523 if(
cdLine(
"H-CT",6563,&relhm,&absint)<=0 )
1525 fprintf(
ioQQQ,
" Comment did not find H-CT H-alpha\n" );
1532 if( relhm/HBeta > 0.01 )
1535 " !Mutual neutralization production of H-alpha was significant." );
1544 " The population of H n=2 reached %.2e relative to the ground state.",
1552 for( nelem=ipISO; nelem <
LIMELM; nelem++ )
1554 if(
iso_sp[ipISO][nelem].CaseBCheck > 1.5 )
1557 " Ratio of computed diffuse emission to case B reached %g for iso %li element %li",
1558 iso_sp[ipISO][nelem].CaseBCheck , ipISO , nelem+1 );
1572 sprintf( chLine,
" W-Electrons were relativistic; High TE=%.2e",
1578 sprintf( chLine,
" C-Electrons were mildly relativistic; High TE=%.2e",
1594 sprintf( chLine,
" !Timescale-photoerosion of Fe=%.2e yr",
1600 sprintf( chLine,
" Timescale-photoerosion of Fe=%.2e yr",
1610 sprintf( chLine,
" Compton heating was %5.1f%% of the total.",
1619 " !Induced Compton heating was %.2e of the total Compton heating.",
1630 " C-Compton cooling is significant and the equilibrium timescale (%.2e s) is longer than the Hubble time.",
1637 " Compton cooling equilibrium timescale (%.2e s) is longer than Hubble time.",
1646 " C-Thermal equilibrium timescale, %.2e s, longer than Hubble time; this cloud is not time-steady.",
1661 " C-Cloud thicker than smallest Jeans length=%8.2ecm; stability problems? (smallest Jeans mass=%8.2eMo)",
1668 " Cloud thicker than smallest Jeans length=%8.2ecm; stability problems? (smallest Jeans mass=%8.2eMo)",
1675 for(
size_t nd=0; nd <
gv.
bin.size(); nd++ )
1677 if(
gv.
bin[nd]->TeGrainMax >
gv.
bin[nd]->Tsublimat )
1680 " W-Maximum temperature of grain%-12.12s was %.2eK, above its sublimation temperature, %.2eK.",
1681 gv.
bin[nd]->chDstLab,
gv.
bin[nd]->TeGrainMax,
1682 gv.
bin[nd]->Tsublimat );
1685 else if(
gv.
bin[nd]->TeGrainMax >
gv.
bin[nd]->Tsublimat* 0.9 )
1688 " C-Maximum temperature of grain%-12.12s was %.2eK, near its sublimation temperature, %.2eK.",
1689 gv.
bin[nd]->chDstLab,
gv.
bin[nd]->TeGrainMax,
1690 gv.
bin[nd]->Tsublimat );
1697 sprintf( chLine,
" !Grain drag force <0." );
1705 " !Grains donated %5.1f%% of the total electrons in some regions.",
1712 " Grains donated %5.1f%% of the total electrons in some regions.",
1721 " !Grains contained %5.1f%% of the total electrons in some regions.",
1728 " Grains contained %5.1f%% of the total electrons in some regions.",
1737 " !Local grain-gas photoelectric heating rate reached %5.1f%% of the total.",
1744 " Local grain-gas photoelectric heating rate reached %5.1f%% of the total.",
1752 " Global grain photoelectric heating of gas was%5.1f%% of the total.",
1758 " !Grain photoelectric heating is VERY important." );
1767 " Local grain-gas cooling of gas rate reached %5.1f%% of the total.",
1778 " !The large H2 molecule - main chemistry network renormalization factor reached %.2f.",
1785 " The large H2 molecule - main chemistry network renormalization factor reached %.2f.",
1795 " !The large H2 molecule - main chemistry network renormalization factor reached %.2f.",
1802 " The large H2 molecule - main chemistry network renormalization factor reached %.2f.",
1812 " !The local H2+ photodissociation heating rate reached %5.1f%% of the total heating.",
1820 " The local H2+ photodissociation heating rate reached %.1f%% of the total heating.",
1829 " !The local H2 photodissociation heating rate reached %.1f%% of the total heating.",
1836 " The local H2 photodissociation heating rate reached %.1f%% of the total heating.",
1845 " !The local H2 cooling rate reached %.1f%% of the local cooling.",
1852 " The local H2 cooling rate reached %.1f%% of the local cooling.",
1860 " Global H2 photodissociation heating of gas was %.1f%% of the total heating.",
1865 sprintf( chLine,
" H2 photodissociation heating is VERY important." );
1874 " !Local CO photodissociation heating rate reached %.1f%% of the total.",
1881 " Local CO photodissociation heating rate reached %.1f%% of the total.",
1889 " Global CO photodissociation heating of gas was %.1f%% of the total.",
1894 sprintf( chLine,
" CO photodissociation heating is VERY important." );
1902 " Energy density of radiation field was greater than the Compton temperature. Is this physical?" );
1909 sprintf( chLine,
" Induced recombination cooling was %.1f%% of the total.",
1917 sprintf( chLine,
" !Free-free heating was %.1f%% of the total.",
1923 sprintf( chLine,
" Free-free heating was %.1f%% of the total.",
1931 sprintf( chLine,
" H- absorption heating was %.1f%% of the total.",
1939 sprintf( chLine,
" Water destruction rate zero." );
1946 sprintf( chLine,
" C-O I negative level populations %ld times.",
1957 for( nelem=0; nelem<
LIMELM; ++nelem )
1985 " !Some hydrogenic lines mased, species was %2s%2ld, smallest tau was %.2e, transition %li-%li",
1987 isav+1,small, imas , j );
1994 sprintf( chLine,
" !Some opacities were negative - the SET NEGOPC command will save which ones." );
2002 for( nelem=0; nelem<
LIMELM; ++nelem )
2021 sprintf( chLine,
" !Some hydrogenic (%2s%2ld) continua optical depths were negative; smallest=%.2e level=%3ld",
2046 sprintf( chLine,
" !Some continuous optical depths <0. The lowest freq was %.3e Ryd, and a total of%4ld",
2049 sprintf( chLine,
" !The smallest optical depth was %.2e",
2057 sprintf( chLine,
" The Balmer continuum optical depth was %.2e.",
2065 sprintf( chLine,
" The Lyman continuum stimulated emission correction to optical depths reached %.2e.",
2071 sprintf( chLine,
" The Balmer continuum stimulated emission correction to optical depths reached %.2e.",
2080 " The Paschen continuum optical depth was %.2e.",
2089 " The continuum optical depth at the lowest energy considered (%.3e Ryd) was %.3e.",
2099 " The optical depth to Rayleigh scattering at 1300A is %.2e",
2107 " !The optical depth to the H2+ molecular ion is %.2e",
2114 " The optical depth to the H2+ molecular ion is %.2e",
2123 " !Optical depth to negative hydrogen ion is %.2e",
2130 " Optical depth to negative hydrogen ion is %.2e",
2141 " 3 body recombination coefficient outside range %ld",
ionbal.
ifail );
2147 " C-3 body recombination coefficient outside range %ld",
ionbal.
ifail );
2155 " !Incident radiation field energy density is less than 2.7K. Add background with CMB command." );
2163 " !The CMB was not included. This is added with the CMB command." );
2171 " !The intensity of the incident radiation field is less than 10 times the Habing diffuse ISM field. Is this OK?" );
2174 " ! Consider adding diffuse ISM emission with TABLE ISM command." );
2185 sprintf( chLine,
" !The C/O abundance ratio, %.1f, is greater than unity. The chemistry will be carbon dominated.",
2191 lgLots_of_moles =
false;
2192 lgLotsSolids =
false;
2200 sprintf( chLine,
" !The fraction of %s in %s reached %.1f%% at some point in the cloud.",
2205 lgLots_of_moles =
true;
2208 lgLotsSolids =
true;
2212 sprintf( chLine,
" The fraction of %s in %s reached %.2f%% at some point in the cloud.",
2217 lgLots_of_moles =
true;
2220 lgLotsSolids =
true;
2224 sprintf( chLine,
" The fraction of %s in %s reached %.3f%% at some point in the cloud.",
2231 lgLotsSolids =
true;
2237 if( lgLots_of_moles )
2247 " C-Molecules are important, but %s, part of the chemistry network, is turned off.",
2253 for( i=NUM_HEAVY_MOLEC+NUM_ELEMENTS; i<NUM_COMOLE_CALC; ++i )
2259 " C-Molecules are important, but %s, part of the chemistry network, is turned off.",
2272 sprintf( chLine,
" !A significant amount of molecules condensed onto grain surfaces." );
2274 sprintf( chLine,
" !These are the molecular species with \"grn\" above." );
2281 sprintf( chLine,
" !The cloud is optically thick at optical wavelengths, extending to %.3e Ryd =%.3eA",
2287 sprintf( chLine,
" The continuum of the computed structure may be optically thick in the near infrared." );
2294 sprintf( chLine,
" Is an outer radius of %.2e reasonable?",
2302 sprintf( chLine,
" Laser maser optical depths capped in RT_line_one_tauinc." );
2309 sprintf( chLine,
" !Line maser set zone thickness in some zones." );
2318 sprintf( chLine,
" Radiation pressure kept below gas pressure on this iteration." );
2327 " !The ratio of radiation to gas pressure reached %.2e at zone %li. Caused by Lyman alpha.",
2335 " !The ratio of radiation to gas pressure reached %.2e at zone %li. "
2336 "Caused by line number %ld, label %s",
2350 " The ratio of radiation to gas pressure reached %.2e at zone %li. Caused by Lyman alpha.",
2358 " The ratio of radiation to gas pressure reached %.2e at zone %li. "
2359 "Caused by line number %ld, label %s",
2370 sprintf( chLine,
" W-The model is optically thick to electron "
2371 "scattering; tau=%.2e Cloudy is NOT intended for this regime.",
2377 sprintf( chLine,
" C-The model is moderately optically thick to electron scattering; tau=%.1f",
2383 sprintf( chLine,
" !The model has modest optical depth to electron scattering; tau=%.2f",
2389 sprintf( chLine,
" The optical depth to electron scattering is %.3f",
2395 if(
HFLines[0].Emis().TauIn() > 0.5 )
2397 sprintf( chLine,
" !The optical depth in the H I 21 cm line is %.2e",
HFLines[0].Emis().TauIn() );
2406 sprintf( chLine,
" !The level2 lines are disabled. UV pumping of excited levels within ground terms is not treated." );
2411 for( nelem=0; nelem <
LIMELM; nelem++ )
2427 " C-This is the last iteration and %2s%2ld Bal(a) optical depth"
2428 " changed by%6.1f%% (was %.2e). Try another iteration.",
2449 " C-This is the last iteration and %2s%2ld Ly(a) optical depth"
2450 " changed by%7.0f%% (was %.2e). Try another iteration.",
2464 sprintf( chLine,
" C-R(out)/R(in)=%.2e and SPHERE was not set.",
2479 sprintf( chLine,
" C-The H Lyman continuum is thin, and I assumed"
2480 " that it was thick. Try another iteration." );
2493 " C-The He II continuum is thin and I assumed that it was thick."
2494 " Try another iteration." );
2506 " C-The He I continuum is thin and I assumed that it was thick."
2507 " Try another iteration." );
2519 fprintf(
ioQQQ,
" colden_old is insane in PrtComment.\n" );
2527 if( differ > 0.1 && differ <= 0.3 )
2530 " The H column density changed by %.2e%% between this and previous iteration.",
2535 else if( differ > 0.3 )
2540 " C-The H column density changed by %.2e%% and this is the last iteration. What happened?",
2547 " !The H column density changed by %.2e%% What happened?",
2559 if( differ > 0.1 && differ <= 0.3 )
2562 " The H2 column density changed by %.2e%% between this and previous iteration.",
2567 else if( differ > 0.3 )
2572 " C-The H2 column density changed by %.2e%% and this is the last iteration. What happened?",
2579 " !The H2 column density changed by %.2e%% What happened?",
2595 sprintf( chLine,
" C-This is the last iteration, radiation pressure was significant, and the L-a optical depth changed by %7.2f%% (was %.2e)",
2606 sprintf( chLine,
" C-The Lya optical depth scale was overrun and this is the last iteration - Tspin(21 cm) is not valid." );
2608 sprintf( chLine,
" C-Another iteration is needed for Tspin(21 cm) to be valid." );
2615 sprintf( chLine,
" Line radiation pressure capped by thermalization length." );
2626 _o = sprintf( chLine,
" There were %ld minor temperature failures. zones:",
2630 for( i=0; i < nline; i++ )
2632 _o += sprintf( chLine+_o,
" %ld",
conv.
ifailz[i] );
2638 _o = sprintf( chLine,
2639 " !There were %ld temperature failures, and some were large. The largest was %.1f%%. What happened?",
2645 _o = sprintf( chLine ,
" !The zones were" );
2646 for( i=0; i < nline; i++ )
2648 _o += sprintf( chLine+_o,
" %ld",
conv.
ifailz[i] );
2654 sprintf( chLine,
" !I think they may have been caused by the change from hot to nebular gas phase. The physics of this is unclear." );
2663 for( i=1; i <
nzone; i++ )
2666 if( big > big_ion_jump )
2673 if( big_ion_jump > 0.2 )
2678 fprintf(
ioQQQ,
" j too small big jump check\n" );
2683 if( big_ion_jump > 0.4 )
2685 sprintf( chLine,
" C-A temperature discontinuity occurred at zone %ld from %.2eK to %.2eK.",
2694 sprintf( chLine,
" C-This was probably due to a thermal front." );
2698 else if( big_ion_jump > 0.2 )
2700 sprintf( chLine,
" !A temperature discontinuity occurred at zone %ld from %.2eK to %.2eK.",
2709 sprintf( chLine,
" !This was probably due to a thermal front." );
2722 sprintf( chLine,
" W-The local error in the electron density reached %.1f%% at zone %ld",
2728 sprintf( chLine,
" C-The local error in the electron density reached %.1f%% at zone %ld",
2734 sprintf( chLine,
" The local error in the electron density reached %.1f%% at zone %ld",
2743 for( i=1; i < (
nzone - 1); i++ )
2752 if( rel < 0. &&
MIN2( bigm , big ) > big_ion_jump )
2755 big_ion_jump =
MIN2( bigm , big );
2759 if( big_ion_jump > 0.1 )
2764 fprintf(
ioQQQ,
" j too small bigjump2 check\n" );
2769 if( big_ion_jump > 0.3 )
2772 " C-A temperature oscillation occurred at zone%4ld by%5.0f%% from %.2e to %.2e to %.2e",
2776 else if( big_ion_jump > 0.1 )
2779 " !A temperature oscillation occurred at zone%4ld by%5.0f%% from %.2e to %.2e to %.2e",
2790 for( i=1; i < (
nzone - 1); i++ )
2798 if( big*bigm < 0. &&
2813 fprintf(
ioQQQ,
" j too small bigjump3 check\n" );
2820 sprintf( chLine,
" C-An electron density oscillation occurred at zone%4ld by%5.0f%% from %.2e to %.2e to %.2e",
2827 sprintf( chLine,
" !An electron density oscillation occurred at zone%4ld by%5.0f%% from %.2e to %.2e to %.2e",
2846 i =
cdLine(
"Unit" , 1 , &rate , &absint );
2870 error = fabs(VolComputed - VolExpected)/
SDIV(VolExpected);
2880 if( error > 0.001 && !
lgAbort )
2883 " W-PrtComment insanity - Line unit integration did not verify \n");
2886 " PROBLEM PrtComment insanity - Line unit integration did not verify \n");
2888 " expected, derived vols were %g %g \n",
2889 VolExpected , VolComputed );
2891 " relative difference is %g, ratio is %g.\n",error,VolComputed/VolExpected);
2923 ASSERT( ConExpected > 0. );
2926 error = fabs(ConComputed - ConExpected)/ConExpected;
2941 if( error > 0.001 && !
lgAbort)
2944 " W-PrtComment insanity - Continuum unit integration did not verify \n");
2946 fprintf(
ioQQQ,
" PROBLEM PrtComment insanity - Continuum unit integration did not verify \n");
2947 fprintf(
ioQQQ,
" exact vol= %g, derived vol= %g relative difference is %g \n",
2948 ConExpected , ConComputed ,error);
2949 fprintf(
ioQQQ,
" ConInterOut= %g, \n",
2955 cdNwcns(&lgAbort_flag,&nw,&nc,&nn,&ns,&i,&j,&dum1,&dum2);
2984 fprintf(
ioQQQ,
" PrtComment returns.\n" );
3013 conalog = sqrt(
MAX2(1., conalog));
3014 conca =
MAX2(conalog,conca);
3017 conalog = sqrt(
MAX2(1.,conalog));
3019 conhe =
MAX2(conalog, conhe);
3021 *totwid = 10.*conhe + 1.6*conca;
3036 double BigOscillation ,
3048 nzone_oscillation = 0;
3055 for( ion=0; ion<=nelem+1; ++ion)
3057 BigOscillation = 0.;
3058 big_ion_jump = -15.;
3077 if( rel < 0. &&
MIN2( bigm , big ) > BigOscillation )
3079 nzone_oscillation = i;
3080 BigOscillation =
MIN2( bigm , big );
3089 if( rel > big_ion_jump )
3099 if( BigOscillation > 0.2 )
3102 if( nzone_oscillation < 1 )
3104 fprintf(
ioQQQ,
" nzone_oscillation too small bigjump2 check\n" );
3108 if( BigOscillation > 3. )
3111 " W-An ionization oscillation occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3114 BigOscillation*100.,
3121 else if( BigOscillation > 0.7 )
3124 " C-An ionization oscillation occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3127 BigOscillation*100.,
3133 else if( BigOscillation > 0.2 )
3136 " !An ionization oscillation occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3139 BigOscillation*100.,
3149 big_ion_jump = pow(10., big_ion_jump );
3150 if( big_ion_jump > 1.5 && nzone_ion_jump > 0 )
3152 if( big_ion_jump > 10. )
3155 " C-An ionization jump occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3167 " !An ionization jump occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3191 if( rel > big_jump )
3199 big_jump = pow( 10., big_jump );
3200 if( big_jump > 1.2 )
3205 " C-The H density jumped at by %.0f%% at zone %ld, from %.2e to %.2e to %.2e",
3216 " !An H density jump occurred at zone %ld, by %.0f%% from %.2e to %.2e to %.2e",
3239 if( rel > big_jump )
3250 big_jump = pow( 10., big_jump );
3251 if( big_jump > 1.2 )
3258 " C-The radiation pressure jumped by %.0f%% at zone %ld, from %.2e to %.2e to %.2e",
3269 " !The radiation pressure jumped by %.0f%% at zone %ld, from %.2e to %.2e to %.2e",
3350 " C-The temperature varied by %.1f%% between two zones",
3357 " !The temperature varied by %.1f%% between two zones",
3365 " C-The electron density varied by %.1f%% between two zones",
3372 " !The electron density varied by %.1f%% between two zones",
3380 " C-The H2 density varied by %.1f%% between two zones",
3387 " !The H2 density varied by %.1f%% between two zones",
3395 " C-The CO density varied by %.1f%% between two zones",
3402 " !The CO density varied by %.1f%% between two zones",
const double DEPTH_OFFSET
const int INPUT_LINE_LENGTH
NORETURN void TotalInsanity(void)
sys_float SDIV(sys_float x)
#define DEBUG_ENTRY(funcname)
double powi(double, long int)
void cdCautions(FILE *ioOUT)
void cdSurprises(FILE *ioOUT)
void cdNotes(FILE *ioOUT)
void cdNwcns(bool *lgAbort_ret, long int *NumberWarnings, long int *NumberCautions, long int *NumberNotes, long int *NumberSurprises, long int *NumberTempFailures, long int *NumberPresFailures, long int *NumberIonFailures, long int *NumberNeFailures)
void cdWarnings(FILE *ioPNT)
long int cdLine(const char *chLabel, realnum wavelength, double *relint, double *absint)
void cdReasonGeo(FILE *ioOUT)
static t_version & Inst()
EmissionList::reference Emis() const
TransitionProxy trans(const long ipHi, const long ipLo)
long int n_HighestResolved_local
vector< two_photon > TwoNu
multi_arr< long, 3 > QuantumNumbers2Index
long int nCollapsed_local
bool lgCritDensLMix[NISO]
valarray< class molezone > species
t_elementnames elementnames
diatomics h2("h2", 4100., &hmi.H2_total, Yan_H2_CS)
t_iso_sp iso_sp[NISO][LIMELM]
const TransitionProxy FndLineHt(long int *level)
t_mole_global mole_global
molecule * findspecies(const char buf[])
UNUSED const double SOLAR_MASS
UNUSED const double RYDLAM
t_secondaries secondaries
bool lgStatic(void) const
bool lgBallistic(void) const
char chReasonStop[nCHREASONSTOP]
bool lgHCaseBOK[2][HS_NZ]
realnum colden_old[NCOLD]
bool lgCoStarInterpolationCaution
char chNotConverged[INPUT_LINE_LENGTH]
realnum gas_phase[LIMELM]
bool lgTimeDependentStatic
char chElementSym[LIMELM][CHARS_ELEMENT_SYM]
char chElementNameShort[LIMELM][CHARS_ELEMENT_NAME_SHORT]
char chElementName[LIMELM][CHARS_ELEMENT_NAME]
double frac_he0dest_23S_photo
const double TEMP_STOP_DEFAULT
realnum * pres_radiation_lines_curr
bool lgTemperatureConstant
char chCoolHeatMax[NCOLNT_LAB_LEN+1]
char chRgcln[2][INPUT_LINE_LENGTH]
TransitionList TauLine2("TauLine2", &AnonStates)
TransitionList HFLines("HFLines", &AnonStates)
TransitionList TauLines("TauLines", &AnonStates)
char * chLineLbl(const TransitionProxy &t)
void caunin(char *chLine)
void warnin(char *chLine)
void bangin(char *chLine)
void notein(char *chLine)