Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rt.h File Reference
#include "module.h"
Include dependency graph for rt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  t_rt
 

Macros

#define DEST0   SMALLFLOAT
 

Typedefs

typedef void(* linefunc )(const TransitionProxy &t, bool lgShield_this_zone, realnum pestrk, realnum DopplerWidth)
 

Enumerations

enum  {
  LINE_CONT_SHIELD_PESC = 1, LINE_CONT_SHIELD_FEDERMAN, LINE_CONT_SHIELD_FEDERMAN_BUG, LINE_CONT_SHIELD_FERLAND,
  LINE_CONT_SHIELD_RODGERS, LINE_CONT_SHIELD_INTEGRAL
}
 

Functions

void RT_line_one_escape (const TransitionProxy &t, bool lgShield_this_zone, realnum pestrk, realnum DopplerWidth)
 
void RT_line_one_fine (const TransitionProxy &t, bool lgShield_this_zone, realnum pestrk, realnum DopplerWidth)
 
void RT_fine_clear ()
 
void RT_line_all (linefunc line_one)
 
void RT_line_all_escape (realnum *error)
 
double RT_line_driving (void)
 
double RT_continuum_shield_fcn (const TransitionProxy &t, bool lgShieldThisZone, double dTau)
 
void RT_diffuse (void)
 
void RT_continuum (void)
 
void RT_OTS (void)
 
void RT_OTS_AddLine (double ots, long int ip)
 
void RT_OTS_Update (double *SumOTS)
 
void RT_OTS_Zero (void)
 
void RT_OTS_ChkSum (long int ipPnt)
 
void RT_line_one_tauinc (const TransitionProxy &t, long int mas_species, long int mas_ion, long int mas_hi, long int mas_lo, realnum DopplerWidth)
 
void RT_tau_init (void)
 
void RT_line_one_tau_reset (const TransitionProxy &t)
 
void RT_tau_reset (void)
 
void RT_tau_inc (void)
 
void RT_OTS_PrtRate (double weak, int chFlag)
 
double RT_recom_effic (long int ip)
 
void RT_stark (void)
 
double RT_EscLVG (double tau, double sigma)
 
void prt_trans_opc_debug (const char *LineGroup, const TransitionProxy &t)
 

Variables

t_rt rt
 

Macro Definition Documentation

#define DEST0   SMALLFLOAT

DEST0 is the smallest destruction probability to return in high metallicity models

Referenced by RT_OTS(), and RTesc_lya_1side().

Typedef Documentation

typedef void(* linefunc)(const TransitionProxy &t, bool lgShield_this_zone, realnum pestrk, realnum DopplerWidth)

Enumeration Type Documentation

anonymous enum

these are all possible values of rt.nLineContShield, first is default, these are set with set continuum shielding

Enumerator
LINE_CONT_SHIELD_PESC 
LINE_CONT_SHIELD_FEDERMAN 
LINE_CONT_SHIELD_FEDERMAN_BUG 
LINE_CONT_SHIELD_FERLAND 
LINE_CONT_SHIELD_RODGERS 
LINE_CONT_SHIELD_INTEGRAL 

Function Documentation

void RT_continuum ( void  )

RT_continuum attenuation of diffuse and beamed continua

References t_mesh::anu(), ASSERT, cdEXIT, t_rfield::chContLabel, t_rfield::chLineLabel, cmshft(), column(), t_rfield::ConEmitLocal, t_rfield::ConEmitOut, t_rfield::ConEmitReflec, t_rfield::ConInterOut, t_rfield::ConRefIncid, t_rfield::convoc, cosmology, t_hextra::CrsSecNeutron, DEBUG_ENTRY, dense, t_radius::depth, t_rfield::DiffuseEscape, t_geometry::DirectionalCosin, t_radius::drad, t_radius::drad_x_fillfac, t_radius::dRadSign, t_radius::dVolOutwrd, e2(), t_opac::E2TauAbsFace, t_opac::E2TauAbsOut, t_rfield::EnergyDiffCont, t_rfield::EnergyIncidCont, EXIT_FAILURE, t_opac::ExpmTau, t_opac::ExpZone, t_iso_sp::fb, findspecieslocal(), fixit, t_rfield::flux, t_rfield::flux_beam_const, t_rfield::flux_beam_time, t_rfield::flux_isotropic, t_rfield::flux_total_incident, fprintf(), t_dense::gas_phase, geometry, hextra, ioQQQ, ipH_LIKE, ipHYDROGEN, t_rfield::ipPlasma, iso_sp, iteration, t_trace::lgConBug, t_cosmology::lgDo, t_hextra::lgNeutrnHeatOn, t_opac::lgOpacNeg, t_opac::lgScatON, t_geometry::lgSphere, t_trace::lgTrace, MAX2, t_rfield::nflux, nzone, t_rfield::OccNumbContEmitOut, t_rfield::OccNumbDiffCont, t_rfield::OccNumbIncidCont, opac, t_opac::opacity_abs, t_opac::opacity_sct, t_rfield::otscon, t_rfield::otslin, t_rfield::outlin, t_rfield::outlin_noplot, pnegopc(), POW2, pow2(), t_radius::r1r0sq, radius, t_radius::Radius, t_rfield::reflin, rfield, t_radius::rinner, SDIV(), t_rfield::setTrimming(), sexp(), ShowMe(), SMALLFLOAT, t_rfield::SummedCon, t_rfield::SummedDif, t_rfield::SummedOcc, t_opac::TauAbsFace, t_opac::TauAbsGeo, t_opac::TauAbsTotal, t_opac::TauScatFace, t_opac::TauScatGeo, t_opac::TauTotalGeo, t_opac::tmn, TotalInsanity(), t_hextra::totneu, trace, vexp(), t_rfield::vexp_arg, and t_dense::xIonDense.

Referenced by cloudy().

Here is the call graph for this function:

double RT_continuum_shield_fcn ( const TransitionProxy t,
bool  lgShieldThisZone,
double  dTau 
)

rt_continuum_shield_fcn computing continuum shielding due to single line

Parameters
t

References avg_shield(), chLineLbl(), DEBUG_ENTRY, TransitionProxy::Emis(), fprintf(), ioQQQ, TransitionProxy::ipCont(), nzone, RT_continuum_shield_fcn_point(), and EmissionProxy::TauCon().

Referenced by RT_line_pumping().

Here is the call graph for this function:

void RT_diffuse ( void  )

RT_diffuse fill in DiffCont array with diffuse emission for this zone

Todo:
2 should use ConEmitLocal for all continua, but not followed by rfield.DiffuseEscape - put that at the end. Once continua all bundled this way, it will be easy to save them as a function of depth and then do exact rt
Todo:
2 add fegrain to outward beams, but within main formalism by including grains in all x-ray processes

References t_mesh::anu(), t_mesh::anu2(), ASSERT, atmdat, atmdat_outer_shell(), EmissionProxy::Aul(), t_radius::BeamInOut, t_radius::BeamOutOut, t_gaunt::brems_rt(), t_gaunt::brems_sum_ions(), CalcTwoPhotonEmission(), t_rfield::ConEmitLocal, t_rfield::ConInterOut, t_rfield::ConSourceFcnLocal, t_rfield::ContBoltz, t_rfield::convoc, CoolHeavy, dBaseSpecies, dBaseTrans, DEBUG_ENTRY, t_brems_den::den_Hep, t_brems_den::den_Hepp, t_brems_den::den_Hm, t_brems_den::den_Hp, t_brems_den::den_ion, dense, diatoms, t_rfield::DiffuseEscape, t_rfield::DiffuseLineEmission, DumpLine(), t_radius::dVolOutwrd, t_dense::eden, t_rfield::eeBremsDif, t_atmdat::EIonPot, emergent_line(), TransitionProxy::Emis(), TransitionList::Emis(), TransitionProxy::EnergyErg(), t_opac::ExpmTau, t_rfield::flux, t_rfield::flux_beam_const, t_rfield::flux_beam_time, t_rfield::flux_isotropic, fprintf(), GrainVar::GrainEmission, GrainMakeDiffuse(), gv, Heavy, HFLines, hmi, Singleton< t_gaunt >::Inst(), t_dense::IonHigh, t_dense::IonLow, ioQQQ, t_Heavy::ipBalHeavy, TransitionProxy::ipCont(), t_opac::ipElement, ipH_LIKE, ipHE_LIKE, t_Heavy::ipHeavy, ipHELIUM, t_hmi::iphmin, t_opac::iphmop, ipHYDROGEN, t_Heavy::ipLyHeavy, t_rfield::ipMaxBolt, ipoint(), t_rfield::ipPlasma, ipSatelliteLines, iso_ctrl, iso_sp, t_isoCTRL::lgDielRecom, GrainVar::lgDustOn(), t_dense::lgElmtOn, t_CoolHeavy::lgFreeOn, GrainVar::lgGrainPhysicsOn, t_isoCTRL::lgInd2nu_On, t_rfield::lgInducProcess, t_rfield::lgKillOutCont, t_rfield::lgKillOutLine, t_trace::lgTrace, LIMELM, MAX2, MIN2, t_rfield::nflux, t_rfield::nflux_with_check, NISO, nSpecies, t_Heavy::nsShells, t_iso_sp::numLevels_local, nWindLine, nzone, t_rfield::OccNumbDiffCont, opac, t_opac::opacity_abs, t_opac::OpacStack, t_rfield::otscon, t_rfield::otslin, t_rfield::outlin, t_rfield::outlin_noplot, TransitionProxy::outline(), EmissionProxy::Pesc_total(), phots(), phycon, pow2(), PrtTwoPhotonEmissCoef(), radius, t_Heavy::RadRecCon, t_rfield::reflin, rfield, RT_iso_integrate_RRC(), safe_div(), SatelliteLines, SEXP_LIMIT, TransitionList::size(), SMALLFLOAT, t_phycon::sqrte, t_iso_sp::st, TauLine2, t_phycon::te, t_opac::tmn, t_rfield::TotDiff2Pht, trace, t_iso_sp::trans(), t_iso_sp::TwoNu, vzero(), t_mesh::widflx(), EmissionProxy::xIntensity(), t_dense::xIonDense, and t_Heavy::xLyaHeavy.

Referenced by AGN_Hemis(), and cloudy().

Here is the call graph for this function:

double RT_EscLVG ( double  tau,
double  sigma 
)

Referenced by RT_line_escape().

void RT_line_one_escape ( const TransitionProxy t,
bool  lgShield_this_zone,
realnum  pestrk,
realnum  DopplerWidth 
)

RT_line_one do line radiative transfer

Parameters
tline structure
pestrkStark escape probability
DopplerWidth
lgShield_this_zonethis is option to not include line self shielding across this zone. this can cause pump to depend on zone thickness, and leads to unstable feedback in some models with the large H2 molecule, due to Solomon process depending on zone thickness and level populations.

References ASSERT, EmissionProxy::damp(), EmissionProxy::dampXvel(), DEBUG_ENTRY, TransitionProxy::Emis(), TransitionProxy::EnergyErg(), EmissionProxy::FracInwd(), ipLY_A, EmissionProxy::iRedisFun(), t_rfield::lgDoLineTrans, lgTauGood(), TransitionProxy::Lo(), EmissionProxy::Pdest(), EmissionProxy::Pelec_esc(), EmissionProxy::Pesc(), t_rfield::plsfrq, EmissionProxy::pump(), rfield, RT_line_escape(), RT_line_pumping(), and SMALLFLOAT.

Referenced by CoolDima(), CoolHyperfine(), and RT_line_all_escape().

Here is the call graph for this function:

void RT_OTS_AddLine ( double  ots,
long int  ip 
)

RT_OTS_AddLine add local destruction of lines to ots field

Parameters
ots
ippointer on the f scale

References ASSERT, DEBUG_ENTRY, fprintf(), ioQQQ, iteration, t_rfield::nflux, nOTS1, nOTS2, nOTS_Line_type, opac, t_opac::opacity_abs, t_rfield::otslin, and rfield.

Referenced by diatomics::H2_RT_OTS(), and RT_OTS().

Here is the call graph for this function:

void RT_OTS_PrtRate ( double  weak,
int  chFlag 
)

RT_OTS_PrtRate print ots arrays, called by ionize

Parameters
weakarg is weakest rate to print
chFlagflag, 'c' continuum, 'l' line, 'b' both

References t_mesh::anu(), ASSERT, t_rfield::chContLabel, t_rfield::chLineLabel, conv, DEBUG_ENTRY, dense, fnzone, fprintf(), t_dense::gas_phase, ioQQQ, ipHELIUM, ipOXYGEN, t_conv::lgConvIoniz(), t_rfield::line_count, t_rfield::nflux_with_check, opac, t_opac::opacity_abs, t_rfield::otscon, t_rfield::otslin, rfield, TorF(), and t_dense::xIonDense.

Referenced by ConvBase().

Here is the call graph for this function:

void RT_stark ( void  )

rt_stark compute stark broadening escape probabilities using Puetter formalism

Todo:
2 - Stark is disabled for now since Lya escape causes density dependent feedback on the radiative transfer. Would need to redo the escape probs every time the electron density is updated - see blr89.in for an example

References EmissionProxy::Aul(), DEBUG_ENTRY, dense, t_dense::eden, TransitionProxy::Emis(), t_iso_sp::ex, TransitionProxy::ipCont(), ipH2s, ipH_LIKE, iso_ctrl, iso_sp, t_dense::lgElmtOn, t_rt::lgStarkON, LIMELM, max(), MAX2, MIN2, NISO, t_isoCTRL::nLyaLevel, t_iso_sp::numLevels_local, t_iso_sp::numLevels_max, nzone, phycon, pow(), powpq(), rt, t_phycon::sqrte, t_iso_sp::st, strkar(), EmissionProxy::TauIn(), t_phycon::te01, t_phycon::te03, t_phycon::te10, and t_iso_sp::trans().

Referenced by RT_line_all_escape().

Here is the call graph for this function:

void RT_tau_init ( void  )

RT_tau_init set initial outward optical depths at start of first iteration

References t_mesh::anu(), ASSERT, t_dense::AtomicWeight, EmissionProxy::Aul(), cdEXIT, t_StopCalc::colnut, conv, dBaseTrans, DEBUG_ENTRY, dense, diatoms, t_rt::DoubleTau, t_dense::eden, TransitionProxy::Emis(), EXIT_FAILURE, ExtraLymanLines, t_iso_sp::fb, fixit, fprintf(), EmissionProxy::FracInwd(), t_dense::gas_phase, geometry, GetDopplerWidth(), t_StopCalc::HColStop, HFLines, ioQQQ, ipExtraLymanLines, ipH1s, ipH2p, ipH2s, ipH3d, ipH3p, ipH3s, ipH_LIKE, ipHe1s1S, ipHe2p1P, ipHE_LIKE, ipHELIUM, ipHYDROGEN, t_trace::ipIsoTrace, ipoint(), ipSatelliteLines, t_StopCalc::iptnu, t_rt::ipxry, iso_ctrl, iso_sp, t_opac::lgCaseB, t_isoCTRL::lgDielRecom, t_dense::lgElmtOn, t_conv::lgFirstSweepThisZone, t_trace::lgIsoTraceFull, t_conv::lgOscilOTS, t_geometry::lgSphere, t_thermal::lgTemperatureConstant, t_trace::lgTrace, LIMELM, MAX2, MIN2, N_, t_iso_sp::n_HighestResolved_max, t_rfield::nflux_with_check, NISO, t_isoCTRL::nLyman, nSpecies, NULL, t_iso_sp::numLevels_local, t_iso_sp::numLevels_max, nWindLine, opac, EmissionProxy::opacity(), EmissionProxy::Ploss(), pow(), PrintEfmt, t_rfield::qhtot, t_iso_sp::QN2Index(), rfield, rt, RT_line_all_escape(), SatelliteLines, ShowMe(), TransitionList::size(), t_isoCTRL::SmallA, SMALLFLOAT, StopCalc, SumDensities(), t_opac::TauAbsGeo, EmissionProxy::TauCon(), t_StopCalc::tauend, EmissionProxy::TauIn(), TAULIM, TauLine2, t_opac::taumin, t_StopCalc::taunu, t_opac::TauScatGeo, EmissionProxy::TauTot(), t_opac::TauTotalGeo, t_rt::tauxry, TempChange(), thermal, t_opac::tlamin, trace, t_iso_sp::trans(), UTALines, t_dense::xNucleiTotal, and TransitionProxy::Zero().

Referenced by cloudy().

Here is the call graph for this function:

Variable Documentation