5.16. Appendices¶
5.16.1. Appendix 5.1: IHX Matrix Coefficients¶
The coefficients in Eq. (5.4-37) for the \(j\)-th vertical section of the shell in terms of the quantities defined in Section 5.4.2.2 are as follows:
(A5.1‑1)
(A5.1‑2)
(A5.1‑3)
(A5.1‑4)
(A5.1‑5)
where
\(\theta_{2\text{S}}\) = the degree of implicitness for the shell-side coolant channel
\(\Delta t\) = the time interval
The coefficients in Eq. (5.4-38) for the \(j\)-th vertical section of the shell-side coolant for normal flow (downward) are:
(A5.1‑6)
(A5.1‑7)
(A5.1‑8)
(A5.1‑9)
(A5.1‑10)
(A5.1‑11)
(A5.1‑12)
(A5.1‑13)
The same coefficients for reversed flow (upward) in the shell-side coolant channel are:
(A5.1‑14)
(A5.1‑15)
(A5.1‑16)
(A5.1‑17)
(A5.1‑18)
(A5.1‑19)
(A5.1‑20)
(A5.1‑21)
The terms \(e_{9} \left( j \right)\) and \(e_{10} \left( j \right)\) have been added to Eq. (5.4-38) because they appear during the solution of the simultaneous equations. These arrays are set to zero before the solution is begun.
In addition, the boundary conditions for normal shell-side coolant channel flow are
(A5.1‑22)
For reversed primary channel flow, they are
(A5.1‑23)
and for both cases, they are
(A5.1‑24)
The coefficients in Eq. (5.4-39) for the \(j\)-th vertical section of the tube are:
(A5.1‑25)
(A5.1‑26)
(A5.1‑27)
(A5.1‑28)
(A5.1‑29)
(A5.1‑30)
The coefficients in Eq. (5.4-40) for the \(j\)-th vertical section of the tube-side coolant for normal flow (upward) are:
(A5.1‑31)
(A5.1‑32)
(A5.1‑33)
(A5.1‑34)
(A5.1‑35)
(A5.1‑36)
The same coefficients for reversed flow (downward) in the intermediate coolant channel are:
(A5.1‑37)
(A5.1‑38)
(A5.1‑39)
(A5.1‑40)
(A5.1‑41)
(A5.1‑42)
The terms for \(f_{7} \left( j \right)\) and \(f_{8} \left( j \right)\) have been added to Eq. (5.4-40) because they appear during the solution of the simultaneous equations. These arrays are also set to zero before the solution is begun.
Also, the boundary conditions for normal tube-side coolant channel flow are
(A5.1‑43)
For reversed tube-side channel flow, they are
(A5.1‑44)
and for both cases, they are
(A5.1‑45)
5.16.2. Appendix 5.2: IHX Matrix Solution Algorithm¶
The solution of the matrix represented by Eqs. Eq. (5.4-37) through Eq. (5.4-40) 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-37) 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-38) 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-39) 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-40) 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-40) 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
5.16.3. Appendix 5.3: Cover Gas Flow and Pressure Algorithm¶
The main steps in the cover gas treatment in Section 5.7 may be summarized in the following algorithm:
Initialize. Set \(I_{\text{n}} = 0\).
2. Start a loop on \(I_{\text{o}}\) for \(I_{\text{o}}\) = \(\text{ICV}1\), …, \(\text{ICV}2\). Set up \(\text{INEW} \left( I_{\text{o}} \right)\), \(\text{IOLD} \left( I_{\text{n}} \right)\), where \(I_{\text{o}}\) is the old compressible volume number and \(I_{\text{n}}\) is the new compressible volume number for the compressed arrays.
3. Is there gas in this compressible volume? Is \(\text{ITYPCV} \left( I_{\text{o}} \right)\) = 2,3,4,5, or 8? If so, go to step 5.
No gas in this compressible volume. \(\text{INEW} \left( I_{\text{o}} \right) = 0\),
\(p_{4} \left( I_{\text{o}} \right) = p_{3} \left( I_{\text{o}} \right)\),
\(T_{4} \left( I_{\text{o}} \right) = T_{3} \left( I_{\text{o}} \right)\),
\(m_{4} \left( I_{\text{o}} \right) = 0\). Go to the end of the loop, step 6.
Gas in this compressible volume.
\(I_{\text{n}} = I_{\text{n}} + 1\)
\(\text{INEW} \left(I_{\text{o}} \right) = I_{\text{n}}\)
\(\text{IOLD} \left(I_{\text{n}} \right) = I_{\text{o}}\)
\({p'}_{3} \left( I_{\text{n}} \right) = p_{3} \left( I_{\text{o}} \right), {m'}_{3} \left( I_{\text{n}} \right) = m_{3} \left( I_{\text{o}} \right)\) ,
\({V'}_{3} \left( I_{\text{n}} \right) = V_{3} \left( I_{\text{o}} \right), {V'}_{4} \left( I_{\text{n}} \right) = V_{4} \left( I_{\text{o}} \right)\) ,
\(\tau' \left( I_{\text{n}} \right) = \tau \left( I_{\text{o}} \right)\)
6. End of loop on \(I_{\text{o}}\). Loop back to step 3 for the next value of \(I_{\text{o}}\).
\(I_{\text{nmax}} = I_{\text{n}}\)
8. Start a loop on \(I_{\text{n}}\) for \(I_{\text{n}}\) = 1, …, \(I_{\text{nmax}}\)
Compute the adiabatic expansion and heat flow, as well as a temporary array \(c \left( i \right)\) (see below).
Re-calculate \({p'}_{3} \left( I_{\text{o}} \right)\) giving.
\({p'}_{3} \left( I_{\text{n}} \right) = {p'}_{3} \left( I_{\text{n}} \right) \left\{ 1 - \gamma \left\lbrack \frac{{V'}_{4} \left( I_{\text{n}} \right) - {V'}_{3} \left( I_{\text{n}} \right)}{{V'}_{4} \left( I_{\text{n}} \right)} \right\rbrack \right\}\)
Calculate \({T'}_{3} \left( I_{\text{n}} \right)\).
Set \(c \left( I_{\text{n}} \right) = \frac{{p'}_{3} \left( I_{\text{n}} \right)\gamma \Delta t_{\text{s}}}{{m'}_{3} \left( I_{\text{n}} \right) {T'}_{3} \left( I_{\text{n}} \right)}\)
Also set \(c \left( I, J \right) = 0\), with \(c \left( I_{\text{n}}, I_{\text{n}} \right) = 0\),
and \(d \left( I_{\text{n}} \right) = 0\).
10. End of loop on \(I_{\text{n}}\). Loop back to step 9 for the next value of \(I_{\text{n}}\).
Is there more than one gas compressible volume? Is \(I_{\text{nmax}} > 1\)? If so, go to step 13.
Go to step 25.
Start loop on I for I = 1, …, \(I_{\text{nmax}}-1\).
Initialize \(e_{\text{ij}}\), \(F_{1\text{ij}}\), \(F_{2\text{ij}}\).
Start loop on \(J\) for \(J = I_{\text{n}} + 1\), …, \(I_{\text{nmax}}\)
15. Set \(c \left( I,J \right) = 0.0\), \(c \left( J,I \right) = 0.0\), \(F_{1} \left( I,J \right) = 0.0\),
\(F_{1} \left( J,I \right) = 0.0\), \(F_{2} \left( I,J \right) = 0.0\), \(F_{2} \left( J,I \right) = 0.0\)
16. End of loop on \(J\). Loop back to step 11 for additional values of \(J\).
End of loop on I. Loop back to step 14 for additional values of \(I\).
Are there any gas segments? Is \(\text{ISG} 1 > 0\)?
If not, go to step 25.
19. Start loop on \(I_{\text{s}}\) for \(I_{\text{s}}\) = \(\text{ISG}1\), …, \(\text{ISG}2\).
Compute gas flow between compressible volumes.
20. Find \(I_{\text{ni}}\) and \(I_{\text{no}}\), the inlet and outlet compressible volumes for gas segment \(I_{\text{s}}\).
\(I_{\text{ni}} = \text{INEW} \left( \text{JNODG} \left( 1,I_{\text{s}} \right) \right)\)
\(I_{\text{no}} = \text{INEW} \left( \text{JNODG} \left( 2,I_{\text{s}} \right) \right)\)
21. Iterate routine to obtain \({F'}_{\text{o}},\ {F'}_{1},\ {F'}_{2},\ T_{\text{ij}}\) (See remarks after Eq. 5.7-12).
\(F_{1} \left( I_{\text{ni}},I_{\text{no}} \right) = F_{1} \left( I_{\text{ni}},I_{\text{no}} \right) + {F'}_{1}\) \(F_{1} \left( I_{\text{no}},I_{\text{ni}} \right) = F_{1} \left( I_{\text{no}},I_{\text{ni}} \right) + {F'}_{1}\) \(F_{2} \left( I_{\text{ni}},I_{\text{no}} \right) = F_{2} \left( I_{\text{ni}},I_{\text{no}} \right) + {F'}_{2}\) \(F_{2} \left( I_{\text{no}},I_{\text{ni}} \right) = F_{2} \left( I_{\text{no}},I_{\text{nio}} \right) + {F'}_{2}\) \(c \left( I_{\text{no}},I_{no} \right) = c \left( I_{\text{no}},I_{\text{no}} \right) - e\left( I_{\text{no}} \right) T_{\text{ij}} {F'}_{1}\) \(c \left( I_{\text{no}},I_{\text{ni}} \right) = c \left( I_{\text{no}},I_{\text{ni}} \right) - e\left( I_{\text{no}} \right) T_{\text{ij}} {F'}_{1}\) \(c \left( I_{\text{ni}},I_{\text{ni}} \right) = c \left( I_{\text{ni}},I_{\text{ni}} \right) - e\left( I_{\text{ni}} \right) T_{\text{ij}} {F'}_{2}\) \(c \left( I_{\text{ni}},I_{\text{no}} \right) = c \left( I_{\text{ni}},I_{\text{no}} \right) - e\left( I_{\text{ni}} \right) T_{\text{ij}} {F'}_{2}\) \(d \left( I_{\text{no}} \right) = d \left( I_{\text{no}} \right) + e\left( I_{\text{no}} \right) T_{\text{ij}} {F'}_{0}\) \(d \left( I_{\text{ni}} \right) = d \left( I_{\text{ni}} \right) - e\left( I_{\text{ni}} \right) T_{\text{ij}} {F'}_{0}\) \(F_{\text{os}} \left( I_{\text{ni}} \right) = F_{\text{os}} \left( I_{\text{no}} \right) + {F'}_{0}\) \(F_{\text{os}} \left( I_{\text{ni}} \right) = F_{\text{os}} \left( I_{\text{no}} \right) - {F'}_{0}\) \(F_{\text{os}} \left( I_{\text{s}} \right) = {F'}_{0}\) \(F_{\text{s}1} \left( I_{\text{s}} \right) = {F'}_{1}\) \(F_{\text{s}2} \left( I_{\text{s}} \right) = {F'}_{2}\)
23. End of loop on \(I_{\text{s}}\). Loop back to step 20 for the next value of \(I_{\text{s}}\).
Solve the matrix equation for \(\Delta p \left( i \right)\) (see Eq. 5.7-20).
25. Start loop on \(I_{\text{n}}\) for \(I_{\text{n}} = 1\), … \(I_{\text{nmax}}\)
\({p'}_{4}\left( I \right) = {p'}_{3}\left( I \right) + \Delta p_{\text{i}}\) \({m'}_{4}\left( I \right) = {m'}_{3}\left( I \right) + \Delta t_{\text{x}} F_{\text{os}}\left( I \right)\)
27. End of loop on \(I_{\text{n}}\). Loop back to step 26 for additional values of \(I_{\text{n}}\).
If \(I_{\text{nmax}} = 1\), go to step 34.
Start loop on \(I\) for \(I\) = 1, …, \(I_{\text{nmax}}-1\).
Start loop on \(J\) for \(J\) = \(I + 1\), \(I_{\text{nmax}}\).
\({m'}_{4} \left( I \right) = {m'}_{4} \left( I \right) + \Delta t_{\text{s}} \left\lbrack F_{1}\left( J,I \right)\Delta p\left( I \right) + F_{2}\left( J,I \right)\Delta p\left( J \right) \right\rbrack\) \({m'}_{4} \left( J \right) = {m'}_{4} \left( J \right) + \Delta t_{\text{s}} \left\lbrack F_{1}\left( I,J \right)\Delta p\left( J \right) + F_{2}\left( I,J \right)\Delta p\left( J \right) \right\rbrack\)
32. End of loop on \(J\). Loop back to step 31 for additional values of \(J\).
33. End of loop on \(I\). Loop back to step 30 for additional values of \(I\).
For \(I = 1\), …, \(I_{\text{nmax}}\) set
\({T'}_{4} \left( I \right) = \frac{{p'}_{4} \left( I \right) {V'}_{4} \left( I \right)}{{n'}_{4} \left( I \right)R}\)
Start loop on \(I_{\text{n}}\) for \(I_{\text{n}} = 1\), …, \(I_{\text{nmax}}\)
\(I_{o} = \text{IOLD}\left( I_{n} \right)\)
\(p_{3}\left( I_{o} \right) = {p'}_{3} \left( I_{n} \right)\)
\(m_{3}\left( I_{o} \right) = {m'}_{3} \left( I_{n} \right)\)
\(T_{3}\left( I_{o} \right) = {T'}_{3} \left( I_{n} \right)\)
37. End of loop on \(I_{\text{n}}\). Loop back to step 36 for additional values of \(I_{\text{o}}\).
If \(\text{ISG}1 = 0\), go to step 40.
For \(I_{\text{s}} = \text{ISG}1\), …, \(\text{ISG}2\)
\(I_{1} = \text{INEW}\left( \text{JNODG}\left( 1,I_{\text{s}} \right) \right)\)
\(I_{2} = \text{INEW}\left( \text{JNODG}\left( 2,I_{\text{s}} \right) \right)\)
\(F_{\text{g}4}\left( I_{\text{s}} \right) = F_{\text{so}}\left( I_{\text{s}} \right) + F_{\text{s}1}\left( I_{\text{s}} \right)\Delta p\left( I_{2} \right) = F_{\text{s}2}\left( I_{\text{s}} \right)\Delta p\left( I_{1} \right)\)
Optional debugging print-out.
Return
5.16.4. Appendix 5.4: Air Blast Heat Exchanger Stack Momentum Equation¶
This appendix derives an expression for the air mass flowrate through the natural convection stack. The stack contains an opening at its base through which air is drawn in, the air passes over the finned tubes of the air blast heat exchanger and then rises to be exhausted at the top of the stack.
The one-dimensional steady-state momentum equation for flow in a channel of uniform cross section is
(A5.4‑1)
where
\(p\) =pressure
\(\rho\) =density
\(v\) =velocity
\(\tau\) =wall shear stress
\(P_{\text{w}}\) =wetted perimeter
\(A\) =flow area
\(\theta\) =channel inclination relative to horizontal
Integrating Eq. A5.4-1 gives the pressure change along the channel
(A5.4‑2)
where
\(w\) =channel mass flowrate
\(\mathcal{l}\) =channel length
\(\rho_{\text{o}}\) =outlet density
\(\rho_{\text{i}}\) =inlet density
\(\rho_{\text{m}}\) =mean density
\(K\) =flow loss coefficient
Using Eq. A5.4-2, the pressure change form stack inlet to above the heat exchanger is
(A5.4‑3)
where
\(A_{\text{SI}}\) = stack inlet cross-sectional area
\(A_{\text{R}}\) = riser cross-sectional area
\(A_{\text{HX}}\) = flow area at heat exchanger
\(K_{\text{SI}}\) = stack inlet loss coefficient
\(K_{\text{HX}}\) = heat exchanger loss coefficient
\(\rho_{\text{c}}\) =inlet air density
The gravity and acceleration terms have been neglected.
Similarly, the pressure change from the start of the riser to the stack outlet is
(A5.4‑4)
where
\(K_{\text{SO}}\) = stack outlet loss coefficient
\(K_{\text{R}}\) = riser loss coefficient
\(\rho_{\text{h}}\) = riser air density
\(\mathcal{l}\) = riser length
The pressure change from the stack outlet through the outside air back to the stack inlet is approximately
(A5.4‑5)
The above three pressure changes, Eqs. A5.4-3 through A5.4-5, must sum to zero since they are taken around a closed circuit. Solving for the air flowrate yields
(A5.4‑6)
5.16.5. Appendix 5.5: Interpolation from User-Supplied Tables¶
A number of user-supplied tables are used in the SAS4A/SASSYS‑1 code. These tables are of the form \(Y \left( i \right)\) as a function of \(X \left( i \right)\). The default option is to use linear interpolation between points in the table to obtain \(Y\) as a function of \(X\). If \(X\) is between \(X \left( J \right)\) and \(X \left( J+1 \right)\), then linear interpolation gives
(A5.5‑1)
where
(A5.5‑2)
Linear interpolation has the advantages that it is simple to do and it never exhibits the wild behavior and spurious oscillations that higher order interpolation schemes can give. On the other hand, linear interpolation has some disadvantages. One disadvantage is that if only a few widely-spaced points are used for a table, linear interpolation may not be very accurate between points. Another disadvantage is that linear interpolation gives slope discontinuities at the table points. These slope discontinuities can cause corresponding slope discontinuities in plots of powers, temperatures, and flow rates calculated by the code. Sometimes these slope discontinuities correspond to real physical events, such as scramming the control rods or tripping the pumps; but usually they are numerical artifacts of the interpolation scheme. In order to address this problem, alternative interpolation schemes are available for some of the tables used by the code. Table 5.16.1 lists the interpolation options.
For the third order fit,
(A5.5‑3)
where the coefficients C are picked such that:
\(Y\) is continuous at \(X \left( J \right)\) and \(X \left( J+1 \right)\).
The slope of \(Y\) is continuous at internal points.
The value of \(F\) is minimized, where
(A5.5‑4)
\(\text{IFIT} \left( K \right) = 0\) |
Use linear fits |
1 |
3rd order fits |
2 |
3rd order fits with slope discontinuities at points where \(X \left( i+1 \right) - X \left( i \right) < .001\) |
3 |
Linear fit to \(\log{\left( Y \right)}\) |
4 |
3rd order fit to \(\log{\left( Y \right)}\) |
5 |
3rd order fit to \(\log{\left( Y \right)}\) with slope discontinuities |
\(K = 1\) |
Power vs time or user specified reactivity vs time |
2 |
PRIMAR-1 pump head vs time or channel flow vs time |
3 |
PRIMAR-1 inlet temperature vs time |
4 |
PRIMAR-4 pump head, motor torque, or pump speed vs time |
Note: For all other tables, linear interpolation is used.
In this equation \(X_{\text{min}}\) and \(X_{\text{max}}\) are the first and last points in the table if IFIT = 1 or 4. If IFIT = 2 or 5, then the table is broken up into ranges, with the boundaries between ranges occurring at the points where the slope discontinuities occur. In this case, the fitting is done separately for each range; and \(X_{\text{min}}\) and \(X_{\text{max}}\) are the points at the ends of the range. There are some special cases or exceptions:
For all fitting options, if \(X\) is less than the first entry in the table, then \(Y\) is set equal to the first value of \(Y\) in the table. Also, if \(X\) is greater than the last entry in the table, then the last value of \(Y\) is used.
For IFIT = 2 or 5, in an interval where a slope discontinuity occurs \(\left( X \left( i+1 \right) - X \left( i \right) < .001 \right)\) linear interpolation is used from \(X \left( i \right)\) to \(X \left( i+1 \right)\).
If there are only two points in a range, then linear interpolation is used.
For IFIT = 1, 2, 4 or 5, if there are only 3 points in a range, then a parabola is fitted to the 3 points to determine the values of C in the range. Third order fits are only used if there are at least 4 points in a range.
Care should be taken when using third order fits, since they can result in spurious wiggles. Figure 5.16.1 shows the results of a third order fit to the power level in the SHRT-17 test in EBR-II. In this case, the third order fit to the power produces wiggles, whereas the third order fit to the logarithm of the power produces a smooth curve.
5.16.6. Appendix 5.6: Optional Eulerian Solution for Pipe Temperatures¶
As mentioned in Section 5.4.1, a Eulerian calculation can be used to speed up the pipe temperature calculation if the coolant moves more than two nodes in a time step. This Eulerian speed-up has only been implemented for flow in the nominal direction; if flow reversal has occurred in a pipe, then the Eulerian calculation is not used.
For the Eulerian calculation, Eq. (5.4-1) for the coolant is replaced by
(A5.6‑1)
Eq. (5.4-2) is still used for the wall. Finite differencing of Eq. A5.6-1 gives
(A5.6‑2)
Similarly, finite differencing of Eq. (5.4-2) gives
(A5.6‑3)
Eq. A5.6-3 can be rewritten as
(A5.6‑4)
where
(A5.6‑5)
(A5.6‑6)
and
(A5.6‑7)
Similarly, Eq. A5.6-2 can be rewritten as
(A5.6‑8)
where
(A5.6‑9)
(A5.6‑10)
(A5.6‑11)
and
(A5.6‑12)
Eqs. A5.6-4 and A5.6-8 can be combined to give
(A5.6‑13)
where
(A5.6‑14)
and
(A5.6‑15)
Note that \(B_{\text{cc}0\text{j}}\) and \(B_{\text{cc}1\text{j}}\) can be calculated before the temperatures at the end of the sub-interval are known.
The pipe inlet temperature at the end of the step is used to set the first coolant temperature, \(T_{\text{c}61}\). The code marches along the pipe, using Eq. A5.6-13 to calculate \(T_{\text{c}6\text{j}+1}\) after \(T_{\text{c}6\text{j}}\) has been calculated. After the coolant temperatures have been calculated, Eq. A5.6-4 is used to calculate the wall temperatures.