/*badprt print out coolants if energy not conserved */ #include "cddefines.h" #include "linesave.h" #include "heat.h" #include "totlin.h" #include "badprt.h" /* following is smallest ratio to print */ #define RATIO 0.02 void badprt(double total) { char chInfo; long int i; float collin, reclin; # ifdef DEBUG_FUN fputs( "<+>badprt()\n", debug_fp ); # endif fprintf( ioQQQ, " BADPRT: all entries with greater than%6.2f%% of incident continuum follow.\n", RATIO*100. ); fprintf( ioQQQ, " BADPRT: Intensities are relative to total energy radiated.\n" ); /* now find sum of lines of various types */ chInfo = 'r'; reclin = (float)totlin('r'); fprintf( ioQQQ, " Sum of recombination (abs)=%10.2e (rel)=%10.2e\n", reclin, reclin/MAX2(1e-30,total) ); /* total is total luminosity available in radiation */ for( i=0; i < LineSave.nsum; i++ ) { if( LineSv[i].chSumTyp == chInfo && LineSv[i].sumlin/total > RATIO ) { fprintf( ioQQQ, " %4.4s%5ld%7.3f %c\n", LineSv[i].chALab , LineSv[i].lin, LineSv[i].sumlin/total, chInfo ); } } chInfo = 'c'; collin = (float)totlin('c'); fprintf( ioQQQ, " Sum of coolants (abs) =%10.2e (rel)=%10.2e\n", collin, collin/MAX2(1e-30,total) ); for( i=0; i < LineSave.nsum; i++ ) { if( LineSv[i].chSumTyp == chInfo && LineSv[i].sumlin/total > RATIO ) { fprintf( ioQQQ, " %4.4s%5ld%10.2e %c\n", LineSv[i].chALab , LineSv[i].lin, LineSv[i].sumlin/total, chInfo ); } } chInfo = 'h'; fprintf( ioQQQ, " Sum of heat (abs) =%10.2e (rel)=%10.2e\n", heat.power, heat.power/MAX2(1e-30,total) ); for( i=0; i < LineSave.nsum; i++ ) { if( LineSv[i].chSumTyp == chInfo && LineSv[i].sumlin/total > RATIO ) { fprintf( ioQQQ, " %4.4s%5ld%7.3f %c\n", LineSv[i].chALab , LineSv[i].lin, LineSv[i].sumlin/total, chInfo ); } } # ifdef DEBUG_FUN fputs( " <->badprt()\n", debug_fp ); # endif return; }