lines_service.cpp File Reference

#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 (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 Documentation

#define MAXFORLIN   1000

Referenced by PntForLine().


Function Documentation

double abscf ( double  gf,
double  enercm,
double  gl 
)

abscf convert gf into absorption coefficient

Parameters:
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 
)

char* chLineLbl ( EmLine t  ) 

chLineLbl use information in line transfer arrays to generate a line label
this label is null terminated

Parameters:
*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

Parameters:
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  ) 

double eina ( double  gf,
double  enercm,
double  gup 
)

eina convert a gf into an Einstein A

Parameters:
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

Parameters:
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

Parameters:
*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  ) 

void EmLineZero ( EmLine t  ) 

void FndLineHt ( long int *  level,
long int *  ipStrong,
double *  Strong 
)

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

Parameters:
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().

Here is the call graph for this function:

bool lgTauGood ( EmLine t  ) 

lgTauGood returns true is we have not overrun optical depth scale

Parameters:
*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

Parameters:
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 
)

void LineConvRate2CS ( EmLine t,
float  rate 
)

convert down coll rate back into electron cs in case other parts of code need this for reference

Parameters:
*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

Parameters:
*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().

Here is the call graph for this function:

double OccupationNumberLine ( EmLine t  ) 

OccupationNumberLine - derive the photon occupation number at line center for any line

Parameters:
*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().

Here is the call graph for this function:

void outline ( EmLine t  ) 

outline - adds line photons to reflin and outlin

Todo:
1 explore effects of adding term *opac.tmn[ip] to following

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

Parameters:
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().

Here is the call graph for this function:

void PutCS ( double  cs,
EmLine t 
)

void PutExtra ( double  Extra  ) 

PutExtra enter and 'extra' intensity source for some line

Parameters:
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  ) 

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.

Parameters:
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

Parameters:
*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

Parameters:
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().

Here is the call graph for this function:

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,

Parameters:
wavelength 
Returns:
function returns difference between exact and 4 sig fig wl, so we have found correct line is fabs(d wl) < return

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().


Variable Documentation

double EnergyRyd [static]

Definition at line 678 of file lines_service.cpp.

Referenced by iso_create(), lindst(), and PntForLine().

float ExtraInten [static]

Definition at line 956 of file lines_service.cpp.

Referenced by PutExtra(), and PutLine().

bool lgEnergyRydSet = false [static]

Definition at line 680 of file lines_service.cpp.

Referenced by lindst(), and PntForLine().


Generated for cloudy by doxygen 1.5.9