Isothermal Transient Numerical Model
Isothermal Transient Numerical Model
Article
An Efficiently Decoupled Implicit Method for
Complex Natural Gas Pipeline Network Simulation
Peng Wang 1 , Shangmin Ao 1 , Bo Yu 1, *, Dongxu Han 1 and Yue Xiang 2
1 School of Mechanical Engineering, Beijing Key Laboratory of Pipeline Critical Technology and Equipment
for Deepwater Oil & Gas Development, Beijing Institute of Petrochemical Technology, Beijing 102617, China;
[email protected] (P.W.); [email protected] (S.A.); [email protected] (D.H.)
2 Research Center of Cloud Simulation and Intelligent Decision-making, Tsinghua Sichuan Energy Internet
Research Institute, Chengdu 610042, China; [email protected]
* Correspondence: [email protected]; Tel.: +86-01-8129-2805
Received: 1 March 2019; Accepted: 18 April 2019; Published: 22 April 2019
Abstract: The simulation of a natural gas pipeline network allows us to predict the behavior of a
gas network system under different conditions. Such predictions can be effectively used to guide
decisions regarding the design and operation of the real system. The simulation is generally associated
with a high computational cost since the pipeline network is becoming more and more complex,
as well as large-scale. In our previous study, the Decoupled Implicit Method for Efficient Network
Simulation (DIMENS) method was proposed based on the ‘Divide-and-Conquer Approach’ ideal,
and its computational speed was obviously high. However, only continuity/momentum Equations of
the simple pipeline network composed of pipelines were studied in our previous work. In this paper,
the DIMENS method is extended to the continuity/momentum and energy Equations coupled with
the complex pipeline network, which includes pipelines and non-pipeline components. The extended
DIMENS method can be used to solve more complex engineering problems than before. To extend
the DIMENS method, two key issues are addressed in this paper. One is that the non-pipeline
components are appropriately solved as the multi-component interconnection nodes; the other is that
the procedures of solving the energy Equation are designed based on the gas flow direction in the
pipeline. To validate the accuracy and efficiency of the present method, an example of a complex
pipeline network is provided. From the result, it can be concluded that the accuracy of the proposed
method is equivalent to that of the Stoner Pipeline Simulator (SPS), which includes commercially
available simulation core codes, while the efficiency of the present method is over two times higher
than that of the SPS.
Keywords: natural gas; pipeline network; continuity/momentum and energy equations coupled;
efficient simulation
1. Introduction
As a high quality and clean fossil fuel, natural gas plays an important role in global industry
and economy [1]. Pipelines are the primary means by which the natural gas is transported. As more
and more cities are using natural gas as the main energy source, the pipeline network is becoming
extraordinarily complex. The characteristic of a complex topology has created many challenges
for the design, monitoring, and operating of the pipeline network. The simulation of the natural
gas pipeline network allows us to predict the behavior of a gas network system under different
conditions. By matching the simulator's output with measured information from Supervisory Control
and Data Administration (SCADA) systems, the gas pipelines can be estimated in real-time [2],
the historical conditions can be reviewed, and the unexpected transient conditions can be analyzed [3].
Such predictions and analyses can be effectively used to guide decisions regarding the design and
operation of the real pipeline network system. For example, Gssco improved his pipeline capacity
with the help of a commercial tool known as the Pipeline Modeling System (PMS) [4].
Depending on the gas flow characteristics in the network system, there are two states in which the
simulation can be: steady simulation (static simulation) and unsteady simulation (transient simulation).
Steady simulation does not take into account the gas flow characteristics’ variations over time. The goal
of steady simulation is usually to compute the nodes’ pressures, the nodes’ loads, and the pipes’ flow
rates for the network design. The pressures at the nodes and the flow rates in the pipes must satisfy the
general flow equations; the lodes’ loads must fulfill the first Kirchhoff’s law or Node formulation and
the pressure drop around any closed loop must fulfill the second Kirchhoff’s law or Loop formulation.
The steady simulation was explained in detail by Osiadacz [5], and interested readers can refer to
it. Unsteady simulation considers the facts that gas flow characteristics are mainly functions of time.
In fact, the gas flow in a pipeline is actually a transient process, while a steady state is rare in practice.
Thus, unsteady simulation is more practical for the operations of a real pipeline network. However,
the mathematical model of unsteady simulation is a system of partial differential equations (PDEs) of
mass conservation, momentum conservation, and energy conservation. The mathematical model is
usually solved by numerical methods [6–15], and the frequently used numerical methods are method of
characteristics (MOC), finite difference methods (FDM), and finite element methods (FEM). MOC firstly
reduces PDEs to a family of ordinary differential equations (ODEs) along the characteristic curves,
and the ODEs are then solved along the characteristic curves to obtain the flow and thermodynamic
parameters. FDM firstly divides the long pipeline into many short sections, then converts PDEs
into a system of difference Equations (DEs) on these small sections, and lastly solves DEs by matrix
algebra techniques. FEM firstly divides the entire pipeline into many small sections that are so-called
finite elements, then uses variational methods to derive the simple equations for these finite elements,
and lastly solves the larger system of simple equations by minimizing an associated error function.
Thorley and Tiley [16] have provided an excellent literature review of these methods, and interested
readers can refer to it.
Among these methods, the implicit finite difference method is one of the most widely applied
methods because its time step is not restricted by the stability criterion [6,17–19]. This means that the
time step of the implicit finite difference method can be very large, which is very useful for simulating
long-term transient flow in a natural gas pipeline. However, in the implicit finite difference method,
one system of large-scale nonlinear discretized Equations needs to be solved [20]. When working
with large-scale pipeline networks, its efficiency could be low and unsatisfactory, especially on a
personal computer.
To improve the computational speed of the implicit finite difference method, a series of research
projects have been carried out. Kiuchi [17,18] and Wylie et al. [19] directly ignored the convective inertia
term in the governing Equations of a pipeline to avoid nonlinear equations. However, this process
could reduce the accuracy of simulation [21]. Luskin [22] proposed a linearized method where the
nonlinear governing equations were linearized about the previous time step based on the Taylor
expansion. Zheng et al. [23] found that the linearized method could improve the computational speed
by over five times. Barley [24] and Helgaker and Ytrehus [25] put forward a decoupled solution strategy,
in which the continuity/momentum equations (flow equations) and energy equation (thermodynamics
equation) were solved alternatively. This strategy could further increase the computational speed
by about 20%. Wang et al. [26] found that the form of flow equations, which took the density and
velocity as the solving variables, was the most efficient form. The computational speed was further
improved by 50%. Many researchers, such as Wylie et al. [19] and Stoner [27], have recommended the
sparse matrix technique to efficiently solve the large-scale discretized equations of network simulation.
Madoliat et al. [13] proposed a novel approach based on intelligent algorithms, such as particle swarm
optimization (PSO), for dynamic simulation of a gas pipeline network. These studies have improved
the computational speed of natural gas pipeline network simulation to a considerable extent.
Energies 2019, 12, 1516 3 of 28
However, in the above studies, all pipelines in the network must be solved simultaneously, and one
system of large-scale equations inevitably has to be solved. It is well-known that the computational
speed of small-scale equations is faster than that of large-scale equations. Therefore, dividing the
network into several pipelines and then solving them one by one is an effective way to further
improve the computational speed of natural gas pipeline network simulation. This is the idea of the
‘Divide-and-Conquer Approach’. Based on this idea, a fast method for the flow simulation of natural
gas pipeline networks was proposed in our previous study [28], called the Decoupled Implicit Method
for Efficient Network Simulation (DIMENS). In the DIMENS method, the flow equations of all the
multi-pipeline interconnection nodes were firstly solved, and the flow parameters such as pressure
and flow rate were known; the pipeline network was then divided into several independent pipelines,
and the pipelines were efficiently solved one by one. Thus, this method is more efficient than the
commercially available simulation core codes of Stoner Pipeline Simulator (SPS), whose computational
speed can represent the highest level in the world.
In our previous work [28], the gas flow was considered isothermal, and the pipeline network was
only composed of pipelines. Thus, the DIMENS method was only implemented in flow equations of
the simple pipeline network. However, in practical engineering problems, the pipeline network is
generally very complex, which includes not only pipelines, but also non-pipeline components, such as
compressors, valves, supplies, and demands [12]. What is more, many researchers [24,25,29,30] have
shown that the thermodynamic parameters have a major impact on the flow parameters of a pipeline
network, and the effect of treating the gas in a non-isothermal manner was extremely necessary for
pipeline flow calculation accuracies.
To overcome the above issue, the DIMENS method is extended to the flow and
thermodynamic-coupled simulation of the complex pipeline network in this paper. The layout
of this paper is as follows. First, the mathematical model of the pipeline network and its discretization
is introduced. Second, the main idea of the DIMENS method is reviewed. Third, the implementation
process of the extended DIMENS method is given, and the solution procedures of the thermodynamic
equations are elaborated. Finally, a numerical case of the complex pipeline network is designed to test
the performance of the present method.
∂U ∂U
+B· = F, (1)
∂t ∂x
U B F
∂p
1 ∂p ∂T
"
p
#
0 A ∂ρ
∂T ρ ∂t
T
m2 ∂ρ m2 ∂ρ ∂T
m 2m
λ m|m|
2 dAρ − Aρg sin θ +
[A − ] −
Aρ2 ∂p T Aρ2 ∂T p ∂x
Aρ
3
T w 1 ∂p ∂w λ ρ|w| 4K(T−Ta )
ρcv [−T ( ∂T )ρ ∂x + 2 d − d ]
It should be noted that natural gas is a compressible gas, and its thermodynamic properties
(pressure, volume, temperature) are property relations. An equation of state which would express
the density in terms of pressure and temperature needs to be close to Equation (1). Several different
equations of state, including SRK, PR, BWRS, AGA-8, GERG 88, and GERG 2004, are applied in the
industry. The sensitivity of the selection of the equation of state for pipeline gas flow models was
investigated by Chaczykowski [32]. In this paper, the BWRS equation of state [20,33] is used, and the
BWRS equation is formulated as
C0 D0 E
p = ρRT + (B0 RT − A0 − T2
+
T3
− T04 )ρ2 + (bRT − a − Td )ρ3
cρ3 (2)
+α(a + Td ) ρ6 + T2
(1 + γρ2 ) exp(−γρ2 )
In total, it contains 11 coefficients. Values and mixing rules can be found in the literature [20,33].
Mass conservation: X X
min = mout , (9)
Equality of pressure:
pin,1 = pin,2 · · · = pout,1 = pout,2 · · · , (10)
Flow rate:
m = m(t), (13)
Temperature:
T = T (t), (14)
2.2. Discretization
The pipeline model, that is Equation (1), is a nonlinear partial differential equation. It can be linearized
about the previous time step based on the Taylor expansion, as shown below [12,17,18,23,24,26]:
∂U ∂U
+B· + G · (U − U) = F + S · (U − U), (15)
∂t ∂x
n
P ∂B ∂ul ∂Fi
where, [G]i,j = ( ∂u ) , [S]i,j = . The detailed expressions of G and S can be found in appendix
l=1
j i,l ∂x ∂u j
A. It should be noted that the bar ’’ above the matrixes B, G, F, S, and U represents the previous time
step, so B, G, F, S, and U are calculated by the results of the previous time step.
The pipeline is divided into N sections, and thus, there are N + 1 grid points. The ith section
is the section between the ith point and the (i + 1)th point. Figure 1 is the schematic diagram of the
pipeline grid.
Energies 2019, 12, x FOR PEER REVIEW 6 of 30
179
180 Figure 1. Grids
Figure1. Grids of
of the
the pipeline
pipeline
181 The flow equations of Equation (15) are discretized by the central difference scheme in the ith
182 section in Figure 1, and the discretized flow equations are obtained as Equation (16) [26,28,31]:
1 1 1 1 1 1
183 where, CEi I B (G S) ; DWi I B (G S) ;
2t x 2 2t x 2
Energies 2019, 12, 1516 6 of 28
179 The flow equations of Equation (15) are discretized by the central difference scheme in the ith
180 section in Figure 1, and the discretizedFigure
flow equations
1. Grids ofare
theobtained
pipeline as Equation (16) [26,28,31]:
Input
Interpolate
temperature
Solve thermodynamic
Equations
Yes
Output
192
193 Figure
Figure2. 2.The
Thedecoupled strategy.
decoupled strategy.
206
207 Figure3.3.Divide-and-conquer
Figure approachfor
Divide-and-conquer approach forthe
the natural
natural gasgas pipeline
pipeline network.
network.
224
225 Figure
Figure 4. Procedureofofthe
4. Procedure theDIMENS
DIMENS method
methodfor
forthe
thepipeline network.
pipeline network.
227 4.1. Implementation of the Flow Simulation of the Complex Pipeline Network
In our previous work [23], the DIMENS method was only implemented in flow simulation
of the simple pipeline network, which is only composed of pipelines. In the following section,
the DIMENS method is extended to the flow and thermodynamic-coupled simulation of the complex
pipeline network, which includes pipelines and non-pipeline components. Based on the flow and
thermodynamic-decoupled solution strategy [23–25], the DIMENS method is implemented in the flow
simulation and thermodynamic simulation, respectively.
Equations (19) and (20) are the supplemental equations used to solve the multi-component
interconnection nodes. These equations are the key to solving the multi-component interconnection nodes.
m1 = α m m m
1 p1 + β1 mN +1 + γ1 , (19)
p p p
pN+1 = αN+1 p1 + βN+1 mN+1 + γN+1 , (20)
Second
Second type
type pipeline
pipeline The
The temperature
temperature of
of starting
starting point.
point.
Second type
Second pipeline
type pipeline The
Thetemperature
temperatureof
ofstarting
startingpoint.
point.
Third
Third type
type pipeline
pipeline The
The temperature
temperature of
of terminal
terminal point.
point.
Third type
Third pipeline
type pipeline The
Thetemperature
temperatureof
ofterminal
terminalpoint.
point.
The
The temperature
temperature of
of both
both starting
starting and
and terminal
terminal
Fourth
Fourth type
Fourth pipeline
type
type pipeline
pipeline The
The temperature
temperature of both
of both starting
starting andand terminal
terminal points.
Fourth type pipeline points.
points.
points.
286
286
286 4.2.2.
4.2.2. Procedures
4.2.2. Procedures
Procedures
of
of the
of the
the
DIMENS
DIMENS
DIMENS
Method
Method
Method
in
in Thermodynamic
Thermodynamic SimulationSimulation
For the first type of pipeline, the in Thermodynamic
thermodynamic-discretized Simulation equation of the pipeline model,
287
287
287 According
Equation (17),
According to
According
to
isthe
a
to the above
closed
the above analysis
system.
above analysis
analysis of of
This the
means
of the pipeline
that
the pipeline flow
there
pipeline flow isstate,
no
flow state, the
free
state, the DIMENS
variable,
the DIMENS
DIMENS method
and the first
method
method
is extended
istype
is
to
of pipeline
extended
extended to
to
288
288
288 the
the thermodynamic
thermodynamic simulation
simulation of
of the
the complex
complex pipeline
pipeline,
pipeline network,
the thermodynamic simulation of the complex pipeline network, and the detailed procedures arethe
can be solved directly. For the second type of Equation
network, and
(17)
and the
is
the detailed
not a closed
detailed procedures
system
procedures are
until
are
289
289
289 presented
temperature
presented
presented
as
as follows.
as of the starting point is known. That is to say, the temperature of the starting point should
follows.
follows.
be chosen as the free variable. Similar to the second type of pipeline, the free variable of the third
290
290
290 Step
Step
Step
1:
type1: Classify
1: of pipeline
Classify
Classify
pipelines
is the temperature of the terminal point. For the fourth type of pipeline, until the
pipelines
pipelines
291 temperatures
Pipelines of the starting four
and terminal points are flow
both known, the temperature of the internal grid
291
291 Pipelines are
Pipelines are classified
classified as four types
as four types according
according to flow state,
to flow state, shown
shown in in Table
Table 2. 2.
point in theare classified
pipeline can as types
be obtained according
by solvingto Equation state, shown
(17). in
In otherTable
words,2. the fourth type of
292 pipeline
Step should be solved after the other three pipeline types. The solution requirements of these four
292
292 Step 2:
Step 2: Solve
2: Solve the
Solve the first
the first type
first type pipeline
type pipeline
pipeline
types of pipelines are also shown in Table 2.
293
293
293 The
The objective
The objective of
objective of this
of this step
this step is
step is to
is to obtain
to obtain the
obtain the thermodynamic
the thermodynamic parameters
thermodynamic parameters of
parameters of the
of the first
the first type
first type of
type of pipeline.
of pipeline.
pipeline.
294
294
294 For
For the
4.2.2.
the first
first type
Procedures
type of
of pipeline,
of the
pipeline, Equation
DIMENS
Equation (17)
Method
(17) isin
is closed, which
Thermodynamic
closed, which can
can be rewritten
Simulation
be rewritten
For the first type of pipeline, Equation (17) is closed, which can be rewritten as Equation (21). Then,
as
as Equation
Equation (21).
(21). Then,
Then,
295
295
295 Equation
Equation
Equation
(21)
(21) is
(21)
is solved
is solved
solved efficiently
efficiently by the
by the
the three
three diagonal
diagonal matrix
matrix algorithm
algorithm (TDMA)
(TDMA) [34],
[34], and
and the
the to
According to the efficiently
above analysis by three
of the diagonal
pipeline flow matrix
state, algorithm
the DIMENS (TDMA)
method [34], and the
is extended
296
296
296 temperature
temperature
temperature
values
values of
of
values of all
all
all points
points on
on
points on of
the
the first
first
thethe
first
type
type pipeline
pipeline
type pipeline
are
are obtained:
obtained:
arenetwork,
obtained:and the detailed procedures are
the thermodynamic simulation complex pipeline
CE
presented as follows.
CE111 DW
CE1 DW
DW111 T TT1111 H
HH111
UP T H
1 1
CE DW
Step 1: Classify pipelines
UP222 CE222 DW222
UP 2 CE 2 DW 2 T222 H 222
T 2 H 2
Pipelines areclassified as four types according to flow state,
shown ,,, in Table 2.
(21)
(21)
H (21)
typeUP
Step 2: Solve the first CE
CE
pipeline
N N DW
DW N
UPNNN CENNN DWNNN TNNN H NNN
UP TT N H N
UP CENNN111 T
UPNNN111 CE H
HN 1
UP N 1
CE N 1 TTNNNN1111 H NNN111
297
297
297 Step
Step 3:
Step 3: Pre-solve
3: Pre-solve the
Pre-solve the second
the second and
second and third
and third type
third type pipelines
type pipelines
pipelines
298
298
298 By
By taking
By taking the
taking the temperature
the temperature of
temperature of starting
of starting point
starting point T
point T1111 of
T of the
of the second
the second type
second type of
type of pipeline
of pipeline as
pipeline as the
as the free
the free variable,
free variable,
variable,
299 Equation (17) can be rewritten as Equation (22), and its general solution is Equation (23). Similar to
Energies 2019, 12, 1516 10 of 28
The objective of this step is to obtain the thermodynamic parameters of the first type of pipeline.
For the first type of pipeline, Equation (17) is closed, which can be rewritten as Equation (21). Then,
Equation (21) is solved efficiently by the three diagonal matrix algorithm (TDMA) [34], and the
temperature values of all points on the first type pipeline are obtained:
T1
CE1 DW1
H1
T2
UP2 CE2 DW2
H2
.. .. ..
= ..
,
. . . . (21)
UPN CEN DWN TN HN
UPN+1 CEN+1 TN+1 HN + 1
α1 γ1
1 0 1 0
α2 γ2
UP2 CE2 DW2 0 H2
.. ..
.. .. =
.. ..
,
. .
. . . . (22)
UPN CEN DWN αN γN HN
0
UPN+1 CEN+1 αN + 1 γN+1 0 HN + 1
α1 γ1
CE1 DW1 0 H1
α2 γ2
UP2 CE2 DW2 0 H2
.. ..
.. .. =
.. ..
,
. .
. . . . (24)
UPN CEN DWN αN γN HN
0
0 1 αN + 1 γN + 1 1 0
Equation (26) and Equation (27) are the supplemental equations used to solve the
multi-component interconnection nodes. These equations are the key to solving the multi-component
interconnection nodes.
TN+1 = T1 αN+1 + γN+1 , (26)
T1 = TN+1 α1 + γ1 , (27)
nodes are solved via the closed equations of the starting and terminal points of all components.
The complete system of closed equations is comprised of five parts: (1) thermodynamic equations
of the non-pipeline model, Equation (5) and Equation (6); (2) thermodynamic equation of the
multi-components interconnection node model, Equation (11); (3) thermodynamic equation of the
boundary condition, Equation (14); (4) the temperature values of the starting and terminal points of
the first type of pipeline that are solved in step 2; and (5) the supplemental equations obtained in
step 3, Equation (26) and Equation (27). The unknown variables of these closed equations are the
temperatures of the starting and terminal points of all components. The preconditioned CG algorithm
that is proposed in the paper [34] is adopted to solve the closed equations. For better understanding
how the equations of multi-component interconnection nodes are solved in thermodynamic equations,
a simple pipeline network is given as the example in Appendix C.
Step 5: Solve the internal points of the second and third pipelines
The fifth step of thermodynamic equations is similar to the third step of the flow equations.
The values of the free variables solved in step 4 are substituted into Equation (23) and Equation (25),
and the temperature value of the internal grid points of the first and second types of pipelines can be
easily obtained.
Step 6: Solve the fourth type pipeline
After step 5, the temperatures of the starting and terminal points of all pipelines are known. Then,
Equation (17) of the fourth type of pipeline is rewritten as Equation (28), and is efficiently solved by
the TDMA algorithm [34].
T1s
T1
1 0
UP2 CE2 DW2 T2
H (2)
.. .. ..
= ..
,
. . . . (28)
H (N )
UPN CEN DWN TN
s
0 1 TN+1 TN + 1
Through the above six steps, thermodynamic simulation of the complex pipeline network can be
solved by the DIMENS method.
12 15 14 18 28 43 65 49 36
46 13 66 26 11 42 45 38 37 35
41 40 39
68
62
58 57
10 19 27 21 25 24 48
34 17
70
54
20 22 73 47
72
9 23
8 55 29 31
30
67 1 64 63
7 56
50
59 5 4 33 32 34
3 2
61 60 51 71 52
16 69 6 53
44
Legend
Supply Compressor
Demand Valve
Node Pipe
341
342 The schematic
Figure 5. Figure diagram
5. The schematic of the
diagram topology
of the structure
topology structure of of
thethe complex
complex pipeline
pipeline network.network.
Compressor 1 2 3 4
Starting point 71 72 73 74
Ending point 52 54 25 61
Valve 1 2 3 4 5 6 7 8
Starting point 70 31 17 64 11 1 26 5
Ending point 62 63 19 3 65 67 66 69
Externals 1 2 3 4 5 6 7 8 9 10 11 12 13
Adjacent node 37 53 45 47 48 56 51 3 49 71 70 13 12
Externals 14 15 16 17 18 19 20 21 22 23 24 25 26
Adjacent node 72 55 22 58 9 57 73 41 59 60 27 44 6
Externals 27 28 29 30 31 32 33 34 35 36 37 38 39
Adjacent node 7 8 23 46 28 20 50 4 16 29 38 43 30
Externals 40 41 42 43 44 45 46 47 48 49
Adjacent node 2 36 63 10 15 18 14 35 68 32
The components of natural gas are listed in Table 7. The standard pressure and temperature are
101.325 kPa and 20 ◦ C, respectively. The Colebrook Equation is used as the friction Equation [35].
During simulation, the ambient temperature is maintained at 15 ◦ C.
The initial pressure is 2.8 MPa, the initial volume flow rate is zero, and the initial temperature is
15 ◦ C. After t = 0 h, the pressure of some externals is maintained, the volume flow rate of some externals
increases suddenly, the compressors are started, and the valves are opened. During the simulation,
the volume flow rate of some externals is constant, while the volume flow rate of other externals and
the valve opening (FR) of valves are changed, shown as Tables 8–10, respectively. It is assumed that:
(1) all the compressors have the same performance curve as shown in Figure 6, the rated speed of the
compressor is 6000 RPM, and the start time is 3 minutes; (2) all the valves are same, the flow coefficient
of the valve in this paper is calculated by the Equation Cv = 200 − 200FR, and the travel time of the
valve is one minute.
Externals 10 14 20 25 46 48
Pressure (MPa) 2.8 2.8 2.8 2.8 2.5 2.5
Energies 2019, 12, 1516 14 of 28
Table 9. Constant boundary conditions flow rate of the external (flow in).
Externals 1 2 3 5 6 7 8 9 11 12
Volume flow rate
−9 85 25 26 −100 44 15 36 55 68
(104 Nm3 /d)
Externals 15 16 17 18 19 21 22 23 24 27
Volume flow rate
25 15 18 14 2 14 21 56 12 -34
(104 Nm3 /d)
Externals 28 29 30 31 32 33 35 36 37 38
Volume flow rate
−142 −13 −150 −45 −13.7 −14 −35 −22 −13 −44
(104 Nm3 /d)
Externals 39 40 41 42 43 44 45 47 49
Volume flow rate
−21 −25 −50 −16 −56 −69.4 −63 −66 −85
(104 Nm3 /d)
6000
5000
4000
H(m)
N=6788 RPM
2000 N=6109 RPM
N=5430 RPM
N=4751 RPM
1000
N=4412 RPM
for flow equations of the complex pipeline network. In addition, it is clearly seen from Figure 9 that
PIPE 83
3.3
p (MPa)
p (MPa)
3.2
the difference between the temperature obtained by the DIMENS method and that obtained by SPS is
very small. The maximum deviation of temperature of the 3.0
two methods is less than 1 ◦ C, which can be
3.0 SPS
found at the starting point of pipe 63 at t =PIPE
DIMENS
6 3h, as shown in Figure 9b. This is acceptable for practical
engineering problems of natural gas pipeline PIPE 15 transportation. That is to say, the DIMENS method
2.7
2.8 PIPE 25
is also accurate for the thermodynamic simulation.
PIPE 38 Additionally, the results of pressure, flow rate,
0 6 12 18
and temperature of the compressor obtained by24the DIMENS 0
method6 12
are also
t (h)
18
in good 24
agreement with
t (h)
(a) (b)
378 Figure 7. Pressure of the starting point of some pipelines: (a) Pipe 3, 15, 25, and 38; (b) Pipe 52, 62, 70,
379 and 83.
60 SPS DIMENS
N=4412 RPM
1000 2000 3000 4000 5000 6000 7000
1000 2000 3000 4000 5000 6000 7000
3
371 Q(am3 /h)
371 Q(am /h)
372
372 Figure 6. The performance curve of the compressor.
Figure 6. The performance curve of the compressor.
Energies 2019, 12, 1516 15 of 28
373
373 5.2. Comparison of Numerical Accuracy
5.2. Comparison of Numerical Accuracy
374 thoseThe
of SPS,
caseas
ofshown in Figure
the complex 10. This
pipeline meansisthat
network the complex
simulated start-up
by the DIMENS process of therespectively.
and SPS, compressor
374 The case of the complex pipeline network is simulated by the DIMENS and SPS, respectively.
375 The time step and spatial step are 10 s and 0.5 km, respectively. The pressure, volume flow DIMENS
can be accurately simulated by the DIMENS method too. The above analysis shows that the rate, and
375 The time step and spatial step are 10 s and 0.5 km, respectively. The pressure, volume flow rate, and
376 method has aofhigh
temperature theaccuracy
starting comparable to the
point of some accuracy
pipelines of the0–10
during SPS h
and
arecan meet in
shown theFigures
requirements
7–9. Theof
376 temperature of the starting point of some pipelines during 0–10 h are shown in Figures 7–9. The
377 practical engineering
pressure, volume flowproblems.
rate, and temperature of the compressor 1# are shown in Figure 10.
377 pressure, volume flow rate, and temperature of the compressor 1# are shown in Figure 10.
3.6 3.9
3.6 3.9 SPS DIMENS
SPS DIMENS
PIPE 52
PIPE 52
3.6 PIPE 62
3.4 PIPE 62
3.4 3.6 PIPE 70
PIPE 70
PIPE 83
PIPE 83
3.3
p (MPa)
p (MPa)
3.2
3.3
p (MPa)
p (MPa)
3.2
3.0 3.0
SPS DIMENS 3.0
3.0 SPS DIMENS
PIPE 3
PIPE 3
PIPE 15
PIPE 15 2.7
2.8 PIPE 25 2.7
2.8 PIPE 25
PIPE 38
PIPE 38
0 6 12 18 24 0 6 12 18 24
0 6 12 18 24 0 6 t12
(h) 18 24
t (h)
t (h) t (h)
(a) (b)
(a) (b)
378
378 Figure 7. Pressure of the starting point of some pipelines: (a) Pipe 3, 15, 25, and 38; (b) Pipe 52, 62, 70,
Figure
Figure7.7.Pressure
Pressureof
ofthe
thestarting
startingpoint
pointof
ofsome
somepipelines:
pipelines:(a)
(a)Pipe
Pipe3,3,15,
15,25,
25,and
and38;
38;(b)
(b)Pipe
Pipe52,
52,62,
62,70,
70,
379
379 and 83.
and83.
and 83.
60 SPS DIMENS
60 20 SPS DIMENS
PIPE 11
20 PIPE 11
PIPE 27
PIPE 27
40 PIPE 30
40 0 PIPE 30
PIPE 52
0
/d3)/d)
/d3)/d)
PIPE 52
Nm
Nm
3
3
Nm
Nm
20
4
-20
(10(10
(10(10
20
4
-20
SPS DIMENS
QQ
SPS DIMENS
PIPE 3
0 PIPE 3 -40
PIPE 15
0 PIPE 15 -40
PIPE 25
PIPE 25
PIPE 38
-20 PIPE 38 -60
-20 0 6 12 18 24 -60 0 6 12 18 24
0 6 12 18 24 0 6 12 18 24
t (h) t (h)
t (h) t (h)
Energies 2019, 12, x FOR PEER REVIEW 16 of 30
(a) (b)
(a) (b)
380 Figure
Figure8.8. Volume
Volume flow rate of
flow rate of the
the starting
startingpoint
pointofofsome
somepipelines:
pipelines:(a)
(a)Pipe
Pipe1,1,
62,62,
72,72,
andand
81;81;
(b)(b) Pipe
Pipe 11,
381 11,
27,27,
30,30,
andand
52.52.
22
20 SPS DIMENS
PIPE 27
19 PIPE 45
20
PIPE 56
18 PIPE 63
T ( C)
T ( C)
17 18
0
16 SPS DIMENS
PIPE 9
16
15 PIPE 17
PIPE 36
14 PIPE 78
14
0 6 12 18 24 0 6 12 18 24
t (h) t (h)
(a) (b)
382 Figure 9.
Figure Temperature of the starting
9. Temperature starting point
pointof
ofsome
somepipelines:
pipelines:(a)
(a)Pipe
Pipe9,9,17,
17,36,
36,and 78;78;
and (b)(b)
Pipe 27,27,
Pipe 45,
383 56,56,
45, andand
63.63.
3.6 350 65
SPS
DIMENS
300 60
3.4 SPS
SPS
DIMENS
DIMENS
(10 Nm /d)
250 55
T ( C)
3
p (MPa)
3.2
4
200 50
14 PIPE 78
14
0 6 12 18 24 0 6 12 18 24
t (h) t (h)
(a) (b)
382 Figure
Energies 9. Temperature
2019, 12, 1516 of the starting point of some pipelines: (a) Pipe 9, 17, 36, and 78; (b) Pipe 27,
16 of 28
383 45, 56, and 63.
3.6 350 65
SPS
DIMENS
300 60
3.4 SPS
SPS
DIMENS
DIMENS
Q (10 Nm /d)
250 55
T ( C)
3
p (MPa)
0
3.2
4
200 50
3.0
150 45
2.8
100 40
0 6 12 18 24 0 6 12 18 24 0 6 12 18 24
t (s) t (s) t (s)
386 To further
Figures 7–9test the that
show simulation accuracy
the numerical of the DIMENS
solutions method, thesuch
of flow simulation, results of the pipeline
as pressure network
and flow rate,
387 at t = 2019,
Energies
obtained
Energies
2019,
24 hby12,the
12,
x FOR
obtained PEER
DIMENS
x FOR PEER
REVIEW
by the DIMENSare
method,
REVIEW method and
in good SPS are compared,
agreement with thoseas shown in
obtained byFigures 17 of 30
11–13.
SPS. The results of
17 of 30
388 these comparisons are the same as in previous literature [28]. This can validate the DIMENS method
4.0 0.015
4.0 0.015
0.5
389 for flow equations of the complex pipeline SPS network. In addition, clearly seen from Figure0.59 that
it isdeviation
Absolute
Absolute deviation
SPS
390 the difference between the temperature obtained by the
DIMENS
DIMENS 0.012
DIMENSRelativemethod
Relative deviation and that obtained by SPS
deviation 0.4
3.6 0.012 0.4
391 is very
3.6 small. The maximum deviation of temperature of the two methods is less than 1 °C, which
(MPa))
deviation(%)
deviation(MPa
Relativedeviation(%)
392 can be found at the starting point of pipe 63 at t = 6 h,0.009 as shown in Figure 9b. This is acceptable
0.009
0.3 for
0.3
Absolutedeviation
(MPa) )
393 practical
3.2 engineering problems of natural gas pipeline transportation. That is to say, the DIMENS
p p(MPa
3.2
394 method is also accurate for the thermodynamic simulation. 0.006 Additionally, the results of pressure,
0.2
0.2 flow
Relative
0.006
Absolute
397 compressor can be accurately simulated by the DIMENS method too. The above analysis shows 0.0 that
2.4 0.000 0.0
398 the DIMENS
2.4
0
0 method
15
15
has
30 a high
30
45 accuracy
45
60
60
comparable
75
75
to 0the accuracy
0.000 15 of
30 the SPS 45 and60 can meet
75 the
Node No. 0 15 30 45 60 75
399 requirements of practical Nodeengineering
No. problems. Node No.
Node No.
400 To further test the (a)simulation accuracy of the DIMENS method, (b)
(a) (b)
the results of the pipeline
401
403 networkFigureat t = 24 h obtained
11.Comparison by the DIMENS
Comparison of pressureat method and
at theconnection SPS
connection node:(a)are compared,
(a) Pressurevalue; as (b)
value; shown in Figures 11–
deviation.
403
402 13.
Figure
Figure11.11. Comparisonofofpressure
pressure atthe
the connectionnode:
node: (a)Pressure
Pressure value;(b) (b)deviation.
deviation.
2.5 5
225 SPS 2.5 Absolute deviation 5
225 SPS Absolute deviation
DIMENS Relative deviation
DIMENS Relative deviation
2.0
))
4
Nm/d/d
150 2.0 4
150
3
deviation(%)
3
Relativedeviation(%)
(10Nm
4
4
1.5
))
3
deviation(10
75
Nm/d
75 1.5 3
(10Nm/d
Absolutedeviation
4
4
1.0
Relative
QQ(10
0
1.0
2
0 2
Absolute
-75 0.5 1
-75 0.5 1
-150 0.0 0
-150 0 20 40 60 80 0.0 0 0
0 20 40 60 80 20 40 60 80
0 20 40 60 80
Pipe No. Pipe No.
Pipe No. Pipe No.
(a)
(a) (b)
(b)
404
404 Figure 12.
Figure12.
Figure Comparison of
Comparisonof
12.Comparison flow
offlow rate
flowrate of
rateof pipelines:
ofpipelines: (a)
pipelines:(a) Flow
(a)Flow rate
Flowrate value;
ratevalue; (b)
value;(b) deviation.
(b)deviation.
deviation.
From
70
70 the
SPS
comparison of the pressure of the connection 0.5
0.5 nodes in Figure 11, it can be seen that
SPS
the pressures obtained
DIMENS
DIMENS
by the two methods are almost the same, and the maximum absolute and
60 0.4
60 0.4
relative deviations of pressure are 0.015 MPa and 0.45%, respectively. From the comparison of the
( (C0C) )
0.3
rate are 2.4 × 104 Nm3 /h and 3.5%, respectively. What is more, the maximum absolute deviation of
Absolutedeviation
))
T T( (C0C
40
temperature
40 is less than 0.5 ◦ C, as shown in Figure 13. It can
0.2
0.2 be summarized that the deviation between
0
Absolute
30
30 0.1
0.1
20
20 0.0
0.0
0 20 40 60 80 0 20 40 60 80
0 20 40 60 80 0 20 40 60 80
Pipe No. Pipe No.
Pipe No. Pipe No.
Relative de
Q (10 N
Absolute deviati
4
0 1.0 2
-75 0.5 1
(a)
the numerical solution calculated by the DIMENS method and SPS is sufficiently(b) small. These analyses
404 again imply that the12.
Figure calculation accuracy
Comparison of the
of flow rate DIMENS(a)
of pipelines: method is comparable
Flow rate to that of SPS.
value; (b) deviation.
70 0.5
SPS
DIMENS
60 0.4
Absolute deviation( C)
50
0
0.3
T ( C)
40
0
0.2
30
0.1
20
0.0
Energies 2019,
0 12, x FOR
20 PEER REVIEW
40 60 80 0 20 40 60 18
80 of 30
Pipe No. Pipe No.
50 0.3
0
T ( C)
40
0
0.2
30
0.1
20
0.0
0 20 40 60 80 0 20 40 60 80
Pipe No.
Pipe No.
(c) (d)
407 Figure
Figure 13.13. Comparison
Comparisonof oftemperature
temperatureatatthe
thestart
startand
andend
endnodes
nodesof
ofpipelines:
pipelines:(a)
(a)Temperature
Temperaturevalue
value
408 at
at the
the start node; (b)
(b) deviation
deviationat
atthe
thestart
startnode;
node;(c)(c)temperature
temperature value
value at at
endend node;
node; (d)(d) deviation
deviation at
at the
409 the end
end node. node.
is 0.01, while that of SPS is 0.036. This is means that the efficiency of the DIMENS method is about
0.0036/0.01 = 3.6 times higher than that of the SPS as the number of discretized points is increasing.
Energies 2019,
Energies 2019, 12,
12, xx FOR
FOR PEER
PEER REVIEW
REVIEW 19 of
19 of 30
30
In other word, the DIMENS method is more efficient than SPS.
2000
2000
SPS
SPS
DIMENS
DIMENS
1500
1500
Fitted linear curve :
Fitted linear curve :
y=64+0.036x
(s)
y=64+0.036x
time(s)
CPUtime
1000
1000
CPU
500
500
Fitted linear curve :
Fitted linear curve :
y=4+0.01x
y=4+0.01x
10000
10000 20000
20000 30000
30000 40000
40000 50000
50000
The number of discretized grid points
The number of discretized grid points
441
441
Figure 14. Change of CPU time with the number of discretized grid points.
442
442 Figure 14.
Figure 14. Change
Change of
of CPU
CPU time
time with
with the
the number
number of
of discretized
discretized grid
grid points.
points.
Second, the total number of discretized grid points is unchanged, while the number of components
443
443 Second, the
of theSecond,
the total
total number
pipeline network
number of of discretized grid
is increased.discretized
grid points
The adaptability
points is
is unchanged,
unchanged, while
of the DIMENS
while the number
method for the
number of
of
the number of
444
444 components
components is
components
of the pipeline
ofstudied.
the pipeline network
network
The CPU
is increased.
timeisis increased.
The adaptability
The adaptability
shown in Figure 15.
of the DIMENS method for
of the DIMENS method for thethe
445
445 number of components is studied. The CPU time is shown in
number of components is studied. The CPU time is shown in Figure 15.Figure 15.
800
800
SPS
SPS
DIMENS
DIMENS
600
600
(s)
Fitted linear
linear curve
curve ::
time(s)
Fitted
y=376+0.55x
CPUtime
400
400 y=376+0.55x
CPU
100
100 200
200 300
300 400
400 500
500 600
600
The number of pipeline
The number of pipeline
446
446 Figure 15. Change of computing time with the number of pipeline sections.
447
447 Figure 15.
Figure 15. Change
Change of
of computing
computing time
time with
with the
the number
number of
of pipeline
pipeline sections.
sections.
It is clearly shown in Figure 15 that the CPU time of the DIMENS method is also less than that
448
448 of theIt
ItSPS.
is This means
is clearly
clearly shown that
shown in the computational
in Figure
Figure 15 that
15 that the
the CPU
CPU efficiency
time of
time of the
of the
the DIMENS
DIMENS
DIMENS method
method
method is high.
is also
is also What
less than
less than is
that
that
449
449 more,
of the the
of the SPS.CPU
SPS. Thistime
This means
means of the
thatDIMENS
that the method and
the computational
computational that of the
efficiency
efficiency SPSDIMENS
of the
of the are both method
DIMENS linear with
method the number
is high.
is high. What is
What is
450
450 of components.
more, the CPU The
time fit
of linear
the curve
DIMENS of SPS
method is y
and= 376
that +of0.55x,
the and
SPS that
are
more, the CPU time of the DIMENS method and that of the SPS are both linear with the number of of
both DIMENS
linear with is y =
the 31 +
number 0.59x.
of
451
451 In other words,
components.
components. The
Thethefit
fitgradients
linear of the
linear curve
curve oftwo
of SPSlines
SPS is yy =are
is = 376similar.
376 Thus,
++ 0.55x,
0.55x, andthe
and thatDIMNES
that of DIMENS
of DIMENS method
is yyand
is 31the
== 31 SPS are
++ 0.59x.
0.59x. In
In
452
452 both
other not only
words, well
the adapted
gradients to
of the increase
two lines of discrete
are similar. points,
Thus, but
the also to
DIMNES
other words, the gradients of the two lines are similar. Thus, the DIMNES method and the SPS are the increase
method of
and components.
the SPS are
453
453 This
bothindicates
both not only that
not only wellthe
well DIMNES
adapted
adapted to method
to the
the increase
increase andof
ofthe SPS both
discrete
discrete havebut
points,
points, a strong
but toadaptability
also to
also increasetoof
the increase
the ofthe number of
components.
components.
454
454 pipeline
This sections.
This indicates
indicates that
that the
the DIMNES
DIMNES methodmethod and and thethe SPS
SPS both
both have
have aa strong
strong adaptability
adaptability to to the
the number
number
455
455 of pipeline sections.
of pipeline sections.
456
456 Last, the
Last, the pipe
pipe network,
network, as as shown
shown in in Figure
Figure 5, 5, isis copied
copied multiple
multiple times
times andand connected
connected to to each
each
457
457 other to
other to form
form aa larger
larger network.
network. TheThe adaptability
adaptability of of the
the DIMENS
DIMENS methodmethod for for the
the couple
couple of of grid
grid points
points
458
458 and components is studied. The CPU time is
and components is studied. The CPU time is shown in Figure 16. shown in Figure 16.
Energies 2019, 12, 1516 19 of 28
Last, the pipe network, as shown in Figure 5, is copied multiple times and connected to each other
to form a larger network. The adaptability of the DIMENS method for the couple of grid points and
Energies 2019, 12, x FOR PEER REVIEW 20 of 30
components is studied. The CPU time is shown in Figure 16.
2000 SPS
DIMENS
1000
500
Fitted linear curve :
y= -56+187x
0
1 2 3 4 5
The mutiple of network expansion
459 Figure 16. Change of computing time with multiple network expansions.
460 Figure 16. Change of computing time with multiple network expansions.
Figure 16 shows that the CPU time of the DIMENS method and that of the SPS are both linear
461 Figure 16network
with multiple shows that the CPU However,
expansions. time of thewithDIMENS
the same method and network
multiple that of the SPS are both
expansions, the linear
CPU
462 withof
time multiple network
SPS is always expansions.
more than thatHowever,
of DIMENS with the same
method, andmultiple
the slopenetwork
of the expansions,
line of the DIMENSthe CPU
463 time of is
method SPS is always
smaller than more
that ofthan
SPS.that
ThatofisDIMENS
to say, themethod,
CPU time andofthe
theslope
DIMENS of the line ofisthe
method DIMENS
always less
464 method
than that isofsmaller
SPS, and than
the that of SPS.
DIMENS That iswould
method to say,bethemore
CPUtime-saving
time of the with
DIMENS method
the larger is of
scale always less
the pipe
465 than thatThis
network. of SPS, and the
indicates thatDIMENS
the DIMENSmethodmethodwould be more
is more time-saving
efficient than SPS.with thebelarger
It can further scale
seenofthat
the
466 the fitted linear curve of SPS is y = 45 + 405x, while that of DIMENS is y = −56 + 187x. In other words,
pipe network. This indicates that the DIMENS method is more efficient than SPS. It can be further
467 seen
the thatof
slope the
thefitted
line linear curve of SPS
of the DIMENS is y =is45about
method + 405x,
187,while
while that
theofslope
DIMENS
of theisline
y = of
−56SPS+ 187x.
is aboutIn other
405,
468 words,
which is the
overslope
two of the greater
times line of the DIMENS
(405/187 = 2.16)
method is about
than that of the187, while method.
DIMENS the slopeThisof the line of
means SPS
that theis
469 about 405, which is over two times greater (405/187 = 2.16) than
computing efficiency of the DIMENS method is over two times greater than that of SPS. that of the DIMENS method. This
470 means that the computing efficiency of the DIMENS method is over two times greater than that of
471 6.SPS.
Conclusions and Future Work
In this paper, the DIMENS method has been extended to the flow and thermodynamic-coupled
472 simulation of theand
6. Conclusions Futurepipeline
complex Work network that includes pipelines and non-pipeline components.
473 The simulation accuracy
In this paper, and efficiency
the DIMENS method of hasthe present
been extendedmethod have
to the flowbeen
andinvestigated through an
thermodynamic-coupled
474 example
simulationof the complex
of the complexpipeline network.
pipeline networkThethat
conclusions
includes are as follows:
pipelines and non-pipeline components.
475 The simulation accuracy and efficiency of the present method have been investigated through an
(1) DIMES shows a very good agreement with SPS (differences below 3.5%). This accuracy can meet
476 example of the complex pipeline network. The conclusions are as follows:
the requirements of practical engineering;
477 (2) The1) CPU
DIMES shows
time a very
of the good method
DIMENS agreement with SPS
is always (differences
less than that of below
SPS, 3.5%).
and the This accuracy can
computational
478 speedmeet theDIMENS
of the requirements
methodof practical
is over twoengineering;
times higher than that of the SPS;
479 2) The CPU time of the DIMENS
(3) The DIMENS method has a strong adaptability method is always less
to the thanofthat
scale theof SPS, and
pipeline the computational
network. The CPU
480 time speed
of the of the DIMENS
DIMNES method method is over
is linear with two times
the size of higher than that
the pipeline of the SPS;
network.
481 3) The DIMENS method has a strong adaptability to the scale of the pipeline network. The
482 In recent
CPUyears,
time ofasthe
a rapidly
DIMNES developing
method isrole in High
linear Performance
with the size of theComputing (HPC), Graphic
pipeline network.
Processing Unit (GPU) computing has been becoming a research hotspot in many research fields.
483 In recent
In order years, as
to maximize theaGPU
rapidly developing
computing rolethe
speed, in High Performance
parallel granularityComputing (HPC), Graphic
of the computational task
484 Processing Unit (GPU) computing has been becoming a research hotspot
should be fine enough. Thus, the algorithm should be highly parallel. In the DIMENS method, in many research fields. In
485 order to maximize the GPU computing speed, the parallel granularity of the
the pipelines in the network are parallel and the solution process of one pipeline is parallel too. computational task
486 should
This meansbe fine
that enough. Thus,
the parallel the algorithm
characteristic of theshould
DIMENS be highly
methodparallel.
greatly In the DIMENS
matches the GPU.method, the
Therefore,
487 pipelines in the network are parallel and the solution process of one pipeline is parallel too. This
488 means that the parallel characteristic of the DIMENS method greatly matches the GPU. Therefore, to
489 improve the computational speed further, it would be meaningful and worthwhile to study the GPU-
490 accelerated simulation for large-scale natural gas pipeline networks in the future.
491 Author Contributions: Conceptualization, B.Y.; Methodology, P.W.; Validation, S.A., D.H., and Y.X.; Writing –
492 original draft, P.W.; Writing – review & editing, P.W. and B.Y.
Energies 2019, 12, 1516 20 of 28
to improve the computational speed further, it would be meaningful and worthwhile to study the
GPU-accelerated simulation for large-scale natural gas pipeline networks in the future.
Author Contributions: Conceptualization, B.Y.; Methodology, P.W.; Validation, S.A., D.H., and Y.X.;
Writing—original draft, P.W.; Writing—review & editing, P.W. and B.Y.
Funding: The study is supported by the National Natural Science Foundation of China (No. 518060180), the Project
of Construction of Innovative Teams and Teacher Career Development for Universities and Colleges under Beijing
Municipality (No. IDHT20170507), and the Program of Great Wall Scholar (No. CIT&TCD20180313).
Conflicts of Interest: The authors declare no conflict of interest.
Nomenclature
Roman symbols
cv Specific heat capacity at constant volume, J/(kg·K)
cp Specific heat capacity at constant pressure, J/(kg·K)
e Specific internal energy, J/(kg·K)
d Internal diameter of pipe, m
g Gravitational acceleration, m/s2
h Specific enthalpy, J/(kg·K)
m Mass flow rate, kg/s
n Polytropic index
p Pressure, Pa
s Elevation, m
t Time, s
u Corresponding component of general variable U
w Flow velocity, m/s
x Spatial coordinate, m
A Cross-section area, m2
Cv Flow coefficient of valve
FR Valve opening
K Total heat transfer coefficient, W/(m2 ·K)
N Number of discretized sections of pipeline
Q Volume flow, m3 /s
R Specific gas constant, J/(kg·K)
T Temperature, K
U General variable
Z Compressibility factor
Greek symbols
α, β Fundamental set of solution
γ Particular solution
ρ Density, kg/m3
θ Inclination angle of a pipe, rad
λ Friction factor
ε Compression ratio
∆ Specific density of natural gas relative to air
∆x Spatial step, m
∆t Time step, s
Superscripts
n Time level
m Related to mass flow
p Related to pressure
Energies 2019, 12, 1516 21 of 28
Subscripts
npc Non-pipeline components
in Flow in
out Flow out
p Pipeline
c Compressor
v Valve
s Supply
d Demand
Appendix A
The pipeline model is a set of governing equations of homogeneous, geometrically one-dimensional flow in
the pipeline, which consists of the continuity equation (A1), momentum equation (A2), and energy equation (A3):
∂ρ ∂(ρw)
+ = 0, (A1)
∂t ∂x
∂s
θ= , (A7)
∂x
∂ρ ∂ρ ∂p ∂ρ ∂T
! !
= + , (A8)
∂t ∂p T ∂t ∂T p ∂t
∂ρ ∂ρ ∂p ∂ρ ∂T
! !
= + , (A9)
∂x ∂p T ∂x ∂T p ∂x
∂p
∂ρ ∂p ∂ρ ∂T ρ
! ! !
=− = − , (A11)
∂T p ∂T ρ ∂p T ∂p
∂ρ T
∂ρ
!
1
= , (A12)
∂p T ∂p
∂ρ T
Energies 2019, 12, 1516 22 of 28
!
p
dh = de + d , (A13)
ρ
∂p
!
1
de = cv dT − 2 [T − p]dρ, (A14)
ρ ∂T ρ
Equations (A1) to (A3) can be transformed to mathematical forms with pressure, mass rate, and temperature
as the dependent variables.
Continuity Equation
Substituting Equation (A5) and Equation (A8) into Equation (A1),
∂ρ ∂p ∂ρ ∂T 1 ∂m
! !
+ + = 0, (A15)
∂p T ∂t ∂T p ∂t A ∂x
∂p ∂p ∂T 1 ∂p ∂m
! !
− + = 0, (A16)
∂t ∂T ρ ∂t A ∂ρ T ∂x
Momentum Equation
Substituting Equation (A5) into Equation (A2),
∂m 2m ∂m m2 ∂ρ ∂p λ m|m|
+ − +A =− − Aρg sin θ, (A17)
∂t Aρ ∂x Aρ ∂x
2 ∂x 2 dAρ
∂m m2 ∂ρ ∂p 2m ∂m λ m|m| m2 ∂ρ ∂T
! !
+ [A − ] + =− − Aρg sin θ + , (A18)
∂t Aρ2 ∂p T ∂x Aρ ∂x 2 dAρ Aρ2 ∂T p ∂x
Energy Equation
Substituting Equations (A4)–(A7) into Equation (A3),
∂ w2 ∂p ∂ w2
[(h + )ρA] − + [(h + )ρwA] = −πKd(T − T g ) − ρwgA sin θ, (A19)
∂t 2 ∂t ∂x 2
∂ w2 ∂p ∂ w2 w2 ∂w 4K(T − T g )
[(h + )ρ] − + w [(h + )ρ] + (h + )ρ =− − ρwg sin θ, (A20)
∂t 2 ∂t ∂x 2 2 ∂x d
d w2 w2 ∂ρ ∂ρ ∂w ∂p 4K(T − T g )
ρ (h + ) + (h + )[ +w +ρ ]− =− − ρwg sin θ, (A21a)
dt 2 2 ∂t ∂x ∂x ∂t d
dh ∂p dw 4K(T − T g )
ρ − + ρw =− − ρwg sin θ, (A21b)
dt ∂t dt d
Equation (A2) can be rewritten in the form
∂w ∂w ∂p λ ρw|w|
ρ + ρw + =− − ρg sin θ, (A22a)
∂t ∂x ∂x 2 d
dw ∂p λ ρ|w|3
ρw = −w − − ρwg sin θ, (A22b)
∂t ∂x 2 d
Substituting Equation (A22b) into Equation (A21b),
3
dh ∂p ∂p λ ρ|w| 4K(T − T g )
ρ − −w = − , (A23a)
dt ∂t ∂x 2 d d
Energies 2019, 12, 1516 23 of 28
3
dh dp λ ρ|w| 4K(T − T g )
ρ − = − , (A23b)
dt dt 2 d d
Substituting Equation (A13) into Equation (A23b),
3
de p dρ λ ρ|w| 4K(T − T g )
ρ − = − , (A24)
dt ρ dt 2 d d
3
∂p λ ρ|w| 4K(T − T g )
!
dT 1 dρ
ρcv −T = − , (A25)
dt ∂T ρ ρ dt 2 d d
∂ρ ∂ρ ∂w
+w +ρ = 0, (A26a)
∂t ∂x ∂x
dρ ∂w
= −ρ , (A26b)
dt ∂x
Substituting Equation (A26b) into Equation (A25),
∂T ∂T 1 ∂p ∂w λ ρ|w|3 4K(T − T g )
+w = [−T ( ) + − ], (A27)
∂t ∂x ρcv ∂T ρ ∂x 2 d d
Equation (A14), Equation (16) and Equation (A23) can be written in the general form
∂U ∂U
+B· = F, (A28)
∂t ∂x
1 ∂ ∂p
∂m
A ∂p ∂ρ ∂x
0
T
2
∂ρ ∂ ∂ρ ∂p
2
m 2
G = − ρ12 ∂p , (A30)
A [ ρ3 ∂p ]
∂ρ ∂p
∂p T ∂x
2m 2 ∂m
T − Aρ +
∂p T ∂x Aρ ∂x
2
2m ∂ρ ∂m
− Aρ
2 ∂p
T ∂x
∂T ∂ ∂p
∂t ∂p ∂T ρ
0
λ m|m| ∂ρ ∂ρ
S =
2 dAρ ∂p
2 − Ag sin θ ∂p T
,
(A31)
2m ∂ρ ∂T
T |m|
−λ dAρ +
!
∂T ∂ 1 ∂ρ Aρ2 ∂T p ∂x
2
+ mA
∂x ∂p ρ2 ∂T p
Thermodynamic Equation:
U = T, (A32)
G = 0, (A33)
∂p ∂w ∂ ∂p λ |w| ∂ρ
3
∂w
1 4K
ρcv (−( ∂T )ρ ∂x − T ∂x ∂T ( ∂T )ρ + 2 d ∂T − d )
S= , (A34)
3
∂p ρ|w| ∂ρ
]( ρc1v ) (ρ ∂c
2
)ρ ∂w + λ2 d −
4K(T−Ta ) v
−[−T ( ∂T + cv ∂T )
∂x d ∂T
Appendix B
To describe in detail how the flow equations of multi-component interconnection nodes are solved, a pipeline
network is given as the instance. The pipeline network is comprised of three pipes, one compressor, one valve,
and two externals, as shown in Figure A1. The closed equations for the solution of multi-component interconnection
nodes are Equations (A35)–(A58), shown as below.
536 Appendix B
537 To describe in detail how the flow equations of multi-component interconnection nodes are
538 solved, a pipeline network is given as the instance. The pipeline network is comprised of three pipes,
539 one compressor, one valve, and two externals, as shown in Figure B1. The closed equations for the
Energies 2019, 12, 1516 24 of 28
540 solution of multi-component interconnection nodes are equations (B1)–(B24), shown as below.
541
542
543 Figure B1.
Figure Theschematic
A1. The schematicdiagram
diagram of
of the
the structure
structure of
of aa pipeline
pipeline network.
network.
min,c εpm
in,c − p
out,c 0 ,= 0,
out,c (A36)
(B1)
Flow equations of the valve:
min,v − mout,v = 0, (A37)
pin,c pout,c 0 , (B2)
v
(p2in,v − p2out,v )
t
545 Flow equations of the valve: min,v − Cv ρin,v = 0, (A38)
Z∆Tin,v
Flow equation of supply:
min,v mout,v 0 , (B3)
ps = p(t), (A39)
Flow equation of demand: 2
( pin,v pout,v
2
)
min,v Cv in,v md = m ( t ) , 0, (A40)
(B4)
Z Tnode
Flow equations of multi-component interconnection in,v 1:
ps p(t ) , (B5)
ps = p1,p1 , (A42)
547 Flow equation of demand:
Flow equations of multi-component interconnection node 2:
mdm m(t ) =
, m (B6)
N1 +1,p1 in,c , (A43)
out,c
ps m p1,p1=, m1,p2 , (A45)
(B8)
m1,p1 = αm p
1,p1 1,p1
+ βm
1,p1
mN1 +1,p1 + γm
1,p1
, (A53)
p p p
pN1 +1,p1 = αN1 +1,p1 p1,p1 + βN1 +1,p1 mN1 +1,p1 + γN1 +1,p1 , (A54)
m1,p2 = αm p
1,p2 1,p2
+ βm
1,p2
mN2 +1,p2 + γm
1,p2
, (A55)
p p p
pN2 +1,p2 = αN2 +1,p2 p1,p2 + βN2 +1,p2 mN2 +1,p2 + γN2 +1,p2 , (A56)
m1,p3 = αm m m
1,p3 p1,p3 + β1,p3 mN3 +1,p3 + γ1,p3 , , (A57)
p p p
pN3 +1,p3 = αN +1,p3 p1,p3 + βN +1,p3 mN3 +1,p3 + γN +1,p3 (A58)
3 3 3
The number of the mass flow and pressure variables at the starting and terminal points of the pipeline is 4,
and the numbers of the compressor and valve are both 4 too, while the number of the mass flow and pressure
variables of the external component is 2. This means that there are a total of 4 × 3 + 4 × 1+ 4 × 1+2 × 2 = 24
unknown variables for solving the multi-component interconnection nodes in the pipeline network in Figure 5.
The number of equations in Equations (A35)–(A58) is 24. Therefore, these equations are closed and have a
Energies 2019, 12, x FOR PEER REVIEW 28 of 30
unique solution.
564 To describe
Appendix C how the thermodynamic equations of multi-component interconnection nodes are
565 solved in detail, a pipeline network is given as the instance. For instance, the flow state of the pipeline
To describe how the thermodynamic equations of multi-component interconnection nodes are solved in
566 network at a certain
detail, a pipeline networkmoment
is givenisasshown in Figure
the instance. C1. Pipe
For instance, the1,flow
pipe 2, and
state of thepipe 3 arenetwork
pipeline respectively the
at a certain
567 moment is
second, shownand
fourth, in Figure
first A2.
typePipe 1, pipe 2, and
of pipeline. Thepipe 3 are respectively
complete system ofthe second,
linear fourth, and
equations of first
the type of
multi-
pipeline. The complete system of linear equations of the multi-component interconnection nodes is presented
568 component
as follows:
interconnection nodes is presented as follows:
569
570
Figure A2. The flow status of the pipeline networks at a given time.
571 Figure C1. The flow status of the pipeline networks at a given time.
Thermodynamic-linearized equation of the compressor:
572 Thermodynamic-linearized equation of the compressor:
m−1
1 ε
Tout,c − Tmin,c m = 0, (A59)
out,c T Tin,c m
0, (C1)
Thermodynamic equation of the valve:
573 Thermodynamic equation of the valve:
1 T (∂p/∂T )ρ 1
Tout,v1 − Tin,v1 + (pout,v1 − pin,v1 ) − = 0, (A60)
1 Tcp (ρp (∂p/∂ρ
T ) )T 1 ρ out, v1
2
Tout,v1 Tin,v1 ( pout,v1 pin,v1 ) 2 0, (C2)
c p (p )T out, v1
Thermodynamic equation of the external component:
574 s = T1 (t),
Thermodynamic equation of the externalTcomponent: (A61)
T T (interconnection
Thermodynamic equations of multi-component t) , s 1
nodes 1: (C3)
575 Thermodynamic equations of multi-component cp minterconnection
nodes 1:
T1,p1 = e1 Ts , (A62)
cp m
1,p1
cpm
T1,p1 e1
Ts , (C4)
cpm
1,p1
cpm
N1 1,p1
Tin,c TN1 1,p1 , (C5)
cpm
Energies 2019, 12, 1516 26 of 28
solved
T1,p3 = T1,p3 , (A68)
solved
TN+1,p3 = TN +1,,p3 , (A69)
where, the superscript ‘solved’ is standing for having been solved in the second step.
Supplemental equation of pipe 1:
The number of temperature variables at the starting and terminal points of the pipeline, compressor,
and valve is 2, while the number of temperature variables of the external component is 1. This means that there
are 5 × 2 + 2 × 1 = 12 unknown temperature variables for solving the multi-component interconnection nodes
solution in pipeline networks, as shown in Figure A2. There are also 12 Equations in Equations (A59) to (A70).
Therefore, these equations are closed and have a unique solution.
References
1. Birol, F. Golden Rules for a Golden Age of Gas: World Energy Outlook Special Report on Unconventional Gas:
Report. International Energy Agency. Available online: www.worldenergyoutlook.org/media/weowebsite/
2012/goldenrules/WEO2012_GoldeGRulesReport.pdf (accessed on 22 October 2012).
2. Turner, W.J.; Kwon, P.S.J.; Maguire, P.A. Evaluation of a gas pipeline simulation program. Math. Comput. Model.
1991, 15, 1–14. [CrossRef]
3. Ouellette, L.; Hanks, H. Integrated simulation and SCADA to replay historical data for a local distribution
company. In Proceedings of the PSIG Annual Meeting, Pipeline Simulation Interest Group, Tucson, AZ, USA,
15–17 October 1997.
4. Hendriks, P.H.G.M.; Postvoll, W.; Mathiesen, M.; Spiers, R.P.; Siddorn, J. Improved capacity utilization by
integrating real-time sea bottom temperature data. In Proceedings of the PSIG annual Meeting, Pipeline
Simulation Interest Group, Williamsburg, VA, USA, 23–25 October 1995.
Energies 2019, 12, 1516 27 of 28
5. Osiadacz, A. Simulation and Analysis of Gas Networks; E. & F.N. Spon Ltd.: London, UK, 1987; pp. 69–82.
6. Helgaker, J.F.; Müller, B.; Ytrehus, T. Transient flow in natural gas pipelines using implicit finite difference
schemes. J. Offshore Mech. Arct. Eng. 2014, 136, 031701. [CrossRef]
7. Wang, H.; Liu, X.; Zhou, W. Transient flow simulation of municipal gas pipelines and networks using semi
implicit finite volume method. Procedia Eng. 2011, 12, 217–223.
8. Ebrahimzadeh, E.; Shahrak, M.N.; Bazooyar, B. Simulation of transient gas flow using the orthogonal
collocation method. Chem. Eng. Res. Des. 2012, 90, 1701–1710. [CrossRef]
9. Alamian, R.; Behbahani-Nejad, M.; Ghanbarzadeh, A. A state space model for transient flow simulation in
natural gas pipelines. J. Nat. Gas Sci. Eng. 2012, 9, 51–59. [CrossRef]
10. Behbahani-Nejad, M.; Shekari, Y. The accuracy and efficiency of a reduced-order model for transient flow
analysis in gas pipelines. J. Pet. Sci. Eng. 2010, 73, 13–19. [CrossRef]
11. Farzaneh-Gord, M.; Rahbari, H.R. Unsteady natural gas flow within pipeline network, an analytical approach.
J. Nat. Gas Sci. Eng. 2016, 28, 397–409. [CrossRef]
12. Pambour, K.A.; Bolado-Lavin, R.; Dijkema, G.P.J. An integrated transient model for simulating the operation
of natural gas transport systems. J. Nat. Gas Sci. Eng. 2016, 28, 672–690. [CrossRef]
13. Madoliat, R.; Khanmirza, E.; Moetamedzadeh, H.R. Transient simulation of gas pipeline networks using
intelligent methods. J. Nat. Gas Sci. Eng. 2016, 29, 517–529. [CrossRef]
14. Wang, J.; Wang, T.; Wang, J. Application of π equivalent circuit in mathematic modeling and simulation of
gas pipeline. Appl. Mech. Mater. 2014, 496, 943–946. [CrossRef]
15. Herrán-González, A.; Cruz, J.M.D.L.; De Andrés-Toro, B.; Risco-Martín, J.L. Modeling and Simulation of a
Gas Distribution Pipeline Network. Appl. Math. Model. 2009, 33, 1584–1600. [CrossRef]
16. Thorley, A.R.D.; Tiley, C.H. Unsteady and transient flow of compressible fluids in pipelines—A review of
theoretical and some experimental studies. Int. J. Heat Fluid Flow 1987, 8, 3–15. [CrossRef]
17. Kiuchi, T.T.; Izumi, H.H.; Huke, T.T. An operation support system of large city gas networks based on fluid
transient model. J. Energy Resour. Technol. 1995, 117, 324–328. [CrossRef]
18. Kiuchi, T. An implicit method for transient gas flows in pipe networks. Int. J. Heat Fluid Flow 1994, 15,
378–383. [CrossRef]
19. Wylie, E.B.; Stoner, M.A.; Streeter, V.L. Network: System transient calculations by implicit method. Soc. Pet.
Eng. J. 1971, 11, 356–362. [CrossRef]
20. Li, Y.; Yao, G. Design and Operation of Gas Pipeline; China University of Petroleum Press: Beijing, China, 2009;
pp. 19–26. (In Chinese)
21. Abbaspour, M.; Chapman, K.S. Non-isothermal transient flow in natural gas pipeline. J. Appl. Mech. 2008,
75, 031018. [CrossRef]
22. Luskin, M. An approximation procedure for non-symmetric, nonlinear hyperbolic systems with integral
boundary conditions. Siam J. Numer. Anal. 1979, 16, 145–164. [CrossRef]
23. Zheng, J.G.; Chen, G.Q.; Song, F.; Ai, M.Y.; Zhao, J.L. Research on simulation model and solving technology
of large scale gas pipe network. J. Syst. Simul. 2012, 14, 133. (In Chinese)
24. Barley, J. Thermal decoupling: An investigation. In Proceedings of the PSIG annual Meeting, Pipeline
Simulation Interest Group, Santa Fe, NM, USA, 16–19 April 2012.
25. Helgaker, J.F.; Ytrehus, T. Coupling between continuity/momentum and energy Equation in 1D gas flow.
Energy Procedia 2012, 26, 82–89. [CrossRef]
26. Wang, P.; Yu, B.; Deng, Y.; Zhao, Y. Comparison study on the accuracy and efficiency of the four forms of
hydraulic Equations of a natural gas pipeline based on linearized solution. J. Nat. Gas Sci. Eng. 2015, 22,
235–244. [CrossRef]
27. Stoner, M.A. Sensitivity analysis applied to a steady-state model of natural gas transportation systems.
Soc. Pet. Eng. J. 1972, 12, 115–125. [CrossRef]
28. Wang, P.; Yu, B.; Han, D.; Sun, D. Fast method for the hydraulic simulation of natural gas pipeline networks
based on the divide-and-conquer approach. J. Nat. Gas Sci. Eng. 2018, 50, 55–63. [CrossRef]
29. Keenan, P.T. Collation and upwinding for thermal flow in pipelines: The linearized case. Int. J. Numer.
Methods Fluids 1996, 22, 835–849. [CrossRef]
30. Osiadacz, A.J.; Chaczykowski, M. Comparison of isothermal and non-isothermal pipeline gas flow models.
Chem. Eng. J. 2001, 81, 41–51. [CrossRef]
Energies 2019, 12, 1516 28 of 28
31. Wang, P.; Yu, B.; Han, D.; Li, J.; Sun, D.; Xiang, Y.; Wang, L. Adaptive implicit finite difference method for
natural gas pipeline transient flow. Oil Gas Sci. Technol. Rev. D’ifp Energ. Nouv. 2018, 73, 21. [CrossRef]
32. Chaczykowski, M. Sensitivity of Pipeline Gas Flow Model to the Selection of the Equation of State. Chem. Eng.
Res. Des. 2009, 87, 1596–1603. [CrossRef]
33. Benedict, M.; Webb, G.B.; Rubin, L.C. An empirical Equation for thermodynamic properties of light
hydrocarbons and their mixtures I. Methane, ethane, propane and n-butane. J. Chem. Phys. 1940, 8, 334–345.
[CrossRef]
34. Scott, L.R. Numerical Analysis, 2nd ed.; Princeton University Press: Oxford, MS, USA, 2016; pp. 53–64,
145–149.
35. Colebrook, C.F. Turbulent flow in pipes with particular reference to the transition region between the smooth
and rough pipe laws. J. Inst. Civ. Eng. 1939, 11, 133–156. [CrossRef]
© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).