Dynamic Analysis of Small Pigs in Space Pipelines

Dynamic Analysis of Small Pigs in Space Pipelines — This paper deals with the dynamics of small pipeline inspection gauges (pigs) in space pipelines. First, the differential equations for dynamic analysis of the small pig, whose length is short, are developed. The flow field can significantly influence the pig’s trajectory. In this research, the effect of the flow field on the pig’s trajectory was ignored. The path of the pig or centerline of the pipeline is assumed to be a curve in 3D space. Next, the differential equations of motion are combined and reduced to only one nonlinear differential equation with respect to the parameter of the space curve. The fourth-order Runge-Kutta method is then used for solving the equation. The driving force is assumed to be time-dependent, but the coefficient of friction is assumed to be constant for the sake of simplicity. The simulation results show that the derived equations are effective for estimating the position and velocity of the pig and forces acting on it at all time instants of its motion. Oil & Gas Science and Technology – Rev. IFP, Vol. 64 (2009), No. 2, pp. 155-164 Copyright © 2008, Institut français du pétrole DOI: 10.2516/ogst:2008046 Oil & Gas Science and Technology – Rev. IFP, Vol. 64 (2009), No. 2 INTRODUCTION One of the safest methods to transport oil and gas products is by pipeline. Pipelines transport liquid and gas products of refineries to cities. During this transportation, they pass through rivers, mountains and so on. Therefore, one can assume that their geometry is a space curve in general. Also, most parts of the pipelines are buried in the ground. Hence, a pipeline can fail for different reasons such as change in curvature or length, pipe wall corrosion, increase in the pipe wall’s roughness, and reduction of the internal diameter. To prevent these factors and other targets such as cleaning and dewatering, pipelines must be pigged regularly. The tool which is used for pigging is called a pipeline inspection gauge (pig). It is a device which is inserted into a pipeline and travels throughout the pipeline to be inspected. It can also monitor the physical condition of the pipeline. The operation of the pig, regarding the pigging target, depends on its speed and acceleration. An estimation of these parameters is very important before the pigging operation. Selecting the best pig geometry, estimating its speed, required driving pressure and the amount of back and forward bypass of fluid are all based on our knowledge about the dynamic behavior of pigs. The advent of high-resolution magnetic-based on-line inspection and monitoring equipment now allows operators to thoroughly assess the integrity of a pipeline. In a paper [1], the varieties of pipe-wall defects that can be detected during pigging are explained. Some analytical techniques are summarized and their assessments are discussed. The incorporation of these methods into condition-monitoring plans is argued, and finally, an overall defect assessment methodology is presented. The article [2] is the first in a series discussing the performance of conventional pipeline pigs. The aim is to provide users, manufacturers and suppliers with awareness of the advantages and limitations associated with conventional pipeline pigging, concentrating on oil and gas applications, such as hydrocarbon pipelines. A literature survey reveals very few papers dealing with the dynamic analysis of pigs in pipelines. Most of the research results are commercially based or field experience. There are some papers that concern the motion of pigs and try to estimate the pig dynamics in pipelines. Transient pig motion through gas and liquid pipelines was presented by [3]. In their study, they assumed that the pig moves in a straight line in the plane. Modeling and simulation for pig flow control in natural gas pipelines was studied by [4]. This research was also concentrated on straight pipelines. A simple nonlinear controller for controlling the pig velocity when it flows in a natural gas straight pipeline was proposed by [5]. Verification of the theoretical model for analyzing dynamic behavior of the pig from actual pigging was presented in [6]. In all the previous studies, by assuming a straight line for pipeline geometry, the governing differential equations of the flow and dynamic equations of the pig were solved simultaneously. A self-drive pipeline pig, which obtains its power from the kinetic energy of fluid flow in a pipe via a turbine and a reverse–traverse screw mechanism, has been introduced by [7]. Their proposed pig was designed to move both against and with the flowing fluid, which makes it different from conventional pigs, which can only move with the flowing fluid. A dynamic model for the pig was then derived. Based on the model, the dynamic behavior of the pig under different conditions was analyzed in detail. In order to verify the validity of the dynamic model, a prototype machine and pipe-loop test rig was built, and the experimental data obtained compared with the theoretical analyses. Liquid condensation in natural gas transmission pipelines, which commonly occurs due to the thermodynamic and hydrodynamic imperatives, was studied by [8]. Condensation subjects the gas pipeline to two-phase transport, and the presence of condensation in gas pipelines dramatically affects their delivery ability and operational modality, and the associated peripheral facilities. It is therefore imperative for the pigging simulation in gas-condensate flow lines to be taken into consideration during their design. In their study, a new simplified pigging model was developed for predicting the pigging operation in gas-condensate horizontal pipelines with low liquid-loading, which couples the phase behavior model with the hydro-thermodynamic model. They compared their calculation results with those of the twophase transient computational code OLGA and concluded that the proposed pigging model has a good precision and high speed in calculation. A review on the pigging simulation models in multiphase pipelines has been carried out by [9]. In this paper, the aim is to extend the dynamic analysis of pigs for space curved pipelines. The extension is based on some simplifying assumptions such as: the pig is small, the pig/wall friction coefficient is constant and the driving force is time-dependent. It was also assumed that only a pressure driving force was acting on the pig. The differential equations of the pig in the space are derived by Newton’s second law. Next, the three governing equations are reduced to one equation with respect to the parameter of the curve. Finally, the Runge-Kutta method is used for solving the derived equation. Three case studies are included to illustrate the application of the new formulation. 1 MATHEMATICAL MODEL Figure 1 shows the free body diagram of a typical small pig inside a space pipeline. The weight of the pig, W, dry friction force, f, normal force by the pipe wall, N, and the driving force, P, are the forces acting on the pig. These forces in general, as shown in Figure 1, are space vectors. The position 156


INTRODUCTION
One of the safest methods to transport oil and gas products is by pipeline.Pipelines transport liquid and gas products of refineries to cities.During this transportation, they pass through rivers, mountains and so on.Therefore, one can assume that their geometry is a space curve in general.Also, most parts of the pipelines are buried in the ground.Hence, a pipeline can fail for different reasons such as change in curvature or length, pipe wall corrosion, increase in the pipe wall's roughness, and reduction of the internal diameter.To prevent these factors and other targets such as cleaning and dewatering, pipelines must be pigged regularly.The tool which is used for pigging is called a pipeline inspection gauge (pig).It is a device which is inserted into a pipeline and travels throughout the pipeline to be inspected.It can also monitor the physical condition of the pipeline.The operation of the pig, regarding the pigging target, depends on its speed and acceleration.An estimation of these parameters is very important before the pigging operation.Selecting the best pig geometry, estimating its speed, required driving pressure and the amount of back and forward bypass of fluid are all based on our knowledge about the dynamic behavior of pigs.
The advent of high-resolution magnetic-based on-line inspection and monitoring equipment now allows operators to thoroughly assess the integrity of a pipeline.In a paper [1], the varieties of pipe-wall defects that can be detected during pigging are explained.Some analytical techniques are summarized and their assessments are discussed.The incorporation of these methods into condition-monitoring plans is argued, and finally, an overall defect assessment methodology is presented.The article [2] is the first in a series discussing the performance of conventional pipeline pigs.The aim is to provide users, manufacturers and suppliers with awareness of the advantages and limitations associated with conventional pipeline pigging, concentrating on oil and gas applications, such as hydrocarbon pipelines.
A literature survey reveals very few papers dealing with the dynamic analysis of pigs in pipelines.Most of the research results are commercially based or field experience.There are some papers that concern the motion of pigs and try to estimate the pig dynamics in pipelines.Transient pig motion through gas and liquid pipelines was presented by [3].In their study, they assumed that the pig moves in a straight line in the plane.Modeling and simulation for pig flow control in natural gas pipelines was studied by [4].This research was also concentrated on straight pipelines.A simple nonlinear controller for controlling the pig velocity when it flows in a natural gas straight pipeline was proposed by [5].Verification of the theoretical model for analyzing dynamic behavior of the pig from actual pigging was presented in [6].In all the previous studies, by assuming a straight line for pipeline geometry, the governing differential equations of the flow and dynamic equations of the pig were solved simultaneously.
A self-drive pipeline pig, which obtains its power from the kinetic energy of fluid flow in a pipe via a turbine and a reverse-traverse screw mechanism, has been introduced by [7].Their proposed pig was designed to move both against and with the flowing fluid, which makes it different from conventional pigs, which can only move with the flowing fluid.A dynamic model for the pig was then derived.Based on the model, the dynamic behavior of the pig under different conditions was analyzed in detail.In order to verify the validity of the dynamic model, a prototype machine and pipe-loop test rig was built, and the experimental data obtained compared with the theoretical analyses.
Liquid condensation in natural gas transmission pipelines, which commonly occurs due to the thermodynamic and hydrodynamic imperatives, was studied by [8].Condensation subjects the gas pipeline to two-phase transport, and the presence of condensation in gas pipelines dramatically affects their delivery ability and operational modality, and the associated peripheral facilities.It is therefore imperative for the pigging simulation in gas-condensate flow lines to be taken into consideration during their design.In their study, a new simplified pigging model was developed for predicting the pigging operation in gas-condensate horizontal pipelines with low liquid-loading, which couples the phase behavior model with the hydro-thermodynamic model.They compared their calculation results with those of the twophase transient computational code OLGA and concluded that the proposed pigging model has a good precision and high speed in calculation.A review on the pigging simulation models in multiphase pipelines has been carried out by [9].
In this paper, the aim is to extend the dynamic analysis of pigs for space curved pipelines.The extension is based on some simplifying assumptions such as: the pig is small, the pig/wall friction coefficient is constant and the driving force is time-dependent.It was also assumed that only a pressure driving force was acting on the pig.The differential equations of the pig in the space are derived by Newton's second law.Next, the three governing equations are reduced to one equation with respect to the parameter of the curve.Finally, the Runge-Kutta method is used for solving the derived equation.Three case studies are included to illustrate the application of the new formulation.

MATHEMATICAL MODEL
Figure 1 shows the free body diagram of a typical small pig inside a space pipeline.The weight of the pig, W, dry friction force, f, normal force by the pipe wall, N, and the driving force, P, are the forces acting on the pig.These forces in general, as shown in Figure 1, are space vectors.The position vector of the center of gravity of the pig is represented by r(λ), where λ is a time-dependent parameter.One can write r(λ) with respect to its components as, (1) Assuming that the gravitational force acts in the ydirection, it can be expressed by W = -mgj.One can define a frame of mutually orthogonal unit vectors that always travels along with a moving body in space [10].Three unit vectors can be defined in this frame.The first one is the unit tangent vector, ô.The second one is the vector n that points to the direction of dô/ds.The third is defined by b = ô × n.These vectors and their derivatives (Serret-Frenet formulas [11]), when available, give useful information about the moving objects and their paths in space.The magnitude of the derivative dô/ds represents how much a pig's path turns to the left or right as it moves; it is called the curvature of the path.The magnitude ⏐db/ds⏐ specifies how much a pig's path rotates or twists as the pig moves along the pipe; it is called the torsion of the pig's path.
Available experimental data indicate that the dynamic contact force (friction) might be a function of the pig's velocity.However, in this investigation, it is considered to be independent of the pig's velocity [3].This force is acting in the opposite direction of the pig's motion and is tangential to the pipe axis.The direction of the normal force, N, is unknown.However, it is known that the normal force does not have any component in the tangential direction of the pig's path.The driving force, P, acts in the direction of the pipeline axis.This force depends on the pressure difference between the nose and the tail of the pig, and on the aerodynamic parameters of the pig in a real-world problem.
For the sake of simplicity, it was assumed here as a function of time only, i.e.P = p(t)ô.It should be noted that at any time, t, of the motion, we have a time-dependent parameter, i.e. λ, whose value is unknown and must be calculated.

DYNAMIC EQUATIONS
The dynamic equations of the pig derived from Newton's second law along the n, ô and b directions are as follows; (2) where, (5) (6) Since ô is a unit vector, then dt/ds can be found from equation ô.ô = 1 as follows; (7) Therefore, the tangential unit vector is given by; (8) Based on the first Serret-Frenet formula we have, where is the curvature and will be determined from; x x x y z z a y z x z zxx d ds Also, the normal unit vector n can be obtained from Equation ( 9) (11) The second normal unit vector is derived from the outer cross-product of ô and n, i.e.

(12)
Since the projection of the vector Finally, substituting Equations ( 19) and (16) in Equation ( 2) results in: a a a ga a a a ( ) sgn( ).
2 , μ N mg a x a z a a a  Δ a a a a y a z a x a z z a x az The above equation is a nonlinear differential equation with respect to λ, which can be solved by a numerical technique such as Runge-Kutta based on initial conditions.When parameter λ is determined in each time instant t, then the position and the velocity of the pig can be calculated easily.

NUMERICAL STUDIES
In order to show the validity of the developed equations, three case studies were designed and solved by the proposed numerical technique.

Case 1
For the first case study, let us assume a helix-type pipeline.This curve is a well-known space curve with the following parametric equations: The configuration of the pipeline is depicted in Figure 2. The numerical values for the mass of the pig, external force acting on the pig and the friction coefficient between the pig and pipeline wall are m = 20 Kg, p(t) = 100 N, μ = 0.2, respectively.The pig moves from the origin at t = 0 and its motion is recorded up to t = 10 seconds.The Runge-Kutta method was chosen for solving pig dynamic equations with a sampling time of 0.001 s.The results are shown in Figure 3.This example can show the validation of the above formulation because of its geometric curvilinear periodic nature.Figures 3a-f show the position and velocities of the pig in the x, y and z directions with respect to time.The positions of the pig in the x and z directions have a periodic nature.The velocities in these directions have the same sorts of trends.However, the velocity starts from zero and increases up to a certain level and then remains constant.Actually, the normal force between the pig and the pipeline wall increases with increases in the pig's velocity.The friction force is directly related to the normal force.From Figure 3g one can see that the normal force becomes constant after 3 seconds.This is true because of the special geometry of the pipeline.Since there is no difference between any two points of the path, after passing a few times, then the normal force reaches a constant value.The speed of the pig increases up to a level in that the friction force and the driving forces gravity and pressure are in equilibrium.This happens at time instant 3 seconds for this case study.Figures 3b, d and f show that the pig's speed in all three directions is constant after three seconds.The monotonic increase in the pig's position in the y direction is due to the fact that the pig is moving downwards because of gravity.These results validate the modeling and formulation of the present research.Figures 3i and j show the tangential velocity of the pig and the   , f, g, h, i, j Simulation results of helix-type pipeline under constant driving force.
distance of the pig from the pipeline inlet, respectively.The tangential velocity reaches 13.5 m/s and then remains constant.The distance that the pig moves inside the pipeline is around 240 m after 10 seconds.

Case 2
The geometry of the selected pipeline for the second test is shown in  elbow is 45°.The aim is to test the ability of the developed software to predict the displacement of the pig through a pipeline with elbows connecting straight segments.The pig's motion inside the pipeline was determined for a time interval of 20 seconds.The Runge-Kutta method with a sampling time of 0.02 s was used for this case study.
The results are depicted in Figure 5. Figures 5a-j present the similar results for a pipeline with practical type geometry.This geometry is more complex than case 1 because of discontinuity in geometry curvature at the joint of the straight pipe to the elbow.The developed code can also handle this complex type geometry.For this reason, most of the results in this case such as the position and velocities of the pig have some discontinuity at the joints.In other words, since the function of the centerline curve of this pipe is not thoroughly unique, then there are some jumps in velocities of the pig (Fig. 5b, d, f, g).

Case 3
Let us consider case 1 again.The only difference is the driving force is assumed to be time-dependent, i.e. p(t) = 100 cos t N.This selection can show the validation of the computer program because of the periodic nature of the driving force.The results of this case are depicted in Figure 6a-f.The periodic nature of the force causes the change in tangential velocity and normal force exerted on the pig in comparison with case 1.

CONCLUSIONS
This paper presents a computational method using Newton's second law and the Serret-Frenet formula for dynamic analysis of pigs in space curves.The method is limited by time-dependent forces on the pig.The pig's displacement and the flow field are assumed to be decoupled.In other words, the influence of the flow field on the pig's trajectory was ignored.
Three numerical case studies were selected to validate the proposed procedure of the paper.The results from the first case are in agreement with the physical nature of the problem.
The second case study is an example of a real-world pipe line.Due to the discontinuous nature of the connection between the elbows and straight pipes, there are discontinuities in the velocity of the pig during its motion in the pipe.These jumps can exert high value forces on the pipe at the connection points when the pig moves along the pipeline.In order to avoid these forces, the difference between the curvatures of the connected segments should be as small as possible.
The third case study, which has a time-dependent driving force, validated the proposed procedure of the paper for this case.
This research was the first effort in realizing a new idea.It is expected that the present approach can be developed in such a manner as to include the flow field in its formulation, and become more applicable in speed control of the pig in space pipelines in the next study.
mg b b and s is measured along the pig's path.If we use the chain rule and differentiate from Equation (1) to obtain the n, ô and b at all points and denote d/dt = ( ) ⋅ and d/dλ = ( )', then the following relations will be obtained;

2 MFigure 1
Figure 1 Schematic view of a pig inside a space pipeline.
g o and g b can be obtained as: needs to calculate the remaining unknown terms in Equations (2) to (5), i.e., (16) Substituting Equations (13) and (14) and the magnitude of (16) in (3) and (4) results in the components of normal forces:

Figure 2 A
Figure 2 A helix-type pipeline.

M
Figures3a, b, c, dSimulation results of helix-type pipeline under constant driving force.

Figure 4 .
It consists of two straight pipes attached to two elbow-like pipelines.The numerical values for this case study are m = 10 kg, p(t) = 100 N, μ = 0.25 and the length of every straight path is 50 m.The radius of curvature of each elbow is 10 m.The plane angle of each of the pig in y direction Time (s) of the pig in y direction Time (s)

Figure 4 A
Figure 4 A general pipeline.