cloudy trunk
Loading...
Searching...
No Matches
atoms.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  t_atoms

Functions

void AtomSeqBeryllium (double cs12, double cs13, double cs23, const TransitionProxy &t, double a30)
void AtomSeqBoron (const TransitionProxy &t21, const TransitionProxy &t31, const TransitionProxy &t41, const TransitionProxy &t32, const TransitionProxy &t42, const TransitionProxy &t52, double cs51, double cs43, double cs53, double cd54, double pump_rate, const char *chLabel)
void atom_level2 (const TransitionProxy &t)
void atom_level3 (const TransitionProxy &t10, const TransitionProxy &t21, const TransitionProxy &t20)
double atom_pop2 (double omega, double g1, double g2, double a21, double bltz, double abund)
double atom_pop3 (double g1, double g2, double g3, double o12, double o13, double o23, double a21, double a31, double a32, double Tex12, double Tex23, realnum *pop2, double abund, double gam2, double r12, double r13)
void atom_pop5 (const double g[], const double ex[], double cs12, double cs13, double cs14, double cs15, double cs23, double cs24, double cs25, double cs34, double cs35, double cs45, double a21, double a31, double a41, double a51, double a32, double a42, double a52, double a43, double a53, double a54, double p[], realnum abund, double *Cooling, double *CoolingDeriv, double pump12, double pump13, double pump14, double pump15)
void atom_levelN (long int nlev, realnum abund, const double g[], const double ex[], char chExUnits, double pops[], double depart[], double ***AulEscp, double ***col_str, double ***AulDest, double ***AulPump, double ***CollRate, const double create[], const double destroy[], bool lgCollRateDone, double *cooltl, double *coolder, const char *chLabel, int *nNegPop, bool *lgZeroPop, bool lgDeBug, bool lgLTE=false, multi_arr< double, 2 > *Cool=NULL, multi_arr< double, 2 > *dCooldT=NULL)
void atom_oi_calc (double *coloi)

Variables

const int N_OI_LEVELS = 6
const long LIMLEVELN = 20L
t_atoms atoms

Function Documentation

◆ atom_level2()

◆ atom_level3()

◆ atom_levelN()

void atom_levelN ( long int nlev,
realnum abund,
const double g[],
const double ex[],
char chExUnits,
double pops[],
double depart[],
double *** AulEscp,
double *** col_str,
double *** AulDest,
double *** AulPump,
double *** CollRate,
const double create[],
const double destroy[],
bool lgCollRateDone,
double * cooltl,
double * coolder,
const char * chLabel,
int * nNegPop,
bool * lgZeroPop,
bool lgDeBug,
bool lgLTE = false,
multi_arr< double, 2 > * Cool = NULL,
multi_arr< double, 2 > * dCooldT = NULL )

atom_levelN - compute populations of arbitrary n-level atom

Parameters
nlevnlev is the number of levels to compute
abundABUND is total abundance of species, used for nth equation
g[]G(ndim) is stat weight of levels
ex[]EX(ndim) is excitation potential of levels, either wn or deg K 0 for first one, NOT d(ENER), but energy rel to ground
chExUnitsthis is 'K' for above ex[] as Kelvin deg, is 'w' for wavenumbers
pops[]populations of each level as deduced here
depart[]departure coefficient derived here
AulEscpnet transition rate, A * esc prob, s-1
col_strcol str rom up to low
AulDestAulDest(ilo,ihi) is destruction rate, from up to low, A * dest prob, [s-1], asserts confirm that ihi,lo is zero
AulPumpAulPump(lo, hi) is pumping rate, A * occ num, (hi,lo) must be zero, [s-1]
CollRatecollision rates, evaluated here and returned for cooling by calling function, unless following flag is true.
If true then calling function has already filled in these rates. CollRate[i][j] is rate from i to j
createthis is an additional creation rate, normally zero, units cm-3 s-1
destroy[]this is an additional destruction rate to continuum, normally zero, units s-1
lgCollRateDoneflag saying whether CollRate already done, or we need to do it here
cooltltotal cooling, set here but nothing done with it
coolderderivative of cooling, set here but nothing done with it
chLabelstring used to identify calling program in case of error
lgNegPoplgNegPop flag indicating what we have done positive if negative populations occurred zero if normal calculation done negative if too cold (for some atoms other routine will be called in this case)
lgZeroPoptrue if populations are zero, either due to zero abundance of very low temperature
lgDeBugoption to print matrices for debugging
Postcondition
atoms.PopLevels[n], atoms.DepLTELevels[n] are set lines added to ots array

Definition at line 15 of file atom_leveln.cpp.

References abund, amat, ASSERT, AulDest, AulEscp, AulPump, BOLTZMANN, cdEXIT, col_str, CollRate, conv, DEBUG_ENTRY, dense, depart, dsexp(), dynamics, ex, EXIT_FAILURE, g, ioQQQ, iteration, MAX2, phycon, pops, pow2(), sink, SMALLFLOAT, solve_system(), source, T1CM, thermal, TorF(), TotalInsanity(), and trace.

Referenced by AtomSeqBoron(), dBase_solve(), Fe2_cooling(), Fe3Lev14(), Fe4Lev12(), and diatomics::H2_Level_low_matrix().

Here is the call graph for this function:

◆ atom_oi_calc()

void atom_oi_calc ( double * coloi)

atom_oi drive the solution of OI level populations, Ly-beta pumping

Parameters
coloi
Todo
2 following needed to get badbugs/bug5.in to work

Definition at line 23 of file atom_oi.cpp.

References atoms, DEBUG_ENTRY, dense, fixit(), GetDopplerWidth(), ioQQQ, ipH1s, ipH3p, ipH_LIKE, ipHYDROGEN, ipOXYGEN, ipT1039, ipT1304, ipT4368, ipT8446, ipTO1025, ipTOI11, ipTOI13, ipTOI29, ipTOI46, iso_sp, MAX2, MIN2, oi_level_pops(), rfield, TauLines, and trace.

Referenced by CoolOxyg().

Here is the call graph for this function:

◆ atom_pop2()

double atom_pop2 ( double omega,
double g1,
double g2,
double a21,
double bltz,
double abund )

atom_pop2 do level population for simple two level atom, no radiative transfer

Parameters
omega
g1
g2
a21
bltz
abund

Definition at line 9 of file atom_pop2.cpp.

References abund, ASSERT, DEBUG_ENTRY, dense, and phycon.

Referenced by CoolChro(), CoolIron(), CoolMagn(), CoolNeon(), CoolScan(), CoolSili(), and ion_photo().

◆ atom_pop3()

double atom_pop3 ( double g1,
double g2,
double g3,
double o12,
double o13,
double o23,
double a21,
double a31,
double a32,
double Tex12,
double Tex23,
realnum * pop2,
double abund,
double gam2,
double r12,
double r13 )

atom_pop3 return value is population for 3-level atom, cm^-3

Parameters
g1statictical weights of level 1
g2statictical weights of level 2
g3statictical weights of level 3
o12collision strengths between three levels
o13collision strengths between three levels
o23collision strengths between three levels
a21transition probabilities between three levels
a31transition probabilities between three levels
a32transition probabilities between three levels
Tex12excitation energy in Kelvin
Tex23excitation energy in Kelvin
*pop2returned population of level 2, cm^-3
abundincoming total abundance of ion
gam2possible photodestruction of level 2, normally 0
r12excitation rates (s-1) due to "other" processes
r13excitation rates (s-1) due to "other" processes

Definition at line 10 of file atom_pop3.cpp.

References abund, ASSERT, atoms, DEBUG_ENTRY, dense, ex, phycon, and SMALLFLOAT.

Referenced by CoolAlum(), CoolArgo(), CoolCarb(), CoolChlo(), CoolChro(), CoolNeon(), CoolNitr(), CoolOxyg(), CoolPhos(), CoolScan(), CoolSili(), CoolSodi(), and CoolSulf().

◆ atom_pop5()

void atom_pop5 ( const double g[],
const double ex[],
double cs12,
double cs13,
double cs14,
double cs15,
double cs23,
double cs24,
double cs25,
double cs34,
double cs35,
double cs45,
double a21,
double a31,
double a41,
double a51,
double a32,
double a42,
double a52,
double a43,
double a53,
double a54,
double p[],
realnum abund,
double * Cooling,
double * CoolingDeriv,
double pump12,
double pump13,
double pump14,
double pump15 )

atom_pop5 do populations and cooling for five level atom

Parameters
g[]
ex[]
cs12
cs13
cs14
cs15
cs23
cs24
cs25
cs34
cs35
cs45
a21
a31
a41
a51
a32
a42
a52
a43
a53
a54
p[]
abund
cooling
coolingderivative
pump12
pump13
pump14
pump15

Definition at line 13 of file atom_pop5.cpp.

References abund, amat, ASSERT, cdEXIT, DEBUG_ENTRY, dense, ERG1CM, EXIT_FAILURE, g, getrf_wrapper(), getrs_wrapper(), ioQQQ, MAX2, phycon, sexp(), T1CM, and thermal.

Referenced by CoolArgo(), CoolCalc(), CoolChlo(), CoolNitr(), CoolOxyg(), and CoolSulf().

Here is the call graph for this function:

◆ AtomSeqBeryllium()

◆ AtomSeqBoron()

void AtomSeqBoron ( const TransitionProxy & t21,
const TransitionProxy & t31,
const TransitionProxy & t41,
const TransitionProxy & t32,
const TransitionProxy & t42,
const TransitionProxy & t52,
double cs51,
double cs43,
double cs53,
double cd54,
double pump_rate,
const char * chLabel )

AtomSeqBoron compute cooling from 5-level boron sequence model atom

Parameters
t21
t31
t41
t32
t42
t52
cs51
cs43
cs53
cd54
pump_ratepump rate due to UV permitted lines
chLabelstring used to identify calling program in case of error
Todo
2 use transition::Zero here

Definition at line 11 of file atom_seq_boron.cpp.

References ASSERT, atom_levelN(), atoms, EmissionProxy::Aul(), AulDest, AulEscp, AulPump, col_str, CollisionProxy::col_str(), TransitionProxy::Coll(), CollRate, EmissionProxy::ColOvTot(), CollisionProxy::cool(), CoolAdd(), DEBUG_ENTRY, dense, depart, TransitionProxy::Emis(), TransitionProxy::EnergyErg(), TransitionProxy::EnergyK(), g, CollisionProxy::heat(), TransitionProxy::Hi(), lgFirst, LIMLEVELN, TransitionProxy::Lo(), MALLOC, N_SEQ_BORON, EmissionProxy::Pdest(), EmissionProxy::Pelec_esc(), EmissionProxy::phots(), EmissionProxy::PopOpc(), pops, EmissionProxy::pump(), SDIV(), thermal, TransitionProxy::WLAng(), and EmissionProxy::xIntensity().

Referenced by CoolCarb(), CoolNitr(), CoolOxyg(), CoolSili(), and CoolSulf().

Here is the call graph for this function:

Variable Documentation

◆ atoms

◆ LIMLEVELN

const long LIMLEVELN = 20L

Definition at line 237 of file atoms.h.

Referenced by AtomSeqBoron(), Fe2_cooling(), Fe3Lev14(), and Fe4Lev12().

◆ N_OI_LEVELS

const int N_OI_LEVELS = 6

number of levels in OI atom

Definition at line 236 of file atoms.h.

Referenced by IterStart(), and zero().