cloudy
trunk
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
source
grainvar.h
Go to the documentation of this file.
1
/* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
2
* others. For conditions of distribution and use see copyright notice in license.txt */
3
4
#ifndef _GRAINVAR_H_
5
#define _GRAINVAR_H_
6
7
/* grainvar.h */
8
11
#define IGNORE_QUANTUM_HEATING 1
12
14
const
int
NDEMS
= 200;
15
17
const
double
GRAIN_TMIN
= 1.e-3;
18
const
double
GRAIN_TMID
= 5.e3;
19
const
double
GRAIN_TMAX
= 1.2e9;
20
22
const
int
NDUST
= 500;
23
25
const
unsigned
int
NSHL
= 50U;
27
const
int
NCHS
= 30;
29
const
int
NCHRG_DEFAULT
= 2;
30
34
const
int
NQGRID
= 10000;
35
37
const
double
CONSERV_TOL
= 1.e-3;
38
40
typedef
enum
{
41
ENTH_CAR
,
42
ENTH_CAR2
,
43
ENTH_SIL
,
44
ENTH_SIL2
,
45
ENTH_PAH
,
46
ENTH_PAH2
47
}
enth_type
;
48
50
typedef
enum
{
51
ZMIN_CAR
,
52
ZMIN_SIL
,
53
ZMIN_BAKES
54
}
zmin_type
;
55
57
typedef
enum
{
58
POT_CAR
,
59
POT_SIL
60
}
pot_type
;
61
63
typedef
enum
{
64
IAL_CAR
,
65
IAL_SIL
66
}
ial_type
;
67
69
typedef
enum
{
70
PE_CAR
,
71
PE_SIL
72
}
pe_type
;
73
75
typedef
enum
{
76
STRG_CAR
,
77
STRG_SIL
78
}
strg_type
;
79
81
typedef
enum
{
82
H2_ICE
,
83
H2_SIL
,
84
H2_CAR
,
89
H2_TOP
90
}
H2_type
;
91
95
typedef
enum
{
96
MAT_USR
=0,
97
MAT_CAR
,
98
MAT_SIL
,
99
MAT_PAH
,
100
MAT_CAR2
,
101
MAT_SIL2
,
102
MAT_PAH2
,
106
MAT_TOP
107
}
mat_type
;
108
109
typedef
struct
110
{
111
long
nelem
;
112
long
ns
;
113
double
ionPot
;
114
long
ipLo
;
115
flex_arr<realnum>
p
;
116
flex_arr<realnum>
y01
;
117
long
nData
;
118
double
*
AvNr
;
119
double
*
Ener
;
120
valarray< flex_arr<realnum> >
y01A
;
121
}
ShellData
;
122
127
typedef
struct
128
{
129
unsigned
long
nSubShell
;
130
unsigned
long
*
nData
;
131
double
*
IonThres
;
132
double
**
AvNumber
;
133
double
**
Energy
;
134
}
AEInfo
;
135
137
const
int
MAX_READ_RECORDS
= 50;
139
const
int
READ_RECORD_LENGTH
= 200;
140
141
/* >>chng 04 jan 17, introduced the ChargeBin structure, PvH */
142
/* >>chng 04 jan 20, moved cache data from grains.c into gv data structure, PvH */
143
158
typedef
struct
159
{
161
long
DustZ,
162
ipThresInf,
163
ipThresInfVal,
164
nfill
;
165
double
FracPop,
166
Emin,
167
EminInc,
168
PotSurf,
169
PotSurfInc,
170
ThresInf,
171
ThresInfInc,
172
ThresInfVal,
173
ThresSurf,
174
ThresSurfInc,
175
ThresSurfVal
,
176
ThermRate;
177
flex_arr<realnum>
yhat
;
178
flex_arr<realnum>
yhat_primary
;
179
flex_arr<realnum>
ehat
;
180
flex_arr<double>
cs_pdt
;
182
long
RecomZ0[
LIMELM
][
LIMELM
+1];
184
double
eta[
LIMELM
+2],
185
xi[
LIMELM
+2];
187
double
RSum1
;
188
double
RSum2
;
189
double
ESum1a
;
190
double
ESum1b
;
191
double
ESum2
;
194
realnum
tedust
;
195
double
hcon1
;
196
double
hots1
;
197
double
bolflux1
;
198
double
pe1
;
199
flex_arr<double>
fac1
;
200
flex_arr<double>
fac2
;
202
realnum
RecomEn[
LIMELM
][
LIMELM
+1];
203
realnum
ChemEn[
LIMELM
][
LIMELM
+1];
206
double
BolFlux,
207
GrainHeat,
208
GrainHeatColl
,
209
GasHeatPhotoEl,
210
GasHeatTherm,
211
GrainCoolTherm,
212
ChemEnIon,
213
ChemEnH2;
216
double
HeatingRate2
;
218
}
ChargeBin
;
219
234
typedef
struct
235
{
237
bool
lgDustFunc
;
238
bool
lgPAHsInIonizedRegion
;
241
char
chDstLab[13];
242
double
eec
;
243
double
eyc
;
244
realnum
dustp[5],
246
AvRadius,
247
AvArea,
248
AvVol,
249
IntRadius,
250
IntArea,
251
IntVol,
252
elmAbund[
LIMELM
],
253
atomWeight,
254
Tsublimat,
255
DustWorkFcn,
256
BandGap,
257
ThermEff,
258
avDGRatio;
259
mat_type
matType
;
269
realnum
dstfactor,
270
dstAbund,
271
GrnVryDpth
;
273
double
cnv_H_pGR
,
274
cnv_H_pCM3,
275
cnv_CM3_pGR,
276
cnv_CM3_pH,
277
cnv_GR_pH,
278
cnv_GR_pCM3;
281
realnum
EnergyCheck
;
282
long
int
NFPCheck
;
286
double
*dstab1,
287
*pure_sc1,
288
*asym;
291
double
dstems[
NDEMS
],
292
dstslp[
NDEMS
],
293
dstslp2[
NDEMS
];
295
bool
lgTdustConverged
;
296
realnum
tedust,
297
TeGrainMax
,
298
avdust;
306
bool
lgChrgConverged
;
307
long
LowestZg
;
308
unsigned
long
nShells
;
309
long
nfill
;
310
ShellData
*sd[
NSHL
];
311
realnum
*
y0b06
;
312
double
AveDustZ,
313
Capacity,
314
dstpot,
315
dstpotsav,
316
LowestPot,
317
RateUp,
318
RateDn,
319
StickElecNeg,
320
StickElecPos
;
321
realnum
avdpot,
322
le_thres
,
323
*inv_att_len;
324
double
AccomCoef[
LIMELM
];
327
double
BolFlux,
328
GrainCoolTherm,
329
GasHeatPhotoEl,
330
GrainHeat,
331
GrainHeatColl,
332
GrainGasCool,
333
ChemEn,
334
ChemEnH2,
335
thermionic
;
338
bool
lgQHeat,
339
lgUseQHeat
,
340
lgEverQHeat,
341
lgQHTooWide;
342
long
QHeatFailures,
343
qnflux,
344
qnflux2
;
345
double
346
qtmin,
347
qtmin_zone1
,
348
HeatingRate1;
349
double
DustEnth[
NDEMS
],
350
EnthSlp[
NDEMS
],
351
EnthSlp2[
NDEMS
];
354
double
rate_h2_form_grains_HM79
;
355
double
rate_h2_form_grains_CT02
;
356
double
rate_h2_form_grains_used;
360
realnum
DustDftVel
,
361
avdft;
363
long
nChrgOrg
;
364
long
nChrg
;
365
ChargeBin
*chrg[
NCHS
];
367
}
GrainBin
;
368
379
EXTERN
struct
t_gv
380
{
382
bool
lgDustOn
,
383
lgBakes
,
384
lgWD01
,
385
lgReevaluate
,
387
lgGrainPhysicsOn
,
389
lgAnyDustVary
,
390
lgAnyNegCharge
,
391
lgBakesPAH_heat
;
392
bool
lgNegGrnDrg
;
395
bool
lgDHetOn
,
396
lgQHeatOn
;
400
bool
lgDColOn
;
404
bool
lgGrainElectrons
;
405
406
char
ReadRecord
[
MAX_READ_RECORDS
][
READ_RECORD_LENGTH
];
408
long
ReadPtr
;
413
char
chPAH_abundance_fcn
[5];
414
421
realnum
GrainMetal
,
422
elmSumAbund
[
LIMELM
];
426
enth_type
which_enth
[
MAT_TOP
];
427
zmin_type
which_zmin
[
MAT_TOP
];
428
pot_type
which_pot
[
MAT_TOP
];
429
ial_type
which_ial
[
MAT_TOP
];
430
pe_type
which_pe
[
MAT_TOP
];
431
strg_type
which_strg
[
MAT_TOP
];
432
H2_type
which_H2distr
[
MAT_TOP
];
434
realnum
*
anumin
,
435
*
anumax
;
438
long
nfill
,
439
nzone
;
440
double
*
dstab
,
441
*
dstsc
;
446
double
TotalEden
;
448
realnum
GrnElecDonateMax
,
449
GrnElecHoldMax
;
450
realnum
GrnRecomTe
;
451
long
HighestIon
,
452
nChrgRequested
;
454
AEInfo
*
AugerData
[
LIMELM
];
459
realnum
GrainChTrRate
[
LIMELM
][
LIMELM
+1][
LIMELM
+1];
460
462
double
GasCoolColl
,
463
GasHeatPhotoEl
,
464
GasHeatTherm
,
465
GasHeatNet
,
466
GrainHeatSum
,
467
GrainHeatLya
,
468
GrainHeatDif
,
469
GrainHeatInc
,
470
GrainHeatCollSum
,
471
GrainHeatChem
;
473
double
dHeatdT
;
475
realnum
GrainHeatScaleFactor
;
477
realnum
TotalDustHeat
,
478
dphmax
,
479
dclmax
;
482
double
dsttmp
[
NDEMS
];
485
realnum
dstAbundThresholdNear
;
486
realnum
dstAbundThresholdFar
;
487
bool
lgQHeatAll
,
488
lgQHPunLast
;
489
FILE *
QHPunchFile
;
492
double
rate_h2_form_grains_used_total
;
496
realnum
*
GrainEmission
,
497
*
GraphiteEmission
,
498
*
SilicateEmission
;
501
long
int
nBin
;
502
GrainBin
*
bin
[
NDUST
];
504
}
gv
;
505
506
507
#endif
/* _GRAINVAR_H_ */
Generated for cloudy by
1.8.1.2