cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 {
47 } enth_type;
48 
50 typedef enum {
54 } zmin_type;
55 
57 typedef enum {
60 } pot_type;
61 
63 typedef enum {
66 } ial_type;
67 
69 typedef enum {
72 } pe_type;
73 
75 typedef enum {
78 } strg_type;
79 
81 typedef enum {
90 } H2_type;
91 
95 typedef enum {
96  MAT_USR=0,
107 } mat_type;
108 
109 typedef struct
110 {
111  long nelem;
112  long ns;
113  double ionPot;
114  long ipLo;
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;
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;
195  double hcon1;
196  double hots1;
197  double bolflux1;
198  double pe1;
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;
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;
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;
282  long int NFPCheck;
286  double *dstab1,
287  *pure_sc1,
288  *asym;
291  double dstems[NDEMS],
292  dstslp[NDEMS],
293  dstslp2[NDEMS];
296  realnum tedust,
297  TeGrainMax,
298  avdust;
307  long LowestZg;
308  unsigned long nShells;
309  long nfill;
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];
356  double rate_h2_form_grains_used;
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,
389  lgAnyDustVary,
392  bool lgNegGrnDrg;
395  bool lgDHetOn,
396  lgQHeatOn;
400  bool lgDColOn;
405 
408  long ReadPtr;
414 
435  *anumax;
438  long nfill,
439  nzone;
440  double *dstab,
441  *dstsc;
446  double TotalEden;
451  long HighestIon,
460 
462  double GasCoolColl,
464  GasHeatTherm,
465  GasHeatNet,
466  GrainHeatSum,
467  GrainHeatLya,
468  GrainHeatDif,
469  GrainHeatInc,
471  GrainHeatChem;
473  double dHeatdT;
478  dphmax,
479  dclmax;
482  double dsttmp[NDEMS];
487  bool lgQHeatAll,
488  lgQHPunLast;
489  FILE *QHPunchFile;
501  long int nBin;
504 } gv;
505 
506 
507 #endif /* _GRAINVAR_H_ */

Generated for cloudy by doxygen 1.8.1.1