cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hmi.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2022 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 #include "cddefines.h"
4 #include "hmi.h"
6 
7 void t_hmi::zero()
8 {
9  DEBUG_ENTRY( "t_hmi::zero()" );
10  H2_total = 0.;
11  H2_total_f = 0.f;
12  HD_total = 0.;
13  H2_frac_abund_set = 0.;
14  hmihet = 0.;
15  h2plus_exc_frac = 0.;
16  h2plus_heatcoef = 0.;
17  h2plus_heat = 0.;
18  HeatH2Dish_used = 0.;
19  HeatH2Dexc_used = 0.;
20  HeatH2Dish_TH85 = 0.;
21  HeatH2Dexc_TH85 = 0.;
26  HeatH2DexcMax = 0.;
27  CoolH2DexcMax = 0.;
28  hmitot = 0.;
29  H2Opacity = 0.;
30  hmidep = 1.;
31  h2dep = 1.;
32  h2pdep = 1.;
33  h3pdep = 1.;
34 
35  /* option to kill effects of H2 in CO chemistry - set with
36  * set Leiden hack h2* off */
37  lgLeiden_Keep_ipMH2s = true;
38  lgLeidenCRHack = true;
39 
40  /* this says which estimate of the rate of the Solomon process to use,
41  * default is Tielens & Hollenbach 1985a, changed with
42  * set h2 Solomon command, options are TH85 and BD96,
43  * the second for the Bertoldi & Draine rates - they
44  * differ by 1 dex. when large H2 turned on this is ignored */
45  /* the Tielens & Hollenbach 1985 treatment */
47  /* the improved H2 formalism given by
48  *>>refer H2 dissoc Burton, M.G., Hollenbach, D.J. & Tielens, A.G.G.M
49  >>refcon 1990, ApJ, 365, 620 */
51  /* the Bertoldi & Draine 1996 treatment */
52  /* >>chng 03 nov 15, change default to BD96 */
54  /* >>chng 05 dec 08, use the Elwert et al. approximations as the default */
56 
57  /* set NaN */
63 
71 
78 
84 
90 
101 
102  /* default grain formation pumping - Takahashi 2001 */
103  chGrainFormPump = 'T';
104 
105  /* set which approximation for Jura rate - Cazaux & Tielens
106  * >>refer H2 form Cazaux, S., & Tielens, A.G.G.M., 2002, ApJ, 575, L29 */
107  /*>> chng 14 aug 28, to Eley Rideal */
108  chJura = 'E';
109 
110  /* scale factor to multiply Jura rate, set Jura rate command */
111  ScaleJura = 1.f;
112 
113  /* binding energy for change in H2 population while on grain surface,
114  * set with "set h2 Tad" command */
115  Tad = 800.;
116 
117  lgH2_Thermal_BigH2 = true;
118  lgH2_Chemistry_BigH2 = true;
119 }
double H2_Solomon_dissoc_rate_used_H2g
Definition: hmi.h:103
char chGrainFormPump
Definition: hmi.h:182
double hmihet
Definition: hmi.h:33
double hmitot
Definition: hmi.h:33
double H2_photodissoc_ELWERT_H2s
Definition: hmi.h:122
bool lgH2_Chemistry_BigH2
Definition: hmi.h:171
void set_NaN(sys_float &x)
Definition: cpu.cpp:906
realnum UV_Cont_rel2_Draine_DB96_face
Definition: hmi.h:84
bool lgLeiden_Keep_ipMH2s
Definition: hmi.h:219
double HeatH2Dish_BD96
Definition: hmi.h:140
double H2_photodissoc_used_H2s
Definition: hmi.h:120
double H2_Solomon_dissoc_rate_TH85_H2s
Definition: hmi.h:110
double H2_photodissoc_BHT90
Definition: hmi.h:124
double H2_photodissoc_TH85
Definition: hmi.h:123
double H2_Solomon_dissoc_rate_BD96_H2g
Definition: hmi.h:106
double H2_Solomon_dissoc_rate_ELWERT_H2s
Definition: hmi.h:113
double h2plus_heat
Definition: hmi.h:48
double HeatH2Dexc_used
Definition: hmi.h:140
double HeatH2Dish_TH85
Definition: hmi.h:140
double H2_Solomon_dissoc_rate_BD96_H2s
Definition: hmi.h:112
char chJura
Definition: hmi.h:185
realnum Tad
Definition: hmi.h:135
realnum deriv_HeatH2Dexc_ELWERT
Definition: hmi.h:156
void zero()
Definition: hmi.cpp:7
double H2_Solomon_dissoc_rate_TH85_H2g
Definition: hmi.h:104
double H2_Solomon_dissoc_rate_BHT90_H2g
Definition: hmi.h:105
realnum deriv_HeatH2Dexc_TH85
Definition: hmi.h:156
double H2_Solomon_dissoc_rate_used_H2s
Definition: hmi.h:109
double H2_photodissoc_ELWERT_H2g
Definition: hmi.h:121
double H2_frac_abund_set
Definition: hmi.h:196
double HeatH2Dish_used
Definition: hmi.h:140
realnum deriv_HeatH2Dexc_BD96
Definition: hmi.h:156
double h2plus_heatcoef
Definition: hmi.h:48
double HD_total
Definition: hmi.h:27
double H2_Solomon_dissoc_rate_BHT90_H2s
Definition: hmi.h:111
double HeatH2Dexc_TH85
Definition: hmi.h:140
double HeatH2Dexc_BHT90
Definition: hmi.h:140
Definition: hmi.h:15
double h3pdep
Definition: hmi.h:42
realnum UV_Cont_rel2_Habing_TH85_face
Definition: hmi.h:74
double H2_photodissoc_used_H2g
Definition: hmi.h:119
double h2dep
Definition: hmi.h:42
bool lgLeidenCRHack
Definition: hmi.h:220
realnum UV_Cont_rel2_Draine_DB96_depth
Definition: hmi.h:84
realnum HeatH2DexcMax
Definition: hmi.h:57
double HeatH2Dish_ELWERT
Definition: hmi.h:140
double h2pdep
Definition: hmi.h:42
double HeatH2Dish_BHT90
Definition: hmi.h:140
char chH2_small_model_type
Definition: hmi.h:179
realnum deriv_HeatH2Dexc_BHT90
Definition: hmi.h:156
double hmidep
Definition: hmi.h:42
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
bool lgH2_Thermal_BigH2
Definition: hmi.h:171
double H2_total
Definition: hmi.h:25
realnum H2_total_f
Definition: hmi.h:26
realnum UV_Cont_rel2_Habing_TH85_depth
Definition: hmi.h:74
double HeatH2Dexc_ELWERT
Definition: hmi.h:140
realnum ScaleJura
Definition: hmi.h:189
realnum deriv_HeatH2Dexc_used
Definition: hmi.h:156
realnum H2Opacity
Definition: hmi.h:38
t_hmi hmi
Definition: hmi.cpp:5
double H2_Solomon_dissoc_rate_ELWERT_H2g
Definition: hmi.h:107
double HeatH2Dexc_BD96
Definition: hmi.h:140
double h2plus_exc_frac
Definition: hmi.h:50
realnum CoolH2DexcMax
Definition: hmi.h:57