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

#include <grainvar.h>

Public Member Functions

 GrainBin ()
 
void clear ()
 
ChargeBinchrg (long nz)
 
const ChargeBinchrg (long nz) const
 

Public Attributes

df_type nDustFunc
 
bool lgPAHsInIonizedRegion
 
bool lgIterStart
 
char chDstLab [13]
 
double eec
 
double eyc
 
realnum dustp [5]
 
realnum AvRadius
 
realnum AvArea
 
realnum AvVol
 
realnum IntRadius
 
realnum IntArea
 
realnum IntVol
 
realnum elmAbund [LIMELM]
 
realnum atomWeight
 
realnum Tsublimat
 
realnum DustWorkFcn
 
realnum BandGap
 
realnum ThermEff
 
realnum avDGRatio
 
mat_type matType
 
realnum dstfactor
 
realnum dstAbund
 
realnum GrnDpth
 
double cnv_H_pGR
 
double cnv_H_pCM3
 
double cnv_CM3_pGR
 
double cnv_CM3_pH
 
double cnv_GR_pH
 
double cnv_GR_pCM3
 
double RSFCheck
 
vector< double > dstab1
 
vector< double > pure_sc1
 
vector< double > asym
 
vector< double > dstab1_x_anu
 
double dstems [NDEMS]
 
double dstslp [NDEMS]
 
double dstslp2 [NDEMS]
 
bool lgTdustConverged
 
realnum tedust
 
realnum TeGrainMax
 
realnum avdust
 
long LowestZg
 
long nfill
 
vector< ShellDatasd
 
vector< realnumy0b06
 
double AveDustZ
 
long ZloSave
 
double Capacity
 
double dstpot
 
double RateUp
 
double RateDn
 
double StickElecNeg
 
double StickElecPos
 
realnum avdpot
 
realnum le_thres
 
vector< realnuminv_att_len
 
double AccomCoef [LIMELM]
 
double BolFlux
 
double GrainCoolTherm
 
double GasHeatPhotoEl
 
double GrainHeat
 
double GrainHeatColl
 
double GrainGasCool
 
double ChemEn
 
double ChemEnH2
 
double thermionic
 
bool lgQHeat
 
bool lgUseQHeat
 
bool lgEverQHeat
 
bool lgQHTooWide
 
long QHeatFailures
 
long qnflux
 
long qnflux2
 
double qtmin
 
double qtmin_zone1
 
double HeatingRate1
 
double DustEnth [NDEMS]
 
double EnthSlp [NDEMS]
 
double EnthSlp2 [NDEMS]
 
double rate_h2_form_grains_HM79
 
double rate_h2_form_grains_CT02
 
double rate_h2_form_grains_ELRD
 
double rate_h2_form_grains_used
 
realnum DustDftVel
 
realnum avdft
 
long nChrgOrg
 
long nChrg
 
long ichrg [NCHS]
 

Private Member Functions

void p_clear0 ()
 
void p_clear1 ()
 

Private Attributes

vector< ChargeBinpool
 

Detailed Description

NB NB NB NB NB NB

this is the data structure for all grain data that depends on grain type (i.e. all data that can differ from one grain bin to the next),

each data item will be referenced as: gv.bin[nd]->data_item

this structure is allocated for each grain bin at run time.

Data items that are generic for all grain types, or are summed over all grain types, should go in gv below !!

NB NB NB NB NB NB

Constructor & Destructor Documentation

GrainBin::GrainBin ( )
inline

References p_clear1().

Here is the call graph for this function:

Member Function Documentation

ChargeBin& GrainBin::chrg ( long  nz)
inline

References ichrg, and pool.

const ChargeBin& GrainBin::chrg ( long  nz) const
inline

References ichrg, and pool.

void GrainBin::clear ( )
inline

References p_clear0(), and p_clear1().

Here is the call graph for this function:

void GrainBin::p_clear0 ( )
private

References asym, dstab1, dstab1_x_anu, inv_att_len, pool, pure_sc1, sd, and y0b06.

Referenced by clear().

Member Data Documentation

double GrainBin::AccomCoef[LIMELM]

accommodation coefficient, needed for collisional heating of grain

vector<double> GrainBin::asym

asymmetry factor (1-g)

Referenced by p_clear0().

realnum GrainBin::atomWeight

molecular weight per atom, in amu

realnum GrainBin::AvArea

average grain surface area, <4pi*a^2>, in cm^2, CURRENTLY NOT USED

realnum GrainBin::avdft

Integral(vdrift*dReff) for average drift velocity, OUTPUT ONLY

Referenced by p_clear1().

realnum GrainBin::avDGRatio

Integral(D/G*dReff) for average dust to gas ratio, OUTPUT ONLY

Referenced by p_clear1().

realnum GrainBin::avdpot

Integral(Vg*dReff) for average grain potential, OUTPUT ONLY

Referenced by p_clear1().

realnum GrainBin::avdust

Integral(Tdust*dReff) for average equilibrium temperature, OUTPUT ONLY

Referenced by p_clear1().

double GrainBin::AveDustZ

average charge per grain, in electrons

Referenced by p_clear1().

realnum GrainBin::AvRadius

average grain radius, <a^3>/<a^2>, in cm

realnum GrainBin::AvVol

average grain volume, <4/3pi*a^3>, in cm^3

realnum GrainBin::BandGap

gap between valence and conduction band, in Ryd

double GrainBin::BolFlux

heating/cooling balance, all entries are valid for current zone, actual depl, and are in erg/cm^3/s total photon flux absorbed, used for energy conservation test

Referenced by p_clear1().

double GrainBin::Capacity

grain capacity, in Farad/grain

char GrainBin::chDstLab[13]

general information on the grains label for the species

double GrainBin::ChemEn

net amount of energy donated by recombining ions

Referenced by p_clear1().

double GrainBin::ChemEnH2

net amount of energy donated by H2 formation on grain surface

Referenced by p_clear1().

double GrainBin::cnv_CM3_pGR

grain unit conversion, <unit>/cm^3 (actual depl) -> <unit>/grain

Referenced by p_clear1().

double GrainBin::cnv_CM3_pH

grain unit conversion, <unit>/cm^3 (actual depl) -> <unit>/H (default depl)

Referenced by p_clear1().

double GrainBin::cnv_GR_pCM3

grain unit conversion, <unit>/grain -> <unit>/cm^3 (actual depl)

Referenced by p_clear1().

double GrainBin::cnv_GR_pH

grain unit conversion, <unit>/grain -> <unit>/H (default depl)

Referenced by p_clear1().

double GrainBin::cnv_H_pCM3

grain unit conversion, <unit>/H (default depl) -> <unit>/cm^3 (actual depl)

Referenced by p_clear1().

double GrainBin::cnv_H_pGR

grain unit conversion, <unit>/H (default depl) -> <unit>/grain

Referenced by p_clear1().

vector<double> GrainBin::dstab1

>>chng 02 dec 30, separated scattering cross section and asymmetry factor (1-g), NB NB NB – note that pure_sc1 DOES NOT contain the asymmetry factor, while gv.dstsc DOES !!! absorption cross section per grain species, for default depl

Referenced by p_clear0().

vector<double> GrainBin::dstab1_x_anu

helper array, dstab1[i]*anu[i] for default depl

Referenced by p_clear0().

realnum GrainBin::dstAbund

grain abundance in zone, dstfactor*GrainMetal*GrnVryDpth(radius)

Referenced by p_clear1().

double GrainBin::dstems[NDEMS]

equilibrium temperature grain emissivity at dsttmp[], default depl, normalized per H

Referenced by p_clear1().

realnum GrainBin::dstfactor

chemical abundances of grains in elmAbund are defined as follows: e.g. for MgSiFeO4 the oxygen abundance would be given by elmAbund[nd][7] = 4.*dustp[nd][2]*dustp[nd][3]*dustp[nd][4] chemical abundances of grains are normalized such that in any given zone the total fractional abundance of an element Z locked up in grains is given by SumFracAbund(nelem) = Sum_over_nd ( gv.bin[nd]->elmAbund[nelem]*gv.dstAbund[nd] ) grain depletion, normalization conversion factors grain depletion factor, dep from GRAINS command

Referenced by p_clear1().

double GrainBin::dstpot

grain potential in Ryd

Referenced by p_clear1().

double GrainBin::dstslp[NDEMS]

auxiliary array for spline interpolation

Referenced by p_clear1().

double GrainBin::dstslp2[NDEMS]

auxiliary array for inverse spline interpolation

Referenced by p_clear1().

realnum GrainBin::DustDftVel

grain drift grain drift velocity for this zone

Referenced by p_clear1().

double GrainBin::DustEnth[NDEMS]

grain enthalpy at dsttmp[], in Ryd/grain

Referenced by p_clear1().

realnum GrainBin::dustp[5]

0 = specific weight (g/cm^3), 1 = mol. weight (amu), 2 = default abundance, 3 = default depletion, 4 = fraction of the mass in this grain bin

realnum GrainBin::DustWorkFcn

work function, in Ryd

double GrainBin::eec

pow(dustp[0],-0.85), needed for electron esacpe length

realnum GrainBin::elmAbund[LIMELM]

chemical composition, abundance at default depl, see comment below

double GrainBin::EnthSlp[NDEMS]

auxiliary array for spline interpolation

Referenced by p_clear1().

double GrainBin::EnthSlp2[NDEMS]

auxiliary array for inverse spline interpolation

Referenced by p_clear1().

double GrainBin::eyc

1./AvRadius + 1.e7, needed for electron yield

double GrainBin::GasHeatPhotoEl

photoelectric heating of the gas, added in GrGH 0

Referenced by p_clear1().

double GrainBin::GrainCoolTherm

grain cooling due to thermionic emissions, summed over charge states

Referenced by p_clear1().

double GrainBin::GrainGasCool

gas cooling due to collisions with grains

Referenced by p_clear1().

double GrainBin::GrainHeat

total heating of current grain type

Referenced by p_clear1().

double GrainBin::GrainHeatColl

collisional heating of current grain type

Referenced by p_clear1().

realnum GrainBin::GrnDpth

grain abundance scale factor in zone, GrnStdDpth(radius), used by set PAH constant / H0 commands

Referenced by p_clear1().

double GrainBin::HeatingRate1

quantum heating due to molecule/ion collisions, erg/H/s, default depl

Referenced by p_clear1().

long GrainBin::ichrg[NCHS]

list of indices into pool[], the first nChrg values are in use

Referenced by chrg(), and p_clear1().

realnum GrainBin::IntArea

integrated grain surface area Int(4pi*a^2), normalized per H, in cm^2/H

realnum GrainBin::IntRadius

integrated grain radius Int(a), normalized per H, in cm/H

realnum GrainBin::IntVol

integrated grain volume Int(4/3pi*a^3), normalized per H, in cm^3/H

vector<realnum> GrainBin::inv_att_len

inverse attenuation length (in cm)

Referenced by p_clear0().

realnum GrainBin::le_thres

threshold for using X-ray prescription for l_e, in Ryd

Referenced by p_clear1().

bool GrainBin::lgEverQHeat

was quantum heating used in any zone ?

Referenced by p_clear1().

bool GrainBin::lgIterStart

are we converging the grain physics for the first time this iteration?

bool GrainBin::lgPAHsInIonizedRegion

were PAHs present in the ionized region ?

Referenced by p_clear1().

bool GrainBin::lgQHeat

quantum heating physics is quantum heating turned on ?

Referenced by p_clear1().

bool GrainBin::lgQHTooWide

is probability distribution too wide to fit in NQGRID array elements ?

Referenced by p_clear1().

bool GrainBin::lgTdustConverged

is dust temperature converged ?

Referenced by p_clear1().

bool GrainBin::lgUseQHeat

should quantum heating be used for this zone ?

Referenced by p_clear1().

long GrainBin::LowestZg

grain charging, photoelectric effect, thermionic emissions

all charge and energy rates will be calculated by resolving the charge distribution into nChrg integral charge states. To implement this, certain parameters have been moved into the ChargeBin structure, currently limiting the maximum number of charge states the code can handle. For details see: >>refer grain physics van Hoof et al., 2001, ASP Conf. Series 247, p. 353 (astroph/0107183) lowest charge a grain can ever have, in e

Referenced by p_clear1().

mat_type GrainBin::matType

material type, 1 = carbonaceous, 2 = silicate, 3 = PAH, etc...

long GrainBin::nChrg

number of charge states used for the current zone

Referenced by p_clear1().

long GrainBin::nChrgOrg

number of charge states at the start of the iteration

Referenced by p_clear1().

df_type GrainBin::nDustFunc

grain logic has user requested custom grain abundance function ?

Referenced by p_clear1().

long GrainBin::nfill

remember how far the flex_arr's in the ShellData were filled in

Referenced by p_clear1().

vector<ChargeBin> GrainBin::pool
private

pool for storing charge dependent data, includes currently unused bins

Referenced by chrg(), p_clear0(), and p_clear1().

vector<double> GrainBin::pure_sc1

scattering cross section per grain species, for default depl

Referenced by p_clear0().

long GrainBin::QHeatFailures

counter for number of times qheat algorithm failed

Referenced by p_clear1().

long GrainBin::qnflux

like rfield.nflux, but may point to higher energy, for phiTilde and Phi

Referenced by p_clear1().

long GrainBin::qnflux2

like rfield.nflux, only for max electron energy, for phiTilde and Phi

Referenced by p_clear1().

double GrainBin::qtmin

lowest grain temperature used in calculations, set per zone

Referenced by p_clear1().

double GrainBin::qtmin_zone1

lowest grain temperature used in calculations, initial zone

Referenced by p_clear1().

double GrainBin::rate_h2_form_grains_CT02

H2 formation rate, Cazaux & Tielens 02, units s^-1, actual depl

Referenced by p_clear1().

double GrainBin::rate_h2_form_grains_ELRD
      H2 formation rate, Rollig et al. 2013 with Eley-Rideal effect,

units s^-1, actual depl

Referenced by p_clear1().

double GrainBin::rate_h2_form_grains_HM79

H2 physics - each has units s^-1 H2 formation rate, Hollenbach & McKee 79, units s^-1, actual depl

Referenced by p_clear1().

double GrainBin::rate_h2_form_grains_used
      H2 rate actually used, evaluated in hmole.c, units s^-1, actual depl

when multiplied with hden, this is formation rate in H2-molecules/cm^3/s

Referenced by p_clear1().

double GrainBin::RateDn

total charging rate down, used for balance check, in e/cm^2/s

Referenced by p_clear1().

double GrainBin::RateUp

total charging rate up, used for balance check, in e/cm^2/s

Referenced by p_clear1().

double GrainBin::RSFCheck

grain opacities save resolution scale factor for later check

Referenced by p_clear1().

vector<ShellData> GrainBin::sd

specific data for each atomic shell in this grain material

Referenced by p_clear0(), and p_clear1().

double GrainBin::StickElecNeg

sticking efficiency for electrons on negative or neutral grains

Referenced by p_clear1().

double GrainBin::StickElecPos

sticking efficiency for electrons on positive grains

Referenced by p_clear1().

realnum GrainBin::tedust

equilibrium temperature for this zone

Referenced by p_clear1().

realnum GrainBin::TeGrainMax

highest equilibrium temperature as a function of radius

Referenced by p_clear1().

realnum GrainBin::ThermEff

efficiency of thermionic emission, between 0 and 1

double GrainBin::thermionic

heating due to thermionic emission

Referenced by p_clear1().

realnum GrainBin::Tsublimat

sublimation temperature

vector<realnum> GrainBin::y0b06

bulk yield for band according to Eq. 9 of WDB06

Referenced by p_clear0().

long GrainBin::ZloSave

grain charge at the start of the iteration, in e


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