cloudy trunk
Loading...
Searching...
No Matches
GrainVar Class Reference

#include <grainvar.h>

Collaboration diagram for GrainVar:

Public Member Functions

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

Data Fields

bool lgWD01
bool lgReevaluate
bool lgGrainPhysicsOn
bool lgAnyDustVary
bool lgBakesPAH_heat
bool lgNegGrnDrg
bool lgDHetOn
bool lgQHeatOn
bool lgDColOn
bool lgGrainElectrons
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]
vector< realnumanumin
vector< realnumanumax
long nzone
vector< double > dstab
vector< double > dstsc
double TotalEden
realnum GrnElecDonateMax
realnum GrnElecHoldMax
double GrnRecomTe
long HighestIon
long nChrgRequested
AEInfoAugerData [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< GrainBin * > bin

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

Definition at line 450 of file grainvar.h.

Constructor & Destructor Documentation

◆ GrainVar()

GrainVar::GrainVar ( )
inline

Definition at line 456 of file grainvar.h.

References p_clear1().

Here is the call graph for this function:

◆ ~GrainVar()

GrainVar::~GrainVar ( )
inline

Definition at line 460 of file grainvar.h.

References p_clear0().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void GrainVar::clear ( )
inline

Definition at line 464 of file grainvar.h.

References p_clear0(), and p_clear1().

Here is the call graph for this function:

◆ lgDustOn()

bool GrainVar::lgDustOn ( ) const
inline

grain logic < have any grains been switched on ?

Definition at line 471 of file grainvar.h.

References bin.

◆ p_clear0()

void GrainVar::p_clear0 ( )
private

Definition at line 366 of file grains.cpp.

References anumax, anumin, AugerData, bin, dstab, dstsc, GrainEmission, GraphiteEmission, LIMELM, ReadRecord, and SilicateEmission.

Referenced by clear(), and ~GrainVar().

◆ p_clear1()

Field Documentation

◆ anumax

vector<realnum> GrainVar::anumax

anumax[i] = sqrt(anu[i]*anu[i+1])

Definition at line 520 of file grainvar.h.

Referenced by p_clear0().

◆ anumin

vector<realnum> GrainVar::anumin

anumin[i] = sqrt(anu[i-1]*anu[i])

Definition at line 519 of file grainvar.h.

Referenced by p_clear0().

◆ AugerData

AEInfo* GrainVar::AugerData[LIMELM]

store data about energy spectrum of Auger electrons

Definition at line 536 of file grainvar.h.

Referenced by p_clear0(), and p_clear1().

◆ bin

vector<GrainBin*> GrainVar::bin

per bin grain data pointers to memory allocated for bins

Definition at line 583 of file grainvar.h.

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

◆ chPAH_abundance

string GrainVar::chPAH_abundance

which functions describes the PAH abundances, changed with SET PAH

Definition at line 498 of file grainvar.h.

Referenced by p_clear1().

◆ dclmax

realnum GrainVar::dclmax

largest local cooling of gas by collisions with grains

Definition at line 561 of file grainvar.h.

◆ dHeatdT

double GrainVar::dHeatdT

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

Definition at line 555 of file grainvar.h.

Referenced by p_clear1().

◆ dphmax

realnum GrainVar::dphmax

largest fraction of local heating due to grain PE heating

Definition at line 560 of file grainvar.h.

◆ dstab

vector<double> GrainVar::dstab

total absorption cross section, current depl is factored in

Definition at line 524 of file grainvar.h.

Referenced by p_clear0().

◆ dstAbundThresholdFar

realnum GrainVar::dstAbundThresholdFar

min grain abundance for enabling quantum heating in molecular regions

Definition at line 568 of file grainvar.h.

Referenced by p_clear1().

◆ dstAbundThresholdNear

realnum GrainVar::dstAbundThresholdNear

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

Definition at line 567 of file grainvar.h.

Referenced by p_clear1().

◆ dstsc

vector<double> GrainVar::dstsc

total scattering cross section, current depl and asymmetry factored in

Definition at line 525 of file grainvar.h.

Referenced by p_clear0().

◆ dsttmp

double GrainVar::dsttmp[NDEMS]

equilibrium temperature grain temperature grid for dstems (in GrainBin)

Definition at line 564 of file grainvar.h.

◆ elmSumAbund

realnum GrainVar::elmSumAbund[LIMELM]

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

Definition at line 507 of file grainvar.h.

◆ GasCoolColl

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 544 of file grainvar.h.

◆ GasHeatNet

double GrainVar::GasHeatNet

net heating of the gas: PhotoEl + Therm - CoolColl

Definition at line 547 of file grainvar.h.

◆ GasHeatPhotoEl

double GrainVar::GasHeatPhotoEl

heating of the gas by photoelectric effect of all grains

Definition at line 545 of file grainvar.h.

◆ GasHeatTherm

double GrainVar::GasHeatTherm

heating of the gas by thermionic emissions of all grains

Definition at line 546 of file grainvar.h.

◆ GrainChTrRate

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

Definition at line 541 of file grainvar.h.

Referenced by p_clear1().

◆ GrainEmission

vector<realnum> GrainVar::GrainEmission

grain emission total emission from this zone, per unit vol, for add outward in metfic

Definition at line 578 of file grainvar.h.

Referenced by p_clear0().

◆ GrainHeatChem

double GrainVar::GrainHeatChem

net amount of energy donated by recombining ions to all grains

Definition at line 553 of file grainvar.h.

◆ GrainHeatCollSum

double GrainVar::GrainHeatCollSum

collisional heating of all grains, added in GraC 0

Definition at line 552 of file grainvar.h.

◆ GrainHeatDif

double GrainVar::GrainHeatDif

heating of all grains by all diffuse fields (incl Lya), added in GraD 0

Definition at line 550 of file grainvar.h.

◆ GrainHeatInc

double GrainVar::GrainHeatInc

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

Definition at line 551 of file grainvar.h.

◆ GrainHeatLya

double GrainVar::GrainHeatLya

heating of all grains by Lya, added in GraL 1216

Definition at line 549 of file grainvar.h.

◆ GrainHeatScaleFactor

realnum GrainVar::GrainHeatScaleFactor

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

Definition at line 557 of file grainvar.h.

Referenced by p_clear1().

◆ GrainHeatSum

double GrainVar::GrainHeatSum

total heating of all grain types, added in GraT 0

Definition at line 548 of file grainvar.h.

◆ GrainMetal

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

Definition at line 506 of file grainvar.h.

Referenced by p_clear1().

◆ GraphiteEmission

vector<realnum> GrainVar::GraphiteEmission

graphite emission from this zone only

Definition at line 579 of file grainvar.h.

Referenced by p_clear0().

◆ GrnElecDonateMax

realnum GrainVar::GrnElecDonateMax

largest local fraction of electrons donated by grains

Definition at line 530 of file grainvar.h.

◆ GrnElecHoldMax

realnum GrainVar::GrnElecHoldMax

largest local fraction of electrons contained by grains

Definition at line 531 of file grainvar.h.

◆ GrnRecomTe

double GrainVar::GrnRecomTe

the electron temperature that was used to calculate the recom rates

Definition at line 532 of file grainvar.h.

◆ HighestIon

long GrainVar::HighestIon

highest ionization stage with non-zero abundance present in the gas

Definition at line 533 of file grainvar.h.

◆ lgAnyDustVary

bool GrainVar::lgAnyDustVary

do any of the grain abundances vary with depth

Definition at line 480 of file grainvar.h.

Referenced by p_clear1().

◆ lgBakesPAH_heat

bool GrainVar::lgBakesPAH_heat

turn on simple formula for PAH heating of gas

Definition at line 481 of file grainvar.h.

Referenced by p_clear1().

◆ lgDColOn

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 490 of file grainvar.h.

Referenced by p_clear1().

◆ lgDHetOn

bool GrainVar::lgDHetOn

test logic default true, turned off with GRAIN NO HEATING

Definition at line 485 of file grainvar.h.

Referenced by p_clear1().

◆ lgGrainElectrons

bool GrainVar::lgGrainElectrons

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

Definition at line 494 of file grainvar.h.

Referenced by p_clear1().

◆ lgGrainPhysicsOn

bool GrainVar::lgGrainPhysicsOn

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

Definition at line 478 of file grainvar.h.

Referenced by p_clear1().

◆ lgNegGrnDrg

bool GrainVar::lgNegGrnDrg

flag set if negative grin drag force encountered

Definition at line 482 of file grainvar.h.

Referenced by p_clear1().

◆ lgQHeatAll

bool GrainVar::lgQHeatAll

use quantum heating for all grains, WILL BECOME DEFAULT

Definition at line 569 of file grainvar.h.

Referenced by p_clear1().

◆ lgQHeatOn

bool GrainVar::lgQHeatOn

default true, turned off with GRAIN NO QHEAT

Definition at line 486 of file grainvar.h.

Referenced by p_clear1().

◆ lgQHPunLast

bool GrainVar::lgQHPunLast

only save quantum heating information on last iteration

Definition at line 570 of file grainvar.h.

◆ lgReevaluate

bool GrainVar::lgReevaluate

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

Definition at line 476 of file grainvar.h.

Referenced by p_clear1().

◆ lgWD01

bool GrainVar::lgWD01

use physics as described in Weingartner & Draine (2001)

Definition at line 475 of file grainvar.h.

Referenced by p_clear1().

◆ nChrgRequested

long GrainVar::nChrgRequested

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

Definition at line 534 of file grainvar.h.

Referenced by p_clear1().

◆ nzone

long GrainVar::nzone

grain opacities remember in what zone grain quantities were last updated

Definition at line 523 of file grainvar.h.

◆ QHSaveFile

FILE* GrainVar::QHSaveFile

file pointer for PUNCH QHEAT command

Definition at line 571 of file grainvar.h.

◆ rate_h2_form_grains_used_total

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

Definition at line 574 of file grainvar.h.

◆ ReadRecord

vector<string> GrainVar::ReadRecord

record of all the files read by mie_read_opc

Definition at line 496 of file grainvar.h.

Referenced by p_clear0().

◆ SilicateEmission

vector<realnum> GrainVar::SilicateEmission

silicate emission from this zone only

Definition at line 580 of file grainvar.h.

Referenced by p_clear0().

◆ TotalDustHeat

realnum GrainVar::TotalDustHeat

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

Definition at line 559 of file grainvar.h.

◆ TotalEden

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 528 of file grainvar.h.

Referenced by p_clear1().

◆ which_enth

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 511 of file grainvar.h.

Referenced by p_clear1().

◆ which_H2distr

H2_type GrainVar::which_H2distr[MAT_TOP]

defines expression for H2 ro-vib distribution at formation

Definition at line 517 of file grainvar.h.

Referenced by p_clear1().

◆ which_ial

ial_type GrainVar::which_ial[MAT_TOP]

defines expression for the inverse attenuation length

Definition at line 514 of file grainvar.h.

Referenced by p_clear1().

◆ which_pe

pe_type GrainVar::which_pe[MAT_TOP]

defines expression for the photo-electric effect

Definition at line 515 of file grainvar.h.

Referenced by p_clear1().

◆ which_pot

pot_type GrainVar::which_pot[MAT_TOP]

defines expression for the ionization potential

Definition at line 513 of file grainvar.h.

Referenced by p_clear1().

◆ which_strg

strg_type GrainVar::which_strg[MAT_TOP]

defines where the emitted spectrum is stored

Definition at line 516 of file grainvar.h.

Referenced by p_clear1().

◆ which_zmin

zmin_type GrainVar::which_zmin[MAT_TOP]

defines expression for Z_min

Definition at line 512 of file grainvar.h.

Referenced by p_clear1().


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