cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions | Variables
iso_radiative_recomb.cpp File Reference
#include "cddefines.h"
#include "atmdat_adfa.h"
#include "conv.h"
#include "cosmology.h"
#include "elementnames.h"
#include "helike_recom.h"
#include "hydrogenic.h"
#include "ionbal.h"
#include "iso.h"
#include "opacity.h"
#include "phycon.h"
#include "prt.h"
#include "save.h"
#include "thirdparty.h"
#include "trace.h"
#include "rt.h"
#include "freebound.h"
#include "dense.h"
#include "integrate.h"
Include dependency graph for iso_radiative_recomb.cpp:

Go to the source code of this file.

Functions

STATIC double TempInterp (double *TempArray, double *ValueArray, long NumElements, double temp)
 
STATIC double iso_recomb_integrand (double EE)
 
STATIC void iso_put_recomb_error (long ipISO, long nelem)
 
STATIC double iso_radrecomb_from_cross_section (long ipISO, double temp, long nelem, long ipLo)
 
double iso_cross_section (double EgammaRyd, double EthRyd, long n, long l, long S, long globalZ, long globalISO)
 
void iso_radiative_recomb (long ipISO, long nelem)
 
void iso_radiative_recomb_effective (long ipISO, long nelem)
 
double iso_RRCoef_Te (long ipISO, long nelem, double temp, long n)
 
double iso_recomb_check (long ipISO, long nelem, long level, double temperature)
 
void iso_recomb_malloc (void)
 
void iso_recomb_auxiliary_free (void)
 
void iso_recomb_setup (long ipISO)
 
double iso_dielec_recomb_rate (long ipISO, long nelem, long ipLo)
 

Variables

static double **** RRCoef
 
static long ** NumLevRecomb
 
static double *** TotalRecomb
 
static double TeRRCoef [N_ISO_TE_RECOMB]
 
static double kTRyd
 
static double global_EthRyd
 
static long int globalZ
 
static long int globalISO
 
static long int globalN
 
static long int globalL
 
static long int globalS
 

Function Documentation

double iso_cross_section ( double  ERyd,
double  EthRyd,
long  n,
long  l,
long  S,
long  globalZ,
long  globalISO 
)

iso_cross_section get cross section for a particular level of an iso sequence ion

Parameters
ERyd
EthRyd
n
l
S
Z
ipISO

Definition at line 129 of file iso_radiative_recomb.cpp.

References cross_section(), DEBUG_ENTRY, H_cross_section(), He_cross_section(), ipH_LIKE, ipHE_LIKE, and TotalInsanity().

Referenced by iso_recomb_integrand().

Here is the call graph for this function:

double iso_dielec_recomb_rate ( long  ipISO,
long  nelem,
long  ipLo 
)

iso_dielec_recomb_rate - get state-specific dielectronic recombination rate

Parameters
ipISO
nelem
ipLo

Definition at line 1152 of file iso_radiative_recomb.cpp.

References t_phycon::alogte, ASSERT, DEBUG_ENTRY, freeBound::DielecRecombVsTemp, exp10(), t_iso_sp::fb, hunt_bisect(), ipHe1s1S, ipHE_LIKE, iso_ctrl, iso_sp, t_isoCTRL::lgDielRecom, NUM_DR_TEMPS, and phycon.

Referenced by iso_radiative_recomb().

Here is the call graph for this function:

STATIC void iso_put_recomb_error ( long  ipISO,
long  nelem 
)

Definition at line 574 of file iso_radiative_recomb.cpp.

References ASSERT, ipHE_LIKE, ipHELIUM, IPRAD, iso_put_error(), iso_sp, L_, MIN2, t_iso_sp::numLevels_max, t_iso_sp::QuantumNumbers2Index, and S_.

Referenced by iso_radiative_recomb().

Here is the call graph for this function:

void iso_radiative_recomb ( long  ipISO,
long  nelem 
)

iso_radiative_recomb - get rad recomb rate coefficients for iso sequences.

Parameters
ipISO
nelem

Definition at line 146 of file iso_radiative_recomb.cpp.

References ASSERT, cdEXIT, t_elementnames::chElementSym, t_isoCTRL::chISO, conv, cosmology, DEBUG_ENTRY, dense, t_ionbal::DR_Badnell_rate_coef, t_ionbal::DR_Badnell_suppress_fact, t_dense::eden, elementnames, EXIT_FAILURE, t_iso_sp::fb, fp_equal(), fprintf(), t_ADfA::H_rad_rec(), t_iso_sp::HighestLevelOpacStack, Singleton< t_ADfA >::Inst(), ionbal, ioQQQ, t_save::ioRecom, ipH1s, ipHE_LIKE, ipHELIUM, t_trace::ipIsoTrace, IPRAD, ipRecEsc, ipRecNetEsc, ipRecRad, iso_ctrl, iso_dielec_recomb_rate(), iso_put_error(), iso_put_recomb_error(), iso_radrecomb_from_cross_section(), iso_RRCoef_Te(), iso_sp, t_opac::lgCaseB, t_isoCTRL::lgDielRecom, t_cosmology::lgDo, t_trace::lgHBug, t_trace::lgHeBug, t_save::lgioRecom, t_trace::lgIsoTraceFull, t_iso_sp::lgLevelsLowered, t_iso_sp::lgMustReeval, t_isoCTRL::lgNoRecombInterp, t_isoCTRL::lgRandErrGen, t_isoCTRL::lgTopoff, t_trace::lgTrace, LIMELM, MAX2, MIN2, N_, t_iso_sp::n_HighestResolved_local, t_iso_sp::nCollapsed_local, t_iso_sp::nCollapsed_max, NHYDRO_MAX_LEVEL, NISO, t_conv::nTotalIoniz, t_iso_sp::numLevels_local, t_iso_sp::numLevels_max, opac, t_opac::OpacStack, phycon, PrintEfmt, t_iso_sp::RadRec_caseB, t_iso_sp::RadRec_effec, Recomb_Seaton59(), RT_recom_effic(), save, ShowMe(), SumUpToThisN, t_opac::TauAbsGeo, t_phycon::te, and trace.

Referenced by iso_update_rates().

Here is the call graph for this function:

void iso_radiative_recomb_effective ( long  ipISO,
long  nelem 
)

iso_radiative_recomb_effective - get effective recomb rate coefficients into each level (including indirect)

Parameters
ipISO
nelem

Definition at line 616 of file iso_radiative_recomb.cpp.

References ASSERT, t_iso_sp::BranchRatio, t_iso_sp::CascadeProb, DEBUG_ENTRY, dprintf(), t_iso_sp::fb, fprintf(), ioQQQ, IPRAD, ipRecRad, iso_ctrl, iso_sp, L_, t_isoCTRL::lgRandErrGen, MAX2, N_, t_iso_sp::numLevels_local, phycon, pow2(), prt_wl(), S_, t_phycon::te, and wavelength.

Referenced by iso_update_rates().

Here is the call graph for this function:

STATIC double iso_radrecomb_from_cross_section ( long  ipISO,
double  temp,
long  nelem,
long  ipLo 
)
void iso_recomb_auxiliary_free ( void  )

iso_recomb_auxiliary_free - free up some auxiliary space associated with iso recombination tables.

Definition at line 829 of file iso_radiative_recomb.cpp.

References DEBUG_ENTRY, NISO, and NumLevRecomb.

Referenced by iso_create().

double iso_recomb_check ( long  ipISO,
long  nelem,
long  level,
double  temperature 
)

iso_recomb_check - called by SanityCheck to confirm that recombination coef are ok, return value is relative error between new calculation of recom, and interp value

Parameters
ipISO
nelemthe chemical element, 1 for He
levelthe level, 0 for ground
temperaturethe temperature to be used

Definition at line 748 of file iso_radiative_recomb.cpp.

References DEBUG_ENTRY, iso_radrecomb_from_cross_section(), iso_RRCoef_Te(), and MAX2.

Referenced by SanityCheckBegin().

Here is the call graph for this function:

STATIC double iso_recomb_integrand ( double  EE)

Definition at line 117 of file iso_radiative_recomb.cpp.

References global_EthRyd, globalISO, globalL, globalN, globalS, globalZ, iso_cross_section(), kTRyd, and x1.

Referenced by iso_radrecomb_from_cross_section().

Here is the call graph for this function:

void iso_recomb_malloc ( void  )

iso_recomb_malloc - malloc space needed for iso recombination tables.

Definition at line 769 of file iso_radiative_recomb.cpp.

References DEBUG_ENTRY, dense, iso_get_total_num_levels(), iso_sp, t_dense::lgElmtOn, LIKE_RREC_MAXN, LIMELM, MALLOC, MAX2, N_ISO_TE_RECOMB, NISO, NumLevRecomb, RRCoef, RREC_MAXN, TeRRCoef, and TotalRecomb.

Referenced by iso_create().

Here is the call graph for this function:

void iso_recomb_setup ( long  ipISO)
double iso_RRCoef_Te ( long  ipISO,
long  nelem,
double  temp,
long  n 
)
iso_RRCoef_Te - interpolate iso recomb coeff as function of temperature
Parameters
ipISO
nelem
temp- the electron temperature
n

Definition at line 722 of file iso_radiative_recomb.cpp.

References ASSERT, DEBUG_ENTRY, exp10(), iso_ctrl, iso_sp, t_isoCTRL::lgNoRecombInterp, N_ISO_TE_RECOMB, RRCoef, TempInterp(), TeRRCoef, and TotalRecomb.

Referenced by iso_radiative_recomb(), and iso_recomb_check().

Here is the call graph for this function:

STATIC double TempInterp ( double *  TempArray,
double *  ValueArray,
long  NumElements,
double  temp 
)
Todo:
2 use a canned interpolation routine, no need for special one here

Definition at line 1227 of file iso_radiative_recomb.cpp.

References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, fprintf(), hunt_bisect(), ioQQQ, lagrange(), max(), and min().

Referenced by iso_RRCoef_Te().

Here is the call graph for this function:

Variable Documentation

double global_EthRyd
static
long int globalISO
static
long int globalL
static
long int globalN
static
long int globalS
static
long int globalZ
static
double kTRyd
static
long** NumLevRecomb
static
double**** RRCoef
static

Definition at line 30 of file iso_radiative_recomb.cpp.

Referenced by iso_recomb_malloc(), iso_recomb_setup(), and iso_RRCoef_Te().

double TeRRCoef[N_ISO_TE_RECOMB]
static

Definition at line 35 of file iso_radiative_recomb.cpp.

Referenced by iso_recomb_malloc(), iso_recomb_setup(), and iso_RRCoef_Te().

double*** TotalRecomb
static

Definition at line 32 of file iso_radiative_recomb.cpp.

Referenced by iso_recomb_malloc(), iso_recomb_setup(), and iso_RRCoef_Te().