cloudy trunk
|
00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 /*lines_molecules put energetics, H, and He lines into line intensity stack */ 00004 #include "cddefines.h" 00005 #include "taulines.h" 00006 #include "physconst.h" 00007 #include "coolheavy.h" 00008 #include "thermal.h" 00009 #include "dense.h" 00010 #include "hmi.h" 00011 #include "phycon.h" 00012 #include "h2.h" 00013 #include "mole.h" 00014 #include "lines_service.h" 00015 #include "radius.h" 00016 #include "lines.h" 00017 00018 void lines_molecules(void) 00019 { 00020 long int i; 00021 00022 DEBUG_ENTRY( "lines_molecules()" ); 00023 00024 /* molecules */ 00025 i = StuffComment( "molecules" ); 00026 linadd( 0., (realnum)i , "####", 'i', 00027 " molecules"); 00028 00029 00030 /* >>refer H2 rot Lepp, S., & Shull, J.M., 1983, ApJ, 270, 578-582 00031 * roughly two microns */ 00032 linadd(CoolHeavy.h2line,20000.,"H2 l",'c', 00033 "cooling due H2 rotation lines from simple model" ); 00034 /* remember largest fraction of H2 cooling for possible comment */ 00035 hmi.h2line_cool_frac = (realnum)MAX2( CoolHeavy.h2line/thermal.ctot , hmi.h2line_cool_frac ); 00036 00037 /* HD rotation cooling */ 00038 linadd(CoolHeavy.HD,0,"HDro",'c', 00039 "HD rotation cooling"); 00040 00041 /* molecular hydrogen heating */ 00042 hmi.h2dtot += (realnum)(hmi.HeatH2Dish_used*radius.dVeff); 00043 hmi.h2dfrc = (realnum)(MAX2(hmi.HeatH2Dish_used/thermal.htot,hmi.h2dfrc)); 00044 00045 /* largest fraction of heating due to photo dissoc of H2+ */ 00046 hmi.h2pmax = MAX2(hmi.h2pmax,(realnum)(thermal.heating[0][16]/thermal.htot)); 00047 00048 linadd(hmi.HeatH2Dish_used,0,"H2dH",'h', 00049 "heating by H2 dissociation by photons and cosmic rays"); 00050 00051 /*remember largest fraction of heating due to H2 vib deexcitation */ 00052 hmi.HeatH2DexcMax = MAX2((realnum)(hmi.HeatH2Dexc_used/thermal.htot),hmi.HeatH2DexcMax); 00053 00054 /*remember largest fraction of cooling due to H2 cooling */ 00055 hmi.CoolH2DexcMax = MAX2((realnum)(-hmi.HeatH2Dexc_used/thermal.htot),hmi.CoolH2DexcMax); 00056 00057 linadd( MAX2(0.,hmi.HeatH2Dexc_used),0,"H2vH",'h', 00058 "heating by coll deexcit of vib-excited H2"); 00059 00060 linadd( MAX2(0.,-hmi.HeatH2Dexc_used) ,0,"H2vC",'c', 00061 " cooling by coll deexcit of vib-excited H2"); 00062 00063 /* line emission by vib-excited H2 */ 00064 if( h2.lgH2ON ) 00065 { 00066 00067 linadd( 0. ,0,"H2 v",'i', 00068 " when large molecule is turned on do not print this simple estimate line emission by vib-excited H2 "); 00069 } 00070 else 00071 { 00072 linadd( hmi.Hmolec[ipMH2s]*2e-7*4.17e-12,0,"H2 v",'i', 00073 " H2 vib-excited lines from Tielens & Hollenbach 1985"); 00074 } 00075 00076 /* add in explicit lines from the large H2 molecule 00077 * routine in mole_h2_io.c */ 00078 H2_LinesAdd(); 00079 00080 linadd(hmi.hmicol,0,"H-FB",'c', 00081 " neg H ion free-bound emission, H + e -> H- + hnu "); 00082 00083 linadd(CoolHeavy.brems_cool_hminus,0,"H-FF",'i', 00084 " neg H ion free-free emission "); 00085 00086 linadd(hmi.HalphaHmin*3.032e-12,6563,"H-CT",'i', 00087 " H-alpha produced by H- mutual neutralization "); 00088 00089 /* remember total heating */ 00090 hmi.hmitot += hmi.hmihet*radius.dVeff; 00091 00092 linadd(MAX2(0.,hmi.hmihet),0,"H- H",'h', 00093 " H- heating "); 00094 00095 linadd(MAX2(0.,-hmi.hmihet),0,"H-Hc",'c', 00096 " induced H- cooling "); 00097 00098 linadd(CoolHeavy.H2PlsCool,0,"H2+ ",'c', 00099 " H+ + H => H2+ + photon continuum cooling "); 00100 00101 linadd(hmi.h2plus_heat,0,"H2+p",'h', 00102 " H2+ photo dissoc heating "); 00103 00104 linadd(MAX2(3.27e-12+phycon.te*BOLTZMANN,0.)*dense.xIonDense[ipHYDROGEN][1]*dense.xIonDense[ipHELIUM][0]*1e-20+ 00105 (1.76e-11+phycon.te*BOLTZMANN)*dense.xIonDense[ipHYDROGEN][0]*dense.xIonDense[ipHELIUM][1]*1e-16,0,"HEH+",'i' , 00106 " HeH+ formation cooling "); 00107 00108 /* carbon monoxide heating */ 00109 co.codtot += co.CODissHeat*(realnum)radius.dVeff; 00110 co.codfrc = (realnum)MAX2(co.CODissHeat/thermal.htot,co.codfrc); 00111 00112 linadd(co.CODissHeat,0,"COdh",'h', 00113 " carbon monoxide co photodissociation "); 00114 00116 linadd(CoolHeavy.C12O16Rot,0,"CO12",'c', 00117 " total c12o16 cooling "); 00118 00119 linadd(CoolHeavy.C13O16Rot,0,"CO13",'c' , 00120 " total c13o16 cooling "); 00121 00122 /* remember most amount of CO cooling */ 00123 co.COCoolBigFrac = MAX2( co.COCoolBigFrac, (CoolHeavy.C12O16Rot+CoolHeavy.C13O16Rot)/thermal.ctot); 00124 00125 /* add in CO carbon monoxide lines */ 00126 for( i=0; i < nCORotate; i++ ) 00127 { 00128 PutLine(&C12O16Rotate[i], 00129 "CO 12/16"); 00130 } 00131 for( i=0; i < nCORotate; i++ ) 00132 { 00133 PutLine(&C13O16Rotate[i], 00134 "CO 13/16 "); 00135 } 00136 return; 00137 }