### Gas Distribution Network Optimization with Genetic Algorithm

```Gas Distribution Network
Optimization
with Genetic Algorithm
Lala Septem Riza
Kusuma Chasanah Widita
Introduction
• Natural gas plays an important role in providing
clean energy for the community.
• Gas companies have planned to design and build
a new gas pipeline network in many places.
• To build pipeline network needs expensive cost in
pipeline cost, investment cost, operasional cost,
etc.
• So, pipe diameter optimization process must be
done to minimize the investment cost with
considering to the pressure and flow rates that
have been agreed in the contract
INPUT DATA:
1. Fix pressure on inlet and outlet node
2. Schematic of pipeline network
3. Geometries of pipe
4. Flow rate on each outlet
GENETIC ALGORITHM
1. To optimize inside
diameter with minimize
total cost
2. To determine pressure
distribution on junction
With constrains:
1. Fix pressure on outlet node
2. Available pipe on market
Output:
1. Optimal inside diameter
2. Cost calculation
3. Pressure on each node
Methodology
OUTPUT DATA:
1. ID, OD, t
2. Pressure Distribution
3. Cost (investment, coating, installation)
VALIDATION OF PRESSURE DISTRIBUTION
(Using Genetic Algorithm and Newton
Method for checking/calculating of
pressure distribution)
Input:
1. Optimal inside diameter
2. Pressure on inlet node
Output:
1. Pressure distribution on each node
The problem formulation
Minimize
=
10.68
, ;≠
−     5280
2000
subject to
=
= 0,
where,
=
12  + 22  + ⋯ + 2
is balancing equation at node i.
The Genetic Optimization
Minimize
=   ,
where,
=
12  + 22  + ⋯ + 2
subject to
• Pressure on each inlet is given.
• Inside diameter which available on market, 64
kind of ID (3 inch – 16 inch).
• flow rate on each outlet.
The model of gas flow in pipe
• The panhandle A:
=

2
2 0.5394

−
0.4606  0.5394 0.5394

2.6128
• The equation system is constructed based on
kirchoff’s law: “ at any node, the sum of mass
flow into that node is equal to the sum of
mass flow out of that node”
Continuity equations
at the system:
f1  Q 1 _ 2  Q N 1  0
f2  Q1 _ 2  Q 2 _ 3  Q 2 _ 6  Q N 2  0
f3  Q 2 _ 3  Q 3 _ 4  Q N 3  0
f4  Q 3
4
 Q4
6
 Q4
5
 QN4  0
f5  Q 4 _ 5  Q 5 _ 6  Q N 5  0
f6  Q 2 _ 6  Q 4 _ 6  Q 5 _ 6  Q N 6  0
• Continuity equation at node m:
fm = Q j
-
m
+ Qm
-
k
+ QNm = 0
• QNm is the node flow (supply / demand rate) at node m
Continuity equation at node 6:
f6  Q 2 _ 6  Q 4 _ 6  Q 5 _ 6  Q N 6  0
K D2_6
f6  S2_6
 S4
p
L2 _ 6
K D4_6
2 . 6182
p
L4 _ 6
K D5_ 6
 S5_6
 QN
2 . 6182
2 . 6182
2
 p6
2

0 . 5394
2
0 . 5394
2
4
 p6
2

0 . 5394
0 . 5394
p
L5 _ 6
2
5
 p6
2

0 . 5394
0 . 5394
6
 0
Obtained:
- N continuity equations
The economic model
• Investment cost:
10.68
=
, ;≠
−     5280
2000
• Coating cost:

, ;≠
• Installation cost:

, ;≠
• Operational cost(rule of thumb): 4% * investment cost.
Flow Chart of Genetic Algorithm
The Computation Method:
The Genetic Algorithm
• To search the suitable pressure and index of inside
diameter available on the market which give the best
fitness.
• The representation of population:
The Computation Method:
The Genetic Algorithm (con’t)
• Fitness function:
m in F ( x )  f ( x ) ,
w here , f ( x ) 
f 1 ( x )  f ( x )  ...  f ( x )
2
2
2
2
n
• We use usual the Selection, crossover and
mutation operator.
Case Study
Input Data:
1). The schematic network,
2). There are 18 nodes: 1 inlet, 7
junctions, 10 outlet. And there
are 17 pipe segments.
3). Pressure on inlet and on each
outlet.
To find:
- Pressure on each junction
- ID on each segments.
- Cost calculation
The software
“OptDistNet”
1st simulation
• To calculate the optimum diameter using GA
• Input: pressure on inlet “S1” and pressure on
each outlet, length of pipe.
• Output: ID on 17 segment pipe and pressure
on each junction.
Result: Pressure Distribution on junction
No.
Node
1
2
3
4
5
6
7
J01
J6
J7
J1
J4
J02
J2
Pressure
(psia)
246.6
234.2
219.3
249.6
248.5
244.2
234.3
Result: Optimum Pipe Diameter
From Node
To Node
Inside
Diameter
(inch)
Wall
Thickness
(inch)
S1
J01
7.9
0.344
J01
D7
6,065
0.28
J01
J6
7.9
0.344
J6
D8
4.062
0.219
J6
J7
8.125
0.25
J7
D9
6.249
0.188
J7
D10
8.125
0.25
S1
J1
8.249
0.188
J1
J4
6.065
0.28
J4
D5
6.001
0.312
J4
D6
4.062
0.219
J1
J02
8.125
0.25
J02
D1
6.187
0.219
J02
J2
8.249
0.188
J2
D2
4.124
0.188
J2
D4
6.065
0.28
J2
D3
4.124
0.188
Result: Cost Calculation
No.
Item of cost
1
Investment
2
Coating
3
Installation
5,733,666.24
4
Operation
1,344,466.04
Total cost
Cost (US\$)
2,965,132.42
396,032.68
10,439,297.38
2nd Simulation
• To validate pressure on each node using
optimum inside diameter.
• Input:
– Inside diameter
– Pressure on inlet
– Flow rate on each outlet
• Output:
– Pressure on each node.
Result: Pressure Distribution
No
Node
Name
Pressure
Rate
(Psia)
(MMscfd)
1
J01
246.569
0
2
J6
234.162
0
3
J7
219.309
0
4
J1
249.578
0
5
J02
244.221
0
6
J2
234.324
0
7
J4
248.506
0
8
S1
255
45.884
9
D10
193.628
-16.209
10
D9
219.147
-2.369
11
D8
234.076
-0.832
12
D7
246.549
-1.235
13
D6
243.064
-1.273
14
D5
248.426
-1.644
15
D1
243.851
-6.284
16
D3
229.99
-3.542
17
D4
232.661
-3.994
18
D2
229.439
-8.502
Conclusions
• The simple Genetic Algorithm can be helpful
in finding an optimal inside diameter.
Thank You
```