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

Appendix  549


              s2 = 1E100;
              for i=1:1:N_h
                   if (s1 < th_in(i))
                        s1 = th_in(i);
                   end
                   if (s2 > th_out(i))
                        s2 = th_out(i);
                   end
              end
              for i=1:1: N_SN + 1
                   if (s1 == t(i))
                        j1 = i;
                   end
                   if (s2 == t(i))
                        j2 = i;
                   end
              end
              H_h = zeros(N_SN, 1);
              t_h_p = zeros(j2 - j1 + 1, 1);
              H_h_p = zeros(j2 - j1 + 1, 1);
              k=0;
              fprintf("SN, t, H_h\n");
              for j=j1: 1:j2
                   k=k+1;
                   t_h_p(k) = t(j);
                   H_h(j) = 0;
                   for i =j:1:j2-1
                        H_h(j) = H_h(j) + dH_h(i);
                   end
                   H_h_p(k) = H_h(j);
                   fprintf("%d, %f, %f\n", j, t_h_p(k), H_h_p(k));
              end
              % draw hot composite curve
              figure(1);
              plot(H_h_p, t_h_p, '-r');
              xlabel('H (kW)')
              ylabel('t (°C)')
              hold on;
   561   562   563   564   565   566   567   568   569   570   571