cloudy trunk
Loading...
Searching...
No Matches
Functions
grains.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void GrainDrive (void)
 
void GrainDrift (void)
 
void GrainZero (void)
 
void GrainStartIter (void)
 
void GrainRestartIter (void)
 
void SetNChrgStates (long)
 
void GrainsInit (void)
 
void GrainMakeDiffuse (void)
 
void qheat (vector< double > &, vector< double > &, long *, size_t)
 
void InitEnthalpy (void)
 
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 *)
 

Function Documentation

◆ find_arr()

void find_arr ( double  x,
const vector< double > &  xa,
long int  n,
long int *  ind,
bool lgOutOfBounds 
)

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 4563 of file grains_mie.cpp.

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, ioQQQ, max(), min(), and sign3().

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

Here is the call graph for this function:

◆ gauss_init()

void gauss_init ( long int  nn,
double  xbot,
double  xtop,
const vector< double > &  x,
const vector< double > &  a,
vector< double > &  rr,
vector< double > &  ww 
)

set up Gaussian quadrature for arbitrary interval

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

Definition at line 4425 of file grains_mie.cpp.

References DEBUG_ENTRY.

Referenced by DebyeDeriv(), and mie_integrate().

◆ gauss_legendre()

void gauss_legendre ( long int  nn,
vector< double > &  x,
vector< double > &  a 
)

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

Parameters
nn
x[]
a[]

Definition at line 4453 of file grains_mie.cpp.

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, ioQQQ, pow2(), and SAFETY.

Referenced by DebyeDeriv(), and mie_integrate().

Here is the call graph for this function:

◆ GrainDrift()

void GrainDrift ( void  )

◆ GrainDrive()

void GrainDrive ( void  )

◆ GrainMakeDiffuse()

void GrainMakeDiffuse ( void  )

◆ GrainRestartIter()

void GrainRestartIter ( void  )

this routine is called by IterRestart()

Definition at line 551 of file grains.cpp.

References GrainVar::bin, DEBUG_ENTRY, gv, GrainVar::lgDustOn(), and GrainVar::lgGrainPhysicsOn.

Referenced by IterRestart().

Here is the call graph for this function:

◆ GrainsInit()

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 583 of file grains.cpp.

References t_rfield::anu, GrainVar::anumax, GrainVar::anumin, ASSERT, ATOMIC_MASS_UNIT, atoms, GrainVar::AugerData, AEInfo::AvNumber, GrainVar::bin, cdEXIT, t_elementnames::chElementName, chrg2pot(), CHRG_TOLER, t_thermal::ConstGrainTemp, conv, DEBUG_ENTRY, dense, DF_STANDARD, GrainVar::dstab, GrainVar::dstsc, t_conv::EdenErrorAllowed, elec_esc_length(), elementnames, GrainVar::elmSumAbund, AEInfo::Energy, EVRYD, EXIT_FAILURE, 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, t_thermal::heating, hunt_bisect(), INCL_TUNNEL, InitBinAugerData(), InitEmissivities(), InitEnthalpy(), AEInfo::IonThres, ioQQQ, ipHYDROGEN, ipLITHIUM, 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, nint(), AEInfo::nSubShell, t_rfield::nupper, GrainVar::nzone, pot2chrg(), POW2, ReadAugerData(), rfield, GrainVar::SilicateEmission, STICK_ELEC, thermal, TorF(), trace, GrainVar::which_zmin, ZMIN_CAR, and ZMIN_SIL.

Referenced by OpacityCreateAll().

Here is the call graph for this function:

◆ GrainStartIter()

void GrainStartIter ( void  )

◆ GrainZero()

void GrainZero ( void  )

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 500 of file grains.cpp.

References GrainVar::clear(), DEBUG_ENTRY, and gv.

Referenced by zero().

Here is the call graph for this function:

◆ InitEnthalpy()

void InitEnthalpy ( void  )

initialize interpolation arrays for grain enthalpy

Definition at line 2482 of file grains_qheat.cpp.

References GrainVar::bin, DEBUG_ENTRY, GrainVar::dsttmp, GRAIN_TMIN, gv, log_integral(), NDEMS, spline(), tlim, and uderiv().

Referenced by GrainsInit().

Here is the call graph for this function:

◆ mie_read_opc()

void mie_read_opc ( const char *  chFile,
const GrainPar gp 
)

◆ mie_write_opc()

void mie_write_opc ( const char *  rfi_file,
const char *  szd_file,
long int  nbin 
)

mie_write_opc

Parameters
[in]*rfi_file
[in]*szd_file

Definition at line 272 of file grains_mie.cpp.

References grain_data::abun, t_rfield::anu, sd_data::area, AS_LOCAL_ONLY, grain_data::atom_weight, ATOMIC_MASS_UNIT, 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(), continuum, sd_data::cPart, cpu, DEBUG_ENTRY, grain_data::depl, t_rfield::egamry, elementnames, grain_data::elmAbun, t_rfield::emm, EXIT_FAILURE, FILENAME_PATH_LENGTH_2, 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_continuum::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, grain_data::norm, sd_data::nPart, t_rfield::nupper, OPC_GREY, OPC_PAH1, OPC_PAH2C, OPC_PAH2N, OPC_PAH3C, OPC_PAH3N, OPC_TABLE, open_data(), POW4, sd_data::radius, radius, t_continuum::ResolutionScaleFactor, 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, WAVNRYD, GrainVar::which_ial, grain_data::work, and grain_data::wt.

Referenced by ParseCompile().

Here is the call graph for this function:

◆ qheat()

void qheat ( vector< double > &  ,
vector< double > &  ,
long *  ,
size_t   
)

main routine for quantum heating

Referenced by mole_h2_grain_form().

◆ SetNChrgStates()

void SetNChrgStates ( long  nChrg)

this routine is called by ParseSet()

Definition at line 570 of file grains.cpp.

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

Referenced by ParseSet().