cloudy  trunk
cool_carb.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 /*CoolCarb evaluate total cooling due to carbon */
4 #include "cddefines.h"
5 #include "physconst.h"
6 #include "embesq.h"
7 #include "phycon.h"
8 #include "taulines.h"
9 #include "dense.h"
10 #include "hmi.h"
11 #include "h2.h"
12 #include "co.h"
13 #include "ligbar.h"
14 #include "mole.h"
15 #include "thermal.h"
16 #include "colden.h"
17 #include "lines_service.h"
18 #include "atoms.h"
19 #include "carb.h"
20 #include "cooling.h"
21 
22 void CoolCarb(void)
23 {
24  double SaveAbun,
25  a21,
26  a31,
27  a32,
28  cs,
29  cs01,
30  cs02,
31  cs12,
32  cs13,
33  cs23,
34  cs2s2p,
35  cs2s3p ,
36  ortho_frac ,
37  popup,
38  popratio;
39 
40  /* added to implement Peter van Hoof additions for new ground term
41  * atomic collision data */
42  double cse01,
43  cse12,
44  cse02,
45  csh01,
46  csh12,
47  csh02,
48  csp01,
49  csp12,
50  csp02,
51  csh201,
52  csh212,
53  csh202 ,
54  csh2p01,
55  csh2p12,
56  csh2p02,
57  csh2o01,
58  csh2o12,
59  csh2o02,
60  temp;
61  double cs_c2_h12=-1.;
62  realnum pciexc;
63  int i;
64 
65  DEBUG_ENTRY( "CoolCarb()" );
66 
67  (*TauDummy).Zero();
68  (*(*TauDummy).Hi()).g() = 0.;
69  (*(*TauDummy).Lo()).g() = 0.;
70  (*(*TauDummy).Hi()).IonStg() = 0;
71  (*(*TauDummy).Lo()).IonStg() = 0;
72  (*(*TauDummy).Hi()).nelem() = 0;
73  (*(*TauDummy).Lo()).nelem() = 0;
74  (*TauDummy).Emis().Aul() = 0.;
75  (*TauDummy).EnergyWN() = 0.;
76  (*TauDummy).WLAng() = 0.;
77 
78  /* subroutine atom_level3( t10,t21,t20)
79  *
80  * Carbon cooling
81  *
82  * C I 1656, collision strength from transition prob */
83  /*PutCS(7.3,t1656);
84  atom_level2(t1656);*/
85  PutCS(7.3, TauLines[ipT1656] );
87 
88  /* C I fine structure lines data originally from
89  * >>refer C1 CS Tielens, A. G. G., & Hollenbach, D. 1985, ApJ, 291, 722
90  * >>chng 99 jun 01, to more recent ground term collision data
91  * by Peter van Hoof */
92 
93  /* effective collision strength of C I(3P) with e
94  * >>refer C1 CS Johnson, C. T., Burke, P. G., & Kingston, A. E. 1987, J. Phys. B, 20, 2553
95  * these data are valid for 7.5K <= Te <= 10,000K*/
96  if( phycon.te<=3.0e3 )
97  {
98  /* the first fit is valid for 10K <= Te <= 300K,
99  * the second 300K <= Te <= 3000K*/
100  cse01 = MAX2(4.80E-06*phycon.te*phycon.te20/phycon.te03,
101  8.24E-07*phycon.te32/phycon.te01);
102 
103  cse12 = MAX2(7.67E-05*phycon.te/phycon.te10/phycon.te03,
104  1.47E-06*phycon.te32*phycon.te10/phycon.te03);
105 
106  cse02 = MAX2(4.72E-05*phycon.te70*phycon.te03,
107  3.05E-07*phycon.te32*phycon.te10);
108  }
109  else
110  {
111  /* the first fit is valid for 300K <= Te <= 3000K,
112  * the second up to 10,000K */
113  cse01 = MIN2(8.24E-07*phycon.te32/phycon.te01,
114  0.0035*phycon.sqrte*phycon.te01);
115 
116  cse12 = MIN2(1.47E-06*phycon.te32*phycon.te10/phycon.te03,
118 
119  cse02 = MIN2(3.05E-07*phycon.te32*phycon.te10,
121  }
122 
123  /* >>chng 04 nov 24, upper limit of 1000K is too low - for low Z DLA clouds we need
124  * C^0 populations at higher temperature - these are simple power laws - extrapolate them
125  * to 3x too high a temp */
126  /* rate coefficients for collisional de-excitation of C I(3P) with neutral H(2S1/2)
127  * >>refer C1 CS Launay, J. M. & Roueff, E. 1977, A&A, 56, 289
128  * the first fit is for Te <= 100K, the second for Te >= 250K
129  * these data are valid for 4K <= Te <= 1000K*/
130  csh01 = MAX2(1.61e-10,5.66e-11*phycon.te20);
131 
132  /* these data are valid for 7K <= Te <= 1000K*/
133  csh12 = MAX2(1.93e-10*phycon.te05*phycon.te03,
134  5.64e-11*phycon.te30*phycon.te02);
135 
136  /* these data are valid for 10K <= Te <= 1000K*/
137  csh02 = MAX2(1.08e-10/phycon.te03,
138  1.67e-11*phycon.te30*phycon.te02*phycon.te02);
139 
140  /* >>chng 05 may 23, collisional de-excitations rate co-efficients (cm3s-1) of C I by proton*/
141  /*>>refer C1 CS Roueff, E. & Le Bourlot, J. 1990, A&A, 236, 515
142  * upward rates are given for 100 to 20,000K*/
143  /* csp01 starts increasing below 25 K, but csp02 and csp12 behave properly*/
144  if( phycon.te < 25. )
145  temp = 25.;
146  else if( phycon.te >20000. )
147  temp = 20000.;
148  else
149  temp = phycon.te;
150  csp01 = 1e-9*pow2(4.3671821 - 14.39018/log(temp))*(1./3.)*exp(16.4*T1CM/temp);
151  csp12 = 1e-9*exp(3.2823932 - 60.99754*(log(temp)/temp))*(1./5.)*exp(37.1*T1CM/temp);
152  csp02 = 1e-9/(0.033932579+ (1503.4042/pow(temp,1.5)))*(3./5.)*exp(43.5*T1CM/temp);
153 
154  /* >>chng 05 feb 03, this logic had set H2 collisions to zero when
155  * temperature was > 1.2e3. this is unphysical. change to use
156  * 1200K collision rate at all higher temperatures. this is a constant
157  * rate, and the original paper suggested that the rate was fairly
158  * constant at higher tabulated temperatures
159  if( phycon.te<=1.2e3 )*/
160  /* >>chng 04 mar 15, use explicit ortho-para densities */
161  ortho_frac = h2.ortho_density/SDIV(hmi.H2_total);
162 
163  /* rate coefficients for collisional de-excitation of C I(3P) with H2(J=1,0)
164  * >>refer C1 CS Schroeder, K., et al. 1991, J. Phys.B, 24, 2487
165  * these data are valid for 10K <= Te <= 1200K
166  * the first entry is contribution from ortho H2, the second para H2.*/
167  if( phycon.te<=30. )
168  {
169  csh2p01 = MIN2(8.38E-11*phycon.te05*phycon.te01,
170  2.12e-10/phycon.te20/phycon.te05/phycon.te01);
171 
172  csh2o01 = MIN2(5.17E-11*phycon.te10*phycon.te05,
173  1.07e-10/phycon.te10*phycon.te01);
174  }
175  else if( phycon.te<=150. )
176  {
177  csh2p01 = MAX2(6.60e-11,
178  2.12e-10/phycon.te20/phycon.te05/phycon.te01);
179 
180  csh2o01 = MAX2(7.10e-11,
181  1.07e-10/phycon.te10*phycon.te01);
182  }
183  else
184  {
185  /* this is high temperature branch - increasing function of T,
186  * so hits cap set by min */
187  csh2p01 = MAX2(6.60e-11,3.38e-11*phycon.te10*phycon.te03);
188  csh2p01 = MIN2(8.10e-11,csh2p01);
189 
190  csh2o01 = MAX2(7.1e-11,3.37e-11*phycon.te10*phycon.te02*phycon.te02);
191  csh2o01 = MIN2(8.57e-11,csh2o01);
192  }
193 
194  /* use computed ortho and para H2 densities to get total collision rate */
195  csh201 = ortho_frac*csh2o01 + (1.-ortho_frac)*csh2p01;
196  if( phycon.te<=30. )
197  {
198  csh2p12 = MIN2(1.48E-10*phycon.te05*phycon.te02,
199  2.25e-10/phycon.te03/phycon.te03);
200  }
201  else if( phycon.te <= 100. )
202  {
203  csh2p12 = MAX2(1.75e-10,
204  2.25e-10/phycon.te03/phycon.te03);
205  }
206  else
207  {
208  csh2p12 = MAX2(1.75e-10,6.23e-11*phycon.te20*phycon.te01);
209  csh2p12 = MIN2(2.61e-10,csh2p12);
210  }
211 
212  csh2o12 = MIN2(2.83e-10,4.46e-11*phycon.te30/phycon.te03);
213  {
214  /*csh212 = 0.75*csh2o12 + 0.25*csh2p12;*/
215  csh212 = ortho_frac*csh2o12 + (1.-ortho_frac)*csh2p12;
216  }
217 
218  if( phycon.te<=30 )
219  {
220  csh2p02 = MIN2(8.67E-11*phycon.te02*phycon.te02,
221  1.35e-10/phycon.te10);
222  }
223  else if( phycon.te<=150. )
224  {
225  csh2p02 = MAX2(8.40e-11,
226  1.35e-10/phycon.te10);
227  }
228  else
229  {
230  csh2p02 = MAX2(8.4e-11,4.04e-11*phycon.te10*phycon.te02*phycon.te02);
231  csh2p02 = MIN2(1.04e-10,csh2p02);
232  }
233 
234  csh2o02 = MIN2(1.11e-10,3.16e-11*phycon.te20/phycon.te02);
235  /*csh202 = 0.75*csh2o02 + 0.25*csh2p02;*/
236  csh202 = ortho_frac*csh2o02 + (1.-ortho_frac)*csh2p02;
237 
240  /* assume CS for He^0 is the same as H^0*/
241  /*cs01 = cse01 + 3.*(csh01*(dense.xIonDense[ipHYDROGEN][0]+dense.xIonDense[ipHELIUM][0]) + csh201*findspecieslocal("H2")->den)/dense.cdsqte;
242  cs12 = cse12 + 5.*(csh12*(dense.xIonDense[ipHYDROGEN][0]+dense.xIonDense[ipHELIUM][0]) + csh212*findspecieslocal("H2")->den)/dense.cdsqte;
243  cs02 = cse02 + 5.*(csh02*(dense.xIonDense[ipHYDROGEN][0]+dense.xIonDense[ipHELIUM][0]) + csh202*findspecieslocal("H2")->den)/dense.cdsqte;*/
244  cs01 = cse01 + 3.*(csh01*(dense.xIonDense[ipHYDROGEN][0]+dense.xIonDense[ipHELIUM][0]) + csp01*dense.xIonDense[ipHYDROGEN][1] + csh201*hmi.H2_total)/dense.cdsqte;
245  cs12 = cse12 + 5.*(csh12*(dense.xIonDense[ipHYDROGEN][0]+dense.xIonDense[ipHELIUM][0]) + csp12*dense.xIonDense[ipHYDROGEN][1] + csh212*hmi.H2_total)/dense.cdsqte;
246  cs02 = cse02 + 5.*(csh02*(dense.xIonDense[ipHYDROGEN][0]+dense.xIonDense[ipHELIUM][0]) + csp02*dense.xIonDense[ipHYDROGEN][1] + csh202*hmi.H2_total)/dense.cdsqte;
247 
248  PutCS( cs01 , TauLines[ipT610] );
249  PutCS( cs12 , TauLines[ipT370] );
250  PutCS( cs02 , *TauDummy );
251 
252  /* ======================================================== */
253  /* end changes 99 Jun 01, by Peter van Hoof */
254  atom_level3(
255  TauLines[ipT610],
256  TauLines[ipT370],
257  *TauDummy);
258 
259  /* now save pops to add col den in radinc */
260  for( i=0; i<3; ++i)
261  {
262  /* >>chng 02 oct 23, bug - had been C1Colden rather than C1Pops */
264  }
265 
266  /* C I 9850, 8727, A from
267  * >>refer C1 AS Mendoza, C. 1982, in IAU Symp. 103, Planetary
268  * >>refercon Nebulae, ed. D.R. Flower, (Dordrecht, Holland: D. Reidel Publishing Co.), 143 */
269  if( dense.xIonDense[ipCARBON][0] > 0. && phycon.te < 40000. )
270  {
271  cs12 = 1.156e-4*phycon.te*(1.09 - 7.5e-6*phycon.te - 2.1e-10*
272  phycon.te*phycon.te);
273  cs13 = 2.8e-3*phycon.sqrte;
274  cs23 = 2.764e-3*phycon.sqrte;
275 
276  a21 = 3.26e-4*TauLines[ipT9830].Emis().Pesc();
277  a31 = 2.73e-3;
278  a32 = 0.528*TauLines[ipT8727].Emis().Pesc();
280  carb.c8727 = atom_pop3(9.,5.,1.,cs12,cs13,cs23,a21,a31,a32,
281  1.417e4,1.255e4,&pciexc,dense.xIonDense[ipCARBON][0],0.,0.,0.)*a32*
282  2.28e-12;
283  TauLines[ipT9830].Emis().PopOpc() = dense.xIonDense[ipCARBON][0];
284  (*TauLines[ipT9830].Lo()).Pop() = dense.xIonDense[ipCARBON][0];
285  (*TauLines[ipT9830].Hi()).Pop() = 0.;
286  TauLines[ipT9830].Coll().col_str() = (realnum)cs12;
287  TauLines[ipT8727].Emis().PopOpc() = (carb.c8727/(a32*2.28e-12));
288  (*TauLines[ipT8727].Lo()).Pop() = (carb.c8727/(a32*2.28e-12));
289  (*TauLines[ipT8727].Hi()).Pop() = 0.;
290  TauLines[ipT8727].Coll().col_str() = (realnum)cs23;
291 
292  carb.c9850 = pciexc*a21*2.02e-12;
295 
296  /* C I 9850 correction for deexcitation, needed for rec line */
297  carb.r9850 = (realnum)(a21/(a21 + cs12/5.*COLL_CONST/phycon.sqrte*dense.eden));
298  }
299 
300  else
301  {
302  carb.c9850 = 0.;
303  carb.c8727 = 0.;
304  carb.r9850 = 0.;
305  TauLines[ipT9830].Emis().PopOpc() = 0.;
306  (*TauLines[ipT9830].Lo()).Pop() = 0.;
307  (*TauLines[ipT9830].Hi()).Pop() = 0.;
308  TauLines[ipT8727].Emis().PopOpc() = 0.;
309  (*TauLines[ipT8727].Lo()).Pop() = 0.;
310  (*TauLines[ipT8727].Hi()).Pop() = 0.;
311  }
312  CoolAdd("C 1",8727,carb.c8727);
313  CoolAdd("C 1",9850,carb.c9850);
314 
315  /* C II 158 micron emission, A=
316  * >>refer C2 AS Froese-Fischer, C. 1983, J. Phys. B, 16, 157
317  * CS From
318  * >>refer C2 CS Blum, R. D., & Pradhan, A. K. 1992, ApJS, 80, 425
319  * neutral collision data from
320  * >>refer C2 CS Tielens, A. G. G., & Hollenbach, D. 1985, ApJ, 291, 722
321  * >>chng 96 aug 01, better fit to cs */
322  /* following is a more recent calculation but without extensive tables */
323  /* >>refer C2 CS Wilson, N. J., & Bell, K. L. 2002, MNRAS, 337, 1027-1034 */
324  /* >>chng 03 feb 24, break apart electron and neutral hydrogen for book keeping*/
325  /*cs = MIN2(2.20,0.403*phycon.te20/phycon.te02*phycon.te001*phycon.te001) +
326  5.8e-10*phycon.te02/dense.cdsqte*4.*(dense.xIonDense[ipHYDROGEN][0] +
327  findspecieslocal("H2")->den);*/
328  /* electron collision strength */
329  cse12 = MIN2(2.20,0.403*phycon.te20/phycon.te02*phycon.te001*phycon.te001);
330 
331  /* atomic hydrogen collision strength, include H2 with same rate */
332  /* >>referold C2 CS Tielens, A. G. G., & Hollenbach, D. 1985, ApJ, 291, 722 */
333  /*cs_c2_h12 = 5.8e-10*phycon.te02/dense.cdsqte*4.*(dense.xIonDense[ipHYDROGEN][0] +
334  findspecieslocal("H2")->den);*/
335  /* >> chng 05 may 21, GS, rate with hydrogen is updated from following */
336  /* >>refer C2 CS Barinovs, G., van Hemert, M., Krems, R. & Dalgarno, A. 2005, ApJ, 620, 537 */
337  temp = MIN2(2e3, phycon.te);
338 
339  /* evaluate the rate at the temperature set above, if temperature is above 2000 K
340  * then it is evaluated at 2000K - first line is just rate as given in paper */
341  cs_c2_h12 = 1e-10*(4.4716028+ 0.69658785*pow(temp, 0.31692387));
342 
343  if(phycon.te > 2e3)
344  {
345  /* temperature is above 2000 K so extrapolate rate as a power law */
346  cs_c2_h12 *= pow(phycon.te/2e3, 0.31692387);
347  }
348 
349  /* now convert rate into equivalent cs */
350  cs_c2_h12 *= 4.*(dense.xIonDense[ipHYDROGEN][0] + findspecieslocal("H2")->den)/dense.cdsqte;
351 
352  /* >>chng 05 apr 10, make sure we have good current set of vars */
354  dense.EdenHCorr < 1e-8 );
355 
356  PutCS( cse12+cs_c2_h12 ,TauLines[ipT157]);
357 
358  /* CII 1335 all collision strengths and A'S from
359  * >>refer C2 CS Lennon, D. J., Dufton, P. L., Hibbert, A., & Kingston, A. E. 1985, ApJ, 294, 200
360  * >>refer C2 CS Blum, R. D., & Pradhan, A. K. 1992, ApJS, 80, 425 */
361  cs = MIN2(6.73,2.316*phycon.te10);
362  PutCS(cs,TauLines[ipT1335]);
364 
365  static vector< pair<TransitionList::iterator,double> > C2Pump;
366  C2Pump.reserve(32);
367 
368  /* one time initialization if first call */
369  if( C2Pump.empty() )
370  {
371  // set up level 1 pumping lines
372  pair<TransitionList::iterator,double> pp( TauLines.begin()+ipT1335, 1./6. );
373  C2Pump.push_back( pp );
374  // set up level 2 pumping lines
375  for( i=0; i < nWindLine; ++i )
376  {
377  /* don't test on nelem==ipIRON since lines on physics, not C, scale */
378  if( (*TauLine2[i].Hi()).nelem() == 6 && (*TauLine2[i].Hi()).IonStg() == 2 )
379  {
380 # if 0
381  DumpLine( &TauLine2[i] );
382 # endif
383  double branch_ratio;
384  // the branching ratios used here ignore cascades via intermediate levels
385  // usually the latter are much slower, so this should be reasonable
386  if( fp_equal( (*TauLine2[i].Hi()).g(), realnum(2.) ) )
387  branch_ratio = 2./3.; // 2S upper level
388  else if( fp_equal( (*TauLine2[i].Hi()).g(), realnum(6.) ) )
389  branch_ratio = 1./2.; // 2P upper level
390  else if( fp_equal( (*TauLine2[i].Hi()).g(), realnum(10.) ) )
391  branch_ratio = 1./6.; // 2D upper level
392  else
393  TotalInsanity();
394  pair<TransitionList::iterator,double> pp2( TauLine2.begin()+i, branch_ratio );
395  C2Pump.push_back( pp2 );
396  }
397  }
398  }
399 
400  /* now sum pump rates */
401  double pump_rate = 0.;
402  vector< pair<TransitionList::iterator,double> >::const_iterator c2p;
403  for( c2p=C2Pump.begin(); c2p != C2Pump.end(); ++c2p )
404  {
405  const TransitionProxy::iterator t = c2p->first;
406  double branch_ratio = c2p->second;
407  pump_rate += (*t).Emis().pump()*branch_ratio;
408 # if 0
409  dprintf( ioQQQ, "C II %.3e %.3e\n",
410  (*t).WLAng , (*t).Emis().pump()*branch_ratio );
411 # endif
412  }
413 
414  /*atom_level2(TauLines[ipT157]);*/
415  /*AtomSeqBoron compute cooling from 5-level boron sequence model atom */
416  /* >>refer C2 CS Blum, R. D., & Pradhan, A. K. 1992, ApJS, 80, 425
417  * >>refer C2 CS Lennon, D. J., Dufton, P. L., Hibbert, A., & Kingston, A. E. 1985, ApJ, 294, 200*/
418  /* >>refer C2 AS Nahar, S. N. 2003, ADNDT, 80, 205 */
425  0.2349 , 0.8237 , 0.8533 , 1.9818 , pump_rate , "C 2");
426 
427  /* following should be set true to print contributors */
428  enum {DEBUG_LOC=false};
429  if( DEBUG_LOC && nzone > 80 )
430  {
431  fprintf(ioQQQ,"DEBUG\t%.2f\t%.3e\t%.3e\t%.2e\t%.2e\t%.2e\t%.2e\n",
432  fnzone ,
433  phycon.te,
434  TauLines[ipT157].Coll().cool() ,
435  cse12,
436  csh12,
437  dense.eden,
439  }
440 
441  double sum = 0.;
442  /* now save pops to add col den in radinc */
443  for( i=0; i < 5; ++i )
444  {
446  sum += atoms.PopLevels[i];
447  }
448  if( dense.xIonDense[ipCARBON][1] > SMALLFLOAT )
449  ASSERT( fabs(sum-dense.xIonDense[ipCARBON][1])/dense.xIonDense[ipCARBON][1] < 1e-4 );
450 
451  /* following used for pumping - cs just made up - no real data */
452  PutCS(.1,TauLines[ipT386]);
454 
455  PutCS(.1,TauLines[ipT310]);
457 
458  PutCS(.1,TauLines[ipT291]);
460 
461  PutCS(.1,TauLines[ipT280]);
463 
464  PutCS(.1,TauLines[ipT274]);
466 
467  PutCS(.1,TauLines[ipT270]);
469 
470  /* C III 1909
471  * A for 1909 itself from
472  * >>refer C3 AS Kwong, V., Fang, Z., Gibbons, T. T., Parkinson, W. H., & Smith, P.L. 1993, ApJ, 411, 431
473  * experimental value of 121 is larger than old NS 96, cs from
474  * >>refer C3 CS Berrington, K. A., Burke, P. G., Dufton, P. L., & Kingston, A. E. 1985, At. Data Nucl. Data Tables, 33, 195
475  * AtomSeqBeryllium(CS23,CS24,CS34,tarray,A41) */
476  /* >>chng 01 sep 09, AtomSeqBeryllium will reset this to 1/3 so critical density correct */
477  /* >>refer C2 AS Nahar, S. N. 2003, ADNDT, 80, 205 */
478  cs = MIN2(1.1,2.67/phycon.te10);
479  a21 = 5.149e-3;
480  PutCS(cs,TauLines[ipT1909]);
481  /* C1909 = AtomSeqBeryllium(.96,.73,2.8 , T1909 ,5.19E-3 )
482  * A's
483  * >>refer C3 AS Fleming, J., Bell, K. L, Hibbert, A., Vaeck, N., & Godefroid, M. R. 1996, MNRAS, 279, 1289 */
484  AtomSeqBeryllium(.96,.73,2.8,TauLines[ipT1909],a21);
485  embesq.em1908 = (realnum)(atoms.PopLevels[3]*a21*1.04e-11);
486  /*DumpLine(TauLines.begin()+ipT1909);*/
487 
488  /* >>chng 02 mar 08, add 13C line - this is totally forbidden for 12C
489  * and so provides a mathod of deducing 13C/12C */
490  /* >>refer C3 13C AS Clegg, R. E. S., Storey, P. J., Walsh, J. R., & Neale, L. 1997, MNRAS, 284, 348 */
491  a21 = 6.87e-4;
492  /* this is the correction for depopulation of the P_0 level due to A21, which is no
493  * present in 12C */
494  cs = 2.8*dense.cdsqte/5.*1.667;
495  popratio = cs/(cs + a21);
496  embesq.em13C1910 = (realnum)(a21 * atoms.PopLevels[1]*popratio* 1.04e-11 / co.C12_C13_isotope_ratio);
497 
498  /* CIII 1175 excited state line
499  * following were computed by previous call to AtomSeqBeryllium */
500  /*popup = atoms.PopLevels[1] + atoms.PopLevels[2] + atoms.PopLevels[3];*/
501  popup = 0.;
503  for( i=1; i<4; ++i)
504  {
505  popup += atoms.PopLevels[i];
507  }
508 
509  SaveAbun = dense.xIonDense[ipCARBON][2];
510  dense.xIonDense[ipCARBON][2] = (realnum)popup;
511  /* cs
512  * >>refer C3 CS Berrington, K. A., Burke, P. G., Dufton, P. L., Kingston, A. E. 1985, At. Data
513  * >>refercon Nucl. Data Tables, 33, 195 */
514  cs = MIN2(30.,4.806*phycon.te10*phycon.te05/phycon.te01/phycon.te003);
515  PutCS(18.45,TauLines[ipc31175]);
517  dense.xIonDense[ipCARBON][2] = (realnum)SaveAbun;
518 
519  /* C III 977, cs from
520  * >>refer C3 CS Berrington, K. A. 1985, J. Phys. B, 18, L395 */
521  cs = MIN2(7.0,1.556*phycon.te10);
522  PutCS(cs,TauLines[ipT977]);
524 
525  /* CIV 1548, 1550 doublet
526  * >>refer C4 CS Cochrane, D. M., & McWhirter, R. W. P. 1983, PhyS, 28, 25 */
527  ligbar(
528  6,
529  TauLines[ipT1548],
530  TauLines[ipT312],
531  &cs2s2p,&cs2s3p);
532  PutCS(cs2s2p,TauLines[ipT1548]);
533  PutCS(cs2s2p*0.5,TauLines[ipT1550]);
534  PutCS(1.0,*TauDummy);
535  atom_level3(
536  TauLines[ipT1550],
537  *TauDummy,
538  TauLines[ipT1548]);
539 
540  PutCS(cs2s3p,TauLines[ipT312]);
542  return;
543 }
colden.h
thermal.h
co
t_co co
Definition: co.cpp:5
findspecieslocal
molezone * findspecieslocal(const char buf[])
Definition: mole_species.cpp:833
h2
diatomics h2("h2", 4100., &hmi.H2_total, Yan_H2_CS)
t_dense::eden
double eden
Definition: dense.h:190
t_dense::EdenHCorr
double EdenHCorr
Definition: dense.h:216
DumpLine
void DumpLine(const TransitionProxy &t)
Definition: transition.cpp:100
dense
t_dense dense
Definition: dense.cpp:24
atoms.h
t_dense::cdsqte
double cdsqte
Definition: dense.h:235
ioQQQ
FILE * ioQQQ
Definition: cddefines.cpp:7
t_phycon::te001
double te001
Definition: phycon.h:67
realnum
float realnum
Definition: cddefines.h:103
nWindLine
long nWindLine
Definition: cdinit.cpp:19
ipC2_2325
long ipC2_2325
Definition: atmdat_readin.cpp:93
ipCARBON
const int ipCARBON
Definition: cddefines.h:310
mole.h
ipT270
long ipT270
Definition: atmdat_readin.cpp:41
atom_level3
void atom_level3(const TransitionProxy &t10, const TransitionProxy &t21, const TransitionProxy &t20)
Definition: atom_level3.cpp:15
t_carb::r9850
realnum r9850
Definition: carb.h:13
t_phycon::te03
double te03
Definition: phycon.h:59
phycon
t_phycon phycon
Definition: phycon.cpp:6
t_phycon::te005
double te005
Definition: phycon.h:63
TransitionList::begin
iterator begin(void)
Definition: transition.h:305
ipT310
long ipT310
Definition: atmdat_readin.cpp:40
ProxyIterator
Definition: proxy_iterator.h:58
SDIV
sys_float SDIV(sys_float x)
Definition: cddefines.h:952
T1CM
const UNUSED double T1CM
Definition: physconst.h:167
embesq.h
ipT370
long ipT370
Definition: atmdat_readin.cpp:42
lines_service.h
CoolAdd
void CoolAdd(const char *chLabel, realnum lambda, double cool)
Definition: cool_etc.cpp:13
CoolCarb
void CoolCarb(void)
Definition: cool_carb.cpp:22
diatomics::ortho_density
double ortho_density
Definition: h2_priv.h:319
ASSERT
#define ASSERT(exp)
Definition: cddefines.h:578
t_hmi::H2_total
double H2_total
Definition: hmi.h:16
t_colden::C1Pops
realnum C1Pops[3]
Definition: colden.h:76
ipC2_2327
long ipC2_2327
Definition: atmdat_readin.cpp:93
ipHYDROGEN
const int ipHYDROGEN
Definition: cddefines.h:305
ligbar
void ligbar(long int ized, const TransitionProxy &t2s2p, const TransitionProxy &t2s3p, double *cs2s2p, double *cs2s3p)
Definition: atmdat_ligbar.cpp:11
MIN2
#define MIN2
Definition: cddefines.h:761
ipT1335
long ipT1335
Definition: atmdat_readin.cpp:38
t_colden::C3Pops
realnum C3Pops[4]
Definition: colden.h:68
ipT1656
long ipT1656
Definition: atmdat_readin.cpp:37
nzone
long int nzone
Definition: cddefines.cpp:14
t_dense::HCorrFac
realnum HCorrFac
Definition: dense.h:111
ipT9830
long ipT9830
Definition: atmdat_readin.cpp:37
carb
t_carb carb
Definition: carb.cpp:5
dense.h
AtomSeqBoron
void AtomSeqBoron(const TransitionProxy &t10, const TransitionProxy &t20, const TransitionProxy &t30, const TransitionProxy &t21, const TransitionProxy &t31, const TransitionProxy &t41, double cs40, double cs32, double cs42, double cs43, double pump_rate, const char *chLabel)
Definition: atom_seq_boron.cpp:11
t_phycon::te01
double te01
Definition: phycon.h:61
cooling.h
ipT280
long ipT280
Definition: atmdat_readin.cpp:40
cddefines.h
atoms
t_atoms atoms
Definition: atoms.cpp:5
TauDummy
TransitionProxy::iterator TauDummy
Definition: taulines.cpp:60
thermal
t_thermal thermal
Definition: thermal.cpp:5
TotalInsanity
NORETURN void TotalInsanity(void)
Definition: service.cpp:886
TauLine2
TransitionList TauLine2("TauLine2", &AnonStates)
t_phycon::te02
double te02
Definition: phycon.h:60
colden
t_colden colden
Definition: colden.cpp:5
t_carb::c8727
double c8727
Definition: carb.h:9
ipT8727
long ipT8727
Definition: atmdat_readin.cpp:38
t_carb::c9850
double c9850
Definition: carb.h:10
ipC2_2328
long ipC2_2328
Definition: atmdat_readin.cpp:93
PutCS
void PutCS(double cs, const TransitionProxy &t)
Definition: transition.cpp:317
hmi.h
MAX2
#define MAX2
Definition: cddefines.h:782
t_phycon::te30
double te30
Definition: phycon.h:53
t_embesq::em1908
realnum em1908
Definition: embesq.h:9
pow2
T pow2(T a)
Definition: cddefines.h:931
ipc31175
long ipc31175
Definition: atmdat_readin.cpp:40
ipC2_2324
long ipC2_2324
Definition: atmdat_readin.cpp:93
t_colden::C2Pops
realnum C2Pops[5]
Definition: colden.h:64
co.h
t_dense::xIonDense
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:125
TauLines
TransitionList TauLines("TauLines", &AnonStates)
ipT157
long ipT157
Definition: atmdat_readin.cpp:42
t_phycon::te003
double te003
Definition: phycon.h:65
t_phycon::te10
double te10
Definition: phycon.h:55
ipT1909
long ipT1909
Definition: atmdat_readin.cpp:38
fp_equal
bool fp_equal(sys_float x, sys_float y, int n=3)
Definition: cddefines.h:812
COLL_CONST
const UNUSED double COLL_CONST
Definition: physconst.h:229
hmi
t_hmi hmi
Definition: hmi.cpp:5
physconst.h
AtomSeqBeryllium
void AtomSeqBeryllium(double cs12, double cs13, double cs23, const TransitionProxy &t, double a30)
Definition: atom_seq_beryllium.cpp:13
ligbar.h
atom_level2
void atom_level2(const TransitionProxy &t)
Definition: atom_level2.cpp:17
t_phycon::te70
double te70
Definition: phycon.h:51
ipT977
long ipT977
Definition: atmdat_readin.cpp:39
atom_pop3
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
ipT312
long ipT312
Definition: atmdat_readin.cpp:41
t_embesq::em13C1910
realnum em13C1910
Definition: embesq.h:10
t_phycon::te20
double te20
Definition: phycon.h:54
t_co::C12_C13_isotope_ratio
realnum C12_C13_isotope_ratio
Definition: co.h:20
t_thermal::dCooldT
double dCooldT
Definition: thermal.h:119
ipHELIUM
const int ipHELIUM
Definition: cddefines.h:306
taulines.h
ipT386
long ipT386
Definition: atmdat_readin.cpp:39
dprintf
int dprintf(FILE *fp, const char *format,...)
Definition: service.cpp:1009
phycon.h
t_phycon::te32
double te32
Definition: phycon.h:49
embesq
t_embesq embesq
Definition: embesq.cpp:5
t_phycon::sqrte
double sqrte
Definition: phycon.h:48
ipC2_2329
long ipC2_2329
Definition: atmdat_readin.cpp:93
t_atoms::PopLevels
double PopLevels[LIMLEVELN+1]
Definition: atoms.h:270
t_phycon::te05
double te05
Definition: phycon.h:57
ipT274
long ipT274
Definition: atmdat_readin.cpp:41
h2.h
t_thermal::halfte
double halfte
Definition: thermal.h:123
fnzone
double fnzone
Definition: cddefines.cpp:15
molezone::den
double den
Definition: mole.h:358
t_thermal::tsq1
double tsq1
Definition: thermal.h:122
ipT1548
long ipT1548
Definition: atmdat_readin.cpp:39
t_phycon::te
double te
Definition: phycon.h:11
ipT291
long ipT291
Definition: atmdat_readin.cpp:40
carb.h
DEBUG_ENTRY
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:684
SMALLFLOAT
const realnum SMALLFLOAT
Definition: cpu.h:191
ipT610
long ipT610
Definition: atmdat_readin.cpp:41
ipT1550
long ipT1550
Definition: atmdat_readin.cpp:39
TransitionList::Emis
EmissionList & Emis()
Definition: transition.h:329
g
static double * g
Definition: species2.cpp:28