#include <grainvar.h>
NB NB NB NB NB NB
this is the master data structure for grain physics, it is statically allocated
all entries that depend on grain type should go in the GrainBin structure above
NB NB NB NB NB NB
Definition at line 447 of file grainvar.h.
GrainVar::GrainVar | ( | ) | [inline] |
Definition at line 453 of file grainvar.h.
References p_clear1().
GrainVar::~GrainVar | ( | ) | [inline] |
Definition at line 457 of file grainvar.h.
References p_clear0().
void GrainVar::clear | ( | ) | [inline] |
Definition at line 461 of file grainvar.h.
References p_clear0(), and p_clear1().
Referenced by GrainZero(), grid_do(), and ParseAbundances().
bool GrainVar::lgDustOn | ( | ) | const [inline] |
grain logic < have any grains been switched on ?
Definition at line 468 of file grainvar.h.
References bin.
Referenced by AbundancesPrt(), ContRate(), ConvPresTempEdenIoniz(), CoolEvaluate(), fill_array(), GrainDrive(), GrainRestartIter(), GrainsInit(), GrainStartIter(), ion_photo(), lgNetEdenSrcSmall(), t_mole_global::make_species(), mole_h2_grain_form(), mole_update_species_cache(), OpacityAddTotal(), PrtComment(), PrtFinal(), and RT_diffuse().
void GrainVar::p_clear0 | ( | ) | [private] |
Definition at line 370 of file grains.cpp.
References anumax, anumin, AugerData, bin, dstab, dstsc, GrainEmission, GraphiteEmission, LIMELM, ReadRecord, and SilicateEmission.
Referenced by clear(), and ~GrainVar().
void GrainVar::p_clear1 | ( | ) | [private] |
Definition at line 392 of file grains.cpp.
References AugerData, bin, chPAH_abundance, dHeatdT, dstAbundThresholdFar, dstAbundThresholdNear, ENTH_CAR, ENTH_CAR2, ENTH_PAH, ENTH_PAH2, ENTH_SIL, ENTH_SIL2, GrainChTrRate, GrainHeatScaleFactor, GrainMetal, H2_CAR, H2_SIL, IAL_CAR, IAL_SIL, lgAnyDustVary, lgBakesPAH_heat, lgDColOn, lgDHetOn, lgGrainElectrons, lgGrainPhysicsOn, lgNegGrnDrg, lgQHeatAll, lgQHeatOn, lgReevaluate, lgWD01, LIMELM, MAT_CAR, MAT_CAR2, MAT_PAH, MAT_PAH2, MAT_SIL, MAT_SIL2, nCalledGrainDrive, NCHRG_DEFAULT, nChrgRequested, PE_CAR, PE_SIL, POT_CAR, POT_SIL, STRG_CAR, STRG_SIL, TotalEden, which_enth, which_H2distr, which_ial, which_pe, which_pot, which_strg, which_zmin, ZMIN_CAR, and ZMIN_SIL.
Referenced by clear(), and GrainVar().
vector<realnum> GrainVar::anumax |
anumax[i] = sqrt(anu[i]*anu[i+1])
Definition at line 517 of file grainvar.h.
Referenced by GrainsInit(), p_clear0(), and qheat_init().
vector<realnum> GrainVar::anumin |
anumin[i] = sqrt(anu[i-1]*anu[i])
Definition at line 516 of file grainvar.h.
Referenced by GrainsInit(), p_clear0(), and qheat_init().
store data about energy spectrum of Auger electrons
Definition at line 533 of file grainvar.h.
Referenced by GrainsInit(), InitBinAugerData(), p_clear0(), p_clear1(), and ReadAugerData().
vector<GrainBin*> GrainVar::bin |
per bin grain data pointers to memory allocated for bins
Definition at line 580 of file grainvar.h.
Referenced by AbundancesPrt(), conorm(), elec_esc_length(), GetFracPop(), GetPotValues(), GetProbDistr_HighLimit(), GetProbDistr_LowLimit(), GrainCharge(), GrainChargeTemp(), GrainChrgTransferRates(), GrainCollHeating(), GrainDrift(), GrainDrive(), GrainElecEmis1(), GrainElecRecomb1(), GrainIonColl(), GrainMakeDiffuse(), GrainRestartIter(), GrainScreen(), GrainsInit(), GrainStartIter(), GrainTemperature(), GrainUpdateRadius1(), GrainUpdateRadius2(), GrnStdDpth(), GrnVryDpth(), InitBinAugerData(), InitEmissivities(), InitEnthalpy(), inv_ufunct(), lgCheckMonitors(), lgDustOn(), lines_grains(), mie_read_opc(), diatomics::mole_H2_form(), mole_h2_grain_form(), mole_h_fixup(), mole_update_species_cache(), NewChargeData(), no_atoms(), one_elec(), p_clear0(), p_clear1(), PE_init(), PlanckIntegral(), PrtComment(), PrtFinal(), PrtZone(), qheat(), qheat_init(), radius_increment(), RebinQHeatResults(), SaveDo(), TryDoubleStep(), uderiv(), ufunct(), UpdatePot(), UpdatePot1(), UpdatePot2(), UpdateRecomZ0(), y0b(), y0b01(), y0psa(), y1psa(), and Yfunc().
string GrainVar::chPAH_abundance |
which functions describes the PAH abundances, changed with SET PAH
Definition at line 495 of file grainvar.h.
Referenced by GrnStdDpth(), p_clear1(), and ParseSet().
largest local cooling of gas by collisions with grains
Definition at line 556 of file grainvar.h.
Referenced by GrainDrive(), GrainStartIter(), lines_grains(), and PrtComment().
double GrainVar::dHeatdT |
gas heating derivative for all grains, in erg/cm^3/s/K
Definition at line 552 of file grainvar.h.
Referenced by GrainChargeTemp(), HeatSum(), and p_clear1().
largest fraction of local heating due to grain PE heating
Definition at line 556 of file grainvar.h.
Referenced by GrainDrive(), GrainStartIter(), lines_grains(), and PrtComment().
vector<double> GrainVar::dstab |
total absorption cross section, current depl is factored in
Definition at line 521 of file grainvar.h.
Referenced by ContRate(), GrainsInit(), GrainUpdateRadius2(), OpacityAddTotal(), p_clear0(), and SaveDo().
min grain abundance for enabling quantum heating in molecular regions
Definition at line 565 of file grainvar.h.
Referenced by GrainMakeDiffuse(), and p_clear1().
quantum heating physics min grain abundance for enabling quantum heating near I-front
Definition at line 564 of file grainvar.h.
Referenced by GrainMakeDiffuse(), and p_clear1().
vector<double> GrainVar::dstsc |
total scattering cross section, current depl and asymmetry factored in
Definition at line 522 of file grainvar.h.
Referenced by GrainsInit(), GrainUpdateRadius2(), OpacityAddTotal(), p_clear0(), and SaveDo().
double GrainVar::dsttmp[NDEMS] |
equilibrium temperature grain temperature grid for dstems (in GrainBin)
Definition at line 561 of file grainvar.h.
Referenced by GetProbDistr_HighLimit(), GetProbDistr_LowLimit(), GrainChargeTemp(), GrainTemperature(), InitEmissivities(), InitEnthalpy(), inv_ufunct(), qheat(), RebinQHeatResults(), TryDoubleStep(), and ufunct().
number density of elements summed over all grain bins, at actual depl
Definition at line 503 of file grainvar.h.
Referenced by AbundancesPrt(), GrainsInit(), GrainUpdateRadius1(), and ion_photo().
double GrainVar::GasCoolColl |
heating/cooling balance, all entries are valid for current zone, actual depl, and are in erg/cm^3/s cooling of the gas by collisions with all grains, summed in GrGC 0
Definition at line 541 of file grainvar.h.
Referenced by CoolEvaluate(), CoolSave(), GrainChargeTemp(), GrainDrive(), GrainMakeDiffuse(), GrainsInit(), lines_grains(), and SaveDo().
double GrainVar::GasHeatNet |
net heating of the gas: PhotoEl + Therm - CoolColl
Definition at line 541 of file grainvar.h.
Referenced by GrainChargeTemp().
double GrainVar::GasHeatPhotoEl |
heating of the gas by photoelectric effect of all grains
Definition at line 541 of file grainvar.h.
Referenced by CoolEvaluate(), GrainChargeTemp(), and GrainDrive().
double GrainVar::GasHeatTherm |
heating of the gas by thermionic emissions of all grains
Definition at line 541 of file grainvar.h.
Referenced by CoolEvaluate(), and GrainChargeTemp().
grain surface recombination rate for element nelem, ionization stage "ion-from" to "ion-to" already multiplied by grain area, actual depletion, GrainChTrRate[nelem][ion-from][ion-to], units s^-1, this can be both ionization and neutralization process, so ion-to can be > or < ion-from
Definition at line 538 of file grainvar.h.
Referenced by fill_array(), GrainChargeTemp(), GrainChrgTransferRates(), GrainDrive(), ion_recomb(), iso_level(), lgNetEdenSrcSmall(), p_clear1(), and PrintRates().
vector<realnum> GrainVar::GrainEmission |
grain emission total emission from this zone, per unit vol, for add outward in metfic
Definition at line 575 of file grainvar.h.
Referenced by ContRate(), GrainMakeDiffuse(), GrainsInit(), p_clear0(), RT_diffuse(), and SaveDo().
double GrainVar::GrainHeatChem |
net amount of energy donated by recombining ions to all grains
Definition at line 541 of file grainvar.h.
Referenced by GrainChargeTemp(), GrainDrive(), and GrainMakeDiffuse().
double GrainVar::GrainHeatCollSum |
collisional heating of all grains, added in GraC 0
Definition at line 541 of file grainvar.h.
Referenced by GrainChargeTemp(), GrainDrive(), GrainsInit(), and lines_grains().
double GrainVar::GrainHeatDif |
heating of all grains by all diffuse fields (incl Lya), added in GraD 0
Definition at line 541 of file grainvar.h.
Referenced by GrainChargeTemp(), GrainDrive(), GrainsInit(), and lines_grains().
double GrainVar::GrainHeatInc |
heating of all grains by incident continuum, added in GraI 0
Definition at line 541 of file grainvar.h.
Referenced by GrainChargeTemp(), GrainDrive(), GrainsInit(), and lines_grains().
double GrainVar::GrainHeatLya |
heating of all grains by Lya, added in GraL 1216
Definition at line 541 of file grainvar.h.
Referenced by GrainChargeTemp(), GrainDrive(), GrainsInit(), and lines_grains().
scale factor for PE heating as per Allers et al. 2005 (SET GRAINS HEAT)
Definition at line 554 of file grainvar.h.
Referenced by GrainDrive(), GrainMakeDiffuse(), GrainTemperature(), p_clear1(), and ParseSet().
double GrainVar::GrainHeatSum |
total heating of all grain types, added in GraT 0
Definition at line 541 of file grainvar.h.
Referenced by GrainChargeTemp(), GrainDrive(), GrainMakeDiffuse(), GrainsInit(), and lines_grains().
grain depletion chemical abundances of grains are normalized such that in any given zone the total number density of an element nelem locked up in grains is given by elmSumAbund(nelem) = Sum_over_nd ( elmAbund[nd][nelem]*dstAbund[nd]*dense.hden ) grain depletion factor, from METALS xxx GRAINS command, usually 1
Definition at line 503 of file grainvar.h.
Referenced by GrainsInit(), GrainUpdateRadius1(), p_clear1(), and ParseMetal().
vector<realnum> GrainVar::GraphiteEmission |
graphite emission from this zone only
Definition at line 576 of file grainvar.h.
Referenced by GrainMakeDiffuse(), GrainsInit(), p_clear0(), and SaveDo().
largest local fraction of electrons donated by grains
Definition at line 527 of file grainvar.h.
Referenced by GrainDrive(), GrainStartIter(), lines_grains(), and PrtComment().
largest local fraction of electrons contained by grains
Definition at line 527 of file grainvar.h.
Referenced by GrainDrive(), GrainStartIter(), lines_grains(), and PrtComment().
double GrainVar::GrnRecomTe |
the electron temperature that was used to calculate the recom rates
Definition at line 529 of file grainvar.h.
Referenced by GrainChargeTemp(), GrainsInit(), and NewChargeData().
long GrainVar::HighestIon |
highest ionization stage with non-zero abundance present in the gas
Definition at line 530 of file grainvar.h.
Referenced by GrainChargeTemp(), and UpdateRecomZ0().
do any of the grain abundances vary with depth
Definition at line 472 of file grainvar.h.
Referenced by GrainDrive(), GrainsInit(), and p_clear1().
turn on simple formula for PAH heating of gas
Definition at line 472 of file grainvar.h.
Referenced by CoolEvaluate(), GrainDrive(), GrainMakeDiffuse(), GrainTemperature(), p_clear1(), and ParseSet().
bool GrainVar::lgDColOn |
turn off grain gas collisional energy exchange, set false with NO GRAIN COLLISIONAL ENERGY EXCHANGE default true, turned off with GRAIN NO COOLING
Definition at line 487 of file grainvar.h.
Referenced by GrainCollHeating(), GrainMakeDiffuse(), p_clear1(), ParseCommands(), ParseDont(), and ParseGrain().
bool GrainVar::lgDHetOn |
test logic default true, turned off with GRAIN NO HEATING
Definition at line 482 of file grainvar.h.
Referenced by CoolEvaluate(), GrainMakeDiffuse(), GrainTemperature(), p_clear1(), and ParseGrain().
should electrons from/to grains be included in the total electron sum? del true, set false with no grain electrons command
Definition at line 491 of file grainvar.h.
Referenced by ConvBase(), eden_sum(), p_clear1(), and ParseDont().
this is option to turn off all grain physics while leaving the opacity in, set false with no grain physics command
Definition at line 472 of file grainvar.h.
Referenced by ContRate(), ConvPresTempEdenIoniz(), CoolEvaluate(), fill_array(), GrainDrive(), GrainRestartIter(), GrainStartIter(), lines_grains(), mole_h2_grain_form(), p_clear1(), ParseDont(), PrtFinal(), PrtZone(), and RT_diffuse().
flag set if negative grin drag force encountered
Definition at line 479 of file grainvar.h.
Referenced by GrainDrift(), GrainStartIter(), p_clear1(), and PrtComment().
bool GrainVar::lgQHeatAll |
use quantum heating for all grains, WILL BECOME DEFAULT
Definition at line 566 of file grainvar.h.
Referenced by GrainsInit(), and p_clear1().
bool GrainVar::lgQHeatOn |
default true, turned off with GRAIN NO QHEAT
Definition at line 482 of file grainvar.h.
Referenced by GrainsInit(), p_clear1(), and ParseDont().
only save quantum heating information on last iteration
Definition at line 566 of file grainvar.h.
Referenced by ParseSave(), and qheat().
reevaluate keyword on grains cmd => always reevalutae grain conditions during calculation
Definition at line 472 of file grainvar.h.
Referenced by GrainDrive(), p_clear1(), and ParseGrain().
bool GrainVar::lgWD01 |
use physics as described in Weingartner & Draine (2001)
Definition at line 472 of file grainvar.h.
Referenced by GrainsInit(), InitBinAugerData(), ion_photo(), p_clear1(), ParseDont(), qheat_init(), y0b(), and y2s().
number of charge states requested by user, default value is 2
Definition at line 530 of file grainvar.h.
Referenced by p_clear1(), GrainBin::p_clear1(), and SetNChrgStates().
long GrainVar::nzone |
grain opacities remember in what zone grain quantities were last updated
Definition at line 520 of file grainvar.h.
Referenced by GrainChargeTemp(), GrainsInit(), and NewChargeData().
FILE* GrainVar::QHSaveFile |
file pointer for PUNCH QHEAT command
Definition at line 568 of file grainvar.h.
Referenced by CloseSaveFiles(), ParseSave(), qheat(), and SaveFilesInit().
H2 physics rate H2 forms on grains, summed over bins, units s^-1, actual depl when multiplied with hden, this is formation rate in H2-molecules/cm^3/s
Definition at line 571 of file grainvar.h.
Referenced by diatomics::H2_PunchDo(), lgCheckMonitors(), diatomics::mole_H2_form(), mole_h2_grain_form(), and SaveDo().
vector<string> GrainVar::ReadRecord |
record of all the files read by mie_read_opc
Definition at line 493 of file grainvar.h.
Referenced by mie_read_opc(), and p_clear0().
vector<realnum> GrainVar::SilicateEmission |
silicate emission from this zone only
Definition at line 577 of file grainvar.h.
Referenced by GrainMakeDiffuse(), GrainsInit(), p_clear0(), and SaveDo().
total PE heating integrated over model, erg/s or erg/cm^2/s, actual depl
Definition at line 556 of file grainvar.h.
Referenced by GrainDrive(), GrainStartIter(), lines_grains(), and PrtComment().
double GrainVar::TotalEden |
grain charging contribution to eden from all grain species, a positive number means that the grains contribute to the free electron pool, in cm^-3
Definition at line 525 of file grainvar.h.
Referenced by ConvBase(), eden_sum(), GrainChargeTemp(), GrainDrive(), lines_grains(), p_clear1(), and SaveDo().
enth_type GrainVar::which_enth[MAT_TOP] |
these arrays define the physical properties of material MAT_PAH, MAT_CAR, MAT_SIL, etc... they are initialized in the constructor defines expression for the enthalpy function
Definition at line 508 of file grainvar.h.
Referenced by p_clear1(), and uderiv().
H2_type GrainVar::which_H2distr[MAT_TOP] |
defines expression for H2 ro-vib distribution at formation
Definition at line 514 of file grainvar.h.
Referenced by GrainCollHeating(), diatomics::mole_H2_form(), and p_clear1().
ial_type GrainVar::which_ial[MAT_TOP] |
defines expression for the inverse attenuation length
Definition at line 511 of file grainvar.h.
Referenced by mie_write_opc(), and p_clear1().
pe_type GrainVar::which_pe[MAT_TOP] |
defines expression for the photo-electric effect
Definition at line 512 of file grainvar.h.
Referenced by p_clear1(), y0b01(), and Yfunc().
pot_type GrainVar::which_pot[MAT_TOP] |
defines expression for the ionization potential
Definition at line 510 of file grainvar.h.
Referenced by GetPotValues(), and p_clear1().
strg_type GrainVar::which_strg[MAT_TOP] |
defines where the emitted spectrum is stored
Definition at line 513 of file grainvar.h.
Referenced by GrainMakeDiffuse(), and p_clear1().
zmin_type GrainVar::which_zmin[MAT_TOP] |
defines expression for Z_min
Definition at line 509 of file grainvar.h.
Referenced by GrainsInit(), and p_clear1().