Page 567 - Design and Operation of Heat Exchangers and their Networks
P. 567

550   Appendix


          % cold enthalpy flow rates
          s1 = -1E100;
          s2 = 1E100;
          for i=1: 1:N_c
                if (s1 < tc_s_out(i))
                     s1 = tc_s_out(i);
                end
                if (s2 > tc_s_in(i))
                     s2 = tc_s_in(i);
              end
          end
          for i=1: 1: N_SN + 1
                if (s1 == t(i))
                     k1 = i;
                end
                if (s2 == t(i))
                     k2 = i;
                end
          end
          H_c = zeros(N_SN, 1);
          t_c_p = zeros(k2 - k1 + 1, 1);
          H_c_p = zeros(k2 - k1 + 1, 1);
          j= 0;
          fprintf("SN, t, H_c\n");
          for k=k1 :1:k2
                j=j+1;
                t_c_p(j) = t(k) - dtm;
                H_c(k) = Q_CU_min;
                for i=k:1:k2 - 1
                     H_c(k) = H_c(k) + dH_c(i);
                end
                H_c_p(j) = H_c(k);
                fprintf("%d, %f, %f\n", k, t_c_p(j), H_c_p(j));
          end
          % draw cold composite curve
          plot(H_c_p, t_c_p, '-b');
          hold off;
   562   563   564   565   566   567   568   569   570   571   572