cloudy
trunk
|
00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 /*AbundancesPrt print all abundances, both gas phase and grains */ 00004 /*AbundancesSet sets initial abundances after parameters are entered by reading input */ 00005 /*AbundancesTable interpolate on table of points to do 'element table' command, */ 00006 /*PrtElem print chemical composition at start of calculation */ 00007 #include "cddefines.h" 00008 #include "physconst.h" 00009 #include "phycon.h" 00010 #include "called.h" 00011 #include "stopcalc.h" 00012 #include "thermal.h" 00013 #include "trace.h" 00014 #include "elementnames.h" 00015 #include "dense.h" 00016 #include "radius.h" 00017 #include "grainvar.h" 00018 #include "abund.h" 00019 00020 /*PrtElem print chemical composition at start of calculation */ 00021 STATIC void PrtElem( 00022 /* the job to do, the options are "init", "fill", "flus" */ 00023 const char *chJob, 00024 /* label for the element */ 00025 const char *chLabl, 00026 /* its abundance */ 00027 double abund_prt); 00028 00029 /*AbundancesPrt print all abundances, both gas phase and grains */ 00030 void AbundancesPrt( void ) 00031 { 00032 long int i, 00033 nd; 00034 double GrainNumRelHydrSilicate , 00035 GrainNumRelHydrCarbonaceous , 00036 GrainNumRelHydr_PAH, 00037 GrainMassRelHydrSilicate, 00038 GrainMassRelHydrCarbonaceous, 00039 GrainMassRelHydr_PAH; 00040 00041 DEBUG_ENTRY( "AbundancesPrt()" ); 00042 00043 /* this is main loop to print abundances of each element */ 00044 if( called.lgTalk ) 00045 { 00046 PrtElem("initG"," ",0.);/* initialize print routine for gas*/ 00047 for( i=0; i < LIMELM; i++ ) 00048 { 00049 if( dense.lgElmtOn[i] ) 00050 { 00051 /* fill in print buffer with abundances */ 00052 PrtElem("fill",(char*)elementnames.chElementSym[i], 00053 abund.solar[i]); 00054 } 00055 } 00056 00057 /* flush the print buffer */ 00058 PrtElem("flus"," ",0.); 00059 /* final carriage return */ 00060 fprintf( ioQQQ, " \n" ); 00061 00062 /* now grains if present */ 00063 if( gv.lgDustOn ) 00064 { 00065 /* we will first print the total abundances of each element locked up in grains */ 00066 /* initialize print routine for dust*/ 00067 PrtElem("initD"," ",0.); 00068 for( i=0; i < LIMELM; i++ ) 00069 { 00070 if( gv.elmSumAbund[i]>SMALLFLOAT ) 00071 { 00072 /* fill in print buffer with abundances */ 00073 PrtElem("fill",(char*)elementnames.chElementSym[i], 00074 gv.elmSumAbund[i]/dense.gas_phase[ipHYDROGEN]); 00075 } 00076 } 00077 /* flush the print buffer */ 00078 PrtElem("flus"," ",0.); 00079 /* final carriage return */ 00080 fprintf( ioQQQ, " \n" ); 00081 00082 /* this is used to store grain number density per hydrogen */ 00083 GrainNumRelHydrSilicate = 0.; 00084 GrainNumRelHydrCarbonaceous = 0; 00085 GrainNumRelHydr_PAH = 0.; 00086 GrainMassRelHydrSilicate = 0.; 00087 GrainMassRelHydrCarbonaceous = 0; 00088 GrainMassRelHydr_PAH = 0.; 00089 00090 for( nd=0; nd < gv.nBin; nd++ ) 00091 { 00092 00093 /* number density of grains per hydrogen, the ratio 00094 * gv.bin[nd]->IntVol/gv.bin[nd]->AvVol is the number of grain particles 00095 * per H at standard grain abundance*/ 00096 realnum DensityNumberPerHydrogen = 00097 (gv.bin[nd]->IntVol/gv.bin[nd]->AvVol)*gv.bin[nd]->dstAbund / 00098 gv.bin[nd]->GrnVryDpth; 00099 /* mass of grains per hydrogen */ 00100 realnum DensityMassPerHydrogen = 00101 gv.bin[nd]->IntVol*gv.bin[nd]->dustp[0]*gv.bin[nd]->dstAbund/ 00102 (realnum)ATOMIC_MASS_UNIT / gv.bin[nd]->GrnVryDpth; 00103 /*(gv.bin[nd]->IntVol/gv.bin[nd]->AvVol)*gv.bin[nd]->dstAbund* 00104 gv.bin[nd]->atomWeight / gv.bin[nd]->GrnVryDpth;*/ 00105 00106 /* >>chng 06 mar 05, fix expression for calculating grain number density, PvH */ 00107 if( gv.bin[nd]->matType == MAT_CAR || gv.bin[nd]->matType == MAT_CAR2 ) 00108 { 00109 /* carbonaceous grains */ 00110 GrainNumRelHydrCarbonaceous += DensityNumberPerHydrogen; 00111 GrainMassRelHydrCarbonaceous += DensityMassPerHydrogen; 00112 } 00113 else if( gv.bin[nd]->matType == MAT_SIL || gv.bin[nd]->matType == MAT_SIL2 ) 00114 { 00115 /* silicate grains */ 00116 GrainNumRelHydrSilicate += DensityNumberPerHydrogen; 00117 GrainMassRelHydrSilicate += DensityMassPerHydrogen; 00118 } 00119 else if( gv.bin[nd]->matType == MAT_PAH || gv.bin[nd]->matType == MAT_PAH2 ) 00120 { 00121 /* PAHs - full abundance - remove possible factor accounting for 00122 * variation of abundances with physical conditions - this will 00123 * be the PAH abundance with scale factor of unity */ 00124 GrainNumRelHydr_PAH += DensityNumberPerHydrogen; 00125 GrainMassRelHydr_PAH += DensityMassPerHydrogen; 00126 } 00127 else 00128 TotalInsanity(); 00129 } 00130 00131 /* now print total number of grains of each type */ 00132 fprintf(ioQQQ," Number of grains per hydrogen (scale=1) Mass of grains per hydrogen (scale=1)\n"); 00133 fprintf(ioQQQ," Carbonaceous: %.3f Silicate: %.3f PAH: %.3f Carbonaceous: %.3f Silicate: %.3f PAH: %.3f\n\n" , 00134 log10( MAX2( 1e-30, GrainNumRelHydrCarbonaceous ) ) , 00135 log10( MAX2( 1e-30, GrainNumRelHydrSilicate ) ) , 00136 log10( MAX2( 1e-30, GrainNumRelHydr_PAH ) ) , 00137 log10( MAX2( 1e-30, GrainMassRelHydrCarbonaceous ) ) , 00138 log10( MAX2( 1e-30, GrainMassRelHydrSilicate ) ) , 00139 log10( MAX2( 1e-30, GrainMassRelHydr_PAH ) ) ); 00140 } 00141 } 00142 return; 00143 } 00144 00145 /*AbundancesSet print all abundances, both gas phase and grains */ 00146 void AbundancesSet(void) 00147 { 00148 long int i, 00149 nelem; 00150 double fac; 00151 static bool lgFirstCall=true; 00152 static bool lgElOnOff[LIMELM]; 00153 00154 DEBUG_ENTRY( "AbundancesSet()" ); 00155 00156 /* if this is the first call to this routine in this core load, 00157 * save the state of the lgElmOn array, so that it is possible 00158 * to turn off elements in later models, but not turn on an 00159 * element that was initially turned off. This is necessary since 00160 * the Create... routines that create space for elements will 00161 * not be revisited in later models. You can turn off an initially 00162 * enabled element, but not turn a disabled one on. */ 00163 00164 if( lgFirstCall ) 00165 { 00166 /* first call - save the initial state of the lgElmtOn vector */ 00167 for( i=0; i<LIMELM; ++i ) 00168 { 00169 lgElOnOff[i] = dense.lgElmtOn[i]; 00170 } 00171 } 00172 lgFirstCall = false; 00173 00174 /* make sure that initially false elements remain off, while letting 00175 * enabled elements be turned off */ 00176 for( i=ipHYDROGEN; i<LIMELM; ++i ) 00177 { 00178 dense.lgElmtOn[i] = lgElOnOff[i] && dense.lgElmtOn[i]; 00179 } 00180 00181 /* rescale so that abundances are H=1 */ 00182 for( i=ipHELIUM; i < LIMELM; i++ ) 00183 { 00184 abund.solar[i] /= abund.solar[0]; 00185 } 00186 abund.solar[ipHYDROGEN] = 1.; 00187 00188 /* set current abundances to "solar" times metals scale factor 00189 * and grain depletion factor */ 00190 abund.solar[ipHELIUM] *= abund.depset[1]*abund.ScaleElement[1]; 00191 00192 /* option for density or abundance variations, this flag is true by default, 00193 * set in zero, but set false if variations are enabled AND these 00194 * are not density variations, but rather abundances */ 00195 if( dense.lgDenFlucOn ) 00196 { 00197 /* usual case - either density fluctuations or none at all */ 00198 fac = 1.; 00199 } 00200 else 00201 { 00202 /* abundance fluctuations enabled, set initial value */ 00203 fac = dense.cfirst*cos(dense.flcPhase) + dense.csecnd; 00204 } 00205 00206 for( i=ipLITHIUM; i < LIMELM; i++ ) 00207 { 00208 abund.solar[i] *= (realnum)(abund.ScaleMetals*abund.depset[i]* 00209 abund.ScaleElement[i]*fac); 00210 } 00211 00212 /* now fix abundance of any element with element table set */ 00213 if( abund.lgAbTaON ) 00214 { 00215 for( nelem=ipHELIUM; nelem < LIMELM; ++nelem ) 00216 { 00217 if( abund.lgAbunTabl[nelem] ) 00218 { 00219 abund.solar[nelem] = (realnum)(AbundancesTable(radius.Radius, 00220 radius.depth,nelem+1)); 00221 } 00222 } 00223 } 00224 00225 /* dense.gas_phase[nelem] contains total abundance of element */ 00226 /* the density of hydrogen itself has already been set at this point - 00227 * it is set when commands parsed, most likely by the hden command - 00228 * set all heavier elements */ 00229 for( nelem=ipHELIUM; nelem < LIMELM; ++nelem ) 00230 { 00231 /* this implements the element off limit xxx command, where 00232 * xxx is the limit to the smallest n(A)/n(H) that will remain on */ 00233 if( abund.solar[nelem] < dense.AbundanceLimit ) 00234 dense.lgElmtOn[nelem] = false; 00235 00236 if( dense.lgElmtOn[nelem] ) 00237 { 00238 dense.gas_phase[nelem] = abund.solar[nelem]*dense.gas_phase[ipHYDROGEN]; 00239 if( dense.gas_phase[nelem] <= 0. ) 00240 { 00241 fprintf( ioQQQ, " Abundances must be greater than zero. " 00242 "Check entered abundance for element%3ld = %2.2s\n", 00243 nelem, elementnames.chElementSym[nelem] ); 00244 cdEXIT(EXIT_FAILURE); 00245 } 00246 else if( dense.gas_phase[nelem] < SMALLFLOAT ) 00247 { 00248 fprintf(ioQQQ," Abundance for %s is %.2e, less than lower " 00249 "limit of %.3e, so turning element off.\n", 00250 elementnames.chElementSym[nelem], 00251 dense.gas_phase[nelem], 00252 SMALLFLOAT ); 00253 dense.lgElmtOn[nelem] = false; 00254 } 00255 } 00256 else 00257 { 00258 /* >>chng 04 apr 20, set to zero if element is off */ 00259 dense.gas_phase[nelem] = 0.; 00260 } 00261 } 00262 00263 /* if stop temp set below default then we are going into cold and possibly 00264 * molecular gas - check some parameters in this case */ 00265 if( called.lgTalk && (StopCalc.tend < phycon.TEMP_STOP_DEFAULT || 00266 /* thermal.ConstTemp def is zero, set pos when used */ 00267 (thermal.ConstTemp > 0. && thermal.ConstTemp < phycon.TEMP_STOP_DEFAULT ) ) ) 00268 { 00269 00270 /* print warning if temperature set below default but C > O */ 00271 if( dense.gas_phase[ipCARBON]/SDIV( dense.gas_phase[ipOXYGEN]) >= 1. ) 00272 { 00273 fprintf( ioQQQ, "\n >>> \n" 00274 " >>> The simulation is going into possibly molecular gas but the carbon/oxygen abundance ratio is greater than unity.\n" ); 00275 fprintf( ioQQQ, " >>> Standard interstellar chemistry networks are designed for environments with C/O < 1.\n" ); 00276 fprintf( ioQQQ, " >>> The chemistry network may (or may not) collapse deep in molecular regions where CO is fully formed.\n" ); 00277 fprintf( ioQQQ, " >>> \n\n\n\n\n" ); 00278 } 00279 } 00280 00281 if( trace.lgTrace ) 00282 { 00283 realnum sumx , sumy , sumz = 0.; 00284 00285 sumx = dense.gas_phase[ipHYDROGEN]*dense.AtomicWeight[ipHYDROGEN]; 00286 sumy = dense.gas_phase[ipHELIUM]*dense.AtomicWeight[ipHELIUM]; 00287 00288 fprintf( ioQQQ, "\n AbundancesSet sets following densities (cm^-3); \n" ); 00289 for( i=0; i<3; i++ ) 00290 { 00291 for( nelem=i*10; nelem < i*10+10; nelem++ ) 00292 { 00293 fprintf( ioQQQ, " %2.2s", elementnames.chElementSym[nelem] ); 00294 PrintE82( ioQQQ, dense.gas_phase[nelem] ); 00295 if( nelem>ipHELIUM ) 00296 sumz += dense.gas_phase[nelem]*dense.AtomicWeight[nelem]; 00297 } 00298 fprintf( ioQQQ, " \n" ); 00299 } 00300 fprintf( ioQQQ, "\n AbundancesSet sets following abundances rel to H; \n" ); 00301 for( i=0; i<3; i++ ) 00302 { 00303 for( nelem=i*10; nelem < i*10+10; nelem++ ) 00304 { 00305 fprintf( ioQQQ, " %2.2s", elementnames.chElementSym[nelem] ); 00306 PrintE82( ioQQQ, dense.gas_phase[nelem]/dense.gas_phase[ipHYDROGEN] ); 00307 } 00308 fprintf( ioQQQ, " \n" ); 00309 } 00310 fprintf( ioQQQ, " \n" ); 00311 fprintf(ioQQQ," Gas-phase mass fractions, X:%.3e Y:%.3e Z:%.3e\n\n", 00312 sumx/SDIV(sumx+sumy+sumz) , 00313 sumy/SDIV(sumx+sumy+sumz) , 00314 sumz/SDIV(sumx+sumy+sumz) ); 00315 } 00316 return; 00317 } 00318 00319 /* this is number of elements across one line */ 00320 #define NELEM1LINE 9 00321 00322 /*PrtElem print chemical composition at start of calculation */ 00323 STATIC void PrtElem( 00324 /* the job to do, the options are "init", "fill", "flus" */ 00325 const char *chJob, 00326 /* label for the element */ 00327 const char *chLabl, 00328 /* its abundance */ 00329 double abund_prt) 00330 { 00331 static char chAllLabels[NELEM1LINE][14];/* buffer where elements will be stored*/ 00332 long int i, 00333 noffset; 00334 static long int nelem; /* counter for number of elements read in*/ 00335 00336 DEBUG_ENTRY( "PrtElem()" ); 00337 00338 if( strcmp(chJob,"initG") == 0 ) 00339 { 00340 /* gas phase abundances */ 00341 nelem = 0; 00342 fprintf( ioQQQ, 00343 " Gas Phase Chemical Composition\n" ); 00344 } 00345 else if( strcmp(chJob,"initD") == 0 ) 00346 { 00347 /* abundances in grains */ 00348 nelem = 0; 00349 fprintf( ioQQQ, 00350 " Grain Chemical Composition\n" ); 00351 } 00352 00353 else if( strcmp(chJob,"fill") == 0 ) 00354 { 00355 /* print log of abundance to avoid exponential output */ 00356 abund_prt = log10( abund_prt ); 00357 /* stuff in labels and abundances */ 00358 sprintf( chAllLabels[nelem], " %2.2s:%8.4f", chLabl, abund_prt ); 00359 if( nelem == NELEM1LINE-1 ) 00360 { 00361 /* we hit as many as it will hold - print it out and reset*/ 00362 fprintf( ioQQQ, " " ); 00363 for( i=0; i < NELEM1LINE; i++ ) 00364 { 00365 fprintf( ioQQQ, "%13.13s", chAllLabels[i] ); 00366 } 00367 fprintf( ioQQQ, "\n" ); 00368 /* reset counter to zero */ 00369 nelem = 0; 00370 } 00371 else 00372 { 00373 /* just increment */ 00374 ++nelem; 00375 } 00376 } 00377 00378 # if 0 00379 /* Do this if you want to know about PAH number abundance */ 00380 else if( strcmp(chJob,"fillp") == 0 ) 00381 { 00382 /* print log of abundance to avoid exponential output */ 00383 abund_prt = log10( abund_prt ); 00384 00385 /* stuff in labels and abundances */ 00386 sprintf( chAllLabels[nelem], " %2.2s:%8.4f", chLabl, abund_prt ); 00387 if( nelem == NELEM1LINE-1 ) 00388 { 00389 /* we hit as many as it will hold - print it out and reset*/ 00390 fprintf( ioQQQ, " " ); 00391 for( i=0; i < NELEM1LINE; i++ ) 00392 { 00393 fprintf( ioQQQ, "%13.13s", chAllLabels[i] ); 00394 } 00395 fprintf( ioQQQ, "\n" ); 00396 /* reset counter to zero */ 00397 nelem = 0; 00398 } 00399 else 00400 { 00401 /* just increment */ 00402 ++nelem; 00403 } 00404 } 00405 # endif 00406 00407 else if( strcmp(chJob,"flus") == 0 ) 00408 { 00409 /* flush the stack */ 00410 i = NELEM1LINE - (nelem - 2); 00411 noffset = i/2-1; 00412 /* make format pretty */ 00413 fprintf( ioQQQ, " " ); 00414 00415 for(i=0; i < noffset; i++) 00416 { 00417 /* skip out this many fields */ 00418 fprintf( ioQQQ, " " ); 00419 } 00420 00421 /* if nelem is even we need to space out another 8 */ 00422 if( !(nelem%2) && nelem > 0) 00423 fprintf( ioQQQ," "); 00424 00425 for( i=0; i < nelem; i++ ) 00426 { 00427 fprintf( ioQQQ, "%13.13s", chAllLabels[i] ); 00428 } 00429 00430 fprintf( ioQQQ, "\n" ); 00431 } 00432 else 00433 { 00434 fprintf( ioQQQ, " PrtElem does not understand job=%4.4s\n", 00435 chJob ); 00436 cdEXIT(EXIT_FAILURE); 00437 } 00438 return; 00439 } 00440 00441 00442 /*AbundancesTable interpolate on table of points to do 'element table' command, */ 00443 double AbundancesTable(double r0, 00444 double depth, 00445 long int iel) 00446 { 00447 bool lgHit; 00448 long int j; 00449 double frac, 00450 tababun_v, 00451 x; 00452 00453 DEBUG_ENTRY( "AbundancesTable()" ); 00454 /* interpolate on table of points to do 'element table' command, based 00455 * on code by K Volk, each line is log radius and abundance. */ 00456 00457 /* interpolate on radius or depth? */ 00458 if( abund.lgAbTaDepth[iel-1] ) 00459 { 00460 /* depth key appeared = we want depth */ 00461 x = log10(depth); 00462 } 00463 else 00464 { 00465 /* use radius */ 00466 x = log10(r0); 00467 } 00468 00469 /* this will be reset below, but is here as a safety check */ 00470 tababun_v = -DBL_MAX; 00471 00472 if( x < abund.AbTabRad[0][iel-1] || x >= abund.AbTabRad[abund.nAbunTabl-1][iel-1] ) 00473 { 00474 fprintf( ioQQQ, " requested radius outside range of AbundancesTable\n" ); 00475 fprintf( ioQQQ, " radius was%10.2e min, max=%10.2e%10.2e\n", 00476 x, abund.AbTabRad[0][iel-1], abund.AbTabRad[abund.nAbunTabl-1][iel-1] ); 00477 cdEXIT(EXIT_FAILURE); 00478 } 00479 00480 else 00481 { 00482 lgHit = false; 00483 j = 1; 00484 00485 while( !lgHit && j <= abund.nAbunTabl - 1 ) 00486 { 00487 if( abund.AbTabRad[j-1][iel-1] <= (realnum)x && 00488 abund.AbTabRad[j][iel-1] > (realnum)x ) 00489 { 00490 frac = (x - abund.AbTabRad[j-1][iel-1])/(abund.AbTabRad[j][iel-1] - 00491 abund.AbTabRad[j-1][iel-1]); 00492 tababun_v = abund.AbTabFac[j-1][iel-1] + frac* 00493 (abund.AbTabFac[j][iel-1] - abund.AbTabFac[j-1][iel-1]); 00494 lgHit = true; 00495 } 00496 ++j; 00497 } 00498 00499 if( !lgHit ) 00500 { 00501 fprintf( ioQQQ, " radius outran dlaw table scale, requested=%6.2f largest=%6.2f\n", 00502 x, abund.AbTabRad[abund.nAbunTabl-1][iel-1] ); 00503 cdEXIT(EXIT_FAILURE); 00504 } 00505 } 00506 00507 /* got it, now return value, not log of density */ 00508 tababun_v = pow(10.,tababun_v); 00509 return( tababun_v ); 00510 } 00511 00512 #ifdef _MSC_VER 00513 # pragma warning( disable : 4305 )/* disable const double to float warning in MS VS - 00514 very large number of warns result */ 00515 #endif 00516 /*AbundancesZero set initial abundances for different mixes */ 00517 void AbundancesZero(void) 00518 { 00519 long int i; 00520 00521 DEBUG_ENTRY( "AbundancesZero()" ); 00522 00523 /* solar abundances 00524 * >>refer solar abund Grevesse, N., & Sauval, A.J., 2001, Space Science Review, 85, 161-174 */ 00525 /* >>chng 02 aug 20, update to these values */ 00526 abund.SolarSave[ipHYDROGEN] = 1.0f; 00527 abund.SolarSave[ipHELIUM] = 0.100f; 00528 abund.SolarSave[ipLITHIUM] = 2.04e-9f; 00529 abund.SolarSave[ipBERYLLIUM] = 2.63e-11f; 00530 abund.SolarSave[ipBORON] = 6.17E-10f; 00531 /* >>chng 02 jul 30, from 3.55 to 2.45, */ 00532 /* >>refer C abund Allende Prieto, C., 00533 * >>refercon Lambert, D.L., & Asplund, M., 2002, ApJ, 573, L137 */ 00534 abund.SolarSave[ipCARBON] = 2.45e-4f; 00535 /* >>chng 02 jul 30, from 9.33 to 8.53, */ 00536 /* >>refer N abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic 00537 * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher: 00538 * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern, 00539 * >>refercon Switzerland, March 6 - 9, 2001., p.23 */ 00540 abund.SolarSave[ipNITROGEN] = 8.51e-5f; 00541 /* >>chng 02 jul 30, from 7.41 to 4.90, */ 00542 /* >>refer O abund Allende Prieto, C., 00543 * >>refercon Lambert, D.L., & Asplund, M., 2001, ApJ, 556, L63 */ 00544 abund.SolarSave[ipOXYGEN] = 4.90e-4f; 00545 abund.SolarSave[ipFLUORINE] = 3.02e-8f; 00546 /* >>chng 02 jul 30, from 1.17 to 1.00, */ 00547 /* >>refer Ne abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic 00548 * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher: 00549 * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern, 00550 * >>refercon Switzerland, March 6 - 9, 2001., p.23 */ 00551 abund.SolarSave[ipNEON] = 1.00e-4f; 00552 abund.SolarSave[ipSODIUM] = 2.14e-6f; 00553 /* >>chng 02 jul 30, from 3.80 to 3.45, */ 00554 /* >>refer Mg abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic 00555 * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher: 00556 * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern, 00557 * >>refercon Switzerland, March 6 - 9, 2001., p.23 */ 00558 abund.SolarSave[ipMAGNESIUM] = 3.47e-5f; 00559 abund.SolarSave[ipALUMINIUM] = 2.95e-6f; 00560 /* >>chng 02 jul 30, from 3.55 to 3.44, */ 00561 /* >>refer Si abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic 00562 * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher: 00563 * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern, 00564 * >>refercon Switzerland, March 6 - 9, 2001., p.23 */ 00565 abund.SolarSave[ipSILICON] = 3.47e-5f; 00566 abund.SolarSave[ipPHOSPHORUS] = 3.20e-7f; 00567 abund.SolarSave[ipSULPHUR] = 1.84e-5f; 00568 abund.SolarSave[ipCHLORINE] = 1.91e-7f; 00569 abund.SolarSave[ipARGON] = 2.51e-6f; 00570 abund.SolarSave[ipPOTASSIUM] = 1.32e-7f; 00571 abund.SolarSave[ipCALCIUM] = 2.29e-6f; 00572 abund.SolarSave[ipSCANDIUM] = 1.48e-9f; 00573 abund.SolarSave[ipTITANIUM] = 1.05e-7f; 00574 abund.SolarSave[ipVANADIUM] = 1.00e-8f; 00575 abund.SolarSave[ipCHROMIUM] = 4.68e-7f; 00576 abund.SolarSave[ipMANGANESE] = 2.88e-7f; 00577 /* >>chng 02 jul 30, from 3.24 to 2.81, */ 00578 /* >>refer Fe abund Holweger, H., 2001, Joint SOHO/ACE workshop `Solar and Galactic 00579 * >>refercon Composition'. Edited by Robert F. Wimmer-Schweingruber. Publisher: 00580 * >>refercon American Institute of Physics Conference proceedings vol. 598 location: Bern, 00581 * >>refercon Switzerland, March 6 - 9, 2001., p.23 */ 00582 abund.SolarSave[ipIRON] = 2.82e-5f; 00583 abund.SolarSave[ipCOBALT] = 8.32e-8f; 00584 abund.SolarSave[ipNICKEL] = 1.78e-6f; 00585 abund.SolarSave[ipCOPPER] = 1.62e-8f; 00586 abund.SolarSave[ipZINC] = 3.98e-8f; 00587 00588 /* abundance set from pre-c96 */ 00589 /* solar abundances Grevesse and Anders 1989, Grevesse and Noel 1993 */ 00590 abund.OldSolar84[ipHYDROGEN] = 1.0; 00591 abund.OldSolar84[ipHELIUM] = 0.100; 00592 abund.OldSolar84[ipLITHIUM] = 2.04e-9; 00593 abund.OldSolar84[ipBERYLLIUM] = 2.63e-11; 00594 abund.OldSolar84[ipBORON] = 7.59e-10; 00595 abund.OldSolar84[ipCARBON] = 3.55e-4; 00596 abund.OldSolar84[ipNITROGEN] = 9.33e-5; 00597 abund.OldSolar84[ipOXYGEN] = 7.41e-4; 00598 abund.OldSolar84[ipFLUORINE] = 3.02e-8; 00599 abund.OldSolar84[ipNEON] = 1.17e-4; 00600 abund.OldSolar84[ipSODIUM] = 2.06e-6; 00601 abund.OldSolar84[ipMAGNESIUM] = 3.80e-5; 00602 abund.OldSolar84[ipALUMINIUM] = 2.95e-6; 00603 abund.OldSolar84[ipSILICON] = 3.55e-5; 00604 abund.OldSolar84[ipPHOSPHORUS] = 3.73e-7; 00605 abund.OldSolar84[ipSULPHUR] = 1.62e-5; 00606 abund.OldSolar84[ipCHLORINE] = 1.88e-7; 00607 abund.OldSolar84[ipARGON] = 3.98e-6; 00608 abund.OldSolar84[ipPOTASSIUM] = 1.35e-7; 00609 abund.OldSolar84[ipCALCIUM] = 2.29e-6; 00610 abund.OldSolar84[ipSCANDIUM] = 1.58e-9; 00611 abund.OldSolar84[ipTITANIUM] = 1.10e-7; 00612 abund.OldSolar84[ipVANADIUM] = 1.05e-8; 00613 abund.OldSolar84[ipCHROMIUM] = 4.84e-7; 00614 abund.OldSolar84[ipMANGANESE] = 3.42e-7; 00615 abund.OldSolar84[ipIRON] = 3.24e-5; 00616 abund.OldSolar84[ipCOBALT] = 8.32e-8; 00617 abund.OldSolar84[ipNICKEL] = 1.76e-6; 00618 abund.OldSolar84[ipCOPPER] = 1.87e-8; 00619 abund.OldSolar84[ipZINC] = 4.52e-8; 00620 00621 /* Nova Cyg 75 abundances, C, O, NE UP 20, NIT UP 100, REST SOLAR AR */ 00622 abund.anova[ipHYDROGEN] = 1.0; 00623 abund.anova[ipHELIUM] = 0.098; 00624 abund.anova[ipLITHIUM] = 2.04e-9; 00625 abund.anova[ipBERYLLIUM] = 2.6e-11; 00626 abund.anova[ipBORON] = 7.60e-9; 00627 abund.anova[ipCARBON] = 9.4e-4; 00628 abund.anova[ipNITROGEN] = 9.8e-3; 00629 abund.anova[ipOXYGEN] = 1.7e-2; 00630 abund.anova[ipFLUORINE] = 3.02e-8; 00631 abund.anova[ipNEON] = 2.03e-3; 00632 abund.anova[ipSODIUM] = 2.06e-6; 00633 abund.anova[ipMAGNESIUM] = 3.80e-5; 00634 abund.anova[ipALUMINIUM] = 2.95e-6; 00635 abund.anova[ipSILICON] = 3.55e-5; 00636 abund.anova[ipPHOSPHORUS] = 3.73e-7; 00637 abund.anova[ipSULPHUR] = 1.62e-5; 00638 abund.anova[ipCHLORINE] = 1.88e-7; 00639 abund.anova[ipARGON] = 3.63e-6; 00640 abund.anova[ipPOTASSIUM] = 1.35e-7; 00641 abund.anova[ipCALCIUM] = 2.29e-6; 00642 abund.anova[ipSCANDIUM] = 1.22e-9; 00643 abund.anova[ipTITANIUM] = 8.60e-8; 00644 abund.anova[ipVANADIUM] = 1.05e-8; 00645 abund.anova[ipCHROMIUM] = 4.84e-7; 00646 abund.anova[ipMANGANESE] = 3.42e-7; 00647 abund.anova[ipIRON] = 4.68e-5; 00648 abund.anova[ipCOBALT] = 2.24e-9; 00649 abund.anova[ipNICKEL] = 1.76e-6; 00650 abund.anova[ipCOPPER] = 1.87e-8; 00651 abund.anova[ipZINC] = 4.52e-8; 00652 00653 /* primordial abundances */ 00654 abund.aprim[ipHYDROGEN] = 1.0; 00655 abund.aprim[ipHELIUM] = 0.072; 00656 abund.aprim[ipLITHIUM] = 1e-10; 00657 abund.aprim[ipBERYLLIUM] = 1e-16; 00658 00659 for( i=4; i < LIMELM; i++ ) 00660 { 00661 abund.aprim[i] = 1e-25; 00662 } 00663 00664 /* typical ISM abundances, mean of Table 3, Cowie+Songaila, Ann Rev '86 00665 * also Table 5, Savage and Sembach, Ann Rev 1996 */ 00666 abund.aism[ipHYDROGEN] = 1.; 00667 abund.aism[ipHELIUM] = 0.098; 00668 abund.aism[ipLITHIUM] = 5.4e-11; 00669 abund.aism[ipBERYLLIUM] = 1e-20; 00670 abund.aism[ipBORON] = 8.9e-11; 00671 abund.aism[ipCARBON] = 2.51e-4; 00672 abund.aism[ipNITROGEN] = 7.94e-5; 00673 /* >>chng >>01 feb 19, from 5.01e-4 to 3.19e-4, value from */ 00674 /* >>refer O abundance Meyers, D.M., Jura, M., & Cardelli, J.A., 1998, ApJ, 493, 222-229 */ 00675 /* they quote 3.19 +/- 0.14 e-4 */ 00676 abund.aism[ipOXYGEN] = 3.19e-4; 00677 abund.aism[ipFLUORINE] = 1e-20; 00678 abund.aism[ipNEON] = 1.23e-4; 00679 abund.aism[ipSODIUM] = 3.16e-7; 00680 abund.aism[ipMAGNESIUM] = 1.26e-5; 00681 abund.aism[ipALUMINIUM] = 7.94e-8; 00682 abund.aism[ipSILICON] = 3.16e-6; 00683 abund.aism[ipPHOSPHORUS] = 1.6e-7; 00684 abund.aism[ipSULPHUR] = 3.24e-5; 00685 abund.aism[ipCHLORINE] = 1e-7; 00686 abund.aism[ipARGON] = 2.82e-6; 00687 abund.aism[ipPOTASSIUM] = 1.1e-8; 00688 abund.aism[ipCALCIUM] = 4.1e-10; 00689 abund.aism[ipSCANDIUM] = 1e-20; 00690 abund.aism[ipTITANIUM] = 5.8e-10; 00691 abund.aism[ipVANADIUM] = 1.0e-10; 00692 abund.aism[ipCHROMIUM] = 1.0e-8; 00693 abund.aism[ipMANGANESE] = 2.3e-8; 00694 abund.aism[ipIRON] = 6.31e-7; 00695 abund.aism[ipCOBALT] = 1e-20; 00696 abund.aism[ipNICKEL] = 1.82e-8; 00697 abund.aism[ipCOPPER] = 1.5e-9; 00698 abund.aism[ipZINC] = 2.0e-8; 00699 00700 /* HII region abundances, Orion mean of Baldwin et al, Rubin et al, 00701 * and DEO et al, all 1991 apj 00702 * also Table 5, Savage and Sembach, Ann Rev 1996 for ism */ 00703 abund.ahii[ipHYDROGEN] = 1.; 00704 abund.ahii[ipHELIUM] = 0.095; 00705 abund.ahii[ipLITHIUM] = 5.4e-11; 00706 abund.ahii[ipBERYLLIUM] = 1e-20; 00707 abund.ahii[ipBORON] = 8.9e-11; 00708 abund.ahii[ipCARBON] = 3.e-4; 00709 abund.ahii[ipNITROGEN] = 7.0e-5; 00710 abund.ahii[ipOXYGEN] = 4.0e-4; 00711 abund.ahii[ipFLUORINE] = 1e-20; 00712 abund.ahii[ipNEON] = 6e-5; 00713 abund.ahii[ipSODIUM] = 3e-7; 00714 abund.ahii[ipMAGNESIUM] = 3.e-6; 00715 abund.ahii[ipALUMINIUM] = 2.e-7; 00716 abund.ahii[ipSILICON] = 4.e-6; 00717 abund.ahii[ipPHOSPHORUS] = 1.6e-7; 00718 abund.ahii[ipSULPHUR] = 1.0e-5; 00719 abund.ahii[ipCHLORINE] = 1.e-7; 00720 abund.ahii[ipARGON] = 3.e-6; 00721 abund.ahii[ipPOTASSIUM] = 1.1e-8; 00722 abund.ahii[ipCALCIUM] = 2.e-8; 00723 abund.ahii[ipSCANDIUM] = 1e-20; 00724 abund.ahii[ipTITANIUM] = 5.8e-10; 00725 abund.ahii[ipVANADIUM] = 1.0e-10; 00726 abund.ahii[ipCHROMIUM] = 1.0e-8; 00727 abund.ahii[ipMANGANESE] = 2.3e-8; 00728 abund.ahii[ipIRON] = 3.0e-6; 00729 abund.ahii[ipCOBALT] = 1e-20; 00730 abund.ahii[ipNICKEL] = 1e-7; 00731 abund.ahii[ipCOPPER] = 1.5e-9; 00732 abund.ahii[ipZINC] = 2.0e-8; 00733 00734 /* PN abund from */ 00735 /* >>refer PN abundances Aller+Czyzak, ApJ Sup 51, 211 */ 00736 abund.apn[ipHYDROGEN] = 1.; 00737 abund.apn[ipHELIUM] = 0.1; 00738 abund.apn[ipLITHIUM] = 1e-20; 00739 abund.apn[ipBERYLLIUM] = 1e-20; 00740 abund.apn[ipBORON] = 1e-20; 00741 abund.apn[ipCARBON] = 7.8e-4; 00742 abund.apn[ipNITROGEN] = 1.8e-4; 00743 abund.apn[ipOXYGEN] = 4.4e-4; 00744 abund.apn[ipFLUORINE] = 3e-7; 00745 abund.apn[ipNEON] = 1.1e-4; 00746 abund.apn[ipSODIUM] = 1.9e-6; 00747 abund.apn[ipMAGNESIUM] = 1.6e-6; 00748 abund.apn[ipALUMINIUM] = 2.7e-7; 00749 abund.apn[ipSILICON] = 1e-5; 00750 abund.apn[ipPHOSPHORUS] = 2e-7; 00751 abund.apn[ipSULPHUR] = 1e-5; 00752 abund.apn[ipCHLORINE] = 1.7e-7; 00753 abund.apn[ipARGON] = 2.7e-6; 00754 abund.apn[ipPOTASSIUM] = 1.2e-7; 00755 abund.apn[ipCALCIUM] = 1.2e-8; 00756 abund.apn[ipSCANDIUM] = 1e-20; 00757 abund.apn[ipTITANIUM] = 1e-20; 00758 abund.apn[ipVANADIUM] = 1e-20; 00759 abund.apn[ipCHROMIUM] = 1e-20; 00760 abund.apn[ipMANGANESE] = 1e-20; 00761 abund.apn[ipIRON] = 5.0e-7; 00762 abund.apn[ipCOBALT] = 1e-20; 00763 abund.apn[ipNICKEL] = 1.8e-8; 00764 abund.apn[ipCOPPER] = 1e-20; 00765 abund.apn[ipZINC] = 1e-20; 00766 00767 /* mix from Cameron 1982, in "Essays on Nuclear Astro" */ 00768 abund.camern[ipHYDROGEN] = 1.; 00769 abund.camern[ipHELIUM] = .0677; 00770 abund.camern[ipLITHIUM] = 2.2e-9; 00771 abund.camern[ipBERYLLIUM] = 4.5e-11; 00772 abund.camern[ipBORON] = 3.4e-10; 00773 abund.camern[ipCARBON] = 4.22e-4; 00774 abund.camern[ipNITROGEN] = 8.72e-5; 00775 abund.camern[ipOXYGEN] = 6.93e-4; 00776 abund.camern[ipFLUORINE] = 2.9e-8; 00777 abund.camern[ipNEON] = 9.77e-5; 00778 abund.camern[ipSODIUM] = 2.25e-6; 00779 abund.camern[ipMAGNESIUM] = 3.98e-5; 00780 abund.camern[ipALUMINIUM] = 3.20e-6; 00781 abund.camern[ipSILICON] = 3.76e-5; 00782 abund.camern[ipPHOSPHORUS] = 2.4e-7; 00783 abund.camern[ipSULPHUR] = 1.88e-5; 00784 abund.camern[ipCHLORINE] = 1.78e-7; 00785 abund.camern[ipARGON] = 3.99e-6; 00786 abund.camern[ipPOTASSIUM] = 1.3e-7; 00787 abund.camern[ipCALCIUM] = 2.35e-6; 00788 abund.camern[ipSCANDIUM] = 1.16e-9; 00789 abund.camern[ipTITANIUM] = 9.0e-8; 00790 abund.camern[ipVANADIUM] = 9.5e-9; 00791 abund.camern[ipCHROMIUM] = 4.8e-7; 00792 abund.camern[ipMANGANESE] = 3.5e-7; 00793 abund.camern[ipIRON] = 3.38e-5; 00794 abund.camern[ipCOBALT] = 8.27e-8; 00795 abund.camern[ipNICKEL] = 1.80e-6; 00796 abund.camern[ipCOPPER] = 2.0e-8; 00797 abund.camern[ipZINC] = 4.7e-8; 00798 00799 /* set logical flags saying whether to include element in AGN tables */ 00800 /* first set all false, since most not included */ 00801 for( i=0; i < LIMELM; i++ ) 00802 { 00803 abund.lgAGN[i] = false; 00804 } 00805 abund.lgAGN[ipHYDROGEN] = true; 00806 abund.lgAGN[ipHELIUM] = true; 00807 abund.lgAGN[ipCARBON] = true; 00808 abund.lgAGN[ipNITROGEN] = true; 00809 abund.lgAGN[ipOXYGEN] = true; 00810 abund.lgAGN[ipNEON] = true; 00811 abund.lgAGN[ipMAGNESIUM] = true; 00812 abund.lgAGN[ipSILICON] = true; 00813 abund.lgAGN[ipSULPHUR] = true; 00814 abund.lgAGN[ipARGON] = true; 00815 abund.lgAGN[ipIRON] = true; 00816 return; 00817 } 00818