grains.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GrainPar

Functions

void GrainDrive (void)
void GrainDrift (void)
void PE_init (long, long, long, double *, double *, double *, double *, double *, double *, double *)
void GrainZero (void)
void GrainStartIter (void)
void GrainRestartIter (void)
void SetNChrgStates (long)
long NewGrainBin (void)
void ReturnGrainBins (void)
void GrainsInit (void)
void GrainMakeDiffuse (void)
void qheat (double[], double[], long *, long)
void InitEnthalpy (void)
void mie_write_opc (const char *, const char *, long int)
void mie_read_opc (const char *, GrainPar)
void gauss_init (long int, double, double, double[], double[], double[], double[])
void gauss_legendre (long int, double[], double[])
void find_arr (double, double[], long int, long int *, bool *)


Function Documentation

void find_arr ( double  ,
double  [],
long  int,
long int *  ,
bool *   
)

find index ind such that min(xa[ind],xa[ind+1]) <= x <= max(xa[ind],xa[ind+1]). xa is assumed to be strictly monotically increasing or decreasing. if x is outside the range spanned by xa, lgOutOfBounds is raised and ind is set to -1 n is the number of elements in xa.

Parameters:
x 
xa[] 
n 
[out] *ind 
[out] *lgOutOfBounds 

Definition at line 4470 of file grains_mie.cpp.

References cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, MAX2, MIN2, and sign3().

Referenced by init_eps(), mie_calc_ial(), mie_cs(), size_distr(), and tbl_fun().

Here is the call graph for this function:

void gauss_init ( long  int,
double  ,
double  ,
double  [],
double  [],
double  [],
double  [] 
)

set up Gaussian quadrature for arbitrary interval

Parameters:
nn 
xbot 
xtop 
x[] 
a[] 
rr[] 
ww[] 

Definition at line 4324 of file grains_mie.cpp.

References DEBUG_ENTRY, and DEBUG_EXIT.

Referenced by DebyeDeriv(), and mie_integrate().

void gauss_legendre ( long  int,
double  [],
double  [] 
)

set up abscissas and weights for Gauss-Legendre intergration of arbitrary even order

Parameters:
nn 
x[] 
a[] 

Definition at line 4354 of file grains_mie.cpp.

References cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, MALLOC, POW2, and SAFETY.

Referenced by DebyeDeriv(), and mie_integrate().

Here is the call graph for this function:

void GrainDrift ( void   ) 

void GrainDrive ( void   ) 

GrainDrive main routine to converge grains thermal solution

Definition at line 1243 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, DEBUG_EXIT, dense, t_gv::dphmax, GrainBin::dstpot, GrainBin::DustDftVel, ChargeBin::DustZ, t_dense::eden, t_conv::EdenErrorAllowed, EVRYD, 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, GrainBin::tedust, ChargeBin::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:

void GrainMakeDiffuse ( void   ) 

void GrainRestartIter ( void   ) 

void GrainsInit ( void   ) 

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

Definition at line 508 of file grains.cpp.

References t_rfield::anu, t_gv::anumax, t_gv::anumin, ASSERT, GrainBin::asym, ATOMIC_MASS_UNIT, atoms, GrainBin::atomWeight, GrainBin::AvRadius, GrainBin::AvVol, GrainBin::BandGap, t_gv::bin, cdEXIT(), GrainBin::chDstLab, GrainBin::chrg, CHRG2POT, CHRG_TOLER, 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, DEBUG_EXIT, dense, t_gv::dstab, GrainBin::dstab1, GrainBin::dstAbund, GrainBin::dstfactor, t_gv::dstsc, GrainBin::dustp, GrainBin::DustWorkFcn, ChargeBin::DustZ, t_conv::EdenErrorAllowed, GrainBin::elmAbund, t_gv::elmSumAbund, 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(), gv, HEAT_TOLER, HEAT_TOLER_BIN, t_conv::HeatCoolRelErrorAllowed, t_thermal::heating, INCL_TUNNEL, InitEmissivities(), InitEnthalpy(), GrainBin::IntArea, GrainBin::inv_att_len, ioQQQ, ipHYDROGEN, 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, LIMELM, GrainBin::LowestPot, GrainBin::LowestZg, MALLOC, MAT_PAH, MAT_PAH2, GrainBin::matType, MAX2, MEAN_PATH, t_gv::nBin, GrainBin::nChrg, NCHS, NCHU, NDUST, t_gv::nfill, ChargeBin::nfill, nint(), t_rfield::nupper, t_gv::nzone, ONE_ELEC, POT2CHRG, POW2, POW3, GrainBin::pure_sc1, GrainBin::qtmin, GrainBin::qtmin_zone1, rfield, t_gv::SilicateEmission, STICK_ELEC, GrainBin::StickElecNeg, GrainBin::StickElecPos, ChargeBin::tedust, thermal, TorF(), trace, t_gv::which_zmin, t_rfield::widflx, GrainBin::y1, ChargeBin::yhat, ZMIN_BAKES, ZMIN_CAR, and ZMIN_SIL.

Referenced by OpacityCreateAll().

Here is the call graph for this function:

void GrainStartIter ( void   ) 

void GrainZero ( void   ) 

void InitEnthalpy ( void   ) 

initialize interpolation arrays for grain enthalpy

Definition at line 2486 of file grains_qheat.cpp.

References t_gv::bin, DEBUG_ENTRY, DEBUG_EXIT, t_gv::dsttmp, GrainBin::DustEnth, GrainBin::EnthSlp, GrainBin::EnthSlp2, GRAIN_TMIN, gv, log_integral(), t_gv::nBin, NDEMS, spline(), tlim, and uderiv().

Referenced by GrainsInit().

Here is the call graph for this function:

void mie_read_opc ( const char *  ,
GrainPar   
)

void mie_write_opc ( const char *  ,
const char *  ,
long  int 
)

mie_write_ops

Parameters:
[in] *rfi_file 
[in] *szd_file 

Definition at line 209 of file grains_mie.cpp.

References grain_data::abun, t_rfield::anu, sd_data::area, ASSERT, grain_data::atom_weight, ATOMIC_MASS_UNIT, grain_data::bandgap, grain_data::cAxis, cdEXIT(), t_version::chDate, t_elementnames::chElementSym, t_version::chVersion, sd_data::clim, sd_data::cPart, DEBUG_ENTRY, DEBUG_EXIT, grain_data::depl, elementnames, grain_data::elmAbun, FILENAME_PATH_LENGTH_2, gv, IAL_CAR, IAL_SIL, ioQQQ, ipBHi, ipBLo, LABELSIZE, LABELSUB1, LABELSUB2, sd_data::lgLogScale, sd_data::lim, LIMELM, sd_data::ln_a, sd_data::ln_a4dNda, sd_data::magic, grain_data::magic, MAGIC_OPC, MALLOC, grain_data::matType, MAX2, mie_auxiliary(), mie_calc_ial(), mie_cs(), mie_cs_size_distr(), mie_read_mix(), mie_read_rfi(), mie_read_szd(), mie_repair(), MIN2, grain_data::mol_weight, grain_data::n, NAX, grain_data::nAxes, NDAT, grain_data::nOpcCols, grain_data::norm, sd_data::nPart, grain_data::nr1, t_rfield::nupper, OPC_GREY, OPC_PAH1, OPC_TABLE, grain_data::opcAnu, grain_data::opcData, pah1_fun(), POW4, radius, sd_data::radius, RFI_TABLE, rfield, grain_data::rfiType, grain_data::rho, SD_SINGLE_SIZE, sd_data::sdCase, ShowMe(), size_distr(), grain_data::subl_temp, tbl_fun(), grain_data::therm_eff, sd_data::unity, sd_data::unity_bin, version, sd_data::vol, grain_data::wavlen, WAVNRYD, t_gv::which_ial, grain_data::work, and grain_data::wt.

Referenced by ParseCompile().

Here is the call graph for this function:

long NewGrainBin ( void   ) 

void PE_init ( long  ,
long  ,
long  ,
double *  ,
double *  ,
double *  ,
double *  ,
double *  ,
double *  ,
double *   
)

helper routine for initializing quantities related to the photo-electric effect

Parameters:
nd 
nz 
i 
*cs1 [out]
*cs2 [out]
*cs_tot [out]
*cool1 [out]
*cool2 [out]
*ehat1 [out]
*ehat2 [out]

Definition at line 3804 of file grains.cpp.

References t_rfield::anu, ASSERT, t_gv::bin, GrainBin::chrg, ChargeBin::cs_pdt, DEBUG_ENTRY, DEBUG_EXIT, GrainBin::dstab1, ChargeBin::DustZ, Ehi, Elo, gv, ChargeBin::ipThresInf, ChargeBin::ipThresInfVal, MAX2, t_gv::nBin, GrainBin::nChrg, t_rfield::nflux, ChargeBin::PotSurf, rfield, ChargeBin::ThresInf, ChargeBin::ThresInfVal, ChargeBin::ThresSurf, ChargeBin::ThresSurfVal, and ChargeBin::yhat.

Referenced by qheat_init(), and UpdatePot1().

void qheat ( double  [],
double  [],
long *  ,
long   
)

main routine for quantum heating

Referenced by GrainMakeDiffuse(), and hmole_step().

void ReturnGrainBins ( void   ) 

void SetNChrgStates ( long   ) 

this routine is called by ParseSet()

Definition at line 359 of file grains.cpp.

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

Referenced by ParseSet().


Generated for cloudy by doxygen 1.5.9