cloudy
trunk
|
Go to the source code of this file.
Functions | |
void | GrainDrive () |
void | GrainDrift () |
void | GrainZero () |
void | GrainStartIter () |
void | GrainRestartIter () |
void | SetNChrgStates (long) |
void | GrainsInit () |
void | GrainMakeDiffuse () |
void | qheat (vector< double > &, vector< double > &, long *, size_t) |
void | InitEnthalpy () |
void | mie_write_opc (const char *, const char *, long int) |
void | mie_read_opc (const char *, const GrainPar &) |
void | gauss_init (long int, double, double, const vector< double > &, const vector< double > &, vector< double > &, vector< double > &) |
void | gauss_legendre (long int, vector< double > &, vector< double > &) |
void | find_arr (double, const vector< double > &, long int, long int *, bool *) |
void find_arr | ( | double | , |
const vector< 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.
x | ||
xa[] | ||
n | ||
[out] | *ind | |
[out] | *lgOutOfBounds |
Definition at line 4715 of file grains_mie.cpp.
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, max(), min(), and sign3().
Referenced by init_eps(), mie_calc_ial(), mie_cs(), size_distr(), and tbl_fun().
void gauss_init | ( | long | int, |
double | , | ||
double | , | ||
const vector< double > & | , | ||
const vector< double > & | , | ||
vector< double > & | , | ||
vector< double > & | |||
) |
set up Gaussian quadrature for arbitrary interval
nn | |
xbot | |
xtop | |
x[] | |
a[] | |
rr[] | |
ww[] |
Definition at line 4577 of file grains_mie.cpp.
References DEBUG_ENTRY.
Referenced by DebyeDeriv(), and mie_integrate().
void gauss_legendre | ( | long | int, |
vector< double > & | , | ||
vector< double > & | |||
) |
set up abscissas and weights for Gauss-Legendre intergration of arbitrary even order
nn | |
x[] | |
a[] |
Definition at line 4605 of file grains_mie.cpp.
References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), ioQQQ, pow2(), and SAFETY.
Referenced by DebyeDeriv(), and mie_integrate().
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().
void GrainMakeDiffuse | ( | ) |
main routine for generating the grain diffuse emission
Definition at line 222 of file grains_qheat.cpp.
References t_mesh::anu(), t_mesh::anu2(), ASSERT, GrainVar::bin, CONSERV_TOL, t_thermal::ConstGrainTemp, avx_ptr< T, lgBC >::data(), DEBUG_ENTRY, dense, GrainVar::dstAbundThresholdFar, GrainVar::dstAbundThresholdNear, GrainVar::GasCoolColl, get_ptr(), GrainVar::GrainEmission, GrainVar::GrainHeatChem, GrainVar::GrainHeatScaleFactor, GrainVar::GrainHeatSum, GrainMakeDiffuseSingle(), GrainVar::GraphiteEmission, gv, t_hmi::H2_total, t_thermal::heating(), hmi, ipHYDROGEN, lgAbort, GrainVar::lgBakesPAH_heat, GrainVar::lgDColOn, GrainVar::lgDHetOn, max(), MAX2, t_rfield::nflux, NQGRID, pow2(), qheat(), rfield, GrainVar::SilicateEmission, STRG_CAR, STRG_SIL, thermal, TotalInsanity(), GrainVar::which_strg, t_mesh::widflx(), and t_dense::xIonDense.
Referenced by RT_diffuse().
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().
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().
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().
void InitEnthalpy | ( | ) |
initialize interpolation arrays for grain enthalpy
Definition at line 2476 of file grains_qheat.cpp.
References GrainVar::bin, DEBUG_ENTRY, GrainVar::dsttmp, GRAIN_TMIN, gv, log_integral(), NDEMS, spline(), tlim, uderiv(), and vlog().
Referenced by GrainsInit().
void mie_read_opc | ( | const char * | , |
const GrainPar & | |||
) |
read in the *.opc file with opacities and other relevant information
*chFile | |
gp |
Definition at line 1013 of file grains_mie.cpp.
References t_mesh::anu(), AS_LOCAL_DATA, ASSERT, t_dense::AtomicWeight, t_cpu_i::big_endian(), GrainVar::bin, called, cdEXIT, cpu, DEBUG_ENTRY, dense, GrainPar::dep, t_mesh::egamry(), t_mesh::emm(), EXIT_FAILURE, FILENAME_PATH_LENGTH_2, fp_equal_tol(), fprintf(), gv, t_cpu::i(), ioQQQ, LABELSIZE, GrainPar::lgForbidQHeating, GrainPar::lgGreyGrain, GrainPar::lgRequestQHeating, t_called::lgTalk, LIMELM, MAGIC_OPC, t_mesh::mesh_md5sum(), mie_next_data(), mie_next_line(), mie_read_double(), mie_read_long(), mie_read_realnum(), mie_read_word(), min(), GrainPar::nDustFunc, NMD5, open_data(), pow2(), GrainVar::ReadRecord, rfield, and strstr_s().
Referenced by ParseGrain().
void mie_write_opc | ( | const char * | , |
const char * | , | ||
long | int | ||
) |
mie_write_opc
[in] | *rfi_file | |
[in] | *szd_file |
Definition at line 274 of file grains_mie.cpp.
References grain_data::abun, t_mesh::anu(), t_mesh::anuptr(), sd_data::area, grain_data::atom_weight, grain_data::bandgap, t_cpu_i::big_endian(), car1_fun(), car2_fun(), car3_fun(), grain_data::cAxis, cdEXIT, grain_data::charge, t_elementnames::chElementSym, grain_data::clear(), sd_data::clim, multi_arr< T, d, ALLOC, lgBC >::clone(), sd_data::cPart, cpu, DEBUG_ENTRY, grain_data::depl, t_mesh::egamry(), elementnames, grain_data::elmAbun, t_mesh::emm(), EXIT_FAILURE, FILENAME_PATH_LENGTH_2, fprintf(), frac(), t_mesh::getResolutionScaleFactor(), gv, t_cpu::i(), IAL_CAR, IAL_SIL, Singleton< t_version >::Inst(), ioQQQ, ipBHi, ipBLo, LABELSIZE, LABELSUB1, LABELSUB2, sd_data::lgLogScale, sd_data::lim, LIMELM, sd_data::magic, grain_data::magic, MAGIC_OPC, grain_data::matType, max(), t_mesh::mesh_md5sum(), mie_auxiliary(), mie_auxiliary2(), mie_calc_ial(), mie_cs(), mie_cs_size_distr(), mie_read_mix(), mie_read_rfi(), mie_read_szd(), mie_repair(), min(), grain_data::mol_weight, grain_data::nAxes, t_rfield::nflux_with_check, grain_data::norm, sd_data::nPart, OPC_GREY, OPC_PAH1, OPC_PAH2C, OPC_PAH2N, OPC_PAH3C, OPC_PAH3N, OPC_TABLE, open_data(), POW4, radius, sd_data::radius, RFI_TABLE, rfield, grain_data::rfiType, grain_data::rho, SD_NR_CARBON, SD_SINGLE_SIZE, sd_data::sdCase, ShowMe(), size_distr(), strstr_s(), grain_data::subl_temp, tbl_fun(), grain_data::therm_eff, sd_data::unity, sd_data::unity_bin, sd_data::vol, GrainVar::which_ial, grain_data::work, and grain_data::wt.
Referenced by ParseCompile().
void qheat | ( | vector< double > & | , |
vector< double > & | , | ||
long * | , | ||
size_t | |||
) |
main routine for quantum heating
Referenced by GrainMakeDiffuse(), and mole_h2_grain_form().
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().