00001
00002
00003
00004
00007 #define IGNORE_QUANTUM_HEATING 1
00008
00010 #define NDEMS 200L
00011
00013 #define GRAIN_TMIN 1.e-3
00014 #define GRAIN_TMID 5.e3
00015 #define GRAIN_TMAX 1.2e9
00016
00018 #define NDUST 500L
00019
00021 #define NCHS 30L
00022
00023 #define NCHRG_DEFAULT 2L
00024
00028 #define NQGRID 10000L
00029
00031 #define CONSERV_TOL 1.e-3
00032
00034 typedef enum {
00035 ENTH_CAR,
00036 ENTH_CAR2,
00037 ENTH_SIL,
00038 ENTH_SIL2,
00039 ENTH_PAH,
00040 ENTH_PAH2
00041 } enth_type;
00042
00044 typedef enum {
00045 ZMIN_CAR,
00046 ZMIN_SIL,
00047 ZMIN_BAKES
00048 } zmin_type;
00049
00051 typedef enum {
00052 POT_CAR,
00053 POT_SIL
00054 } pot_type;
00055
00057 typedef enum {
00058 IAL_CAR,
00059 IAL_SIL
00060 } ial_type;
00061
00063 typedef enum {
00064 PE_CAR,
00065 PE_SIL
00066 } pe_type;
00067
00069 typedef enum {
00070 STRG_CAR,
00071 STRG_SIL
00072 } strg_type;
00073
00075 typedef enum {
00076 H2_ICE,
00077 H2_SIL,
00078 H2_CAR,
00083 H2_TOP
00084 } H2_type;
00085
00089 typedef enum {
00090 MAT_USR=0,
00091 MAT_CAR,
00092 MAT_SIL,
00093 MAT_PAH,
00094 MAT_CAR2,
00095 MAT_SIL2,
00096 MAT_PAH2,
00100 MAT_TOP
00101 } mat_type;
00102
00104 #define MAX_READ_RECORDS 50L
00105
00106 #define READ_RECORD_LENGTH 200L
00107
00108
00109
00110
00125 typedef struct
00126 {
00128 long DustZ,
00129 ipThresInf,
00130 ipThresInfVal,
00131 nfill;
00132 double FracPop,
00133 PotSurf,
00134 PotSurfInc,
00135 ThresInf,
00136 ThresInfInc,
00137 ThresInfVal,
00138 ThresSurf,
00139 ThresSurfInc,
00140 ThresSurfVal,
00141 ThermRate;
00142 float *yhat;
00143 double *cs_pdt;
00145 long RecomZ0[LIMELM][LIMELM+1];
00147 double eta[LIMELM+2],
00148 xi[LIMELM+2];
00150 double RSum1;
00151 double RSum2;
00152 double ESum1a;
00153 double ESum1b;
00154 double ESum1c;
00155 double ESum2;
00158 float tedust;
00159 double hcon1;
00160 double hots1;
00161 double bolflux1;
00162 double pe1;
00163 double *fac1;
00164 double *fac2;
00166 float RecomEn[LIMELM][LIMELM+1];
00167 float ChemEn[LIMELM][LIMELM+1];
00170 double BolFlux,
00171 GrainHeat,
00172 GrainHeatColl,
00173 GasHeatPhotoEl,
00174 GasHeatTherm,
00175 GrainCoolTherm,
00176 ChemEnIon,
00177 ChemEnH2;
00180 double HeatingRate2;
00182 } ChargeBin;
00183
00198 typedef struct
00199 {
00201 bool lgDustFunc;
00202 bool lgPAHsInIonizedRegion;
00205 char chDstLab[13];
00206 float dustp[5],
00208 AvRadius,
00209 AvArea,
00210 AvVol,
00211 IntRadius,
00212 IntArea,
00213 IntVol,
00214 elmAbund[LIMELM],
00215 atomWeight,
00216 Tsublimat,
00217 DustWorkFcn,
00218 BandGap,
00219 ThermEff,
00220 avDGRatio;
00221 mat_type matType;
00231 float dstfactor,
00232 dstAbund;
00233 double cnv_H_pGR,
00234 cnv_H_pCM3,
00235 cnv_CM3_pGR,
00236 cnv_CM3_pH,
00237 cnv_GR_pH,
00238 cnv_GR_pCM3;
00241 float EnergyCheck;
00242 long int NFPCheck;
00246 double *dstab1,
00247 *pure_sc1,
00248 *asym;
00251 double dstems[NDEMS],
00252 dstslp[NDEMS],
00253 dstslp2[NDEMS];
00255 bool lgTdustConverged;
00256 float tedust,
00257 TeGrainMax,
00258 avdust;
00266 bool lgChrgConverged;
00267 long LowestZg;
00268 double AveDustZ,
00269 Capacity,
00270 dstpot,
00271 dstpotsav,
00272 LowestPot,
00273 RateUp,
00274 RateDn,
00275 StickElecNeg,
00276 StickElecPos;
00277 float avdpot,
00278 *y1,
00279 *inv_att_len;
00280 double AccomCoef[LIMELM];
00283 double BolFlux,
00284 GrainCoolTherm,
00285 GasHeatPhotoEl,
00286 GrainHeat,
00287 GrainHeatColl,
00288 GrainGasCool,
00289 ChemEn,
00290 ChemEnH2,
00291 thermionic;
00294 bool lgQHeat,
00295 lgUseQHeat,
00296 lgEverQHeat,
00297 lgQHTooWide;
00298 long QHeatFailures,
00299 qnflux,
00300 qnflux2;
00301 double
00302 qtmin,
00303 qtmin_zone1,
00304 HeatingRate1;
00305 double DustEnth[NDEMS],
00306 EnthSlp[NDEMS],
00307 EnthSlp2[NDEMS];
00310 double rate_h2_form_grains_HM79;
00311 double rate_h2_form_grains_CT02;
00312 double rate_h2_form_grains_used;
00316 float DustDftVel,
00317 avdft;
00319 long nChrgOrg;
00320 long nChrg;
00321 ChargeBin *chrg[NCHS];
00323 } GrainBin;
00324
00335 EXTERN struct t_gv
00336 {
00338 bool lgDustOn,
00339 lgBakes,
00340 lgReevaluate,
00342 lgGrainPhysicsOn,
00344 lgAnyDustVary,
00345 lgAnyNegCharge,
00346 lgBakesPAH_heat;
00349 bool lgDHetOn,
00350 lgQHeatOn;
00354 bool lgDColOn;
00358 bool lgGrainElectrons;
00359
00360 char ReadRecord[MAX_READ_RECORDS][READ_RECORD_LENGTH];
00362 long ReadPtr;
00367 char chPAH_abundance_fcn[5];
00368
00375 float GrainMetal,
00376 elmSumAbund[LIMELM];
00380 enth_type which_enth[MAT_TOP];
00381 zmin_type which_zmin[MAT_TOP];
00382 pot_type which_pot[MAT_TOP];
00383 ial_type which_ial[MAT_TOP];
00384 pe_type which_pe[MAT_TOP];
00385 strg_type which_strg[MAT_TOP];
00386 H2_type which_H2distr[MAT_TOP];
00388 float *anumin,
00389 *anumax;
00392 long nfill,
00393 nzone;
00394 double *dstab,
00395 *dstsc;
00400 double TotalEden;
00402 float GrnElecDonateMax,
00403 GrnElecHoldMax;
00404 float GrnRecomTe;
00405 long HighestIon,
00406 nChrgRequested;
00411 float GrainChTrRate[LIMELM][LIMELM+1][LIMELM+1];
00412
00414 double GasCoolColl,
00415 GasHeatPhotoEl,
00416 GasHeatTherm,
00417 GasHeatNet,
00418 GrainHeatSum,
00419 GrainHeatLya,
00420 GrainHeatDif,
00421 GrainHeatInc,
00422 GrainHeatCollSum,
00423 GrainHeatChem;
00425 double dHeatdT;
00427 float GrainHeatScaleFactor;
00429 float TotalDustHeat,
00430 dphmax,
00431 dclmax;
00434 double dsttmp[NDEMS];
00438 float dstAbundThresholdNear;
00439 float dstAbundThresholdFar;
00440 bool lgQHeatAll,
00441 lgQHPunLast;
00442 FILE *QHPunchFile;
00445 double rate_h2_form_grains_used_total;
00449 float *GrainEmission,
00450 *GraphiteEmission ,
00451 *SilicateEmission;
00454 long int nBin;
00455 GrainBin *bin[NDUST];
00458 bool lgNegGrnDrg;
00459
00460 } gv;
00461