5.16.2. Appendix 5.2: IHX Matrix Solution Algorithm¶
The solution of the matrix represented by Eqs. Eq. (5.4-42) through Eq. (5.4-45) 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.
\(\text{JMAX}\) = the number of nodes in the primary and intermediate coolant
\(\text{JMAX} - 1\) = the number of nodes in the shell and tube
Set \(j\) = 1.
Multiply Eq. (5.4-42) by \(\frac{1}{a_{1} \left( j \right)}\)
\(a_{2}\left( j \right) \rightarrow \frac{a_{2}\left( j \right)}{a_{1}\left( j \right)};a_{3}\left( j \right) \rightarrow \frac{a_{3}\left( j \right)}{a_{1}\left( j \right)} ;\ a_{4}\left( j \right) \rightarrow \frac{a_{4}\left( j \right)}{a_{1}\left( j \right)};a_{5} = \frac{a_{5}\left( j \right)}{a_{1}\left( j \right)};\ a_{1}\left( j \right) \rightarrow 1\);
3. \(e_{1}\left( j \right) \rightarrow e_{1}\left( j \right) - e_{3}\left( j \right)a_{2}\left( j \right)\)
\(e_{7}\left( j \right) \rightarrow e_{7}\left( j \right) - \ e_{3}\left( j \right)a_{3}\left( j \right)\);
\(e_{8}\left( j \right) \rightarrow e_{8}\left( j \right) - e_{8}\left( j \right)e_{4}\left( j \right)\);
\(e_{3}\left( j \right) \rightarrow 0\);
Multiply non-zero coefficients in Eq. (5.4-43) by \({1}{e_{1} \left( j \right)}\).
\(e_{5}\left( j \right) \ \longrightarrow \ \ \frac{e_{5}\left( j \right)}{e_{1}\left( j \right)} \ ;\ \ e_{7}\left( j \right) \longrightarrow \ \ \frac{e_{7}\left( j \right)}{e_{1}\left( j \right)} \ ;\)
\(e_{8}\left( j \right) \ \longrightarrow \ \ \frac{e_{8}\left( j \right)}{e_{1}\left( j \right)} \ ;\ \ e_{10}\left( j \right) \longrightarrow \ \ \frac{e_{10}\left( j \right)}{e_{1}\left( j \right)}\)
\(e_{1}\left( j \right) \ \longrightarrow \ \ 1\)
\(c_{1}\left( j \right) \ \longrightarrow \ \ c_{1}\left( j \right) \ - c_{2}\left( j \right) e_{5}\left( j \right)\)
\(c_{3}\left( j \right) \ \longrightarrow \ \ c_{3}\left( j \right) \ - c_{2}\left( j \right) e_{7}\left( j \right)\)
\(c_{4}\left( j \right) \ \longrightarrow \ \ c_{4}\left( j \right) \ - c_{2}\left( j \right) e_{10}\left( j \right)\)
\(c_{6}\left( j \right) \ \longrightarrow \ \ c_{6}\left( j \right) \ - c_{2}\left( j \right) e_{8}\left( j \right)\)
\(c_{2}\left( j \right) \ \longrightarrow \ \ 0\)
\(f_{1}\left( j \right) \ \longrightarrow \ \ f_{1}\left( j \right) \ - f_{7}\left( j \right) e_{10}\left( j \right)\)
\(f_{3}\left( j \right) \ \longrightarrow \ \ f_{3}\left( j \right) \ - f_{7}\left( j \right) e_{5}\left( j \right)\)
\(f_{6}\left( j \right) \ \longrightarrow \ \ f_{6}\left( j \right) \ - f_{7}\left( j \right) e_{8}\left( j \right)\)
\(f_{8}\left( j \right) \ \longrightarrow \ \ f_{8}\left( j \right) \ - f_{7}\left( j \right) e_{7}\left( j \right)\)
\(f_{7}\left( j \right) \ \longrightarrow \ \ 0\)
\(e_{1}\left( j + 1 \right) \ \longrightarrow \ \ e_{1}\left( j + 1 \right) \ - e_{6}\left( j + 1 \right) e_{7}\left( j \right)\)
\(e_{4}\left( j + 1 \right) \ \longrightarrow \ \ e_{4}\left( j + 1 \right) \ - e_{6}\left( j + 1 \right) e_{5}\left( j \right)\)
\(e_{8}\left( j + 1 \right) \ \longrightarrow \ \ e_{8}\left( j + 1 \right) \ - e_{6}\left( j + 1 \right) e_{8}\left( j \right)\)
\(e_{9}\left( j + 1 \right) \ \longrightarrow \ \ e_{9}\left( j + 1 \right) \ - e_{6}\left( j + 1 \right) e_{10}\left( j \right)\)
\(e_{6}\left( j + 1 \right) \ \longrightarrow \ \ 0\)
Multiply non-zero coefficients in Eq. (5.4-44) by \(\frac{1}{c_{1} \left( j \right)}\).
\(c_{3}\left( j \right) \ \longrightarrow \ \ \frac{c_{3}\left( j \right)}{c_{1}\left( j \right)} \ ;\ \ c_{4}\left( j \right) \longrightarrow \ \ \frac{c_{4}\left( j \right)}{c_{1}\left( j \right)}\)
\(c_{5}\left( j \right) \ \longrightarrow \ \ \frac{c_{5}\left( j \right)}{c_{1}\left( j \right)} \ ;\ \ c_{6}\left( j \right) \longrightarrow \ \ \frac{c_{6}\left( j \right)}{c_{1}\left( j \right)}\)
\(c_{5}\left( j \right) \ \longrightarrow \ \ \frac{c_{5}\left( j \right)}{c_{1}\left( j \right)} \ ;\ \ c_{6}\left( j \right) \longrightarrow \ \ \frac{c_{6}\left( j \right)}{c_{1}\left( j \right)}\)
\(f_{1}\left( j \right) \ \longrightarrow \ \ f_{1}\left( j \right) \ - f_{3}\left( j \right) C_{4}\left( j \right)\)
\(f_{8}\left( j \right) \ \longrightarrow \ \ f_{8}\left( j \right) \ - f_{3}\left( j \right) C_{3}\left( j \right)\)
\(f_{5}\left( j \right) \ \longrightarrow \ \ f_{5}\left( j \right) \ - f_{3}\left( j \right) C_{5}\left( j \right)\)
\(f_{6}\left( j \right) \ \longrightarrow \ \ f_{6}\left( j \right) \ - f_{3}\left( j \right) C_{6}\left( j \right)\)
\(f_{3}\left( j \right) \ \longrightarrow \ \ 0\)
\(e_{1}\left( j + 1 \right) \ \longrightarrow \ \ e_{1}\left( j + 1 \right) \ - e_{4}\left( j + 1 \right) c_{3}\left( j \right)\)
\(e_{9}\left( j + 1 \right) \ \longrightarrow \ \ e_{9}\left( j + 1 \right) \ - e_{4}\left( j + 1 \right) c_{4}\left( j \right)\)
\(e_{10}\left( j + 1 \right) \ \longrightarrow \ \ e_{10}\left( j + 1 \right) \ - e_{4}\left( j + 1 \right) c_{5}\left( j \right)\)
\(e_{8}\left( j + 1 \right) \ \longrightarrow \ \ e_{8}\left( j + 1 \right) \ - e_{4}\left( j + 1 \right) c_{6}\left( j \right)\)
\(e_{4}\left( j + 1 \right) \ \longrightarrow \ 0\)
\(f_{1}\left( j + 1 \right) \ \longrightarrow \ \ f_{1}\left( j + 1 \right) \ - f_{2}\left( j + 1 \right) c_{5}\left( j \right)\)
\(f_{4}\left( j + 1 \right) \ \longrightarrow \ \ f_{4}\left( j + 1 \right) \ - f_{2}\left( j + 1 \right) c_{4}\left( j \right)\)
\(f_{7}\left( j + 1 \right) \ \longrightarrow \ \ f_{7}\left( j + 1 \right) \ - f_{2}\left( j + 1 \right) c_{3}\left( j \right)\)
\(f_{6}\left( j + 1 \right) \ \longrightarrow \ \ f_{6}\left( j + 1 \right) \ - f_{2}\left( j + 1 \right) c_{6}\left( j \right)\)
\(f_{2}\left( j + 1 \right) \ \longrightarrow \ \ 0\)
Multiply non-zero coefficients in Eq. (5.4-45) by \(\frac{1}{f_{1} \left( j \right)}\).
\(f_{5}\left( j \right) \ \longrightarrow \ \ \frac{f_{5}\left( j \right)}{f_{1}\left( j \right)} \ ;\ \ f_{6}\left( j \right) \longrightarrow \ \ \frac{f_{6}\left( j \right)}{f_{1}\left( j \right)} ;\)
\(f_{8}\left( j \right) \ \longrightarrow \ \ \frac{f_{8}\left( j \right)}{f_{1}\left( j \right)} \ ;\ \ f_{1}\left( j \right) \longrightarrow \ 1\)
\(e_{1}\left( j + 1 \right) \ \longrightarrow \ \ e_{1}\left( j + 1 \right) \ - e_{9}\left( j + 1 \right) f_{5}\left( j \right)\)
\(e_{10}\left( j + 1 \right) \ \longrightarrow \ \ e_{10}\left( j + 1 \right) \ - e_{9}\left( j + 1 \right) f_{5}\left( j \right)\)
\(e_{8}\left( j + 1 \right) \ \longrightarrow \ \ e_{8}\left( j + 1 \right) \ - e_{9}\left( j + 1 \right) f_{6}\left( j \right)\)
\(e_{9}\left( j + 1 \right) \ \longrightarrow \ 0\)
\(f_{1}\left( j + 1 \right) \ \longrightarrow \ \ f_{1}\left( j + 1 \right) \ - f_{4}\left( j + 1 \right) f_{5}\left( j \right)\)
\(f_{7}\left( j + 1 \right) \ \longrightarrow \ \ f_{7}\left( j + 1 \right) \ - f_{4}\left( j + 1 \right) f_{8}\left( j \right)\)
\(f_{6}\left( j + 1 \right) \ \longrightarrow \ \ f_{6}\left( j + 1 \right) \ - f_{4}\left( j + 1 \right) f_{6}\left( j \right)\)
\(f_{4}\left( j + 1 \right) \ \longrightarrow \ \ 0\)
Set \(j\ \ \longrightarrow \ \ j + 1\)
If \(j < \text{JMAX}\), go to step 2
Multiply the non-zero coefficients in Eq. (5.4-45) by \(\frac{1}{f_{1} \left( j \right)}\)
\(f_{6}\left( j \right) \ \longrightarrow \ \ \frac{f_{6}\left( j \right)}{f_{1}\left( j \right)} \ ;\ \ f_{7}\left( j \right) \longrightarrow \ \ \frac{f_{7}\left( j \right)}{f_{1}\left( j \right)} ;\ \ f_{1} \left( j \right) \longrightarrow \ 1\)
\(e_{1}\left( j \right) \ \longrightarrow \ \ e_{1}\left( j \right) \ - e_{10}\left( j \right) f_{7}\left( j \right)\)
\(e_{8}\left( j \right) \ \longrightarrow \ \ e_{8}\left( j \right) \ - e_{10}\left( j \right) f_{6}\left( j \right)\)
\(e_{10}\left( j \right) \ \longrightarrow \ \ 0\)
\(e_{8}\left( j \right) \ \longrightarrow \ \ \frac{e_{8}\left( j \right)}{e_{1}\left( j \right)} \ ;\ \ e_{1}\left( j \right) \longrightarrow \ 1\)
\(\Delta T_{\text{CP}}\left( j \right) = e_{8}\left( j \right)\)
\(\Delta T_{\text{CT}}\left( j \right) = f_{6}\left( j \right) - f_{7}\left( j \right)\Delta T_{\text{CS}}\left( j \right)\)
Set \(j\ \ \longrightarrow \ \ j - 1\)
If \(j < 1\), go to step 23
\(\Delta T_{\text{CT}}\left( j \right) = f_{6}\left( j \right) - f_{5}\left( j \right)\Delta T_{\text{CT}}\left( j + 1 \right) - f_{8}\left( j \right)\Delta T_{\text{CS}}\left( j + 1 \right)\)
\(\Delta T_{\text{TU}}\left( j \right) = C_{6}\left( j \right) - C_{3}\left( j \right)\Delta T_{\text{CS}}\left( j + 1 \right) - C_{4}\left( j \right)\Delta T_{\text{CS}}\left( j + 1 \right) - C_{5}\left( j \right)\Delta T_{\text{CT}}\left( j + 1 \right)\)
\(\Delta T_{\text{CS}}\left( j \right) = e_{8}\left( j \right) - e_{5}\left( j \right)\Delta T_{\text{TU}}\left( j \right) - e_{7}\left( j \right)\Delta T_{\text{CS}}\left( j + 1 \right) - e_{10}\left( j \right)\Delta T_{\text{CT}}\left( j \right)\)
\(\Delta T_{\text{SH}}\left( j \right) = a_{4}\left( j \right) - a_{2}\left( j \right)\Delta T_{\text{CS}}\left( j \right) - a_{3}\left( j \right)\Delta T_{\text{CS}}\left( j + 1 \right)\)
Go to step 16
End