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-18).
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 volumes 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
and the accompanying new gas temperature \(T_{\text{g}}\) is given by the ideal gas law as:
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
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
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
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
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
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 step
The flow equation for isothermal unchoked flow of an ideal gas is given by Shapiro [5-3] as:
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:
where
\(\varepsilon\) = the pipe roughness
\(D\) = the pipe diameter
\(\text{Re}\) = the Reynolds number
In addition the Reynolds number can be written as
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
For turbulent flow, the gas mass flow rate is determined by an iterative process. With an initial built-in guessed value for \(f\), Eq. (5.7-9) and Eq. (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 Eq. (5.7-9) and Eq. (5.7-12) using the laminar flow value for \(f\) of
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:
where
and \(T_{\text{ji}}\) is the temperature of the gas flowing from compressible volume \(j\) to compressible volume \(i\). Combining Eq. (5.7-14), Eq. (5.7-8), Eq. (5.7-17), and Eq. (5.7-19) yields a matrix equation of the form
where
and
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 Eq. (5.7-18) and Eq. (5.4-31), 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
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.