34         double GrainNumRelHydrSilicate ,
 
   35                 GrainNumRelHydrCarbonaceous ,
 
   37                 GrainMassRelHydrSilicate,
 
   38                 GrainMassRelHydrCarbonaceous,
 
   47                 for( i=0; i < 
LIMELM; i++ )
 
   68                         for( i=0; i < 
LIMELM; i++ )
 
   83                         GrainNumRelHydrSilicate = 0.;
 
   84                         GrainNumRelHydrCarbonaceous = 0;
 
   85                         GrainNumRelHydr_PAH = 0.;
 
   86                         GrainMassRelHydrSilicate = 0.;
 
   87                         GrainMassRelHydrCarbonaceous = 0;
 
   88                         GrainMassRelHydr_PAH = 0.;
 
   90                         for( 
size_t nd=0; nd < 
gv.
bin.size(); nd++ )
 
   96                                 realnum DensityNumberPerHydrogen = 
 
  100                                 realnum DensityMassPerHydrogen = 
 
  109                                         GrainNumRelHydrCarbonaceous += DensityNumberPerHydrogen;
 
  110                                         GrainMassRelHydrCarbonaceous += DensityMassPerHydrogen;
 
  115                                         GrainNumRelHydrSilicate += DensityNumberPerHydrogen;
 
  116                                         GrainMassRelHydrSilicate += DensityMassPerHydrogen;
 
  123                                         GrainNumRelHydr_PAH += DensityNumberPerHydrogen;
 
  124                                         GrainMassRelHydr_PAH += DensityMassPerHydrogen;
 
  131                         fprintf(
ioQQQ,
"              Number of grains per hydrogen (scale=1)                         Mass of grains per hydrogen (scale=1)\n");
 
  132                         fprintf(
ioQQQ,
"        Carbonaceous: %.3f  Silicate: %.3f  PAH: %.3f         Carbonaceous: %.3f  Silicate: %.3f  PAH: %.3f\n\n" ,
 
  133                                 log10( 
MAX2( 1e-30, GrainNumRelHydrCarbonaceous ) ) ,
 
  134                                 log10( 
MAX2( 1e-30, GrainNumRelHydrSilicate ) ) ,
 
  135                                 log10( 
MAX2( 1e-30, GrainNumRelHydr_PAH ) ) ,
 
  136                                 log10( 
MAX2( 1e-30, GrainMassRelHydrCarbonaceous ) ) ,
 
  137                                 log10( 
MAX2( 1e-30, GrainMassRelHydrSilicate ) ) ,
 
  138                                 log10( 
MAX2( 1e-30, GrainMassRelHydr_PAH ) )  );
 
  150         static bool lgFirstCall=
true;
 
  151         static bool lgElOnOff[
LIMELM];
 
  241                                 fprintf( 
ioQQQ, 
" Abundances must be greater than zero.  " 
  242                                         "Check entered abundance for element%3ld  = %2.2s, value=%.2e\n",
 
  248                                 fprintf(
ioQQQ,
" Abundance for %s is %.2e, less than lower " 
  249                                         "limit of %.3e, so turning element off.\n",
 
  257                                 fprintf(
ioQQQ,
" Abundance for %s is %.2e.  This version of Cloudy does not " 
  258                                         "permit densities greater than %e cm-3.\n",
 
  273                 for( 
long int ion=1; ion < LIMELM+1; ion++ )
 
  295                                                         " >>> The simulation is going into possibly molecular gas but the carbon/oxygen abundance ratio is greater than unity.\n" );
 
  296                         fprintf( 
ioQQQ, 
" >>> Standard interstellar chemistry networks are designed for environments with C/O < 1.\n" );
 
  297                         fprintf( 
ioQQQ, 
" >>> The chemistry network may (or may not) collapse deep in molecular regions where CO is fully formed.\n" );
 
  304                 realnum sumx , sumy , sumz = 0.;
 
  309                 fprintf( 
ioQQQ, 
"\n AbundancesSet sets following densities (cm^-3); \n" );
 
  312                         for( nelem=i*10; nelem < i*10+10; nelem++ )
 
  321                 fprintf( 
ioQQQ, 
"\n AbundancesSet sets following abundances rel to H; \n" );
 
  324                         for( nelem=i*10; nelem < i*10+10; nelem++ )
 
  332                 fprintf(
ioQQQ,
" Gas-phase mass fractions, X:%.3e Y:%.3e Z:%.3e\n\n",
 
  333                         sumx/
SDIV(sumx+sumy+sumz) , 
 
  334                         sumy/
SDIV(sumx+sumy+sumz) , 
 
  335                         sumz/
SDIV(sumx+sumy+sumz) );
 
  355         static long int nelem;  
 
  359         if( strcmp(chJob,
"initG") == 0 )
 
  364                         "                                                  Gas Phase Chemical Composition\n" );
 
  366         else if( strcmp(chJob,
"initD") == 0 )
 
  371                         "                                                    Grain Chemical Composition\n" );
 
  374         else if( strcmp(chJob,
"fill") == 0 )
 
  377                 abund_prt = log10( abund_prt );
 
  379                 sprintf( chAllLabels[nelem], 
"  %2.2s:%8.4f", chLabl, abund_prt );
 
  401         else if( strcmp(chJob,
"fillp") == 0 )
 
  404                 abund_prt = log10( abund_prt );
 
  407                 sprintf( chAllLabels[nelem], 
"  %2.2s:%8.4f", chLabl, abund_prt );
 
  428         else if( strcmp(chJob,
"flus") == 0 )
 
  436                 for(i=0; i < noffset; i++)
 
  443                 if( !(nelem%2) && nelem > 0)
 
  446                 for( i=0; i < nelem; i++ )
 
  455                 fprintf( 
ioQQQ, 
" PrtElem does not understand job=%4.4s\n", 
 
  491         tababun_v = -DBL_MAX;
 
  495                 fprintf( 
ioQQQ, 
" requested radius outside range of AbundancesTable\n" );
 
  496                 fprintf( 
ioQQQ, 
" radius was%10.2e min, max=%10.2e%10.2e\n", 
 
  522                         fprintf( 
ioQQQ, 
" radius outran dlaw table scale, requested=%6.2f largest=%6.2f\n", 
 
  529         tababun_v = 
exp10(tababun_v);
 
void SetGasPhaseDensity(const long nelem, const realnum density)
NORETURN void TotalInsanity(void)
realnum AbTabFac[LIMTABD][LIMELM]
STATIC void PrtElem(const char *chJob, const char *chLabl, double abund_prt)
realnum elmSumAbund[LIMELM]
void InitDeuteriumIonization()
t_elementnames elementnames
double xIonDense[LIMELM][LIMELM+1]
const double TEMP_STOP_DEFAULT
double AbundancesTable(double r0, double depth, long int iel)
realnum AbTabRad[LIMTABD][LIMELM]
char chElementSym[LIMELM][CHARS_ELEMENT_SYM]
realnum gas_phase[LIMELM]
realnum AtomicWeight[LIMELM]
#define DEBUG_ENTRY(funcname)
int fprintf(const Output &stream, const char *format,...)
sys_float SDIV(sys_float x)
realnum ScaleElement[LIMELM]
void PrintE82(FILE *, double)