136 double VolComputed , VolExpected , ConComputed , ConExpected;
149 fprintf(
ioQQQ,
" PrtComment called.\n" );
165 " !This is beta test version %ld and is intended for testing only.",
175 sprintf( chLine,
" !The code needs to be fixed - search for fixit()." );
184 sprintf( chLine,
" !New code needs to be reviewed - search for CodeReview()." );
192 sprintf(
warnings.
chRgcln[0],
" W-Calculation stopped because %s Iteration%3ld of %ld",
194 sprintf( chLine,
" W-Calculation stopped because %s",
197 sprintf( chLine,
" W-This was not intended." );
207 " Calculation stopped because %s Iteration %ld of %ld, not converged due to %s",
216 " Calculation stopped because %s Iteration %ld of %ld",
227 " W-Calculation stopped because default number of zones reached. Was this intended???" );
230 " W-Default limit can be increased while retaining this check with the SET NEND command." );
241 " W-Calculation stopped zone thickness became too thin. This was not intended." );
244 " W-The most likely reason was an uncontrolled oscillation." );
252 " W-This happened because the globule scale became very small relative to the depth." );
255 " W-This problem is described in Hazy." );
275 else if( rel >= 0.1 && rel < 3. )
293 sprintf( chLine,
" W-The code is broken - search for broken()." );
302 sprintf( chLine,
" C-The assumed electron density was incorrect for the last zone." );
304 sprintf( chLine,
" C-Did a temperature discontinuity occur??" );
309 sprintf( chLine,
" W-The assumed electron density was incorrect during the calculation. This is bad." );
318 sprintf( chLine,
" W-The calculation aborted. Something REALLY went wrong!" );
325 sprintf( chLine,
" !The thermal map had changes in slope - check map output." );
333 sprintf( chLine,
" !Fudge factors were used or were checked. Why?" );
341 sprintf( chLine,
" C-Density greater than 10**15, heavy elements are very uncertain." );
346 sprintf( chLine,
" C-Density greater than 10**13" );
352 if(
cdLine(
"Pump",4861.36f,&relfl,&absint)<=0 )
354 fprintf(
ioQQQ,
" PROBLEM Did not find Pump H-beta\n" );
362 if(
cdLine(
"H 1",4861.36f,&HBeta,&absint)<=0 )
364 fprintf(
ioQQQ,
" NOTE Did not find H 1 H-beta - set intensity to unity, "
365 "will not check on importance of H 1 pumping.\n" );
377 sprintf( chLine,
" !Continuum fluorescent production of H-beta was very important." );
380 else if(flur > 0.01 )
382 sprintf( chLine,
" Continuum fluorescent production of H-beta was significant." );
391 sprintf( chLine,
" C-Wind velocity below sonic point; solution is not valid." );
399 if( fabs(1.-rel)> 0.02 )
401 sprintf( chLine,
" C-Wind mass flux error is %g%%",fabs(1.-rel)*100. );
403 fprintf(
ioQQQ,
"DEBUG emdot\t%.3e\t%.3e\t%.3e\t%.3e\n",
416 outsum(&outtot,&outin,&outout);
418 sum_recom_lines =
totlin(
'r');
419 if( sum_recom_lines == 0. )
421 sprintf( chLine,
" !Total recombination line energy is 0." );
426 sum_coolants =
totlin(
'c');
427 if( sum_coolants == 0. )
429 sprintf( chLine,
" !Total cooling is zero." );
453 " W-Radiated luminosity (cool+rec+wind=%.2e+%.2e+%.2e) is greater than that in incident radiation (TotalLumin=%8.2e). Power radiated was %8.2e",
457 fprintf(
ioQQQ,
"\n\n DISASTER This calculation DID NOT CONSERVE ENERGY!\n\n\n" );
461 fprintf(
ioQQQ,
"\n The CASE B command was entered - this can have unphysical effects, including non-conservation of energy.\n Why was it needed?\n\n" );
466 sprintf( chLine,
" W-Something is really wrong: the ratio of radiated to incident luminosity is %.2e.",
473 fprintf(
ioQQQ,
" This may have been caused by the FORCE TE command.\n" );
474 fprintf(
ioQQQ,
" Remove it and run again.\n" );
489 " !Magnetic field & cosmic rays both present. Their interactions are not treated." );
497 " !Background cosmic rays are not included - is this physical? It affects the chemistry." );
505 " C-Model is thick to cosmic rays, which are on." );
513 " !Ionization rate fell below background cosmic ray ionization rate. Should this be added too?" );
516 " ! Use the COSMIC RAY BACKGROUND command." );
523 sprintf( chLine,
" !Test code is in place." );
531 " !Compton cooling rate underflows to zero. Is this important?" );
539 " !Some input lines contained underscores, these were changed to spaces." );
547 " !Some input lines contained [ or ], these were changed to spaces." );
555 " !There is no hydrogen-ionizing radiation. Was this intended?" );
563 " Derivative of net cooling negative and so possibly thermally unstable in%4ld zones.",
573 " !A large fraction of the zones were possibly thermally unstable,%4ld out of%4ld",
582 " !Negative cooling reached %6.1f%% of the local heating, due to %4.4s %.1f",
589 " Negative cooling reached %6.1f%% of the local heating, due to %4.4s %.2f",
598 " !Advection heating reached %.2f%% of the local heating.",
605 " Advection heating reached %.2f%% of the local heating.",
614 " !Advection cooling reached %.2f%% of the local cooling.",
621 " Advection cooling reached %.2f%% of the local heating.",
633 " W-Time dependent ionization front cannot now handle strong-R cases - the ionization parameter is too large." );
639 " C-Time dependent ionization front cannot now handle strong-R cases - the ionization parameter is too large." );
648 " !Thermal collisional ionization of H reached %.2f%% of the local ionization rate.",
655 " Thermal collisional ionization of H reached %.2f%% of the local ionization rate.",
664 " Te-ne bounds of Case B lookup table exceeded, H I Case B line intensities set to zero." );
670 " Te-ne bounds of Case B lookup table exceeded, He II Case B line intensities set to zero." );
678 " !Suprathermal collisional ionization of H reached %.2f%% of the local H ionization rate.",
685 " Suprathermal collisional ionization of H reached %.2f%% of the local H ionization rate.",
694 " !H2 vib deexec heating reached %.2f%% of the local heating.",
701 " H2 vib deexec heating reached %.2f%% of the local heating.",
710 " !H2 deexec cooling reached %.2f%% of the local heating.",
717 " H2 deexec cooling reached %.2f%% of the local heating.",
726 " !Charge transfer ionization of H reached %.1f%% of the local H ionization rate.",
733 " Charge transfer ionization of H reached %.2f%% of the local H ionization rate.",
742 " !Charge transfer heating reached %.2f%% of the local heating.",
749 " Charge transfer heating reached %.2f%% of the local heating.",
757 " !Charge transfer cooling reached %.2f%% of the local heating.",
764 " Charge transfer cooling reached %.2f%% of the local heating.",
773 " !Photoionization of upper level of Mg II 2798 reached %.1f%% of the total Mg+ photo rate.",
780 " Photoionization of upper level of Mg II 2798 reached %.1f%% of the total Mg+ photo rate.",
789 " !Photoionization of upper levels of [O I] reached %.1f%% of the total O destruction rate.",
796 " Photoionization of upper levels of [O I] reached %.1f%% of the total O destruction rate.",
805 " !Photoionization of upper levels of [O III] reached %.1f%% of the total O++ photo rate.",
812 " Photoionization of upper levels of [O III] reached %.1f%% of the total O++ photo rate.",
821 " !Destruction of He 2TriS reached %.1f%% of the total He0 dest rate"
822 " at zone %li, %.1f%% of that was photoionization.",
831 " Destruction of He 2TriS reached %.1f%% of the total He0 dest rate"
832 " at zone %li, %.1f%% of that was photoionization.",
845 " The density is too low to l-mix the lowest %s I collapsed level. "
846 " More resolved levels are needed for accurate line ratios.",
855 for( nelem=ipISO; nelem<
LIMELM; ++nelem )
859 sprintf( chLine,
" !Continuum was lowered into model %s-like %s due to high density. Highest n is %li",
867 sprintf( chLine,
" !Continuum was lowered into model %s-like %s due to high density at SOME point but NOT at the last zone.",
879 " C-Continuum not defined in extreme infrared - Compton scat, grain heating, not treated properly?" );
886 " C-Continuum not defined at photon energies which ionize excited states of H, important for H- and ff heating." );
893 " C-Continuum not defined at X-Ray energies - Compton scattering and Auger ionization wrong?" );
900 " C-Continuum not defined at gamma-ray energies - pair production and Compton scattering OK?" );
906 sprintf( chLine,
" C-Continuum zero at some energies." );
912 sprintf( chLine ,
" C-CoStarInterpolate interpolated between non-adjoining tracks, this may not be valid." );
919 " !The continuum occupation number at 1 Ryd is greater than unity." );
927 " C-The thickness of the first zone was set larger than optimal by a SET DR command." );
933 " C-Consider using the STOP THICKNESS command instead." );
938 if(
cdLine(
"TOTL",4363,&t4363,&absint)<=0 )
940 fprintf(
ioQQQ,
" PrtComment could not find total O III 4363 with cdLine.\n" );
945 if(
cdLine(
"Coll",4363,&c4363,&absint)<=0 )
947 fprintf(
ioQQQ,
" PrtComment could not find collisional O III 4363 with cdLine.\n" );
958 ratio = (t4363 - c4363)/t4363;
962 " !Non-collisional excitation of [O III] 4363 reached %.2f%% of the total.",
966 else if( ratio > 0.001 )
969 " Non-collisional excitation of [O III] 4363 reached %.2f%% of the total.",
980 " !The largest plasma frequency was %.2e Ryd = %.2e micron The continuum is set to 0 below this.",
992 " !The largest continuum occupation number was %.3e at %.3e Ryd.",
1001 " The largest continuum occupation number was %.3e at %.3e Ryd.",
1013 " The continuum occupation number fell below 1 at %.3e microns.",
1020 " The continuum occupation number fell below 1 at %.3e Angstroms.",
1027 " The continuum occupation number fell below 1 at %.3e Ryd.",
1036 " !The largest continuum brightness temperature was %.3eK at %.3e Ryd.",
1047 " The continuum brightness temperature fell below 10,000K at %.3e microns.",
1054 " The continuum brightness temperature fell below 10,000K at %.3e Angstroms.",
1061 " The continuum brightness temperature fell below 10,000K at %.3e Ryd.",
1071 " !Both constant pressure and turbulence makes no physical sense???" );
1079 " !Both constant pressure and a filling factor makes no physical sense???" );
1087 " !Grains are present, but the gas phase abundances were left at the solar default. This is not physical." );
1095 " !Grains are not present, but the gas phase abundances were depleted. This is not physical." );
1101 long nBin=0L,nFail=0L;
1102 for( nd=0; nd <
gv.
nBin; nd++ )
1113 " !The grain quantum heating treatment failed to converge %ld time(s) in %ld bin(s).", nFail, nBin );
1124 bool lgPAHsPresent_and_constant =
false;
1125 for( nd=0; nd <
gv.
nBin; nd++ )
1127 lgPAHsPresent_and_constant = lgPAHsPresent_and_constant ||
1131 if( lgPAHsPresent_and_constant )
1134 " C-PAH's were present in the ionized region, this has never been observed in H II regions." );
1144 " C-The continuum energy density temperature (%g K)"
1145 " is greater than the electron temperature (%g K).",
1148 sprintf( chLine,
" C-This is unphysical." );
1156 " Grains were not present but might survive in this environment (energy density temperature was %.2eK)",
1169 sprintf( chLine,
" H-eps and Ca H overlap." );
1176 sprintf( chLine,
" !A physical process has been disabled." );
1186 " !Photoionization of upper level of [O III] 5007 reached %.2e%% of the radiative lifetime.",
1193 " Photoionization of upper level of [O III] 5007 reached %.2e%% of the radiative lifetime.",
1200 " !Photoionization of upper level of [O III] 4363 reached %.2e%% of the radiative lifetime.",
1207 " Photoionization of upper level of [O III] 4363 reached %.2e%% of the radiative lifetime.",
1221 " !Heating - cooling mismatch =%5.1f%%. Caused by constant temperature assumption. ",
1229 if( error > 0.05 && error < 0.2 )
1231 sprintf( chLine,
" C-Heating - cooling mismatch =%.1f%%. What\'s wrong?",
1235 else if( error >= 0.2 )
1237 sprintf( chLine,
" W-Heating - cooling mismatch =%.2e%%. What\'s wrong????",
1247 " Photoionization of Ca+ 2D level by Ly-alpha reached %6.1f%% of the total rate out.",
1258 " !The excitation temp of Lya exceeded the electron temp, largest value was %.2eK (gas temp there was %.2eK, zone%4ld)",
1268 if(
cdLine(
"Line",0,&SumNeg,&absint)<=0 )
1270 fprintf(
ioQQQ,
" did not get sumneg cdLine\n" );
1276 if(
cdLine(
"TotH",0,&GetHeat,&absint)<=0 )
1278 fprintf(
ioQQQ,
" did not get GetHeat cdLine\n" );
1289 " !Line absorption heating reached %.2f%% of the global heating.",
1293 else if( SumNeg > 0.01 )
1296 " Line absorption heating reached %.2f%% of the global heating.",
1306 " !NO BUFFERING command was entered - this increases exec time by LARGE amounts.");
1317 " !G-bar cooling lines reached %.2f%% of the local cooling. Line=%.10s",
1327 " G-bar cooling lines reached %.2f%% of the local cooling. Line=%.10s",
1336 " !Hyperfine structure line cooling reached %.2f%% of the local cooling.",
1344 " Hyperfine structure line cooling reached %.2f%% of the local cooling.",
1378 fprintf(
ioQQQ,
" PrtComment has insane levlmax,=%5ld\n",
1382 " !Line absorption heating reached %.2f%% of the local heating - largest by level%2ld line %.10s",
1390 " Line absorption heating reached %.2f%% of the local heating.",
1398 " !Bound Compton heating reached %.2f%% of the local heating.",
1405 " Bound Compton heating reached %.2f%% of the local heating.",
1413 for( nelem=ipISO; nelem<
LIMELM; ++nelem )
1421 for( ipHi=1; ipHi < nmax - 1; ++ipHi )
1423 for( ipLo=0; ipLo < ipHi; ++ipLo )
1429 if(
Transitions[ipISO][nelem][ipHi][ipLo].Emis->TauIn < -0.1 )
1432 " !Some iso-structure lines mased: %s-like %s, line %li-%li had optical depth %.2e",
1436 Transitions[ipISO][nelem][ipHi][ipLo].Emis->TauIn );
1455 if(
TauLines[i].EnergyWN < 10000. )
1473 " !Some infrared fine structure lines are optically thick: largest tau was %.2e",
1478 if( tauneg < -0.01 )
1481 " !Some fine structure lines mased: line %s had optical depth %.2e",
1493 if(
TauLines[i].EnergyWN >= 10000. )
1504 if( tauneg < -0.01 )
1507 " !Some level1 lines mased: most negative ion and tau were: %s %.2e",
1518 sprintf( chLine,
" C-I must iterate when SPHERE STATIC is set." );
1526 sprintf( chLine,
" C-I must iterate when punch continuum output is done." );
1535 sprintf( chLine,
" !Rate of induced H 2-photon emission reached %.2e s^-1",
1542 sprintf( chLine,
" Rate of induced H 2-photon emission reached %.2e s^-1",
1551 " Induced recombination was %5.1f%% of the total for H level%3ld",
1559 " Stimulated emission was%6.1f%% of the total for H transition%3ld -%3ld",
1566 if(
cdLine(
"Fe 2",1216,&fedest,&absint)<=0 )
1568 fprintf(
ioQQQ,
" Did not find Fe II Lya\n" );
1574 if(
cdLine(
"TOTL",1216,&relhm,&absint)<=0 )
1576 fprintf(
ioQQQ,
" Did not find Lya\n" );
1583 ratio = fedest/(fedest + relhm);
1586 sprintf( chLine,
" !Fe II destruction of Ly-a removed %.1f%% of the line.",
1590 else if( ratio > 0.01 )
1592 sprintf( chLine,
" Fe II destruction of Ly-a removed %.1f%% of the line.",
1598 if(
cdLine(
"H-CT",6563,&relhm,&absint)<=0 )
1600 fprintf(
ioQQQ,
" Comment did not find H-CT H-alpha\n" );
1607 if( relhm/HBeta > 0.01 )
1610 " !Mutual neutralization production of H-alpha was significant." );
1619 " The population of H n=2 reached %.2e relative to the ground state.",
1627 for( nelem=0; nelem <
LIMELM; nelem++ )
1632 " Ratio of computed diffuse emission to case B reached %g for iso %li element %li",
1647 sprintf( chLine,
" W-Electrons were relativistic; High TE=%.2e",
1653 sprintf( chLine,
" C-Electrons were mildly relativistic; High TE=%.2e",
1669 sprintf( chLine,
" !Timescale-photoerosion of Fe=%.2e yr",
1675 sprintf( chLine,
" Timescale-photoerosion of Fe=%.2e yr",
1685 sprintf( chLine,
" Compton heating was %5.1f%% of the total.",
1694 " !Induced Compton heating was %.2e of the total Compton heating.",
1705 " C-Compton cooling is significant and the equilibrium timescale (%.2e s) is longer than the Hubble time.",
1712 " Compton cooling equilibrium timescale (%.2e s) is longer than Hubble time.",
1721 " C-Thermal equilibrium timescale, %.2e s, longer than Hubble time; this cloud is not time-steady.",
1736 " C-Cloud thicker than smallest Jeans length=%8.2ecm; stability problems? (smallest Jeans mass=%8.2eMo)",
1743 " Cloud thicker than smallest Jeans length=%8.2ecm; stability problems? (smallest Jeans mass=%8.2eMo)",
1750 for( nd=0; nd <
gv.
nBin; nd++ )
1755 " W-Maximum temperature of grain%-12.12s was %.2eK, above its sublimation temperature, %.2eK.",
1763 " C-Maximum temperature of grain%-12.12s was %.2eK, near its sublimation temperature, %.2eK.",
1772 sprintf( chLine,
" !Grain drag force <0." );
1780 " !Grains donated %5.1f%% of the total electrons in some regions.",
1787 " Grains donated %5.1f%% of the total electrons in some regions.",
1796 " !Grains contained %5.1f%% of the total electrons in some regions.",
1803 " Grains contained %5.1f%% of the total electrons in some regions.",
1812 " !Local grain-gas photoelectric heating rate reached %5.1f%% of the total.",
1819 " Local grain-gas photoelectric heating rate reached %5.1f%% of the total.",
1827 " Global grain photoelectric heating of gas was%5.1f%% of the total.",
1833 " !Grain photoelectric heating is VERY important." );
1842 " Local grain-gas cooling of gas rate reached %5.1f%% of the total.",
1853 " !The large H2 molecule - main chemistry network renormalization factor reached %.2f.",
1860 " The large H2 molecule - main chemistry network renormalization factor reached %.2f.",
1870 " !The large H2 molecule - main chemistry network renormalization factor reached %.2f.",
1877 " The large H2 molecule - main chemistry network renormalization factor reached %.2f.",
1887 " !The local H2+ photodissociation heating rate reached %5.1f%% of the total heating.",
1895 " The local H2+ photodissociation heating rate reached %.1f%% of the total heating.",
1904 " !The local H2 photodissociation heating rate reached %.1f%% of the total heating.",
1911 " The local H2 photodissociation heating rate reached %.1f%% of the total heating.",
1920 " !The local H2 cooling rate reached %.1f%% of the local cooling.",
1927 " The local H2 cooling rate reached %.1f%% of the local cooling.",
1935 " Global H2 photodissociation heating of gas was %.1f%% of the total heating.",
1940 sprintf( chLine,
" H2 photodissociation heating is VERY important." );
1949 " !Local CO photodissociation heating rate reached %.1f%% of the total.",
1956 " Local CO photodissociation heating rate reached %.1f%% of the total.",
1968 " C-Local CO cooling reached %.1f%% of the local cooling, but the CO molecule was too small.",
1972 " C-Increase size with ATOM CO LEVELS xxx command. There were %li levels.",
1980 " Local CO rotation cooling reached %.1f%% of the local cooling.",
1989 " Global CO photodissociation heating of gas was %.1f%% of the total.",
1994 sprintf( chLine,
" CO photodissociation heating is VERY important." );
2002 " Energy density of radiation field was greater than the Compton temperature. Is this physical?" );
2009 sprintf( chLine,
" Induced recombination cooling was %.1f%% of the total.",
2017 sprintf( chLine,
" !Free-free heating was %.1f%% of the total.",
2023 sprintf( chLine,
" Free-free heating was %.1f%% of the total.",
2031 sprintf( chLine,
" H- absorption heating was %.1f%% of the total.",
2039 sprintf( chLine,
" Water destruction rate zero." );
2046 sprintf( chLine,
" C-O I negative level populations %ld times.",
2057 for( nelem=0; nelem<
LIMELM; ++nelem )
2085 " !Some hydrogenic lines mased, species was %2s%2ld, smallest tau was %.2e, transition %li-%li",
2087 isav+1,small, imas , j );
2094 sprintf( chLine,
" !Some opacities were negative - the SET NEGOPC command will punch which ones." );
2102 for( nelem=0; nelem<
LIMELM; ++nelem )
2121 sprintf( chLine,
" !Some hydrogenic (%2s%2ld) continua optical depths were negative; smallest=%.2e level=%3ld",
2146 sprintf( chLine,
" !Some continuous optical depths <0. The lowest freq was %.3e Ryd, and a total of%4ld",
2149 sprintf( chLine,
" !The smallest optical depth was %.2e",
2157 sprintf( chLine,
" The Balmer continuum optical depth was %.2e.",
2165 sprintf( chLine,
" The Lyman continuum stimulated emission correction to optical depths reached %.2e.",
2171 sprintf( chLine,
" The Balmer continuum stimulated emission correction to optical depths reached %.2e.",
2180 " The Paschen continuum optical depth was %.2e.",
2189 " The continuum optical depth at the lowest energy considered (%.3e Ryd) was %.3e.",
2199 " The optical depth to Rayleigh scattering at 1300A is %.2e",
2207 " !The optical depth to the H2+ molecular ion is %.2e",
2214 " The optical depth to the H2+ molecular ion is %.2e",
2223 " !Optical depth to negative hydrogen ion is %.2e",
2230 " Optical depth to negative hydrogen ion is %.2e",
2241 " 3 body recombination coefficient outside range %ld",
ionbal.
ifail );
2247 " C-3 body recombination coefficient outside range %ld",
ionbal.
ifail );
2255 " !Incident radiation field energy density is less than 2.7K. Add background with CMB command." );
2263 " !The CMB was not included. This is added with the CMB command." );
2271 " !The intensity of the incident radiation field is less than 10 times the Habing diffuse ISM field. Is this OK?" );
2274 " ! Consider adding diffuse ISM emission with TABLE ISM command." );
2285 sprintf( chLine,
" !The C/O abundance ratio, %.1f, is greater than unity. The chemistry will be carbon dominated.",
2294 sprintf( chLine,
" !The fraction of %s in %s reached %.1f%% at some point in the cloud.",
2302 sprintf( chLine,
" The fraction of %s in %s reached %.2f%% at some point in the cloud.",
2310 sprintf( chLine,
" The fraction of %s in %s reached %.3f%% at some point in the cloud.",
2317 lgLots_of_moles =
false;
2318 lgLotsSolids =
false;
2322 if(
COmole[i]->n_nuclei <= 1)
2325 if(
COmole[i]->xMoleFracMax > 0.1 )
2327 sprintf( chLine,
" !The fraction of %s in %s reached %.1f%% at some point in the cloud.",
2332 lgLots_of_moles =
true;
2334 if( !
COmole[i]->lgGas_Phase )
2335 lgLotsSolids =
true;
2337 else if(
COmole[i]->xMoleFracMax>0.01 )
2339 sprintf( chLine,
" The fraction of %s in %s reached %.2f%% at some point in the cloud.",
2344 lgLots_of_moles =
true;
2346 if( !
COmole[i]->lgGas_Phase )
2347 lgLotsSolids =
true;
2349 else if(
COmole[i]->xMoleFracMax > 1e-3 )
2351 sprintf( chLine,
" The fraction of %s in %s reached %.3f%% at some point in the cloud.",
2357 if( !
COmole[i]->lgGas_Phase )
2358 lgLotsSolids =
true;
2363 if( lgLots_of_moles )
2373 " C-Molecules are important, but %s, part of the chemistry network, is turned off.",
2379 for( i=NUM_HEAVY_MOLEC+NUM_ELEMENTS; i<NUM_COMOLE_CALC; ++i )
2381 if( nelem==
COmole[i].nelem_hevmol )
2385 " C-Molecules are important, but %s, part of the chemistry network, is turned off.",
2399 sprintf( chLine,
" !A significant amount of molecules condensed onto grain surfaces." );
2401 sprintf( chLine,
" !These are the molecular species with \"grn\" above." );
2408 sprintf( chLine,
" !The cloud is optically thick at optical wavelengths, extending to %.3e Ryd =%.3eA",
2414 sprintf( chLine,
" The continuum of the computed structure may be optically thick in the near infrared." );
2421 sprintf( chLine,
" Is an outer radius of %.2e reasonable?",
2429 sprintf( chLine,
" Laser maser optical depths capped in RT_line_one_tauinc." );
2436 sprintf( chLine,
" !Line maser set zone thickness in some zones." );
2445 sprintf( chLine,
" Radiation pressure kept below gas pressure on this iteration." );
2454 " !The ratio of radiation to gas pressure reached %.2e at zone %li. Caused by Lyman alpha.",
2462 " !The ratio of radiation to gas pressure reached %.2e at zone %li. "
2463 "Caused by line number %ld, label %s",
2477 " The ratio of radiation to gas pressure reached %.2e at zone %li. Caused by Lyman alpha.",
2485 " The ratio of radiation to gas pressure reached %.2e at zone %li. "
2486 "Caused by line number %ld, label %s",
2497 sprintf( chLine,
" W-The model is optically thick to electron scattering; tau=%.2e",
2503 sprintf( chLine,
" C-The model is moderately optically thick to electron scattering; tau=%.1f",
2509 sprintf( chLine,
" !The model has modest optical depth to electron scattering; tau=%.2f",
2515 sprintf( chLine,
" The optical depth to electron scattering is %.3f",
2521 if(
HFLines[0].Emis->TauIn > 0.5 )
2523 sprintf( chLine,
" !The optical depth in the H I 21 cm line is %.2e",
HFLines[0].Emis->TauIn );
2530 sprintf( chLine,
" !The optical depth in the 12CO J=1-0 line is %.2e",
C12O16Rotate[0].Emis->TauIn );
2535 sprintf( chLine,
" !The optical depth in the 13CO J=1-0 line is %.2e",
C13O16Rotate[0].Emis->TauIn );
2544 sprintf( chLine,
" !The level2 lines are disabled. UV pumping of excited levels within ground terms is not treated." );
2549 for( nelem=0; nelem <
LIMELM; nelem++ )
2565 " C-This is the last iteration and %2s%2ld Bal(a) optical depth"
2566 " changed by%6.1f%% (was %.2e). Try another iteration.",
2587 " C-This is the last iteration and %2s%2ld Ly(a) optical depth"
2588 " changed by%7.0f%% (was %.2e). Try another iteration.",
2602 sprintf( chLine,
" C-R(out)/R(in)=%.2e and SPHERE was not set.",
2617 sprintf( chLine,
" C-The H Lyman continuum is thin, and I assumed"
2618 " that it was thick. Try another iteration." );
2631 " C-The He II continuum is thin and I assumed that it was thick."
2632 " Try another iteration." );
2644 " C-The He I continuum is thin and I assumed that it was thick."
2645 " Try another iteration." );
2657 fprintf(
ioQQQ,
" colden_old is insane in PrtComment.\n" );
2665 if( differ > 0.1 && differ <= 0.3 )
2668 " The H column density changed by %.2e%% between this and previous iteration.",
2673 else if( differ > 0.3 )
2678 " C-The H column density changed by %.2e%% and this is the last iteration. What happened?",
2685 " !The H column density changed by %.2e%% What happened?",
2697 if( differ > 0.1 && differ <= 0.3 )
2700 " The H2 column density changed by %.2e%% between this and previous iteration.",
2705 else if( differ > 0.3 )
2710 " C-The H2 column density changed by %.2e%% and this is the last iteration. What happened?",
2717 " !The H2 column density changed by %.2e%% What happened?",
2733 sprintf( chLine,
" C-This is the last iteration, radiation pressure was significant, and the L-a optical depth changed by %7.2f%% (was %.2e)",
2744 sprintf( chLine,
" C-The Lya optical depth scale was overrun and this is the last iteration - Tspin(21 cm) is not valid." );
2746 sprintf( chLine,
" C-Another iteration is needed for Tspin(21 cm) to be valid." );
2753 sprintf( chLine,
" Line radiation pressure capped by thermalization length." );
2764 _o = sprintf( chLine,
" There were %ld minor temperature failures. zones:",
2768 for( i=0; i < nline; i++ )
2770 _o += sprintf( chLine+_o,
" %ld",
conv.
ifailz[i] );
2776 _o = sprintf( chLine,
2777 " !There were %ld temperature failures, and some were large. The largest was %.1f%%. What happened?",
2783 _o = sprintf( chLine ,
" !The zones were" );
2784 for( i=0; i < nline; i++ )
2786 _o += sprintf( chLine+_o,
" %ld",
conv.
ifailz[i] );
2792 sprintf( chLine,
" !I think they may have been caused by the change from hot to nebular gas phase. The physics of this is unclear." );
2801 for( i=1; i <
nzone; i++ )
2804 if( big > big_ion_jump )
2811 if( big_ion_jump > 0.2 )
2816 fprintf(
ioQQQ,
" j too small big jump check\n" );
2821 if( big_ion_jump > 0.4 )
2823 sprintf( chLine,
" C-A temperature discontinuity occurred at zone %ld from %.2eK to %.2eK.",
2832 sprintf( chLine,
" C-This was probably due to a thermal front." );
2836 else if( big_ion_jump > 0.2 )
2838 sprintf( chLine,
" !A temperature discontinuity occurred at zone %ld from %.2eK to %.2eK.",
2847 sprintf( chLine,
" !This was probably due to a thermal front." );
2860 sprintf( chLine,
" W-The local error in the electron density reached %.1f%% at zone %ld",
2866 sprintf( chLine,
" C-The local error in the electron density reached %.1f%% at zone %ld",
2872 sprintf( chLine,
" The local error in the electron density reached %.1f%% at zone %ld",
2881 for( i=1; i < (nzone - 1); i++ )
2890 if( rel < 0. &&
MIN2( bigm , big ) > big_ion_jump )
2893 big_ion_jump =
MIN2( bigm , big );
2897 if( big_ion_jump > 0.1 )
2902 fprintf(
ioQQQ,
" j too small bigjump2 check\n" );
2907 if( big_ion_jump > 0.3 )
2910 " C-A temperature oscillation occurred at zone%4ld by%5.0f%% from %.2e to %.2e to %.2e",
2914 else if( big_ion_jump > 0.1 )
2917 " !A temperature oscillation occurred at zone%4ld by%5.0f%% from %.2e to %.2e to %.2e",
2928 for( i=1; i < (nzone - 1); i++ )
2936 if( big*bigm < 0. &&
2951 fprintf(
ioQQQ,
" j too small bigjump3 check\n" );
2958 sprintf( chLine,
" C-An electron density oscillation occurred at zone%4ld by%5.0f%% from %.2e to %.2e to %.2e",
2965 sprintf( chLine,
" !An electron density oscillation occurred at zone%4ld by%5.0f%% from %.2e to %.2e to %.2e",
2984 i =
cdLine(
"Unit" , 1 , &rate , &absint );
3012 error = fabs(VolComputed - VolExpected)/
SDIV(VolExpected);
3022 if( error > 0.001 && !
lgAbort )
3025 " W-PrtComment insanity - Line unit integration did not verify \n");
3028 " PROBLEM PrtComment insanity - Line unit integration did not verify \n");
3030 " expected, derived vols were %g %g \n",
3031 VolExpected , VolComputed );
3033 " relative difference is %g, ratio is %g.\n",error,VolComputed/VolExpected);
3065 ASSERT( ConExpected > 0. );
3068 error = fabs(ConComputed - ConExpected)/ConExpected;
3078 if( error > 0.001 && !
lgAbort)
3081 " W-PrtComment insanity - Continuum unit integration did not verify \n");
3083 fprintf(
ioQQQ,
" PROBLEM PrtComment insanity - Continuum unit integration did not verify \n");
3084 fprintf(
ioQQQ,
" exact vol= %g, derived vol= %g relative difference is %g \n",
3085 ConExpected , ConComputed ,error);
3086 fprintf(
ioQQQ,
" ConInterOut= %g, \n",
3092 cdNwcns(&lgAbort_flag,&nw,&nc,&nn,&ns,&i,&j,&dum1,&dum2);
3121 fprintf(
ioQQQ,
" PrtComment returns.\n" );
3140 fprintf(
ioQQQ,
" badprt: all entries with greater than%6.2f%% of incident continuum follow.\n",
3142 fprintf(
ioQQQ,
" badprt: Intensities are relative to total energy in incident continuum.\n" );
3148 " Sum of energy in recombination lines is %.2e relative to total incident radiation is %.2e\n",
3150 sum_recom_lines/
MAX2(1e-30,total) );
3152 fprintf(
ioQQQ,
" all strong information lines \n line wl ener/total\n");
3160 fprintf(
ioQQQ,
" %7.3f %c\n",
LineSv[i].sumlin[0]/total, chInfo );
3164 fprintf(
ioQQQ,
" all strong cooling lines \n line wl ener/total\n");
3167 fprintf(
ioQQQ,
" Sum of coolants (abs) = %.2e (rel)= %.2e\n",
3168 sum_coolants, sum_coolants/
MAX2(1e-30,total) );
3175 fprintf(
ioQQQ,
" %7.3f %c\n",
LineSv[i].sumlin[0]/total, chInfo );
3179 fprintf(
ioQQQ,
" all strong heating lines \n line wl ener/total\n");
3181 fprintf(
ioQQQ,
" Sum of heat (abs) = %.2e (rel)= %.2e\n",
3189 fprintf(
ioQQQ,
" %7.3f %c\n",
LineSv[i].sumlin[0]/total, chInfo );
3218 conalog = log((
double)
TauLines[ipT3969].Emis->TauIn);
3219 conalog = sqrt(
MAX2(1., conalog));
3220 conca =
MAX2(conalog,conca);
3223 conalog = sqrt(
MAX2(1.,conalog));
3225 conhe =
MAX2(conalog, conhe);
3227 *totwid = 10.*conhe + 1.6*conca;
3252 *outtot = *outin + *outout;
3265 double BigOscillation ,
3277 nzone_oscillation = 0;
3284 for( ion=0; ion<=nelem+1; ++ion)
3286 BigOscillation = 0.;
3287 big_ion_jump = -15.;
3289 for( i=1; i < (nzone - 1-(int)
lgAbort); i++ )
3306 if( rel < 0. &&
MIN2( bigm , big ) > BigOscillation )
3308 nzone_oscillation = i;
3309 BigOscillation =
MIN2( bigm , big );
3318 if( rel > big_ion_jump )
3328 if( BigOscillation > 0.2 )
3331 if( nzone_oscillation < 1 )
3333 fprintf(
ioQQQ,
" nzone_oscillation too small bigjump2 check\n" );
3337 if( BigOscillation > 3. )
3340 " W-An ionization oscillation occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3343 BigOscillation*100.,
3350 else if( BigOscillation > 0.7 )
3353 " C-An ionization oscillation occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3356 BigOscillation*100.,
3362 else if( BigOscillation > 0.2 )
3365 " !An ionization oscillation occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3368 BigOscillation*100.,
3378 big_ion_jump = pow(10., big_ion_jump );
3379 if( big_ion_jump > 1.5 && nzone_ion_jump > 0 )
3381 if( big_ion_jump > 10. )
3384 " C-An ionization jump occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3396 " !An ionization jump occurred at zone %ld, elem %.2s%2li, by %.0f%% from %.2e to %.2e to %.2e",
3414 for( i=1; i < (nzone - 1 - (int)
lgAbort); i++ )
3420 if( rel > big_jump )
3428 big_jump = pow( 10., big_jump );
3429 if( big_jump > 1.2 )
3434 " C-The H density jumped at by %.0f%% at zone %ld, from %.2e to %.2e to %.2e",
3445 " !An H density jump occurred at zone %ld, by %.0f%% from %.2e to %.2e to %.2e",
3462 for( i=3; i < (nzone - 2 - (int)
lgAbort); i++ )
3468 if( rel > big_jump )
3479 big_jump = pow( 10., big_jump );
3480 if( big_jump > 1.2 )
3487 " C-The radiation pressure jumped by %.0f%% at zone %ld, from %.2e to %.2e to %.2e",
3498 " !The radiation pressure jumped by %.0f%% at zone %ld, from %.2e to %.2e to %.2e",
3515 for( i=1; i < (nzone - 1 - (int)
lgAbort); i++ )
3579 " C-The temperature varied by %.1f%% between two zones",
3586 " !The temperature varied by %.1f%% between two zones",
3594 " C-The electron density varied by %.1f%% between two zones",
3601 " !The electron density varied by %.1f%% between two zones",
3609 " C-The H2 density varied by %.1f%% between two zones",
3616 " !The H2 density varied by %.1f%% between two zones",
3624 " C-The CO density varied by %.1f%% between two zones",
3631 " !The CO density varied by %.1f%% between two zones",