cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
atom_leveln.cpp File Reference
#include "cddefines.h"
#include "physconst.h"
#include "thermal.h"
#include "phycon.h"
#include "dense.h"
#include "trace.h"
#include "thirdparty.h"
#include "atoms.h"
Include dependency graph for atom_leveln.cpp:

Go to the source code of this file.

Functions

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 source[], const double sink[], bool lgCollRateDone, double *cooltl, double *coolder, const char *chLabel, int *nNegPop, bool *lgZeroPop, bool lgDeBug)

Function Documentation

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 
)

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 13 of file atom_leveln.cpp.

References abund, amat, ASSERT, BOLTZMANN, cdEXIT, t_dense::cdsqte, auto_vec< T >::data(), multi_arr< T, d, ALLOC, lgBC >::data(), DEBUG_ENTRY, dense, getrf_wrapper(), getrs_wrapper(), t_thermal::halfte, ioQQQ, ipiv, t_trace::lgTrace, t_trace::lgTrLevN, MAX2, phycon, sexp(), T1CM, t_phycon::te, t_phycon::te_wn, thermal, TotalInsanity(), trace, t_thermal::tsq1, and multi_arr< T, d, ALLOC, lgBC >::zero().

Referenced by atmol_popsolve(), AtomSeqBoron(), CO_PopsEmisCool(), Fe11Lev5(), Fe13Lev5(), Fe2_cooling(), Fe3Lev14(), Fe4Lev12(), Fe7Lev8(), and H2_Level_low_matrix().

Here is the call graph for this function:


Generated for cloudy by doxygen 1.8.1.1