You are on page 1of 11

Research Article

Received 15 March 2008 Published online 17 July 2009 in Wiley InterScience

(www.interscience.wiley.com) DOI: 10.1002/mma.1197


MOS subject classification: 76 N 15; 35 L xx

A new model for gas flow in pipe networks


M. Herty,a∗† J. Mohringb and V. Sachersa
Communicated by W. Sprößig
We introduce a new model for gas dynamics in pipe networks by asymptotic analysis. The model is derived from the
isothermal Euler equations. We present the derivation of the model as well as numerical results illustrating the validity
and its properties. We compare the new model with existing models from the mathematical and engineering literature.
We further give numerical results on a sample network. Copyright © 2009 John Wiley & Sons, Ltd.

Keywords: pipe networks; asymptotic analysis; gas dynamics

1. Introduction
Recently, there has been an intense discussion on physical phenomena on graphs and in particular in the context of gas dynamics.
Without necessarily giving a complete list of references on this topic, we refer to [1--9] and to publications of the Pipeline Interest
Group [10] or textbooks, like [11--15].
In particular the precise but cheap (in the sense of computing time) prediction of gas dynamics in pipe networks poses a major
industrial problem and has been under investigation for several years [16--21]. In gas dynamics, the dominant physical phenomenon
is the pressure loss due to pipe wall friction effects. Nowadays, several models exist describing this effect on different levels of
accuracy. Most of these models are based on isothermal Euler equations, i.e. a system of nonlinear partial differential equations
(PDEs) on each pipe. The main difficulty is the nonlinear dynamics induced by the PDE, which limits the possibility of efficiently
and precise simulations in pipes and networks of pipes, see, for example, the computational times summarized below in Table I.
In this paper we address the problem of modeling and simulation of gas dynamics in pipes. We present a new model obtained
by asymptotic analysis in the pressure variable. The derived model is based on ordinary differential equations (ODEs) and yields
qualitatively comparable results for common slow inlet and outlet pressure changes. We give the detailed derivation as well as
numerical results showing the validity of the proposed model and its computational cost.

2. Review of existing models


We review several commonly used models in the following subsections. The most detailed model is given by the isothermal Euler
equations (3a), (3b). Simplifying these equations step by step, we obtain the Weymouth or wave equation type model (4), followed
by the equations from the software package SIMONE (5) and the quasi-static or algebraic model (6).
Many approximate models are based on the isothermal Euler equations, which are in turn a simplification of the Euler equations.
They are obtained from the isentropic equations, which in turn are derived from the Euler equations under the assumption that
the energy equation is redundant. In the isothermal Euler equations, the temperature is constant and
ZRT
p=  (1)
Mg

where p is the pressure, Z is the natural gas compressibility factor, R the universal gas constant, T the absolute gas temperature,
Mg is the gas molecular weight and  the density.

a Fachbereich Mathematik, TU Kaiserslautern, Germany


b Fraunhofer Institut für Techno– und Wirtschaftsmathematik, Kaiserslautern, Germany
∗ Correspondence to: M. Herty, RWTH Aachen University, Templergraben 55, D-52074 Aachen, Germany.
† E-mail: herty@mathc.rwth-aachen.de

Contract/grant sponsor: DFG SPP; contract/grant number: 1253


845

Contract/grant sponsor: DAAD; contract/grant number: D/06/28176


Contract/grant sponsor: Seed Funds (RWTH Aachen); contract/grant number: HE5386/6-1

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

Table I. CPU times for computing the solution to the isothermal Euler equations, the new approximation
and the quasi-static model for different numbers of grid points t in time and a single pipe.
t
10−1 10−2 10−3
Isothermal model (3a), (3b) 211.54 s 2119.2 s >5 h
Quasi-static model (6) 0.02 s 0.17 s 1.63 s
New model 0.11 s 1.11 s 11.08 s
CPU times for the Weymouth-equation are similar to the isothermal model.

To keep the presentation simple, but still complex enough to model real-world applications [5, 9, 22], we assume from here on:
there is negligible wall expansion or contraction under pressure loads; i.e. pipes have constant cross-sectional area A. All pipes have
the same diameter D, A = D2 / 4. The constant a2 = ZRT / Mg , i.e. the sound speed is the same for all pipes in the network. In all
pipes we assume steady-state friction [5, 21]. The friction factor  is calculated using Chen’s equation [23]
  
1 / D 5.0452 1   1.1098 5.8506
√ := −2 log − log + (2)
 3.7065 NRe 2.8257 D 0.8981NRe
where NRe is the Reynolds number NRe = uD / ,  the gas dynamic viscosity and  the pipeline roughness, which are again assumed
to be the same for all pipes.
The starting point for all simplifications and therefore also the benchmark dynamics are given by the isothermal Euler equations

t +qx = 0 (3a)
 
q2 q|q|
qt + +a2  = − −ghx (3b)
 2D
x
where  is the density, q = u the flux in the pipe and g the gravity constant. The first equation states the conservation of mass
and the second equation is the momentum equation. The system is a hyperbolic balance law including friction and gravity effects
(described by ghx ). The computational effort of a pipeline network simulation using these equations is costly, see Table I.

2.1. Weymouth equations


A first approximation uses a wave equation type model [6] as follows: Rewriting the momentum equation in (3) we obtain
  
2 q2 q|q|
qt + a  1+ 2 2 = − −ghx
 a 2D
x

Typical values [8] for a high-pressure gas pipe are q /  ≈ 10 m / s, a ≈ 300 m / s and a2  ≈ 70 bar. For a pipe of length L = 100 km
and t = 1 h we obtain that the momentum term q2 /  is of order 10−3 whereas the friction is still of order O(1) for  / D = O(10−2 ).
Therefore, typically as an approximation the term *x (q2 / ) is dropped and we obtain a wave equation as
q|q|
t +qx = 0, qt +a2 x = − −ghx (4)
2D
However, from a computational point of view this approximation (also known as the Weymouth equations) is still expensive, since
it amounts to solve a linear system of hyperbolic PDEs for each pipe.

2.2. SIMONE-approximation
Another widely used approximation is implemented in the SIMONE-software package, see also [24, 25]. Of course, the detailed
models behind the software are not completely published. The following derivation is based on [24], which is part of an early
version of the SIMONE simulation program.
Starting from the isothermal Euler equation (3), these equations are obtained by integration along the pipe. We denote by u0
and uL , the quantities at both ends of the pipe and let v = q /  be the velocity of the gas. It is assumed that vx = 0, i.e. v is constant
along the pipe. This assumption is motivated by the fact that the changes of the velocity of the gas in the pipe are very small
compared with the changes of the pressure. Integrating Equation (3b) then yields
 L  L
|v|
a2 (L −0 )+v(qL −q0 )+ qt + q dx = −g hx dx
0 2D 0
Using the trapezoidal rule to approximate the integral on the left side and the harmonic mean to approximate  in the integral on
the right side, we find
 L
L L|v| 2 
846

a2 (L −0 )+v(qL −q0 )+ (q0 +qL )t + (q0 +qL ) = −g 0 L hx dx


2 4D 0 +L 0

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

and (3a) yields


L
qL −q0 + ·(0 +L )t = 0
2
Using the same quantities as in the derivation of the Weymouth equation we observe that
L|v|
v(qL −q0 )  (q0 +qL )
4D
and henceforth, the term v(qL −q0 ) is skipped. The final model then reads
L
qL −q0 + ·(0 +L )t = 0 (5a)
2
L L|v|
a2 (L −0 )+ (q0 +qL )t + (q0 +qL ) = −g(h
˜ L −h0 ) (5b)
2 4D
To solve this system of equations, a combination of implicit and explicit Euler methods is proposed in [24] with the weighting
parameter  = 0.473 of the explicit part and 1− of the implicit part. Here,
q0 +qL
v=
0 +L
and
20 L
˜ =
0 +L
are always evaluated at the previous time step, making the scheme explicit in v and .
˜

2.3. Quasi-static model


Commonly used in the engineering community is the so-called quasi-static model [16, 25]. To obtain this model, it is assumed that
the flow in the pipe is stationary and gravity and inertia effects are neglectable. Under these assumptions, (3) reads
q|q|
qx = 0, a2 x = −
2D
which is solved explicitly as (using the same notation as before)

q = const, 2 (x) = 20 − 2 q|q|x
a D
The pressure drop in a pipe of length L is therefore given by

a2 L
p20 −p2L = 2 Q|Q| (6)
A D
where Q = Aq is the throughput. We will later refer to Equation (6) as the quasi-static model. The quasi-static model, however is not
able to resolve the dynamics inside the pipe and is thus in some cases not accurate enough.

2.4. Coarse grid


Finally, in [5], an approximation given by a two-point central-difference discretization of (3) has been introduced and subsequently
used for optimization problems for the compressor control. Arising nonlinearities are discretized, using mixed-integer programming
techniques. Clearly, this yields a very coarse description of the dynamics inside a pipe and does often not provide enough details
for simulation purposes, see [5] for more details.

3. Derivation of the new approximation


In the following we will compare the new derived model with the benchmark case (3), the SIMONE-approximation (5) and the
quasi-static model (6).
We start by neglecting inertia and gravity effects, which are comparatively small in realistic pipe networks, c.f. the derivation of
the Weymouth equation. Under these assumptions, (3) reads

t +qx = 0 (7a)
847

q|q|
a2 x = − (7b)
2D

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

Since in industrial applications, the quantities of interest are pressure and throughput, we rewrite Equation (7) in terms of p and
Q = Aq.

a2
pt + Qx = 0 (8a)
A
a2
2p·px + Q|Q| = 0 (8b)
DA2
In general, it seems impossible to find analytic solutions. However, if we consider a situation where pressure changes only moderately
we can find approximations, which are analytical and accurate. This will allow us in the following to express the mass flux at one
end of the pipe in terms of the pressures and their time derivatives at both ends.
To make notations simpler, we pass to non-dimensional quantities
p Q x t
p̃ = , Q̃ = , x̃ = , t̃ =
p0 Q0 x0 t0
where p0 is a typical pressure, Q0 a typical mass flux, and

DA2 p20
x0 =
a2 Q20

DA3 p30
t0 =
a4 Q30

Expressed in non-dimensional quantities, Equations (8) become

0 = pt +Qx (9a)

0 = (p2 )x +|Q|Q (9b)

Here and henceforth we skip the ∼ on top of the non-dimensional quantities. In the following, we assume furthermore that the
pressure is monotonously increasing along the pipe. Substituting Equation (9b) into Equation (9a) yields

Q = − (p2 )x (10a)

pt = ( (p2 )x )x (10b)

Next, we consider classes of solutions of Equation (10b) corresponding to boundary pressures that have the same shape, but change
on different time scales. The idea is that the solutions for these similar, but stretched boundary conditions will also be similar, but
stretched up to a small correction. This may be expressed mathematically by the following ansatz:

p(t, x) = p0 (t, x)+p1 (t, x)+O(2 ) (11)

where  is the scaling factor. A small  corresponds to a highly stretched shape of the boundary pressures. Let

 = t

be a normalized time. Rewriting Equation (10b) in terms of p0 , p1 , and , and applying Taylor expansion we end up with
⎡ ⎤

(p p )
·(p0 )t = ( (p20 )x )x + ⎣ ⎦ +O(2 )
0 1 x

(p20 )x
x

As the asymptotic expansion (11) has to hold for all  sufficiently small we find:

0 = ( (p20 )x )x (12a)
⎡ ⎤
(p p )
(p0 )t = ⎣ ⎦
0 1 x
(12b)
(p20 )x
x
The general solution of this system reads

p0 = a x +b (13a)
848

4 a (x +b)2 + 2 ab (x +b)+c(x +b)1/2 +d(x +b)−1/2


p1 = 15 (13b)
 3 

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

where the coefficients a, b, c, and d are functions of  only and can be determined from the boundary conditions. We denote by
a and b the derivatives of a and b with respect to .
Let PA () and PB () define the shapes of the boundary pressures at the pipe ends, i.e.

pA (t) = PA (t), pB (t) = PB (t)

This implies that p0 has to coincide with PA and PB at the pipe ends, i.e. at x = 0 and x = l, where l = L / x0 is the non-dimensional
length of the pipe. Furthermore, p1 has to vanish there. This yields

PB2 −PA2
a= (14)
l

lP2
b= 2 A 2 (15)
PB −PA
4 [a(b5/2 −(l +b)5/2 )]
c = 15l (16)


We find later that d can be omitted. The flux can be computed using Equations (10a), (11), (13a), and (13b).
⎡ ⎤

(p p )
Q = − ⎣ (p0 )x + ⎦ +O(2 )
2 0 1 x
2
(p0 )x
 
2
= −a− (a(x +b)3/2 ) +c +O(2 ) (17)
3

Now, we choose the shape functions of the boundary pressures such that they coincide with the real boundary pressures. Math-
ematically, this amounts to choose  = 1. Hence, we find an approximate formula for QA = Q(0) by ignoring higher-order terms in
, setting  = 1, x = 0, and substituting Equations (14)–(16) into Equation (17). QB = −Q(l ) is found by setting x = l. The minus sign
accounts for the fact that Q(l ) is directed to the right, whereas QB is defined as the flow into the pipe at point B and, therefore, is
directed to the left.
  
p2B −p2A 2 p3A 4 p5A −p5B
QA = − +l − (18a)
l 3 p2 −p2 15 (p2 −p2 )2
A B A B t
  
p2B −p2A 2 p3B 4 p5B −p5A
QB = +l 2 2
− (18b)
l 3 p −p 15 (p2 −p2 )2
B A B A t

The derivation is based on the fact that pressure is increasing from A to B. If the pressure decreases we have to interchange the
roles of A and B. Hence, the general representation of QA reads:
  
|p2A −p2B | 2 p3A 4 p5A −p5B
QA = sgn(pA −pB ) +l − (19)
l 3 p2 −p2 15 (p2 −p2 )2
A B A B t

Applying the time derivative and returning to dimensional variables according to Equation (3), we finally find the following equation:


QA = sgn(pA −pB ) |p2A −p2B | (20a)

(6p2A +18pA pB +16p2B )pA *pA


+
(20b)
15(pA +pB )3 *t

(4p2A +12pA pB +4p2B )pB *pB


+
(20c)
15(pA +pB )3 *t

DA2 AL
= ,
= 2
a2 L a

The equation for QB is obtained by interchanging the roles of A and B.


The new model consists of the given boundary data at both ends of the pipe given by pA and pB and Equation (20) for the flux
849

QA (t) and QB (t), respectively.


Some remarks are in order.

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

Remark 3.1

• We observe that Equation (20) consists of the quasi-static model (20a) modified by two correction terms (20b) and (20c)
containing the derivatives of the boundary pressures. Clearly, if the boundary pressures vary too fast, the quality of the
approximation suffers, c.f. the numerical results in Section 4, Figure 2.
• The assumption of a monotonously increasing (or decreasing) pressure is important since the model cannot deal with changing
flux directions. This is typically due to fast changing boundary data, which is not the standard operation condition for pipelines.
The model gives, however, reasonable results even for oscillating boundary pressures, see Figure 3 in Section 4.
• The model is independent of the parametrization of the pipe and inlet and outlet of the pipe has not to be distinguished. This
makes the model easy to translate to a network setting as seen below.
• The model is efficiently computable as the following table shows. All computations are performed in Matlab using a second-order
finite volume scheme for the resolution of the isothermal Euler equations satisfying the CFL-condition.

4. Numerical comparison of different models


For the numerical results we use the following set of real-world parameters:  = 0.011, a = 377.9683 m / s, D = 0.5 m, L = 100 km and
therefore = 1.5663×10−5 and
= 0.0687. Furthermore, the initial configuration of the pipe is given by the stationary state with
pressure pA (0) at the inlet and pB (0) at the outlet of the pipe. The computations are performed on a horizontal pipe. The inlet
pressure is pA = 65 bar and the outlet pressure pB varies smoothly from pB (0) = 40 bar to pB (T) = 45 bar for some fixed time T. We
give results for two test cases with fast and slow changing inlet pressure profiles and oscillating profiles (Figure 1), respectively.
(1) pB (t) = pB (0)+(pB (T)−pB (0))(1−cos((t / T))), where T is the transition time. We report on results for transition times of T =
1, T = 3 and T = 6 h.
(2) pB (t) = pB (0)+(pB (T)−pB (0))(1−cos(4(t / T))) and a final time T of 12 h in our second test case.
The isothermal Euler equations are discretized using a second-order relaxed method with adaptive characteristics speeds, see
[26--28]. The underlying grid has 2001 spacial points and uses a CFL-condition of 0.49.
Figure 2 shows a comparison of the new approximation, the isothermal Euler equations as benchmark model and the two most
common models for industrial applications (quasi-static, SIMONE). The new model is clearly a good approximation of the benchmark
model for slowly varying pressures. In our test case (1) especially the behavior at the pipe inflow is much better compared with the
prediction of the existing models.
Figure 3 compares the behavior of different models for oscillating boundary pressures. The qualitatively good behavior of the
new model for oscillating boundary pressures illustrates that the important assumption on the constant flow direction but not on
the monotonicity of the (boundary) pressure change.

5. Extension to a pipe network


Before we discuss the extension of the new approximation to a network of pipes, we introduce two main assumptions. We assume
that there is no vacuum present, i.e. j >0, and that all states are subsonic, i.e.

q2j
<a2 (21)
2j

We further assume that friction is present only inside each pipe j. Furthermore, all pipes are horizontal. The density and flux in pipe j
are denoted by j and qj , respectively. We model a network of pipes as a directed, finite graph (J, V). Each edge j ∈ J corresponds
to a pipe. Each pipe j is modeled by an interval [xja , xjb ]. Each vertex v ∈ V corresponds to an intersection of pipes. For a fixed vertex
v ∈ V, we denote by − +
v ( v ) the set of all indices of edges j ∈ J ingoing (outgoing) to the vertex v. On each edge j ∈ J we assume
that the dynamics is governed by the isothermal Euler equations (3) for all x ∈ [xja , xjb ] and t ∈ [0, T] and supplemented with initial
and boundary data.
At each vertex v ∈ V we have to couple systems given by (3) for x ∈ [xja , xjb ], t0, i.e.

*t i +*x qi = 0 (22a)
 
q2i q |q |
*t qi +*x +a i = − i i
2 (22b)
i 2Di

by suitable coupling conditions. The coupling conditions then give boundary conditions at x = xia and x = xib , respectively. The
precise form of the coupling conditions of course influences the dynamics in the pipe and there has been an ongoing discussion on
850

the precise form in recent years, see also [29]. We follow the approach of [1, 30, 31] and state a set of coupling conditions frequently
used in the engineering community [5, 9, 11, 16].

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

6
x 10
46 4.5
4.45
45
4.4
4.35
44
4.3
B
43 4.25
p

4.2
42
4.15
4.1
41
4.05
40 4
0 1 2 3 4 5 6 0 2 4 6 8 10 12
t

Figure 1. Pressure profiles at the outlet of the pipe for test case (1) (left) and test case (2) (right). (Time in hours, pressure in bar.)

QA QB
59 58
new approximation new approximation
isothermal Euler isothermal Euler
58 quasi static model 56 quasi static model

57
54
56
52
55
50
54
48
53

52 46

51 44
0 1 2 3 4 5 6 0 1 2 3 4 5 6
t t
QA QB
64 58
new approximation new approximation
isothermal Euler isothermal Euler
62 SIMONE approximation 56 SIMONE approximation

60 54

58 52

56 50

54 48

52 46

50 44
0 1 2 3 4 5 6 0 1 2 3 4 5 6
t t

Figure 2. Comparison of the resulting boundary fluxes using isothermal Euler equations, the new approximation and the quasi-static model (top) and using
isothermal Euler equations, the new approximation and the SIMONE-approximation (bottom). Test case (1). (Time in hours, flux in kg/s.)

Consider a single vertex v with n connected pipes. We parameterize each pipe i such that xia = 0 and such that xia is the pipe-
to-pipe intersection. Assume initial data Uj0 (x) given on each pipe. A family of functions (Ui )ni=1 is called a solution at the vertex,
provided that Ui is a weak entropic solution in the pipe i and (for Ui sufficiently regular), the following conditions are fulfilled:
n
(C1) i=1 qi (0+, t) = 0 ∀t>0.
(C2) The traces of the pressures at a junction are equal, i.e. pj (0+, t) = pi (0+, t) ∀i, j ∈ {1,. . . , n}.
Note that condition (C1) imposes the conservation of mass at the intersection and is Kirchhoff’s law. Under the assumption (21),
there exists a solution for a single vertex and the conditions (C1) and (C2), see [31]. The condition (C2) is frequently used in the
851

engineering community, but other conditions are possible, see e.g. [2, 32] and in particular we refer to [3, 29] for coupling conditions
yielding a well-posed mathematical problem.

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

QA QB
58 59
new approximation new approximation
isothermal Euler isothermal Euler
58
57 quasi static model quasi static model

57
56
56
55 55

54 54

53
53
52
52
51

51 50
0 2 4 6 8 10 12 0 2 4 6 8 10 12
t t

QA QB
58 59
new approximation
isothermal Euler
57 58 SIMONE approximation

57
56
56
55
55
54
54
53
53
52
52
51 new approximation
isothermal Euler 51
SIMONE approximation
50 50
0 2 4 6 8 10 12 0 2 4 6 8 10 12
t t

Figure 3. Comparison of the resulting boundary fluxes using isothermal Euler equations, the new approximation and the quasi-static model (top) and using
isothermal Euler equations, the new approximation and the SIMONE-approximation (bottom). Test case (2). (Time in hours, flux in kg/s.)

1 M 2

Figure 4. Sample network with three pipes and junction at the origin.

Furthermore, we can include compressors to the network model. We note that a compressor only works in such a way that
attention has to be given to the flow directions. We model a compressor as a vertex v of two connected pipes with special coupling
conditions. We assume, that the compressor is directed such that it compresses gas from pipe one to two. We prescribe the
conservation of mass given by condition (C1) and replace condition (C2) by [9, 22, 31, 33]

(C3) P(t) = −q1 (0+, t)(( pp2 (0+,t)


1 (0+,t) ) −1) ∀t>0
where P denotes the compressor power and = −1 / and is the isentropic coefficient of the gas.
Next, we extend the new model of Section 3 to the network by prescribing suitable coupling conditions resembling (C1), (C2)
and (C3). It suffices to state the extension for a single vertex with n connected pipes as depicted in Figure 4.
To simplify the notations, we parameterize each connected pipe such that the origin of each pipe is at the junction. Then, the
quantities QiJ and piJ are the flux and the pressure on pipe i at the junction. The quantities at the outlets of the pipes are denoted
by pi and Qi without superscript. Hence, QiJ will be an approximation to qi (0+, t) and pi to a2 i (xib , t) and so forth.
We pose the following coupling conditions similar to (C1) and (C2):
n J
i=1 Qi = 0
852

(C1’)
J J
(C2’) pi = pj := pJ ∀i, j ∈ {1,. . . , n}.

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

We use (C1’), (C2’) in connection with Equation (20) to obtain


 

n
2 2
6p2J +18pJ pi +16p2i 4p2J +12pJ pi +4p2i
0= sgn(pJ −pi ) |pJ −pi |+
pJ *t pJ +
pi *t pi
i=1 15(pJ +pi )3 15(pJ +pi )3

Solving this for *t pJ yields


 −1  
1 N 6p2 +18pJ pi +16p2
 
N 4p2J +12pJ pi +4p2i
*t pJ = J i × 2 2
×sgn(pi −pJ ) |pJ −pi |−
pi *t pi (23)

pJ i=1 15(pi +pJ )3 i=1 15(pi +pJ )3

The solution to this ODE gives the approximation to the trace of the pressure evolution of the isothermal Euler equations. Once we
solved for pJ (t), we recover the corresponding fluxes Qi and QiJ using the new model (20).
Summarizing, the new model for a single intersection of n pipes consists of the following equations for the unknowns (Qi )ni=1
and pJ provided that boundary data pi is given:

(6p2 +18pi pJ +16p2J )pi *pi (4p2 +12pi pJ +4p2J )pJ *pJ
Qi = sgn(pi −pJ ) |p2i −p2J |+
i +
i
15(pi +pJ ) 3 *t 15(pi +pJ )3 *t
 −1   (24)
*pJ 1 N 6p2 +18pJ pi +16p2 
N 4p2 +12pJ pi +4p2i *pi
= J i × ×sgn(p −p ) |p2 −p2 |−
J p
i J i
*t
pJ i=1 15(pi +pJ )3 i=1
J i 15(pi +pJ )3 *t

The new model yields an approximation Qi to Aqi (xib , t).


Similarly, we include a compressor in the new model using the coupling conditions (C1’) and
(C3’)

p1J = p2J if P = 0
  −1
J p2J
Q2 (t) = AP(t)× −1 if P>0
p1J

Hence, for P = 0, we recover (C2’) and for P>0 we get a coupled system of ODEs for piJ reading
 
*p1J 15(p1J +p1 )3 AP J J 2 4(p1J )2 +12p1J p1 +4p21 *p1
=− J × + ×sgn(p1 −p1 ) |(p1 ) −p1 |+

2 p1
*t
p1 (6(p1J )2 +18p1J p1 +16p21 ) (p2J / p1J ) −1 15(p1J +p1 )3 *t
 
*p2J 15(p2J +p2 )3 AP J J 2 4(p2J )2 +12p2J p2 +4p22 *p2
=− J × − J J + ×sgn(p2 −p2 ) |(p2 ) −p2 |+

2 p2 (25)
*t
p2 (6(p2J )2 +18p2J p2 +16p22 ) (p2 / p1 ) −1 15(p2J +p2 )3 *t
(6p2 +18pi piJ +16(piJ )2 )pi *pi (4p2 +12pi piJ +4(piJ )2 )piJ *piJ
Qi = sgn(pi −piJ ) |p2i −(piJ )2 |+
i +
i
J
15(pi +pi ) 3 *t 15(pi +piJ )3 *t

The new model including a compressor is finally given by (24) for P = 0 and (25) for P>0.

Remark 5.1
The ODEs in (23) and (25) are uniquely solvable as long as all pi and *t pi are bounded and pi (t) = piJ (t) for all t ∈ [0, T]. Unbounded
pressures or unbounded pressure gradients do not occur in real-world applications, which poses no restriction to the applicability of
the approximation. The second restriction pi = piJ defines the point where the flow starts to reverse, but in this case, the approximation
is not longer valid, as stated in the previous remark.

To compare the quality of the new approximation and solutions to the PDE, (22), we use the same parameter setting as in
Section 4, but choose L = 50 km for each of the pipes. We consider the case of a pipe-to-pipe intersection with n = 3 connected pipes.
The initial configuration of the PDE is given by a stationary state with pressures pi at the boundary fulfilling the coupling conditions
(C1) and (C2). The value pJ (0) is given by the initial data of the PDE-model. The boundary pressures are given by p1 (t) = p3 (t) = 65 bar
and p2 (t) is given by the pressure profile of test case (1). Note that the solutions in pipe one and three must be equal due to the
symmetry of the configuration.
We observe from Figure 5 that the asymptotic model gives much better approximations than the quasi-static model. The new
approximation for reasonable pressure changes at the outlets almost exactly resembles the dynamics of the PDE at the pipe-to-pipe
intersection. The cost for computing the evolution inside a single junction compared with the PDE model amounts to the solution
853

of a single ODE and algebraic computations. It is therefore computational attractive. Furthermore, Figure 6 shows, that the coupling
conditions are fulfilled at the junction for both models.

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

pJ
61.6

61.5

61.4

61.3

61.2

61.1

61

60.9
new approximation
60.8 isothermal Euler
quasi atatic model
60.7
0 1 2 3 4 5 6
t

Figure 5. Comparison of the resulting pressure at the junction using isothermal Euler equations pi (0+, t), the new approximation pJ (t) and the quasi-static
model. (Time in hours, pressure in bar.)

Q1J Q2J
37 73
new approximation new approximation
36.5 isothermal Euler isothermal Euler
quasi atatic model 72 quasi atatic model
36
71
35.5
35 70

34.5 69
34 68
33.5
67
33
32.5 66

32 65
0 1 2 3 4 5 6 0 1 2 3 4 5 6
t t

Figure 6. Comparison of the resulting fluxes using the isothermal Euler equations qi (xib , t), the new approximation Qi and the quasi-static model. (Time in
hours, flux in kg/s.)

6. Summary
We derived a model for gas dynamics in pipe networks by asymptotic analysis and discussed its extension to the network. The
model is cheap from a computational point of view but gives on the other hand qualitatively accurate results. The model is a strong
improvement of the quasi-static model and the SIMONE-model commonly used in the engineering community. It is an improvement
concerning the computational effort compared with the isothermal or the Weymouth equation type model.

Acknowledgements
This work has been supported by DFG SPP 1253 project, DAAD grant D/06/28176 and Seed Funds (RWTH Aachen), HE5386/6-1.

References
1. Banda MK, Herty M, Klar A. Coupling conditions for gas networks governed by the isothermal Euler equations. Networks and Heterogenous
Media 2006; 1(2):295--314.
2. Colombo RM, Garavello M. A well-posed Riemann problem for the p-system at a junction. Networks and Heterogenous Media 2006; 1(3):495--511.
3. Colombo RM, Garavello M. On the p-system at a junction. Contemporary Mathematics 2007; 426:193--217.
4. Ehrhardt K, Steinbach MC. KKT systems in operative planning for gas distribution networks. ZIB Report 04-21, 2004.
5. Martin A, Möller M, Moritz S. Mixed Integer models for the stationary case of gas network optimization. Mathematical Programming 2005;
105(2–3(B)):563--582.
6. Osiadacz AJ. Simulation and Analysis of Gas Networks. Gulf Publishing Company: Houston, 1989. ISBN: 087201844X.
7. Osiadacz A. Simulation of transient flow in gas networks. International Journal for Numerical Methods in Fluid Dynamics 1984; 4:13--23.
854

8. Osiadacz A, Chaczykowski M. Comparison of isothermal and non–isothermal transient models. Technical Report, Warsaw University of Technology,
1998.

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855
M. HERTY, J. MOHRING AND V. SACHERS

9. Steinbach M. On PDE solution in transient optimization of gas networks. Technical Report ZR-04-46, ZIB Berlin, 2004.
10. Pipeline Simulation Interest Group. Available from: www.psig.org.
11. White FM. Fluid Mechanics. McGraw-Hill: New York, 2002.
12. Colombo RM, Mauri C. Euler System for compressible fluids at a junction. Journal of Hyperbolic Differential Equations; 547--568.
13. Herty M. Modeling, simulation and optimization of gas networks with compressors. Networks and Heterogeneous Media 2007; 2(1):81--97.
14. Osiadacz AJ. Dynamic optimization of high pressure gas networks using hierarchical systems theory. Technical Report, Warsaw University of
Technology, 2002.
15. Herty M, Sachers V. Adjoint calculus for optimization of gas networks. Networks and Heterogeneous Media 2007; 2(4):733--750.
16. Cameron I. Using an excel-based model for steady-state and transient simulation. Technical Report, TransCanada Transmission Company, 2000.
17. Herty M, Seaïd M. Simulation of transient gas flow at pipe-to-pipe intersections. International Journal for Numerical Methods in Fluids 2007.
18. Wylie EB, Streeter VL, Stoner MA. Unsteady natural gas calculation in complex piping systems. Society of Petroleum Engineers Journal 1974;
10:35--43.
19. Yow W. Numerical error in natural gas transient calculations. Transactions of the ASME, Series D 1972; 94:422--428.
20. Zhou J, Adewumi MA. Simulation of transient flow in natural gas pipelines. Twenty-Seventh Annual Meeting of PSIG (Pipeline Simulation Interest
Group), Albuquerque, New Mexico, 1995.
21. Zhou J, Adewumi MA. Simulation of transients in natural gas pipelines using hybrid TVD schemes. International Journal for Numerical Methods
in Fluids 2000; 32:407--437.
22. Ehrhardt K, Steinbach M. Nonlinear gas optimization in gas networks. In Modeling, Simulation and Optimization of Complex Processes, Bock HG,
Kostina E, Pu HX, Rannacher R (eds). Springer: Berlin, 2005.
23. Chen NH. An explicit equation for friction factor in pipe. Industrial and Engineering Chemistry Fundamentals 1979; 18(3):296--297.
24. Králink J, Stiegler P, Vostrý Z, Závorka J. Modelle für die Dynamik von Rohrleitungsnetzen—theoretischer Hintergrund. Gas-Wasser-Abwasser
1984; 64(4):187--193.
25. SIMONE Research Group s.r.o. Available from: www.simone.eu.
26. Banda MK, Seaïd M. Higher-order relaxation schemes for hyperbolic systems of conservation laws. Journal of Numerical Mathematics 2005;
13(3):171--196.
27. Jin S. Runge–Kutta methods for hyperbolic conservation laws with stiff relaxation terms. Journal of Computational Physics 1995; 122(1):51--67.
28. Jin S, Xin Z. The relaxation schemes for systems of conservation laws in arbitrary space dimensions. Communications on Pure and Applied
Mathematics 1995; 48(3):235--276.
29. Colombo RM, Herty M, Sachers V. On 2×2 conservation laws at a junction. SIAM Journal on Mathematical Analysis 2008.
30. Banda MK, Herty M, Klar A. Gas flow in pipeline networks. Networks and Heterogenous Media 2006; 1(1):41--56.
31. Colombo RM, Guerra G, Herty M, Sachers V. Modeling and optimal control of networks and canals. Preprint, 2008.
32. Colombo RM, Garavello M. On the Cauchy problem for the p-system at a junction. Preprint, 2006.
33. Menon E. Gas Pipeline Hydraulics. Taylor and Francis: Boca Raton, 2005.

855

Copyright © 2009 John Wiley & Sons, Ltd. Math. Meth. Appl. Sci. 2010, 33 845–855

You might also like