Transient Analysis of Isothermal Gas Flow in Pipeline Network
Transient Analysis of Isothermal Gas Flow in Pipeline Network
Abstract
   Conventional methods for transient analysis of pipeline network are normally applied to find the numerical solution of the two partial
differential equations (continuity and momentum), which are complex and cumbersome. Following the success of the steady state analysis
of pipeline network, this study extends the usage of the electrical analogy method by combining resistance with the theoretically derived
models of capacitance and inductance. This method leads to a set of first-order ordinary differential equations for transient analysis of
isothermal gas flows in pipeline network. Solving the proposed first-order ordinary differential equation is definitely much simpler than
solving the set of partial differential equations. The computational advantages of the present method are demonstrated by comparing them
with the conventional methods when applied to a range of pipe network simulation examples. ©2000 Elsevier Science S.A. All rights
reserved.
Keywords: Electrical analogy; Gas pipeline; Capacitance, inductance and resistance; Steady and transient analysis; Isothermal flows
1385-8947/00/$ – see front matter ©2000 Elsevier Science S.A. All rights reserved.
PII: S 1 3 8 5 - 8 9 4 7 ( 9 9 ) 0 0 1 2 2 - 9
170                                  S.L. Ke, H.C. Ti / Chemical Engineering Journal 76 (2000) 169–177
                                                                        ∂(ρv) ∂P             hϕ i
several factors, such as the roughness and geometric proper-                   +     + 2ρv 2
                                                                                               f
                                                                                                  =0                              (5)
ties of a pipe, the viscosity of the fluid and the flow rate. The         ∂t     ∂x           D
capacitance effect of a pipeline can be directly attributed to          The discharge Q may be written as
the compressibility of the fluid. The inductance effect of a
pipeline is believed to be due to the kinetic energy of the             Q = vA                                                    (6)
fluid [12].                                                             Substituting Eq. (6) into Eqs. (4) and (5) gives
                                                                         ∂P   ρa 2 ∂Q
                                                                            +         =0                                          (7)
3. Derivation of models for basic elements                               ∂t    A ∂x
                                                                         ∂Q A ∂P      2ϕf Q|Q|
   The models of resistance and capacitance have been in-                   +       +          =0                                 (8)
                                                                         ∂t   ρ ∂x      DA
troduced in a previous work [10]. However, it is intended
that the models of the three basic elements be derived from             Rearranging Eqs. (7) and (8), transient flow through the
Eqs. (1a) and (1b) directly, such that the formulation of the           horizontal pipe can be represented by the following set of
models is explicated theoretically.                                     equations:
   Due to pressure change involved in a transient process,               ∂Q    A ∂P
the control volume may be compressed or expanded, so the                    =− 2                                                  (9)
                                                                         ∂x   ρa ∂t
Continuity equation, that is Eq. (1a), can be changed to the
                                                                        ∂P       ρ ∂Q 2ϕf ρQ|Q|
following form [1]:                                                         =−          −                                       (10)
                                                                        ∂x       A ∂t        DA2
∂P    ∂P        ∂v
   +v    + ρa 2    =0                                         (2)       Taking into account that
∂t    ∂x        ∂x
where a is the acoustical wave velocity.                                Mass flow rate = ρQ = ρn Qn
   The Momentum equation, that is Eq. (1b), may be rear-                where the subscript n refers to quantities at standard condi-
ranged by multiplying A, the cross-sectional area of pipe to            tions of pressure Pn ∼
                                                                                             = 0.1 MPa and temperature Tn = 288 K.
give                                                                       The governing equations become
∂(ρvA) ∂(ρvAv) ∂(P A)                                                    ∂Qn     A ∂P
          +            +                                                     =−                                                 (11)
  ∂t            ∂x h i ∂x                                                 ∂x    ρn a 2 ∂t
                     ϕf
          + 2ρAv 2        + ρAg sinθ = 0                                ∂P      ρn ∂Qn      2ϕf ρn Qn |Q|
                     D                                                      =−          −                                       (12)
                                                                        ∂x       A ∂t           DA2
The first two terms of the above may be expanded as follows:
                                                                        Based on Eq. (11), we obtain
∂(ρvA) ∂(ρvAv)    ∂(ρA)        ∂v     ∂(ρvA)
      +        =v         + ρA     +v                                   Qn (x, t) − Qn (x + 1x, t)
   ∂t     ∂x        ∂t         ∂t       ∂x                                                                     
                       ∂(v)                                                            ∂Qn           A1x       ∂P
                +ρvA                                                       = QC = −         1x =                                (13)
                         ∂x                                                             ∂x           ρn a 2    ∂t
or                                                                      where QC is the change in flow rate in a pipe dependent on
                                    
∂(ρvA) ∂(ρvAv)      ∂(ρA) ∂(ρvA)                                        compressibility of the fluid.
      +        =v           +
   ∂t     ∂x          ∂t        ∂x                                         Therefore, for the consideration of capacitance effect in
                      ∂v        ∂(v)                                    a pipeline network, the relationship between pressure and
                +ρA       + ρvA                                         flow rate with capacitance can be made analogous to voltage
                      ∂t          ∂x
                                                                        and current relationship across an electric capacitor in the
From the Continuity equation Eq. (1a), the term in bracket              following form:
vanishes; therefore, the Momentum equation becomes
                                                                                                             dV
  ∂(vA)        ∂(vA) ∂(P A)              hϕ i                           Nodal approach           J =G                           (14)
                                            f                                                                dt
ρ        + ρv          +       + 2ρAv 2                                                                      Z
    ∂t          ∂x        ∂x              D                                                              1
         + ρAg sinθ = 0                                (3)              Mesh approach            V =              J dt          (15)
                                                                                                         G
In most engineering applications, the convective acceleration           where G is the capacitance, reflecting the capacitance effect
terms, v [∂v/∂x] ; v [∂P /∂x] and the slope term are very               in a pipeline. Comparing Eq. (14) with Eq. (13), the capac-
small compared to the other terms in the above equations                itance has the following form:
and may be neglected [1]. After dropping these terms from
Eqs. (2) and (3), the following are obtained:                                  A1x       Vp
                                                                        G=            =                                         (16)
                                                                               ρn a 2   ρn a 2
∂P        ∂v
   + ρa 2    =0                                               (4)       where Vp is the volume within the pipe.
∂t        ∂x
                                    S.L. Ke, H.C. Ti / Chemical Engineering Journal 76 (2000) 169–177                               171
  For gas distributing system under isothermal conditions,             flow rate is analogous to the Ohm’s law and can be repre-
we can write the equation of state in the form [8]                     sented by the following equations:
       P   zRg T                                                       Mesh approach           V = ZJ                              (25)
a2 =     =                                                  (17)
       ρ    MW
                                                                       Nodal approach           J = YV                             (26)
Substituting Eq. (17) into Eq. (16), we get
                                                                       The mathematical model for resistance in a pipeline network
   Vp MW
G=                                                          (18)       depends on the various equations describing the friction fac-
   ρn zRg T                                                            tor relationship between pressure drop and flow rate. Wey-
Similarly, from Eq. (12), we obtain                                    mouth equation has been used in the previous work [10] on
                                                                       Osiadacz’s sample networks [8]. Other equations used in the
                                         ∂P      ρn 1x ∂Qn             present study are listed as follows [8]:
P (x, t) − P (x + 1x, t) = −1P = −          1x =
                                         ∂x        A     ∂t               Lacey’s equation — (for the pressure range of 0–75 mbar
                               2ϕf ρn Qn |Q|1x                         gauge):
                             +                          (19)                                      
                                     DA2                                                      12
                                                                       ϕf = 0.0044 1 +                                        (27a)
We assume                                                                                  0.276D
           ρn 1x ∂Qn
−1PL =                                                      (20)       The Polyflo equation — (for the pressure range of
             A    ∂t                                                   0.75–7.0 bar gauge):
and                                                                    s
                                                                          1
           2ϕf ρn Qn |Q|1x                                                  = 5.338Re0.076 η                        (27b)
−1PR =                                                      (21)         ϕf
                 DA2
where (−1PL ) is the pressure drop required to accelerate a            The Panhandle ‘A’ equation — (for the pressure range above
given mass of fluid [6], which is due to inductance effect and         7.0 bar gauge):
is proportional to the rate of change of flow; and (−1PR )             s
is the pressure drop due to frictional resistance to flow. It             1
                                                                             = 6.872Re0.073 η                                (27c)
is noted that Eq. (21) is the same as the Darcy–Weisbach                 ϕf
formula. Therefore, the total pressure drop of a pipe is the
sum of the pressure drop due to resistance effect and the              where η is the efficiency factor accounting for the additional
pressure drop due to inductance effect across the pipe.                frictional or drag losses other than losses due to viscous
   For the inductance effect in a pipeline network, based on           forces.
Eq. (20) and the analogy between electrical and hydraulic
flow, the analogous relationships for inductance relating to
pressure drop and flow rate have the following forms, which            4. Derivation of equations for the transformation
are analogous to voltage and current relationship across an            approach
electric inductor:
                                                                          In order to derive the mathematical model for transient
                           dJ
Mesh approach        V =L                                   (22)       flow analysis, some of the fundamental assumptions used in
                           dt                                          the conventional methods are also applied. These assump-
                            Z
                         1                                             tions are (i) one-dimensional and isothermal flow, and (ii)
Nodal approach       J =      V dt                          (23)
                         L                                             applying the steady state friction factor equation to transient
                                                                       flow [1,8].
where L is the inductance, reflecting the inductance effect               As mentioned above, the change of flow rate across a
in a pipe. Comparing Eq. (22) with Eq. (20), the inductance            pipe with time is due to compressibility of the fluid, i.e.
has the following form:                                                the capacitance effect. The pressure drop of a pipe is the
       ρn 1x                                                           sum of the pressure drop due to resistance effect and the
L=                                                          (24)       pressure drop due to inductance effect across the pipe. A
         A
                                                                       typical branch of fluid network with transient flow can be
The mathematical representation of the resistance effect in            represented as an electrical circuit and be visualised in Fig. 1.
a pipeline network has been employed in the steady state               The resistance and inductance are proposed to be connected
analysis. The adaptability of this model has already been              in series, and the capacitance and resistance are proposed to
demonstrated by many workers [2,3,10,11]. It can be ex-                be connected in parallel.
pressed either in the forms of impedance Z or admittance Y,               Based on Fig. 1, the following relationships can be drawn:
which correspond to the mesh or nodal approach. The rela-
tionship between the resistance with the pressure drop and             V = V1 + V2                                                 (28)
172                                      S.L. Ke, H.C. Ti / Chemical Engineering Journal 76 (2000) 169–177
                                                                            Substituting
                                                                            V1b = A·s
                                                                                   b V1s                                               (38)
                                                                            into Eq. (36), the following equation is obtained:
                                                                                                                    
                                                                                                         bb ·s dV1s
                                                                            J s = As·b Y bb A·s  V
                                                                                                b 1s + G   A b
                                                                                                                dt
                                                                                                           bb ·s dV1s
                                                                                = As·b Y bb A·s
                                                                                             b V1s + A·b G Ab
                                                                                                       s
                                                                                                                                       (39)
                                                                                                                  dt
                                                                            When Eqs. (39) and (37) are extended to open path and
                                                                            closed path frameworks, they become
                                                                             o  o                            
                                                                              J       A·b     bb ·o ·c        V1o
                                                                                   =         Y [Ab |Ab ]
                                                                              Jc      Ac·b                    V1c
                                                                                        o                              
                                                                                         A·b     bb ·o ·c        dV1o /dt
                                                                                     +         G [Ab |Ab ]                   (40)
                                                                                         Ac·b                    dV1c /dt
                                                                                  " ·b #                     o       
                                                                              V2o       Co                     dJ /dt
                                                                                    =         L   [C b
                                                                                                       |C
                                                                                                bb ·o ·c
                                                                                                          b
                                                                                                            ]                (41)
                                                                              V2c       Cc·b                   dJ c /dt
                                                                            As
                                                                            V1o = Eo + e1o = Co·b Eb + e1o                             (42)
J = J1 + J2                                                                                        de1o
                                                                 (32)              +Ao·b Gbb A·o
                                                                                              b                                        (46)
                                                                                                    dt
For the nodal approach [14]
J1b = Y bb V1b                                                   (33)       J c = Ac·b Y bb A·o  ·b              c bb ·c ·b
                                                                                             b (Co Eb + e1o ) + A·b Y Ab Cc Eb
         dV1b                                                                                      de1o
J2b = Gbb                                                        (34)              +Ac·b Gbb A·o
                                                                                              b                                        (47)
          dt                                                                                        dt
Based on Eq. (22),                                                                               dJ o                 dJ c
                                                                            e2o = Co·b Lbb C·o
                                                                                            b
                                                                                                      + Co·b Lbb C·cb                  (48)
             dJ b                                                                                 dt                   dt
V2b = Lbb                                                    (35)           Rearranging Eq. (46), we have
              dt
Applying the transformation theory [14],                                     de1o
                                                                                = [Ao·b Gbb A·o  −1 o    o bb ·o  ·b
                                                                                                b ] [J − A·b Y Ab (Co Eb + e1o )
                                                         dV1b                 dt
J s = As·b J b = As·b (J1b + J2b ) = As·b Y bb V1b + Gbb                            +Ao·b Y bb A·c  ·b
                                                          dt                                     b Cc Eb ]                       (49)
                                                             (36)           Eqs. (47) to (49) are the governing equations for transient
                      dJ s                                                  pipe flow system with a constant pressure source; and they
V2s = Cs·b Lbb C·sb                                              (37)       are a set of first-order ordinary differential equations. Hence,
                      dt
                                     S.L. Ke, H.C. Ti / Chemical Engineering Journal 76 (2000) 169–177                                    173
5. Computational scheme
6. Sample networks
                                                                                 Table 2
                                                                                 Pipe data of the third sample network
                                                                                            Length    Diameter     Initial flow     Inlet
                                                                                            (mile)    (in.)        rate (MSCFH)     pressure
1              1             3          0.6                        80000
2              1             2          0.6                        90000         7. Results and discussion
3              2             3          0.6                       100000
    aρ   = 0.7165 kg m−3 ; S = 0.6; T = 278 K; tmax = 86,400 s.
                                                                                    The dynamic pressure response at the outlet of the first
                                                                                 sample network as simulated by the derived model is pre-
                                                                                 sented in Fig. 4. The computation time spent for solving the
   The last sample network is a straight pipe having a uni-                      examples ranges from approximately 10 s to 5 min, depend-
form diameter. This sample network was used by LRS in                            ing on the different time steps used.
demonstrating the versatility of their program PAN. Ini-                            Simulation results of the second sample network using
tially, the pipe was in a steady state; the demand then in-                      the present model is compared with the results from the
creased by 50% in a step change and was held constant                            literature. These are shown in Figs. 7 and 8.
thereafter. The pressure at the inlet, P1 , was held constant,                      It can be seen that the results obtained by using the present
while the pressure at the outlet, P2 , fell to a new steady state                method are comparable with those in the literature. The de-
value. In this case, each pipe is cut into four segments and                     viation is less than 9% for the first example and 1% for the
the capacitance of each segment is four times the capaci-                        second example. When the last sample network was anal-
tance of the pipe. The analysis was carried out for five dif-                    ysed, it was found that the average simulated pressure re-
ferent pressure ranges which corresponded to typical pres-                       sponse was higher than the LRS result by around an average
sure range for low, medium and high. The operating condi-                        of 10% (the maximum error is around 27% for the case of
tions are listed in Table 2. The LRS results are depicted in                     lowest pressure). This result shows that the response was
Figs. 9–13.                                                                      slower, due to the high value of capacitance. Upon further
                                       S.L. Ke, H.C. Ti / Chemical Engineering Journal 76 (2000) 169–177                           175
            Fig. 7. The variation of pressure at Node 2.                  Fig. 9. Comparison of simulated pressure with the LRS result
                                                                          (P1 = 350 psig).
investigation, it was found that, when the temperature was                Fig. 10. Comparison of simulated pressure with the LRS result
decreased, the capacitance became larger and the response                 (P1 = 180 psig).
slowed down. As most pipes were buried underground and
the pipe wall temperature subjected to daily temperature
change, the assumption of isothermal condition made in the
derivation of Eq. (18) might not satisfy the LRS conditions.
In order to avoid a more complicated model of considering
the conservation of energy, an efficiency factor is adopted in
the present study to consider the deviation from the assump-
tion of isothermal flow condition. After numerous trials, a
factor of 0.65 was selected based on the first case of LRS
result (P1 = 350 psig). It was found that the same factor of
0.65 would fit the other four cases of LRS with a maximum
error of 7%. The results are depicted in Figs. 9–13.
   Convergence is normally a common problem in the anal-
ysis of pipeline network. However, in this present study, it-
eration process is only required in the part of steady state
analysis; and the solution of transient analysis can be ob-
tained without any convergence difficulty. Moreover, the
steady state analysis was carried out using the robust trans-
formation method [3,11], and hence, convergence problem                   Fig. 11. Comparison of simulated pressure with the LRS result
was manageable.                                                           (P1 = 25 psig).
176                                     S.L. Ke, H.C. Ti / Chemical Engineering Journal 76 (2000) 169–177
8. Conclusion
9. Nomenclature
VP         volume within pipe                                             [2] B. Gay, P. Middleton, The solution of pipe network problems, Chem.
v          fluid velocity                                                     Eng. Sci. 26 (1971) 109–123.
Y          contravariant tensor for admittance used in                    [3] B. Gay, P.E. Preece, Matrix methods for the solution of fluid network
                                                                              problems Part I. Mesh methods, Trans. Inst. Chem. Engrs. 53 (1975)
           the nodal approach                                                 12–15.
Z          contravariant tensor for impedance used in                     [4] London Research Station, Proceedings of PAN Presentation, British
           the mesh approach                                                  Gas Corporation, 27 February 1974.
z          compressibility factor                                         [5] S.D. Millston, Electric analogies for hydraulic analysis Part 1. System
η          efficiency factor                                                  components, Machine Design December (1952) 185–189.
                                                                          [6] S.D. Millston, Electric analogies for hydraulic analysis Part 2. Tubing
ϕf         Fanning friction factor                                            characteristics, Machine Design January (1953) 166–170.
ρ          density of fluid                                               [7] G. Murphy, D.J. Shippy, H.L. Luo, Engineering Analogies, Iowa
                                                                              State University Press, IA, 1963.
9.1. Index symbols                                                        [8] A.J. Osiadacz, Simulation and Analysis of Gas Networks, E. & F.N.
                                                                              Spon, London, 1987.
                                                                          [9] C.G. Segeler, M.D. Ringler, E.M. Kafka, Gas Engineers’ Handbook,
b        index used in tensor form, indicating that                           AGA, NY, 1969.
         the tensor is in primitive framework                            [10] W.Q. Tao, H.C. Ti, Transient analysis of gas pipeline network, Chem.
c        index used in tensor form, indicating that                           Eng. J. 69 (1997) 47–52.
                                                                         [11] H.C. Ti, K.G. Koh, H.M. Tar, Steady analysis of gas flow in a pipeline
         the tensor is in closed path framework
                                                                              network, in: Proceedings of the 4th Asean Council on Petroleum
o        index used in tensor form, indicating that                           (ASCOPE) Conference & Exhibition, November 1989, Singapore,
         the tensor is in open path framework                                 pp. 484–489.
s        index used in tensor form, indicating that                      [12] J.F. Wilkinson, D.V. Holliday, E.H. Bakey, K.W. Hannah, Transient
         the tensor is in orthogonal framework                                Flow in Natural Gas Transmission Systems, AGA, NY, 1965.
                                                                         [13] E.B. Wylie, V.L. Streeter, Fluid Transients, McGraw-Hill, New York,
                                                                              1978.
                                                                         [14] G. Kron, Tensor Analysis of Networks, MacDonald, London, 1965.
References
                                                                         [15] R.G. Meadows, Electric Network Analysis, The Athlone Press,
                                                                              London, 1972.
    [1] M.H. Chaudhry, Applied Hydraulic Transients, Van Nostrand
        Reinhold, New York, 1987.