cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ionbal.h
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 
4 #ifndef IONBAL_H_
5 #define IONBAL_H_
6 
7 #include "module.h"
8 #include "container_classes.h"
9 
10 class dense;
11 
14 void ion_recom_calculate( void );
15 
17 void ion_zero(long int nelem);
18 
22 void ion_collis(
23  long nelem);
24 
29 void ion_solver(long int nelem, bool lgPrintIt);
30 
35 void ion_photo(
36  long int nelem ,
37  bool lgPrintIt );
38 
40 void ion_CX(long nelem );
41 
43 void ion_recomb(bool,long);
44 
46 void ion_recombAGN( FILE * io );
47 
49 void ion_wrapper( long nelem );
50 
54 void Badnell_rec_init( void );
55 
56 /* routines to do heavy element ionization balance */
57 void IonNelem(bool lgPrintIt, long int nelem);
58 void IonHelium( void );
59 
61 #define NSHELLS 7
62 
64 class t_ionbal : public module
65 {
66 public:
67  void alloc();
68 
69  const char* chName() const
70  {
71  return "ionbal";
72  }
73  void zero();
74  void comment(t_warnings&);
75 
83  double trimhi,
84 
87  trimlo;
88 
90  bool lgTrimhiOn;
91 
93  bool lgTrimloOn;
94 
96  bool lgNewTrim;
97 
98  /* ==============================================================
99  * all following deals with ionization processes */
100 
112  double ****PhotoRate_Shell;
113 
118 
122 
125 
128 
132 
136 
139 
143 
146 
147  /* ==============================================================
148  * following deal with Compton recoil ionization of bound electrons */
149 
154 
157 
159  long int **ipCompRecoil;
160 
163 
166 
169 
172 
174  double **UTA_ionize_rate;
176  double **UTA_heat_rate;
177 
180  double ***RateIoniz;
181 
185 
187  /* ==============================================================
188  * end Compton recoil ionization of bound electrons */
189 
190  /* ==============================================================
191  * all following deals with recombination */
192 
194  double **RateRecomTot;
195 
197  double **RateRecomIso;
198 
203 
205 
208 
211 
214 
219 
222  **GrainDestr;
223 
224  int
227 
230 
232  bool lgDRsup;
233 
236  bool lgNoCota;
237 
240 
242  long int ilt,
243  iltln,
244  ilthn,
245  ihthn,
246  ifail;
247 
249 
250  // find the total ionization rate (including multiple-electron processes)
251  double RateIonizTot( long nelem, long ion ) const;
252 };
253 
254 extern t_ionbal ionbal;
255 
256 #endif /* IONBAL_H_ */
double ** DR_Badnell_rate_coef
Definition: ionbal.h:200
double ** RR_Badnell_rate_coef
Definition: ionbal.h:200
bool lgTrimhiOn
Definition: ionbal.h:90
long int nCompRecoilElec[LIMELM]
Definition: ionbal.h:184
realnum ** GrainDestr
Definition: ionbal.h:221
bool lgNewTrim
Definition: ionbal.h:96
double ** UTA_heat_rate
Definition: ionbal.h:176
double ** CompRecoilIonRate
Definition: ionbal.h:162
double ** CompRecoilHeatRate
Definition: ionbal.h:168
double CosRayHeatNeutralParticles
Definition: ionbal.h:131
double ** RR_Verner_rate_coef
Definition: ionbal.h:213
const char * chName() const
Definition: ionbal.h:69
long int ilthn
Definition: ionbal.h:242
bool lgPhotoIoniz_On
Definition: ionbal.h:117
void ion_solver(long int nelem, bool lgPrintIt)
Definition: ion_solver.cpp:59
double elecsrc[LIMELM]
Definition: ionbal.h:248
double ** CompRecoilIonRateSave
Definition: ionbal.h:165
double trimhi
Definition: ionbal.h:83
void ion_recombAGN(FILE *io)
Definition: ion_recomb.cpp:216
double CosRayIonRate
Definition: ionbal.h:127
bool lgRecom_Badnell_print
Definition: ionbal.h:207
void IonNelem(bool lgPrintIt, long int nelem)
Definition: ion_nelem.cpp:9
void comment(t_warnings &)
Definition: ionbal.cpp:188
t_dense dense
Definition: global.cpp:15
double ** ExcitationGround
Definition: ionbal.h:124
double ** RateRecomIso
Definition: ionbal.h:197
double CompHeating_Max
Definition: ionbal.h:186
long int ifail
Definition: ionbal.h:242
double ExtraHeatRate
Definition: ionbal.h:138
double ** RateRecomTot
Definition: ionbal.h:194
void ion_zero(long int nelem)
Definition: ion_zero.cpp:8
void Badnell_rec_init(void)
t_ionbal ionbal
Definition: ionbal.cpp:8
double CosRayHeatThermalElectrons
Definition: ionbal.h:135
double xNeutronHeatRate
Definition: ionbal.h:142
void ion_photo(long int nelem, bool lgPrintIt)
Definition: ion_photo.cpp:27
realnum guess_noise
Definition: ionbal.h:229
double DR_mean_scale[LIMELM]
Definition: ionbal.h:218
double ** UTA_ionize_rate
Definition: ionbal.h:174
float realnum
Definition: cddefines.h:124
void ion_CX(long nelem)
Definition: ion_cx.cpp:11
void ion_recom_calculate(void)
void ion_collis(long int nelem)
Definition: ion_collis.cpp:12
void ion_recomb(bool lgPrintIt, long int nelem)
Definition: ion_recomb.cpp:20
void zero()
Definition: ionbal.cpp:131
realnum ** GrainCreat
Definition: ionbal.h:221
double ** CompRecoilHeatRateSave
Definition: ionbal.h:171
double **** PhotoRate_Shell
Definition: ionbal.h:112
double *** CollIonRate_Ground
Definition: ionbal.h:121
int lgGrainIonRecom
Definition: ionbal.h:226
void alloc()
Definition: ionbal.cpp:10
double ** CX_recomb_rate_used
Definition: ionbal.h:200
double CompRecoilHeatLocal
Definition: ionbal.h:156
const int LIMELM
Definition: cddefines.h:308
double elecsnk[LIMELM]
Definition: ionbal.h:248
double *** RateIoniz
Definition: ionbal.h:180
multi_arr< double, 2 > DR_Badnell_suppress_fact
Definition: ionbal.h:204
bool lgCompRecoil
Definition: ionbal.h:153
double RateIonizTot(long nelem, long ion) const
Definition: ionbal.cpp:224
void IonHelium(void)
Definition: ion_helium.cpp:11
void ion_wrapper(long nelem)
double trimlo
Definition: ionbal.h:83
bool lgNoCota
Definition: ionbal.h:236
double PairProducPhotoRate[3]
Definition: ionbal.h:145
bool lgTrimloOn
Definition: ionbal.h:93
long int ilt
Definition: ionbal.h:242
bool lgDRsup
Definition: ionbal.h:232
Definition: module.h:26
long int ihthn
Definition: ionbal.h:242
realnum CotaRate[LIMELM]
Definition: ionbal.h:239
long int iltln
Definition: ionbal.h:242
double ** RR_rate_coef_used
Definition: ionbal.h:210
long int ** ipCompRecoil
Definition: ionbal.h:159