cloudy  trunk
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 
19 void lines_molecules(void)
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 */
37 
38  /* HD rotation cooling */
39  linadd(CoolHeavy.HD,0,"HDro",'c',
40  "HD rotation cooling");
41 
42  /* molecular hydrogen heating */
45 
46  /* largest fraction of heating due to photo dissoc of H2+ */
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 */
54 
55  /*remember largest fraction of cooling due to H2 cooling */
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 */
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 
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 */
114 
115  linadd(co.CODissHeat,0,"COdh",'h',
116  " carbon monoxide co photodissociation ");
117 
118  return;
119 }
thermal.h
co
t_co co
Definition: co.cpp:5
findspecieslocal
molezone * findspecieslocal(const char buf[])
Definition: mole_species.cpp:833
lines.h
h2
diatomics h2("h2", 4100., &hmi.H2_total, Yan_H2_CS)
dense
t_dense dense
Definition: dense.cpp:24
diatom_iter
vector< diatomics * >::iterator diatom_iter
Definition: h2.h:13
diatomics::lgEnabled
bool lgEnabled
Definition: h2_priv.h:345
t_co::codfrc
realnum codfrc
Definition: co.h:15
realnum
float realnum
Definition: cddefines.h:103
t_radius::dVeffAper
double dVeffAper
Definition: radius.h:87
mole.h
diatoms
vector< diatomics * > diatoms
Definition: h2.cpp:8
phycon
t_phycon phycon
Definition: phycon.cpp:6
t_hmi::h2dtot
realnum h2dtot
Definition: hmi.h:50
lines_service.h
t_hmi::hmicol
double hmicol
Definition: hmi.h:26
ipHYDROGEN
const int ipHYDROGEN
Definition: cddefines.h:305
t_thermal::ctot
double ctot
Definition: thermal.h:112
t_mole_local::findrate
double findrate(const char buf[]) const
Definition: mole_reactions.cpp:3900
radius
t_radius radius
Definition: radius.cpp:5
t_hmi::CoolH2DexcMax
realnum CoolH2DexcMax
Definition: hmi.h:48
linadd
void linadd(double xInten, realnum wavelength, const char *chLab, char chInfo, const char *chComment)
Definition: lines_service.cpp:316
dense.h
t_CoolHeavy::h2line
double h2line
Definition: coolheavy.h:69
coolheavy.h
mole
t_mole_local mole
Definition: mole.cpp:7
cddefines.h
t_co::codtot
realnum codtot
Definition: co.h:16
thermal
t_thermal thermal
Definition: thermal.cpp:5
t_hmi::hmihet
double hmihet
Definition: hmi.h:24
t_hmi::HeatH2DexcMax
realnum HeatH2DexcMax
Definition: hmi.h:46
t_thermal::heating
double heating[LIMELM][LIMELM]
Definition: thermal.h:158
radius.h
t_hmi::h2pmax
realnum h2pmax
Definition: hmi.h:120
hmi.h
MAX2
#define MAX2
Definition: cddefines.h:782
t_hmi::h2line_cool_frac
realnum h2line_cool_frac
Definition: hmi.h:52
t_hmi::HeatH2Dexc_used
double HeatH2Dexc_used
Definition: hmi.h:137
co.h
t_dense::xIonDense
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:125
t_CoolHeavy::HD
double HD
Definition: coolheavy.h:70
t_thermal::htot
double htot
Definition: thermal.h:149
t_CoolHeavy::brems_cool_hminus
double brems_cool_hminus
Definition: coolheavy.h:118
hmi
t_hmi hmi
Definition: hmi.cpp:5
physconst.h
t_co::CODissHeat
realnum CODissHeat
Definition: co.h:13
t_hmi::HeatH2Dish_used
double HeatH2Dish_used
Definition: hmi.h:129
ipHELIUM
const int ipHELIUM
Definition: cddefines.h:306
taulines.h
lines_molecules
void lines_molecules(void)
Definition: prt_lines_molecules.cpp:19
CoolHeavy
t_CoolHeavy CoolHeavy
Definition: coolheavy.cpp:5
StuffComment
long int StuffComment(const char *chComment)
Definition: prt_final.cpp:1932
phycon.h
t_hmi::h2plus_heat
double h2plus_heat
Definition: hmi.h:39
t_hmi::hmitot
double hmitot
Definition: hmi.h:25
h2.h
BOLTZMANN
const UNUSED double BOLTZMANN
Definition: physconst.h:97
t_phycon::te
double te
Definition: phycon.h:11
DEBUG_ENTRY
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:684
t_hmi::h2dfrc
realnum h2dfrc
Definition: hmi.h:49
t_CoolHeavy::H2PlsCool
realnum H2PlsCool
Definition: coolheavy.h:139