5.2. Hydraulic Calculations

5.2.1. Compressible Volumes and Liquid Segments

The primary and intermediate loop thermal hydraulics calculations use a generalized geometry, as indicated in Figure 5.2.1. A number of compressible volumes are connected by liquid or gas segments, and each liquid segment can contain one or more elements. The treatment allows compressible volumes and segments to be connected in an arbitrary manner. Table 5.2.1 lists the types of compressible volumes used in PRIMAR-4. Compressible volumes are characterized by pressure, volume, mass, and temperature. They can accumulate liquid or gas by compressing the cover gas or the liquid, and it is the pressure in the compressible volumes that drives the flows through the liquid and gas segments. Table 5.2.2 lists the types of elements that can make up a liquid segment. Liquid flow elements are characterized by incompressible single-phase flow, with the possible exception of the core element. The core subassemblies, which are treated by the coolant dynamics modules, are a special case and are discussed in Section 5.2.2.

../../_images/image3.png

Figure 5.2.1 PRIMAR-4 Generalized Geometry.

Table 5.2.1 Compressible Volume Types Used in PRIMAR-4

Type Number

Description

1

Inlet plenum

2

Compressible liquid volume, no cover gas

3

Closed outlet plenum, no cover gas

4

Almost incompressible liquid junction, no cover gas

5

Pipe rupture source

6

Pipe rupture sink, guard vessel

7

Outlet plenum with cover gas

8

Pool

9

Pump bowl and cover gas

10

Expansion tank with cover gas

11

Compressible gas volume, no liquid


Table 5.2.2 Liquid Flow Element Types Used in PRIMAR-4

Type Number

Description

1

Core subassemblies, SAS channels

2

Core bypass assemblies

3

Pipe

4

Check valve

5

Pump

6

IHX, shell side

7

IHX, tube side

8

Steam generator, sodium side

9

DRACS heat exchanger, tube side

10

DRACS heat exchanger, shell side

11

Valve

12

Air dump heat exchanger, sodium side

13

Annular element

15

Annular pump

The hydraulic equations for the primary and intermediate heat-transport loops are solved by a semi-implicit or fully implicit time differencing scheme in which the pressures and flows for all connected compressible volumes and segments are solved for simultaneously. By linearizing the equations for each time step, a semi-implicit or fully implicit solution can be obtained without resorting to iteration techniques. Linearized semi-implicit or fully implicit methods are most useful for long transients in which temperatures and flows change slowly, since in such cases accurate results can be obtained with large time steps so long as the step sizes are small enough that changes during a step are small.

Three equations are used in calculating the pressures in the compressible volumes and the flow rates in the connecting liquid segments. They are the momentum equation for incompressible single-phase flow in a segment, an expression for the average flow rate in a segment during a time step, and an expression for the change in pressure in a compressible volume as a result of flow into it and out from it during a time step. Each of these equations is taken up in turn.

5.2.1.1. Momentum Equation

The momentum equation for a single-phase incompressible liquid is taken as

(5.2-1)\[ \frac{1}{A}\frac{\partial \text{w}}{\partial \text{t}} + \frac{1}{A^{2}}\frac{\partial}{\partial \text{z}}\left( \frac{w^{2}}{\rho} \right) + \frac{\partial \text{p}}{\partial \text{z}} + \left( \frac{\partial \text{p}}{\partial \text{z}} \right)_{\text{loss}} = 0\]

where

\(w\) = the mass flow rate

\(A\) = the flow area

\(\rho\) = the density of the liquid

\(\frac{\partial \text{p}}{\partial \text{z}}\) = the pressure gradient driving the flow

\(\left( \frac{\partial \text{p}}{\partial \text{z}} \right)_{\text{loss}}\) = the pressure drop from all of the loss terms

When Eq. (5.2-1) is integrated over a segment containing several elements, it can be written as the basic equation for the flow in segment \(i\):

(5.2-2)\[ \sum_{\text{k}}{ \frac{L_{\text{k}}}{A_{\text{k}}}} \frac{\text{dw}\left( i \right)}{\text{dt}} = p_{\text{in}}\left( i \right) - p_{\text{out}}\left( i \right) - \Delta p_{\text{fr}}\left( i \right) - \Delta p_{\text{w}2}\left( i \right) - \Delta p_{K_{in}}\left( i \right) - \Delta p_{\text{v}}\left( i \right) - \Delta p_{\text{gr}}\left( i \right) + \Delta p_{\text{p}}\left( i \right)\]

Here, \(\text{dw} \left( i \right) / \text{dt}\) is the time rate of change of the mass flow rate through segment \(i\). The summation is over the elements in segment \(i\), and \(L_{\text{k}}\) and \(A_{\text{k}}\) are the length and flow area of element \(k\). The term \(p_{\text{in}} \left( i \right)\) is the pressure at the inlet to segment \(i\), which is the pressure in the compressible volume at the inlet of segment \(i\). The term \(p_{\text{out}} \left( i \right)\) is the pressure at the outlet of segment \(i\), or in the compressible volume at the outlet of segment \(i\). The term \(\Delta p_{\text{fr}} \left( i \right)\) is the frictional pressure change for the segment \(i\), and with the minus sign in Eq. (5.2-2), it is a loss term. However, this frictional loss term for the segment is actually the sum of similar loss terms for each element in the segment. The same things can be said about the remaining terms in Eq. (5.2-2). Together with their respective signs, \(\Delta p_{\text{w}2} \left( i \right)\) is any orifice or bend pressure drop proportional to the square of the mass flow rate, \(\Delta p_{\text{v}} \left( i \right)\) is any valve pressure drop, \(\Delta p_{\text{gr}} \left( i \right)\) is the gravity-head pressure drop, and \(\Delta p_{\text{p}} \left( i \right)\) is the pump-head pressure increase from all of the pumps in segment \(i\).

In Eq. (5.2-2), \(\Delta p_{K_{in}} \left( i \right)\) is the minor pressure loss that occurs at the inlet of the segment. This term is defined as

(5.2-3)\[ \Delta p_{K_{in}}\left( i \right) = K_{in}\left(Re_{in}\right) \frac{w \left| w \right|}{2\rho A_{in}^{2}}\]

where \(K_{out}\left(Re_{out}\right)\) is the anisotropic Re-dependent loss coefficient at the inlet of segment \(i\), \(Re_{in}\) is the Re number at the inlet of segment \(i\) and \(A_{in}\) is the area at the inlet of segment \(i\). Anisotropic Re-dependent loss coefficients at segment inlets are defined using SegLossCoefTableID and additional information can be found in Section 5.3.3.1.

Eq. (5.2-2) has the form:

(5.2-4)\[ \sum_{\text{k}}{\frac{L_{\text{k}}}{A_{\text{k}}}} \frac{\text{dw}\left( i \right)}{\text{dt}} = f \left( w,t \right)\]

which can be written in finite difference form

(5.2-5)\[ \sum_{\text{k}}\frac{L_{\text{k}}}{A_{\text{k}}}\frac{\Delta w \left( i \right)}{\Delta t} = \theta_{\text{1}}\left( i \right)f_{\text{i}}\left( w,t \right) + \theta_{2}\left( i \right)f_{\text{i}}(w + \Delta w,t + \Delta t)\]

where \(\theta_1 +\theta_2 = 1\). The parameters \(\theta_1\) and \(\theta_2\) determine the degree of implicitness of the solution. For a fully explicit solution, \(\theta_1 = 1\) and \(\theta_2 = 0\). For a fully implicit solution \(\theta_1 = 0\) and \(\theta_2 = 1\). The degree of implicitness is discussed in Section 5.2.4 and in Section 3.19.1 in Chapter 3.

The linearization consists in making the approximation that

(5.2-6)\[ f\left( w + \Delta w,t + \Delta t \right) = f\left( w,t \right) + \Delta t\frac{\partial \text{f}}{\partial \text{t}} + \Delta w\frac{\partial \text{f}}{\partial \text{w}}\]

so the flow equation becomes

(5.2-7)\[ \sum_{\text{k}}{\frac{L_{\text{k}}}{A_{\text{k}}}} \Delta w \left( i \right) = \Delta t \left\{ f \left( w,t \right) + \theta_{2}\left( i \right) \left\lbrack \Delta t \frac{\partial \text{f}}{\partial \text{t}} + \Delta w\frac{\partial \text{f}}{\partial \text{w}} \right\rbrack \right\}\]

which takes the form

(5.2-8)\[ a_{0}\left( i \right) \Delta w\left( i \right) = a_{1}\left( i \right) + \theta_{2}\left( i \right) \left\{ a_{2}\left( i \right) + \Delta t \left\lbrack \Delta p\left( ji \right) - \Delta p\left( jo \right) \right\rbrack + a_{3}\left( i \right) \Delta w\left( i \right) \right\}\]

or

(5.2-9)\[ \Delta w \left( i \right) = \frac{a_{1}\left( i \right) + \theta_{2}\left( i \right) \left\{ a_{2} \left( i \right) + \Delta t \left\lbrack \Delta p\left( ji \right) - \Delta p\left( jo \right) \right\rbrack \right\}}{a_{0}\left( i \right) - \theta_{2}\left( i \right) a_{3}\left( i \right)}\]

where \(ji\) and \(jo\) are the compressible volumes at the inlet and outlet of the liquid segment.

In general, the \(a\)’s are sums of contributions from each element, \(k\), in the segment. The terms are

(5.2-10)\[ a_{0} = \sum_{\text{k}}{\Delta a_{0}\left( k \right)}\]
(5.2-11)\[ \Delta a_{0}\left( k \right) = \frac{L_{\text{k}}}{A_{\text{k}}}\]
(5.2-12)\[ a_{1} = \Delta t\left\lbrack p\left( ji,t \right) - p\left( jo,t \right) \right\rbrack - \Delta t \Delta p_{K_{in}} + \sum_{\text{k}}{\Delta a_{1}\left( k \right)}\]
(5.2-13)\[ \Delta a_{1}\left( k \right) = \left\lbrack - \Delta p_{\text{fr}}\left( k,t \right) - \Delta p_{\text{gr}}\left( k,t \right) - \Delta p_{\text{w}2}\left( k,t \right) - \Delta p_{\text{v}}\left( k,t \right) + \Delta p_{\text{p}}\left( k,t \right) \right\rbrack \Delta t\]
(5.2-14)\[ a_{2} = \sum_{\text{k}}{\Delta a_{2}\left( k \right)}\]
(5.2-15)\[ \Delta a_{2}\left( k \right) = \Delta t^{2}\frac{\partial}{\partial \text{t}}\lbrack\Delta p_{\text{P}}\left( k \right) - \Delta p_{\text{fr}}\left( k \right) - \Delta p_{\text{w}2}\left( k \right) - \Delta p_{\text{v}}\left( k \right) - \Delta p_{\text{gr}}\left( k \right)\rbrack\]
(5.2-16)\[ a_{3} = - \Delta t \frac{\partial \Delta p_{K_{in}}}{\partial w} + \sum_{\text{k}}{\Delta a_{3}\left( k \right)}\]

and

(5.2-17)\[ \begin{align}\begin{aligned}\frac{\partial \Delta p_{K_{in}}}{\partial w} = 2\frac{\Delta p_{K_{in}}}{w} + \frac{\Delta p_{K_{in}}}{K_{in}(Re_{in})} \frac{\partial Re_{in}}{\partial \text{w}} \frac{\partial K_{in}}{\partial Re_{in}}\\\Delta a_{3}\left( k \right) = \Delta t \frac{\partial}{\partial \text{w}} \left\lbrack \Delta p_{\text{p}}\left( k \right) - \Delta p_{\text{fr}}\left( k \right) - \Delta p_{\text{w}2}\left( k \right) - \Delta p_{\text{v}} \left( k \right) - \Delta p_{\text{gr}}\left( k \right) \right\rbrack\end{aligned}\end{align} \]

In the above equations, it should be recognized that \(\Delta\) is used in three different ways. First \(\Delta t\) is the time step, \(\Delta w \left( i \right)\) is the change in the mass flow rate in the liquid segment \(i\) during the time step, and \(\Delta p \left( ij \right)\) and \(\Delta p \left( jo \right)\) are the changes in pressures in the compressible volumes at the inlet and outlet ends of liquid segment \(i\) during the time step. Second, the \(\Delta p\)’s in Eq. (5.2-2) represent pressure differences, increases or decreases, along liquid segment \(i\). And third, as seen in Eq. (5.2-10), Eq. (5.2-12), Eq. (5.2-14), and Eq. (5.2-16), the \(\Delta a\)’s are incremental contributions form each of the elements to the \(a\)’s for the whole segment.

The denominator in Eq. (5.2-9) should never be zero because \(a_3\) is negative or zero, since friction increases with increased flow and pump head decreases with increased flow.

5.2.1.2. Average Flow Rate

The second main equation used in the hydraulics calculation is an expression for the average mass flow rate in a liquid segment during a time step. The average mass flow rate for segment \(i\) is taken as a simple average of the flow rate at the beginning of the time step and that at the end of the time step.

(5.2-18)\[ \overline{w}\left( i \right) = \frac{\left\lbrack w \left( i,t \right) + w \left( i,t + \Delta t \right) \right\rbrack}{2}\]

Linearization consists in expanding \(w \left( i,t + \Delta t \right)\) to two terms and finite differencing the time derivative to give

(5.2-19)\[ \overline{w} \left( i \right) = \frac{2 w \left( i,t \right) + \Delta w \left( i \right)}{2}\]

Eq. (5.2-19) relates the average mass flow rate in a segment during a time step to the change in the mass flow rate during that time step.

5.2.1.3. Compressible Volume Pressure Changes

The third main equation in the hydraulics calculations is an expression for the change in pressure in a compressible volume during a time step. The pressure in a compressible volume can be affected in several ways. Liquid can flow in or out through the segments connecting the compressible volumes. The entering liquid may be at a higher or lower temperature than that already there, and the liquid flowing out removes liquid at the compressible volume temperature. In addition to the changes related to the liquid flows, the compressible volumes can be heated or cooled externally, or liquid can be added or withdrawn by an external agent. The flow of cover gas into or out of the compressible volume will also affect the pressure. The cover gas flows are treated separately, as in Section 5.7.

The pressure in a compressible volume is assumed to vary linearly with changes in the mass or temperature of the liquid. Therefore, the change \(\Delta p \left( j \right)\) in pressure in the compressible volume \(j\) during a time step is taken as a linear approximation in the average mass flow rates into and out from that compressible volume as:

(5.2-20)\[\Delta p\left( j \right) = b_{0}\left( j \right) + b_{1}\left( j \right)\left\lbrack \sum{{\overline{w}}_{\text{in}}\left( j \right) - \sum{{\overline{w}}_{\text{out}}\left( j \right) }} \right\rbrack + b_{2}\left( j \right) \left\lbrack \sum{{\overline{w}}_{\text{in}}\left( j \right) T_{\text{in}} - \sum{{\overline{w}}_{\text{out}} T_{\text{out}}\left( j \right)}} \right\rbrack\]

Here \(\sum{\overline{w}}_{\text{in}}\left( j \right)\) is the sum of the average mass flow rates into compressible volume \(j\) from all of the attached liquid segments flowing into it. It should be noticed that Eq. (5.2-19) is the expression for the average mass flow rate in a segment, and if that segment flows into compressible volume \(j\), then it is included with all of the other segment contributions to compressible volume \(j\). Similarly, \(\sum{\overline{w}}_{\text{out}}\left( j \right)\) is the sum of the average mass flow rates out of the compressible volume \(j\) from all of the attached liquid segments flowing out. The last two sums in Eq. (5.2-20) are the same as the ones just described except that all of the mass flow rates are multiplied by the temperatures of the flows: the average mass flow rates flowing into the compressible volume are multiplied by the temperatures in the respective segments, whereas the average mass flow rates flowing out are each multiplied by the temperature in the compressible volume. The coefficients \(b_1 \left( j \right)\) and \(b_2 \left( j \right)\) include the time-step size and are computed for each type of compressible volume. The remaining term \(b_0 \left( j \right)\) also contains the time step size and can be used to account for the effects of heat transfer to the compressible volume liquid from the compressible volume wall or from other components.

5.2.2. Estimated Core Flow

The liquid segments representing the core channels are a special case. In principle, the coolant mass flow rates in the core channels could be calculated simultaneously along with the other segments in the primary loop. But after the onset of boiling in the core, this would unduly complicate the boiling model. Instead, an estimate of the core mass flow rates is made from information stored by the core channel coolant dynamics routines during the previous time step, and this estimated flow is included in the primary loop calculation. After the primary and intermediate loop hydraulics calculations have been done, the core channel coolant dynamics routines compute the actual channel flows for each channel independently, using the newly calculated inlet and outlet plenum pressures as boundary conditions. Then, the differences between the estimated core flow and the actual computed core flow for a time step is used to adjust the coolant masses in the inlet and outlet plenums before the start of the calculations for the next time step.

The mass flow rate for core channel \(ic\) at the end \(L\), where \(L = 1\) is the inlet and \(L = 2\) is the outlet, is estimated by the momentum equation

(5.2-21)\[\frac{dw_{\text{c}}\left( L,ic \right)}{\text{dt}} = C_{0}\left( L,ic \right) + C_{1}\left( L,ic \right) p\left( \text{JIN} \right) + C_{2}\left( L,ic \right) p \left( \text{JX} \right) + C_{3} \left( L,ic \right) dp_c\left( L,ic \right)\]

where \(p \left( \text{JIN} \right)\) is the pressure in the compressible volume representing the inlet plenum, \(p \left( \text{JX} \right)\) is the pressure in the compressible volume representing the outlet plenum, and \(dp_c\left( L,ic \right)\) is the pressure drop from the core channel inlet to outlet. The rate of change of the mass flow rate is taken as proportional to the inlet and outlet pressures and the pressure drop across the core channel. The coefficients \(C_0\), \(C_1\), \(C_2\), and \(C_3\) are the information stored during the previous time step, and are described in Section 3.12 of Chapter 3. The channel mass flow rate \(w_{\text{c}} \left( L,ic \right)\) is evaluated at the beginning of the time step.

Eq. (5.2-21) can be written in finite difference form as

(5.2-22)\[\begin{split}\frac{\Delta w_{\text{c}}\left( L,ic \right)}{\Delta \text{t}} = C_{0}\left( L,ic \right) + C_{1} \left( L,ic \right) \left( \theta_{1c} p \left( \text{JIN} \right) + \theta_{2c} \left(p\left( \text{JIN} \right) + \Delta p\left( \text{JIN} \right) \right) \right) \\ + C_{2} \left( L,ic \right) \left( \theta_{1c} p \left( \text{JX} \right) + \theta_{2c} \left(p\left( \text{JX} \right) + \Delta p\left( \text{JX} \right) \right) \right) \\ + C_{3} \left( L,ic \right) \left( \theta_{1c} dp_c\left( L,ic \right) + \theta_{2c} \left( dp_c\left( L,ic \right) + \Delta dp_c\left( L,ic \right)\right)\right)\end{split}\]

By redefining \(C_{0}\left( L,ic \right)\) and \(C_{3}\left( L,ic \right)\),

(5.2-23)\[C_{0}'\left( L,ic \right) = C_{0}\left( L,ic \right) + C_{3} dp_c\left( L,ic \right)\]

and

(5.2-24)\[C_{3}'\left( L,ic \right) = \frac{C_{3}\left( L,ic \right)}{2 w_{\text{c}}\left( L,ic \right)} \frac{\Delta dp_c\left( L,ic \right)}{\Delta w_{\text{c}}\left( L,ic \right)}\]

Eq. (5.2-22) can be simplified to

(5.2-25)\[\begin{split}\frac{\Delta w_{\text{c}}\left( L,ic \right)}{\Delta \text{t}} = C_{0}'\left( L,ic \right) + C_{1} \left( L,ic \right) \left( p \left( \text{JIN} \right) + \theta_{2c} \Delta p\left( \text{JIN} \right) \right) \\ + C_{2} \left( L,ic \right) \left( p \left( \text{JX} \right) + \theta_{2c} \Delta p\left( \text{JX} \right) \right) \\ + 2 \theta_{2c} C_{3}' \left( L,ic \right) w_{\text{c}}\left( L,ic \right) \Delta w_{\text{c}}\left( L,ic \right)\end{split}\]

or

(5.2-26)\[\begin{split}\Delta w_{\text{c}}\left( L,ic \right) = \frac{\Delta t}{1 - 2\theta_{2\text{c}}\left( L,ic \right)C_{3}'\left( L,ic \right)w_{\text{c}}\left( L,ic \right)\Delta t} \left\{ C_{0}' \left( L,ic \right) \right. \\ \left. + C_{1}\left( L,ic \right)\left\lbrack p\left( \text{JIN},t \right) + \theta_{2\text{c}}\left( L,ic \right) \Delta p \left( \text{JIN} \right) \right\rbrack \right. \\ \left. + C_{2}\left( L,ic \right)\left\lbrack p\left( \text{JX},t \right) + \theta_{2\text{c}}\left( L,ic \right) \Delta p \left( \text{JX} \right) \right\rbrack \right\}\end{split}\]

where \(\theta_{2\text{c}}\) is the degree of implicitness for core channel \(ic\). Eq. (5.2-26) plays the role for each core channel that Eq. (5.2-9) does for all the other liquid segments in the primary loop.

Before boiling begins in the core channels, the differences between the estimated and the actual core flows are very small, largely because Eq. (5.2-21) is equivalent to the equation used by the pre-boiling core channel coolant dynamics routines, except that the coefficients in Eq. (5.2-21) do not account for the effects of coolant temperature changes during the current time step. After boiling begins, rapid changes in vapor pressures cause rapid changes in the inlet plenum pressure, necessitating a decrease in the time step size.

5.2.3. Method of Solution

Eq. (5.2-9), Eq. (5.2-19), Eq. (5.2-20), and Eq. (5.2-26) constitute a set of simultaneous equations for changes in the mass flow rates \(\Delta w \left( i \right)\) in the liquid segments and for changes in the pressures \(\Delta p \left( j \right)\) in the compressible volumes during a time step. Eliminating the \(\Delta w\)’s, these equations can be written as a single matrix equation for the \(\Delta p\)’s:

(5.2-27)\[ \sum_{\text{J}}{c\left( I,J \right) \Delta p\left( J \right) = d\left( I \right)}\]

The coefficients \(c \left( I,J \right)\) and \(d \left( I \right)\) are sums of contributions \(\Delta c \left( I,J \right)\) and \(\Delta d \left( I \right)\) from each segment. From segment \(i\), in which the flow is from compressible volume \(I\) to compressible volume \(J\), the contribution to \(c \left( I,J \right)\) is

(5.2-28)\[ \Delta c\left( I,J \right) = \frac{- \theta_{2}\left( i \right) \left\lbrack b_{1}\left( J \right) + b_{2}\left( J \right) T_{\text{out}}\left( i \right) \right\rbrack \Delta t}{2 \left\lbrack a_{0}\left( i \right) - a_{3}\left( i \right) \theta_{2}\left( i \right) \right\rbrack}\]

and the contribution to \(c \left( J,I \right)\) is

(5.2-29)\[ \Delta c\left( J,I \right) = \frac{- \theta_{2}\left( i \right) \left\lbrack b_{1}\left( I \right) + b_{2}\left( I \right) T_{\text{in}}\left( i \right) \right\rbrack \Delta t}{2 \left\lbrack a_{0}\left( i \right) - a_{3}\left( i \right) \theta_{2}\left( i \right) \right\rbrack}\]

The contribution to \(d \left( J \right)\) is

(5.2-30)\[ \Delta d \left( J \right) = w\left( i,t \right) + \frac{a_{1}\left( i \right) + \theta_{2}\left( i \right) a_{2}\left( i \right)}{2 \left\lbrack a_{0}\left( i \right) - \theta_{2}\left( i \right) a_{3}\left( i \right) \right\rbrack} \left\lbrack b_{1}\left( J \right) + b_{2}\left( J \right) T_{\text{out}}\left( i \right) \right\rbrack\]

and the contribution to \(d \left( I \right)\) is

(5.2-31)\[ \Delta d\left( I \right) = - w \left( i,t \right) - \frac{a_{1}\left( i \right) + \theta_{2}\left( i \right) a_{2}\left( i \right)}{2 \left\lbrack a_{0}\left( i \right) - \theta_{2}\left( i \right) a_{3}\left( i \right) \right\rbrack} \left\lbrack b_{1}\left( I \right) + b_{2}\left( I \right) T_{\text{in}}\left( i \right) \right\rbrack\]

The contributions to diagonal terms are

(5.2-32)\[ \Delta c\left( I,I \right) = \frac{\theta_{2}\left( i \right) \left\lbrack b_{1}\left( I \right) + b_{2}\left( I \right) T_{\text{in}}\left( i \right) \right\rbrack \Delta t}{2 \left\lbrack a_{0}\left( i \right) - \theta_{2}\left( i \right) a_{3}\left( i \right) \right\rbrack}\]

and

(5.2-33)\[ \Delta c \left( J,J \right) = \frac{\theta_{2}\left( i \right) \left\lbrack b_{1}\left( J \right) + b_{2}\left( J \right) T_{\text{out}}\left( i \right) \right\rbrack \Delta t}{2 \left\lbrack a_{0}\left( i \right) - \theta_{2}\left( i \right) a_{3}\left( i \right) \right\rbrack}\]

Also, \(b_0 \left( J \right)\) is added to \(d \left( J \right)\) and 1.0 is added to the diagonal terms in \(c\). In these equations \(T_{\text{in}} \left( i \right)\) and \(T_{\text{out}} \left( i \right)\) are the temperatures at the inlet and outlet of the liquid segment.

The contributions to the coefficients \(c \left( I,J \right)\) and \(d \left( I \right)\) from the segments representing the core channel flows are obtained from Eq. (5.2-26), which is re-written as

(5.2-34)\[ \Delta w_{\text{c}}\left( L,ic \right) = e_{0}\left( L,ic \right) + e_{1}\left( L,ic \right) \Delta p \left( \text{JIN} \right) + e_{2}\left( L,ic \right) \Delta p \left( \text{JX} \right)\]

where

(5.2-35)\[\begin{split}e_{0} \left( L,ic \right) = \frac{\Delta t}{d_{\text{n}}}\left\lbrack C_{0}\left( L,ic \right) + C_{1}\left( L,ic \right) p \left( \text{JIN},t \right) + C_{2}\left( L,ic \right) p \left( \text{JX},t \right) \right. \\ \left. + C_{3}\left( L,ic \right) w_{\text{c}}\left( L,ic \right) \left| w_{\text{c}}\left( L,ic \right) \right| \right\rbrack\end{split}\]
(5.2-36)\[e_{1} \left( L,ic \right) = \frac{\theta_{2\text{c}}\left( L,ic \right) \Delta t C_{1} \left( L,ic \right)}{d_{\text{n}}}\]
(5.2-37)\[e_{2} \left( L,ic \right) = \frac{\theta_{2\text{c}}\left( L,ic \right) \Delta t C_{2} \left( L,ic \right)}{d_{\text{n}}}\]

and

(5.2-38)\[d_{\text{n}} = 1 - 2 \theta_{2 \text{c}} \left( L,ic \right) C_{3} \left( L,ic \right) \left| w_{\text{c}} \left( L,ic \right) \right| \Delta t\]

The contribution to \(d \left( \text{JIN} \right)\) is then

(5.2-39)\[\Delta d \left( \text{JIN} \right) = - \left\lbrack b_{1}\left( \text{JIN} \right) + b_{2} \left( \text{JIN} \right) T_{\text{in}} \left( ic \right) \right\rbrack \left\lbrack w_{\text{c}} \left( 1,ic \right) + \frac{e_{0}\left( 1,ic \right)}{2} \right\rbrack\]

also,

(5.2-40)\[\Delta d \left( \text{JX} \right) = \left\lbrack b_{1}\left( \text{JX} \right) + b_{2} \left( \text{JX} \right) T_{\text{out}} \left( ic \right) \right\rbrack \left\lbrack w_{\text{c}}\left( 2,ic \right) + \frac{e_{0} \left( 2,ic \right)}{2} \right\rbrack\]
(5.2-41)\[\Delta c \left( \text{JIN},\text{JIN} \right) = \left\lbrack b_{1}\left( \text{JIN} \right) + b_{2}\left( \text{JIN} \right) T_{\text{in}} \left( ic \right) \right\rbrack \frac{e_{1}\left( 1,ic \right)}{2}\]
(5.2-42)\[\Delta c \left( \text{JX},\text{JX} \right) = - \left\lbrack b_{1}\left( \text{JIN} \right) + b_{2}\left( \text{JX} \right) T_{\text{out}} \left( ic \right) \right\rbrack \frac{e_{2}\left( 2,ic \right)}{2}\]
(5.2-43)\[\Delta c \left( \text{JIN},\text{JX} \right) = \left\lbrack b_{1}\left( \text{JIN} \right) + b_{2}\left( \text{JIN} \right) T_{\text{in}} \left( ic \right) \right\rbrack \frac{e_{2}\left( 1,ic \right)}{2}\]

and

(5.2-44)\[\Delta c\left( \text{JX},\text{JIN} \right) = \left\lbrack b_{1}\left( \text{JX} \right) + b_{2}\left( \text{JX} \right) T_{\text{out}} \left( ic \right) \right\rbrack \frac{e_{1}\left( 2,ic \right)}{2}\]

The contributions to the coefficients \(c \left( I,J \right)\) and \(d \left( J \right)\) from all the liquid segments in a loop have been made at this point, and Eq. (5.2-27) is solved by Gaussian elimination to yield the pressure changes in all the compressible volumes in the loop during the time step. With the pressure changes now known, Eq. (5.2-9) is solved for the mass flow-rate changes in the liquid segments in the loop, and Eq. (5.2-26) is solved for the estimated channel flow changes during the time step. The pressure changes and the mass flow rate changes are then added to the values of the pressures and flow rates at the beginning of the time step to obtain the respective values at the end of the time step.

The above procedure is carried out separately for the primary loops and for the intermediate loops. The core channel flow segments are included only in the primary loops.

5.2.4. Degree of Implicitness

As mentioned in Section 5.2.1, the parameters \(\theta_1\) and \(\theta_2\) determine the degree of implicitness of the calculation. For small time steps, a semi-implicit treatment with \(\theta_1 = \theta_2 = .5\) is most accurate. For large time steps, a fully implicit calculation with \(\theta_1 = 0\) and \(\theta_2 = 1\) is more accurate and numerically more stable. As discussed in Section 3.19.1, the degree of implicitness is computed separately for each liquid segment, \(i\), as

(5.2-45)\[\theta_{2} \left( j \right) = \frac{a + b\gamma\left( i \right) + \gamma\left( i \right)^{2}}{2a + c\gamma\left( i \right) + \gamma\left( i \right)^{2}}\]

where

(5.2-46)\[\gamma\left( i \right) = - \frac{a_{3}\left( i \right)}{a_{0}\left( i \right)}\]

\(a = 6.12992\)

\(b = 2.66054\)

and

\(c = 3.56284\)

Then

(5.2-47)\[\theta_{1}\left( i \right) = 1 - \theta_{2}\left( i \right)\]

Note that \(a_3 \left( i \right)\) is always negative and is proportional to \(\Delta t\), the time-step size. Eq. (5.2-45) and Eq. (5.2-46) give the results that \(\theta_2\) approaches 0.5 for small time steps, \(\theta_2\) approaches 1.0 for large time steps, and \(\theta_2\) makes a smooth transition between 0.5 and 1.0 for intermediate-sized time steps.

Liquid segments attached to an almost incompressible liquid junction are a special case. Because such compressible volumes are much smaller than other compressible volumes, their time constants for changes of all kinds are short; and because of it, these liquid segments are treated with a fully implicit (\(\theta_2 = 1.0\)) flow calculation regardless of time-step size.

The degree of implicitness used in the calculated estimated channel flow for channel \(ic\) is

(5.2-48)\[\theta_{2\text{c}}\left( L,ic \right) = \frac{a + b\gamma_{\text{c}}\left( L,ic \right) + \gamma_{\text{c}}\left( L,ic \right)^{2}}{2a + c\gamma_{\text{c}} \left( L,ic \right) + \gamma_{\text{c}} \left( L,ic \right)^{2}}\]

where \(\gamma_{\text{c}}\) is given by

(5.2-49)\[\gamma_{\text{c}} = \frac{2\Delta t}{w_{\text{c}}\left( L,ic \right)C_{3}\left( L,ic \right)}\]