#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"

Go to the source code of this file.
Defines | |
| #define | MAXFORLIN 1000 |
Functions | |
| void | outline (EmLine *t) |
| void | HLineTransOpacSet (long int nelem) |
| double | emit_frac (EmLine *t) |
| void | DumpLine (EmLine *t) |
| double | OccupationNumberLine (EmLine *t) |
| double | TexcLine (EmLine *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, EmLine *t) |
| char * | chLineLbl (EmLine *t) |
| double | RefIndex (double EnergyWN) |
| void | PutCS (double cs, EmLine *t) |
| float | WavlenErrorGet (float wavelength) |
| void | linadd (double xInten, float wavelength, const char *chLab, char chInfo) |
| double | emergent_line (double emissivity_in, double emissivity_out, long int ipCont) |
| void | lindst (double xInten, float wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo) |
| void | PntForLine (double wavelength, const char *chLabel, long int *ipnt) |
| void | PutLine (EmLine *t) |
| void | PutExtra (double Extra) |
| void | EmLineJunk (EmLine *t) |
| void | EmLineZero (EmLine *t) |
| void | LineConvRate2CS (EmLine *t, float rate) |
| double | ConvRate2CS (float gHi, float rate) |
| bool | lgTauGood (EmLine *t) |
| static void | gbar0 (double ex, float *g) |
| static void | gbar1 (double ex, float *g) |
| void | MakeCS (EmLine *t) |
| double | totlin (int chInfo) |
| void | FndLineHt (long int *level, long int *ipStrong, double *Strong) |
Variables | |
| static double | EnergyRyd |
| static bool | lgEnergyRydSet = false |
| static float | 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 376 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, and DEBUG_EXIT.
Referenced by ContCreatePointers(), FeIIPoint(), H2_Create(), HeCreate(), iso_create(), and RT_tau_init().
| void chIonLbl | ( | char * | , | |
| EmLine * | t | |||
| ) |
generate null terminated line label from contents of line trans array
| *t |
Definition at line 397 of file lines_service.cpp.
References t_elementnames::chElementNameShort, t_elementnames::chElementSym, t_elementnames::chIonStage, DEBUG_ENTRY, DEBUG_EXIT, elementnames, EmLine::IonStg, LIMELM, and EmLine::nelem.
Referenced by atom_level2(), atom_level3(), AtomSeqBeryllium(), ContCreatePointers(), lines_helium(), lines_hydro(), lines_setup(), PrtLinePres(), Punch1LineData(), and PutLine().
| char* chLineLbl | ( | EmLine * | t | ) |
chLineLbl use information in line transfer arrays to generate a line label
this label is null terminated
| *t |
Definition at line 442 of file lines_service.cpp.
References ASSERT, t_elementnames::chElementSym, t_elementnames::chIonStage, DEBUG_ENTRY, DEBUG_EXIT, elementnames, EmLine::IonStg, EmLine::nelem, and EmLine::WLAng.
Referenced by atom_level3(), ContCreatePointers(), DumpLine(), HeatPunch(), PresTotCurrent(), prme(), PrtComment(), pun1Line(), Punch_Line_RT(), radius_next(), and RT_line_one_tau_reset().
| double ConvRate2CS | ( | float | gHi, | |
| float | rate | |||
| ) |
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 1275 of file lines_service.cpp.
References ASSERT, t_dense::cdsqte, DEBUG_ENTRY, DEBUG_EXIT, and dense.
Referenced by CoolOxyg().
| void DumpLine | ( | EmLine * | t | ) |
DumpLine print various information about an emission line vector, used in debugging
| *t |
Definition at line 237 of file lines_service.cpp.
References t_opac::albedo, EmLine::Aul, chLineLbl(), EmLine::cool, EmLine::cs, DEBUG_ENTRY, DEBUG_EXIT, dense, t_dense::eden, EmLine::heat, ioQQQ, EmLine::ipCont, opac, t_opac::opacity_abs, EmLine::ots, EmLine::Pdest, EmLine::Pelec_esc, EmLine::Pesc, phycon, EmLine::PopHi, EmLine::PopLo, EmLine::PopOpc, EmLine::pump, EmLine::TauIn, EmLine::TauTot, t_phycon::te, and TexcLine().
Referenced by ConvBase(), CoolCarb(), CoolIron(), CoolNitr(), CoolOxyg(), CoolSili(), CoolSulf(), CoolSum(), FeIIRadPress(), FindNeg(), RT_diffuse(), RT_line_all(), RT_line_static(), and RT_OTS().

| double eina | ( | double | gf, | |
| double | enercm, | |||
| double | gup | |||
| ) |
eina convert a gf into an Einstein A
| gf | ||
| enercm | ||
| gup |
Definition at line 332 of file lines_service.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, POW2, and TRANS_PROB_CONST.
Referenced by atmdat_readin(), and ContCreatePointers().
| 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 683 of file lines_service.cpp.
References t_opac::albedo, ASSERT, DEBUG_ENTRY, DEBUG_EXIT, t_opac::E2TauAbsFace, t_opac::E2TauAbsOut, t_opac::E2TauAbsTotal, geometry, iteration, t_geometry::lgSphere, t_rfield::nupper, opac, and rfield.
Referenced by lindst(), lines_continuum(), and PutLine().
| double emit_frac | ( | EmLine * | t | ) |
returns fraction of populations the produce emission
| *t |
Definition at line 224 of file lines_service.cpp.
References EmLine::Aul, t_dense::cdsqte, EmLine::cs, dense, EmLine::Pdest, EmLine::Pelec_esc, and EmLine::Pesc.
Referenced by lines_lv1_li_ne(), and lines_lv1_na_ar().
| void EmLineJunk | ( | EmLine * | t | ) |
EmLineJunk set all elements of EmLine struc to dangerous values
| *t |
Definition at line 1101 of file lines_service.cpp.
References EmLine::Aul, EmLine::ColOvTot, EmLine::cool, EmLine::cs, EmLine::damp, EmLine::dampXvel, DEBUG_ENTRY, DEBUG_EXIT, EmLine::EnergyErg, EmLine::EnergyK, EmLine::EnergyWN, EmLine::FracInwd, EmLine::gf, EmLine::gHi, EmLine::gLo, EmLine::heat, EmLine::IonStg, EmLine::ipCont, EmLine::ipFine, EmLine::iRedisFun, EmLine::nelem, EmLine::opacity, EmLine::ots, EmLine::Pdest, EmLine::Pelec_esc, EmLine::Pesc, EmLine::phots, EmLine::PopHi, EmLine::PopLo, EmLine::PopOpc, EmLine::pump, EmLine::TauCon, EmLine::TauIn, EmLine::TauTot, EmLine::WLAng, and EmLine::xIntensity.
Referenced by atmdat_readin(), FeIICreate(), HyperfineCreate(), and iso_create().
| void EmLineZero | ( | EmLine * | t | ) |
EmLineZero set all elements of EmLine struc to zero
| *t |
Definition at line 1198 of file lines_service.cpp.
References EmLine::ColOvTot, EmLine::cool, DEBUG_ENTRY, DEBUG_EXIT, EmLine::FracInwd, EmLine::heat, opac, EmLine::ots, EmLine::Pdest, EmLine::Pelec_esc, EmLine::Pesc, EmLine::phots, EmLine::PopHi, EmLine::PopLo, EmLine::PopOpc, EmLine::pump, EmLine::TauCon, EmLine::TauIn, t_opac::taumin, EmLine::TauTot, and EmLine::xIntensity.
Referenced by FeII_LineZero(), H2_Create(), H2_LineZero(), lines_helium(), and RT_tau_init().
| void FndLineHt | ( | long int * | level, | |
| long int * | ipStrong, | |||
| double * | Strong | |||
| ) |
Definition at line 1494 of file lines_service.cpp.
References C12O16Rotate, C13O16Rotate, DEBUG_ENTRY, DEBUG_EXIT, EmLine::heat, HFLines, nCORotate, nHFLines, NISO, nLevel1, nWindLine, TauLine2, and TauLines.
Referenced by HeatPunch(), and radius_next().
| static void gbar0 | ( | double | ex, | |
| float * | g | |||
| ) | [static] |
Definition at line 1323 of file lines_service.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, phycon, POW2, and t_phycon::te.
Referenced by MakeCS().
| static void gbar1 | ( | double | ex, | |
| float * | g | |||
| ) | [static] |
Definition at line 1375 of file lines_service.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, 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 352 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, POW2, and TRANS_PROB_CONST.
Referenced by ContCreatePointers(), H2_Create(), HeCreate(), HyperfineCreate(), iso_create(), and lines_helium().
| void HLineTransOpacSet | ( | long int | nelem | ) |
define current opacities for H lines
Definition at line 77 of file lines_service.cpp.
References ASSERT, EmLine::Aul, DEBUG_ENTRY, DEBUG_EXIT, dense, t_dense::eden, EmisLines, hydro, HydroBranch(), t_hydro::HyLife, ipH2p, ipH2s, ipH_LIKE, iso, MAX2, MIN2, t_iso::numLevels_local, EmLine::opacity, POW2, POW3, RYDLAM, t_iso::stat, and WAVNRYD.
Referenced by RT_line_all(), and RT_tau_init().

| bool lgTauGood | ( | EmLine * | t | ) |
lgTauGood returns true is we have not overrun optical depth scale
| *t |
Definition at line 1297 of file lines_service.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, opac, EmLine::TauIn, t_opac::taumin, and EmLine::TauTot.
Referenced by RT_line_all(), and RT_line_static().
| void linadd | ( | double | xInten, | |
| float | wavelength, | |||
| const char * | chLab, | |||
| char | chInfo | |||
| ) |
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 |
Definition at line 620 of file lines_service.cpp.
References ASSERT, t_tag_LineSv::chALab, t_tag_LineSv::chSumTyp, DEBUG_ENTRY, DEBUG_EXIT, 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, | |
| float | wavelength, | |||
| const char * | chLab, | |||
| long int | ipnt, | |||
| char | chInfo, | |||
| bool | lgOutToo | |||
| ) |
put forbidden line into stack, using index derived below
| xInten | ||
| wavelength | ||
| *chLab | ||
| ipnt | ||
| chInfo | ||
| lgOutToo |
Definition at line 750 of file lines_service.cpp.
References t_rfield::anu, ASSERT, t_tag_LineSv::chALab, t_tag_LineSv::chSumTyp, DEBUG_ENTRY, DEBUG_EXIT, t_radius::dVeff, t_radius::dVolOutwrd, t_radius::dVolReflec, emergent_line(), t_tag_LineSv::emslin, EN1RYD, EnergyRyd, t_opac::ExpZone, t_rt::fracin, gv, t_LineSave::ipass, t_gv::lgDustOn, lgEnergyRydSet, t_LineSave::lgLineEmergent, LineSave, LineSv, t_rfield::nflux, t_LineSave::nsum, opac, t_rfield::outlin, radius, t_rfield::reflin, rfield, rt, t_tag_LineSv::sumlin, t_tag_LineSv::wavelength, and t_tag_LineSv::xLineEnergy.
Referenced by H2_LinesAdd(), lines(), lines_continuum(), lines_general(), lines_hydro(), lines_lv1_k_zn(), lines_lv1_li_ne(), lines_lv1_na_ar(), and PutLine().

| void LineConvRate2CS | ( | EmLine * | t, | |
| float | 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 1254 of file lines_service.cpp.
References ASSERT, t_dense::cdsqte, EmLine::cs, DEBUG_ENTRY, DEBUG_EXIT, dense, and EmLine::gHi.
Referenced by CO_PopsEmisCool(), CoolChlo(), CoolIron(), CoolNick(), CoolSili(), and CoolSulf().
| void MakeCS | ( | EmLine * | t | ) |
MakeCS compute collision strength by g-bar approximations
| *t |
Definition at line 1404 of file lines_service.cpp.
References EmLine::cs, DEBUG_ENTRY, DEBUG_EXIT, dense, EmLine::EnergyK, EmLine::EnergyWN, gbar0(), gbar1(), EmLine::gf, EmLine::IonStg, EmLine::nelem, WAVNRYD, and t_dense::xIonDense.
Referenced by CoolAlum(), CoolCalc(), CoolIron(), CoolMagn(), and CoolSili().

| double OccupationNumberLine | ( | EmLine * | t | ) |
OccupationNumberLine - derive the photon occupation number at line center for any line
| *t |
Definition at line 279 of file lines_service.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, EmLine::gHi, EmLine::gLo, EmLine::Pesc, EmLine::PopHi, EmLine::PopLo, SDIV(), and SMALLFLOAT.
Referenced by H21_cm_pops(), and PunchDo().

| void outline | ( | EmLine * | t | ) |
outline - adds line photons to reflin and outlin
Definition at line 52 of file lines_service.cpp.
References t_radius::BeamInIn, t_radius::BeamInOut, t_radius::BeamOutOut, EmLine::ColOvTot, DEBUG_ENTRY, DEBUG_EXIT, EmLine::FracInwd, EmLine::ipCont, opac, t_rfield::outlin, EmLine::phots, radius, t_rfield::reflin, rfield, and t_opac::tmn.
Referenced by FeII_RT_Out(), H2_RT_diffuse(), and 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 882 of file lines_service.cpp.
References ASSERT, cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, EnergyRyd, ioQQQ, t_LineSave::ipass, ipLineEnergy(), lgEnergyRydSet, LineSave, MAXFORLIN, and RYDLAM.
Referenced by lines(), lines_general(), lines_lv1_k_zn(), lines_lv1_li_ne(), and lines_lv1_na_ar().

| void PutCS | ( | double | cs, | |
| EmLine * | t | |||
| ) |
PutCS enter a collision strength into an individual line struc
| cs | ||
| *t | the line struc |
Definition at line 568 of file lines_service.cpp.
References ASSERT, EmLine::cs, DEBUG_ENTRY, and DEBUG_EXIT.
Referenced by CoolAlum(), CoolArgo(), CoolCalc(), CoolCarb(), CoolChlo(), CoolChro(), CoolCoba(), CoolDima(), CoolEvaluate(), CoolFluo(), CoolIron(), CoolMagn(), CoolMang(), CoolNeon(), CoolNick(), CoolNitr(), CoolOxyg(), CoolPhos(), CoolPota(), CoolScan(), CoolSili(), CoolSodi(), CoolSulf(), CoolTita(), CoolVana(), CoolZinc(), Fe2_cooling(), Fe7Lev8(), and oi_level_pops().
| void PutExtra | ( | double | Extra | ) |
PutExtra enter and 'extra' intensity source for some line
| Extra |
Definition at line 1086 of file lines_service.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, and ExtraInten.
Referenced by lines(), lines_lv1_k_zn(), lines_lv1_li_ne(), and lines_lv1_na_ar().
| void PutLine | ( | EmLine * | t | ) |
PutLine enter local line intensity into the intensity stack for eventual printout
| *t |
Definition at line 959 of file lines_service.cpp.
References ASSERT, chIonLbl(), chLabel, EmLine::ColOvTot, EmLine::cool, DEBUG_ENTRY, DEBUG_EXIT, emergent_line(), EmLine::EnergyErg, ExtraInten, t_rt::fracin, EmLine::FracInwd, gv, EmLine::heat, t_LineSave::ipass, EmLine::ipCont, t_gv::lgDustOn, t_LineSave::lgLineEmergent, linadd(), lindst(), LineSave, t_rfield::nflux, t_LineSave::nsum, EmLine::PopOpc, EmLine::pump, rfield, rt, wl, EmLine::WLAng, and EmLine::xIntensity.
Referenced by H2_LinesAdd(), lines(), lines_helium(), lines_hydro(), 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 529 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, and DEBUG_EXIT.
Referenced by Fe11Lev5(), Fe13Lev5(), Fe3Lev14(), Fe7Lev8(), FeIICreate(), H2_Create(), HeCreate(), iso_create(), and lines_setup().
| double TexcLine | ( | EmLine * | t | ) |
TexcLine derive excitation temperature of line from contents of line array
| *t |
Definition at line 304 of file lines_service.cpp.
References DEBUG_ENTRY, DEBUG_EXIT, EmLine::EnergyK, EmLine::gHi, EmLine::gLo, EmLine::PopHi, EmLine::PopLo, and SMALLFLOAT.
Referenced by DumpLine(), H21_cm_pops(), PunchDo(), and radius_increment().
| 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 1451 of file lines_service.cpp.
References cdEXIT(), DEBUG_ENTRY, DEBUG_EXIT, ioQQQ, LineSave, LineSv, t_LineSave::nsum, and t_tag_LineSv::sumlin.
Referenced by badprt(), PrtComment(), and PrtFinal().

| float WavlenErrorGet | ( | float | wavelength | ) |
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 591 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, DEBUG_EXIT, LineSave, and t_LineSave::sig_figs.
Referenced by cdDLine(), cdEmis(), cdLine(), debugLine(), GetOptLineInt(), lgCheckAsserts(), ParseNorm(), and PrtFinal().
double EnergyRyd [static] |
Definition at line 678 of file lines_service.cpp.
Referenced by iso_create(), lindst(), and PntForLine().
float ExtraInten [static] |
bool lgEnergyRydSet = false [static] |
1.5.5