cloudy trunk
Loading...
Searching...
No Matches
emission.cpp
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2013 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.TauTot() = -FLT_MAX;
23
24 /* type of redistribution function, */
25 t.iRedisFun() = INT_MIN;
26
27 /* array offset for line within fine opacity */
28 t.ipFine() = -10000;
29
30 /* inward fraction */
31 t.FracInwd() = -FLT_MAX;
32
33 /* continuum pumping rate */
34 t.pump() = -FLT_MAX;
35
36 /* line intensity */
37 t.xIntensity() = -FLT_MAX;
38
39 /* number of photons emitted per sec in the line */
40 t.phots() = -FLT_MAX;
41
42 /* gf value */
43 t.gf() = -FLT_MAX;
44
45 /* escape and destruction probs */
46 t.Pesc() = -FLT_MAX;
47 t.Pdest() = -FLT_MAX;
48 t.Pelec_esc() = -FLT_MAX;
49
50 /* damping constant */
51 t.damp() = -FLT_MAX;
52
53 /* ratio of collisional to radiative excitation*/
54 t.ColOvTot() = -FLT_MAX;
55
56 /* auto-ionization fraction */
57 t.AutoIonizFrac() = -FLT_MAX;
58
59 /* line opacity */
60 t.opacity() = -FLT_MAX;
61
62 t.PopOpc() = -FLT_MAX;
63
64 /* transition prob, Einstein A upper to lower */
65 t.Aul() = -FLT_MAX;
66
67 /* ots rate */
68 t.ots() = -FLT_MAX;
69 return;
70}
71
72/*TauZero set initial values of inward, outward, and local-to-continuum-source optical depths */
74{
75 DEBUG_ENTRY( "TauZero()" );
76
77 /* total optical depth in all overlapping lines to illuminated face,
78 * used for pumping */
79 t.TauCon() = opac.taumin;
80
81 /* inward and total line optical depths */
82 /* >>chng 03 feb 14, from 0 to opac.taumin */
83 t.TauIn() = opac.taumin;
84
85 /* total optical depths */
86 t.TauTot() = 1e20f;
87
88 return;
89}
90
91/*EmLineZero zeros out the emission line structure */
93{
94
95 DEBUG_ENTRY( "EmLineZero()" );
96
97 /* inward fraction */
98 /* >>chng 03 feb 14, from 0 to 1 */
99 t.FracInwd() = 1.;
100
101 /* continuum pumping rate */
102 t.pump() = 0.;
103
104 /* line intensity */
105 t.xIntensity() = 0.;
106
107 /* number of photons emitted per sec in the line */
108 t.phots() = 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 /* pop that enters net opacity */
120 t.PopOpc() = 0.;
121
122 /* ots rate */
123 t.ots() = 0.;
124 return;
125}
#define DEBUG_ENTRY(funcname)
Definition cddefines.h:684
EmissionProxy reference
Definition emission.h:316
double & ColOvTot() const
Definition emission.h:573
realnum & damp() const
Definition emission.h:563
long int & ipFine() const
Definition emission.h:413
double & PopOpc() const
Definition emission.h:603
realnum & TauCon() const
Definition emission.h:453
int & iRedisFun() const
Definition emission.h:403
realnum & gf() const
Definition emission.h:513
realnum & AutoIonizFrac() const
Definition emission.h:583
double & ots() const
Definition emission.h:623
double & xIntensity() const
Definition emission.h:483
realnum & Pesc() const
Definition emission.h:523
realnum & Pelec_esc() const
Definition emission.h:533
realnum & Aul() const
Definition emission.h:613
realnum & TauIn() const
Definition emission.h:423
realnum & opacity() const
Definition emission.h:593
double & pump() const
Definition emission.h:473
realnum & FracInwd() const
Definition emission.h:463
realnum & Pdest() const
Definition emission.h:543
double & phots() const
Definition emission.h:503
realnum & TauTot() const
Definition emission.h:433
void EmLineJunk(EmissionList::reference t)
Definition emission.cpp:12
void EmLineZero(EmissionList::reference t)
Definition emission.cpp:92
void TauZero(EmissionList::reference t)
Definition emission.cpp:73
t_opac opac
Definition opacity.cpp:5