34 double GrainNumRelHydrSilicate ,
35 GrainNumRelHydrCarbonaceous ,
37 GrainMassRelHydrSilicate,
38 GrainMassRelHydrCarbonaceous,
47 for( i=0; i <
LIMELM; i++ )
60 fprintf(
ioQQQ,
" \n" );
68 for( i=0; i <
LIMELM; i++ )
80 fprintf(
ioQQQ,
" \n" );
83 GrainNumRelHydrSilicate = 0.;
84 GrainNumRelHydrCarbonaceous = 0;
85 GrainNumRelHydr_PAH = 0.;
86 GrainMassRelHydrSilicate = 0.;
87 GrainMassRelHydrCarbonaceous = 0;
88 GrainMassRelHydr_PAH = 0.;
90 for( nd=0; nd <
gv.
nBin; nd++ )
96 realnum DensityNumberPerHydrogen =
100 realnum DensityMassPerHydrogen =
110 GrainNumRelHydrCarbonaceous += DensityNumberPerHydrogen;
111 GrainMassRelHydrCarbonaceous += DensityMassPerHydrogen;
116 GrainNumRelHydrSilicate += DensityNumberPerHydrogen;
117 GrainMassRelHydrSilicate += DensityMassPerHydrogen;
124 GrainNumRelHydr_PAH += DensityNumberPerHydrogen;
125 GrainMassRelHydr_PAH += DensityMassPerHydrogen;
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 ) ) );
152 static bool lgElOnOff[
LIMELM];
241 fprintf(
ioQQQ,
" Abundances must be greater than zero. "
242 "Check entered abundance for element%3ld = %2.2s\n",
248 fprintf(
ioQQQ,
" Abundance for %s is %.2e, less than lower "
249 "limit of %.3e, so turning element off.\n",
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" );
283 realnum sumx , sumy , sumz = 0.;
288 fprintf(
ioQQQ,
"\n AbundancesSet sets following densities (cm^-3); \n" );
291 for( nelem=i*10; nelem < i*10+10; nelem++ )
298 fprintf(
ioQQQ,
" \n" );
300 fprintf(
ioQQQ,
"\n AbundancesSet sets following abundances rel to H; \n" );
303 for( nelem=i*10; nelem < i*10+10; nelem++ )
308 fprintf(
ioQQQ,
" \n" );
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) );
334 static long int nelem;
338 if( strcmp(chJob,
"initG") == 0 )
343 " Gas Phase Chemical Composition\n" );
345 else if( strcmp(chJob,
"initD") == 0 )
350 " Grain Chemical Composition\n" );
353 else if( strcmp(chJob,
"fill") == 0 )
356 abund_prt = log10( abund_prt );
358 sprintf( chAllLabels[nelem],
" %2.2s:%8.4f", chLabl, abund_prt );
362 fprintf(
ioQQQ,
" " );
365 fprintf(
ioQQQ,
"%13.13s", chAllLabels[i] );
367 fprintf(
ioQQQ,
"\n" );
380 else if( strcmp(chJob,
"fillp") == 0 )
383 abund_prt = log10( abund_prt );
386 sprintf( chAllLabels[nelem],
" %2.2s:%8.4f", chLabl, abund_prt );
390 fprintf(
ioQQQ,
" " );
393 fprintf(
ioQQQ,
"%13.13s", chAllLabels[i] );
395 fprintf(
ioQQQ,
"\n" );
407 else if( strcmp(chJob,
"flus") == 0 )
413 fprintf(
ioQQQ,
" " );
415 for(i=0; i < noffset; i++)
418 fprintf(
ioQQQ,
" " );
422 if( !(nelem%2) && nelem > 0)
425 for( i=0; i < nelem; i++ )
427 fprintf(
ioQQQ,
"%13.13s", chAllLabels[i] );
430 fprintf(
ioQQQ,
"\n" );
434 fprintf(
ioQQQ,
" PrtElem does not understand job=%4.4s\n",
470 tababun_v = -DBL_MAX;
474 fprintf(
ioQQQ,
" requested radius outside range of AbundancesTable\n" );
475 fprintf(
ioQQQ,
" radius was%10.2e min, max=%10.2e%10.2e\n",
501 fprintf(
ioQQQ,
" radius outran dlaw table scale, requested=%6.2f largest=%6.2f\n",
508 tababun_v = pow(10.,tababun_v);
513 # pragma warning( disable : 4305 )
659 for( i=4; i <
LIMELM; i++ )
801 for( i=0; i <
LIMELM; i++ )