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

Appendix  511


                 for i=1:1:nx1
                      for j =1:1:ny1
                            if (i > 1)
                                  if (j == 1)
                                        th(i, j) = ch1 ∗ th(i - 1, j)  ...
                                             - ch2 ∗ (tc(i, j) + tc(i - 1, j));
                                  else
                                        th(i, j) = ch11 ∗ th(i - 1, j) ...
                                             -ch12∗tc(i-1,j)+ch21∗th(i,j-1)  ...
                                             - ch22 ∗ tc(i, j - 1);
                                  end
                            end
                            if (j > 1)
                                  if (i == 1)
                                        tc(i, j) = cc1 ∗ tc(i, j - 1) - cc2 ∗ (th(i, j)  ...
                                             + th(i, j - 1));
                                  else
                                        tc(i, j) = cc11 ∗ tc(i, j - 1) ...
                                             -cc12∗th(i,j-1)+cc21∗tc(i-1,j)  ...
                                             - cc22 ∗ th(i - 1, j);
                                  end
                            end
                      end
                 end
                 thm = (th(nx1, 1) + th(nx1, ny1)) / 2;
                 for j=2:1:ny
                      thm = thm + th(nx1, j);
                 end
                 thm = thm / ny;
                 tcm = (tc(1, ny1) + tc(nx1, ny1)) / 2;
                 for i=2:1:nx
                      tcm = tcm + tc(i, ny1);
                 end
                 tcm = tcm / nx;
              end

              function K = special_function_K (x)
                 K = (1 - exp(- x)) / x;
              end
   523   524   525   526   527   528   529   530   531   532   533