Sei sulla pagina 1di 9

Design and control of pig operations through pipelines

S.T. Tolmasquim
a
, A.O. Nieckele
b,

a
Petrobras Transporte S. A., Av. Presidente Vargas 328, Centro, 20091-060, Rio de Janeiro, RJ, Brazil
b
Department of Mechanical Engineering, Pontifcia Universidade Catlica de Rio de Janeiro, PUC/Rio, R. Marqus de So Vicente 225, Gvea, 22453-900, Rio de Janeiro, RJ, Brazil
a b s t r a c t a r t i c l e i n f o
Article history:
Received 16 November 2006
Accepted 13 July 2008
Keywords:
pigging
oil pipeline
oil displacement
gasliquid
control valve
To provide an efcient tool to assist in the control and design of pig operations through pipelines, a numerical
code has been developed, based on a nite difference scheme. It allows the simulation of two-uid transient
ow, i.e. liquidliquid, gasgas or liquidgas products in the pipeline. Modules to automatically control
process variables were included to employ different strategies to reach an efcient operation. Different test
cases were investigated to conrm the robustness of the method. The results obtained with the code were
compared with a real oil displacement operation of a section of the OSPAR pipeline, with 762 mm diameter
and 60 km length, owned by Petrobras; there was good agreement between the two, thereby validating the
method.
2008 Elsevier B.V. All rights reserved.
1. Introduction
Pigging is a common practice in the petroleum and natural gas
industry. In general terms, a pig is a solid plug that is introduced into
the pipeline to be serviced. Fluid is pumped upstream of the pig to
provide the necessary force to set the device in motion, and to perform
the desired task, i.e., removing deposits from the pipe wall, removing
water from the pipeline or driving an inspection tool. The use of pigs
has become a standard industry procedure. A great variety of pig
models is available for each particular application. A difculty often
faced by the engineer when designing a pigging operation is the lack
of reliable tools for the prediction of the many variables related to the
motion of the pig through the pipeline. Most of the available
knowledge is based on eld experience. Hence, there is often some
guesswork and, consequently, a degree of uncertainty in selecting the
best pig by estimating its speed, the required driving pressure, and the
amount of backward/forward bypass of uid.
The pipeline network all over the world is becoming older, and at
the same time concern over environmental issues has markedly
increased. Pipeline operators are investing in inspection and main-
tenance with the object of extending the lifetime of their pipelines.
However, to be able to execute repairs, it is necessary to empty the
entire pipeline or sections between pump stations, keeping valves and
accessories installed. In many cases, oil is displaced from the pipeline
by injection of inert gas, employing a sealing pig at the interface of the
uids. The pig velocity is directly related to the sealing efciency of the
pig, and requires that the liquid owrate be maintained within certain
limits. The ow rate and the pressure distribution depend directly on
the prole and on the fact that while gas ows in one section of the
pipeline there is liquid in another section. Therefore, the operational
design should also account for the pressure distribution along the
pipeline, in order to guarantee the level of operating pressure in the
pipeline, avoiding the occurrence of either slack ow or excess
pressure.
A typical sealing pig is formed by piston-type cups attached to a
cylindrical body (Fig. 1a). In order to produce efcient sealing, pigs
have nominal diameters larger than the pipe diameter. Fig. 1(b) is a
sketch of a sealing operation. Gas pumped upstream of the pig
provides the necessary pressure difference to overcome the contact
force at the wall, to displace the liquid downstream of the pig and to
accelerate the pig.
A fewpapers have dealt with the motion of pigs in pipelines. In one
of the rst investigations on pigging of gasliquid pipelines McDonald
and Baker (1964) assumed a successive steady-state approach to
model the phenomena, what leads to large calculation errors. Webb
et al. (1987) investigated the use of an inert gas to displace oil from a
long pipeline, and they mention the control of the oil owby an outlet
valve. Kohda et al. (1988) employed a pigging model with a drift ux
model for a two-phase transient ow, and Minami and Shoham(1996)
coupled the pigging model with the Taitel et al. (1989) quasi-steady
gas-ow model. Santos et al. (2001) developed a model to predict the
pig dynamics applied to Gas-Lift operations. Nguyen et al. (2001) and
Kimet al. (2003) studied the dynamics of pigs through pipelines using
the method of characteristics, and Azevedo et al. (2003) used the nite
difference method. Nieckele et al. (2001) investigated several pigging
Journal of Petroleum Science and Engineering 62 (2008) 102110
Corresponding author. Tel.: +55 21 3527 1182; fax: +55 21 3527 1165.
E-mail addresses: sueli@petrobras.com.br (S.T. Tolmasquim), nieckele@puc-rio.br
(A.O. Nieckele).
0920-4105/$ see front matter 2008 Elsevier B.V. All rights reserved.
doi:10.1016/j.petrol.2008.07.002
Contents lists available at ScienceDirect
Journal of Petroleum Science and Engineering
j our nal homepage: www. el sevi er. com/ l ocat e/ pet r ol
operations, including the dewatering operation in a riser for an
isothermal situation, by the nite difference method. Recently, Xu and
Gong (2005) developed a simplied pigging model for predicting the
pigging operation in gas-condensate horizontal pipelines with low
liquid-loading; this couples the phase-behavior model with the
hydro-thermodynamic model.
The objective of the present work is to simulate the transient oil
displacement of a pipeline employing a sealing pig. To achieve an
efcient operation, a method was developed to automatically control
process variables. Test cases are presented to illustrate the robustness
of the method, which considers a PID (Proportional, Integral and
Derivative) controller. To validate the code developed, a transient oil
displacement of a pipeline employing a sealing pig is simulated and
the results are compared with eld data.
2. Mathematical modeling
The motion of a pig inside a pipeline during an operation to
displace oil by injection of nitrogen can be obtained by the solution of
the uid owproblemcoupled with a model to predict the pig motion.
The upstream uid is gas, while the downstream uid is liquid. Both
are considered to be Newtonian. For the present work, the uid owis
isothermal. The pipeline is inclined in relation to the horizontal
direction, at an angle . Pipe deformation due to pressure variations
along the ow is considered. The governing equations for the uid are
the continuity and momentum equations. The mass conservation
equation can be written as (Wylie and Streeter, 1978)
@P
@t
V
@P
@s

a
2
n
@V
@s

a
2
n
V
A
@A
@s
0 1
where V, P and A are the velocity, pressure and cross-section area,
respectively, and s is the ow direction. The uid properties are
density, , and isothermal speed of sound, a. The wave speed is

a
2
=n
_
,
where the coefcient is given by
n 1 a
2
C
D
D
D
ref
; C
D

1 v
2
_ _
wE
D
ref
2
where D and D
ref
are the pipeline diameter and the reference diameter
determined at atmospheric pressure P
atm
and C
D
is the pipe
deformation coefcient due to pressure. In deriving C
D
, w is the pipe
wall thickness, E is the Young's modulus of elasticity of the pipe
material, and the Poisson's ratio. The diameter is determined from
D
D
ref
1 C
D
=2 P P
atm

3
Assuming that the angle between the center line of pipe and the
outer line of pipe very small to be ignored, the linear momentum
equation can be written as
@V
@t
V
@V
@s

1

@P
@s

f
2
j
V
j
V
D
g sin 4
where g is the acceleration due to gravity, is the angle of the pipe
center line with the horizontal direction. f is the hydrodynamic
friction factor coefcient, which depends on the Reynolds number,
Re= |V| D/, where is the absolute viscosity. In the turbulent
regime, the friction factor is also a function of the pipe roughness . To
simplify the solution, the friction factor is approximated by its fully
developed expression. For a laminar regime, Reb2000, it is specied
as f =64/Re. For the turbulent regime, ReN2500, the friction factor is
approximated by Miller's correlation (Fox and McDonald, 2005),
f =0.25 {log [(/D)/3.7+5.74/Re
0.9
]}
2
. Between Re =2000 and
Re=2500, to avoid sharp transition, a linear variation of the friction
factor with the Reynolds number was assumed fromits laminar to the
turbulent value.
The coupling of the pig motion with the uid owin the pipeline is
obtained through a balance of forces acting on the pig, together with
an equation that represents the drop in uid pressure across the
bypass holes in the pig (Azevedo et al., 2003). The force balance on the
pig can be written as
m
dV
p
dt
P
1
P
2
A m g sin F
at
V
p
_ _
5
where V
p
is the pig velocity, m the pig mass, P
1
and P
2
the pressure on
the upstream and downstream faces of the pig and F
at
(V
p
) the contact
force between the pig and the pipe wall.
The contact force F
at
(V
p
) depends on x
p
, the axial pig position
inside the pipeline, indicating that the contact force can be allowed to
vary along the pipe length. When the pig is not in motion, the contact
force varies from zero to the maximum static force in order to balance
the pressure force due to the uid ow. Further, since the pig may
resist differently being pushed forward or backward, the maximum
static force for a negative pressure gradient is F
stat
neg
, while for a positive
pressure gradient it is F
stat
pos
. Once the pig is set in motion by the ow,
the contact force assumes the constant value F
dyn
; this represents the
dynamic friction force, which is generally different from the static
force. As in the previous situation, two different values for the
dynamic contact force are allowed, F
dyn
neg
and F
dyn
pos
, depending on the
direction of the pig motion.
F
at
V
p
_ _
F x
p
_ _
where F
neg
stat
x
p
_ _
F x
p
_ _
F
pos
stat
x
p
_ _
if V
p
0 6
F
at
V
p
_ _

F
neg
dyn
x
p
_ _
if V
p
<0
F
pos
dyn
x
p
_ _
if V
p
N0
_
7
2.1. Moving coordinates
Since the pig moves in the computational domain, it is convenient
to employ a coordinate system, , that stretches and contracts in the
Fig. 1. Sealing pig. (a) Typical sealing pig. (b) Schematic view of a sealing pig inside a
pipeline.
103 S.T. Tolmasquim, A.O. Nieckele / Journal of Petroleum Science and Engineering 62 (2008) 102110
pipe, depending on the pig position. The uid ow conservation
equation must then be rewritten for the new coordinate system
(Nieckele et al., 2001) as
@
@t
P
V
_ _

~
V
h

@
@
P
V
_ _

a
2
h

n
1
h

_
_

_
@
@
V
P
_ _


a
2
~
V
n A h

@A
@
g sin
_

_
_

0
f
j
V
j
2D
_
_
_
_
P
V
_ _
8
The absolute velocity V is equal to V

+u
g
, where V

is the relative
velocity and u
g
=(s/t)

is the grid velocity. h

=(s/)
t
is the metric
that relates the two coordinates.
2.2. Fluid properties
The gas is considered to be a quasi-ideal gas; thus, the equation of
state for an isothermal ow is
P=a
2
; where a

Z R
gas
T
ref
;
_
9
where R
gas
is the gas constant, T
ref
the reference temperature, Z the
compressibility factor and a the isothermal speed of sound.
For the liquid, the following relationship between density and
pressure was considered,

ref
PP
ref
=a
2
10
where
ref
is the reference density evaluated from the reference
pressure P
ref
. The liquid speed of sound a was dened as constant.
For each uid, the absolute viscosity was considered as a function
of pressure in accordance with the following expression (ASTM D341-
87, 1987):

ref
exp c
;p
P P
ref

_
; 11
where
ref
is the absolute viscosity evaluated at the reference pressure
P
ref
with coefcient c
,p
.
2.3. Initial and boundary conditions
The operations investigated in this model begin with the pipeline
lled with liquid and with no ow. Therefore, the initial condition
corresponds to a zero velocity along the pipeline. The hydrostatic
pressure distribution between two nodes can be obtained by
integrating Eq. (4), considering the density variation with pressure,
Eq. (10). Beginning from the known pressure at the highest elevation
of the pipeline, the pressure P
s +ds
, at position s+ds is obtained from
the pressure at the adjacent node P
s
as
P
sds
P
ref

P
S
P
ref

ref
a
2
1 exp g z=a
2
_ _ _ _
exp g z=a
2

12
where z=s sin is the vertical coordinate.
To solve the conservation equation, Eq. (8), two boundary
conditions are necessary; these can be known pressure, known mass
ow rate or an equation that relates mass ow rate and pressure,
representing a valve connecting the pipeline to a reservoir. For the last
case, the mass ow rate at inlet and/or outlet are determined from
:
m
in

in
C
d
A
g
_ _
o;in

2 P
t;in
P
_ _

in

13
:
m
out

out
C
d
A
g
_ _
o;out

2 PP
t;out
_ _

out
;

14
where (C
d
A
g
)
o
is the product of the valve discharge coefcient and the
area for the valve completely open. P
t
is the reservoir pressure,
upstream or downstream of the valve, and is the percentage of valve
opening. The subscripts in and out refer to the inlet and outlet sections
of the pipe.
3. Process control
The main goal of the system developed to control processes
consists in maintaining certain variables within desired operational
limits. This control can operate in an opened or closed loop. For the
present work a closed loop is employed, where the value of the
desired variable is used to re-feed the system, in order to compensate
external and internal perturbations of an industrial process (Fig. 2).
The controller compares the desired value with the measured value,
and if there is a discrepancy between these values, the controller
manipulates its output in order to eliminate the error. For example, if
the measured maximumpressure is not the desired value, the opening
of a valve at the inlet of the pipeline is altered, in order to maintain the
process variable within the desired value.
There are situations in which it is necessary to simultaneously
control two variables of the process. For example, if one wishes to
control the pig velocity and the minimum pressure with the pipeline
outlet valve. If the measured pig velocity is not the desired value, a
new setting for the outlet valve is determined. The appropriate outlet
value opening is also determined based on the desirable minimum
pressure. To guarantee that both variables are within the desirable
values, the minimum outlet value opening is imposed to the process.
Fig. 2(b) illustrates this situation, where the smallest output from the
two controllers is employed to re-feed the system.
3.1. PID controller
A PID controller generates its output proportionally to the error
between the desired and measured quantity, the integral of the error
and the derivative of the error. Its output u(t) is given by the following
expression (Isermann, 1981)
u t K e t
1
T
I

t
0
e d T
D
de t
dt
_ _
; 15
where e(t) is the error and the multiplier factors K, T
I
and T
D
are
known as the controller gain, the integral time and derivative time,
respectively.
The controller error can be dened as (Grimble, 2004)
e t PV t SP CA ; CA 1 or 1; 16
where PV(t) is the process variable, SP is the set point to control the
process variable and CA is the controller action. This action can be
direct or reverse. For a direct action controller, when the process
variable increases, the output of the controller also increases, i.e.,
the variable is maintained at the set point or above it. The
controller with reverse action decreases its output when the
process variable increases, thereby maintaining the variable at or
below its set point.
4. Numerical method
The set formed by the pig and ow equations, Eqs. (5) and (8),
together with the appropriate boundary and initial conditions,
requires a numerical method to obtain the desired time-dependent
pressure and velocity elds. These equations were discretized by a
nite difference method. A staggered mesh distribution was selected
to avoid unrealistic oscillatory solutions, as recommended by Patankar
(1980). The equations were integrated in time by a totally implicit
method. The space derivatives were approximated by the central
104 S.T. Tolmasquim, A.O. Nieckele / Journal of Petroleum Science and Engineering 62 (2008) 102110
difference method around the mesh point. The resulting coefcient
matrix is penta-diagonal, and can be easily solved by a direct penta-
diagonal algorithm.
The total number of grid points inside the pipe was maintained
constant in the numerical calculations of the ow eld upstream and
downstream of the pig as well as for the pig dynamics calculations.
However, as the pig moves along the pipe, it is convenient to rearrange
the node distribution. The number of grid points upstream and
downstream of the pig was made proportional to the length of the
pipe at each side of the pig.
5. Analysis of test cases
Two study cases are presented here to illustrate the method of
control of the inlet or outlet valve opening to maintain the pig velocity
as well as the maximum and minimum pressure values inside the
pipeline under desirable limits. Finally, to validate the method, a liquid
displacement operation in the OSPAR oil pipeline is examined.
5.1. Case 1Pig velocity and minimum pressure control
The rst test case consists in oil removal froma horizontal pipeline by
the injection of nitrogen. A constant mass owrate of nitrogen
:
m
in
equal
to 7.0 kg/s is imposed at the entrance. There is a valve at the pipeline
outlet. The reservoir pressure beyond the valve P
t,out
is 196 kPa, and the
fully open valve discharge coefcient (C
d
A
g
)
o,out
is 0.02 m
2
. The oil
properties are: =900 kg/m
3
, a=1318 m/s and =70 cP at P
ref
=101 kPa.
The nitrogen properties are: R
gas
=296.9 Nm/(kgK), z=1.04 and
=0.015 cP at P
ref
=101 kPa, T
ref
=20 C. The pipeline characteristics are:
length L=40 km, diameter D
ref
=457 mm, wall thickness w=9.53 mm,
roughness =45.7 m, Young's modulus of elasticity E=2.110
5
MPa,
Poisson's ratio =0.3. The maximum allowable operating pressure
(MAOP) was set equal to 3.82 MPa. The pig mass m is 20 kg and its
contact forces are: F
stat
neg
=F
stat
pos
=F
dyn
neg
=F
dyn
pos
=29.6 kN, corresponding to a
pressure difference P=P
1
P
2
=196 kPa across the pig.
During the operation it is desirable to maintain pig velocity at
around 2 m/s, and a minimum pressure along the whole pipeline of
490 kPa.
Initially, the problem is solved without any control. At time zero,
the outlet valve is completely opened in 1 s and kept this way. Then, to
illustrate the performance of the control method, both pig velocity
and minimum pressure are controlled by a valve at the outlet of the
pipeline. To control the pig velocity, the controller parameters of
Eq. (15) are set as K=0.1, T
I
=0 s and T
D
=20 s, with a set point SP equal
to 2 m/s. The minimum pressure control parameters are: K=10
6
,
T
I
=0 s, T
D
=20 s and SP=490 kPa.
Fig. 3 presents the pressure variation with time at six positions
distributed along the pipeline for the case without PIDcontrol (Fig. 3a)
and with PID control (Fig. 3b). The maximum allowable operating
pressure (MAOP) is also indicated at the gures. The presence of the
pig causes a very large pressure gradient at the pipeline entrance
(s =0 km) at the beginning of the operation. For this case the
maximum pressure is not a problem, since all pressures are always
inferior to MAOP (Fig. 3). As the mass ow of nitrogen is constant at
the pipeline entrance, the pressure needed to maintain the ow rate
diminishes as oil is replaced by nitrogen. At other positions the
pressure increases with time until the pig passes through that
position. The pressure jump across the pig can easily be seen by the
vertical pressure variation at each location. After the passage of the
pig, since the gas head loss is very small, the pressure distribution is
very similar to the entrance pressure.
It can be seen in Fig. 3a that without PID control the pressure at the
exit of the pipeline (s=40 km) is approximately constant during
almost all operation, slightly superior to the reservoir pressure of
0.196 MPa and below the minimum desirable pressure of 0.490 MPa.
After 5 h of operation it rapidly increases as the head loss through the
valve also increases owing to the high ow rate of the liquid. With PID
control (Fig. 3b) the exit pressure is kept above 0.490 MPa during the
whole operation.
Fig. 4 illustrates the variation of the pig velocity with time. Without
PID control the pig velocity continuously increases with time (Fig. 4a),
since the oil resistance decreases. When PID control is activated
(Fig. 4b) the pig velocity does not surpass the velocity of 2 m/s which is
its set point.
Without PID control the outlet valve is completely opened in 1 s,
however when the PID control is activated, the opening of the outlet
Fig. 2. Control system in a closed loop. (a) one variable. (b) two variables.
105 S.T. Tolmasquim, A.O. Nieckele / Journal of Petroleum Science and Engineering 62 (2008) 102110
valve is delayed. Further, in order to guarantee the minimum desired
pressure, only 40% of the valve is opened at the beginning of the
process (Fig. 5). Then the valve is gradually opened reaching the
maximum opening of 60% after about 4 h from the start of the
operation, when the pig velocity reaches 2 m/s. At this moment, the
outlet valve begins to close to maintain the pig velocity at the set point
(Fig. 4b).
5.2. Case 2Pig velocity and maximum pressure control
The second test case has a variable topography prole (Fig. 6), in
which each pipeline segment is 5 kmin length. The same pipe and oil as
intheprevious exampleare employedwithMAOPset at 4.5MPa. Thepig
mass is 27 kg and its contact forces are F
stat
neg
=F
stat
pos
=F
dyn
neg
=F
dyn
pos
=18.4 kN,
corresponding to a pressure difference P of 98 kPa across the pig.
Initially, there is no ow, the pipe is full of oil and the hydrostatic
pressure distribution is prescribed, where the pressure is set as
294 kPa at the highest point of the pipeline. The operation begins by
Fig. 4. Case 1. Variation of pig velocity with time. (a) Without PID control. (b) With PID
control. Fig. 5. Case 1. Percentage of outlet valve opening during the operation with PID control.
Fig. 3. Case 1. Pressure variation with time at s=0, 10, 20, 30, 35 and 40 km. (a) Without PID control. (b) With PID control.
106 S.T. Tolmasquim, A.O. Nieckele / Journal of Petroleum Science and Engineering 62 (2008) 102110
injecting nitrogen into the pipeline. After 120 s, a constant mass ow
rate of nitrogen equal to 9.0 kg/s is imposed at the entrance. At the
pipe outlet there is a valve connected to a reservoir at atmospheric
pressure (P
t,out
=101 kPa). The fully open valve discharge coefcient
(C
d
A
g
)
o,out
is 0.025 m
2
.
Again, both pig velocity and minimum pressure are controlled by
the outlet valve opening. To control de pig velocity, its set point is
SP=1.6 m/s, with the following control parameters: K=0.1, T
I
=0 s and
T
D
=16 s. The minimum pressure control parameters are: K=10
6
,
T
I
=0 s, T
D
=20 s and its set point is SP=101 kPa. Without activating the
controller procedure, the outlet valve is completely opened in 120 s.
In this example, the pressure distribution (Fig. 7) depends on two
combined effects, i.e., reduction of head loss by the substitution of the
oil by nitrogen, and the elevation effect. In the uphill sections, the
Fig. 7. Case 2. Pressure variation with time at 10 positions uniformly distributed. (a) Without PID control. (b) With PID control of V
p
and P
min
with outlet valve. (c) With PID control of
P
max
with inlet valve.
Fig. 6. Pipeline prole.
107 S.T. Tolmasquim, A.O. Nieckele / Journal of Petroleum Science and Engineering 62 (2008) 102110
hydrostatic pressure to be overcome reduces as the pig approaches the
highest peak, leading to a strong reduction inpressure. In the downhill
sections the opposite occurs, explaining the periodic behavior of the
pressure variation with time. After the pig has passed a certain
location, the variation in gas pressure is very small and similar to the
other stations lled with gas. At Fig. 7, the maximum allowable
operating pressure (MAOP) and minimum desired pressure P
min
are
also indicated. Without PID control the MAOP limit is surpassed
(Fig. 7a); however, the minimumpressure limit is always satised. The
pig accelerates uphill owing to the reduction in pressure head, and it
decelerates downhill (Fig. 8a). Although the pressure behavior is
similar at all peaks, the pig accelerates a little more as it moves along
the pipeline as a result of the smaller head loss of N
2
. In the nal
segment, pig velocities are very high, since there is no longer a
descending segment to reduce this velocity.
Two controlled operations are examined. Initially, the pig velocity
and minimum pressure are simultaneously controlled. To control the
pig velocity (Fig. 8b) the outlet valve is periodically opened and closed
(Fig. 9a). As time passes, the valve stays fully opened for successively
shorter times, and to control the pig velocity in the nal segment it is
only 18% open. Note, however, that although the pig velocity is
controlled and the minimumpressure is never attained, the maximum
pressure is again surpassed (Fig. 7b).
To control the maximum pressure, an inlet valve is then
considered and the control method is applied to it. The inlet
reservoir pressure P
t,in
which feeds the pipeline is 3.92 MPa, and the
fully open valve inlet discharge coefcient (C
d
A
g
)
o,in
is 0.003 m
2
. The
set point for the maximum ow rate is SP=9 kg/s, with the following
control parameters: K=0.01, T
I
=0 s and T
D
=10 s. In order to absorb
the overshoot of the control system, the set point for the maximum
pressure is proportional to the maximum allowable operating
pressure (MAOP) as SP=MAOP/1.15. The control parameters for the
maximum pressure are: K=10
7
, T
I
=0 s and T
D
=20 s. To guarantee
that the pressure is always inferior to the MAOP limit (Fig. 7c) and
the mass ow rate is inferior to 9 kg/s, the resulting maximum inlet
valve opening was equal to 83% (Fig. 9b). Due to the pressure
increase the valve is closed to control its value. As time passes less
nitrogen is needed to displace the pig. Thus, to ensure the desired
pressure limits the valve is periodically closed and opened, but each
time to a smaller percentage (Fig. 9b).
5.3. Case 3Liquid displacement operation in the OSPAR oil pipeline
The OSPAR pipeline is 117 km in length, with an intermediate
pumping station at Itarar (60 km). Its main purpose is to take oil from
the So Francisco do Sul Terminal (SFS) to the renery. The oil was
removed from the pipeline by the injection of nitrogen, with a 40 kg
separator expig. Owing to the pipeline prole (Fig. 10), the oil
displacement was from the renery in Paran (REPAR) to SFS, in the
opposite direction to the normal operational direction. Liquid nitrogen
was stored in a low-pressure cryogenic cylinder. Leaving the cylinder,
the nitrogen pressure was raised to the desired level; it was vaporized
and then injected into the pipeline. To avoid high pressure at places
where the altitude is low, especially near SFS, the valve at Itarar
(diameter 762 mm) was kept closed. The alignment employed a valve
of smaller diameter (203 mm), which introduced a pressure drop at
Fig. 8. Case 2. Pig velocity (V
p
) with pig position along pipeline (x
p
). (a) Without PID
control. (b) With PID control.
Fig. 9. Case 2. Extent of valve opening (%). (a) Pig velocity and minimum pressure PID
control with outlet valve. (b) Maximum velocity PID control with inlet valve.
Fig. 10. Prole of the REPAR-Itarar section prole and maximum allowable operation
pressure.
108 S.T. Tolmasquim, A.O. Nieckele / Journal of Petroleum Science and Engineering 62 (2008) 102110
the station while maintaining the downstream pressure near to
atmospheric pressure increasing the controllability of the system.
The simulation was carried out fromREPAR to Itarar (Fig. 10), where
the pipeline characteristics are: lengthL=60 km, diameter D
ref
=762 mm,
roughness =45.7 m, Young's modulus of elasticity E=2.110
5
MPa and
Poisson's ratio =0.3. The wall thickness w varies from 9.53 mm to
14.3 mm. The maximum allowable operation pressure MAOP is also
illustrated in Fig. 10. The oil properties were: =828 kg/m
3
, a=1218 m/s,
and =2.6 cP. The nitrogen properties were: R
gas
=296.9 Nm/(kgK),
z=1.04 and =0.015 cP. The reference pressure and temperature were
P
ref
=101 kPa and T
ref
=20 C, respectively. The pig contact forces were all
the same (F
stat
neg
=F
stat
pos
=F
dyn
neg
=F
dyn
pos
), but they varied with the pipe thickness
from 85 kN to 83 kN.
The pressure variation with time, acquired by the SCADA (Super-
visory, Control and Data Acquisition) system, was dened as the inlet
boundary condition (Fig. 11). At the pipeline section exit at Itarar, no
owinformation was available. Therefore, the level variation of the oil
receiving tank at SFS (Fig. 12a), also acquired by the SCADA system,
was used to dene the mass ow rate at the outowboundary. The oil
mass ow rate (Fig. 12b) was obtained by the following expression:
:
m N
t
N
t
0
_ _
= tt
0
17
where N
t
and N
t
0
are the tank levels at time t and previous time t
0
,
respectively, and is the density. No noise was eliminated from the
data to dene the simulation boundary conditions.
A comparison between the pressure measured at Itarar and the
pressure obtained with the present simulation for the full
operation is shown in Fig. 13a, while a detail of the nal 8 h of
the pigging operation is illustrated in Fig. 13b. Owing to the noise of
the imposed mass ow rate at the exit, the resulting pressure at
Itarar also presented several oscillations; however, the same
pressure level was obtained. A steep variation of the eld pressure
can be observed after 11 h of operation. At that moment, the oil
mass ow rate was high so that the nitrogen pressure at the
entrance was sufcient to displace the pig. However, a short time
after this, the pig remained stuck at a low point of the prole, and
it did not move until the pressure was recovered at REPAR. This
behavior can be seen in Fig. 12a, where the oil tank level was kept
constant from 11 h to 14 h, indicating that there was no ow. The
pig remained stationary during this time (Fig. 14). To induce
movement of the pig, the operator of the process opened a valve at
Itarar to reduce the pressure downstream of the pig and thereby
increase the pressure difference across it, so that the pig would
start to move again. This operation was not considered in the
simulation, and this explains the large discrepancy between the
simulated and eld data for pressure during this time. With the
Fig. 11. Variation in pressure over time at the REPAR renery.
Fig. 12. Variation over time in (a) the level in the SFS oil receiving tank and (b) mass ow
rate. (a) Receiving tank level. (b) Mass Flow Rate at Itarar.
Fig. 13. Pressure at Itarar. Comparison between simulated and eld data. (a) Total
pigging operation. (b) Detail of the nal 8 h of the pigging operation.
Fig. 14. Pig position with time. Comparison between simulated and eld data.
109 S.T. Tolmasquim, A.O. Nieckele / Journal of Petroleum Science and Engineering 62 (2008) 102110
pipe blocked, the inlet pressure increased (see Fig. 11), and the pig
resumed its progress (Fig. 14). As the pig started to move the
pressure level at Itarar recovered and the simulation agreed with
the eld data. A very good agreement can be seen after 13 h
(Fig. 13b), with the variation in outlet pressure with time being
closely related to the simulated pressure. The outlet pressure is also
correlated with the position of the pig (Fig. 14) and the prole of
the pipeline (Fig. 10).
One of the reasons for the discrepancy between the pressure
measured and predicted can be related to the fact that the simulation
was performed with only one phase present inside the pipeline.
However, during the beginning of the operation, the pipeline was
operating in slack ow. After approximately 13 h of operation, the
pipeline started to operate without slack ow until the pig reached
Itarar, and this can explain the better agreement at the end of the
pigging operation (Fig. 13b).
Fig. 15 presents a comparison of the measured nitrogen mass
ow rate with the numerical results obtained here. Fig. 15a
illustrates the full operation, where once again oscillations are
observed and can be linked to uctuation in the outlet mass ow
rate. Fig. 15b shows the mass ow rate for the nal 8 h of the pigging
operation. Although the numerical results present a high level of
oscillations, the correct level of mass ow rate was predicted. The
negative mass ow rate in the simulation can be explained by the
presence of slack ow, which was not considered with the present
model. Owing to low pressure, the oil vaporizes; however, since the
present numerical model does not predict this phenomenon, the low
pressure can only cause an adverse pressure gradient, leading to a
theoretical reverse ow. Further, the data for instantaneous mass
ow rate were indirectly obtained from the pump rotation, leading
to considerable uncertainty. In spite of these limitations, the
comparison can be considered reasonable, especially after 13 h of
the pigging operation (Figs. 13b and 15b).
Finally, although the measured data for pig position with time are
admittedly few, those that were obtained agree quite well with the
modeled data (Fig. 14).
6. Final remarks
To guarantee an efcient and safe pigging operation, maximumand
minimum pressures in the pipeline as well as pig velocity must be
maintainedwithinstipulated limits. With the objective of providing an
efcient tool to assist in the control and design of pig operations
through pipelines, a numerical code was developed based on a nite
difference scheme, which allows the simulation of gasliquid transient
ows in the pipeline. Modules based on the PID controller method to
automatically control process variables were included to employ
different strategies to achieve an efcient operation. The opening of
both inlet and outlet valves can be controlled. The test problems
presented illustrated the effectiveness of the method. Further, the
results obtained with the code were comparable with those of a real oil
displacement operation in a section of the OSPAR pipeline, with
762 mm diameter and 60 km length, owned by Petrobras.
Although good results were obtained, it is clear that the weakness of
the model lies in its inability to account for slack ow. This is a very
important phenomenon which must be included in the code. In fact, at
the moment two different approaches are being implemented to
account for slack ow. In the rst approach, the two-uid model is
being implemented downstreamof the pig, while only gas is considered
upstream. In the second approach, a cavitation model predicts the oil
vaporization for pressures inferior to the oil vapor pressure.
Acknowledgement
The second author acknowledges the support awarded to this
research by the Brazilian Research Council, CNPq.
References
ASTM D341-87, 1987. Standard Viscosity Temperature Chart for Liquid Petroleum
Products.
Azevedo, L.F.A., Braga, A.M.B., Nieckele, A.O., Souza Mendes, P.R., 2003. Simulating
Pipeline Pigging Operations, 3 rd Edn. . Pipeline Pigging & Integrity Technology.
Clarion Technical Publishers, Houston, TX, pp. 79107.
Fox, R.W., McDonald, A.T., 2005. Introduction to Fluid Mechanics, 5th Edn. Wiley.
Grimble, M.J., 2004. Integral Minimum Variance Control and Benchmarking. . Journal of
Process Control, vol. 14(2). Elsevier Science, pp. 177191.
Isermann, R., 1981. Digital Control Systems, Revised and Enlarged Translation of Digitale
Regelsysteme 1977. Springer-Verlag, Berlin.
Kim, D.K., Cho, S.H., Park, S.S., Rho, Y.W., Yoo, H.R., Nguyen, T.T., Kim, S.B., 2003.
Verication of the theoretical model for analyzing dynamic behavior of the pig from
actual pigging. KSME Int. J. 17 (9), 13491357.
Kohda, K., Suzukawa, Y., Furukwa, H., 1988. A new method for analyzing transient ow
after pigging scores well. Oil Gas J. 9, 4047.
McDonald, A., Baker, O., 1964. Multiphase owin (gas) pipelines. Oil and Gas Journal, 62
(24): 6871, 62(25): 171175, 62(26): 6467, 62(27): 118119.
Minami, K., Shoham, O., 1996. Pigging dynamics in two-phase ow pipelines:
experiment and modeling. Int. J. Multiph. Flow 22 (1), 145146.
Nieckele, A.O., Azevedo, L.F.A., Braga, A.M.B., 2001. Transient pig motion through
pipelines. J. Energy Resour. Technol. ASME 123, 260269.
Nguyen, T.T., Kim, S.B., Yoo, H.R., Rho, Y.W., 2001. Modeling and simulation for pig ow
control in natural gas pipeline. KSME Int. J. 15 (8), 11651173.
Patankar, 1980. Numerical Heat Transfer and Fluid Flow. Hemisphere Publishing
Corporation.
Santos, O.G., Bordalo, S.N., Alhanati, J.S., 2001. Study of the dynamics, optimization, and
selection of intermittent gas-lift methodsa comprehensive model. J. Pet. Sci. Eng.
32 (2), 231248.
Taitel, Y., Shoham, O., Brill, J.P., 1989. Simplied transient solution and simulation of
two-phase ow in pipelines. Chem. Eng. Sci. 44 (6), 13531359.
Webb, S., Bogucz, E., Levy, E., Barret, M., Snyder, C., Waters, C., 1987. Evacuation of a
residual oil pipeline by inert gas displacement. SPE Prod. Eng. 14042, 4550.
Wylie, Streeter, 1978. Compressible Flow in Pipes. McGraw Hill.
Xu, X.X., Gong, J., 2005. Pigging simulation for horizontal gas-condensate pipelines with
low-liquid loading. J. Pet. Sci. Eng. 48 (34), 272280.
Fig. 15. Mass owrate at REPAR. Comparison between simulated and eld data. (a) Total
pigging operation. (b) Detail of the nal 8 h of the pigging operation.
110 S.T. Tolmasquim, A.O. Nieckele / Journal of Petroleum Science and Engineering 62 (2008) 102110

Potrebbero piacerti anche