cloudy trunk
Loading...
Searching...
No Matches
lines_service.cpp File Reference
#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 "trace.h"
#include "opacity.h"
#include "physconst.h"
#include "radius.h"
#include "rfield.h"
#include "rt.h"
#include "taulines.h"
#include "thirdparty.h"
Include dependency graph for lines_service.cpp:

Go to the source code of this file.

Functions

void LineStackCreate ()
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 (const TransitionProxy &t, const char *chLab, char chInfo, bool lgOutToo, const char *chComment)
void PntForLine (double wavelength, const char *chLabel, long int *ipnt)
double ConvRate2CS (realnum gHi, realnum rate)
double ConvCrossSect2CollStr (double CrsSectCM2, double gLo, double E_ProjectileRyd, double reduced_mass_grams)
double totlin (int chInfo)
const TransitionProxy FndLineHt (long int *level)

Function Documentation

◆ abscf()

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

abscf convert gf into absorption coefficient

Parameters
gf
enercm
gl

Definition at line 122 of file lines_service.cpp.

References ASSERT, and DEBUG_ENTRY.

Referenced by ContCreatePointers(), FeIIPoint(), FillExtraLymanLine(), diatomics::init(), iso_create(), and iso_satellite_update().

◆ ConvCrossSect2CollStr()

double ConvCrossSect2CollStr ( double CrsSectCM2,
double gLo,
double E_ProjectileRyd,
double reduced_mass_grams )

convert collisional deexcitation cross section for into collision strength

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

◆ ConvRate2CS()

double ConvRate2CS ( realnum gHi,
realnum 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 648 of file lines_service.cpp.

References ASSERT, DEBUG_ENTRY, and dense.

Referenced by oi_cs().

◆ eina()

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

eina convert a gf into an Einstein A

Parameters
gf
enercm
gup

Definition at line 84 of file lines_service.cpp.

References DEBUG_ENTRY, POW2, and TRANS_PROB_CONST.

Referenced by atmdat_readin(), ContCreatePointers(), and ForbiddenAuls().

◆ emergent_line()

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
arrayindex for continuum frequency

Definition at line 335 of file lines_service.cpp.

References ASSERT, DEBUG_ENTRY, geometry, iteration, opac, and rfield.

Referenced by lincom(), lines_continuum(), RT_diffuse(), and RT_iso_integrate_RRC().

◆ FndLineHt()

const TransitionProxy FndLineHt ( long int * level)

FndLineHt search through line heat arrays to find the strongest heat source

Parameters
*level

Definition at line 729 of file lines_service.cpp.

References ASSERT, TransitionProxy::associated(), TransitionProxy::Coll(), dBaseTrans, DEBUG_ENTRY, fixit(), CollisionProxy::heat(), HFLines, nHFLines, NISO, nLevel1, nSpecies, nWindLine, TauLine2, and TauLines.

Referenced by PrtComment(), radius_next(), and SaveHeat().

Here is the call graph for this function:

◆ GetGF()

double GetGF ( double eina,
double enercm,
double gup )

◆ linadd()

void linadd ( double xInten,
realnum wavelength,
const char * chLab,
char chInfo,
const char * chComment )

◆ lincom()

STATIC void lincom ( double xInten,
realnum wavelength,
const char * chLab,
long int ipnt,
char chInfo,
const char * chComment,
bool lgAdd )

Definition at line 209 of file lines_service.cpp.

References ASSERT, DEBUG_ENTRY, emergent_line(), LineSave, LineSv, MAX2, radius, rfield, rt, RYDLAM, STATIC, and wavelength.

Referenced by linadd(), lindst(), and lindst().

Here is the call graph for this function:

◆ lindst() [1/3]

void lindst ( const TransitionProxy & t,
const char * chLab,
char chInfo,
bool lgOutToo,
const char * chComment )

◆ lindst() [2/3]

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

Parameters
dampXvel- damping constant times Doppler velocity
damp- damping constant
xInten- local emissivity per unit vol
wavelengthwavelength Angstroms
*chLabstring label for ion
ipntoffset of line in continuum mesh
chInfocharacter type of entry for line - 'c' cooling, 'h' heating, 'i' info only, 'r' recom line
lgOutTooshould line be included in outward beam?
*chCommentstring explaining line

Definition at line 515 of file lines_service.cpp.

References ASSERT, DEBUG_ENTRY, EN1RYD, geometry, lincom(), LineSave, outline_base(), rfield, and wavelength.

Here is the call graph for this function:

◆ lindst() [3/3]

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

Parameters
xInten- local emissivity per unit vol
wavelengthwavelength Angstroms
*chLabstring label for ion
ipntoffset of line in continuum mesh
chInfocharacter type of entry for line - 'c' cooling, 'h' heating, 'i' info only, 'r' recom line
lgOutTooshould line be included in outward beam?
*chCommentstring explaining line

Definition at line 468 of file lines_service.cpp.

References ASSERT, DEBUG_ENTRY, EN1RYD, geometry, lincom(), LineSave, outline_base_bin(), rfield, and wavelength.

Referenced by diatomics::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().

Here is the call graph for this function:

◆ LineStackCreate()

void LineStackCreate ( void )

create vectors to save line intensities

Definition at line 32 of file lines_service.cpp.

References ASSERT, DEBUG_ENTRY, ioQQQ, lines(), LineSave, LineSv, LineSvSortWL, MALLOC, and trace.

Referenced by cloudy().

Here is the call graph for this function:

◆ outline_base()

void outline_base ( double dampXvel,
double damp,
bool lgTransStackLine,
long int ip,
double phots,
realnum inwd,
double nonScatteredFraction )

Definition at line 396 of file lines_service.cpp.

References ASSERT, DEBUG_ENTRY, get_ptr(), ipoint(), MAX2, MIN2, outline_base_bin(), rfield, SPEEDLIGHT, and VoigtU().

Referenced by lindst(), and TransitionProxy::outline().

Here is the call graph for this function:

◆ outline_base_bin()

void outline_base_bin ( bool lgTransStackLine,
long int ip,
double phots,
realnum inwd,
double nonScatteredFraction )

Definition at line 435 of file lines_service.cpp.

References DEBUG_ENTRY, opac, radius, and rfield.

Referenced by lindst(), and outline_base().

◆ PntForLine()

void PntForLine ( double wavelength,
const char * chLabel,
long int * ipnt )

PntForLine generate pointer for forbidden line

Parameters
wavelengthwavelength of line in Angstroms
*chLabellabel for the line
*ipntthis is array index on the f, not c scale, for the continuum cell holding the line

Definition at line 583 of file lines_service.cpp.

References ASSERT, cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, ioQQQ, ipLineEnergy(), LineSave, RYDLAM, and wavelength.

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:

◆ RefIndex()

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 141 of file lines_service.cpp.

References ASSERT, and DEBUG_ENTRY.

Referenced by atmdat_CHIANTI_readin(), atmdat_LAMDA_readin(), atmdat_STOUT_readin(), Fe3Lev14(), FeIICreate(), FillExtraLymanLine(), diatomics::init(), iso_create(), lines_continuum(), and lines_setup().

◆ totlin()

double totlin ( int chInfo)

totlin sum total intensity of cooling, recombination, or intensity lines

Parameters
chInfochInfor is 1 char,
'i' information,
'r' recombination or
'c' collision

Definition at line 690 of file lines_service.cpp.

References cdEXIT, DEBUG_ENTRY, EXIT_FAILURE, ioQQQ, LineSave, and LineSv.

Referenced by badprt(), lgConserveEnergy(), and PrtFinal().

◆ WavlenErrorGet()

realnum WavlenErrorGet ( realnum 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 182 of file lines_service.cpp.

References ASSERT, DEBUG_ENTRY, LineSave, and wavelength.

Referenced by cdEmis(), cdLine(), debugLine(), GetOptLineInt(), lgCheckMonitors(), ParseNorm(), and PrtFinal().