/*dmpast dump cooling, calls coolpr with most important coolants */ #include "cddefines.h" #include "tcool.h" #include "coolants.h" #include "heating.h" #include "coolpr.h" #include "dmpast.h" /* this is the fractional percentage of the faintest coolant to print */ #define EPS 0.005 void dmpast(void) { long int i; float ratio; # ifdef DEBUG_FUN fputs( "<+>dmpast()\n", debug_fp ); # endif fprintf( ioQQQ, " All coolants greater than%6.2f%% of the total will be printed (dmpast)\n", EPS*100. ); /* flag all significant coolants, first zero out the array */ coolpr((char*)chCoolants.chClntLab[0],1,0.,"ZERO"); /* push all coolants onto the stack */ for( i=0; i < Coolants.ncltot; i++ ) { /* usually positive, although can be neg for coolants that heats, * only do positive here */ ratio = (float)(Coolants.cooling[i]/tcool.ctot); if( ratio >= EPS ) { /*>>chng 99 jan 27, only cal when ratio is significant */ coolpr((char*)chCoolants.chClntLab[i],Coolants.collam[i], ratio,"DOIT"); } } /* complete the printout for positive coolants */ coolpr("DONE",1,0.,"DONE"); /* now do cooling that was counted as a heat source if significant */ if( HeatingCom.heating[22][0]/tcool.ctot > 0.05 ) { fprintf( ioQQQ, " All coolant heat greater than%6.2f%% of the total will be printed.\n", EPS*100. ); coolpr("ZERO",1,0.,"ZERO"); for( i=0; i < Coolants.ncltot; i++ ) { ratio = (float)(Coolants.heatnt[i]/tcool.ctot); if( fabs(ratio) >=EPS ) { coolpr((char*)chCoolants.chClntLab[i],Coolants.collam[i], ratio,"DOIT"); } } coolpr("DONE",1,0.,"DONE"); } # ifdef DEBUG_FUN fputs( " <->dmpast()\n", debug_fp ); # endif return; }