cloudy  trunk
Defines | Functions | Variables
grains.cpp File Reference
#include "cddefines.h"
#include "physconst.h"
#include "atmdat.h"
#include "rfield.h"
#include "hmi.h"
#include "trace.h"
#include "conv.h"
#include "ionbal.h"
#include "thermal.h"
#include "phycon.h"
#include "doppvel.h"
#include "taulines.h"
#include "mole.h"
#include "heavy.h"
#include "thirdparty.h"
#include "dense.h"
#include "ipoint.h"
#include "elementnames.h"
#include "grainvar.h"
#include "grains.h"
Include dependency graph for grains.cpp:

Go to the source code of this file.

Defines

#define FREE_CHECK(PTR)   { ASSERT( PTR != NULL ); free( PTR ); PTR = NULL; }
#define FREE_SAFE(PTR)   { if( PTR != NULL ) free( PTR ); PTR = NULL; }

Functions

double ASINH (double x)
double one_elec (long nd)
double pot2chrg (double x, long nd)
double chrg2pot (double x, long nd)
double elec_esc_length (double e, long nd)
STATIC void ReadAugerData ()
STATIC void InitBinAugerData (long, long, long)
STATIC void GetNextLine (const char *, FILE *, char[])
STATIC void InitEmissivities (void)
STATIC double PlanckIntegral (double, long, long)
STATIC void NewChargeData (long)
STATIC double GrnStdDpth (long)
STATIC void GrainChargeTemp (void)
STATIC void GrainCharge (long, double *)
STATIC double GrainElecRecomb1 (long, long, double *, double *)
STATIC double GrainElecEmis1 (long, long, double *, double *, double *, double *)
STATIC void GrainScreen (long, long, long, double *, double *)
STATIC double ThetaNu (double)
STATIC void UpdatePot (long, long, long, double[], double[])
STATIC void GetFracPop (long, long, double[], double[], long *)
STATIC void UpdatePot1 (long, long, long, long)
STATIC void UpdatePot2 (long, long)
void Yfunc (long, long, double, double, double, double, double, double *, double *, double *, double *)
STATIC double y0b (long, long, long)
STATIC double y0b01 (long, long, long)
STATIC double y0psa (long, long, long, double)
STATIC double y1psa (long, long, double)
double y2pa (double, double, long, double *)
double y2s (double, double, long, double *)
STATIC long HighestIonStage (void)
STATIC void UpdateRecomZ0 (long, long, bool)
STATIC void GetPotValues (long, long, double *, double *, double *, double *, double *, double *, bool)
STATIC void GrainIonColl (long, long, long, long, const double[], const double[], long *, realnum *, realnum *)
STATIC void GrainChrgTransferRates (long)
STATIC void GrainUpdateRadius1 (void)
STATIC void GrainUpdateRadius2 (bool)
STATIC void GrainTemperature (long, realnum *, double *, double *, double *)
STATIC void PE_init (long, long, long, double *, double *, double *, double *, double *, double *, double *)
STATIC void GrainCollHeating (long, realnum *, realnum *)
STATIC double GrnVryDpth (long)
void GrainZero (void)
void GrainStartIter (void)
void GrainRestartIter (void)
void SetNChrgStates (long nChrg)
long NewGrainBin (void)
void ReturnGrainBins (void)
void GrainsInit (void)
STATIC double PlanckIntegral (double tdust, long int nd, long int ip)
STATIC double GrnStdDpth (long int nd)
void GrainDrive (void)
STATIC void GrainCharge (long int nd, double *ThermRatio)
STATIC void GrainIonColl (long int nd, long int nz, long int nelem, long int ion, const double phi_s_up[], const double phi_s_dn[], long *Z0, realnum *ChEn, realnum *ChemEn)
STATIC void GrainTemperature (long int nd, realnum *dccool, double *hcon, double *hots, double *hla)
STATIC void GrainCollHeating (long int nd, realnum *dcheat, realnum *dccool)
void GrainDrift (void)
STATIC double GrnVryDpth (long int nd)

Variables

static const long MAGIC_AUGER_DATA = 20060126L
static const bool INCL_TUNNEL = true
static const bool NO_TUNNEL = false
static const bool ALL_STAGES = true
static long int nCalledGrainDrive
static bool lgGvInitialized = false
static const long NTOP = NDEMS/5
static const double TOLER = CONSERV_TOL/10.
static const long BRACKET_MAX = 50L
static const int NCHU = NCHS/3
static const long CT_LOOP_MAX = 25L
static const long T_LOOP_MAX = 50L
static double HEAT_TOLER = DBL_MAX
static double HEAT_TOLER_BIN = DBL_MAX
static double CHRG_TOLER = DBL_MAX
static const double AC0 = 3.e-9
static const double AC1G = 4.e-8
static const double AC2G = 7.e-8
static const double ETILDE = 2.*SQRT2/EVRYD
static const double THERMCONST = PI4*ELECTRON_MASS*POW2(BOLTZMANN)/POW3(HPLANCK)
static const double STICK_ELEC = 0.5
static const double STICK_ION = 1.0

Define Documentation

#define FREE_CHECK (   PTR)    { ASSERT( PTR != NULL ); free( PTR ); PTR = NULL; }

Definition at line 54 of file grains.cpp.

Referenced by ReturnGrainBins().

#define FREE_SAFE (   PTR)    { if( PTR != NULL ) free( PTR ); PTR = NULL; }

Definition at line 55 of file grains.cpp.

Referenced by ReturnGrainBins().


Function Documentation

double ASINH ( double  x) [inline]

asinh is often present in math libraries, but is not guaranteed by the ANSI C89 standard hence we supply our own version, named ASINH to avoid clashes, which should disappear once C++0x is adopted; its accuracy is better than 100 epsilon (worst around |x| = 9e-3)

Definition at line 33 of file grains.cpp.

References LN_TWO, and pow2().

Referenced by y2s().

Here is the call graph for this function:

double chrg2pot ( double  x,
long  nd 
) [inline]

convert grain charge in electrons into potential in Ryd

Definition at line 131 of file grains.cpp.

References one_elec().

Referenced by GetPotValues(), GrainCharge(), GrainDrive(), GrainsInit(), and UpdatePot1().

Here is the call graph for this function:

double elec_esc_length ( double  e,
long  nd 
) [inline]

mean pathlength travelled by electrons inside the grain, in cm (Eq. 11 of WDB06)

Definition at line 138 of file grains.cpp.

References t_gv::bin, GrainBin::eec, EVRYD, gv, GrainBin::le_thres, and pow3().

Referenced by GrainsInit(), y0psa(), y1psa(), and Yfunc().

Here is the call graph for this function:

STATIC void GetFracPop ( long  nd,
long  Zlo,
double  rate_up[],
double  rate_dn[],
long *  newZlo 
)

Definition at line 2986 of file grains.cpp.

References ASSERT, t_gv::bin, cdEXIT, GrainBin::chDstLab, GrainBin::chrg, DEBUG_ENTRY, fnzone, ChargeBin::FracPop, gv, ioQQQ, GrainBin::LowestZg, MAX2, t_gv::nBin, GrainBin::nChrg, NCHU, ShowMe(), x1, and x2.

Referenced by GrainCharge().

Here is the call graph for this function:

STATIC void GetNextLine ( const char *  chFile,
FILE *  io,
char  chLine[] 
)

Definition at line 1345 of file grains.cpp.

References cdEXIT, DEBUG_ENTRY, FILENAME_PATH_LENGTH_2, ioQQQ, and read_whole_line().

Referenced by ReadAugerData().

Here is the call graph for this function:

STATIC void GetPotValues ( long  nd,
long  Zg,
double *  ThresInf,
double *  ThresInfVal,
double *  ThresSurf,
double *  ThresSurfVal,
double *  PotSurf,
double *  Emin,
bool  lgUseTunnelCorr 
)
STATIC void GrainCharge ( long  ,
double *   
)

Referenced by GrainChargeTemp().

STATIC void GrainCharge ( long int  nd,
double *  ThermRatio 
)
STATIC void GrainChargeTemp ( void  )
Todo:
2 this algorithm might be more efficient with Brent
Todo:
2 should collisional heating/cooling be included here?
Todo:
2 use something like log(ThermRatio) + log(delta) ????
Todo:
2 this algorithm might be more efficient with Brent

Definition at line 1780 of file grains.cpp.

References ASSERT, GrainBin::AveDustZ, t_conv::BadConvIoniz, t_gv::bin, t_conv::chConvIoniz, GrainBin::chDstLab, t_elementnames::chElementSym, GrainBin::ChemEn, GrainBin::ChemEnH2, GrainBin::chrg, CHRG_TOLER, GrainBin::cnv_GR_pCM3, GrainBin::cnv_H_pCM3, conv, ConvFail(), t_thermal::ctot, DEBUG_ENTRY, dense, t_gv::dHeatdT, GrainBin::dstems, GrainBin::dstpot, GrainBin::dstslp2, t_gv::dsttmp, ChargeBin::DustZ, t_dense::eden, elementnames, fnzone, ChargeBin::FracPop, fudge(), t_dense::gas_phase, t_gv::GasCoolColl, t_gv::GasHeatNet, GrainBin::GasHeatPhotoEl, t_gv::GasHeatPhotoEl, t_gv::GasHeatTherm, GRAIN_TMAX, GRAIN_TMIN, GrainCharge(), GrainChrgTransferRates(), t_gv::GrainChTrRate, GrainBin::GrainGasCool, GrainBin::GrainHeat, t_gv::GrainHeatChem, GrainBin::GrainHeatColl, t_gv::GrainHeatCollSum, t_gv::GrainHeatDif, t_gv::GrainHeatInc, t_gv::GrainHeatLya, t_gv::GrainHeatSum, GrainTemperature(), GrainUpdateRadius1(), GrainUpdateRadius2(), t_gv::GrnRecomTe, gv, HEAT_TOLER, HEAT_TOLER_BIN, t_gv::HighestIon, HighestIonStage(), ionbal, t_dense::IonHigh, t_dense::IonLow, ioQQQ, ipHYDROGEN, lgAbort, t_conv::lgConvIoniz, t_trace::lgDustBug, t_dense::lgElmtOn, t_ionbal::lgGrainIonRecom, GrainBin::lgPAHsInIonizedRegion, t_conv::lgSearch, GrainBin::lgTdustConverged, t_trace::lgTrace, LIMELM, MAT_PAH, MAT_PAH2, GrainBin::matType, t_gv::nBin, GrainBin::nChrg, NDEMS, NewChargeData(), nzone, t_gv::nzone, phycon, POW2, splint_safe(), T_LOOP_MAX, t_phycon::te, TE1RYD, GrainBin::tedust, thermal, GrainBin::thermionic, ChargeBin::ThresInf, TOLER, TorF(), t_gv::TotalEden, TotalInsanity(), trace, and t_dense::xIonDense.

Referenced by GrainDrive().

Here is the call graph for this function:

STATIC void GrainChrgTransferRates ( long  nd)
STATIC void GrainCollHeating ( long  ,
realnum ,
realnum  
)

Referenced by GrainTemperature().

STATIC void GrainCollHeating ( long int  nd,
realnum dcheat,
realnum dccool 
)
void GrainDrift ( void  )
void GrainDrive ( void  )

GrainDrive main routine to converge grains thermal solution

Definition at line 1621 of file grains.cpp.

References GrainBin::avdft, GrainBin::avDGRatio, GrainBin::avdpot, GrainBin::avdust, GrainBin::AveDustZ, t_gv::bin, GrainBin::BolFlux, GrainBin::ChemEn, GrainBin::ChemEnH2, GrainBin::chrg, chrg2pot(), conv, t_thermal::ctot, t_gv::dclmax, DEBUG_ENTRY, dense, t_gv::dphmax, GrainBin::dstpot, GrainBin::DustDftVel, ChargeBin::DustZ, t_dense::eden, t_conv::EdenErrorAllowed, EVRYD, fp_equal(), ChargeBin::FracPop, t_dense::gas_phase, t_gv::GasCoolColl, GrainBin::GasHeatPhotoEl, t_gv::GasHeatPhotoEl, GrainChargeTemp(), t_gv::GrainChTrRate, GrainBin::GrainCoolTherm, GrainBin::GrainHeat, t_gv::GrainHeatChem, GrainBin::GrainHeatColl, t_gv::GrainHeatCollSum, t_gv::GrainHeatDif, t_gv::GrainHeatInc, t_gv::GrainHeatLya, t_gv::GrainHeatScaleFactor, t_gv::GrainHeatSum, GrainUpdateRadius1(), GrainUpdateRadius2(), t_gv::GrnElecDonateMax, t_gv::GrnElecHoldMax, gv, t_thermal::heating, hmi, ioQQQ, ipHYDROGEN, t_gv::lgAnyDustVary, t_gv::lgAnyNegCharge, t_gv::lgBakesPAH_heat, t_gv::lgDustOn, GrainBin::lgEverQHeat, t_gv::lgGrainPhysicsOn, GrainBin::lgPAHsInIonizedRegion, t_gv::lgReevaluate, t_conv::lgSearch, GrainBin::lgUseQHeat, LIMELM, t_gv::nBin, nCalledGrainDrive, GrainBin::nChrg, ChargeBin::nfill, t_trace::nTrConvg, nzone, phycon, GrainBin::QHeatFailures, SDIV(), t_phycon::te, ChargeBin::tedust, GrainBin::tedust, GrainBin::TeGrainMax, thermal, GrainBin::thermionic, t_gv::TotalDustHeat, t_gv::TotalEden, trace, and t_hmi::UV_Cont_rel2_Habing_TH85_depth.

Referenced by ConvBase(), and hmole_step().

Here is the call graph for this function:

STATIC double GrainElecEmis1 ( long  nd,
long  nz,
double *  sum1a,
double *  sum1b,
double *  sum2,
double *  sum3 
)
STATIC double GrainElecRecomb1 ( long  nd,
long  nz,
double *  sum1,
double *  sum2 
)
STATIC void GrainIonColl ( long  ,
long  ,
long  ,
long  ,
const double  [],
const double  [],
long *  ,
realnum ,
realnum  
)

Referenced by UpdateRecomZ0().

STATIC void GrainIonColl ( long int  nd,
long int  nz,
long int  nelem,
long int  ion,
const double  phi_s_up[],
const double  phi_s_dn[],
long *  Z0,
realnum ChEn,
realnum ChemEn 
)

Definition at line 3946 of file grains.cpp.

References t_rfield::anu, t_gv::bin, GrainBin::chrg, DEBUG_ENTRY, ChargeBin::DustZ, GetPotValues(), gv, Heavy, t_Heavy::ipHeavy, GrainBin::LowestZg, NO_TUNNEL, and rfield.

Here is the call graph for this function:

void GrainRestartIter ( void  )
STATIC void GrainScreen ( long  ion,
long  nd,
long  nz,
double *  eta,
double *  xi 
)
void GrainsInit ( void  )

startup routine for grains, called before first calculations, but after parsecommands

Todo:
xray - StickElec depends on Te ???? use elec_esc_length(1.5*kTe,nd) ????

Definition at line 585 of file grains.cpp.

References t_rfield::anu, t_gv::anumax, t_gv::anumin, ASSERT, GrainBin::asym, ATOMIC_MASS_UNIT, atoms, GrainBin::atomWeight, t_gv::AugerData, ShellData::AvNr, AEInfo::AvNumber, GrainBin::AvRadius, GrainBin::AvVol, GrainBin::BandGap, t_gv::bin, cdEXIT, GrainBin::chDstLab, GrainBin::chrg, chrg2pot(), CHRG_TOLER, flex_arr< T, lgBC >::clear(), GrainBin::cnv_CM3_pGR, GrainBin::cnv_CM3_pH, GrainBin::cnv_GR_pCM3, GrainBin::cnv_H_pCM3, GrainBin::cnv_H_pGR, t_thermal::ConstGrainTemp, conv, ChargeBin::cs_pdt, DEBUG_ENTRY, dense, t_gv::dstab, GrainBin::dstab1, GrainBin::dstAbund, GrainBin::dstfactor, t_gv::dstsc, GrainBin::dustp, GrainBin::DustWorkFcn, ChargeBin::DustZ, t_conv::EdenErrorAllowed, ChargeBin::ehat, elec_esc_length(), GrainBin::elmAbund, t_gv::elmSumAbund, ShellData::Ener, AEInfo::Energy, EVRYD, ChargeBin::fac1, ChargeBin::fac2, ChargeBin::FracPop, t_dense::gas_phase, t_gv::GasCoolColl, GetPotValues(), t_gv::GrainEmission, t_gv::GrainHeatCollSum, t_gv::GrainHeatDif, t_gv::GrainHeatInc, t_gv::GrainHeatLya, t_gv::GrainHeatSum, t_gv::GrainMetal, t_gv::GraphiteEmission, t_gv::GrnRecomTe, GrnVryDpth(), GrainBin::GrnVryDpth, gv, HEAT_TOLER, HEAT_TOLER_BIN, t_conv::HeatCoolRelErrorAllowed, t_thermal::heating, hunt_bisect(), INCL_TUNNEL, InitBinAugerData(), InitEmissivities(), InitEnthalpy(), GrainBin::IntArea, ShellData::ionPot, AEInfo::IonThres, ioQQQ, ipHYDROGEN, ipLITHIUM, ShellData::ipLo, GrainBin::le_thres, t_gv::lgAnyDustVary, t_gv::lgAnyNegCharge, t_gv::lgBakes, t_trace::lgDustBug, GrainBin::lgDustFunc, t_gv::lgDustOn, GrainBin::lgQHeat, t_gv::lgQHeatAll, t_gv::lgQHeatOn, GrainBin::lgQHTooWide, t_trace::lgTrace, t_gv::lgWD01, LIMELM, GrainBin::LowestPot, GrainBin::LowestZg, MALLOC, MAT_PAH, MAT_PAH2, GrainBin::matType, MAX2, t_gv::nBin, GrainBin::nChrg, NCHS, NCHU, AEInfo::nData, NDUST, ShellData::nelem, ChargeBin::nfill, GrainBin::nfill, t_gv::nfill, t_rfield::nflux, nint(), ShellData::ns, GrainBin::nShells, NSHL, AEInfo::nSubShell, t_rfield::nupper, t_gv::nzone, one_elec(), ShellData::p, pot2chrg(), POW2, GrainBin::pure_sc1, GrainBin::qtmin, GrainBin::qtmin_zone1, ReadAugerData(), rfield, GrainBin::sd, t_gv::SilicateEmission, STICK_ELEC, GrainBin::StickElecNeg, GrainBin::StickElecPos, ChargeBin::tedust, thermal, TorF(), trace, t_gv::which_zmin, ShellData::y01, GrainBin::y0b06, ChargeBin::yhat, ChargeBin::yhat_primary, ZMIN_BAKES, ZMIN_CAR, and ZMIN_SIL.

Referenced by OpacityCreateAll().

Here is the call graph for this function:

void GrainStartIter ( void  )
STATIC void GrainTemperature ( long  ,
realnum ,
double *  ,
double *  ,
double *   
)

Referenced by GrainChargeTemp().

STATIC void GrainTemperature ( long int  nd,
realnum dccool,
double *  hcon,
double *  hots,
double *  hla 
)
STATIC void GrainUpdateRadius1 ( void  )
STATIC void GrainUpdateRadius2 ( bool  lgAnyNegCharge)
void GrainZero ( void  )
STATIC double GrnStdDpth ( long  )

Referenced by GrnVryDpth().

STATIC double GrnStdDpth ( long int  nd)

Definition at line 1578 of file grains.cpp.

References ASSERT, t_gv::bin, t_gv::chPAH_abundance_fcn, DEBUG_ENTRY, dense, t_dense::gas_phase, gv, ipHYDROGEN, MAT_PAH, MAT_PAH2, GrainBin::matType, max(), TotalInsanity(), and t_dense::xIonDense.

Here is the call graph for this function:

STATIC double GrnVryDpth ( long  )

Referenced by GrainsInit(), and GrainUpdateRadius1().

STATIC double GrnVryDpth ( long int  nd)

Definition at line 5071 of file grains.cpp.

References ASSERT, t_gv::bin, DEBUG_ENTRY, dense, t_dense::gas_phase, GrnStdDpth(), gv, ipHYDROGEN, GrainBin::lgDustFunc, and t_dense::xIonDense.

Here is the call graph for this function:

STATIC long HighestIonStage ( void  )

Definition at line 3769 of file grains.cpp.

References DEBUG_ENTRY, dense, t_dense::lgElmtOn, LIMELM, MAX2, and t_dense::xIonDense.

Referenced by GrainChargeTemp().

STATIC void InitBinAugerData ( long  nd,
long  ipBegin,
long  ipEnd 
)
STATIC void InitEmissivities ( void  )
STATIC void NewChargeData ( long  nd)
long NewGrainBin ( void  )
double one_elec ( long  nd) [inline]

evaluate e^2/a, the potential of one electron

Definition at line 118 of file grains.cpp.

References t_gv::bin, GrainBin::Capacity, ELEM_CHARGE, EVRYD, and gv.

Referenced by chrg2pot(), GetPotValues(), GrainsInit(), and pot2chrg().

STATIC void PE_init ( long  nd,
long  nz,
long  i,
double *  cs1,
double *  cs2,
double *  cs_tot,
double *  cool1,
double *  cool2,
double *  ehat1,
double *  ehat2 
)
STATIC double PlanckIntegral ( double  ,
long  ,
long   
)

Referenced by InitEmissivities().

STATIC double PlanckIntegral ( double  tdust,
long int  nd,
long int  ip 
)
double pot2chrg ( double  x,
long  nd 
) [inline]

convert grain potential in Ryd to charge in electrons

Definition at line 124 of file grains.cpp.

References one_elec().

Referenced by GrainsInit().

Here is the call graph for this function:

void ReturnGrainBins ( void  )
void SetNChrgStates ( long  )

this routine is called by ParseSet()

Definition at line 412 of file grains.cpp.

References ASSERT, DEBUG_ENTRY, gv, t_gv::nChrgRequested, and NCHU.

Referenced by ParseSet().

STATIC double ThetaNu ( double  nu)

Definition at line 2844 of file grains.cpp.

References DEBUG_ENTRY, and POW2.

Referenced by GetPotValues(), and GrainScreen().

STATIC void UpdatePot ( long  nd,
long  Zlo,
long  stride,
double  rate_up[],
double  rate_dn[] 
)
STATIC void UpdatePot1 ( long  nd,
long  nz,
long  Zg,
long  ipStart 
)
Todo:
xray - secondaries from incident electrons still need to be added in
Todo:
xray - primary, secondary, auger electrons need to be added into suprathermals

Definition at line 3138 of file grains.cpp.

References ALL_STAGES, flex_arr< T, lgBC >::alloc(), t_rfield::anu, ASSERT, ShellData::AvNr, t_gv::bin, ChargeBin::BolFlux, ChargeBin::bolflux1, ChargeBin::ChemEnH2, ChargeBin::ChemEnIon, GrainBin::chrg, chrg2pot(), GrainBin::cnv_GR_pH, ChargeBin::cs_pdt, DEBUG_ENTRY, GrainBin::DustWorkFcn, ChargeBin::DustZ, ChargeBin::ehat, Ehi, Elo, ChargeBin::Emin, ChargeBin::EminInc, ShellData::Ener, ChargeBin::ESum1a, ChargeBin::ESum1b, ChargeBin::ESum2, ChargeBin::eta, EVRYD, ChargeBin::fac1, ChargeBin::fac2, ChargeBin::FracPop, ChargeBin::GasHeatPhotoEl, ChargeBin::GasHeatTherm, GetPotValues(), ChargeBin::GrainCoolTherm, ChargeBin::GrainHeat, ChargeBin::GrainHeatColl, gv, ChargeBin::hcon1, ChargeBin::HeatingRate2, ChargeBin::hots1, hunt_bisect(), INCL_TUNNEL, ShellData::ionPot, ShellData::ipLo, ChargeBin::ipThresInf, ChargeBin::ipThresInfVal, LIMELM, max(), MAX2, min(), ShellData::nData, ChargeBin::nfill, t_rfield::nflux, NO_TUNNEL, GrainBin::nShells, t_rfield::nupper, ShellData::p, ChargeBin::pe1, PE_init(), ChargeBin::PotSurf, ChargeBin::PotSurfInc, POW2, flex_arr< T, lgBC >::realloc(), flex_arr< T, lgBC >::reserve(), rfield, ChargeBin::RSum1, ChargeBin::RSum2, GrainBin::sd, ChargeBin::tedust, ChargeBin::ThresInf, ChargeBin::ThresInfInc, ChargeBin::ThresInfVal, ChargeBin::ThresSurf, ChargeBin::ThresSurfInc, ChargeBin::ThresSurfVal, UpdateRecomZ0(), ChargeBin::xi, ShellData::y01, ShellData::y01A, y0b(), Yfunc(), ChargeBin::yhat, and ChargeBin::yhat_primary.

Referenced by UpdatePot().

Here is the call graph for this function:

STATIC void UpdatePot2 ( long  nd,
long  nz 
)
STATIC void UpdateRecomZ0 ( long  nd,
long  nz,
bool  lgAllIonStages 
)
STATIC double y0b ( long  nd,
long  nz,
long  i 
)

Definition at line 3491 of file grains.cpp.

References t_rfield::anu, ASSERT, t_gv::bin, DEBUG_ENTRY, EVRYD, gv, t_gv::lgWD01, rfield, y0b01(), and GrainBin::y0b06.

Referenced by UpdatePot1().

Here is the call graph for this function:

STATIC double y0b01 ( long  nd,
long  nz,
long  i 
)
STATIC double y0psa ( long  nd,
long  ns,
long  i,
double  Eel 
)

Definition at line 3559 of file grains.cpp.

References ASSERT, t_gv::bin, DEBUG_ENTRY, elec_esc_length(), gv, GrainBin::inv_att_len, ShellData::ipLo, ShellData::p, and GrainBin::sd.

Referenced by InitBinAugerData().

Here is the call graph for this function:

STATIC double y1psa ( long  nd,
long  i,
double  Eel 
)

Definition at line 3590 of file grains.cpp.

References ASSERT, GrainBin::AvRadius, t_gv::bin, DEBUG_ENTRY, elec_esc_length(), gv, GrainBin::inv_att_len, pow2(), and pow3().

Referenced by InitBinAugerData().

Here is the call graph for this function:

double y2pa ( double  Elo,
double  Ehi,
long  Zg,
double *  Ehp 
) [inline]

Definition at line 3618 of file grains.cpp.

References ASSERT, DEBUG_ENTRY, Ehi, and pow3().

Referenced by Yfunc().

Here is the call graph for this function:

double y2s ( double  Elo,
double  Ehi,
long  Zg,
double *  Ehs 
) [inline]

Definition at line 3662 of file grains.cpp.

References ASINH(), ASSERT, DEBUG_ENTRY, Elo, ETILDE, gv, t_gv::lgWD01, and x2.

Referenced by Yfunc().

Here is the call graph for this function:

void Yfunc ( long  nd,
long  nz,
double  y01,
double  maxval,
double  Elo,
double  Ehi,
double  Eel,
double *  Yp,
double *  Ys,
double *  Ehp,
double *  Ehs 
) [inline]

Definition at line 3436 of file grains.cpp.

References ASSERT, t_gv::bin, cdEXIT, GrainBin::chrg, DEBUG_ENTRY, ChargeBin::DustZ, elec_esc_length(), EVRYD, GrainBin::eyc, gv, ioQQQ, GrainBin::matType, max(), min(), PE_CAR, PE_SIL, t_gv::which_pe, y2pa(), and y2s().

Referenced by UpdatePot1().

Here is the call graph for this function:


Variable Documentation

const double AC0 = 3.e-9 [static]

Definition at line 103 of file grains.cpp.

Referenced by GetPotValues().

const double AC1G = 4.e-8 [static]

Definition at line 104 of file grains.cpp.

Referenced by GetPotValues().

const double AC2G = 7.e-8 [static]

Definition at line 105 of file grains.cpp.

Referenced by GetPotValues().

const bool ALL_STAGES = true [static]

Definition at line 62 of file grains.cpp.

Referenced by UpdatePot1().

const long BRACKET_MAX = 50L [static]

Definition at line 79 of file grains.cpp.

Referenced by GrainCharge().

double CHRG_TOLER = DBL_MAX [static]

Definition at line 96 of file grains.cpp.

Referenced by GrainChargeTemp(), and GrainsInit().

const long CT_LOOP_MAX = 25L [static]

Definition at line 88 of file grains.cpp.

const double ETILDE = 2.*SQRT2/EVRYD [static]

Definition at line 108 of file grains.cpp.

Referenced by y2s().

double HEAT_TOLER = DBL_MAX [static]

Definition at line 94 of file grains.cpp.

Referenced by GrainChargeTemp(), and GrainsInit().

double HEAT_TOLER_BIN = DBL_MAX [static]

Definition at line 95 of file grains.cpp.

Referenced by GrainChargeTemp(), and GrainsInit().

const bool INCL_TUNNEL = true [static]

Definition at line 59 of file grains.cpp.

Referenced by GrainsInit(), UpdatePot1(), and UpdateRecomZ0().

bool lgGvInitialized = false [static]

Definition at line 68 of file grains.cpp.

Referenced by NewGrainBin(), and ReturnGrainBins().

const long MAGIC_AUGER_DATA = 20060126L [static]

Definition at line 57 of file grains.cpp.

Referenced by ReadAugerData().

long int nCalledGrainDrive [static]

Definition at line 66 of file grains.cpp.

Referenced by GrainDrive(), and GrainZero().

const int NCHU = NCHS/3 [static]

Definition at line 83 of file grains.cpp.

Referenced by GetFracPop(), GrainCharge(), GrainsInit(), and SetNChrgStates().

const bool NO_TUNNEL = false [static]

Definition at line 60 of file grains.cpp.

Referenced by GrainIonColl(), UpdatePot1(), and UpdateRecomZ0().

const long NTOP = NDEMS/5 [static]

Definition at line 74 of file grains.cpp.

Referenced by InitEmissivities().

const double STICK_ELEC = 0.5 [static]

Definition at line 114 of file grains.cpp.

Referenced by GrainsInit().

const double STICK_ION = 1.0 [static]
const long T_LOOP_MAX = 50L [static]

Definition at line 91 of file grains.cpp.

Referenced by GrainChargeTemp().

const double THERMCONST = PI4*ELECTRON_MASS*POW2(BOLTZMANN)/POW3(HPLANCK) [static]

Definition at line 111 of file grains.cpp.

Referenced by UpdatePot2().

const double TOLER = CONSERV_TOL/10. [static]

Definition at line 78 of file grains.cpp.

Referenced by GrainChargeTemp(), mie_auxiliary(), and search_limit().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated for cloudy by doxygen 1.7.6.1