Analysis of transient PIG motion in natural gas pipeline

– In this study, the dynamic analysis of Pipeline Inspection Gauge (PIG) ﬂow control in natural gas and liquid pipeline is considered. The basic equations are diﬀerential forms of the mass and linear momentum for compressible liquid and gas ﬂows. The ﬂuid ﬂow equations and a linear momentum equation of the PIG are solved simultaneously using an appropriate numerical method. Solution of these nonlinear equations results in a set of diagrams for the variations of the ﬂuid pressure, mass ﬂow rate of the gas and the PIG velocity through the pipeline. Comparing the results of mathematical model for the PIG with the established experimental data in a segment of Ahwaz gas pipeline shows a good agreement between the measurements and computations.


Introduction
Soon after the first oil and gas pipelines were constructed, the need to keep their internal surface reasonably clean became apparent.Condensate, wax, water, mill-scale, rust particles and other material deposited on the pipe walls can all considerably affect the capacity, performance, and integrity of hydrocarbon pipeline systems.So, PIGs are used extensively in the petroleum and natural gas industries.A periodic pigged gas pipeline is capable of transporting up to 70% more comparing to the conditions without pigging [1].Moreover, intelligent PIGs can provide most of required information about the pipeline conditions.PIG velocity significantly affects the efficiency of cleaning PIGs and data quality of the intelligent PIGs.Predicting of PIG motion in pipeline is very helpful to estimate PIG velocity, PIG position and required driving pressure.
There are a few studies dealing with the PIG motion in pipelines.McDonald-Baker [2] presented the first investigation of pigging.They proposed a computational method to predict working parameters such as pressure during pigging.This method was further modified by Barua [3] based on his experiments.However, the main assumption of successive steady-state condition was not disregarded in that study.
The first pigging model based on two-phased transient flow formulation was proposed by Kohda et al. [4,5].They conducted an experimental and theoretical analysis a Corresponding author: a.arabsolghar@vru.ac.ir on pigging of two phase flow pipeline with spheres.To account the slip between phases, they applied the flowpattern-independent steady-state holdup and pressure drop correlation.Empirical correlations are known to be restricted when applied beyond the range of parameters covered by the experimental data used to develop them.[6] analyzed the PIG transient operation through developing a pigging model and coupling it with the Taitel et al. [7] simplified transient model assuming quasi-steady state gas flow.

Minami and Shoham
A simple model to predict the PIG motion driven by incompressible fluids under steady-state condition was presented by Azevedo et al. [8].They improved their model with contact force in PIGs and by-pass flow [9].
Nguyen et al. [10] proposed a computational scheme using MOC and regular rectangular grid for estimating the PIG dynamics flowing in natural gas pipeline.[11] predicted the pigging operation in gas-condensate horizontal pipelines with low liquid loading, which couples the phase behavior model with the hydro-thermodynamic model.The model also contains the capability of PIG tracking and slug-length-increasing model.

Xu and Gong
Nieckele et al. [12] investigated several pigging operations, including the dewatering operation in a riser for an isothermal situation, by the finite difference method.Recently, the dynamic of small PIGs in space pipeline was examined by Saeidbakhsh et al. [13].They assumed that the friction coefficient is constant and the driving force is The start point of the pipe l The end point of the pipe amb ambient time dependent.Moreover, the effect of the flow field on the PIG trajectory was disregarded.Esmaeilzadeh et al. [14] studied the transient motion of a PIG through liquid andgas pipeline.The method of characteristics (MOC) with a regular rectangular grid was exploited to solve the nonlinear equations under unsteady state condition.
In Iran, there are a few studies considering the pigging simulation.In the present work, equations governing the conservation of mass, conservation of energy, and linear momentum for the fluid were numerically solved coupled with the equation of PIG dynamics.Finally the simulation was performed for the Pazanan Aghajari to Maroon gas pipeline and results were compared with experimental data.Good agreement was observed between measurements and numerical results.

Governing equations
Figure 1 represents a typical of PIG flow in pipeline.The centerline of the pipeline is inclined with the horizontal at angle β.In the computations, the flow field is divided into two distinguish regions: (1) from pipe inlet to the tail of PIG; (2) form the nose of PIG to pipe outlet.
The derivation of the principal equations of fluid dynamics is based on the fact that the dynamical behavior of a fluid is determined by the conservation of mass, momentum, and energy, which are called the conservation laws.
The following assumptions have been considered in the computations: (1) The domain is continuous and compressible, with the fluid displaying a Newtonian behavior.(2) The flow is single phase and unidirectional.
(3) The pipe has constant cross section with enough wall thickness in which radial deformation is negligible.(4) The friction coefficient is a function of surface roughness and Reynolds number.(5) The heat flux from the pipe is in quasi-equilibrium state.
For the PIG shown in Figure 1, the continuity equation is delineated as In the above equation ρ, u, t and x are fluid density, flow velocity in the axial direction, time and coordinate along the axis of pipe, respectively.For a compressible Newtonian fluid, the Navier-Stokes equation is defined as: where β is the tilting angle of the pipe, g is the gravity acceleration and F f is the friction force between the fluid and pipe wall per unit length of pipeline.Using Darcy-Weisbach equation, F f can be expressed as The hydrodynamic friction coefficient, f , depends on Reynolds number for laminar flow, and in the turbulent regime, on the pipe relative roughness, ε/d, as well.The friction coefficient for a laminar flow regime (Re < 2300) is 64/Re, while for the turbulent regime (Re > 2300) the friction factor was approximated by Haadland formula (white [15]) as The energy equation for the flow field is given as (5) where S is the pipe circumference and q is heat flux per unit area.Neglecting the kinetic and potential energy, following equation may be written for the energy term in the above equation as Using the state equation of an ideal gas: Substituting Equations ( 6) and (7) into Equation ( 5), after some mathematical manipulation yields following equation for energy conservation principal as Appling quasi-equilibrium condition for the heat flux, the following equation is defined for heat flow as where h and T amb are convection heat transfer coefficient and ambient temperature, respectively.Exploiting the second law of Newton to balance the acting forces on the PIG, the dynamic equation for the PIG motion according to the Figure 1 is given as where V pig is the PIG velocity, m the PIG mass, C is linear damping coefficient of PIG, p tail -p nose is the difference between upstream and downstream pressure of the PIG surfaces and F c is the axial contact force between the PIG and the pipe wall.The values of C and F c are measured by experiment.

Numerical simulation
To simulate the transient motion of PIG during its operation, one needs to couple the pigging model with the transient model.Assuming that upstream and downstream flows are completely decoupled by the PIG, flow velocities at PIG tail and nose equal PIG velocity.The flow field equations are solved through eigen values approach using uniform grid size.Consequently, partial differential equations are transformed to ordinary differential equations in which they can be integrated via finite difference method.
Equations ( 1), ( 2) and ( 8) can be rewritten in the matrix form as where, W = [ρup] T and matrices A and B are defined as The nonlinear hyperbolic partial differential Equation (11) is solved by method of characteristics (MOC) with the regular rectangular grid under appropriate initial and boundary conditions.Accordingly, the partial differential equations have been replaced by ordinary differential equations.The characteristic values of matric A are Therefore, the eigen vectors of matrix A are obtained as follow For each pair of characteristic value and vector, Equation (11) may be written as Along the following characteristic line Thus, using Equations ( 15) and ( 16), the final form of Equation ( 11) is expressed as: where In the above equations ψ = A/S.For the computations, regular grid is used to generate mesh.Spatial step, Δx, and time step, Δt are chosen based on the CFL condition (Δx and Δt are the space and time increment, respectively), which requires that: Figure 2 illustrates the relationship between p, ρ and u at the t j and t j−1 .Appling Equations ( 17)-( 19) and using defined variables of Figure 2, the values of p, ρ and u at point P can be obtained by calculated values of preceding time step at points L, N and O. First of all, the value of parameters should be computed by interpolation at points R, M and S, then Equations ( 17)-( 19) are integrated along the characteristic line as: For the computation of variables, X in the Equations ( 24)-( 26) is replaced by p, ρ and u.Moreover, E 1R , E 2S and E 3M are obtained from Equations ( 20)-( 22) at points R, S and M , respectively.In order to solve differential equations, appropriate boundary conditions and initial conditions should be implemented.The boundary conditions in the pipe inlet and outlet can be determined by two ways.(a) The flow rate in the inlet and outlet of the pipe is known Flow velocity can be determined through u(t) = Q(t)/A, where Q is the volumetric flow rate and A is the area of the pipe.At the pipe inlet, to calculate p p backward scheme is used, so applying Equation (18) yields: From known values of points L and N (as shown in Fig. 2) and by exploiting forward scheme, p p is computed at the pipe outlet via Equation (17) as The pressure is known in the pipe inlet and outlet Flow velocity in the inlet and outlet section of the pipe is computed by: Moreover, boundary conditions should also be applied for the PIG motion.Assuming that the upstream and downstream flows are separated by the PIG, flow velocity is equal to the PIG velocity at the tail and nose.If the PIG does not move to the next grids (Fig. 3), the velocity of point p can be determined through below interpolation: Therefore, p p is calculated using Equations (30) and (31).Then pressure at the PIG tail can be extrapolated as: As shown in Figure 4, the PIG can move to the next grid.Thus, after the pressure computation at the PIG   tail, flow parameters at p +1 should be obtained for the next iteration.
The same trend should be used to compute flow parameters at the PIG nose.Therefore, flow velocity at point p and pressure at the PIG nose are achieved as: So, in order to obtain the pressure at the PIG tail and nose, the flow dynamic equations are solved from pipe inlet to behind the PIG and from pipe outlet to front of the PIG, respectively.In the next step, the PIG dynamic is solved.The Runge-Kutta method is used to solve the PIG dynamic equation in which the velocity and the new position of the PIG are achieved.Then, it is checked if the PIG reaches the end of pipeline, if so, this loop is terminated.
Based on CFL condition, the sampling time Δt = 0.05 s, and sampling distance Δx = 80 m, are utilized in the present work.Constant flow velocity at inlet u 0 (t) = u 0 and constant pressure at outlet p l (t) = p l are applied as the boundary conditions.

Simulation results
The simulation was carried out for the Pazanan Aghajari-Maroon gas pipeline.A schematic of the pipeline and topographic section of region are shown in Figures 5  and 6, respectively.The values of the system parameters used in the present analysis are based on the final report of ROSEN Inspection Co. as listed in Table 1.Besides, the properties of PIG are summarized in Table 2.
In this section, the results of simulations of typical pigging operation obtained from the models developed for fluid flow, PIG dynamics and contact forces are explained.
To verify the validity of the present model, results are compared with the experiments reported by ROSEN Inspection Co. [16].Figure 7 displays the PIG velocity for different frictional static forces versus the PIG position.It is clear from Figure 7 that the model is able to predict the PIG velocity and position well.According to Figure 7, the PIG is accelerated sharply at the beginning of the motion and then, the PIG velocity become constant.Clearly, the effect of static frictional force on the PIG velocity is just in the initial stage and on the maximum velocity.
Figure 8 exhibits the PIG velocity versus time.Apparently from Figure 8, the frictional static force has an influence on the PIG velocity in the beginning of the motion and after a short time, the PIG velocity becomes stable and the PIG moves with constant velocity.As shown in Figure 8, if the frictional static force is large, the PIG acceleration is high in the beginning of motion and so it causes the uncertainty of data sampling [16].
The PIG position as a function of time is depicted in Figure 9.It is cleared that the value of frictional static force does not have much influence on the PIG travel time.The computed travel time for the PIG is equal to 13 h and 53 min; while this time is reported as 14 h and 3 min in the experiments.Due to the significance of the PIG traveling      before departure, then, the pressure increases, but after a short time the pressure declines.But in the beginning of motion, the PIG tail pressure rises to overcome friction forces and then reduces.The reduction of nose pressure is due to the PIG motion toward the end of pipeline.Because based to the fact that pressure is constant at the end of pipeline and the downstream length reduces by time, the pressure drop at the upstream decreases.Therefore, regarding to the constant pressure difference at the nose and PIG, the PIG tail pressure decreases to overcome the friction force.
The outlet velocity from the pipe line is plotted in Figure 12.According to this figure, initially, the outlet velocity is zero but it augments with the PIG motion and finally reaches a constant value as the PIG velocity becomes constant.Finally, Figure 13 exhibits the inlet pressure of pipeline.Clearly the inlet pressure of pipeline increases to move the PIG and then reduces till to reach a constant value.

Conclusions
In this study, the transient motion of PIG in gas pipelines was simulated.The governing equations were solved using characteristics value approach.The comparison between numerical results and experimental findings indicated that the model can predict the PIG velocity and position well.The present model enables us to determine the operation time of PIG, pressure and flow rate of gas.Results showed that the value of friction force is important in just the beginning of PIG motion.

Fig. 1 .
Fig. 1.The schematic of PIG in a pipe.

Fig. 3 .
Fig. 3.The PIG remains in the preceding steps.

Fig. 4 .
Fig. 4. The PIG moves to the new steps.

Fig. 9 .
Fig. 9.The model prediction of PIG position vs. time.

Fig. 10 .
Fig. 10.The model prediction of PIG nose pressure vs. time.

Fig. 11 .
Fig. 11.The model prediction of PIG tail pressure vs. time.

Fig. 12 .
Fig. 12.The model prediction of PIG outlet velocity vs. time.

Table 2 .
The properties of PIG of the Pazanan Aghajari -Maroon gas pipeline.