cloudy
trunk
|
#include "cddefines.h"
#include "atmdat.h"
#include "atmdat_adfa.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 "heavy.h"
#include "ipoint.h"
#include "elementnames.h"
#include "grainvar.h"
#include "grains.h"
#include "iso.h"
#include "mole.h"
#include "dense.h"
#include "vectorize.h"
Go to the source code of this file.
Macros | |
#define | FREE_CHECK(PTR) { ASSERT( PTR != NULL ); free( PTR ); PTR = NULL; } |
#define | FREE_SAFE(PTR) { if( PTR != NULL ) free( PTR ); PTR = NULL; } |
Functions | |
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 (size_t, long, long) |
STATIC void | GetNextLine (const char *, FILE *, char[]) |
STATIC void | InitEmissivities () |
STATIC double | PlanckIntegral (double, size_t, long) |
STATIC void | NewChargeData (long) |
STATIC double | GrnStdDpth (long) |
STATIC void | GrainChargeTemp () |
STATIC void | GrainCharge (size_t, double *) |
STATIC double | GrainElecRecomb1 (size_t, long, double *, double *) |
STATIC double | GrainElecEmis1 (size_t, long, double *, double *, double *, double *) |
STATIC void | GrainScreen (long, size_t, long, double *, double *) |
STATIC double | ThetaNu (double) |
STATIC void | UpdatePot (size_t, long, long, double[], double[]) |
STATIC void | GetFracPop (size_t, long, double[], double[], long *) |
STATIC void | UpdatePot1 (size_t, long, long, long) |
STATIC void | UpdatePot2 (size_t, long) |
STATIC void | Yfunc (long, long, const realnum[], const realnum[], const realnum[], double, const double[], const double[], realnum[], realnum[], realnum[], realnum[], long, long) |
STATIC void | Yfunc (long, long, const realnum[], const realnum[], double, double, double, realnum[], realnum[], realnum[], realnum[], long, long) |
STATIC void | y0b (size_t, long, realnum[], long, long) |
STATIC void | y0b01 (size_t, long, realnum[], long, long) |
STATIC double | y0psa (size_t, long, long, double) |
STATIC double | y1psa (size_t, long, double) |
void | y2pa (double, const double[], long, realnum[], realnum[], long, long) |
void | y2s (double, const double[], long, const realnum[], realnum[], realnum[], long, long) |
STATIC void | UpdateRecomZ0 (size_t, long) |
STATIC void | GetPotValues (size_t, long, double *, double *, double *, double *, double *, double *, bool) |
STATIC void | GrainIonColl (size_t, long, long, long, const double[], const double[], long *, realnum *, realnum *) |
STATIC void | GrainChrgTransferRates (long) |
STATIC void | GrainUpdateRadius1 () |
STATIC void | GrainUpdateRadius2 () |
STATIC void | GrainTemperature (size_t, realnum *, double *, double *, double *) |
STATIC void | PE_init (size_t, long, long, double *, double *, double *, double *, double *, double *, double *) |
STATIC void | GrainCollHeating (size_t, realnum *, realnum *) |
STATIC double | GrnVryDpth (size_t) |
void | GrainZero () |
void | GrainStartIter () |
void | GrainRestartIter () |
void | SetNChrgStates (long nChrg) |
void | GrainsInit () |
STATIC double | PlanckIntegral (double tdust, size_t nd, long int ip) |
STATIC double | GrnStdDpth (long int nd) |
void | GrainDrive () |
STATIC void | GrainIonColl (size_t 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) |
void | GrainDrift () |
Variables | |
static const long | MAGIC_AUGER_DATA = 20060126L |
static const bool | INCL_TUNNEL = true |
static const bool | NO_TUNNEL = false |
static long int | nCalledGrainDrive |
static const long | NTOP = NDEMS/5 |
static const double | TOLER = CONSERV_TOL/10. |
static const long | BRACKET_MAX = 50L |
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 | INV_ETILDE = 1./ETILDE |
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 FREE_CHECK | ( | PTR | ) | { ASSERT( PTR != NULL ); free( PTR ); PTR = NULL; } |
Definition at line 31 of file grains.cpp.
#define FREE_SAFE | ( | PTR | ) | { if( PTR != NULL ) free( PTR ); PTR = NULL; } |
Definition at line 32 of file grains.cpp.
|
inline |
convert grain charge in electrons into potential in Ryd
Definition at line 100 of file grains.cpp.
References one_elec().
Referenced by GetPotValues(), GrainCharge(), GrainDrive(), and UpdatePot1().
|
inline |
mean pathlength travelled by electrons inside the grain, in cm (Eq. 11 of WDB06)
Definition at line 107 of file grains.cpp.
References GrainVar::bin, gv, and powpq().
Referenced by GrainsInit(), y0psa(), y1psa(), and Yfunc().
STATIC void GetFracPop | ( | size_t | nd, |
long | Zlo, | ||
double | rate_up[], | ||
double | rate_dn[], | ||
long * | newZlo | ||
) |
Definition at line 2934 of file grains.cpp.
References ASSERT, GrainVar::bin, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fnzone, fprintf(), gv, ioQQQ, MAX2, NCHU, safe_div(), ShowMe(), x1, and x2.
Referenced by GrainCharge().
STATIC void GetNextLine | ( | const char * | chFile, |
FILE * | io, | ||
char | chLine[] | ||
) |
Definition at line 1276 of file grains.cpp.
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, FILENAME_PATH_LENGTH_2, fprintf(), ioQQQ, read_whole_line(), and strstr_s().
Referenced by ReadAugerData().
STATIC void GetPotValues | ( | size_t | nd, |
long | Zg, | ||
double * | ThresInf, | ||
double * | ThresInfVal, | ||
double * | ThresSurf, | ||
double * | ThresSurfVal, | ||
double * | PotSurf, | ||
double * | Emin, | ||
bool | lgUseTunnelCorr | ||
) |
Definition at line 3946 of file grains.cpp.
References AC0, AC1G, AC2G, GrainVar::bin, cdEXIT, chrg2pot(), DEBUG_ENTRY, EXIT_FAILURE, fprintf(), gv, ioQQQ, MAX2, one_elec(), POT_CAR, POT_SIL, ThetaNu(), and GrainVar::which_pot.
Referenced by GrainIonColl(), GrainsInit(), UpdatePot1(), and UpdateRecomZ0().
STATIC void GrainCharge | ( | size_t | nd, |
double * | ThermRatio | ||
) |
Definition at line 2221 of file grains.cpp.
References t_mesh::anuptr(), ASSERT, GrainVar::bin, BRACKET_MAX, cdEXIT, chrg2pot(), conv, DEBUG_ENTRY, EXIT_FAILURE, t_rfield::flux, fnzone, fprintf(), GetFracPop(), GrainElecEmis1(), GrainElecRecomb1(), gv, ioQQQ, t_mesh::ipointC(), iteration, t_trace::lgDustBug, t_conv::lgSearch, t_trace::lgTrace, max(), MAX2, NCHS, NCHU, t_rfield::nflux, nint(), pot2chrg(), powi(), reduce_ab_a(), rfield, safe_div(), ShowMe(), TorF(), trace, and UpdatePot().
Referenced by GrainChargeTemp().
STATIC void GrainChargeTemp | ( | ) |
Definition at line 1741 of file grains.cpp.
References ASSERT, GrainVar::bin, t_elementnames::chElementSym, CHRG_TOLER, conv, ConvFail(), t_thermal::ctot, DEBUG_ENTRY, dense, GrainVar::dHeatdT, GrainVar::dsttmp, t_dense::eden, elementnames, fnzone, fp_equal(), fprintf(), fudge(), t_dense::gas_phase, GrainVar::GasCoolColl, GrainVar::GasHeatNet, GrainVar::GasHeatPhotoEl, GrainVar::GasHeatTherm, GRAIN_TMAX, GRAIN_TMIN, GrainCharge(), GrainChrgTransferRates(), GrainVar::GrainChTrRate, GrainVar::GrainHeatChem, GrainVar::GrainHeatCollSum, GrainVar::GrainHeatDif, GrainVar::GrainHeatInc, GrainVar::GrainHeatLya, GrainVar::GrainHeatSum, GrainTemperature(), GrainUpdateRadius1(), GrainUpdateRadius2(), GrainVar::GrnRecomTe, gv, HEAT_TOLER, HEAT_TOLER_BIN, ionbal, t_dense::IonHigh, t_dense::IonLow, ioQQQ, ipHYDROGEN, lgAbort, t_trace::lgDustBug, t_dense::lgElmtOn, t_ionbal::lgGrainIonRecom, t_conv::lgSearch, t_trace::lgTrace, LIMELM, MAT_PAH, MAT_PAH2, NDEMS, NewChargeData(), nzone, GrainVar::nzone, phycon, POW2, t_conv::setConvIonizFail(), splint_safe(), T_LOOP_MAX, t_phycon::te, thermal, TOLER, TorF(), GrainVar::TotalEden, TotalInsanity(), trace, and t_dense::xIonDense.
Referenced by GrainDrive().
STATIC void GrainChrgTransferRates | ( | long | nd | ) |
Definition at line 4116 of file grains.cpp.
References atmdat, t_dense::AtomicWeight, GrainVar::bin, DEBUG_ENTRY, dense, ChargeBin::FracPop, GetAveVelocity(), GrainVar::GrainChTrRate, GrainScreen(), gv, t_atmdat::lgCTOn, t_dense::lgElmtOn, LIMELM, MAX2, ChargeBin::RecomZ0, and STICK_ION.
Referenced by GrainChargeTemp().
Definition at line 4586 of file grains.cpp.
References t_dense::AtomicWeight, GrainVar::bin, ChargeBin::ChemEn, DEBUG_ENTRY, molezone::den, dense, ChargeBin::DustZ, t_dense::eden, findspecieslocal(), fprintf(), ChargeBin::FracPop, GetAveVelocity(), GrainElecEmis1(), GrainElecRecomb1(), GrainScreen(), gv, H2_TOP, t_hmi::H2_total, ChargeBin::HeatingRate2, hmi, ioQQQ, ipCARBON, ipH2, ipHYDROGEN, ipOXYGEN, GrainVar::lgDColOn, t_trace::lgDustBug, t_dense::lgElmtOn, t_trace::lgTrace, LIMELM, MAX2, phycon, ChargeBin::PotSurf, ChargeBin::PotSurfInc, POW2, ChargeBin::RecomEn, ChargeBin::RecomZ0, STICK_ION, t_phycon::te, ChargeBin::ThresSurfInc, trace, GrainVar::which_H2distr, and t_dense::xIonDense.
Referenced by GrainTemperature().
void GrainDrift | ( | ) |
GrainDrift computes grains drift velocity
Definition at line 4968 of file grains.cpp.
References t_mesh::anu(), ASSERT, GrainVar::bin, t_rfield::ConInterOut, DEBUG_ENTRY, dense, t_dense::eden, t_rfield::flux, fprintf(), gv, ioQQQ, ipHELIUM, ipHYDROGEN, t_trace::lgDustBug, GrainVar::lgNegGrnDrg, t_trace::lgTrace, t_rfield::nPositive, t_rfield::outlin, t_rfield::outlin_noplot, phycon, POW2, POW3, rfield, t_phycon::sqrte, t_dense::SqrtEden, t_phycon::te, trace, and t_dense::xIonDense.
Referenced by ConvPresTempEdenIoniz().
void GrainDrive | ( | ) |
GrainDrive main routine to converge grains thermal solution
Definition at line 1586 of file grains.cpp.
References GrainVar::bin, chrg2pot(), conv, t_thermal::ctot, GrainVar::dclmax, DEBUG_ENTRY, dense, GrainVar::dphmax, t_dense::eden, t_conv::EdenErrorAllowed, fp_equal(), fprintf(), t_dense::gas_phase, GrainVar::GasCoolColl, GrainVar::GasHeatPhotoEl, GrainChargeTemp(), GrainVar::GrainChTrRate, GrainVar::GrainHeatChem, GrainVar::GrainHeatCollSum, GrainVar::GrainHeatDif, GrainVar::GrainHeatInc, GrainVar::GrainHeatLya, GrainVar::GrainHeatScaleFactor, GrainVar::GrainHeatSum, GrainUpdateRadius1(), GrainUpdateRadius2(), GrainVar::GrnElecDonateMax, GrainVar::GrnElecHoldMax, gv, t_thermal::heating(), hmi, ioQQQ, ipHYDROGEN, GrainVar::lgAnyDustVary, GrainVar::lgBakesPAH_heat, GrainVar::lgDustOn(), GrainVar::lgGrainPhysicsOn, GrainVar::lgReevaluate, t_conv::lgSearch, LIMELM, nCalledGrainDrive, t_trace::nTrConvg, nzone, phycon, SDIV(), t_thermal::setHeating(), t_phycon::te, thermal, GrainVar::TotalDustHeat, GrainVar::TotalEden, trace, and t_hmi::UV_Cont_rel2_Habing_TH85_depth.
Referenced by ConvBase(), and mole_h2_grain_form().
STATIC double GrainElecEmis1 | ( | size_t | nd, |
long | nz, | ||
double * | sum1a, | ||
double * | sum1b, | ||
double * | sum2, | ||
double * | sum3 | ||
) |
Definition at line 2608 of file grains.cpp.
References ASSERT, t_dense::AtomicWeight, GrainVar::bin, ChargeBin::cs_pdt, DEBUG_ENTRY, dense, ChargeBin::DustZ, ChargeBin::ESum1a, ChargeBin::ESum1b, ChargeBin::ESum2, t_rfield::flux, get_ptr(), GetAveVelocity(), GrainScreen(), gv, ChargeBin::ipThresInf, ChargeBin::ipThresInfVal, t_dense::lgElmtOn, LIMELM, MAX2, t_rfield::nPositive, flex_arr< T, lgBC >::ptr0(), ChargeBin::RecomZ0, reduce_ab(), reduce_abc(), rfield, STICK_ION, t_rfield::SummedCon, t_dense::xIonDense, and ChargeBin::yhat.
Referenced by GrainCharge(), GrainCollHeating(), and UpdatePot().
STATIC double GrainElecRecomb1 | ( | size_t | nd, |
long | nz, | ||
double * | sum1, | ||
double * | sum2 | ||
) |
Definition at line 2524 of file grains.cpp.
References ASSERT, t_dense::AtomicWeight, GrainVar::bin, DEBUG_ENTRY, dense, t_dense::eden, GetAveVelocity(), GrainScreen(), gv, t_dense::lgElmtOn, LIMELM, MAX2, phycon, STICK_ION, t_phycon::te, and t_dense::xIonDense.
Referenced by GrainCharge(), GrainCollHeating(), and UpdatePot().
STATIC void GrainIonColl | ( | size_t | , |
long | , | ||
long | , | ||
long | , | ||
const double | [], | ||
const double | [], | ||
long * | , | ||
realnum * | , | ||
realnum * | |||
) |
Referenced by UpdateRecomZ0().
STATIC void GrainIonColl | ( | size_t | 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 4038 of file grains.cpp.
References t_mesh::anu(), GrainVar::bin, DEBUG_ENTRY, GetPotValues(), gv, Heavy, t_Heavy::ipHeavy, NO_TUNNEL, rfield, and save.
void GrainRestartIter | ( | ) |
this routine is called by IterRestart()
Definition at line 528 of file grains.cpp.
References GrainVar::bin, DEBUG_ENTRY, gv, GrainVar::lgDustOn(), and GrainVar::lgGrainPhysicsOn.
Referenced by IterRestart().
STATIC void GrainScreen | ( | long | ion, |
size_t | nd, | ||
long | nz, | ||
double * | eta, | ||
double * | xi | ||
) |
Definition at line 2718 of file grains.cpp.
References ASSERT, GrainVar::bin, DEBUG_ENTRY, gv, LIMELM, MIN2, phycon, POW2, powpq(), t_phycon::te, and ThetaNu().
Referenced by GrainChrgTransferRates(), GrainCollHeating(), GrainElecEmis1(), and GrainElecRecomb1().
void GrainsInit | ( | ) |
startup routine for grains, called before first calculations, but after parsecommands
Definition at line 558 of file grains.cpp.
References t_mesh::anu(), ASSERT, atoms, GrainVar::AugerData, AEInfo::AvNumber, GrainVar::bin, cdEXIT, t_elementnames::chElementName, CHRG_TOLER, t_thermal::ConstGrainTemp, conv, DEBUG_ENTRY, dense, DF_STANDARD, GrainVar::dstab, GrainVar::dstsc, t_conv::EdenErrorAllowed, t_mesh::egamry(), elec_esc_length(), elementnames, GrainVar::elmSumAbund, t_mesh::emm(), ENABLE_QUANTUM_HEATING, AEInfo::Energy, EXIT_FAILURE, fprintf(), t_dense::gas_phase, GrainVar::GasCoolColl, GetPotValues(), GrainVar::GrainEmission, GrainVar::GrainHeatCollSum, GrainVar::GrainHeatDif, GrainVar::GrainHeatInc, GrainVar::GrainHeatLya, GrainVar::GrainHeatSum, GrainVar::GrainMetal, GrainVar::GraphiteEmission, GrainVar::GrnRecomTe, GrnStdDpth(), gv, HEAT_TOLER, HEAT_TOLER_BIN, t_conv::HeatCoolRelErrorAllowed, INCL_TUNNEL, InitBinAugerData(), InitEmissivities(), InitEnthalpy(), AEInfo::IonThres, ioQQQ, ipHYDROGEN, ipLITHIUM, t_mesh::ithreshC(), GrainVar::lgAnyDustVary, t_trace::lgDustBug, GrainVar::lgDustOn(), GrainVar::lgQHeatAll, GrainVar::lgQHeatOn, t_trace::lgTrace, GrainVar::lgWD01, LIMELM, MAT_PAH, MAT_PAH2, MAX2, NCHS, NCHU, AEInfo::nData, t_rfield::nflux_with_check, nint(), t_rfield::nPositive, AEInfo::nSubShell, GrainVar::nzone, POW2, powpq(), ReadAugerData(), rfield, t_thermal::setHeating(), GrainVar::SilicateEmission, STICK_ELEC, thermal, TorF(), trace, GrainVar::which_zmin, ZMIN_CAR, and ZMIN_SIL.
Referenced by OpacityCreateAll().
void GrainStartIter | ( | ) |
this routine is called by IterStart()
Definition at line 492 of file grains.cpp.
References GrainVar::bin, GrainVar::dclmax, DEBUG_ENTRY, GrainVar::dphmax, GrainVar::GrnElecDonateMax, GrainVar::GrnElecHoldMax, gv, GrainVar::lgDustOn(), GrainVar::lgGrainPhysicsOn, GrainVar::lgNegGrnDrg, and GrainVar::TotalDustHeat.
Referenced by IterStart().
STATIC void GrainTemperature | ( | size_t | nd, |
realnum * | dccool, | ||
double * | hcon, | ||
double * | hots, | ||
double * | hla | ||
) |
Definition at line 4250 of file grains.cpp.
References t_mesh::anuptr(), ASSERT, GrainVar::bin, ChargeBin::bolflux1, t_thermal::ConstGrainTemp, ChargeBin::cs_pdt, DEBUG_ENTRY, dense, GrainVar::dsttmp, ChargeBin::DustZ, t_dense::eden, ChargeBin::fac1, ChargeBin::fac2, t_rfield::flux, fprintf(), ChargeBin::FracPop, t_dense::gas_phase, get_ptr(), GrainCollHeating(), GrainVar::GrainHeatScaleFactor, gv, ChargeBin::hcon1, hmi, ChargeBin::hots1, ioQQQ, TransitionProxy::ipCont(), ipH1s, ipH2p, ipH_LIKE, ipHYDROGEN, ChargeBin::ipThresInf, iso_sp, GrainVar::lgBakesPAH_heat, GrainVar::lgDHetOn, t_trace::lgDustBug, t_trace::lgTrace, MAX2, min(), MIN2, NDEMS, t_rfield::nPositive, t_rfield::otslin, ChargeBin::pe1, phycon, ChargeBin::PotSurf, flex_arr< T, lgBC >::ptr0(), reduce_ab(), reduce_abc(), rfield, splint_safe(), t_phycon::sqrte, t_rfield::SummedCon, t_rfield::SummedDif, t_phycon::te, thermal, ChargeBin::ThermRate, ChargeBin::ThresSurf, trace, t_iso_sp::trans(), and t_hmi::UV_Cont_rel2_Habing_TH85_depth.
Referenced by GrainChargeTemp().
STATIC void GrainUpdateRadius1 | ( | ) |
Definition at line 4161 of file grains.cpp.
References ASSERT, GrainVar::bin, DEBUG_ENTRY, dense, GrainVar::elmSumAbund, t_dense::gas_phase, GrainVar::GrainMetal, GrnStdDpth(), gv, ipHYDROGEN, and LIMELM.
Referenced by GrainChargeTemp(), and GrainDrive().
STATIC void GrainUpdateRadius2 | ( | ) |
Definition at line 4198 of file grains.cpp.
References ASSERT, GrainVar::bin, ChargeBin::cs_pdt, DEBUG_ENTRY, GrainVar::dstab, GrainVar::dstsc, ChargeBin::DustZ, ChargeBin::FracPop, get_ptr(), gv, ChargeBin::ipThresInf, t_rfield::nflux, t_rfield::nflux_with_check, and rfield.
Referenced by GrainChargeTemp(), and GrainDrive().
void GrainZero | ( | ) |
this routine is called by zero(), so it should contain initializations that need to be done every time before the input lines get parsed
Definition at line 479 of file grains.cpp.
References GrainVar::clear(), DEBUG_ENTRY, and gv.
Referenced by zero().
STATIC double GrnStdDpth | ( | long | ) |
Referenced by GrainsInit(), and GrainUpdateRadius1().
STATIC double GrnStdDpth | ( | long int | nd | ) |
Definition at line 1513 of file grains.cpp.
References GrainVar::bin, GrainVar::chPAH_abundance, DEBUG_ENTRY, dense, DF_STANDARD, DF_SUBLIMATION, DF_USER_FUNCTION, fprintf(), t_dense::gas_phase, GrnVryDpth(), gv, t_hmi::H2_total, hmi, ioQQQ, ipHYDROGEN, MAT_PAH, MAT_PAH2, max(), pow3(), sexp(), TotalInsanity(), and t_dense::xIonDense.
STATIC double GrnVryDpth | ( | size_t | nd | ) |
Definition at line 5086 of file grains.cpp.
References GrainVar::bin, cdEXIT, DEBUG_ENTRY, dense, EXIT_FAILURE, fprintf(), t_dense::gas_phase, gv, ioQQQ, ipHYDROGEN, max(), and t_dense::xIonDense.
Referenced by GrnStdDpth().
STATIC void InitBinAugerData | ( | size_t | nd, |
long | ipBegin, | ||
long | ipEnd | ||
) |
initialize the Auger data for grain bin nd between index ipBegin <= i < ipEnd
Definition at line 1129 of file grains.cpp.
References t_mesh::anu(), GrainVar::AugerData, ShellData::AvNr, GrainVar::bin, flex_arr< T, lgBC >::clear(), DEBUG_ENTRY, ShellData::Ener, gv, Heavy, Singleton< t_ADfA >::Inst(), ShellData::ionPot, ipHYDROGEN, ShellData::ipLo, GrainVar::lgWD01, LIMELM, max(), MAX2, ShellData::nData, t_Heavy::nsShells, AEInfo::nSubShell, t_ADfA::phfit(), flex_arr< T, lgBC >::realloc(), rfield, ShellData::y01, ShellData::y01A, y0psa(), y1psa(), and flex_arr< T, lgBC >::zero().
Referenced by GrainsInit(), and UpdatePot().
STATIC void InitEmissivities | ( | ) |
Definition at line 1303 of file grains.cpp.
References ASSERT, GrainVar::bin, cdEXIT, DEBUG_ENTRY, GrainVar::dsttmp, EXIT_SUCCESS, exp10(), fprintf(), fudge(), GRAIN_TMAX, GRAIN_TMID, GRAIN_TMIN, gv, ioQQQ, t_trace::lgDustBug, t_trace::lgTrace, NDEMS, nint(), NTOP, PlanckIntegral(), powi(), spline(), splint(), and trace.
Referenced by GrainsInit().
STATIC void NewChargeData | ( | long | nd | ) |
Definition at line 1467 of file grains.cpp.
References GrainVar::bin, DEBUG_ENTRY, fp_equal(), GrainVar::GrnRecomTe, gv, LIMELM, NCHS, nzone, GrainVar::nzone, phycon, and t_phycon::te.
Referenced by GrainChargeTemp().
|
inline |
evaluate e^2/a, the potential of one electron
Definition at line 87 of file grains.cpp.
References GrainVar::bin, and gv.
Referenced by chrg2pot(), GetPotValues(), and pot2chrg().
STATIC void PE_init | ( | size_t | nd, |
long | nz, | ||
long | i, | ||
double * | cs1, | ||
double * | cs2, | ||
double * | cs_tot, | ||
double * | cool1, | ||
double * | cool2, | ||
double * | ehat1, | ||
double * | ehat2 | ||
) |
Definition at line 4495 of file grains.cpp.
References t_mesh::anu(), ASSERT, GrainVar::bin, ChargeBin::cs_pdt, DEBUG_ENTRY, ChargeBin::DustZ, ChargeBin::ehat, gv, ChargeBin::ipThresInf, ChargeBin::ipThresInfVal, t_rfield::nPositive, ChargeBin::PotSurf, rfield, ChargeBin::ThresSurf, ChargeBin::ThresSurfVal, and ChargeBin::yhat.
Referenced by UpdatePot1().
STATIC double PlanckIntegral | ( | double | , |
size_t | , | ||
long | |||
) |
Referenced by InitEmissivities().
STATIC double PlanckIntegral | ( | double | tdust, |
size_t | nd, | ||
long int | ip | ||
) |
Definition at line 1384 of file grains.cpp.
References t_mesh::anu(), t_mesh::anu3(), ASSERT, GrainVar::bin, DEBUG_ENTRY, fprintf(), gv, ioQQQ, t_trace::lgDustBug, t_trace::lgTrace, t_rfield::nflux_with_check, POW2, powi(), avx_ptr< T, lgBC >::ptr0(), rfield, trace, vexp(), and t_mesh::widflx().
|
inline |
convert grain potential in Ryd to charge in electrons
Definition at line 93 of file grains.cpp.
References one_elec().
Referenced by GrainCharge().
STATIC void ReadAugerData | ( | ) |
Definition at line 1024 of file grains.cpp.
References ASSERT, GrainVar::AugerData, AEInfo::AvNumber, cdEXIT, DEBUG_ENTRY, AEInfo::Energy, EXIT_FAILURE, FILENAME_PATH_LENGTH_2, fprintf(), GetNextLine(), gv, AEInfo::IonThres, ioQQQ, LIMELM, MAGIC_AUGER_DATA, AEInfo::nData, AEInfo::nSubShell, and open_data().
Referenced by GrainsInit().
void SetNChrgStates | ( | long | ) |
this routine is called by ParseSet()
Definition at line 545 of file grains.cpp.
References ASSERT, DEBUG_ENTRY, gv, GrainVar::nChrgRequested, and NCHU.
Referenced by ParseSet().
STATIC double ThetaNu | ( | double | nu | ) |
Definition at line 2794 of file grains.cpp.
References DEBUG_ENTRY, and POW2.
Referenced by GetPotValues(), and GrainScreen().
STATIC void UpdatePot | ( | size_t | nd, |
long | Zlo, | ||
long | stride, | ||
double | rate_up[], | ||
double | rate_dn[] | ||
) |
Definition at line 2830 of file grains.cpp.
References t_mesh::anu(), ASSERT, GrainVar::bin, CONSERV_TOL, DEBUG_ENTRY, fprintf(), GrainElecEmis1(), GrainElecRecomb1(), gv, InitBinAugerData(), ioQQQ, ipoint(), t_trace::lgDustBug, t_trace::lgTrace, max(), MAX2, min(), NCHS, t_rfield::nflux, t_rfield::nPositive, phycon, rfield, t_phycon::te, trace, UpdatePot1(), and UpdatePot2().
Referenced by GrainCharge().
STATIC void UpdatePot1 | ( | size_t | nd, |
long | nz, | ||
long | Zg, | ||
long | ipStart | ||
) |
Definition at line 3075 of file grains.cpp.
References t_mesh::anuptr(), ASSERT, ShellData::AvNr, GrainVar::bin, chrg2pot(), DEBUG_ENTRY, ShellData::Ener, GetPotValues(), gv, INCL_TUNNEL, ShellData::ionPot, ShellData::ipLo, t_mesh::ithreshC(), LIMELM, max(), MAX2, min(), ShellData::nData, t_rfield::nflux, t_rfield::nflux_with_check, NO_TUNNEL, t_rfield::nPositive, ShellData::p, PE_init(), POW2, avx_ptr< T, lgBC >::ptr0(), flex_arr< T, lgBC >::ptr0(), rfield, UpdateRecomZ0(), ShellData::y01, ShellData::y01A, y0b(), and Yfunc().
Referenced by UpdatePot().
STATIC void UpdatePot2 | ( | size_t | nd, |
long | nz | ||
) |
Definition at line 3385 of file grains.cpp.
References GrainVar::bin, DEBUG_ENTRY, gv, POW2, and THERMCONST.
Referenced by UpdatePot().
STATIC void UpdateRecomZ0 | ( | size_t | nd, |
long | nz | ||
) |
Definition at line 3915 of file grains.cpp.
References GrainVar::bin, DEBUG_ENTRY, dense, GetPotValues(), GrainIonColl(), gv, INCL_TUNNEL, t_dense::lgElmtOn, LIMELM, and NO_TUNNEL.
Referenced by UpdatePot1().
Definition at line 3553 of file grains.cpp.
References t_mesh::anu(), ASSERT, GrainVar::bin, DEBUG_ENTRY, gv, t_mesh::ithreshC(), GrainVar::lgWD01, max(), min(), avx_ptr< T, lgBC >::ptr0(), rfield, vexp(), vlog(), and y0b01().
Referenced by UpdatePot1().
Definition at line 3604 of file grains.cpp.
References t_mesh::anu(), GrainVar::bin, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), gv, ioQQQ, max(), PE_CAR, PE_SIL, rfield, and GrainVar::which_pe.
Referenced by y0b().
STATIC double y0psa | ( | size_t | nd, |
long | ns, | ||
long | i, | ||
double | Eel | ||
) |
Definition at line 3641 of file grains.cpp.
References ASSERT, GrainVar::bin, DEBUG_ENTRY, elec_esc_length(), and gv.
Referenced by InitBinAugerData().
STATIC double y1psa | ( | size_t | nd, |
long | i, | ||
double | Eel | ||
) |
Definition at line 3670 of file grains.cpp.
References ASSERT, GrainVar::bin, DEBUG_ENTRY, elec_esc_length(), gv, pow2(), and pow3().
Referenced by InitBinAugerData().
|
inline |
Definition at line 3696 of file grains.cpp.
References ASSERT, DEBUG_ENTRY, and pow3().
Referenced by Yfunc().
|
inline |
Definition at line 3747 of file grains.cpp.
References ASSERT, avx_ptr< T, lgBC >::data(), DEBUG_ENTRY, ETILDE, gv, INV_ETILDE, GrainVar::lgWD01, avx_ptr< T, lgBC >::ptr0(), vfast_asinh(), vsqrt(), and x2.
Referenced by Yfunc().
STATIC void Yfunc | ( | long | nd, |
long | nz, | ||
const realnum | y0[], | ||
const realnum | y1[], | ||
const realnum | maxval[], | ||
double | Elo, | ||
const double | Ehi[], | ||
const double | Eel[], | ||
realnum | Yp[], | ||
realnum | Ys[], | ||
realnum | Ehp[], | ||
realnum | Ehs[], | ||
long | ilo, | ||
long | ihi | ||
) |
Definition at line 3402 of file grains.cpp.
References ASSERT, GrainVar::bin, cdEXIT, DEBUG_ENTRY, elec_esc_length(), EXIT_FAILURE, fprintf(), gv, ioQQQ, max(), min(), PE_CAR, PE_SIL, GrainVar::which_pe, y2pa(), and y2s().
Referenced by UpdatePot1().
STATIC void Yfunc | ( | long | nd, |
long | nz, | ||
const realnum | y01[], | ||
const realnum | maxval[], | ||
double | Elo, | ||
double | Ehi, | ||
double | Eel, | ||
realnum | Yp[], | ||
realnum | Ys[], | ||
realnum | Ehp[], | ||
realnum | Ehs[], | ||
long | ilo, | ||
long | ihi | ||
) |
Definition at line 3477 of file grains.cpp.
References ASSERT, GrainVar::bin, cdEXIT, DEBUG_ENTRY, elec_esc_length(), EXIT_FAILURE, fprintf(), gv, ioQQQ, max(), min(), PE_CAR, PE_SIL, avx_ptr< T, lgBC >::ptr0(), GrainVar::which_pe, y2pa(), and y2s().
|
static |
Definition at line 71 of file grains.cpp.
Referenced by GetPotValues().
|
static |
Definition at line 72 of file grains.cpp.
Referenced by GetPotValues().
|
static |
Definition at line 73 of file grains.cpp.
Referenced by GetPotValues().
|
static |
Definition at line 51 of file grains.cpp.
Referenced by GrainCharge().
|
static |
Definition at line 64 of file grains.cpp.
Referenced by GrainChargeTemp(), and GrainsInit().
|
static |
Definition at line 56 of file grains.cpp.
|
static |
Definition at line 76 of file grains.cpp.
Referenced by y2s().
|
static |
Definition at line 62 of file grains.cpp.
Referenced by GrainChargeTemp(), and GrainsInit().
|
static |
Definition at line 63 of file grains.cpp.
Referenced by GrainChargeTemp(), and GrainsInit().
|
static |
Definition at line 36 of file grains.cpp.
Referenced by GrainsInit(), UpdatePot1(), and UpdateRecomZ0().
|
static |
Definition at line 77 of file grains.cpp.
Referenced by y2s().
|
static |
Definition at line 34 of file grains.cpp.
Referenced by ReadAugerData().
|
static |
Definition at line 40 of file grains.cpp.
Referenced by GrainDrive(), and GrainVar::p_clear1().
|
static |
Definition at line 37 of file grains.cpp.
Referenced by GrainIonColl(), UpdatePot1(), and UpdateRecomZ0().
|
static |
Definition at line 46 of file grains.cpp.
Referenced by InitEmissivities().
|
static |
Definition at line 83 of file grains.cpp.
Referenced by GrainsInit().
|
static |
Definition at line 84 of file grains.cpp.
Referenced by GrainChrgTransferRates(), GrainCollHeating(), GrainElecEmis1(), and GrainElecRecomb1().
|
static |
Definition at line 59 of file grains.cpp.
Referenced by GrainChargeTemp().
Definition at line 80 of file grains.cpp.
Referenced by UpdatePot2().
|
static |
Definition at line 50 of file grains.cpp.
Referenced by GrainChargeTemp(), mie_auxiliary(), mie_cs_size_distr(), and search_limit().