Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
ionbal.h File Reference
#include "module.h"
#include "container_classes.h"
Include dependency graph for ionbal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  t_ionbal
 

Functions

void ion_recom_calculate (void)
 
void ion_zero (long int nelem)
 
void ion_collis (long nelem)
 
void ion_solver (long int nelem, bool lgPrintIt)
 
void ion_photo (long int nelem, bool lgPrintIt)
 
void ion_CX (long nelem)
 
void ion_recomb (bool, long)
 
void ion_recombAGN (FILE *io)
 
void ion_wrapper (long nelem)
 
void Badnell_rec_init (void)
 
void IonNelem (bool lgPrintIt, long int nelem)
 
void IonHelium (void)
 

Variables

static const int NSHELLS = 7
 
t_ionbal ionbal
 

Function Documentation

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

◆ ion_collis()

void ion_collis ( long nelem)

ion_collis fill in collisional ionization rates, and resulting cooling

Parameters
nelemelement number on C scale, H is 0

◆ ion_CX()

void ion_CX ( long nelem)

charge exchange for element nelem

charge exchange ionization / recombination

References ASSERT, atmdat, DEBUG_ENTRY, dense, ionbal, iso_sp, LIMELM, MIN2, t_atmdat::NCX, and NISO.

Referenced by IonNelem().

◆ ion_photo()

void ion_photo ( long int nelem,
bool lgPrintIt )

ion_photo fill array PhotoRate with photoionization rates for heavy elements

Parameters
nelemis atomic number on C scale, 0 for H
lgPrintItdebugging flag to turn on print

References ASSERT, atmdat, atoms, conv, dBaseSpecies, dBaseStates, DEBUG_ENTRY, dense, elementnames, fe, fprintf(), GammaK(), GammaPrt(), gv, t_phoHeat::HeatHiEnr, t_phoHeat::HeatLowEnr, t_phoHeat::HeatNet, Heavy, hmi, hmrate4(), Singleton< t_yield >::Inst(), ionbal, ioQQQ, ipCALCIUM, ipCARBON, ipH1s, ipH2p, ipH_LIKE, ipHELIUM, ipHYDROGEN, ipIRON, ipMAGNESIUM, ipNITROGEN, ipoint(), ipOXYGEN, iso_sp, LIMELM, MAX2, MIN2, mole_global, NISO, opac, oxy, phycon, rfield, SMALLFLOAT, and thermal.

Referenced by IonNelem().

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:

◆ ion_recomb()

void ion_recomb ( bool ,
long  )

ion_recomb generate recombination coefficients for any species

◆ ion_recombAGN()

void ion_recombAGN ( FILE * io)

ion_recombAGN generate recombination coefficients for AGN table

References abund, ASSERT, ConvBase(), DEBUG_ENTRY, dense, EdenChange(), elementnames, fprintf(), Heavy, ionbal, ipHYDROGEN, ipLITHIUM, LIMELM, phycon, and TempChange().

Referenced by SaveDo().

Here is the call graph for this function:

◆ ion_solver()

void ion_solver ( long int nelem,
bool lgPrintIt )

ion_solver solve the bi-diagonal matrix for ionization balance

Parameters
nelem- element number on C scale, He is 1
lgPrintIt- option to print details of matrix elements

References ASSERT, broken(), clean_up(), conv, DEBUG_ENTRY, dense, fill_array(), fill_ext_src_and_snk(), find_solution(), get_total_abundance_ions(), Heavy, HomogeneousSource(), ionbal, ipCARBON, ipH_LIKE, iso_charge_transfer_update(), iso_departure_coefficients(), iso_satellite_update(), iso_set_ion_rates(), iso_solve(), lgTrivialSolution(), LIMELM, MIN2, NISO, PrintRates(), prt, renorm_solution(), and store_new_densities().

Referenced by IonHelium(), IonHydro(), and IonNelem().

Here is the call graph for this function:

◆ ion_wrapper()

void ion_wrapper ( long nelem)

ion_wrapper a wrapper that redirects to IonHelium, IonCarbo, etc..

References ASSERT, DEBUG_ENTRY, dense, elementnames, fprintf(), IonHelium(), IonHydro(), IonNelem(), ioQQQ, ipHELIUM, ipHYDROGEN, lgElemsConserved(), LIMELM, and trace.

Referenced by ConvBase().

Here is the call graph for this function:

◆ ion_zero()

void ion_zero ( long int nelem)

ion_zero zero out heating and charge transfer save arrays

References DEBUG_ENTRY, and thermal.

Referenced by IonNelem().

◆ IonHelium()

void IonHelium ( void )

References conv, DEBUG_ENTRY, dense, fprintf(), ion_solver(), ionbal, ioQQQ, ipH_LIKE, ipHE_LIKE, ipHELIUM, iso_sp, nzone, and trace.

Referenced by ion_wrapper().

Here is the call graph for this function:

◆ IonNelem()

void IonNelem ( bool lgPrintIt,
long int nelem )

References DEBUG_ENTRY, dense, fnzone, fprintf(), ion_collis(), ion_CX(), ion_photo(), ion_recomb(), ion_solver(), ion_zero(), ioQQQ, and trace.

Referenced by ion_wrapper().

Here is the call graph for this function:

Variable Documentation

◆ ionbal

◆ NSHELLS

const int NSHELLS = 7
static

max number of shells we ever have to deal with

Referenced by t_ionbal::alloc().