/home66/gary/public_html/cloudy/c13_branch/source/atom_leveln.cpp File Reference

#include "cddefines.h"
#include "physconst.h"
#include "thermal.h"
#include "conv.h"
#include "phycon.h"
#include "dense.h"
#include "trace.h"
#include "newton_step.h"
#include "atoms.h"
#include "dynamics.h"
Include dependency graph for atom_leveln.cpp:

Go to the source code of this file.

Functions

void atom_levelN (long int nLevelCalled, 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, bool lgLTE, multi_arr< double, 2 > *Cool, multi_arr< double, 2 > *dCooldT)

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,
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:
nlev nlev is the number of levels to compute
abund ABUND 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
chExUnits this 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
AulEscp net transition rate, A * esc prob, s-1
col_str col str rom up to low
AulDest AulDest(ilo,ihi) is destruction rate, from up to low, A * dest prob, [s-1], asserts confirm that ihi,lo is zero
AulPump AulPump(lo, hi) is pumping rate, A * occ num, (hi,lo) must be zero, [s-1]
CollRate collision 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
create this 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
lgCollRateDone flag saying whether CollRate already done, or we need to do it here
cooltl total cooling, set here but nothing done with it
coolder derivative of cooling, set here but nothing done with it
chLabel string used to identify calling program in case of error
lgNegPop lgNegPop 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)
lgZeroPop true if populations are zero, either due to zero abundance of very low temperature
lgDeBug option 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 amat, ASSERT, BOLTZMANN, cdEXIT, t_dense::cdsqte, conv, DEBUG_ENTRY, dense, dsexp(), dynamics, EXIT_FAILURE, t_thermal::halfte, ioQQQ, iteration, t_dynamics::lgAdvection, t_conv::lgSearch, t_trace::lgTrace, t_trace::lgTrLevN, MAX2, t_dynamics::n_initial_relax, phycon, pow2(), SMALLFLOAT, solve_system(), T1CM, t_phycon::te, t_phycon::te_wn, thermal, t_dynamics::timestep, TorF(), TotalInsanity(), trace, t_thermal::tsq1, multi_arr< T, d, ALLOC, lgBC >::vals(), and multi_arr< T, d, ALLOC, lgBC >::zero().

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

Here is the call graph for this function:

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Nov 2012 for cloudy by  doxygen 1.6.1