#include "dense.h"
Go to the source code of this file.
Data Structures | |
class | t_ionbal |
Defines | |
#define | NSHELLS 7 |
Functions | |
bool | lgOH_ChargeTransferDominant (void) |
void | ion_recom_calculate (void) |
void | ion_trim (long int nelem) |
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 | |
t_ionbal | ionbal |
#define NSHELLS 7 |
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
Definition at line 385 of file ion_recomb_Badnell.cpp.
References AS_LOCAL_ONLY, 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, t_iso_sp::fb, FFmtRead(), t_ionbal::guess_noise, INPUT_LINE_LENGTH, ionbal, ioQQQ, ipH_LIKE, ipHE_LIKE, ipHELIUM, ipHYDROGEN, iso_sp, L_, lgDR_BadWeb_exist, lgDRBadnellDefined, lgDRBadnellDefinedPart2, t_dense::lgElmtOn, Parser::lgEOL(), lgMustMallocRec, lgRRBadnellDefined, LIMELM, MALLOC, MAX2, MAX_FIT_PAR_DR, MAX_FIT_PAR_RR, N, t_iso_sp::n_HighestResolved_max, t_iso_sp::nCollapsed_max, nDRFitPar, NISO, nMatch(), NUM_DR_TEMPS, t_iso_sp::numLevels_max, open_data(), pow(), pow3(), t_iso_sp::QuantumNumbers2Index, RandGauss(), read_whole_line(), RecNoise, RRFitPar, S, S_, strchr_s(), Parser::strcmp(), TorF(), and TotalInsanity().
Referenced by cloudy(), and ParseCompile().
void ion_collis | ( | long | nelem | ) |
ion_collis fill in collisional ionization rates, and resulting cooling
nelem | element number on C scale, H is 0 |
void ion_CX | ( | long | nelem | ) |
charge exchange for element nelem
charge exchange ionization / recombination
Definition at line 14 of file ion_cx.cpp.
References ASSERT, atmdat, t_ionbal::CX_recomb_rate_used, DEBUG_ENTRY, dense, t_atmdat::HCharExcRecTo, t_atmdat::HeCharExcRecTo, ionbal, t_dense::IonHigh, t_dense::IonLow, ipHELIUM, ipHYDROGEN, LIMELM, MIN2, NISO, and t_dense::xIonDense.
Referenced by IonNelem().
void ion_photo | ( | long int | nelem, | |
bool | lgPrintIt | |||
) |
ion_photo fill array PhotoRate with photoionization rates for heavy elements
nelem | is atomic number on C scale, 0 for H | |
lgPrintIt | debugging flag to turn on print |
Definition at line 26 of file ion_photo.cpp.
References ASSERT, atmdat, atom_pop2(), atoms, t_oxy::AugerO3, ca, t_elementnames::chElementNameShort, t_Heavy::chShell, t_ionbal::CompRecoilHeatRate, t_ionbal::CompRecoilIonRate, conv, t_oxy::d4363, t_oxy::d5007r, t_atoms::d5200r, t_oxy::d6300, DEBUG_ENTRY, dense, t_ca::dstCala, elementnames, GrainVar::elmSumAbund, t_rfield::extin_mag_V_point, t_iso_sp::fb, fe, t_fe::fegrain, t_fe::fekcld, t_fe::fekhot, GammaK(), GammaPrt(), gv, t_atmdat::HCharExcIonOf, t_phoHeat::HeatHiEnr, t_thermal::heating, t_phoHeat::HeatLowEnr, t_phoHeat::HeatNet, Heavy, hmi, HMRATE, t_oxy::i2d, t_oxy::i2p, t_opac::in1, Singleton< t_yield >::Inst(), ionbal, t_dense::IonHigh, t_dense::IonLow, t_opac::iopo2d, ioQQQ, ipCALCIUM, ipCARBON, t_opac::ipElement, ipH_LIKE, ipHYDROGEN, ipIRON, ipMAGNESIUM, t_opac::ipmgex, ipNITROGEN, t_opac::ipo1exc, t_opac::ipo3exc, t_opac::ipo3exc3, t_opac::ipOpMgEx, ipOXYGEN, iso_sp, GrainVar::lgDustOn(), t_dense::lgElmtOn, t_mole_global::lgLeidenHack, t_ionbal::lgPhotoIoniz_On, t_opac::lgRedoStatic, GrainVar::lgWD01, LIMELM, MAX2, MIN2, mole_global, t_rfield::nflux, NISO, t_conv::nPres2Ioniz, t_Heavy::nsShells, nzone, opac, oxy, t_atoms::p2nit, t_ionbal::PhotoRate_Shell, t_oxy::poiexc, t_oxy::poiii2, t_oxy::poiii2Max, t_oxy::poiii3, t_oxy::poiii3Max, t_oxy::poimax, t_atoms::popmg2, t_oxy::r4363Max, t_oxy::r5007Max, rfield, t_oxy::s3727, t_oxy::s7325, thermal, t_hmi::UV_Cont_rel2_Habing_TH85_face, t_dense::xIonDense, and t_atoms::xMg2Max.
Referenced by IonNelem().
void ion_recom_calculate | ( | void | ) |
ion_recom_calculate called by conv_base to calculate radiative and dielectronic recombination rate coefficients
Definition at line 1125 of file ion_recomb_Badnell.cpp.
References ASSERT, atmdat_dielrec_fe(), Badnell_DR_rate_eval(), Badnell_RR_rate_eval(), cdEXIT, chDRDataSource, t_elementnames::chElementNameShort, chRRDataSource, CollisSuppres(), DEBUG_ENTRY, dense, t_ionbal::DR_Badnell_rate_coef, DR_Badnell_rate_coef_mean_ion, t_ionbal::DR_mean_scale, t_dense::eden, elementnames, EXIT_SUCCESS, fp_equal(), Singleton< t_ADfA >::Inst(), ionbal, ioQQQ, ipHYDROGEN, ipIRON, ipLITHIUM, lgDR_BadWeb_exist, t_ionbal::lgRecom_Badnell_print, LIMELM, MIN2, phycon, pow3(), t_ADfA::rad_rec(), RecNoise, t_ionbal::RR_Badnell_rate_coef, t_ionbal::RR_rate_coef_used, t_ionbal::RR_Verner_rate_coef, sexp(), t_phycon::te, and t_phycon::te_eV.
Referenced by ConvBase().
void ion_recomb | ( | bool | , | |
long | ||||
) |
ion_recomb generate recombination coefficients for any species
void ion_recombAGN | ( | FILE * | io | ) |
ion_recombAGN generate recombination coefficients for AGN table
Definition at line 218 of file ion_recomb.cpp.
References abund, ASSERT, t_elementnames::chElementSym, ConvBase(), DEBUG_ENTRY, dense, t_dense::eden, EdenChange(), elementnames, Heavy, ionbal, t_dense::IonHigh, t_dense::IonLow, ioQQQ, ipHYDROGEN, ipLITHIUM, t_abund::lgAGN, LIMELM, N1LIM, N2LIM, phycon, t_ionbal::RateRecomTot, t_phycon::te, TempChange(), and t_Heavy::Valence_IP_Ryd.
Referenced by SaveDo().
void ion_solver | ( | long int | nelem, | |
bool | lgPrintIt | |||
) |
ion_solver solve the bi-diagonal matrix for ionization balance
nelem | - element number on C scale, He is 1 | |
lgPrintIt | - option to print details of matrix elements |
Definition at line 62 of file ion_solver.cpp.
References ASSERT, conv, DEBUG_ENTRY, dense, fill_array(), find_solution(), get_total_abundance_ions(), HomogeneousSource(), t_conv::incrementCounter(), ION_SOLVES, t_dense::IonHigh, t_dense::IonLow, ipH_LIKE, iso_charge_transfer_update(), iso_departure_coefficients(), ISO_LOOPS, iso_satellite_update(), iso_set_ion_rates(), iso_solve(), t_prt::lgPrtArry, lgTrivialSolution(), LIMELM, MIN2, NISO, PrintRates(), prt, source, and store_new_densities().
Referenced by IonHelium(), IonHydro(), and IonNelem().
void ion_trim | ( | long int | nelem | ) |
ion_trim raise or lower most extreme stages of ionization considered
nelem | element number on the C scale, 5 for C |
Definition at line 21 of file ion_trim.cpp.
References t_rfield::anu, ASSERT, t_elementnames::chElementName, conv, DEBUG_ENTRY, dense, t_dense::density_low_limit, elementnames, fnzone, t_struc::gas_phase, t_dense::gas_phase, t_thermal::heating, Heavy, ionbal, t_dense::IonHigh, t_dense::IonLow, ioQQQ, ipHELIUM, ipHYDROGEN, iso_sp, t_conv::lgIonStageTrimed, t_mole_global::lgNoMole, t_conv::lgSearch, t_ionbal::lgTrimhiOn, LIMELM, MAX2, MIN2, mole_global, t_rfield::nflux, NISO, t_conv::nTotalIoniz, t_iso_sp::numLevels_max, nzone, phycon, t_radius::Radius, radius, rfield, SDIV(), SMALLFLOAT, t_iso_sp::st, struc, t_phycon::te_ryd, thermal, t_ionbal::trimhi, t_ionbal::trimlo, t_Heavy::Valence_IP_Ryd, t_struc::xIonDense, and t_dense::xIonDense.
Referenced by ConvBase().
void ion_wrapper | ( | long | nelem | ) |
ion_wrapper a wrapper that redirects to IonHelium, IonCarbo, etc..
Definition at line 1482 of file ion_solver.cpp.
References ASSERT, t_elementnames::chElementSym, DEBUG_ENTRY, dense, elementnames, t_dense::gas_phase, IonHelium(), IonHydro(), IonNelem(), ioQQQ, ipHELIUM, ipHYDROGEN, lgElemsConserved(), t_dense::lgElmtOn, t_trace::lgHeavyBug, t_trace::lgTrace, LIMELM, trace, and t_dense::xIonDense.
Referenced by ConvBase().
void ion_zero | ( | long int | nelem | ) |
ion_zero zero out heating and charge transfer save arrays
Definition at line 8 of file ion_zero.cpp.
References DEBUG_ENTRY, t_thermal::heating, and thermal.
Referenced by IonNelem().
void IonHelium | ( | void | ) |
Definition at line 12 of file ion_helium.cpp.
References conv, DEBUG_ENTRY, dense, t_dense::gas_phase, ion_solver(), ionbal, ioQQQ, ipH_LIKE, ipHE_LIKE, ipHELIUM, iso_sp, t_dense::lgElmtOn, t_trace::lgHeBug, t_dense::lgSetIoniz, t_conv::nTotalIoniz, nzone, t_ionbal::RateIonizTot(), t_ionbal::RateRecomTot, t_ionbal::RR_rate_coef_used, t_dense::SetIoniz, t_iso_sp::st, trace, and t_dense::xIonDense.
Referenced by ion_wrapper().
void IonNelem | ( | bool | lgPrintIt, | |
long int | nelem | |||
) |
Definition at line 12 of file ion_nelem.cpp.
References DEBUG_ENTRY, dense, fnzone, t_dense::gas_phase, ion_collis(), ion_CX(), ion_photo(), ion_recomb(), ion_solver(), ion_zero(), ioQQQ, t_dense::lgElmtOn, t_trace::lgHeavyBug, t_trace::lgTrace, trace, and t_dense::xIonDense.
Referenced by ion_wrapper().
bool lgOH_ChargeTransferDominant | ( | void | ) |
Definition at line 370 of file ion_solver.cpp.
References atmdat, dense, t_atmdat::HCharExcIonOf, t_atmdat::HCharExcIonTotal, t_atmdat::HCharExcRecTo, t_atmdat::HCharExcRecTotal, ionbal, ipHYDROGEN, ipOXYGEN, mole, t_ionbal::RateIonizTot(), t_ionbal::RateRecomTot, t_mole_local::sink, THRESHOLD, and t_dense::xIonDense.
Definition at line 5 of file ionbal.cpp.
Referenced by atmdat_3body(), atmdat_readin(), Badnell_rec_init(), diatomics::CalcPhotoionizationRate(), ContCreatePointers(), ContSetIntensity(), CoolEvaluate(), da(), fill_array(), find_solution(), GammaPrtRate(), GammaPrtShells(), get_total_abundance_ions(), GrainChargeTemp(), HeatSum(), highen(), HomogeneousSource(), HydroLevel(), InitCoreload(), InitDefaultsPreparse(), ion_collis(), ion_CX(), ion_photo(), ion_recom_calculate(), ion_recomb(), ion_recombAGN(), ion_trim(), IonHelium(), iso_collide(), iso_ionize_recombine(), iso_level(), iso_photo(), iso_radiative_recomb(), iso_set_ion_rates(), iso_update_rates(), IterRestart(), IterStart(), lgNetEdenSrcSmall(), lgOH_ChargeTransferDominant(), lines(), lines_general(), lines_lv1_li_ne(), lines_lv1_na_ar(), mole_ion_trim(), mole_solve(), OpacityAddTotal(), ParseCosmicRays(), ParseDont(), ParseSet(), PrintRates(), PrtComment(), PrtHydroTrace1a(), PrtZone(), SaveDo(), store_new_densities(), UpdateUTAs(), and zero().