5.7. Cover Gas Flow and Pressure Calculations¶
5.7.1. Introduction¶
After the hydraulics calculations for the liquid flows and pressures have been completed for a time step, then the liquid temperatures are calculated, and, after they have been completed, the cover gas flows and pressures are computed. The cover gas treatment is a fully implicit calculation, ignoring the inertial effects of the gas, and modeling the flow as quasi-static and isothermal. It may be thought of as a modification of the liquid flow treatment in which the left side of Eq. 5.2-1 is set to zero and \(\theta_{1}\) and \(\theta_{2}\) set to zero and one, respectively, in Eq. 5.2-17.
The gas process may be thought of in the following way. Only compressible volumes containing cover gas are considered. Some may also contain liquid and some only gas. For those containing liquid, the liquid level has risen or dropped, as determined by the hydraulics calculations earlier in the time step, and the cover gas has been compressed or expanded by this action. The compression or expansion is assumed to be adiabatic, and new equilibrium conditions are calculated. Next, heat transfer between the gas and the liquid is computed, assuming that the gas temperature approaches that of the liquid without affecting the liquid temperature. Finally, taking all compressible volumes with cover gas, the gas flow between compressible volumes through connecting pipes is computed, and the temperatures, pressures, and masses of the gases in the compressible columns are adjusted appropriately.
5.7.2. Basic Equations¶
In the compressible volumes with cover gas and liquid, the hydraulics routines provide the rise or fall in the liquid level during the time step, thereby giving the change in the cover gas volume during the time step. Let \(V_{03}\) be the volume of the cover gas before the liquid level change and \(V_3\) after the level change. The process is assumed to be adiabatic, and the pressure \({p'}_{03}\) after the change in terms of the pressure \(p_{03}\) before is given by
(5.7‑1)
and the accompanying new gas temperature \(T_{\text{g}}\) is given by the ideal gas law as:
(5.7‑2)
where
\(\gamma\) = the ratio of the specific heat at constant pressure to that at constant volume for the gas
\(m_3\) = the cover gas mass at the beginning of the time step
\(R\) = the universal gas constant
Heat transfer between the cover gas and the liquid is also accounted for. Since the heat capacity of the gas is much less than that of the liquid, it is assumed that the gas temperature approaches the liquid temperature with a time constant \(\tau\) without affecting the liquid temperature. The time constant \(\tau\) is a user-supplied input quantity. The adjusted gas temperature \(T_{3}\) is taken as
(5.7‑3)
where
\(T_{\text{l}}\) = the temperature of the liquid
\(\Delta t\) = the time step
The new gas temperature means a new gas pressure \(p_{3}\), which is computed again by the ideal gas law as
(5.7‑4)
With \(p_{3}\), \(V_3\), \(T_{3}\), and \(m_{3}\) now known for compressible volumes with or without liquid present, we turn to the gas flow through the pipes between compressible volumes. The difference in pressure between two connected compressible volumes causes gas flow from one to the other, and the amount of gas delivered to or withdrawn from a compressible volume in turn modifies the gas pressure in it. As a result, the pressure changes in all of the compressible volumes are solved for simultaneously.
The gas mass flow rate, \(F_{\text{ij}}\), from compressible volume \(i\) to compressible volume \(j\) is approximated at the end of the time step as
(5.7‑5)
Here \(F_{\text{oij}}\) is the gas mass flow rate at the beginning of the time step from compressible volume \(i\) to compressible volume \(j\). This flow rate is modified by the pressure changes in the compressible volumes \(i\) and \(j\) as a result of the flow during the time step. The coefficients of the pressure changes are taken as
(5.7‑6)
(5.7‑7)
where \(p \left(i \right) - p \left( j \right)\) is the pressure difference between compressible volumes \(i\) and \(j\) at the beginning of the time step. Also
(5.7‑8)
where
\(p_{3} \left( i \right)\) = the gas pressure in compressible volume \(i\) at the beginning of the time step
\(p_{4} \left( i \right)\) = the gas pressure in compressible volume \(i\) at the end of the time ste
The flow equation for isothermal unchoked flow of an ideal gas is given by Shapiro [5-3] as:
(5.7‑9)
where
\(f\) = the Moody friction factor
\(L\) = the length of the pipe
\(D_{\text{h}}\) = the hydraulic diameter of the pipe
\(p \left( i \right)\) = the inlet pressure
\(p \left( j \right)\) = the outlet pressure
\(\gamma\) = the ratio of the specific heat at constant pressure to that at constant volume for the gas
\(M\) = the Mach number
The Moody [5-2] friction factor is given by:
(5.7‑10)
where
\(\varepsilon\) = the pipe roughness
\(D\) = the pipe diameter
\(\text{Re}\) = the Reynolds number
In addition the Reynolds number can be written as
(5.7‑11)
where
\(A\) = the pipe area
\(\mu\) = the viscosity of the gas
and the Mach number is related to the gas mass flow rate \(F_{\text{oij}}\) by
(5.7‑12)
For turbulent flow, the gas mass flow rate is determined by an iterative process. With an initial built-in guessed value for \(f\), Eqs. 5.7-9 and 5.7-12 determine a value for \(F_{\text{oij}}\), which is used in Eq. 5.7-10 to calculate a new value for \(f\), and the iteration is continued until consistency is achieved. For laminar flow, \(F_{\text{oij}}\) is determined from Eqs. 5.7-9 and 5.7-12 using the laminar flow value for \(f\) of
(5.7‑13)
5.7.3. Solution¶
The results of the gas flow between compressible volumes, where a compressible volume may be connected by gas segments to several other compressible volumes, can be written as:
(5.7‑14)
(5.7‑15)
(5.7‑16)
where
(5.7‑17)
(5.7‑18)
(5.7‑19)
and \(T_{\text{ji}}\) is the temperature of the gas flowing from compressible volume \(j\) to compressible volume \(i\). Combining Eqs. 5.7-14, 5.7-8, 5.7-17, and 5.7-19 yields a matrix equation of the form
(5.7‑20)
where
(5.7‑21)
and
(5.7‑22)
Here \(\delta_{\text{ij}}\) is the Kronecker delta.
The matrix equation 5.7-20 is solved by Gaussian elimination for the \(\Delta p \left( i \right)\). These are added to the pressures at the beginning of the time step to obtain the corresponding pressures at the end of the time step. The cover gas mass at the end of the time step \(m_4 \left( i \right)\) in each compressible volume is computed using Eqs. 5.7-18 and Eq. (5.4-24), and finally the gas temperatures at the end of the time step \(T_{4} \left( i \right)\) are computed for each compressible volume using the equation
(5.7‑23)
All of the final values are then stored in COMMON blocks.
A solution algorithm for the entire cover gas treatment is given in Section 5.16.3.