Optimization of Water Distribution Systems

1 downloads 0 Views 2MB Size Report
In particular, I would like to thank Doaa, my wife for her patience, attention, ...... penalty cost (Step 4), plus the penalty cost (Step 6), this step is an expression to ...... 500. P ressu re H ea d. (ft). Node 6. After Optimization. Before Optimization. Fig.
Mansoura University Faculty of Engineering Mechanical Power Eng. Dept.

Optimization of Water Distribution Systems Subjected to Water Hammer Using Genetic Algorithms Thesis Submitted in Partial Fulfillment of Requirements for the Master Degree in Mechanical Power Engineering

By

Eng. AbdelGawad Mondy AbdelBary B. Sc. of Mechanical Power Engineering Mansoura University

Supervisors

Prof. Dr. Magdy Abou Rayan

Prof. Dr. Mohamed Safwat Saad El-Din Mechanical Power Engineering Dept. Faculty of Engineering Mansoura University

Mechanical Power Engineering Dept. Faculty of Engineering Mansoura University

Assoc. Prof. Berge Djebedjian Mechanical Power Engineering Dept. Faculty of Engineering Mansoura University 2008

Approval Sheet

Optimization of Water Distribution Systems Subjected to Water Hammer Using Genetic Algorithms Researcher Name: AbdelGawad Mondy AbdelBary Supervisors Name

Position

Prof. Dr. Magdy Mohamed Abou Rayan Prof. Dr. Mohamed Safwat Saad El-Din Assoc. Prof. Dr. Berge Ohanness Djebedjian

Signature

Mechanical Power Engineering Department, Faculty of Engineering, Mansoura University Mechanical Power Engineering Department, Faculty of Engineering, Mansoura University Mechanical Power Engineering Department, Faculty of Engineering, Mansoura University

Head of Department

Vice Dean

Dean

Prof. Dr. Lotfy Rabie

Prof. Dr. Mohamed El-Shabrawy

Prof. Dr. Mohamed El-Shabrawy

Optimization of Water Distribution Systems Subjected to Water Hammer Using Genetic Algorithms Researcher Name: AbdelGawad Mondy AbdelBary Supervisors Name

Position

Prof. Dr. Magdy Mohamed Abou Rayan Prof. Dr. Mohamed Safwat Saad Eldin Assoc. Prof. Dr. Berge Ohanness Djebedjian

Signature

Mechanical Power Engineering Department, Faculty of Engineering, Mansoura University Mechanical Power Engineering Department, Faculty of Engineering, Mansoura University Mechanical Power Engineering Department, Faculty of Engineering, Mansoura University

Examining Committee Name

Position

Prof. Dr. Hassan Mansour El-Saadany Prof. Dr. Sadek Zakaria Kassab Prof. Dr. Mohamed Safwat Saad Eldin Assoc. Prof. Dr. Berge Ohanness Djebedjian

Signature

Mechanical Power Engineering Department, Mansoura University Mechanical Power Engineering Department, Alexandria University Mechanical Power Engineering Department, Mansoura University Mechanical Power Engineering Department, Mansoura University

Head of Department

Vice Dean

Dean

Prof. Dr. Lotfy Rabie

Prof. Dr. Mohamed El-Shabrawy

Prof. Dr. Mohamed El-Shabrawy

Acknowledgements

I would like to express my appreciation to Assoc. Prof. Dr. Berge Ohanness Djebedjian, for his continuous and enthusiastic assistance and encouragement, as well as his patience and invaluable advice throughout this research work. My thankfulness also goes to Prof. Dr. Magdy Mohamed Abou Rayan and Prof. Dr. Mohamed Safwat Saad El Din for their helpful comments. I feel fortunate to have been their student. I would also like to thank my parents and family for providing me with their patience, careful and support. In particular, I would like to thank Doaa, my wife for her patience, attention, understanding and support during development of this study.

Many thanks to you all, AbdelGawad Mondy

ABSTRACT

Fluid distribution systems can be severely damaged by water hammer. Water hammer is the dynamic slam, bang, or shudder that occurs in pipes when a sudden change in fluid velocity creates a significant change in fluid pressure. Water hammer can destroy hydraulic devices and cause pipes and penstocks to rupture. Water hammer can be avoided by designing, selecting and/or operating these systems such that unfavorable changes in water velocity are minimized. Pipe networks optimization techniques provide an opportunity for potential savings in cost for water supply systems. Genetic Algorithms (GA’s), which are one from the optimization tools, have been increasingly applied to solve complex, large scale search problems with mixed success. Genetic algorithms have been proposed to solve hard problems quickly, reliably and accurately. Traditionally, the analysis of pipeline systems focused on the steady state all over the last 20 years. This study presents the water network optimization by selecting the optimal pipe diameters for steady state flow and transients (water hammer). The GA’s have been used in solving the water network optimization for steady state conditions. The GA is integrated with the Newton-Raphson method and a transient analysis program to improve the search for the optimal diameters under certain constraints. These include the minimum allowable pressure head constraints at the nodes for the steady state flow, and the

minimum and maximum allowable pressure heads constraints for the water hammer caused by the pump power failure, sudden valve closure or sudden demand change at a certain node. The application of the developed computer program GASTnet (Genetic Algorithm Steady Transient network) to the theoretical examples shows the suitability of the method to find the least cost in a favorable number of function evaluations. This technique can be used in the first stages of the design of water distribution networks to protect it from the water hammer damages. The technique is very economical as the network design can be achieved without using hydraulic devices for water hammer control. An actual case study is subjected to the program application. The network is for Nuweiba desalinated water storage network, and it was virtually subjected to a sudden pump station power failure which caused a water hammer in the network. The GASTnet program was applied in the transient-optimization mode to properly select the network pipes diameters in which the network could sustain the event with demand satisfaction. The case study analysis shows a significant cost saving of installation and water hammer even avoidance.

CONTENTS Page List of Figures .................................................................................................... I List of Tables ................................................................................................... IV Nomenclature ................................................................................................. VII Abbreviations .................................................................................................... X

Chapter 1. Introduction .................................................................. 1 1.1 Introduction ............................................................................................. 1 1.2 Objectives of the Present Study .............................................................. 4 1.3 Thesis Organization ................................................................................ 5

Chapter 2. Literature Review ......................................................... 7 2.1 Introduction ............................................................................................. 7 2.2 Literature Review of Water Hammer ..................................................... 7 2.3 Optimization Techniques ...................................................................... 11 2.3.1

Deterministic Techniques (Linear Programming, Non-Linear Programming and Dynamic Programming) ................................................................. 12

2.3.2

Stochastic Techniques (Genetic Algorithms, Simulated Annealing and Shuffled Complex Evolution) ....................................................................... 13

2.3.3

Enumeration Approach ................................................... 14

2.4 Optimization of Pipe Networks ............................................................ 14 2.4.1

Design Components ........................................................ 15

2.5 Literature Review of the Optimization Techniques .............................. 17 2.5.1

Deterministic Optimization Techniques ......................... 17

2.5.2

Genetic Algorithms ......................................................... 24

2.6 Optimization of Networks Considering Water Hammer ...................... 33 2.7 Summary ............................................................................................... 36

Chapter 3. Theoretical Background ........................................... 37 3.1 Introduction ........................................................................................... 37 3.2 Water Hammer ...................................................................................... 37 3.2.1

Causes of Water Hammer ............................................... 40

3.2.2

Effects of Water Hammer ............................................... 41

3.2.3

Water Hammer Prevention ............................................. 42

3.3 Design Alternatives ............................................................................... 43 3.4 Summary ............................................................................................... 44

Chapter 4. Genetic Algorithms .................................................... 45 4.1 Introduction and Background ................................................................ 45 4.2 The Method ........................................................................................... 46 4.2.1

Overview ......................................................................... 46

4.2.2

Coding ............................................................................. 50

4.2.3

Fitness Function .............................................................. 52

4.2.4

Reproduction ................................................................... 52

4.2.5

Convergence ................................................................... 54

4.3 Comparisons .......................................................................................... 56 4.3.1

Strengths ......................................................................... 56

4.3.2

Weaknesses ..................................................................... 56

4.3.3

Comparison with other Methods .................................... 57

4.4 Suitability .............................................................................................. 60 4.5 Practical Implementation ....................................................................... 60 4.5.1

Fitness Function .............................................................. 60

4.5.2

Fitness Range Problems .................................................. 61

4.5.3

Parent Selection Techniques ........................................... 63

4.5.4

Other Crossovers ............................................................ 67

4.5.5

Inversion and Reordering ............................................... 69

4.5.6

Epistasis .......................................................................... 69

4.5.7

Deception ........................................................................ 70

4.5.8

Mutation and Naive Evolution ....................................... 70

4.5.9

Niche and Speciation ...................................................... 71

4.5.10

Restricted Mating ............................................................ 72

4.5.11

Diploidy and Dominance ................................................ 72

4.6 Micro-Genetic Algorithms .................................................................... 73 4.7 The Need for Optimization in the Water Sector ................................... 74 4.8 Summary ............................................................................................... 77

Chapter 5. Modeling of Network ................................................. 79 5.1 Introduction ........................................................................................... 79 5.2 Optimization of Pipeline Systems ......................................................... 80 5.2.1

Outline of Approach ....................................................... 87

5.2.2

General Assumptions ...................................................... 89

5.3 Transients Analysis in Piping Networks ............................................... 90 5.4 Implementation of Genetic Algorithms over Pipe Network ................. 97 5.5 Key Roles in Design Using a Model ................................................... 103 5.6 Summary ............................................................................................. 104

Chapter 6. Theoretical Examples ................................................ 105 6.1 Introduction ......................................................................................... 105 6.2 Examples ............................................................................................. 105 6.2.1

Example 1: Pump Station Power Failure in a Pipe Network with One Pump .............................................. 108

6.2.2

Example 2: One Pump Power Failure in a Pipe Network with Two Pumps ............................................ 117

6.2.3

Example 3: Alternative Pump Power Failure in a Pipe Network with Two Pumps ............................................ 127

6.2.4

Example 4: Two Pumps Power Failure in a Pipe Network with Two Pumps ............................................ 135

6.2.5

Example 5: Sudden Valve Closure in a Pipe

Network with one Pump ............................................... 142 6.2.6

Example 6: Sudden Valve Closure in a Pipe Network with Two Pumps ............................................ 149

6.2.7

Example 7: Sudden Demand Change in a Pipe Network with Two Pumps ............................................ 156

6.2.8

Example 8: Sudden Demand Change in a Pipe Network without Pumps ............................................... 164

6.3 Conclusions ......................................................................................... 170

Chapter 7. Case Study ................................................................. 173 7.1 Introduction ......................................................................................... 173 7.2 Case Study: Nuweiba Desalinated Water Storage Network ............... 173 7.3 Conclusions ......................................................................................... 185

Chapter 8. Conclusions and Future Work ................................. 187 8.1 Conclusions ......................................................................................... 187 8.2 Future Work ........................................................................................ 189

References ...................................................................................... 191 Appendix A .................................................................................... 201 Arabic Summary ........................................................................... 203

List of Figures Figure No.

Title

Page

2.1

Different methods of optimization of water distribution systems ......... 11

4.1

Standard GA process schematic............................................................. 47

4.2

Standard GA process curve.................................................................... 54

4.3

Two-point crossover ............................................................................. 67

4.4

Uniform crossover.................................................................................. 68

5.1

Valves in a pipeline with constant diameters ........................................ 94

5.2

Genetic algorithm flow chart ................................................................ 98

5.3

Flow chart of the GASTnet program .................................................. 102

6.1

Typical piping network (Example 1) .................................................. 108

6.2

Cost units versus evaluation number for the pump power failure (Example 1) ......................................................................................... 111

6.3

Pressure head versus time for various nodes for the pump power failure (Example 1) .................................................................... 115 - 116

6.4

Typical piping network with two pump stations (Examples 2, 3, 4, 6 and 7) ................................................................................................ 117

6.5

Cost units versus evaluation number for the pump power failure (Example 2) ......................................................................................... 120

I

6.6

Pressure head versus time for various nodes for pump 2 power failure (Example 2) .................................................................... 124 - 126

6.7

Cost units versus evaluation number for the alternative pump power failure (Example 3) .................................................................. 128

6.

Pressure head versus time for various nodes for the alternative pump power failure (Example 3) ............................................... 132 - 134

6.9

Cost units versus evaluation number for the two pumps power failure (Example 4) ............................................................................. 136

6.10

Pressure head versus time for various nodes for the two pumps power failure (Example 4) ......................................................... 139 - 141

6.11

Piping layout (Example 5) .................................................................. 142

6.12

Cost units versus evaluation number for the sudden valve closure (Example 5) ......................................................................................... 144

6.13

Pressure head versus time for various nodes for the sudden valve closure (Example 5) ............................................................................ 148

6.14

Cost units versus evaluation number for the sudden valve closure (Example 6) ......................................................................................... 150

6.15

Pressure head versus time for various nodes for the sudden valve closure (Example 6) ................................................................... 153 - 155

6.16

Cost units versus evaluation number for the sudden demand change (Example 7) ............................................................................ 157

6.17

Pressure head versus time for various nodes for the sudden demand change (Example 7) ...................................................... 161 - 163

II

6.18

Typical piping network for sudden demand change (Example 8) ...... 164

6.19

Cost units versus evaluation number for the sudden demand change (Example 8) ............................................................................ 166

6.20

Pressure head versus time for various nodes for the sudden demand change (Example 8) ............................................................... 169

7.1

Nuweiba desalinated water storage network layout (actual data) ....... 174

7.2

Cost units versus evaluation number for the pump power failure for Nuweiba network ........................................................................... 179

7.3

Pressure head versus time for various nodes before and after optimization................................................................................. 182 - 184

III

List of Tables Table No. 2.1

Title

Page

Literature review of WDS Optimization in steady state (historically arranged) ........................................................................... 18

2.2

Previous optimization studies using GAs (historically arranged) ........ 25

2.3

Literature review of WDS optimization considering water hammer (historically arranged) ........................................................................... 34

4.1

GA process example ............................................................................. 53

6.1

Network pipes unit cost ....................................................................... 106

6.2

Pipe data for the network with one pump station (Example 1) .......... 109

6.3

Pump data for the network with one pump station (Example 1) ........ 109

6.4

Optimal against original diameters (in.) and associated cost for the pump power failure (Example 1) ........................................................ 112

6.5

Pressure heads at nodes for the steady state using the optimal diameters (Example 1) ........................................................................ 113

6.6

Pipes data for the network with two pump stations (Examples 2, 3, 4, 6 and 7) ............................................................................................ 118

6.7

Pumps data for the network with two pump stations (Examples 2, 3, 4, 6 and 7) ........................................................................................ 118

IV

6.8

Optimal against original diameters (in.) and associated cost for the pump power failure (Example 2) ........................................................ 121

6.9

Pressure heads at nodes for the steady state using the optimal diameters (Example 2) ........................................................................ 122

6.10

Optimal against original diameters (in.) and associated cost for the alternative pump power failure (Example 3) ...................................... 129

6.11

Pressure heads at nodes for the steady state using the optimal diameters (Example 3) ........................................................................ 130

6.12

Optimal against original diameters (in.) and associated cost for the two pumps power failure (Example 4) ................................................ 137

6.13

Pressure heads at nodes for the steady state using the optimal diameters (Example 4) ........................................................................ 137

6.14

Pipe data (Example 5) ......................................................................... 143

6.15

Pump data (Example 5) ....................................................................... 143

6.16

Optimal against original diameters (in.) and associated cost for the sudden valve closure (Example 5) ...................................................... 145

6.17

Pressure heads at nodes for the steady state using the optimal diameters (Example 5) ........................................................................ 146

6.18

Optimal against original diameters (in.) and associated cost for the sudden valve closure (Example 6) ...................................................... 151

6.19

Pressure heads at nodes for the steady state using the optimal diameters (Example 6) ........................................................................ 151

V

6.20

Optimal against original diameters (in.) and associated cost for the sudden demand change (Example 7) .................................................. 158

6.21

Pressure heads at nodes for the steady state using the optimal diameters (Example 7) ........................................................................ 159

6.22

Pipe data for sudden demand change (Example 8) ............................. 165

6.23

Optimal against original diameters (in.) and associated cost for the sudden demand change (Example 8) .................................................. 167

6.24

Pressure heads at nodes for the steady state using the optimal diameters (Example 8) ........................................................................ 167

7.1

Nuweiba pipes unit cost ...................................................................... 174

7.2

Pipe data for Nuweiba desalinated water storage network ................. 176

7.3

Nodes and reservoir data for Nuweiba desalinated water storage network ................................................................................................ 176

7.4

Pump data for Nuweiba desalinated water storage network ............... 176

7.5

Pipe data and cost for the case study before optimization .................. 177

7.6

Pressure heads at nodes for the steady state for Nuweiba desalinated water storage network with original diameters ................ 178

7.7

Nuweiba desalinated water storage network optimal diameters (in.) and cost (units) ............................................................................ 180

7.8

Pressure heads at nodes for the steady state Nuweiba desalinated water storage network with optimal diameters ................................... 181

A1

Genetic algorithms parameters used in the calculations of different networks .............................................................................................. 201

VI

Nomenclature a

Wave speed, (ft/s)

A

Cross-sectional area of the pipe, (ft2)

Ad

Area of delivery pipe, (ft2)

c i ( Di )

Cost of pipe i with diameter Di per unit length

C

Pipes constants in the water hammer analysis

Ci

Hazen-Williams roughness coefficient of pipe i

C P − SS

Penalty cost in case of steady state, (units)

C P −WH

Penalty cost in case of water hammer, (units)

C P −WH - MAX Penalty cost in case of water hammer when the pressure head exceeds the maximum allowable pressure head limit, (units)

C P −WH - MIN Penalty cost in case of water hammer when the pressure head decreases below the minimum allowable pressure head limit, (units) CT

Total cost, (units)

Di

Diameter of pipe i, (ft)

Dmax

Maximum diameter, (ft)

Dmin

Minimum diameter, (ft)

Ep

Energy supplied by a pump, (ft)

fi

Darcy-Weisbach friction factor of pipe i

g

Gravitational acceleration, (ft/s2)

hf

Head loss due to friction in a pipe, (ft)

VII

hp

Head delivered by pump, (ft)

H0

Head of the reservoir water surface, (ft)

Hj

Pressure head at node j, (ft)

H max , TR

Maximum allowable pressure head for transient conditions, (ft)

H min, ST

Minimum allowable pressure head at node j for steady state, (ft)

H min,TR

Minimum allowable pressure head for transient conditions, (ft)

HP

Head at a specific point, (ft)

H sump

Pump sump elevation, (ft)

Idum

Initial random number seed for the GA run

ki

Wall roughness height of pipe i, (ft)

KL

Valve loss coefficient

Li

Length of pipe i, (ft)

M

Total number of nodes in the network

Mp

Number of parts into which the pipe is divided

Maxgen

Maximum number of generations to run by the GA

N

Total number of pipes in the network

Np

Pump speed, (r.p.m.)

Npopsiz

Population size of a GA run

Nposibl

Array of integer number of possibilities per parameter

N pu

Number of pumps in parallel

N st

Pump speed at the steady state, (r.p.m.)

VIII

Qi

Fluid discharge in pipe i, (ft3/s)

Qj

Discharge into or out of the node j, (ft3/s)

Re

Reynolds number, = VD / ν

t

Time, (s)

T

Time span, (s)

V

Velocity, (ft/s)

VP

Velocity at a specific point, (ft/s)

x

Distance along the pipe axis, (ft)

Z

Objective function

Greek Symbols ∆t

Time step, (s) Kinematic viscosity, (ft2/s)

IX

Abbreviations ACCOL

Adaptive Cluster Covering with Local Search

DP

Dynamic Programming

F.E.N.

Function Evaluation Number

GA

Genetic Algorithm

GANRnet

Genetic Algorithm Newton-Raphson network

GASTnet

Genetic Algorithm Steady Transient network

LP

Linear Programming

NLP

Nonlinear Programming

NYC

New York City

PSO

Particle Swarm Optimization

SA

Simulated Annealing

SGA

Simple Genetic Algorithm

WDS

Water Distribution Systems

µGA

micro-Genetic Algorithm

X

1

INTRODUCTION

1.1

Introduction Potable water distribution networks are became of the importance in the

social life. They play the major role in the industry advance and also to meet the increasing demands of growing communities, most of the potable water makers are facing the complex task of supplying the additional resource in the most economical and cost effective way possible. Also the same is applicable for new developments, though the complexities are fewer when designing the entire system from ‘scratch’. The wide range of possible, and sensible, combinations of pipe materials, routes and diameters; treatment works, reservoirs and pumping stations locations and capacities; etc. make the task irresistible. Added to this are the operational parameters which have significant impact on whole life costs: pressure zone boundaries; control valve settings; pump operating schedules etc. While a common sense approach can dismiss many of the possible combinations as being unrealistic or uneconomical, the maximum number of remaining combinations requires the application of advanced numerical techniques to narrow the search for the most optimal solutions.

1

Genetic Algorithms (GA’s) are search methods stimulated by nature. They are based on principles of natural selection and genetics. Since their inception, significant progress has been made in various aspects of GA’s. GA’s have successfully solved complex real-world problems where traditional search procedures either failed or performed badly. Lots of work has been made to provide a better contribution in the development of GA’s and its operators. Design techniques have been suggested for development of GA’s and much progress has been made along these lines, Goldberg (1989). GA is called competent if it can solve hard problems quickly, accurately, and reliably. In real meaning, competent GA’s take problems those were intractable with the first generation GA’s and render them tractable. Competent GA’s successfully solve problems with bounded difficulty oftentimes requiring only a sub-quadratic (polynomial) number of function evaluations. However, for large scale problems, the task of computing even a sub-quadratic number of function evaluations can be crushing. This is particularly the case if the fitness evaluation is a complex simulation, model or computation. A FORTRAN program initializes a random sample of individuals with different parameters to be optimized using the genetic algorithm approach, i.e. evolution via survival of the fittest the selection scheme used is tournament selection with a mutation technique for choosing random pairs for mating. The routine includes binary coding for the individuals mutation, reproduction and crossover.

2

The selection of distribution system facilities is usually based on the results of hydraulic analysis. The outputs of the analysis such as the node pressures and flow velocities are compared to the minimum pressure at the nodes and the maximum allowable velocity requirements. Adjustments to design variables (such as pipe sizes), are made until all requirements are satisfied. Genetic Algorithms automate the adjustment process, performing several hydraulic analyses in a directed search for the lowest cost combination of design variables that satisfy the requirements. The application of GA' s for pipe network optimization has been applied to the steady state and recently to the transient conditions. It is well known that water hammer in pipelines may shake the pipeline system or damage the equipment, even causing serious accident, and it is a headache problem. Water hammer is usually resulted from abnormally shutting down pump, quickly opening or closing valve, sudden demand change, wrong operation, etc. The strong surge will propagate along the pipeline and endanger running safety, Bhave (1985). To solve the problem, on one hand, there are numerous techniques for controlling transients in water distribution systems. These include design considerations (pipe strengthening, larger diameter pipes utilization, and pipe material changing), operational considerations (valve opening and closing times adjustment, increasing pump inertia by adding a flywheel) and employing surge control devices (relief valves, check valves, bypass devices, surge tanks and air chambers).

3

On the other hand, the water hammer damages can be reduced or prevented when the initial water system design is examined numerically under the transient conditions. This can be achieved by integrating water hammer analysis with the design of an optimum pipe size for a pumping associated system.

1.2

Objectives of the Present Study The objective of the study is the development of software to perform the

hydraulic simulation and the optimization of water distribution systems under the water hammer event. The specific objectives of the study are: 1- Study the different optimization techniques. 2- Evaluation of the software performance to achieve optimization for water distribution systems using the genetic algorithms under water hammer event. 3- Applications of the software to different theoretical examples and Nuweiba desalinated water storage network as an actual case study. The developed software is called GASTnet program (Genetic Algorithm Steady Transient network) and it uses an adaptive penalty method which increases the performance of genetic algorithms.

4

Applications of GASTnet on water networks including water tanks and pumps show its capability and suitability to such water networks optimization under the steady state and water hammer conditions.

1.3

Thesis Organization This thesis is organized into eight chapters which correspond to the

decomposition used in the research. First, the literature review of the previous studies carried out in the field of water distribution system design and optimization in the steady and transient states is presented in Chapter 2. Chapter 3 presents a summary of theoretical background on water hammer in pipe networks. An overview of different causes of water hammer will be introduced with its effects on piping and alternative methods of prevention. Chapter 4 presents a theoretical background on the genetic algorithms, methods, parameters, comparison with other optimization techniques, suitability and practical implementation over real world problems. The major features of genetic algorithms are introduced. In Chapter 5 a model of pipe network is used taking into consideration the assumptions used, the governing equations and transient calculations in pipe networks.

5

Chapter 6 applies the study program on eight theoretical examples with different reasons for water hammer event. The occurrence of the water hammer event and its elimination by the proper selection of the network pipes diameters are discussed. Chapter 7 applies the study program on an actual real-world case study, which is Nuweiba desalination piping network; the discussion will include the occurrence of the water hammer event and the way to eliminate such event by the proper selection of the network pipes diameters. The case study is to validate and prove the program reliability. Finally, Chapter 8 contains the study conclusions and ideas for future research, in order to get the most benefit from the study in some other areas of life.

6

2

LITERATURE REVIEW

2.1 Introduction The design of reliable hydraulic networks is considered as a significant problem in the modern industry. An important stage of network design is to find the optimum network layout with requirements satisfaction such as pressure, power consumption and demands at different nodes and also to minimize cost while meeting a performance criterion. This chapter introduces a brief review of the most published papers and researches, which dealt with the water hammer phenomenon in pipeline networks and optimization in network design separately.

2.2 Literature Review of Water Hammer It is very difficult to find out the establishment of the study of unsteady flow analysis in piping networks; it certainly dates back to the early in the nineteenth century. However, water hammer analysis history is more readily documented. Some of the earliest work, according to Wood (1970), was when Wilhelm Weber in the 1850s measured the effects of pipe wall elasticity on

7

wave propagation speed. He also developed the continuity and fluid dynamic equations, which were the basis for later analytical studies. In 1878, Jules Michaud was the first one who was experimentally dealt with water hammer phenomenon using air chambers and pressure relief valves in pipelines to reduce the effects of sudden gate or valve closures, Wood (1970). In 1883, Grameka published an analysis showing the effects of friction but he was unable to solve the equations. It is less difficult to identify the beginnings of water hammer phenomenon analysis, wherein fluid and pipe elasticity is of the importance in the computation of water hammer pressure. According to Rouse and Ince (1963), Nicolai Joukowsky in 1898 was clearly the first to show that the pressure rise in a water pipeline was related to the change in flow velocity, the wave speed, and the fluid density. However, Wood (1970) states that in another study, Frizell in 1897 conducted an analysis of the effect of water hammer pressures on speed regulation of a hydroelectric plant turbine in Ogden, Utah, USA. Apparently, without knowledge of European work, he developed his own wave speed and pressure equations for sudden valve closure. He also noted that the effect of branched lines and wave reflection including the relationship between gate closure time and wave period. Nicolai Joukowsky in Moscow published a report of his analytical and experimental studies of water hammer. Nicolai Joukowsky was familiar with

8

earlier works achieved in that field. He derived equations for wave speed and pressure increase and considered the effect of pressure wave propagation on small diameter pipes, wave reflection from open ended pipes, the relationship between gate closure time and wave period, effects of air chambers on pipes, and the use of spring-controlled surge valves. In brief, Joukowsky would be considered as one of the main water hammer researchers. In 1913, another water hammer researcher was Lorenzo Allievi, who developed a mathematical and graphical methodology in water hammer analysis, Rouse and Ince (1963). Lorenzo methodology was the foundation for further developments in the field of water hammer for more than 50 years later. In the early twenties century, Joukowsky and Allievi earlier works were applied to solve the water hammer problems. Lots of Frizell's researches in that field were significantly ignored. In the field of water hammer analysis a very important parameter was ignored in the previous works, which is the friction. In the 1930s, friction was included in the analysis of water hammer problems and the First Symposium of Water Hammer was held in Chicago, USA in 1933. The Symposium topics were high-head penstocks, compound pipes, surge tanks, centrifugal pump installations with air chambers, and surge relief valves.

9

The Second Water Hammer Conference was held in New York in 1937, with strong presence of European researchers as well as Americans. Papers on air chambers, surge valves, water hammer in centrifugal pump lines, and effects of friction on turbine governing were presented in that Symposium. In the 1960s decade and the introduction of the high-speed digital computers assisted in solving lots of real-world water hammer problems. Wylie et al. (1993) applied the computer programming to introduce the water hammer problems in a complete and comprehensive way. Largely, they opened the door to the engineering profession to consider water hammer analysis as part of normal design procedures. In this way, Victor Streeter was ranked along with Allievi and Joukowsky as one of the outstanding contributors in water hammer history. Today, the emphasis on unsteady flow analysis is almost exclusively concentrated on computer applications. Since the appearance of Wylie et al.'s (1993) book, several others have appeared.

10

2.3 Optimization Techniques The optimization techniques can be classified into two main branches as indicated in Fig. 2.1: deterministic optimization techniques (linear programming, non-linear programming, and dynamic programming) and stochastic optimization techniques (simulated annealing and genetic algorithms).

O p tim iza tion T ec h niq u es

D e ter m inistic

S toc h a stic

L in e ar

G e ne tic A lg or ith m s

N on -L in e ar

S im u lated A n n e a lin g

D yn a m ic

S h u ffled C om p le x

Fig. 2.1 Different methods of optimization of water distribution systems

In this chapter an outline of some basic techniques involving deterministic algorithms for finding local minimum of multivariable functions whose influence are continuous and on which no restrictions are imposed. For

11

constrained problems, techniques are based on those for unconstrained problems. It should be emphasized that finding the global minimum is an entirely different, and more challenging, problem which will not be addressed here. Basically, stochastic methods are better suited at this time for large-scale global optimization.

2.3.1 Deterministic Techniques (Linear Programming, Non-Linear Programming and Dynamic Programming) Linear Programming (LP), Non-Linear Programming (NLP) and Dynamic Programming (DP) are considered of the optimization tools in water distribution systems which were first described by a lot of authors since 1966. The basic idea has been integrated into standard textbooks, and has been used by other authors in developing for applications. Linear and nonlinear programming refers, broadly speaking, to the area of applied mathematics dealing with the following problem: find numerical values for a given set of variables so that they are feasible (i.e., they satisfy certain constraints, typically given by equalities or inequalities) and also a certain criterion, called objective function, which depends on such variables, is optimized, that is it attains its minimum value among all the combination of feasible variables. Unlike classical problems of applied mathematics, most of which originate in physics, linear and nonlinear programming problems generally lack solutions given by closed formulae, and must be solved

12

through numerical procedures, called algorithms, performed on computers. Different features of the problem data (e.g., linearity or nonlinearity of the objective function and the constraints) call for different methods in order to achieve efficient solution of the problem. The design of such algorithms and the analysis of their performance are the backbone of the theoretical side of the area. On the practical side, the ability of these methods to solve very large problems (i.e., with a large number of variables) has allowed for the modeling of highly realistic and detailed real life situations, so that nowadays these methods are routinely applied to the day-to-day execution of complex tasks in a wide range of activities. 2.3.2 Stochastic Techniques (Genetic Algorithms, Simulated Annealing and Shuffled Complex Evolution) Genetic algorithms are a power search technique based on mechanics of population genetics; Chapter 4 explains Genetic Algorithms in more details. Simulated Annealing combines between the steepest descent philosophy and the variable behavior within solution process, Cunha and Sousa (1999). Shuffled Complex Evolution deals with a set of population of points and searches in all directions within the feasible space based on objective function, Liong and Atiquzzaman (2004).

13

2.3.3 Enumeration Approach The enumeration approach entails the exploration of all of the possible system configurations and layouts to ensure that the optimum solution has been found and met in the design of the piping networks with full consideration of all the elements that influence the system performance and cost. So, a global set of design components, including transient control devices, must be explored. The enumeration process involves the following steps: • Development of all feasible designs for the given components under consideration. • Simulate the performance of the different designs. • Evaluate their performance. • If the designs are feasible, determine their costs. • Selecting the least-cost design from population of feasible designs.

2.4 Optimization of Pipe Networks Generally speaking, the optimization terminology means the analysis of any problem aimed to get better results. Optimization here means achieving the best possible solution for a particular objective, such as minimum cost for design and operation. The practical experience with optimization of water distribution networks is less than network analysis and simulation.

14

In order to recognize the optimal solution for water distribution systems, lots of researchers have anticipated the use of numerical programming techniques. Usually, optimal solution means minimum cost of the original piping network. 2.4.1 Design Components A water distribution network is a system containing pipes, reservoirs, pumps and valves, which are connected to each other to purpose of water provision to consumers. It is an essential component of the urban infrastructure and requires significant investment. The problem of optimal design of water distribution networks has various aspects to be considered such as hydraulics, reliability, material availability, water quality and demand patterns. Even though each of these factors has its own part in the planning, design and management of the system and despite their inherent dependence, it is difficult to carry out the overall analysis. Previous researches indicate that the formulation of the problem on a component basis is worth doing. In the present study, we will deal with the determination of the optimal design of pipes in a network considering water hammer with a predetermined layout. This includes providing the minimum pressure and water demands at each node. An appropriate interface is created between a global optimization tool with genetic algorithms, and a network simulation model such as NewtonRaphson techniques for equations solving, Eiger et al. (1994) and Sonak and Bhave (1993).

15

'Optimization' problems (for water distribution systems) arise when it is desired to solve the design problem at minimum total cost (usually discounted present value), subject to a set of practical constraints such as maximum and (or) minimum operating pressures, minimum pipe diameters, and use of a discrete set of commercially available pipe sizes. The design or optimization problem can be stated as: Minimize: Capital Investment Cost + Operating Costs (e.g., energy, maintenance, etc.) Subject to: 1. Hydraulic constraints 2. Meeting a minimum level of water demand 3. Maintaining reasonable pressures 4. Satisfying the conservation of flow and energy constraints 5. Budget constraints The objective function comprises both decision variables and cost functions. The decision variables define the characteristics of each hydraulic component in the design such as diameters of the pipes, pipe thicknesses, and tank volumes or elevations, the objective function may be either linear or nonlinear, allowing for various types of components to be designed. Each component to be designed will have a term associated with it in the objective; so, the formulation allows for variation of cost equations to account for sitespecific costs such as material and installation costs. In addition, the

16

operating costs, maintenance and replacement cost should be "converted into present value" for inclusion into the cost function.

2.5. Literature Review of Optimization Techniques 2.5.1 Deterministic Optimization Techniques Table 2.1 briefs the previous literatures involved in the branch of numerical optimization of piping networks using linear techniques, details on the same will be deliberately mentioned in the following paragraphs. The design of water distribution networks has focused on mathematical approaches including linear, nonlinear, and dynamic programming (Bhave (1985); Alperovits and Shamir (1977); Quindry et al. (1981); Schaake and Lai (1969)). On the other hand, these deterministic methods can not assure a global optimum solution. Also, they necessitate that the functions satisfy certain limiting conditions that cannot be generally assured for a WDS. Various researchers have addressed the problem of network design without considering water hammer in a number of different ways. Schaake and Lai (1969) focused in their studies on the mathematical approaches specifically. They used the linear programming in the design of the water distribution systems; however, these deterministic techniques can not guarantee a global optimal solution as proven in past few years and as explained later in this thesis.

17

Table 2.1 Literature review of WDS optimization in steady state (historically arranged) Author Schaake and Lai Deb and Sarkar Swamee and Khanna Alperovits and Shamir Quindry et al. Featherstone and ElJumaily Bhave

Year 1969 1971 1974 1977 1981

Optimization tool LP, NLP & DP LP, NLP & DP LP, NLP & DP LP, NLP & DP LP, NLP & DP

1983

NLP

1985

Cenedese et al.

1987

LP, NLP & DP Multi-objective reduced gradient

Fujiwara and Dey

1987

LP

Fujiwara et al. Fujiwara and Dey Kessler and Shamir Lansey and Mays Fujiwara and Khang Bhave and Sonak

1987 1988 1989 1989 1990 1992

Eiger et al.

1994

Samani and Naeeni

1996

Taher and Labadi

1996

Modified LPG Lagrange multipliers LPG Generalized reduced gradient 2-phase decomposition LPG Non smooth optimization & duality theory NLP Franke-Wolfe algorithms using GIS

Berghout and Kuczera

1997

Iterative network NLP

Sârbu and Borza

1997

LP

Sakarya and Mays

2000

Generalized reduced gradient

Djebedjian et al.

2000

Luong and Nagarur

2001

NLP coupled with NewtonRaphson method Semi-Markov process

Area of Concern Design of WDS Design of WDS Design of WDS Design of WDS Design of WDS Design of WDS Design of WDS Closed hydraulic networks with pumping stations Two adjacent pipe diameters in water distribution system Looped WDS Water distribution network 2-loop network Water distribution networks Water distribution networks Two and One loop networks 2-loop, Hanoi and Real networks Water distribution networks City of Greeley, Colo water distribution network Pressure reducing valve network Looped water distribution networks Water distribution pumps considering water quality Design of WDS WDS

LP- Linear Programming, NLP- Nonlinear Programming, DP- Dynamic-Programming, PSO- Particle Swarm Optimization and WDS- Water Distribution Systems.

18

The equivalent pipe diameter method for network optimization has been developed by Deb and Sarkar (1971) using the pressure surface profile capital cost functions for pipes, pumps, and reservoirs. Swamee and Khanna (1974) have shown that this method has two major drawbacks: first it lacks mathematical justification for cost equivalent pipes; and second, a hydraulic pressure surface over the network must be artificially created. Most of the work on the design of water distribution networks has focused on developing optimization procedures for the least cost pipe-sizing problem. Linear programming is used to optimize the design of pipe networks. Two principal approaches have been developed by Alperovits and Shamir (1977) and Quindry et al. (1981). Alperovits and Shamir’s (1977) approach has the ability to consider various components in a distribution network, however it is severely limited in the size of the system and the number of loads which it can handle. Quindry et al. (1981) improved the method allowing for a larger system to be considered, but difficulties arose when analyzing multiple loads. The limitation of this method is that it considers only pipe portion, it does not consider any other component as pump, reservoir, etc. For looped networks, Featherstone and El-Jumaily (1983) presented a method to get the minimum cost of the network by equating the first derivative of the total cost equation with zero.

19

Bhave (1985) applied a simple iterative procedure based on the identification of an efficient branched configuration. The nodal heads for the branched configuration were treated as the design variables, and were initially taken so that each existing link needs strengthening by a new pipe parallel to the existing one, then given the maximum reduction in system cost. Cenedese et al. (1987) applied a mathematical approach with multi objective analysis to select the optimal solution for the hydraulic networks. Fujiwara and Dey (1987) proved that at the optimal solution each link will not consist of at most two pipe segments with adjacent diameters as previously stated by other investigators but a given set of pipe diameters is an optimal solution and as a special case showed that the adjacency property holds if and only if pipe costs were a strictly convex function of a power of pipe diameters. Fujiwara et al. (1987) modified the linear programming gradient (LPG) method developed by Alperovits and Shamir (1977). A quasi-Newton search direction was used instead of the steepest descent direction, and the step size was determined by a backtracking line search method instead of a fixed step size. The modified method was applied to a numerical example and the results showed an improved solution in comparison to the original LPG method.

20

Fujiwara and Dey (1988) presented a method for design branched networks on flat terrain by using the Lagrange multipliers method to obtain optimal pipe size, this method is limited to branched networks location flat terrain with a single source node and equal head for each end node. Kessler and Shamir (1989) used linear programming gradient (LPG) as an extension of the method proposed by Alperovits and Shamir (1977). It consists of two stages: LP problem is solved for a given flow distribution and then a search is conducted in the space of flow variables. Later, Fujiwara and Khang (1990) used a two-phase decomposition method extending that of Alperovits and Shamir (1977) to non-linear modeling. Lansey and Mays (1989) presented a chance constrained model for the minimum cost design of water distribution networks. Their methodology attempted to account for the uncertainties in required demands, required pressure heads, and pipe roughness coefficients. The optimization problem was formulated as a nonlinear programming model which was solved using a generalized reduced gradient method. Bhave and Sonak (1992) proved that the global optimal solution to a pipe network could be obtained by simplifying the network by canceling some pipes (smaller diameter branches). Therefore, the network can be optimized using the linear programming approach, in this case the solution has become similar to Alperovits and Shamir (1977) approach.

21

Eiger et al. (1994) used the linear programming gradient (LPG) method as an extension of Alperovits and Shamir (1977) approach. Their approach led to the determination of lengths of one or more segments in each link with discrete diameters. Samani and Naeeni (1996) proposed a non-linear optimization technique coupled with the Newton-Raphson method to minimize the design total cost with constraints in pipe diameters, flow velocities and nodal pressures. Taher and Labadie (1996) presented a prototype decision support system WADSOP (Water Distribution System Optimization Program) to guide water distribution system design and analysis in response to changing water demands, timing, and use patterns; and accommodation of new developments. Berghout and Kuczera (1997) developed an iterative network linear programming (NLP) algorithm for the hydraulic analysis of water networks. The new iterative technique used successive linear approximation to the nonlinear head loss equations. The use of the primal dual and simplex NLP solvers in a hybrid scheme has reduced solution time to one-tenth of the solution time using the simplex NLP solver alone. A highly accurate solution was obtained using a smaller number of linear segments to represent each link content function. Sârbu and Borza (1997) proposed a mathematical model and a numerical procedure for designing a pipe line network. The numerical procedure was

22

developed for the purpose of computer simulation of natural gas line network based on the non-linear system of equations. Sakarya and Mays (2000) developed new methodology for shaping the optimal operation of water distribution system pumps and water quality considerations. The solution methodology was based upon a mathematical programming approach resulted in a large-scale nonlinear programming problem that could not be solved using existing nonlinear codes. Djebedjian et al. (2000) investigated the optimization of water distribution systems in the steady state. They developed a mathematical model to design and evaluate the optimum network configuration in the steady state. The model was a non-linear programming and the Newton-Raphson method was used to solve the network equations. Luong and Nagarur (2001) used a semi-Markov process to depict the behavior of the pipe, and replacement ages of the pipe in each of its deteriorating stages were taken as the decision variables. The original nonlinear problem resulted from model formulation was converted to a linear problem by some simple transformations, and then numerical experiments were conducted to illustrate the applicability of the proposed model.

23

2.5.2 Genetic Algorithms From the beginning of 1990's, methodologies for the application of genetic algorithms (GAs) to the optimal design of water distribution network have been developed and published; Table 2.2 indicates the hierarchy researches developed using the GA technique. Recently, the Genetic Algorithm (GA) has been a popular optimization choice for solving problems that are difficult for traditional deterministic optimization methods (Goldberg (1989); Simpson et al. (1994); and Dandy et al. (1996)). The main advantage of GA is its ability to find the global optimum by using function values only. Goldberg (1989) applied genetic algorithms in the problem of pipe network optimization. Then Simpson et al. (1994) and Goldberg (1994) applied both simple genetic algorithm (SGA) and improved GA, with a variety of enhancements based on the nature of the problem, and reported talented solutions for problems from literature. Some problems associated with GA’s are the doubt of termination of the search like all random search methods, the absence of guarantee for the global optimum.

24

Table 2.2. Previous optimization studies using GAs (historically arranged)

Goldberg

1989

Optimization Method GA

Simpson et al.

1994

SGA

Dandy et al.

1996

Savic and Walters

1997

GAnet

Reis et al.

1997

Simple GAs

Control valves in a WDS

Wu and Simpson

1997

Messy GAs

Two tanks, NYC & Moroccan networks

Castillo and González

1998

GAs

Examples

Murphy et al.

1998

GAs

Layout of Jamestown system

Abebe and Solomatine

1998

GA

2-loop and Hanoi networks

Gupta et al.

1999

GAs

2-loop network and network

Lippai et al.

1999

GA

New York tunnel problem

Wardlaw and Sharif

1999

GAs

Four and Ten reservoir system

Vairavamoorthy and Ali

2000

GAs

Hanoi and New York networks

Morley et al.

2001

GAnet

Dandy and Engelhardt

2001

Abdel-Gawad

2001

Wu and Simpson

2002

Messy GA

van Vuuren

2002

GAs

van Zyl et al.

2004

Hybrid GA

Richmond WDS

Keedwell and Khu

2005

Hybrid GA

2-loop, A and B networks

Yu et al.

2005

Authors

Year

Application Pipe network optimization Pipe network optimization

Improved GAs New York network 2-loop, NYC and Hanoi networks

Open Net class hierarchy Rehabilitation of Water supply pipes in GAs metropolitan Adelaide Improved GAs NYC water supply tunnels NYC water supply tunnels Examples

Djebedjian et al.

2005b, 2006b

Djebedjian et al.

2006a

GA and SA New adaptive penalty method for GA GA

Djebedjian et al.

2007

GA

Hypothetical WDS WDS in steady state Design of WDS in steady state WDS in steady state

25

Dandy et al. (1996) developed an improved genetic algorithm formulation for pipe network optimization by using variable power scaling of the fitness function. The exponent introduced into the fitness function was increased in magnitude as the genetic algorithm computer run proceeds. In addition to the more commonly used bitwise mutation operator, an adjacency or creeping mutation operator was introduced. The application of the improved genetic algorithm formulation on the NYC tunnels indicated significantly better performance than the traditional GA formulation. Savic and Walters (1997) developed a computer model GAnet which involved the application of standard genetic algorithm for the solution of nonlinear optimization problems. The application of the model to two networks, one for new design (two-loop network) and the other for rehabilitation of existing system (NYC water supply tunnels expansion problem) illustrated the potential of GAnet as a tool for water distribution network planning and management. Wu and Simpson (1997) compared different genetic-based search paradigms including the standard genetic algorithm, the messy genetic algorithm, and the fast messy genetic algorithm for discrete optimization of pipeline networks. The application of the different genetic-based search techniques to optimization of pipeline problem indicated that the fast messy genetic algorithm was the most efficient algorithm among the genetic-based search paradigms and thus provided a promising optimization algorithm for solving highly dimensional discrete optimization problems.

26

Reis et al. (1997) applied the genetic algorithm on a 37-pipe network to determine the appropriate location of three control valves and their settings to obtain maximum leakage reduction, as the objective function, for given nodal demands and reservoir levels. An optimal solution was reached in around 10 generations. Castillo and González (1998) applied genetic algorithm on a 16 nodes pipe network to find an optimal network features using a new problem-specific genetic operator. The final solution was feasible rather than optimal. Murphy et al. (1998) applied the genetic algorithm to the Jamestown system expansion plan, Australia, to find alternative feasible combinations of new facilities given the constraints imposed on the system. Abebe and Solomatine (1998) determined the optimal diameters of pipes in a network with a predetermined layout. The global optimization tool GLOBE with various random search algorithms and the network simulation model EPANET that can handle steady as well as dynamic loading conditions were used. The Hanoi network which contains 34 pipes, 31 demand nodes and a reservoir was used as a case study. GAs found the solution with lower 10% cost than Adaptive Cluster Covering with Local Search (ACCOL), but required 3 to 5 times more function evaluations (model runs).

27

Gupta et al. (1999) compared the genetic algorithm with the nonlinear programming technique based on interior penalty function with the DavidonFletcher-Powell method in the design of water distribution systems. Lippai et al. (1999) demonstrated a robust analysis and optimization of a water distribution network with four commercial optimizers. Intelligent search algorithms have very robust method for doing the optimization that retains the reality of the system. Intelligent search algorithms are robust in the sense that they can handle any kind of mathematical relationships, including lookup tables, and they can deal with discontinuities, nonconvexity, and other problems. Wardlaw and Sharif (1999) applied the genetic algorithm for optimal fourreservoir system operation. They concluded that the most promising genetic algorithm approach comprises real-value coding, tournament selection, uniform crossover, and modified uniform mutation. For more complex reservoir systems, the genetic algorithm approach proved to be robust and easily applied than stochastic dynamic programming. Vairavamoorthy and Ali (2000) used genetic algorithm with strings coded by real values to avoid the problem of redundant states often found when using binary and Gray coding schemes, a fitness function which incorporated a variable penalty coefficient that depended on the degree of violation of the pressure constraints. The method did not require solution of the nonlinear equations governing the flows and pressures in the distribution system for each

28

individual member within the population. The application of the method on several networks showed a significant advantage compared with previously published techniques in terms of computational efficiency. Morley et al. (2001) described an architecture for an integrated optimization application, GAnet, which comprised a GA application, a geographic information system GIS, and the EPANET hydraulic network solver. Dandy and Engelhardt (2001) demonstrated the use of the genetic algorithm technique to find a near optimal schedule for the replacement of the water supply pipes by minimizing the present value of capital, repair, and damage costs. The application of the model on a case study in Adelaide, Australia showed that the genetic algorithm could be a powerful tool to assist in planning the rehabilitation of water pipes. Abdel-Gawad (2001) tested several alternative formulations of genetic algorithm on the New York City water supply expansion. The results showed that the most promising improved genetic algorithm approach for optimal design of pipe network problem comprises real-value coding, tournament selection, uniform crossover, and modified uniform mutation. Wu and Simpson (2002) introduced the self-adaptive boundary search strategy for selection of penalty factor within genetic algorithm optimization. The approach co-evolved and self-adapted the penalty factor such that the genetic algorithm search was guided towards and preserved around constraint

29

boundaries. The strategy was tested on the NYC water tunnels problem and successfully found the least cost solution more effectively than a GA without the boundary search strategy. As a consequence, a reliable least cost solution was guaranteed for the GA optimization of a water distribution system. Van Vuuren (2002) developed a utility program (GAPOP) to demonstrate the application of GAs in the determination of the optimal pipe diameter in South Africa. He concluded that GAs were potentially applied to hydrology and water resources assessment, network optimization, optimization of rehabilitation, extension and upgrading of distribution networks, and operation and maintenance scheduling of pumps and purification plants. Van Zyl et al. (2004) based on the fact that genetic algorithm had good initial convergence characteristics, but slow down considerably once the region of optimal solution had been identified, improved the efficiency of genetic algorithm operational optimization through a hybrid method which combined the GA method with a hill climber search strategy which complement GAs by being efficient in finding a local optimum. Two hill climber strategies were used, Hooke and Jeeves and Fibonacci methods. Upon an application on a hypothetical as well as an existing network in U.K., the hybrid method performed significantly better than the pure GA method, both in convergence speed and in the quality of the reached solutions.

30

Keedwell and Khu (2005) proposed a novel method, known as CANDA-GA, which used a heuristic-based, local representative cellular automata approach which provided a good initial population for genetic algorithm runs. The model performed well on large water distribution network problems, between 632 and 1277 pipes with no additional computational requirements. Yu et al. (2005) introduced genetic algorithm combined with simulated annealing technology and self-adaptive crossover and mutation probabilities to deal with optimal allocation of water supply between pump-sources. Pumpstation pressure head and initial tank water levels were considered as decision variables. The simulated annealing technology was combined with genetic algorithm to overcome premature convergence of the genetic algorithm. Djebedjian et al. (2005b, 2006b) introduced a new adaptive penalty method for genetic algorithms. The model was applied to the two-loop network problem and the Hanoi network and the results showed that the least cost solution was obtained in a favorable number of function evaluations and was computationally much faster when compared to other studies. Djebedjian et al. (2006a) applied the genetic algorithm along with the Newton method and the H-equations for hydraulic simulation to optimize pipe diameters of a large scale water distribution system. The numerical code was also capable of evaluating the network cost and was practically tested by application to the 389 pipe network of Suez City including 3 pumps and 3 reservoirs. The model

31

showed attractive ability to handle the large scale pipe network optimization problems efficiently. Djebedjian et al. (2007) introduced the evaluation of capacity reliability-based and uncertainty-based optimization in the water distribution systems. The two approaches link the genetic algorithm (GA) as an optimization tool, NewtonRaphson technique as hydraulic simulation solver with the chance constraint in case of uncertainty-based or with Monte Carlo simulation in case of reliabilitybased optimization. For the first approach, optimal network design constrained by reliability for water distribution system analysis was formulated as an optimization problem under uncertainty. The optimal design problem was formulated as a chance constraint minimization problem restricted with a prespecified level of uncertainty. The reliability of the system was then evaluated for the least-cost design of the network using the Monte Carlo simulation. The second approach used the Monte Carlo simulation to estimate network capacity reliability. The previous literature review reveals the appropriateness of the GA as an optimization technique to lever small and large-scale WDS and to minimize the cost irrespective of the water hammer phenomenon, the subsequent section will provide the literature review of the optimization techniques considering the water hammer in WDS.

32

2.6 Optimization of Networks Considering Water Hammer The optimization of pipe networks under steady flow conditions has been studied and various researchers have proposed the use of mathematical programming techniques in order to identify the optimal solution for water distribution systems. However, these deterministic methods can not guarantee a global optimal solution. Also, they require that the functions satisfy certain restrictive conditions (e.g., continuity, differentiability to the second order, etc.) that cannot be generally guaranteed for a water distribution system. The dilemma of piping network designs have been addressed by a range of researchers without considering the occurrence of water hammer event, they addressed the same in different ways during the past decades. The perception of network optimization in steady state analysis linked to the consequences of water hammer is recently examined. Few water network optimization approaches have been achieved. Table 2.3 outlines the researches made in the area of WDS optimization considering water hammer. Laine and Karney (1997) studied the event of water hammer in a simple pipeline. Zhang (1999) studied the fluid transients and pipeline optimization using Genetic Algorithms. Kaya and Güney (2000) studied the same for sprinkler irrigation systems.

33

Table 2.3 Literature review of WDS optimization considering water hammer (historically arranged) Authors

Year

Laine and Karney

1997

Optimization tool GA

Zhang

1999

GA

Kaya and Güney

2000

Dynamic Programming

Jung and Karney

2003

GA, PSO

Optimum selection of hydraulic devices

Jung and Karney

2004a

GA, PSO

Design of WDS in steady and transient states

Jung and Karney

2004b

GA, PSO

Design of WDS in steady and transient states

Djebedjian et al.

2005a

GA

Design of WDS in steady and transient states

Djebedjian

2006

GA

Reliability-based optimization of WDS for steady and transient states

Area of Concern Simple pipeline Design of WDS in steady and transient states Sprinkler irrigation system

Jung and Karney (2003) studied the optimum selection of hydraulic devices for water hammer control in the pipeline systems using Genetic Algorithm. Jung and Karney (2004a) studied the optimal selection of pipe diameters in a network considering steady state and transient analysis in water distribution systems by using Genetic Algorithm (GA) and Particle Swarm Optimization (PSO). Jung and Karney (2004b) studied the pipeline optimization by selecting, sizing and placement for hydraulic devices in pipeline systems considering the occurrence of water hammer event.

34

Djebedjian et al. (2005a) studied the water distribution systems in both steady and transient (water hammer) states. They developed a numerical technique to analyze the network in the steady and transient states and select the optimum solution to overcome the different water hammer events using genetic algorithms. They linked between the hydraulic network solver (NewtonRaphson), transient analyzer and genetic algorithm as an optimization tool. The model was applied successfully on a network under water hammer event caused by pump station power failure. The model was based on selecting the proper (optimum) pipes sizes from a range of the available pipe sizes, which satisfied the network requirements such as pressure heads, demands and pressure limits for water hammer. This approach provided the opportunity for potential savings in costs. Djebedjian (2006) studied the reliability-based optimization of potable water networks by selecting the optimal pipe diameters for water hammer under hydraulic reliability. Genetic Algorithm (GA) as an optimization tool has been linked with the Monte Carlo Simulation for estimating network capacity reliability and node capacity reliability. The previous literature review demonstrates the suitability of the Genetic Algorithms as an optimization technique to handle small and large-scale water distribution systems and to minimize the cost in the steady state.

35

2.7 Summary From the previous literature review, it is noted that the water hammer phenomenon was rarely included in the optimization of pipe networks systems. Moreover, all published papers focus on two separate extremes only, optimization in designing and planning of water distribution systems without considering water hammer event and the other one is water hammer event in water distribution systems. This research will link between these two extremes, studying water hammer phenomenon in piping distribution systems, using optimization. In the present work, the Genetic Algorithm is applied for pipe networks as an optimization tool. This optimization of water distribution systems is done by selecting the optimum set of diameters which minimize the cost and fulfill the network requirements.

36

3

THEORETICAL BACKGROUND

3.1 Introduction Literature review was introduced in Chapter 2, the researches that concern the subject has been carefully reviewed and introduced. In this chapter the theoretical background of water hammer and also about the optimization methods will be presented and special attention is focused on the genetic algorithms as it is considered the tool for optimization.

3.2 Water Hammer As per Wylie et al. (1993) definition, water hammer is considered as a hydraulic transient phenomenon and is defined as unsteady flow, which is transmitted as a pressure or water hammer wave in the pipeline system. Water hammer can be generated by operating system devices including valves and pumps, and by events such as pipe rupture. The consideration of water hammer event in piping networks design, maintenance, operation and planning is a vital factor. It can cause high pressures, excessive noise and negative pressures. The pipe can be damaged

37

in the short term through over-pressures, or, in the long term, through cavitations in the pipes due to such event. Therefore the pipeline should be designed either with a appropriate pipe size (both diameter and wall thickness) or with an appropriate water hammer control measure to withstand the associated maximum positive pressure and/or the minimum negative pressures. Computer modeling of water hammer in pipeline systems provides a tool for simulation of water hammer events and thus provides a better understanding to the behavior of the transmission of the hydraulic transient pressure waves. Water hammer is a destructive force that can damage housing or commercial plumbing systems. Not only is "noisy plumbing" a bother, but shock forces due to water hammer can rupture copper supply lines or cause leaking at joints. Water hammer is a pressure shock wave induced in plumbing supply systems whenever there is a sudden change in the steady state condition of an incompressible liquid such as water. Pumps, valves, faucets, toilets, and fast solenoid-activated valves are all examples of devices that can induce water hammer within a typical plumbing system. Water hammer can result in noisy, banging sounds as pipes rattle and expand to absorb the pressure wave. Shock waves in typical water pipes travel at up to 4500 ft/s and can exert tremendous instantaneous pressures, sometimes reaching 2,200 to over 15,000 bars. If left unchecked, water hammer can damage pipes, valves and

38

eventually weaken joints. However, the lack of noise does not mean that water hammer is not present. Newton's law states that for "every action there is an equal and opposite reaction." If water is flowing into a pipeline then is suddenly shut off, the kinetic energy of the flowing water reverses direction and must be dissipated during the transition to a steady state. This energy is initially reflected back through the plumbing system in a direction opposite to the original flow, creating an oscillating shock wave. Depending on the extent of the shock wave, a loud banging or rattling sound can be heard as pipes expand and move as the shock wave dissipates. If there were no friction losses and if the pipes had no expansiveness, the shock wave would continue indefinitely. However, as water flows through the pipes, friction due to internal pipe surface irregularities helps to slow the water, resulting in energy that is converted to heat. In addition, virtually all pipes have some measure of elasticity. As the plumbing system encounters a sudden pressure shock wave, the pipes expand slightly to absorb the shock. Pressures in excess of several thousand lb/in2 are possible during this brief instant, which is why water hammer can burst pipes and joints unexpectedly.

39

3.2.1 Causes of Water Hammer Several factors affect water hammer and are generally traceable to inadequate system design and installation. These include: •

Excessive system water pressure and lack of pressure-reducing apparatus,



Inadequate strapping or securing of plumbing to structure,



Excessively long straight runs with no bends,



Lack of expansion tank or other dampening system, such as water hammer arresters,



Changes in valve settings, accidental or planned,



Starting or stopping of pumps either supply or booster ones,



Changes in demand conditions (e.g. starting or stopping a fire flow; changes in industrial demands),



Changing elevation of a reservoir,



Action of reciprocating pumps,



Waves on a reservoir,



Vibration of impellers or guide vanes in pumps,



Vibration of deformable appurtenances such as valves,



Changes in transmission conditions (e.g., if a pipe breaks or buckles),



Changes in thermal conditions (e.g., if the fluid freezes or as a result of property changes caused by temperature fluctuations),



Air release, accumulation, entertainment or expulsion can cause dramatic disturbances (e.g., a sudden release of air from a relief valve

40

at a high point in the profile triggered by a passing vehicle; pressure changes in air chambers; rapid air expulsion during filling operations, etc.), •

Transitions from open channel to pressure flow, such as during filling operations in pressure conduits or during storm events in sewers; and



Additional transient events may be initiated by changes in turbine power loads and in hydroelectric projects, draft-tube instabilities due to vortexing, the action of reciprocating pumps and vibration of impellers or guide vanes in pumps, fans or turbines.

All the above water hammer causes can be considered as a future work and opens the door for the new field researches. The present study focused mainly on three main water hammer causes, which are: sudden valve closure, pump station power failure and sudden demand change at any node in the network.

3.2.2 Effects of Water Hammer Failure to properly address water hammer can yield the following dangers: •

Ruptured piping



Leaking connections



Weakened connections



Pipe vibration and noise



Damaged valves and check valves

41



Damaged water meters



Damaged pressure regulators and gauges



Damaged recording apparatus



Loosened pipe hangers and supports



Ruptured tanks and water heaters



Premature failure of other devices

Clearly, repairing any of these conditions "after the fact" is more expensive and inconvenient than designing a system right from the start, so that the purpose of the current study is to achieve a proper design of the piping systems.

3.2.3 Water Hammer Prevention There are several factors affecting the water hammer phenomenon so as to prevent water hammer we have to avoid these factors in designing and planning water distribution systems: 1.

Improperly sized supply lines for given peak water flow velocity.

2.

Decrease system water pressure and increase pressure-reducing apparatus.

3.

Increase strapping or securing of plumbing to structure.

4.

Decrease long straight runs with no bends.

5.

Using expansion tanks or other dampening system, such as water

42

hammer arresters. 6.

No valve accidental settings changes.

7.

No accidental starting or stopping pumps.

8.

Damping the action of reciprocating pumps.

9. Fix a reservoir at a predetermined elevation. 10. Damping waves on a reservoir. 11. Fix the problem of vibration of impellers or guide vanes in pumps. 12. Fix the problem of vibration of deformable appurtenances. 13. Fix unstable pump characteristics.

3.3 Design Alternatives It is possible to design a pipeline to bear up any pressure; such a design would generally be uneconomical. Therefore, stipulation of various control devices or appurtenances should usually be investigated to reduce the pressure requirements and thus to obtain an overall economic design. The following are some of the common appurtenances often employed to limit transient pressures: 1. Air chambers, 2. Surge tanks, 3. One-way surge tanks,

43

4. Fly wheels, 5. Air-inlet valves, 6. Pressure-relief or pressure regulating valves, and 7. Pipeline profile changes. The above-mentioned ways represent an assorted group of options for addressing fluid transients in a pipeline network. In a pipe network, such approaches may be frequently employed. However, their integrated performance should be studied carefully. In addition to the technical stimulation and capital cost of the available options, other factors will also influence the choice. These additional factors include reliability, space and power requirements, the amount of maintenance and supervision needed, and the availability of suitably skilled labor. In the current study, will avoid the use of the above methods of water hammer prevention, the only way to prevent, as per the current study is the proper design by selecting the proper pipes diameters.

3.4 Summary In this chapter, a brief introduction about water hammer was presented also water hammer causes, effects and prevention methods have been introduced.

44

4

GENETIC ALGORITHMS

4.1 Introduction and Background Genetic algorithms (GAs) are adaptive methods which may be used to solve search and optimization problems. They are based on the genetic processes of biological organisms. Over many generations, natural populations evolve according to the principles of natural selection and "survival of the fittest. By mimicking this process, genetic algorithms are able to "evolve" solutions to real world problems, if they have been suitably encoded. The basic principles of GAs were first laid down rigorously by Holland (1975). GAs work with a population of "individuals", each representing a possible solution to a given problem. Each individual is assigned a "fitness score" according to how good a solution to the problem it is. The highly-fit individuals are given opportunities to "reproduce", by "cross breeding" with other individuals in the population. This produces new individuals as "offspring", which share some features taken from each "parent". The least fit members of the population are less likely to get selected for reproduction, and so "die out" Glodberg (1989).

45

A whole new population of possible solutions is thus produced by selecting the best individuals from the current "generation", and mating them to produce a new set of individuals. This new generation contains a higher proportion of the characteristics possessed by the good members of the previous generation. In this way, over many generations, good characteristics are spread throughout the population. By favoring the mating of the more fit individuals, the most promising areas of the search space are explored. If the GA has been designed well, the population will converge to an optimal solution to the problem. The Genetic Algorithm background was extracted from Busetti (2007).

4.2 The Method 4.2.1 Overview The evaluation function, or objective function, provides a measure of performance with respect to a particular set of parameters. The fitness function transforms that measure of performance into an allocation of reproductive opportunities. The evaluation of a string representing a set of parameters is independent of the evaluation of any other string. The fitness of that string, however, is always defined with respect to other members of the current population. In the genetic algorithm, fitness is defined by: fi /fA where fi is the evaluation associated with string i and fA is the average evaluation of all the strings in the population, Glodberg (1989).

46

Fitness can also be assigned based on a string's rank in the population or by sampling methods, such as tournament selection. The execution of the genetic algorithm is a two-stage process. It starts with the current population. Selection is applied to the current population to create an intermediate population. Then recombination and mutation are applied to the intermediate population to create the next population. The process of going from the current population to the next population constitutes one generation in the execution of a genetic algorithm. The standard GA can be represented as follows in Fig. 4.1:

Selection (Duplication)

Recombination (Crossover)

String 1 String 2 String 3 String 4 ……. …….

String 1 String 2 String 3 String 4 ……. …….

offspring-A (1x2) offspring-B (1x2) offspring-A (2x4) offspring-B (2x4) ……. …….

Current Generation t

Intermediate Generation t

next generation t+1

Fig. 4.1 Standard GA process schematic

As indicated in Fig. 4.1, in the first generation the current population is also the

47

initial population. After calculating fi /fA for all the strings in the current population, selection is carried out. The probability that strings in the current population are copied (i.e. duplicated) and placed in the intermediate generation is in proportion to their fitness. Individuals are chosen using "stochastic sampling with replacement" to fill the intermediate population. A selection process that will more closely match the expected fitness values is "remainder stochastic sampling." For each string i where fi /fA is greater than 1.0, the integer portion of this number indicates how many copies of that string are directly placed in the intermediate population. All strings (including those with fi /fA less than 1.0) then place additional copies in the intermediate population with a probability corresponding to the fractional portion of fi /fA. For example, a string with fi /fA = 1:36 places 1 copy in the intermediate population, and then receives a 0:36 chance of placing a second copy. A string with a fitness of fi /fA = 0:54 have a 0:54 chance of placing one string in the intermediate population. Remainder stochastic sampling is most efficiently implemented using a method known as stochastic universal sampling. Assume that the population is laid out in random order as in a pie graph, where each individual is assigned space on the pie graph in proportion to fitness. An outer roulette wheel is placed around the pie with N equally-spaced pointers. A single spin of the roulette wheel will now simultaneously pick all N members of the intermediate population. After selection has been carried out the construction of the intermediate

48

population is complete and recombination can occur. This can be viewed as creating the next population from the intermediate population. Crossover is applied to randomly paired strings with a probability denoted pc. (The population should already be sufficiently shuffled by the random selection process.) Pick a pair of strings. With probability pc "recombine" these strings to form two new strings that are inserted into the next population. Consider the following binary string: 1101001100101101. The string would represent a possible solution to some parameter optimization problem. New sample points in the space are generated by recombining two parent strings. Consider

this

string

1101001100101101

and

another

binary

string,

yxyyxyxxyyyxyxxy, in which the values 0 and 1 are denoted by x and y. Using a single randomly-chosen recombination point, 1-point crossover occurs as follows: 11010 \/ 01100101101 yxyyx /\ yxxyyyxyxxy Swapping the fragments between the two parents produces the following offspring: 11010yxxyyyxyxxy

and yxyyx01100101101

After recombination, we can apply a mutation operator. For each bit in the population, mutate with some low probability pm. Typically, the mutation rate is applied with 0.1%-1% probability. After the process of selection, recombination

49

and mutation is complete, the next population can be evaluated. The process of valuation, selection, recombination and mutation forms one generation in the execution of a genetic algorithm. 4.2.2 Coding Before a GA can be run, a suitable coding (or representation) for the problem must be devised. We also require a fitness function, which assigns a figure of merit to each coded solution. During the run, parents must be selected for reproduction, and recombined to generate offspring. It is assumed that a potential solution to a problem may be represented as a set of parameters (for example, the parameters that optimize a neural network). These parameters (known as genes) are joined together to form a string of values (often referred to as a chromosome. For example, if our problem is to maximize a function of three variables, F(x; y; z), we might represent each variable by a 10-bit binary number (suitably scaled). Our chromosome would therefore contain three genes, and consist of 30 binary digits. The set of parameters represented by a particular chromosome is referred to as a genotype. The genotype contains the information required to construct an organism which is referred to as the phenotype. For example, in a bridge design task, the set of parameters specifying a particular design is the genotype, while the finished construction is the phenotype. The fitness of an individual depends on the performance of the phenotype. This

50

can be inferred from the genotype, i.e. it can be computed from the chromosome, using the fitness function. Assuming the interaction between parameters is nonlinear; the size of the search space is related to the number of bits used in the problem encoding. For a bit string encoding of length L; the size of the search space is 2L and forms a hypercube. The genetic algorithm samples the corners of this L-dimensional hypercube. Generally, most test functions are at least 30 bits in length; anything much smaller represents a space which can be enumerated. Obviously, the expression 2L grows exponentially. As long as the number of “good solutions” to a problem is sparse with respect to the size of the search space, then random search or search by enumeration of a large search space is not a practical form of problem solving. On the other hand, any search other than random search imposes some bias in terms of how it looks for better solutions and where it looks in the search space. A genetic algorithm belongs to the class of methods known as "weak methods" because it makes relatively few assumptions about the problem that is being solved. Genetic algorithms are often described as a global search method that does not use gradient information. Thus, nondifferentiable functions as well as functions with multiple local optima represent classes of problems to which genetic algorithms might be applied. Genetic algorithms, as a weak method, are robust but very general.

51

4.2.3 Fitness Function A fitness function must be devised for each problem to be solved. Given a particular chromosome, the fitness function returns a single numerical "fitness," or "figure of merit," which is supposed to be proportional to the "utility" or "ability" of the individual which that chromosome represents. For many problems, particularly function optimization, the fitness function should simply measure the value of the function. 4.2.4 Reproduction Good individuals will probably be selected several times in a generation; poor ones may not be at all. Having selected two parents, their chromosomes are recombined, typically using the mechanisms of crossover and mutation. The previous crossover example is known as single point crossover. Crossover is not usually applied to all pairs of individuals selected for mating. A random choice is made, where the likelihood of crossover being applied is typically between 0.6 and 1.0. If crossover is not applied, offspring are produced simply by duplicating the parents. This gives each individual a chance of passing on its genes without the disruption of crossover. Mutation is applied to each child individually after crossover. It randomly alters each gene with a small probability. The next diagram shows the fifth gene of a chromosome being mutated:

52

Mutation Point offspring

1 0 1 0 0 1 0 0 1 0

Mutated offspring

1 0 1 0 1 1 0 0 1 0

The traditional view is that crossover is the more important of the two techniques for rapidly exploring a search space. Mutation provides a small amount of random search, and helps ensure that no point in the search has a zero probability of being examined. An example of two individuals reproducing to give two offspring is shown in Table 4.1 and indicated in Fig. 4.2. Table 4.1 GA process example Individual

Value

Fitness

Chromosome

Parent 1

0.08

0.05

00 01010010

Parent 2

0.73

0.000002

10 11101011

Offspring 1

0.23

0.47

00 11101011

Offspring 2

0.58

0.00007

10 01010010

53

Fig. 4.2 Standard GA process curve

The fitness function is an exponential function of one variable, with a maximum at x = 0.2. It is coded as a 10-bit binary number. This illustrates how it is possible for crossover to recombine parts of the chromosomes of two individuals and give rise to offspring of higher fitness. (Crossover can also produce offspring of low fitness, but these will not be likely to get selected for reproduction in the next generation.) 4.2.5 Convergence The fitness of the best and the average individual in each generation increases towards a global optimum. Convergence is the progression towards increasing uniformity. A gene is said to have converged when 95% of the population share the same value. The population is said to have converged when

54

all of the genes have converged. As the population converges, the average fitness will approach that of the best individual. A GA will always be subject to stochastic errors. One such problem is that of genetic drift. Even in the absence of any selection pressure (i.e. a constant fitness function), members of the population will still converge to some point in the solution space. This happens simply because of the accumulation of stochastic errors. If, by chance, a gene becomes predominant in the population, then it is just as likely to become more predominant in the next generation as it is to become less predominant. If an increase in predominance is sustained over several successive generations, and the population is finite, then a gene can spread to all members of the population. Once a gene has converged in this way, it is fixed; crossover cannot introduce new gene values. This produces a ratchet effect, so that as generations go by, each gene eventually becomes fixed. The rate of genetic drift therefore provides a lower bound on the rate at which a GA can converge towards the correct solution. That is, if the GA is to exploit gradient information in the fitness function, the fitness function must provide a slope sufficiently large to counteract any genetic drift. The rate of genetic drift can be reduced by increasing the mutation rate. However, if the mutation rate is too high, the search becomes effectively random, so once again gradient information in the fitness function is not exploited.

55

4.3

Comparisons

4.3.1 Strengths The power of GAs comes from the fact that the technique is robust and can deal successfully with a wide range of difficult problems. GAs are not guaranteed to find the global optimum solution to a problem, but they are generally good at finding "acceptably good" solutions to problems "acceptably quickly". Where specialized techniques exist for solving particular problems, they are likely to outperform GAs in both speed and accuracy of the final result. Even where existing techniques work well, improvements have been made by hybridizing them with a GA. The basic mechanism of a GA is so robust that, within fairly wide margins, parameter settings are not critical. 4.3.2 Weaknesses A problem with GAs is that the genes from a few comparatively highly fit (but not optimal) individuals may rapidly come to dominate the population, causing it to converge on a local maximum. Once the population has converged, the ability of the GA to continue to search for better solutions is effectively eliminated: crossover of almost identical chromosomes produces little that is new. Only mutation remains to explore entirely new ground, and this simply

56

performs a slow, random search.

4.3.3 Comparison with other Methods Any efficient optimization algorithm must use two techniques to find a global maximum: exploration to investigate new and unknown areas in the search space, and exploitation to make use of knowledge found at points previously visited to help find better points. These two requirements are contradictory, and a good search algorithm must find a tradeoff between the two. Neural Nets Both GAs and neural nets are adaptive, learn, can deal with highly nonlinear models and noisy data and are robust, "weak" random search methods. They do not need gradient information or smooth functions. In both cases their flexibility is also a drawback, since they have to be carefully structured and coded and are fairly application-specific. For practical purposes, they appear to work best in combination: neural nets can be used as the prime modeling tool, with GAs used to optimize the network parameters. Random Search The brute force approach for difficult functions is a random, or an enumerated search. Points in the search space are selected randomly, or in some systematic

57

way, and their fitness evaluated. This is a very unintelligent strategy, and is rarely used by itself. Gradient Methods A number of different methods for optimizing well-behaved continuous functions have been developed which rely on using information about the gradient of the function to guide the direction of search. If the derivative of the function cannot be computed, because it is discontinuous, for example, these methods often fail. Such methods are generally referred to as hill climbing. They can perform well on functions with only one peak (unimodal functions). But on functions with many peaks, (multimodal functions), they suffer from the problem that the first peak found will be climbed, and this may not be the highest peak. Having reached the top of a local maximum, no further progress can be made. Iterated Search Random search and gradient search may be combined to give an iterated hill climbing search. Once one peak has been located, the hill climb is started again, but with another, randomly chosen, starting point. This technique has the advantage of simplicity, and can perform well if the function does not have too many local maxima. However, since each random trial is carried out in isolation, no overall picture of the "shape" of the domain is obtained. As the random search progresses, it continues to allocate its trials evenly over the search space.

58

This means that it will still evaluate just as many points in regions found to be of low fitness as in regions found to be of high fitness. A GA, by comparison, starts with an initial random population, and allocates increasing trials to regions of the search space found to have high fitness. This is a disadvantage if the maximum is in a small region, surrounded on all sides by regions of low fitness. This kind of function is difficult to optimize by any method, and here the simplicity of the iterated search usually wins. Simulated Annealing This is essentially a modified version of hill climbing. Starting from a random point in the search space, a random move is made. If this move takes us to a higher point, it is accepted. If it takes us to a lower point, it is accepted only with probability p(t), where t is time. The function p(t) begins close to 1, but gradually reduces towards zero, the analogy being with the cooling of a solid. Initially therefore, any moves are accepted, but as the "temperature" reduces, the probability of accepting a negative move is lowered. Negative moves are essential sometimes if local maxima are to be escaped, but obviously too many negative moves will simply lead us away from the maximum. Like the random search, however, simulated annealing only deals with one candidate solution at a time, and so does not build up an overall picture of the search space. No information is saved from previous moves to guide the selection of new moves.

59

4.4

Suitability Most traditional GA research has concentrated in the area of numerical

function optimization. GAs have been shown to be able to outperform conventional optimization techniques on difficult, discontinuous, multimodal, noisy functions. These characteristics are typical of market data, so this technique appears well suited for our objective of market modeling and asset allocation. For asset allocation, combinatorial optimization requires solutions to problems involving arrangements of discrete objects. This is quite unlike function optimization, and different coding, recombination, and fitness function techniques are required. There are many applications of GAs to learning systems, the usual paradigm being that of a classifier system. The GA tries to evolve (i.e. learn) a set of "if : : : then" rules to deal with some particular situation. This has been applied to economic modeling and market trading, Deboeck (1994).

4.5

Practical Implementation

4.5.1 Fitness Function Along with the coding scheme used, the fitness function is the most crucial aspect of any GA. Ideally; the fitness function should be smooth and regular, so that chromosomes with reasonable fitness are to chromosomes with slightly better fitness. They should not have too many local maxima, or a very

60

isolated global maximum. It should reflect the value of the chromosome in some "real" way, but unfortunately the "real" value of a chromosome is not always a useful quantity for guiding genetic search. In combinatorial optimization problems, where there are many constraints, most points in the search space often represent invalid chromosomes and hence have zero "real" value. Another approach which has been taken in this situation is to use a penalty function, which represents how poor the chromosome is, and construct the fitness as (constant-penalty). Penalty functions which represent the amount by which the constraints are violated are better than those which are based simply on the number of constraints which are violated. Approximate function evaluation is a technique which can sometimes be used if the fitness function is excessively slow or complex to evaluate. A GA is robust enough to be able to converge in the face of the noise represented by the approximation. Approximate fitness techniques have to be used in cases where the fitness function is stochastic. 4.5.2 Fitness Range Problems Premature Convergence The initial population may be generated randomly, or using some heuristic method. At the start of a run, the values for each gene for different members of the population are randomly distributed. Consequently, there is a wide spread of individual fitnesses. As the run progresses, particular values for each gene begin

61

to predominate. As the population converges, so the range of fitnesses in the population reduces. This variation in fitness range throughout a run often leads to the problems of premature convergence and slow finishing. Holland's schema theorem says that one should allocate reproductive opportunities to individuals in proportion to their relative fitness. But then premature convergence occurs because the population is not infinite. To make GAs work effectively on finite populations, the way individuals are selected for reproduction must be modified. One needs to control the number of reproductive opportunities each individual gets so that it is neither too large nor too small. The effect is to compress the range of fitnesses, and prevent any "super-fit" individuals from suddenly taking over. Slow Finishing This is the converse problem to premature convergence. After many generations, the population will have largely converged, but may still not have precisely located the global maximum. The average fitness will be high, and there may be little difference between the best and the average individuals. Consequently, there is an insufficient gradient in the fitness function to push the GA towards the maximum. The same techniques used to combat premature convergence also combat slow finishing. They do this by expanding the effective range of fitnesses in the population. As with premature convergence, fitness scaling can be prone to over compression due to just one "super poor" individual.

62

4.5.3 Parent Selection Techniques Parent selection is the task of allocating reproductive opportunities to each individual. In principle, individuals from the population are copied to a "mating pool", with highly fit individuals being more likely to receive more than one copy, and unfit individuals being more likely to receive no copies. Under a strict generational replacement, the size of the mating pool is equal to the size of the population. After this, pairs of individuals are taken out of the mating pool at random, and mated. This is repeated until the mating pool is exhausted. The behavior of the GA very much depends on how individuals are chosen to go into the mating pool. Ways of doing this can be divided into two methods: 1) Explicit Fitness Remapping To keep the mating pool the same size as the original population, the average of the number of reproductive trials allocated per individual must be one. If each individual's fitness is remapped by dividing it by the average fitness of the population, this effect is achieved. This remapping scheme allocates reproductive trials in proportion to raw fitness, according to Holland's theory. The remapped fitness of each individual will, in general, not be an integer. Since only an integral number of copies of each individual can be placed in the mating pool, we have to convert the number to an integer in a way that does not introduce bias. A widely used method is known as stochastic remainder sampling without

63

replacement. A better method, stochastic universal sampling is elegantly simple and theoretically perfect. It is important not to confuse the sampling method with the parent selection method. Different parent selection methods may have advantages in different applications. But a good sampling method is always good, for all selection methods, in all applications. Fitness Scaling is a commonly employed method of remapping. The maximum number of reproductive trials allocated to an individual is set to a certain value, typically 2.0. This is achieved by subtracting a suitable value from the raw fitness score, then dividing by the average of the adjusted fitness values. Subtracting a fixed amount increases the ratio of maximum fitness to average fitness. Care must be taken to prevent negative fitness values being generated. However, the presence of just one super-fit individual (with a fitness ten times greater than any other, for example), can lead to over compression. If the fitness scale is compressed so that the ratio of maximum to average is 2:1, then the rest of the population will have fitnesses clustered closely about 1. Although premature convergence has been prevented, it has been at the expense of effectively flattening out the fitness function. As mentioned above, if the fitness function is too flat, genetic drift will become a problem, so over compression may lead not just to slower performance, but also to drift away from the maximum.

64

Fitness Windowing is the same as fitness scaling, except the amount subtracted is the minimum fitness observed during the previous n generations, where n is typically 10. With this scheme the selection pressure (i.e. the ratio of maximum to average trials allocated) varies during a run, and also from problem to problem. The presence of a superunfit individual will cause under expansion, while super-fit individuals may still cause premature convergence, since they do not influence the degree of scaling applied. The problem with both fitness scaling and fitness windowing is that the degree of compression is dictated by a single, extreme individual, either the fittest or the worst. Performance will suffer if the extreme individual is exceptionally extreme. Fitness Ranking is another commonly employed method, which overcomes the reliance on an extreme individual. Individuals are sorted in order of raw fitness, and then reproductive fitness values are assigned according to rank. This may be done linearly or exponentially. This gives a similar result to fitness scaling, in that the ratio of the maximum to average fitness is normalized to a particular value. However, it also ensures that the remapped fitnesses of intermediate individuals are regularly spread out. Because of this, the effect of one or two extreme individuals will be negligible; irrespective of how much greater or less their fitness is than the rest of the population. The number of reproductive trials allocated to, say, the fifth best individual will always be the same,

65

whatever the raw fitness values of those above (or below). The effect is that over compression ceases to be a problem. Several experiments have shown ranking to be superior to fitness scaling. 2) Implicit Fitness Remapping Implicit fitness remapping methods fill the mating pool without passing through the intermediate stage of remapping the fitness. In binary tournament selection, pairs of individuals are picked at random from the population. Whichever has the higher fitness is copied into a mating pool (and then both are replaced in the original population). This is repeated until the mating pool is full. Larger tournaments may also be used, where the best of n randomly chosen individuals is copied into the mating pool. Using larger tournaments has the effect of increasing the selection pressure, since below-average individuals are less likely to win a tournament and vice-versa. A further generalization is probabilistic binary tournament selection. In this, the better individual wins the tournament with probability p, where 0.5 < p < 1. Using lower values of p has the effect of decreasing the selection pressure, since below-average individuals are comparatively more likely to win a tournament and vice-versa. By adjusting tournament size or win probability, the selection pressure can be made arbitrarily large or small.

66

4.5.4 Other Crossovers 2-Point Crossover The problem with adding additional crossover points is that building blocks are more likely to be disrupted. However, an advantage of having more crossover points is that the problem space may be searched more thoroughly. In 2-point crossover, (and multi-point crossover in general), rather than linear strings, chromosomes are regarded as loops formed by joining the ends together. To exchange a segment from one loop with that from another loop requires the selection of two cut points, as indicated in Fig. 4.3.

Fig. 4.3 Two-point crossover

Here, 1-point crossover can be seen as 2-point crossover with one of the cut points fixed at the start of the string. Hence 2-point crossover performs the same task as 1-point crossover (i.e. exchanging a single segment), but is more general. A chromosome considered as a loop can contain more building blocks since they are able to "wrap around" at the end of the string. 2-point crossover is generally

67

better than 1-point crossover. Uniform Crossover Uniform crossover is radically different to 1-point crossover. Each gene in the offspring is created by copying the corresponding gene from one or the other parent, chosen according to a randomly generated crossover mask. Where there is a 1 in the crossover mask, the gene is copied from the first parent, and where there is a 0 in the mask, the gene is copied from the second parent, as shown below in Fig 4.4:

Fig. 4.4 Uniform crossover

The process is repeated with the parents exchanged to produce the second offspring. A new crossover mask is randomly generated for each pair of parents. Offspring therefore contain a mixture of the genes from each parent. The number of effective crossing points is not fixed, but will average L/2 (where L is chromosome length).

68

Uniform crossover appears to be more robust. Where two chromosomes are similar, the segments exchanged by 2-point crossover are likely to be identical, leading to offspring which are identical to their parents. This is less likely to happen with uniform crossover. 4.5.5 Inversion and Reordering The order of genes on a chromosome is critical for the method to work effectively. Techniques for reordering the positions of genes in the chromosome during a run have been suggested. One such technique, inversion, works by reversing the order of genes between two randomly chosen positions within the chromosome. Reordering does nothing to lower epistasis (see 4.5.6), but greatly expands the search space. Not only is the GA trying to find good sets of gene values, it is simultaneously trying to discover good gene orderings too. 4.5.6 Epistasis Epistasis is the interaction between different genes in a chromosome. It is the extent to which the "expression" (i.e. contribution to fitness) of one gene depends on the values of other genes. The degree of interaction will be different for each gene in a chromosome. If a small change is made to one gene we expect a resultant change in chromosome fitness. This resultant change may vary according to the values of other genes.

69

4.5.7 Deception One of the fundamental principles of GAs is that chromosomes which include schemata which are contained in the global optimum will increase in frequency (this is especially true of short, low-order schemata, known as building blocks). Eventually, via the process of crossover, these optimal schemata will come together, and the globally optimum chromosome will be constructed. But if schemata which are not contained in the global optimum increase in frequency more rapidly than those which are, the GA will be misled, away from the global optimum, instead of towards it. This is known as deception. Deception is a special case of Epistasis and Epistasis is necessary (but not sufficient) for deception. If Epistasis is very high, the GA will not be effective. If it is very low, the GA will be outperformed by simpler techniques, such as hill climbing. 4.5.8 Mutation and Naive Evolution Mutation is traditionally seen as a "background" operator, responsible for re-introducing alleles or inadvertently lost gene values, preventing genetic drift and providing a small element of random search in the vicinity of the population when it has largely converged. It is generally held that crossover is the main force leading to a thorough search of the problem space. “Naive evolution" (just selection and mutation) performs a hill climb-like search which can be powerful without crossover. However, mutation generally finds better solutions than a crossover-only regime. Mutation becomes more productive, and crossover less

70

productive, as the population converges. Despite its generally low probability of use, mutation is a very important operator. Its optimum probability is much more critical than that for 4.5.9 Niche and Speciation Speciation is the process whereby a single species differentiates into two (or more) different species occupying different niches. In a GA, niches are analogous to maxima in the fitness function. Sometimes we have a fitness function which is known to be multimodal, and we may want to locate all the peaks. Unfortunately a traditional GA will not do this; the whole population will eventually converge on a single peak. This is due to genetic drift. The two basic techniques to solve this problem are to maintain diversity, or to share the payoff associated with a niche. In pre-selection, offspring replace the parent only if the offspring's fitness exceeds that of the inferior parent. There is fierce competition between parents and children, so the payoff is not so much shared as fought over, and the winner takes all. This method helps to maintain diversity (since strings tend to replace others which are similar to themselves) and this helps prevent convergence on a single maximum. In a crowding scheme, offspring are compared with a few (2 or 3) random individuals from the population. The offspring replaces the most similar one found. This again aids diversity and indirectly encourages speciation.

71

4.5.10 Restricted Mating The purpose of restricted mating is to encourage speciation, and reduce the production of lethals. A lethal is a child of parents from two different niches. Although each parent may be highly fit, the combination of their chromosomes may be highly unfit if it falls in the valley between the two maxima. The general philosophy of restricted mating makes the assumption that if two similar parents (i.e. from the same niche) are mated, then the offspring will be similar. However, this will very much depend on the coding scheme and low epistasis. Under conventional crossover and mutation operators, two parents with similar genotypes will always produce offspring with similar genotypes. However, in a highly epistatic chromosome, there is no guarantee that these offspring will not be of low fitness, i.e. lethals. The total reward available in any niche is fixed, and is distributed using a bucket-brigade mechanism. In sharing, several individuals which occupy the same niche are made to share the fitness payoff among them. Once a niche has reached its "carrying capacity", it no longer appears rewarding in comparison with other, unfilled niches. 4.5.11 Diploidy and Dominance In the higher life forms, chromosomes contain two sets of genes, rather than just one. This is diploidy. (A haploid chromosome contains only one set of genes.) Virtually all work on GAs concentrates on haploid chromosomes. This is

72

primarily for simplicity, although use of diploid chromosomes might have benefits. Diploid chromosomes lend advantages to individuals where the environment may change over a period of time. Having two genes allows two different "solutions" to be remembered, and passed on to offspring. One of these will be dominant (that is, it will be expressed in the phenotype), while the other will be recessive. If environmental conditions change, the dominance can shift, so that the other gene is dominant. This shift can take place much more quickly than would be possible if evolutionary mechanisms had to alter the gene. This mechanism is ideal if the environment regularly switches between two states.

4.6

Micro-Genetic Algorithms The micro-Genetic Algorithm ( GA) is a “small population” Genetic

Algorithm (GA) that operates on the principles of natural selection or “survival of the fittest” to evolve the best potential solution (i.e., design) over a number of generations to the most-fit, or optimal, solution. In contrast to the more classical Simple Genetic Algorithm (GA), which requires a large number of individuals in each population (i.e., 30 – 200); the

GA uses a

-population of five

individuals, Krishnakumar (1989). This is very convenient for piping networks optimizations, for example, which require a large amount of computational time. The small population size allows for entire generations to be run in parallel with five (or four) CPUs. This feature significantly reduces the amount of elapsed time required to achieve the most-fit solution. In addition, Krishnakumar (1989) has shown that the GA requires a fewer number of total function evaluations

73

compared to GAs for their test problems. The GA operates on a family, or population, of designs similar to the GA. However, unlike the GA, the mechanics of the GA allow for a very small population size, npop. This chapter provides a simple description of the GA optimization technique which will be used in this study. Details of the key features of the strategy are presented and illustrated through the theoretical examples in Chapter 6 and the case study in Chapter 7.

4.7 The Need for Optimization in the Water Sector Until now, numerous optimization approaches, some general and others specific, have evolved in order to achieve economy of design, construction, operation and maintenance of these systems. However, it is enough to say that most of the pipeline optimization methodology is concerned with the optimization of systems under steady or nearly steady flow conditions. Consideration of transients often takes place after assuming that the cost of controlling transients represents a small portion of the overall pipeline cost. There are important feedback mechanisms between the steady and transient portion of an optimized system. Optimal design of distribution systems has been approached from many angles and using a number of optimization tools. It has been indicated that the challenges in the water industry in developed countries and the world at large, together with the capital constraints and operational cost escalation, necessitate the evaluation of technical,

74

economical and environmental parameters to reach an optimal solution. In the water sector it has been indicated that large savings can be accomplished if optimal solutions are implemented, when new systems are designed or when existing systems are refurbished or extended. The need for the application of optimization techniques stems from the fact that the selection of system components to be evaluated in a water system is dependent on a number of inter-dependent variables. For example, if an optimal diameter has to be determined it is known that by reducing the diameter the capital cost is reduced but the operating cost (pumping) will escalate and the possibility of pipe burst due to surge pressures associated with high-flow velocities will increase. Planners, designers and operators are involved in the assessment of the following issues where GAs can be employed with great advantage: o Optimization of pipe diameters. o The identification of pipe segments in a distribution network that should be rehabilitated to improve the performance of the system. o Determining the application of a phased development of infrastructure for different development horizons. o Cost-effective development of infrastructure for alternative service levels ensuring an affordable service. o Optimization of reservoir sizes and determination of the required pump capacities.

75

o Optimization of operational scheduling. GAs are suited to solve problems that are not susceptible to attack by enumerative methods because the sheer number of potential solutions defies the possibility of testing them all. Such problems are typically multiconstrained, that is the solution must be a balance of conflicting or synergistic properties. When considering a problem with multiple dependencies you are normally forced to admit the possibility of isomeric solutions, i.e. solutions that give the same result using different processing routes. So for some problems there is no such thing as the “best solution”, but instead one looks for members of a fuzzy set of solutions that can be defined as “good enough”. Some problems have a “best” solution, but can be lost in a vast result space of complex problems. If the solution space is limited then enumerative techniques can work. One of the great strengths of GAs is that they do not have to evaluate all the possible solutions. This means that increasing the number of possible solutions has little impact on the running time of a GA. Goldberg (1989) indicated that a GA differs from the traditional search methods in the following ways: GAs work with coding of the parameter set, not the parameters themselves. GAs evaluate a population of points, not a single point. GAs use objective function information, not derivatives or other auxiliary knowledge, to determine the fitness of the solution.

76

GAs use probabilistic transition rules, not deterministic rules in the generation of the new populations GAs use bit-strings to represent the state and characteristics of an object model. Changing the values of the bits in these bit-strings can be translated back into changes to the associated objects’ data. Once the object has been converted (coded) into bit-strings, the GA-program (coder) can apply biologically analogous processes such as replication (or reproduction), crossover and mutation to the bit-strings, which can then be translated back to the objects themselves. In this way the GA-coder can evolve the instance-state of the components within an object model to obtain a bit-string (solution) with a high fitness. Changes to the bit-string values can be accomplished through the process of reproduction, cross-over and mutation.

4.8

Summary The major advantage of genetic algorithms is their flexibility and

robustness as a global search method. They are "weak methods" which do not use gradient information and make relatively few assumptions about the problem being solved. They can deal with highly nonlinear problems and nondifferentiable functions as well as functions with multiple local optima. They are also readily amenable to parallel implementation, which renders them usable in real-time. The primary drawback of genetic algorithms results from their flexibility. The

77

designer has to come up with encoding schemes that allow the GA to take advantage of the underlying building blocks. One has to make sure the evaluation function assigns meaningful fitness measures to the GA. It is not always clear how the evaluation function can be formulated for the GA to produce an optimal solution. GAs are also computationally intensive and convergence is sometimes a problem. The technique of GAs has been applied on a number of different real problems and has resulted in exciting, but not always straightforward solutions. In complex water distribution systems, for instance, the alternative options when evaluating the extensions to water supply systems become numerous. GAs provide procedures for the evaluation of the optimal solutions in the solution space. As mentioned previously, Genetic Algorithm is a method for solving hard problems quickly, accurately, and reliably. Hard problems are loosely defined as those problems that have large sub-solutions that cannot be decomposed into simpler sub-solutions, or have badly scaled sub-solutions, or have numerous local optima. While designing a competent GA, the objective is to develop a GA that can solve problems with bounded difficulty and exhibit a polynomial (usually subquadratic) scale-up with the problem size. Based on these goals, design decomposition has been proposed elsewhere, Sastry (2001).

78

5

MODELING OF NETWORK

5.1 Introduction The term modeling generally refers to the process of imitating the behavior of one system through the functions of another. In this study, the term simulation refers to the process of using a mathematical representation of the real system, called a model. Network modeling, which duplicates the dynamics of an existing or proposed system, are commonly performed when it is not practical for the real system to be directly subjected to experimentation, or for the purpose of evaluating a system before it is actually built. In addition, for situations in which water quality is an issue, directly testing a system may be costly and a potentially hazardous risk to public health. Modeling can be used to predict system responses to events under a wide range of conditions without disrupting the actual system. Using modeling, problems can be anticipated in proposed or existing systems, and solutions can be evaluated before time, money, and materials are invested in a realworld project.

79

Modeling can either be for steady-state or transients conditions. Steady-state modeling represents a shot in time and is used to determine the operating behavior of a system under static conditions. This type of analysis can be useful in determining the short-term effect of fire flows, pump power failure, sudden valve closure or average demand conditions on the system. Transients modeling are used to evaluate system performance over time. This type of analysis allows the user to model tanks filling and draining, valves opening and closing, sudden pump shut downs and pressures and flow rates changing throughout the system in response to varying demand conditions and automatic control strategies formulated by the modeler.

5.2 Optimization of Pipeline Systems Water distribution system (WDS) design problem is formulated and solved here as a single-objective optimization problem with the selection of pipe diameters as the decision variables. The main parameter is subject to minimization which is the cost of the network design and construction. The optimization problem is solved using a single-objective genetic algorithm (GA). The proposed robust design method is applied to different theoretical examples and Nuweiba Desalinated Water Storage Network as a case study. The objective of the optimum design model presented here is to minimize total design costs under the constraint of minimum head requirements in steady state condition and minimum and maximum heads requirements in

80

transient condition (water hammer). The later is included in order to protect the system from negative or positive transient pressures. More specifically, the optimization problem is to minimize the objective function Z. It is the summation of the network cost and penalty cost in both cases: steady state and water hammer: Z = C T + C P − SS + C P −WH

(5.1)

Network pipe cost is described as follows: CT =

i=N i =1

ci (Di ) ⋅ Li

(5.2)

Penalty cost in case of steady state is described as follows: C P− SS = f ( H min,ST − H j , CT , M , Dmax , Dmin , Di , Li , ci ( Di ))

(5.3)

Djebedjian et al. (2005b, 2006b) proposed the developed adaptive penalty method given as:

if H min, ST − H

0 C P − SS =

CT M

M j =1

(H min, ST

−H

j)

if H min, ST − H

j

≤0

j

>0

(5.4)

The total penalty cost in case of water hammer is described as follows: C P −WH = C P −WH - MAX + C P −WH - MIN

81

(5.5)

0 C P −WH - MAX =

CT

M j =1

(H j ,max

− H max, Tr )

if H

j , max

− H max, Tr ≤ 0

if H

j , max

− H max, Tr > 0 (5.6)

0 C P −WH - MIN =

CT

M j =1

(H min, Tr − H j ,min )

if H min, Tr − H

j , min

≤0

if H min, Tr − H

j , min

>0 (5.7)

where the parameters are as follows: ci ( Di )

: Cost of pipe i per unit length

C P − SS

: Penalty cost in case of steady state

C P −WH

: Penalty cost in case of water hammer

C P −WH - MAX : Penalty cost in case of water hammer when the pressure head exceeds the maximum allowable pressure head limit

C P −WH - MIN : Penalty cost in case of water hammer when the pressure head decreases below the minimum allowable pressure head limit

CT

: Network total cost

Di

: Diameter of pipe i

Hj

: Pressure head at node j

H max, TR

: Maximum allowable pressure head for water hammer

H min, ST

: Minimum allowable pressure head for steady state

82

H min,TR

: Minimum allowable pressure head for water hammer

Li

: Length of pipe i

M

: Total number of nodes

N

: Total number of pipes

Z

: Total cost of the network (design and penalty)

Generally, the penalty cost in case of steady state is a function of minimum allowable pressure head at each node, pressure at each node and number of nodes violating the criteria. The minimization of the objective function (5.1) is subject to: (a) Mass balance constraint: M j =1

Qj = 0

(5.8)

where Q j represents the discharges into or out of the node j (sign included). (b) Energy balance constraint: hf = Ep

(5.9)

The conservation of energy states that the total head loss around any loop must equal to zero or is equal to the energy delivered by a pump,

E p , if there is any.

83

The head loss due to friction in a pipe h f i is expressed by one of the following formulas: 1. Darcy-Weisbach formula, hf i =

8

π 2g

fi

Li Qi2

(5.10)

Di5

where Q i is the pipe flow and f i is the Darcy-Weisbach friction factor and is calculated as follows (Churchill, 1977):

8 fi = 8 Re

12

+

1 / 12

1

(5.11)

( A + B)

where A = 2.457 ln

1.5

1

(7 Re)0.9 + (0.27 ki

16

Di )

37530 and B = Re

16

k i is the roughness height of the pipe wall and Re is the Reynolds number and calculated as follows: Re = where

4 Qi π Di

(5.12)

is the fluid kinematic viscosity. In theory, Darcy-Weisbach

formula is considered the most accurate equation, as it is the only equation that relates its roughness value (f) to the diameter of the pipe, and also accounts for the varying regimes of flow. This is

84

mostly a non-issue, however, since almost all pipes encountered during a hydraulic analysis exhibit fully turbulent behavior. 2. Hazen-William formula, hf i

4.727 Li Q i1.852 = 1.852 Ci Di4.8704

(5.13)

where Qi is the pipe flow (ft3/s), Di is pipe diameter (ft), Li is pipe length (ft) and C i is the Hazen-Williams coefficient. The Hazen-Williams equation is still the most popular equation used in practice today because of its relative simplicity and accurate results. The major features for Hazen-Williams formula are that the coefficient C is rough measure of relative roughness, the effect of Reynolds number is included in formula and the effect of roughness on velocity is given directly. On the other hand, the Hazen-Williams formula is an empirical formula and could not be applied to all fluids in all conditions. Both formulas are encoded and used by the GASTnet program, DarcyWeisbach formula is used for Example 1 in Chapter 6 and HazenWilliams formula is used for the rest of the theoretical examples and case study.

85

(c) Deign constraint: The design constraint is the pipe diameter bounds (maximum and minimum) and given as: D min ≤ Di ≤ D max

i = 1,..., N

(5.14)

where Di is the discrete pipe diameters selected from the set of commercially available pipe sizes. (d) The hydraulic constraints for steady state and water hammer are given as: H j ≥ H min, ST

j = 1,..., M

(5.15)

where H j is the pressure head at node j, H min, ST is the minimum allowable pressure head at node j for the steady state. H min,TR ≤ H k ≤ H max , TR

k = 1,..., M p

(5.16)

where H min,TR and H max , TR are the minimum and maximum allowable pressure heads at node k for the transient conditions, and M p is the number of parts into which the pipe is divided. From the previous constraints, item (a) through (d), it is noted that only pipes are considered for the design; however, pumps, valves, and other special hydraulic

86

appurtenances are not included for purposes of discussion and simplicity of the model development. Using GA to solve the optimization problem in Equation (5.1), constraints (a), (b), (c) and (d) can be automatically satisfied by linking GA to the deterministic WDS solver such as Newton-Raphson method and transient analyzer as will be deliberately mentioned in the subsequent sections in this chapter. The Newton-Raphson method is used to simulate hydraulically the given network for the steady state and the water hammer analysis is implemented by a method of characteristics, Wylie et al. (1993). Constraint (c) can also be automatically satisfied by using the appropriate GA coding.

5.2.1 Outline of Approach The above model formulation is nonlinear because of the nonlinear objective function and nonlinear constraints. Genetic algorithm as an optimization tool, Newton-Raphson as a steady state simulator and transient analyzer are linked and coded together under GASTnet program. GASTnet requires a user-supplied subroutine for the purpose of computing the constraint and objective function values. GASTnet is a modular program written to provide dynamic memory allocation with all arrays set up as portions of one large main array so that redimensioning of arrays is never required. Each call to subroutine GASTnet is a function evaluation to compute each constraint and objective function and their gradients for a set of decision variables. Each time the

87

constraint set and gradients are evaluated with a new set of decision variables (pipe sizes), the flow direction is checked. GASTnet requires an initial solution to start the optimization search, which is provided through the steady state conditions by the subroutine Newton-Raphson. If the initial solution is an infeasible solution, a phase I optimization is initiated, which minimizes an objective function consisting of the sum of infeasibilities until a feasible point is found. Once this is achieved, the actual objective function replaces the sum of infeasibilities and the actual optimization phase is initiated. The algorithm starts with an initial solution with initial flow directions so that flows in the network are balanced. At each iteration of the search procedure within the GASTnet, a check is made to determine whether the constraints are met or not. Such a procedure does not cause any problems in convergence since the gradients are continuous. In the search for the optimum solution process, genetic algorithms require the natural parameter set of the optimization problem to be coded as a finite length string. Because GAs work directly with the underlying code, they are difficult to fool, since they are not dependent upon continuity of the parameter space and derivative existence. Genetic algorithms work iteration by iteration, successively generating and testing a population of strings. They work from a data base of points simultaneously (a population of strings) climbing many peaks in parallel, thus reducing the probability of finding a false peak, Goldberg (1989).

88

It has been assumed that decision variables may be coded as some finite length string over a finite alphabet, often the binary alphabet. The GA is applied generation by generation using randomized operators to guide the creation of new string populations. With this background, the mechanics of the GA operations will be executed to enable GAs to generate a new and improved population of strings from an old population.

5.2.2 General Assumptions Water hammer in networks may greatly affect the flow in pipes because it creates pressure waves which damage all flow lines. The study for this phenomenon needs some assumptions. The flow will be considered incompressible, since compressibility effects may manifest themselves only at very high frequency, which is not the case in many engineering applications. Moreover, horizontal rigid piping of constant radii, purely axial flow, and the governing equations for unsteady flow in pipeline are derived under the following assumptions including: 1. One-dimensional flow, i.e. velocity and pressure are assumed constant at a cross-section (Purely axial flow). 2. The pipe is full and remains full during the transient. 3. No column separation occurs during the transient. 4. Unsteady friction loss is approximated by steady state losses. 5. Negligible viscous normal stresses.

89

6. Constant pressure distribution across the pipe section. 7. Flow velocity, V, negligible with respect to the fluid speed of sound, a.

5.3 Transients Analysis in Piping Networks The process of obtaining an unsteady solution for a specific problem in which the demands or heads are specified functions of time consists of the following tasks, Larock et al. (2000): 1. The time span T, over which the unsteady solution is to be obtained, is divided into T/∆ t time increments, where ∆ t is the time step. 2. The discharges in all pipes and the heads at all nodes are assigned initial values that are chosen from a steady state solution that has the same demands, and all other data as the unsteady solution has at time zero. 3. All demands over each time increment must be specified. 4. Over each new time increment, define and evaluate the functions and the Jacobian matrix of derivatives of these functions. 5. Solve the resulting linear equation system. The solution of this equation system is then subtracted from the set of unknown values, according to the Newton method. 6. Steps 4 and 5 are repeated iteratively, until the specified convergence criterion has been satisfied.

90

7. Write the solution for the discharges and the nodal heads for this time increment, and then repeat steps 3 through 7 until the unsteady solution spans the entire time period. The steps from 1 through 7 are the general method for analyzing an unsteady piping system. This system is consisted of but not limited to pipes, reservoirs, pumps, tanks …etc. In the following section, the governing equation for each component and some of their boundary conditions which used in the present study will be mentioned. Governing equations for unsteady flow in pipeline are derived under the previous assumptions mentioned in section 5.2.2. The unsteady flow inside the pipeline is described in terms of the unsteady mass balance (continuity) equation and unsteady momentum equation, which define the state variables of Q (discharge) or V (velocity) and H (pressure head).

Equations describing unsteady flow in pipes Using the method of characteristics for analyzing the unsteady flow in piping networks we develop a pair of equations to find H and V in a pipe divided in N segments at the interior point P starting from point 2 to point N (point 1 is related to the boundary condition), Larock et al. (2000):

VP =

1 (V Le + V R i ) + g (H Le − H Ri ) − f ∆t (V Le V Le + V Ri V Ri 2 a 2D

91

)

(5.17)

HP =

1 a (V Le − V R i ) + (H Le + H Ri ) − a f ∆t (VLe VLe − V Ri V Ri 2 g g 2D

)

(5.18)

Le and Ri are considered as the left and right points on the characteristic grid with respect to a certain point P and at the same distance from it.

Reservoir boundary condition (upstream end of pipe) For a pipe exiting from a reservoir and neglecting the entrance losses, the H equation is, Larock et al. (2000): H P1 = H 0

(5.19)

where H 0 is the head of the reservoir water surface. Also, the velocity V P1 is found to be: V P1 = V2 +

f ∆t g (H 0 − H 2 ) − V2 V2 a 2D

(5.20)

Three pipes connected in one junction For a pipe junction with one inflow (pipe 1), two inflows (pipes 2 and 3) and an external demand Q at the junction, the equations describing the relationships between the six unknowns, Larock et al. (2000): Pipe 1, C+: V P1 = C1 − C 2 H P1

(5.21)

92

Pipe 2, C−: V P2 = C 3 + C 4 H P2

(5.22)

Pipe 3, C−: V P3 = C 5 + C 6 H P3

(5.23)

Conservation of mass: V P1 A1 = V P2 A2 + V P3 A3 + Q

(5.24)

Work-energy:

H P1 = H P2 = H P3

(5.25)

Solving this linear set of equations leads to:

H P1 = H P2 = H P3 =

C1 A1 − C 3 A2 − C 5 A3 − Q C 2 A1 + C 4 A2 + C 6 A3

(5.26)

where HP and VP are the head and velocity at a specific point in a specific pipe end of the three connected pipes, C's are pipes constants and A's are the pipes cross-section areas. In the same manner we can obtain equations for four or five pipes connected at the same junction.

93

Valve in the interior of a pipeline The equations describing this internal boundary condition are given by Equations (5.27-5.30) with equal pipe areas on both sides of the valve, Larock et al. (2000). Figure 5.1 illustrates the situation. EL-HGL- Pipe1 H Losses

EL-HGL- Pipe2

C−

C+ P1

P2 Pipe 1

Pipe 2

Fig. 5.1 Valve in a pipeline with constant diameter

Pipe 1, C+: V P1 = C 3 − C 4 H P1

(5.27)

Pipe 2, C−: V P2 = C1 + C 2 H P2

(5.28)

Conservation of mass: V P1 = V P2

(5.29)

94

Work-energy: H P1 = H P2 + K L

V P22

(5.30)

2g

where KL is the valve loss coefficient. The equation obtained by combining Eqs. (5.27) through (5.30) is: V P22 +

2g 1 1 2 g C 3 C1 + V P2 − + =0 K L C4 C2 K L C4 C2

(5.31)

While keeping KL separate, definition of the coefficients: C5 = 2 g

1 1 , + C4 C2

C6 = 2g

C 3 C1 + C4 C2

(5.32)

leads to the velocity expression: V P1 = V P2 =

4 C6 K L C5 −1+ 1+ 2K L C 52

(5.33)

This equation is correct so long as the flow is in the original downstream direction. If the flow reverses, then we return back to Equation (5.30) to modify and resolve to obtain the following equation:

V P1 = V P2 =

4 C 6 K Lrev C5 1− 1− 2 K Lrev C 52

95

(5.34)

Source pump station at upstream end of pipeline Discharge side C−: V Pd = C 3 + C 4 H Pd

(5.35)

Conservation of mass: N pu Q = V Pd Ad

(5.36)

Work-energy: H sump + h p = H Pd

(5.37)

Pump characteristics: hp N

2 p

= N st C 7

Q + C8 Np

(5.38)

where: C7 =

(h

p

(Q

N p2

) − (h A

p

N p2

)

N p )A − (Q N p )B

B

, C 8 = −C 7

Q Np

+ B

hp N p2

(5.39) B

Here N pu is the number of pumps in parallel, Ad the area of delivery pipe, H sump the pump sump elevation, h p the head delivered by pump, Np the

pump speed, Nst the pump speed at the steady state, and C's are constants. 2 A and B are two points on the pump performance curve ( h p / N p vs. Q / N p ).

96

From the previous equations, we can proceed with the solution to obtain the head at a specific point, HP, Larock et al. (2000): H sump + HP =

5.4

N st N p

C 7 C 3 Ad + N st N 2p C8

N pu N st N p 1− C 7 C 4 Ad N pu

(5.40)

Implementation of Genetic Algorithms over Pipe Network The flow chart in Fig. 5.2 shows the sequence of the basic operators used

in genetic algorithms. We start out with a randomly selected first generation. Every string in this generation is evaluated according to its quality, and a fitness value is assigned. Next, a new generation is produced by applying the reproduction operator. Pairs of strings of the new generation are selected and crossover is performed. With a certain probability, genes are mutated before all solutions are evaluated again. This procedure is repeated until a maximum number of generations is reached. While doing this, the all time best solution is stored and returned at the end of the algorithm. As one notices from the flow chart, the genetic algorithm serves as a framework which provides the outer cycle of the search or optimization process. An important part of the loop is the evaluation function which determines the fitness value of a specific string. Within this method, the string has to be mapped to a

97

realistic solution, and the objective function has to be evaluated. For this, heuristic methods might be necessary. The brief idea of GA is to select population of initial solution points scattered randomly in the optimized space, then converge to better solutions by applying in iterative manner the following three processes (reproduction/selection, crossover and mutation) until a desired criteria for stopping is achieved. First Generation Mutation Evaluation

Crossover Reproduction No

Max. Generation? Yes Return best Solution

Fig. 5.2 Genetic algorithm flow chart

The optimization program GASTnet (Genetic Algorithm Steady Transient network) is written in FORTRAN language and it links the GA, the NewtonRaphson simulation technique for the steady state hydraulic simulation and the transient analysis. The Newton-Raphson technique and transient analyzer are

98

considered as subroutines in the main code genetic algorithms. A brief description of the steps in using GA for pipe network optimization, and including water hammer is as follows:

1.

Generation of initial population. The GA randomly generates an initial population of coded strings representing pipe network solutions of population size Npopsiz. Each of the Npopsiz strings represents a possible combination of pipe sizes.

2.

Computation of network cost. For each Npopsiz string in the population, the GA decodes each substring into the corresponding pipe size and computes the total material cost. The GA determines the costs of each trial pipe network design in the current population, as described in Equation (5.2).

3.

Hydraulic analysis of each network. A steady state hydraulic network solver computes the heads and discharges under the specified demands for each of the network designs in the population. The actual nodal pressures are compared with the minimum allowable pressure heads, and any pressure deficits are noted. In this study, the Newton-Raphson technique is used.

4.

Computation of penalty cost for steady state. The GA assigns a penalty cost for each demand if a pipe network design does not satisfy the minimum pressure constraints. The pressure violation at the node at which the pressure deficit is maximum, is used as the basis for computation of the

99

penalty cost. The maximum pressure deficit is multiplied by a penalty factor ( CT / M ) as described in Equation (5.4).

5.

Transient analysis of each network. A transient analysis solver computes the transient pressure heads resulting from the pump power failure, sudden valve closure or sudden demand change as best described in the above sections by Equations (5.17) through (5.40). The minimum and maximum pressure heads are estimated in each pipe of the network and compared with the minimum and maximum allowable pressure heads, and any pressure deficits are noted.

6.

Computation of penalty cost for transient state. The GA assigns a penalty cost if a pipe design does not satisfy the minimum and maximum allowable pressure heads constraints. The penalty cost is estimated as the pressure violation multiplied by a penalty factor equals to the cost of the specified pipe, c (D ) ⋅ L as described by Equations (5.5)-(5.7).

7.

Computation of total network cost. The total cost of each network in the current population is taken as the sum of the network cost (Step 2), the penalty cost (Step 4), plus the penalty cost (Step 6), this step is an expression to Equation (5.1).

8.

Computation of the 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 from Step 7.

100

9.

Generation of a new population using the selection operator. The GA generates new members of the next generation by a selection scheme.

10. The crossover operator. Crossover occurs with some specified probability of crossover for each pair of parent strings selected in Step 9.

11. The mutation operator. Mutation occurs with some specified probability of mutation for each bit in the strings, which have undergone crossover.

12. Production of successive generations. The use of the three operators described above produces a new generation of pipe network designs using Steps 2 to 11. The GA repeats the process to generate successive generations. The last cost strings (e.g., the best 20) are stored and updated as cheaper cost alternatives are generated. These steps for the optimization of water network considering both steady state and transient conditions are illustrated in the flow chart of the GASTnet program, Fig. 5.3. This program is an extension of the GANRnet computer program, Djebedjian et al. (2005b). It has been developed to optimize pipe networks for steady state using the genetic algorithm approach. The genetic algorithm in the GASTnet program has several parameters that enable moving to different search regions to approach the global solution; these parameters are: Npopsiz: the population size of a GA run, Idum: the initial random number seed for the GA run, and it must equal a negative integer, Maxgen: the maximum number of generations to run by the GA, and Nposibl: the array of integer number of possibilities per parameter.

101

Generate Initial Population for Diameters (GA)

Produce Optimized Diameters

Convert Optimized Diameters to Commercial Diameters

Newton Simulation • Analyze Given Network • Get Pressure Heads & Velocities

Material Cost Penalty Cost

Yes

If : H ≤ Hmin-ST

No Transient Analysis • Get Minimum and Maximum Pressure Heads

Penalty Cost

No

Maximum Generation

Yes

Yes

If : Hmin ≤ Hmin-TR Hmax ≥ Hmax-TR No

Fitness

Comprise between produced groups of diameters to select the group that has the lower diameters cost Best Solution

Fig. 5.3 Flow chart of the GASTnet program

102

5.5

Key Roles in Design Using a Model After the model has been constructed and calibrated, it is ready to be used

in design. There are two distinct roles that need to be filled when using a model. The first is that of the modeler who actually runs the program and the second is that of the design engineer who must make the decisions regarding facility sizing, location, and timing of construction. In most cases, the models are sufficiently easy to use that both roles can be filled by a single individual. When two individuals are involved, the task of the design engineer is to decide on the situations and design alternatives to be modeled. The modeler then runs the desired simulations. To get the most benefit from the model, the designer should examine a broad range of alternatives. Background investigation prior to beginning the modeling process is often very helpful. A brainstorming session with utility employees can generate a consistent understanding of the nature of the problem, a review of the facts surrounding the problem and, most important, a wide range of alternative solutions. By involving others in this initial meeting, difficulties that can arise later (such as questions about why a particular alternative was not considered) can be prevented. A team approach also facilitates acceptance of designs that are developed using the model.

103

5.6

Summary Optimizing pipeline systems including transient phenornenon was

discussed in details in this chapter. In particular, the optimization requires the formulation of an objective function. The components of water distribution include only standard components which is the pipe costs. In future, more components shall be discussed, e.g. pumps, inline devices and reservoirs. The advantage of the objective function presented here is that it accounts for only cost criteria. Based on this analysis, the design of a water distribution system can be optimized using genetic algorithms, as illustrated in the next chapter.

104

6

THEORETICAL EXAMPLES

6.1

Introduction In this chapter detailed theoretical examples will be premeditated. The

examples are subjected to different water hammer causes; all will be presented to check the integrated program reliance. Fluid transient in these examples are caused by pump power failure, sudden valve closure and sudden demand change. The GASTnet program engages the GA model with network solver (Newton-Raphson method) and transient analysis program and was applied for the conventional (steady state) and transient perspectives on different examples.

6.2

Examples The examples used in this study are under the following causes of water

hammer: pump power failure (4 examples), valve sudden closure (2 examples) and sudden demand change (2 examples). In these examples, as illustrated in Table 6.1, the set of commercially available pipe diameters are (6, 8, 10, 12, and 15) inches and the corresponding cost per foot length is (15, 25, 35, 45,

105

and 65) units. All calculations were produced on a computer with Pentium 4 (3.00 GHz) processor and 512 MB of RAM. Table 6.1 Network pipes unit cost Diameter (in.) 6 8 10 12 15

Cost (Units) 15 25 35 45 65

The GASTnet program has the capability to run under the following modes: 1- Steady State-Simulation Mode: It uses the hydraulic analysis of network to obtain the flows in pipes and the heads at nodes under steady state conditions. 2- Transient-Simulation Mode: After the application of the steady state conditions, the water hammer cause is applied and the transient simulation is carried out giving the pressure head against time variation at nodes. 3- Transient-Optimization Mode: In this mode, the GA chooses a set of diameters and the previous two simulations are applied and checked by the pressure head requirements. This procedure is repeated to a

106

maximum number of generations, Maxgen, and the best set of diameters giving the least cost is selected. The subject networks are predefined ones, meaning that each network has its own characteristics (pipe diameters, layout…). The GASTnet program was applied on this predefined network in a transient-simulation mode, to delineate the efficiency of the GASTnet program before optimization, then the GASTnet program was applied in the transient-optimization mode. All the program outputs (pressure against time) were plotted on one diagram for each node before and after optimization. The GASTnet optimization program was applied to the network using the following values for GA parameters: Npopsiz = 5 and Nposibl = 16. The values of Idum and Maxgen for each example are mentioned in the example. The mutation and crossover rates were set to 0.2 and 0.5, respectively. For all examples, the accuracy for the calculations of steady state was 0.0001 ft3/s. All the above parameters are well-defined in the GASTnet program and given in Appendix (A). The practical design of potable water networks recommends that the minimum pressure in the steady state conditions should not be less than 20 psi ( 46 ft) for proper operation. Transient pressure must be ranged from 20 to 100 psi, sufficient to overcome friction losses in piping. Pressures in excess of 100 psi ( 230 ft) are not suitable.

107

6.2.1 Example 1: One Pump Station Power Failure in a Pipe Network with One Pump Station: The Example is based on a pre-defined water supply piping network, Fig. 6.1, Larock et al. (2000). The system comprises two reservoirs at nodes 1 and 6, nine nodes and eleven pipes. The demands at nodes (3, 4, 5, 8 and 9) are (3, 2, 4, 1 and 2 ft3/s), respectively. The lengths and diameters of the pipes are given in Table 6.2. The roughness height of pipes and wave speed are 0.007 in. and 3300 ft/s, respectively. In order to introduce transient conditions into the example, a variety of possible causes could be selected. For convenience, a pump power failure is chosen to characterize the transient performance of the system.

Fig. 6.1 Typical piping network (Example 1)

108

Table 6.2 Pipe data for the network with one pump station (Example 1) Pipe Number

Start Node

End Node

Length (ft)

Diameter (in.)

1 2 3 4 5 6 7 8 9 10 11

1 2 2 3 4 4 5 5 6 7 8

2 4 3 5 5 7 8 9 7 8 9

800 1000 600 1200 800 1200 1500 1800 1000 400 800

15 12 12 12 10 8 8 8 10 8 8

Roughness Height (in.) 0.007 0.007 0.007 0.007 0.007 0.007 0.007 0.007 0.007 0.007 0.007

Wave Speed (ft/s) 3300 3300 3300 3300 3300 3300 3300 3300 3300 3300 3300

The pump performance curve for the pump in pipe 9 is defined by:

h p = −0.5 Q 2 − 0.3 Q + 90 , with Q in ft3/s and h p in ft, and the brake horsepower (in hp) is defined by: Power = 1.2 Q + 30 . The pump runs at 1750 rev/min, and the moment of inertia of pump and motor is 40 lb.ft2, Table 6.3. Table 6.3 Pump data for the network with one pump station (Example 1) No. of Parallel Pumps No. of Stages Rotational Speed (r.p.m.) Rotational Moment of Inertia (lb.ft2) Discharge (ft3/s) Pressure Head (ft) Power (hp)

1 1 1750 40 0 90 30

109

2.5 86.125 33

5 76 36

7.5 59.625 39

10 37 42

13.12 0 45.74

For the example and according to the given configuration, the required minimum pressure head at all nodes is given the value of 80 ft for the steady state and for the transient conditions, the minimum and maximum pressure heads are given the values of 80 ft and 180 ft, respectively. The GASTnet optimization program was applied to the network using the following values for µGA parameters: Npopsiz = 5, Idum = −5000, Maxgen = 1000 and Nposibl = 16. The mutation and crossover rates were set to 0.2 and 0.5, respectively. For steady state calculations, the accuracy was 0.0001 ft3/s. The time of the transient flow simulation was taken as 40 s and the hydraulic time step t was 0.04 s. Figure 6.2 depicts the evolution of the solution as the GASTnet program develops in a single run under transient-optimization mode. A rapid decrease in the cost value for the first group of evaluation then quite slow changes in the later evaluations is observed.

110

440000

Cost (unit)

400000

360000

320000

280000

240000 0

1000

2000

3000

Evaluation Number

4000

5000

Fig. 6.2 Cost units versus evaluation number for the pump power failure (Example 1)

The network containing 11 pipes and with 5 available commercial pipe sizes has a total solution space of 511 = 4.88

107 different network designs. Using

the GA optimization techniques, the number of function evaluations was 4378 solution were explored to reach the optimal solution and this is only a very small fraction of the total search space (0.009%). Table 6.4 shows the optimal diameters for the network against the original ones. The least cost is 278,500.00 units after optimization against 383,500.00 units, which is equal 0.726 of the original cost. The run time was

111

approximately 20 minutes and produced on a computer with Pentium 3 (700 MHz) processor, 128 MB of RAM. Table 6.4 Optimal against original diameters (in.) and associated cost for the pump power failure (Example 1) Pipe Number 1 2 3 4 5 6 7 8 9 10 11 Cost (units) Run Time (min)

Original Diameter (in.) 15 12 12 12 10 8 8 8 10 8 8 383,500.00 1

Optimal Diameter (in.) 15 10 10 10 6 8 6 6 6 8 6 278,500.00 6

At the optimal diameters, the hydraulic analysis for the steady state gives the flows through the pipes. The total demands at nodes 3, 4, 5, 8 and 9 are 12 ft3/s. These are provided by the pump and the reservoir with an elevation of 1480 ft. The pump discharge is 1.642 ft3/s, while the flow rate in pipe 1 connected to the reservoir is 10.358 ft3/s. The corresponding head that added by the pump at this discharge is 88.16 ft.

112

Table 6.5 displays the corresponding nodal pressure heads for the steady state. These heads fulfill the minimum pressure constraint of 80 ft at all nodes except the reservoirs nodes. The two reservoir nodes 1 and 6 have heads of 20 ft.

Table 6.5 Pressure heads at nodes for the steady state using the optimal diameters (Example 1) Pressure Head (ft) 20 168.00 151.76 137.34 147.71 20 122.53 121.96 150.34

Node 1 2 3 4 5 6 7 8 9

Pump 1 in Pipe 9: Discharge = 1.642 cfs, Head = 88.160 ft

Figure 6.3 illustrates the pressure head versus time response at all nodes; excluding the reservoir nodes; before and after applying the optimization techniques. The GASTnet program was applied in transient-simulation mode using the original network pipes diameters, Table 6.2, and subjected to the same water hammer cause. The simulation results were plotted as dashed curves in Fig. 6.3. The pressure fluctuation before optimization (dashed

113

curves) decreases than the lower limit (80 ft) in node 6 and exceeds the higher pressure limits for water hammer design (180 ft) at nodes 5 and 9 which will lead to pipes rupture and excessive cost to rehabilitation in addition to the noise. In case of proper selection of pipes diameters by applying the optimization it shows (continuous curves) that the pressure limits does not exceed or come below the predetermined limits for water hammer minimum and maximum pressure constraints of 80 ft and 180 ft. It can be observed that the convergence to steady state associated with the pump power failure is rapid. It is obvious that the pressure heads at the nodes near the pump (6 (discharge side), 7 and 8) are more quantitatively affected by the pump power failure than the other nodes. The choice of the time of the transient flow simulation as 40 s was sufficient to obtain nearly steady state condition at the end of this time. Increasing the time makes the computational effort for optimization more pronouncing.

114

200

160

160

Pressure Head (ft)

Pressure Head (ft)

200

120

80

120

80

40

40

Node 2 After Optimization Before Optimization

0 0

10

20

30

0

40

0

200

200

160

160

120

80

40

30

80

Node 5

After Optimization Before Optimization 20

30

40

Node 4

10

20

120

40

0

10

Time (s)

Pressure Head (ft)

Pressure Head (ft)

Time (s)

0

Node 3 After Optimization Before Optimization

After Optimization Before Optimization

0

40

Time (s)

0

10

20

30

Time (s)

Fig. 6.3 Pressure head versus time for various nodes for the pump power failure (Example 1)

115

40

200

160

160

Pressure Head (ft)

Pressure Head (ft)

200

120

80

120

80

40

40

Node 6

Node 7

After Optimization Before Optimization

0 0

10

20

30

0

40

0

200

200

160

160

120

80

40

30

80

Node 9

After Optimization Before Optimization 20

30

40

Node 8

10

20

120

40

0

10

Time (s)

Pressure Head (ft)

Pressure Head (ft)

Time (s)

0

After Optimization Before Optimization

After Optimization Before Optimization

0

40

Time (s)

0

10

20

30

Time (s)

Fig. 6.3 (Continued) Pressure head versus time for various nodes for the pump power failure (Example 1)

116

40

6.2.2 Example 2: One Pump Power Failure in a Pipe Network with Two Pumps: As illustrated in Fig. 6.4, a pre-defined water supply piping network, Larock et al. (2000), consists of three reservoirs at nodes 1, 6 and 10, ten nodes, two pump stations and twelve pipes. The demands at nodes (3, 4, 5, 8 and 9) are (1300, 900, 1800, 450 and 1300 GPM), respectively. The lengths, diameters of pipes and Hazen-Williams roughness coefficients are given in Table 6.6. The pumps data are given in Table 6.7. In order to initiate transient conditions into this network, for convenience, a pump power failure at pump station 2 is chosen to demonstrate the transient performance of the system.

Fig. 6.4 Typical piping network with two pump stations (Examples 2, 3, 4, 6 and 7)

117

Table 6.6 Pipes data for the network with two pump stations (Examples 2, 3, 4, 6 and 7) Pipe Number

Start Node

End Node

1 2 3 4 5 6 7 8 9 10 11 12

1 2 2 3 4 4 5 5 6 7 8 10

2 4 3 5 5 7 8 9 7 8 9 9

Length (ft) 800 1000 600 1200 800 1200 1500 1800 1000 400 800 1200

Diameter (in.) 15 12 12 12 10 8 8 8 10 8 8 12

HazenWilliams Roughness Coefficient 100 100 100 100 100 100 100 100 100 100 100 100

Wave Speed (ft/s) 3300 3300 3300 3300 3300 3300 3300 3300 3300 3300 3300 3300

Table 6.7 Pumps data for the network with two pump stations (Examples 2, 3, 4, 6 and 7)

No. of Parallel Pumps* No. of Stages Rotational Speed (r.p.m.) Rotational Moment of Inertia (lb.ft2) Discharge (gpm) Pressure Head (ft) Power (hp)

Pump Pump 1 2 3 6 2 1 1175 1175 45 45 0 400 57.5 56.0 5.0 8.5

600 54.5 10.5

800 50.0 12.0

1000 40.5 13.5

1280 0.0 12.0

* All the pumps stations characteristics mentioned in Table 6.7 above are applicable for Examples 2, 3, 4, 6 and 7 except for no. of parallel pumps which equals 3 in Example 2 and equals 2 in Examples 3, 4, 6 and 7.

118

In this example, the same set of pipe diameters mentioned earlier in Table 6.1 was used. For ease of reference, the pipes diameters (in inches) are (6, 8, 10, 12, and 15) against (15, 25, 35, 45, and 65 (units)), respectively. Theoretically, the required minimum pressure head at all nodes was assumed to be 80 ft for the steady state and for the transient conditions, the minimum and maximum pressure heads were considered as 80 ft and 180 ft, respectively. The GA parameters used in GASTnet optimization program in this example were: Npopsiz = 5, Idum = −7000, Maxgen = 1000 and Nposibl = 16. Mutation and crossover rates were set to 0.2 and 0.5, respectively. For the steady state calculations, the accuracy was 0.0001 ft3/s. The time of the transient flow simulation was taken as 40 s and the hydraulic time step t was 0.04 s. The GASTnet optimization program was applied to this example and the network with the new optimal diameters was found. Figure 6.5 depicts the evolution of the solution by single run of the program. A rapid decrease in the cost value for the first group of evaluation then quite slow changes in the later evaluations is observed.

119

550000

Cost (unit)

500000

450000

400000

350000

300000 0

1000

2000

3000

4000

5000

Evaluation Number

Fig. 6.5 Cost units versus evaluation number for the pump power failure (Example 2)

The network contains 12 pipes and with 5 available commercial pipe sizes, the available number of solutions is 512 = 24.41

107. By applying the GASTnet

program for this example, it is found that the function evaluation number is 4491 to reach to the optimal solution which is only a very small fraction of the total search space (0.00184%). Table 6.8 shows the optimal diameters for the network against the original ones, Larock et al. (2000). The least cost was found to be 303,500.00 units

120

after optimization against 437,500.00 units, which is equal 0.694 times the original cost. Table 6.8 Optimal against original diameters (in.) and associated cost for the pump power failure (Example 2) Pipe Number 1 2 3 4 5 6 7 8 9 10 11 12 Cost (units) Run Time (min)

Original Diameter (in.) 15 12 12 12 10 8 8 8 10 8 8 12 437,500.00 5

Optimal Diameter (in.) 10 8 8 10 6 8 8 6 10 8 6 8 303,500.00 30

Table 6.9 displays the subsequent nodal pressure heads for the steady state. These values are fulfilling the minimum pressure constraint of 80 ft at all nodes except the reservoirs nodes. The three reservoirs at nodes 1 and 6 have heads of 65 ft and 2 ft, respectively, and at node 10 have a head of 35 ft.

121

Table 6.9 Pressure heads at nodes for the steady state using the optimal diameters (Example 2) Pressure Head (ft) 65 139.03 103.97 109.57 112.24 2 113.83 104.20 150.20 35

Node 1 2 3 4 5 6 7 8 9 10

Pump 1 in Pipe 9: Discharge = 1921.749 gpm, Head = 85.399 ft Pump 2 in Pipe 1: Discharge = 2446.968 gpm, Head = 56.049 ft

The application of the GASTnet program in transient-simulation mode using the original network pipes diameters, Table 6.6, which subjected to the same water hammer cause reveals the dashed curves in Fig. 6.6. Significant pressure fluctuations were resulted with values above the predetermined maximum pressure (180 ft) in nodes 8 and 9. The most obvious feature in this example is that a termination to the network simulation had occurred at time t = 11.31 s due to the non stability of the network under the water hammer event caused by the pump station 2 power failure. The purpose of the optimization is to select pipe diameters reliable in all cases, steady state or even water hammer. Figure 6.6 depicts the pressure head versus

122

time response at all nodes including the reservoir nodes for the optimal diameters (continuous curves). It can be observed that the convergence to steady state associated with the pump power failure is rapid. Also, these heads are within the specified range of heads given by the minimum and maximum pressure constraints of 80 ft and 180 ft. The pressure heads at the nodes near the pump (2, 3 and 4) are more quantitatively affected by the pump power failure than the other nodes. The simulation time 40 s was sufficient to obtain steady state condition.

123

250

200

200

Pressure Head (ft)

Pressure Head (ft)

250

150

100

50

150

100

50

Node 1

Node 2

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

10

250

250

200

200

150

100

50

10

20

40

30

150

100

Node 4

After Optimization Before Optimization 0

30

50

Node 3

0

20

Time (s)

Pressure Head (ft)

Pressure Head (ft)

Time (s)

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

40

Time (s)

Fig. 6.6 Pressure head versus time for various nodes for pump 2 power failure (Example 2)

124

250

200

200

Pressure Head (ft)

Pressure Head (ft)

250

150

100

50

150

100

50

Node 5

Node 6 (Pump Discharge)

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

10

20

30

40

Time (s)

250

250

200

200

Pressure Head (ft)

Pressure Head (ft)

Time (s)

150

100

50

150

100

50

Node 8

Node 7 After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

40

Time (s)

Fig. 6.6 (Continued) Pressure head versus time for various nodes for pump 2 power failure (Example 2)

125

250

200

200

Pressure Head (ft)

Pressure Head (ft)

250

150

100

50

150

100

50

Node 9

Node 10

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

Time (s)

Fig. 6.6 (Continued) Pressure head versus time for various nodes for pump 2 power failure (Example 2)

126

40

6.2.3 Example 3: Alternative Pump Power Failure in a Pipe Network with Two Pumps: The same water supply piping network mentioned in section 6.2.2, Example 2, is discussed here. The pump power failure at pump station 1 in pipe number 9 is chosen to characterize the transient performance of the system. For this example, the required minimum pressure head at all nodes was given the value of 80 ft for the steady state while for the transient conditions, the minimum and maximum pressure heads were given the values of 80 ft and 180 ft, respectively. The GA parameters used for this example were: Npopsiz = 5, Idum = −10000, Maxgen = 1000 and Nposibl = 16. The crossover rate was set to 0.5. The accuracy for steady state calculations was 0.0001 ft3/s. The time of the transient flow simulation was taken as 40 s and the hydraulic time step t was 0.04 s. The evolution of the solution as the GASTnet program develops in a transientoptimization mode is depicted in Figure 6.7. A rapid decrease in the cost value for the first group of evaluation then quite slow changes in the later evaluations is observed.

127

480000

Cost (unit)

440000

400000

360000

320000

280000 0

1000

2000

3000

4000

5000

Evaluation Number

Fig. 6.7 Cost units versus evaluation number for the alternative pump power failure (Example 3)

As

calculated

512 = 24.41

in

previous

examples,

the

total

solution

space

is

107 different network designs. To reach the optimal solution, the

number of function evaluations was found to be 4721, which is 0.0019% of the total search space. Table 6.10 shows the optimal diameters for the network against the original ones. The optimum cost is 317,500.00 units after optimization against 437,500.00 units, which is equal 0.726 times the original cost.

128

Table 6.11 displays the corresponding nodal pressure heads for the steady state. These heads fulfill the minimum pressure constraint of 80 ft at all nodes. Table 6.10 Optimal against original diameters (in.) and associated cost for the alternative pump power failure (Example 3) Pipe Number 1 2 3 4 5 6 7 8 9 10 11 12 Cost (units) Run Time (min)

Original Diameter (in.) 15 12 12 12 10 8 8 8 10 8 8 12 437,500.00 2

129

Optimal Diameter (in.) 15 10 8 12 6 6 8 6 6 8 6 8 317,500.00 6

Table 6.11 Pressure heads at nodes for the steady state using the optimal diameters (Example 3) Pressure Head (ft) 65 167.60 117.39 129.55 125.29 2 106.59 104.75 152.97 35

Node 1 2 3 4 5 6 7 8 9 10

Pump 1 in Pipe 9: Discharge = 726.980 gpm, Head = 111.369 ft Pump 2 in Pipe 1: Discharge = 3673.937 gpm, Head = 54.974 ft

The GASTnet program was applied twice: First, in transient-simulation mode using the original network pipes diameters, Table 6.6, and subjected to the water hammer cause. The dashed curves in Fig. 6.8 show the pressure head versus time response at all nodes including the two pump stations discharges before applying the optimization program. The pressure fluctuations exceeds the predetermined maximum pressure (180 ft) in nodes 2, 3, 5, 8 and 9 and decreases than the lower limit (80 ft) in node 6. The program termination had occurred at time t = 11.63 s, meaning instability and no sustainability to the network if subjected to water hammer with these pipe diameters. The choice of the time of the transient flow simulation as 40 s was sufficient to obtain steady state condition.

130

The second application of the program was in transient-optimization mode and the continuous curves in Fig. 6.8 illustrate the pressure fluctuations for the network with the optimal diameters. The convergence to steady state associated with the pump power failure is rapid in most nodes and the heads are within the predetermined range of heads (80 ft to 180 ft). The pressure heads at the nodes near the pump (nodes 6, 7 and 8) are affected by the event of pump power failure than the other nodes.

131

250

200

200

Pressure Head (ft)

Pressure Head (ft)

250

150

100

50

150

100

50

Node 1

Node 2

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

10

20

30

40

Time (s)

250

250

200

200

Pressure Head (ft)

Pressure Head (ft)

Time (s)

150

100

50

150

100

50

Node 3

Node 4

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

40

Time (s)

Fig. 6.8 Pressure head versus time for various nodes for the alternative pump power failure (Example 3)

132

250

200

200

Pressure Head (ft)

Pressure Head (ft)

250

150

100

50

150

100

50

Node 5

Node 6 (Pump Discharge)

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

10

20

30

40

Time (s)

250

250

200

200

Pressure Head (ft)

Pressure Head (ft)

Time (s)

150

100

50

150

100

50

Node 7

Node 8

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

40

Time (s)

Fig. 6.8 (Continued) Pressure head versus time for various nodes for the alternative pump power failure (Example 3)

133

250

200

200

Pressure Head (ft)

Pressure Head (ft)

250

150

100

50

150

100

50

Node 9 After Optimization Before Optimization

0 0

10

20

30

Node 10

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

Time (s)

Fig. 6.8 (Continued) Pressure head versus time for various nodes for the alternative pump power failure (Example 3)

134

40

6.2.4 Example 4: Two Pumps Power Failure in a Pipe Network with Two Pumps: The network of Figure 6.4 is used to demonstrate the effect of water hammer event by pump station power failure in the two stations. In Examples 2 and 3 the water hammer event was initiated separately by shutting down each one. The pressure head requirements at all nodes for steady state was 80 ft minimum and for transient conditions, the minimum and maximum pressure heads were 80 ft and 180 ft, respectively. The GA parameters are as mentioned in Appendix (A). The time of the transient flow simulation was taken as 40 s and the hydraulic time step t was 0.04 s. Figure 6.9 depicts the evolution of the solution as the program develops in a single run. A quite slow decrease in the cost value for the first group of evaluation then fast changes in the later evaluations is observed. The total network solution space is 512 = 24.41

107 different network

designs. After optimization, the number of function evaluations was 4669 to reach the optimal solution. It is very minor value compared to the total solution space (0.0019%).

135

600000

Cost (unit)

560000

520000

480000

440000

400000 0

1000

2000

3000

4000

5000

Evaluation Number

Fig. 6.9 Cost units versus evaluation number for the two pumps power failure (Example 4)

Table 6.12 shows the optimal diameters for the network against the original ones. The least cost is 408,500.00 units after optimization against 437,500.00 units, which indicates 0.934 of the original pipe network cost. The corresponding nodal pressure heads for the steady state are given in Table 6.13. These heads fulfill the network pressure head requirements.

136

Table 6.12 Optimal against original diameters (in.) and associated cost for the two pumps power failure (Example 4) Pipe Number 1 2 3 4 5 6 7 8 9 10 11 12 Cost (units) Run Time (min)

Original Diameter (in.) 15 12 12 12 10 8 8 8 10 8 8 12 437,500.00 7

Optimal Diameter (in.) 8 8 8 6 8 15 6 10 6 15 15 12 408,500.00 30

Table 6.13 Pressure heads at nodes for the steady state using the optimal diameters (Example 4) Pressure Head (ft) 65 126.48 113.67 111.28 128.35 2 103.73 113.87 165.43 35

Node 1 2 3 4 5 6 7 8 9 10

Pump 1 in Pipe 9: Discharge = 744.721 gpm, Head = 111.549 ft Pump 2 in Pipe 1: Discharge = 1533.499 gpm, Head = 53.908 ft

137

The GASTnet program in transient-simulation mode was applied using the original network pipes diameters, Table 6.12, and the results of simulation were plotted as dashed curves on Fig. 6.10. It is apparent that the pressure heads at nodes are quantitatively affected by the two pump stations power failure. The pressure fluctuations exceed the maximum pressure (180 ft) at nodes 8 and 9 and decrease below the lower limit (80 ft) in node 6. The effect of the two pump stations power failure in the pipe network with the optimal diameters is realized after the application of the GASTnet program in transient-optimization mode. The continuous curves in Fig. 6.10 show the pressure head versus time response at all nodes including the reservoir nodes. After optimization, the pressure fluctuations at nodes 8 and 9 became within the acceptable range (80 – 180 ft).

138

250

200

200

Pressure Head (ft)

Pressure Head (ft)

250

150

100

50

150

100

50

Node 1

Node 2

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

10

20

30

40

Time (s)

250

250

200

200

Pressure Head (ft)

Pressure Head (ft)

Time (s)

150

100

50

150

100

50

Node 4

Node 3 After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

Time (s)

Fig. 6.10 Pressure head versus time for various nodes for the two pumps power failure (Example 4)

139

40

250

250

Node 6 (Pump Discharge) After Optimization Before Optimization

200

Pressure Head (ft)

Pressure Head (ft)

200

150

100

50

150

100

50

Node 5

After Optimization Before Optimization

0 0

10

20

30

0

40

0

10

20

30

40

Time (s)

250

250

200

200

Pressure Head (ft)

Pressure Head (ft)

Time (s)

150

100

50

150

100

50

Node 8

Node 7 After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

40

Time (s)

Fig. 6.10 (Continued) Pressure head versus time for various nodes for the two pumps power failure (Example 4)

140

250

200

200

Pressure Head (ft)

Pressure Head (ft)

250

150

100

50

150

100

50

Node 9

Node 10

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

Time (s)

Fig. 6.10 (Continued) Pressure head versus time for various nodes for the two pumps power failure (Example 4)

141

40

6.2.5 Example 5: Sudden Valve Closure in a Pipe Network with one Pump: One of the most important water hammer causes is the sudden valve closure. In this section, the effect of such event is introduced. A valve is located at the downstream end of pipe 5 on a network which comprises 6 pipes and 3 nodes in addition to one pump station. The layout of the network is as indicated in Fig. 6.11 and the pipe data and pump data are mentioned in Tables 6.14 and 6.15, respectively.

Fig. 6.11 Piping layout of Example 5

142

Table 6.14 Pipe data (Example 5) Pipe Number

Start Node

End Node

Length (ft)

Diameter (in.)

1 2 3 4 5 6

4 2 1 2 5 6

1 1 3 3 3 2

3300 8200 3300 4900 3300 2600

12 8 8 12 6 6

HazenWilliams Roughness Coefficient 120 120 120 120 120 120

Wave Speed (ft/s) 2850 2850 2850 2850 2850 2850

Table 6.15 Pump data (Example 5) No. of Parallel Pumps No. of Stages Rotational Speed (r.p.m.) Rotational Moment of Inertia (lb.ft2) Discharge (gpm) Pressure Head (ft) Power (hp)

1 1 1180 50 0 118 57

2000 92 68

3000 82 77

4000 67 80

4500 52 76

5300 0 60

To fulfill the network minimum requirements, a value of 300 ft was considered as a minimum pressure head at all nodes. For transient conditions, the minimum and maximum pressure heads were given the values of 300 ft and 450 ft, respectively. The GA parameters are similar to that in the previous examples, Appendix (A). For the steady state, the accuracy for the calculations was 0.0001 ft3/s.

143

The time of the transient flow simulation was taken as 40 s and the hydraulic time step t was 0.04 s. The application of the GASTnet program in transient-optimization mode gives the evolution of the solution, Fig. 6.12. A very rapid decrease in the cost value for the first group of evaluation then quite slow changes in the later evaluations is observed.

900000

Cost (unit)

800000

700000

600000

500000

400000 0

100

200

300

Evaluation Number

400

500

Fig. 6.12 Cost units versus evaluation number for the sudden valve closure case (Example 5)

144

For this network, the total solution space is 56 = 15625 different network designs. Using the GA optimization techniques, the number of function evaluations was 422 to reach the optimal solution and this is only a very small fraction of the total search space (2.7%). Table 6.16 shows the optimal diameters for the network against the original ones. The least cost is 443,000.00 units after optimization against 745,000.00 units, which is equal 0.595 times the original cost. Table 6.17 displays the corresponding nodal pressure heads for the steady state. These heads fulfill the minimum pressure constraint of 80 ft at all nodes except the reservoirs nodes.

Table 6.16 Optimal against original diameters (in.) and associated cost for the sudden valve closure (Example 5) Pipe Number 1 2 3 4 5 6 Cost (units) Run Time (min)

Original Diameter (in.) 12 8 8 12 6 6 745,000.00 0.3

145

Optimal Diameter (in.) 8 6 6 6 6 8 443,000.00 4

Table 6.17 Pressure heads at nodes for the steady state using the optimal diameters (Example 5) Pressure Head (ft) 366.19 356.11 356.35 150 130 120

Node 1 2 3 4 5 6

Pump 1 in Pipe 6: Discharge = 811.103 gpm, Head = 93.479 ft

The pressure head versus time response at all nodes including the pump station discharge before optimization (dashed curve) and after optimization (continuous curve) is illustrated in Figure 6.13. The GASTnet program was applied in transient-simulation mode using the original network pipes diameters, Table 6.14. The choice of the time of the transient flow simulation as 40 s was sufficient to obtain steady state condition. The dashed curves in Fig. 6.13 show the results of simulation. The GASTnet program terminates at time t = 12.23 s due to the instability of the network as a result of the sudden valve closure. This means that the original network could not sustain the pressure fluctuations under the water hammer circumstances. On the dashed curve (before optimization), Fig. 6.13, the pressure heads at the nodes are exceeding the design limits of 300 to 450 ft. On the continuous curve (after optimization), the nodes are quantitatively affected by the sudden

146

valve closure and the convergence to steady state caused by sudden valve closure is rapid. In the optimal case, these heads are within the specified range of heads given by the minimum and maximum pressure constraints of 300 ft and 450 ft.

147

500

400

400

Pressure Head (ft)

Pressure Head (ft)

500

300

200

100

300

200

100

Node 2

Node 1 After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

10

20

30

40

Time (s)

500

500

400

400

Pressure Head (ft)

Pressure Head (ft)

Time (s)

300

200

100

300

200

100

Node 3

Node 6

After Optimization Before Optimization

0 0

10

20

30

After Optimization Before Optimization

0

40

0

Time (s)

10

20

30

Time (s)

Fig. 6.13 Pressure head versus time for various nodes for the sudden valve closure (Example 5)

148

40

6.2.6 Example 6: Sudden Valve Closure in a Pipe Network with Two Pumps: As mentioned earlier, sudden valve closure is considered one of the major water hammer factors. In this section, the effect of a sudden valve closure located at the downstream end of pipe 2 in the network in Fig. 6.4 is studied. For this example, the same values for steady state, transient conditions and GA parameters were used as mentioned in the previous examples of the same network. Figure 6.14 depicts the evolution of the solution as the GASTnet program develops in transient-optimization mode. The cost is decreased gradually over the final evaluation number till reaching to the least cost. The total solution space is 512 = 24.41

107 different network designs. Using

the GA optimization techniques, the number of function evaluations was 10,800 to reach the optimal solution and this is only a very small fraction of the total search space (0.0044%).

149

600000

580000

Cost (unit)

560000

540000

520000

500000

480000 0

2000

4000

6000

8000

Evaluation Number

10000

12000

Fig. 6.14 Cost units versus evaluation number for the sudden valve closure case (Example 6)

Table 6.18 shows the optimal diameters for the network against the original ones. The least cost is 495,500.00 units after optimization against 437,500.00 units, which is equal 1.133 times the original cost. Here, the cost is not considered as a dominant factor as it is meaningless to design a cheap nonreliable network; the optimum cost exceeded the original cost design, that in order to overcome the water hammer even. Table 6.19 displays the corresponding nodal pressure heads for the steady state. These heads fulfill the network requirements of maximum pressure head of 180 ft and minimum pressure head of 80 ft.

150

Table 6.18 Optimal against original diameters (in.) and associated cost for the sudden valve closure (Example 6) Original Diameter (in.) 15 12 12 12 10 8 8 8 10 8 8 12 437,500.00 2

Pipe Number 1 2 3 4 5 6 7 8 9 10 11 12 Cost (units) Run Time (min)

Optimal Diameter (in.) 6 12 10 12 12 15 10 10 15 15 15 10 495,500.00 10

Table 6.19 Pressure heads at nodes for the steady state using the optimal diameters (Example 6) Pressure Head (ft) 65 109.70 115.53 99.70 126.80 2 94.86 104.57 154.81 35

Node 1 2 3 4 5 6 7 8 9 10

151

The GASTnet program was applied twice: in transient-simulation mode and transient-optimization mode to demonstrate the differences in simulation before and after optimization. For the case before optimization, the results of simulation were not plotted as dashed curves in Fig. 6.15. The GASTnet program ceases the running operation at time t = 0.04 s due to the non stability of the network under the water hammer event caused by the sudden valve closure downstream pipe 2. The operation halt has occurred as an evidence of the instability and non-operability of the network with the original set of diameters that in case of sudden valve closure. As depicted in Figure 6.15, the pressure head versus time response at all nodes are plotted. The convergence to steady state caused by sudden valve closure is rapid. The pressure heads at the nodes are quantitatively affected by the sudden valve closure, the more quantitatively affected node is node 2. The choice of the time of the transient flow simulation as 40 s was sufficient to obtain nearly steady state condition.

152

200

160

160

Pressure Head (ft)

Pressure Head (ft)

200

120

80

40

120

80

40

Node 1

Node 2

After Optimization

0 0

10

20

30

After Optimization

0

40

0

10

20

30

40

Time (s)

200

200

160

160

Pressure Head (ft)

Pressure Head (ft)

Time (s)

120

80

40

120

80

40

0 0

10

20

Node 3

Node 4

After Optimization

After Optimization

30

0

40

0

Time (s)

10

20

30

Time (s)

Fig. 6.15 Pressure head versus time for various nodes for the sudden valve closure (Example 6)

153

40

200

160

160

Pressure Head (ft)

Pressure Head (ft)

200

120

80

40

120

80

40

Node 6 (Pump Discharge)

Node 5 After Optimization

0 0

10

20

30

After Optimization

0

40

0

10

20

30

40

Time (s)

200

200

160

160

Pressure Head (ft)

Pressure Head (ft)

Time (s)

120

80

40

120

80

40

0 0

10

20

Node 7

Node 8

After Optimization

After Optimization

30

0

40

0

Time (s)

10

20

30

Time (s)

Fig. 6.15 (Continued) Pressure head versus time for various nodes for the sudden valve closure (Example 6)

154

40

200

Pressure Head (ft)

160

120

80

40

Node 9 After Optimization

0 0

10

20

30

40

Time (s)

Fig. 6.15 (Continued) Pressure head versus time for various nodes for the sudden valve closure (Example 6)

155

6.2.7 Example 7: Sudden Demand Change in a Pipe Network with Two Pumps: Sudden demand change event is one of the water hammer causes. It is introduced here on a network with configuration as depicted in Fig. 6.4. The demand was changed at node 5 from 1800 GPM to 2000 GPM to meet a sudden need for more water for fire suppression. For this example and as given in the previous examples for this network, the required minimum pressure head at all nodes was 80 ft for the steady state and for the transient conditions, the minimum and maximum pressure heads were 80 ft and 180 ft, respectively. The GA parameters are given in Appendix (A). The accuracy of the steady state calculations was 0.0001 ft3/s. The time of the transient flow simulation was taken as 40 s and the hydraulic time step t was 0.04 s. The evolution of the solution is depicted in Figure 6.16. A rapid decrease in the cost value for the first group of evaluation then slow changes in the later evaluations is observed.

156

420000

Cost (unit)

400000

380000

360000

340000

320000 0

1000

2000

3000

4000

5000

Evaluation Number

Fig. 6.16 Cost units versus evaluation number for the sudden demand change (Example 7)

The total solution space is 512 = 24.41

107 different network designs. The

number of function evaluations was 4327 to reach the optimal solution which is 0.00177% of the total search space. Table 6.20 shows the optimal diameters for the network against the original ones. The least cost is 334,500.00 units after optimization against 437,500.00 units for the original network, which is equal 0.765 times the original cost.

157

Table 6.20 Optimal against original diameters (in.) and associated cost for the sudden demand change (Example 7) Pipe Number 1 2 3 4 5 6 7 8 9 10 11 12 Cost (units) Run Time (min)

Original Diameter (in.) 15 12 12 12 10 8 8 8 10 8 8 12 437,500.00 1.5

Optimal Diameter (in.) 10 15 8 6 15 10 6 6 8 8 6 6 334,500.00 6

Table 6.21 displays the corresponding nodal pressure heads for the steady state. These heads fulfill the minimum pressure constraint of 80 ft at all nodes except the reservoirs nodes. The reservoirs at nodes 1, 6 and 10 have heads of 65 ft, 2 ft and 35 ft, respectively.

158

Table 6.21 Pressure heads at nodes for the steady state using the optimal diameters (Example 7) Pressure Head (ft) 65 105.97 95.73 89.63 115.14 2 86.81 87.47 124.89 35

Node 1 2 3 4 5 6 7 8 9 10

Pump 1 in Pipe 9: Discharge = 1635.658 gpm, Head = 98.658 ft Pump 2 in Pipe 1: Discharge = 3339.783 gpm, Head = 55.715 ft

The operability and reliability of the original network was checked using the GASTnet optimization program in transient-simulation mode using the original network pipes diameters, Table 6.20. The program ceased its running operation after time t = 0.04 s therefore the results before optimization were not plotted in Fig. 6.17. The GASTnet optimization program results in transient-optimization mode are illustrated in Figure 6.17. The pressure head versus time response at all nodes are shown and it can be observed that the convergence to steady state caused by sudden demand change is rapid. It is obvious that the pressure heads at the

159

nodes are affected by the sudden demand change. The simulation time was sufficient to obtain nearly steady state condition. It is concluded that for the original pipe network, the piping network is not operational under sudden demand change which means that piping could not sustain such changes although the demand changed only from 1800 to 2000 gpm, i.e. by increasing about 11%. The application of the GA techniques converted the non-operational pipe network to operational one by the proper pipes diameters selection.

160

200

160

160

Pressure Head (ft)

Pressure Head (ft)

200

120

80

120

80

40

40

Node 2

Node 1

After Optimization

0 0

10

20

30

After Optimization

0 0

40

10

20

30

40

Time (s)

200

200

160

160

Pressure Head (ft)

Pressure Head (ft)

Time (s)

120

80

40

120

80

40

Node 4

Node 3 After Optimization

0 0

10

20

30

After Optimization

0

40

0

Time (s)

10

20

30

Time (s)

Fig. 6.17 Pressure head versus time for various nodes for the sudden demand change (Example 7)

161

40

200

160

160

Pressure Head (ft)

Pressure Head (ft)

200

120

80

40

120

80

40

Node 5

Node 6 (Pump Discharge)

After Optimization

0 0

10

20

30

After Optimization

0

40

0

10

20

30

40

Time (s)

200

200

160

160

Pressure Head (ft)

Pressure Head (ft)

Time (s)

120

80

40

120

80

40

Node 7

Node 8

After Optimization

0 0

10

20

30

After Optimization

0

40

0

Time (s)

10

20

30

Time (s)

Fig. 6.17 (Continued) Pressure head versus time for various nodes for the sudden demand change (Example 7)

162

40

200

Pressure Head (ft)

160

120

80

40

Node 9 After Optimization

0 0

10

20

30

40

Time (s)

Fig. 6.17 (Continued) Pressure head versus time for various nodes for the sudden demand change (Example 7)

163

6.2.8 Example 8: Sudden Demand Change in a Pipe Network without Pumps: The example is based on a pre-defined water supply piping network, Fig. 6.18; the system comprises two reservoirs at nodes 5 and 6, six nodes and six pipes. Nodes 1 through 4 have ground elevations of 860 ft, while nodes 5 and 6 have ground elevations of 980 ft and 960 ft, respectively. The demands at nodes (1, 2, 3 and 4) are (580, 450, 630 and 490 GPM) respectively. The lengths and diameters of the pipes are given in Table 6.22. The roughness height of pipes and wave speed were 0.002 in. and 3000 ft/s, respectively. The demand was increased at node 2 from 450 GPM to 900 GPM.

Fig. 6.18 Typical piping network for sudden demand change (Example 8)

164

Table 6.22 Pipe data for sudden demand change (Example 8) Pipe Number

Start Node

End Node

Length (ft)

Diameter (in.)

1 2 3 4 5 6

5 1 3 6 3 1

1 2 2 3 4 4

1500 3000 2000 1300 3000 2000

10 8 8 10 8 8

Roughness Height (in.) 0.002 0.002 0.002 0.002 0.002 0.002

Wave Speed (ft/s) 3000 3000 3000 3000 3000 3000

For the steady state, the required minimum pressure head at all nodes was 80 ft and for the transient conditions, the minimum and maximum pressure heads were 80 ft and 180 ft, respectively. Applying the GASTnet program in the transient-optimization mode, the evolution of cost is depicted in Figure 6.19. For the first group of evaluation, a rapid decrease in the cost value, then quite slow changes in the later evaluations is observed.

165

700000

Cost (unit)

600000

500000

400000

300000

200000 0

200

400

600

Evaluation Number

Fig. 6.19 Cost units versus evaluation number for the sudden demand change case (Example 8)

For this example, the total solution space is 56 = 15625 different network designs. Using the GASTnet optimization program, the number of function evaluations was found to be 523 to reach the optimal solution and this is only as a fraction of the total search space (3.35%). Table 6.23 shows the optimal diameters for the network against the original ones. The least cost is 267,000.00 units after optimization against 348,000.00 units, which is equal 0.767 times the original cost.

166

Table 6.23 Optimal against original diameters (in.) and associated cost for the sudden demand change (Example 8) Pipe Number 1 2 3 4 5 6 Cost (units) Run Time (min)

Original Diameter (in.) 10 8 8 10 8 8 348,000.00 0.5

Optimal Diameter (in.) 12 8 6 6 6 6 267,000.00 2.5

Table 6.24 displays the corresponding nodal pressure heads for the steady state. These heads fulfill the minimum pressure constraint of 80 ft at all nodes except the reservoirs nodes. The two reservoirs at nodes 5 and 6 have heads of 40 ft. Table 6.24 Pressure heads at nodes for the steady state using the optimal diameters (Example 8) Pressure Head (ft) 1 151.66 2 130.09 3 122.54 4 122.23 5 40 6 40 Pipe 1: Flow Rate = 1712.226 gpm Pipe 4: Flow Rate = 437.774 gpm Node

167

Figure 6.20 pressure head versus time response at all nodes before and after optimization. The dashed curves represent the GASTnet program results of transient-simulation mode using the original network pipes diameters, Table 6.22. It is clear that the pressure fluctuations are very significant and destructive as it crosses the pressure limits of 80-180 ft. The results of the GASTnet program in transient-optimization mode (continuous curves) reveal that the pressure fluctuations have been contained within the predetermined pressure head limits 80-180 ft. This difference between the pressure fluctuations before and after optimization proves the validation of the program. As observed from Fig. 6.20, the convergence to steady state caused by sudden demand change is rapid. The choice of the time of the transient flow simulation as 60 seconds was sufficient to obtain nearly steady state condition at the end of this time.

168

300

200

200

Pressure Head (ft)

Pressure Head (ft)

300

100

100

Node 2

Node 1 After Optimization Before Optimization

0 0

20

40

After Optimization Before Optimization

0

60

0

20

40

300

300

200

200

100

100

Node 3

Node 4

After Optimization Before Optimization

0 0

20

60

Time (s)

Pressure Head (ft)

Pressure Head (ft)

Time (s)

40

After Optimization Before Optimization

0

60

0

Time (s)

20

40

Time (s)

Fig. 6.20 Pressure head versus time for various nodes for the sudden demand change (Example 8)

169

60

6.3

Conclusions The optimization of a transient flow for water distribution systems is

investigated recently. The previous studies were concerned with the optimization of networks under steady state conditions in spite of the fundamental importance of transients. In this study, the genetic algorithm GA coupled with a network solver (Newton-Raphson) and transient analyzer to be used as an optimization method to obtain the optimal diameters in a water distribution system for steady state and transient conditions. The approach was applied on different theoretical examples of different networks. The transient flow is introduced to the water system by the pump power failure, sudden valve closure and sudden demand change. The application of GASTnet optimization program to the examples demonstrates the capability of the GA to find the optimal pipe diameters in a small fraction of the total search space and a reasonable run time in spite of the complicated behavior of fluid transients. The technique of the optimal pipe diameter selection is very economical as the network design can be achieved without using hydraulic devices for water hammer control. This technique is not only crucial to water networks design and performance, but also effective in minimizing costs. As is mentioned in the above sections of this chapter, most of the original piping networks are not operational or suffering from excessive pressure fluctuations under water hammer circumstances. After applying the GA

170

technique; it is obvious that the fluctuations fallen between the water hammer predetermined limits and converges rapidly to the steady state case, all that proves the validation of the integrated program water hammer analyzer and GA technique. The importance of the optimization technique in piping networks designs is concluded as follows:

• Optimize the cost with respect to the operational conditions. In Example 6 the cost was slightly increased, but this is not a factor as the original network was not functional.

• Minimize the use of the water hammer arrestors (related to cost and construction schedule impact of ordering and purchasing such equipments).

• Increase the piping network reliability under water hammer circumstances.

• Decrease the noise resulting from the water hammer event.

171

172

7

CASE STUDY

7.1

Introduction This chapter presents the details of an actual case study, the Nuweiba

desalinated water storage network. Different water hammer causes could be applied to verify the GASTnet program reliability and validity. In this chapter the water hammer event will be introduced in the network by the sudden pump station power failure. This case study is presented to verify and validate the integrated program reliance showing the network pressure fluctuation before and after applying the program.

7.2 Case Study: Nuweiba Desalinated Water Storage Network As shown in Fig. 7.1, the case study used in this chapter is under the cause of water hammer which is pump station power failure. In this case, the set of commercially available pipe diameters (in inches) are (4, 6, 8, 10, 12, 14 and 15) and the corresponding cost per foot length is listed in Table 7.1. Program runs were produced on a computer with Pentium 4 (3.00 GHz) processor and 512 MB of RAM.

173

Tank 2 EL. 75 m

Tank 1

P9

EL. 77 m P11 700 m N8 N7

P8

350 m

N6 N5

P7 P6 4800 m

N4

P4

P5

700 m

P10 P3

N3

N2 EL. 10 m

450 m

950 m

Air Room

Pumps

Washing Room Air & Washing Room

Desalination Unit EL. 0 m

Pipe 12 in Pipe 14 in Non-Return Valve

P1 350 m

N for nodes P for pipes

1850 m P2 EL. 7 m

N1 EL. 5.5 m

Fig. 7.1 Nuweiba desalinated water storage network layout (actual data)

Table 7.1 Nuweiba pipes unit cost Diameter (in.) 4 6 8 10 12 14 15

Cost (Units) 20 40 80 120 150 250 280

174

The case study is based on an actual pre-defined network, Fig. 7.1. The system consists of two tanks, eleven nodes and eleven pipes. There are no demands at all nodes as the purpose of the network is to supply water to the tanks. The network pipes data are given in Tables 7.2 and 7.3. The Hazen-Williams coefficient and wave speed are 120 and 3300 ft/s, respectively. In order to introduce transient conditions into the case study, a variety of possible causes could be selected. For convenience as mentioned above, a pump power failure is chosen to characterize the transient performance of the system. The pump performance curve data for the pump in pipe 1 is defined by the data in Table 7.4 with Q in GPM and H p in ft, and the brake horsepower in hp. The pump runs at 2900 rev/min. For this case and according the given configuration, the required minimum pressure head at all nodes was given the value of 32 ft for the steady state and for the transient conditions, the minimum and maximum pressure heads were given the values of 32 ft and 400 ft, respectively. These values are considered the network minimum requirements; the values are arbitrary values and could be changed in the input files as per the network conditions.

175

Table 7.2 Pipe data for Nuweiba desalinated water storage network Pipe Number 1 2 3 4 5 6 7 8 9 10 11

Start Node

End Node

Pump Station 1 2 3 4 5 6 7 8 4 2

1 2 3 4 5 6 7 8 Tank 2 Tank 1 Tank 1

Length (ft) 1100 5810 2985 1100 3454 3140 3140 3140 2200 3610 2200

Table 7.3 Nodes and reservoir data for Nuweiba desalinated water storage network Node 1 2 3 4 5 6 7 8

Demand (gpm) 0 0 0 0 0 0 0 0

Elevation (ft) 18 32 32 32 32 32 32 32

Reservoir Reservoir 1 Tank 1 Tank 2

Elevation (ft) 0 241.8 235.5

Table 7.4 Pump data for Nuweiba desalinated water storage network No. of Parallel Pumps No. of Stages Rotational Speed (r.p.m.) Rotational Moment of Inertia (lb.ft2) Discharge (gpm) Pressure Head (ft) Power (hp)

2 1 2900 15.8 0 352.27 528.40 704.54 1056.80 1497.14 300.00 298.23 292.32 279.86 220.80 0 30.44 39.56 50.56 61.02 76.17 96.88

176

The transient-simulation mode in GASTnet program was applied to the predefined network with the pipe data as is, the cost of each pipe and the total cost of original network are given in Table 7.5. Using the relevant cost of the actual pipes (12 and 14 inches) and applying the program in transientsimulation mode, it is found the network related cost is as mentioned in Table 7.5 equals 6,352,350 units. The steady state conditions for the original network are given in Table 7.6. In the following paragraphs, after applying the GASTnet program in transient-optimization mode, the cost will show a significant drastic decrease and more efficiency in operation.

Table 7.5 Pipe data and cost for the case study before optimization Pipe Number

Start Node

End Node

1 2 3 4 5 6 7 8 9 10 11

Pump Station 1 2 3 4 5 6 7 8 4 2

1 2 3 4 5 6 7 8 Tank 2 Tank 1 Tank 1

Length Diameter (ft) (in.) 1100 5810 2985 1100 3454 3140 3140 3140 2200 3610 2200

14 14 14 12 12 12 12 12 12 14 14

177

Hazen-Williams Roughness Coefficient 120 120 120 120 120 120 120 120 120 120 120 Total Cost (units) Run Time (min)

Cost (units) 275,000 1,452,500 746,250 165,000 518,100 471,000 471,000 471,000 330,000 902,500 550,000 6,352,350 1

Table 7.6 Pressure heads at nodes for the steady state for Nuweiba desalinated water storage network with original diameters Node 1 2 3 4 5 6 7 8

Pressure Head (ft) 252.58 231.61 230.48 218.30 217.39 214.02 213.19 212.36

Pump 1 in Pipe 1: Discharge = 1678.630 gpm, Head = 268.543 ft

The GASTnet optimization program was applied to the network using the following values for µ GA parameters: Npopsiz = 5, Idum = −5000, Maxgen = 1000 and Nposibl = 16. The mutation and crossover rates were set to 0.2 and 0.5, respectively. For the steady state calculations, the accuracy was 0.0001 ft3/s. The time of the transient flow simulation was taken as 300 s and the hydraulic time step t was 0.04 s. Figure 7.2 depicts the evolution of the solution as the program develops in a single run. A very rapid decrease in the cost value for the first group of evaluation then quite slow changes in the later evaluations is observed.

178

6000000

Cost (unit)

5000000

4000000

3000000

2000000 0

1000

2000

3000

Evaluation Number

4000

5000

Fig. 7.2 Cost units versus evaluation number for the pump power failure for Nuweiba Network

The network containing 11 pipes and with 7 available commercial pipe sizes has a total solution space of 711 = 19.77

108 different network designs. Using

the GA optimization techniques, the number of function evaluations was 4006 to reach the optimal solution and this is only a very small fraction of the total search space (2.03

10-4%).

179

Table 7.7 shows the optimal diameters for the network. The least cost is 2,066,760 units. The run time was approximately 10 minutes and produced on a computer with the above mentioned characteristics. Straightforward comparison to the associated cost before and after optimization shows a significant decrease by 67.5% in cost while satisfying the requirement of the network minimum requirements as mentioned above in this chapter. Table 7.8 displays the corresponding nodal pressure heads for the steady state. These heads fulfill the minimum pressure constraint of 32 ft at all nodes except the reservoirs nodes.

Table 7.7 Nuweiba desalinated water storage network optimal diameters (in.) and cost (units) Optimal Diameter (in.) 6 10 10 6 6 6 6 6 8 6 6 2,066,760 5

Pipe Number 1 2 3 4 5 6 7 8 9 10 11 Cost (units) Run Time (min)

180

Table 7.8 Pressure heads at nodes for the steady state Nuweiba desalinated water storage network with optimal diameters Node 1 2 3 4 5 6 7 8

Pressure Head (ft) 260.95 233.09 231.39 223.84 220.28 217.04 213.80 210.56

Pump 1 in Pipe 1: Discharge = 553.195 gpm, Head = 305.548 ft

Figure 7.3 illustrates the pressure heads against time at all nodes. The curves on the diagrams show both pressure fluctuations: before optimization (dashed curve), and after optimization (continuous curve). As shown in the diagrams, the pump station discharge node, node 1 and node 2 are severely affected by the pump station power failure, significant fluctuations in the pressure heads had occurred. Also, it is obvious that after optimization application, the fluctuations have been included within the predetermined water hammer limits, which is the maximum allowable pressure (400 ft) and minimum allowable pressure (32 ft) to satisfy the network demands. It can be observed that the convergence to steady state associated with the pump power failure is rapid. It is obvious that the pressure heads at all nodes are severely affected by the power failure. The choice of the time of the transient flow simulation as 300 s was seen to be sufficient to obtain nearly steady state condition.

181

400

300

300

Pressure Head (ft)

Pressure Head (ft)

400

200

100

200

100

Pump Station Discharge

Node 1

After Optimization Before Optimization

0 0

100

200

After Optimization Before Optimization

0

300

0

100

200

300

Time (s)

400

400

300

300

Pressure Head (ft)

Pressure Head (ft)

Time (s)

200

100

200

100

Node 3

Node 2

After Optimization Before Optimization

0 0

100

200

After Optimization Before Optimization

0

300

0

Time (s)

100

200

Time (s)

Fig. 7.3 Pressure head versus time for various nodes before and after optimization

182

300

400

300

300

Pressure Head (ft)

Pressure Head (ft)

400

200

100

200

100

Node 5

Node 4 Before Optimization After Optimization

0 0

100

200

After Optimization Before Optimization

0

300

0

100

200

300

Time (s)

400

400

300

300

Pressure Head (ft)

Pressure Head (ft)

Time (s)

200

100

200

100

Node 7

Node 6

After Optimization Before Optimization

0 0

100

200

After Optimization Before Optimization

0

300

0

Time (s)

100

200

Time (s)

Fig. 7.3 (Continued) Pressure head versus time for various nodes before and after optimization

183

300

Pressure Head (ft)

400

300

200

100

Node 8

After Optimization Before Optimization

0 0

100

200

300

Time (s)

Fig. 7.3 (Continued) Pressure head versus time for various nodes before and after optimization

184

7.3

Conclusions As deliberately explained above, one of the most complicated of

routine flow problems in supply pipelines and distribution networks is the analysis of fluid transients. Earlier optimizing techniques for the design of fluid pipelines have tended to focus on the steady state requirements of the system in spite of the fundamental importance of transients. This research obtains optimum selection of pipeline diameters considering transients in the Nuweiba desalinated water storage network. Genetic algorithms are used as an optimization method to obtain the optimal pipe size of the pipeline system. The model shows that reckless design and installation of the piping network can be ineffective for relieving water hammer events, and may even degrade system response. Therefore, the proper size of the piping network, in which water hammer event prevention is highly dependent on the transient condition which is pump station power failure. The optimal selection of pipe diameter is not only essential to system performance and reliability, but also effective in decreasing costs. Nuweiba desalinated water storage network is operating, meaning that all pipe diameters have been selected. Unfortunately, the selected pipe diameters are not the proper ones as it makes the network unsustainable in case of water hammer event and with a very high cost of installation, the cost saving after applying the optimization technique is 67.5%. In our study, we applied the

185

GASTnet program and properly selected the diameters, which can sustain the water hammer event with lower cost. Briefly, by applying the GASTnet optimization program we have got the following benefits: • Avoid pipes rupture due to severe pressure fluctuations in pipes 1 and 2. • Cost drastic decrease by 67.5% by selecting the proper diameters. • Decrease noise due to high vibration in pipes. • And some other benefits not under the current study such as (leaking connections, damaged valves and check valves, damaged water meters, damaged pressure regulators and gauges, damaged recording apparatus, loosened pipe supports, early failure of any other devices). Clearly, repairing any of these conditions "after the fact" is more expensive and inconvenient than designing a system right from the start.

186

8

CONCLUSIONS AND FUTURE WORK

8.1 Conclusions Transient fluid analysis is a complicated problem and so is the optimization of a transient control for water distribution systems. The purpose of this thesis is to obtain the optimal pipe diameter of water distribution systems considering both steady and water hammer. One from the optimization tools, genetic algorithm (GA) is utilized to find optimal pipe diameters in a system with allowance for water hammer conditions. The theoretical examples and case study show that the previous approaches considering steady state design only are inadequate for coping with water hammer events. Therefore, the proper sizing of pipe diameters to prevent water hammer is highly dependent on the transient conditions encountered. The optimal selection of pipe diameter is not only essential to system performance and reliability, but also efficient in decreasing costs. Earlier optimizing techniques for the design of fluid pipelines have tended to focus on the steady state requirements of the system in spite of the

187

fundamental importance of transients. This research obtains optimum selection of pipeline diameters considering transients in the Nuweiba desalinated water storage network. Genetic algorithms are used as an optimization method to obtain the optimal pipe size of the pipeline system. The model shows that reckless design and installation of the piping network can be ineffective for relieving water hammer events, and may even degrade system response. Therefore, the proper size of the piping network, in which water hammer event prevention is highly dependent on the transient condition which is pump station power failure. Briefly, by applying the GASTnet optimization program we have got the following benefits: • GASTnet program has been successfully applied on 8 theoretical networks proving high performance with least cost avoiding using of water hammer arrestors. • The cost saving has been increased by 27.4, 30.6, 27.4, 6.6, 40.5, -13.3, 23.5 and 23.3% in the theoretical Examples 1 through 8, respectively. Not necessarily the optimum cost to be the lowest, such as Example 6. • GASTnet program has been successfully applied on Nuweiba desalinated water storage network; the cost has been decreased by 67.5%. • The adaptive penalty function used in the GASTnet program helps to find least cost solutions in a small run time.

188

• Increase

the

piping

network

reliability

under

water

hammer

circumstances.

8.2 Future Work This work has laid the basic framework for selecting the proper diameter considering cost. Using such simplified scenarios facilitates analytical tractability and groundwork for future research. Some of the possible directions for future research are presented here: 1. A global objective function which considered only standard components is formulated to get a more complete optimization solution. However, for pipeline optimization, the cost function of each component in networks needs to be more fully developed. 2. In this study, the objective function has included only pipe diameter, however; the operational cost, long-tem capital cost as a function of time should be considered to obtain more comprehensive objective function. 3. Various kinds of objective functions can be applied to obtain a specific purpose such as minimize the maximum head, maximize the minimum head, and minimize the difference between the maximum head and minimum head in the system.

189

4. The flow velocity constraint was not considered in the present study in both of steady and transient states. The flow velocity may have a major impact on the pipeline diameter and accordingly the cost. 5. The pipelines wall thickness was assumed constant in this study regardless of the pipe diameter. A more comprehensive study may consider the changes and impacts of the wall thickness on the overall network cost. 6. The minimum and maximum pressure values for the water hammer event were assumed arbitrary values; however, comprehensive and practical values could be used. 7. The water hammer effects in a pump discharge line can be reduced by increasing the size of the discharge line because the velocity changes in the larger pipeline will be less. This concept has not been considered in our study and as the diameter of the pipeline is usually determined from economic consideration based on steady-state pumping conditions; this could be considered in the future works.

190

References [1]

Abdel-Gawad, H.A.A., "Optimal Design of Pipe Networks by an Improved Genetic Algorithm," Proceedings of the Sixth International Water Technology Conference IWTC 2001, Alexandria, Egypt, March 23-25, 2001, pp. 155-163.

[2]

Abebe, A.J., and Solomatine, D.P., "Application of Global Optimization to the Design of Pipe Networks," Proc. 3rd International Conference on Hydroinformatics, Balkema, Rotterdam, Copenhagen, August 1998.

[3]

Alperovits, E., and Shamir, U., "Design of Optimal Water Distribution Systems," Water Resources Research, Vol. 13, No. 6, 1977, pp. 885-900.

[4]

Berghout, B.L., and Kuczera, G., "Network Linear Programming as Pipe Network Hydraulic Analysis Tool," Journal of Hydraulic Engineering, ASCE, Vol. 123, No. 6, 1997, pp. 549-559.

[5]

Bhave, P.R., "Optimal Expansion of Water Distribution Systems," Journal of the Environmental Engineering, ASCE, Vol. 111, No. 2, 1985, pp. 177-197.

[6]

Bhave, P.R., and Sonak, V.V., "A Critical Study of the Linear Programming Gradient Method for Optimal Design of Water Supply Networks," Water Resources Research, Vol. 28, No. 6, 1992, pp. 1577-1584.

[7]

Busetti, F., "Genetic Algorithms Overview," 2007, [Online document] Available at: http://www.geocities.com/francorbusetti/gaweb.pdf

191

[8]

Castillo, L., and González, A., "Distribution Network Optimization: Finding the Most Economic Solution by using Genetic Algorithms," European Journal of Operational Research, Vol. 108, 1998, pp. 527537. http://hera.ugr.es/doi/15018799.pdf

[9]

Cenedese, A., Gallerano, F., and Misiti, A., "Multiobjective Analysis in Optimal Solution of Hydraulic Networks," Journal of Hydraulic Engineering, ASCE, Vol. 113, No. 9, 1987, pp. 1133-1143.

[10]

Churchill, S.W., "Friction Factor Equations Spans All Fluid-Flow Regimes", Chemical Engineering, Vol. 84, 1977, pp. 91-92.

[11]

Cunha, M.D.C., and Sousa, J., "Water Distribution Network Design Optimization: Simulated Annealing Approach," Journal of Water Resources Planning and Management, ASCE, Vol. 125, No. 4, 1999, pp. 215-221.

[12]

Dandy, G.C., and Engelhardt, M., "Optimal Scheduling of Water Pipe Replacement using Genetic Algorithms," Journal of Water Resources Planning and Management, ASCE, Vol. 127, No. 4, 2001, pp. 214-223.

[13]

Dandy, G.C., Simpson, A.R., and Murphy, L.J., "An Improved Genetic Algorithm for Pipe Network Optimization," Water Resources Research, Vol. 32, No. 2, 1996, pp. 449-458.

[14]

Deb, A.K., and Sarkar, A.K., "Optimization in Design of Hydraulic Networks," Journal of the Sanitary Engineering Division, ASCE, Vol. 97, No. SA2, 1971, pp. 141-159.

[15]

Deboeck, G. J., (Editor), Trading on the Edge: Neural, Genetic, and Fuzzy Systems for Chaotic Financial Markets, Wiley, 1994.

192

[16]

Djebedjian, B., "Reliability-Based Water Network Optimization for Steady State Flow and Water Hammer," Proceedings of IPC2006, 6th International Pipeline Conference, September 25-29, 2006, Calgary, Alberta, Canada, IPC00-10234.

[17]

Djebedjian, B., Abdel-Gawad, H.A.A., Ezzeldin, R., Yaseen, A., and Rayan, M.A., "Evaluation of Capacity Reliability-Based and Uncertainty-Based Optimization of Water Distribution Systems," Proceedings of the Eleventh International Water Technology Conference IWTC11, Sharm El-Sheikh, Egypt, March 15-18, 2007, pp. 565-587.

[18]

Djebedjian, B., Herrick, A., and Rayan, M.A., "An Investigation of the Optimization of Potable Water Network," Proceedings of the Fifth International Water Technology Conference IWTC 2000, Alexandria, Egypt, 2000, pp. 61-72.

[19]

Djebedjian, B., Mondy, A., Mohamed, M.S., and Rayan, M.A., "Network Optimization for Steady Flow and Water Hammer using Genetic Algorithms," Proceedings of the Ninth International Water Technology Conference IWTC 2005, Sharm El-Sheikh, Egypt, 17-20 March, 2005a, pp. 1101-1115.

[20]

Djebedjian, B., Yaseen, A., and Rayan, M.A., "A New Adaptive Penalty Method for Constrained Genetic Algorithm and its Application to Water Distribution Systems," Proceedings of the Ninth International Water Technology Conference IWTC 2005, Sharm ElSheikh, Egypt, 17-20 March, 2005b, 1077-1099.

[21]

Djebedjian, B., Yaseen, A., and Rayan, M.A., "Optimization of Large Water Distribution Network Design using Genetic Algorithms," Proceedings of the Tenth International Water Technology Conference, IWTC 2006, Alexandria, Egypt, 23-25 March, 2006a, pp. 447-477.

193

[22]

Djebedjian, B., Yaseen, A., and Rayan, M.A., "A New Adaptive Penalty Method for Constrained Genetic Algorithm and its Application to Water Distribution Systems," Proc. of International Pipeline Conference and Exposition 2006, Calgary, Alberta, Canada, 25-29 September, 2006b, IPC2006-10235.

[23]

Eiger, G., Shamir, U., and Ben-Tal, A., "Optimal Design of Water Distribution Networks," Water Resources Research, Vol. 30, No. 9, 1994, pp. 2637-2646.

[24]

Electronic Book of Optimization, Computational Science Education Project. http://www.phy.ornl.gov/csep/CSEP/MO/NODE2.html

[25]

Featherstone, R.E., and El-Jumaily, K.K., "Optimal Diameter Selection for Pipe Networks," Journal of Hydraulic Engineering, ASCE, Vol. 109, No. 2, 1983, pp. 221-234.

[26]

Fujiwara, O., and Dey, D., "Two Adjacent Pipe Diameters at the Optimal Solution in the Water Distribution Network Models," Water Resources Research, Vol. 23, No. 8, 1987, pp. 1457-1460.

[27]

Fujiwara, O., and Dey, D., "Method for Optimal Design of Branched Networks on Flat Terrain," Journal of the Environmental Engineering, ASCE, Vol. 114, No. 6, 1988, pp. 1465-1475.

[28]

Fujiwara, O., and Khang, D.B., "A Two-Phase Decomposition Method for Optimal Design of Looped Water Distribution Networks." Water Resources Research, Vol. 26, No. 4, 1990, pp. 539-549.

[29]

Fujiwara, O., Jenchaimahakoon, B., and Edirisinghe, N.P., "A Modified Linear Programming Gradient Method for Optimal Design of Looped Water Distribution Networks," Water Resources Research, Vol. 23, No. 6, 1987, pp. 977-982.

194

[30]

Goldberg, D.E., Genetic Algorithms in Search, Optimization and Machine Learning, Addison-Wesley Reading, Mass., 1989.

[31]

Gupta, I., Gupta, A., and Khanna, P., "Genetic Algorithm for Optimization of Water Distribution Systems," Environmental Modelling & Software, Vol. 14, 1999, pp. 437-446.

[32]

Halcrow Water Services Ltd, Snodl and Kent ME6 5AH., "Optimisation of Water Distribution Systems". http://www.halcrowws.com/optimatics

[33]

Holland, J.H., Adaptation in Natural and Artificial Systems, MIT Press, 1975.

[34]

Jung, B.S., and Karney, B.W., "Fluid Transients and Pipeline Optimization using GA and PSO: the Diameter Connection," Urban Water Journal, Vol. 1, No. 2, June, 2004a, pp. 167-176.

[35]

Jung, B.S., and Karney, B.W., "Transient State Control in Pipelines using GAs and Particle Swarm Optimization," Proc. of 6th International Conference on Hydroinformatics, Singapore, 21-24 June, 2004b.

[36]

Jung, B.S., and Karney, B.W., "Optimum Selection of Hydraulic Devices for Water Hammer Control in the Pipeline Systems using Genetic Algorithm," 4th ASME_JSME Joint Fluids Engineering Conference, Honolulu, Hawaii, USA, July 6-11, 2003, Paper FEDSM2003-5262.

[37]

Kaya, B., and Güney, M.S., "An Optimization Model and WaterHammer for Sprinkler Irrigation Systems," Turkish Journal of Engineering and Environmental Sciences, Vol. 24, 2000, pp. 203-215.

[38]

Keedwell, E., and Khu, S.T., "A Hybrid Genetic Algorithm for the Design of Water Distribution Networks," Engineering Applications of Artificial Intelligence, Vol. 18, 2005, pp. 461-472.

195

[39]

Kessler, A., and Shamir, U., "Analysis of the Linear Programming Gradient Method for Optimal Design of Water Supply Networks," Water Resources Research, Vol. 25, No. 7, 1989, pp. 1469-1480.

[40]

Krishnakumar, K., "Micro-Genetic Algorithms for Stationary and Non-Stationary Function Optimization," Proc. Soc. Photo-Opt. Instrum. Eng. (SPIE) on Intelligent Control and Adaptive Systems, Vol. 1196, Philadelphia, PA, 1989, pp. 289-296.

[41]

Laine, D.A., and Karney, B.W., "Transient Analysis and Optimization in Pipeline – A Numerical Exploration," 3rd International Conference on Water Pipeline Systems, Edited by R. Chilton, 1997, pp. 281-296.

[42]

Lansey, K.E., and Mays, L.W., “Optimization model for Water Distribution System Design.” Journal of Hydraulic Engineering, ASCE, Vol. 115, No. 10, 1989, pp. 1401-1418.

[43]

Larock, B.E., Jeppson, R.W., and Watters, G.Z., Hydraulics of Pipeline Systems, CRC Press LLC, New York, 2000.

[44]

Liong, S-Y., and Atiquzzaman, Md., "Optimal Design of Water Distribution Network using Shuffled Complex Evolution," Journal of the Institution of Engineers, Singapore, Vol. 44, Issue 1, 2004, pp. 93107. http://www.ies.org.sg/journal/past/v44i1/v44i1_7.pdf

[45]

Lippai, I., Heaney, J.P., and Laguna, M., "Robust Water System Design with Commercial Intelligent Search Optimizers," Journal of Computing in Civil Engineering, ASCE, Vol. 13, No. 3, 1999, pp. 135-143.

[46]

Luong, H.T., and Nagarur, N.N., "Optimal Replacement Policy for Single Pipes in Water Distribution Networks," Water Resources Research, Vol. 37, No. 12, 2001, pp. 3285-3293.

196

[47]

Man, K.F., Tang, K.S., and Kwong, S., Genetic Algorithms: Concepts and Designs, Springer-Verlag, New York, Inc., 1999.

[48]

Morley, M.S., Atkinson, R.M., Savi , D.A., and Walters, G.A., "GAnet: Genetic Algorithm Platform for Pipe Network Optimization," Advances in Engineering Software, Vol. 32, 2001, pp. 467-475.

[49]

Murphy, L.J., Gransbury, J., Simpson, A.R., and Dandy, G.C., "Optimisation of Large-Scale Water Distribution System Design using Genetic Algorithms," WaterTECH Conference, Proc. (on CD-ROM), AWWA, Brisbane, April 1998.

[50]

Quindry, G.E., Brill, E.D., and Liebman, J.C., "Optimization of Looped Water Distribution Systems," Journal of the Environmental Engineering Division, Vol. 107, No. EE4, 1981, pp. 665-679.

[51]

Reis, L.F.R., Porto, R.M., and Chaudhry, F.H., "Optimal Location of Control Valves in Pipe Networks by Genetic Algorithm," Journal of Water Resources Planning and Management, ASCE, Vol. 123, No. 6, 1997, pp. 317-326.

[52]

Rouse, H., and Ince, S., History of Hydraulics, Dover Publication, New York, 1963.

[53]

Sakarya, B.A., and Mays, L.W., "Optimal Operation of Water Distribution Pumps Considering Water Quality," Journal of Water Resources Planning and Management, ASCE, Vol. 126, No. 4, 2000, pp. 210-220.

[54]

Samani, H.M.V., and Naeeni, S.T., "Optimization of Water Distribution Networks," Journal of Hydraulic Research, Vol. 34, No. 5, 1996, pp. 523-632.

197

[55]

Sârbu, I., and Borza, I., "Optimal Design of Water Distribution Networks," Journal of Hydraulic Research, Vol. 35, No. 1, 1997, pp. 63-79.

[56]

Sastry, K., "Evaluation-Relaxation Schemes for Genetic and Evolutionary Algorithms," Master Thesis, University of Illinois at Urbana-Champaign, Urbana, Illinois, 2001. http://www.kumarasastry.com/wp-content/files/2002004.pdf

[57]

Savic, D.A., and Walters, G.A., "Genetic Algorithms for Least-Cost Design of Water Distribution Networks," Journal of Water Resources Planning and Management, ASCE, Vol. 123, No. 2, 1997, pp. 67-77.

[58]

Schaake, J., and Lai, D., "Linear Programming and Dynamic Programming Applications to Water Distribution Network Design," Report 116, Dept. of Civ. Engrg., Massachusetts Inst. of Technol., Cambridge, Mass., 1969.

[59]

Simpson A.R., Dandy, G.C., and Murphy, L.J., "Genetic Algorithms Compared to other Techniques for Pipe Optimization," Journal of Water Resources Planning and Management, Vol. 120, No. 4, 1994, pp. 423-443.

[59a]

Simpson, A.R., and Goldberg, D.E., "Pipeline Optimization via Genetic Algorithms: From Theory to Practice," Proceedings of 2nd International Conference on Water Pipeline Systems, Edinburgh, Scotland, 24-26 May, 1994, pp. 309-320.

[60]

Sonak, V.V., and Bhave, P.R., "Global Optimum Tree Solution for Single-Source Looped Water Distribution Networks Subjected to a Single Loading Pattern," Water Resources Research, Vol. 29, No. 7, 1993, pp. 2437-2443.

198

[61]

Swamee, P.K., and Khanna, P., "Equivalent Pipe Methods for Optimization Water Networks-Facts and Fallacies," Journal of the Environmental Engineering Division, ASCE, Vol. 100, No. EE1, 1974, pp. 93-99.

[62]

Taher, S., and Labadie, J.W., "Optimal Design of Water Distribution Networks with GIS," Journal of Water Resources Planning and Management, ASCE, Vol. 122, No. 4, 1996, pp. 301-311.

[63]

Van Vuuren, S.J., "Application of Genetic Algorithms Determination of the Optimal Pipe Diameters," Water SA, Vol. 28, No. 2, April 2002, pp. 217-226. http://www.wrc.org.za/archives/watersa archive/2002/April/1435.pdf

[64]

van Zyl, J.E., Savic, D.A., and Walters, G.A., "Operational Optimization of Water Distribution Systems using a Hybrid Genetic Algorithm," Journal of Water Resources Planning and Management, ASCE, Vol. 130, No. 2, 2004, pp. 160-170.

[65]

Vairavamoorthy, K., and Ali, M., "Optimal Design of Water Distribution Systems using Genetic Algorithms," Computer-Aided Civil and Infrastructure Engineering, Vol. 15, 2000, pp. 374-382.

[66]

Wardlaw, R., and Sharif, M., "Evaluation of Genetic Algorithms for Optimal Reservoir System Operation," Journal of Water Resources Planning and Management, ASCE, Vol. 125, No. 1, 1999, pp. 25-33.

[67]

Watters, G.Z., Analysis and Control of Unsteady Flow in Pipelines, 2nd Edition, Butterworth Publishers, 1984.

[68]

Wood, F.M., "History of Water Hammer," Research No. 65, Department of Civil Engineering, Queens University, Kingston, Ontario, 1970.

199

[69]

Wu, Z.Y., and Simpson, A.R., "Competent Genetic-Evolutionary Optimization of Water Distribution Systems," Journal of Computing in Civil Engineering, Vol. 15, No. 2, 1997, pp. 89-101.

[70]

Wu, Z.Y., and Simpson, A.R., "A Self-Adaptive Boundary Search Genetic Algorithm and its Application to Water Distribution Systems," Journal of Hydraulic Research, Vol. 40, No. 2, 2002, pp. 191-203.

[71]

Wylie, E.B., Streeter, V.L., and Suo, L., Fluid Transients in Systems, Englewood Cliffs, New Jersey, U.S.A., 1993.

[72]

Yu, T.C., Zhang, T.Q., and Li, X., "Optimal Operation of Water Supply Systems with Tanks Based on Genetic Algorithm," Journal of Zhejiang University SCIENCE, 2005, Vol. 6A(8), pp. 886-893. http://www.zju.edu.cn/jzus/2005/A0508/A050815.pdf

[73]

Zhang, Z., "Fluid Transients and Pipeline Optimization using Genetic Algorithms," Master Thesis, University of Toronto, Canada, 1999. http://www.collectionscanada.ca/obj/s4/f2/dsk1/tape8/PQDD_0003/MQ45941.pdf

200

APPENDIX A

Appendix A

GENETIC ALGORITHMS PARAMETERS USED IN THE CALCULATIONS OF DIFFERENT NETWORKS Table A1. Genetic Algorithms parameters used in the calculations of different networks Network Example 1 Example 2 Example 3 Example 4 Example 5 Example 6 Example 7 Example 8 Case Study

Maxgen 1000 1000 1000 1000 1000 1000 1000 1000 1000

Npopsiz 5 5 5 5 5 5 5 5 5

Nposibl 16 16 16 16 16 16 16 16 16

Idum − 5000 − 7000 − 10000 − 5000 − 5000 − 5000 − 5000 − 10000 − 5000

RMUT 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.2

CROSS 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5

Example 1: Pump Station Power Failure in a Pipe Network with One Pump Example 2: One Pump Power Failure in a Pipe Network with Two Pumps Example 3: Alternative Pump Power Failure in a Pipe Network with Two Pumps Example 4: Two Pumps Power Failure in a Pipe Network with Two Pumps Example 5: Sudden Valve Closure in a Pipe Network with One Pump Example 6: Sudden Valve Closure in a Pipe Network with Two Pumps Example 7: Sudden Demand Change in a Pipe Network with Two Pumps Example 8: Sudden Demand Change in a Pipe Network without Pumps Case Study: Nuweiba Desalinated Water Storage Network

201

ARABIC SUMMARY

! " #$ % 5"

)6

(

)

* +, > % ?@ ;& )

%E

=/

A FG

* +, -% "-89 1

1

. * /0" 12 3 45 ( & ' # :;/< 1

BC 3 9

H IJ

+, > " #$ %

H1

( & '#

. * /0" 12 3 7

Q

K

8 D,

L9 =/ , 6 M9N O" , 4

6P $ ( , 5

HL$J H IJ

S7R2 A

B3 9% 49 8+ ) / +, > " #$ % T /" P % V1GW % $ % T / M2

+, > * ,# /NM 5 " ,

H =/ , < , #9U9(XRY5 (H 4 < , # K H ;,1

/) /

^ $1 H ]CI /"

Z

_Z M/` #

J" #$ % T / " P =/ , b$ ; . N 1 ;/ & ' # 8/`1

%

U9 5"

)6 H

H 6PJ ;/ M 2 H& ' #

HM < 9[4/

/ Y, / \ Q. 3, O 9 +, -H

=/

H M2

&/' :

Q];/

\

Q) / +, -H H 4 < , # U9

+, > V T /J 8/I

5"

6 H

K, ,5 &/' # +, > a 49U9 +, > )6 H ( L/ ( &/' : 6 %

9H

QK " $ T E

M5 /)

#

&.M

M+9%$

1+9D

+, >

( M 2/V1GW * ERY5 8/ +, > * ,# /

202

5 c 2/ (

e ,5J

9)

_ZM/ G9

; 019 % * +,-

/

J

;9 1$ MZ"

1d / d 7 P Y 8/Ud H (U L 6Pf D

9 1d / d 7 P1

(;& FGW ",

W8 ",1

_ZM/ G9H]CIf ?6

*6P h]YIM9 +/g K

M 2/' : 4 &/' :

* Z Q ; . H 1 %+> % 49D

M

Qi

+, >

)

. * /0" 12 (% Q%

%T / " P b1 9 % A

1 ./ 1 +9)6 \

j 4 5RQ W

( M2 A

N

)

+, >

;019* +, - 5"I1

// )6

W M A \

\

e1 #

%E> %

i G

+, > " #$ 3O 5

H *lE" K.9*

203

+, > )6

M9% Q 1 ./

1 ./ %T /J

. * /0" 12 ( M 2 (

/ 8 >4 " /H

]* +, >

1 ./8 8/% T /J " P %&5 C Q]

M K 4 ./ " P U

L 4 /3 E

5

. * /0" 12 b 2 5 U9 5"

W 4 *" 2 8/

+, > *Z Q

;&

J" #$ %T / ;/KM+9%$ H][171 " ,

8 D ,

5"I

& '#

* +, - 5"IU9 5"

( M2 H

& '#

, Ek $

T

J V1#P* +, -* 5"Ij k 9 * 5"

(mh8/e

/

W

+ ,- . # . / .)0 1 .)2)%2) 3 4 . &567

& %%$ $ *

+

%

%# $ "

)

'

! (

)

) )# *"# $ %&' ( ) ) 2008

!

)89 + 6 .))

) < = ! => ?@ A B0*C

D)

E


.)J

5K

!

!

!

!

!

!

!

Q% ,

L -+

M N

!

R

!

"

$

%

# &!

'

(

&!

'

(

)

& *