cloudy trunk
Loading...
Searching...
No Matches
rt.h File Reference

Go to the source code of this file.

Data Structures

struct  t_rt

Macros

#define DEST0   SMALLFLOAT
#define LINE_CONT_SHIELD_PESC   1
#define LINE_CONT_SHIELD_FEDERMAN   2
#define LINE_CONT_SHIELD_FERLAND   3

Functions

void RT_line_all (void)
double RT_line_driving (void)
void RT_line_one (const TransitionProxy &t, bool lgShield_this_zone, realnum pestrk, realnum DopplerWidth)
double RT_continuum_shield_fcn (const TransitionProxy &t)
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 esc_PRD_1side (double tau, double a)
double esc_CRDwing_1side (double tau, double a)
double RTesc_lya (double *esin, double *dest, double abund, const TransitionProxy &t, realnum DopplerWidth)
double esc_CRDwing (double tau, double tout, double damp)
double esc_CRDcore (double tau, double tout)
double esc_PRD (double tau, double tout, double damp)
double esca0k2 (double taume)
double esccon (double tau, double hnukt)
double RT_DestProb (double abund, double crsec, long int ipanu, double widl, double escp, int nCore)
double RT_LineWidth (const TransitionProxy &t, realnum DopplerWidth)
double RT_DestHummer (double beta)
double RT_recom_effic (long int ip)
void RT_stark (void)
void RT_iso_integrate_RRC (const long ipISO, const long nelem, const bool lgUpdateContinuum)

Variables

t_rt rt

Macro Definition Documentation

◆ DEST0

#define DEST0   SMALLFLOAT

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

Definition at line 227 of file rt.h.

Referenced by RT_OTS(), and RTesc_lya_1side().

◆ LINE_CONT_SHIELD_FEDERMAN

#define LINE_CONT_SHIELD_FEDERMAN   2

Definition at line 291 of file rt.h.

Referenced by InitDefaultsPreparse(), ParseSet(), and RT_continuum_shield_fcn().

◆ LINE_CONT_SHIELD_FERLAND

#define LINE_CONT_SHIELD_FERLAND   3

Definition at line 292 of file rt.h.

Referenced by ParseSet(), and RT_continuum_shield_fcn().

◆ LINE_CONT_SHIELD_PESC

#define LINE_CONT_SHIELD_PESC   1

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

Definition at line 290 of file rt.h.

Referenced by ParseSet(), and RT_continuum_shield_fcn().

Function Documentation

◆ esc_CRDcore()

double esc_CRDcore ( double tau,
double tout )

esc_CRDcore escape probability CRD with no wings, for subordinate lines

Parameters
tau
tout

Definition at line 445 of file rt_escprob.cpp.

References ASSERT, DEBUG_ENTRY, esca0k2(), iteration, MIN2, rt, and tau_from_here().

Referenced by RT_line_escape().

Here is the call graph for this function:

◆ esc_CRDwing()

double esc_CRDwing ( double tau,
double tout,
double damp )

esc_CRDwing escape probability CRD with wings, for subordinate lines

Parameters
tau
tout
damp

Definition at line 399 of file rt_escprob.cpp.

References ASSERT, DEBUG_ENTRY, esc_CRDwing_1side(), iteration, MIN2, rt, and tau_from_here().

Referenced by RT_line_escape().

Here is the call graph for this function:

◆ esc_CRDwing_1side()

double esc_CRDwing_1side ( double tau,
double a )

esc_CRDwing_1side fundamental escape probability radiative transfer routine, for complete redistribution

Definition at line 221 of file rt_escprob.cpp.

References DEBUG_ENTRY, esca0k2(), ioQQQ, POW2, SQRTPI, Integrator< Integrand, Method >::sum(), and trapezium().

Referenced by DrvEscP(), esc_CRDwing(), and RT_continuum_shield_fcn().

Here is the call graph for this function:

◆ esc_PRD()

double esc_PRD ( double tau,
double tout,
double damp )

esc_PRD escape probability radiative transfer for incomplete redistribution

Parameters
tau
tout
damp

Definition at line 363 of file rt_escprob.cpp.

References ASSERT, DEBUG_ENTRY, esc_PRD_1side(), iteration, rt, and tau_from_here().

Referenced by RT_line_escape().

Here is the call graph for this function:

◆ esc_PRD_1side()

double esc_PRD_1side ( double tau,
double a )

esc_PRD_1side fundamental escape probability radiative transfer routine for incomplete redistribution

Parameters
tau
a

Definition at line 97 of file rt_escprob.cpp.

References ASSERT, DEBUG_ENTRY, escmase(), MIN2, and rt.

Referenced by DrvEscP(), esc_PRD(), mole_h_reactions(), RT_continuum_shield_fcn(), and RT_LineWidth().

Here is the call graph for this function:

◆ esca0k2()

double esca0k2 ( double taume)

esca0k2 derive Hummer's K2 escape probability for Doppler core only

Parameters
taume

Definition at line 490 of file rt_escprob.cpp.

References DEBUG_ENTRY, escmase(), and SQRTPI.

Referenced by DrvEscP(), esc_CRDcore(), esc_CRDwing_1side(), and RT_continuum_shield_fcn().

Here is the call graph for this function:

◆ esccon()

double esccon ( double tau,
double hnukt )

escpcn continuum escape probability

Parameters
tau
hnukt

Definition at line 628 of file rt_escprob.cpp.

References my_Integrand_conrec::chnukt_ContTkt, my_Integrand_escConE2::chnukt_ContTkt, my_Integrand_escConE2::chnukt_ctau, DEBUG_ENTRY, and Integrator< Integrand, Method >::sum().

Referenced by RT_recom_effic().

Here is the call graph for this function:

◆ RT_continuum()

void RT_continuum ( void )

RT_continuum attenuation of diffuse and beamed continua

Definition at line 67 of file rt_continuum.cpp.

References ASSERT, cdEXIT, cmshft(), colden, DEBUG_ENTRY, dense, e2(), EN1RYD, EXIT_FAILURE, geometry, hextra, ioQQQ, ipCOL_H0, ipH_LIKE, ipHYDROGEN, iso_sp, iteration, MAX2, nzone, opac, pnegopc(), POW2, radius, rfield, SDIV(), sexp(), ShowMe(), SMALLFLOAT, TestCode(), TotalInsanity(), and trace.

Referenced by cloudy().

Here is the call graph for this function:

◆ RT_continuum_shield_fcn()

double RT_continuum_shield_fcn ( const TransitionProxy & t)

rt_continuum_shield_fcn computing continuum shielding due to single line

Parameters
t

Definition at line 33 of file rt_continuum_shield_fcn.cpp.

References ASSERT, conpmp(), EmissionProxy::damp(), DEBUG_ENTRY, TransitionProxy::Emis(), esc_CRDwing_1side(), esc_PRD_1side(), esca0k2(), ipCRD, ipCRDW, ipLY_A, ipPRD, EmissionProxy::iRedisFun(), LINE_CONT_SHIELD_FEDERMAN, LINE_CONT_SHIELD_FERLAND, LINE_CONT_SHIELD_PESC, MIN2, POW2, rt, SDIV(), sexp(), EmissionProxy::TauCon(), and TotalInsanity().

Referenced by RT_line_pumping().

Here is the call graph for this function:

◆ RT_DestHummer()

double RT_DestHummer ( double beta)
Parameters
betabeta is ratio of continuum to mean line opacity,
Returns
dest prob = beta F(beta)

Definition at line 1039 of file rt_escprob.cpp.

References ASSERT, and DEBUG_ENTRY.

◆ RT_DestProb()

double RT_DestProb ( double abund,
double crsec,
long int ipanu,
double widl,
double escp,
int nCore )

RT_DestProb returns line destruction probability due to continuum opacity

Parameters
abundabundance of species
crsecits line absorption cross section
ipanupointer to energy within continuum array, to get background opacity, this is on the f not c scale
widlline width
escpescape probability
nCoretype of redistribution function
Todo
2 this min is because there are no calculations that show what to do for beta beyound this value

Definition at line 774 of file rt_escprob.cpp.

References abund, ASSERT, cdEXIT, conv, DEBUG_ENTRY, EXIT_FAILURE, fp_equal(), ioQQQ, ipDEST_INCOM, ipDEST_K2, ipDEST_SIMPL, ipH1s, ipH2p, ipH_LIKE, ipHYDROGEN, iso_sp, MIN2, nzone, opac, POW2, rfield, and SQRTPI.

Referenced by RT_line_escape().

Here is the call graph for this function:

◆ RT_diffuse()

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 Replace this constant with the appropriate macro, if any
Todo
2 add fegrain to outward beams, but within main formalism by including grains in all x-ray processes

Definition at line 34 of file rt_diffuse.cpp.

References ASSERT, atmdat_outer_shell(), EmissionProxy::Aul(), CalcTwoPhotonEmission(), CoolHeavy, dBaseSpecies, dBaseTrans, DEBUG_ENTRY, dense, diatoms, DumpLine(), emergent_line(), TransitionProxy::Emis(), EN1RYD, FeII_RT_Out(), GrainMakeDiffuse(), gv, Heavy, HFLines, hmi, ioQQQ, TransitionProxy::ipCont(), ipH1s, ipH_LIKE, ipHE_LIKE, ipHYDROGEN, ipSatelliteLines, iso_ctrl, iso_sp, lgAbort, LIMELM, MAX2, MILNE_CONST, MIN2, mole, mole_global, nHFLines, NISO, nLevel1, nSpecies, t_iso_sp::numLevels_local, nWindLine, nzone, opac, TransitionProxy::outline(), EmissionProxy::Pesc(), EmissionProxy::phots(), phycon, POW2, PrtTwoPhotonEmissCoef(), radius, rfield, RT_iso_integrate_RRC(), safe_div(), SatelliteLines, SEXP_LIMIT, SMALLFLOAT, t_iso_sp::st, TauLine2, TauLines, TE1RYD, trace, t_iso_sp::trans(), and t_iso_sp::TwoNu.

Referenced by AGN_Hemis(), and cloudy().

Here is the call graph for this function:

◆ RT_iso_integrate_RRC()

void RT_iso_integrate_RRC ( const long ipISO,
const long nelem,
const bool lgUpdateContinuum )

◆ RT_line_all()

◆ RT_line_driving()

double RT_line_driving ( void )

rt_line_driving radiative acceleration due to line absorption of incident continuum returns line radiative acceleration cm s-2

Definition at line 16 of file rt_line_driving.cpp.

References dBaseSpecies, dBaseTrans, DEBUG_ENTRY, dense, diatoms, ExtraLymanLines, FeIIAccel(), HFLines, ipExtraLymanLines, ipH_LIKE, ipHE_LIKE, ipSatelliteLines, iso_ctrl, iso_sp, LIMELM, nHFLines, NISO, nLevel1, nSpecies, nUTA, nWindLine, SatelliteLines, TauLine2, TauLines, and UTALines.

Referenced by PresTotCurrent().

Here is the call graph for this function:

◆ RT_line_one()

void RT_line_one ( 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.

Definition at line 387 of file rt_line_one.cpp.

References ASSERT, cdEXIT, conv, EmissionProxy::damp(), EmissionProxy::dampXvel(), DEBUG_ENTRY, TransitionProxy::Emis(), EN1RYD, TransitionProxy::EnergyErg(), EXIT_SUCCESS, EmissionProxy::FracInwd(), ioQQQ, ipLY_A, EmissionProxy::iRedisFun(), lgTauGood(), TransitionProxy::Lo(), MAX2, MIN2, nzone, EmissionProxy::Pdest(), EmissionProxy::Pelec_esc(), EmissionProxy::Pesc(), EmissionProxy::pump(), rfield, RT_line_electron_scatter(), RT_line_escape(), RT_line_fine_opacity(), RT_line_pumping(), and SMALLFLOAT.

Referenced by CoolDima(), CoolEvaluate(), FeII_RT_Make(), diatomics::H2_RTMake(), and RT_line_all().

Here is the call graph for this function:

◆ RT_line_one_tau_reset()

◆ RT_line_one_tauinc()

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 )

RT_line_one_tauinc increment optical depths for all heavy element lines, zone by zone

Parameters
t
mas_species
mas_ion
mas_hi
mas_lo
DopplerWidth

Definition at line 16 of file rt_line_one_tauinc.cpp.

References cosmology, DEBUG_ENTRY, TransitionProxy::Emis(), fixit(), geometry, GetHubbleFactor(), TransitionProxy::ipCont(), EmissionProxy::ipFine(), MIN2, EmissionProxy::opacity(), EmissionProxy::PopOpc(), radius, rfield, rt, SDIV(), EmissionProxy::TauCon(), EmissionProxy::TauIn(), EmissionProxy::TauTot(), and wind.

Referenced by FeII_RT_TauInc(), diatomics::H2_RT_tau_inc(), and RT_tau_inc().

Here is the call graph for this function:

◆ RT_LineWidth()

double RT_LineWidth ( const TransitionProxy & t,
realnum DopplerWidth )

RT_LineWidth compute line width (cm/sec), using optical depth array information

Parameters
t
DopplerWidth
Todo
1 dynamics; this test assumes that neg vel are subsonic, so that sobolev length would overestimate the optical depth, since ion is at most present over computed slab, and possibly more.
Todo
1 rewrite so that this checks on size not sign of windv

Definition at line 918 of file rt_escprob.cpp.

References ASSERT, EmissionProxy::damp(), EmissionProxy::dampXvel(), DEBUG_ENTRY, dense, TransitionProxy::Emis(), esc_PRD_1side(), iteration, MAX2, MIN2, opac, EmissionProxy::Pdest(), EmissionProxy::Pelec_esc(), PI, pressure, EmissionProxy::TauIn(), EmissionProxy::TauTot(), and wind.

Referenced by FeIIRadPress(), PressureRadiationLine(), and PresTotCurrent().

Here is the call graph for this function:

◆ RT_OTS()

void RT_OTS ( void )

RT_OTS compute diffuse fields due to helium atom, metals, hydro done in HydroOTS

Todo
2 should also check whether IonLo is in bounds - in func_set_ion test He0 is set to zero, so this does not do anything. as NISO grows this will become larger waste of time

Definition at line 39 of file rt_ots.cpp.

References ASSERT, dBaseSpecies, dBaseTrans, DEBUG_ENTRY, dense, DEST0, diatoms, FeII_OTS(), findspecieslocal(), fnzone, he, Heavy, hmi, ioQQQ, ipH1s, ipH2p, ipH_LIKE, ipHELIUM, ipHYDROGEN, ipRecEsc, ipRecRad, iso_sp, LIMELM, MAX2, NISO, nLevel1, nOTS1, nOTS2, nOTS_Line_type, nSpecies, nWindLine, nzone, opac, rfield, RT_OTS_AddCont(), RT_OTS_AddLine(), SMALLFLOAT, TauLine2, TauLines, and trace.

Referenced by ConvBase().

Here is the call graph for this function:

◆ RT_OTS_AddLine()

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

Definition at line 402 of file rt_ots.cpp.

References ASSERT, DEBUG_ENTRY, ioQQQ, iteration, nOTS1, nOTS2, nOTS_Line_type, opac, and rfield.

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

◆ RT_OTS_ChkSum()

void RT_OTS_ChkSum ( long int ipPnt)

RT_OTS_ChkSum sanity check confirms summed continua reflect contents of individuals

Definition at line 631 of file rt_ots.cpp.

References DEBUG_ENTRY, ioQQQ, rfield, and TotalInsanity().

Referenced by ConvPresTempEdenIoniz().

Here is the call graph for this function:

◆ RT_OTS_PrtRate()

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

Definition at line 712 of file rt_ots.cpp.

References ASSERT, conv, DEBUG_ENTRY, dense, fnzone, ioQQQ, ipHELIUM, ipOXYGEN, opac, rfield, and TorF().

Referenced by ConvBase().

Here is the call graph for this function:

◆ RT_OTS_Update()

void RT_OTS_Update ( double * SumOTS)

RTOTSUpdata sum flux, otscon, otslin, ConInterOut, outlin, to form SummeDif, SummedCon SummedOcc,
int * is pointer to energy in continuum where this change happened,

Parameters
SumOTS
Returns
sum of ots rates

Definition at line 488 of file rt_ots.cpp.

References ASSERT, CalcTwoPhotonEmission(), DEBUG_ENTRY, dense, fixit(), ipH_LIKE, iso_ctrl, iso_sp, LIMELM, MAX2, MIN2, NISO, opac, rfield, SDIV(), SMALLDOUBLE, and t_iso_sp::TwoNu.

Referenced by ConvBase(), and IterRestart().

Here is the call graph for this function:

◆ RT_OTS_Zero()

void RT_OTS_Zero ( void )

zero these things out, called in zero

Definition at line 599 of file rt_ots.cpp.

References DEBUG_ENTRY, and rfield.

Referenced by ContSetIntensity().

◆ RT_recom_effic()

double RT_recom_effic ( long int ip)

rt_recom_effic generate escape probability function for continua,

Parameters
ip

Definition at line 11 of file rt_recom_effic.cpp.

References ASSERT, cdEXIT, cosmology, DEBUG_ENTRY, esccon(), EXIT_FAILURE, GetHubbleFactor(), ioQQQ, iteration, MAX2, MIN2, opac, phycon, rfield, sexp(), SMALLFLOAT, SPEEDLIGHT, and TE1RYD.

Referenced by iso_radiative_recomb().

Here is the call graph for this function:

◆ RT_stark()

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

Definition at line 14 of file rt_stark.cpp.

References EmissionProxy::Aul(), DEBUG_ENTRY, dense, TransitionProxy::Emis(), t_iso_sp::ex, TransitionProxy::ipCont(), ipH2s, ipH_LIKE, iso_ctrl, iso_sp, LIMELM, MAX2, MIN2, NISO, t_iso_sp::numLevels_local, t_iso_sp::numLevels_max, nzone, phycon, rt, SDIV(), t_iso_sp::st, strkar(), EmissionProxy::TauIn(), and t_iso_sp::trans().

Referenced by RT_line_all().

Here is the call graph for this function:

◆ RT_tau_inc()

◆ RT_tau_init()

◆ RT_tau_reset()

void RT_tau_reset ( void )

RT_tau_reset update total optical depth scale, called after iteration is complete

Definition at line 22 of file rt_tau_reset.cpp.

References ASSERT, colden, dBaseTrans, DEBUG_ENTRY, dense, diatoms, e2(), ExtraLymanLines, FeII_RT_tau_reset(), geometry, HFLines, ioQQQ, ipExtraLymanLines, ipH1s, ipH2p, ipH_LIKE, ipHe1s1S, ipHe2p1P, ipHE_LIKE, ipSatelliteLines, iso_ctrl, iso_sp, LIMELM, mole, mole_global, NCOLD, nHFLines, NISO, nLevel1, nSpecies, nUTA, nWindLine, opac, rfield, rt, RT_line_one_tau_reset(), S, SatelliteLines, TauLine2, TauLines, trace, and UTALines.

Referenced by cloudy().

Here is the call graph for this function:

◆ RTesc_lya()

double RTesc_lya ( double * esin,
double * dest,
double abund,
const TransitionProxy & t,
realnum DopplerWidth )

RTesc_lya escape prob for hydrogen atom Lya, using Hummer and Kunasz results

Parameters
*esin
*dest
abund
tline structure
DopplerWidth

Definition at line 271 of file rt_escprob.cpp.

References abund, ASSERT, DEBUG_ENTRY, TransitionProxy::Emis(), EmissionProxy::FracInwd(), TransitionProxy::ipCont(), MAX2, MIN2, opac, EmissionProxy::Pdest(), EmissionProxy::Pesc(), rt, RTesc_lya_1side(), SQRTPI, EmissionProxy::TauIn(), and EmissionProxy::TauTot().

Referenced by RT_line_escape().

Here is the call graph for this function:

Variable Documentation

◆ rt