cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
prt_lines.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 /*lines main routine to put emission line intensities into line stack,
4  * calls lineset1, 2, 3, 4 */
5 /*Drive_cdLine do the drive cdLine command */
6 /*FindStrongestLineLabels find strongest lines contributing to point in continuum energy mesh, output in some save commands */
7 #include "cddefines.h"
8 #include "taulines.h"
9 #include "thermal.h"
10 #include "yield.h"
11 #include "ipoint.h"
12 #include "ionbal.h"
13 #include "cddrive.h"
14 #include "trace.h"
15 #include "prt.h"
16 #include "rt.h"
17 #include "rfield.h"
18 #include "phycon.h"
19 #include "iso.h"
20 #include "hyperfine.h"
21 #include "hydrogenic.h"
22 #include "atmdat.h"
23 #include "lines.h"
24 #include "radius.h"
25 #include "dense.h"
26 #include "lines_service.h"
27 #include "mole.h"
28 #include "oxy.h"
29 #include "continuum.h"
30 #include "fe.h"
31 
32 STATIC void Drive_cdLine( void );
33 STATIC void lines_iron_Ka();
34 
35 void lines(void)
36 {
37  long int i,
38  ipnt,
39  nelem;
40  double f2, sum;
41 
42  DEBUG_ENTRY( "lines()" );
43 
44  /* LineSave.ipass
45  * -1 - space not yet allocated - just count number of lines entered into stack
46  * 0 - first call with space allocated - must create labels and add in wavelengths
47  * +1 - later calls - just add intensity
48  */
49 
50  /* major routines used here:
51  *
52  * PutLine( tarray )
53  * this uses information in tarray to give various
54  * contributions to lines, and their intensities
55  *
56  * PutExtra( extra )
57  * extra is some extra intensity to add to the line
58  * it will go into the totl contribution put out by PutLine,
59  * and this contribution should be indicated by independent
60  * call to linadd
61  * */
62 
63  if( trace.lgTrace )
64  {
65  fprintf( ioQQQ, " lines called\n" );
66  }
67 
68  /* the drive cdline command, which checks that all lines can be pulled out by cdLine */
69  if( trace.lgDrv_cdLine && LineSave.ipass > 0 )
70  Drive_cdLine();
71 
72  /* total luminosity radiated by this model - will be compared with energy in incident
73  * continuum when calculation is complete */
75 
76  /* remember the total free-free heating */
77  fixit("need to get rid of brems_heat_total");
78  // get rid of brems_heat_total entirely (only net heating is added into stack, so use net here to avoid nonsense ratios elsewhere)
79  //thermal.FreeFreeTotHeat += CoolHeavy.brems_heat_total*radius.dVeffAper;
81 
82  /* total Compton heating - cooling */
85 
86  /* up up induced recombination cooling */
87  for( nelem=0; nelem<LIMELM; ++nelem )
88  {
90  }
91 
92  /* nsum is line pointer within large stack of line intensities */
93  LineSave.nsum = 0;
94  LineSave.nComment = 0;
95 
96  /* this is used by lindst to proportion inward and outward. should be 50% for
97  * optically thin line. putline sets this to actual value for particular line
98  * and calls lindst then rests to 50% */
99  rt.fracin = 0.5;
100 
101  /* last arg in call to lindst and linadd is info on line
102  * info is char variable indicating type of line this is
103  * 'c' cooling
104  * 'h' heating
105  * 'i' information only
106  * 'r' recombination line
107  *
108  * all components of lines are entered into the main line stack here
109  * when printing, filters exist to not print Inwd component */
110 
111  /* initialize routine that can generate pointers for forbidden lines,
112  * these are lines that are not transferred otherwise,
113  * in following routines there will be pairs of calls, first to
114  * PntForLine to get pointer, then lindst to add to stack */
115  PntForLine(0.,"FILL",&i);
116 
117  /* evaluate rec coefficient for rec lines of C, N, O
118  * some will be used in LineSet2 and then zeroed out,
119  * others left alone and used below */
121 
122  /* put in something impossible in element 0 of line stack */
123  linadd(0.f,0,"zero",'i' , "null placeholder");
124 
125  /* this is compared with true volume in final. The number can't
126  * actually be unity since this would overflow on a 32 bit machine */
127  /* integrate the volume as a sanity check */
128  linadd( 1.e-10 , 1 , "Unit" , 'i' , "unit integration placeholder");
129  static long int ipOneAng=-1;
130  if( LineSave.ipass<0 )
131  ipOneAng = ipoint( RYDLAM );
132  lindst( 1.e-10 , 1. , "UntD" , ipOneAng , 'i' , false,"unit integration placeholder");
133 
134  /* initial set of general properties */
135  lines_general();
136 
137  /* do all continua */
138  lines_continuum();
139 
140  /* information about grains */
141  lines_grains();
142 
143  /* update all satellite lines */
144  for( long nelem=ipHYDROGEN; nelem < LIMELM; ++nelem )
145  iso_satellite_update(nelem);
146 
147  /* do all hydrogenic ions */
148  lines_hydro();
149 
150  /* enter He-iso sequence lines */
151  lines_helium();
152 
153  /* next come the extra Lyman lines */
154  i = StuffComment( "extra Lyman" );
155  linadd( 0., (realnum)i , "####", 'i' ,
156  "extra Lyman lines ");
157 
158  for( long ipISO=ipH_LIKE; ipISO < NISO; ++ipISO )
159  {
160  /* loop over all iso-electronic sequences */
161  for( long nelem=ipISO; nelem < LIMELM; ++nelem )
162  {
163  if( ! dense.lgElmtOn[nelem] )
164  continue;
165  for( long ipHi=iso_sp[ipISO][nelem].numLevels_max; ipHi < iso_ctrl.nLyman_max[ipISO]; ipHi++ )
166  {
167  if (ExtraLymanLines[ipISO][nelem][ipExtraLymanLines[ipISO][nelem][ipHi]].ipCont() > 0)
168  PutLine(ExtraLymanLines[ipISO][nelem][ipExtraLymanLines[ipISO][nelem][ipHi]],
169  "extra Lyman line");
170  }
171  }
172  }
173 
174 #if 0
175  /* This is Ryan's code for dumping lots of Helium lines according to
176  * quantum number rather than wavelength, principally for comparison with Rob
177  * Bauman's code. */
178  if( iteration > 1 )
179  {
180  fprintf( ioQQQ,"ipHi\tipLo\tnu\tlu\tsu\tnl\tll\tsl\tWL\tintens\n" );
181  for( long ipHi=5; ipHi<= iso_sp[ipHE_LIKE][ipHELIUM].numLevels_local - iso_sp[ipHE_LIKE][ipHELIUM].nCollapsed_local; ipHi++ )
182  {
183  for( long ipLo=0; ipLo<ipHi; ipLo++ )
184  {
185  if( iso_sp[ipHE_LIKE][ipHELIUM].trans(ipHi,ipLo).ipCont() > 0 )
186  {
187  double relint, absint;
188 
189  if( cdLine("He 1",
190  iso_sp[ipHE_LIKE][ipHELIUM].trans(ipHi,ipLo).WLAng(),
191  &relint, &absint ) )
192  {
193  //iso_sp[ipHE_LIKE][ipHELIUM].trans(ipHi,ipLo).Hi()->chLabel
194 
195  //if( iso_sp[ipHE_LIKE][ipHELIUM].trans(ipHi,ipLo).WLAng() < 1.1E4 &&
196  // iso_sp[ipHE_LIKE][ipHELIUM].trans(ipHi,ipLo).WLAng() > 3.59E3 &&
197  // ipLo!=3 && ipLo!=4 && relint >= 0.0009 )
198  long n=iso_sp[ipHE_LIKE][ipHELIUM].st[ipHi].n();
199  long np=iso_sp[ipHE_LIKE][ipHELIUM].st[ipLo].n();
200  long l=iso_sp[ipHE_LIKE][ipHELIUM].st[ipHi].l();
201  long lp=iso_sp[ipHE_LIKE][ipHELIUM].st[ipLo].l();
202  long s=iso_sp[ipHE_LIKE][ipHELIUM].st[ipHi].S();
203  long sp=iso_sp[ipHE_LIKE][ipHELIUM].st[ipLo].S();
204  if ( ((l== lp+1 || l == lp-1) && l==n-3 && s== sp))//|| ((l == n-1) && s==sp ))
205  {
206  fprintf( ioQQQ,"lines %li\t%li\t%li\t%li\t%li\t%li\t%li\t%li\t%e\t%e\n",
207  ipHi,
208  ipLo,
209  iso_sp[ipHE_LIKE][ipHELIUM].st[ipHi].n(),
210  iso_sp[ipHE_LIKE][ipHELIUM].st[ipHi].l(),
211  iso_sp[ipHE_LIKE][ipHELIUM].st[ipHi].S(),
212  iso_sp[ipHE_LIKE][ipHELIUM].st[ipLo].n(),
213  iso_sp[ipHE_LIKE][ipHELIUM].st[ipLo].l(),
214  iso_sp[ipHE_LIKE][ipHELIUM].st[ipLo].S(),
215  iso_sp[ipHE_LIKE][ipHELIUM].trans(ipHi,ipLo).WLAng(),
216  relint );
217  }
218  }
219  }
220  }
221  }
222  }
223 #endif
224 
225  // these must come before the old level 1 or 2 lines. we now have the option
226  // to use the external database by default, or turn it off (set chianti off)
227  // and fall back to the old line treatment. When database is off those lines
228  // do not exist. But when database is on the level 1 lines are still evaluated
229  // but with the ion abundance set to zero. If the level 1 lines were entered
230  // into the stack then searches for the line with cdLine would turn up the level 1
231  // line, which would be zero.
232  // The long term goal is to have all lines be external databases & rm level 1&2 liens
233 
234  /* external database lines */
235  i = StuffComment( "database lines" );
236  linadd( 0., (realnum)i , "####", 'i' ,
237  "database lines ");
238  for (int ipSpecies=0; ipSpecies < nSpecies; ++ipSpecies)
239  {
240  for( EmissionList::iterator em=dBaseTrans[ipSpecies].Emis().begin();
241  em != dBaseTrans[ipSpecies].Emis().end(); ++em)
242  {
243  if( (*em).Tran().ipCont() > 0)
244  {
245  /* Set the comment to the database name followed by the
246  * lower and upper indices of the transition energy levels
247  * as they appear in the database input file. */
248  string chComment = "";
249  if( LineSave.ipass == 0 )
250  {
251  chComment = dBaseSpecies[ipSpecies].database
252  + ", " + (*em).Tran().getComment();
253  }
254  PutLine((*em).Tran(), chComment.c_str(), dBaseSpecies[ipSpecies].chLabel);
255  }
256  }
257  }
258 
259  /* level 1 lines */
260  ipnt = StuffComment( "level 1 lines" );
261  linadd( 0., (realnum)ipnt , "####", 'i',
262  " start level 1 lines" );
263 
264  /* do iron Ka */
265  lines_iron_Ka();
266 
267  /* next come some recombination lines */
268  i = StuffComment( "recombination" );
269  linadd( 0., (realnum)i , "####", 'i' ,
270  "recombination lines");
271 
272  /***********************************************************************
273  * large number of C, N, and O recombination lines *
274  *************************************************************************/
275 
276  for( i=0; i < NRECCOEFCNO; i++ )
277  {
278  string chLabel;
279  /* generate label for the line if ipass is -1 or 0 - saved in arrays
280  * so no need to do this during production */
281  if( LineSave.ipass <= 0 )
282  {
283  chLabel = chIonLbl( LineSave.RecCoefCNO[0][i], long(LineSave.RecCoefCNO[0][i]-LineSave.RecCoefCNO[1][i]+1.01) );
284  }
285  else
286  chLabel = " ";
287 
288  /* number of rec per unit vol
289  * do not predict these simple reccombination intensities at high densities
290  * since lines neglect collisional deexciation and line optical depth effects.
291  * They were not intended for high densities or column densities.
292  * As a result they become unphysically bright at high densities and
293  * violate the black body limit. There would be major
294  * energy conservation problems if they were added in the outward beam in
295  * dense simulations.
296  * */
297  if( dense.eden < 1e8 )
298  {
299  nelem = (long)LineSave.RecCoefCNO[0][i]-1;
300  long int ion = (long)(LineSave.RecCoefCNO[0][i]-LineSave.RecCoefCNO[1][i]+2)-1;
301  f2 = LineSave.RecCoefCNO[3][i]*dense.eden*
302  dense.xIonDense[nelem][ion];
303 
304  /* convert to intensity */
305  f2 = f2*HC_ERG_ANG/LineSave.RecCoefCNO[2][i];
306  }
307  else
308  {
309  f2 = 0.;
310  }
311  /* stuff it into the stack */
312  PntForLine(LineSave.RecCoefCNO[2][i], chLabel.c_str(), &ipnt);
313  lindst(f2,wlAirVac(LineSave.RecCoefCNO[2][i]), chLabel.c_str(), ipnt, 'r', true,
314  "recombination line");
315  }
316 
317  /* next come the atom_level2 lines */
318  i = StuffComment( "level2 lines" );
319  linadd( 0., (realnum)i , "####", 'i' ,
320  "level2 lines");
321 
322  /* add in all the other level 2 wind lines
323  * Dima's 6k lines */
324  double ExtraCool = 0.;
325  double BigstExtra = 0.;
326  for( i=0; i < nWindLine; i++ )
327  {
328  if( (*TauLine2[i].Hi()).IonStg() < (*TauLine2[i].Hi()).nelem()+1-NISO )
329  {
330  PutLine(TauLine2[i],"level 2 line");
331  if( TauLine2[i].Coll().cool() > BigstExtra )
332  {
333  BigstExtra = TauLine2[i].Coll().cool();
334  thermal.ipMaxExtra = i+1;
335  }
336  ExtraCool += TauLine2[i].Coll().cool();
337  }
338  }
339  /* keep track of how important this is */
341 
342  /* next come the hyperfine structure lines */
343  i = StuffComment( "hyperfine structure" );
344  linadd( 0., (realnum)i , "####", 'i' ,
345  "hyperfine structure lines ");
346 
347  /* this is total cooling due to all HF lines */
348  linadd( hyperfine.cooling_total, 0., "hfin", 'i' ,
349  "total cooling all hyperfine structure lines ");
350 
351  /* remember largest local cooling for possible printout in comments */
353 
354  /* the hyperfine lines */
355  for( size_t ih=0; ih < HFLines.size(); ih++ )
356  {
357  PutLine(HFLines[ih],
358  "hyperfine structure line");
359  }
360 
361  /* next come the inner shell fluorescent lines */
362  i = StuffComment( "inner shell" );
363  linadd( 0., (realnum)i , "####", 'i' ,
364  "inner shell lines");
365 
366  // Opacity Project satellite lines from data / UTA
367  // the heat component of these lines is the heat per pump, a constant
368  for( size_t i=0; i < UTALines.size(); i++ )
369  {
370  PutLine(UTALines[i], "OP satellite");
371  }
372 
373  /* the group of inner shell fluorescent lines
374  * >>refer all auger Kaastra, J. S. & Mewe, R. 1993, A&AS, 97, 443-482
375  * http://adsabs.harvard.edu/abs/1993A%26AS...97..443K */
376  for( i=0; i < t_yield::Inst().nlines(); ++i )
377  {
378  double xInten =
379  /* density of parent ion, cm-3 */
381  /* photo rate per atom per second, s-1 */
383  /* fluor yield - dimensionless */
384  t_yield::Inst().yield(i) *
385  /* photon energy - ryd, converted into ergs */
386  t_yield::Inst().energy(i) * EN1RYD;
387 
388  /* create label if initializing line stack */
389  string chLabel;
390  if( LineSave.ipass == 0 )
391  {
392  chLabel = chIonLbl( t_yield::Inst().nelem(i)+1, t_yield::Inst().ion_emit(i)+1 );
393 # if 0
394  /* only print yields for atoms */
395  if( t_yield::Inst().ion(i) == 0 && t_yield::Inst().nelem()(i) == ipIRON )
396  fprintf(ioQQQ,"DEBUGyeild\t%s\t%.3f\t%.3e\n",
397  /* line designation, energy in eV, yield */
398  chLabel.c_str() , t_yield::Inst().energy()(i)*EVRYD, t_yield::Inst().yield(i) );
399 # endif
400  }
401 
402  /* the group of inner shell fluorescent lines */
403  lindst(
404  /* intensity of line */
405  xInten,
406  /* wavelength of line in Angstroms */
407  (realnum)RYDLAM / t_yield::Inst().energy(i),
408  /* label */
409  chLabel.c_str() ,
410  /* continuum array offset for line as set in ipoint */
411  t_yield::Inst().ipoint(i),
412  /* type of line - count as a recombination line */
413  'r',
414  /* include line in continuum? */
415  true ,
416  "inner shell line");
417  }
418 
419  /* now do all molecules - do last since so many H2 lines */
420  lines_molecules();
421 
424 
425 
426  /* blends of other lines */
427  i = StuffComment( "blends" );
428 
429  // Enable alternative, hopefully less fragile, route for defining static blends
430  const bool lgBandBlends = false;
431 
432  linadd( 0., (realnum)i , "####", 'i' , "blends ");
433 
434  /**************Oxygen Blends *********************/
435  LinSv *lineO1_8446 = linadd(0.0,8446,"Blnd",'i',"Blend" );
436  LinSv *lineO1_1304 = linadd(0.0,1304,"Blnd",'i',"Blend" );
437  LinSv *lineO1_1039 = linadd(0.0,1039,"Blnd",'i',"Blend" );
438  LinSv *lineO1_4368 = linadd(0.0,4368,"Blnd",'i',"Blend" );
439  LinSv *lineO1_13100 = linadd(0.0,13100,"Blnd",'i',"Blend" );
440  LinSv *lineO1_11300 = linadd(0.0,11300,"Blnd",'i',"Blend" );
441  LinSv *lineO1_29000 = linadd(0.0,29000,"Blnd",'i',"Blend" );
442  LinSv *lineO1_46000 = linadd(0.0,46000,"Blnd",'i',"Blend" );
444  {
445  // these are the equivalents of the 6lev lines in c13 and before
446 
447  // 2s2.2p3.(4So).3s.(3So) - 2s2.2p3.(4So).3p.(3P)
448  lineO1_8446->addComponent("O 1",8446.25);
449  lineO1_8446->addComponent("O 1",8446.36);
450  lineO1_8446->addComponent("O 1",8446.76);
451 
452  // 2s2.2p4.(3P) - 2s2.2p3.(4So).3s.(3So)
453  lineO1_1304->addComponent("O 1",1302.17);
454  lineO1_1304->addComponent("O 1",1304.86);
455  lineO1_1304->addComponent("O 1",1306.03);
456 
457  // 2s2.2p4.(3P) - 2s2.2p3.(4So).4s.(3So)
458  lineO1_1039->addComponent("O 1",1039.23);
459  lineO1_1039->addComponent("O 1",1040.94);
460  lineO1_1039->addComponent("O 1",1041.69);
461 
462  // 2s2.2p3.(4So).3s.(3So) - 2s2.2p3.(4So).4p.(3P)
463  lineO1_4368->addComponent("O 1",4368.19);
464  lineO1_4368->addComponent("O 1",4368.24);
465  lineO1_4368->addComponent("O 1",4368.26);
466 
467  // 2s2.2p3.(4So).3p.(3P) - 2s2.2p3.(4So).4s.(3So)
468  lineO1_13100->addComponent("O 1",13163.9);
469  lineO1_13100->addComponent("O 1",13164.9);
470  lineO1_13100->addComponent("O 1",13165.1);
471 
472  // 2s2.2p3.(4So).3p.(3P) - 2s2.2p3.(4So).3d.(3Do)
473  lineO1_11300->addComponent("O 1",11286.3);
474  lineO1_11300->addComponent("O 1",11286.4);
475  lineO1_11300->addComponent("O 1",11286.9);
476  lineO1_11300->addComponent("O 1",11287.0);
477  lineO1_11300->addComponent("O 1",11287.1);
478  lineO1_11300->addComponent("O 1",11287.3);
479 
480  // 2s2.2p3.(4So).4s.(3So) - 2s2.2p3.(4So).4p.(3P)
481  lineO1_29000->addComponent("O 1",28925.1);
482  lineO1_29000->addComponent("O 1",28927.3);
483  lineO1_29000->addComponent("O 1",28928.0);
484 
485  // 2s2.2p3.(4So).3d.(3Do) - 2s2.2p3.(4So).4p.(3P)
486  lineO1_46000->addComponent("O 1",45588.6);
487  lineO1_46000->addComponent("O 1",45594.0);
488  lineO1_46000->addComponent("O 1",45595.5);
489  lineO1_46000->addComponent("O 1",45595.7);
490  lineO1_46000->addComponent("O 1",45597.2);
491  lineO1_46000->addComponent("O 1",45597.4);
492  }
493 
494  /*************Magnesium Blends *******************/
495  LinSv *lineMg2 = linadd(0.0,2798,"Blnd",'i',"Blend" );
497  {
498  if (lgBandBlends)
499  {
500  lineMg2->makeBlend("Mg 2",2798.0,10.0);
501  }
502  else
503  {
504  lineMg2->addComponent("Mg 2",2795.53);
505  lineMg2->addComponent("Mg 2",2802.71);
506  }
507  }
508 
509  LinSv *lineMg10 = linadd(0.0,615,"Blnd",'i',"Blend" );
511  {
512  if (lgBandBlends)
513  {
514  lineMg10->makeBlend("Mg10",615.0,15.0);
515  }
516  else
517  {
518  lineMg10->addComponent("Mg10",609.794);
519  lineMg10->addComponent("Mg10",624.943);
520  }
521  }
522 
523  LinSv *lineS2Red = linadd(0.0,6720,"Blnd",'i',"Blend" );
525  {
526  if (lgBandBlends)
527  {
528  lineS2Red->makeBlend("S 2",6720.0,15.0);
529  }
530  else
531  {
532  lineS2Red->addComponent("S 2",6730.82);
533  lineS2Red->addComponent("S 2",6716.44);
534  }
535  }
536 
537  LinSv *lineS2Blue = linadd(0.0,4074,"Blnd",'i',"Blend" );
539  {
540  if (lgBandBlends)
541  {
542  lineS2Blue->makeBlend("S 2",4074.0,10.0);
543  }
544  else
545  {
546  lineS2Blue->addComponent("S 2",4076.35);
547  lineS2Blue->addComponent("S 2",4068.60);
548  }
549  }
550 
551  LinSv *lineS2IR = linadd(0.0,10330,"Blnd",'i',"Blend" );
553  {
554  if (lgBandBlends)
555  {
556  lineS2IR->makeBlend("S 2",10330.0,80.0);
557  }
558  else
559  {
560  lineS2IR->addComponent("S 2",10336.4);
561  lineS2IR->addComponent("S 2",10286.7);
562  lineS2IR->addComponent("S 2",10286.7);
563  lineS2IR->addComponent("S 2",10320.5);
564  }
565  }
566 
567  LinSv *lineS2UV = linadd(0.0,1256,"Blnd",'i',"Blend" );
569  {
570  if (lgBandBlends)
571  {
572  lineS2UV->makeBlend("S 2",1256.0,10.0);
573  }
574  else
575  {
576  lineS2UV->addComponent("S 2",1250.58);
577  lineS2UV->addComponent("S 2",1253.81);
578  lineS2UV->addComponent("S 2",1259.52);
579  }
580  }
581 
582  LinSv *lineS31198 = linadd(0.0,1198,"Blnd",'i',"Blend" );
584  {
585  if (lgBandBlends)
586  {
587  lineS31198->makeBlend("S 3",1198.0,10.0);
588  }
589  else
590  {
591  lineS31198->addComponent("S 3",1190.20);
592  lineS31198->addComponent("S 3",1194.06);
593  lineS31198->addComponent("S 3",1194.45);
594  lineS31198->addComponent("S 3",1200.97);
595  lineS31198->addComponent("S 3",1201.73);
596  lineS31198->addComponent("S 3",1202.12);
597  }
598  }
599 
600  LinSv *lineS31720 = linadd(0.0,1720,"Blnd",'i',"Blend" );
602  {
603  if (lgBandBlends)
604  {
605  lineS31720->makeBlend("S 3",1720.0,20.0);
606  }
607  else
608  {
609  lineS31720->addComponent("S 3",1704.39);
610  lineS31720->addComponent("S 3",1713.11);
611  lineS31720->addComponent("S 3",1728.94);
612  }
613  }
614 
615  LinSv *lineS33722 = linadd(0.0,3722,"Blnd",'i',"Blend" );
617  {
618  if (lgBandBlends)
619  {
620  lineS33722->makeBlend("S 3",3722.0,80.0);
621  }
622  else
623  {
624  lineS33722->addComponent("S 3",3721.63);
625  lineS33722->addComponent("S 3",3797.17);
626  }
627  }
628 
629  LinSv *lineS4UV = linadd(0.0,1406,"Blnd",'i',"Blend" );
631  {
632  if (lgBandBlends)
633  {
634  lineS4UV->makeBlend("S 4",1406.0,20.0);
635  }
636  else
637  {
638  lineS4UV->addComponent("S 4",1404.81);
639  lineS4UV->addComponent("S 4",1398.04);
640  lineS4UV->addComponent("S 4",1423.84);
641  lineS4UV->addComponent("S 4",1416.89);
642  lineS4UV->addComponent("S 4",1406.02);
643  }
644  }
645 
646  LinSv *lineS5UV = linadd(0.0,1199,"Blnd",'i',"Blend" );
648  {
649  if (lgBandBlends)
650  {
651  lineS5UV->makeBlend("S 5",1199.0,15.0);
652  }
653  else
654  {
655  lineS5UV->addComponent("S 5",1199.14);
656  lineS5UV->addComponent("S 5",1188.28);
657  }
658  }
659 
660  LinSv *lineNaD = linadd(0.0,5892,"Blnd",'i',"Blend" );
662  {
663  if (lgBandBlends)
664  {
665  lineNaD->makeBlend("Na 1",5892.0,10.0);
666  }
667  else
668  {
669  lineNaD->addComponent("Na 1",5889.95);
670  lineNaD->addComponent("Na 1",5895.92);
671  }
672  }
673 
674  LinSv *lineAl2 = linadd(0.0,2665,"Blnd",'i',"Blend" );
676  {
677  if (lgBandBlends)
678  {
679  lineAl2->makeBlend("Al 2",2665.0,10.0);
680  }
681  else
682  {
683  lineAl2->addComponent("Al 2",2669.15);
684  lineAl2->addComponent("Al 2",2660.35);
685  }
686  }
687 
688  LinSv *lineAl3 = linadd(0.0,1860,"Blnd",'i',"Blend" );
690  {
691  if (lgBandBlends)
692  {
693  lineAl3->makeBlend("Al 3",1860.0,10.0);
694  }
695  else
696  {
697  lineAl3->addComponent("Al 3",1854.72);
698  lineAl3->addComponent("Al 3",1862.79);
699  }
700  }
701 
702  LinSv *lineAl11 = linadd(0.0,556,"Blnd",'i',"Blend" );
704  {
705  if (lgBandBlends)
706  {
707  lineAl11->makeBlend("Al11",556.0,15.0);
708  }
709  else
710  {
711  lineAl11->addComponent("Al11",550.032);
712  lineAl11->addComponent("Al11",568.122);
713  }
714  }
715 
716  LinSv *lineAr4One = linadd(0.0,4725,"Blnd",'i',"Blend" );
718  {
719  if (lgBandBlends)
720  {
721  lineAr4One->makeBlend("Ar 4",4725.0,20.0);
722  }
723  else
724  {
725  lineAr4One ->addComponent("Ar 4",4740.12);
726  lineAr4One ->addComponent("Ar 4",4711.26);
727  }
728  }
729 
730  LinSv *lineAr4Two = linadd(0.0,2860,"Blnd",'i',"Blend" );
732  {
733  if (lgBandBlends)
734  {
735  lineAr4Two->makeBlend("Ar 4",2860.0,10.0);
736  }
737  else
738  {
739  lineAr4Two ->addComponent("Ar 4",2868.22);
740  lineAr4Two ->addComponent("Ar 4",2853.66);
741  }
742  }
743 
744  LinSv *lineAr4Three = linadd(0.0,7250,"Blnd",'i',"Blend" );
746  {
747  if (lgBandBlends)
748  {
749  lineAr4Three->makeBlend("Ar 4",7250.0,100.0);
750  }
751  else
752  {
753  lineAr4Three ->addComponent("Ar 4",7237.77);
754  lineAr4Three ->addComponent("Ar 4",7332.15);
755  lineAr4Three ->addComponent("Ar 4",7170.70);
756  lineAr4Three ->addComponent("Ar 4",7263.33);
757  }
758  }
759 
760  LinSv *lineSiII = linadd(0.0,2335,"Blnd",'i',"Blend" );
762  {
763  lineSiII->addComponent("Si 2",2334.41);
764  lineSiII->addComponent("Si 2",2328.52);
765  lineSiII->addComponent("Si 2",2350.17);
766  lineSiII->addComponent("Si 2",2344.20);
767  lineSiII->addComponent("Si 2",2334.60);
768  }
769 
770  LinSv *lineSiIII = linadd(0.0,1888,"Blnd",'i',"Blend" );
772  {
773  lineSiIII->addComponent("Si 3",1882.71);
774  lineSiIII->addComponent("Si 3",1892.03);
775  }
776 
777  LinSv *lineSiIV = linadd(0.0,1397,"Blnd",'i',"Blend" );
779  {
780  lineSiIV->addComponent("Si 4",1393.75);
781  lineSiIV->addComponent("Si 4",1402.77);
782  }
783 
784  LinSv *lineNeIV = linadd(0.0, 2424, "Blnd", 'i', "Blend");
786  {
787  lineNeIV->addComponent("Ne 4", 2421.66);
788  lineNeIV->addComponent("Ne 4", 2424.28);
789  }
790 
791  LinSv *lineNeIV4720 = linadd(0.0,4720,"Blnd",'i',"Blend" );
793  {
794  lineNeIV4720->addComponent("Ne 4", 4714.23);
795  lineNeIV4720->addComponent("Ne 4", 4715.64);
796  lineNeIV4720->addComponent("Ne 4", 4724.17);
797  lineNeIV4720->addComponent("Ne 4", 4725.58);
798  }
799 
800  LinSv *lineNeVII = linadd(0.0,895,"Blnd",'i',"Blend" );
802  {
803  lineNeVII->addComponent("Ne 7",887.279);
804  lineNeVII->addComponent("Ne 7",895.174);
805  }
806 
807  LinSv *lineNeVIII = linadd(0.0,774,"Blnd",'i',"Blend" );
809  {
810  lineNeVIII->addComponent("Ne 8",770.410);
811  lineNeVIII->addComponent("Ne 8",780.325);
812  }
813 
814  LinSv *lineClIIIa = linadd(0.0,3350,"Blnd",'i',"Blend" );
816  {
817  lineClIIIa->addComponent("Cl 3",3342.80);
818  lineClIIIa->addComponent("Cl 3",3353.17);
819  }
820 
821  LinSv *lineClIIIb = linadd(0.0,5525,"Blnd",'i',"Blend" );
823  {
824  lineClIIIb->addComponent("Cl 3",5517.71);
825  lineClIIIb->addComponent("Cl 3",5537.87);
826  }
827 
828  LinSv *lineClIIIc = linadd(0.0,8494,"Blnd",'i',"Blend" );
830  {
831  lineClIIIc->addComponent("Cl 3",8433.66);
832  lineClIIIc->addComponent("Cl 3",8480.86);
833  lineClIIIc->addComponent("Cl 3",8500.01);
834  lineClIIIc->addComponent("Cl 3",8547.96);
835  }
836 
837  /*************Calcium Blends *******************/
839  {
840  double eff = dense.eden*dense.xIonDense[ipCALCIUM][2]*5.4e-21/(phycon.te/
842  PntForLine( 3933., "Ca2R", &ipnt);
843  lindst(eff, 3933., "Ca2R", ipnt, 't', false,
844  " recombination contribution to CaII emission" );
845  //LinSv *lineCa2 = linadd(0.0,3933,"Blnd",'i',"Blend" );
846 
847  LinSv *lineCaII8579 = linadd(0.0,8579,"Blnd",'i',"Blend" );
848  lineCaII8579->addComponent("Ca 2",8662.14);
849  lineCaII8579->addComponent("Ca 2",8542.09);
850  lineCaII8579->addComponent("Ca 2",8498.02);
851 
852  LinSv *lineCaII7306 = linadd(0.0,7306,"Blnd",'i',"Blend" );
853  lineCaII7306->addComponent("Ca 2",7291.47);
854  lineCaII7306->addComponent("Ca 2",7323.89);
855 
856  LinSv *lineCaII3933 = linadd(0.0,3933,"Blnd",'i',"Blend" );
857  lineCaII3933->addComponent("Ca 2",3933.66);
858  lineCaII3933->addComponent("Ca 2",3968.47);
859  }
860 
861  /*** CARBON ***/
862  /* Recombination and Pump lines */
863  double pump = 0, fac = 0;
864 
865  /* C 1 1656 */
867  {
868  LinSv *lineCIa = linadd(0.0,1657,"Blnd",'i',"Blend" );
869  lineCIa->addComponent("C 1",1656.27);
870  lineCIa->addComponent("C 1",1656.93);
871  lineCIa->addComponent("C 1",1657.01);
872  lineCIa->addComponent("C 1",1657.38);
873  lineCIa->addComponent("C 1",1657.91);
874  lineCIa->addComponent("C 1",1658.12);
875  /* >>chng 97 may 02, added better rec coefficient
876  * C I 1656 recombination, all agents */
877  double rec = LineSave.ipass <= 0 ? 0.0 :
878  GetLineRec(3,1657)*emit_frac(lineCIa->getComponent(2));
879  PntForLine( 1656., "C 1R", &ipnt);
880  lindst(rec, 1656., "C 1R", ipnt, 't', false,
881  " C 1 1656 recomb; n.b. coll deexcitation not in" );
882  lineCIa->addComponent("C 1R",1656);
883  }
884 
885  /* C 1 9850 */
887  {
888  /* >>chng 97 may 02, added better rec coefficient
889  * C 1 9850, recombination contribution rec coefficient from
890  * >>refer C1 rec Escalante, Vladimir, & Victor, G.A., 1990, ApJS 73, 513.
891  * r9850 is correction for collisional deexcitation as in carb cool
892  * >>chng 97 aug 2, had factor of rec, changed to r9850, this
893  * was a big mistake
894  * >>chng 12 nov 11 Now using Escalante 1990 data */
895  double A,B,C,t4;
896  t4 = 1e-4*phycon.te;
897  A = 3.10e-17;
898  B = 0.25;
899  C = -0.41;
900  double c19850WL = 9850.26;
901  double recCoeff = A*pow(t4,-1*B*(1+C*log10(t4)));
902 
903  double volEmis = recCoeff*dense.eden*dense.xIonDense[ipCARBON][1]*HC_ERG_ANG/c19850WL;
904  // RC*eden*xIonDense[nelem][ion]*1.99e-8/wavelength
905 
906  LinSv *lineCIb = linadd(0.0,9850,"Blnd",'i',"Blend" );
907  lineCIb->addComponent("C 1",9824.13);
908  lineCIb->addComponent("C 1",9850.26);
909  double rec = LineSave.ipass <= 0 ? 0.0 :
910  volEmis*emit_frac(lineCIb->getComponent(1)); // 9850.26
911  PntForLine( wlAirVac(9850.), "C 1R", &ipnt);
912  lindst(rec, wlAirVac(9850.), "C 1R", ipnt, 't', false,
913  " C I 9850 recombination contribution" );
914 
915  lineCIb->addComponent("C 1R",9850.);
916  }
917 
918  /* C 2 2326 */
920  {
921  linadd(ionbal.PhotoRate_Shell[ipCARBON][0][1][0]*dense.xIonDense[ipCARBON][0]*0.1*8.6e-12,wlAirVac(2326.),"C 2H",'i' ,
922  " photoproduction, Hofmann and Trefftz");
923  // see 1980A&A....82..256H, 1983A&A...126..415H
924 
925  LinSv *lineCIIb = linadd(0.0,2326,"Blnd",'i',"Blend" );
926  lineCIIb->addComponent("C 2",2324.69);
927  lineCIIb->addComponent("C 2",2323.50);
928  lineCIIb->addComponent("C 2",2328.12);
929  lineCIIb->addComponent("C 2",2326.93);
930  lineCIIb->addComponent("C 2",2325.40);
931  lineCIIb->addComponent("C 2H",2326);
932  }
933 
934  /* C 2 1335 */
936  {
937 
938  LinSv *lineCIIa = linadd(0.0,1335,"Blnd",'i',"Blend" );
939  lineCIIa->addComponent("C 2",1334.53);
940  lineCIIa->addComponent("C 2",1335.66);
941  lineCIIa->addComponent("C 2",1335.71);
942  /* >>chng 97 may 02, better rec coef */
943  /* >>chng 02 jul 01, add function to return emission probability */
944  double rec = LineSave.ipass <= 0 ? 0.0 :
945  GetLineRec(11,1335)*emit_frac(lineCIIa->getComponent(2)); // 1335.71
946  PntForLine( 1335., "C 2R", &ipnt);
947  lindst(rec, 1335., "C 2R", ipnt, 't', false,
948  " C 2 1335 recombination," );
949 
950  lineCIIa->addComponent("C 2R",1335);
951  }
952 
953  /* C 2 3920 */
955  {
956  /* the CII 3918.98/3920.68 and 6578.05/6582.88 multiplets,
957  * contributions by both continuum pumping through XUV line
958  * and recombination */
959  /* this is the driving line, pump is photons cm^-3 s^-1 */
960  if( nWindLine > 0 )
961  {
962  pump = TauLine2[186].Emis().pump()*TauLine2[186].Emis().PopOpc();
963  }
964  else
965  {
966  pump = 0.;
967  }
968 
969  // pumped 3920, count as recomb since does remove energy
970  PntForLine(3920.,"C 2P",&ipnt);
971  lindst(pump*0.387 * 5.08e-12/(1.+dense.eden/1e12) ,3920,"C 2P",ipnt,'r',true ,
972  " CII 3918.98/3920.68 is only pumped, no recombination part");
973 
974  /* convert UV pump rate to intensity with branching ratio and hnu */
975  pump *= 0.305 * 0.387 * 3.02e-12;
976 
977  linadd(pump/(1.+dense.eden/1e12),wlAirVac(6580.),"C 2P",'i',
978  " pumped part of line C II 6580" );
979 
980  LinSv *lineCIIc = linadd(0.0,6580,"Blnd",'i',"Blend" );
981  lineCIIc->addComponent("C 2",6578.05);
982  lineCIIc->addComponent("C 2",6582.88);
983  /* C 2 6580 */
984  double rec = LineSave.ipass <= 0 ? 0.0 :
985  GetLineRec(8, 6580 )*emit_frac(lineCIIc->getComponent(0));
986  PntForLine( wlAirVac(6580.), "C 2R", &ipnt);
987  lindst(rec/(1.+dense.eden/1e12), wlAirVac(6580.), "C 2R", ipnt, 't', false,
988  " recombination part of C II 6580 line " );
989  lineCIIc->addComponent("C 2R",6580);
990  lineCIIc->addComponent("C 2P",6580);
991  }
992 
993  /* C 3 977
994  * recombination contribution from nussbaumer and story 84 */
996  {
997  LinSv *lineCIIIc = linadd(0.0,977,"Blnd",'i',"Blend" );
998  lineCIIIc->addComponent("C 3",977.020);
999  /* >>chng 02 jul 01, add function to compute emission fraction */
1000  double rec = LineSave.ipass <= 0 ? 0.0 :
1001  GetLineRec(179,977)*emit_frac(lineCIIIc->getComponent(0));
1002  PntForLine( 977., "C 3R", &ipnt);
1003  lindst(rec, 977., "C 3R", ipnt, 't', false,
1004  " dielectronic recombination contribution to C 3 977 " );
1005  lineCIIIc->addComponent("C 3R",977);
1006  }
1007 
1008  /* C 3 1909 */
1010  {
1011  LinSv *lineCIII = linadd(0.0,1909,"Blnd",'i',"Blend" );
1012  lineCIII->addComponent("C 3",1908.73);
1013  lineCIII->addComponent("C 3",1906.68);
1014  /* >>chng 02 jul 01, add function to compute emission fraction */
1015  double corr = LineSave.ipass <= 0 ? 0.0 :
1016  emit_frac(lineCIII->getComponent(0)); // 1908.73
1018 
1019  PntForLine( 1909., "C 3R", &ipnt );
1020  lindst( 3.1e-19*fac*corr, 1909., "C 3R", ipnt, 't', false,
1021  " C 3 1909 recombination from Storey" );
1022 
1023  lindst(ionbal.PhotoRate_Shell[ipCARBON][1][1][0]*dense.xIonDense[ipCARBON][1]*0.62*corr*1.05e-11,1909,"C 3H",ipnt,'t',false,
1024  " C 3 1909 following relax following inner shell photoionization" );
1025  lineCIII->addComponent("C 3R",1909);
1026  lineCIII->addComponent("C 3H",1909);
1027  }
1028 
1029  /* C 3 1175 */
1031  {
1032 
1033  LinSv *lineCIIIb = linadd(0.0,1176,"Blnd",'i',"Blend" );
1034  lineCIIIb->addComponent("C 3",1174.61);
1035  lineCIIIb->addComponent("C 3",1174.93);
1036  lineCIIIb->addComponent("C 3",1175.26);
1037  lineCIIIb->addComponent("C 3",1175.59);
1038  lineCIIIb->addComponent("C 3",1175.71);
1039  lineCIIIb->addComponent("C 3",1175.99);
1040  lineCIIIb->addComponent("C 3",1176.37);
1041  lineCIIIb->addComponent("C 3",1176.77);
1042 
1043  /* >>chng 97 may 02, better rec ocef */
1044  /* >>chng 02 jul 01, add function to compute emission fraction */
1045  double rec = LineSave.ipass <= 0 ? 0.0 :
1046  GetLineRec(178,1176)*emit_frac(lineCIIIb->getComponent(4)); // 1175.71
1047  PntForLine( 1175., "C 3R", &ipnt );
1048  lindst(rec, 1175., "C 3R", ipnt, 't', false,
1049  " dielectronic recombination contribution to C 3 1175 " );
1050  lineCIIIb->addComponent("C 3R",1175);
1051  }
1052 
1053  /* C 4 1549 */
1055  {
1056  LinSv *lineCIV = linadd(0.0,1549,"Blnd",'i',"Blend" );
1057  LinSv *lineCIVInwd = linadd(0.0,1549,"Inwd",'i',"inward part of Blend" );
1058  lineCIV->addComponent("C 4",1550.78);
1059  lineCIV->addComponent("C 4",1548.19);
1060 
1061  /* recombination C 4 1549 from C 5
1062  * >>chng 97 may 02, better rec coef */
1063  /* >>chng 02 jul 01, add function to compute emission fraction */
1064  double rec = LineSave.ipass <= 0 ? 0.0 :
1065  GetLineRec(25,1549)*emit_frac(lineCIV->getComponent(1)); // 1548.19
1066  PntForLine( 1549., "C 4R", &ipnt );
1067  lindst(rec, 1549., "C 4R", ipnt, 't', false,
1068  " recombination C 4 1549 from CV" );
1069  lineCIV->addComponent("C 4R",1549);
1070 
1071  lineCIVInwd->addComponent("Inwd",1550.78);
1072  lineCIVInwd->addComponent("Inwd",1548.19);
1073  lineCIV->addComponent("C 4R",1549);
1074  }
1075 
1076  /*** End of Carbon ***/
1077 
1078  /*** NITROGEN ***/
1079  /* Recombination and Pump lines */
1080 
1081 
1082  /***********************/
1083  /****** N 1 3467 ******/
1084  /*********************/
1086  {
1087  LinSv *lineNI3467 = linadd(0.0,3467,"Blnd",'i',"Blend" );
1088  lineNI3467->addComponent("N 1",3466.50);
1089  lineNI3467->addComponent("N 1",3466.54);
1090  }
1091 
1092  /***********************/
1093  /****** N 1 5199 ******/
1094  /*********************/
1096  {
1097  /**** Terry's addition, recombination from N+ **************/
1098  /* rate coefficient (cm3 s-1) from Table 3 of
1099  *>>refer NI rec Pequignot, D., Petijean, P. & Boisson, C. 1991, A&A, 251, 680 */
1100  double eff_recrate_2D = 1.108e-13 * pow(phycon.te*1e-4, -0.6085) /
1101  (1. - 0.0041 * pow(phycon.te*1e-4, -0.3975) );
1102  double eff_recrate_2P = 0.659e-13 * pow(phycon.te*1e-4, -0.6158);
1103  double fac_n1;
1104  if( dense.xIonDense[ipNITROGEN][0] > 0. )
1106  else
1107  fac_n1 = 0.;
1108 
1109  // assume levels are populated according to statistical weight
1110  double rec14 = eff_recrate_2P * fac_n1 * 2./6.;
1111  double rec15 = eff_recrate_2P * fac_n1 * 4./6.;
1112  double rec13 = eff_recrate_2D * fac_n1 * 4./10.;
1113  double rec12 = eff_recrate_2D * fac_n1 * 6./10.;
1114 
1115  LinSv *lineNI5199 = linadd(0.0,5199,"Blnd",'i',"Blend" );
1116  lineNI5199->addComponent("N 1",5197.90);
1117  lineNI5199->addComponent("N 1",5200.26);
1118 
1119  double emit_frac_5197 = LineSave.ipass <= 0 ? 0.0 :
1120  emit_frac(lineNI5199->getComponent(0)); // 5197.90
1121 
1122  // estimate of recombination contribution to intensity of [NI] 5199
1123  double rec = (rec12+rec13+0.9710*rec14+0.9318*rec15) * dense.xIonDense[ipNITROGEN][0] *
1124  3.82e-12*emit_frac_5197;
1125 
1126  /**** Terry's addition **************/
1127  PntForLine( wlAirVac(5199.), "N 1", &ipnt);
1128  lindst(rec, wlAirVac(5199.), "N 1R", ipnt, 't', true,
1129  " estimate of contribution to [N I] 5199 by recombination" );
1130 
1131  /* this is upper limit to production of 5200 by chemistry - assume every photo dissociation
1132  * populates upper level
1133  * co.nitro_dissoc_rate is the total N photo dissociation rate, cm-3 s-1 */
1134  // count as recombination since removes energy but is not coolng
1135  double chem = mole.dissoc_rate("N") * 3.82e-12 * emit_frac_5197;
1136  lindst( chem, wlAirVac(5199.), "N 1C", ipnt, 'r', true,
1137  " upper limit to [N I] 5199 produced by chemistry" );
1138 
1139  /* this is upper limit to production of 5200 by charge transfer -
1140  * atmdat.HCharExcRecTo_N0_2D is the rate coefficient (cm3 s-1) for N+(3P) + H0 -> H+ + N0(2D) */
1142  3.82e-12 * emit_frac_5197;
1143  lindst( ctRate, wlAirVac(5199.), "N 1T", ipnt, 'r', true,
1144  " upper limit to [N I] 5199 produced by charge transfer" );
1145 
1146  // // estimate of pumping contribution to 5200 doublet
1147  // lindst( nitro.pump5199, 5199, "Pump", ipnt, 'r', true,
1148  // " estimate of contribution to [N I] 5199 by FUV pumping" );
1149 
1150 
1151  lineNI5199->addComponent("N 1R",5199);
1152  lineNI5199->addComponent("N 1C",5199);
1153  lineNI5199->addComponent("N 1T",5199);
1154  }
1155 
1156 
1157  /************************/
1158  /****** N 1 10403 ******/
1159  /**********************/
1161  {
1162  LinSv *lineNI10403 = linadd(0.0,10403,"Blnd",'i',"Blend" );
1163  lineNI10403->addComponent("N 1",10397.7);
1164  lineNI10403->addComponent("N 1",10398.2);
1165  lineNI10403->addComponent("N 1",10407.2);
1166  lineNI10403->addComponent("N 1",10407.6);
1167  }
1168 
1169  /***********************/
1170  /****** N 2 6584 ******/
1171  /*********************/
1172 
1173  /* May be a combination of lines 1D - 3P */
1174  double efficn2 = 4e-3/(4e-3 + 5.18e-6*dense.eden/phycon.sqrte);
1175  double rec = 8e-22/(phycon.te70/phycon.te03/phycon.te03)*efficn2;
1176  PntForLine( 6584., "N 2R", &ipnt );
1177  lindst( rec*dense.xIonDense[ipNITROGEN][2]*dense.eden, 6584., "N 2R", ipnt, 't', false,
1178  " N 2 6584 alone, recombination contribution" );
1179 
1180  /***********************/
1181  /****** N 2 5755 ******/
1182  /*********************/
1183  if( atmdat.lgdBaseSourceExists[ipNITROGEN][1] )
1184  {
1185  /* helium charge transfer from
1186  >>refer n2 CT Sun Sadeghpour, Kirby Dalgarno and Lafyatis, CfA preprint 4208 */
1187  double ctRate = 1.8e-11*dense.xIonDense[ipHELIUM][0]*dense.xIonDense[ipNITROGEN][2]*1.146/(1.146 +
1188  0.87*dense.cdsqte)*3.46e-12;
1189 
1190  PntForLine(5755.,"N 2",&ipnt);
1191 
1192  lindst(ctRate,wlAirVac(5755.),"N 2T",ipnt,'r',true,
1193  " N 2 5755 charge transfer contribution " );
1194 
1195  LinSv *lineNII5755 = linadd(0.0,5755,"Blnd",'i',"Blend" );
1196  lineNII5755->addComponent("N 2",5754.61);
1197 
1198  /* >>chng 01 jul 09, add recombination contribution to 5755 */
1199  /* >>refer n2 rec Liu, X.W., Storey, P.J., Barlow, M.J., Danziger, I.J., Cohen, M.,
1200  * >>refercon & Bryce, M., 2000, MNRAS, 312, 585 */
1201  /* they give intensity in terms of hbeta intensity as their equation 1 */
1202  if( dense.xIonDense[ipHYDROGEN][1] > SMALLFLOAT )
1203  {
1204  /* this test on >0 is necessary because for sims with no H-ionizing radiation
1205  * the H+ density is initially zero */
1206  /* H beta recombination, assuming old case B, needed since HS tables have
1207  * only a narrow temperature range - at this point units are ergs cm^3 s-1 */
1208  double HBeta = (exp10(-20.89 - 0.10612*POW2(phycon.alogte - 4.4)))/phycon.te;
1209 
1210  /* now convert to ergs cm-3 s-1
1211  * >>chng 05 mar 17, this step was missing, so recombination intensity off by density squared,
1212  * bug reported by Marcelo Castellanos */
1213  HBeta *= dense.eden * dense.xIonDense[ipHYDROGEN][1];
1214 
1215  /* CoolHeavy.xN2_A3_tot is fraction of excitations that produce a photon
1216  * and represents the correction for collisional deexcitation */
1217  /*>>chng 05 dec 16, Liu et al. (2000) eqn 1 uses t = Te/10^4 K, not Te so phycon.te30
1218  * is too large: (10^4)^0.3 = 16 - div by 15.8489 - bug caught by Kevin Blagrave */
1219  rec = LineSave.ipass <= 0 ? 0.0 :
1220  emit_frac(lineNII5755->getComponent(0) )* // 5754.61 *
1221  HBeta * 3.19 * phycon.te30 / 15.84893 *
1222  dense.xIonDense[ipNITROGEN][2]/dense.xIonDense[ipHYDROGEN][1];
1223  }
1224  else
1225  {
1226  rec = 0.;
1227  }
1228 
1229  lindst( rec ,wlAirVac(5755.),"N 2R",ipnt,'t',true,
1230  " N 2 5755 recombination contribution" );
1231 
1232  lineNII5755->addComponent("N 2T",5755);
1233  lineNII5755->addComponent("N 2R",5755);
1234  }
1235 
1236  /***********************/
1237  /****** N 2 1085 ******/
1238  /*********************/
1239  if( atmdat.lgdBaseSourceExists[ipNITROGEN][1] )
1240  {
1241 
1242  LinSv *lineNII1085 = linadd(0.0,1085,"Blnd",'i',"Blend" );
1243  lineNII1085->addComponent("N 2",1083.99);
1244  lineNII1085->addComponent("N 2",1084.56);
1245  lineNII1085->addComponent("N 2",1084.58);
1246  lineNII1085->addComponent("N 2",1085.53);
1247  lineNII1085->addComponent("N 2",1085.55);
1248  lineNII1085->addComponent("N 2",1085.70);
1249 
1250  double rec = LineSave.ipass <= 0 ? 0.0 :
1251  GetLineRec(201,1085)*emit_frac(lineNII1085->getComponent(5)); // 1085.70
1252  /* Collisional suppression from emit_frac_db of 1085A may not be accurate.
1253  * It is based on the strongest line in the blend.*/
1254  PntForLine( 1085., "N 2R", &ipnt );
1255  lindst( MAX2(0.,rec), 1085., "N 2R", ipnt, 't', false,
1256  " dielectronic recombination contribution to N 2 1085" );
1257  lineNII1085->addComponent("N 2R",1085);
1258 
1259  LinSv *lineNII2141 = linadd(0.0,2141,"Blnd",'i',"Blend" );
1260  lineNII2141->addComponent("N 2",2139.01);
1261  lineNII2141->addComponent("N 2",2142.78);
1262  }
1263 
1264  /***********************/
1265  /****** N 3 1750 ******/
1266  /*********************/
1267  LinSv *lineNIIIa = linadd(0.0,1750,"Blnd",'i',"Blend" );
1268  if (atmdat.lgdBaseSourceExists[ipNITROGEN][2])
1269  {
1270  lineNIIIa->addComponent("N 3",1746.82);
1271  lineNIIIa->addComponent("N 3",1748.65);
1272  lineNIIIa->addComponent("N 3",1749.67);
1273  lineNIIIa->addComponent("N 3",1752.16);
1274  lineNIIIa->addComponent("N 3",1753.99);
1275  }
1276 
1277  /***********************/
1278  /****** N 3 990 *******/
1279  /*********************/
1280  if( atmdat.lgdBaseSourceExists[ipNITROGEN][2] )
1281  {
1282  LinSv *lineNIIIb = linadd(0.0,990,"Blnd",'i',"Blend" );
1283  lineNIIIb->addComponent("N 3",989.799);
1284  lineNIIIb->addComponent("N 3",991.511);
1285  lineNIIIb->addComponent("N 3",991.577);
1286 
1287  double rec = LineSave.ipass <= 0 ? 0.0 :
1288  GetLineRec(216,991)*emit_frac(lineNIIIb->getComponent(0)); // 989.799
1289 
1290  PntForLine( 990., "N 3R", &ipnt );
1291  lindst(rec, 990., "N 3R", ipnt, 't', false,
1292  " part of N 3 990 due to recombination " );
1293 
1294  lineNIIIb->addComponent("N 3R",990);
1295  }
1296 
1297  /***********************/
1298  /****** N 4 765* ******/
1299  /*********************/
1300  if( atmdat.lgdBaseSourceExists[ipNITROGEN][3] )
1301  {
1302 
1303  LinSv *lineNIV765 = linadd(0.0,765,"Blnd",'i',"Blend" );
1304  lineNIV765->addComponent("N 4",765.147);
1305 
1306  /* >>chng 97 may 02, better expression for dielectronic recombination */
1307  /* >>chng 02 jul 01, add function to get emission fraction */
1308  double rec = LineSave.ipass <= 0 ? 0.0 :
1309  GetLineRec(287,765)*emit_frac(lineNIV765->getComponent(0)); // 765.147
1310 
1311  /* dielectronic recombination contribution from Nussbaumer and Storey 1984 */
1312  PntForLine( 765., "N 4R", &ipnt );
1313  lindst( MAX2(0.,rec), 765., "N 4R", ipnt, 't', false,
1314  " N 4 765 recombination," );
1315  lineNIV765->addComponent("N 4R",765);
1316  }
1317 
1318  /***********************/
1319  /****** N 4 1486 ******/
1320  /*********************/
1321  if( atmdat.lgdBaseSourceExists[ipNITROGEN][3] )
1322  {
1323  LinSv *lineNIV1486 = linadd(0.0,1486,"Blnd",'i',"Blend" );
1324  lineNIV1486->addComponent("N 4",1483.32);
1325  lineNIV1486->addComponent("N 4",1486.50);
1326  }
1327 
1328  /***********************/
1329  /****** N 5 1240 ******/
1330  /*********************/
1331  LinSv *lineNV = linadd(0.0,1240,"Blnd",'i',"Blend" );
1332  if (atmdat.lgdBaseSourceExists[ipNITROGEN][4])
1333  {
1334  lineNV->addComponent("N 5",1238.82);
1335  lineNV->addComponent("N 5",1242.805);
1336  }
1337  /***********************/
1338  /****** N 5 1240 ******/
1339  /*********************/
1340  LinSv *lineNVInwd = linadd(0.0,1240,"Inwd",'i',"inward part of Blend" );
1341  if (atmdat.lgdBaseSourceExists[ipNITROGEN][4])
1342  {
1343  lineNVInwd->addComponent("Inwd",1238.82);
1344  lineNVInwd->addComponent("Inwd",1242.805);
1345  }
1346  /*** End of Nitrogen ***/
1347 
1348  /*** OXYGEN***/
1349  /* Recombination and Pump lines */
1350 
1351  /***********************/
1352  /****** O 1 6300 ******/
1353  /*********************/
1355  {
1356  LinSv *lineOI6300 = linadd(0.0,6300,"Blnd",'i',"Blend" );
1357  lineOI6300->addComponent("O 1",6300.30);
1358  lineOI6300->addComponent("O 1",6363.78);
1359  lineOI6300->addComponent("O 1",6391.73);
1360  }
1361 
1362  /***********************/
1363  /****** O 2 Setup *****/
1364  /*********************/
1365 
1366  double rec7323 , rec7332, rec3730 , rec3726 , rec2471, reco23tot , reco22tot;
1367 
1368  static const bool debug2471 = false;
1369  static const bool debug7323 = false;
1370  static const bool debug7332 = false;
1371 
1373  {
1374 
1375  /***********************/
1376  /****** O 2 2471 *****/
1377  /*********************/
1378  LinSv *lineOII2471 = linadd(0.0,2471,"Blnd",'i',"Blend" );
1379  lineOII2471->addComponent("O 2",2470.22);
1380  lineOII2471->addComponent("O 2",2470.34);
1381  /**********************/
1382 
1383  /***********************/
1384  /****** O 2 3726 *****/
1385  /*********************/
1386  LinSv *lineOII3726 = linadd(0.0,3726,"Blnd",'i',"Blend" );
1387  lineOII3726->addComponent("O 2",3726.03);
1388  /*********************/
1389 
1390  /***********************/
1391  /****** O 2 3728 *****/
1392  /*********************/
1393  LinSv *lineOII3728 = linadd(0.0,3729,"Blnd",'i',"Blend" );
1394  lineOII3728->addComponent("O 2",3728.81);
1395  /********************/
1396 
1397  /***********************/
1398  /****** O 2 7323 *****/
1399  /*********************/
1400  LinSv *lineOII7323 = linadd(0.0,7323,"Blnd",'i',"Blend" );
1401  lineOII7323->addComponent("O 2",7318.92);
1402  lineOII7323->addComponent("O 2",7319.99);
1403  /*********************/
1404 
1405  /***********************/
1406  /****** O 2 7332 *****/
1407  /*********************/
1408  LinSv *lineOII7332 = linadd(0.0,7332,"Blnd",'i',"Blend" );
1409  lineOII7332->addComponent("O 2",7329.67);
1410  lineOII7332->addComponent("O 2",7330.73);
1411  /*********************/
1412 
1413 
1414  /* total recombination to 2P^o, the highest two levels of the 5-level atom,
1415  * which produces the 7325 multiplet, last factor accounts for coll deexcitation
1416  * this implements equation 2 of
1417  * refer o2 rec Liu, X-W., Storey, P.J., Barlow, M.J., Danziger, I.J.,
1418  * refercon Cohen, M., & Bryce, M., 2000, MNRAS, 312, 585 */
1419  /* >>chng 05 dec 29, from first eqn, or unknown origin, to second, from indicated
1420  * reference. They agreed within 20% */
1421 
1422 
1423  /* Get lines in ergs/s to replace CoolHeavy.Oxxxx */
1424  double chO2471 = 0.0;
1425  double chO7323 = 0.0;
1426  double chO7332 = 0.0;
1427  double chO3726 = 0.0;
1428  double chO3730 = 0.0;
1429  double O2_Lev45_rad = 0.0;
1430  double O2_Lev45_coll = 0.0;
1431  double O2_Lev23_rad = 0.0;
1432  double O2_Lev23_coll = 0.0;
1433  if (LineSave.ipass > 0 )
1434  {
1435  TransitionProxy tr;
1436  tr = lineOII2471->getComponent(0);
1437  if (tr.associated())
1438  {
1439  chO2471 += tr.Emis().xObsIntensity();
1440  }
1441  tr = lineOII2471->getComponent(1);
1442  if (tr.associated())
1443  {
1444  chO2471 += tr.Emis().xObsIntensity();
1445  }
1446  tr = lineOII7323->getComponent(0);
1447  if (tr.associated())
1448  {
1449  chO7323 += tr.Emis().xObsIntensity();
1450  }
1451  tr = lineOII7323->getComponent(1);
1452  if (tr.associated())
1453  {
1454  chO7323 += tr.Emis().xObsIntensity();
1455  }
1456  tr = lineOII7332->getComponent(0);
1457  if (tr.associated())
1458  {
1459  chO7332 += tr.Emis().xObsIntensity();
1460  }
1461  tr = lineOII7332->getComponent(1);
1462  if (tr.associated())
1463  {
1464  chO7332 += tr.Emis().xObsIntensity();
1465  }
1466  tr = lineOII3726->getComponent(0);
1467  if (tr.associated())
1468  {
1469  chO3726 += tr.Emis().xObsIntensity();
1470  }
1471  tr = lineOII3728->getComponent(0);
1472  if (tr.associated())
1473  {
1474  chO3730 += tr.Emis().xObsIntensity();
1475  }
1476 
1477  //Radiative decays per second of 7319.99 and 7329.67
1478  //Collisional decays per second of 7319.99 and 7329.67
1479  tr = lineOII7323->getComponent(1);
1480  if (tr.associated())
1481  {
1482  O2_Lev45_rad += tr.Hi()->Pop()*tr.Emis().Aul();
1483  O2_Lev45_coll += tr.Hi()->Pop()*tr.Coll().ColUL(colliders);
1484  }
1485  tr = lineOII7332->getComponent(0);
1486  if (tr.associated())
1487  {
1488  O2_Lev45_rad += tr.Hi()->Pop()*tr.Emis().Aul();
1489  O2_Lev45_coll += tr.Hi()->Pop()*tr.Coll().ColUL(colliders);
1490  }
1491 
1492  //Radiative decays per second of 3726.03 and 3728.81
1493  //Collisional decays per second of 3726.03 and 3728.81
1494  tr = lineOII3726->getComponent(0);
1495  if (tr.associated())
1496  {
1497  O2_Lev23_rad += tr.Hi()->Pop()*tr.Emis().Aul();
1498  O2_Lev23_coll += tr.Hi()->Pop()*tr.Coll().ColUL(colliders);
1499  }
1500  tr = lineOII3728->getComponent(0);
1501  if (tr.associated())
1502  {
1503  O2_Lev23_rad += tr.Hi()->Pop()*tr.Emis().Aul();
1504  O2_Lev23_coll += tr.Hi()->Pop()*tr.Coll().ColUL(colliders);
1505  }
1506  }
1507  double chO3727 = chO3726 + chO3730;
1508  double chO7325 = chO7323 + chO7332;
1509 
1510  //This replaces CoolHeavy.O2_A3_tot
1511  double O2_Lev45_radTot = O2_Lev45_rad/SDIV(O2_Lev45_rad + O2_Lev45_coll);
1512 
1513  //This replaces CoolHeavy.O2_A2_tot
1514  //FIX THIS: both rad and coll should have 3 lines
1515  double O2_Lev23_radTot = O2_Lev23_rad/SDIV(O2_Lev23_rad + O2_Lev23_coll);
1516 
1517  if( dense.xIonDense[ipHYDROGEN][1] > SMALLFLOAT )
1518  {
1519  double HBeta = (exp10(-20.89 - 0.10612*POW2(phycon.alogte - 4.4)))/phycon.te;
1520  HBeta *= dense.eden * dense.xIonDense[ipHYDROGEN][1];
1521  /* this test is necessary because for sims with no H-ionizing radiation
1522  * the H+ density is initially zero */
1523 
1524  reco23tot = O2_Lev45_radTot * HBeta *
1525  9.36 * phycon.te40*phycon.te04 / 57.544 * dense.xIonDense[ipOXYGEN][2]/dense.xIonDense[ipHYDROGEN][1];
1526  }
1527  else
1528  {
1529  reco23tot = 0.;
1530  }
1531 
1532  if(debug2471 || debug7323 || debug7332 )
1533  {
1534  fprintf(ioQQQ,"reco23tot\t%e\n",reco23tot);
1535  fprintf(ioQQQ,"O2_Lev45_radTot\t%e\t%e\t%e\n",O2_Lev45_radTot,O2_Lev45_rad,O2_Lev45_coll);
1536  }
1537 
1538  sum = chO2471*2471./7325. + chO7323 + chO7332;
1539  if( sum > SMALLFLOAT )
1540  {
1541  /* assume effective branching ratio according to predicted intensities from 5-lev atom*/
1542  reco23tot /= sum;
1543  }
1544  else
1545  {
1546  reco23tot = 0.;
1547  }
1548  /* these are now ergs per sec unit vol for each transition */
1549 
1550  if(debug2471 || debug7323 || debug7332 )
1551  {
1552  fprintf(ioQQQ,"reco23tot\t%e\tsum\t%e\n",reco23tot,sum);
1553  }
1554 
1555  rec7332 = reco23tot * chO7332;
1556  linadd(rec7332,wlAirVac(7332.),"O 2R",'i'," P1/2-D3/2 and P3/2-D3/2 together " );
1557 
1558  rec7323 = reco23tot * chO7323;
1559  linadd(rec7323,wlAirVac(7323.),"O 2R",'i'," P1/2-D5/2 and P3/2-D5/2 together " );
1560 
1561 
1562  /* total recombination to 2D^o, the middle two levels of the 5-level atom,
1563  * which produces the 3727 multiplet, last factor accounts for coll deexcit */
1564  reco22tot = 1.660e-10 / ( phycon.sqrte * phycon.te03 * phycon.te005 ) *
1565  dense.eden * dense.xIonDense[ipOXYGEN][2] * O2_Lev23_radTot;
1566  /* assume effective branching ratio according to predicted intensities from 5-lev atom*/
1567  sum = chO3726 + chO3730;
1568  // It would be better to have a physically-based branching ratio as fallback...
1569  realnum fracO3726 = (realnum) safe_div(chO3726, sum, 0.5),
1570  fracO3730 = (realnum) safe_div(chO3730, sum, 0.5);
1571  /* these are now ergs per sec unit vol for each transition */
1572  rec3726 = reco22tot * fracO3726 * 5.34e-12;
1573  rec3730 = reco22tot * fracO3730 * 5.34e-12;
1574 
1575 
1576  /***********************/
1577  /****** O 2 833 *****/
1578  /*********************/
1579 
1580  LinSv *lineOII833 = linadd(0.0,833,"Blnd",'i',"Blend" );
1581  lineOII833->addComponent("O 2",832.758);
1582  lineOII833->addComponent("O 2",833.330);
1583  lineOII833->addComponent("O 2",834.465);
1584 
1585  /***********************/
1586  /****** O 2 3727 *****/
1587  /*********************/
1588 
1589  /* O II 3727 produced by photoionization OF O0 */
1590  oxy.s3727 = (realnum)((oxy.s3727 + oxy.s7325*0.5)*5.34e-12*
1591  9.7e-5/(9.7e-5 + dense.eden*1.15e-6/phycon.sqrte));
1592 
1593  linadd(oxy.s3727,3727,"O 2H",'i',
1594  " line produced by photoionization of Oo; already in TOTL" );
1595 
1596  linadd( rec3726 ,3726,"O 2R",'i'," D3/2 - S3/2 transition" );
1597 
1598  PntForLine( 3729., "O 2R", &ipnt );
1599  lindst( rec3730 ,3729., "O 2R", ipnt, 't', false,
1600  " recombination contribution refer o2 rec Liu, X-W., Storey, P.J., Barlow, M.J., Danziger, I.J.,refercon Cohen, M., & Bryce, M., 2000, MNRAS, 312, 585 recombination contributions five level atom calculations; D5/2 - S3/2 " );
1601 
1602  linadd(chO3727+rec3726+rec3730+oxy.s3727,3727,"Blnd",'i',
1603  " O II 3727, all lines of multiplet together" );
1604 
1605  /***********************/
1606  /****** O 2 2471 Cont**/
1607  /*********************/
1608 
1609  rec2471 = reco23tot * chO2471*2471./7325. * 8.05e-12/2.72e-12;
1610  linadd(rec2471,wlAirVac(2471.),"O 2R",'i', " both 2P 1/2 and 3/2 to ground " );
1611  lineOII2471->addComponent("O 2R",2471);
1612 
1613  /***********************/
1614  /****** O 2 7325 *****/
1615  /*********************/
1616 
1617  oxy.s7325 = (realnum)(oxy.s7325*2.72e-12*0.34/(0.34 + dense.eden*
1618  6.04e-6/phycon.sqrte));
1619 
1620  linadd(oxy.s7325,7325,"O 2H",'i',
1621  " line produced by photoionization of Oo;" );
1622 
1623  linadd(chO7325+rec7323+rec7332,7325,"Blnd",'i',
1624  " O II 7325, all lines of multiplet together" );
1625 
1626  /***********************/
1627  /****** O 2 7332 Cont**/
1628  /*********************/
1629  lineOII7332->addComponent("O 2R",7332);
1630 
1631  /***********************/
1632  /****** O 2 7323 Cont**/
1633  /*********************/
1634  lineOII7323->addComponent("O 2R",7323);
1635 
1636  /***********************/
1637  /****** O 2 P and R ***/
1638  /*********************/
1639 
1640  /* the OII multiplets,
1641  * contributions by both continuum pumping through XUV line
1642  * and recombination */
1643  /* this is the driving line, pump is photons cm^-3 s^-1 */
1644  if( nWindLine > 0 )
1645  {
1646  pump = TauLine2[387].Emis().pump()*TauLine2[387].Emis().PopOpc();
1647  }
1648  else
1649  {
1650  pump = 0.;
1651  }
1652 
1653 
1654  PntForLine(3120.,"O 2",&ipnt);
1655  lindst(pump*0.336 * 6.37e-12/(1.+dense.eden/1e12) ,3120,"O 2P",ipnt,'r',true,
1656  " OII 3113.62 - 3139.68 (8 lines) are only pumped, no recombination part" );
1657 
1658  PntForLine(3300.,"O 2",&ipnt);
1659  lindst(pump*0.147 * 6.03e-12/(1.+dense.eden/1e12) ,3300,"O 2P",ipnt,'r',true,
1660  " OII 3277.56 - 3306.45 (6 lines) are only pumped, no recombination part" );
1661 
1662  PntForLine(3762.,"O 2",&ipnt);
1663  lindst(pump*0.087 * 5.29e-12/(1.+dense.eden/1e12) ,3762,"O 2P",ipnt,'r',true,
1664  " OII 3739.76/3762.47/3777.42 (3 lines) are only pumped, no recombination part" );
1665 
1666  /* recombination and specific pump for OII 4638.86-4696.35 (8 lines) */
1667  rec = GetLineRec(82, 4651 );
1668  PntForLine( 4651.,"O 2",&ipnt);
1669  lindst(rec, 4651.,"O 2R",ipnt,'t',true,
1670  " O II 4651 total recombination, 4638.86-4696.35 (8 lines) " );
1671 
1672  /* convert UV pump rate to intensity with branching ratio and hnu recombination
1673  * part of O II 4651 line */
1674  linadd(pump* 0.336 * 0.933 * 4.27e-12/(1.+dense.eden/1e12),4651,"O 2P",'i',
1675  " pumped part of line O II 4651 " );
1676 
1677  /***********************/
1678  /****** O 2 4341 *****/
1679  /*********************/
1680 
1681  LinSv *lineOII4341 = linadd(0.0,4341,"Blnd",'i',"Blend" );
1682  //lineOII4341->addComponent("O 2",4341);
1683  //Outside default levels
1684 
1685  /* recombination and specific pump for OII 4317.14-4366.89 (6 lines) */
1686  rec = GetLineRec(83, 4341 );
1687 
1688  PntForLine( wlAirVac(4341.), "O 2R", &ipnt );
1689  lindst(rec/(1.+dense.eden/1e12), wlAirVac(4341.), "O 2R", ipnt, 't', false,
1690  " recombination contribution to O II 4341 line " );
1691 
1692  linadd(pump* 0.147 * 0.661 * 4.58e-12/(1.+dense.eden/1e12),wlAirVac(4341.),"O 2P",'i',
1693  " pumped part of line O II 4341 " );
1694 
1695  lineOII4341->addComponent("O 2P",4341);
1696  lineOII4341->addComponent("O 2R",4341);
1697 
1698  /***********************/
1699  /****** O 2 3736 *****/
1700  /*********************/
1701  LinSv *lineOII3736 = linadd(0.0,3736,"Blnd",'i',"Blend" );
1702  //lineOII3736->addComponent("O 2",3736);
1703  //Outside default levels
1704 
1705  /* recombination and specific pump for OII 3712.74/3727.32/3749.48 (3 lines) */
1706  double rec = GetLineRec(84, 3736 );
1707  /* convert UV pump rate to intensity with branching ratio and hnu */
1708 
1709  PntForLine( wlAirVac(3736.), "O 2R", &ipnt );
1710  lindst(rec/(1.+dense.eden/1e12), wlAirVac(3736.), "O 2R", ipnt, 't', false,
1711  " recombination part of O II 3736 line " );
1712  linadd(pump* 0.087 * 0.763 * 5.33e-12/(1.+dense.eden/1e12),wlAirVac(3736.),"O 2P",'i',
1713  " pumped part of line O II 3736" );
1714 
1715  lineOII3736->addComponent("O 2P",3736);
1716  lineOII3736->addComponent("O 2R",3736);
1717  }
1718 
1719 
1720  /***********************/
1721  /****** O 3 1666 *****/
1722  /*********************/
1724  {
1725  LinSv *lineOIII1666 = linadd(0.0,1666,"Blnd",'i',"Blend" );
1726  lineOIII1666->addComponent("O 3",1666.15);
1727  lineOIII1666->addComponent("O 3",1660.81);
1728 
1729  double efac = 0.0;
1730  if (LineSave.ipass > 0)
1731  {
1732  efac = (emit_frac(lineOIII1666->getComponent(0)) +
1733  emit_frac(lineOIII1666->getComponent(1)))*0.5;
1734  }
1735 
1736  linadd(ionbal.PhotoRate_Shell[ipOXYGEN][3][1][0]*dense.xIonDense[ipOXYGEN][1]*0.3*1.20e-11*efac,1665,"O 3H",'i',
1737  " contribution to OIII 1665 due to inner shell (2s^2) ionization " );
1738 
1739  linadd(oxy.AugerO3*1.20e-11*efac*0.27,1665,"O 3A",'i',
1740  " contribution to OIII 1665 due to K-shell ionization " );
1741 
1742 
1743  lineOIII1666->addComponent("O 3H",1665);
1744  lineOIII1666->addComponent("O 3A",1665);
1745  }
1746 
1747  /***********************/
1748  /****** O 3 5007 *****/
1749  /*********************/
1751  {
1752  LinSv *lineOIII5007 = linadd(0.0,5007,"Blnd",'i',"Blend" );
1753  lineOIII5007->addComponent("O 3",5006.84);
1754  lineOIII5007->addComponent("O 3",4958.91);
1755  lineOIII5007->addComponent("O 3",4931.23);
1756 
1757  /* o iii 5007+4959, As 96 NIST */
1758  /*The cs of the transitions 3P0,1,2 to 1D2 are added together to give oiii_cs3P1D2 */
1759  /*the cs of the transition 1D2-1S0 is mentioned as oiii_cs1D21S0*/
1760  /*The cs of the transitions 3P0,1,2 to 1S0 are added together to give oiii_cs3P1S0*/
1761  double aeff = 0.027242 + oxy.d5007r;
1762  //double a21 = aeff - oxy.d5007r;
1763 
1764  realnum d5007t = 0.0;
1765  if (LineSave.ipass > 0)
1766  {
1767  TransitionProxy tr = lineOIII5007->getComponent(0);
1768  if ( tr.associated())
1769  {
1770  d5007t += (realnum)(tr.Emis().xObsIntensity()*oxy.d5007r/aeff);
1771  }
1772  }
1773 
1774  linadd(d5007t/1.25,5007,"LOST",'i',
1775  " O III 5007 lost through excited state photo" );
1776  }
1777 
1778 
1779  /***********************/
1780  /****** O 3 4363 *****/
1781  /*********************/
1783  {
1784  /* collisional quenching ratio */
1785  double effec = 1.6/(1.6 + 0.9*dense.cdsqte);
1786 
1787  /* O III 4363 recombination, coefficient from Burgess and Seaton */
1788  /*
1789  double r43630 = 6.3e-21/(phycon.te70*phycon.te10)*dense.eden*dense.xIonDense[ipOXYGEN][3]*effec;
1790 
1791  * Hi Gary, Daniel, Francisco and Veronica,
1792  I was wondering why the Liu's fit to the recombination of OIII4363 was so different from what I obtained, from PPB91 or BS60. The point is that the dielectronic recombination is also included in Liu's formula. It is taken from Nussbaumer and Storey 1984. If I add this contribution to PPB91, I obtain the same result than Liu, for Te> 5,000K. At lower Te, the Liu's fit is not correct as only the recombination is acting and the slope changes.
1793 
1794  A full correct recombination computation of 4363 must then take these 2 effects into account, using something like:
1795  3.0e-22 * T**-0.6 + 6.37e-25 * exp(-8000/T)
1796  i.e. in C++:
1797  update: published in 2020MNRAS.498L..82G
1798  */
1799  double r4363 = (3.0e-22/(phycon.te40*phycon.te20) + 6.37e-25*exp(-8000/phycon.te) ) *
1800  dense.eden*dense.xIonDense[ipOXYGEN][3]*effec;
1801 
1802  /*This is fitting PPB91+NS84 within 3% from 200 to 30,000K.
1803  I'm not sure that this is what you want to include in Cloudy?
1804 
1805  Best regards,
1806  Christophe Morisset
1807  */
1808 
1809 
1810  /* charge exchange,
1811  * >>refer O3 CT Dalgarno+Sternberg ApJ Let 257, L87.
1812  * scaled to agree with
1813  * >>refer O3 CT Gargaud et al AA 208, 251, (1989) */
1814  double ct4363 = phycon.sqrte*1.3e-12*4.561e-12*dense.xIonDense[ipHYDROGEN][0]*dense.xIonDense[ipOXYGEN][3]*
1815  effec;
1816 
1817  PntForLine(4363.,"O 3",&ipnt);
1818 
1819  lindst(r4363,wlAirVac(4363.),"O 3R",ipnt,'t',true,
1820  " O III 4363 recombination, coefficient from Burgess and Seaton " );
1821 
1822  linadd(ct4363,wlAirVac(4363.),"O 3C",'i' ,
1823  " call linadd( c4363*0.236 , 2321 , 'O 3','c') charge exchange, Dalgarno+Sternberg ApJ Let 257, L87. ");
1824 
1825  LinSv *lineOIII4363 = linadd(0.0,4363,"Blnd",'i',"Blend" );
1826  lineOIII4363->addComponent("O 3",4363.21);
1827  lineOIII4363->addComponent("O 3C",4363);
1828  lineOIII4363->addComponent("O 3R",4363);
1829  }
1830 
1831 
1832  /***********************/
1833  /****** O 3 5592 *****/
1834  /*********************/
1836  {
1837  linadd(dense.xIonDense[ipHYDROGEN][0]*dense.xIonDense[ipOXYGEN][3]*0.225*3.56e-12*1.34e-11*phycon.sqrte,
1838  wlAirVac(5592.),"O 3C",'i'," charge exchange rate, D+S " );
1839 
1840  LinSv *lineOIII5592 = linadd(0.0,5592,"Blnd",'i',"Blend" );
1841  lineOIII5592->addComponent("O 3",5592);
1842  lineOIII5592->addComponent("O 3C",5592);
1843  }
1844 
1845 
1846  /***********************/
1847  /****** O 3 835 ******/
1848  /*********************/
1850  {
1851  LinSv *lineOIII835 = linadd(0.0,835,"Blnd",'i',"Blend" );
1852 
1853  //3P-3D
1854  lineOIII835->addComponent("O 3",832.929);
1855  lineOIII835->addComponent("O 3",833.715);
1856  lineOIII835->addComponent("O 3",833.749);
1857  lineOIII835->addComponent("O 3",835.059);
1858  lineOIII835->addComponent("O 3",835.092);
1859  lineOIII835->addComponent("O 3",835.289);
1860 
1861  /* >>chng 97 may 02, better rec contribution */
1862  double rec = LineSave.ipass <= 0 ? 0.0 : GetLineRec(331,835)*emit_frac(lineOIII835->getComponent(3));
1863 
1864  PntForLine( 835., "O 3R", &ipnt );
1865  lindst(MAX2(0.,rec), 835., "O 3R", ipnt, 't', false,
1866  " O III 834A, dielectronic recombination only" );
1867 
1868  lineOIII835->addComponent("O 3R",835);
1869  }
1870 
1871  /***********************/
1872  /****** O 4 1402 ******/
1873  /*********************/
1875  {
1876  linadd(ionbal.PhotoRate_Shell[ipOXYGEN][2][1][0]*dense.xIonDense[ipOXYGEN][2]*0.43*1.42e-11,1401,"O 4H",'i',
1877  " inner shell photoionization, relaxation " );
1878 
1879  LinSv *lineOIV1402 = linadd(0.0,1402,"Blnd",'i',"Blend" );
1880  lineOIV1402->addComponent("O 4",1397.20);
1881  lineOIV1402->addComponent("O 4",1399.77);
1882  lineOIV1402->addComponent("O 4",1401.16);
1883  lineOIV1402->addComponent("O 4",1404.78);
1884  lineOIV1402->addComponent("O 4",1407.38);
1885  lineOIV1402->addComponent("O 4H",1401);
1886  }
1887 
1888  /***********************/
1889  /****** O 4 789 ******/
1890  /*********************/
1892  {
1893  LinSv *lineOIV789 = linadd(0.0,789,"Blnd",'i',"Blend" );
1894  lineOIV789->addComponent("O 4",787.710);
1895  lineOIV789->addComponent("O 4",790.114);
1896  lineOIV789->addComponent("O 4",790.201);
1897 
1898  /* >>chng 97 may 02, better rec contribution */
1899  double rec = LineSave.ipass <= 0 ? 0.0 : GetLineRec(378,789)*emit_frac(lineOIV789->getComponent(2));
1900  PntForLine( 789., "O 4R", &ipnt );
1901  lindst(MAX2(0.,rec), 789., "O 4R", ipnt, 't', false,
1902  " O IV 789A, dielectronic recombination only" );
1903 
1904  lineOIV789->addComponent("O 4R",789);
1905  }
1906 
1907 
1908 
1909  /***********************/
1910  /****** O 5 630 ******/
1911  /*********************/
1913  {
1914  LinSv *lineOV630 = linadd(0.0,630,"Blnd",'i',"Blend" );
1915  lineOV630->addComponent("O 5",629.732);
1916 
1917  /* >>chng 97 may 02, better rec contribution */
1918  double rec = LineSave.ipass <= 0 ? 0.0 : GetLineRec(466,630)*emit_frac(lineOV630->getComponent(0));
1919 
1920  PntForLine( 630., "O 5R", &ipnt );
1921  lindst(MAX2(0.,rec), 630., "O 5R", ipnt, 't', false,
1922  " O V 630A, dielectronic recombination only" );
1923 
1924  lineOV630->addComponent("O 5R",630);
1925  }
1926 
1927  /***********************/
1928  /****** O 5 1218 ******/
1929  /*********************/
1931  {
1932  LinSv *lineOV1218 = linadd(0.0,1218,"Blnd",'i',"Blend" );
1933  lineOV1218->addComponent("O 5",1213.81);
1934  lineOV1218->addComponent("O 5",1218.34);
1935  }
1936 
1937  /***********************/
1938  /****** O 6 1035 ******/
1939  /*********************/
1941  {
1942  LinSv *lineOVI1035 = linadd(0.0,1035,"Blnd",'i',"Blend" );
1943  lineOVI1035->addComponent("O 6",1031.91);
1944  lineOVI1035->addComponent("O 6",1037.62);
1945 
1946  LinSv *lineInwd1035 = linadd(0.0,1035,"Inwd",'i',"Blend" );
1947  lineInwd1035->addComponent("Inwd",1031.91);
1948  lineInwd1035->addComponent("Inwd",1037.62);
1949  }
1950 
1951  /* add up line intensities for certain set of lines,
1952  * must come after all lines defined */
1953  sum = PrtLineSum();
1954  /* zero out the location that will receive this information,
1955  * remember that memory not allocated until ipass >= 0 */
1956  if( LineSave.ipass > 0 )
1957  LineSave.lines[LineSave.nsum].SumLineZero();
1958  /* optional sum of certain emission lines, set with "print sum" */
1959  linadd(sum/radius.dVeffAper,0,"Stoy",'i' ,
1960  "Stoy method energy sum ");
1961 
1962  /* >>chng 06 jan 03, confirm that number of lines never changes once we have
1963  * created the labels */
1964  {
1965  static long nLineSave=-1 , ndLineSave=-1;
1966  if( LineSave.ipass == 0 )
1967  {
1968  nLineSave = LineSave.nsum;
1969  ndLineSave = LineSave.nsum;
1970  LineSave.setSortWL();
1971  }
1972  else if( LineSave.ipass > 0 )
1973  {
1974  /* this can't happen */
1975  if( nLineSave<= 0 || ndLineSave < 0 )
1976  TotalInsanity();
1977 
1978  /* now make sure that we have the same number of lines as we had previously
1979  * created labels. This would not pass if we did not add in exactly the same
1980  * number of lines on each pass */
1981  if( nLineSave != LineSave.nsum )
1982  {
1983  fprintf( ioQQQ, "DISASTER number of lines in LineSave.nsum changed between pass 0 and 1 - this is impossible\n" );
1984  fprintf( ioQQQ, "DISASTER LineSave.nsum is %li and nLineSave is %li\n",
1985  LineSave.nsum ,
1986  nLineSave);
1987  ShowMe();
1989  }
1990  if( ndLineSave != LineSave.nsum )
1991  {
1992  fprintf( ioQQQ, "DISASTER number of lines in LineSave.nsum changed between pass 0 and 1 - this is impossible\n" );
1993  fprintf( ioQQQ, "DISASTER LineSave.nsum is %li and ndLineSave is %li\n",
1994  LineSave.nsum ,
1995  ndLineSave);
1996  ShowMe();
1998  }
1999  }
2000  }
2001 
2002  if( trace.lgTrace )
2003  {
2004  fprintf( ioQQQ, " lines returns\n" );
2005  }
2006  return;
2007 }
2008 
2009 /*Drive_cdLine do the drive cdLine command */
2010 STATIC void Drive_cdLine( void )
2011 {
2012  long int j;
2013  bool lgMustPrintHeader = true;
2014  double absval , rel;
2015 
2016  DEBUG_ENTRY( "Drive_cdLine()" );
2017 
2018  for( j=1; j < LineSave.nsum; j++ )
2019  {
2020  if( cdLine( LineSave.lines[j].chALab() , LineSave.lines[j].wavelength() , &absval , &rel ) <= 0 )
2021  {
2022  /* print header if first miss */
2023  if( lgMustPrintHeader )
2024  {
2025  fprintf(ioQQQ,"n\tlabel\n");
2026  lgMustPrintHeader = false;
2027  }
2028 
2029  fprintf(ioQQQ,"%li\t%s\n", j, LineSave.lines[j].label().c_str() );
2030  }
2031  }
2032  fprintf( ioQQQ, " Thanks for checking on the cdLine routine!\n" );
2034 }
2035 
2037 {
2038  DEBUG_ENTRY( "cool_iron_Ka()" );
2039 
2040  if( trace.lgTrace )
2041  {
2042  fprintf( ioQQQ, " cool_iron_Ka called\n" );
2043  }
2044 
2045  double FeKaHLike = 0. , FeKaHeLike=0.;
2046  /* one and two electron Ka */
2047  if( dense.lgElmtOn[ipIRON] )
2048  {
2049  /* H-like one-electron Ka */
2050  FeKaHLike = iso_sp[ipH_LIKE][ipIRON].trans(ipH2p,ipH1s).Emis().xIntensity();
2051 
2052  /* He-like two-electron Ka */
2053  FeKaHeLike =
2058 
2059  //fprintf(ioQQQ,"DEBUGGG H like Ka %.2e He like %.2e\n",FeKaHLike,FeKaHeLike);
2060  /* total intensity of K-alpha line, cold, grain, hot, 1 and two electron */
2061  lindst((fe.fekcld+fe.fegrain)*1.03e-8+fe.fekhot*1.11e-8+FeKaHLike+FeKaHeLike,1.78f,"FeKa",
2062  iso_sp[ipH_LIKE][ipIRON].trans(ipH2p,ipH1s).ipCont(),'i',false,
2063  "total intensity of Fe K-alpha line, grain, cold, hot, 1 and 2 electron" );
2064 
2065  }
2066 
2067  linadd(FeKaHLike,1.78177,"FeK1",'i' ,
2068  "H-like one-electron Ka");
2069 
2070  linadd(FeKaHeLike,1.85,"FeK2",'i' ,
2071  "He-like two-electron Ka");
2072 
2073  linadd( fe.fekhot*1.11e-8 ,1.8,"FeKH",'i' ,
2074  "fluorescent hot iron, Fe 18 - 23 times ionized");
2075 
2076  linadd(fe.fekcld*1.03e-8,1.75,"FeKC",'i',
2077  "fluorescent cold iron, less than or 17 times ionized" );
2078 
2079  linadd(fe.fegrain*1.03e-8,1.75,"FeKG",'i' ,
2080  "grain production of cold iron");
2081 
2082  if( trace.lgTrace )
2083  {
2084  fprintf( ioQQQ, " cool_iron_Ka returns\n" );
2085  }
2086  return;
2087 }
void setSortWL()
Definition: lines.cpp:283
int nshell(long n) const
Definition: yield.h:61
int ion(long n) const
Definition: yield.h:60
long int ipMaxExtra
Definition: thermal.h:163
double cintot
Definition: hydrogenic.h:129
double htot
Definition: thermal.h:169
t_atmdat atmdat
Definition: atmdat.cpp:6
int nelem(long n) const
Definition: yield.h:59
t_thermal thermal
Definition: thermal.cpp:6
string chIonLbl(const TransitionProxy &t)
Definition: transition.cpp:233
const int ipMAGNESIUM
Definition: cddefines.h:360
size_t size(void) const
Definition: transition.h:331
double power
Definition: thermal.h:169
qList st
Definition: iso.h:482
double te03
Definition: phycon.h:58
TransitionList UTALines("UTALines",&AnonStates)
double exp10(double x)
Definition: cddefines.h:1368
const int ipHE_LIKE
Definition: iso.h:65
double comtot
Definition: rfield.h:275
double emit_frac(const TransitionProxy &t)
Definition: transition.cpp:88
NORETURN void TotalInsanity(void)
Definition: service.cpp:971
realnum GBarMax
Definition: thermal.h:162
realnum fekhot
Definition: fe.h:11
t_fe fe
Definition: fe.cpp:5
bool lgDrv_cdLine
Definition: trace.h:115
const int ipARGON
Definition: cddefines.h:366
t_hyperfine hyperfine
Definition: hyperfine.cpp:5
double cooling_total
Definition: hyperfine.h:62
double FreeFreeTotHeat
Definition: thermal.h:178
const realnum SMALLFLOAT
Definition: cpu.h:246
t_isoCTRL iso_ctrl
Definition: iso.cpp:9
const int NISO
Definition: cddefines.h:311
const int ipHe2p3P1
Definition: iso.h:49
const int ipHe2p3P0
Definition: iso.h:48
double RecomInducCool_Rate
Definition: iso.h:584
const int NRECCOEFCNO
Definition: atmdat_adfa.h:7
double cdsqte
Definition: dense.h:246
const int ipOXYGEN
Definition: cddefines.h:356
const int ipCHLORINE
Definition: cddefines.h:365
void lindst(double xEmiss, realnum wavelength, const char *chLab, long int ipnt, char chInfo, bool lgOutToo, const char *chComment)
TransitionList HFLines("HFLines",&AnonStates)
t_phycon phycon
Definition: phycon.cpp:6
t_LineSave LineSave
Definition: lines.cpp:10
const int ipHe2p1P
Definition: iso.h:51
FILE * ioQQQ
Definition: cddefines.cpp:7
const int ipHe1s1S
Definition: iso.h:43
TransitionList TauLine2("TauLine2",&AnonStates)
void lines_continuum(void)
realnum energy(long n) const
Definition: yield.h:63
long int nSpecies
Definition: taulines.cpp:22
vector< LinSv > lines
Definition: lines.h:132
const int ipSULPHUR
Definition: cddefines.h:364
void PntForLine(double wavelength, const char *chLabel, long int *ipnt)
t_dense dense
Definition: global.cpp:15
realnum AugerO3
Definition: oxy.h:31
double te005
Definition: phycon.h:58
static t_ADfA & Inst()
Definition: cddefines.h:209
bool associated() const
Definition: transition.h:54
t_iso_sp iso_sp[NISO][LIMELM]
Definition: iso.cpp:11
void lines(void)
Definition: prt_lines.cpp:35
double xIonDense[LIMELM][LIMELM+1]
Definition: dense.h:135
long int iteration
Definition: cddefines.cpp:16
t_trace trace
Definition: trace.cpp:5
t_ionbal ionbal
Definition: ionbal.cpp:8
realnum fegrain
Definition: fe.h:15
bool lgdBaseSourceExists[LIMELM][LIMELM+1]
Definition: atmdat.h:452
ColliderList colliders(dense)
const int ipIRON
Definition: cddefines.h:374
long ipoint(double energy_ryd)
Definition: cont_ipoint.cpp:15
long int nLyman_max[NISO]
Definition: iso.h:352
const TransitionProxy getComponent(long ind)
Definition: lines.h:215
#define POW2
Definition: cddefines.h:979
double energy(const genericState &gs)
const int ipH1s
Definition: iso.h:29
#define STATIC
Definition: cddefines.h:118
bool lgTrace
Definition: trace.h:12
void lines_hydro(void)
double & xIntensity() const
Definition: emission.h:540
EmissionList::reference Emis() const
Definition: transition.h:447
LinSv * linadd(double xEmiss, realnum wavelength, const char *chLab, char chInfo, const char *chComment)
multi_arr< int, 3 > ipExtraLymanLines
Definition: taulines.cpp:24
void iso_satellite_update(long nelem)
t_mole_local mole
Definition: mole.cpp:8
t_rfield rfield
Definition: rfield.cpp:9
void lines_helium(void)
double HCharExcRecTo_N0_2D
Definition: atmdat.h:307
long & ipCont() const
Definition: transition.h:489
realnum s7325
Definition: oxy.h:34
float realnum
Definition: cddefines.h:124
#define EXIT_FAILURE
Definition: cddefines.h:168
int ipoint(long n) const
Definition: yield.h:74
qList::iterator Hi() const
Definition: transition.h:435
t_hydro hydro
Definition: hydrogenic.cpp:5
double cmheat
Definition: rfield.h:275
#define cdEXIT(FAIL)
Definition: cddefines.h:482
const int ipNEON
Definition: cddefines.h:358
double totcol
Definition: thermal.h:130
int nlines() const
Definition: yield.h:76
realnum wlAirVac(double wlAir)
sys_float safe_div(sys_float x, sys_float y, sys_float res_0by0)
Definition: cddefines.h:1011
realnum fracin
Definition: rt.h:174
long nWindLine
Definition: cdinit.cpp:19
static bool lgMustPrintHeader
Definition: save_line.cpp:270
t_radius radius
Definition: radius.cpp:5
void lines_general(void)
double heating(long nelem, long ion)
Definition: thermal.h:186
double **** PhotoRate_Shell
Definition: ionbal.h:112
bool lgElmtOn[LIMELM]
Definition: dense.h:160
TransitionProxy trans(const long ipHi, const long ipLo)
Definition: iso.h:473
const int ipSILICON
Definition: cddefines.h:362
const int ipH2p
Definition: iso.h:31
double GetLineRec(long int ip, long int lWl)
Definition: transition.cpp:107
void PutLine(const TransitionProxy &t, const char *chComment, const char *chLabelTemp, const ExtraInten &extra)
Definition: transition.cpp:318
void lines_molecules(void)
long int nComment
Definition: lines.h:90
const int ipALUMINIUM
Definition: cddefines.h:361
const int ipCALCIUM
Definition: cddefines.h:368
const int ipNITROGEN
Definition: cddefines.h:355
long int cdLine(const char *chLabel, realnum wavelength, double *relint, double *absint)
Definition: cddrive.cpp:1067
const int ipH_LIKE
Definition: iso.h:64
vector< vector< TransitionList > > ExtraLymanLines
Definition: taulines.cpp:25
const int LIMELM
Definition: cddefines.h:308
const int ipHe2p3P2
Definition: iso.h:50
realnum RecCoefCNO[4][NRECCOEFCNO]
Definition: lines.h:126
CollisionProxy Coll() const
Definition: transition.h:463
double te40
Definition: phycon.h:58
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
void addComponent(const char *species, const double wavelength)
Definition: lines.cpp:194
const int ipHELIUM
Definition: cddefines.h:350
double te10
Definition: phycon.h:58
realnum cooling_max
Definition: hyperfine.h:65
double te20
Definition: phycon.h:58
vector< species > dBaseSpecies
Definition: taulines.cpp:15
double eden
Definition: dense.h:201
t_oxy oxy
Definition: oxy.cpp:5
#define MAX2(a, b)
Definition: cddefines.h:824
int fprintf(const Output &stream, const char *format,...)
Definition: service.cpp:1121
double te70
Definition: phycon.h:58
double dissoc_rate(const char chSpecies[]) const
double & xObsIntensity() const
Definition: emission.h:545
STATIC void Drive_cdLine(void)
Definition: prt_lines.cpp:2010
realnum d5007r
Definition: oxy.h:19
sys_float SDIV(sys_float x)
Definition: cddefines.h:1002
double alogte
Definition: phycon.h:92
const int ipCARBON
Definition: cddefines.h:354
#define S(I_, J_)
realnum s3727
Definition: oxy.h:34
void SpeciesBandsAccum()
void SpeciesPseudoContAccum()
long int nsum
Definition: lines.h:87
void rec_lines(double t, realnum r[][NRECCOEFCNO])
double sqrte
Definition: phycon.h:58
realnum yield(long n) const
Definition: yield.h:65
#define fixit(a)
Definition: cddefines.h:417
double PrtLineSum(void)
Definition: prt_linesum.cpp:78
void ShowMe(void)
Definition: service.cpp:205
vector< TransitionList > dBaseTrans
Definition: taulines.cpp:18
double te
Definition: phycon.h:21
realnum fekcld
Definition: fe.h:11
const int ipHYDROGEN
Definition: cddefines.h:349
double te04
Definition: phycon.h:58
STATIC void lines_iron_Ka()
Definition: prt_lines.cpp:2036
void makeBlend(const char *species, const double wavelength, const double width)
Definition: lines.cpp:210
realnum & Aul() const
Definition: emission.h:690
Definition: lines.h:157
long int numLevels_local
Definition: iso.h:529
long int nCollapsed_local
Definition: iso.h:519
double te30
Definition: phycon.h:58
double ColUL(const ColliderList &colls) const
Definition: collision.h:106
long int ipass
Definition: lines.h:96
EmissionList & Emis()
Definition: transition.h:363
double dVeffAper
Definition: radius.h:93
const int ipSODIUM
Definition: cddefines.h:359
double ctot
Definition: thermal.h:130
void lines_grains(void)
long int StuffComment(const char *chComment)
Definition: prt_final.cpp:1938
t_rt rt
Definition: rt.cpp:5