Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
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, bool lgKeepLyman)
 

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, bool=true)
 
void RT_line_one_fine (const TransitionProxy &t, bool lgShield_this_zone, realnum pestrk, realnum DopplerWidth, bool lgKeepLyman)
 
void RT_fine_clear ()
 
void RT_line_all (linefunc line_one, bool lgExcludeLyman=false)
 
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

◆ DEST0

#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

◆ linefunc

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

Enumeration Type Documentation

◆ anonymous enum

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

◆ prt_trans_opc_debug()

void prt_trans_opc_debug ( const char * LineGroup,
const TransitionProxy & t )

◆ RT_continuum()

void RT_continuum ( void )

RT_continuum attenuation of diffuse and beamed continua

References ASSERT, cdEXIT, cmshft(), column(), cosmology, DEBUG_ENTRY, dense, e2(), EXIT_FAILURE, findspecieslocal(), fixit, fprintf(), geometry, hextra, ioQQQ, ipH_LIKE, ipHYDROGEN, iso_sp, iteration, MAX2, nzone, opac, pnegopc(), POW2, pow2, radius, rfield, SDIV(), sexp(), ShowMe(), SMALLFLOAT, TotalInsanity(), trace, and vexp().

Referenced by cloudy().

Here is the call graph for this function:

◆ RT_continuum_shield_fcn()

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:

◆ 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 add fegrain to outward beams, but within main formalism by including grains in all x-ray processes

References ASSERT, atmdat, atmdat_outer_shell(), EmissionProxy::Aul(), t_gaunt::brems_rt(), t_gaunt::brems_sum_ions(), CalcTwoPhotonEmission(), 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, DumpLine(), emergent_line(), TransitionProxy::Emis(), TransitionProxy::EnergyErg(), ExtraLymanLinesJ05, ExtraLymanLinesJ15, fprintf(), GrainMakeDiffuse(), gv, Heavy, HFLines, hmi, Singleton< t_gaunt >::Inst(), ioQQQ, TransitionProxy::ipCont(), ipExtraLymanLinesJ05, ipExtraLymanLinesJ15, ipH_LIKE, ipHE_LIKE, ipHELIUM, ipHYDROGEN, ipoint(), ipSatelliteLines, iso_ctrl, iso_sp, lgIsLymanLine(), LIMELM, MAX2, MIN2, NISO, nSpecies, t_iso_sp::numLevels_local, nWindLine, nzone, opac, TransitionProxy::outline(), EmissionProxy::Pesc_total(), phots(), phycon, pow2, PrtTwoPhotonEmissCoef(), radius, rfield, RT_iso_integrate_RRC(), safe_div(), SatelliteLines, set_xIntensity(), SEXP_LIMIT, SMALLFLOAT, t_iso_sp::st, TauLine2, trace, t_iso_sp::trans(), t_iso_sp::TwoNu, vzero(), and EmissionProxy::xIntensity().

Referenced by AGN_Hemis(), and cloudy().

Here is the call graph for this function:

◆ RT_EscLVG()

double RT_EscLVG ( double tau,
double sigma )

Referenced by RT_line_escape().

◆ RT_fine_clear()

void RT_fine_clear ( )

References cosmology, DEBUG_ENTRY, POW2, rfield, vzero(), and wind.

Referenced by RT_tau_inc().

Here is the call graph for this function:

◆ RT_line_all()

◆ RT_line_all_escape()

◆ 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

References atmdat, dBaseSpecies, dBaseTrans, DEBUG_ENTRY, dense, diatoms, ExtraLymanLinesHeLike, ExtraLymanLinesJ05, ExtraLymanLinesJ15, fprintf(), HFLines, ioQQQ, ipCARBON, ipExtraLymanLinesHeLike, ipExtraLymanLinesJ05, ipExtraLymanLinesJ15, ipH_LIKE, ipHE_LIKE, ipSatelliteLines, iso_ctrl, iso_sp, LIMELM, NISO, nSpecies, nWindLine, SatelliteLines, TauLine2, TotalInsanity(), and UTALines.

Referenced by PresTotCurrent().

Here is the call graph for this function:

◆ RT_line_one_escape()

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

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(), lgTauGood(), TransitionProxy::Lo(), EmissionProxy::Pdest(), EmissionProxy::Pelec_esc(), EmissionProxy::Pesc(), 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:

◆ RT_line_one_fine()

void RT_line_one_fine ( const TransitionProxy & t,
bool lgShield_this_zone,
realnum pestrk,
realnum DopplerWidth,
bool lgKeepLyman )

◆ 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_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

References ASSERT, dBaseSpecies, dBaseTrans, DEBUG_ENTRY, dense, DEST0, diatoms, ExtraLymanLinesJ05, ExtraLymanLinesJ15, findspecieslocal(), fnzone, fprintf(), he, Heavy, hmi, ioQQQ, ipExtraLymanLinesJ05, ipExtraLymanLinesJ15, ipH1s, ipH2p, ipH_LIKE, ipHELIUM, ipHYDROGEN, ipRecEsc, ipRecRad, iso_sp, L_, lgIsLymanLine(), LIMELM, MAX2, N_, NISO, nOTS1, nOTS2, nOTS_Line_type, nSpecies, nWindLine, nzone, opac, rfield, RT_OTS_AddCont(), RT_OTS_AddLine(), SMALLFLOAT, TauLine2, 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

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

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

Here is the call graph for this function:

◆ RT_OTS_ChkSum()

void RT_OTS_ChkSum ( long int ipPnt)

RT_OTS_ChkSum sanity check confirms summed continua reflect contents of individuals

References DEBUG_ENTRY, fprintf(), 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

References ASSERT, conv, DEBUG_ENTRY, dense, fnzone, fprintf(), 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

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

Referenced by ConvBase(), EdenError(), 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

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

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

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

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

Referenced by RT_line_all_escape().

Here is the call graph for this function:

◆ RT_tau_inc()

◆ RT_tau_init()

◆ RT_tau_reset()

Variable Documentation

◆ rt