5.1 The two-loop network, Osiadacz (1987) . ...... second law, which says that the sum of flow rates in a loop equals zero. They ... Good in loopy networks.
Mansoura University Faculty of Engineering Mechanical Power Engineering Dept.
OPTIMIZATION OF GAS PIPELINE NETWORKS USING GENETIC ALGORITHMS By
Eng. Islam AbdelAlim Saad Shahin B. Sc. of Mechanical Power Engineering Mansoura University A Thesis Submitted in Partial Fulfillment of Requirements of the Master Degree in Mechanical Power Engineering Supervisors
Prof. Berge Ohanness Djebedjian
Assist. Prof. Mohamed Ahmed Elnaggar
Mechanical Power Engineering Dept.
Mechanical Power Engineering Dept.
Faculty of Engineering
Faculty of Engineering
Mansoura University
Mansoura University
2012
Mansoura University Faculty of Engineering Mechanical Power Engineering Dept.
Supervisors
Thesis Title:
Optimization of Gas Pipeline Networks Using Genetic Algorithms
Researcher Name: Islam AbdelAlim Saad Shahin Scientific Degree: Master Degree in Mechanical Power Engineering Supervision Committee No. 1 2
Name Prof. Dr. Berge Ohanness Djebedjian Assist. Prof. Dr. Mohamed Ahmed Elnaggar
Position Signature Mechanical Power Engineering Department - Faculty of Engineering - Mansoura University Mechanical Power Engineering Department - Faculty of Engineering - Mansoura University
Head of the Department
Vice Dean for Post Graduate and Researches
Prof. Dr. Mohamed Nabil Sabry
Prof. Dr. Kassem Salah El-Alfy Dean of the Faculty
Prof. Dr. Mahmoud Mohamed Ebrahim El-Meligy
Mansoura University Faculty of Engineering Mechanical Power Engineering Dept.
Examination Committee Thesis Title:
Optimization of Gas Pipeline Networks Using Genetic Algorithms Researcher Name: Islam AbdelAlim Saad Shahin Scientific Degree: Master Degree in Mechanical Power Engineering Supervision Committee No. 1 2
Name
Position Mechanical Power Engineering Department - Faculty of Engineering Mansoura University Mechanical Power Engineering Department - Faculty of Engineering Mansoura University
Prof. Dr. Berge Ohanness Djebedjian Assist. Prof. Dr. Mohamed Ahmed Elnaggar
Signature
Examination Committee No. 1
Name Prof. Dr. Sadek Zakaria Kassab
2
Prof. Dr. Mohamed Safwat Saad El-din Prof. Dr. Berge Ohanness Djebedjian
3
Position Mechanical Engineering Department Faculty of Engineering Alexandria University Mechanical Power Engineering Department - Faculty of Engineering Mansoura University Mechanical Power Engineering Department - Faculty of Engineering Mansoura University
Signature
Head of the Department
Vice Dean for Post Graduate and Researches
Prof. Dr. Mohamed Nabil Sabry
Prof. Dr. Kassem Salah El-Alfy Dean of the Faculty
Prof. Dr. Mahmoud Mohamed Ebrahim El-Meligy
ACKNOWLEDGMENTS This work could not have been done without the help of many people whom I have had the good fortune to meet during the period I have spent in this work. Justice demands that their help should be appreciated in this forwarding. First of all, I thank Allah that helped me in this work; he is the most generous, gracious and merciful. Secondly, I thank my two supervisors, Prof. Berge Ohanness Djebedjian for his very active participating, his patience and guidance in this work and Dr. Mohammed Ahmed Elnaggar for his support. I thank my parents, my two sisters and my wife for helping me so much and for their patience. Special thanks to my father, the man who inspires me over my entire life. Many thanks also to Dr. Essam Abdel Ghafour for his moral support, the man who always helps me in all fields of life. Thanks to Eng. Amr Farouq and Eng. Ahmed Samir for providing the gas network of Moharram-Bek. I dedicate this work for all I mentioned above and TO MY TWO LITTLE KIDS (Baraa and Asil).
I
ABSTRACT One of the major parameters that affect the price of natural gas is the cost of its transmission and distribution networks. So it's valuable to reduce its total cost to be affordable for individual customer. Gas networks optimization is raised to focus on the network cost regarding to its design parameters after the revolution in personal computers. The aim of the present work is to simulate and optimize gas distribution networks at all pressure ranges, i.e. low, medium and high pressure networks. The aim is to reduce the network diameter sizes to a minimum value while fulfilling the constraints of maximum link velocity and minimum node pressure. A computer code was developed in which the analysis of gas distribution networks was based on the gradient algorithm and the optimization of gas distribution networks was presented by the genetic algorithm. The code was applied on two case studies and a real gas distribution network. The two case studies were used to compare the effectiveness of the proposed optimization tool with the previous work of Osiadacz and Górecki (1995), one of these two case studies is low-pressure gas distribution network and the other one is mediumpressure gas distribution network. The real gas distribution network was an existing network in the actual life in Egypt. It’s a part of Moharram-Bek gas
II
distribution network in Alexandria City and was used to optimize its design and find out the difference between its cost before and after optimization. The application of the developed code on the previous cases showed efficient and robust analysis and optimization of any gas distribution network, i.e. at all pressure ranges. Therefore, the developed code was found to be useful at the stage of gas distribution networks design.
III
CONTENTS LIST OF FIGURES ................................................................. XI LIST OF TABLES................................................................ XVII NOMENCLATURE ............................................................. XXI ABBREVIATIONS .............................................................. XXV CHAPTER 1 INTRODUCTION ............................................... 1 1.1
Introduction ........................................................................................... 1
1.2
Objectives of the Present Study ............................................................ 3
1.3
Thesis Organization .............................................................................. 3
CHAPTER 2 LITERATURE REVIEW ................................... 5 2.1
Introduction ........................................................................................... 5
2.2
Methods Used in Solving Hydraulic Networks .................................... 5 2.2.1
Newton-Nodal Method ............................................................. 10
2.2.2
Newton-Loop Method .............................................................. 11
IV
2.2.3
Hardy Cross Nodal Method ...................................................... 13
2.2.4
Hardy Cross Loop Method ....................................................... 13
2.2.5
Gradient Algorithm Method ..................................................... 14
2.2.6
Newton Loop-Nodal Method ................................................... 15
2.3
Comparison of Solution Methods ......................................................... 17
2.4
Methods Used to Optimize Piping Network ......................................... 20 2.4.1
Optimization of Gas Transmission Networks .......................... 20
2.4.2
Optimization of Gas Distribution Networks ............................ 27
2.5
Flow Equations ..................................................................................... 29
2.6
Friction Factor, Transmission Factor, Equivalent Length of Pipe and Reynolds Number .................................................................. 37
2.7
Comparison among Flow Equations ..................................................... 40
2.8
Commercial Gas Networks Softwares .................................................. 44
CHAPTER 3 GENETIC ALGORITHM .................................. 47 3.1
Introduction ........................................................................................... 47
V
3.2
Biological Background ......................................................................... 48
3.3
Methodology ......................................................................................... 49
3.4
Initialization .......................................................................................... 51
3.5
Encoding ............................................................................................... 51
3.6
3.5.1
Binary Encoding ....................................................................... 51
3.5.2
Permutation Encoding .............................................................. 52
3.5.3
Value Encoding ........................................................................ 52
3.5.4
Tree Encoding ........................................................................... 53
Selection ................................................................................................ 54 3.6.1
Stochastic Tournament Selection ............................................. 54
3.6.2
Roulette Wheel ......................................................................... 55
3.6.3
Rank Selection .......................................................................... 55
3.6.4
Steady-State .............................................................................. 56
3.6.5
Hierarchical Selection ............................................................... 56
3.6.6
Truncation Selection ................................................................. 56
3.6.7
Elitism ....................................................................................... 57
VI
3.7
Crossover and Mutation ........................................................................ 57 3.7.1
Single-Point Crossover ............................................................. 57
3.7.2
Two-Point Crossover ................................................................ 58
3.7.3
Uniform Crossover ................................................................... 58
3.7.4
Arithmetic Crossover ................................................................ 58
3.7.5
Mutation .................................................................................... 59
3.8
Fitness ................................................................................................... 59
3.9
Related Techniques ............................................................................... 62
CHAPTER 4 CODE ARRANGEMENT .................................. 65 4.1
Introduction ........................................................................................... 65
4.2
Network Graph Analysis ....................................................................... 65
4.3
Network Hydraulic Analysis and Simulation ....................................... 66
4.4
Network Hydraulic Analysis ................................................................. 67
4.5
Data Structure ....................................................................................... 69
4.6
Network Optimization .......................................................................... 71
VII
4.7
4.6.1
Initial Population ...................................................................... 72
4.6.2
Computation of Network Cost .................................................. 73
4.6.3
Computation of Fitness ............................................................. 73
4.6.4
Generation of a New Population .............................................. 74
4.6.5
Cross-Over Operator ................................................................. 74
4.6.6
Mutation Operator .................................................................... 74
4.6.7
Production of Successive Generations ..................................... 74
Flow Diagram ....................................................................................... 74 4.7.1
Simulation and Hydraulic Analysis Engine Flow Diagram .................................................................................... 75
4.7.2 4.8
Optimization Engine Flow Diagram ........................................ 78
Computer Files of GAGAGAS.net Program ........................................ 83
CHAPTER 5 RESULTS AND DISCUSSION .......................... 85 5.1
Introduction ........................................................................................... 85
5.2
Verification of GAGAGas.net Program for the Simulation of Gas Distribution Systems ................................................................. 85
VIII
5.3
5.4
5.5
Case Study '1': Low-Pressure Gas Distribution Network ..................... 89 5.3.1
Simulation and Hydraulic Analysis .......................................... 96
5.3.2
Optimization Analysis .............................................................. 96
Case Study '2': Medium-Pressure Gas Distribution Network ............... 106 5.4.1
Simulation and Hydraulic Analysis .......................................... 110
5.4.2
Optimization Analysis .............................................................. 112
Case Study '3': Moharram-Bek Gas Distribution Network .................. 121 5.5.1
Simulation and Hydraulic Analysis .......................................... 128
5.5.2
Optimization Analysis .............................................................. 128
CHAPTER 6 CONCLUSIONS AND FUTURE WORK ........ 135 6.1
Conclusions ........................................................................................... 135
6.2
Future Work .......................................................................................... 138
REFERENCES .............................................................................. 139 APPENDICES ................................................................................ 149
IX
APPENDIX A COMPRESSIBLE FLOW ................................. 149 A.1 Introduction ........................................................................................... 149 A.2 Ideal Gas ................................................................................................ 150 A.3 Real Gas ................................................................................................ 151 A.4 Natural Gas ........................................................................................... 154 A.5 Compressibility Factor .......................................................................... 156
APPENDIX B SIMULATION AND OPTIMIZATION RESULTS FOR CASE STUDY ‘1’ .................. 159 APPENDIX C SIMULATION AND OPTIMIZATION RESULTS FOR CASE STUDY ‘2’ .................. 171 APPENDIX D SIMULATION AND OPTIMIZATION RESULTS FOR CASE STUDY ‘3’ .................. 177 ARABIC SUMMARY ................................................................... 186
X
XI
LIST OF FIGURES Figure
Page
No. 2.1
Comparison among various low-pressure flow equations .................. 41
2.2
Comparison among various medium-pressure flow equations ........... 42
2.3
Comparison among various high-pressure flow equations ................. 43
3.1
Basic cycle of genetic algorithms ....................................................... 49
3.2
Binary encoding .................................................................................. 51
3.3
Permutation encoding .......................................................................... 52
3.4
Value encoding .................................................................................... 53
3.5
Tree encoding ...................................................................................... 53
3.6
Single-point crossover ......................................................................... 57
3.7
Two-point crossover ............................................................................ 58
3.8
Uniform crossover ............................................................................... 58
3.9
Arithmetic crossover ........................................................................... 58
XII
3.10 Mutation .............................................................................................. 59 4.1
Flow diagram for the simulation and analysis engine ......................... 77
4.2
Flow diagram for the optimization engine .......................................... 79
5.1
The two-loop network, Osiadacz (1987) ............................................. 87
5.2
Comparison between nodal pressures resulted from Osiadacz (1987), Pipe Flow program and present study .................................... 89
5.3
Case study ‘1’: Low-pressure gas distribution network layout, Osiadacz and Górecki (1995) .............................................................. 90
5.4
Comparison between pipes diameters before (designed) and after optimization for Case study ‘1’ .................................................. 97
5.5
Comparison between nodal pressures before (designed) and after optimization for Case study ‘1’ .................................................. 98
5.6
Comparison between flow velocities before (designed) and after optimization for Case study ‘1’ .................................................. 99
5.7
Comparison between optimal diameters obtained by present study and Osiadacz and Górecki (1995) for Case study ‘1’ ............... 100
5.8
Fitness of all solutions; best, average and worst fitness for Case study ‘1’ ...................................................................................... 100
XIII
5.9
Best fitness for Case study ‘1’ ............................................................ 102
5.10 Comparison between original design, Osiadacz and Górecki (1995) and present study optimal designs for Case study ‘1’ ............. 102 5.11 Difference between original cost and present study optimal cost of each pipe for Case study ‘1’ ............................................................ 104 5.12 Length of pipes for each pipe size for original design, Osiadacz and Górecki (1995) and present study for Case study ‘1’ ................... 105 5.13 Case study ‘2’: Layout of medium pressure gas network, Osiadacz and Górecki (1995) .............................................................. 107 5.14 Velocities in links before optimization for Case study ‘2’ ................. 111 5.15 Comparison between pipes diameters before optimization and after optimization for Case study ‘2’ .................................................. 113 5.16 Comparison between pipes diameters optimized by the present study and the study of Osiadacz and Górecki (1995) for Case study ‘2’ ............................................................................................... 114 5.17 Comparison between nodal pressures before (designed) and after optimization for Case study ’2’ .................................................. 115
XIV
5.18 Comparison between flow velocities before optimization and after optimization for Case study ’2’ .................................................. 116 5.19 Best, average and worst fitness trends across generations for Case ‘2’ ................................................................................................ 117 5.20 Best fitness for Case study ‘2’ ............................................................ 117 5.21 Comparison between original design, Osiadacz and Górecki (1995) and present study optimal designs for Case study ‘2’ ............. 118 5.22 Difference between original cost and present study optimal cost of each pipe for Case study ‘2’ ........................................................... 119 5.23 Length of pipes for each pipe size for original design, Osiadacz and Górecki (1995) and present study for Case study ‘2’ .................. 120 5.24 Layout for part of Moharram-Bek low-pressure network ................... 123 5.25 Comparison between designed and optimized branches’ diameters for Moharram-Bek low-pressure network .......................... 129 5.26 Nodal pressures at nodes before (designed) and after optimization for Moharram-Bek low-pressure network ..................... 130 5.27 Relationship between the gas velocities in links in both designed and optimized Moharram-Bek low-pressure network ......... 130
XV
5.28 Best, average and worst fitness trends across generation for Moharram-Bek low-pressure network ................................................ 131 5.29 Best fitness solutions across the generations for Moharram-Bek low-pressure network .......................................................................... 132 5.30 Comparison between original design and present study generated design for Moharram-Bek low-pressure network .............. 132 5.31 Difference between original cost and optimal cost of each pipe for Moharram-Bek low-pressure network ........................................... 134 5.32 Length of pipes for each pipe size for original and optimal Moharram-Bek low-pressure network ................................................ 134 A.1
Compressibility of natural gases as a function of reduced pressure and temperature, Standing and Katz (1942) ......................... 153
XVI
XVII
LIST OF TABLES Table
Page
No. 2.1
Methods used in solving hydraulic networks ...................................... 6
2.2
Comparison of solution methods, Mays (2000) .................................. 19
2.3
Survey of optimization of gas transmission networks ........................ 21
2.4
Survey of optimization of gas distribution networks .......................... 28
2.5
Flow equations key symbols ............................................................... 30
2.6
Gas flow equations, Osiadacz (1987), Schroeder et al. (2001), Ohirhian (2002), Menon (2005) and Coelho and Pinho (2007) ......... 33
4.1
Terminology in genetic algorithms ..................................................... 72
4.2
Various
simulation
methods
used
for
software
of
GAGAGAS.net program ..................................................................... 83 5.1
Various simulation methods used for software verification ............... 87
5.2
Data for the two-loop network ............................................................ 88
5.3
Nodes data for Case study ‘1’ ............................................................. 91
XVIII
5.4
Source nodes for Case study ‘1’ .......................................................... 91
5.5
Branches data for Case study ‘1’ ........................................................ 92
5.6
Piping cost per 1 meter length ............................................................. 94
5.7
Case study ‘1’ and genetic algorithm data .......................................... 95
5.8
Case study ‘2’ and genetic algorithm data .......................................... 108
5.9
Nodes data for Case study ‘2’ ............................................................. 109
5.10 Source nodes for Case study ‘2’ .......................................................... 109 5.11 Branches data for Case study ‘2’ ........................................................ 110 5.12 Moharram-Bek gas distribution network and genetic algorithm data ...................................................................................................... 122 5.13 Nodes data for Moharram-Bek network ............................................. 124 5.14 Source Nodes for Moharram-Bek network ......................................... 125 5.15 Branches data for Moharram-Bek network ......................................... 126 B1
Simulation results for Case study ‘1’: Nodes results .......................... 159
B2
Simulation results for Case study ‘1’: Branches results ..................... 160
XIX
B3
Optimized versus existing simulation of nodal pressure for Case study ‘1’ ...................................................................................... 162
B4
Optimized versus existing simulation for Case study ‘1’ ................... 164
B5
Comparison between optimal diameters of Osiadacz and Górecki (1995) and the present study for Case study ‘1’ ................... 168
C1
Nodes simulated data for Case study ‘2’ ............................................ 171
C2
Branches simulated data for Case study ‘2’ ........................................ 172
C3
Optimized versus existing simulation for Case study ‘2’ ................... 173
C4
Comparison between optimal diameters of Osiadacz and Górecki (1995) and the present study for Case study ‘2’ ................... 175
D1
Simulation results data for Moharram-Bek network: Nodes results ................................................................................................... 177
D2
Simulation results data for Moharram-Bek network: Branches results ................................................................................................... 179
D3
Optimized versus existing simulation for Moharram-Bek network ................................................................................................ 181
XX
XXI
NOMENCLATURE A
:
Sum of the mole fractions of CO2 and H2S in the gas mixture
A10
:
Source nodes - links matrix which indicates the relationships between source nodes and links; its dimension is (l x s)
A11
:
A square diagonal matrix of pressure-losses; its dimension is (l x l), calculated by the appropriate flow-equation related to its pressure range i.e. Lacey equation for low-pressure
A12
:
Demand junctions - links matrix which indicates the relationships between them, its dimension is (j x l)
A21
:
Transpose of (A12)
B
:
Mole fraction of H2S in the gas mixture
BI
:
Bend Index
c i (Di )
:
Cost of link i with diameter Di
CPp
:
Penalty cost for nodal pressure
C Pv
:
Penalty cost for velocity
CT
:
Total cost
D
:
Pipe inside diameter, in. or mm
Df
:
Pipe drag factor
Di
:
Diameter of link i, in. or mm
Dmax
:
Maximum diameter, in. or mm
Dmin
:
Minimum diameter, in. or mm
XXII
E
:
pipeline efficiency, a decimal value less than or equal to 1.0
e
:
Base of the natural logarithm (e = 2.7182818)
f
:
Friction factor, (-)
F
:
Transmission factor ( F = 2
Fo
:
Objective function
Ft
:
von Kármán smooth pipe transmission factor
G
:
Gas specific gravity ( G = ρ gas ρ air , for air G = 1.0)
Ho
:
Source nodes' known head matrix, its dimension is (s x 1)
Ht+1
:
Unknown node pressure head matrix in the present iteration
f )
t + 1; its dimension is (n x l) I
:
Identity matrix
j
:
Demand junctions' number
l
:
Number of links
L
:
Pipe segment length, mile or meter
Le
:
Equivalent length of pipe segment, Le = L e s − 1 s , mile or
(
)
meter Li
:
Length of link i, mile or meter
Ma
:
Apparent molecular weight of gas mixture
Mi
:
Molecular weight of gas component i
n
:
Number of nodes or Number of kilomoles of the gas
N
:
A square diagonal matrix of flow rate exponent (n) related to
XXIII
its flow-equation in its pressure range; its dimension is (l x l) P
:
Absolute pressure, psia or bar (abs.)
P1
:
Upstream pressure, psia or bar (abs.)
P2
:
Downstream pressure, psia or bar (abs.)
Pb
:
Base pressure, psia or bar (abs.)
Pc
:
Critical pressure, psia or bar (abs.)
Pj
:
Actual gas pressure at junction j, psia or bar (abs.)
Pmin
:
Minimum allowable gas pressure at junctions, psia or bar (abs.)
Ppc
:
Pseudo-critical pressure, psia or bar (abs.)
Ppr
:
Reduced pseudo-critical pressure
Pr
:
Reduced pressure
Ppc'
:
Modified pseudo-critical pressure, psia or bar (abs.)
qo
:
Flow rates demands at demand junctions; its dimension is (j x 1)
Q
:
Volume flow rate, standard ft3/day or m3/day
Qt
:
Previous iteration or initial flow rate matrix; its dimension is (l x 1)
Qt+1
:
Unknown pipe flow matrix in the present iteration; its dimension is (l x 1)
R
:
Universal gas constant, psi.ft3/lbmol.R or J/kmol.K
Re
:
Reynolds number of flow, Re = v D ρ µ
XXIV
s
:
Source nodes' number or Elevation Adjustment Parameter, (-)
T
:
Absolute temperature of gas, K
Tb
:
Base temperature, R (460+ºF) or K (273+ºC)
Tc
:
Critical temperature, R (460+ºF) or K (273+ºC)
Tf
:
Average gas flow temperature, R (460+ºF) or K (273+ºC)
T pc
:
Pseudo-critical temperature, R (460+ºF) or K (273+ºC)
T pr
:
Reduced pseudo-critical temperature, (-)
Tr
:
Reduced temperature, (-)
T pc'
:
Modified pseudo-critical temperature, R (460+ºF) or K (273+ºC)
vi
:
Actual gas velocity in link i, m/s
v max
:
Maximum allowable gas velocity in links, m/s
V
:
Gas volume, m3
yi
:
Mole fraction of gas component i
Z
:
Gas compressibility factor, (-)
Greek Symbols
ε
:
Absolute roughness, in. or mm
εd
:
Deviation parameter
µ
:
Gas viscosity, lb/ft.s or Poise
ρ
:
Density, lb/ft3 or kg/m3
XXV
ABBREVIATIONS CE
Cross-Entropy method
CR
Continuous Relaxation
DE
Differential Evolution
DP
Dynamic Programming
EA
Evolutionary Algorithms
ES
Evolution Strategies
GA
Genetic Algorithm
GAGAGas.net
Gradient Algorithm Genetic Algorithm Gas network
GC
Goal Coordination
GOP
Global Optimization Programming
GP
Genetic Programming
NA
Normal or Natural Adaptation
NLP
Non Linear Programming
PLP
Piecewise Linear Programming
SCADA
Supervisory Control And Data Acquisition
SLP
Successive Linear Programming
SSR
Search Space Reduction
TDT
Topological Decomposition Technique
TS
Tabu Search
XXVI
Chapter 1
Introduction
CHAPTER 1 INTRODUCTION 1.1
Introduction Natural gas is an emergent fuel of choice for environmentally aware due
to the lower noxious emissions compared with other fossil fuels. Exploration activity by major multinational oil and gas companies is aimed increasingly to find gas in remote locations and in ever deeper ocean depths. Once a gas field has been discovered, the gas accumulation must be developed, produced, gathered, processed, and transported to the consumer. Transport of gas by pipelines to distant delivery points presents unique challenges of flow through long conduits. Processing of the gas to meet delivery specifications is required and this requires process systems design for each production facility. Natural gas is increasingly being used as a pure energy source. So, it's valuable to reduce its total cost to be affordable for individual customer. In the past, interest was focused on efficient pipe network analysis method regardless of network cost; so many researches could be found for methods developed for network analysis. In contrast, very little researches could be developed to optimize the design of distribution networks. This, of course, reflects on
1
Chapter 1
Introduction
software developed for the two purposes: the analysis and simulation of gas networks and the optimization purpose. A gas pipeline network is classified as: transmission network (to transmit gas at high pressure from coastal supplies to regional demand points) and distribution network (to distribute gas to consumers at low pressure from the regional demand points). The distribution network differs from the transmission one in its small-diameter pipes, its simplicity as there are no valves, compressors or nozzles, and its operation at low and medium pressures. The main interest in the present study is focused on distribution networks. The simulation and analysis of gas networks has focused on the development of efficient algorithms for the analysis of flow and it has been widely studied in the literature, Osiadacz (1987), Osiadacz and Górecki (1995), and Herrán-González et al. (2009). The gas network optimization can be divided into two main categories: the optimization gas transmission pipelines and the optimization of gas distribution networks. The researches mainly focused on gas transmission pipelines optimization due to the high cost of equipment (compressor stations, reductionvalves stations and pipelines), and the low capability of computers to optimize gas distribution networks.
2
Chapter 1
Introduction
The optimization of gas networks means searching, according to a certain objective function, for optimal design parameters, optimal structures for development or optimal parameters for operation of networks, (Osiadacz, 1994). The cost of low and medium pressure networks depends mainly on network capital cost, whereas the cost of high-pressure is determined mainly by mode of operation of compressors. This operating cost of running compressor stations represents 25% to 50% of the total company's operating budget (Osiadacz, 1994) which consumes over 3% to 5% of total gas transported, (Wu et al., 2000).
1.2
Objectives of the Present Study The main original contribution proposed in this thesis is the application
of the gradient algorithm of (Todini and Pilati 1987) for analyzing gas networks in linkage with the genetic algorithm (Holland, 1975; Goldberg, 1989) for optimization. The approach is applied to a case study of gas distribution network proposed by Osiadacz and Górecki (1995) to demonstrate its efficiency and effectiveness.
1.3
Thesis Organization The thesis consists of six chapters as follows:
Chapter 1 represents an overview, objectives and organization of the thesis.
3
Chapter 1
Introduction
Chapter 2 presents the literature review for the previous work in the scope of network analysis methods, flow equations, previous work for the pioneers in optimization of gas networks and some commercial software.
Chapter 3 describes the Genetic algorithm, the optimization method used for optimizing networks in this work.
Chapter 4 discusses the code arrangement and how the code is working. Chapter 5 presents three case studies including a real case study of MoharramBek gas network and compares results from previous work to the proposed work in the present thesis.
Chapter 6 contains the conclusions and future work.
4
Chapter 2
Literature Review
CHAPTER 2 LITERATURE REVIEW 2.1
Introduction In every science there are pioneers who suffered a lot to present their
ideas and to facilitate the science to us, and there are others came after to improve pioneers’ works. No one can ignore their contributions to the human being. On the other hand, it’s valuable to present their work and where they stopped to precede their steps. Finally, it’s valuable to compare between their works. In this chapter, the concern is focused on the literature review of the major elements used in the present study; this chapter proceeds as the following: 1. Methods used in solving hydraulic networks. 2. Methods used to optimize piping work. 3. Flow equations for gases. 4. Available commercial softwares in the market.
2.2
Methods Used in Solving Hydraulic Networks Of the total expenditure incurred on different facilities of a natural gas
supply system, the expenditure incurred on the distribution network is quite large. Therefore, it’s essential to know the behavior of gas distribution network
5
Chapter 2
Literature Review
under different conditions; Table 2.1 summarizes the methods used in solving hydraulic networks. Table 2.1 Methods used in solving hydraulic networks Method
First Issued by
Year
Hardy Cross
Cross
1936
Node Equations Loop Equations Gradient Algorithm Newton Loop-Node
Martin and Peters Wood and Charles Todini and Pilati Osiadacz
1963 1972 1987 1987
Reference Menon (2005) Menon (2005) Menon (2005) Rossman (2000) Osiadacz (1987)
Recent Modification Issued by
Year
Brkic
2009
Shamir and Howard
1968
Wood
1980
Salgado et al.
1988
-
-
Reference Brkic (2009) Menon (2005) Menon (2005) Rossman (2000) -
Hardy Cross (1936) is the first who suggested such a systematic iterative procedure for network analysis. His approach is based on loop-flow correction equation, i.e. Q equations; the method is also called the method of balancing head. The method is an iterative technique solves the Q equations based on the loop equations and the mass balance to each node. Hardy Cross attempts to solve the nonlinear equations involved in network analysis by making certain assumptions: 1. Only one equation is considered at a time the available set of equations.
6
Q
Chapter 2
Literature Review
2. The effect of adjacent loops is neglected and therefore each Q equation contains only one Q term as unknown. Each term of the modified only the first-power
Q equation is expanded in a Taylor’s series with
Q terms retained, and higher-power
Q terms are
neglected. The Hardy Cross method is common for calculation of loops-like gas distribution networks with known node gas consumptions. This method is given in two forms: original Hardy Cross method-successive substitution methods and improved-simultaneous solution method (Newton-Raphson group of methods).
Brkic (2009) made an improvement of Hardy Cross method applied on looped spatial distribution networks. The improvement of original method is made by introduction of influence of adjacent contours in Jacobean matrix which is used in calculation and which is in original method strictly diagonal with all zeros in non-diagonal terms. In that way necessary number of iterations in calculations is decreased. If during the design of gas network with loops is anticipated that some of conduits are crossing each other without connection, this sort of network became, so there has to be introduced corrections of third or higher order.
Osiadacz and Pienkosz (1988) collected the methods of steady-state simulation for gas networks, using Kirchhoff’s first law, Kirchhoff’s second law and pipe
7
Chapter 2
Literature Review
flow equations, solving the set of equations using Newton multidimensional method. They classified the methods into four formulations: 1. Loop method. 2. Loop-node method. 3. Node method. 4. Node-loop method. In the first two methods, iterations are used to find the flow rates into branches, whereas in the second two methods, iterations are used to find the pressure at nodes. They compared between those methods and conclude that; in each iteration these methods give the same results of flow if the dendrites are the same, neglecting the numerical error and using the same flow equation. The main difference between these methods consists in computational complexity, thus computation time. In case of loop methods, a set of linear algebraic equations must be solved with sparse matrix of loop-branch; the difficulty here consists in the definition of the fundamental loops. Across years, the hydraulic analysis of networks was a very complicated issue until Cross (1936), the civil engineer, established a method to analyze water networks. He used Kirchhoff’s laws to analyze the water networks. Before the ready availability of digital computers in the late 1960s, this method was prized because it is so well suited for hand computations. Then it became the basis of most early computer software, but because of convergence problems for large systems containing pumps and other appurtenances, it becomes very
8
Chapter 2
Literature Review
complicated to solve it manually, such a problem that arise the computer software solution to solve these complicated systems. After the pioneered trial by Cross, many trials have arisen especially after the digital computer became ready available in 1960s. Martin and Peters (1963) made a module based on the Kirchhoff’s first law they called it Node equations method or H-equation, which says that the summation of flow rates at any node
equals to zero. The H-equation is now one of the most used modules in network hydraulic analysis.
Wood and Charles (1972) developed a method based on the Kirchhoff’s second law, which says that the sum of flow rates in a loop equals zero. They called it loop equation or Q-equation.
Todini and Pilati (1987) and later Salgado et al. (1987) solve the flow continuity and head loss equations that characterize the hydraulic state of the pipe network at a given point in time that can be termed a hybrid node-loop approach and call it (Gradient Method). Similar approaches have been described by Hamam and Brameller (1971) (Hybrid Method) and by Osiadacz (1987) (Newton Loop-Node). The only difference between these methods is the way in which link flows are updated after a new trial solution for nodal heads has been found. The importance of efficiency of the methods in network problem arises from the large dimensionality of the simulated networks. It has required that the
9
Chapter 2
Literature Review
computation time involved as well as the computer storage. At the same time, the accuracy of the results obtained must be adequate, (Osiadacz, 1987). In the following section, the most used methods in water and gas networks is represented and briefly illustrated:
2.2.1
Newton-Nodal Method It can be called also Newton-Raphson Nodal method or Node equations,
(Mays, 2000), or Newton H-equations, as well, in water networks (Larock et al., 2000).
Summarization of the method: The method can be summarized as follows: a. This method based on multi-dimensional case, it concerns to the Kirchhoff's first law. b. The initial approximations of pressures/heads are made to the load nodes (source node). c. The nodal equations of Kirchhoff’s first law and pressure drop equations in branches are to be constructed. d. To gas networks, when applying the flow equation of the appropriate pressure region, the imbalance is recorded. e. The approximation is then successively corrected until the final solution is reached.
10
Chapter 2
Literature Review
Note: For medium and high pressure gas networks, the squared value of the pressure is used for constructing all equations, and the actual pressure is used itself for low pressure networks, as it will be illustrated later on.
Method advantages: a. Simple in solving and programming. b. Few equations needed. c. Elevations of nodes are taken in consideration. d. Relatively low iteration number to get the solution. e. Still the most appropriate method in use.
Method disadvantages: a. In some cases, it does not produce some nodes’ pressures. b. For some cases, accuracy is poor, (Mays, 2000). c. If poor initial values are selected, the possible convergence problem may arise.
2.2.2
Newton-Loop Method It can be also called Q-equations, (Larock et al., 2000), or Loop-
equations or Modified Linear Theory, (Mays, 2000) as well.
11
Chapter 2
Literature Review
Summarization of the method: The method can be summarized as follows: a. This method based on multi-dimensional case, it concerns to the Kirchhoff's second law. b. The initial approximation of flow is made to the branches. c. Pressure drop equations through each loop are constructed, which is should be equal to zero according to the Kirchhoff's second law. d. When applying the flow equation of the appropriate pressure region, the imbalance is recorded. e. The approximation is then successively corrected until the final solution is reached.
Method advantages: a. The accuracy is better than nodal equations method. b. Good in loopy networks.
Method disadvantages: a. It does not take the node elevation in consideration. b. In some spatial cases, it does not get all pressures at all nodes. c. Huge iteration number is needed to get the solution. d. Hard in simulation, solution or to develop a program code to analyze it.
12
Chapter 2
2.2.3
Literature Review
Hardy Cross Nodal Method This method treats each node individually, without considering any
connections with other nodes (Osiadacz, 1987).
Summarization of the method: The method can be summarized as follows: a. This method based on one-dimensional case. b. To be solved by nodal equations. c. The procedure is just like section 2.2.1, but it solves each node individually not as a whole set as in section 2.2.1.
Method advantages: a. The pioneered algorithm for hydraulic networks analysis.
Method disadvantages: a. Very poor accuracy. b. Difficult in simulation by programming or solution. c. Accuracy is to get better in small networks. d. The method is not applicable for huge systems.
2.2.4
Hardy Cross Loop Method This method treats each loop individually (Osiadacz, 1987).
13
Chapter 2
Literature Review
Summarization of the method: The method can be summarized as follows: a. This method based on one-dimensional case. b. To be solved by loop equations. c. The procedure is just like section 2.2.2, but it solves each loop individually not as a whole set as in section 2.2.2.
Method advantages: a. The pioneered algorithm for hydraulic networks analysis.
Method disadvantages: a. Very poor accuracy. b. The most difficult method in simulation by programming or solution. c. Accuracy is to get better in small networks. d. The method is not applicable for huge systems.
2.2.5
Gradient Algorithm Method Todini and Pilati (1987) issued a very good algorithm for the purpose of
simulating water networks, and then Rossman (1994) used it to construct the well-known software program EPANET (2000). This method is called Pipe equation as well, Rosman (2000).
14
Chapter 2
Literature Review
Summarization of the method: The method can be summarized as follows: a. Forming pipe equations, through applying energy equation for each network component (nodes, pipes, pumps, turbines, etc.) in terms of the nodal heads. b. The gradient algorithm iterative method is used to linearize the energy equations. c. Initial values of flow are set to each pipe. d. Iteration is continued until the values of flow of new iteration are approximately equal to the previous one.
Method advantages: a. The fastest algorithm in simulation, very low number of iterations. b. Easy to use. c. Very good accuracy is recorded in EPANET software.
Method disadvantages: a. It has not been experienced for gas networks.
2.2.6
Newton Loop-Nodal Method Osiadacz (1987) issued a very good algorithm for the purpose of
simulating gas networks, it precedes a similar algorithm like gradient algorithm,
15
Chapter 2
Literature Review
but it differs in the way in which link flows are updated after a new trial for nodal heads, Rossman (2000).
Summarization of the method: The method can be summarized as follows: a. Forming equations, through applying the Kirchhoff's first and second laws. b. Transform the loop equations to nodal equations. c. Initial flows are set to the pipes. d. These nodal equations are then solved to get pressures. e. The nodal pressures are then used to calculate the correction to the pipe flows. f. Iteration is continued until the values of flows of new iteration are approximately equal to the previous one.
Method advantages: a. Fast convergence. b. Very good accuracy.
Method disadvantages: a. Difficulties in programming are experienced. b. To be solved by nodal equations.
16
Chapter 2
2.3
Literature Review
Comparison of Solution Methods Salgado et al. (1987) compared the most popular two methods, which are
nodal equations and loop equations, in addition of the most recent pipe method (gradient algorithm); under different levels of demand and different system configurations, (Mays, 2000). They had chosen four special cases for testing the three mentioned algorithms, Table 2.2:
a. Low velocities: For the convergence, all cases convergence was relatively equal. However, the time elapsed in loop-equations was very high, it took 789 seconds where the node-equations and pipe-equations took 70 and 30 seconds, respectively.
b. Pumps and branched networks: The convergence in this case was achieved for in all algorithms. Nevertheless, the loop-equations recorded 962 seconds with 13 iterations to get converged which is very slow corresponding to 92 seconds in 12 iterations for node-equations and 34 seconds in 10 iterations for pipeequations.
c. Pumps and branched networks with high demand: Like the previous case, the convergence was achieved for all algorithms. Whereas the remarked slowness in producing results for loop-equations was recorded also.
17
Chapter 2
Literature Review
d. Closed pipes: In this case the missing in some nodes heads were recorded for nodeequations and loop-equations, where in pipe-equations, all results are complete.
18
Chapter 2
Literature Review
Table 2.2 Comparison of solution methods, Mays (2000) Special Conditions Simulation Method Node equations Loop equations Pipe equations
Low Velocities Convergence Converged Iterations = 16, T = 70 s Converged Iterations = 17, T = 789 s Converged Iterations = 16, T = 30 s
Remarks None None None
Pumps and Branched Network Convergence Converged Iterations = 12, T = 92 s Slow convergence Iterations = 13, T = 692 s Converged Iterations = 10, T = 34 s
Remarks None Slow Convergence None
19
Pumps and Branched Network with High Demand Convergence Converged Iterations = 13, T = 100 s Converged Iterations = 15, T = 1110 s Converged Iterations = 12, T = 39 s
Remarks None Slow Convergence None
Closed Pipes Convergence Converged Iterations = 21, T = 155 s Converged Iterations = 21, T = 1552 s Converged Iterations = 19, T = 57 s
Remarks Some heads not available Some heads not available None
Chapter 2
2.4
Literature Review
Methods Used to Optimize Piping Network For many years ago, the work of piping hydraulic analysis took the first
priority for the workers in piping engineering branch until the fuel and food crises had appear in the background scene. Hence, the concerning of optimizing of piping took the first priority in research work from the hydraulic analysis researches especially for the piping associated with fuel or water transmission so that the reduction of the unit volume price. The work associated with gas piping was divided into two main categories: the optimization of gas transmission pipelines and the optimization of gas distribution networks. At first, the researches associated with optimizing piping focused on gas transmission due to the high cost of equipment and pipes, i.e. compressor stations, reduction-valves stations and pipelines, and the low capability of digital computers that limited the ability to optimize such a much-branched network, which is the case in the gas distribution networks.
2.4.1
Optimization of Gas Transmission Networks In the next section, a review to the previous studies in the scope of
piping gas transmission optimization is given. Table 2.3 summarizes the studies in this field.
20
Chapter 2
Literature Review
Table 2.3 Survey of optimization of gas transmission networks S.N
Authors
Year
Field
General Method Classification
Algorithm/ Method
1
Larson and Wong
1968
Piping optimization
Optimization
DP
2
Cheesman
1971
Piping optimization
Optimization
DP
3
Martch and McCall
1972
Piping optimization
Optimization
DP
4
O’Neill et al.
1979
Piping optimization
Optimization
SLP
5
Olorunniwo
1981
Piping optimization
Optimization
DP
6
Olorunniwo and Jensen 1982
Piping optimization
Optimization
DP
7
Edgar and Himmelblau 1988 Operation optimization
Optimization
NLP
8
Osiadacz
1994 Operation optimization
Optimization
GC
9
De Wolf and Smeers
1996
Network piping
Optimization
PLP
10
De Wolf and Smeers
2000
Piping optimization
Optimization (Simplex)
SLP
11
Ríos-Mercado et al.
2003
Minimizing fuel consumption
Optimization
TS
12
Babu et al.
2003
Piping optimization
Optimization
DE
13
Pietrasz et al.
2008 Operation optimization
Optimization
TDT, SSR, EA
14
André et al.
2009
Optimization
CR
15
Chebouba et al.
2009 Operation optimization
Optimization
ACO
16
El-Mahdi et al.
2010
Optimization
GA
Piping optimization Piping optimization
CR
: Continuous Relaxation
NLP
: Non Linear Programming
DE
: Differential Evolution
PLP
: Piecewise Linear Programming
DP
: Dynamic Programming
SLP
: Successive Linear Programming
EA
: Evolutionary Algorithms
SSR
: Search Space Reduction
GA
: Genetic Algorithm
TDT
: Topological Decomposition Technique
GC
: Goal Coordination
TS
: Tabu Search
21
Chapter 2
Literature Review
Larson and Wong (1968) determined the steady state optimal operating conditions of a straight natural pipeline with compressors in series using dynamic programming to find the optimal suction and discharge pressures. The length and diameter of the pipeline segment were assumed to be constant because of limitations of dynamic programming.
Cheesman (1971) introduced a computer optimizing code in addition to Martch and McCall (1972) problem. They considered the length and diameters of the pipeline segments to be variables. But their problem formulation did not allow unbranched network, so complicated network systems couldn’t be handled.
Martch and McCall (1972) modified the problem of Larson and Wong by adding branches to the pipeline segments. However, the transmission network was predetermined because of the limitations of the optimization technique used.
O’Neill et al. (1979) introduced a problem of a transmission pipeline through compressor stations, including the optimization of the operation scheme. They used Successive Linear Programming (SLP) to optimize the problem.
Olorunniwo (1981) and Olorunniwo and Jensen (1982) provided further breakthrough by optimizing a gas transmission network including the following features, (Babu et al., 2003): 1. The maximum number of compressor stations that would ever be required during the specified time horizon.
22
Chapter 2
Literature Review
2. The optimal location of these compressor stations. 3. The initial construction dates of the stations. 4. The optimal solutions of expansion for the compressor stations. 5. The optimal diameter sizes of the main pipes for each link of the network. 6. The minimum recommended thickness of the main pipe. 7. The optimal diameter sizes, thicknesses and lengths of any required parallel pipe loops on each link of the network. 8. The timing of construction of the parallel pipe loops. 9. The operating pressures of the compressors and the gas in the pipelines. They used dynamic programming coupled with optimization logic to find the shortest route through the network.
Edgar and Himmelblau (1988) simplified the problem to make sure that the various factors involved in the design are clear. They assumed the gas quantity to be transferred along with the suction and discharge pressures to be given in the problem statement. They optimized the following variables (Babu et al., 2003): 1. The number of compressor stations. 2. The length of pipeline segments between the compressors stations. 3. The diameters of the pipeline segments. 4. The suction and discharge pressures at each station.
23
Chapter 2
Literature Review
They considered the minimization of the total cost of operation per year including the capital cost in their objective function against which the above parameters are to be optimized. Edgar and Himmelblau (1988) also considered two possible scenarios: 1. The capital cost of the compressor stations is linear function of the horsepower. 2. The capital cost of the compressor stations is linear function of the horsepower with a fixed capital outlay for zero horsepower.
Osiadacz (1994) published a paper for the operation optimization for high pressure transmission lines. He described an algorithm for optimal control for gas networks with any configuration upon hierarchical control of networks which is capable of finding time profile of pressure and flow throughout network over 24 hours period, which minimizes the running cost of compressors whilst satisfying all imposed constraints.
De Wolf and Smeers (1996) used the problem of O’Neill et al. (1979) using piecewise linear programming (PLP) approach. De Wolf and Smeers (2000) continued the problem and represented the piecewise linear approximations as “special ordered sets of type 2” so that the piecewise linear problem could be globally solved by a mixed-integer programming code. A nonlinear programming code was also applied directly to the nonlinear exact formulation to determine a local optimum. These two alternatives were also compared to PLP. They appeared, when converging, much slower than the PLP method.
24
Chapter 2
Literature Review
Ríos-Mercado et al. (2002) proposed a reduction technique for minimizing the fuel consumption incurred by compressor stations in steady-state natural gas transmission networks. The justification of the technique was based on a novel combination of graph theory and nonlinear functional analysis. The reduction technique can decrease the problem size by more than an order of magnitude in practice, without disrupting its mathematical structure.
Babu et al. (2003) applied the differential evolution for the optimal design of gas transmission network. The differential evolution was successfully applied for this complex and highly non-linear problem. The results obtained were compared with those of nonlinear programming technique and branch and bound algorithm. The differential evolution was able to find an optimal solution satisfying all the constraints and in less computational time to converge when compared to the existing techniques.
Pietrasz et al. (2008) studied the problem of reinforcing regional gas transmission networks to cope with the forecasted demand for natural gas. The objective function to minimize was the sum of reinforcement costs. They provided three optimization methods based on topological decomposition techniques (into tree-like sub networks), search space reduction (continuous relaxation, truncated branch and bound) or evolutionary algorithms. The method based on truncated branch and bound leaded to a solution which was locally optimal in the neighborhood of the relaxed solution given by the continuous relaxation. The approach based on genetic algorithms allowed specifying a
25
Chapter 2
Literature Review
computation time limit while providing a solution whose quality was equivalent to the one given by the branch and bound. Dynamic programming yielded the best results on single-source tree-like networks with acceptable computational times.
André et al. (2009) presented techniques for solving the problem of minimizing investment costs on an existing gas transportation network by finding first the optimal location of pipeline segments to be reinforced and, second, the optimal sizes (among a discrete commercial list of diameters) under the constraint of satisfaction of demands with high enough pressure for all users. The new heuristics was based on a two phases approach: solving a continuous relaxation of the problem and choosing discrete values of diameters only among the set of pipes that was reinforced in the continuous relaxation. A branch and bound scheme was then applied to a limited number of values in order to generate good solutions with reasonable computational effort on real-world applications.
Chebouba et al. (2009) proposed an ant colony optimization algorithm for operations of steady flow gas pipeline. The decisions variables were chosen to be the operating turbocompressor number and the discharge pressure for each compressing station. The results were compared with those obtained by employing dynamic programming method showing that the ant colony optimization is an interesting way for the gas pipeline operation optimization.
El-Mahdy et al. (2010) used the genetic algorithm with “binary coding” to optimize the pipes’ sizes in the gas networks under the constraint of minimum
26
Chapter 2
Literature Review
pressure at demand nodes. They validated the technique through a high pressure network case. Their results were promising and gave a good indication for using the optimization as a tool to predict the optimum network pipe size arrangement reference to human work. The studies in gas network optimization starts with the transmission lines which were an introduction to the distribution networks, as the transmission lines are very limited compared with the distribution networks. The pioneers started with one segment and two segments with adding compressors in advanced studies and studied the transmission lines design and its operation optimization in consequence.
2.4.2
Optimization of Gas Distribution Networks For the optimization of gas distribution networks, the improved
capabilities of personal computers in the beginning of 1980s and the developed optimization algorithms encouraged the researches concerned with optimization of gas distribution networks, Table 2.4.
27
Chapter 2
Literature Review
Table 2.4 Survey of optimization of gas distribution networks S.N
Authors
Year
Field
Algorithm/ Method
1
Osiadacz and Górecki
1995
Piping optimization
DP
2
De Mélo Duarte et al.
2006
Piping optimization
TS
3
Wu et al.
2007
Piping optimization
GOP
DP : GOP : TS :
Dynamic Programming Global Optimization Programming Tabu Search method
Osiadacz and Górecki (1995) represented the optimization of gas networks for medium and low pressure networks using dynamic programming for sizing the pipe network diameters.
De Mélo Duarte et al. (2006) proposed and applied a tabu search algorithm for the optimization of constrained gas distribution networks to find the least cost combination of diameters for the pipes, satisfying the constraints related to minimum pressure requirements and upstream pipe conditions. The results of the proposed algorithm were compared with the results of a genetic algorithm and two other versions of tabu search algorithms. The results were very promising, regarding both quality of solutions and computational time.
Wu et al. (2007) established a mathematical optimization model of the problem of minimizing the cost of pipelines incurred by driving the gas in a non-linear distribute network under steady-state assumptions. They presented a global
28
Chapter 2
Literature Review
approach, which was based on the GOP primal-relaxed dual decomposition method to the optimization model. The introduction of variables and adding of constraints converted the primal problem to a quadratic model. The previous literature review reveals that the majority of researches focused on the optimization of gas transmission networks.
2.5
Flow Equations During the almost two centuries that the natural gas industry has been in
existence there has always been a need for workable equations to relate the flow of gas through a pipe to the properties of both the pipe and the gas and to the operating conditions such as pressure and temperature. The usefulness of such equations is obvious: systems must be designed and operated with full knowledge of what pressures will result from required flow rates. The flow in a horizontal pipe is given by the following equation, Schroeder (2001):
T Q = 77.54 b Pb
P12 − P22 G LT f Z f
0 .5
D 2 .5
(ft3/day) ................ (2.1)
Table 2.5 gives the main nomenclature used in the flow equations for both English and SI units.
29
Chapter 2
Literature Review
Table 2.5 Flow equations key symbols USCS units D = pipe inside diameter, in. E = pipeline efficiency, a decimal value less than or equal to 1.0 e = (In Flow Equation) Base of the natural logarithm (e = 2.7182818) F = transmission factor, F = 2 f , (-) f = Darcy-Weisbach friction factor, (-) G = gas specific gravity (air = 1.00) H1 = upstream elevation, ft H2 = downstream elevation, ft L = pipe segment length, mile Le = equivalent length of pipe segment, mile P1 = upstream pressure, psia P2 = downstream pressure, psia Pb = base pressure, psia Q = volume flow rate, standard ft3/day (SCFD) s = elevation adjustment parameter, (-) Tb = base temperature, R (460 + °F) Tf = average gas flow temperature, R (460 + °F) Z = gas compressibility factor, (-) ε = absolute roughness, in. µ = gas viscosity, lb/ft.s
SI units D = pipe inside diameter, mm E = pipeline efficiency, a decimal value less than or equal to 1.0 e = (In Flow Equation) Base of the natural logarithm (e = 2.7182818) F = transmission factor, F = 2 f , (-) f = Darcy-Weisbach friction factor, (-) G = gas specific gravity (air = 1.00) H1 = upstream elevation, m H2 = downstream elevation, m L = pipe segment length, km Le = equivalent length of pipe segment, km P1 = upstream pressure, kPa (absolute) P2 = downstream pressure, kPa (absolute) Pb = base pressure, kPa Q = gas flow rate, standard m3/day s = elevation adjustment parameter, (-) Tb = base temperature, K (273 + °C) Tf = average gas flow temperature, K (273 + °C) Z = gas compressibility factor, (-) ε = absolute roughness, mm µ = gas viscosity, Poise
Gas lines date back to England in the early 19th century and engineers have needed to determine their capacity ever since. It is difficult for many to recall the time as recently as the 1960’s when there were no personal computers or even desk-top calculators that could do much more than add or subtract. In that environment an implicit relationship such as Colebrook-White, which was wellknown then, was impractical and some simplification was essential.
30
Chapter 2
Literature Review
One of the first flow equations submitted to the natural gas industry is Pole’s equation (1851), Osiadacz (1987): (For low pressure)
Q = 7.1 x 10
−3
P1 − P2 GL
0.5
(m3/day) ................ (2.2)
D 2.5
For the Spitzglass equation; first published in 1912; which comes in two flavors (Schroeder et al., 2001): (For low pressure) 0 .5
Q = 3.839 x 10 3 E
Tb Pb
P1 − P2 3.6 + 0.03D G T f Le Z 1 + D
D 2.5 (ft3/day) ... (2.3)
(For high pressure) 0.5
T Q = 729.6087 E b Pb
P12 − e s P22 3.6 + 0.03D G T f Le Z 1 + D
D 2.5 (ft3/day) ........ (2.4)
The Weymouth, Panhandle A, and Panhandle B equations were developed to simulate compressible gas flow in long pipelines. The Weymouth is the oldest
31
Chapter 2
Literature Review
and most common of the three. It was developed in 1912. The Panhandle A was developed in the 1940s and Panhandle B in 1956. The equations were developed from the fundamental energy equation for compressible flow, but each has a special representation of the friction factor to allow the equations to be solved analytically. The Weymouth equation is the most common of the three probably because it has been around the longest. The equations were developed for turbulent flow in long pipelines. For low flows, low pressures, or short pipes, they may not be applicable. The Weymouth equation, (Schroeder et al., 2001): P12 − e s P22 G T f Z Le
T Q = 433.5E b Pb
0.5
(ft3/day) ................ (2.5)
D 2.667
While the Panhandle ‘A’ (for high pressure region), (Schroeder et al., 2001): T Q = 435.8E b Pb
1.0788
P12 − e s P22 G 0.8539 T f Z Le
0.5
D 2.6182 (ft3/day) ............. (2.6)
Panhandle ‘B’ (for high pressure), (Schroeder et al., 2001): T Q = 737 E b Pb
1.02
P12 − e s P22 G 0.961 T f Z Le
0.51
D 2.53
(ft3/day) ................ (2.7)
In the next section, the most used flow equations are tabulated in Table 2.6, with the conditions of gas flow and its units (in Imperial and SI).
32
Chapter 2
literature Review
Table 2.6 Gas flow equations, Osiadacz (1987), Schroeder (2001), Ohirhian (2002), Menon (2005) and Coelho and Pinho (2007) Formula Name Lacey
Lacey-Pole
Renouard
Formula Q = 5.72 x 10
Q = 7.1 x 10
P1 − P2 GL
−3
Q = 8 . 614
P1 − P2 GL f
−3
P1 − P2 G 0 . 82 L
Units
Friction or transmission factor equations Unwin's Law:
0.5
D
2.5
SI
(1)
f = 0.0044 1 +
12 0.276 D
0.5
D 2.5 1 1 . 82
D
SI 4 . 82 1 . 82
f = 0.0065
Conditions Related Low Pressure: 0-75 mbar gauge Low Pressure: 0-75 mbar gauge Low Pressure: 0-75 mbar gauge
SI 0.5
Tb Pb
Q = 3.839 x 103 E Spitzglass
Low Pressure:
USCS (2)
D 2.5
P ≤ 1 psig
0.5
Q = 5.69 x 10 −2 E
Polyflo
P1 − P2 3.6 G T f Le Z 1 + + 0.03D D
Q = 7.57 x 10
−4
Tb Pb Tb Pb
P1 − P2 91.44 G T f Le Z 1 + + 0.0012 D D P12 − P22 G Tf L f
D 2.5
Low Pressure:
SI
P ≤ 6.9 kPa
0.5
D 2.5
SI
33
f = 0.0351 Re −0.152 E −2
Medium Pressure: 0.75-7.0 bar gauge
Chapter 2
literature Review
Table 2.6 (Continued) Formula Name Renouard
Formula Q = 26.4437
(P − P ) − E G T f Le z f 2 1 0.82
Tb Pb
1
µ 0.0989
Units
2 2
1 1.82
D
4.82 1.82
SI
Friction or transmission factor equations
1 = 2.1822 Re 0.10 f
Conditions Related Medium Pressure: 0.75-7.0 bar gauge
0.5
Q = 729.6087 E
P12 − e s P22 3.6 G T f Le Z 1 + + 0.03D D
Tb Pb
Spitzglass
Tb Pb
T Q = 77.54 b Pb Q = 1.1494 x 10− 3
P12 − e s P22 91.44 G T f Le Z 1 + + 0.0012 D D
Tb Pb
P12 − P22 G 0.8587 T f Le
T Q = 410.1688 E b Pb
Q = 2.827 E
General Flow Equation (3)
P > 1 psig
USCS
0.5
Q = 1.0815 x 10 −2 E
Fritzsche
D 2.5
P −P G T f Le 2 1 0.8587
2 2
P12 − e s P22 G T f Le Z f Tb Pb
D 2.5
P > 6.9 kPa
SI
0.538
D 2.69
USCS High Pressure
0.538
D 2.69
SI
0.5
D 2.5
P12 − e s P22 G T f Le Z f
USCS 0.5
D 2.5
SI
34
Colebrook-White Equation. Modified Colebrook-White equation. von Kármán equation (4).
High Pressure: P > 7.0 bar
Chapter 2
literature Review
Table 2.6 (Continued) Formula Name
IGT (5)
Formula
Mueller
G
Q = 3.0398 x 10 − 2 E
Ohirhian
Tb Pb
ε 3 .7 D
+
where: x = 55.129726
Panhandle A
T Q = 435.87 E b Pb
2 2
T f Le µ
1.0788
D 2.667
SI
D 2.725
USCS
0.2609
2.51 x
High Pressure
1 = 2.3095 Re 0.1 f
s
2 1 0.7391
2 2
T f Le µ
High Pressure
0.575
P −e P
G
f = 4.619 Re 0.1
Conditions Related
0.575
D 2.725
0.2609
SI
µD 20.14G
( P12 − P22 )GD 3
T Q = 4.5965 x 10 E b Pb −3
0.7391
USCS
0.555
P −e P G T f Le µ 0.2 s
P12 − e s P22
T Q = 85.7368 E b Pb
Q = −2000 x log
D 2.667
2 1 0.8
Tb Pb
Q = 1.2822 x 10 −3 E
Friction or transmission factor equations
0.555
P12 − e s P22 G 0.8 T f Le µ 0.2
T Q = 136.9 E b Pb
Units
0.5
USCS
xµD f = 0.02014 Q G
USCS
F = 7.2111 E
SI
F = 11.85 E
2
High Pressure
LT f Z f µ 2 P12 − e s P22
0.5394
G 0.8539 T f Le Z 1.0788
P12 − e s P22 G 0.8539 T f Le Z
D 2.6182 0.5394
D
2.6182
35
QG D QG D
0.07305
0.07305
High Pressure: P > 7.0 bar gauge Fully Turbulent: 5 x 10 6 ≤ Re ≤ 11 x 106
Chapter 2
literature Review
Table 2.6 (Continued) Formula Name
Formula T Q = 737 E b Pb
Panhandle B
1.02
P12 − e s P22 G 0.961 T f Le Z
T Q = 1.002 x 10 E b Pb
1.02
−2
T Q = 433.5E b Pb
Weymouth
Q = 3.7435 x 10 −3 E
Tb Pb
Friction or transmission factor equations
USCS
F = 16.7 E
0.51
D
2.53
P12 − e s P22 G 0.961 T f Le Z
P12 − e s P22 G T f Le Z
Units
0.51
D
2.53
SI
QG D
QG F = 19.08 E D
0.01961
0.01961
Conditions Related High Pressure: P > 7.0 bar gauge Fully Turbulent: 4 x 106 ≤ Re ≤ 40 x 10 6
0.5
D 2.667
P12 − e s P22 G T f Le Z
USCS
F = 11.18 D1 / 6
0.5
D 2.667
SI
F = 6.521 D1 / 6
High pressure: P > 7.0 bar gauge
(1)
System International.
(4)
Also called AGA equation “ American Gas Association” .
(2)
US. Customary System.
(5)
Institute of Gas Technology.
(3)
Also called “ Fundamental Flow Equation” .
36
Chapter 2
2.6
Literature Review
Friction Factor, Transmission Factor, Equivalent Length of Pipe and Reynolds Number There are two common friction factor definitions in standard usage; the
Fanning and the Darcy-Weisbach. In the nineteenth century, two groups approached the fluid flow problem independently and arrived at remarkably similar results. Darcy-Weisbach factor is simply 4 times the Fanning factor. The transmission factor F is considered the opposite of the friction factor f. Whereas the friction factor indicates how difficult it is to move a certain quantity of gas through a pipeline, the transmission factor is a direct measure of how much gas can be transported through the pipeline. The transmission factor F is related to the Darcy-Weisbach friction factor f as follows: F=
2 f
................. (2.8)
The Colebrook-White equation is used to calculate the friction factor in gas pipelines in turbulent flow:
1 f
= −2 log10
ε 3.7 D
+
2.51 Re
for Re > 4000
f
................. (2.9)
The Modified Colebrook-White Equation for turbulent flow gives higher friction factor:
37
Chapter 2
Literature Review
1 f
ε
= −2 log10
3.7 D
+
2.825 Re
............... (2.10)
f
The American Gas Association (AGA) proposed the following equations: - For the fully turbulent flow, AGA recommends the von Kármán rough pipe flow equation:
3.7 D
F = 4 log10
............... (2.11)
ε
- For the partially turbulent zone: F = 4 D f log10
Re 1.4125 Ft
............... (2.12)
with: Ft = 4 log 10
Re − 0.6 Ft
............... (2.13)
where: Ft : von Kármán smooth pipe transmission factor
D f : Pipe drag factor. It depends on the Bend Index (BI) of the pipe which ranges between 0.9 to 0.99. BI is defined as:
BI =
Total degrees of all bends in pipe segment Total length of pipe section
38
Chapter 2
Literature Review
The effect of elevation difference between the upstream and downstream ends of the pipe segment is included in the flow equations by using the equivalent length, Le , and the term e s . The equivalent length is defined as, Menon (2005):
(
)
L es − 1 Le = s
............... (2.14)
The parameter s depends upon the gas gravity, gas compressibility factor, the flowing temperature, and the elevation difference. It is defined as follows, Menon (2005): s = 0.0375 G
H 2 − H1 Tf Z
(USCS units) .............. (2.15)
s = 0.0684 G
H 2 − H1 Tf Z
(SI units) .............. (2.16)
The units of symbols are as in Table 2.5. The Reynolds number is used to characterize the type of flow in a pipe, such as laminar, turbulent, or critical flow. It is calculated from the following equation: Re =
vDρ
............... (2.17)
µ
In gas pipeline hydraulics, using the customary units in Table 2.5, the Reynolds number is calculated from, Menon (2005):
39
Chapter 2
Literature Review
Re = 0.0004778
Re = 0.5134
Pb Tb
Pb Tb
GQ µD
GQ µD
Flow types are laminar flow (Re flow (Re > 2000 and Re
2.7
(USCS units) .............. (2.18)
(SI units) .............. (2.19) 2000), turbulent flow (Re > 4000) and critical
4000).
Comparison among Flow Equations Two comparisons among flow equations are achieved: the first one by
starting with a fixed upstream pressure in a pipe segment at a given flow rate, then equations differ in predicting downstream pressures, i.e. some equations calculate higher pressure drops for the same flow rate than others. The second comparison of flow equations is the upstream pressure required for various flow rates. For low pressure equations, Lacey, Spitzglass (low-pressure) and Renouard equations are compared in Figure 2.1(a). It can be observed that Lacey’ s equation has the most pressure drop with length whereas Spitzglass is the less pressure drop with length. Figure 2.1(b) shows that the required upstream pressure calculated by Lacey’ s equation increases as long as flow rate in pipe increases more than the other equations, while Renouard’ s equation is the less equation affected by the change in the flow rates.
40
Chapter 2
Literature Review
Le = 10,000 m, D = 300 mm, Q = 0.2 m3/s, P1 = 600 Pa, ρ = 0.64 kg/m3 610
610
Pressure, Pa
600
Upstream Pressure, Pa
Lacey Equation Spitzglass Equation Renouard Equation
590 580 570 560
0
2000
4000
6000
8000
10000
Lacey Equation Spitzglass Equation Renouard Equation
605
600
595 0
0.1
0.2
0.3
0.4
0.5
Flow Rate, m3/s
Length, m
(a)
(b)
Figure 2.1 Comparison among various low-pressure flow equations (a) Length vs. Downstream pressure (b) Flow rates vs. Upstream pressure
For medium-pressure flow equations, namely, Spitzglass, Polyflow and Renouard are compared in Figure 2.2. By examining Figure 2.2(a), it is clear that the highest pressure drop is predicted by the Renouard equation and the lowest pressure drop is predicted by the Spitzglass equation. Figure 2.2(b) shows that the Polyflo equation predicts the highest upstream pressure at any flow rate, whereas the Spitzglass calculates the least upstream pressure. It can be concluded that the Polyflo and Renouard equations are very conservative in respect to the Spitzglass equation which is the least conservative flow equation.
41
Chapter 2
Literature Review
Le = 10,000 m, D = 210 mm, Q = 0.3 m3/s, P1 = 10,000 Pa, ρ = 0.64 kg/m3, E = 0.85 12000
Upstream Pressure, Pa
10000
Pressure, Pa
10800
Spitzglass Equation Polyflo Equation Renouard Equation
8000 6000 4000 2000 0 0
2000
4000
6000
8000
10000
Spitzglass Equation Polyflo Equation Renouard Equation
10600 10400 10200 10000 9800
0
0.1
0.2
Length, m
0.3
Flow Rate,
(a)
0.4
0.5
m3/s
(b)
Figure 2.2 Comparison among various medium-pressure flow equations (a) Length vs. Downstream pressure (b) Flow rates vs. Upstream pressure
For high-pressure flow equations, it can be seen that Panhandle B equation predicted the lowest pressure drop while Weymouth equation predicted the highest, Figure 2.3(a). In another comparison of flow equations from the upstream pressure required for various flow rates, it can be seen from Figure 2.3(b) that the Weymouth equation predicts the highest upstream pressure at any flow rate, whereas the Panhandle A predicts the least pressure.
42
Chapter 2
Literature Review
Le = 10,000 m, D = 400 mm, Q = 0.7 m3/s, P1 = 120,000 Pa, ρ = 0.64 kg/m3, E = 0.85 1 2 3 4 5
120.25
120.4 Panhandle B Equation Panhandle A Equation Colebrook-White Equation AGA Equation Weymouth Equation
120.00
Upstream Pressure, bar
Pressure, bar
120.50
1 2 3 4
119.75
5
119.50 0
2000
4000
6000
8000
10000
120.3 120.2
1 2 3 4 5
Panhandle B Equation Panhandle A Equation Colebrook-White Equation AGA Equation Weymouth Equation
4 3
120.1
1
120.0 119.9 0.5
2
0.75
1
Length, m
1.25
Flow Rate,
(a)
5
1.5
m3/s
(b)
Figure 2.3 Comparison among various high-pressure flow equations (a) Length vs. Downstream pressure (b) Flow rates vs. Upstream pressure
If the pressure drop in a pipeline is less than 40% of P1, then the DarcyWeisbach incompressible flow calculation may be more accurate than the Weymouth or Panhandles for a short pipe or low flow. The Darcy-Weisbach incompressible method is valid for any flow rate, diameter, and pipe length, but does not account for gas compressibility. Crane (1988) states that if the pressure drop is less than 10% of P1 and one use an incompressible model, then the gas density should be based on either the upstream or the downstream conditions. If the pressure drop is between 10% and 40%, then the density used in an incompressible flow method should be based on the average of the upstream and downstream conditions. If the pressure drop exceeds 40% of P1, then use a compressible model, like the Weymouth, Panhandle A, or Panhandle B.
43
Chapter 2
2.8
Literature Review
Commercial Gas Networks Softwares There are many commercial softwares for gas pipe simulation such as
GasWorkS, EcoNET, GasNet, Stanet, SimNet, and Pipeline Studio. Very few softwares concern to optimization. In the following section some of the most used softwares commercially and their capabilities are represented:
•
GasWorkS The GasWorkS software is widely used in the natural gas reticulation industries for the design of industrial and domestic supply networks. GasWorkS provides an extensive set of network modeling tools designed to assist the engineer analyze and design distribution, transmission, gathering and plant piping systems conveying natural gas or other compressible fluids. GasWorkS offers no fewer than 19 different pipe flow equations.
o Models gas flows in pipe networks. o Design neighborhood or industrial natural gas reticulation systems.
o User-choice of gas equations. o Simulate regulators, compressors, valves, wells and other equipment.
44
Chapter 2
Literature Review
Equations of Flow AGA 3 Orifice metering of natural gas and other hydrocarbon fluids AGA8 Compressibility factors of natural gas and other hydrocarbon gases AGA GPTC guide for gas transmission and distribution piping systems AGA NX19 Manual for determination of super compressibility factors for natural gas API 520 Sizing selection and installation of pressure-relieving devices in refineries
• • • •
•
• • •
• • • •
•
API 1102 Steel pipelines crossing railroads and highways ASME B31.8 Gas transmission and distribution piping systems GPA 2172 Calculation of gross heating value (etc.) for natural gas mixtures from compositional analysis GE/TD/3 Recommendations on transmission and distribution practice ICC International mechanical code ISA S75.01 Flow equations for sizing control valves ISO 5167 Measurement of fluid flows by means of pressure differential devices
EcoNET: The EcoNet is a software for the purpose of optimizing energy consumption in the system. It optimizes the energy supply cost for gas and electricity with due consideration of tariff limitations. To achieve a medium-term prediction of the energy demand, a prognosis module is used which creates a forecast of the energy consumption for the various tariffs of the current and following day(s) using historical data. The program consists of the following modules: Demand monitoring. Trend calculation. Optimization.
45
Chapter 2
Literature Review
Prognosis/forecast. Simulation.
•
GasNET: Fully integrated management software provides the following application modules: Information exchange. In-balance monitoring. Reporting. Production forecast management. Stock and capacity management. Nominations, allocations and attributions.
•
SimNET: Model based software operated through the SCADA (Supervisory Control And Data Acquisition) system. The use of a mathematical pipeline model has several advantages: It is a state-of-the-art method. It uses all real-time data of the real pipeline. It works in all operational conditions of the pipeline. It is integrated into the SCADA systems redundancy concept. Using the standard differential equations for the preservation of energy, measured values from the real pipeline, pipeline parameters and product information it calculates the behavior of the pipeline or pipeline network.
46
Chapter 3
Genetic Algorithm
CHAPTER 3 GENETIC ALGORITHM 3.1
Introduction Genetic Algorithms (GAs) are adaptive heuristic search algorithm
premised on the evolutionary ideas of natural selection and genetic. The basic concept of GAs is designed to simulate processes in natural system necessary for evolution, specifically those that follow the principles first laid down by Charles Darwin of survival of the fittest. As such they represent an intelligent exploitation of a random search within a defined search space to solve a problem. First pioneered by John Holland in the early 1970s, and particularly his book “ Adaptation in Natural and Artificial Systems” (1975), Genetic Algorithms have been widely studied, experimented and applied in many fields in engineering worlds. Not only does GA provide alternative methods to solving problem, it consistently outperforms other traditional methods in most of the problems link. Many of the real world problems involved finding optimal parameters, which might prove difficult for traditional methods but ideal for GAs.
47
Chapter 3
Genetic Algorithm
Goldberg work, (1989), originated with studies of cellular automata, conducted by Holland and his students at the University of Michigan. Holland introduced a formalized framework for predicting the quality of the next generation, known as Holland's Schema Theorem. Research in GAs remained largely theoretical until the mid-1980s, when The First International Conference on Genetic Algorithms was held in Pittsburgh, Pennsylvania.
3.2
Biological Background Every organism has a set of special features that are inherited to
preceding generations, these features are recorded in form of genes which is connected together forming long strings called chromosomes, encoding genes is through four amino acid, i.e. adenine, guanine, cytosine and thymine, in real world there are some encoding methods that will be discussed later, one of these is binary method. These genes and their settings are usually referred to as an organism' s genotype. The physical expression of the genotype - the organism itself - is called the phenotype. When two organisms mate they share their genes. The resultant offspring may end up having half the genes from one parent and half from the other. This process is called recombination. Very occasionally a gene may be mutated. Normally this mutated gene will not affect the development of the phenotype but very occasionally it will be expressed in the organism as a completely new trait.
48
Chapter 3
3.3
Genetic Algorithm
Methodology Genetic Algorithm is started with a set of solutions (represented by
chromosomes) called population. Solutions from one population are taken and used to form a new population. This is motivated by a hope, that the new population will be better than the old one. Solutions which are selected to form new solutions (offspring) are selected according to their fitness - the more suitable they are the more chances they have to reproduce. The main genetic algorithm outlines are shown in Figure 3.1.
Figure 33.1 Basic cycle of genetic algorithms
49
Chapter 3
Genetic Algorithm
The main steps are:
1. [Start] Generate random population of n chromosomes (suitable solutions for the problem).
2. [Fitness] Evaluate the fitness f (x) of each chromosome x in the population.
3. [New population] Create a new population by repeating following steps until the new population is complete:
1. [Selection] Select two parent chromosomes from a population according to their fitness (the better fitness, the bigger chance to be selected).
2. [Crossover] With a crossover probability cross over the parents to form a new offspring (children). If no crossover was performed, offspring is an exact copy of parents.
3. [Mutation] With a mutation probability mutate new offspring at each locus (position in chromosome).
4. [Accepting] Place new offspring in a new population. 4. [Replace] Use new generated population for a further run of algorithm.
5. [Test] If the end condition is satisfied, stop, and return the best solution in current population.
6. [Loop] Go to step 2.
50
Chapter 3
3.4
Genetic Algorithm
Initialization Initially many individual solutions are randomly generated to form an
initial population. The population size depends on the nature of the problem, but typically contains several hundreds or thousands of possible solutions. Traditionally, the population is generated randomly, covering the entire range of possible solutions (the search space). Occasionally, the solutions may be "seeded" in areas where optimal solutions are likely to be found.
3.5
Encoding Encoding of chromosomes is one of the problems, when starting to solve
problem with GA. Encoding very depends on the problem.
3.5.1
Binary Encoding Binary encoding is the most common, mainly because first works about
GA used this type of encoding. In binary encoding every chromosome is a string of bits, 0 or 1. Chromosome A
101100101100101011100101
Chromosome B
111111100000110000011111
Figure 33.2 Binary encoding
Binary encoding gives many possible chromosomes even with a small number of alleles. On the other hand, this encoding is often not natural for many
51
Chapter 3
Genetic Algorithm
problems and sometimes corrections must be made after crossover and/or mutation.
3.5.2
Permutation Encoding Permutation encoding can be used in ordering problems. In permutation
encoding, every chromosome is a string of numbers, which represents number in a sequence. Chromosome A
1 5 3 2 6 4 7 9 8
Chromosome B
8 5 6 7 2 3 1 4 9
Figure 3.3 Permutation encoding
Permutation encoding is only useful for ordering problems. Even for this problems for some types of crossover and mutation corrections must be made to leave the chromosome consistent (i.e. have real sequence in it).
3.5.3
Value Encoding It' s called also real encoding; Direct value encoding can be used in
problems, where some complicated value, such as real numbers, are used. Use of binary encoding for this type of problems would be very difficult. In value encoding, every chromosome is a string of some values. Values can be anything connected to problem, form numbers, real numbers or chars to some complicated objects.
52
Chapter 3
Genetic Algorithm
Chromosome A
1.2324 5.3243 0.4556 2.3293 2.4545
Chromosome B
ABDJEIFJDHDIERJFDLDFLFEGT
Chromosome C
(back), (back), (right), (forward), (left)
Figure 3.4 Value encoding
Value encoding is very good for some special problems. On the other hand, for this encoding is often necessary to develop some new crossover and mutation specific for the problem.
3.5.4
Tree Encoding Tree encoding is used mainly for evolving programs or expressions, for
genetic programming. In tree encoding, every chromosome is a tree of some objects, such as functions or commands in programming language. Chromosome A
Chromosome B
+ x
do until
/ step
5
wall
y
(+ x (/ 5 y))
( do_until step wall )
Figure 33.5 Tree encoding
53
Chapter 3
Genetic Algorithm
Tree encoding is good for evolving programs. Programming language LISP is often used to this, because programs in it are represented in this form and can be easily parsed as a tree, so the crossover and mutation can be done relatively easily.
3.6
Selection During each successive generation, a proportion of the existing
population is selected to breed a new generation. Individual solutions are selected through a fitness-based process, where fitter solutions (as measured by a fitness function) are typically more likely to be selected. Certain selection methods rate the fitness of each solution and preferentially select the best solutions. Other methods rate only a random sample of the population, as this process may be very time-consuming. There are many algorithms in selecting best chromosomes:
3.6.1
Stochastic Tournament Selection Whenever the neat of selecting an individual for reproduction, two
individuals are selected randomly for choosing one of them, the winner is better fit than the other one. As in all selection methods, the fitness function assigns a fitness to possible solutions or chromosomes. This fitness level is used to associate a probability of
54
Chapter 3
Genetic Algorithm
selection with each individual chromosome. If fi is the fitness of individual i in the population, its probability of being selected is: pi =
fi N j =1
............... (3.1)
fj
where N is the number of individuals in the population. While candidate solutions with a higher fitness will be less likely to be eliminated, there is still a chance that they may be.
3.6.2
Roulette Wheel Tournament selection provides selection pressure by holding a
tournament among number of competitors. The winner of the tournament is the individual with the highest fitness of the comprised of tournament winners, has a higher average fitness than the average population fitness. This fitness difference provides the selection pressure, which drives the GA to improve the fitness of each succeeding generation. Increased selection pressure can be provided by simply increasing the tournament size, as the winner from a larger tournament will, on average, have a higher than the winner of a smaller tournament.
3.6.3
Rank Selection This method ranks the population chromosomes, the worst will have the
fitness 1, the second worst 2, and the best is ranked to be the population size.
55
Chapter 3
3.6.4
Genetic Algorithm
Steady-State This method is close in its idea to the roulette wheel. It passes the most
of the generation population to the next but the best individual is to be mated and producing new offspring come in place of the worst individuals which are removed.
3.6.5
Hierarchical Selection Individuals go through multiple rounds of selection each generation.
Lower-level evaluations are faster and less discriminating, while those that survive to higher levels are evaluated more rigorously. The advantage of this method is that it reduces overall computation time by using faster, less selective evaluation to weed out the majority of individuals that show little or no promise, and only subjecting those who survive this initial test to more rigorous and more computationally expensive fitness evaluation.
3.6.6
Truncation Selection It’ s a selection method used in genetic algorithms to select potential
candidate solutions for recombination. In truncation selection the candidate solutions are ordered by fitness, and some proportion, p, (e.g. p = 1/2, 1/3, etc.), of the fittest individuals are selected and reproduced 1/p times. Truncation selection is less sophisticated than many other selection methods, and is not often used in practice.
56
Chapter 3
3.6.7
Genetic Algorithm
Elitism This method saves best chromosomes, with highest fitness, from
removing and copies it to next generations.
3.7
Crossover and Mutation Crossover and mutation are two basic operators of GA. Performance of
GA very depend on them. Probability of crossover process falls between 0.8 to 0.95. Type and implementation of operators depends on encoding and on a problem.
3.7.1
Single-Point Crossover A point is selected to make the crossover process at, binary string from
beginning of chromosome to the crossover point is copied from one parent, the rest is copied from the second parent. Parent (1)
Parent (2)
Figure 33.6 Single-point crossover
57
Offspring
Chapter 3
3.7.2
Genetic Algorithm
Two-Point Crossover As the previous process, two points are selected, binary string from
beginning of chromosome to the crossover point is copied from one parent, the rest is copied from the second parent. Parent (1)
Offspring
Parent (2)
+
=
Figure 3.7 Two-point crossover
3.7.3
Uniform Crossover Bits are randomly copied from the first or from the second parent. Parent (1)
Offspring
Parent (2)
Figure 33.8 Uniform crossover
3.7.4
Arithmetic Crossover Some arithmetic operation is performed to make a new offspring such as
(AND, OR, XOR etc.); example of arithmetic operator (AND). Parent (1)
Parent (2)
Figure 33.9 Arithmetic crossover
58
Offspring
Chapter 3
3.7.5
Genetic Algorithm
Mutation Mutation is a secondary genetic operator. Unlike crossover it doesn’ t
produce any offspring, but it produces random changes in the offsprings that are generated by the crossover. This process is a change in bits in individuals randomly, this process prevent falling of all solutions in a population into a local optimum. This process is added in a mean probability of occurrence, the probability of the mutation falls between 0.005 to 0.01. Individual
Mutated
Figure 33.10 Mutation
3.8
Fitness For each new solution to be produced, a pair of parent solutions is
selected for breeding from the pool selected previously. By producing a child solution using the above methods of crossover and mutation, a new solution is created which typically shares many of the characteristics of its "parents". New parents are selected for each child, and the process continues until a new population of solutions of appropriate size is generated. Although reproduction methods that are based on the use of two parents are more biology inspired, recent researches suggested more than two "parents" are better to be used to reproduce a good quality chromosome.
59
Chapter 3
Genetic Algorithm
These processes ultimately result in the next generation population of chromosomes that is different from the initial generation. Generally, the average fitness will have increased by this procedure for the population, since only the
best organisms from the first generation are selected for breeding, along with a small proportion of less fit solutions, for reasons already mentioned above. In optimization techniques an objective measure is how good the solutions it finds the fitness. Fitness function is defined over the genetic representation as it measures the quality of the represented solution. The fitness function is always problem dependent. Once the genetic representation and the fitness function are defined, GA proceeds to initialize a population of solutions randomly, and then improve it through repetitive application of mutation, crossover, inversion, and selection operators. The fitness function is, somehow, based on the genes of the individual and should reflect how good a given set of parameters is. A larger fitness value will give the individual a higher probability of being the parent of one or more children. The fitness function should be designed to give graded and continuous feedback about how well a program performs on the training set. Three types of fitness functions mentioned in Banzhaf et al. (1998):
60
Chapter 3
Genetic Algorithm
• The first is Continuous fitness function, which is defined as “any manner of calculating fitness in which smaller improvements in how well a program has learned the learning domain are related to smaller improvements in the measured fitness of the program, and larger improvements in how well a program has learned the learning domain are related to larger improvements in its measured fitness”.
Such continuity is an important property of a fitness function because it allows GP to improve programs iteratively. There are many types of continuous fitness functions: Error fitness function is a continuous fitness function that calculate the sum of the absolute value of the differences between actual output of the program and the output given by the real-world case, it can be said that the perfect fitted individual is standardized fitness as well as the actual output is equal to the output given by the case oi .
f (x ) =
n i =1
p i − oi
................. (3.2)
Squared Error Fitness calculates the sum of the square of the calculated differences between pi and oi .
f (x ) =
n i =1
( p i − o i )2
61
................. (3.3)
Chapter 3
Genetic Algorithm
Scaled Error Fitness Function that means damping or amplifying smaller deviations from target output. • The second one is Standardized fitness, which is defined as “ a transformed fitness function in which zero is the value assigned to the fittest individual”.
Standardized fitness has the administrative feature that the best fitness is always the same value (zero), regardless of what problem one is working on. • The third one is Normalized fitness, which is defined as “ a transformed fitness function where fitness is always between zero and one”.
3.9
Related Techniques In the scope of Genetic algorithm talk, there are some optimization
techniques that proceed similar to genetic algorithm: •
Cross-entropy (CE) method generates candidates’
solutions via a
parameterized probability distribution. The parameters are updated via crossentropy minimization, so as to generate better samples in the next iteration. •
Evolution strategies (ES) evolve individuals by means of mutation and
intermediate and discrete recombination. ES algorithms are designed
62
Chapter 3
Genetic Algorithm
particularly to solve problems in the real-value domain. They use selfadaptation to adjust control parameters of the search. •
Gaussian adaptation (normal or natural adaptation, abbreviated NA to avoid
confusion with GA) is intended for the maximization of manufacturing yield of signal processing systems. It may also be used for ordinary parametric optimization. It relies on a certain theorem valid for all regions of acceptability and all Gaussian distributions. The efficiency of NA relies on information theory and a certain theorem of efficiency. Its efficiency is defined as information divided by the work needed to get the information. Because NA maximizes mean fitness rather than the fitness of the individual, the landscape is smoothed such that valleys between peaks may disappear. Therefore it has a certain ambition to avoid local peaks in the fitness landscape. NA is also good at climbing sharp crests by adaptation of the moment matrix, because NA may maximize the disorder (average information) of the Gaussian simultaneously keeping the mean fitness constant. •
Genetic programming (GP) is a related technique popularized by John Koza
in which computer programs, rather than function parameters, are optimized. Genetic programming often uses tree-based internal data structures to represent the computer programs for adaptation instead of the list structures typical of genetic algorithms, Banzhaf et al. (1998).
63
Chapter 3
Genetic Algorithm
64
Chapter 4
Code Arrangement
CHAPTER 4 CODE ARRANGEMENT 4.1
Introduction In this chapter, the methodologies of programming and research are
illustrated. The GAGAGas.net program (Gradient Algorithm Genetic Algorithm Gas network) is written in C/C++ language. It should be noted here that many programmed functions are borrowed from EPANET 2.0 (Rossman, 2000) and Numerical Recipes in C (Press et al., 2002). The developed program passes through three main stages: 1. Network graph analysis. 2. Network hydraulic analysis and simulation. 3. Network optimization. These stages are illustrated in details in the present chapter.
4.2
Network Graph Analysis Solution of any network requires representation of the network to
explore the suitable method of solution. At first, the proposed scheme of the gas network is given as a text file; mainly, it gives nodes and links data.
65
Chapter 4
Code Arrangement
Nodes data includes: a. Identification code. b. Demand flow rate if it' s a demand junction. c. Pressure if it' s a source node. Links data includes: a. Link identification code. b. Sending and receiving nodes'identification codes. c. Link length. d. Link initial diameter. e. Link roughness. The GAGAGas.net reads nodes and links data and save it.
4.3
Network Hydraulic Analysis and Simulation Several parameters are involved in the analysis of pipe networks, such
as; network layout, pipes lengths, pipes diameters, pipes roughness and patterns at source and demand nodes. The analysis of networks establishes the interrelationships among these parameters through the well-known engineering concepts; generally, pipe head losses relationship, node flow continuity equation.
66
Chapter 4
4.4
Code Arrangement
Network Hydraulic Analysis In the developed GAGAGas.net program, there are two ranges of pipe
head losses formulation; i.e. (low pressure and medium pressure). Low pressure is considered to be between 0-75 mbar (gauge); Lacey-Pole' s equation is used (Osiadacz, 1987): P1 − P2 = 11.7 x 10 3
L Q2 5 D
................. (4.1)
where the nodal pressure P is in mbar, D the diameter in mm, L the link length in m, and the flow rate Q in m3/h. Medium pressure range is considered to be between 0.75-7.00 bar (gauge), Polyflo equation is used (Osiadacz, 1987): P12 − P22 = 42.56 x 10 3
L D
4.848
Q 1.848
................. (4.2)
The simulations of pressure and flow rates through the network are formulated in the developed program through the gradient algorithm (Todini and Pilati, 1987). These formulas are adapted from Bhave and Gupta (2006):
[
H t +1 = − A 21 (NA 11 ) A 12 −1
] ⋅ [A −1
− (A 21 Q t − q o )]
21
(NA 11 )−1 (A 11 Q t + A 10 H o ) ................. (4.3)
67
Chapter 4
Code Arrangement
(
Q t + 1 = I − N −1
)
−1
[
]
−1 Q t − N −1 A 11 (A 12 H t +1 + A 10 H o )
................. (4.4)
where:
A10:
Source nodes - links matrix which indicates the relationships between source nodes and links; its dimension is (l x s).
A11:
A square diagonal matrix of pressure
losses; its dimension is (l x l),
calculated by the appropriate flow-equation related to its pressure range i.e. Lacey equation for low-pressure.
A12:
Demand junctions
links matrix which indicates the relationships
between them, its dimension is (j x l).
A21:
Transpose of (A12).
Ho:
Source nodes'known head matrix, its dimension is (s x 1).
Ht+1:
Unknown node pressure head matrix in the present iteration t + 1; its dimension is (n x l)
I:
The identity matrix.
j:
Demand junctions'number.
l:
Links number.
N:
A square diagonal matrix of flow rate exponent (n) related to its flowequation in its pressure range; its dimension is (l x l).
qo:
Flow rates demands at demand junctions; its dimension is (j x 1).
Qt:
The previous iteration or initial flow rate matrix; its dimension is (l x 1).
Qt+1:
Unknown pipe flow matrix in the present iteration; its dimension is (l x 1).
68
Chapter 4
s:
Code Arrangement
Source nodes'number.
Then, after the program saved nodes and links data at the previous stage, it should to be represented or formulated in this form to be simulated.
4.5
Data Structure The relation between links and nodes is the most important issue to be
established firmly, it' s represented through the two matrices A12 and A10, so that
A12 matrix represents the relationship between demand junctions, which represent the matrix rows, and all links, which represent the matrix columns, through (1, −1 and 0) numbers, i.e. if the link is attached to a definite junction and is subjected to the junction direction, "1" is represented in the A12 matrix, once again, if the link is attached to a definite junction and the flow direction is in the opposite direction "−1" is represented, finally, if there' s no attachment between this link and a junction, "0" is represented.
A10 matrix is represented by this methodology, but it represents the relationship between network links and source nodes only. After representing the network graph in matrices, it' s time to represent the given data for nodes and links. Links given data are represented through matrices A11 and, whereas nodes given data are represented in Ho and qo.
69
Chapter 4
Code Arrangement
A11 matrix is a square diagonal matrix that represents link pressure losses that computed by one of the previously mentioned pressure losses formulas according to the network pressure range; i.e. (Lacey-Pole for low pressure).
N matrix is a square diagonal matrix that represents the flow rate exponent "n" according to the pressure losses formula subject to the network pressure range; i.e. (polyflo formula for medium pressure range n = 1.842).
Ho matrix represents the given pressure at source nodes, where qo represents the demand flow rates at demand junctions. Finally, Qt matrix represents the previous iteration flow rates results in pipes, but flow rates in pipes are to be assumed initially by:
Qi =
π 4
Di2 v i
i = 1,…, l
................. (4.5)
After formulation, iteration starts to the model which doesn' t stop until corrections in flow rates don' t exceed 1.0e-6, or stops with error when exceeds the maximum trials. After computing the flow rates matrix Qt+1 and heads matrix Ht+1, the velocity is then calculated as follows: •
For low pressure, the velocity is calculated by the following equation: vi =
4 Qi π Di2
i = 1,…, l
70
................. (4.6)
Chapter 4
•
Code Arrangement
For medium pressure, the velocity is calculated by the following equation (Osiadacz and Górecki, 1995): vi =
αi 1.751 Pabs
i = 1,…, l
................. (4.7)
i = 1,…, l
................. (4.8)
where:
αi =
Qi Di2
Pabs : average absolute pressure in the pipe, psia, and given as the half of absolute difference between the first node pressure and last node in the link, Pabs ,i = 0.5 Pi1 − Pi 2 Di :
pipe diameter, inch
vi :
velocity in pipes, ft/s
i = 1,…, l
After that the velocity is converted into the appropriate dimension.
4.6
Network Optimization As it was mentioned previously that applying optimization in this study
is to obtain an optimized arrangement of a gas network links diameters that has the minimum capital cost ever corresponding to the two constraints, i.e. maximum link velocity and minimum junction pressure. Real-Coded Genetic Algorithm (Deb and Agrawal, 1995) is used to search randomly in optimized space and then converge to better solutions by applying
71
Chapter 4
Code Arrangement
iterative manner; the three processes of reproduction/selection, cross-over and mutation iterate until the generation fitness comes absolutely constant. In Genetic Algorithm (GA) there are some terminologies which it' s worthy to apply it in our case. Generations are corresponding to the set of populations which contain the set of links diameters; the links diameters are individuals. Table 4.1 Terminology in genetic algorithms Generation Population Parents Children Individuals
Produces set of populations Sets of diameters link arrangement. Best populations picked from previous generations to be mated. New produced sets of diameters link arrangement after matting best populations in previous generation to produce new generation with new population set. Set of link' s diameter.
A brief description of the steps of using GA for pipe network optimization is as follows:
4.6.1
Initial Population In the present code, the initiation of 0th generation is started by the actual
design of the network given at first to be simulated, then the best populations are picked to be parents of the preceding generations by crossing-over its individuals with some mutation probabilities in some generations until the best population in a generation ever is produced and comes constant in preceding
72
Chapter 4
Code Arrangement
generations. During this process the population sets enter the simulation engines to be simulated and get the results to evaluate it by the optimization engine.
4.6.2
Computation of Network Cost Evaluating the cost depends on two main points; the first is the actual
cost of the available piping arrangement given as size-cost table. The second is to evaluate the penalties that happened due to the deviation away from constraints by velocities in links or pressures at nodes. A data file contains diameters versus diameters'cost in ($) are given to be read, a step function is applied to round the result population diameters into the closest pipe diameters, then calculate the cost of the population. The GA assigns a penalty cost if a pipe network design does not satisfy the minimum pressure constraints. The link' s velocity and the pressure violation at the node are used as the basis for computation of the penalty cost. Link' s velocity and node' s pressure deficits are to be used with the total cost to calculate the penalty cost.
4.6.3
Computation of Fitness The fitness of the coded string is taken as some function of the total
network cost. For each proposed pipe network in the current population, it can be computed as the inverse or the negative value of the total network cost.
73
Chapter 4
4.6.4
Code Arrangement
Generation of a New Population GA uses some techniques for selection from the population the best
individuals to pass through; in this study tournament selection routine is used.
4.6.5
Cross-Over Operator Cross-over occurs in a specific probability of cross-over for pair of
parents strings selected in the previous section. In this work, uniform cross-over is used with the cross-over probability 0.6.
4.6.6
Mutation Operator Crossover happens to the most of the selected generation in probability
of 0.6 as some of good individuals may pass without making any operations on them. Very low jump mutation probability of about 0.04 is used.
4.6.7
Production of Successive Generations The use of the three processes mentioned before produces a new
generation of a pipe network designs. GA repeats the process to generate successive generations. Best population in all generations is stored.
4.7
Flow Diagram In this section, the flow diagram of the proposed software GAGAGas.net
is displayed. It contains two parts; the first is the simulation engine and the second is the optimization engine. An illustration of each block work is given.
74
Chapter 4
4.7.1
Code Arrangement
Simulation and Hydraulic Analysis Engine Flow Diagram Figure 4.1 shows the simulation and analysis engine flow diagram; it
contains three main parts: 1. Simulation. 2. Arranging matrices. 3. Hydraulic analysis.
1. Simulation This part reads nodes and branched data from the data file, as mentioned before. Nodes and branches have user identified, the engine reidentify the nodes and branches in sequential numbers with saving the corresponding user identification to be reported when writing the report file and results anyway. Then linking is to be strutted between nodes and links to make the network data structure. The check for unlinked nodes is done synchronically and reports warning if it is found. The data structures of matrices are to be built according to Section (4.5).
2. Arranging Matrices In this study, the sparse matrix is used to save memory allocation size. In sparse matrix, there is no memory-allocation to (zero) members in
75
Chapter 4
Code Arrangement
matrices. The subroutine works as follows: 1-
For each node, it builds an adjacency list that identifies all links connected to the node.
2-
Re-orders the network' s nodes to minimize the number of non-zero entries in the hydraulic solution matrix.
3-
It converts the adjacency lists into a compact scheme for storing the non-zero coefficients in the lower diagonal portion of the solution matrix.
Then initialization of Qt matrix is to be done as mentioned previously in Section (4.5).
3. Hydraulic Analysis Now it’ s time to calculate the losses in links according to the initialized
Qt by using one of the flow equations (i.e. Lacey-Pole for low pressure, Eq. (4.1) or Polyflo for medium pressure, Eq. (4.2)) putting the results in
A11 matrix. This operation is to be repeated after getting new Qt+1 set, which is Qt in the new iteration. Now all matrices are strutted, in this study the Envelope method (Baker, 1977; George and Liu, 1981) is used. The used subroutine has been adapted from GSFCT and GSSLV, George and Liu (1981).
76
Chapter 4
Code Arrangement
Figure 4.1 Flow diagram for the simulation and analysis engine
77
Chapter 4
4.7.2
Code Arrangement
Optimization Engine Flow Diagram Figure 4.2 illustrates the optimization engine and includes: 1. Initialization. 2. Selection. 3. New generation. 4. Crossover. 5. Mutation. 6. Fitness. 7. Successive generation. 8. Reporting.
1. Initialization In this work, the initial generation is the existing design denoted by the user. After that it is to be tested for its fitness by calling Objective () subroutine. This subroutine tests its fitness through the fitness function and returns the fitness and penalty values.
2. Selection
Statistics() subroutine is then called to classify the best, average and worst individuals and select best generation to be copied to the preceding generation.
78
Chapter 4
Code Arrangement
Figure 4.2 Flow diagram for the optimization engine
79
Chapter 4
Code Arrangement
3. New Generation The program calls generate_new_pop() subroutine which generates a random population. The random number generator, random1(), was written by Goldberg (1989). Each number generated are handled by a step-function, getdiametersize(), to pick a diameter-size from a diametersize order from the table of pipe price, then saving its size and price. Then, mate is to be between old best individuals in previous generations calling subroutine mate().
4. Crossover The function mate() calls the function cross_over(first, second,
childno1, childno2). 5. Mutation Mutation function is conditioned to a probability factor of 0.06.
6. Fitness After generating a new generation the objective() function is continuously called each time to evaluate how fitness the population is. Each time it simulate the population individuals to get the hydraulic parameters, i.e. links’ velocities and junctions’ pressures.
The objective function was the cost and the constraints were the minimum nodal pressures and the maximum velocity in pipes given as, Djebedjian et al. (2006):
80
Chapter 4
Code Arrangement
Cost:
CT =
l i =1
c i (Di ) ⋅ Li
................. (4.9)
Constraints:
Dmin ≤ Di ≤ Dmax
i = 1,…,l
............... (4.10)
v i ≤ v max
i = 1,…,l
............... (4.11)
Pj ≥ Pmin
j = 1,…,n
............... (4.12)
Objective function: Fo = C T + C Pv + C Pp
............... (4.13)
Penalty functions:
C Pv = 0 C Pv
C = T l
if v i ≤ v max l i =1
2 ( v i2 − v max )
C Pp = 0 C Pp =
CT n
if v i > v max
............... (4.14)
if Pj ≥ Pmin n j =1
( Pmin − Pj )
if Pj < Pmin
81
............... (4.15)
Chapter 4
Code Arrangement
where:
ci (Di )
:
Cost of link i with diameter Di
CT :
Total cost
CPp :
Penalty cost for nodal pressure
C Pv :
Penalty cost for velocity
Di :
Diameter of link i
Dmax :
Maximum diameter
Dmin :
Minimum diameter
Fo :
Objective function
Li :
Length of link i
l:
Number of links
n:
Number of nodes
Pj :
Actual gas pressure at junction j
Pmin :
Minimum allowable gas pressure at junctions
vi :
Actual gas velocity in link i
v max :
Maximum allowable gas velocity in links
7. Successive Generations
Now, there is a new generation to start again from the second step. This procedure is continued till the stopping criterion, which is the total number of generations, is met.
82
Chapter 4
Code Arrangement
8. Reporting
At the end of optimization, report files and plot files are released giving the optimization results.
4.8
Computer Files of GAGAGAS.net Program The computer files used in the proposed software GAGAGas.net are
listed in Table 4.2. Table 4.2 Various simulation methods used for software of GAGAGAS.net program File Name
File Type
HASH.C
Source
hydraul.c INPFILE.C input1.c INPUT2.C mempool.c Optimize.c OUTPUT.C report.c rules.c smatrix.c enumstxt.h funcs.h hash.h Optimize.h text.h types.h vars.h Diameters
Source Source Source Source Source Source Source Source Source Source Header Header Header Header Header Header Header Text
Description Implementation of a Simple Hash Table for String Storage & Retrieval Hydraulic Simulator Saves Input Data for the Program Input Function for Data Saving Input Data File Interpreter for the Program Fast Memory Allocation Package Optimization Engine Binary File Transfer Routines Reporting Routines for GAGAGAS Program Rule Processor Module Sparse Matrix Routines Text Strings for Enumerated Data Types Function Prototypes Header File for Hash Table Module HASH.C Header File for Optimize Module Optimize.C String Constants Global Constants and Data Types Global Variables Input Data File for Pipe Cost
83
Author
Modified
Rossman
---
Rossman Rossman Rossman Rossman Steve Hill Deb Rossman Author Rossman Press et al. Rossman Rossman Rossman Author Rossman Rossman Rossman Author
Author Author Author Author Author Author Author --Author Rossman Author Author ----Author Author Author ---
Chapter 4
Code Arrangement
84
Chapter 5
Results and Discussion
CHAPTER 5 RESULTS AND DISCUSSION OF CASE STUDIES 5.1
Introduction Through the preceding chapter, the developed software (GAGAGAS.net)
which optimizes the gas distribution networks is discussed. In the first part of this chapter, a verification of the developed software is tested by simulating a simple gas network and the results of the manual solution, developed software and commercial PipeFlowExpert software are compared. In the second part, the optimization of two gas distribution networks of Osiadacz and Górecki (1995) are used and the results of GAGAGAS.net program are compared with their results.
5.2
Verification of GAGAGas.net Program for the Simulation of Gas Distribution Systems The GAGAGas.net program was applied to a simple case study and the
results were compared with simulation methods. The case is the 2-loop network. The simulation results of the GAGAGas.net program were compared with the
85
Chapter 5
Results and Discussion
solutions of Osiadacz (1987) and Pipe Flow computer program. The Pipe Flow Expert computer program generates initial estimates for the flow rate at each outlet point in the pipeline system. The Out-flows are used to estimate the flow rate in each pipe. The pressure losses within the system are calculated using the friction factors which are obtained from the ColebrookWhite equation, Eq. (2.9). The initial estimates are unlikely to give a balanced pressure result over the whole system and must be adjusted using a variation on the Newton method to converge to a final result where all the flow rates and pressures within the system are balanced. Pipe Flow Expert defines the elements of the pipeline system in a series of non-linear matrix equations. Once an approximate solution has been obtained, the results are refined using a variation on the Newton method algorithm to ensure the results converge to a balanced flow and pressure result, so it was used to check the hydraulic solution accuracy of the GAGAGas.net. On the other hand, GAGAGas.net uses the gradiant algorithm and uses Newton method to converge to final result where all the flowrates and pressures in the system are balanced within accuracy. Table 5.1 summarizes the method that handle the simulation of the two-loop case in the softwares. The proposed study uses the gradient algorithm as a simulation
method
with
Lacey-Pole
86
flow
equation,
Eq. (2.2),
while
Chapter 5
Results and Discussion
PipeFlowExpert uses the Newton nodal method with Darcy-Weisbach flow equation, and the manual solution uses Hardy Cross nodal method with Lacey flow equation. Table 5.1 Various simulation methods used for software verification PipeFlowExpert Simulation Method
Newton Nodal Method
Pipe Flow Equation
Darcy-Weisbach/ Colebrook-White
Manual calculations Hardy Cross Nodal Method
Proposed calculations Gradient Algorithm
Lacey-Pole
Lacey-Pole
The two-loop network problem is originally presented by Osiadacz (1987). It is consisted of 5 pipes, 3 nodes and one constant head reservoir. The layout of the network, the lengths of pipes and the node data are shown in Figure 5.1 and Table 5.2. The Hazen-Williams coefficient is assumed to be 130 for all pipes. The demands are given in cubic meters per hour.
Figure 55.1 The two-loop network, Osiadacz (1987)
87
Chapter 5
Results and Discussion
Table 5.2 Data for the two-loop network Pipe Number
Length (m)
Diameter (m)
Hazen-Williams coefficient
1 2 3 4 5
680 500 420 600 340
0.15 0.10 0.15 0.10 0.10
130 130 130 130 130
Figure 5.2 gives the nodal pressures resulted from the network simulation using GAGAGas.net program and the PipeFlow Expert. The results from the GAGAGas.net (Newton technique) are less than that of PipeFlow Expert within the acceptable accuracy. The difference in the pressure in nodes between the current study and Osiadacz (1987) varies between the value of (-0.6 and -3.3%), when comparing the current study with Pipe Flow Expert software the value varies between (1.7% and 2%). This difference in the nodal pressure between the current study and in PipeFlowExpert software results from the change of using the flow equation, whereas the difference between the current study and that in Osiadacz (1987) is only the number of iterations.
88
Chapter 5
Results and Discussion
Nodal Pressure, kPa
3.0 Pipe Flow Present Study Osiadacz (1987)
2.8 2.6 2.4 2.2 2.0
1
2
3
4
Junction ID
Figure 5.2 Comparison between nodal pressures resulted from Osiadacz (1987), Pipe Flow program and present study
5.3
Case Study '1': Low-Pressure Gas Distribution Network The gas distribution network comprises 81 junctions, 108 branches and
two sources of 50 mbar in pressure, Figure 5.3. This case study is originally presented by Osiadacz and Górecki (1995) and later in Djebedjian et al. (2008). The data of nodes (demand or branch nodes) and source nodes are given in Tables 5.3 and 5.4, respectively. For source node, the pressure of the network is provided, while for demand nodes the demands flow rates to the nodes are provided and the branching point have zero demand flow rate. The total demand is 1482.56 m3/hr. The branches data are given in Table 5.5.
89
Chapter 5
Results and Discussion
Figure 55.3 Case study ‘1’: Low-pressure gas distribution network layout, Osiadacz and Górecki (1995)
90
Chapter 5
Results and Discussion
Table 5.3 Nodes data for Case study ‘1’ Junction ID 100 101 102 103 104 107 108 109 110 111 114 115 116 117 118 119 121 122 131 132 133 134 135 136 137 138 139 140
Demand (m³/h) 8.20 17.93 26.24 24.26 10.27 3.82 18.82 24.96 14.81 8.59 0.25 11.08 8.59 32.30 39.89 19.98 35.41 6.97 0.00 12.22 27.60 17.46 60.66 71.72 15.18 42.53 45.63 38.24
Junction ID 141 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 160 161 162 48 49 50 51 52 54 55 64 65
Demand (m³/h) 26.39 0.59 8.89 3.89 13.37 20.29 55.55 64.64 8.79 26.33 1.98 0.00 6.71 5.16 16.76 31.85 0.00 16.67 1.17 7.19 4.95 6.51 2.80 6.61 6.61 1.00 3.55 4.63
Junction ID 66 67 69 70 71 72 73 74 78 79 80 81 82 84 85 86 92 93 94 95 96 97 98 99
Table 5.4 Source nodes for Case study ‘1’ Source ID 53 159
Pressure (mbar) 50.0 50.0
91
Demand (m³/h) 20.21 18.86 7.37 4.87 6.47 38.15 23.70 12.55 5.14 4.42 21.74 21.96 19.44 44.10 52.87 25.01 8.05 4.68 12.89 34.44 35.71 23.27 1.00 8.52
Chapter 5
Results and Discussion
Table 55.5 Branches data for Case study ‘1’ Branch Start ID Node 1 100 2 101 3 102 4 103 5 107 6 107 7 107 8 108 9 108 10 108 11 109 12 109 13 110 14 110 15 111 16 111 17 114 18 114 19 115 20 115 21 116 22 117 23 117 24 118 25 118 26 119 27 121 28 121 29 131 30 132 31 132 32 133 33 133 34 134
End Node 101 102 103 104 101 108 116 102 109 117 110 118 111 121 104 122 115 131 116 136 132 118 134 119 139 121 122 140 135 133 137 134 158 138
Length (m) 73.2 139.0 214.0 199.0 13.1 135.9 20.1 22.9 216.1 81.1 199.9 92.0 10.1 98.1 18.0 96.0 78.0 70.1 75.9 153.0 93.9 199.9 46.9 139.9 100.0 78.9 7.0 93.0 63.1 60.0 96.9 70.1 267.9 53.0
Branch Start End Length Diameter ID Node Node (m) (in.) 35 135 136 110.0 3 36 135 145 100.9 4 37 136 137 60.0 3 38 136 147 96.0 4 39 137 148 92.0 4 40 138 139 223.1 4 41 138 149 118.9 8 42 139 140 221.9 4 43 139 150 103.9 4 44 140 141 15.8 6 45 141 144 111.9 6 46 144 154 36.0 6 47 145 146 89.9 3 48 145 147 73.2 4 49 147 148 67.1 4 50 148 157 95.1 4 51 149 150 252.1 6 52 149 160 152.1 12 53 149 161 121.9 6 54 150 151 89.9 4 55 150 152 150.0 6 56 152 153 70.1 6 57 153 154 88.1 6 58 154 155 84.1 6 59 156 157 98.1 3 60 157 158 67.1 3 61 159 160 56.1 12 62 162 161 50.0 4 63 48 49 56.1 12 64 48 64 15.8 6 65 49 50 93.9 12 66 50 51 249.0 12 67 51 52 281.0 12 68 52 53 31.1 16
Diameter (in.) 6 6 6 6 4 6 4 6 6 8 6 4 8 8 8 4 6 6 4 4 4 3 8 3 4 3 6 8 6 3 4 3 3 8
92
Chapter 5
Results and Discussion
Table 5.5 (Continued) Branch ID
Start Node
End Node
Length (m)
Diameter (in.)
Branch ID
Start Node
End Node
Length (m)
Diameter (in.)
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
52 54 55 64 64 65 66 66 67 69 69 70 71 72 72 73 73 74 78 78 80 80
54 55 98 65 69 66 67 83 72 78 80 81 72 73 83 74 85 86 79 92 101 81
120.1 18.9 270.1 168.9 21.9 78.0 160.0 220.1 78.0 70.1 175.0 57.0 88.1 189.9 91.1 160.0 93.9 86.9 68.9 98.1 161.8 78.0
12 12 8 6 6 5 6 4 12 6 4 4 4 4 12 4 4 4 3 6 4 4
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
81 83 84 84 85 85 86 92 93 94 94 95 95 96 96 97 98 99
82 84 85 95 86 96 97 99 94 100 80 102 96 103 97 98 104 100
181.1 20.1 187.1 82.0 163.1 89.9 86.9 92.0 61.0 110.0 78.0 84.1 210.0 82.0 167.9 14.0 70.1 89.9
4 12 4 12 3 4 4 6 4 4 4 12 3 4 3 3 8 6
The cost of pipe was estimated by the following relationship, Osiadacz and Górecki (1995):
C = 2.05 L D 1.3
................. (5.1)
In which C is the cost in Zlotys (US$ = 2.36 Zloty, Osiadacz and Górecki, 1995), L the length in meters and D the diameter in inches. They used the
93
Chapter 5
Results and Discussion
continuous optimization method that supposes that any size of diameter is possible; therefore the resulted set of diameters is corrected to closest available diameter sizes. In this study, the available pipe diameters (in mm) mentioned in Osiadacz and Górecki (1995) were used and the corresponding costs per meter length are mentioned in Table 5.6. Table 5.6 Piping cost per 1 meter length D (mm)
D (inch)
12.50 18.75 25.00 31.25 37.50 50.00 62.50 75.00 100.00 125.00 150.00 200.00 250.00 300.00 400.00
0.50 0.75 1.00 1.25 1.50 2.00 2.50 3.00 4.00 5.00 6.00 8.00 10.00 12.00 16.00
D (used in Osiadacz and Górecki, 1995) (mm) 25 32 40 50 65 80 100 125 150 200 250 300 400
D (used in present study) (mm)
Cost (Zloty) / L (m) = 2.05 D1.3
15 20 25 32 40 50 65 80 100 125 150 200 250 300 400
0.8326 1.4104 2.0500 2.7399 3.4727 5.0477 6.7465 8.5509 12.4289 16.6117 21.0548 30.6035 40.9029 51.8429 75.3546
Osiadacz and Górecki (1995) simulated this case by SimNet software and optimized it by nonlinear programming. In the present study, the main case study and the parameters of the genetic algorithm are given in Table 5.7. The gas network constraints were: minimum gas pressure at junction was 18 mbar
94
Chapter 5
Results and Discussion
and maximum gas velocity in link was 10 m/s. The Pole’ s equation, Eq. (2.2), for calculating the pressure losses formula was used in the low-pressure region. Table 55.7 Case study ‘1’ and genetic algorithm data Case Study ‘1’ Pressure Range
Low Pressure
Number of Sources
2
Number of Branches
108
Number of Junctions
81
Total Pipeline Length
11422 m
Source Pressure
50 mbar
Fluid
Natural Gas*
Temperature
Ambient (25°C)
Simulation Pressure Losses Formula
Pole’ s Equation
Gas Network Analysis
Gradient Algorithm
Accuracy
0.0001 m3/hr
Maximum No. of Trials
40
Constraints Maximum Branch Velocity
10 m/s
Minimum Node Pressure
18 mbar
Genetic Algorithm Population Size
50
Total No. of Generations
500
Crossover Probability
0.8
Mutation Probability (Real)
0.06
Number of Real-Coded Variables
108
* As it is rich Methane content, the natural gas assumed to be Methane.
95
Chapter 5
Results and Discussion
5.3.1 Simulation and Hydraulic Analysis The simulation analysis results illustrated in Tables B1 and B2 for the nodes and branches, respectively, show that many flow velocities in links are very low that indicates using larger pipe sizes than suitable. This made the total capital cost of the network to be expensive, so optimizing this network sizing was required.
5.3.2 Optimization Analysis A comparison between the existing design and optimized network was held, finding out how the optimization action was marking an outstanding role in reducing the network cost and assigning the most suitable diameter. The comparison between the nodal pressures and flow velocities before and after optimization are given in Tables B3 and B4, respectively. The optimal diameters obtained from the present study and that of Osiadacz and Górecki (1995) study are given in Table B5. In the following paragraphs, explanatory graphs will display the results in previous sections relative to optimization effect. Figure 5.4 represents the comparison between the branch sizes before and after optimization. The objective function of the optimization was the cost which depends on the link diameter; i.e. the aim of optimization was decreasing the diameter to minimize the cost. The optimal set of diameters has small diameters compared to the original ones.
96
Chapter 5
Results and Discussion
16
Diameter, in.
After Optimization Before Optimization
12
8
4
0
0
10
20
30
40
50
60
70
80
90
100 110
Branch ID Figure 5.4 Comparison between pipes diameters before (designed) and after optimization for Case study ‘1’
Figure 5.5 shows the nodal pressures before and after optimization and the minimum required nodal pressure. For the designed network, all the nodal pressures have high pressures above the minimum nodal pressure constraint as the designed branch diameters are big and accordingly, the pressure losses are small. The small link diameters obtained from optimization decreased the nodal pressure because of the increase in pressure losses as observed from the figure.
97
Chapter 5
Results and Discussion 50
Pressure, mbar
45 40 35 30 25 20
Minimum Pressure
15 10
After Optimization Before Optimization
5 0 40
50
60 70 80 90 100 110 120 130 140 150 160 170
Junction ID Figure 55.5 Comparison between nodal pressures before (designed) and after optimization for Case study ‘1’
Figure 5.6 illustrates the flow velocities in each link in the designed and optimum network. Also, the maximum velocity constraint is shown. Because of the change in links-size set resulted from optimization, the flow velocities in all links were increased but they were lower than the maximum velocity constraint. As can be seen from Figures 5.5 and 5.6, all the constraints were fulfilled with this optimal gas distribution network.
98
Chapter 5
Results and Discussion 12 10
Velocity, m/s
After Optimization Before Optimization
Maximum Velocity
8 6 4 2 0
0
10
20
30
40
50
60
70
80
90
100 110
Branch ID Figure 5.6 Comparison between flow velocities before (designed) and after optimization for Case study ‘1’
Figure 5.7 represents the comparison between the optimal branch sizes obtained by the present study and that of Osiadacz and Górecki (1995). There are very close results in many links; however big diameters are eliminated. The maximum diameter for the optimal network obtained by the software is 10 inches. Figure 5.8 shows the best, average, and worst fitness for each fifth increasing generation for clarity. It should be noted that the best fitness is always feasible solution but for the average and worst solutions, they may be feasible or infeasible. The code doesn’ t deviates between feasible and infeasible solution automatically.
99
Chapter 5
Results and Discussion 16
Diameter, in.
Present Study Osiadacz and Górecki (1995)
12
8
4
0
0
10
20
30
40
50
60
70
80
90
100 110
Branch ID Figure 5.7 Comparison between optimal diameters obtained by present study and Osiadacz and Górecki (1995) for Case study ‘1’ 200000 Best Fitness Average Fitness Worst Fitness
Cost, $
150000
100000
50000
0
0
100
200
300
400
500
Generation No. Figure 5.8 Fitness of all solutions; best, average and worst fitness for Case study ‘1’
100
Chapter 5
Results and Discussion
Figure 5.9 illustrates the best solution for each generation which resulted by taking the minimum costs from Figure 5.8 and disregarding the higher costs. This network containing 108 pipes and with 15 available commercial pipe sizes has a total solution space of 15108 different network designs. Figure 5.10 shows the comparison between the original design, Osiadacz and Górecki (1995) and present study optimal designs. The GA optimization technique found the best solution $ 36,200.39457 at generation no. 321 which is very small fraction of the total search space. The original (design) cost is $ 98,963.614; therefore the optimal cost is approximately 36.6% of the original cost. Osiadacz and Górecki (1995) obtained an optimal cost of $ 54,350.580 whereas the present study found an optimal cost of $ 36,200.39457. The new found optimal cost is 66.6% of their optimal cost.
101
Chapter 5
Results and Discussion 200000 Best Fitness
Cost, $
150000
100000
50000
0
0
100
200
300
400
500
Generation No. Figure 55.9 Best fitness for Case study ‘1’ 100
98963.6 Case Study 1
80000
80
60
40000
40
20000
20
Cost, $
60000
0
% of Original Cost
Original Osiadacz and Górecki (1995) Present Study
0
Figure 5.10 Comparison between original design, Osiadacz and Górecki (1995) and present study optimal designs for Case study ‘1’
102
Chapter 5
Results and Discussion
Figure 5.11 plots the difference between the “ original network cost” and the “ optimal network cost found in the present study” versus to the “ branches of the network” . The cost of the branches is function of the length and the diameter, and as the length is constant, so the cost of a certain branch is a function of its diameter only. Although many branches have the same costs of the original (i.e. the differences are zero), and in other branches the original costs are less than the optimal costs (i.e. the differences are negative), the most of the optimal costs are less than the original costs (i.e. the differences are positive values). The average change between original cost and the optimal cost is about $ 580.8, which gives a good indication about the gain of the optimization. The figure can clearly show the most critical branches that affects the optimal cost which are branch no. “ 66” which is the most critical branch; the difference is $ 3717.2 and the branch length is 249 m, its original diameter was 12 inches and the optimal branch diameter is 5 inches. The second most critical branch is branch no. “ 67” which has the difference of $ 3665.9 and the branch length is 281 m, its original pipe diameter was 12 inches and the optimal branch diameter is 6 inches.
103
Original Cost − Optimal Cost, US$
Chapter 5
Results and Discussion 4000 3000 2000 1000 0 -1000
0
10
20
30
40
50
60
70
80
90
100 110
Branch ID Figure 5.11 Difference between original cost and present study optimal cost of each pipe for Case study ‘1’
Figure 5.12 demonstrates the total length used for a certain diameter through the network; the minimum diameters used in the original, Osiadacz and Górecki (1995) and the present study are 3", 0.5", and 0.5" respectively, whereas the maximum diameters are 16", 12", and 10" respectively. The width of diameters’ range used can be seen. For instance, the original network used 7 different diameters through the range of 3" to 16", whereas Osiadacz and Górecki (1995) used 14 different diameters through the range of 0.5" to 12" and the present study used 13 different diameters through the range of 0.5" to 10".
104
Chapter 5
Results and Discussion
The most used diameter in the original network is 4", for Osiadacz and Górecki (1995) is 2", and for present study it’ s 1".
Length of Pipes, m
5000 Design Osiadacz and Górecki (1995) Present Study
4000 3000 2000 1000 0
0
1
2
3
4
5
6
7
8
9 10 11 12 13 14 15 16
Diameter, in. Figure 5.12 Length of pipes for each pipe size for original design, Osiadacz and Górecki (1995) and present study for Case study ‘1’
The optimization run time was 16 minutes and obtained by a computer with Intel Pentium 4 (2 GHz) processor and 256 MB of Ram. Generally, there is strong computing time saving compared to those obtained with other optimization techniques.
105
Chapter 5
5.4
Results and Discussion
Case Study '2': Medium-Pressure Gas Distribution Network This case is a medium-pressure gas network that has one source; the
source node is 3.6 bar in pressure. Osiadacz and Górecki (1995) adapted this case and simulated it by SimNet software and optimized it by nonlinear programming. Also, it was simulated and optimized later in Djebedjian et al. (2011). The network layout is shown in Figure 5.13 and design data are in Tables 5.8, 5.9, 5.10 and 5.11. For the low-pressure case, the maximum velocity is 10 m/s and the minimum node pressure is 18 mbar, Table 5.7, whereas for the medium-pressure case, the maximum allowable velocity is 20 m/s and the minimum node pressure is 1 bar, Table 5.8. The
velocity
constraint
is
basically
required
to
avoid
excessive
corrosion/erosion; in the low pressure networks the pipes have low thickness so the velocity constraint shouldn’ t be more than 10 m/s, whereas in the medium pressure networks the pipes have thicker walls so the velocity in medium pressure pipes can be up to 20 m/s. The cost of pipe was estimated using Eq. (5.1), Osiadacz and Górecki (1995). The available pipe diameters and their corresponding costs per meter length are mentioned in Table 5.6.
106
Chapter 5
Results and Discussion
Figure 5.13 Case study ‘2’: Layout of medium-pressure gas network, Osiadacz and Górecki (1995)
107
Chapter 5
Results and Discussion
Table 5.8 Case study ‘2’ and genetic algorithm data Case Study ‘2’ Pressure Range
Medium Pressure
Number of Sources
1
Number of Branches
39
Number of Junctions
34
Source Pressure
3.6 bar
Total Pipeline Length
6400 m
Fluid
Natural Gas*
Temperature
Ambient (25°C)
Simulation Pressure Losses Formula
Polyflo’ s Equation
Gas Network Analysis
Gradient Algorithm
Accuracy
0.0001 m3/hr
Maximum No. of Trials
40
Constraints Maximum Branch Velocity
20 m/s
Minimum Node Pressure
1 bar
Genetic Algorithm Population Size
50
Total No. of Generations
500
Crossover Probability
0.8
Mutation Probability (Real)
0.06
Number of Real-Coded Variables
39
* As it is rich Methane content, the natural gas assumed to be Methane.
108
Chapter 5
Results and Discussion
Table 5.9 Nodes data for Case study ‘2’ Junction ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Demand (m³/h) 40.37 20.47 27.25 25.61 16.81 0.00 21.35 0.00 8.35 27.25 27.25 23.92 5.50 42.71 8.35 8.35 12.85 22.23 16.81 14.87
Junction ID 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Demand (m³/h) 0.00 5.50 5.50 5.50 39.66 23.06 26.04 5.50 14.87 5.62 5.62 150.00 0.00 5200.00 0.00
Table 5.10 Source nodes for case study ‘2’ Source ID 36
Pressure (bar) 3.6
109
Chapter 5
Results and Discussion
Table 5.11 Branches data for Case study ‘2’ Branch ID
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
5.4.1
Start Node
1 1 2 2 3 3 4 5 6 7 7 8 8 8 9 10 10 11 11 12
End Node
26 32 5 35 5 15 19 14 34 10 33 6 9 36 22 2 11 3 12 4
Length (m)
520.0 160.0 20.1 20.1 60.0 39.9 64.9 89.9 150.0 60.0 146.9 380.1 70.1 2300.0 45.1 180.1 60.0 164.9 85.0 160.0
Diameter (mm)
50 65 32 32 32 40 40 32 200 32 50 200 65 200 40 32 32 32 32 40
Branch ID
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Start Node
12 14 14 15 15 16 16 18 18 19 19 20 21 26 26 29 29 33 35
End Node
9 1 27 4 16 17 18 14 25 20 24 21 23 28 29 30 31 1 13
Length (m)
64.9 54.9 420.0 45.1 60.0 60.0 60.0 60.0 120.1 50.0 54.9 60.0 20.1 130.1 89.9 50.0 29.9 143.0 50.0
Diameter (mm)
40 65 50 40 32 40 32 65 65 40 25 32 50 40 40 40 40 50 32
Simulation and Hydraulic Analysis
Tables C1 and C2 give the hydraulic analysis results of GAGAGas.net program. It can be observed that the velocity at many links exceeds the maximum velocity (20 m/s) allowed per link, Figure 5.14. On the other hand, the velocity at other links is very low which may make the network uses unsuitable pipe diameter-size.
110
Chapter 5
Results and Discussion
50 Before Optimization
45
Velocity, m/s
40 35 30 25
Maximum Velocity
20 15 10 5 0
0
10
20
30
40
Branch ID Figure 5.14 Velocities in links before optimization for Case study ‘2’
It is important to mention that the Polyflo equation is used in this study instead of Renouard equation as in Osiadacz and Górecki (1995) study. The Polyflo equation is the most conservative equation to this case. This returns to the fact that as the maximum pipe length in this case is 2300 m and the second longest pipe is 520 m, and referring to Figure 2.2(a) reveals that the results of Spitzglass at the range from 1 to 2300 m is very optimistic, whereas the results of Polyflo and Renouard through this range are almost the same. On the other hand, regarding to the flow rates, the maximum flow rate in pipes is 5857.17 m3/h (i.e. 1.626 m3/s), and referring to Figure 2.2(b) shows that the most optimistic results come from Spitzglass equation, whereas the conservative equations
111
Chapter 5
Results and Discussion
(Renouard and Polyflo) are almost the same until a flow rate of 0.15 m3/s, and greater than that value the most conservative equation is Polyflo, which serves a very long range to 1.626 m3/s. The idea here is to get the lowest cost by finding the suitable diameters that minimize the network cost and fulfill the maximum flow velocity and the minimum pressure at demand nodes. Therefore, it was the need for optimizing this network design. 5.4.2
Optimization Analysis
The optimization action establishes its role in scalping the network parameters by constraints tools. As it was seen in simulation results for this case and Figure 5.14, many links’ flow velocities exceed the constraint of maximum velocity, and other links contain small amounts of flow with overestimating pipe-size resulting in some kind of non homogeneity in design. Therefore, it was the need for optimization to fit the networks parameters to the required constraints. A comparison between the existing design and optimized network is given in Table C3 for finding out the outstanding action of the optimization in fixing the design for minimum cost. The optimal diameters obtained from the present study and that of Osiadacz and Górecki (1995) study are given in Table C4.
112
Chapter 5
Results and Discussion
Previously in the simulation stage, the difference in pressures through the whole junctions is very safe; therefore, the focus is on the most varying parameter corresponding to the pipe diameter, which is the velocity. In the following explanatory graphs, the effect of optimization will mark an outstanding role in fixing and optimizing the design. Figure 5.15 represents a comparison between pipes diameters before optimization and after optimization. It can be found that some of pipes diameters are reduced; others are still as they are and some become bigger which complies with the main idea of the design and optimization basis. 10 After Optimization Before Optimization
Diameter, in.
8 6 4 2 0
0
10
20
30
40
Branch ID Figure 5.15 Comparison between pipes diameters before optimization and after optimization for Case study ‘2’
113
Chapter 5
Results and Discussion
Figure 5.16 represents the comparison between the optimal branch sizes obtained by the present study and that of Osiadacz and Górecki (1995). There are very close results in many links; however, big diameters are eliminated in optimization. The maximum diameter for the optimal network obtained by the GAGAGas.net program is 8 inches.
10
Present Study Osiadacz and Górecki (1995)
Diameter, in.
8 6 4 2 0
0
10
20
30
40
Branch ID Figure 5.16 Comparison between pipes diameters optimized by the present study and the study of Osiadacz and Górecki (1995) for Case study ‘2’
Figure 5.17 illustrates the nodal pressures before and after optimization and the minimum required nodal pressure. For the designed and optimized networks, all nodal pressures have high pressures above the minimum nodal pressure
114
Chapter 5
Results and Discussion
constraint. However, the nodal pressures after optimization are less than that before optimization due to the decrease in pipe diameters which increase the pressure losses.
Pressure, bar
4
3
After Optimization Before Optimization
2
Minimum Pressure
1
0
0
10
20
30
40
Junction ID Figure 5.17 Comparison between nodal pressures before (designed) and after optimization for Case study ‘2’
Figure 5.18 illustrates the comparison between flow velocities in links before optimization and after optimization, which is limited by the velocity constraint to be not exceeding 20 m/s. It’ s found that in the original network, the velocities at many links exceed the maximum velocity while they don' t after optimization.
115
Chapter 5
Results and Discussion 50 After Optimization Before Optimization
45
Velocity, m/s
40 35 30 25
Maximum Velocity
20 15 10 5 0
0
10
20
30
40
Branch ID Figure 5.18 Comparison between flow velocities before optimization and after optimization for Case study ‘2’
Figure 5.19 shows the rapid declination of cost in the first generations, and after that it tends to the stability of cost. The best fitness curve is constant from generation number 66, while the average and the worst fitnesses still vary. Figure 5.20 shows the best fitness solution which resulted by taking the minimum costs from Figure 5.19 and disregarding the higher costs.
116
Chapter 5
Results and Discussion 60000 Best Fitness Average Fitness Worst Fitness
Cost, US$
50000 40000 30000 20000 10000 0
0
100
200
300
400
500
Generation No. Figure 55.19 Best, average and worst fitness trends across generations for Case study ‘2’ 50000 Best Fitness
Cost, US$
40000 30000 20000 10000 0
0
100
200
300
400
Generation No. Figure 5.20 Best fitness for Case study ‘2’
117
500
Chapter 5
Results and Discussion
Figure 5.21 shows the comparison between the original design, Osiadacz and Górecki (1995) and present study optimal designs. The original (design) cost is $ 43,097.68 and the optimal cost obtained by Osiadacz and Górecki (1995) is $ 40,187.838 whereas the optimized network cost from this study is $ 29,718.547 that means 73.95% of their optimal cost and 68.96% of the original design cost.
Case Study 2 Original Osiadacz and Górecki (1995) Present Study
43097.68
100
40000 80
Cost, $
60 20000 40
10000
% of Original Cost
30000
20
0
0
Figure 5.21 Comparison between original design, Osiadacz and Górecki (1995) and present study optimal designs for Case study ‘2’
118
Chapter 5
Results and Discussion
Figure 5.22 shows the changes between the cost before optimization and the optimal cost for each branch. The most of branches have no significant change in cost; even some branches have higher cost than the original network, the average cost is $ 343.1. The most critical branch that affect drastically on the network cost is branch no. “ 14” which has $ 9305.95 change, its length is 2300 m, and the diameters of the original and optimal networks are 8" and 6", respectively. If branch no. “ 14” is not taken into consideration then the average cost is
Original Cost − Optimal Cost, US$
$ 107.2.
10000 8000 6000 4000 2000 0 -2000
0
10
20
30
40
Branch ID Figure 5.22 Difference between original cost and present study optimal cost of each pipe for Case study ‘2’
119
Chapter 5
Results and Discussion
Figure 5.23 represents the lengths of the diameters used through each solution of the original network, Osiadacz and Górecki (1995) and present study. As a brief analysis to the graph, the range of diameters for each solution is 1" to 8" for original solution, 0.5" to 8" for Osiadacz and Górecki (1995) solution, and 0.5" to 8" for the present study. The original solution used 6 different diameters, whereas the study of Osiadacz and Górecki (1995) and the present study used 9 different diameters. The maximum used diameters through the solutions are 8" for the original and Osiadacz and Górecki (1995) solutions, whereas the present study uses 6".
Length of Pipes, m
4000 Design Osiadacz and Górecki (1995) Present Study
3000
2000
1000
0
0
1
2
3
4
5
6
7
8
Diameter, in. Figure 5.23 Length of pipes for each pipe size for original design, Osiadacz and Górecki (1995) and present study for Case study ‘2’
120
Chapter 5
5.5
Results and Discussion
Case Study '3': Moharram-Bek Gas Distribution Network The third case is an existing network in the actual life in Egypt. It’ s
a part of Moharram-Bek gas distribution network in Alexandria City. The developed GAGAGas.net software released the network analysis for the already designed network, and the optimization data for the network which fulfilled the required constraints. This network has one source; which is 100 mbar in pressure. Table 5.12 gives the outlines of the network data. Design data are the construction data of the network provided by the layout in Figure 5.24 and data of nodes wither it is a source node or a demand or branch nodes, Tables 5.13 and 5.14. The pressure at source node and demands flow rates at demand nodes are provided, while the branching point have zero demand flow rate. Table 5.15 gives the data of branches. The total piping length is 25210 m, whereas the total demand is1282.8 m3/h.
121
Chapter 5
Results and Discussion
Table 5.12 Moharram-Bek gas distribution network and genetic algorithm data Case Study ‘3’: Moharram-Bek Low-Pressure Network Pressure Range
Low Pressure
Number of Sources
1
Number of Branches
137
Number of Junctions
125
Source Pressure
100 mbar
Total Pipeline Length
25210 m
Fluid
Natural Gas*
Temperature
Ambient (25°C)
Simulation Pressure Losses Formula
Lacey-Pole Equation
Gas Network Analysis
Gradient Algorithm
Accuracy
0.0001 m3/hr
Maximum No. of Trials
40
Constraints Maximum Branch Velocity
10 m/s
Minimum Node Pressure
18 mbar
Genetic Algorithm Population Size
50
Total No. of Generations
500
Crossover Probability
0.8
Mutation Probability (Real)
0.06
Number of Real-Coded Variables
137
* As it is rich Methane content, the natural gas assumed to be Methane.
122
Chapter 5
Results and Discussion
Figure 5.24 Layout for part of Moharram-Bek low-pressure network
123
Chapter 5
Results and Discussion
Table 5.13 Nodes data for Moharram-Bek network Junction ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Demand (m³/h) Source 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 51.6 24.0 26.4 49.2 27.6 16.8 80.4 28.8
Junction ID 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
Demand (m³/h) 4.8 12.0 32.4 10.8 15.6 12.0 19.2 14.4 15.6 21.6 6.0 9.6 4.8 12.0 6.0 28.8 8.4 39.6 16.8 16.8 12.0 4.8 4.8 10.8 4.8 6.0 7.2 4.8 16.8 7.2 22.8 24.0 12.0 12.0
124
Junction ID 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
Demand (m³/h) 19.2 6.0 12.0 13.2 9.6 14.4 3.6 6.0 6.0 13.2 10.8 12.0 4.8 12.0 12.0 4.8 3.6 4.8 10.8 4.8 8.4 4.8 4.8 4.8 4.8 6.0 4.8 7.2 6.0 6.0 10.8 7.2 8.4 7.2
Chapter 5
Results and Discussion
Table 5.13 (Continued) Junction Demand ID (m³/h) 103 10.8 104 14.4 105 36.0 106 4.8 107 15.6 108 6.0 109 13.2 110 22.8 111 6.0 112 9.6 113 7.2 114 6.0
Junction ID 115 116 117 118 119 120 121 122 123 124 125 *Source node
Demand (m³/h) 8.4 9.6 7.2 3.6 6.0 3.6 6.0 10.8 7.2 19.2 12.0
Table 5.14 Source nodes for Moharram-Bek gas network Source ID 1
Pressure (mbar) 100.0
125
Demand (m3/h) 1282.8
Chapter 5
Results and Discussion
Table 5.15 Branches data for Moharram-Bek network Branch ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Start Node 1 1 2 3 46 45 45 4 5 5 9 10 11 12 13 38 38 15 27 16 17 18 28 19 20 29 21 22 23 43 42 7 41 8
End Node 2 15 3 47 47 46 4 44 44 43 10 11 12 13 39 39 37 27 16 17 18 28 19 20 29 21 22 23 24 42 6 41 8 40
Length (m) 200.0 1000.0 350.0 50.0 150.0 70.0 50.0 150.0 150.0 60.0 300.0 300.0 270.0 90.0 200.0 10.0 100.0 650.0 350.0 320.0 200.0 100.0 200.0 10.0 150.0 120.0 260.0 10.0 280.0 100.0 120.0 150.0 150.0 160.0
Diameter (in.) 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 5.0 5.0 5.0 5.0 5.0 5.0 5.0 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 6.0 5.0 5.0 5.0 5.0
Branch ID 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
126
Start Node 40 36 36 24 25 26 30 31 32 33 34 35 2 48 49 50 51 52 12 2 54 3 55 56 4 18 5 58 59 60 61 62 63 64
End Node 9 37 14 25 26 30 31 32 33 34 35 14 48 49 50 51 52 53 53 54 16 55 56 17 57 57 58 59 60 61 62 63 64 65
Length (m) 140.0 180.0 350.0 10.0 200.0 360.0 290.0 100.0 150.0 300.0 100.0 300.0 750.0 1050.0 80.0 400.0 150.0 170.0 850.0 150.0 230.0 170.0 230.0 10.0 500.0 300.0 10.0 80.0 100.0 40.0 70.0 40.0 120.0 200.0
Diameter (in.) 5.0 5.0 5.0 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5
Chapter 5
Results and Discussion
Table 5.15 (Continued) Branch ID
Start Node
End Node
Length (m)
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
65 123 66 67 68 69 70 71 72 73 6 7 75 76 77 78 79 80 81 82 83 8 124 84 85 86 87 88 89 90 91 9 92 93 94
19 66 67 68 69 70 71 72 73 20 123 75 76 77 78 79 80 81 82 83 21 124 84 85 86 87 88 89 90 91 22 92 93 94 95
120.0 220.0 40.0 80.0 50.0 70.0 80.0 170.0 50.0 130.0 10.0 200.0 80.0 100.0 180.0 180.0 80.0 80.0 80.0 150.0 150.0 50.0 150.0 40.0 40.0 80.0 150.0 130.0 70.0 480.0 260.0 300.0 30.0 150.0 70.0
Diameter (in.) 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5
127
Branch ID
Start Node
End Node
Length (m)
Diameter (in.)
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
95 96 97 98 10 99 100 101 102 103 104 105 106 11 107 108 109 110 125 111 112 113 114 115 13 116 117 118 119 120 121 122 6 7
96 97 98 23 99 100 101 102 103 104 105 106 24 107 108 109 110 125 111 112 113 114 115 25 116 117 118 119 120 121 122 30 74 74
360.0 60.0 120.0 470.0 100.0 150.0 50.0 120.0 110.0 300.0 220.0 200.0 450.0 150.0 150.0 50.0 30.0 180.0 150.0 40.0 500.0 130.0 50.0 470.0 10.0 160.0 100.0 230.0 450.0 100.0 150.0 10.0 10.0 70.0
2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 2.5 6.0 6.0
Chapter 5
5.5.1
Results and Discussion
Simulation and Hydraulic Analysis
The results of network simulation are shown in Tables D1 and D2, for nodes and links, respectively. The pressures at all junctions are safe although the velocity at many links exceeds the maximum velocity. On the other hand, the velocity at some links is very low which may make the network uses unsuitable pipe diameter-size. This provides the reasons to get the optimal design to fit the real world.
5.5.2
Optimization Analysis
The actual pipe cost in Egypt was not available; therefore the pipe diameters and their corresponding costs per meter length given in Table 5.6 were applied to demonstrate an approximate evaluation for design cost and optimal cost. A comparison between the existing design and optimized link diameters is held in Figure 5.25 and Table D3. In the designed network the designer tends to constant diameters in small links which makes it easy for installation team, but cost-wise should be taken into account.
128
Chapter 5
Results and Discussion 10 After Optimization Before Optimization
Diameter, in.
8 6 4 2 0
0
10 20 30 40 50 60 70 80 90 100 110 120 130 140
Branch ID Figure 55.25 Comparison between designed and optimized branches’ diameters for Moharram-Bek low-pressure network
Figure 5.26 represents the nodal pressures before and after optimization and the minimum required nodal pressures. For the designed network, all the pressures have high pressures above the nodal pressure constraint as the designed branch diameters are big and accordingly, the pressure losses are small. The small link diameters from optimization cause the increase in pressure losses and decrease the nodal pressure, Figure 5.26. Figure 5.27 represents the relationship; at the best population in generations; between the gas velocities in links, which is limited by the velocity constraint to be not exceeding (10 m/s). The velocities of optimized network approach the maximum velocity as possible as it can but it doesn’ t exceed it, on the contrary it does in the designed one.
129
Chapter 5
Results and Discussion
Pressure, mbar
100 80 60 After Optimization Before Optimization
40
Minimum Pressure
20 0
0
20
40
60
80
100
120
Junction ID Figure 5.26 Nodal pressures at nodes before (designed) and after optimization for Moharram-Bek low-pressure network 20 After Optimization Before Optimization
18
Velocity, m/s
16 14 12
Maximum Velocity
10 8 6 4 2 0
0
10 20 30 40 50 60 70 80 90 100 110 120 130 140
Branch ID Figure 5.27 Relationship between the gas velocities in links in both designed and optimized Moharram-Bek low-pressure network
130
Chapter 5
Results and Discussion
Figure 5.28 illustrates the best, average and worst fitness trends across generations. It is remarkable that the best fitness curve is constant starting from generation number 274, while the average and the worst fitness still vary. Figure 5.29 represents the best fitness solutions across the whole generations. Figure 5.30 compares the cost of the original network design and the network generated from the present study after optimization. This network containing 137 pipes and with 15 available commercial pipe sizes has a total solution space of 15137 different network designs. The GA optimization technique found the best solution $ 76,744.772 at generation no. 274. The original (design) cost is $ 97,212.6; therefore the optimal cost is approximately 78.95% of the original cost. 50 Best Fitness Average Fitness Worst Fitness
Cost, US$ x 10000
45 40 35 30 25 20 15 10 5 0
0
100
200
300
400
500
Generation No. Figure 5.28 Best, average and worst fitness trends across generation for Moharram-Bek low-pressure network
131
Chapter 5
Results and Discussion 40 Best Fitness
Cost, US$ x 10000
35 30 25 20 15 10 5 0
0
100
200
300
400
500
Generation No. Figure 5.29 Best fitness solutions across the generations for Moharram-Bek low-pressure network 97212.60
100 Case Study: Moharram Bek
Cost, $
80000
80
60000
60
40000
40
20000
20
0
% of Original Cost
Original Present
0
Figure 5.30 Comparison between original design and present study generated design for Moharram-Bek low-pressure network
132
Chapter 5
Results and Discussion
Figure 5.31 represents the difference between the original cost and optimal cost of each pipe. As the cost is dependent on pipe length and diameter, Fig. 5.25, there are some pipes with equal original and optimal costs and others with optimal costs greater or lesser than the original ones. The overall average change between the original and optimal network costs for each pipe is $ 149.4. The most critical pipe that affects the overall pipe network cost is Pipe number (2); its length is 1000 m and has an original diameter of 6 inches and optimal diameter of 2.5 inches. Figure 5.32 shows the total pipe length of the used pipe diameters over the whole network for the optimal and original networks. It gives an indication about how the wide range of commercial pipe diameters are used in optimal solution compared to the original one. Although the optimal solution uses higher pipe diameters reaching the diameter of 10 inches whereas the original maximum diameter was 6 inches; the network cost of the optimal solution is less than the original one. The optimization run time was 25 minutes and obtained by a computer with Intel Pentium 4 (2 GHz) processor and 256 MB of Ram. Generally, there is strong computing time saving compared to those obtained with other optimization techniques.
133
Results and Discussion
Original Cost − Optimal Cost, US$
Chapter 5 7000 6000 5000 4000 3000 2000 1000 0 -1000 -2000
0
10 20 30 40 50 60 70 80 90 100 110 120 130 140
Branch ID Figure 5.31 Difference between original cost and optimal cost of each pipe for Moharram-Bek low-pressure network
Length of Pipes, m
25000 Design Present Study
20000 15000 10000 5000 0
1
2
3
4
5
6
7
8
9
10
Diameter, in. Figure 5.32 Length of pipes for each pipe size for original and optimal Moharram-Bek low-pressure network
134
Chapter 6
Conclusions and Future Work
CHAPTER 6 CONCLUSIONS AND FUTURE WORK 6.1
Conclusions This study presents the optimization of gas distribution networks to
determine the optimal diameter for each pipe in order to minimize the investment cost. The optimization of gas distribution network is computationally complex as the constraints of maximum velocity in links and minimum required nodal pressure should be fulfilled. The optimal diameters of pipes were chosen from available size diameters. The gradient method was used for the network analysis whereas the real-coded genetic algorithm for the optimization. The genetic algorithm is a very efficient, robust, and flexible algorithm to reach solutions very fast. The following conclusions can be deduced: 1.
The application of the developed GAGAGas.net program for the optimization of case studies minimizes the cost to:
135
Chapter 6
Conclusions and Future Work
i.
For the first case (low-pressure): $ 36,200.4 which is approximately 36.6% of the original cost ($ 98,963.6).
ii. For the second case (medium-pressure): $ 29,718.547 which is approximately 68.96% of the original cost ($ 43,097.68). iii. For the third case (Moharram-Bek): $ 76,744.772 which is approximately 78.95% of the original cost ($ 97,212.6). 2.
The previous optimal cost of Osiadacz and Górecki (1995) is: i.
For the first case (low-pressure): $ 54,350.580 compared to that of the present study $ 36,200.39457, which is 66.6% of their optimal cost.
ii. For the second case (medium-pressure): $ 40,187.838 compared to that of the present study $ 29,718.547, which is 73.95% of their optimal cost. 3.
In the matter of fact, the three case studies have shown some important parameters and illustrated the major effect on the optimization action. In the original design in all three studies, it has been noticed that the pressure in the network nodes is so far from the minimum pressure it can reach. On the other hand, the velocities in the network pipes is so far less than the maximum pressure it can reach “ except Moharram-Bek case” . In the
136
Chapter 6
Conclusions and Future Work
optimized network, the pressure and velocities come closer to the constraints of maximum velocities in branches and minimum pressures at nodes. i.
In case study ‘1’ , the most important pipe that affected the optimization was pipe “ 66” ; its original pipe diameter was 12 inches and the optimal branch diameter is 6 inches, its length is 249 m, it reduced the cost by $ 3717.2.
ii. In case study ‘2’ , the pipe number “ 14” is the most critical pipe in the network. It affects the whole network cost because of its length, which is 2300 m, comparing with 6400 m, which is the whole network length, i.e. 36% of the whole network length. Its diameter has been reduced from 8 inches to 6 inches. iii. In case study ‘3’ (Moharram-Bek), the critical pipe was pipe number “ 2” , which is the main branch header of the network tree. Its length is 1000 m and design pipe size was 6 inches. Its diameter is 2.5 inches after optimization with a share of network cost reduction of $ 6100.
137
Chapter 6
6.2
Conclusions and Future Work
Future Work This work was a simple one which could be a start for other studies, the
suggested future work: 1. Minimize the time consumed in the optimization step, which is available but it needs some more time. 2. In this study, the use of one flow equation in either low or medium pressure ranges, the availability of more equations is very useful. So, adding more equations as in Table 2.7 is prohibited. 3. Adding valves option in networks. 4. Putting compressor stations to re-pressurize gas in case of very big networks in gas transmission pipelines. 5. Adaptation for compressor stations with network layout and optimize it with network diameters.
This last one is the most ambitious to realize the compressor stations optimization which act the running cost, and the network pipe diameters optimization that represent the main fixed cost.
138
References
REFERENCES [1]
André, J., Bonnans, F., and Cornibert, L., "Optimization of Capacity
Expansion Planning for Gas Transportation Networks," European Journal of Operational Research, Vol. 197, Issue 3, 2009, pp. 1019-1027. [2]
Babu, B.V., Angira, R., Chakole, P.G., and Syed Mubeen, J.H.,
"Optimal Design of Gas Transmission Network Using Differential Evolution," Proceedings of the Second International Conference on Computational Intelligence, Robotics, and Autonomous Systems (CIRAS2003), Singapore, December 15-18, 2003, PS0402, pp. 01-07. [3]
Banzhaf, W., Nordin, P., Keller, R.E., and Francone, F.D., Genetic
Programming: an Introduction on the Automatic Evolution of Computer Programs and its Applications, Copublished by Morgan Kaufmann Publishers, Inc and dpunkt Verlag fuer digitale Technologie GmbH, 1998. [4]
Bhave, P.R., and Gupta, R., Analysis of Water Distribution Networks,
Alpha Science International Ltd., Oxford, U.K., 2006. [5]
Brki , D., "An Improvement of Hardy Cross Method Applied on Looped
Spatial Natural Gas Distribution Networks," Applied Energy Journal, Vol. 86, 2009, pp. 1290-1300.
139
References
[6]
Çengel, Y.A., and Boles, M.A., Thermodynamics: An Engineering
Approach, 5th Ed., McGraw-Hill Book Company, 2006. [7]
Chebouba, A., Yalaoui, F., Smati, A., Amodeo, L., Younsi, K., and Tairi, A., "Optimization of Natural Gas Pipeline Transportation using
Ant Colony Optimization," Computers & Operations Research, Vol. 36, Issue 6, 2009, pp. 1916-1923. [8]
Cheesman, A.P., "How to Optimize Gas Pipeline Design by Computer,"
Oil and Gas Journal, Vol. 69, No. 51, December 20, 1971, pp. 64-68. [9]
Coelho, P.M., and Pinho, C., "Considerations about Equations for
Steady State Flow in Natural Gas Pipelines," Journal of the Brazilian Society of Mechanical Sciences and Engineering, Vol. 29, No. 3, JulySeptember 2007, pp. 262-273. [10]
Crane Co., "Flow of Fluids through Valves, Fittings, and Pipe,"
Technical Paper 410 (TP-410), Crane Company, Joliet IL. 1988. [11]
Cross, H., "Analysis of Flow in Networks of Conduits or Conductors,"
Bulletin No. 286, University of Illinois Engineering Experimental Station, Urbana, IL, 1936. [12]
De Mélo Duarte, H., Goldbarg, E.F.G., and Goldbarg, M.C., "A Tabu
Search Algorithm for Optimization of Gas Distribution Networks,"
140
References
Lecture Notes in Computer Science, Evolutionary Computation in Combinatorial Optimization, Vol. 3906, 2006, pp. 37-48. [13]
De Wolf, D., and Smeers, Y., "Optimal Dimensioning of Pipe Networks
with Application to Gas Transmission Network," Operations Research, Vol. 44, No. 4, 1996, pp. 596-608. [14]
De Wolf, D., and Smeers, Y., "The Gas Transmission Problem Solved
by an Extension of the Simplex Algorithm," Management Sciences, Vol. 46, No. 11, Nov. 2000, pp. 1454-1465. [15]
Deb, K., 2001, Kanpur Genetic Algorithms Laboratory, India. http://www.iitk.ac.in/kangal/codes.shtml
[16]
Deb, K., and Agrawal, R.B., "Simulated Binary Crossover for
Continuous Search Space," Complex Systems, Vol. 9, No. 2, 1995, pp. 115-148. [17]
Djebedjian, B., Shahin, I., and El-Naggar, M., "Gas Distribution
Network Optimization by Genetic Algorithm," Proceedings of ICFDP9, Ninth International Congress of Fluid Dynamics & Propulsion, December 18-21, 2008, Alexandria, Egypt, Paper ICFDP-EG-290. [18]
Djebedjian, B., El-Naggar, M., and Shahin, I., "Optimal Design of Gas
Distribution Network: A Case Study," Mansoura Engineering Journal, (MEJ), Vol. 36, No. 3, Sep. 2011, pp. M. 35 - M. 51.
141
References
[19]
Djebedjian, B., Yaseen, A., and Rayan, M.A., "A New Adaptive
Method for Constrained Genetic Algorithm and its Application to Water Distribution Systems," International Pipeline Conference and Exposition 2006 (IPC2006), September 25-29, 2006, Calgary, Alberta, Canada, Paper IPC00-10235. [20]
Edgar, T.F., and Himmelblau, D.M., Optimization of Chemical
Processes, McGraw-Hill Book Company, New York, 1988. [21]
El-Mahdy, O.F.M., Ahmed, M.E.H., and Metwalli, S., "Computer
Aided Optimization of Natural Gas Pipe Networks using Genetic Algorithm," Applied Soft Computing, Vol. 10, 2010, pp. 1141-1150. [22]
EPANET (2002), Environmental Protection Agency, USA. http://www.epa.gov/nrmrl/wswrd/dw/epanet.html
[23]
Geankoplis, C.J., Transport Processes and Unit Operations, 3rd Edition,
Prentice Hall, Englewood Clifs, NY, 1993. [24]
Genetic Algorithm, http://www.Wikipedia.com\GeneticAlgorithm
[25]
George, A., and Liu, J.W.H., Computer Solutions of Large Sparse
Positive Definite Systems, Prentice-Hall Series in Computational Mathematics, 1981.
142
References
[26]
Goldberg, D.E., Genetic Algorithms in Search, Optimization and
Machine Learning, Addison-Wesley Reading, Massachusetts, 1989. [27]
Hamam, Y. M., and Brameller, A., "Hybrid Method for the Solution of
Piping Networks," Proceedings of the Institution of Electrical Engineers, Vol. 118, No. 11, 1971, pp. 1607-1612. [28]
Herrán-González, A., De La Cruz, J.M., De Andrés-Toro, B., and Risco-Martín, J.L., "Modeling and Simulation of a Gas Distribution
Pipeline Network," Applied Mathematical Modeling, Vol. 33, No. 3, 2009, pp. 1584-1600. [29]
Holland, J.H., Adaptation in Natural and Artificial System, Ann Arbor,
The University of Michigan Press, 1975. [30]
Katz, D.L., and Lee, R.L., Natural Gas Engineering - Production &
Storage, McGraw-Hill Publ. Co., New York, 1990, Chapter 6. [31]
Larock, B.E., Jeppson, R.W., and Watters, G.Z., Hydraulics of
Pipelines Systems, CRC Press, 2000. [32]
Larson, R.E., and Wong, P.J., "Optimization of Natural Gas System via
Dynamic Programming," Industrial and Engineering Chemistry, Vol. AC 12 (5), 1968, pp. 475-481.
143
References
[33]
Martch, H.B., and McCall, N.J., "Optimization of the Design and
Operation of Natural Gas Pipeline Systems," Paper No. SPE 4006, Society of Petroleum Engineers of AIME, 1972. [34]
Martin, D.W., and Peters, G., "The Application of Newton' s Method to
Network Analysis by Digital Computer," Journal of the Institute of Water Engineers, Vol. 17, 1963, pp. 115-129. [35]
Mays, L.M., Water Distribution Systems Handbook, McGraw-Hill
Company, 2000. [36]
Menon, E.S., Gas Pipelines Hydraulics, Taylor & Francis Group, LLC,
2005. [37]
Miller, B.L., and Goldberg, D.E., "Genetic Algorithm, Tournament
Selection, and the Effects of Noise," Complex Systems, Vol. 9, 1995, pp. 193-212. [38]
Mokhatab, S., Poe, W.A., and Speight, J.G., Handbook of Natural Gas
Transmission and Processing, Elsevier Press, 2006. [39]
O’Neill, R.P., Williard, M., Wilkins, B., and Pike, R., "A Mathematical
Programming Model for Allocation of Natural Gas," Operations Research, Vol. 27, No. 5, 1979, pp. 857-873.
144
References
[40]
Ohirhian, P.U., "Direct Calculation of the Gas Volumetric Flow Rate in
Horizontal and Inclined Pipes," Paper SPE-37394, Society of Petroleum Engineers, Richardson, Texas, 2002. [41]
Olorunniwo, F.O., A Methodology for Optimal Design and Capacity
Expansion Planning of Natural Gas Transmission Networks, Ph.D. Dissertation, The University of Texas at Austin, 1981. [42]
Olorunniwo, F.O., and Jensen, P.A., "Optimal Capacity Expansion
Policy for Natural Gas Transmission Networks – A Decomposition Approach," Engineering Optimization, Vol. 6, 1982, pp. 13-30. [43]
Osiadacz, A.J., Simulation and Analysis of Gas Pipeline Networks, Gulf
Publishing Company, London, 1987. [44]
Osiadacz, A.J., "Dynamic Optimization of High Pressure Gas Networks
using Hierarchical Systems Theory," PSIG 26th Annual Meeting, San Diego, California, October 13-14, 1994. [45]
Osiadacz, A.J., and Górecki, M., "Optimization of Pipe Sizes for
Distribution Gas Network Design," PSIG 27th Annual Meeting, Albuquerque, New Mexico, October 18-20, 1995. [46]
Osiadacz, A.J., and Pienkosz, K., "Methods of Steady-State Simulation
for Gas Networks," International Journal of Systems Science, Vol. 19, No. 7, 1988, pp. 1311-1321.
145
References
[47]
Pietrasz, S., Antunes, M., and Cornibert, L., "The Problem of
Reinforcing Regional Gas Transmission Networks: A Performance Study of Three Optimization Methods," EngOpt 2008 - International Conference on Engineering Optimization, Rio de Janeiro, Brazil, 1-5 June 2008, pp. 1-10. [48]
Pipe Flow Expert, Software for Engineering Professional. http://www.pipeflow.co.uk
[49]
Press, W.H., Teukolsky, S.A., Vetterling, W.T., and Flannery, B.P.,
Numerical Recipes in C: the Art of Scientific Computing, Second Edition, Cambridge University Press, 2002. [50]
Ríos-Mercado, R.Z., Wu, S., Scout, L.R., and Boyd, E.A., "A
Reduction
Technique
for
Natural
Gas
Transmission
Network
Optimization Problems," Annals of Operations Research, Vol. 117, 2002, pp. 217-234. [51]
Rossman, L.A., "EPANET—Users Manual," EPA-600/R-94/057, U.S.
Environmental
Protection
Agency,
Risk
Reduction
Engineering
Laboratory, Cincinnati, OH, 1994. [52]
Rossman, L.A., EPANET 2 Users Manual, Environmental Protection
Agency, 2000.
146
References
[53]
Salgado, R., Todini, E., and O'Connell, P.E., "Comparison of the
Gradient Method with Some Traditional Methods for the Analysis of Water Supply Distribution Networks," Proceedings of the International Conference on Computer Applications for Water Supply and Distribution 1988, pp. 38-62. [54]
Schroeder, D.W., Jr., "A Tutorial on Pipe Flow Equations," 33rd Annual
Meeting Pipeline Simulation Interest Group (PSIG), Oct. 17-19, 2001, Salt Lake City, Utah, pp. 1-18. [55]
Shapiro, A.H., The Dynamics and Thermodynamics of Compressible
Fluid Flow, John Wiley & Sons, 1977. [56]
Standing, M.B., and Katz, D.L., "Density of Natural Gases,"
Transactions of the American Institute of Mechanical Engineers (AIME), Vol. 142, 1942, pp. 140-149. [57]
Steinbach, M.C., "On PDE Solution in Transient Optimization of Gas
Networks," Journal of Computational and Applied Mathematics, Vol. 203, 2007, pp. 345-361. [58]
Sutton, R.P., "Compressibility Factor for High Molecular Weight
Reservoir Gases," SPE 14265. Paper presented at the SPE Annual Technical Conference and Exhibition, Las Vegas, NV, Sept. 22-25, 1985.
147
References
[59]
Todini, E., and Pilati, S., "A Gradient Method for the Analysis of Pipe
Networks," Proceedings of the International Conference on Computer Applications for Water Supply and Distribution, Leicester Polytechnic, Leicester, U.K., September 1987. [60]
Wichert, E., and Aziz, K., "Calculate Z’ s for Sour Gases," Hydrocarbon
Processing, Vol. 51, No. 5, 1972, pp. 119-122. [61]
Wood, D., and Charles, C., "Hydraulic Network Analysis Using Linear
Theory," ASCE, Journal of Hydraulics Division, Vol. 98, No. HY7, 1972, pp. 1157-1170. [62]
Wu, S., Ríos-Mercado, R.Z., Boyd, E.A., and Scott, L.R., "Model
Relaxations for the Fuel Cost Minimization of Steady-State Gas Pipelines Networks," Mathematical and Computer Modeling, Vol. 31, Issues 2-3, January-February 2000, pp. 197-220. [63]
Wu, Y., Lai, K.K., and Liu, Y., "Deterministic Global Optimization
Approach to Steady-State Distribution Gas Pipeline Networks," Optimization and Engineering, Vol. 8, No. 3, 2007, pp. 259-275.
148
Appendix A
COMPRESSIBLE FLOW A.1
Introduction A compressible fluid is one in which the fluid density changes when it is
subjected to high pressure-gradients. For gasses, changes in density are accompanied by changes in temperature, and this complicates considerably the analysis of compressible flow. Gases may be modeled as incompressible fluids in both microscopic and macroscopic calculations as long as the pressure changes are less than about 20% of the mean pressure, (Geankoplis, 1993). In a compressible fluid, the imposition of a force at one end of a system does not result in an immediate flow throughout the system. Instead, the fluid compresses near where the force was applied; that is, its density increases locally in response to the force. The compressed fluid expands against neighboring fluid particles causing the neighboring fluid itself to compress and setting in motion a wave pulse that travels throughout the system. The pulse of higher density fluid takes some time to travel from the source of the disturbance down through the pipe to the far end of the system. In incompressible flow, the compressibility is negligible. While in gas flow, it is permissible only in very low velocities. In a flow field, the pressure gradient
149
Appendix A
serves as the driving force, and the entire thermodynamic state of the flowing media varies with the pressure. When dealing with compressible flow, its state can be affected by such things as friction, area change, heat transfer and mass flow rate change.
A.2
Ideal Gas An ideal gas is defined as a fluid in which the volume of the gas
molecules is negligible when compared to the volume occupied by the gas. Also, the attraction or repulsion between the individual gas molecules and the container is negligible. In an ideal gas, the molecules are considered to be perfectly elastic and there is no internal energy loss resulting from collision between the molecules. The ideal gas law; sometimes referred to as the perfect gas equation; simply states that the pressure, volume, and temperature of the gas are related to the number of moles by the following equation: PV = nRT
................ (A.1)
where: P = absolute pressure, Pascal absolute V = gas volume, m3 n = number of kilomoles of the gas R = universal gas constant, J/kg.mole K T = absolute temperature of gas, K
150
Appendix A
Various gas processes can be calculated with sufficient accuracy with the aid of Eq. (A.1):
A.3
•
The constant temperature or isothermal process.
•
The constant pressure or isobaric process.
•
The constant volume or isometric or isochoric process.
•
The zero heat transfer or adiabatic process.
Real Gas From the molecular-kinetic point of view the nonideality of a gas is due
to the fact that the molecules have a certain volume and also the fact that intermolecular interaction are of an intricate nature. The error in calculations at high pressures using the ideal gas equation may be as high as 500% in some instances. This compares with errors of 2 to 3% at low pressures, Menon (2005). At higher temperatures and pressures, the “ equation of state” that relates pressure, volume, and temperature is used to calculate the properties of gases. Many of these correlations require a computer program to get accurate results in a reasonable amount of time. Since the ideal-gas equation of state is so simple, it is not unnatural to seek a means of modifying it in order to match it with non-ideal-gas behavior. The technique employed consists in defining factor (Z), called the compressibility factor.
151
Appendix A
There are correlations that modify the "Equation of state" so that reduces the error when using it. So, three terms are presented here: Critical Temperature,
Critical Pressure and Compressibility Factor. The critical pressure is defined as the minimum pressure that is required at the critical temperature to compress a gas into a liquid and the compressibility factor (Z) can be defined as the ratio of the gas volume at a given temperature and pressure to the volume the gas would occupy if it were an ideal gas at the same temperature and pressure, in brief, it's a measure of deviation from ideal-gas behavior (Çengel and Boles, 2006), the equation of state can be presented as: PV = Z n R T
................ (A.2)
"Corresponding states" theorem says: "the extent of deviation of a real gas from the ideal gas equation is the same for all real gases when the gases are at the same corresponding state". This theorem can be represented by the two parameters called Reduced Temperature which is the ratio of the temperature of the gas to its critical temperature and Reduced Pressure which is the ratio of the gas pressure to its critical pressure: Tr =
T Tc
, Pr =
P Pc
................ (A.3)
Therefore, generalized plots showing the variation of Z with reduced temperature and reduced pressure can be used for most gases for calculating the
152
Appendix A
compressibility factor. Figure A.1 depicts the variation of Z with the reduced temperature and reduced pressure.
Figure A.1 Compressibility of natural gases as a function of reduced pressure and temperature, Standing and Katz (1942)
Algebraic manipulation of the van der Waals equation, Osiadacz (1987):
153
Appendix A
Pr 27 Pr 27 Pr2 2 Z − +1 Z + Z− =0 2 3 8 Tr 64 T r 512 T r 3
................ (A.4)
For Eq. (A.4), ideal behavior occurs when: i. Pr is small compared to 1.0, or ii. Tr is large compared to 1.0. Figure A.1 shows graphically Eq. (A.4) for natural gas.
A.4
Natural Gas When the gas is associated with mixture of different components, the
critical temperature and critical pressure are called the pseudo-critical
temperature
pseudo-critical
and
pressure,
respectively.
The
reduced
temperature and reduced pressure are defined as:
T pr =
T T pc
,
Ppr =
P Ppc
................ (A.5)
In natural gas mixtures, it' s usual to refer to gas components as C1, C2, C3, etc. These are equivalent to CH4 (methane), C2H6 (ethane), C3H8 (propane), and so on. A natural gas mixture that consists of components such as C1, C2, C3, and so forth is said to have an apparent molecular weight as defined by the equation:
Ma =
yi M i
................ (A.6)
154
Appendix A
where
M a : Apparent molecular weight of gas mixture yi :
Mole fraction of gas component i
M i : Molecular weight of gas component i The average pseudo-critical temperature and pressure can be calculated as well:
T pc =
y i Tc
................ (A.7)
Ppc =
y i Pc
................ (A.8)
The values of critical pressure and critical temperature can be estimated from its specific gravity if the composition of the gas and the critical properties of the individual components are not known. The method uses a correlation to estimate pseudo-critical temperature and pseudo-critical pressure values from the specific gravity. There are several different correlations available. The most common is the one proposed by Sutton (1985), which is based on the basis of 264 different gas samples. Sutton (1985) used regression analysis on raw data to obtain the following second-order fits for the pseudo-critical properties, Mokhatab et al. (2006):
Ppc = 756.8 − 131.07 G − 3.6 G 2
................ (A.9)
T pc = 169.2 + 349.5 G − 74.0 G 2
.............. (A.10)
155
Appendix A
These equations are valid over the range of specific gas gravities with which Sutton (1985) worked 0.57 < G < 1.68.
A.5
Compressibility Factor The most commonly used method to estimate the Z factor is the chart
provided by Standing and Katz (1942). The Z factor chart is shown in Figure (3.1). The chart covers the range of reduced pressure from 0 to 15, and the range of reduced temperature from 1.05 to 3. The Z factor chart of Standing and Katz (1942) is only valid for mixtures of hydrocarbon gases. Wichert and Aziz (1972) developed a correlation to account for inaccuracies in the Standing and Katz chart when the gas contains significant fractions of acid gases, specifically carbon dioxide (CO2) and hydrocarbon sulfide (H2S). The Wichert and Aziz (1972) correlation modifies the values of the pseudo-critical temperature and pressure of the gas. Once the modified pseudo-critical properties are obtained, they are used to calculate pseudoreduced properties and the Z factor is determined from Figure A.1. The Wichert and Aziz (1972) correlation first calculates a deviation parameter ( ε d ) (in R), Mokhatab et al. (2006):
ε d = 120 (A 0.9 − A1.6 ) + 15 (B 0.5 − B 4.0 )
156
.............. (A.11)
Appendix A
where A is the sum of the mole fractions of CO2 and H2S in the gas mixture and
B is the mole fraction of H2S in the gas mixture. Then, ε d is used to determine the modified pseudo-critical properties as follows, Mokhatab et al. (2006):
T pc' = T pc − ε d Ppc'
=
.............. (A.12)
Ppc T pc'
.............. (A.13)
T pc + B (1 − B ) ε d
The correlation is applicable to concentrations of CO2 < 54.4 mol% and H2S < 73.8 mol%. Wichert and Aziz (1972) found their correlation to have an average absolute error of 0.97% over the following ranges of data: 154 psia < P < 7026 psia and 40°F < T < 300°F.
157
Appendix A
158
Appendix B
Table B1 Simulation results for Case study ‘1’: Nodes results Junction Demand Pressure ID (m³/h) (mbar) 100 101 102 103 104 107 108 109 110 111 114 115 116 117 118 119 121 122 131 132 133 134 135 136 137 138 139 140 141 144 145 146 147 148 149
8.20 17.93 26.24 24.26 10.27 3.82 18.82 24.96 14.81 8.59 0.25 11.08 8.59 32.30 39.89 19.98 35.41 6.97 0.00 12.22 27.6 17.46 60.66 71.72 15.18 42.53 45.63 38.24 26.39 0.59 8.89 3.89 13.37 20.29 55.55
48.03 47.94 47.96 48.00 48.26 47.74 48.03 48.09 48.23 48.24 44.83 44.92 46.55 48.19 48.09 48.08 48.21 48.21 44.75 45.83 45.98 48.32 44.68 44.65 44.89 48.59 48.20 48.20 48.20 48.21 44.65 44.64 44.64 44.65 49.50
Junction Demand Pressure ID (m³/h) (mbar) 150 151 152 153 154 155 156 157 158 160 161 162 48 49 50 51 52 54 55 64 65 66 67 69 70 71 72 73 74 78 79 80 81 82 83
64.64 8.79 26.33 1.98 0.00 6.71 5.16 16.76 31.85 0.00 16.67 1.17 7.19 4.95 6.51 2.80 6.61 6.61 1.00 3.55 4.63 20.21 18.86 7.37 4.87 6.47 38.15 23.7 12.55 5.14 4.42 21.74 21.96 19.44 30.65
159
48.35 48.34 48.25 48.24 48.22 48.22 44.58 44.60 44.60 49.87 49.50 49.50 49.49 49.53 49.59 49.77 49.98 49.89 49.88 49.16 48.67 48.14 47.95 48.99 47.76 47.95 47.95 47.82 47.82 48.76 48.75 47.95 47.76 47.68 47.95
Junction Demand Pressure ID (m³/h) (mbar) 84 44.10 85 52.87 86 25.01 92 8.05 93 4.68 94 12.89 95 34.44 96 35.71 97 23.27 98 1.00 99 8.52 159* -703.45 53* -779.11 * Source Nodes
47.95 47.82 47.84 48.47 47.95 47.96 47.95 47.87 48.03 48.48 48.23 50.00 50.00
Appendix B
Table B2 Simulation results for Case study ‘1’: Branches results Branch ID
Flow (m³/h)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
89.53 -31.63 -33.75 -93.49 -112.40 -116.61 225.19 140.48 -42.18 -233.73 -68.10 0.95 -164.46 81.55 -190.38 17.33 -85.62 85.37 -135.62 38.92 80.98 10.21 -276.24 2.23 -30.95 -17.75 -10.36 38.75 85.37 -22.38 91.14 -82.32 32.35 -376.03
Velocity Head loss (m/s) (mbar) 1.4073 0.4972 0.5305 1.4696 3.9753 1.8329 7.9643 2.2083 0.6631 2.0666 1.0704 0.0338 1.4541 0.7211 1.6833 0.6129 1.3458 1.3419 4.7964 1.3764 2.8641 0.6423 2.4425 0.1404 1.0948 1.1158 0.1628 0.3427 1.3419 1.4070 3.2233 5.1762 2.0339 3.3248
Branch ID
Flow (m³/h)
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
7.85 16.86 -28.62 3.67 47.34 38.93 -457.49 -2.68 -34.98 -2.16 -28.55 -29.14 3.89 4.08 -5.63 21.42 172.57 -703.45 17.84 8.79 64.16 37.83 35.85 6.71 -5.16 -0.50 703.45 -1.17 -374.72 367.53 -379.67 -386.18 -388.98 -779.11
0.09 -0.02 -0.04 -0.27 -0.19 -0.28 1.19 0.07 -0.06 -0.16 -0.14 0.01 -0.01 0.02 -0.02 0.03 -0.09 0.08 -1.63 0.27 0.72 0.10 -0.13 0.00 -0.11 -0.12 0.01 0.01 0.07 -0.15 0.94 -2.34 1.38 -0.27
160
Velocity Head loss (m/s) (mbar) 0.4938 0.5961 1.7992 0.1297 1.6744 1.3769 4.0451 0.0947 1.2370 0.0340 0.4489 0.4581 0.2446 0.1441 0.1991 0.7577 2.7126 2.7644 0.2804 0.3109 1.0086 0.5947 0.5636 0.1055 0.3244 0.0312 2.7644 0.0414 1.4726 5.7772 1.4920 1.5176 1.5286 1.7222
0.03 0.03 -0.24 0.01 0.24 0.40 -0.91 0.01 -0.15 0.01 -0.01 0.01 0.01 0.01 0.01 0.05 1.16 -0.36 0.01 0.01 0.10 0.02 0.02 0.01 -0.01 0.01 0.13 0.01 -0.04 0.33 -0.07 -0.18 -0.20 -0.02
Appendix B
Table B2 (Continued) Branch ID
Flow (m³/h)
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
383.52 376.91 375.91 138.00 225.98 133.37 86.33 26.83 67.47 147.30 71.22 -4.87 -6.47 23.99 -1.15 -1.12 1.41 -13.67 4.42 137.8 9.17 46.27
Velocity Head loss (m/s) (mbar) 1.5072 1.4812 3.3238 2.1693 3.5521 3.0189 1.3570 0.9491 0.2651 2.3167 2.5189 0.1722 0.2288 0.8486 0.0045 0.0395 0.0500 0.4834 0.2779 2.1665 0.3243 1.6365
Branch ID
0.09 0.01 1.40 0.50 0.17 0.53 0.18 0.19 0.01 0.23 1.04 0.01 0.01 0.13 0.01 0.01 0.01 -0.02 0.01 0.29 0.02 0.20
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
161
Flow (m³/h) 19.44 -4.96 24.19 -73.26 -4.92 -22.35 -43.60 129.77 -4.68 -23.53 5.96 -116.36 8.67 -35.48 -13.91 -80.77 294.14 121.25
Velocity Head loss (m/s) (mbar) 0.6875 0.0195 0.8557 0.2879 0.3092 0.7903 1.5419 2.0399 0.1655 0.8321 0.2107 0.4573 0.5448 1.2549 0.8746 5.0788 2.6008 1.9060
0.08 0.01 0.13 0.01 -0.02 -0.05 -0.19 0.24 0.01 -0.07 0.01 -0.01 0.08 -0.12 -0.16 -0.45 0.22 0.20
Appendix B
Table B3 Optimized versus existing simulation of nodal pressure for Case study ‘1’ Design Optimization Junction ID Pressure Pressure (mbar) (mbar) 100 48.03 48.81 101 47.94 48.09 102 47.96 46.98 103 48.00 47.30 104 48.26 46.76 107 47.74 41.38 108 48.03 45.68 109 48.09 45.98 110 48.23 42.67 111 48.24 45.63 114 44.83 34.49 115 44.92 34.52 116 46.55 38.28 117 48.19 33.49 118 48.09 36.50 119 48.08 35.09 121 48.21 33.91 122 48.21 32.91 131 44.75 22.02 132 45.83 23.30 133 45.98 25.90 134 48.32 35.78 135 44.68 37.96 136 44.65 38.44 137 44.89 24.48 138 48.59 44.42 139 48.20 30.48 140 48.20 33.37 141 48.20 27.27 144 48.21 30.01 145 44.65 23.81 146 44.64 26.33 147 44.64 20.21
Design Optimization Junction ID Pressure Pressure (mbar) (mbar) 148 44.65 20.89 149 49.50 48.42 150 48.35 41.42 151 48.34 32.84 152 48.25 40.40 153 48.24 39.92 154 48.22 40.10 155 48.22 36.50 156 44.58 38.71 157 44.60 27.40 158 44.60 35.62 160 49.87 48.90 161 49.50 32.09 162 49.50 32.43 48 49.49 28.43 49 49.53 33.12 50 49.59 37.87 51 49.77 46.56 52 49.98 48.49 54 49.89 41.29 55 49.88 40.88 64 49.16 39.84 65 48.67 38.91 66 48.14 38.92 67 47.95 28.91 69 48.99 36.91 70 47.76 37.22 71 47.95 33.77 72 47.95 33.94 73 47.82 30.90 74 47.82 29.91 78 48.76 37.03 79 48.75 23.59
162
Appendix B
Table B3 (Continued) Design Optimization Junction Pressure Pressure ID (mbar) (mbar) 80 47.95 24.42 81 47.76 27.99 82 47.68 36.91 83 47.95 34.36 84 47.95 35.22 85 47.82 28.42 86 47.84 23.45 92 48.47 30.10 93 47.95 26.95 94 47.96 29.34 95 47.95 25.85 96 47.87 23.78 97 48.03 38.91 98 48.48 38.60 99 48.23 24.67 159* 50.00 50.00 53* 50.00 50.00 * Source Nodes
163
Appendix B
Table B4 Optimized versus existing simulation for Case study ‘1’ Branch ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Design Diameter Velocity (in.) (m/s) 6 1.4073 6 0.4972 6 0.5305 6 1.4696 4 3.9753 6 1.8329 4 7.9643 6 2.2083 4 0.6631 8 2.0666 6 1.0704 4 0.0338 8 1.4541 8 0.7211 8 1.6833 4 0.6129 6 1.3458 6 1.3419 4 4.7964 4 1.3764 4 2.8641 3 0.6423 8 2.4425 3 0.1404 4 1.0948 3 1.1158 6 0.1628 8 0.3427 6 1.3419 3 1.4070 4 3.2233 3 5.1762 3 2.0339 8 3.3248
164
Optimization Diameter Velocity (in.) (m/s) 2 9.2456 2 7.5662 1.25 8.2315 3 9.0345 2.5 9.5430 2.5 8.8189 4 7.0015 6 2.2501 2 0.5325 4 9.0810 1.5 8.8521 1 5.2413 3 9.5111 2.5 9.2000 4 6.0156 1 6.0772 6 9.4821 5 9.4467 3 7.3202 2 6.1345 2 9.3133 1 4.5235 5 6.6439 1 1.8231 1.25 9.2531 1 9.5421 0.5 4.2382 2 7.2190 2 9.1091 1.5 8.5126 2.5 8.8218 2.5 9.5221 2 6.7001 5 9.7213
D* (in.) -4 -4 -4.75 -3 -1.5 -3.5 0 0 -2 -4 -4.5 -3 -5 -5.5 -4 -3 0 -1 -1 -2 -2 -2 -3 -2 -2.75 -2 -5.5 -6 -4 -1.5 -1.5 -0.5 -1 -3
Appendix B
Table B4 (Continued) Branch ID 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
Design Diameter Velocity (in.) (m/s) 3 0.4938 4 0.5961 3 1.7992 4 0.1297 4 1.6744 4 1.3769 8 4.0451 4 0.0947 4 1.2370 6 0.0340 6 0.4489 6 0.4581 3 0.2446 4 0.1441 4 0.1991 4 0.7577 6 2.7126 12 2.7644 6 0.2804 4 0.3109 6 1.0086 6 0.5947 6 0.5636 6 0.1055 3 0.3244 3 0.0312 12 2.7644 4 0.0414 12 1.4726 6 5.7772 12 1.4920 12 1.5176 12 1.5286 16 1.7222
165
Optimization Diameter Velocity (in.) (m/s) 1 0.4896 1 4.0918 1.5 8.9871 1 3.2891 2 6.0123 2 7.3219 6 8.2720 1 2.6230 1.25 8.8010 1.25 6.4931 1.25 4.4337 1 4.5437 1 2.3201 1 3.2195 2 7.6163 1 3.5900 3 9.4000 8 6.5100 1.25 6.3841 1 4.9836 2 6.2411 2 9.7133 2 8.6529 1 4.0100 1 3.4726 1 7.9837 8 6.7101 1 0.5936 5 6.6401 8 6.7326 5 7.1021 5 7.3921 6 5.2000 10 6.7919
D* (in.) -2 -3 -1.5 -3 -2 -2 -2 -3 -2.75 -4.75 -4.75 -5 -2 -3 -2 -3 -3 -4 -4.75 -3 -4 -4 -4 -5 -2 -2 -4 -3 -7 2 -7 -7 -6 -6
Appendix B
Table B4 (Continued) Branch ID 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
Design Diameter Velocity (in.) (m/s) 12 1.5072 12 1.4812 8 3.3238 6 2.1693 6 3.5521 5 3.0189 6 1.3570 4 0.9491 12 0.2651 6 2.3167 4 2.5189 4 0.1722 4 0.2288 4 0.8486 12 0.0045 4 0.0395 4 0.0500 4 0.4834 3 0.2779 6 2.1665 4 0.3243 4 1.6365 4 0.6875 12 0.0195 4 0.8557 12 0.2879 3 0.3092 4 0.7903 4 1.5419 6 2.0399 4 0.1655 4 0.8321 4 0.2107 12 0.4573
166
Optimization Diameter Velocity (in.) (m/s) 5 9.5643 5 9.5763 8 9.5203 3 9.0025 4 7.0019 3 8.7651 2.5 8.9020 1.25 7.5901 2 6.4910 3 9.8290 2.5 7.4802 1 2.6092 0.75 4.8921 1.25 3.1090 2.5 5.0192 1 1.2230 1 7.8109 1 8.4313 1.25 2.5000 2.5 9.2190 1 2.9010 2 6.5459 1.25 7.0425 1 9.2198 1 0.8221 2 9.3290 1.25 8.8980 2 6.8798 2 9.3330 2.5 8.8910 1 2.6500 1 5.4920 1 4.4401 8 8.5145
D* (in.) -7 -7 0 -3 -2 -2 -3.5 -2.75 -10 -3 -1.5 -3 -3.25 -2.75 -9.5 -3 -3 -3 -1.75 -3.5 -3 -2 -2.75 -11 -3 -10 -1.75 -2 -2 -3.5 -3 -3 -3 -4
Appendix B
Table B4 (Continued) Branch ID 103 104 105 106 107 108
Design Diameter Velocity (in.) (m/s) 3 0.5448 4 1.2549 3 0.8746 3 5.0788 8 2.6008 6 1.9060
Optimization Diameter Velocity (in.) (m/s) 2 7.9982 5 7.9371 2 6.4306 3 8.1290 6 9.8925 4 6.8290
* ∆D = DOptimal − DDesign
Cost (Design) = $ 98,963.614 Cost (Optimization) = $ 36,200.4 Profit = $ 62,763.214
167
D* (in.) -1 1 -1 0 -2 -2
Appendix B
Table B5 Comparison between optimal diameters of Osiadacz and Górecki (1995) and the present study for Case study ‘1’ Branch ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Optimal Diameters (in.) Osiadacz Present and Górecki Study (1995) 4 2 5 2 2 1.25 5 3 0.5 2.5 6 2.5 6 4 8 6 2.5 2 4 4 1 1.5 2 1 2.5 3 1.5 2.5 3 4 1.5 1 5 6 5 5 5 3 1.5 2 3 2 2 1 2.5 5 1.5 1 0.5 1.25 0.5 1 1.5 0.5 0.5 2 5 2 2.5 1.5 2 2.5
D* (in.)
Branch ID
2 3 0.75 2 -2 3.5 2 2 0.5 0 -0.5 1 -0.5 -1 -1 0.5 -1 0 2 -0.5 1 1 -2.5 0.5 -0.75 -0.5 1 -1.5 3 1 -0.5
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
168
Optimal Diameters (in.) Osiadacz Present and Górecki Study (1995) 2 2.5 2 2 0.5 5 2.5 1 2 1 1.5 1.5 2 1 0.75 2 3 2 3 6 2 1 1.5 1.25 0.5 1.25 2 1.25 2 1 0.75 1 1.5 1 2 2 1.5 1 5 3 6 8 1.5 1.25 1 1 2.5 2 2 2 2 2 1 1 0.75 1 0.75 1 6 8 0.5 1
D* (in.) -0.5 0 -4.5 1.5 1 0 1 -1.25 1 -3 1 0.25 -0.75 0.75 1 -0.25 0.5 0 0.5 2 -2 0.25 0 0.5 0 0 0 -0.25 -0.25 -2 -0.5
Appendix B
Table B5 (Continued)
Branch ID 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
Optimal Diameters (in.) Osiadacz Present and Górecki Study (1995) 10 5 10 8 10 5 10 5 10 6 12 10 8 5 8 5 8 8 6 3 6 4 6 3 5 2.5 3 1.25 5 2 5 3 4 2.5 0.75 1 0.75 0.75 1.25 1.25 4 2.5 1 1 0.5 1
Optimal Diameters (in.) Branch Osiadacz ID Present and Górecki Study (1995) 86 1.5 1 87 0.75 1.25 88 5 2.5 89 2.5 1 90 2.5 2 91 1.5 1.25 92 5 1 93 4 1 94 6 2 95 2.5 1.25 96 4 2 97 4 2 98 4 2.5 99 0.75 1 100 1.25 1 101 0.5 1 102 6 8 103 2.5 2 104 5 5 105 2.5 2 106 4 3 107 6 6 108 4 4
D* (in.) 5 2 5 5 4 2 3 3 0 3 2 3 2.5 1.75 3 2 1.5 -0.25 0 0 1.5 0 -0.5
* ∆D = DOsiadacz − DPresent Cost (Osiadacz and Górecki, 1995) = $ 54,350.580 Cost (Present Study) = $ 36,200.4 Profit = $ 18,150.18
169
D* (in.) 0.5 -0.5 2.5 1.5 0.5 0.25 4 3 4 1.25 2 2 1.5 -0.25 0.25 -0.5 -2 0.5 0 0.5 1 0 0
Appendix B
170
Appendix C
Table C1 Nodes simulated data for Case study ‘2’ Junction ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Demand (m³/h) 40.37 20.47 27.25 25.61 16.81 0.00 21.35 0.00 8.35 27.25 27.25 23.92 5.50 42.71 8.35 8.35 12.85 22.23
Pressure (bar) 3.574 3.575 3.577 3.578 3.575 3.592 3.574 3.593 3.592 3.575 3.578 3.584 3.575 3.574 3.577 3.575 3.575 3.574
Junction ID 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36*
171
Demand Pressure (m³/h) (bar) 16.81 3.578 14.87 3.578 0.00 3.578 5.50 3.592 5.50 3.578 5.50 3.578 39.66 3.574 23.06 3.573 26.04 3.574 5.50 3.573 14.87 3.573 5.62 3.573 5.62 3.573 150.00 3.574 0.00 3.574 5200.00 3.592 0.00 3.575 -5857.20 3.600 *Source node
Appendix C
Table C2 Branches simulated data for Case study ‘2’ Branch ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Flow (m³/h) 54.67 150.00 -3.88 5.50 142.95 -103.24 42.68 122.26 5200.00 -133.88 112.53 5200.00 657.17 -5857.17 5.50 22.09 -183.22 66. 96 -277.42 341.98
Velocity (m/s) 2.0280 3.1241 0.3844 0.5446 14.1547 6.2571 2.5867 12.1057 9.1366 13.2565 4.1742 9.1366 13.6873 10.2913 0.3333 2.1871 18.1418 6.6301 27.4702 20.7259
Head Loss (bar) 0.01 0.01 -0.01 0.01 0.01 -0.01 0.01 0.02 0.01 -0.01 0.01 0.01 0.01 -0.07 0.01 0.01 -0.02 0.01 -0.07 0.06
Branch ID 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
172
Flow (m³/h) -643.32 132.51 26.04 -273.69 162.10 12.85 140.90 79.01 39.66 20.37 5.50 5.50 5.50 5.50 26.11 5.62 5.62 112.53 5.50
Velocity (m/s) 38.9892 2.7599 0.9660 16.5871 16.0505 0.7788 13.9513 1.6455 0.8260 1.2345 0.9374 0.5446 0.2040 0.3333 1.5824 0.3406 0.3406 4.1742 0.5446
Head Loss (bar) -0.08 0.01 0.01 -0.01 0.02 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01
Appendix C
Table C3 Optimized versus existing simulation for Case study ‘2’ Branch ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Design Diameter Velocity (in.) (m/s) 2 2.0280 2.5 3.1241 1.25 0.3844 1.25 0.5446 1.25 14.1547 1.5 6.2571 1.5 2.5867 1.25 12.1057 8 9.1366 1.25 13.2565 2 4.1742 8 9.1366 2.5 13.6873 8 10.2913 1.5 0.3333 1.25 2.1871 1.25 18.1418 1.25 6.6301 1.25 27.4702 1.5 20.7259 1.5 38.9892 2.5 2.7599 2 0.9660 1.5 16.5871 1.25 16.0505 1.5 0.7788 1.25 13.9513 2.5 1.6455 2.5 0.8260 1.5 1.2345 1 0.9374 1.25 0.5446 2 0.2040 1.5 0.3333
Optimization Diameter Velocity (in.) (m/s) 0.75 15.2241 1.25 14.8529 0.5 2.0358 0.5 2.8841 1.25 14.1547 1 17.5969 0.75 11.8852 1.25 12.1057 6 17.2049 1.25 13.2565 1 19.1797 8 9.1366 2.5 14.6615 6 19.3792 0.5 2.8841 0.5 11.5824 1.25 18.1418 0.75 18.6459 1.5 16.8136 2 12.6856 2.5 14.3525 1.25 13.1212 0.5 13.6549 1.5 16.5871 1.25 16.0505 0.5 6.7383 1.25 13.9513 1 13.4659 0.75 11.0442 0.5 10.6817 0.5 2.8841 0.5 2.8841 0.5 2.8841 0.5 2.8841
173
D* (in.) 1.25 1.25 0.75 0.75 0 0.5 0.75 0 2 0 1 0 0 2 1 0.75 0 0.5 -0.25 -0.5 -1 1.25 1.5 0 0 1 0 1.5 1.75 1 0.5 0.75 1.5 1
Appendix C
Table C3 (Continued) Branch ID 35 36 37 38 39
Design Diameter Velocity (in.) (m/s) 1.5 1.5824 1.5 0.3406 1.5 0.3406 2 4.1742 1.25 1.5824
Optimization Diameter Velocity (in.) (m/s) 0.5 13.6916 0.5 2.9470 0.5 2.9470 1 19.1797 0.5 2.8841
* ∆D = DDesign − DOptimal
Cost (Design) = $ 43,097.6798 Cost (Present Study) = $ 29,718.5472 Profit = $ 13,379.13
174
D* (in.) 1 1 1 1 0.75
Appendix C
Table C4 Comparison between optimal diameters of Osiadacz and Górecki (1995) and the present study for Case study ‘2’ Optimized Diameters (in.) Branch Osiadacz ID Present and Górecki Study (1995) 1 1.25 0.75 2 1.50 1.25 3 1.00 0.50 4 0.50 0.50 5 1.00 1.25 6 0.75 1.00 7 0.75 0.75 8 1.25 1.25 9 8.00 6.00 10 1.25 1.25 11 1.25 1.00 12 8.00 8.00 13 3.00 2.50 14 8.00 6.00 15 0.50 0.50 16 1.00 0.50 17 1.50 1.25 18 1.00 0.75 19 2.00 1.50 20 1.50 2.00
D* (in.)
Branch ID
0.50 0.25 0.50 0 -0.25 -0.25 0 0 2.00 0 0.25 0 0.50 2.00 0 0.50 0.25 0.25 0.50 -0.50
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Optimized Diameters (in.) Osiadacz Present and Górecki Study (1995) 2.50 2.50 1.25 1.25 0.75 0.50 1.50 1.50 1.25 1.25 0.50 0.50 1.25 1.25 1.00 1.00 0.75 0.75 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 1.00 0.50 0.50
* ∆D = DOsiadacz − DPresent
Cost (Osiadacz and Górecki, 1995) = $ 40,187.838 Cost (Present Study) = $ 29,718.5472 Profit = $ 10,469.29
175
D* (in.) 0 0 0.25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.50 0
Appendix D
176
Appendix D
Table D1 Simulation results data for Moharram-Bek network: Nodes results Junction ID 1* 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
Demand (m³/h) -1282.8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 51.6 24.0 26.4 49.2 27.6 16.8 80.4 28.8 4.8
Pressure (mbar) 100.00 95.61 90.28 85.92 82.25 77.98 75.71 71.86 69.18 67.10 65.75 65.12 64.90 64.10 99.88 93.27 89.34 85.32 78.68 73.82 71.26 69.57 67.26 63.97 61.97 60.74 93.84 82.57 72.03 58.52 57.50 57.42 57.40 59.14 60.29
Junction ID 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
177
Demand (m³/h) 12.0 32.4 10.8 15.6 12.0 19.2 14.4 15.6 21.6 6.0 9.6 4.8 12.0 6.0 28.8 8.4 39.6 16.8 16.8 12.0 4.8 4.8 10.8 4.8 6.0 7.2 4.8 16.8 7.2 22.8 24.0 12.0 12.0 19.2 6.0
Pressure (mbar) 64.25 64.34 64.42 64.67 70.40 73.72 80.71 81.66 84.04 86.58 87.52 89.58 83.27 69.32 68.37 65.97 65.27 65.16 94.42 89.87 89.57 85.49 80.35 79.90 79.41 79.24 79.02 78.92 78.80 78.68 74.08 73.93 73.75 73.69 73.68
Appendix D
Table D1 (Continued) Junction ID 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
Demand (m³/h) 12.0 13.2 9.6 14.4 3.6 6.0 6.0 13.2 10.8 12.0 4.8 12.0 12.0 4.8 3.6 4.8 10.8 4.8 8.4 4.8 4.8 4.8 4.8 6.0 4.8 7.2 6.0 6.0 10.8 7.2 8.4 7.2 10.8 14.4 36.0
Pressure (mbar) 73.67 73.68 73.70 76.19 74.18 73.62 73.03 72.14 71.57 71.42 71.34 71.28 71.26 70.81 70.66 70.53 70.31 70.06 69.90 69.85 69.64 68.27 68.20 67.90 67.80 67.41 67.37 67.33 66.31 65.41 65.16 64.72 64.42 63.91 63.77
Junction ID 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
178
Demand Pressure (m³/h) (mbar) 4.8 63.81 15.6 64.10 6.0 62.93 13.2 62.60 22.8 62.47 6.0 62.01 9.6 61.99 7.2 61.92 6.0 61.91 8.4 61.91 9.6 59.20 7.2 62.20 3.6 61.75 6.0 60.84 3.6 59.41 6.0 59.13 10.8 58.82 7.2 75.74 19.2 71.48 12.0 62.14 * Source Node
Appendix D
Table D2 Simulation results data for Moharram-Bek network: Branches results Branch ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Flow (m³/h) 1194.06 88.74 994.07 948.95 -944.15 -934.55 928.55 901.67 -880.07 799.85 425.25 343.08 246.40 252.94 174.58 -158.98 148.18 88.74 37.14 102.19 130.51 152.59 128.59 128.41 100.43 74.03 74.09 88.66 99.81 784.25 769.85 587.77 568.57 488.00
Velocity (m/s) 18.77 1.39 15.63 14.92 14.84 14.69 14.60 14.17 13.83 12.57 9.63 7.77 5.58 5.73 3.95 3.60 3.35 7.91 3.31 9.11 11.63 13.60 11.46 11.44 8.95 6.60 6.60 7.90 8.89 12.33 17.43 13.30 12.87 11.05
Head Loss (mbar) 4.39 0.12 5.33 0.69 -2.06 -0.94 0.66 1.88 -1.79 0.59 2.08 1.35 0.63 0.22 0.23 -0.24 0.08 6.03 0.57 3.94 4.02 2.74 3.90 4.86 1.78 0.78 1.68 2.32 3.29 0.95 2.73 1.99 1.86 1.46
Branch ID 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
179
Flow (m³/h) 476.00 -115.78 103.78 82.38 72.26 72.26 54.62 27.02 10.22 -70.18 -98.98 -103.78 118.14 106.14 100.14 71.34 62.94 23.34 -6.54 81.84 65.04 45.13 33.13 28.33 26.88 -22.08 80.22 69.42 64.62 58.62 51.42 46.62 29.82 22.62
Velocity (m/s) 10.77 2.62 2.35 7.34 6.44 6.44 4.87 2.41 0.91 6.25 8.82 9.25 10.53 9.46 8.92 6.36 5.61 2.08 0.58 7.29 5.80 4.02 2.95 2.52 2.40 1.97 7.15 6.19 5.76 5.22 4.58 4.15 2.66 2.02
Head Loss (mbar) 1.22 -0.09 0.14 2.00 1.23 2.22 1.02 0.09 0.02 -1.74 -1.15 -3.81 12.34 13.95 0.95 2.40 0.70 0.11 -0.04 1.18 1.15 0.41 0.30 0.24 0.43 -0.17 1.90 0.45 0.49 0.16 0.22 0.10 0.13 0.12
Appendix D
Table D2 (Continued) Branch ID 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
Flow (m³/h) -0.18 80.02 56.02 44.02 32.02 12.82 6.82 -5.18 -18.38 -27.98 87.22 80.45 76.85 70.85 64.85 51.65 40.85 28.85 24.05 12.05 0.05 80.57 61.37 56.57 52.97 48.17 37.37 32.57 24.17 19.37 14.57 50.75 45.95 41.15 35.15
Velocity (m/s) 0.02 7.13 4.99 3.92 2.85 1.14 0.61 0.46 1.64 2.49 7.77 7.17 6.85 6.31 5.78 4.60 3.64 2.57 2.14 1.07 0.01 7.18 5.47 5.04 4.72 4.29 3.33 2.90 2.15 1.73 1.30 4.52 4.09 3.67 3.13
Head Loss (mbar) 0.01 1.66 0.15 0.18 0.06 0.01 0.01 -0.01 -0.02 -0.12 2.24 1.53 0.56 0.59 0.89 0.57 0.16 0.08 0.05 0.03 0.01 0.38 0.67 0.15 0.13 0.22 0.25 0.16 0.05 0.21 0.07 0.91 0.07 0.30 0.10
180
Branch Flow ID (m³/h) 104 30.35 105 23.15 106 17.15 107 11.15 108 82.18 109 71.38 110 64.18 111 55.78 112 48.58 113 37.78 114 23.38 115 -12.62 116 -17.42 117 96.67 118 81.07 119 75.07 120 61.87 121 39.07 122 27.07 123 21.07 124 11.47 125 4.27 126 -1.73 127 -10.13 128 78.36 129 68.76 130 61.56 131 57.96 132 51.96 133 48.36 134 42.36 135 31.56 136 682.63 137 -668.23
Velocity (m/s) 2.70 2.06 1.53 0.99 7.32 6.36 5.72 4.97 4.33 3.37 2.08 1.12 1.55 8.61 7.22 6.69 5.51 3.48 2.41 1.88 1.02 0.38 0.15 0.90 6.98 6.13 5.49 5.17 4.63 4.31 3.77 2.81 10.73 10.50
Head Loss (mbar) 0.39 0.04 0.04 0.07 0.80 0.90 0.24 0.44 0.31 0.50 0.14 -0.04 -0.16 1.65 1.16 0.33 0.14 0.32 0.13 0.02 0.08 0.01 -0.01 -0.06 1.81 0.89 0.45 0.91 1.43 0.28 0.32 0.29 1.79 -0.48
Appendix D
Table D3 Optimized versus existing simulation for Moharram-Bek network Branch ID 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
Design Optimization Diameter Velocity Diameter Velocity (in.) (m/s) (in.) (m/s) 6 18.77 10 6.76 6 1.39 2.5 7.91 6 15.63 8 8.79 6 14.92 8 8.39 6 14.84 8 8.35 6 14.69 8 8.26 6 14.60 8 8.21 6 14.17 8 7.97 6 13.83 8 7.78 6 12.57 8 7.07 5 9.63 5 9.63 5 7.77 5 7.77 5 5.58 4 8.71 5 5.73 4 8.95 5 3.95 3 9.65 5 3.60 3 8.79 5 3.35 3 8.19 2.5 7.91 2.5 7.91 2.5 3.31 1.5 8.21 2.5 9.11 2.5 9.11 2.5 11.25 3 7.21 2.5 13.60 3 8.43 2.5 11.46 3 7.11 2.5 11.44 3 7.10 2.5 8.95 2.5 8.95 2.5 6.60 2.5 6.60 2.5 6.60 2.5 6.60 2.5 7.90 2.5 7.90 2.5 8.89 2.5 8.89 6 12.33 8 6.93 5 17.43 8 6.81 5 13.30 6 9.24 5 12.87 6 8.94
* ∆D = DDesign − DOptimal
181
D* (in.) -4 3.5 -2 -2 -2 -2 -2 -2 -2 -2 0 0 1 1 2 2 2 0 1 0 -0.5 -0.5 -0.5 -0.5 0 0 0 0 0 -2 -3 -1 -1
Appendix D
Table D3 (Continued) Branch ID 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
Design Diameter Velocity (in.) (m/s) 5 11.05 5 10.77 5 2.62 5 2.35 2.5 7.34 2.5 6.44 2.5 6.44 2.5 4.87 2.5 2.41 2.5 0.91 2.5 6.25 2.5 8.82 2.5 9.25 2.5 10.53 2.5 9.46 2.5 8.92 2.5 6.36 2.5 5.61 2.5 2.08 2.5 0.58 2.5 7.29 2.5 5.80 2.5 4.02 2.5 2.95 2.5 2.52 2.5 2.40 2.5 1.97 2.5 7.15 2.5 6.19 2.5 5.76 2.5 5.22 2.5 4.58 2.5 4.15
Optimization Diameter Velocity (in.) (m/s) 6 7.67 6 7.48 2.5 9.87 2.5 9.40 2.5 7.34 2.5 6.44 2.5 6.44 2 7.61 1.25 9.64 1 5.69 2 9.77 2.5 8.82 2.5 9.25 2.5 9.74 2.5 9.46 2.5 8.92 2.5 6.36 2 8.77 1.25 8.32 1 3.63 2.5 7.29 2 9.06 2 6.28 1.5 8.19 1.25 9.98 1.25 9.60 1.25 7.88 2.5 7.15 2 9.67 2 9.00 2 8.16 2 7.16 2 6.48
182
D* (in.) -1 -1 2.5 2.5 0 0 0 0.5 1.25 1.5 0.5 0 0 0 0 0 0 0.5 1.25 1.5 0 0.5 0.5 1 1.25 1.25 1.25 0 0.5 0.5 0.5 0.5 0.5
Appendix D
Table D3 (Continued) Branch ID 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
Design Diameter Velocity (in.) (m/s) 2.5 2.66 2.5 2.02 2.5 0.02 2.5 7.13 2.5 4.99 2.5 3.92 2.5 2.85 2.5 1.14 2.5 0.61 2.5 0.46 2.5 1.64 2.5 2.49 2.5 7.77 2.5 7.17 2.5 6.85 2.5 6.31 2.5 5.78 2.5 4.60 2.5 3.64 2.5 2.57 2.5 2.14 2.5 1.07 2.5 0.01 2.5 7.18 2.5 5.47 2.5 5.04 2.5 4.72 2.5 4.29 2.5 3.33 2.5 2.90 2.5 2.15 2.5 1.73 2.5 1.30
Optimization Diameter Velocity (in.) (m/s) 1.5 7.39 1.25 8.08 1 0.13 2.5 7.64 2 7.80 1.5 9.74 1.5 7.92 1 7.13 1 3.81 1 2.88 1.25 6.56 1.25 9.96 2.5 8.01 2.5 8.05 2.5 7.12 2.5 6.82 2 9.03 2 7.19 1.5 9.94 1.25 9.89 1.25 8.56 1 6.69 1 0.06 3 4.99 2 8.55 2 7.88 2 7.38 2 6.70 1.5 9.25 1.5 8.06 1.25 8.60 1.25 6.92 1 8.13
183
D* (in.) 1 1.25 1.5 0 0.5 1 1 1.5 1.5 1.5 1.25 1.25 0 0 0 0 0.5 0.5 1 1.25 1.25 1.5 1.5 -0.5 0.5 0.5 0.5 0.5 1 1 1.25 1.25 1.5
Appendix D
Table D3 (Continued) Branch ID 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
Design Diameter Velocity (in.) (m/s) 2.5 4.52 2.5 4.09 2.5 3.67 2.5 3.13 2.5 2.70 2.5 2.06 2.5 1.53 2.5 0.99 2.5 7.32 2.5 6.36 2.5 5.72 2.5 4.97 2.5 4.33 2.5 3.37 2.5 2.08 2.5 1.12 2.5 1.55 2.5 8.61 2.5 7.22 2.5 6.69 2.5 5.51 2.5 3.48 2.5 2.41 2.5 1.88 2.5 1.02 2.5 0.38 2.5 0.15 2.5 0.90 2.5 6.98 2.5 6.13 2.5 5.49 2.5 5.17 2.5 4.63
Optimization Diameter Velocity (in.) (m/s) 2 7.06 2 6.39 1.5 9.99 1.5 8.69 1.5 7.50 1.25 8.24 1 9.56 1 6.19 2.5 7.32 2.5 6.36 2 8.94 2 7.77 2 6.77 1.5 9.36 1.25 8.32 1 7.00 1 9.69 2.5 8.61 2.5 7.43 2.5 6.43 2 8.61 1.5 9.67 1.25 9.64 1.25 7.52 1 6.38 1 2.38 1 0.94 1 5.63 2.5 7.13 2 9.58 2 8.58 2 8.08 2 7.23
184
D* (in.) 0.5 0.5 1 1 1 1.25 1.5 1.5 0 0 0.5 0.5 0.5 1 1.25 1.5 1.5 0 0 0 0.5 1 1.25 1.25 1.5 1.5 1.5 1.5 0 0.5 0.5 0.5 0.5
Appendix D
Table D3 (Continued) Branch ID 133 134 135 136 137
Design Diameter Velocity (in.) (m/s) 2.5 4.31 2.5 3.77 2.5 2.81 6 10.73 6 10.50
Optimization Diameter Velocity (in.) (m/s) 2 6.73 1.5 9.87 1.5 7.81 8 6.04 8 5.91
* ∆D = DDesign − DOptimal
Cost (Design) = $ 97,212.6009 Cost (Optimization) = $ 76,744.772 Profit = $ 20,467.8289
185
D* (in.) 0.5 1 1 -2 -2
! "# $ % 7/8( 90
& '( )* )
+$,
" :;" ? @ 8A* B -C $ 0D
L F/ KG( @
) QR
W0 LE I0 X )= / ,J " N GH MEY2F ( ,J2 E>U A2 ,J ? 2$ C
V 6 LG E
F V A
=Y "
6 H
7/ UA
G-2Z G 0 W0 E " / EY 3 ,>QR = G
7
G! 8$: G
Z )G
/ EY 7 27
6 LG E I0 X )= /]
I0 X )= / ,J " N GH2 LG +EGY _( _ `H W E
=Y "
G- KG( G :JE A 8# )AG
K>
VC E ^
,J
) QR
G-% [ 0 \)H5 2 L> H / EY / EY
=Y "
VC 6 LG E
6B : a)2 0
) QR
6B
A F LG E ,J g