Вы находитесь на странице: 1из 6

Chemical

Engineering
ELSEVIER Chemical Engineering Journal 69 ( 1998) 47-52
Journal

Transient analysis of gas pipeline network


W.Q. Tao, H.C. Ti *
Department of Chemical Engineering, National UniversiQ of Singapore, Singapore, Singapore

Receiwd 4 January 1997: revised 21 June 1997; accepted 28 October 1997

Abstract

Traditionally, the governing equations for transient analysis of gas pipeline network involve two partial differential equations, which are
normally solved by complex numerical methods. Following the success of its application in the steady analysis of pipeline networks, the
electric analogy method is extended by combining resistance and capacitance, which leads to a first order ordinary differential equation and
an alternative route to solving the transient problem. Solving the proposed first order ordinary differential equation has been shown to be
much simpler than having to solve the set of partial differential equations normally encountered in other transient models. It is found that the
results obtained are comparable to those obtained from the traditional methods published in the literature. The proposed method is computa-
tionally efficient and is readily applicable as a method for design and control of network systems. 0 199X Elsevier Science S.A.

Keywords: Electric analogy; Gas pipeline: Capacitance and resistance: Steady and transient analysis

1. Introduction (MOC) [ I-31. These methodshave been shown to be suc-


cessful in dealing with transient flow in pipeline networks
Steady stateanalysisof gaspipeline networks is relatively and have been usedfor decadesbut they have disadvantages
simple to implement but it is not often appliedto operational implicit in the solution of the partial differential equations.
gastransmissionsystems.This is becausein a real network, In the presentpaper, a completely different approach,based
demandsand pressuresvary more or lessconstantly and the on an electrical analogy, is usedto model transientsin pipe-
systemis never at steady state.Fast transientsare especially line networks.
important in the event of compressorbreakdowns,or during
peak consumptionperiods. Under such situations,the supply
may not be sufficient to hold all pressuresat their demand 2. Electrical analogies
values.but by allowing the pressureto reduceat certain points
in the system,extra gas can be madeavailable in other parts The analogiesbetween fluid and electrical networks have
of the network. Transient analysisis therefore valuable as a long been realised [4,5] and they have been applied suc-
designtool, and is alsouseful from an operating viewpoint. cessfully in the simulation of steady state pipeline network
Typically, modelsfor transientanalysisof a pipe arebased systems [ 61. It is known from electrical circuit theory that
on the continuity and momentum equations [ 11. From a relationshipsbetween voltage and current can be attributed
mathematical point of view, these equations for transient to three basic elements, viz.. resistance, capacitance and
pipeline network analysisarea setof partial differential equa- inductance. Similarly, becauseof the basicanalogiesbetween
tions with pressureand massor volumetric flow rate asthe electrical circuits and fluid networks, the samethree basic
dependentvariables, and with spaceand time as the inde- elementsare alsopresentin the fluid networks [ 4,5,7] (A.E.
pendent variables. The equations are basically hyperbolic, Fincham, London Research Station, British Gas, private
but can be transformed into parabolic if appropriateassump- communication).
tions are made.The algorithms available for solving the par- The resistanceeffect in a pipeline network is dueto several
tial differential equationsare basedon the implicit, explicit factors, suchasthe roughnessand geometry of the pipes,the
finite difference methods or the method of characteristics viscosity of the fluid and the fluid flow rate. The capacitance
effect of a pipeline network is directly attributable to the
* Corresponding author. Department of Chemical Engineering, National compressibility of fluid. It hasbeensuggestedthat the induc-
University of Singapore, 10 Kent Ridge Crescent, Singapore 119260. tance effect of a pipeline network is due to the kinetic energy
1385-X947/98/$19.00 0 1998 Elsevier Science S.A. All rights reserved
PllS1385-8947(97)00109-5
48 W.Q. Tao, H.C. Ti / Chemical Engineering Journal 69 (1998) 47-52

of fluid [ 11 (A.E. Fincham, London Research Station, British


Gas, private communication). It is this capacitance phenom-
enon which is exploited in the present paper to produce an
alternative method of transient analysis. It is known [7] from fundamental analogy that in general
For the analysis of transient gas flow, the most important termscapacitancehasthe following form:
parameters are gas compressibility and viscosity. They are
A (quantity)
analogous to capacitance and resistance respectively. The Capacitance=
A (potential)
effect of inductance, which correspond:, to kinetic energy of
gas, can be neglected because it is believed to be too small to According to the above definition and if ideal gas law is
be compared with resistance and capacitance effects [ 11. applied, the capacitanceeffect in gaspipeline network canbe
According to electrical circuit theory, the equations for an modelledas:
R-L-C network are a set of second order ordinary differential
equations and that for an R-C network are a set of first order GXd?E (9)
ordinary differential equations. Hence, the transient pipe net- AP pzRT
work can be modelled as a set of first order ordinary differ-
ential equations if the suitable analogous model for resistance
and capacitance are developed.
4. Derivation of mathematical model

3. Model of basic elements In order to derive the unsteady state mathematicalmodel


for pipe networks, someof the fundamentalassumptionsused
3. I. Resistance model in the conventional method must be applied. Theseassump-
tions are one dimensionality and isothermal flow, the steady
The relationship between resistance,pressuredrop and statefriction factor equation be applicable to transient flow
flow rate are governed by the Ohm’s; Law which can be andthe contribution dueto inductancebeingnegligible [ 1,3].
representedby: As mentioned above, resistanceand capacitanceare the
key contributing elementsin the analysis of transient gas
V=ZJ for the Mesh approach, (1)
pipeline network systems.A typical branchof a fluid network
J= YV for the Nodal approach. (2) with transient flow is proposedand is shown in Fig. 1.
It can be seenfrom Fig. 1 that the resistanceand capaci-
Impedanceand admittance are related asfollows:
tance are connected in parallel. Based on this model, the
following relationshipscan be established:
y2 (3)
Z
The exact mathematical model for resistancein a pipe
network dependson the choice of equation describing the
relationship betweenpressuredrop and flow rate. If the Wey-
P i
+ ‘+

mouth equationis used,the resistancefor acompressiblefluid


distribution system has the following form [ 21:

PlfP2
Y= 1.52x 10” D16’” -
LTSzQ
V e

3.2. Capacitance model

For the capacitanceeffect in a pipeline network, the rela-


tionship betweencapacitance,pressureandflow rate canhave
either of the following forms [ 81:
V= H
I
J dt for the Mesh approach, (5)
T
E

I+
J= &$ for the Nodal approach, (6)

where G is the capacitanceand H is the elastance,which are 4.-


related asfollows: Fig. 1. Structure of a branch.
W. Q. Tao, ,Y. C. Ti / Chemical Engineering Joourntrl69 (I 998) 47-52 49

V=ES-e (10)
~=AY,~bA,oVo+A’b~bA~cVc+A~bGbbA;o~ (23)
J=I+i (11)
J=J, +J2 (12) J” = ktob pbAho V, + AYbpbA;’ V, + A?,GbbA,” zde, (24)
Using the Nodal approach [ 9,101 by expressing Eqs. (2) and
(6) in tensorial form, gives, Incorporating Eqs. ( 19) and (20), into Eqs. (23) and (24)
results in:
$= PbVb (13)
J” =AFb p’Ab“( CbbEb + e,)

(14) de
+A: b Y+‘bA.CC‘bE
b c b +A: b GbbA.=> (2-5)
b dt
Applying the transformation theory [ 61: P = A’TbpbAko( CibEb + e,) (26)

S=A”,Jb=AY,(fl+,) =A’,
[
ybbVb+Gbt’x dVb
1 (15) +A”, ~b&c’C;b&, +A‘?,Gbb&’
de,
yy (26)

and since Rearranging Eq. (26) results in:


Vb=A;Vs (16)
substituting Eq. ( 16) into Eq. ( 15)) the following equation
is obtained + A?b ~bA;cc;b&] (27)
Eqs. (25) and (27) are essentially thegovemingequations
JS=A’: ybbA.“v +GbbA.SdV’
b b s
b dt I for transient gas pipe network systems. They are a set of first
order ordinary differential equations. Hence the transient gas
=A~b~bAh‘Vs+Al,GbbAh’~ (17)
network flow problem, governed by the set of two partial
differential equations, can be solved by a set of first order
ordinary differential equations which are much easier to han-
Eq. ( 17) can be expanded to its open and close path frame- dle than the aforementioned partial differential equations.
work becoming: However these equations cannot be solved analytically and

dVo
must be solved numerically.
For a network with known topology, tensors AT’,, Aho, A?,,
AbC, Cbb and Cib can be determined easily. So in a gas trans-

1A?,
IAA ybb[A."(A~C]
b b
c
L-1
It is possible to transform Eq. ( 10) from the primitive frame-
dt

dV
dt
(18)
mission system with varying demand P, (i.e., .P =f( t) ) , the
effect of changing .P on e, can be determined by solving Eq.
(27) which is a set of ordinary differential equations. Once
the dynamic change of e, is known, J” can be calculated from
Eq. (25). After e, and P are found, the branch flows and
nodal pressures of the network at any given time can be
work to the orthogonal framework, giving obtained through the application of the transformation
techniques.
vo=&+e,=c~bEb+e, (19)
V, = E, = C; bEb (20)
5. Computational scheme
For an invariant pressure source Eb (i.e., the pressure
source is constant with time), then the ‘derivation can be Recalling that dependent variables in a transient flow sys-
simplified and Eqs. ( 19) and (20) be differentiated as tem are space and time, the space variable can be fixed, if the
follows: connection data of the pipeline network is known.
Once the topology of pipeline network is determined,
dV,
-=- de, steady state analysis of pipeline network can be carried out
(21)
dt dt to determine the initial values of branch flow rates and nodal
pressures, which are then used to solve the ordinary differ-
dvc
-= 0 (22) ential equation. Steady analysis of a network can be based
dt
either on Mesh method or its dualistic Nodal method. A
Expanding Eq. ( 18) and incorporating Eqs. (2 1) and (22)) general guide for selecting the most suitable method is dis-
results in cussed in the previous papers [ 61 and can be utilized herein.
50 W.Q. Tao, H.C. Ti/Chemical Engineering .lournul69 (1998) 47-52

Redefine the topology of the network


/ to fix the space variable /

boundary condition as
(Calculation can either t’s based on nodal

Calculate G and Y based on the result


of steady state analysis

I
f=b
Set time stea

I
Fig. 3. Sample network.

I TX
Table 1
Solve eqn 27 using Runge Kutta method
Pipe data of sample network

Pipe From To Diameter (m) Length (m)

1 1 3 0.6 80,000
2 1 2 0.6 90,000
3 2 3 0.6 100,000

Fig. 2. Computational flow chart

Once the steady state analysis has been completed, transient


calculation can begin using the general solution method for
ordinary differential equations such as the fourth order Runge
Kutta method. The detailed computation scheme is outlined
“0 2 4 6 8 16 18 20 22 24
in Fig. 2. TZe (:2360&)
Fig. 4. The demand curves at nodes 2 and 3.

6. Results and discussion


where (Y is a constant dependent on temperature and is taken
To illustrate the validity of the mathematical model derived fromRef. [ll].
previously, a simple pipe network which was previously ana- For the purpose of this study, a computer program has been
lysed by Osiadacz [2] is solved in this study. This sample written to run on a Pentium PC with Microsoft FORTRAN
network is shown in Fig. 3, and the physical data are as in 77 compiler. The computation time for solving this example
Table 1. ranges from less than 1 s to 3 min depending on the time steps
Node 1 is the pressure source with a constant pressure of used. The simulated result using the present model as well as
5 MPa. The loads at nodes 2 and 3 varied in accordance with the results extracted from the literature are shown in Figs. 5
the curves depicted in Fig. 4. and 6. It can be seen that the results obtained by using the
The pressure drop equation used 1.n the program is the present method are comparable with that from the literature.
Weymouth equation having the following values of para- The deviation is less than 2% and this slight difference is
meters: f= 0.003; density of gas under standard condition, believed to be due to a different pressure equation being used.
pn= 0.73 kg/m3 and S=O.6. The compressibility factor is Furthermore, Osiadacz used a constant compressibility factor
determined by using the following, for the whole range of his calculation, while the compressi-
W.Q. Tac: H.C. Ti/ Chemical Engineering Journul69 (1998) 47-52 51

ematical model need not be limited to this specific condition.


Under the situation that the pressure source varies with time,
the differentiation of V, and V, with respect to time has the
following forms:

dvc
l,=c;h2 (30)

Upon substitution, the following governing equations are


j
/
:
: /
: :i .-Literature
obtained,
j i j
4.7 : :: : j j / . ---- Calculated
0 4 8 12 16 20 24 28 32 36 40 44 48 f =A:h p’A,O( Cob&, + e,) +A?, PbAic C;lhEh
Time (x 1800 s)

Fig. 5. The variation of pressure at ncde 2. + (A’bGhbA~“C~h+AShGhhA~CC~h) d’%


dt

(31)

2= (AOhGbhAJ - ’ P-A?‘, yb’Ab”( CibEh + e,)

- AUbGbhA,CC,hEb - ( AYh GhhA;“C,b

4,75
\ ... ,
_.....
/ .
..I
4.71!;i;;i;wj...
..!.......
.,.
\
....,......I
.. j_
.
..b.. Hence, the system equations for the situation when pressure
source is one of the causes for transients will be Eqs. (3 1)
and (32). Unfortunately, due to the lack of comparisondata,
0 4 8 I2 16 20 24 28 32 36 40 44 48
Time (x 1800 s)
the validity of this moregeneralmodel hasyet to be evaluated.
Fig. 6. Thevariationof pressure at node 3. The derivation of the systemequationsin the presentpaper
is basedon the Nodal approach.Becauseof the dualismthat
bility factors in this study are calculated at each time interval exists between the Nodal approachand Mesh approach, it is
in anticipation of a more accurately predicted result. obvious that the counterpart of the presentmodel can alsobe
In the present study, the effect of space discretization is derived. However, asthe dual of differentiation isintegration,
also examined. Simulation results with all pipes being divided the mathematicalmodel basedon meshapproachwill contain
into two equal parts and five equal sections are calculated integration parts. From a mathematicalpoint of view, solving
respectively. A comparison of these results shows that space a seriesof ordinary differential equationsis much easierthan
discretization has a negligible effect on the precision of sim- solving a seriesof equationswhich contain integration parts.
ulation result. While the integration parts may be transformedinto ordinary
Furthermore, it is found that the time stlsp also has a neg- differential form through proper techniques,additional effort
ligible effect on the simulation result. However, it is noted is required. So the nodal approachis preferred in the transient
that both space and time discretization have noticeable effect analysisof gas transmissionsystem.
on the computation effort involved. The finer the space or
time steps are, the more computation effort is required. If the
time step is too large, especially when the demand varies 7. Conclusion
sharply at a node, errors may occur. Hence, for large scale
gas pipe networks, a balance has to be struck between the Traditional methodsfor transient analysis of gas flow in
required number of data points and the computation cost. pipeline network require considerable computing effort,
The reason for the computational error is due to the stability which hinders the practical application of transient analysis
of Runge Kutta method and not the mathematical model. This in gastransmissionsystems.The findings of the presentwork
computation error can be avoided by applying a more sophis- showsclearly that advantagescan be achieved by using the
ticated algorithm, such as variable step Runge Kutta algo- electric analogy method for the computation of solutions to
rithm in the program. transientgastransmissionsystem.Insteadof having to handle
In the previous derivation, a specific case of the pressure the original partial differential equations, a set of first order
source being constant with time is considered. But the math- ordinary differential equationscan be solved in their place,
52 W.Q. Tao, H.C. Ti/Chemical Engineering Journal 69 (1998) 47-52

and thus significant reduction in the computation times can T Temperatureof gas, K
be achieved. Another advantage of the present model is that V Covariant tensorfor total pressure,in primitive
the iteration process is only required in the part of a steady framework, V= E+ e, MPa
state analysis. It has been demonstrated that steady state anal- VP Volume of pipe, m3
ysis through the transformation method is extremely robust, Y Contravariant tensor for admittance,usedin
and it is especially suitable for handling initial value prob- nodal approach,m’/s MPa
lems. The method is straight forward, and no convergence Z Covariant tensorfor impedance,usedin mesh
problems exist. approach,MPa s/m3
Z Compressibility factor of gas,dimensionless
P Density of gas, kg/m”
8. Nomenclature
index nomenclature

A Transformation tensor usedfor the nodal b Index usedin tensor form, indicating the tensor
approach to be in primitive framework
C Transformation tensor usedfor the mesh S Index usedin tensor form, indicating the tensor
approach to be in orthogonal framework
J Contravariant tensorfor total flow on a branch or C Index usedin tensorform, indicating the tensor
path, m3/s to be in closedpath framework
D The pipe diameter, m 0 Index usedin tensor form, indicating the tensor
E Covariant tensorfor pressuredeveloped by an to be in open path framework
active sourceacrossa branch or path, MPa Position dot, it is usedto indicate the order of
e Covariant tensorfor pressureacrossa branch or occurrence of the indices
path, MPa
f The friction factor, dimensionless
G Contravariant tensorfor capacitanceusedin References
transient nodal approach,m’/MPa
[I] J.F. Wilkinson, et al., Transient Flow in Natural Gas Transmission
H Contravariant tensorfor elasLance,usedin nodal Systems, American Gas Association ( AGA) 1965.
approach,MPa/m3 [ 21 A.J. Osiadacz, Simulation and Analysis of Gas Network E&FN Spon,
I Contravariant tensorfor flow due to external London, 1987.
input-output on a branch or path, m3/s [ 3 ] J. Kralik, et al., Dynamic Modelling of Large-Scale Networks with
Application to Gas Distribution, Elsevier, Amsterdam, 1988.
i Contravariant tensor for flow, due to other cause
[4] S.D. Millston, Electric Analogies for Hydraulic Analysis Part l-
on a branch or path, m3/s System Components, Machine Design, 1952, pp. 185-189.
J Contravariant tensor for total flow on a branch or [5] S.D. Millston, Electric Analogies for Hydraulic Analysis Part 2-
path, in primitive framework, J=I+ i, m3/s Tubing Characteristic, Machine Design, 1953, pp. 166-170.
L Length of a pipe, m [6] H.C. Ti, et al., Steady Analysis of Gas Flow in a Pipeline Network,
The fourth ASEAN Council on Petroleum (ASCOPE) Conference
M Molecular weight of gas,kg/‘kmol
Proceedings, 1989, pp. 484-489.
AP Pressuredrop acrossa pipe, MPa [7] G. Murphy, et al., Engineering Analogies, Iowa State Univ. Press,
pi7 p2 The pressureat the nodes,MPa 1963.
PW.2 Average pressureof a pipe, MPa [8] F.H. Branin, Problems and Analysis in Science and Engineering,
Volumetric flow rate of gasat standardstate, Chapter 2, Academic Press, 1977.
12
[ 91 H.C. Ti, E.T. Kang. Tensor Analysis of Fluid Network Problems, The
m3/s
fourth Asian Pacific Confederation of Chemical Engineering Congress
R Gas constant, 8.3143 kJ/kmol K (APCChE ‘87), Conference Proceedings, 1987, pp. 569-575.
s The specific gravity of gas,ii: is the ratio of [ lo] G. Kron, Tensor Analysis of Networks, MacDonald, London, 1965.
densitiesbetweengasand air, dimensionless [ 1 I ] G.G. Segeler, et al., Gas Engineers Handbook AGA, 1969.

Вам также может понравиться