cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cool_chlo.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 /*CoolChlo compute chlorine cooling */
4 #include "cddefines.h"
5 #include "taulines.h"
6 #include "coolheavy.h"
7 #include "dense.h"
8 #include "phycon.h"
9 #include "thermal.h"
10 #include "lines_service.h"
11 #include "atoms.h"
12 #include "cooling.h"
13 
14 void CoolChlo(void)
15 {
16  double a21,
17  a31,
18  a32,
19  a41,
20  a42,
21  a43,
22  a51,
23  a52,
24  a53,
25  a54,
26  cs,
27  cs01,
28  cs02,
29  cs12,
30  cs13,
31  cs14,
32  cs15,
33  cs23,
34  cs24,
35  cs25,
36  cs34,
37  cs35,
38  cs45,
39  p[5],
40  p3,
41  tused;
42  realnum
43  p2,
44  pop2,
45  rate;
46  static double gcl3[5]={4.,4.,6.,2.,4.};
47  static double excl3[4]={18053.,66.,11693.,95.};
48 
49  DEBUG_ENTRY( "CoolChlo()" );
50 
51  /* >>chng >>03 nov 09, add this line, from
52  * >>refer Cl1 cs Hollenbach, D. & McKee, C.F. 1989, ApJ, 342, 306 */
53  /* rates are said to be ok over range 30 - 3000K */
54  tused = MAX2( 30. , phycon.te );
55  tused = MIN2( 3000. , phycon.te );
56  tused /= 100.;
57 
58  /* HM89 give deexcitation rates, must convert into electron collision strength, as expected
59  * by the code's infrastructure */
60  /* electron collision strength */
61  rate = (realnum)( 4.7e-8 * dense.eden +
62  /* >>chng 05 jul 05, eden to cdsqte */
63  /*8.3e-10*pow( tused , 0.17 ) * dense.xIonDense[ipHYDROGEN][0]) / dense.eden);*/
64  8.3e-10*pow( tused , 0.17 ) * dense.xIonDense[ipHYDROGEN][0] );
65  /* possible for atomic hydrogen density to be vary small, causing zero rate coef,
66  * which triggers thrown assert - guard against this */
68  atom_level2(TauLines[ipCl1_11m]);
69 
70  /* [Cl II] 14.3678 mic, 33.281 mic*/
71  /* >>refer cl2 as Mendoza, C., & Zeippen, C.J. 1983, MNRAS, 202, 981*/
72  /* the following cs were about 2x smaller */
73  /* >>referold cl2 cs Krueger, T.K., & Czyzak, S.J. 1970, Pro Roy Soc Lond, 318, 531 */
74  /* >>chgn 03 feb 24, change to following collision strengths */
75  /* >>refer cl2 cs Wilson, N.J., & Bell, K.L. 2002, MNRAS, 331, 389 */
76  /* order of 3P ground term, 2, 1, 0 from lowest to highest */
77 
78  /* this is the 3P J=1 -> 2, 14.4 micron line */
79  cs12 = 17.5 / (phycon.te10*phycon.te04 );
80  /*PutCS(2.17,TauLines[ipfsCl214]);*/
81  PutCS( cs12 , TauLines[ipfsCl214] );
82 
83  /* this is the 3P J=0 -> 1, 33.3 micron line */
84  cs01 = 4.85 / (phycon.te10*phycon.te02 );
85  PutCS( cs01 , TauLines[ipfsCl233] );
86  /*PutCS(0.93,TauLines[ipfsCl233]);*/
87 
88  /* the 0 - 2 transition */
89  cs02 = 4.51 / (phycon.te10*phycon.te04 );
90  PutCS( cs02 , *TauDummy );
91  /*PutCS(1.00,TauDummy);*/
92 
93  /* atom_level3( t10,t21,t20) */
94  atom_level3(TauLines[ipfsCl214],TauLines[ipfsCl233],*TauDummy);
95 
96  /* [Cl II] 8578.7, 9123.6, 6161.8, 3677.9 */
97  /* >>refer Cl2 As Mendoza, C., & Zeippen, C.J. 1983, MNRAS, 202, 981 */
98  /* following numbering in terms of level position, 1, 2, then 3 */
99  a21 = 0.133;
100  a31 = 1.33;
101  a32 = 2.06;
102  cs13 = 1.01;
103  /* this is 10x what is in the paper, as per comment made in
104  * >>refer Cl2 cs Keenan, F.P., Aller, L.H., Exter, K.M., Hyung, S., &
105  * >>refercon Pollacco, D.L. 2003, ApJ, 584, 385 */
106  cs23 = 1.49;
107  cs12 = 8.389;
108  /* POP3(G1,G2,G3,O12,O13,O23,A21,A31,A32,E12,E23,P2,ABUND,GAM2) */
109  p3 = atom_pop3(9.,5.,1.,cs12,cs13,cs23,a21,a31,a32,1.576e4,23344.,
110  &p2,dense.xIonDense[ipCHLORINE][1],0.,0.,0.);
111  /*p3 = atom_pop3(9.,5.,1.,3.86,0.456,1.15,a21,a31,a32,1.576e4,23344.,
112  &p2,dense.xIonDense[ipCHLORINE][1],0.);*/
113 
114  /* [Cl II] 8578.7, 9123.6 doublet, both together */
115  CoolHeavy.c8579 = p2*a21*2.32e-12;
116  CoolAdd("Cl 2",8579,CoolHeavy.c8579);
117 
118  /* [Cl II] 6161.8 auroral line */
119  CoolHeavy.c6164 = p3*a32*3.23e-12;
120  CoolAdd("Cl 2",6164,CoolHeavy.c6164);
121 
122  /* [Cl II] 3677.9 */
123  CoolHeavy.c3679 = p3*a31*5.41e-12;
124  CoolAdd("Cl 2",3679,CoolHeavy.c3679);
125 
126  /* [Cl III] this is a [SII] - like doublet, vac lam=5519, 5539
127  * all data from
128  * >>refer cl3 all Mendoza, C. 1982, in Planetary Nebulae, IAU Symp No. 103,
129  * >>refercon ed by D.R. Flower, (D. Reidel: Holland), 143 */
130  cs12 = 1.26;
131  a21 = 4.83e-3;
132 
133  cs13 = 1.88;
134  a31 = 7.04e-4;
135 
136  cs14 = 0.627;
137  a41 = 0.305;
138 
139  cs15 = 1.26;
140  a51 = 0.754;
141 
142  cs23 = 3.19;
143  a32 = 3.22e-6;
144 
145  cs24 = 1.24;
146  a42 = 0.303;
147 
148  cs25 = 1.91;
149  a52 = 0.323;
150 
151  cs34 = 1.38;
152  a43 = 0.100;
153 
154  cs35 = 3.33;
155  a53 = 0.316;
156 
157  cs45 = 1.34;
158  a54 = 7.65e-6;
159 
160  double Cooling , CoolingDeriv;
161  atom_pop5(gcl3,excl3,cs12,cs13,cs14,cs15,cs23,cs24,cs25,cs34,cs35,
162  cs45,a21,a31,a41,a51,a32,a42,a52,a43,a53,a54,p,
163  dense.xIonDense[ipCHLORINE][2] , &Cooling , &CoolingDeriv, 0.,0.,0.,0.);
164 
165  CoolHeavy.Cl5539 = p[1]*a21*3.59e-12;
166  CoolHeavy.Cl5519 = p[2]*a31*3.61e-12;
167  CoolHeavy.Cl3354 = p[3]*a41*5.93e-12;
168  CoolHeavy.Cl3344 = p[4]*a51*5.95e-12;
169  CoolHeavy.Cl8504 = p[3]*a42*2.34e-12;
170  CoolHeavy.Cl8436 = p[4]*a42*2.36e-12;
171  CoolHeavy.Cl8552 = p[3]*a43*2.33e-12;
172  CoolHeavy.Cl8483 = p[4]*a53*2.35e-12;
173 
174  /* following are whole multiplets */
179 
180  // total cooling from 5-level atom
181  CoolAdd("Cl 3",5525,Cooling);
182  thermal.dCooldT += CoolingDeriv;
183 
184  /* [CL IV], like [OIII]
185  * cs from
186  * >>refer cl4 cs Galavis, M.E., Mendoza, C., & Zeippen, C.J. 1995, A&AS, 111, 347 */
187  a21 = 0.251;
188  cs12 = 6.437;
189  a32 = 2.80;
190  cs23 = MIN2(2.1,0.0450*phycon.te30*phycon.te03*phycon.te03);
191  a31 = 2.50;
192  cs13 = 1.922;
193  /* POP3(G1,G2,G3,O12,O13,O23,A21,A31,A32,E12,E23,P2,ABUND,GAM2) */
194  p3 = atom_pop3(9.,5.,1.,cs12,cs13,cs23,a21,a31,a32,2.24e4,3.11e4,&pop2,
195  dense.xIonDense[ipCHLORINE][2],0.,0.,0.);
196  /* whole 2-1 transition */
197  CoolHeavy.c8047 = pop2*a21*2.48e-12;
198  CoolAdd("Cl 4",8047,CoolHeavy.c8047);
200  /* 3-1 transition */
201  CoolHeavy.c3119 = p3*a31*6.38e-12;
202  CoolAdd("Cl 4",3119,CoolHeavy.c3119);
203  /* 3-2 transition */
204  CoolHeavy.c5324 = p3*a32*3.74e-12;
205  CoolAdd("Cl 4",5324,CoolHeavy.c5324);
206 
207  /* [Cl IV] fine structure lines, 20.354, 11.741 microns */
208  cs = MIN2(2.7,6.637/(phycon.te10*phycon.te03*phycon.te01));
209  cs = MAX2(1.6,cs);
210  PutCS(cs,TauLines[ipCl04203]);
211 
212  cs = MIN2(8.0,15.65/phycon.te10);
213  PutCS(cs,TauLines[ipCl04117]);
214 
215  cs = MIN2(2.0,5.805/(phycon.te10*phycon.te03));
216  PutCS(cs,*TauDummy);
217 
218  /* atom_level3( t10,t21,t20) */
219  atom_level3(TauLines[ipCl04203],TauLines[ipCl04117],*TauDummy);
220 
221  /* fixit - add Cl V 6.71 micron using cs from
222  * >>refer cl5 cs Saraph, H.E., & Storey, P.J., 1999, A&AS, 134, 369 */
223 
224  /* [Cl IX] 7335 A,
225  * >>referold cl9 as Saraph, H.E. & Tully, J.A. 1994, A&AS, 107, 29 */
226  /* >>refer cl9 as Berrington,K.A.,Saraph, H.E. & Tully, J.A. 1998, A&AS, 129, 161 */
227  /*>>chng 06 jul 18 Changes made-Humeshkar Nemala*/
228  if(phycon.te < 2.03E5)
229  {
230  cs = (realnum)(0.1175*phycon.te07*phycon.te004*phycon.te0001);
231  }
232  else if(phycon.te < 5.11E5)
233  {
234  cs = (realnum)((60.7989E-02)/(phycon.te05*phycon.te01*phycon.te0004));
235  }
236  else if(phycon.te < 1.284E6)
237  {
238  cs = (realnum)(0.274857);
239  }
240  else
241  {
242  cs = (realnum)(27.327963/(phycon.te30*phycon.te02*phycon.te007));
243  }
244  /*PutCS(0.28,TauLines[ipCl973]);*/
245  PutCS(cs,TauLines[ipCl973]);
246  atom_level2(TauLines[ipCl973]);
247 
248  return;
249 }
void CoolAdd(const char *chLabel, realnum lambda, double cool)
Definition: cool_etc.cpp:13
#define MIN2
Definition: cddefines.h:765
double te007
Definition: phycon.h:48
t_thermal thermal
Definition: thermal.cpp:5
double te03
Definition: phycon.h:48
TransitionProxy::iterator TauDummy
Definition: taulines.cpp:60
void CoolChlo(void)
Definition: cool_chlo.cpp:14
double c3679
Definition: coolheavy.h:9
double atom_pop3(double g1, double g2, double g3, double o12, double o13, double o23, double a21, double a31, double a32, double Tex12, double Tex23, realnum *pop2, double abund, double gam2, double r12, double r13)
Definition: atom_pop3.cpp:10
const int ipCHLORINE
Definition: cddefines.h:325
#define MAX2
Definition: cddefines.h:786
double te02
Definition: phycon.h:48
long ipCl1_11m
t_phycon phycon
Definition: phycon.cpp:6
double Cl8504
Definition: coolheavy.h:9
t_dense dense
Definition: dense.cpp:24
t_CoolHeavy CoolHeavy
Definition: coolheavy.cpp:5
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:125
double c5324
Definition: coolheavy.h:9
double te004
Definition: phycon.h:48
double te07
Definition: phycon.h:48
long ipCl04117
double te01
Definition: phycon.h:48
long ipfsCl214
void PutCS(double cs, const TransitionProxy &t)
Definition: transition.cpp:317
double Cl8436
Definition: coolheavy.h:9
double te0004
Definition: phycon.h:48
void atom_pop5(const double g[], const double EnerWN[], double cs12, double cs13, double cs14, double cs15, double cs23, double cs24, double cs25, double cs34, double cs35, double cs45, double a21, double a31, double a41, double a51, double a32, double a42, double a52, double a43, double a53, double a54, double p[], realnum abund, double *Cooling, double *CoolingDeriv, double pump01, double pump02, double pump03, double pump04)
Definition: atom_pop5.cpp:13
double Cl8552
Definition: coolheavy.h:9
float realnum
Definition: cddefines.h:107
double c5525
Definition: coolheavy.h:9
long ipCl973
void atom_level3(const TransitionProxy &t10, const TransitionProxy &t21, const TransitionProxy &t20)
Definition: atom_level3.cpp:15
double c3119
Definition: coolheavy.h:9
double Cl3354
Definition: coolheavy.h:9
double te05
Definition: phycon.h:48
double c8579
Definition: coolheavy.h:9
long ipfsCl233
double c8494
Definition: coolheavy.h:9
double te0001
Definition: phycon.h:48
TransitionList TauLines("TauLines",&AnonStates)
double c6164
Definition: coolheavy.h:9
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:688
void atom_level2(const TransitionProxy &t)
Definition: atom_level2.cpp:17
double te10
Definition: phycon.h:48
double Cl5519
Definition: coolheavy.h:9
double eden
Definition: dense.h:190
double c8047
Definition: coolheavy.h:9
sys_float SDIV(sys_float x)
Definition: cddefines.h:956
double dCooldT
Definition: thermal.h:119
double halfte
Definition: thermal.h:122
void LineConvRate2CS(const TransitionProxy &t, realnum rate)
Definition: transition.cpp:521
long ipCl04203
double te
Definition: phycon.h:11
double Cl3344
Definition: coolheavy.h:9
const int ipHYDROGEN
Definition: cddefines.h:309
double te04
Definition: phycon.h:48
double c3350
Definition: coolheavy.h:9
double te30
Definition: phycon.h:48
double tsq1
Definition: thermal.h:122
double Cl8483
Definition: coolheavy.h:9
double Cl5539
Definition: coolheavy.h:9