Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
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 "container_classes.h"
Include dependency graph for iso_radiative_recomb.cpp:

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_alloc ()
 
void iso_recomb_auxiliary_free ()
 
void iso_recomb_setup (long ipISO)
 
double iso_dielec_recomb_rate (long ipISO, long nelem, long ipLo)
 

Variables

static multi_arr< double, 4 > RRCoef
 
static multi_arr< long, 2 > NumLevRecomb
 
static multi_arr< double, 3 > 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

◆ iso_cross_section()

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

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

Referenced by iso_recomb_integrand().

Here is the call graph for this function:

◆ iso_dielec_recomb_rate()

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

References ASSERT, DEBUG_ENTRY, freeBound::DielecRecombVsTemp, exp10(), hunt_bisect(), ipHe1s1S, ipHE_LIKE, iso_ctrl, iso_sp, NUM_DR_TEMPS, and phycon.

Referenced by iso_radiative_recomb().

Here is the call graph for this function:

◆ iso_put_recomb_error()

STATIC void iso_put_recomb_error ( long ipISO,
long nelem )

References ASSERT, ipHE_LIKE, ipHELIUM, IPRAD, iso_put_error(), iso_sp, min(), QN2ind(), and STATIC.

Referenced by iso_radiative_recomb().

Here is the call graph for this function:

◆ iso_radiative_recomb()

void iso_radiative_recomb ( long ipISO,
long nelem )

◆ iso_radiative_recomb_effective()

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

References ASSERT, DEBUG_ENTRY, dprintf(), fprintf(), ioQQQ, IPRAD, ipRecRad, iso_ctrl, iso_sp, L_, MAX2, N_, phycon, pow2, t_wavl::prt_wl(), S_, t_vac(), and t_wavl::wavlVac().

Referenced by iso_update_rates().

Here is the call graph for this function:

◆ iso_radrecomb_from_cross_section()

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

◆ iso_recomb_alloc()

void iso_recomb_alloc ( )

iso_recomb_alloc - allocate space needed for iso recombination tables.

References DEBUG_ENTRY, dense, iso_get_total_num_levels(), iso_sp, LIKE_RREC_MAXN(), LIMELM, 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:

◆ iso_recomb_auxiliary_free()

void iso_recomb_auxiliary_free ( )

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

References DEBUG_ENTRY, and NumLevRecomb.

Referenced by iso_create().

◆ iso_recomb_check()

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

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

Referenced by SanityCheckBegin().

Here is the call graph for this function:

◆ iso_recomb_integrand()

STATIC double iso_recomb_integrand ( double EE)

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

Referenced by iso_radrecomb_from_cross_section().

Here is the call graph for this function:

◆ iso_recomb_setup()

void iso_recomb_setup ( long ipISO)

iso_recomb_setup - read in or compile iso recombination tables.

Parameters
ipISO

Establish radiative recombination rate coefficients - RRC

References AS_OPTIONAL, ASSERT, cdEXIT, DEBUG_ENTRY, dense, elementnames, EXIT_FAILURE, EXIT_SUCCESS, exp10(), FFmtRead(), fprintf(), t_ADfA::H_rad_rec(), Singleton< t_ADfA >::Inst(), ioQQQ, ipHe1s1S, iso_ctrl, iso_radrecomb_from_cross_section(), iso_sp, LIKE_RREC_MAXN(), LIMELM, N_ISO_TE_RECOMB, NHYDRO_MAX_LEVEL, NISO, NULL, NumLevRecomb, open_data(), read_whole_line(), Recomb_Seaton59(), RECOMBMAGIC, RRCoef, RREC_MAXN, SumUpToThisN, TeRRCoef, TotalRecomb, and trace.

Referenced by iso_create().

Here is the call graph for this function:

◆ iso_RRCoef_Te()

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

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

Referenced by iso_radiative_recomb(), iso_recomb_check(), and SaveDo().

Here is the call graph for this function:

◆ TempInterp()

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

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

Referenced by iso_RRCoef_Te().

Here is the call graph for this function:

Variable Documentation

◆ global_EthRyd

double global_EthRyd
static

◆ globalISO

◆ globalL

long int globalL
static

◆ globalN

long int globalN
static

◆ globalS

long int globalS
static

◆ globalZ

◆ kTRyd

double kTRyd
static

◆ NumLevRecomb

multi_arr<long, 2> NumLevRecomb
static

◆ RRCoef

multi_arr<double,4> RRCoef
static

◆ TeRRCoef

double TeRRCoef[N_ISO_TE_RECOMB]
static

◆ TotalRecomb

multi_arr<double,3> TotalRecomb
static