#include "cddefines.h"
#include "lines_service.h"
#include "dense.h"
#include "geometry.h"
#include "hydrogenic.h"
#include "ipoint.h"
#include "iso.h"
#include "lines.h"
#include "opacity.h"
#include "physconst.h"
#include "radius.h"
#include "rfield.h"
#include "rt.h"
#include "taulines.h"
Go to the source code of this file.
Defines | |
#define | DO_PROFILE false |
Functions | |
STATIC void | normalizeProfile (double *profile, long numPoints, realnum *eArray, double E_centroid) |
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) |
double | RefIndex (double EnergyWN) |
realnum | WavlenErrorGet (realnum wavelength) |
STATIC void | lincom (double xInten, realnum wavelength, const char *chLab, long int ipnt, char chInfo, const char *chComment, bool lgAdd) |
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 | outline_base (double dampXvel, double damp, bool lgTransStackLine, long int ip, double phots, realnum inwd, double nonScatteredFraction) |
void | outline_base_bin (bool lgTransStackLine, long int ip, double phots, realnum inwd, double nonScatteredFraction) |
void | lindst (double xInten, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment) |
void | lindst (double dampXvel, double damp, double xInten, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment) |
void | lindst (transition *t, const char *chLab, char chInfo, bool lgOutToo, const char *chComment) |
void | PntForLine (double wavelength, const char *chLabel, long int *ipnt) |
void | EmLineJunk (emission *t) |
void | CollisionJunk (collision *t) |
void | StateJunk (quantumState *t) |
void | EmLineZero (emission *t) |
void | CollisionZero (collision *t) |
void | StateZero (quantumState *t) |
double | ConvRate2CS (realnum gHi, realnum rate) |
double | ConvCrossSect2CollStr (double CrsSectCM2, double gLo, double E_ProjectileRyd, double reduced_mass_grams) |
double | totlin (int chInfo) |
void | FndLineHt (long int *level, long int *ipStrong, double *Strong) |
quantumState * | AddState2Stack (void) |
emission * | AddLine2Stack (bool lgRadiativeTrans) |
#define DO_PROFILE false |
Referenced by outline_base().
double abscf | ( | double | gf, | |
double | enercm, | |||
double | gl | |||
) |
abscf convert gf into absorption coefficient
gf | ||
enercm | ||
gl |
Definition at line 73 of file lines_service.cpp.
References ASSERT, and DEBUG_ENTRY.
Referenced by ContCreatePointers(), FeIIPoint(), FillExtraLymanLine(), H2_Create(), iso_create(), and iso_satellite_update().
emission* AddLine2Stack | ( | bool | lgRadiativeTrans | ) |
AddLine2Stack add generic emission line to GenericLines and return pointer to that state.
Definition at line 999 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(), atmdat_readin(), FeIICreate(), H2_ReadTransprob(), HyperfineCreate(), InitTransition(), iso_allocate(), and iso_create().
quantumState* AddState2Stack | ( | void | ) |
Definition at line 971 of file lines_service.cpp.
References ASSERT, currentState, DEBUG_ENTRY, GenericStates, lastState, lgStatesAdded, t_quantumState::next, StateJunk(), statesAdded, and StateZero().
Referenced by atmdat_readin(), FeIICreate(), H2_Create(), HyperfineCreate(), InitTransition(), iso_allocate(), and iso_create().
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 700 of file lines_service.cpp.
References t_collision::col_str, t_collision::col_stri, t_collision::ColUL, t_collision::cool, DEBUG_ENTRY, t_collision::heat, and ipNCOLLIDER.
Referenced by transition::Junk().
void CollisionZero | ( | collision * | t | ) |
CollisionZero set all elements of collision struc to zero
*t |
Definition at line 797 of file lines_service.cpp.
References t_collision::ColUL, t_collision::cool, DEBUG_ENTRY, and t_collision::heat.
Referenced by transition::Zero().
double ConvCrossSect2CollStr | ( | double | CrsSectCM2, | |
double | gLo, | |||
double | E_ProjectileRyd, | |||
double | reduced_mass_grams | |||
) |
convert collisional deexcitation cross section for into collision strength
CrsSectCM2 | - the cross section | |
gLo | - statistical weight of lower level of transition | |
E_ProjectileRyd | - initial projectile energy in Rydbergs | |
reduced_mass_grams | - reduced mass MpMt/(Mp+Mt) of projectile-target system |
Definition at line 840 of file lines_service.cpp.
References ASSERT, BOHR_RADIUS_CM, DEBUG_ENTRY, ELECTRON_MASS, and PI.
Referenced by collision_strength_VF01(), hydro_vs_coll_str(), and S62_Therm_ave_coll_str().
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 821 of file lines_service.cpp.
References ASSERT, t_dense::cdsqte, DEBUG_ENTRY, and dense.
Referenced by oi_cs().
double eina | ( | double | gf, | |
double | enercm, | |||
double | gup | |||
) |
eina convert a gf into an Einstein A
gf | ||
enercm | ||
gup |
Definition at line 35 of file lines_service.cpp.
References DEBUG_ENTRY, 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 291 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 lincom(), lines_continuum(), and RT_diffuse().
void EmLineJunk | ( | emission * | t | ) |
EmLineJunk set all elements of emission struc to dangerous values
*t |
Definition at line 638 of file lines_service.cpp.
References t_emission::Aul, t_emission::AutoIonizFrac, 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 748 of file lines_service.cpp.
References iter_track_basic< T >::clear(), 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, t_emission::TauTrack, and t_emission::xIntensity.
Referenced by AddLine2Stack(), dBase_solve(), InitDefaultsPreparse(), and transition::Zero().
void FndLineHt | ( | long int * | level, | |
long int * | ipStrong, | |||
double * | Strong | |||
) |
Definition at line 902 of file lines_service.cpp.
References transition::Coll, dBaseLines, DEBUG_ENTRY, fixit(), t_collision::heat, HFLines, transition::Hi, linesAdded2, t_quantumState::nelem, nHFLines, NISO, nLevel1, nWindLine, TauLine2, TauLines, and t_emission::tran.
Referenced by radius_next(), and SaveHeat().
double GetGF | ( | double | eina, | |
double | enercm, | |||
double | gup | |||
) |
GetGF convert Einstein A into oscillator strength
eina | ||
enercm | ||
gup |
Definition at line 52 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, POW2, and TRANS_PROB_CONST.
Referenced by atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), atmdat_readin(), ContCreatePointers(), FillExtraLymanLine(), H2_Create(), hydro_vs_coll_str(), hydro_vs_deexcit(), HyperfineCreate(), iso_create(), iso_satellite_update(), and ReadBadnellAIData().
void linadd | ( | double | xInten, | |
realnum | wavelength, | |||
const char * | chLab, | |||
char | chInfo, | |||
const char * | chComment | |||
) |
Definition at line 272 of file lines_service.cpp.
References DEBUG_ENTRY, and lincom().
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_base().
STATIC void lincom | ( | double | xInten, | |
realnum | wavelength, | |||
const char * | chLab, | |||
long int | ipnt, | |||
char | chInfo, | |||
const char * | chComment, | |||
bool | lgAdd | |||
) |
Definition at line 160 of file lines_service.cpp.
References t_rfield::AnuOrg, ASSERT, t_tag_LineSv::chALab, t_tag_LineSv::chComment, t_tag_LineSv::chSumTyp, DEBUG_ENTRY, t_radius::dVeffAper, emergent_line(), t_tag_LineSv::emslin, t_rt::fracin, t_LineSave::ipass, LineSave, LineSv, MAX2, t_rfield::nflux, t_LineSave::nsum, radius, rfield, rt, RYDLAM, t_tag_LineSv::SumLine, t_tag_LineSv::wavelength, and t_rfield::widflx.
Referenced by linadd(), and lindst().
void lindst | ( | transition * | t, | |
const char * | chLab, | |||
char | chInfo, | |||
bool | lgOutToo, | |||
const char * | chComment | |||
) |
put forbidden line into stack, using index derived below
t | -- pointer to transition data | |
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 554 of file lines_service.cpp.
References t_emission::damp, t_emission::dampXvel, DEBUG_ENTRY, transition::Emis, transition::ipCont, lindst(), transition::WLAng, and t_emission::xIntensity.
void lindst | ( | double | dampXvel, | |
double | damp, | |||
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
dampXvel | - damping constant times Doppler velocity | |
damp | - damping constant | |
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 505 of file lines_service.cpp.
References t_rfield::anu, ASSERT, t_geometry::covrt, DEBUG_ENTRY, EN1RYD, geometry, t_LineSave::ipass, lincom(), LineSave, outline_base(), and rfield.
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 458 of file lines_service.cpp.
References t_rfield::anu, ASSERT, t_geometry::covrt, DEBUG_ENTRY, EN1RYD, geometry, t_LineSave::ipass, lincom(), LineSave, outline_base_bin(), and rfield.
Referenced by H2_LinesAdd(), lindst(), lines(), lines_continuum(), lines_general(), lines_hydro(), lines_lv1_k_zn(), lines_lv1_li_ne(), lines_lv1_na_ar(), and PutLine_base().
STATIC void normalizeProfile | ( | double * | profile, | |
long | numPoints, | |||
realnum * | eArray, | |||
double | E_centroid | |||
) |
Definition at line 425 of file lines_service.cpp.
References ASSERT, and SMALLFLOAT.
Referenced by outline_base().
void outline_base | ( | double | dampXvel, | |
double | damp, | |||
bool | lgTransStackLine, | |||
long int | ip, | |||
double | phots, | |||
realnum | inwd, | |||
double | nonScatteredFraction | |||
) |
Definition at line 352 of file lines_service.cpp.
References t_rfield::anu, ASSERT, DEBUG_ENTRY, DO_PROFILE, t_rfield::egamry, t_rfield::emm, ipoint(), MAX2, MIN2, normalizeProfile(), outline_base_bin(), rfield, SPEEDLIGHT, and vfun().
Referenced by lindst(), and transition::outline().
void outline_base_bin | ( | bool | lgTransStackLine, | |
long int | ip, | |||
double | phots, | |||
realnum | inwd, | |||
double | nonScatteredFraction | |||
) |
Definition at line 393 of file lines_service.cpp.
References t_radius::BeamInIn, t_radius::BeamInOut, t_radius::BeamOutOut, DEBUG_ENTRY, t_rfield::DiffuseLineEmission, t_radius::dVolOutwrd, t_radius::dVolReflec, t_opac::ExpZone, opac, t_rfield::outlin, radius, t_rfield::reflin, rfield, and t_opac::tmn.
Referenced by lindst(), and outline_base().
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 573 of file lines_service.cpp.
References ASSERT, cdEXIT, DEBUG_ENTRY, ioQQQ, t_LineSave::ipass, ipLineEnergy(), LineSave, and RYDLAM.
Referenced by lines(), lines_general(), lines_lv1_k_zn(), lines_lv1_li_ne(), and lines_lv1_na_ar().
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 92 of file lines_service.cpp.
References ASSERT, and DEBUG_ENTRY.
Referenced by atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), Fe11Lev5(), Fe13Lev5(), Fe3Lev14(), Fe7Lev8(), FeIICreate(), FillExtraLymanLine(), H2_Create(), iso_create(), lines_continuum(), 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 722 of file lines_service.cpp.
References t_quantumState::chLabel, DEBUG_ENTRY, t_quantumState::g, t_quantumState::IonStg, t_quantumState::nelem, t_quantumState::Pop, and t_quantumState::sp.
Referenced by AddState2Stack(), and InitCoreloadPostparse().
void StateZero | ( | quantumState * | t | ) |
StateZero set all elements of quantumState struc to zero
*t |
population of state [cm-3]
Definition at line 810 of file lines_service.cpp.
References DEBUG_ENTRY, and t_quantumState::Pop.
Referenced by AddState2Stack(), and transition::Zero().
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 863 of file lines_service.cpp.
References cdEXIT, DEBUG_ENTRY, ioQQQ, LineSave, LineSv, t_LineSave::nsum, and t_tag_LineSv::SumLine.
Referenced by badprt(), lgConserveEnergy(), and PrtFinal().
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 133 of file lines_service.cpp.
References ASSERT, DEBUG_ENTRY, LineSave, pow(), and t_LineSave::sig_figs.
Referenced by cdEmis(), cdLine(), debugLine(), GetOptLineInt(), lgCheckMonitors(), ParseNorm(), and PrtFinal().