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

556   Appendix


                        end
                   end
              end
              for i=1: 1: N_SN - 1
                   for j=i+1:1: N_SN
                        if (t(j) > t(i))
                               s = t(i);
                               t(i) = t(j);
                               t(j) = s;
                        end
                   end
              end
              N_SN = N_SN - 1;

              % total enthalpy change
              dH_h = zeros(N_SN, 1);
              dH_c = zeros(N_SN, 1);
              for i=1: 1: N_SN
                   C_h_i = 0;
                   for j=1:1:N_h
                        if (th_out(j) <= t(i + 1) && t(i) <= th_in(j))
                              C_h_i = C_h_i + C_h(j);
                        end
                   end
                   dH_h(i) = (t(i) - t(i + 1)) ∗ C_h_i;
                   C_c_i = 0;
                   for j=1:1:N_c
                        if (tc_s_in(j) <= t(i + 1) && t(i) <= tc_s_out(j))
                              C_c_i = C_c_i + C_c(j);
                        end
                   end
                   dH_c(i) = (t(i) - t(i + 1)) ∗ C_c_i;
              end
              % heat inputs and outputs
              D = zeros(N_SN, 1);
              I = zeros(N_SN, 1);
              O = zeros(N_SN, 1);
              I(1) = 0;
   568   569   570   571   572   573   574   575   576   577   578