cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
abundances.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*AbundancesPrt print all abundances, both gas phase and grains */
4 /*AbundancesSet sets initial abundances after parameters are entered by reading input */
5 /*AbundancesTable interpolate on table of points to do 'element table' command, */
6 /*PrtElem print chemical composition at start of calculation */
7 #include "cddefines.h"
8 #include "physconst.h"
9 #include "phycon.h"
10 #include "called.h"
11 #include "stopcalc.h"
12 #include "thermal.h"
13 #include "trace.h"
14 #include "elementnames.h"
15 #include "dense.h"
16 #include "radius.h"
17 #include "grainvar.h"
18 #include "abund.h"
19 
20 /*PrtElem print chemical composition at start of calculation */
21 STATIC void PrtElem(
22  /* the job to do, the options are "init", "fill", "flus" */
23  const char *chJob,
24  /* label for the element */
25  const char *chLabl,
26  /* its abundance */
27  double abund_prt);
28 
29 /*AbundancesPrt print all abundances, both gas phase and grains */
30 void AbundancesPrt( void )
31 {
32  long int i,
33  nd;
34  double GrainNumRelHydrSilicate ,
35  GrainNumRelHydrCarbonaceous ,
36  GrainNumRelHydr_PAH,
37  GrainMassRelHydrSilicate,
38  GrainMassRelHydrCarbonaceous,
39  GrainMassRelHydr_PAH;
40 
41  DEBUG_ENTRY( "AbundancesPrt()" );
42 
43  /* this is main loop to print abundances of each element */
44  if( called.lgTalk )
45  {
46  PrtElem("initG"," ",0.);/* initialize print routine for gas*/
47  for( i=0; i < LIMELM; i++ )
48  {
49  if( dense.lgElmtOn[i] )
50  {
51  /* fill in print buffer with abundances */
52  PrtElem("fill",(char*)elementnames.chElementSym[i],
53  abund.solar[i]);
54  }
55  }
56 
57  /* flush the print buffer */
58  PrtElem("flus"," ",0.);
59  /* final carriage return */
60  fprintf( ioQQQ, " \n" );
61 
62  /* now grains if present */
63  if( gv.lgDustOn )
64  {
65  /* we will first print the total abundances of each element locked up in grains */
66  /* initialize print routine for dust*/
67  PrtElem("initD"," ",0.);
68  for( i=0; i < LIMELM; i++ )
69  {
70  if( gv.elmSumAbund[i]>SMALLFLOAT )
71  {
72  /* fill in print buffer with abundances */
73  PrtElem("fill",(char*)elementnames.chElementSym[i],
75  }
76  }
77  /* flush the print buffer */
78  PrtElem("flus"," ",0.);
79  /* final carriage return */
80  fprintf( ioQQQ, " \n" );
81 
82  /* this is used to store grain number density per hydrogen */
83  GrainNumRelHydrSilicate = 0.;
84  GrainNumRelHydrCarbonaceous = 0;
85  GrainNumRelHydr_PAH = 0.;
86  GrainMassRelHydrSilicate = 0.;
87  GrainMassRelHydrCarbonaceous = 0;
88  GrainMassRelHydr_PAH = 0.;
89 
90  for( nd=0; nd < gv.nBin; nd++ )
91  {
92 
93  /* number density of grains per hydrogen, the ratio
94  * gv.bin[nd]->IntVol/gv.bin[nd]->AvVol is the number of grain particles
95  * per H at standard grain abundance*/
96  realnum DensityNumberPerHydrogen =
97  (gv.bin[nd]->IntVol/gv.bin[nd]->AvVol)*gv.bin[nd]->dstAbund /
98  gv.bin[nd]->GrnVryDpth;
99  /* mass of grains per hydrogen */
100  realnum DensityMassPerHydrogen =
101  gv.bin[nd]->IntVol*gv.bin[nd]->dustp[0]*gv.bin[nd]->dstAbund/
103  /*(gv.bin[nd]->IntVol/gv.bin[nd]->AvVol)*gv.bin[nd]->dstAbund*
104  gv.bin[nd]->atomWeight / gv.bin[nd]->GrnVryDpth;*/
105 
106  /* >>chng 06 mar 05, fix expression for calculating grain number density, PvH */
107  if( gv.bin[nd]->matType == MAT_CAR || gv.bin[nd]->matType == MAT_CAR2 )
108  {
109  /* carbonaceous grains */
110  GrainNumRelHydrCarbonaceous += DensityNumberPerHydrogen;
111  GrainMassRelHydrCarbonaceous += DensityMassPerHydrogen;
112  }
113  else if( gv.bin[nd]->matType == MAT_SIL || gv.bin[nd]->matType == MAT_SIL2 )
114  {
115  /* silicate grains */
116  GrainNumRelHydrSilicate += DensityNumberPerHydrogen;
117  GrainMassRelHydrSilicate += DensityMassPerHydrogen;
118  }
119  else if( gv.bin[nd]->matType == MAT_PAH || gv.bin[nd]->matType == MAT_PAH2 )
120  {
121  /* PAHs - full abundance - remove possible factor accounting for
122  * variation of abundances with physical conditions - this will
123  * be the PAH abundance with scale factor of unity */
124  GrainNumRelHydr_PAH += DensityNumberPerHydrogen;
125  GrainMassRelHydr_PAH += DensityMassPerHydrogen;
126  }
127  else
128  TotalInsanity();
129  }
130 
131  /* now print total number of grains of each type */
132  fprintf(ioQQQ," Number of grains per hydrogen (scale=1) Mass of grains per hydrogen (scale=1)\n");
133  fprintf(ioQQQ," Carbonaceous: %.3f Silicate: %.3f PAH: %.3f Carbonaceous: %.3f Silicate: %.3f PAH: %.3f\n\n" ,
134  log10( MAX2( 1e-30, GrainNumRelHydrCarbonaceous ) ) ,
135  log10( MAX2( 1e-30, GrainNumRelHydrSilicate ) ) ,
136  log10( MAX2( 1e-30, GrainNumRelHydr_PAH ) ) ,
137  log10( MAX2( 1e-30, GrainMassRelHydrCarbonaceous ) ) ,
138  log10( MAX2( 1e-30, GrainMassRelHydrSilicate ) ) ,
139  log10( MAX2( 1e-30, GrainMassRelHydr_PAH ) ) );
140  }
141  }
142  return;
143 }
144 
145 /*AbundancesSet print all abundances, both gas phase and grains */
146 void AbundancesSet(void)
147 {
148  long int i,
149  nelem;
150  double fac;
151  static bool lgFirstCall=true;
152  static bool lgElOnOff[LIMELM];
153 
154  DEBUG_ENTRY( "AbundancesSet()" );
155 
156  /* if this is the first call to this routine in this core load,
157  * save the state of the lgElmOn array, so that it is possible
158  * to turn off elements in later models, but not turn on an
159  * element that was initially turned off. This is necessary since
160  * the Create... routines that create space for elements will
161  * not be revisited in later models. You can turn off an initially
162  * enabled element, but not turn a disabled one on. */
163 
164  if( lgFirstCall )
165  {
166  /* first call - save the initial state of the lgElmtOn vector */
167  for( i=0; i<LIMELM; ++i )
168  {
169  lgElOnOff[i] = dense.lgElmtOn[i];
170  }
171  }
172  lgFirstCall = false;
173 
174  /* make sure that initially false elements remain off, while letting
175  * enabled elements be turned off */
176  for( i=ipHYDROGEN; i<LIMELM; ++i )
177  {
178  dense.lgElmtOn[i] = lgElOnOff[i] && dense.lgElmtOn[i];
179  }
180 
181  /* rescale so that abundances are H=1 */
182  for( i=ipHELIUM; i < LIMELM; i++ )
183  {
184  abund.solar[i] /= abund.solar[0];
185  }
186  abund.solar[ipHYDROGEN] = 1.;
187 
188  /* set current abundances to "solar" times metals scale factor
189  * and grain depletion factor */
191 
192  /* option for density or abundance variations, this flag is true by default,
193  * set in zero, but set false if variations are enabled AND these
194  * are not density variations, but rather abundances */
195  if( dense.lgDenFlucOn )
196  {
197  /* usual case - either density fluctuations or none at all */
198  fac = 1.;
199  }
200  else
201  {
202  /* abundance fluctuations enabled, set initial value */
203  fac = dense.cfirst*cos(dense.flcPhase) + dense.csecnd;
204  }
205 
206  for( i=ipLITHIUM; i < LIMELM; i++ )
207  {
209  abund.ScaleElement[i]*fac);
210  }
211 
212  /* now fix abundance of any element with element table set */
213  if( abund.lgAbTaON )
214  {
215  for( nelem=ipHELIUM; nelem < LIMELM; ++nelem )
216  {
217  if( abund.lgAbunTabl[nelem] )
218  {
220  radius.depth,nelem+1));
221  }
222  }
223  }
224 
225  /* dense.gas_phase[nelem] contains total abundance of element */
226  /* the density of hydrogen itself has already been set at this point -
227  * it is set when commands parsed, most likely by the hden command -
228  * set all heavier elements */
229  for( nelem=ipHELIUM; nelem < LIMELM; ++nelem )
230  {
231  /* this implements the element off limit xxx command, where
232  * xxx is the limit to the smallest n(A)/n(H) that will remain on */
233  if( abund.solar[nelem] < dense.AbundanceLimit )
234  dense.lgElmtOn[nelem] = false;
235 
236  if( dense.lgElmtOn[nelem] )
237  {
239  if( dense.gas_phase[nelem] <= 0. )
240  {
241  fprintf( ioQQQ, " Abundances must be greater than zero. "
242  "Check entered abundance for element%3ld = %2.2s\n",
243  nelem, elementnames.chElementSym[nelem] );
244  cdEXIT(EXIT_FAILURE);
245  }
246  else if( dense.gas_phase[nelem] < SMALLFLOAT )
247  {
248  fprintf(ioQQQ," Abundance for %s is %.2e, less than lower "
249  "limit of %.3e, so turning element off.\n",
250  elementnames.chElementSym[nelem],
251  dense.gas_phase[nelem],
252  SMALLFLOAT );
253  dense.lgElmtOn[nelem] = false;
254  }
255  }
256  else
257  {
258  /* >>chng 04 apr 20, set to zero if element is off */
259  dense.gas_phase[nelem] = 0.;
260  }
261  }
262 
263  /* if stop temp set below default then we are going into cold and possibly
264  * molecular gas - check some parameters in this case */
266  /* thermal.ConstTemp def is zero, set pos when used */
268  {
269 
270  /* print warning if temperature set below default but C > O */
272  {
273  fprintf( ioQQQ, "\n >>> \n"
274  " >>> The simulation is going into possibly molecular gas but the carbon/oxygen abundance ratio is greater than unity.\n" );
275  fprintf( ioQQQ, " >>> Standard interstellar chemistry networks are designed for environments with C/O < 1.\n" );
276  fprintf( ioQQQ, " >>> The chemistry network may (or may not) collapse deep in molecular regions where CO is fully formed.\n" );
277  fprintf( ioQQQ, " >>> \n\n\n\n\n" );
278  }
279  }
280 
281  if( trace.lgTrace )
282  {
283  realnum sumx , sumy , sumz = 0.;
284 
287 
288  fprintf( ioQQQ, "\n AbundancesSet sets following densities (cm^-3); \n" );
289  for( i=0; i<3; i++ )
290  {
291  for( nelem=i*10; nelem < i*10+10; nelem++ )
292  {
293  fprintf( ioQQQ, " %2.2s", elementnames.chElementSym[nelem] );
294  PrintE82( ioQQQ, dense.gas_phase[nelem] );
295  if( nelem>ipHELIUM )
296  sumz += dense.gas_phase[nelem]*dense.AtomicWeight[nelem];
297  }
298  fprintf( ioQQQ, " \n" );
299  }
300  fprintf( ioQQQ, "\n AbundancesSet sets following abundances rel to H; \n" );
301  for( i=0; i<3; i++ )
302  {
303  for( nelem=i*10; nelem < i*10+10; nelem++ )
304  {
305  fprintf( ioQQQ, " %2.2s", elementnames.chElementSym[nelem] );
307  }
308  fprintf( ioQQQ, " \n" );
309  }
310  fprintf( ioQQQ, " \n" );
311  fprintf(ioQQQ," Gas-phase mass fractions, X:%.3e Y:%.3e Z:%.3e\n\n",
312  sumx/SDIV(sumx+sumy+sumz) ,
313  sumy/SDIV(sumx+sumy+sumz) ,
314  sumz/SDIV(sumx+sumy+sumz) );
315  }
316  return;
317 }
318 
319 /* this is number of elements across one line */
320 #define NELEM1LINE 9
321 
322 /*PrtElem print chemical composition at start of calculation */
324  /* the job to do, the options are "init", "fill", "flus" */
325  const char *chJob,
326  /* label for the element */
327  const char *chLabl,
328  /* its abundance */
329  double abund_prt)
330 {
331  static char chAllLabels[NELEM1LINE][14];/* buffer where elements will be stored*/
332  long int i,
333  noffset;
334  static long int nelem; /* counter for number of elements read in*/
335 
336  DEBUG_ENTRY( "PrtElem()" );
337 
338  if( strcmp(chJob,"initG") == 0 )
339  {
340  /* gas phase abundances */
341  nelem = 0;
342  fprintf( ioQQQ,
343  " Gas Phase Chemical Composition\n" );
344  }
345  else if( strcmp(chJob,"initD") == 0 )
346  {
347  /* abundances in grains */
348  nelem = 0;
349  fprintf( ioQQQ,
350  " Grain Chemical Composition\n" );
351  }
352 
353  else if( strcmp(chJob,"fill") == 0 )
354  {
355  /* print log of abundance to avoid exponential output */
356  abund_prt = log10( abund_prt );
357  /* stuff in labels and abundances */
358  sprintf( chAllLabels[nelem], " %2.2s:%8.4f", chLabl, abund_prt );
359  if( nelem == NELEM1LINE-1 )
360  {
361  /* we hit as many as it will hold - print it out and reset*/
362  fprintf( ioQQQ, " " );
363  for( i=0; i < NELEM1LINE; i++ )
364  {
365  fprintf( ioQQQ, "%13.13s", chAllLabels[i] );
366  }
367  fprintf( ioQQQ, "\n" );
368  /* reset counter to zero */
369  nelem = 0;
370  }
371  else
372  {
373  /* just increment */
374  ++nelem;
375  }
376  }
377 
378 # if 0
379  /* Do this if you want to know about PAH number abundance */
380  else if( strcmp(chJob,"fillp") == 0 )
381  {
382  /* print log of abundance to avoid exponential output */
383  abund_prt = log10( abund_prt );
384 
385  /* stuff in labels and abundances */
386  sprintf( chAllLabels[nelem], " %2.2s:%8.4f", chLabl, abund_prt );
387  if( nelem == NELEM1LINE-1 )
388  {
389  /* we hit as many as it will hold - print it out and reset*/
390  fprintf( ioQQQ, " " );
391  for( i=0; i < NELEM1LINE; i++ )
392  {
393  fprintf( ioQQQ, "%13.13s", chAllLabels[i] );
394  }
395  fprintf( ioQQQ, "\n" );
396  /* reset counter to zero */
397  nelem = 0;
398  }
399  else
400  {
401  /* just increment */
402  ++nelem;
403  }
404  }
405 # endif
406 
407  else if( strcmp(chJob,"flus") == 0 )
408  {
409  /* flush the stack */
410  i = NELEM1LINE - (nelem - 2);
411  noffset = i/2-1;
412  /* make format pretty */
413  fprintf( ioQQQ, " " );
414 
415  for(i=0; i < noffset; i++)
416  {
417  /* skip out this many fields */
418  fprintf( ioQQQ, " " );
419  }
420 
421  /* if nelem is even we need to space out another 8 */
422  if( !(nelem%2) && nelem > 0)
423  fprintf( ioQQQ," ");
424 
425  for( i=0; i < nelem; i++ )
426  {
427  fprintf( ioQQQ, "%13.13s", chAllLabels[i] );
428  }
429 
430  fprintf( ioQQQ, "\n" );
431  }
432  else
433  {
434  fprintf( ioQQQ, " PrtElem does not understand job=%4.4s\n",
435  chJob );
436  cdEXIT(EXIT_FAILURE);
437  }
438  return;
439 }
440 
441 
442 /*AbundancesTable interpolate on table of points to do 'element table' command, */
443 double AbundancesTable(double r0,
444  double depth,
445  long int iel)
446 {
447  bool lgHit;
448  long int j;
449  double frac,
450  tababun_v,
451  x;
452 
453  DEBUG_ENTRY( "AbundancesTable()" );
454  /* interpolate on table of points to do 'element table' command, based
455  * on code by K Volk, each line is log radius and abundance. */
456 
457  /* interpolate on radius or depth? */
458  if( abund.lgAbTaDepth[iel-1] )
459  {
460  /* depth key appeared = we want depth */
461  x = log10(depth);
462  }
463  else
464  {
465  /* use radius */
466  x = log10(r0);
467  }
468 
469  /* this will be reset below, but is here as a safety check */
470  tababun_v = -DBL_MAX;
471 
472  if( x < abund.AbTabRad[0][iel-1] || x >= abund.AbTabRad[abund.nAbunTabl-1][iel-1] )
473  {
474  fprintf( ioQQQ, " requested radius outside range of AbundancesTable\n" );
475  fprintf( ioQQQ, " radius was%10.2e min, max=%10.2e%10.2e\n",
476  x, abund.AbTabRad[0][iel-1], abund.AbTabRad[abund.nAbunTabl-1][iel-1] );
477  cdEXIT(EXIT_FAILURE);
478  }
479 
480  else
481  {
482  lgHit = false;
483  j = 1;
484 
485  while( !lgHit && j <= abund.nAbunTabl - 1 )
486  {
487  if( abund.AbTabRad[j-1][iel-1] <= (realnum)x &&
488  abund.AbTabRad[j][iel-1] > (realnum)x )
489  {
490  frac = (x - abund.AbTabRad[j-1][iel-1])/(abund.AbTabRad[j][iel-1] -
491  abund.AbTabRad[j-1][iel-1]);
492  tababun_v = abund.AbTabFac[j-1][iel-1] + frac*
493  (abund.AbTabFac[j][iel-1] - abund.AbTabFac[j-1][iel-1]);
494  lgHit = true;
495  }
496  ++j;
497  }
498 
499  if( !lgHit )
500  {
501  fprintf( ioQQQ, " radius outran dlaw table scale, requested=%6.2f largest=%6.2f\n",
502  x, abund.AbTabRad[abund.nAbunTabl-1][iel-1] );
503  cdEXIT(EXIT_FAILURE);
504  }
505  }
506 
507  /* got it, now return value, not log of density */
508  tababun_v = pow(10.,tababun_v);
509  return( tababun_v );
510 }
511 
512 #ifdef _MSC_VER
513 # pragma warning( disable : 4305 )/* disable const double to float warning in MS VS -
514  very large number of warns result */
515 #endif
516 /*AbundancesZero set initial abundances for different mixes */
517 void AbundancesZero(void)
518 {
519  long int i;
520 
521  DEBUG_ENTRY( "AbundancesZero()" );
522 
523  /* solar abundances
524  * >>refer solar abund Grevesse, N., & Sauval, A.J., 2001, Space Science Review, 85, 161-174 */
525  /* >>chng 02 aug 20, update to these values */
526  abund.SolarSave[ipHYDROGEN] = 1.0f;
527  abund.SolarSave[ipHELIUM] = 0.100f;
528  abund.SolarSave[ipLITHIUM] = 2.04e-9f;
529  abund.SolarSave[ipBERYLLIUM] = 2.63e-11f;
530  abund.SolarSave[ipBORON] = 6.17E-10f;
531  /* >>chng 02 jul 30, from 3.55 to 2.45, */
532  /* >>refer C abund Allende Prieto, C.,
533  * >>refercon Lambert, D.L., & Asplund, M., 2002, ApJ, 573, L137 */
534  abund.SolarSave[ipCARBON] = 2.45e-4f;
535  /* >>chng 02 jul 30, from 9.33 to 8.53, */
536  /* >>refer N abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic
537  * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher:
538  * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern,
539  * >>refercon Switzerland, March 6 - 9, 2001., p.23 */
540  abund.SolarSave[ipNITROGEN] = 8.51e-5f;
541  /* >>chng 02 jul 30, from 7.41 to 4.90, */
542  /* >>refer O abund Allende Prieto, C.,
543  * >>refercon Lambert, D.L., & Asplund, M., 2001, ApJ, 556, L63 */
544  abund.SolarSave[ipOXYGEN] = 4.90e-4f;
545  abund.SolarSave[ipFLUORINE] = 3.02e-8f;
546  /* >>chng 02 jul 30, from 1.17 to 1.00, */
547  /* >>refer Ne abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic
548  * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher:
549  * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern,
550  * >>refercon Switzerland, March 6 - 9, 2001., p.23 */
551  abund.SolarSave[ipNEON] = 1.00e-4f;
552  abund.SolarSave[ipSODIUM] = 2.14e-6f;
553  /* >>chng 02 jul 30, from 3.80 to 3.45, */
554  /* >>refer Mg abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic
555  * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher:
556  * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern,
557  * >>refercon Switzerland, March 6 - 9, 2001., p.23 */
558  abund.SolarSave[ipMAGNESIUM] = 3.47e-5f;
559  abund.SolarSave[ipALUMINIUM] = 2.95e-6f;
560  /* >>chng 02 jul 30, from 3.55 to 3.44, */
561  /* >>refer Si abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic
562  * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher:
563  * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern,
564  * >>refercon Switzerland, March 6 - 9, 2001., p.23 */
565  abund.SolarSave[ipSILICON] = 3.47e-5f;
566  abund.SolarSave[ipPHOSPHORUS] = 3.20e-7f;
567  abund.SolarSave[ipSULPHUR] = 1.84e-5f;
568  abund.SolarSave[ipCHLORINE] = 1.91e-7f;
569  abund.SolarSave[ipARGON] = 2.51e-6f;
570  abund.SolarSave[ipPOTASSIUM] = 1.32e-7f;
571  abund.SolarSave[ipCALCIUM] = 2.29e-6f;
572  abund.SolarSave[ipSCANDIUM] = 1.48e-9f;
573  abund.SolarSave[ipTITANIUM] = 1.05e-7f;
574  abund.SolarSave[ipVANADIUM] = 1.00e-8f;
575  abund.SolarSave[ipCHROMIUM] = 4.68e-7f;
576  abund.SolarSave[ipMANGANESE] = 2.88e-7f;
577  /* >>chng 02 jul 30, from 3.24 to 2.81, */
578  /* >>refer Fe abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic
579  * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher:
580  * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern,
581  * >>refercon Switzerland, March 6 - 9, 2001., p.23 */
582  abund.SolarSave[ipIRON] = 2.82e-5f;
583  abund.SolarSave[ipCOBALT] = 8.32e-8f;
584  abund.SolarSave[ipNICKEL] = 1.78e-6f;
585  abund.SolarSave[ipCOPPER] = 1.62e-8f;
586  abund.SolarSave[ipZINC] = 3.98e-8f;
587 
588  /* abundance set from pre-c96 */
589  /* solar abundances Grevesse and Anders 1989, Grevesse and Noel 1993 */
590  abund.OldSolar84[ipHYDROGEN] = 1.0;
591  abund.OldSolar84[ipHELIUM] = 0.100;
592  abund.OldSolar84[ipLITHIUM] = 2.04e-9;
593  abund.OldSolar84[ipBERYLLIUM] = 2.63e-11;
594  abund.OldSolar84[ipBORON] = 7.59e-10;
595  abund.OldSolar84[ipCARBON] = 3.55e-4;
596  abund.OldSolar84[ipNITROGEN] = 9.33e-5;
597  abund.OldSolar84[ipOXYGEN] = 7.41e-4;
598  abund.OldSolar84[ipFLUORINE] = 3.02e-8;
599  abund.OldSolar84[ipNEON] = 1.17e-4;
600  abund.OldSolar84[ipSODIUM] = 2.06e-6;
601  abund.OldSolar84[ipMAGNESIUM] = 3.80e-5;
602  abund.OldSolar84[ipALUMINIUM] = 2.95e-6;
603  abund.OldSolar84[ipSILICON] = 3.55e-5;
604  abund.OldSolar84[ipPHOSPHORUS] = 3.73e-7;
605  abund.OldSolar84[ipSULPHUR] = 1.62e-5;
606  abund.OldSolar84[ipCHLORINE] = 1.88e-7;
607  abund.OldSolar84[ipARGON] = 3.98e-6;
608  abund.OldSolar84[ipPOTASSIUM] = 1.35e-7;
609  abund.OldSolar84[ipCALCIUM] = 2.29e-6;
610  abund.OldSolar84[ipSCANDIUM] = 1.58e-9;
611  abund.OldSolar84[ipTITANIUM] = 1.10e-7;
612  abund.OldSolar84[ipVANADIUM] = 1.05e-8;
613  abund.OldSolar84[ipCHROMIUM] = 4.84e-7;
614  abund.OldSolar84[ipMANGANESE] = 3.42e-7;
615  abund.OldSolar84[ipIRON] = 3.24e-5;
616  abund.OldSolar84[ipCOBALT] = 8.32e-8;
617  abund.OldSolar84[ipNICKEL] = 1.76e-6;
618  abund.OldSolar84[ipCOPPER] = 1.87e-8;
619  abund.OldSolar84[ipZINC] = 4.52e-8;
620 
621  /* Nova Cyg 75 abundances, C, O, NE UP 20, NIT UP 100, REST SOLAR AR */
622  abund.anova[ipHYDROGEN] = 1.0;
623  abund.anova[ipHELIUM] = 0.098;
624  abund.anova[ipLITHIUM] = 2.04e-9;
625  abund.anova[ipBERYLLIUM] = 2.6e-11;
626  abund.anova[ipBORON] = 7.60e-9;
627  abund.anova[ipCARBON] = 9.4e-4;
628  abund.anova[ipNITROGEN] = 9.8e-3;
629  abund.anova[ipOXYGEN] = 1.7e-2;
630  abund.anova[ipFLUORINE] = 3.02e-8;
631  abund.anova[ipNEON] = 2.03e-3;
632  abund.anova[ipSODIUM] = 2.06e-6;
633  abund.anova[ipMAGNESIUM] = 3.80e-5;
634  abund.anova[ipALUMINIUM] = 2.95e-6;
635  abund.anova[ipSILICON] = 3.55e-5;
636  abund.anova[ipPHOSPHORUS] = 3.73e-7;
637  abund.anova[ipSULPHUR] = 1.62e-5;
638  abund.anova[ipCHLORINE] = 1.88e-7;
639  abund.anova[ipARGON] = 3.63e-6;
640  abund.anova[ipPOTASSIUM] = 1.35e-7;
641  abund.anova[ipCALCIUM] = 2.29e-6;
642  abund.anova[ipSCANDIUM] = 1.22e-9;
643  abund.anova[ipTITANIUM] = 8.60e-8;
644  abund.anova[ipVANADIUM] = 1.05e-8;
645  abund.anova[ipCHROMIUM] = 4.84e-7;
646  abund.anova[ipMANGANESE] = 3.42e-7;
647  abund.anova[ipIRON] = 4.68e-5;
648  abund.anova[ipCOBALT] = 2.24e-9;
649  abund.anova[ipNICKEL] = 1.76e-6;
650  abund.anova[ipCOPPER] = 1.87e-8;
651  abund.anova[ipZINC] = 4.52e-8;
652 
653  /* primordial abundances */
654  abund.aprim[ipHYDROGEN] = 1.0;
655  abund.aprim[ipHELIUM] = 0.072;
656  abund.aprim[ipLITHIUM] = 1e-10;
657  abund.aprim[ipBERYLLIUM] = 1e-16;
658 
659  for( i=4; i < LIMELM; i++ )
660  {
661  abund.aprim[i] = 1e-25;
662  }
663 
664  /* typical ISM abundances, mean of Table 3, Cowie+Songaila, Ann Rev '86
665  * also Table 5, Savage and Sembach, Ann Rev 1996 */
666  abund.aism[ipHYDROGEN] = 1.;
667  abund.aism[ipHELIUM] = 0.098;
668  abund.aism[ipLITHIUM] = 5.4e-11;
669  abund.aism[ipBERYLLIUM] = 1e-20;
670  abund.aism[ipBORON] = 8.9e-11;
671  abund.aism[ipCARBON] = 2.51e-4;
672  abund.aism[ipNITROGEN] = 7.94e-5;
673  /* >>chng >>01 feb 19, from 5.01e-4 to 3.19e-4, value from */
674  /* >>refer O abundance Meyers, D.M., Jura, M., & Cardelli, J.A., 1998, ApJ, 493, 222-229 */
675  /* they quote 3.19 +/- 0.14 e-4 */
676  abund.aism[ipOXYGEN] = 3.19e-4;
677  abund.aism[ipFLUORINE] = 1e-20;
678  abund.aism[ipNEON] = 1.23e-4;
679  abund.aism[ipSODIUM] = 3.16e-7;
680  abund.aism[ipMAGNESIUM] = 1.26e-5;
681  abund.aism[ipALUMINIUM] = 7.94e-8;
682  abund.aism[ipSILICON] = 3.16e-6;
683  abund.aism[ipPHOSPHORUS] = 1.6e-7;
684  abund.aism[ipSULPHUR] = 3.24e-5;
685  abund.aism[ipCHLORINE] = 1e-7;
686  abund.aism[ipARGON] = 2.82e-6;
687  abund.aism[ipPOTASSIUM] = 1.1e-8;
688  abund.aism[ipCALCIUM] = 4.1e-10;
689  abund.aism[ipSCANDIUM] = 1e-20;
690  abund.aism[ipTITANIUM] = 5.8e-10;
691  abund.aism[ipVANADIUM] = 1.0e-10;
692  abund.aism[ipCHROMIUM] = 1.0e-8;
693  abund.aism[ipMANGANESE] = 2.3e-8;
694  abund.aism[ipIRON] = 6.31e-7;
695  abund.aism[ipCOBALT] = 1e-20;
696  abund.aism[ipNICKEL] = 1.82e-8;
697  abund.aism[ipCOPPER] = 1.5e-9;
698  abund.aism[ipZINC] = 2.0e-8;
699 
700  /* HII region abundances, Orion mean of Baldwin et al, Rubin et al,
701  * and DEO et al, all 1991 apj
702  * also Table 5, Savage and Sembach, Ann Rev 1996 for ism */
703  abund.ahii[ipHYDROGEN] = 1.;
704  abund.ahii[ipHELIUM] = 0.095;
705  abund.ahii[ipLITHIUM] = 5.4e-11;
706  abund.ahii[ipBERYLLIUM] = 1e-20;
707  abund.ahii[ipBORON] = 8.9e-11;
708  abund.ahii[ipCARBON] = 3.e-4;
709  abund.ahii[ipNITROGEN] = 7.0e-5;
710  abund.ahii[ipOXYGEN] = 4.0e-4;
711  abund.ahii[ipFLUORINE] = 1e-20;
712  abund.ahii[ipNEON] = 6e-5;
713  abund.ahii[ipSODIUM] = 3e-7;
714  abund.ahii[ipMAGNESIUM] = 3.e-6;
715  abund.ahii[ipALUMINIUM] = 2.e-7;
716  abund.ahii[ipSILICON] = 4.e-6;
717  abund.ahii[ipPHOSPHORUS] = 1.6e-7;
718  abund.ahii[ipSULPHUR] = 1.0e-5;
719  abund.ahii[ipCHLORINE] = 1.e-7;
720  abund.ahii[ipARGON] = 3.e-6;
721  abund.ahii[ipPOTASSIUM] = 1.1e-8;
722  abund.ahii[ipCALCIUM] = 2.e-8;
723  abund.ahii[ipSCANDIUM] = 1e-20;
724  abund.ahii[ipTITANIUM] = 5.8e-10;
725  abund.ahii[ipVANADIUM] = 1.0e-10;
726  abund.ahii[ipCHROMIUM] = 1.0e-8;
727  abund.ahii[ipMANGANESE] = 2.3e-8;
728  abund.ahii[ipIRON] = 3.0e-6;
729  abund.ahii[ipCOBALT] = 1e-20;
730  abund.ahii[ipNICKEL] = 1e-7;
731  abund.ahii[ipCOPPER] = 1.5e-9;
732  abund.ahii[ipZINC] = 2.0e-8;
733 
734  /* PN abund from */
735  /* >>refer PN abundances Aller+Czyzak, ApJ Sup 51, 211 */
736  abund.apn[ipHYDROGEN] = 1.;
737  abund.apn[ipHELIUM] = 0.1;
738  abund.apn[ipLITHIUM] = 1e-20;
739  abund.apn[ipBERYLLIUM] = 1e-20;
740  abund.apn[ipBORON] = 1e-20;
741  abund.apn[ipCARBON] = 7.8e-4;
742  abund.apn[ipNITROGEN] = 1.8e-4;
743  abund.apn[ipOXYGEN] = 4.4e-4;
744  abund.apn[ipFLUORINE] = 3e-7;
745  abund.apn[ipNEON] = 1.1e-4;
746  abund.apn[ipSODIUM] = 1.9e-6;
747  abund.apn[ipMAGNESIUM] = 1.6e-6;
748  abund.apn[ipALUMINIUM] = 2.7e-7;
749  abund.apn[ipSILICON] = 1e-5;
750  abund.apn[ipPHOSPHORUS] = 2e-7;
751  abund.apn[ipSULPHUR] = 1e-5;
752  abund.apn[ipCHLORINE] = 1.7e-7;
753  abund.apn[ipARGON] = 2.7e-6;
754  abund.apn[ipPOTASSIUM] = 1.2e-7;
755  abund.apn[ipCALCIUM] = 1.2e-8;
756  abund.apn[ipSCANDIUM] = 1e-20;
757  abund.apn[ipTITANIUM] = 1e-20;
758  abund.apn[ipVANADIUM] = 1e-20;
759  abund.apn[ipCHROMIUM] = 1e-20;
760  abund.apn[ipMANGANESE] = 1e-20;
761  abund.apn[ipIRON] = 5.0e-7;
762  abund.apn[ipCOBALT] = 1e-20;
763  abund.apn[ipNICKEL] = 1.8e-8;
764  abund.apn[ipCOPPER] = 1e-20;
765  abund.apn[ipZINC] = 1e-20;
766 
767  /* mix from Cameron 1982, in "Essays on Nuclear Astro" */
768  abund.camern[ipHYDROGEN] = 1.;
769  abund.camern[ipHELIUM] = .0677;
770  abund.camern[ipLITHIUM] = 2.2e-9;
771  abund.camern[ipBERYLLIUM] = 4.5e-11;
772  abund.camern[ipBORON] = 3.4e-10;
773  abund.camern[ipCARBON] = 4.22e-4;
774  abund.camern[ipNITROGEN] = 8.72e-5;
775  abund.camern[ipOXYGEN] = 6.93e-4;
776  abund.camern[ipFLUORINE] = 2.9e-8;
777  abund.camern[ipNEON] = 9.77e-5;
778  abund.camern[ipSODIUM] = 2.25e-6;
779  abund.camern[ipMAGNESIUM] = 3.98e-5;
780  abund.camern[ipALUMINIUM] = 3.20e-6;
781  abund.camern[ipSILICON] = 3.76e-5;
782  abund.camern[ipPHOSPHORUS] = 2.4e-7;
783  abund.camern[ipSULPHUR] = 1.88e-5;
784  abund.camern[ipCHLORINE] = 1.78e-7;
785  abund.camern[ipARGON] = 3.99e-6;
786  abund.camern[ipPOTASSIUM] = 1.3e-7;
787  abund.camern[ipCALCIUM] = 2.35e-6;
788  abund.camern[ipSCANDIUM] = 1.16e-9;
789  abund.camern[ipTITANIUM] = 9.0e-8;
790  abund.camern[ipVANADIUM] = 9.5e-9;
791  abund.camern[ipCHROMIUM] = 4.8e-7;
792  abund.camern[ipMANGANESE] = 3.5e-7;
793  abund.camern[ipIRON] = 3.38e-5;
794  abund.camern[ipCOBALT] = 8.27e-8;
795  abund.camern[ipNICKEL] = 1.80e-6;
796  abund.camern[ipCOPPER] = 2.0e-8;
797  abund.camern[ipZINC] = 4.7e-8;
798 
799  /* set logical flags saying whether to include element in AGN tables */
800  /* first set all false, since most not included */
801  for( i=0; i < LIMELM; i++ )
802  {
803  abund.lgAGN[i] = false;
804  }
805  abund.lgAGN[ipHYDROGEN] = true;
806  abund.lgAGN[ipHELIUM] = true;
807  abund.lgAGN[ipCARBON] = true;
808  abund.lgAGN[ipNITROGEN] = true;
809  abund.lgAGN[ipOXYGEN] = true;
810  abund.lgAGN[ipNEON] = true;
811  abund.lgAGN[ipMAGNESIUM] = true;
812  abund.lgAGN[ipSILICON] = true;
813  abund.lgAGN[ipSULPHUR] = true;
814  abund.lgAGN[ipARGON] = true;
815  abund.lgAGN[ipIRON] = true;
816  return;
817 }
818 

Generated for cloudy by doxygen 1.8.1.2