You are on page 1of 43

Journal Pre-proof

A novel method for transient leakage flow rate calculation of gas transmission
pipelines

Qian Chen, Xiaokai Xing, Can Jin, Lili Zuo, Jianhang Wu, Weishuo Wang

PII: S1875-5100(20)30115-3
DOI: https://doi.org/10.1016/j.jngse.2020.103261
Reference: JNGSE 103261

To appear in: Journal of Natural Gas Science and Engineering

Received Date: 25 November 2019


Revised Date: 11 February 2020
Accepted Date: 11 March 2020

Please cite this article as: Chen, Q., Xing, X., Jin, C., Zuo, L., Wu, J., Wang, W., A novel method for
transient leakage flow rate calculation of gas transmission pipelines, Journal of Natural Gas Science &
Engineering, https://doi.org/10.1016/j.jngse.2020.103261.

This is a PDF file of an article that has undergone enhancements after acceptance, such as the addition
of a cover page and metadata, and formatting for readability, but it is not yet the definitive version of
record. This version will undergo additional copyediting, typesetting and review before it is published
in its final form, but we are providing this version to give early visibility of the article. Please note that,
during the production process, errors may be discovered which could affect the content, and all legal
disclaimers that apply to the journal pertain.

© 2020 Published by Elsevier B.V.


A novel method for transient leakage flow rate calculation of gas

transmission pipelines

Qian Chen1, Xiaokai Xing1*, Can Jin1, Lili Zuo1, Jianhang Wu1, Weishuo Wang2

1. National Engineering Laboratory for Pipeline Safety/Beijing Key Laboratory of Urban Oil and

Gas Distribution Technology, China University of Petroleum (Beijing), 18 Fuxue Road,

Changping, Beijing, China

2. China Sinopec Sales Co., Ltd. Beijing Oil Branch, Building 6, Guangqu Jiayuan, Dongcheng,

Beijing

Email address: xingxiaokai@vip.sina.com (Xiaokai Xing)

Abstract

To objectively evaluate the consequences of the pipeline leakage and ensure the
safe operation and reliable gas supply of the gas pipeline, it is necessary to calculate
the leakage flow rate variations. A novel model for transient leakage flow rate
calculation of gas transmission pipelines is proposed in this paper. Based on the
pressure data collected at the upstream and downstream block valve rooms of the
leakage position, the time for alarm signal and closure signal of block valves can be
determined, and the leakage orifice can be calculated by iterative method based on the
collected data of the block valve rooms from alarm signal to closure signal. The
leakage process is divided into two stages according to the time when the leakage
occurred and two block valves were automatically closed, and the leakage flow rate at
each stage is calculated based on the characteristic line method. The proposed method
is applied to a real gas transmission pipeline in China, and the minimum detectable
leakage orifice at different locations is calculated and sensitivity analyses of leakage
location on leakage flow rate calculation are conducted in detail.

1
Keywords

Gas pipelines; Transient leakage flow rate; Pressure drop rate; Characteristic line
method; Leakage orifice calculation

Nomenclature

a velocity of pressure wave, m/s


A cross-sectional area of the pipe,
A0 area of the leakage hole, m2
C leakage coefficient
CPR critical pressure ratio
d inner diameter of pipeline, m
D external diameter of pipeline, m
ERR total error between simulation results and collection data, MPa
ERRU error of the upstream block valve between simulation results and
collection data, MPa
ERRD error of the downstream block valve between simulation results and
collection data, MPa
g gravity acceleration, 9.8m/s2
k adiabatic coefficient of the natural gas
K heat transfer coefficient, W/(m2·K)
m molar mass of the natural gas, /
M mass flow rate, kg/s
P pressure at each node, Pa
Pa ambient pressure, Pa
Pcd real-time pressure data of the downstream block valve of the leakage
pipe segment calculated by simulation model, MPa
Pcu real-time pressure data collected from the downstream block valve of
the leakage pipe segment, MPa
PL pressure at the leakage hole, Pa)
2
Psd real-time pressure data of the upstream block valve of the leakage
pipe segment calculated by simulation model, MPa
Psu real-time pressure data collected from the upstream block valve of the
leakage pipe segment, MPa
R Moore gas constant, 8.314 kJ/ ∙
Rg mass gas constant, / ∙
leakage flow rate, kg/s
s entropy of the gas, / ∙
t time step, s
T temperature, K
temperature at the leakage point, K
x knot spacing interval, m
Z compression factor
the angle between the pipe and the horizontal ground

ρ gas density, kg/m3

Moore gas density, kmol/m3;


λ friction factor

1. Introduction

The natural gas is normally transported by pipeline or in the form of liquefied


natural gas (LNG) (Stevens, 2009). Most of the world’s natural gas is delivered by
pipeline. LNG shipping which can be performed via tanker truck and freight ship is
preferred for international transport because natural gas takes up 600 times less
volume in the liquid form (cooled to -161℃) and making it easier for shipment and
storage. The cost of the pipeline transportation tends to rise steeply with
transportation distance, while the cost of LNG transportation one has a high initial
threshold but a relatively lower increase with transportation distance, a break-even
point between 3000 and 5000 kilometers is often mentioned in some literatures
3
(Ulvestad, 2012; El Hachemi, 2003). A study commissioned by the European Union
shows that the typical energy “penalty” for gas delivery via pipelines is 10-15%,
whereas it is approximately 25% via LNG (Ali, 2014).
The pipeline transportation is widely used in the natural gas industry because of
low cost and high safety, 93% of the world’s gas continues to be supplied through
pipelines (Ali, 2014) which include some world famous long-distance gas
transmission pipeline system like the Alaska Natural Gas Pipeline, Alliance Gas
Pipeline, West-East Gas Pipeline and so on. Pipeline leakages often occur due to pipe
aging, corrosion and the third-party damage. The leakage of pipelines not only causes
the loss of resources, but also greatly pollutes the environment, and sometimes even
causes fire and explosion accidents, which brings great damage to people's lives and
property. In order to ensure the safe operation of the gas pipeline system, it is
necessary to monitor the pipeline operation status in real time by collecting the
pressure and flow parameters of each valve room and compressor station by the
SCADA system.
When a leak occurs somewhere in the gas pipe segment, the upstream and
downstream block valves of the pipe segment will automatically close after detecting
an abnormal pressure drop rate for a period of time. After a leak occurs somewhere in
the pipe segment, the primary task is to find the location of the leak and carry out the
repair operation. Secondly, in order to objectively evaluate the consequences of the
leak and ensure the safe and reliable gas supply of the pipeline, the leakage rate
calculation also has actual practical significance.
At present, researches about leakage of natural gas pipeline are mainly based on
leakage detection (Liang et al., 2013; Xu et al., 2013; Xiao et al., 2019; Liu et al.,
2017;), but there are only a few studies focusing on the leakage flow rate calculation
of gas pipelines. The calculation of leakage flow rate of gas pipelines is mainly
divided into the two aspects, namely leakage flow rate calculation based on steady
state and the transient state.
(1) Research status of leakage flow rate of gas pipelines based on steady state

4
Leakage flow rate calculation models of gas pipelines based on steady state are
mainly divided into three types: hole model, pipe model and Hole–pipe generalized
model, which are characterized by the assumption that the operation pressure in the
gas pipeline does not change with time after leakage.
Levenspiet (2014) was the first to give the calculation model of the leakage rate
of the tank–nozzle–pipe system. After that, Crowl et al. (2011) deduced the
calculation model of leakage flow rate at small orifice for gas pipeline based on
assumptions that the pressure in the pipeline does not change with time during
leakage process and the leakage process is an isentropic expansion process. Catin et al.
(1998) calculated the leakage flow rate of gas transmission pipelines based on fluid
mechanics and characteristic line method, and this model is only suitable for scenarios
that the pipeline was completely ruptured. Young et al. (2003) propose a simplified
model to estimate the leakage flow rate of the high-pressure gas pipeline, which
consists of a correction factor considering the pressure drop due to the wall friction
loss. The mode has some positive deviation from the theoretical complex equations
(ranges from about 0 up to 20%). Montiel (1998) proposed a new model based on
fundamental equations of fluid mechanics, this model is developed as a combination
of the classical ‘hole’ and ‘pipe’ models which can be applied to small hole in a tank
or a pipe and full-bore holes at medium and low pressures. Based on Montiel’s model,
Huo (2004) and Wang (2008) proposed a new model for the leakage hole diameter
that lies between the small hole and complete rupture for high-pressure gas pipelines.
At present, the application scope of these three models has not formed a unified
conclusion. Among them, the most reliable method is the classification of natural gas
pipeline leakage accidents proposed by the European Gas pipeline Incident data
Group: The leakage orifice less than 20mm is a small hole leakage, the leakage orifice
larger than 20mm and smaller than the pipe diameter is a large hole leakage and the,
leakage orifice close to the pipe diameter is pipe broken leakage. Some authors
suggest that the ratio of the leakage orifice to the pipe diameter should be used to
classify of natural gas pipeline leakage accidents and calculate the leakage flow rate.

5
In short, the leakage flow rate calculation methods of gas pipelines based on
steady state are relatively mature. The modeling processes are also based on a series
of assumptions, and the definition of small holes or large holes needs further study
based on flow mechanism of leakage.
(2) Research status of leakage flow rate of gas pipelines based on transient state
At present, there are relatively few studies about leakage flow rate of gas
pipelines based on the transient state. When a leakage scenario is detected somewhere
in the pipeline, the block valves located upstream and downstream of the leakage
position will automatically closed, and the operational pressure in the leaking pipe
segment will decrease continuously, and the leakage rate will change accordingly.
Woodward et al. (1991) put forward the leakage flow rate calculation model of
the pressure vessel and gave the quantitative function of pressure variations in the
vessel. According to the relationship between the pressure of the gas pipeline and the
critical leakage pressure, the flow pattern at the orifice can be determined, and
leakage flow rate can be calculated based on corresponding formulas. Cui et al. (2010)
established a transient gas pipeline leakage rate calculation model. Like the model
based on the steady state, it only takes the flow characteristics of leakage hole into
consideration based on fluid mechanics, but does not take the transient gas flow in the
pipeline after leakage. Zhang et al. (2009) established the transient leakage flow rate
calculation model based on the continuity equation, and calculated the transient
leakage process of the gas pipeline after the gas source is cut off based on the
fourth-order Runge-Kuta method. Some more advanced and efficient semi-analytical
methods based on Adomian decomposition for solving these governing equations are
proposed by some researchers in recent years (Singh et al. 2016; Hasan et al. 2004;
Fatoorehchi et al. 2017; Fatoorehchi et al. 2019). Reza et.al (2014) proposed a mass
discharge function to simulate the dimensionless transient gas release rate parameters
in a ruptured gas pipeline.
The research on leakage flow rate calculation based on the transient state is
mainly carried out based on the process of venting processes of the gas in the pipeline

6
after the closure of the upstream and downstream block valves. The difficulty of
transient leakage flow rate calculation is to establish a mathematical model for a
specific leakage process and solve it by numerical algorithm.

In summary, many existing literatures often take the leakage orifice as a known
parameter when establishing the calculation model of leakage flow rate. In fact, when
the leakage occurs in the pipeline, it is difficult to get the actual leakage orifice in the
first time. And the steady-state leakage flow rate calculation cannot reflect the
variations of actual leakage flow rate. After the pipeline leakage, operation pressure in
the pipeline will decrease exponentially, so the leakage flow rate will show a trend of
decrease.
This paper proposes a new model for transient flow rate calculation of gas
transmission pipelines. In case that the block valves of gas transmission pipelines are
alarmed and automatically closed, the model proposed in this paper can calculate the
leakage flow rate based on transient pressure variations collected on the upstream and
downstream block valve rooms of the leakage point. The leakage process is divided
into two stages according to the time when the leakage occurred and block valves are
automatically closed, and the leakage flow rate at each stage is calculated based on
the characteristic line method.
The basic framework of the developed real-time leakage flow rate calculation
method is introduced in Section 2. The real-time leakage simulation model of gas
transmission pipelines based on the characteristic line method, the calculation method
of pressure drop rate, and the calculation method of leakage orifice and transient
leakage flow rate of gas transmission pipelines are proposed in Section 3. The
proposed method is applied to a real gas pipeline in China in Section 4, and the
minimum detectable leakage orifice at different locations are calculated and
sensitivity analysis of leakage location on leakage flow rate calculation are analyzed
in detail. This paper closes with some conclusions and future work in Section 5.

7
2. Methodology

This paper presents a novel method for transient leakage flow rate calculation of
gas pipelines based on data of the pressure variations collected at the upstream and
downstream block valve rooms of the leakage point. This method can address two
stage transient leakage rate calculations based on the iterations of the equivalent
leakage orifice and characteristic line method. Based on the recommended threshold
of the pressure drop rate in the block valve rooms and closure time of block valves,
the leakage process is divided into two stages according to the time when the leakage
occurred and block valves were automatically closed. The first stage is the process
from the leakage of the pipeline to the closure of one block valve. The second stage is
the process from the closure of one block valve to the closure of both upstream and
downstream block valves.
After the closure of both upstream and downstream block valves, assuming an
equivalent leakage orifice, the pressure data can be simulated based on the
characteristic line method, leakage calculation model and corresponding boundary
conditions. Compare the pressure data obtained from the SCADA system to the
simulation data. The actual leakage orifice can be obtained through a number of
iterations until the error between these two data set are within the allowable range.
Then transient leakage flow rate of the two stages can be calculated based on the
closure time recommended by Line Guard 2100. The basic framework is shown in Fig.
1.

8
Fig. 1. Framework of the developed methodology.

3. Calculation of transient leakage flow rate of gas pipelines

3.1 Transient simulation model of gas pipeline leakage

The gas pipeline between two compressor stations is divided into several pipe
segments according to block valve rooms. Based on the continuity equation, the
momentum equation, the gas state equation and thermodynamic equations, the
transient simulation model of gas pipeline leakage is established to calculate the
pressure variations at each valve rooms and compressor stations.
The characteristic line method (CLM) is adopted to solve the continuity equation
and the momentum equation. The knot space for hydraulic simulations is set as 1000
meters. Divide all nodes of the gas pipeline into three categories, namely general
nodes, leakage nodes and boundary nodes (including the left boundary and the right
boundary). The boundary conditions and legal or physical constraints of these nodes
are described as follows:

9
Fig.2. Hydraulic simulation of leakage scenarios based on CLM.

(1) General nodes


For general nodes (such as node D in Fig. 2), based on the pressure and flow at
node A and B at the previous time step 1, the pressure and flow at node D at the
time step can be calculated based on the continuity equation (1) and the momentum
equation (2).
∂ρ ∂M
A + = 0 (1 )
∂t ∂x
∂M 1 ∂  M 2  ∂P λ
+  + A + M M + g ρ A sin θ = 0 (2)
∂t A ∂x  ρ  ∂x 2dAρ

Where: is the mass flow rate, / ; is the time step, ; is the


cross-sectional area, ; is the knot step ; is the gas density, / ;
P is the pressure, ; is the friction coefficient; ! is the inner diameter of the
pipe segment, ; g is the gravity acceleration, 9.8m/s2; is the angle between the
pipe and the horizontal ground.

The BWRS equation proposed by Starling-Han in 1970 is usually used to


calculate the gas physical parameters in high-pressure gas transmission pipeline.

10
Based on gas composition and the BWRS equation in equation (3), gas
compressibility factor can be calculated at given temperature and pressure.

A0 C D E a d α d 5 c ρ0 2 (3)
Z = 1 + ( B0 − − 0 3 + 04 − 0 5 ) ρ0 + (b − − ) ρ 0
2
+ ( a + ) ρ0 + (1 + γρ02 )exp(−γρ0 2 )
RT RT RT RT RT RT 2 RT T RT 3

Where denotes the Moore gas density, kmol/m3; R denotes the gas constant,
8.314 kJ/ ∙ ; Z denotes the gas compressibility factor; A0, B0, C0, D0, E0, a, b,
c, d, α, γ are the parameters related to the gas composition; the detailed calculation
process of these parameters can be seen in the reference (Li and Yao, 2009).

Considering the gas state equations (3) and (4) and the velocity equation of

pressure wave (5), equations (6) and (7) can be obtained by taking equations (3)∽(5)

into equations (1) and (2).

P = ρ ZRg T (4)

 ∂P 
a=   (5 )
 ∂ρ  s

∂P a 2 ∂M
+ = 0 (6 )
∂t A ∂x

∂P 1 ∂M P λa2
+ + 2 g sin θ + M M = 0 (7 )
∂x A ∂t a 2dA2 P

Where " is the compression factor; #$ is the gas constant, / ∙ ; is

the temperature, ; is the velocity of pressure wave / , and is the entropy


of the gas, / ∙ .
The inertia term in the momentum equation is ignored since the influence of the
inertia term is small, a second-order difference is applied to the hydraulic friction term,
we can get from the finite difference form of the equations (6) and (7):

a λ a 2 ∆x M D + M A g
F1 = PD − PA + ( D A)
M − M + M D + M A + 2 ( PD + PA )sin θ = 0 (8)
A 4 DA2 PD + PA 2a

a λ a 2 ∆x M D + M B g
F2 = PB − PD + (MD − MB ) + M D + M B + 2 ( PD + PB ) sin θ = 0 (9)
A 4 DA 2
PD + PB 2a

11
The pressure and flow rate of node D can be calculated based on the binary
nonlinear equations (8) and (9). To solve the binary nonlinear equations (8) and (9),
the Newton iteration method can be used, the initial value of the pressure and flow
rate of node D in the first iteration can take the average of the pressure and flow of
node A and node B. The iterative formula is as follows:

  ∂F2   ∂F1  
 F1   − F2  
PD k +1 = PD k +   ∂QD   ∂QD   (10)
 ∂F2  ∂F1   ∂F1  ∂F2 
  −  
 ∂PD  ∂QD   ∂PD  ∂QD 

  ∂F1   ∂F2  
 F2   − F1  
  ∂PD   ∂PD  
QD k +1 = QD k + (11)
 ∂F2  ∂F1   ∂F1  ∂F2 
  −  
 ∂PD  ∂QD   ∂PD  ∂QD 

(2) Leakage node


For the leakage node (such as node G in Fig. 2), the parameters to be solved are
pressure, the flow rate before and after the leakage point and the leakage flow rate.
Besides equations (8) and (9), the leakage rate equation of gas pipelines and the node
flow balance equation need to be added to solve these unknown parameters.
The gas leakage rate is related to the gas flow state at the leakage hole (critical
flow or subcritical flow), so the critical pressure ratio (CPR) as equation (12) needs to
be determined before leakage flow rate calculation. When the CPR is less than 1, the
flow state at the leakage hole is under subcritical flow, and the leakage flow rate needs
to be calculated by equation (13). When the CPR is greater than 1, the flow state at
the leakage hole is under critical flow, and the leakage flow rate needs to be calculated
by equation (14).
k
P  2  k −1
CPR = a =  (12)
PL  k + 1 
k +1
 2

2km  P
 a − a k  P  k
 (13)
 PL   PL  
q=CA0 PL
( k -1) RT
 
12
k +1
m  2  k −1
q=CA0 PL k  (14)
ZRTL  k +1 
Where & # is the critical pressure ratio; & is the leakage coefficient, which is
related to the shape of the leakage hole; is the area of the leakage hole (m2); '

is the ambient pressure ( ); is the pressure at the leakage hole ( ); is the


adiabatic coefficient of the natural gas; is the molar mass of the natural gas
( / ); # is the gas constant, ( / · ; is the leakage flow rate (kg/s);
is the temperature at the leakage hole, .

Assume that the flow rate before and after the leakage node G is )* and ) **

respectively, and the leakage flow rate at node G is . The discrete form of the
continuity equation and the momentum equation at the leakage node are shown as
equations (15) and (16), and the node flow balance equation is shown as equation
(17).

a λ a 2 ∆x M G ' + M E g
PG ' − PE + ( MG' − M E ) + M G ' + M E + 2 ( PG ' + PE ) sin θ = 0 (15)
A 4 DA PG ' + PE
2
2a

a λ a 2 ∆x M G '' + M F g
PF − PG '' + ( M G '' − M F ) + M G '' + M F + 2 ( PF + PG '' ) sin θ = 0 (16)
A 4 DA PG '' + PF
2
2a

M G ' − M G '' = q (17)

Based on the pressure and flow at node E and F at the previous time step 1,
four parameters of )* , ) ** , ) and can be calculated based on equations (13)
~ (17) and Newton iteration method. The initial values for iteration and the iterative
formula is similar to the methods introduced in general nodes.

(3) Left boundary node


According to the right characteristic line as the equation (9) and the left
boundary condition, the variations of the unknown parameters of the left boundary
can be calculated. The left boundary is usually connected to the outlet of the
13
compressor station, the control mode and constraints of the left boundary are as
follows:
(a) If the outlet pressure can reach the designed pressure of the gas pipeline, then
the boundary condition is pressure control, and the control pressure is approximately
equal to the designed pressure of the pipeline due to that the gas pipeline is usually
operated under high pressure conditions to reduce energy consumptions. A certain
margin should be left to ensure operation safety. The margin pressure is 0.3MPa in
this paper. Then flow rate variations of the left boundary can be calculated based on
the right characteristic line and the left boundary condition of set pressure.
(b) Pipeline leakage can cause an increase in flow rate upstream of the leakage
point. Even if all the compressors are operated at the maximum rotational speed, the
outlet pressure may not reach the set pressure of the gas pipeline. In this condition, the
boundary condition for the compressor stations is converted to the maximum
rotational speed to ensure the highest outlet pressure as much as possible. Then flow
rate and pressure variations of the left boundary can be calculated based on the right
characteristic line and the characteristic curve of the centrifugal compressors at the
maximum rotational speed.
(4) Right boundary node
According to the left characteristic line as the equation (8) and the right
boundary conditions, the variations of the unknown parameters of the right boundary
can be calculated. The control mode and constraints of the right boundary are as
follows:
(a) The right boundary is usually connected to the inlet of the compressor
stations or gas customers. The flow rate control is usually adopted as boundary
conditions, then pressure variations of the right boundary can be calculated according
to the left characteristic line and flow rate of the right boundary.
(b) Due to the constraints of the customers' contract pressure and the minimum
required inlet pressure of the compressor station (The operating efficiency is higher
for compressors when the ratio of the out pressure and inlet pressure is between 1.4

14
and 1.6), the right boundary is usually constrained by the minimum operational
pressure. If the pressure calculated through step (a) is lower than the minimum
operational pressure, the boundary condition is converted to the minimum pressure
control, and the flow rate variations of the right boundary can be calculated according
to the left characteristic line and the minimum pressure of the right boundary.
(c) If the flow rate calculated in step (b) is lower than 0, it is necessary to switch
the boundary condition to flow rate control (equal to 0) in order to prevent backflow.
And the pressure variations of the right boundary can be calculated according to the
left characteristic line and the flow rate (equal to 0) of the right boundary.

3.2 The calculation of pressure drop rate

As shown in Fig. 3, pressure collection devices are equipped at each block valve
rooms. After the pipeline leaks, the pressure at each block valve room will decrease.
When the pressure drop rate at the block valve room of the gas pipeline is greater than
0.15 MPa/min (Zuo et al., 2015; Phan et al., 2012;), the block valve room will send an
alarm signal. And if the alarm signal lasts more than 120s, then the block valve will be
automatically closed. The calculation method of the pressure drop rate in this paper is
the method recommended by the Line Guard 2100 system.

15
Fig. 3. Pressure variations at block valve rooms after leakage.

The pressure signal is extracted every 5 second from the SCADA system.
Assuming that the pressure of a block valve room at the 5th, 10th, ..., 80th second are

+, , … and +, respectively, then the average pressure of the block valve room at
the 20th and 80th second is as follows:
1/ 2/ 3/ 4
'-$ = (18)
3

13 / 14 / 15 / 16
'-$ 4 = (19)
3

Then the average value of the pressure drop rate at the 80s block valve room is:
1 9 13 / 2 9 14 /: 3 9 15 ;/ 4 9 16
#78 = '-$ '-$ 4 = 3
(20)

3.3 The calculation of the leakage orifice

Pressure collection devices are generally installed in each block valve room and
compressor station of the gas transmission pipeline. Assuming an equivalent leakage
orifice, compare the pressure data obtained from the SCADA system (pressure data
from the alarm of pressure drop rate to the closure of the block valve) to the pressure
data simulated based on the assumed equivalent leakage orifice. If the error between
these two data is within the allowable range, the actual leakage orifice is equal to the
assumed equivalent leakage orifice, otherwise the equivalent leakage orifice can be
calculated by iterations. As shown in equation (21), ERR is adopted as the error
indicator between simulation data and collection data.
'AB CDE FG 9CHE FG 'AB CDJ FG 9CHJ FG
<## = <##= + <##? = ∑KL3 I
+ I
(21)

Where <## is the total error between simulation results and collection data,
MPa; <##= is the error of the upstream block valve between simulation results and
collection data, MPa; <##? is the error of the downstream block valve between
simulation results and collection data, MPa; BM is the real-time pressure data
collected from the upstream block valve of the leakage pipe segment, MPa; NM is the

16
real-time pressure data collected from the downstream block valve of the leakage pipe
segment, MPa; BO is the real-time pressure data of the upstream block valve of the
leakage pipe segment calculated by simulation model, MPa; NO is the real-time
pressure data of the downstream block valve of the leakage pipe segment calculated
by simulation model, MPa.

The calculation method of the leakage orifice is as follows:


(1) Suppose the initial leakage orifice: !+ = 0, ! = 8 and ! = !+ + ! .
(2) Based on the characteristic line method (CLM), the simulation model of
transient leakage of gas pipelines is established based on the governing equations of
gas pipeline flow, boundary conditions and constraints. Then simulate pressure
variations at the upstream and downstream block valves of the leakage point for three
scenarios with equivalent leakage orifice !+ , ! and ! respectively based on
transient hydraulic simulation, then corresponding <##+ , <## and <## can also
be obtained based on equivalent leakage orifice !+ , ! and ! .
(3) If R <##+ <## < 109 and R <## <## < 109 , then the
equivalent leakage orifice is ! and iteration ended. Otherwise, go to step (4).
(4) If the pressure obtained by transient hydraulic simulation based on equivalent
leakage orifice ! is higher than operational data collected by the SCADA system,
then ! = ! , ! = !+ + ! /2 and go to step (2). Otherwise, !+ = ! and
! = !+ + ! /2 and go to step (2).

3.4 The calculation of the transient leakage flow rate

Based on the pressure variations at upstream and downstream block valves


obtained by transient hydraulic simulation, the pressure drop rate variations of the
upstream and downstream block valves are calculated by using the method
recommended by Line Guard 2100. The closure time of the upstream and downstream
block valves are calculated based on pressure drop rate variations and practical
regulations. According to the equivalent leakage orifice ! , and the time when the
17
leakage occurred and block valve are automatically closed calculated by step (5), the
leakage flow rate variations are calculated separately for two stages. The first process
is the process from the beginning of the leakage of the pipe segment to the closure of
a block valve in the upstream or downstream of the leaking pipe segment. The second
process is from the beginning of the closure of a block valve in the upstream or
downstream of the leaking pipe segment to the closure of block valves in the upstream
and downstream of the leaking pipe segment. The reason why the leakage flow rates
after both cut-off valves are closed are not calculated is that emergency venting
processes are usually adopted to release the gas in the pipeline as soon as possible, so
as to repair the failed pipe segment. To avoid excessive noise and excessive vibration
during the venting process, the opening of valves is usually controlled by dispatchers
based on their experience. The characteristic line method (Section 3.1) is adopted to
calculate the variations of leakage flow rate during these two stages. The initial
conditions can be simulated according to the operational plan of the gas pipeline in
the normal steady state. The boundary conditions and legal or physical constraint for
the transient leakage rate calculation are shown in Table 1.

Table 1 Boundary conditions and constraints for the transient leakage rate calculation.
Unit Boundary condition Legal or physical constraints

Flow rate, rotational speed,

Compressor station Outlet pressure minimum inlet pressure,

maximum outlet pressure

Gas customer Flow rate Contract delivery pressure

Leakage diameter
Leakage point /
Atmospheric pressure

Block valve room Flow rate (after closure) /

18
4. Case study

4.1 Description of the case-study gas pipeline

Fig. 4 shows the topology and configurations of the tested gas pipeline model
which is based on a real gas pipeline system in China. The designed pressure of the
gas pipeline is 10 MPa, the diameter and the wall thickness are 1016 mm and 17.4
mm respectively. The total length between these two compressor stations is 160km.
There are four centrifugal compressors in CS1, and two centrifugal compressors in
CS2. The gas pipeline system often operates under high pressure to reduce energy
consumption, so the control mode for each compressor station is outlet setpoint
pressure which is close to the designed pressure. The outlet setpoint pressure is 9.7
MPa since a certain margin should be left to ensure operational safety. If the outlet
pressure of the compressor station cannot reach 9.7 MPa even at the maximum
rotational speed, then the boundary condition for the compressor station is converted
to maximum rotate speed to ensure the highest outlet pressure as much as possible.
The minimum required inlet pressure for compressor station CS2 is 5.5MPa. The
transmission flow rate of the gas pipeline is 50 mcm/d.

Fig. 4 The topology and configurations of the tested gas pipeline.

Assuming that a leakage scenario with an equivalent leakage orifice 400mm


occurs at the 80km downstream from CS1 compressor station. The time that the
leakage occurs is the 30th minute. Because it is hard to obtain the leakage data from

19
the operational gas pipeline because of privacy policy, in order to obtain operational
data close to the actual scenario, the international commercial software TGNET is
adopted to simulate the leakage scenario in this paper, and the pressure variations and
pressure drop rate variations at block valve rooms BV4 and BV5 are obtained as
shown in Fig. 5.

Pressure (BV4) ROD (BV4)


9.0 ROD (BV5)
1.0
Pressure (BV5)
Threshold ROD

8.5
0.8

8.0
Pressure (MPa)

0.6

ROD (MPa/min)
7.5

0.4
7.0

6.5 0.2

6.0
0.0

5.5
1600 1700 1800 1900 2000 2100 2200 2300 2400
Time (s)

Fig. 5 Pressure and pressure drop rate variations of BV4 and BV5 under the specified
leakage scenario.

4.2 Leakage orifice and leakage flow rate calculation

Based on data in Fig. 5 and the control logic of block valves, the pressure drop
rate of the block valve BV5 and BV4 are detected to be greater than 0.15MPa/min at
the 1820s and 1890s respectively, and the block valve BV5 and BV4 are fully closed
automatically at the 1940s and 2010s respectively after the pressure drop rate exceeds
the threshold for 120s.
Assuming that the location of the leakage location can be accurately determined
by existing methods, such as the negative pressure wave method or the acoustic wave
method, then the equivalent leakage orifice can be calculated iteratively based on the

20
pressure variations collected on the block valve room by the SCADA system. As
shown in Fig. 6, the equivalent leakage orifice can be calculated through 9 iterations.
The equivalent leakage orifice obtained by iterative calculation is 398.9mm, the <##=
and <##? are 0.019 MPa and 0.016 MPa respectively under this equivalent leakage
orifice.

0.7 550

0.6 500

Leakage hole diameter (mm)


0.5
450

0.4
400
ERR3

0.3
350

0.2
300

0.1
250

0.0
200
0 2 4 6 8 10
Number of iterations

Fig. 6 Errors and number of iterations for calculating the leakage orifice.

According to the leakage orifice obtained above and the closure time of upstream
and downstream block valves of the leakage point, assuming that the closure action of
block valve is completed instantly, then the leakage flow rate variations during these
two stages are calculated as shown in Fig. 7. At the beginning of leakage process, the
operation pressure in the gas pipeline is high, so the leakage flow rate is higher. As the
leakage process continues, the operation pressure and the leakage flow rate will
decrease gradually, and the leakage rate will decrease further after the closure of one
block valve. Comparisons have been made between the simulations results by
TGNET and calculation results by CLM. The time step selected by TGNET
simulation is automatically calculated by this software according to the simulation
error in each iteration, but the CLM method adopts a constant time step in this paper,
21
and the relative error of the accumulative leakage flow rate variations by these two
methods is within 1.109%. The line pack after these two processes are calculated by
equation (22). After these two processes, some practical venting processes will be
adopted by dispatchers to release the gas in the pipeline as soon as possible. The error
of accumulative leakage flow rate calculation based on transient flow and steady flow
is 39.593%, so it is necessary to consider the transient flow after leakage to calculate
the leakage flow rate of the high-pressure gas pipeline.
[ [ \ ]
TUVW X Y = Z ! ! =Z ! ! = 1.289 × 10, e (22)
3 3 ^_ `a

4000
Calculation results by CLM
Start leaking
Simulation results by TGNET
3500 Calculation results by steady state model
Leakage flow rate (Nm3/s)

3000
Closure of BV5

2500

2000
Closure of BV4

1500

1000

500
1800 1850 1900 1950 2000
Time (s)

Fig. 7 Comparisons of two-stage leakage flow rate variations by CLM, TGNET and
steady state model.

4.3 The minimum detectable leakage orifice

At present, the closure threshold of block valves is set based on the two
parameters (larger than 0.15 MPa/min and last for more than 120s) in the gas
transmission trunk pipeline of PetroChina. There is a critical leakage orifice at

22
different locations of the gas transmission pipeline, the block valves at the upstream
and downstream of the leakage point can automatically alarm and be closed only
when the actual equivalent leakage orifice is larger than the critical equivalent leakage
orifice.
In this paper, the calculation of the minimum detectable equivalent leakage
orifice between BV4 and BV5 block valves are carried out. As shown in Fig. 8, the
closer to the downstream block valve BV5, the larger the minimum detectable leakage
orifice. The minimum detectable leakage orifices at the upstream and downstream of
the pipe segment between block valves BV4 and BV5 are about 300mm and 440mm
respectively.
If the leakage point is located upstream of the pipe segment between block
valves BV4 and BV5, the BV4 block valve can easily detect the abnormal pressure
drop rate because of the smaller attenuation of the pressure wave, and the minimum
detectable leak hole diameter depends on the pressure drop rate at the block valve
BV5. Due to the high operating pressure at the upstream of the gas pipeline, the
negative pressure wave which is generated because of the leakage occurred at the
upstream of the gas pipe segment is larger, so the minimum detectable leakage orifice
is relatively small at the upstream of the pipe segment. On the contrary, if the leakage
point is located downstream of the pipe segment between block valves BV4 and BV5,
the block valve BV5 can easily detect the abnormal pressure drop rate, and the
minimum detectable leak hole diameter depends on the pressure drop rate at the block
valve BV4. The negative pressure wave generated because of the leakage occurred at
the downstream of the pipe segment is smaller, and the propagation direction of the
pressure wave is opposite to the gas flow direction, which to some extent prevents the
propagation of pressure wave from the leakage point to the block valve BV4. As a
result, the minimum detectable leakage orifice is relatively larger at the downstream
of the pipe segment.

23
700

Minimum alarmable leakage hole diameter (mm)


600

500

400

300

200

100
0 5 10 15 20
Distance from BV4 (km)

Fig. 8 The minimum detectable leakage orifice at different locations between BV4
and BV5

4.4 Sensitivity analysis of leakage location on leakage flow rate

Because the frequency of data collection of the SCADA system on the block
valve room is relatively slow, it is difficult to accurately calculate the actual leakage
position of the gas transmission pipeline based on existing methods, such as the
acoustic wave method and the negative pressure wave method (Jin et al., 2014; Li et
al., 2019;). Therefore, it is necessary to study the relationship between the error of the
leakage flow rate and the error of the leakage position.
According to different leakage position in the first column of Table 2 and the
collected pressure data of BV4 and BV5, the leakage orifices are calculated based on
methods proposed in Section 3.3. It can be seen that the more the calculated leakage
position deviates from the actual leakage position, the more the calculated leakage
orifice and leakage flow rate will deviate from the actual leakage orifice and leakage
flow rate. If the leakage position is located upstream of the actual leakage point, the

24
calculated leakage orifice and the accumulative leakage flow rate will be larger than
the actual leakage orifice and the accumulative leakage flow rate. On the contrary, if
the leakage position is located downstream of the actual leakage point, the calculated
leakage orifice and the accumulative leakage flow rate will be smaller than the actual
leakage orifice the actual accumulative leakage flow rate. So, if the calculation error
of the accumulative leakage flow rate needs to be controlled within ∓15%, the
precondition is that the calculation error of the leakage position needs to be controlled
within ∓3km.

Table 2 Sensitivity analysis of leakage location on leakage orifice and leakage flow
rate.

Leakage location Leakage orifice after Errors of leakage Errors of accumulative


(km) iterations (mm) orifice (%) leakage flow rate (%)

76 442.5 28.4 17.4


77 430.6 20.9 12.4
78 420.7 13.8 8.1
79 408.8 8.4 3.0
80 398.9 3.6 -1.3
81 388.9 4.0 -5.7
82 377.0 8.2 -10.7
83 373.1 12.9 -12.8

5. Conclusions and future work

This paper presents a novel method for transient leakage flow rate calculation of
gas pipelines. The transient leakage flow rate variations of the gas pipeline are
calculated based on the pressure data collected at the upstream and downstream block
valve rooms from the leakage point. The main conclusions are as follows:
(1) It is necessary to consider the transient flow after leakage to calculate the

25
leakage flow rate of the gas pipeline. The error of accumulative leakage flow rate
calculation based on transient flow and steady flow is 39.593%.
(2) The minimum detectable leakage orifices at the upstream and downstream of
the pipe segment between block valves BV4 and BV5 are about 300mm and 440mm
respectively. The closer to the downstream block valve, the larger the minimum
detectable leakage orifice.
(3) The more the calculated leakage position deviates from the actual leakage
position, the more the calculated leakage orifice and leakage flow rate will deviate
from the actual leakage orifice and leakage flow rate. If the leakage position is located
upstream of the actual leakage point, the calculated leakage orifice and the
accumulative leakage flow rate will be larger than the actual leakage orifice and the
accumulative leakage flow rate, and vice versa.
(4) If the calculation error of the accumulative leakage flow rate needs to be
controlled within ∓15%, the precondition is that the calculation error of the leakage
position needs to be controlled within ∓3km.
The accuracy of the leakage flow rate calculation depends on the accuracy of the
leak position calculation. In the case of low frequency of data collection, it is
necessary to find a more robust algorithm to calculate the leakage position of the gas
pipeline. Combined with the practical operations and venting processes of the gas
pipeline, the leakage flow rate variations from the process of the closure of the
upstream and downstream block valves to the complete venting of the natural gas in
the pipeline also need to be calculated in the future.

Acknowledgement

The authors acknowledge the financial support from National Key Research and
Development Plan of China [2016YFC0801500]. The Pipeline Studio (TGNET)
software is used in this paper, thanks to the ESI company. The authors are also
thankful to all the reviewers for their insights and constructive comments.

26
References

Ali, Saleem, 2014. Greening Natural Gas Delivery–LNG versus Pipelines. National Geographic.

Bin C., Zhongliang W., 2010. Nonisothermal and unsteady state leakage model for gas pipelines.

Oil Gas Storage Transp., 29(1): 36-37, (in Chinese).

Catlin C A, Lea C J, Bilo M, et al., 1998. Computational fluid dynamic modelling of natural gas

releases from high-pressure pipelines subject to guillotine, tear, or puncture failures. Pipes

Pipelines Int., 43(6): 12-27.

Chunyong H., Yuhua D., Datao Y., et al., 2004. Estimation of accidental gas release flow rate in

long transmission pipelines. Acta Pet. Sin., 25(1): 101-105 (in Chinese).

Crowl D. A., Louvar J. F., 2011, Chemical process safety: Fundamentals with applications. New

Jersey, Prentice Hall.

Cuiwei L., Yuxing L., Liping F., et al., 2017. Leakage monitoring research and design for natural

gas pipelines based on dynamic pressure waves, J. Process Control, 50: 66-76.

Daqing W., Chunyong H., Huilin G., et al., 2008. Estimation of accidental gas release flow rate in

long transmission pipelines. Nat. Gas. Ind., 28(1): 116-118 (in Chinese).

El Hachemi Mazighi, A., 2003. An examination of the international natural gas trade. OPEC Rev.,

27(4), 313-329.

Fatoorehchi, H., Alidadi, M., Rach, R., et al., 2019. Theoretical and Experimental Investigation of

Thermal Dynamics of Steinhart–Hart Negative Temperature Coefficient Thermistors. J HEAT.

TRANS. T. ASME. 141(7): 072003.

Fatoorehchi, H., Rach, R., Sakhaeinia, H. (2017). Explicit Frost-Kalkwarf type equations for

calculation of vapour pressure of liquids from triple to critical point by the Adomian

decomposition method. CAN. J. CHEM. ENG., 95(11), 2199-2208

Furen Z., Pai X., 2009. Numerical simulation of unsteady leakage and diffusion of gas pipeline. J.

Harbin Inst. Technol., 41(5): 151-154, (in Chinese).

Hao J., Laibin Z., Wei L., et al., 2014. Integrated leakage detection and localization model for gas

pipelines based on the acoustic wave method, J. Loss Prev. Process Ind., 27, 2014: 74-88,

27
Hasan B., Mahmut E., Vedat A., et al., 2004. Numerical solution of a viscous incompressible flow

problem through an orifice by Adomian decomposition method. Appl. Math. Comput. 153(3):

733-741. https://doi.org/10.1016/S0096-3003(03)00667-2

Li Y., Yao G., 2009. The design and management of gas transmission pipeline. China University of

Petroleum Press, Dongying (in Chinese).

Jo, Y. D., Ahn, B. J. 2003. A simple model for the release rate of hazardous gas from a hole on

high-pressure pipelines. J. Hazard. Mater., 97(1-3), 31-46.

Juan L., Qiang Z., Zhihong Q., et al., 2019. A novel location algorithm for pipeline leakage based

on the attenuation of negative pressure wave, Process Saf. Environ. Prot., 123: 309-316,

Levenspiel, O., 2014, Engineering flow and heat exchange. Springer.

Lili Z, Fangmei J., Bin J., et al., 2015. Value setting for the rate of pressure drop of automatic

line-break control valves in natural gas pipelines J. Nat. Gas Sci. Eng., 26: 803-809.

Moloudi R., Esfahani J. A., 2014. Modeling of gas release following pipeline rupture: Proposing

non-dimensional correlation. J. Loss Prev. Process Ind., 32: 207-217.

Montiel H., Vıĺ chez J. A., Casal J., et al. 1998. Mathematical modelling of accidental gas releases.

J. Hazard. Mater., 59(2-3), 211-233.

Olorunmaiye J., A., Imide, N. E., 1993. Computation of natural gas pipeline rupture problems

using the method of characteristics. J. Hazard. Mater., 34(1), 81-98.

Phan, T.T., Sawin, A.J., 2012. Automatic line break control valve case study. Proc., 43rd Annual

Meeting of the Pipeline Simulation Interest Group (PSIG). Pipeline Simulation Interest Group,

Houston, TX.

Qingqing X., Laibin Z., Wei L., 2013. Acoustic detection technology for gas pipeline leakage,

Process Saf. Environ. Prot., 91(4): 253-261.

Rui X., Qunfang H., Jie L., 2019. Leak detection of gas pipelines using acoustic signals based on

wavelet transform and Support Vector Machine, Measurement, 146: 479-489.

Singh, M., Patel, A., & Bajargaan, R. (2016). Study of a one-dimensional unsteady gas dynamic

problem by Adomain's decomposition method. Int. J. Appl. Math., 29(6), 775-794.

Stevens, P., 2009. Transit troubles. Pipelines as a source of conflict. Chatam House, London.

Ulvestad, M., Overland, I., 2012. Natural gas and CO2 price variation: impact on the relative

28
cost-efficiency of LNG and pipelines. Int. J. Environ. Sci., 69(3), 407-426.

Wei L., Laibin Z., Qingqing X., et al., 2013. Gas pipeline leakage detection based on acoustic

technology, Eng. Failure Anal., 31: 1-7.

Woodward J L, Mudan K S., 1991. Liquid and gas discharge rates through holes in process vessels.

J. Loss Prev. Process Ind., 4(3): 161-165.

29
Table 1 Boundary conditions and constraints for the transient leakage rate calculation.
Unit Boundary condition Legal or physical constraints

Flow rate, rotational speed,

Compressor station Outlet pressure minimum inlet pressure,

maximum outlet pressure

Gas customer Flow rate Contract delivery pressure

Leakage diameter
Leakage point /
Atmospheric pressure

Block valve room Flow rate (after closure) /


Table 2 Sensitivity analysis of leakage location on leakage orifice and leakage flow
rate.
Leakage location Leakage orifice after Errors of leakage Errors of accumulative
(km) iteration (mm) orifice (%) leakage flow rate (%)
76 442.5 28.4 17.4
77 430.6 20.9 12.4
78 420.7 13.8 8.1
79 408.8 8.4 3.0
80 398.9 3.6 -1.3
81 388.9 4.0 -5.7
82 377.0 8.2 -10.7
83 373.1 12.9 -12.8
Fig. 1. Framework of the developed methodology.
Fig.2. Hydraulic simulation of leakage scenarios based on CLM.
Fig. 3. Pressure variations at block valve rooms after leakage.
Fig. 4 The topology and configurations of the tested gas pipeline.
Pressure (BV4) ROD (BV4)
9.0 ROD (BV5)
1.0
Pressure (BV5)
Threshold ROD

8.5
0.8

8.0
Pressure (MPa)

0.6

ROD (MPa/min)
7.5

0.4
7.0

6.5 0.2

6.0
0.0

5.5
1600 1700 1800 1900 2000 2100 2200 2300 2400
Time (s)

Fig. 5 Pressure and pressure drop rate variations of BV4 and BV5 under the specified
leakage scenario.
0.7 550

0.6 500

Leakage hole diameter (mm)


0.5
450

0.4
400
ERR3

0.3
350

0.2
300

0.1
250

0.0
200
0 2 4 6 8 10
Number of iterations

Fig. 6 Errors and number of iterations for calculating the leakage orifice.
4000
Calculation results by CLM
Start leaking
Simulation results by TGNET
3500 Calculation results by steady state model
Leakage flow rate (Nm3/s)
3000
Closure of BV5

2500

2000
Closure of BV4

1500

1000

500
1800 1850 1900 1950 2000
Time (s)

Fig. 7 Comparisons of two-stage leakage flow rate variations by CLM, TGNET and
steady state model.
700

Minimum alarmable leakage hole diameter (mm)


600

500

400

300

200

100
0 5 10 15 20
Distance from BV4 (km)

Fig. 8 The minimum detectable leakage orifice at different locations between BV4
and BV5
1. The leakage orifice is calculated by iterative method based on collected

pressure data at block valves.

2. The leakage process is divided into two stages according to the time

when the leakage occurred and two block valves were automatically

closed.

3. The leakage flow rate at each stage is calculated based on the

characteristic line method.

4. The minimum detectable leakage orifice is calculated and analyzed.

5. Sensitivity analyses of leakage location on leakage flow rate

calculation are analyzed in detail.


CRediT authorship contribution statement
Qian Chen: Methodology, Software, Conceptualization, Writing-Original Draft,
Writing-review & editing.
Xiaokai Xing: Methodology, Conceptualization, Funding acquisition, Project
administration, supervision.
Can Jin: Writing - review & editing.
Lili Zuo: Methodology, Software, Supervision.
Jianhang Wu: Writing - review & editing.
Weishuo Wang: Methodology.
Acknowledgement

The authors acknowledge the financial support from National Key Research and
Development Plan of China [2016YFC0801500]. The Pipeline Studio (TGNET)
software is used in this paper, thanks to the ESI company. The authors are also
thankful to all the reviewers for their insights and constructive comments.

You might also like