#include "cddefines.h"
#include "physconst.h"
#include "phycon.h"
#include "lines.h"
#include "radius.h"
#include "geometry.h"
#include "elementnames.h"
#include "rt.h"
#include "dense.h"
#include "rfield.h"
#include "opacity.h"
#include "ipoint.h"
#include "iso.h"
#include "taulines.h"
#include "hydrogenic.h"
#include "lines_service.h"
Include dependency graph for lines_service.cpp:
Go to the source code of this file.
Defines | |
#define | MAXFORLIN 1000 |
Functions | |
void | outline (transition *t) |
double | emit_frac (transition *t) |
void | DumpLine (transition *t) |
double | OccupationNumberLine (transition *t) |
double | TexcLine (transition *t) |
double | eina (double gf, double enercm, double gup) |
double | GetGF (double trans_prob, double enercm, double gup) |
double | abscf (double gf, double enercm, double gl) |
void | chIonLbl (char *chIonLbl_v, transition *t) |
char * | chLineLbl (transition *t) |
double | RefIndex (double EnergyWN) |
void | PutCS (double cs, transition *t) |
realnum | WavlenErrorGet (realnum wavelength) |
void | linadd (double xInten, realnum wavelength, const char *chLab, char chInfo, const char *chComment) |
double | emergent_line (double emissivity_in, double emissivity_out, long int ipCont) |
void | lindst (double xInten, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment) |
void | PntForLine (double wavelength, const char *chLabel, long int *ipnt) |
void | PutLine (transition *t, const char *chComment, const char *chLabelTemp) |
void | PutLine (transition *t, const char *chComment) |
void | PutExtra (double Extra) |
void | TransitionJunk (transition *t) |
void | EmLineJunk (emission *t) |
void | CollisionJunk (collision *t) |
void | StateJunk (quantumState *t) |
void | TransitionZero (transition *t) |
void | EmLineZero (emission *t) |
void | CollisionZero (collision *t) |
void | StateZero (quantumState *t) |
void | LineConvRate2CS (transition *t, realnum rate) |
double | ConvRate2CS (realnum gHi, realnum rate) |
bool | lgTauGood (transition *t) |
STATIC void | gbar0 (double ex, realnum *g) |
STATIC void | gbar1 (double ex, realnum *g) |
void | MakeCS (transition *t) |
double | totlin (int chInfo) |
void | FndLineHt (long int *level, long int *ipStrong, double *Strong) |
quantumState * | AddState2Stack (void) |
emission * | AddLine2Stack (bool lgRadiativeTrans) |
Variables | |
static double | EnergyRyd |
static realnum | ExtraInten |
#define MAXFORLIN 1000 |
Referenced by PntForLine().
double abscf | ( | double | gf, | |
double | enercm, | |||
double | gl | |||
) |
abscf convert gf into absorption coefficient
gf | ||
enercm | ||
gl |
Definition at line 224 of file lines_service.cpp.
References ASSERT, and DEBUG_ENTRY.
Referenced by FeIIPoint(), FillExtraLymanLine(), and iso_satellite_update().
emission* AddLine2Stack | ( | bool | lgRadiativeTrans | ) |
Definition at line 1448 of file lines_service.cpp.
References ASSERT, currentLine, DEBUG_ENTRY, DummyEmis, EmLineJunk(), EmLineZero(), GenericLines, lastLine, lgLinesAdded, linesAdded, and t_emission::next.
Referenced by atmdat_Chianti_readin(), atmdat_lamda_readin(), H2_ReadTransprob(), HyperfineCreate(), and iso_create().
Here is the call graph for this function:
quantumState* AddState2Stack | ( | void | ) |
Definition at line 1420 of file lines_service.cpp.
References ASSERT, currentState, DEBUG_ENTRY, GenericStates, lastState, lgStatesAdded, t_quantumState::next, StateJunk(), statesAdded, and StateZero().
Referenced by HyperfineCreate(), and iso_create().
Here is the call graph for this function:
void chIonLbl | ( | char * | , | |
transition * | t | |||
) |
generate null terminated line label from contents of line trans array
*t |
Definition at line 242 of file lines_service.cpp.
References ASSERT, t_elementnames::chElementNameShort, t_elementnames::chElementSym, t_elementnames::chIonStage, DEBUG_ENTRY, elementnames, t_transition::Hi, t_quantumState::IonStg, LIMELM, and t_quantumState::nelem.
Referenced by atom_level2(), atom_level3(), AtomSeqBeryllium(), lines_setup(), PrtLinePres(), Punch1LineData(), and PutLine().
char* chLineLbl | ( | transition * | t | ) |
chLineLbl use information in line transfer arrays to generate a line label
this label is null terminated
*t |
Definition at line 285 of file lines_service.cpp.
References ASSERT, t_elementnames::chElementSym, t_elementnames::chIonStage, DEBUG_ENTRY, elementnames, t_transition::Hi, t_quantumState::IonStg, t_quantumState::nelem, and t_transition::WLAng.
Referenced by atom_level3(), DumpLine(), prme(), pun1Line(), Punch_Line_RT(), and RT_line_one_tau_reset().
void CollisionJunk | ( | collision * | t | ) |
CollisionJunk set all elements of emission struc to dangerous values
*t |
collision rate coefficient, [cm^3 s-1], upper to lower
Definition at line 992 of file lines_service.cpp.
References t_collision::ColUL, t_collision::cool, t_collision::cs, t_collision::csi, DEBUG_ENTRY, t_collision::heat, and ipNCOLLIDER.
Referenced by TransitionJunk().
void CollisionZero | ( | collision * | t | ) |
CollisionZero set all elements of collision struc to zero
*t |
Definition at line 1096 of file lines_service.cpp.
References t_collision::cool, DEBUG_ENTRY, and t_collision::heat.
Referenced by TransitionZero().
convert down coll rate back into electron cs in case other parts of code need this for reference
gHi | - stat weight of upper level | |
rate | - deexcitation rate, units s-1 |
Definition at line 1136 of file lines_service.cpp.
References ASSERT, t_dense::cdsqte, DEBUG_ENTRY, and dense.
Referenced by CoolOxyg().
void DumpLine | ( | transition * | t | ) |
DumpLine print various information about an emission line vector, used in debugging
*t |
Definition at line 95 of file lines_service.cpp.
References t_opac::albedo, ASSERT, t_emission::Aul, chLineLbl(), t_transition::Coll, t_collision::cool, t_collision::cs, DEBUG_ENTRY, dense, t_dense::eden, t_transition::Emis, t_collision::heat, t_transition::Hi, ioQQQ, t_transition::ipCont, t_transition::Lo, opac, t_opac::opacity_abs, t_emission::ots, t_emission::Pdest, t_emission::Pelec_esc, t_emission::Pesc, phycon, t_quantumState::Pop, t_emission::PopOpc, t_emission::pump, t_emission::TauIn, t_emission::TauTot, t_phycon::te, and TexcLine().
Referenced by CoolIron(), CoolNitr(), CoolSili(), CoolSulf(), FindNeg(), and RT_line_static().
Here is the call graph for this function:
double eina | ( | double | gf, | |
double | enercm, | |||
double | gup | |||
) |
eina convert a gf into an Einstein A
gf | ||
enercm | ||
gup |
Definition at line 186 of file lines_service.cpp.
References DEBUG_ENTRY, POW2, and TRANS_PROB_CONST.
double emergent_line | ( | double | emissivity_in, | |
double | emissivity_out, | |||
long int | ipCont | |||
) |
absorption due to continuous opacity
emissivity | [erg cm-3 s-1] in inward direction | |
emissivity | [erg cm-3 s-1] in outward direction | |
array | index for continuum frequency |
Definition at line 523 of file lines_service.cpp.
References t_opac::albedo, ASSERT, DEBUG_ENTRY, t_opac::E2TauAbsFace, t_opac::E2TauAbsOut, t_opac::E2TauAbsTotal, geometry, iteration, t_geometry::lgSphere, t_rfield::nupper, opac, and rfield.
Referenced by lindst(), and lines_continuum().
double emit_frac | ( | transition * | t | ) |
returns fraction of populations the produce emission
*t |
Definition at line 79 of file lines_service.cpp.
References ASSERT, t_emission::Aul, t_dense::cdsqte, t_transition::Coll, t_collision::cs, DEBUG_ENTRY, dense, t_transition::Emis, t_transition::ipCont, t_emission::Pdest, t_emission::Pelec_esc, and t_emission::Pesc.
Referenced by lines_lv1_li_ne(), and lines_lv1_na_ar().
void EmLineJunk | ( | emission * | t | ) |
EmLineJunk set all elements of emission struc to dangerous values
*t |
Definition at line 933 of file lines_service.cpp.
References t_emission::Aul, t_emission::ColOvTot, t_emission::damp, t_emission::dampXvel, DEBUG_ENTRY, t_emission::FracInwd, t_emission::gf, t_emission::ipFine, t_emission::iRedisFun, t_emission::opacity, t_emission::ots, t_emission::Pdest, t_emission::Pelec_esc, t_emission::Pesc, t_emission::phots, t_emission::PopOpc, t_emission::pump, t_emission::TauCon, t_emission::TauIn, t_emission::TauTot, and t_emission::xIntensity.
Referenced by AddLine2Stack().
void EmLineZero | ( | emission * | t | ) |
EmLineZero set all elements of emission struc to zero
*t |
Definition at line 1049 of file lines_service.cpp.
References t_emission::ColOvTot, DEBUG_ENTRY, t_emission::FracInwd, opac, t_emission::ots, t_emission::Pdest, t_emission::Pelec_esc, t_emission::Pesc, t_emission::phots, t_emission::PopOpc, t_emission::pump, t_emission::TauCon, t_emission::TauIn, t_opac::taumin, t_emission::TauTot, and t_emission::xIntensity.
Referenced by AddLine2Stack(), InitDefaultsPreparse(), and TransitionZero().
void FndLineHt | ( | long int * | level, | |
long int * | ipStrong, | |||
double * | Strong | |||
) |
Definition at line 1333 of file lines_service.cpp.
References t_transition::Coll, DEBUG_ENTRY, t_collision::heat, nLevel1, and TauLines.
STATIC void gbar0 | ( | double | ex, | |
realnum * | g | |||
) |
Definition at line 1175 of file lines_service.cpp.
References DEBUG_ENTRY, phycon, POW2, and t_phycon::te.
Referenced by MakeCS().
STATIC void gbar1 | ( | double | ex, | |
realnum * | g | |||
) |
Definition at line 1224 of file lines_service.cpp.
References DEBUG_ENTRY, phycon, POW2, and t_phycon::te.
Referenced by MakeCS().
double GetGF | ( | double | eina, | |
double | enercm, | |||
double | gup | |||
) |
GetGF convert Einstein A into oscillator strength
eina | ||
enercm | ||
gup |
Definition at line 203 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, POW2, and TRANS_PROB_CONST.
Referenced by FillExtraLymanLine(), hydro_vs_coll_str(), hydro_vs_deexcit(), HyperfineCreate(), and iso_satellite_update().
bool lgTauGood | ( | transition * | t | ) |
lgTauGood returns true is we have not overrun optical depth scale
*t |
Definition at line 1155 of file lines_service.cpp.
References DEBUG_ENTRY, t_transition::Emis, fp_equal(), opac, t_emission::TauIn, t_opac::taumin, and t_emission::TauTot.
Referenced by RT_line_static().
Here is the call graph for this function:
void linadd | ( | double | xInten, | |
realnum | wavelength, | |||
const char * | chLab, | |||
char | chInfo, | |||
const char * | chComment | |||
) |
enter lines into the line storage array, called once per zone for each line
xInten | xInten - local emissivity per unit vol, no fill fac | |
wavelength | lam integer wavelength | |
*chLab | string label for ion | |
chInfo | character type of entry for line - 'c' cooling, 'h' heating, 'i' info only, 'r' recom line | |
*chComment | string explaining line |
Definition at line 452 of file lines_service.cpp.
References ASSERT, t_tag_LineSv::chComment, t_tag_LineSv::chSumTyp, DEBUG_ENTRY, t_radius::dVeff, t_tag_LineSv::emslin, t_LineSave::ipass, LineSave, LineSv, t_LineSave::nsum, radius, t_tag_LineSv::sumlin, and t_tag_LineSv::wavelength.
Referenced by lines(), lines_continuum(), lines_general(), lines_grains(), lines_helium(), lines_hydro(), lines_lv1_k_zn(), lines_lv1_li_ne(), lines_lv1_na_ar(), lines_molecules(), and PutLine().
void lindst | ( | double | xInten, | |
realnum | wavelength, | |||
const char * | chLab, | |||
long int | ipnt, | |||
char | chInfo, | |||
bool | lgOutToo, | |||
const char * | chComment | |||
) |
put forbidden line into stack, using index derived below
xInten | - local emissivity per unit vol | |
wavelength | wavelength Angstroms | |
*chLab | string label for ion | |
ipnt | offset of line in continuum mesh | |
chInfo | character type of entry for line - 'c' cooling, 'h' heating, 'i' info only, 'r' recom line | |
lgOutToo | should line be included in outward beam? | |
*chComment | string explaining line |
Definition at line 584 of file lines_service.cpp.
References t_rfield::anu, t_rfield::AnuOrg, ASSERT, t_tag_LineSv::chComment, t_tag_LineSv::chSumTyp, DEBUG_ENTRY, t_radius::dVeff, t_radius::dVolOutwrd, t_radius::dVolReflec, emergent_line(), t_tag_LineSv::emslin, EN1RYD, EnergyRyd, t_opac::ExpZone, t_rt::fracin, t_LineSave::ipass, LineSave, LineSv, MAX2, t_rfield::nflux, t_LineSave::nsum, opac, t_rfield::outlin, radius, t_rfield::reflin, rfield, rt, RYDLAM, t_tag_LineSv::sumlin, t_tag_LineSv::wavelength, and t_rfield::widflx.
Referenced by H2_LinesAdd(), lines(), lines_continuum(), lines_general(), lines_lv1_k_zn(), lines_lv1_li_ne(), lines_lv1_na_ar(), and PutLine().
Here is the call graph for this function:
void LineConvRate2CS | ( | transition * | t, | |
realnum | rate | |||
) |
convert down coll rate back into electron cs in case other parts of code need this for reference
*t | - line struct collision strength is stored in t->cs | |
rate | - deexcitation rate, units s-1 |
Definition at line 1119 of file lines_service.cpp.
References ASSERT, t_dense::cdsqte, t_transition::Coll, t_collision::cs, DEBUG_ENTRY, dense, t_quantumState::g, and t_transition::Hi.
Referenced by CoolChlo(), CoolIron(), CoolNick(), CoolSili(), and CoolSulf().
void MakeCS | ( | transition * | t | ) |
MakeCS compute collision strength by g-bar approximations
*t |
Definition at line 1250 of file lines_service.cpp.
References t_transition::Coll, t_collision::cs, DEBUG_ENTRY, dense, t_transition::Emis, t_transition::EnergyK, t_transition::EnergyWN, gbar0(), gbar1(), t_emission::gf, t_transition::Hi, t_quantumState::IonStg, t_quantumState::nelem, WAVNRYD, and t_dense::xIonDense.
Referenced by CoolAlum(), CoolCalc(), CoolIron(), CoolMagn(), and CoolSili().
Here is the call graph for this function:
double OccupationNumberLine | ( | transition * | t | ) |
OccupationNumberLine - derive the photon occupation number at line center for any line
*t |
Definition at line 136 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, t_transition::Emis, t_quantumState::g, t_transition::Hi, t_transition::ipCont, t_transition::Lo, t_emission::Pesc, t_quantumState::Pop, SDIV(), and SMALLFLOAT.
Referenced by H21_cm_pops().
Here is the call graph for this function:
void outline | ( | transition * | t | ) |
outline - adds line photons to reflin and outlin
Definition at line 52 of file lines_service.cpp.
References ASSERT, t_radius::BeamInIn, t_radius::BeamInOut, t_radius::BeamOutOut, t_emission::ColOvTot, DEBUG_ENTRY, t_transition::Emis, t_emission::FracInwd, t_transition::ipCont, opac, t_rfield::outlin, t_emission::phots, radius, t_rfield::reflin, rfield, and t_opac::tmn.
Referenced by FeII_RT_Out(), and H2_RT_diffuse().
void PntForLine | ( | double | wavelength, | |
const char * | chLabel, | |||
long int * | ipnt | |||
) |
PntForLine generate pointer for forbidden line
wavelength | wavelength of line in Angstroms | |
*chLabel | label for the line | |
*ipnt | this is array index on the f, not c scale, for the continuum cell holding the line |
Definition at line 676 of file lines_service.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, EnergyRyd, ioQQQ, t_LineSave::ipass, ipLineEnergy(), LineSave, MAXFORLIN, and RYDLAM.
Referenced by lines(), lines_lv1_k_zn(), lines_lv1_li_ne(), and lines_lv1_na_ar().
Here is the call graph for this function:
void PutCS | ( | double | cs, | |
transition * | t | |||
) |
PutCS enter a collision strength into an individual line struc
cs | ||
*t | the line struc |
Definition at line 406 of file lines_service.cpp.
References ASSERT, t_transition::Coll, t_collision::cs, and DEBUG_ENTRY.
Referenced by CoolAlum(), CoolArgo(), CoolCalc(), CoolCarb(), CoolChlo(), CoolChro(), CoolCoba(), CoolDima(), CoolFluo(), CoolIron(), CoolMagn(), CoolMang(), CoolNeon(), CoolNick(), CoolNitr(), CoolOxyg(), CoolPhos(), CoolPota(), CoolScan(), CoolSili(), CoolSodi(), CoolSulf(), CoolTita(), CoolVana(), CoolZinc(), Fe2_cooling(), and oi_level_pops().
void PutExtra | ( | double | Extra | ) |
PutExtra enter and 'extra' intensity source for some line
Extra |
Definition at line 892 of file lines_service.cpp.
References DEBUG_ENTRY, and ExtraInten.
Referenced by lines(), lines_lv1_k_zn(), lines_lv1_li_ne(), and lines_lv1_na_ar().
void PutLine | ( | transition * | t, | |
const char * | chComment | |||
) |
PutLine enter local line intensity into the intensity stack for eventual printout
*t | transition structure for line | |
*chComment | a description of the line |
Definition at line 817 of file lines_service.cpp.
void PutLine | ( | transition * | t, | |
const char * | chComment, | |||
const char * | chLabel | |||
) |
PutLine enter local line intensity into the intensity stack for eventual printout
*t | transition structure for line | |
*chComment | a description of the line | |
*chLabel | the line label |
Definition at line 745 of file lines_service.cpp.
Referenced by DoSatelliteLines(), H2_LinesAdd(), lines_lv1_k_zn(), lines_lv1_li_ne(), lines_lv1_na_ar(), and lines_molecules().
double RefIndex | ( | double | EnergyWN | ) |
RefIndex calculates the index of refraction of air using the line energy in wavenumbers, used to convert vacuum wavelengths to air wavelengths.
EnergyWN |
Definition at line 369 of file lines_service.cpp.
References ASSERT, and DEBUG_ENTRY.
Referenced by atmdat_Chianti_readin(), atmdat_lamda_readin(), Fe11Lev5(), Fe13Lev5(), Fe3Lev14(), Fe7Lev8(), FillExtraLymanLine(), iso_create(), and lines_setup().
void StateJunk | ( | quantumState * | t | ) |
StateJunk set all elements of quantumState struc to dangerous values
*t |
statistical weight [dimensionless]
population of state [cm-3]
ion stage of element, 1 for atom, 2 ion, etc
atomic number of element, 1 for H, 2 for He, etc
Definition at line 1012 of file lines_service.cpp.
References DEBUG_ENTRY, t_quantumState::g, t_quantumState::IonStg, t_quantumState::nelem, and t_quantumState::Pop.
Referenced by AddState2Stack().
void StateZero | ( | quantumState * | t | ) |
StateZero set all elements of quantumState struc to zero
*t |
population of state [cm-3]
Definition at line 1108 of file lines_service.cpp.
References DEBUG_ENTRY, and t_quantumState::Pop.
Referenced by AddState2Stack(), and TransitionZero().
double TexcLine | ( | transition * | t | ) |
TexcLine derive excitation temperature of line from contents of line array
*t |
Definition at line 160 of file lines_service.cpp.
References DEBUG_ENTRY, t_transition::EnergyK, t_quantumState::g, t_transition::Hi, t_transition::Lo, t_quantumState::Pop, and SMALLFLOAT.
Referenced by DumpLine(), and H21_cm_pops().
double totlin | ( | int | chInfo | ) |
totlin sum total intensity of cooling, recombination, or intensity lines
chInfo | chInfor is 1 char, 'i' information, 'r' recombination or 'c' collision |
Definition at line 1294 of file lines_service.cpp.
References cdEXIT, DEBUG_ENTRY, ioQQQ, LineSave, LineSv, and t_LineSave::nsum.
Referenced by badprt(), and PrtComment().
void TransitionJunk | ( | transition * | t | ) |
TransitionJunk set all elements of transition struc to dangerous values
*t |
Definition at line 901 of file lines_service.cpp.
References t_transition::Coll, CollisionJunk(), DEBUG_ENTRY, DummyEmis, t_transition::Emis, t_transition::EnergyErg, t_transition::EnergyK, t_transition::EnergyWN, t_transition::Hi, t_transition::ipCont, t_transition::Lo, and t_transition::WLAng.
Referenced by HyperfineCreate(), and iso_create().
Here is the call graph for this function:
void TransitionZero | ( | transition * | t | ) |
TransitionZero set all elements of transition struc to zero
*t |
Definition at line 1034 of file lines_service.cpp.
References t_transition::Coll, CollisionZero(), DEBUG_ENTRY, t_transition::Emis, EmLineZero(), t_transition::Hi, t_transition::Lo, and StateZero().
Referenced by CoolCarb(), FeII_LineZero(), H2_LineZero(), iso_satellite(), and RT_tau_init().
Here is the call graph for this function:
WavlenErrorGet - given the real wavelength in A for a line routine will find the error expected between the real wavelength and the wavelength printed in the output, with 4 sig figs,
wavelength |
Definition at line 425 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, LineSave, and t_LineSave::sig_figs.
Referenced by cdDLine(), cdEmis(), cdLine(), debugLine(), GetOptLineInt(), lgCheckAsserts(), and ParseNorm().
double EnergyRyd [static] |
Definition at line 520 of file lines_service.cpp.
Referenced by iso_create(), lindst(), and PntForLine().
realnum ExtraInten [static] |