cloudy  trunk
Data Structures | Defines | Functions | Variables
iso.h File Reference

Go to the source code of this file.

Data Structures

struct  t_iso

Defines

#define HE1CSARRAY   10
#define KILL_BELOW_PLASMA(E_)   ( (rfield.lgPlasNu && ((E_)<rfield.plsfrq) ) ? 0.:1. )
#define NUM_DR_TEMPS   19
#define N_(A_)   (StatesElem[ipISO][nelem][A_].n)
#define L_(A_)   (StatesElem[ipISO][nelem][A_].l)
#define S_(A_)   (StatesElem[ipISO][nelem][A_].S)
#define J_(A_)   (StatesElem[ipISO][nelem][A_].j)
#define IPRAD   0
#define IPCOLLIS   1
#define RREC_MAXN   40
#define LIKE_RREC_MAXN(A_)   ( A_ == ipHELIUM ? 40 : 20 )
#define N_ISO_TE_RECOMB   41
#define SumUpToThisN   1000
#define RECOMBMAGIC   (80405)

Functions

void iso_cascade (long ipISO, long nelem)
void iso_collapsed_bnl_print (long ipISO, long nelem)
void iso_collapsed_bnl_set (long ipISO, long nelem)
void iso_collapsed_Aul_update (long ipISO, long nelem)
void iso_collapsed_lifetimes_update (long ipISO, long nelem)
void iso_collide (long ipISO, long nelem)
void iso_collisional_ionization (long ipISO, long nelem)
void iso_continuum_lower (long ipISO, long nelem)
void iso_cool (long ipISO, long nelem)
void iso_create (void)
double iso_dielec_recomb_rate (long ipISO, long nelem, long ipLo)
void iso_error_generation (long ipISO, long nelem)
long iso_get_total_num_levels (long ipISO, long nmaxResolved, long numCollapsed)
void iso_ionize_recombine (long ipISO, long nelem)
void iso_level (const long ipISO, const long nelem)
void iso_photo (long ipISO, long nelem)
void iso_prt_pops (long ipISO, long nelem, bool lgPrtDeparCoef)
void iso_put_error (long ipISO, long nelem, long ipHi, long ipLo, long whichData, realnum errorToPut)
void iso_radiative_recomb (long ipISO, long nelem)
void iso_radiative_recomb_effective (long ipISO, long nelem)
double iso_recomb_check (long ipISO, long nelem, long level, double temperature)
void iso_recomb_auxiliary_free (void)
void iso_recomb_malloc (void)
void iso_recomb_setup (long ipISO)
double iso_RRCoef_Te (long ipISO, long nelem, long n)
void iso_satellite_update (void)
void iso_solve (long ipISO)
void iso_suprathermal (long ipISO, long nelem)
void iso_update_num_levels (long ipISO, long nelem)

Variables

EXTERN multi_arr< quantumState, 3 > StatesElem
EXTERN long int max_num_levels
EXTERN struct t_iso iso

Detailed Description

Definition in file iso.h.


Define Documentation

#define HE1CSARRAY   10

temperatures at which CS for He1 are stored

Definition at line 14 of file iso.h.

Referenced by HeCollidSetup().

#define IPCOLLIS   1

Definition at line 29 of file iso.h.

Referenced by HeCSInterp(), and iso_level().

#define IPRAD   0
#define J_ (   A_)    (StatesElem[ipISO][nelem][A_].j)

Definition at line 26 of file iso.h.

Referenced by DGEMM(), DGER(), DGETF2(), DGETRF(), and DTRSM().

#define KILL_BELOW_PLASMA (   E_)    ( (rfield.lgPlasNu && ((E_)<rfield.plsfrq) ) ? 0.:1. )

This macro is used to zero any radiative process with photon energy below the plasma frequency. The energy must be in Rydbergs!

Definition at line 18 of file iso.h.

Referenced by iso_level().

#define L_ (   A_)    (StatesElem[ipISO][nelem][A_].l)
#define LIKE_RREC_MAXN (   A_)    ( A_ == ipHELIUM ? 40 : 20 )

Ions of the sequences will go up to this n, h-like He will get same as iso roots.

Definition at line 40 of file iso.h.

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

#define N_ (   A_)    (StatesElem[ipISO][nelem][A_].n)
#define N_ISO_TE_RECOMB   41

Definition at line 42 of file iso.h.

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

#define NUM_DR_TEMPS   19

Definition at line 20 of file iso.h.

Referenced by iso_allocate(), and iso_dielec_recomb_rate().

#define RECOMBMAGIC   (80405)

the magic number for the table of recombination coefficients, YYMMDD

Definition at line 48 of file iso.h.

Referenced by iso_recomb_setup().

#define RREC_MAXN   40

this is the number of levels used with the atom xx-like levels large command

Definition at line 37 of file iso.h.

Referenced by iso_recomb_malloc(), iso_recomb_setup(), ParseAtomISO(), and ParseCompile().

#define S_ (   A_)    (StatesElem[ipISO][nelem][A_].S)
#define SumUpToThisN   1000

This is the n to go up to when calculating total recombination. Any change here will not be reflected in total recomb until "compile xxlike" is run

Definition at line 46 of file iso.h.

Referenced by iso_radiative_recomb(), and iso_recomb_setup().


Function Documentation

void iso_cascade ( long  ipISO,
long  nelem 
)

iso_cascade - calculate cascade probabilities, branching ratios, and associated errors

Parameters:
ipISO
nelem

Cascade probabilities are as defined in Robbins 68, generalized here for cascade probability for any iso sequence. >>refer He triplets Robbins, R.R. 1968, ApJ 151, 497R >>refer He triplets Robbins, R.R. 1968a, ApJ 151, 511R

Definition at line 1242 of file iso_create.cpp.

References ASSERT, t_iso::BranchRatio, t_iso::CascadeProb, DEBUG_ENTRY, t_iso::Error, ioQQQ, ipH_LIKE, ipHe2p3P0, ipHe2p3P1, ipHe2p3P2, ipHE_LIKE, ipHELIUM, IPRAD, iso, L_, t_opac::lgCaseB, t_iso::lgRandErrGen, MALLOC, N_, t_iso::n_HighestResolved_max, t_iso::nCollapsed_max, t_iso::numLevels_max, opac, S, S_, t_iso::SigmaAtot, t_iso::SigmaCascadeProb, t_iso::SmallA, StatesElem, and Transitions.

Referenced by iso_create(), and iso_solve().

void iso_collapsed_Aul_update ( long  ipISO,
long  nelem 
)

iso_collapsed_Aul_update - update decays from collapsed levels

Parameters:
ipISO
nelem

Definition at line 1912 of file iso_create.cpp.

References ASSERT, t_iso::bnl_effective, t_iso::CachedAs, DEBUG_ENTRY, ipH_LIKE, ipHE_LIKE, iso, L_, t_iso::n_HighestResolved_max, t_iso::nCollapsed_max, t_iso::numLevels_max, t_iso::QuantumNumbers2Index, StatesElem, TotalInsanity(), and Transitions.

Referenced by iso_solve().

Here is the call graph for this function:

void iso_collapsed_bnl_print ( long  ipISO,
long  nelem 
)

iso_collapsed_bnl_print - print departure coefficients for collapsed levels

Parameters:
ipISO
nelem

Definition at line 1866 of file iso_create.cpp.

References t_iso::bnl_effective, t_elementnames::chElementSym, t_iso::chISO, DEBUG_ENTRY, elementnames, ioQQQ, ipH_LIKE, ipHE_LIKE, iso, t_iso::n_HighestResolved_max, and t_iso::nCollapsed_max.

void iso_collapsed_bnl_set ( long  ipISO,
long  nelem 
)

iso_collapsed_bnl_set - set departure coefficients for collapsed levels

Parameters:
ipISO
nelem

these are just sanity checks, the interpolated value should be between values at interpolation points

Definition at line 1671 of file iso_create.cpp.

References ASSERT, t_iso::bnl_effective, DEBUG_ENTRY, dense, t_dense::eden, hunt_bisect(), ipH_LIKE, ipHE_LIKE, ipHELIUM, ipHYDROGEN, iso, MAX2, MAX4, MIN2, MIN4, t_iso::n_HighestResolved_max, t_iso::nCollapsed_max, phycon, t_phycon::te, and TotalInsanity().

Referenced by iso_solve().

Here is the call graph for this function:

void iso_collapsed_lifetimes_update ( long  ipISO,
long  nelem 
)

iso_collapsed_lifetimes_update - update lifetimes of collapsed levels

Parameters:
ipISO
nelem

Definition at line 1959 of file iso_create.cpp.

References ASSERT, DEBUG_ENTRY, iso, t_iso::nCollapsed_max, t_iso::numLevels_max, PI4, t_iso::SmallA, SMALLFLOAT, StatesElem, and Transitions.

Referenced by iso_solve().

void iso_collide ( long  ipISO,
long  nelem 
)
void iso_collisional_ionization ( long  ipISO,
long  nelem 
)

iso_collisional_ionization - calculate collisional ionization rate for ipISO, nelem

Parameters:
ipISO
nelem

Definition at line 24 of file iso_collide.cpp.

References ASSERT, t_iso::ColIoniz, DEBUG_ENTRY, Hion_coll_ioniz_ratecoef(), hydro_vs_ioniz(), Singleton< T >::Inst(), iso, t_iso::lgColl_ionize, t_iso::lgLevelsLowered, NISO, t_iso::numLevels_max, phycon, and t_phycon::te.

Referenced by iso_collide().

Here is the call graph for this function:

void iso_continuum_lower ( long  ipISO,
long  nelem 
)
void iso_cool ( long  ipISO,
long  nelem 
)

iso_cool compute net heating/cooling due to hydrogenc atom species

Parameters:
ipISOthe isoelectronic sequence, 0 for H
nelemis element, so 0 for H itself

Referenced by CoolEvaluate().

void iso_create ( void  )
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 985 of file iso_radiative_recomb.cpp.

References t_phycon::alogte, ASSERT, DEBUG_ENTRY, t_iso::DielecRecombVsTemp, hunt_bisect(), ipHe1s1S, ipHE_LIKE, iso, t_iso::lgDielRecom, NUM_DR_TEMPS, t_iso::numLevels_max, and phycon.

Referenced by iso_radiative_recomb().

Here is the call graph for this function:

void iso_error_generation ( long  ipISO,
long  nelem 
)

iso_error_generation generate gaussian errors

Parameters:
ipISO
nelem

Definition at line 34 of file iso_error.cpp.

References ASSERT, DEBUG_ENTRY, t_iso::Error, t_iso::ErrorFactor, IPRAD, iso, iso_put_error(), L_, t_iso::lgErrGenDone, MyGaussRand(), N_, t_iso::n_HighestResolved_max, and t_iso::numLevels_max.

Referenced by iso_solve().

Here is the call graph for this function:

long iso_get_total_num_levels ( long  ipISO,
long  nmaxResolved,
long  numCollapsed 
)

iso_get_total_num_levels - get total number of levels with the given number of resolved and collapsed

Parameters:
ipISO
nmaxResolved
numCollapsed

Definition at line 1614 of file iso_create.cpp.

References DEBUG_ENTRY, ipH_LIKE, ipHE_LIKE, and TotalInsanity().

Referenced by iso_continuum_lower(), iso_recomb_malloc(), and iso_update_num_levels().

Here is the call graph for this function:

void iso_ionize_recombine ( long  ipISO,
long  nelem 
)

iso_ionize_recombine evaluate state specific creation and destruction processes

Parameters:
ipISO
nelem

Referenced by iso_solve().

void iso_level ( const long  ipISO,
const long  nelem 
)

iso_level solve for iso-sequence ionization balance

Parameters:
ipISO
nelem

Referenced by iso_solve().

void iso_photo ( long  ipISO,
long  nelem 
)

iso_photo do photoionization rates for element nelem on the ipISO isoelectronic sequence

Parameters:
ipISO
nelem

Referenced by iso_solve().

void iso_prt_pops ( long  ipISO,
long  nelem,
bool  lgPrtDeparCoef 
)

iso_prt_pops routine to print level pops or departure coefficients for iso sequences

Parameters:
ipISO
nelem
lgPrtDeparCoef

Definition at line 493 of file iso_solve.cpp.

References ASSERT, t_elementnames::chElementSym, t_iso::chISO, DEBUG_ENTRY, elementnames, ioQQQ, ipH_LIKE, ipHe2p3P0, ipHe2p3P1, ipHe2p3P2, ipHE_LIKE, iso, ITEM_TO_PRINT, t_iso::n_HighestResolved_local, t_iso::nCollapsed_local, NISO, t_iso::numLevels_local, t_iso::QuantumNumbers2Index, and StatesElem.

Referenced by PrtZone().

void iso_put_error ( long  ipISO,
long  nelem,
long  ipHi,
long  ipLo,
long  whichData,
realnum  errorToPut 
)

iso_put_error put an error bar on a piece of data, to be used with Gaussian random noise gen

Parameters:
ipISO
nelem
ipHi
ipLo
whichData
errorToPut

Referenced by ForbiddenAuls(), he_1trans(), HeCSInterp(), helike_transprob(), hydro_transprob(), and iso_error_generation().

void iso_radiative_recomb ( long  ipISO,
long  nelem 
)
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 440 of file iso_radiative_recomb.cpp.

References ASSERT, t_iso::BranchRatio, t_iso::CascadeProb, DEBUG_ENTRY, dprintf(), EN1RYD, t_iso::Error, ioQQQ, IPRAD, ipRecRad, iso, L_, t_iso::lgRandErrGen, MAX2, N_, t_iso::numLevels_local, t_iso::numLevels_max, phycon, prt_wl(), t_iso::RadEffec, t_iso::RadRecomb, RYDLAM, S_, t_iso::SigmaAtot, t_iso::SigmaCascadeProb, t_iso::SigmaRadEffec, StatesElem, t_phycon::te, wavelength, and t_iso::xIsoLevNIonRyd.

Referenced by iso_solve().

Here is the call graph for this function:

void iso_recomb_auxiliary_free ( void  )

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

Definition at line 661 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 572 of file iso_radiative_recomb.cpp.

References DEBUG_ENTRY, iso_radrecomb_from_cross_section(), iso_RRCoef_Te(), MAX2, phycon, t_phycon::te, and TempChange().

Referenced by SanityCheckBegin().

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 601 of file iso_radiative_recomb.cpp.

References DEBUG_ENTRY, dense, iso, iso_get_total_num_levels(), t_dense::lgElmtOn, LIKE_RREC_MAXN, LIMELM, MALLOC, MAX2, N_ISO_TE_RECOMB, NISO, t_iso::numLevels_max, 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,
long  n 
)

iso_RRCoef_Te - interpolate iso recomb coeff as function of temperature

Parameters:
ipISO
nelem
n

Definition at line 546 of file iso_radiative_recomb.cpp.

References ASSERT, DEBUG_ENTRY, iso, t_iso::lgNoRecombInterp, N_ISO_TE_RECOMB, t_iso::nCollapsed_max, t_iso::numLevels_max, RRCoef, TempInterp(), TeRRCoef, and TotalRecomb.

Referenced by iso_radiative_recomb(), and iso_recomb_check().

Here is the call graph for this function:

void iso_satellite_update ( void  )
void iso_solve ( long  ipISO)

iso_solve - main routine to call iso_level and determine iso level balances

Parameters:
ipISO
Todo:
2 remove this when this routine really controls helium itself

Definition at line 26 of file iso_solve.cpp.

References ASSERT, conv, DEBUG_ENTRY, dense, t_conv::EdenErrorAllowed, fixit(), fnzone, t_dense::gas_phase, h2, H2_LevelPops(), t_hmi::H2_rate_destroy, t_hmi::H2_Solomon_dissoc_rate_BD96_H2g, t_hmi::H2_Solomon_dissoc_rate_BigH2_H2g, t_hmi::H2_Solomon_dissoc_rate_TH85_H2g, t_hmi::H2_Solomon_dissoc_rate_used_H2g, t_hmi::H2_total, hmi, hmole(), t_hmi::Hmolec, hydro, HydroLevel(), ion_solver(), t_dense::IonHigh, t_dense::IonLow, ioQQQ, ipH1s, ipH_LIKE, ipHE_LIKE, ipHELIUM, ipHYDROGEN, ipMH, ipMH2g, ipMHp, iso, iso_cascade(), iso_collapsed_Aul_update(), iso_collapsed_bnl_set(), iso_collapsed_lifetimes_update(), iso_collide(), iso_continuum_lower(), iso_error_generation(), iso_ionize_recombine(), iso_level(), iso_photo(), iso_radiative_recomb(), iso_radiative_recomb_effective(), t_hmi::lgBigH2_evaluated, t_dense::lgElmtOn, t_iso::lgErrGenDone, t_hmi::lgH2_Chemistry_BigH2, t_h2::lgH2ON, t_iso::lgRandErrGen, t_opac::lgRedoStatic, t_dense::lgSetIoniz, LIMELM, MALLOC, N_H_MOLEC, NISO, t_iso::nLyaLevel, t_hmi::nProton, t_iso::numLevels_local, t_iso::numLevels_max, nzone, opac, t_iso::pop_ion_ov_neut, SDIV(), t_dense::SetIoniz, t_iso::SmallA, SMALLFLOAT, StatesElem, Transitions, t_dense::xIonDense, t_iso::xIonSimple, and t_hydro::xLymanPumpingScaleFactor.

Referenced by ConvBase().

Here is the call graph for this function:

void iso_suprathermal ( long  ipISO,
long  nelem 
)

iso_suprathermal - calculate secondary excitation by suprathermal electrons for iso sequences

Parameters:
ipISO
nelem

Definition at line 74 of file iso_collide.cpp.

References ASSERT, DEBUG_ENTRY, t_secondaries::Hx12, ipH2p, ipH_LIKE, ipHYDROGEN, iso, LIMELM, NISO, t_iso::numLevels_max, secondaries, Transitions, and t_secondaries::x12tot.

Referenced by iso_collide().

void iso_update_num_levels ( long  ipISO,
long  nelem 
)

iso_update_num_levels - update level informations for iso sequences

Parameters:
ipISO
nelem

Definition at line 1637 of file iso_create.cpp.

References ASSERT, cdEXIT, DEBUG_ENTRY, ioQQQ, iso, iso_get_total_num_levels(), MAX2, max_num_levels, t_iso::n_HighestResolved_local, t_iso::n_HighestResolved_max, t_iso::nCollapsed_local, t_iso::nCollapsed_max, t_iso::numLevels_local, t_iso::numLevels_malloc, t_iso::numLevels_max, and t_iso::numPrintLevels.

Referenced by InitCoreload(), InitSimPostparse(), ParseAtomISO(), and ParseCompile().

Here is the call graph for this function:


Variable Documentation

EXTERN struct t_iso iso

Referenced by atmdat_2phot_rate(), AtomCSInterp(), Badnell_rec_init(), chkCaHeps(), collision_strength_VF01(), ContCreatePointers(), ContRate(), ContSetIntensity(), ConvIterCheck(), ConvTempEdenIoniz(), CoolEvaluate(), CS_l_mixing_S62(), CS_l_mixing_VF01(), CS_ThermAve_PR78(), CS_VS80(), DoFSMixing(), DoSatelliteLines(), FillExtraLymanLine(), ForbiddenAuls(), GammaBnPL(), GrainRateDr(), H_cross_section(), he_1trans(), He_cross_section(), HeCollidSetup(), HeCSInterp(), helike_energy(), helike_quantum_defect(), helike_radrecomb_from_cross_section(), helike_transprob(), Hion_coll_ioniz_ratecoef(), hlike_radrecomb_from_cross_section(), hmole_reactions(), hmole_step(), hydro_transprob(), hydro_vs_coll_str(), hydro_vs_deexcit(), hydro_vs_ioniz(), HydroCSInterp(), HydroLevel(), HydroRecCool(), HydroRenorm(), HydroT2Low(), InitCoreload(), InitSimPostparse(), ion_solver(), IonCSInterp(), IonHelium(), IonMagne(), IonOxyge(), ipShells(), iso_allocate(), iso_assign_quantum_numbers(), iso_cascade(), iso_collapsed_Aul_update(), iso_collapsed_bnl_print(), iso_collapsed_bnl_set(), iso_collapsed_lifetimes_update(), iso_collide(), iso_collisional_ionization(), iso_continuum_lower(), iso_cool(), iso_create(), iso_dielec_recomb_rate(), iso_error_generation(), iso_ionize_recombine(), iso_level(), iso_photo(), iso_prt_pops(), iso_put_error(), iso_radiative_recomb(), iso_radiative_recomb_effective(), iso_recomb_malloc(), iso_recomb_setup(), iso_RRCoef_Te(), iso_satellite(), iso_satellite_update(), iso_solve(), iso_suprathermal(), iso_update_num_levels(), iso_zero(), IterRestart(), IterStart(), lgCheckAsserts(), lines(), lines_continuum(), lines_general(), lines_helium(), lines_hydro(), Opacity_iso_photo_cs(), OpacityAdd1Element(), OpacityAddTotal(), OpacityCreateAll(), ParseAtomISO(), ParseCompile(), ParseElement(), ParsePrint(), ParseSet(), PresTotCurrent(), PrtAllTau(), PrtComment(), PrtContinuum(), PrtFinal(), PrtHeader(), PrtHydroTrace1(), PrtHydroTrace1a(), PrtLinePres(), prtmet(), PrtZone(), punch_opacity(), PunchDo(), PunchLineData(), PunchLineStuff(), PunchSpecial(), radius_first(), radius_increment(), radius_next(), RT_diffuse(), RT_line_all(), RT_line_driving(), RT_OTS(), RT_stark(), RT_tau_inc(), RT_tau_init(), RT_tau_reset(), SanityCheckBegin(), state_get_put(), tfidle(), and zero().

Definition at line 11 of file iso.h.

Referenced by InitCoreload(), and iso_update_num_levels().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated for cloudy by doxygen 1.7.6.1