Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GrainVar Class Reference

#include <grainvar.h>

Collaboration diagram for GrainVar:

Public Member Functions

 GrainVar ()
 
void clear ()
 
bool lgDustOn () const
 

Public Attributes

bool lgWD01
 
bool lgReevaluate
 
bool lgGrainPhysicsOn
 
bool lgAnyDustVary
 
bool lgBakesPAH_heat
 
bool lgNegGrnDrg
 
bool lgDHetOn
 
bool lgQHeatOn
 
bool lgDColOn
 
bool lgGrainElectrons
 
long nCalledGrainDrive
 
vector< string > ReadRecord
 
string chPAH_abundance
 
realnum GrainMetal
 
realnum elmSumAbund [LIMELM]
 
enth_type which_enth [MAT_TOP]
 
zmin_type which_zmin [MAT_TOP]
 
pot_type which_pot [MAT_TOP]
 
ial_type which_ial [MAT_TOP]
 
pe_type which_pe [MAT_TOP]
 
strg_type which_strg [MAT_TOP]
 
H2_type which_H2distr [MAT_TOP]
 
long nzone
 
vector< double > dstab
 
vector< double > dstsc
 
double TotalEden
 
realnum GrnElecDonateMax
 
realnum GrnElecHoldMax
 
double GrnRecomTe
 
long nChrgRequested
 
AEInfo AugerData [LIMELM]
 
realnum GrainChTrRate [LIMELM][LIMELM+1][LIMELM+1]
 
double GasCoolColl
 
double GasHeatPhotoEl
 
double GasHeatTherm
 
double GasHeatNet
 
double GrainHeatSum
 
double GrainHeatLya
 
double GrainHeatDif
 
double GrainHeatInc
 
double GrainHeatCollSum
 
double GrainHeatChem
 
double dHeatdT
 
realnum GrainHeatScaleFactor
 
realnum TotalDustHeat
 
realnum dphmax
 
realnum dclmax
 
double dsttmp [NDEMS]
 
realnum dstAbundThresholdNear
 
realnum dstAbundThresholdFar
 
bool lgQHeatAll
 
bool lgQHPunLast
 
FILE * QHSaveFile
 
double rate_h2_form_grains_used_total
 
vector< realnumGrainEmission
 
vector< realnumGraphiteEmission
 
vector< realnumSilicateEmission
 
vector< GrainBinbin
 

Private Member Functions

void p_clear0 ()
 
void p_clear1 ()
 

Detailed Description

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

Constructor & Destructor Documentation

GrainVar::GrainVar ( )
inline

References p_clear1().

Here is the call graph for this function:

Member Function Documentation

void GrainVar::clear ( )
inline

References p_clear0(), and p_clear1().

Referenced by grid_do(), InitDefaultsPreparse(), and p_clear0().

Here is the call graph for this function:

void GrainVar::p_clear0 ( )
private

References AugerData, bin, clear(), dstab, dstsc, GrainEmission, GraphiteEmission, LIMELM, ReadRecord, and SilicateEmission.

Referenced by clear().

Here is the call graph for this function:

Member Data Documentation

AEInfo GrainVar::AugerData[LIMELM]

store data about energy spectrum of Auger electrons

Referenced by GrainsInit(), InitBinAugerData(), p_clear0(), and ReadAugerData().

string GrainVar::chPAH_abundance

which functions describes the PAH abundances, changed with SET PAH

Referenced by GrnStdDpth(), p_clear1(), and ParseSet().

realnum GrainVar::dclmax

largest local cooling of gas by collisions with grains

Referenced by GrainDrive(), GrainStartIter(), lines_grains(), and PrtComment().

double GrainVar::dHeatdT

gas heating derivative for all grains, in erg/cm^3/s/K

Referenced by GrainChargeTemp(), HeatSum(), and p_clear1().

realnum GrainVar::dphmax

largest fraction of local heating due to grain PE heating

Referenced by GrainDrive(), GrainStartIter(), lines_grains(), and PrtComment().

vector<double> GrainVar::dstab

total absorption cross section, current depl is factored in

Referenced by ContRate(), GrainsInit(), GrainUpdateRadius2(), OpacityAddTotal(), p_clear0(), and SaveDo().

realnum GrainVar::dstAbundThresholdFar

min grain abundance for enabling quantum heating in molecular regions

Referenced by GrainMakeDiffuse(), and p_clear1().

realnum GrainVar::dstAbundThresholdNear

quantum heating physics min grain abundance for enabling quantum heating near I-front

Referenced by GrainMakeDiffuse(), and p_clear1().

vector<double> GrainVar::dstsc

total scattering cross section, current depl and asymmetry factored in

Referenced by GrainsInit(), GrainUpdateRadius2(), OpacityAddTotal(), p_clear0(), and SaveDo().

double GrainVar::dsttmp[NDEMS]
realnum GrainVar::elmSumAbund[LIMELM]

number density of elements summed over all grain bins, at actual depl

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

Referenced by CoolEvaluate(), CoolSave(), GrainChargeTemp(), GrainDrive(), GrainMakeDiffuse(), GrainsInit(), lines_grains(), and SaveDo().

double GrainVar::GasHeatNet

net heating of the gas: PhotoEl + Therm - CoolColl

Referenced by GrainChargeTemp().

double GrainVar::GasHeatPhotoEl

heating of the gas by photoelectric effect of all grains

Referenced by CoolEvaluate(), GrainChargeTemp(), and GrainDrive().

double GrainVar::GasHeatTherm

heating of the gas by thermionic emissions of all grains

Referenced by CoolEvaluate(), and GrainChargeTemp().

realnum GrainVar::GrainChTrRate[LIMELM][LIMELM+1][LIMELM+1]

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

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

Referenced by ContRate(), flxCell(), GrainMakeDiffuse(), GrainsInit(), p_clear0(), and RT_diffuse().

double GrainVar::GrainHeatChem

net amount of energy donated by recombining ions to all grains

Referenced by GrainChargeTemp(), GrainDrive(), and GrainMakeDiffuse().

double GrainVar::GrainHeatCollSum

collisional heating of all grains, added in GraC 0

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

Referenced by GrainChargeTemp(), GrainDrive(), GrainsInit(), and lines_grains().

double GrainVar::GrainHeatInc

heating of all grains by incident continuum, added in GraI 0

Referenced by GrainChargeTemp(), GrainDrive(), GrainsInit(), and lines_grains().

double GrainVar::GrainHeatLya

heating of all grains by Lya, added in GraL 1216

Referenced by GrainChargeTemp(), GrainDrive(), GrainsInit(), and lines_grains().

realnum GrainVar::GrainHeatScaleFactor

scale factor for PE heating as per Allers et al. 2005 (SET GRAINS HEAT)

Referenced by GrainDrive(), GrainMakeDiffuse(), GrainTemperature(), p_clear1(), and ParseSet().

double GrainVar::GrainHeatSum

total heating of all grain types, added in GraT 0

Referenced by GrainChargeTemp(), GrainDrive(), GrainMakeDiffuse(), GrainsInit(), and lines_grains().

realnum GrainVar::GrainMetal

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

Referenced by GrainsInit(), GrainUpdateRadius1(), p_clear1(), and ParseMetal().

vector<realnum> GrainVar::GraphiteEmission

graphite emission from this zone only

Referenced by flxCell(), GrainMakeDiffuse(), GrainsInit(), and p_clear0().

realnum GrainVar::GrnElecDonateMax

largest local fraction of electrons donated by grains

Referenced by GrainDrive(), GrainStartIter(), lines_grains(), and PrtComment().

realnum GrainVar::GrnElecHoldMax

largest local fraction of electrons contained by grains

Referenced by GrainDrive(), GrainStartIter(), lines_grains(), and PrtComment().

double GrainVar::GrnRecomTe

the electron temperature that was used to calculate the recom rates

Referenced by GrainChargeTemp(), GrainsInit(), and NewChargeData().

bool GrainVar::lgAnyDustVary

do any of the grain abundances vary with depth

Referenced by GrainDrive(), GrainsInit(), and p_clear1().

bool GrainVar::lgBakesPAH_heat

turn on simple formula for PAH heating of gas

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

Referenced by GrainCollHeating(), GrainMakeDiffuse(), p_clear1(), ParseCommands(), ParseDont(), and ParseGrain().

bool GrainVar::lgDHetOn

test logic default true, turned off with GRAIN NO HEATING

Referenced by CoolEvaluate(), GrainMakeDiffuse(), GrainTemperature(), p_clear1(), and ParseGrain().

bool GrainVar::lgGrainElectrons

should electrons from/to grains be included in the total electron sum? del true, set false with no grain electrons command

Referenced by ConvBase(), eden_sum(), p_clear1(), and ParseDont().

bool GrainVar::lgGrainPhysicsOn

this is option to turn off all grain physics while leaving the opacity in, set false with no grain physics command

Referenced by ContRate(), ConvPresTempEdenIoniz(), CoolEvaluate(), fill_array(), GrainDrive(), GrainRestartIter(), GrainStartIter(), lines_grains(), mole_h2_grain_form(), p_clear1(), ParseDont(), PrtFinal(), PrtZone(), and RT_diffuse().

bool GrainVar::lgNegGrnDrg

flag set if negative grin drag force encountered

Referenced by GrainDrift(), GrainStartIter(), p_clear1(), and PrtComment().

bool GrainVar::lgQHeatAll

use quantum heating for all grains, WILL BECOME DEFAULT

Referenced by GrainsInit(), and p_clear1().

bool GrainVar::lgQHeatOn

default true, turned off with GRAIN NO QHEAT

Referenced by GrainsInit(), p_clear1(), and ParseDont().

bool GrainVar::lgQHPunLast

only save quantum heating information on last iteration

Referenced by qheat().

bool GrainVar::lgReevaluate

reevaluate keyword on grains cmd => always reevalutae grain conditions during calculation

Referenced by GrainDrive(), p_clear1(), and ParseGrain().

bool GrainVar::lgWD01

use physics as described in Weingartner & Draine (2001)

Referenced by GrainsInit(), InitBinAugerData(), ion_photo(), p_clear1(), ParseDont(), qheat_init(), y0b(), and y2s().

long GrainVar::nCalledGrainDrive

count how many times GrainDrive has been called

Referenced by GrainDrive(), and p_clear1().

long GrainVar::nChrgRequested

number of charge states requested by user, default value is 2

Referenced by GrainBin::p_clear1(), p_clear1(), and SetNChrgStates().

long GrainVar::nzone

grain opacities remember in what zone grain quantities were last updated

Referenced by GrainChargeTemp(), GrainsInit(), and NewChargeData().

FILE* GrainVar::QHSaveFile

file pointer for PUNCH QHEAT command

Referenced by CloseSaveFiles(), qheat(), and SaveFilesInit().

double GrainVar::rate_h2_form_grains_used_total

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

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

Referenced by mie_read_opc(), and p_clear0().

vector<realnum> GrainVar::SilicateEmission

silicate emission from this zone only

Referenced by flxCell(), GrainMakeDiffuse(), GrainsInit(), and p_clear0().

realnum GrainVar::TotalDustHeat

total PE heating integrated over model, erg/s or erg/cm^2/s, actual depl

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

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

Referenced by p_clear1(), and uderiv().

H2_type GrainVar::which_H2distr[MAT_TOP]

defines expression for H2 ro-vib distribution at formation

Referenced by GrainCollHeating(), diatomics::mole_H2_form(), and p_clear1().

ial_type GrainVar::which_ial[MAT_TOP]

defines expression for the inverse attenuation length

Referenced by mie_write_opc(), and p_clear1().

pe_type GrainVar::which_pe[MAT_TOP]

defines expression for the photo-electric effect

Referenced by p_clear1(), y0b01(), and Yfunc().

pot_type GrainVar::which_pot[MAT_TOP]

defines expression for the ionization potential

Referenced by GetPotValues(), and p_clear1().

strg_type GrainVar::which_strg[MAT_TOP]

defines where the emitted spectrum is stored

Referenced by GrainMakeDiffuse(), and p_clear1().

zmin_type GrainVar::which_zmin[MAT_TOP]

defines expression for Z_min

Referenced by GrainsInit(), and p_clear1().


The documentation for this class was generated from the following files: