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

498   Appendix


                 M=2 ∗ N1;
                 A = zeros(M, M);
                 B = ones(M, 1);
                 A_id1 = special_function_A_id(bA, aA, N);
                 A_id2 = special_function_A_id(aB, bB, N);
                 B1 = special_function_B(aA, N);
                 B2 = special_function_B(bB, N);
                 for i=1 :N1
                       for j=1:N1
                            A(i, j) = A_id1(i, j);
                            A(i, j + N1) = B2(i, j);
                            A(i + N1, j) = B1(i, j);
                            A(i + N1, j + N1) = A_id2(i, j);
                       end
                 end
                 B=A\B;% alpha(i) = B(i), beta(i) = B(i + N1)
                 Fn = special_function_Fn(bA, aA, N1);
                 s=0;
                 for i=1 :N1
                       s=s+ B(i) ∗ Fn(i);
                 end
                 epsilon_h = (1 - s / aA) / Rh(1);
                 % numerical
                 t1(:, :, :) = 1;
                 t2(:, :, :) = 0;
                 smax = 100;
                 n=0;
                 while (abs(smax) > eps && n < 100)
                     smax = 0;
                     ntuh = NTUh(1);
                     ntuc = NTUc(1);
                     th(:, :) = t1(1, :, :);
                     tc(:, :) = t2(1, :, :);

                     [th, tc,  ,  ] = crossflow_unmixed_unmixed ...
                          (ntuh, ntuc, nx, ny, th, tc);
                     for i=1 :1:nx1
                          for j=1:1:ny1
   510   511   512   513   514   515   516   517   518   519   520