Mathematical Model of Air Pocket Evolution during Water Filling a Long-Slope Pipeline and Its Application to Air Removal Prediction

During water filling a long-slope pipeline, air pocket is very likely to be entrapped at peak point. In order to track air movement and predict air removal conditions, a mathematical model of air pocket evolution, including its formation, compression, and entrainment, is proposed in this paper. The simulation results were compared with the engineering field data and the two are basically consistent. Furthermore, the two most important factors which play a great role in the removal of air pocket, i.e., the terrain category and the inlet flow rate, are analyzed in detail. It is concluded that the removal conditions reach three outcomes: air pocket compressed and partly removed, compressed and completely removed, and compressed without any removal. In this paper, the terrain which leads to the last outcome is called the “Dangerous Terrain.” And for the “Dangerous Terrain,” it is of great importance that the inlet flow rate should be strictly confined within a certain level. While for the other two categories of terrains, an increased flow rate is in any respect beneficial to the removal of air pocket.


Introduction
Air pocket is very likely to be entrapped at high points during water filling a long-slope pipe. e entrapped air, if cannot be removed properly and timely, may cause a series of probable damages, such as water column separation, pipeline transport efficiency reduction, power consumption increase, etc. [1][2][3]. In some severe cases, it may even cause a pipeline burst accident due to the insufficient awareness of the air-water interaction flow characteristics in the pipeline.
Pipeline systems with entrapped air pocket have been widely discussed both experimentally and theoretically. Leon et al. [4] used the lumped approach to calculate the pressure of air pocket entrapped between two pressurized columns. Pothof and Clemens [5] established the mathematical models for the calculation of air pocket motion which neglected the effect of surface tension and viscosity. ey pointed out that air pockets can be avoided provided that pipe diameter exceeds 191 mm. Deng et al. [6,7] conducted a series of experiments both in laboratory and field trials to simulate the water pressure testing for long pipeline to ensure the safety and efficient construction thereof. ey found that, during the last stage of water filling, an instantaneous pressure impulse will be induced due to the existence of air pocket in the sloping reach of pipeline.
Different from the traditional two-phase flow, air entrapment flow is characterized by the inlet boundary of only liquid velocity rather than gas-liquid two phases. e air entrapment herein refers to a "gaseous section" where the gas is entrapped by the liquid slug with a constant mass at a stagnant position. Under certain circumstances, the liquid slug front downstream is likely to entrain the pocket tail upstream, resulting in the entrainment of air pocket as well as aeration of liquid. is phenomenon is often referred to as "air entrainment" in literatures. It is suggested by Fan et al. [8] and Bonetto and Lahey [9] that the air entrainment process is similar to a plunging of vertical jet into a static pool. Jepson [10] observed from the experiments that the "aeration" of liquid caused by air entrainment is quite similar to the process where air is entrained by water hydraulic jump [11][12][13][14]. By using clean water, surfactant-laden water, and wastewater as test media, respectively, Pothof et al. [15] conducted a systematic study on the influence of surface tension on air entrainment. It was found in the study that the smaller the surface tension, the easier the bubble to be entrained in respect of declined pipes.
However, it should be noted that most of the current research is still based on horizontal or near-horizontal pipes or individual downward-sloping pipes, rather than pipelines laid along mountainous areas with continuous long-slope and typical V-shaped pipes. For the latter, air-water flow will be much more complex. Not only because it is highly dependent on the terrain category, but also because it is related to the complicated evolution of the air pocket, i.e., formation, compression, and entrainment thereof. Although many considerable works on air entrapment have been carried out to date, due to the weak understanding of the air-water interaction mechanism in the long-slope pipeline, the flow characteristics associated with air pocket formation, compression, and entrainment have been rarely studied. erefore, based on a comprehensive consideration of formation, compression, and entrainment of air pocket, a mathematical model of air pocket evolution is proposed in this paper to track air movement and predict air removal conditions in long-slope pipelines. With the model proposed, a computational support can be provided for the determination of pressure and location and length of air pocket, and the remaining gas within the pipeline can also be estimated and evaluated beforehand without having to stop the transmission. Based on all the above, the model is considered to have a significant meaning in laying the theoretical and scientific basis on the optimal design and safe operation for water filling pipelines with long slopes.

Mathematical Model
Before establishing the model, the following is assumed: (1) e fluid system is thermostatic (2) e pipeline outlet keeps open to the atmosphere, i.e., the outlet pressure remains constant as atmospheric (3) e pipeline inlet flow rate remains constant throughout the process (4) e liquid is incompressible, and the gas is ideal (5) e flow is unidimensional, and the uneven distribution of pressure, velocity, and liquid holdup within the pipeline cross section is neglected 2.1. Air Pocket Formation. Before water filling, the pipeline is emptied with static atmospheric air. After the water is pumped and reaches the peak point, it will flow towards the valley point in a form of liquid film similar to the openchannel flow (Figure 1). e average liquid velocity is given by the open-channel flow model as follows: e liquid cross-sectional area and wetted perimeter can be expressed as follows: In addition, it is important to note that When the water reaches the valley point, it will start accumulating there and gradually grow into a liquid slug which blocks and entraps the air upstream. In this way, the air pocket begins to take shape along the sloping reach. Based on (1)-(4), the initial liquid holdup by the time the air pocket is formed can be calculated.

Governing Equations.
After the air pocket is formed, the liquid slug at the valley point will start growing towards both upstream and downstream sloping reaches, resulting in the compression of air pocket. In this stage, the entrainment of air pocket is not considered. By specifying the V-shaped segment of gas-liquid two-phase flow as the object of study, the mathematical model for liquid slug growth and air pocket compression is established as shown in Figure 2.
(1) Air Continuity Equation. Since throughout the water filling process, only liquid phase is pumped in from the inlet without any addition of air to the flow, thus, there is no mass exchange between the air pocket and the external environment. By specifying the air pocket segment as the controlled volume, the air continuity equation can be expressed as follows: According to the assumptions, the air pocket meets the ideal gas equation.
us, the mass of air pocket in the controlled volume can be expressed as By substituting the above into (5), it can be deduced that 2 Mathematical Problems in Engineering (2) Liquid Continuity Equation.
By specifying the liquid in the V-shaped segment (the blue section in Figure 2) as the controlled volume, the liquid continuity equation is then given by dm l dt � ρ l Q l . (8) e mass of liquid within the controlled volume is given by (9) based on the assumptions of D/h 1 ≪ 1 and D/h 2 ≪ 1: By substituting (9) into (8), it can be deduced that (3) Momentum Equation for the Stratified Flow. e most probable flow pattern that could occur along the downward slope is the stratified flow. e quasisteady state force balance equation is used as the momentum equation: Combining the two equations above by eliminating the pressure gradient term, the combined momentum equation is then deduced as Among which, During the filling, the air pocket is compressed under the effect of the incoming flow upstream and liquid slug downstream and after all entrapped at a stagnant position, i.e., v g � 0. In this way, (13) and (14) can be further written as (4) Momentum Equation for the Liquid Slug. Since the compression process of air pocket is directly related to the motion of liquid slug, the slug is hereby specified as the controlled volume for which a momentum equation is established. Based on the fact that the resultant force that acts on the controlled volume is equal to the difference of liquid momentum per unit time by subtracting those flowing in the controlled volume from those flowing out, the following equation can be established: where ΔP f is the friction force per unit length and the expression is specified as And u is the speed at which the liquid slug advances upward in the upward slope, and it can be calculated using During the growth of liquid slug toward the upstream in the downward sloping reach, the liquid rises at a rate equal to the shortening of air pocket:

Closure Models
(1) Geometric Relationship. Refer to Figure 1; for the air pocket, the following hold: Based on the above, the void fraction can be calculated as follows: (2) Frictional Coefficient. Since the air pocket is nearly stagnant throughout the filling process, the air frictional coefficient f g is therefore neglected. Spedding and Hand [16] used (25) to calculate the the liquid frictional coefficient between the liquid and pipe wall: Among which, Xiao et al. [17] commented on 16 computational methods for interphase frictional coefficient f i calculation after testing them with the multiphase flow database of Tulsa University. e Andritsos-Hanratty correlation is after all recommended when D ≤ 0.127 m. When D > 0.127 m, the corrected Duns and Ros correlation by Baker is preferred. In the situation where the flow regime is to be determined, the recommended interphase frictional coefficient by Shoham and Taitel [18] is adopted, i.e., f i � 0.0142, which is the preferable average for interphase wave of small amplitude and is applicable to a diversity of pipe diameters. According to the field pressure drop data of AGA large-diameter pipeline, the computational method for f i recommended by Xiao is well supported.

Air Pocket Entrainment.
As the liquid slug grows, the liquid level heights both in the downward and in the upward sloping reaches continue to increase accordingly. is paper assumes that the highest liquid level of upward sloping reach, i.e., the waterfront arrives at the upward summit, marks the end of the slug growth. At this moment, if the liquid level height of the downward sloping reach is lower than that of the upward one, the difference of water levels in upstream and downstream reaches induces backpressure. Furthermore, assuming that only the excess of the backpressure above the air pocket pressure is responsible for the air pocket entrainment, the criterion for the onset of entrainment is thus given by Once entrainment occurs, due to the intaking of large numbers of entrained small bubbles from the pocket tail, the fluid between pocket tail and downstream liquid slug front starts to occur in a form of aerated liquid slug as shown in Figure 3.
In the figure, "T" represents the tail of air pocket. Bubbles are entrained from the pocket tail at the rate of Φ en . Meanwhile, part of the entrained bubbles will flow back and recoalesce with the pocket tail. However, considering the fact that the elongated air pockets in long-distance pipeline are always with great length (normally several kilometers), the amount of entrained small bubbles is usually much more than that of the flow back. erefore, the effect of bubbles flow back on the entrainment is not considered in this study. All of these bubbles entrained at the rate of Φ en will enter the liquid slug downstream to form a bubbly flow.
Brauner and Ullmann [19] assume that the entrainment rate Φ en is dependent on the balance between the rate of turbulent kinetic energy production and the rate of bubble surface energy production and subsequently deduced that where In fact, C J and C ′ are tunable constants, where C J can be tuned based on turbulence intensity and critical bubble size. It is suggested by Brauner and Ullmann that C J � 1, C ′ � 2/3. And this value is found to be in agreement with the experimental data of Nydal and Andreussi [20] in a nearly horizontal 5 cm pipe. e critical size of deformable bubbles is suggested by Brodkey [21]: Among which, Regardless of the possible coalescence and buildup of entrained small bubbles in the slug under the effect of buoyancy, it is considered that the entrained small bubbles will simply mix with the liquid downstream to form a bubbly flow. e bubbly flow in the slug region can be described by the drift-flux model. e bubble velocity in liquid slug at pocket tail v T bls is given by where C T 0 is the velocity distribution parameter in the near bubble tail region. e rigorous computation of C T 0 requires the bubble velocity distributions in these regions, which are quite difficult to obtain. However, wall peaking in void fraction distributions generally results in C T 0 < 1, whereas C T 0 > 1 characterizes center peaking. In the case of horizontal or inclined pipeline especially when the liquid velocity is relatively low, C T 0 < 1 is generally considered. is is because the liquid carrying capacity is relatively weak in this situation and the entrained bubbles will normally gather around the upper wall under the buoyancy effect. According to the experimental results by Hernandez and Fabre [22], the recommended value of C T 0 as 0.5 is adopted in this paper.
v m is the velocity of mixture flux which is calculated as follows: v T d is the drift velocity. By using the Harmathy model corrected by Wallis [23] for the effect of pipe inclination, the drift velocity is given as follows: According to the mass conservation, the gas void fraction in liquid slug at the pocket tail H T gls is Due to the air entrainment, the pressure, length, and mass of the air pocket decreases constantly. e pressure during the entrainment is given by where k is the current calculation time step and k + 1 is the next one. ΔP g is obtained by integrating (11). e change rate of mass of entrained air can be calculated by dm gen dt where ρ T g can be deduced from the pressure P k+1 g . And then the remaining air mass and air length after the air pocket is entrained can thus be expressed as 2.4. Computational Procedure. By specifying the time when the liquid phase is pumped into the pipeline from the inlet as the simulation start time, the initial conditions at the moment of air pocket taking shape are given by  en, the air pocket compression model in Section 2.2 is initiated to conduct the calculation. e five ordinary differential equations (ODE set) of (7), (10), (17), (18), and (19) are solved using the forward difference method to obtain P g , L g , h 1 , h 2 , u and thenH g by (15). e waterfront arriving at the summit of the upward sloping reach marks the end of the slug growth. At this moment, whether the criterion for the onset of entrainment, i.e., (27), is satisfied is judged. If it does not meet the criterion, the simulation stops. Otherwise, the entrainment model in Section 2.3 is activated to continue the calculation as follows. At each calculation time step, (28)-(32) are firstly replaced by the previously solved variables such as P g , L g , H g and other required information as input to obtain Φ en and then v m by (34). Secondly, based on the calculated Φ en and v m , the remaining three implicit algebraic equations, i.e., (33), (35), and (36), are iteratively solved to obtain H T gls , v T bls , v T d . Finally, the pressure during the entrainment P k+1 g , the remaining air mass m k+1 g , and the remaining air length L k+1 g are deduced by (37), (39), and (40), respectively. After the current time step is finished, the above entrainment process is repeated again to calculate the next time step until the end of the simulation. e flowchart for the entire computational procedure is shown in Figure 4.
e time steps were taken as 10 s and 300 s for compression process and entrainment process, respectively.

Model Verification
Two domestic hilly pipelines which have already been filled with water are chosen as test pipelines to verify the model proposed in this paper. For the pipeline routing, refer to Figure 5; for mileage and elevation data, refer to Table 1. e pipeline diameters are 559 mm and 508 mm, respectively. A constant inflow of water at the rate of 600 m 3 /h and 900 m 3 /h, respectively, is considered for the two test pipelines.
During water filling the pipelines, four valve chambers, i.e., valve chambers 1 and 2 in pipeline 1 and valve chambers 3 and 4 in pipeline 2, were deployed along the line to monitor the real-time pressure. e monitored pressure values were transmitted to central control room via SCADA. To make a comparison between the field data and the simulation results, the data recorded by SCADA system was exported. e comparison of simulation results and field data is shown in Figure 6. It can be seen that the simulated value and measured value are basically consistent. Although some of the data have relatively larger deviations (the maximum deviation does not exceed ±20%), for engineering practice, the overall result is within an acceptable range. at is to say, the mathematical model herein can be used to simulate the evolution of air pocket with good accuracy.

Simulation Results
Taking the test pipeline 1 in Section 3 as an example, Figure 7 reveals the simulated evolution with time of backpressure P b , air pocket pressure P g , and liquid level heights in both downward and upward sloping reaches h 1 and h 2 . It can be seen that the air pocket is formed at about 55.9 h. Since the upstream pressure is not strong enough to push the liquid slug unidirectionally towards the downstream, the slug grows towards both the upstream and downstream, resulting in the gradual increases of liquid level heights both in downward and in upward sloping reach. e air pocket becomes compressed and the pressure increases consequently. At about 96.45 h, the waterfront arrived at the summit of upward sloping reach, i.e., the peak point downstream in Figure 5, which marks the end of the slug growth process. At this moment, the upward and downward liquid level heights are 365.3 m and 261.15 m, respectively, which consequently induces a backpressure of about 1.02 MPa. Comparison with the current gas pressure of 0.14 MPa indicates that the criterion for the onset of air entrainment (i.e., (27)) is exactly satisfied. erefore,

Start
Input basic parameters, mainly including fluid properties, pipeline routing data, diameter, inlet flow rate, etc.    In pipeline water filling, field operators are also concerned about the length and location of air pocket in addition to pipeline pressure. is is because the length and location of air pocket plays a critical role in deciding air removal operations. Figure 8 gives the evolution with time of air pocket length and mass. At the first stage before the formation of air pocket, the length and mass are all kept constant at 0. After the air pocket is formed and compressed, the length of air pocket decreases gradually but the mass remains constant since no mass exchange exists between the air pocket and the external environment or the liquid film. en, at the third stage, air entrainment starts to occur, and a large number of small bubbles are entrained from the air pocket to the liquid slug downstream. e length and mass of air pocket decrease consequently. By the end of the entrainment, the length of air pocket is reduced to 56.63 km from the initial 92.3 km. If no further actions are taken, the air pocket with an approximate length of 57 km will not be removed and still remain in the pipeline. e development of air pocket described above is also reflected in the waterfront movement diagram in Figure 9. Slug grow ends Air entrainment begins P b drops to equal P g , Air entrainment ends    Mathematical Problems in Engineering about 0.6 m/s afterwards. After the waterfront arriving at the peak point downstream, the compression of air pocket stops and air entrainment starts. e velocity of the full pipe flow is then accelerated to the initial value, i.e., 0.72 m/s. e same conclusion can also be drawn by observing the tangent lines of the curve of waterfront location variation.

Discussion
e terrain category and inlet flow rate of pipeline are thought of having the most important effect on the removal of air pocket. Herein, a dedicated analysis is performed on the two factors as follows.

Effect of Terrain Category.
Based on the topographic characteristics of upward and downward sections, terrains are mainly divided into three groups, i.e., terrains 1∼3 shown in Figure 10(a). For the corresponding topographic parameters, refer to Table 2. A series of simulations are conducted on the three types of terrains with pipeline inlet flow rate assumed to be 900 m 3 /h constant. For the simulation results of pressure, length, and mass changes of air pocket, refer to Figures 10(b)-10(d).
From Figures 10(b)-10(d), it can be seen that terrain category will have a great influence on the removal of air pocket, which in detail can be summarized as follows: ① Terrain 1: the air pocket is compressed and partly entrained, i.e., the air pocket cannot be totally removed, and a certain amount still remains in the downward sloping reach. From Table 2, it can be seen that the upward sloping reach is almost having the same length as the downward one, but with a much smaller elevation difference. Due to this, the water level in the downward sloping reach still keeps rising even after the level in the upward has reached the high elevation point. Consequently, the backpressure causing the entrainment of air pocket decreases. When the backpressure falls below the air pocket pressure, air entrainment ceases. at is why a segment of air pocket with an approximate length of 4.65 km (the initial length of air pocket is 10.56 km) still remains and cannot be removed. For the situation which is met with in Section 4 of this paper, the terrain just falls into Terrain 1 ② Terrain 2: the air pocket is compressed and completely removed. In this situation, the condition required for air entrainment is always present. e air pocket with an initial length of 5.27 km is totally entrained into the liquid slug downstream and flows out of the pipeline together with the liquid. It is observed in the simulation that the downward sloping reach will eventually be filled with water and undergo a full pipe flow  ③ Terrain 3: the air pocket is only compressed without any removal, i.e., after the simulation, only the length of air pocket is shortened, while mass remains unchanged. In Terrain 3, the upward sloping reach is with a very small inclination which is merely 0.5°and can be seen as approximately horizontal. When the liquid slug grows in this sloping reach, it is almost impossible to gain enough backpressure to initiate the entrainment of air pocket. In this situation, the air pocket can only be compressed without any entrainment. After the waterfront arrives at the summit of the upward sloping reach, the simulation stops. e air pocket is compressed to a final pressure of 1.89 MPa.

Effect of Inlet Flow Rate.
For different flow rates under Terrain 3, the variations of pressure and length of air pocket during the compression process are shown in Figure 11 ("Q" indicates the inlet flow rate). It is obvious that, with the  increase of flow rate, the peak pressure (the maximum pressure) increases and the remaining length reduces. Since excessive pressure poses a potential threat to the pipeline, Terrain 3 is hereby defined as the "Dangerous Terrain." For pipelines located in such terrains as Terrain 3, the inlet flow rate shall be strictly controlled during the filling process.
In respect of the peak pressure and remaining length of air pocket, Figures 12(a) and 12(b), respectively, give the comparison thereof among Terrain 3, Terrain 2, and Terrain 1. It can be concluded that if the terrain falls out of the "Dangerous Terrain" category, i.e., Terrain 1 and Terrain 2, the peak pressure of air pocket becomes relatively lower and less subject to the inlet flow rate. Basically, it remains almost unchanged with the change of inlet flow rate.
In addition, from the comparison between Terrain 1 and Terrain 3, it is observed that, with the increase of inlet flow rate, the remaining air pocket lengths of both terrains reduce. However, the mass of air pocket of Terrain 3 is constant while that of Terrain 1 decreases gradually (refer to Figure 13 where the solid line represents the initial mass of air pocket and the dotted line represents the mass remained at the end of simulation). For Terrain 1, more air is entrained with the increase of flow rate, which implies that a relatively larger flow rate is more beneficial to the removal of air pocket.
From Figures 12(b) and 13, it is known that under different flow rate conditions the air pocket in Terrain 2 is always completely removed. e remaining length and mass of air pocket both approach 0. In respect of the timing when air pocket is formed, the timing when liquid slug ends growing, the timing when air entrainment ceases, the duration of liquid slug growth, the duration of air entrainment, and the duration of air removal (slug growth + air entrainment), Figure 14 gives the description of the variation thereof under different flow rate conditions. It can be concluded that the larger the flow rate, the earlier the formation of air pocket, the faster the growth of liquid slug, and the earlier the entrainment of air pocket. During the entrainment process, the turbulent flow at the air pocket tail becomes more violent with the increase of flow rate, thus resulting in a much more rapid entrainment rate and shorter entrainment duration. Similar to Terrain 1, an increased flow rate is also beneficial to the removal of air pocket in Terrain 2.

Conclusions
By giving a comprehensive consideration of air pocket formation, compression, and entrainment, a mathematical method of air pocket evolution during water filling a longslope pipeline is proposed in this paper. According to the simulation results, it is suggested that after the formation of air pocket, liquid slug starts to grow toward both the upstream and downstream direction, resulting in the air pocket being compressed, pressure being increased, and length being reduced. Under the effect of the backpressure, the air pocket is entrained into small bubbles with its pressure, length, and mass being reduced gradually. e most important factors that affect the removal of air pocket are the terrain category and the inlet flow rate. As revealed by the study herein, the removal of air pocket mainly leads to three kinds of scenarios with each corresponding to one terrain category: the compressed and partly removed scenario, the compressed and completely removed scenario, and the compressed only without any removal scenario. In this paper, the terrain which leads to the last outcome is called the "Dangerous Terrain." And for the "Dangerous Terrain," it is of great importance that the inlet flow rate should be strictly confined within a certain level. While for the other two categories of terrains, an increased flow rate is in any respect beneficial to the removal of air pocket.
Considering the above, it is suggested that for engineering practice an analysis on the terrain conditions shall be firstly conducted. After the terrain category has been identified, the air removal condition can be determined according to the findings herein. After all these, an appropriate range of inlet flow rate can be specified so as to achieve the maximum removal of air pocket.