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 */
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
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}
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
bool lgEnabled
Definition: h2_priv.h:345
double findrate(const char buf[]) const
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)
Definition: prt_final.cpp:1932
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
realnum H2PlsCool
Definition: coolheavy.h:139
double brems_cool_hminus
Definition: coolheavy.h:118
double HD
Definition: coolheavy.h:70
double h2line
Definition: coolheavy.h:69
realnum codfrc
Definition: co.h:15
realnum codtot
Definition: co.h:16
realnum CODissHeat
Definition: co.h:13
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:125
realnum h2pmax
Definition: hmi.h:120
realnum h2dfrc
Definition: hmi.h:49
double HeatH2Dexc_used
Definition: hmi.h:137
realnum h2dtot
Definition: hmi.h:50
double hmihet
Definition: hmi.h:24
realnum HeatH2DexcMax
Definition: hmi.h:46
double HeatH2Dish_used
Definition: hmi.h:129
double hmitot
Definition: hmi.h:25
realnum h2line_cool_frac
Definition: hmi.h:52
realnum CoolH2DexcMax
Definition: hmi.h:48
double hmicol
Definition: hmi.h:26
double h2plus_heat
Definition: hmi.h:39
double te
Definition: phycon.h:11
double dVeffAper
Definition: radius.h:87
double heating[LIMELM][LIMELM]
Definition: thermal.h:158
double ctot
Definition: thermal.h:112
double htot
Definition: thermal.h:149
t_thermal thermal
Definition: thermal.cpp:5