5.16.2. Appendix 5.2: IHX Matrix Solution Algorithm

The solution of the matrix represented by Eq. (5.4-44) through Eq. (5.4-47) and whose coefficients are given in Section 5.16.1 is accomplished by Gaussian elimination, making use of the zeros present in the matrix. It is presented as an algorithm as it is coded in subroutine TSIHX. The arrows in the following mean replacement of what is on the left by the expression on the right.

JMAX = the number of nodes in the primary and intermediate coolant

JMAX1 = the number of nodes in the shell and tube

  1. Set j = 1.

  2. Multiply Eq. (5.4-44) by 1a1(j)

    a2(j)a2(j)a1(j);a3(j)a3(j)a1(j); a4(j)a4(j)a1(j);a5=a5(j)a1(j); a1(j)1;

  3. e1(j)e1(j)e3(j)a2(j)

    e7(j)e7(j) e3(j)a3(j);

    e8(j)e8(j)e8(j)e4(j);

    e3(j)0;

  4. Multiply non-zero coefficients in Eq. (5.4-45) by 1e1(j).

    e5(j)   e5(j)e1(j) ;  e7(j)  e7(j)e1(j) ;

    e8(j)   e8(j)e1(j) ;  e10(j)  e10(j)e1(j)

    e1(j)   1

  5. c1(j)   c1(j) c2(j)e5(j)

    c3(j)   c3(j) c2(j)e7(j)

    c4(j)   c4(j) c2(j)e10(j)

    c6(j)   c6(j) c2(j)e8(j)

    c2(j)   0

    f1(j)   f1(j) f7(j)e10(j)

    f3(j)   f3(j) f7(j)e5(j)

    f6(j)   f6(j) f7(j)e8(j)

    f8(j)   f8(j) f7(j)e7(j)

    f7(j)   0

    e1(j+1)   e1(j+1) e6(j+1)e7(j)

    e4(j+1)   e4(j+1) e6(j+1)e5(j)

    e8(j+1)   e8(j+1) e6(j+1)e8(j)

    e9(j+1)   e9(j+1) e6(j+1)e10(j)

    e6(j+1)   0

  6. Multiply non-zero coefficients in Eq. (5.4-46) by 1c1(j).

    c3(j)   c3(j)c1(j) ;  c4(j)  c4(j)c1(j)

    c5(j)   c5(j)c1(j) ;  c6(j)  c6(j)c1(j)

    c5(j)   c5(j)c1(j) ;  c6(j)  c6(j)c1(j)

  7. f1(j)   f1(j) f3(j)C4(j)

    f8(j)   f8(j) f3(j)C3(j)

    f5(j)   f5(j) f3(j)C5(j)

    f6(j)   f6(j) f3(j)C6(j)

    f3(j)   0

    e1(j+1)   e1(j+1) e4(j+1)c3(j)

    e9(j+1)   e9(j+1) e4(j+1)c4(j)

    e10(j+1)   e10(j+1) e4(j+1)c5(j)

    e8(j+1)   e8(j+1) e4(j+1)c6(j)

    e4(j+1)  0

    f1(j+1)   f1(j+1) f2(j+1)c5(j)

    f4(j+1)   f4(j+1) f2(j+1)c4(j)

    f7(j+1)   f7(j+1) f2(j+1)c3(j)

    f6(j+1)   f6(j+1) f2(j+1)c6(j)

    f2(j+1)   0

  8. Multiply non-zero coefficients in Eq. (5.4-47) by 1f1(j).

    f5(j)   f5(j)f1(j) ;  f6(j)  f6(j)f1(j);

    f8(j)   f8(j)f1(j) ;  f1(j) 1

  9. e1(j+1)   e1(j+1) e9(j+1)f5(j)

    e10(j+1)   e10(j+1) e9(j+1)f5(j)

    e8(j+1)   e8(j+1) e9(j+1)f6(j)

    e9(j+1)  0

    f1(j+1)   f1(j+1) f4(j+1)f5(j)

    f7(j+1)   f7(j+1) f4(j+1)f8(j)

    f6(j+1)   f6(j+1) f4(j+1)f6(j)

    f4(j+1)   0

  10. Set j    j+1

  11. If j<JMAX, go to step 2

  12. Multiply the non-zero coefficients in Eq. (5.4-47) by 1f1(j)

    f6(j)   f6(j)f1(j) ;  f7(j)  f7(j)f1(j);  f1(j) 1

  13. e1(j)   e1(j) e10(j)f7(j)

    e8(j)   e8(j) e10(j)f6(j)

    e10(j)   0

  14. e8(j)   e8(j)e1(j) ;  e1(j) 1

  15. ΔTCP(j)=e8(j)

    ΔTCT(j)=f6(j)f7(j)ΔTCS(j)

  16. Set j    j1

  17. If j<1, go to step 23

  18. ΔTCT(j)=f6(j)f5(j)ΔTCT(j+1)f8(j)ΔTCS(j+1)

  19. ΔTTU(j)=C6(j)C3(j)ΔTCS(j+1)C4(j)ΔTCS(j+1)C5(j)ΔTCT(j+1)

  20. ΔTCS(j)=e8(j)e5(j)ΔTTU(j)e7(j)ΔTCS(j+1)e10(j)ΔTCT(j)

  21. ΔTSH(j)=a4(j)a2(j)ΔTCS(j)a3(j)ΔTCS(j+1)

  22. Go to step 16

  23. End