cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
emission.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2022 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 
4 #include "cddefines.h"
5 #include "emission.h"
6 #include "opacity.h"
7 
8 /*EmLineJunk set all elements of transition struc to dangerous values */
9 /*EmLineZero set all elements of transition struc to zero */
10 
11 /*EmLineJunk set all elements of transition struc to dangerous values */
13 {
14 
15  DEBUG_ENTRY( "EmLineJunk()" );
16 
17  /* optical depth in continuum to ill face */
18  t.TauCon() = -FLT_MAX;
19 
20  /* inward and total line optical depths */
21  t.TauIn() = -FLT_MAX;
22  t.TauInSpecific() = -FLT_MAX;
23  t.TauTot() = -FLT_MAX;
24 
25  /* type of redistribution function, */
26  t.iRedisFun() = INT_MIN;
27 
28  /* array offset for line within fine opacity */
29  t.ipFine() = -10000;
30 
31  /* inward fraction */
32  t.FracInwd() = -FLT_MAX;
33 
34  /* continuum pumping rate */
35  t.pump() = -FLT_MAX;
36 
37  /* line intensity */
38  t.xIntensity() = -FLT_MAX;
39  t.xObsIntensity() = -FLT_MAX;
40 
41  /* gf value */
42  t.gf() = -FLT_MAX;
43 
44  /* escape and destruction probs */
45  t.Pesc() = -FLT_MAX;
46  t.Pdest() = -FLT_MAX;
47  t.Pelec_esc() = -FLT_MAX;
48 
49  /* damping constant */
50  t.damp() = -FLT_MAX;
51 
52  /* ratio of collisional to radiative excitation*/
53  t.ColOvTot() = -FLT_MAX;
54 
55  /* auto-ionization fraction */
56  t.AutoIonizFrac() = -FLT_MAX;
57 
58  /* line opacity */
59  t.opacity() = -FLT_MAX;
60  t.mult_opac() = -FLT_MAX;
61 
62  t.PopOpc() = -FLT_MAX;
63 
64  t.VoigtLineCen() = -FLT_MAX;
65 
66  /* transition prob, Einstein A upper to lower */
67  t.Aul() = -FLT_MAX;
68 
69  /* ots rate */
70  t.ots() = -FLT_MAX;
71  return;
72 }
73 
74 /*TauZero set initial values of inward, outward, and local-to-continuum-source optical depths */
76 {
77  DEBUG_ENTRY( "TauZero()" );
78 
79  /* total optical depth in all overlapping lines to illuminated face,
80  * used for pumping */
81  t.TauCon() = opac.taumin;
82 
83  /* inward and total line optical depths */
84  /* >>chng 03 feb 14, from 0 to opac.taumin */
85  t.TauIn() = opac.taumin;
87 
88  /* total optical depths */
89  t.TauTot() = 1e20f;
90 
91  return;
92 }
93 
94 /*EmLineZero zeros out the emission line structure */
96 {
97  DEBUG_ENTRY( "EmLineZero()" );
98 
99  /* inward fraction */
100  /* >>chng 03 feb 14, from 0 to 1 */
101  t.FracInwd() = 1.;
102 
103  /* continuum pumping rate */
104  t.pump() = 0.;
105 
106  /* line intensity */
107  t.xIntensity() = 0.;
108  t.xObsIntensity() = 0.;
109 
110  /* escape and destruction probs */
111  /* >>chng 03 feb 14, change from 0 to 1 */
112  t.Pesc() = 1.;
113  t.Pdest() = 0.;
114  t.Pelec_esc() = 0.;
115 
116  /* ratio of collisional to radiative excitation*/
117  t.ColOvTot() = 1.;
118 
119  t.VoigtLineCen() = 1.;
120 
121  /* pop that enters net opacity */
122  t.PopOpc() = 0.;
123  t.mult_opac() = 0.;
124 
125  /* ots rate */
126  t.ots() = 0.;
127  return;
128 }
long int & ipFine() const
Definition: emission.h:460
realnum & TauInSpecific() const
Definition: emission.h:480
double & ots() const
Definition: emission.h:700
int & iRedisFun() const
Definition: emission.h:450
realnum & opacity() const
Definition: emission.h:650
realnum & Pelec_esc() const
Definition: emission.h:590
t_opac opac
Definition: opacity.cpp:5
realnum & TauTot() const
Definition: emission.h:490
realnum & gf() const
Definition: emission.h:570
double & VoigtLineCen() const
Definition: emission.h:680
double & xIntensity() const
Definition: emission.h:540
void EmLineJunk(EmissionList::reference t)
Definition: emission.cpp:12
realnum & Pesc() const
Definition: emission.h:580
realnum & Pdest() const
Definition: emission.h:600
void EmLineZero(EmissionList::reference t)
Definition: emission.cpp:95
realnum & TauCon() const
Definition: emission.h:510
double & mult_opac() const
Definition: emission.h:660
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
double & PopOpc() const
Definition: emission.h:670
void TauZero(EmissionList::reference t)
Definition: emission.cpp:75
realnum & damp() const
Definition: emission.h:620
double & ColOvTot() const
Definition: emission.h:630
double & xObsIntensity() const
Definition: emission.h:545
realnum & AutoIonizFrac() const
Definition: emission.h:640
realnum & FracInwd() const
Definition: emission.h:520
realnum & Aul() const
Definition: emission.h:690
realnum & TauIn() const
Definition: emission.h:470
realnum taumin
Definition: opacity.h:167
double & pump() const
Definition: emission.h:530