Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
ion_recomb_Badnell.cpp File Reference
#include "cddefines.h"
#include "phycon.h"
#include "elementnames.h"
#include "atmdat.h"
#include "atmdat_adfa.h"
#include "iso.h"
#include "ionbal.h"
#include "save.h"
#include "freebound.h"
#include "dense.h"
#include "ran.h"
#include "thirdparty.h"
Include dependency graph for ion_recomb_Badnell.cpp:

Functions

STATIC double CollisSuppres (long int atomic_number, long int ionic_charge, double eden, double T)
 
STATIC double Badnell_DR_rate_eval (int nAtomicNumberCScale, int n_core_e_before_recomb)
 
STATIC double Badnell_RR_rate_eval (int nAtomicNumberCScale, int n_core_e_before_recomb)
 
void Badnell_rec_init (void)
 
void ion_recom_calculate (void)
 

Variables

static const int MAX_FIT_PAR_DR = 9
 
static multi_arr< double, 3 > DRFitParPart1
 
static multi_arr< double, 3 > DRFitParPart2
 
static multi_arr< int, 2 > nDRFitPar
 
static const int MAX_FIT_PAR_RR = 6
 
static multi_arr< double, 3 > RRFitPar
 
static multi_arr< bool, 2 > lgDRBadnellDefined
 
static multi_arr< bool, 2 > lgDRBadnellDefinedPart2
 
static multi_arr< bool, 2 > lgRRBadnellDefined
 
static multi_arr< bool, 2 > lgDR_BadWeb_exist
 
static bool lgMustAllocateRec =true
 
static double RecNoise [LIMELM]
 
static double DR_Badnell_rate_coef_mean_ion [LIMELM]
 
static char chDRDataSource [LIMELM][LIMELM][10]
 
static char chRRDataSource [LIMELM][LIMELM][10]
 

Function Documentation

◆ Badnell_DR_rate_eval()

STATIC double Badnell_DR_rate_eval ( int nAtomicNumberCScale,
int n_core_e_before_recomb )
Badnell_DR_rate_eval This code is written by Terry Yun, 2005 
It interpolates the rate coefficients in a given temperature.
It receives atomic number on Physics scale, with H = 1, 
and the number of core electrons before recombination, and returns the rate coefficient*
It returns
'-2': initial <= final
init < 0 or init >302 or final < 0 or final > 302
'-1': the transition is not defined
'99': unknown invalid entries                         
Parameters
z_valatomic number on C scale - He is 1
n_valnumber of core electrons before capture of free electron

References ASSERT, chDRDataSource, DEBUG_ENTRY, DRFitParPart1, DRFitParPart2, ipIRON, lgDRBadnellDefined, LIMELM, nDRFitPar, phycon, sexp(), and STATIC.

Referenced by Badnell_rec_init(), and ion_recom_calculate().

Here is the call graph for this function:

◆ Badnell_rec_init()

void Badnell_rec_init ( void )

Badnell_rec_init This code is written by Terry Yun, 2005 * It reads rate coefficient fits into 3D arrays and output array.out for testing * The testing can be commented out

References ASSERT, Badnell_DR_rate_eval(), Badnell_RR_rate_eval(), cdEXIT, DEBUG_ENTRY, dense, freeBound::DielecRecombVsTemp, DR_Badnell_rate_coef_mean_ion, DRFitParPart1, DRFitParPart2, EXIT_FAILURE, exp10(), FFmtRead(), fprintf(), ionbal, ioQQQ, ipH_LIKE, ipHE_LIKE, ipHELIUM, ipHYDROGEN, iso_sp, L_, lgDR_BadWeb_exist, lgDRBadnellDefined, lgDRBadnellDefinedPart2, lgMustAllocateRec, lgRRBadnellDefined, LIMELM, MAX2, MAX_FIT_PAR_DR, MAX_FIT_PAR_RR, nDRFitPar, NISO, NUM_DR_TEMPS, open_data(), pow3, ran, read_whole_line(), RecNoise, RRFitPar, S, S_, TorF(), TotalInsanity(), and Triangle2().

Referenced by cloudy(), and ParseCompile().

Here is the call graph for this function:

◆ Badnell_RR_rate_eval()

STATIC double Badnell_RR_rate_eval ( int nAtomicNumberCScale,
int n_core_e_before_recomb )

Badnell_RR_rate_eval

Parameters
z_valatomic number on C scale - He - 1
n_valnumber of core electrons before capture of free electron

References ASSERT, chRRDataSource, DEBUG_ENTRY, ipIRON, lgRRBadnellDefined, LIMELM, phycon, pow(), RRFitPar, and STATIC.

Referenced by Badnell_rec_init(), and ion_recom_calculate().

Here is the call graph for this function:

◆ CollisSuppres()

STATIC double CollisSuppres ( long int atomic_number,
long int ionic_charge,
double eden,
double T )

References ASSERT, DEBUG_ENTRY, fprintf(), ioQQQ, pow(), pow2, powi(), STATIC, and TotalInsanity().

Referenced by ion_recom_calculate().

Here is the call graph for this function:

◆ ion_recom_calculate()

void ion_recom_calculate ( void )

ion_recom_calculate called by conv_base to calculate radiative and dielectronic recombination rate coefficients

References ASSERT, atmdat_dielrec_fe(), Badnell_DR_rate_eval(), Badnell_RR_rate_eval(), chDRDataSource, chRRDataSource, CollisSuppres(), DEBUG_ENTRY, dense, DR_Badnell_rate_coef_mean_ion, elementnames, fp_equal(), fprintf(), Singleton< t_ADfA >::Inst(), ionbal, ioQQQ, ipHELIUM, ipHYDROGEN, ipIRON, lgDR_BadWeb_exist, LIMELM, MIN2, phycon, powpq(), t_ADfA::rad_rec(), RecNoise, save, and sexp().

Referenced by ConvBase().

Here is the call graph for this function:

Variable Documentation

◆ chDRDataSource

char chDRDataSource[LIMELM][LIMELM][10]
static

◆ chRRDataSource

char chRRDataSource[LIMELM][LIMELM][10]
static

◆ DR_Badnell_rate_coef_mean_ion

double DR_Badnell_rate_coef_mean_ion[LIMELM]
static

◆ DRFitParPart1

multi_arr<double,3> DRFitParPart1
static

◆ DRFitParPart2

multi_arr<double,3> DRFitParPart2
static

◆ lgDR_BadWeb_exist

multi_arr<bool,2> lgDR_BadWeb_exist
static

◆ lgDRBadnellDefined

multi_arr<bool,2> lgDRBadnellDefined
static

◆ lgDRBadnellDefinedPart2

multi_arr<bool,2> lgDRBadnellDefinedPart2
static

Referenced by Badnell_rec_init().

◆ lgMustAllocateRec

bool lgMustAllocateRec =true
static

Referenced by Badnell_rec_init().

◆ lgRRBadnellDefined

multi_arr<bool,2> lgRRBadnellDefined
static

◆ MAX_FIT_PAR_DR

const int MAX_FIT_PAR_DR = 9
static

Referenced by Badnell_rec_init().

◆ MAX_FIT_PAR_RR

const int MAX_FIT_PAR_RR = 6
static

Referenced by Badnell_rec_init().

◆ nDRFitPar

multi_arr<int,2> nDRFitPar
static

◆ RecNoise

double RecNoise[LIMELM]
static

◆ RRFitPar

multi_arr<double,3> RRFitPar
static