cloudy trunk
Loading...
Searching...
No Matches
prt_lines_molecules.cpp
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and
2 * others. For conditions of distribution and use see copyright notice in license.txt */
3/*lines_molecules put energetics, H, and He lines into line intensity stack */
4#include "cddefines.h"
5#include "taulines.h"
6#include "physconst.h"
7#include "coolheavy.h"
8#include "thermal.h"
9#include "dense.h"
10#include "hmi.h"
11#include "phycon.h"
12#include "h2.h"
13#include "co.h"
14#include "mole.h"
15#include "lines_service.h"
16#include "radius.h"
17#include "lines.h"
18
20{
21 long int i;
22
23 DEBUG_ENTRY( "lines_molecules()" );
24
25 /* molecules */
26 i = StuffComment( "molecules" );
27 linadd( 0., (realnum)i , "####", 'i',
28 " molecules");
29
30
31 /* >>refer H2 rot Lepp, S., & Shull, J.M., 1983, ApJ, 270, 578-582
32 * roughly two microns */
33 linadd(CoolHeavy.h2line,20000.,"H2 l",'c',
34 "cooling due H2 rotation lines from simple model" );
35 /* remember largest fraction of H2 cooling for possible comment */
36 hmi.h2line_cool_frac = (realnum)MAX2( CoolHeavy.h2line/thermal.ctot , hmi.h2line_cool_frac );
37
38 /* HD rotation cooling */
39 linadd(CoolHeavy.HD,0,"HDro",'c',
40 "HD rotation cooling");
41
42 /* molecular hydrogen heating */
43 hmi.h2dtot += (realnum)(hmi.HeatH2Dish_used*radius.dVeffAper);
44 hmi.h2dfrc = (realnum)(MAX2(hmi.HeatH2Dish_used/thermal.htot,hmi.h2dfrc));
45
46 /* largest fraction of heating due to photo dissoc of H2+ */
47 hmi.h2pmax = MAX2(hmi.h2pmax,(realnum)(thermal.heating[0][16]/thermal.htot));
48
49 linadd(hmi.HeatH2Dish_used,0,"H2dH",'h',
50 "heating by H2 dissociation by photons and cosmic rays");
51
52 /*remember largest fraction of heating due to H2 vib deexcitation */
53 hmi.HeatH2DexcMax = MAX2((realnum)(hmi.HeatH2Dexc_used/thermal.htot),hmi.HeatH2DexcMax);
54
55 /*remember largest fraction of cooling due to H2 cooling */
56 hmi.CoolH2DexcMax = MAX2((realnum)(-hmi.HeatH2Dexc_used/thermal.htot),hmi.CoolH2DexcMax);
57
58 linadd( MAX2(0.,hmi.HeatH2Dexc_used),0,"H2vH",'h',
59 "heating by coll deexcit of vib-excited H2");
60
61 linadd( MAX2(0.,-hmi.HeatH2Dexc_used) ,0,"H2vC",'c',
62 " cooling by coll deexcit of vib-excited H2");
63
64 /* line emission by vib-excited H2 */
65 if( h2.lgEnabled )
66 {
67
68 linadd( 0. ,0,"H2 v",'i',
69 " when large molecule is turned on do not print this simple estimate line emission by vib-excited H2 ");
70 }
71 else
72 {
73 linadd( findspecieslocal("H2*")->den*2e-7*4.17e-12,0,"H2 v",'i',
74 " H2 vib-excited lines from Tielens & Hollenbach 1985");
75 }
76
77 /* add in explicit lines from the large H2 molecule
78 * routine in mole_h2_io.c */
79 for( diatom_iter diatom = diatoms.begin(); diatom != diatoms.end(); ++diatom )
80 (*diatom)->H2_LinesAdd();
81
82 linadd(hmi.hmicol,0,"H-FB",'c',
83 " neg H ion free-bound emission, H + e -> H- + hnu ");
84
85 linadd(CoolHeavy.brems_cool_hminus,0,"H-FF",'i',
86 " neg H ion free-free emission ");
87
88 /* H-alpha produced by H- mutual neutralization */
89 linadd(mole.findrate("H-,H+=>H,H")*3.032e-12,6563,"H-CT",'i',
90 " H-alpha produced by H- mutual neutralization ");
91
92 /* remember total heating */
93 hmi.hmitot += hmi.hmihet*radius.dVeffAper;
94
95 linadd(MAX2(0.,hmi.hmihet),0,"H- H",'h',
96 " H- heating ");
97
98 linadd(MAX2(0.,-hmi.hmihet),0,"H-Hc",'c',
99 " induced H- cooling ");
100
101 linadd(CoolHeavy.H2PlsCool,0,"H2+ ",'c',
102 " H+ + H => H2+ + photon continuum cooling ");
103
104 linadd(hmi.h2plus_heat,0,"H2+p",'h',
105 " H2+ photo dissoc heating ");
106
107 linadd(MAX2(3.27e-12+phycon.te*BOLTZMANN,0.)*dense.xIonDense[ipHYDROGEN][1]*dense.xIonDense[ipHELIUM][0]*1e-20+
108 (1.76e-11+phycon.te*BOLTZMANN)*dense.xIonDense[ipHYDROGEN][0]*dense.xIonDense[ipHELIUM][1]*1e-16,0,"HEH+",'i' ,
109 " HeH+ formation cooling ");
110
111 /* carbon monoxide heating */
112 co.codtot += co.CODissHeat*(realnum)radius.dVeffAper;
113 co.codfrc = (realnum)MAX2(co.CODissHeat/thermal.htot,co.codfrc);
114
115 linadd(co.CODissHeat,0,"COdh",'h',
116 " carbon monoxide co photodissociation ");
117
118 return;
119}
const int ipHELIUM
Definition cddefines.h:306
float realnum
Definition cddefines.h:103
#define MAX2
Definition cddefines.h:782
const int ipHYDROGEN
Definition cddefines.h:305
#define DEBUG_ENTRY(funcname)
Definition cddefines.h:684
t_co co
Definition co.cpp:5
t_CoolHeavy CoolHeavy
Definition coolheavy.cpp:5
t_dense dense
Definition dense.cpp:24
vector< diatomics * > diatoms
Definition h2.cpp:8
diatomics h2("h2", 4100., &hmi.H2_total, Yan_H2_CS)
vector< diatomics * >::iterator diatom_iter
Definition h2.h:13
t_hmi hmi
Definition hmi.cpp:5
long int StuffComment(const char *chComment)
void linadd(double xInten, realnum wavelength, const char *chLab, char chInfo, const char *chComment)
t_mole_local mole
Definition mole.cpp:7
molezone * findspecieslocal(const char buf[])
t_phycon phycon
Definition phycon.cpp:6
UNUSED const double BOLTZMANN
Definition physconst.h:97
void lines_molecules(void)
t_radius radius
Definition radius.cpp:5
t_thermal thermal
Definition thermal.cpp:5