^{1}

^{*}

^{1}

^{1}

In this paper we discuss the uniqueness and existence of solution to a real gas flow network by employing graph theory. A directed graph is an efficient way to represent a gas network. We consider steady state real gas flow network that includes pipelines, compressors, and the connectors. The pipelines and compressors are represented as edges of the graph and the interconnecting points are represented as nodes of the graph representing the network. We show that a unique solution of such a system exists. We use monotonicity property of a mapping to proof uniqueness, and the contraction mapping theorem is used to prove existence.

In this paper we investigate the existence and uniqueness of solution to a real gas flow pipeline network by representing the network by graph. A directed graph is an efficient way to represent a gas network. The pipelines and compressors are represented as edges of the graph and the interconnecting points are represented as nodes of the graph representing the network. In a directed graph representation of a gas network, each edge has been assigned a flow direction. Existence and Uniqueness of Solutions to the Generalized Riemann Problem for Isentropic Flow is discussed in [

A graph G = ( V , E ) is a structure consisting of a finite set V of elements called vertices or nodes and a set E whose elements are called edges [

A graph G is said to connected if there is at least one path between every pair of vertices in G. A tree is a connected graph with no cycles. A spanning tree T of G is a tree consisting of all vertices in G. For a given spanning tree T of G, any edge in G which is not in the tree T is called a chord. A basic result from graph theory states that adding a chord to a spanning tree T will create exactly one cycle. Such a cycle formed by adding a chord to a spanning tree is called a fundamental cycle.

Theorem 1: A tree with n vertices has n − 1 edges.

Proof: The theorem will be proved by induction. on the number of vertices. It is easy to see that the theorem is true for n = 1 , 2 , 3 . Assume that the theorem holds true for all trees with fewer than n vertices. Let us now consider a tree T with n vertices. In T let e k be an edge with end vertices v i and v j . Since there is one and only one path between every pair of vertices in a tree, there is no other path between v i and v j other than e k . Therefore, deletion of e k from T will disconnect the graph. Furthermore, T − e k consists of exactly two components, and there are no cycles in T, each of these components is a tree. Both of these trees ahve fewer than n vertices each, and therefore, by the induction assumption, each contains one less edge than the vertices in it. Thus T − e k has n − 2 edges. Hence T has exactly n − 1 vertices.

Theorem 2: Let n and e be the number of vertices and edges, respectively, in a connected graph G. Let T be a spanning tree of G. Then

1) The number of edges in T is n − 1 and the number of chords corresponding to the spanning tree T is e − n + 1 chords.

2) The number of the fundamental cycles corresponding to the spanning tree T is exactly the number of chords, e − n + 1 .

Proof:

1) Since a spanning tree is a tree, theorem 1 can be used to show the first part of 1). Since a chord is an edge in G which is not in the given spanning tree T, the number of chords corresponding to T is the total number of edges e in the graph G minus those n − 1 edges which belong to the spanning tree T, i.e. e − n + 1 .

2) From part 1), we know that we have only e − n + 1 chords. Each chord creates a fundamental cycle, and hence the number of the fundamental cycles with respect to the given spanning tree is e − n + 1 .

Incidence matrix of a digraph

Let G be a directed graph with n vertices and e edges, with no circuits (cycles). The node-edge incident matrix A of G is an n × e matrix, defined as

a i j = ( 1 , if edge j is coming in to node − 1 , if edge j is going in to node 0 , otherwise .

Theorem 3: If A is the incident matrix of a connected graph with n nodes, the rank of A is n − 1.

Proof: Since there are exactly one −1 and one 1 in every column of the incidence matrix A, the sum of all these row vectors is 0. Thus the n vectors are not linearly independent. Therefore, the rank of A is less than n. Since the graph G is connected, it cannot be partitioned like

A = ( A 1 0 0 A 2 )

such that A 1 is with m rows and A 2 with n − m rows. In other words, no m by m sub matrix of A can be found, for m ≤ n − 1 , such that the sum of those m rows is equal to zero. Since there are only three constants −1, 0, and 1 in this field, the additions of all vectors taken m at a time for m = 1,2, ⋯ , n − 1 exhausts all possible linear combinations of n − 1 row vectors. Thus we have just shown that no linear combination of m row vectors of A, for m ≤ n − 1 can be equal to zero. Therefore, the rank of A must be at least n − 1 . Since the rank of A is no more than n − 1 and no less than n − 1 , it must be exactly equal to n − 1 .

A matrix A f , which is n − 1 by e obtained from A by deleting one of its rows is called reduced incident matrix.

Theorem 4: The reduced incidence matrix of a tree is invertible.

Proof: A is the incidence matrix of a tree means, by theorem 2, it has n rows and n − 1 columns. Hence, A f is an n − 1 by n − 1 matrix. By theorem 3, A has rank n − 1 implies that A f is of rank n − 1 . Since A f is a square matrix of order n − 1 and has rank n − 1 , A f is invertible.

Cycle (circuit) matrix of a digraph

Let G ′ be the un-directed version of a digraph G, i.e., G ′ is the graph G with out considering the directions. Each cycle in G ′ , after being assigned an arbitrary orientation, can be represented by a vector whose components are are −1, 1, or 0 according to whether and how the edge is included in the cycle. A cycle matrix B is a matrix where each row corresponds to a cycle vector, and is defined by

b i j = ( 1 , if cycle i contains edge j and their orientation coincides − 1 , if cycle i contains edge j and their orientation are opposite 0 , if the i th cycle does not include edge j

A cycle is also called circuit.

A set of fundamental cycles with respect to any spanning tree in a connected digraph are the only independent cycles in the digraph, since each contains an edge not in any of the others. The rest of cycles can obtained as linear combinations of these fundamental cycles. A sub matrix B f of the matrix B in which all rows correspond to the fundamental cycles is called Fundamental Cycle matrix. If n is the number of vertices and e the number of edges in a connected digraph, then B f is an e − n + 1 by e matrix, because the number of fundamental cycles is e − n + 1 , each fundamental cycle being produced by one chord. Since the fundamental cycles are linearly independent the rank of B f is e − n + 1 .

Theorem 5: Let B and A be, respectively, the circuit matrix and incidence matrix of a digraph such that the columns in B and A are arranged using the same order of edges. Then

A B T = B T A = 0

Proof: Consider the mth row in B and the kth row in A. If the cycle m does not include any edge incident on vertex K, the product of the two rows is clearly zero. If, on the other hand, vertex k in cycle m, there are exactly two edges (say x and y) incident on K that are also in cycle m. This situation can occur in only four different ways. The possible entries in row k of A and row m of B in column positions x and y are tabulated in

A typical gas network consists of one or more gas sources, one or more gas deliveries, pipelines, compressors, and other devices, such as valves and regulators [

Case | Row k | Row m | Dot Product | ||
---|---|---|---|---|---|

column x | column y | column x | column y | Row k. Row m | |

1) | −1 | 1 | 1 | 1 | 0 |

2) | 1 | −1 | −1 | 1 | 0 |

3) | −1 | −1 | 1 | −1 | 0 |

4) | 1 | 1 | −1 | 1 | 0 |

We consider the three basic components of a gas network to model the gas flow in pipeline networks:

1) pipelines,

2) compressors, and

3) nodes (interconnection points).

A directed graph is an efficient way to represent a gas network. The pipelines and compressors are represented as edges of the graph and the interconnecting points are represented as nodes of the graph representing the network. In a directed graph representation of a gas network, each edge has been assigned a flow direction. If the actual direction of the gas flow coincides with the direction of the edge, the flow rate is positive, otherwise the flow rate is negative.

Gas flow in a pipe is described by the three conservation laws (mass, momentum, and Energy) closed by an equation of state. If we consider the flow to be steady state and isothermal, the gas flow can be described by the following equations

( ∂ ( ρ u 2 + p ) ∂ x = − f u | u | 2 D P = P ( ρ , T ) (1)

where ρ is the gas density, u is the average flow velocity, P is the pressure, T is the temperature, f is friction factor, x is position, and D is the diameter of the pipe. If we use the volumetric flow rate Q and pressure P as flow variables, and

use the substitution c = P ρ the above equations can be written as:

∂ ( Q 2 c P + p ) ∂ x = − f Q | Q | 2 D (2)

If we consider that c is the average of its values at the two end points of the pipe, we can integrate the above equation to get

P u 2 2 − c Q 2 l o g P u − P d 2 2 + c Q 2 l o g P d + f Q | Q | L 2 D = 0 (3)

The logarithmic terms are because of the inertia term included in eqn which is neglected by many authors.

Compressors are installed in the gas network to transport gas and compensate for the loss of energy due to frictional resistance which results in a loss of pressure at the downstream of the pipe. The flow rate through the compressor and pressures at the upstream and downstream of the compressor are related by the following equation.

η ∗ W = z c u R T Q c γ γ − 1 [ ( P c d P c u ) γ − 1 γ − 1 ] for c = 1 : t (4)

where:

P c u is inlet pressure.

P c d is outlet pressure.

Q c is flow rate through the compressor.

W is power of the compressor.

η is compressor efficiency.

γ is ratio of specific heats.

z c u is compressibility factor at entry.

We can categorize the nodes in the network as source nodes (where gas is supplied to the system), junction nodes (where two or more edges are connected), and sink nodes (where gas is delivered for consumption). At a source nodes either the pressure or the flow rate is specified. While at junction or a sink node a flow rate balance is made.

If the pressure value S p is specified at a node of the network, then we get the equation

P = S p (5)

at this node.

The node at which we balance the flow rates coming into and going out of the is called flow node. Suppose a flow node connects N edges (pipes or compressors) and has a nodal flow rate S q . S q is positive if gas is added in to the network, negative if gas is tapped out of the network, and zero if there is no gas entering or leaving the network at this node.

Then balancing the flow rate at this node gives us

∑ j ∈ I n i Q j − ∑ j ∈ O u t i Q j = S q for i = 1 : N q (6)

I n i is the set of incoming flows in to the i^{th} Flow Node.

O u t i is the set of outgoing flows from the i^{th} Flow Node.

Therefore, the steady state, isothermal gas flow in pipeline networks is described by a non-linear simultaneous equation containing (3), (4), (5), and (6).

This system of equations can be written as

F ( x ) = y , x = ( P , Q p , Q c ) (7)

In the present section, proofs for existence and uniqueness of solutions to a gas flow network will be given. First, we present a proof of uniqueness of solutions which is based on a monotonicity property of a mapping. Existence is then proved with the help of the contraction mapping theorem (4.2). Assume the gas flow network of n nodes can be represented by a tree. Suppose the pressure value S p , of one node, say node 1 is given. By theorem (1) this tree has n − 1 edges. Let A l and A be, respectively, the pipe-node incidence matrix and the edge-node incidence matrix of the tree. Let A f be the reduced incidence matrix. Now the network equations can be written as:

( A l T ( P 2 2 − c Q p 2 ⊗ log P ) = ϕ ( Q p ) , m equations η ∗ W = b Q c γ γ − 1 [ ( P c d P c u ) γ − 1 γ − 1 ] , t = n − m − 1 equations P 1 = S p A f Q = S q (8)

where Q p and Q c are, respectively, pipe flows and compressor flows. Since A f is obtained from A by deleting the row corresponding to the reference node, it is n − 1 by n − 1 matrix and is invertible. Hence, there is a unique solution for the last Equation in (8). If we have t compressors involves 2 pressures, there fore the t pressures can be determined if the values of the other t pressures are known. Assuming the t pressures from the compressor equations and one pressure from the reference node are known, we have only n − 1 − t = m unknown pressures. By substituting the known flow rates and the known pressures in to the pipe equations we get n − 1 − t equations for n − 1 − c unknown pressures. Since the rows of A l T are rows of the reduced incidence matrix A f , they are linearly independent. This implies A l T is invertible and we get the unique solution P 2 2 − c Q p 2 ⊗ log P for the first Equation of (8). This gives us unique P as P 2 2 − c Q p 2 ⊗ log P is one-to-one.

In this section, let us assume we have a network of pipes, with no compressor, which can be represented by directed graph. Suppose the gas flow network has n nodes. Assume the pressure S p is given at a reference node, say at node 1. Then our network system of Equations (7) takes the form:

( A T ( P 2 2 − c Q 2 ⊗ log P ) = ϕ ( Q ) P 1 = S p A f Q = S q (9)

Let B f be the reduced cycle matrix with respect to some spanning tree. The size of B f is e − n + 1 by e, and its rank is e − n + 1 . The above system is equivalent to

( A T ( P 2 2 − c Q 2 ⊗ log P ) = ϕ ( Q ) P 1 = S p B f ϕ ( Q ) = 0 A f Q = S q (10)

Now let us consider the system

( B f ϕ ( Q ) = 0 A f Q = S q (11)

The system (11) contains only the flow variable Q. The first equation contains e − n + 1 equations and the second contains n − 1 equations. Hence, system (11) consists of e equations for e unknown flwo rate variables. First, we show that the solution of the system (11) is unique, and then it can be shown that the first two equations of system (10)

( A T ( P 2 2 − c Q 2 ⊗ log P ) = ϕ ( Q ) P 1 = S p (12)

give unique P. System (12) consists of e + 1 equations for n unknowns. But, we can eliminate e − n + 1 equations as they are linar combinations of the others, since e − n + 1 ϕ i ( Q ) are expressed in terms of the others in the equation B f ϕ ( Q ) = 0 .

Now let us show that the solution of system (11) is unique.

Definition: A mapping Φ : H → H is said to be strictly monotonic if for every x , y ∈ H we have

( Φ ( x ) − Φ ( y ) , x − y ) ≥ 0,

and equality holds if and only if x = y .

Theorem 6: Let Φ : ℝ d → ℝ d , for some positive integer d, is given by

Φ ( x ) = ( Φ 1 ( x 1 ) , Φ 2 ( x 2 ) , Φ 3 ( x 3 ) , ⋯ , Φ d ( x d ) ) T

where

Φ i ( x j ) = c j x j | x j | , for 1 ≤ j ≤ d

with c j > 0 . Then Φ is strictly monotonic.

Proof: For every x = [ x 1 , x 2 , x 3 , ⋯ , x d ) T , y = [ y 1 , y 2 , y 3 , ⋯ , y d ) T ∈ ℝ d ,

( Φ ( x ) − Φ ( y ) , x − y ) = ∑ j = 1 d c j ( x j | x j | − y j | y j | ) ( x j − y j )

The function h ( s ) = s | s | is a strictly increasing function for all s. Hence, each term on the right-hand side is non-negative. Thus,

( Φ ( x ) − Φ ( y ) , x − y ) ≥ 0.

Equality holds if and only if every term at the right hand side is zero, so x j = y j , for every j. There fore, Φ is strictly monotonic.

Definition: Let r > 0 , t > 0 , be two integers, and d = r + t . We say an r × d matrix A and a t × d matrix B are perpendicular to each other if they satisfy

1) rank ( A ) = r , rank ( B ) = t ;

2) A B T = B A T

Let M = x ∈ ℜ d : A x = 0 and N = y ∈ ℝ d : B y = 0 . Then we have M perpendicular to N and

ℝ d = M ⊕ N .

Theorem 7: Let matrices A and B be perpendicular to each other. Suppose Φ : ℝ d → ℝ d is strictly monotonic, then foe every s ∈ ℝ d , the solution to the system of equations

( A Q = s B Φ ( Q ) = 0 (13)

is unique.

Proof: Suppose both u and v are solutions of system (13), then

( A ( u − v ) = 0 B ( Φ ( u ) − ϕ ( v ) ) = 0

Hence, u − v ∈ M , and Φ ( u ) − ϕ ( v ) ∈ N . Thus ( u − v , Φ ( u ) − Φ ( v ) ) = 0 . Since Φ is strictly monotonic, the above equation implies that u = v . Hence, the solution is unique.

By applying the above theorem, and taking A = A f , B = B f ,and s = s f , it is shown the solution of the system (11) is unique.

In this section, we discuss the existence of solution to a general gas flow network that contains pipes and compressors. Let us consider a network of m pipes, t compressors, and n nodes. Assume the pressure is given, say at node 1, i.e. P 1 = S p . We use the The Contraction Mapping Theorem to show existence of a solution for such gas flow network.

Definition: Let ( X , d ) be a metric space. A function T : X → X is called a contraction mapping if there exists k ∈ ℝ such that 0 < k < 1 and

d ( T ( x ) , T ( y ) ) ≤ k d ( x , y )

for any x , y ∈ X .

Theorem 8: (The Contraction Mapping Theorem): If ( X , d ) is a complete metric space and T : X → X is a contraction mapping, then T has one and only one fixed point, (i.e., there exists exactly one x ∈ X such that T ( x ) = x ).

Sketch of the proof of the Contraction Mapping Theorem. The complete proof is found in [

1) starting from an arbitrary x 0 ∈ X , construct the sequence x n ⊂ X by taking x n = T ( x n − 1 ) ;

2) prove that d ( x n , x n + 1 ) ≤ k n d ( x 0 , x 1 ) , and therefore d ( x m , x n ) = k n − k m 1 − k d ( x 0 , x 1 ) for any natural numbers n , m with m > n ;

3) conclude that { x n } is a Cauchy sequence, and thus, since X is complete, converges;

4) prove that x = lim n → ∞ x n is a fixed point of T;

5) prove that x is the only fixed point of T.

Now, we want to show that the equation

T ( x ) = y

has locally unique solution. The Contraction Mapping Theorem can be applied as follows: If we can find x 0 such that the jacobian determinant, J, of T at x 0 is different from zero, then we can introduce

G ( x ) = x − J − 1 ( x 0 ) ( T ( x ) − y ) .

The equation x = G ( x ) is equivalent to T ( x ) = y . If G is a contraction mapping, then G has a unique fixed point x ¯ and thus T ( x ¯ ) = y .

The jacobian J ( x ) is expressed in the following form

J ( x ) = ( A ( x ) D ( x ) B ( x ) C ( x ) )

where

A ( x ) = ( a i j ( x ) ) ( m + t ) × n

a i j ( x ) = ( a i u = ∂ F i ( x ) ∂ P i u = − ( P i u − C Q i P i u ) , if Node j is the upstream node of Pipe i a i u = ∂ F m + c ( x ) ∂ P c u = − ( η W γ − 1 γ + b Q c P c u − 1 γ ) , if Node j is the upstream node of Compressor c a i d = ∂ F i ( x ) ∂ P i d = ( P i d − C Q i P i d ) , if Node j is the downstream node of Pipe i a i d = ∂ F m + c ( x ) ∂ P c d = b Q c P c d − 1 γ , if Node j is the downstream node of Compressor c 0 , else

D ( x ) = ( d i j ( x ) ) ( m + t ) × ( m + t )

d i i ( x ) = ( ∂ F i ( x ) ∂ Q i = ( C log P i u P i d + C f L | Q i | D ) if i ≤ m ∂ F m + c ( x ) ∂ Q c = b γ γ − 1 ( ( P c d P c u ) γ − 1 γ − 1 ) if m < i ≤ m + t

d i j ( x ) = 0 if i ≠ j

B ( x ) = ( b i j ( x ) ) n × n

b i j ( x ) = ( 1, if Node j is the i th Pressure Node 0, else

C ( x ) = ( C i j ( x ) ) n × ( m + t )

C i j ( x ) = ( 1 , if flow j flows into the i th FlowNode − 1 , if flow j flows out of the i th Flow Node 0 , else

Choose x 0 such that d i j ( x 0 ) ≠ 0 , a i u ( x 0 ) < 0 and a i d ( x 0 ) > 0

Then det ( J ( X 0 ) ) ≠ 0

Example: Let us consider the following network with 3 pipes, 1 compressor, and 5 junctions.

The Jacobian of the matrix of the system of equations of the gas flow network dipicted in

J = ( a 1 u a 1 d 0 0 0 d 11 0 0 0 0 0 a 2 u a 2 d 0 0 d 22 0 0 0 0 0 a 3 u a 3 d 0 0 d 33 0 0 a 4 u a 4 d 0 0 0 0 0 d 44 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 − 1 0 0 0 0 0 0 − 1 0 1 0 0 0 0 0 0 1 − 1 0 0 0 0 0 0 0 0 1 0 )

By performing elementary row and column operations on J

J ~ ( 0 I ( m + t ) B ∗ 0 )

where B * = ( b i j * ) n × n

b i j * = ( b i j , if node i is a pressure node − a k u d k k , if flow k flows from node j to node i a k d d k k , if flow k flows from node i to node j ∑ k ∈ o u t i a k u d k k − ∑ k ∈ I n i a k d d k k , if i = j and node i is a flow node 0 , else

d e t ( J ) ≠ 0 ⇔ d e t ( B * ) ≠ 0

For our example given above

B * = ( 1 0 0 0 0 − a 1 u d 11 − a 1 d d 11 + a 4 u d 44 a 4 d d 44 0 0 0 − a 4 u d 44 − a 4 d d 44 + a 2 u d 22 a 2 d d 22 0 0 0 − a 2 u d 22 − a 2 d d 22 + a 3 u d 33 a 3 d d 33 0 0 0 − a 3 u d 33 − a 3 d d 33 )

Let B d * be the matrix obtained by deleting the rows and columns containing the Pressure Nodes, then

d e t ( B * ) ≠ 0 ⇔ d e t ( B d * ) ≠ 0

Properties of B d * are

1) Diagonally dominant (column), strictly dominant at column j, where node j is connected to a Pressure Node( there is at least one Pressure Node).

2) Irreducible.

Hence, B d * is invertible.

⇒ B * is invertible.

⇒ J is invertible.

Define G ( x ) = x − J − 1 ( x 0 ) ( F ( x ) − y )

⇒ G ′ ( x ) = I − J − 1 ( x 0 ) J ( x )

Since G ′ ( x ) is continuous at x 0

∀ ϵ > 0 ∃ δ such that ‖ x − x 0 ‖ < δ ⇒ ‖ G ′ ( x ) ‖ < ϵ

Choose ϵ such that 0 < ϵ < 1

∀ x 1 , x 2 in B ( x 0 , δ )

‖ G ( x 1 ) − G ( x 2 ) ‖ ≤ ‖ G ′ ( x ¯ ) ‖ ‖ x 1 − x 2 ‖ < ϵ ‖ x 1 − x 2 ‖ |

If y ∈ B ( F ( x 0 ) , 1 − ϵ ‖ J − 1 ( x 0 ) ‖ δ ) , then G ( B ( x 0 , δ ) ) ⊂ B ( x 0 , δ )

⇒ G is a contraction in B ( x 0 , δ )

⇒ G has a unique fixed point.

⇒ F ( x ) = y has a unique solution in B ( x 0 , δ )

In this paper, we discussed the existence and uniqueness of solution to the real gas flow network. A review of some basic concepts from graph theory is given as we discussed the flow network as a graph. The flow network is represented by a graph in which pipes and compressors are represented as edges and the junction points as nodes of the graph. The flow is assumed to be steady state and isothermal. The Contraction Mapping Theorem is applied to show the existence of the solution to the considered gas flow network, and its uniqueness is proved using monotonicity property of a mapping.

The authors declare no conflicts of interest regarding the publication of this paper.

Atena, A., Tekalign, W. and Muche, T. (2020) Steady State Gas Flow in Pipeline Networks: Existence and Uniqueness of Solution. Journal of Applied Mathematics and Physics, 8, 1155-1167. https://doi.org/10.4236/jamp.2020.86087

ρ Gas density

u Flow velocity

P Pressure

P_{u} Upstream pipe inlet pressure

P_{d} Downstream pipe outlet pressure

T Temperature

Q Volumetric flow rate in a pipe

x Position

D Pipe diameter

L Pipe length

η Compressor efficiency

W Compressor power

Z_{cu} Comprehensibility factor of a gas at compressor entry

R Gas constant

Q_{c} Flow rate through the compressor

γ Ratio of specific heats

P_{cu} Inlet compressor pressure

P_{cd} Outlet compressor pressure