Page 493 - Advanced Mine Ventilation
P. 493

462                Appendix C: Ventilation Network Analyzer in Cþþ With Input and Output

            void printBranchCharacteristics()
            {
              cout << "ynynyn" << setw(10) << "BRANCH" << setw(10) << "J1" <<
         setw(10) << "J2" << setw(15) << "R" << setw(10) << "FF" << setw(10) <<
         "HEIGHT" << setw(10) << "WIDTH" << setw(10) << "LENGTH" << endl;
              for (int i¼1; i<¼nb; iþþ)
              {
                if(ff_temp[i] >  0 && height[i] >  0)
                {
                  cout << setw(10)    <<   i  << setw(10)   <<    jj1[i]   <<
         setw(10) << j2[i] << setw(15) << r[i] << setw(10) << ff_temp[i] <<
         setw(10) << height[i] << setw(10) << width[i] << setw(10) << length
         [i] << endl;
                }

                else if(ff_temp[i] <¼ 0 && height[i] >  0)
                {
                  cout << setw(10)    <<   i  << setw(10)   <<    jj1[i]   <<
         setw(10) << j2[i] << setw(15) << r[i] << setw(10) << height[i] <<
         setw(10) << width[i] << setw(10) << length[i] << endl;
                }

                else if(height[i] <¼ 0)
                {
                        cout << setw(10)<< i   << jj1[i] << j2[i] << r[i] <<
         endl;
                }
              }
            }

            void printIterationandSum(int iterations, bool flag)
            {
                cout << endl << setw(10) << iterations << " ITERATIONS " <<
         setw(10) << "SUMD ¼ " << sumd << endl << endl;
                if(!flag)
                  cout << "**** d is still greater than e" << endl;
            }

            void computeAndPrintHeadLoss()
            {
                cout << setw(10)  <<   "BRANCH  "  <<  setw(10)  <<  "J1  "  <<
         setw(10)  <<  "J2"  <<  setw(10)  <<  "R"  <<  setw(15)  <<  "Q"  <<
         setw(15) << "H" << endl;
   488   489   490   491   492   493   494   495   496   497   498