Automated simplification of water networks models

44
Automated simplification of water networks models Internship report - Master 2 CCI Kamelia BOUSSAFEUR-LAMOUDI August 2013 Directed by: Dr. Jean-Louis Bergerand - Schneider-Electric/Analytics for Solutions Dr. Fabienne Carrier - Universit´ e Joseph Fourier / UFR-IM 2 AG

Transcript of Automated simplification of water networks models

Page 1: Automated simplification of water networks models

Automated simplification of waternetworks models

Internship report - Master 2 CCI

Kamelia BOUSSAFEUR-LAMOUDI

August 2013

Directed by:Dr. Jean-Louis Bergerand - Schneider-Electric/Analytics for SolutionsDr. Fabienne Carrier - Universite Joseph Fourier / UFR-IM2AG

Page 2: Automated simplification of water networks models
Page 3: Automated simplification of water networks models

Abstract

This report presents the work realized at Schneider Electric during my internship of Mas-ter’s degree in Consolidation Training in Computer Science at the Universite Joseph Fourier.This internship covers two domains, hydraulics and information technology. The objec-tive is to create a tool for simplification of water distribution networks models. The com-pany profile, the project handled and the work realized are described later on through thisdocument.

Acknowledgments

First of all, I would like to thank my main supervisor Jean-Louis Bergerand for his helpand guidance. I also thank Veronique Boutin who welcomed me and introduced theproject. I am grateful to Alfredo Samperio who ensured that I had all necessary tools todo my work. A special thank to my colleague and husband Yacine Lamoudi who helpedme format this document. Finally, I thank my second supervisor Fabienne Carrier for hercomments on the document.

Page 4: Automated simplification of water networks models
Page 5: Automated simplification of water networks models

Contents

Introduction 4

1 Description of the project 51.1 Context of the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.1.1 Schneider-Electric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1.2 The internship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.1.3 Issue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.2 Description of the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2.1 Goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2.2 Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2.3 Organization of work . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 Water networks 102.1 Water network modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2 Water network simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.3 Water network simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3 Water network simplification tool 203.1 Requirements and constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2 Description of the input file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.3 Class diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233.4 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.4.1 The algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.4.2 Parsing the input file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.4.3 Parsing the Excel file . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.4.4 Simplification process . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.4.5 Preliminary results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Conclusion 30

Bibliography 32

Appendix A Sections of input file 33

1

Page 6: Automated simplification of water networks models

List of Figures

1.1 Demand Response for water networks . . . . . . . . . . . . . . . . . . . . . . 7

2.1 Water network topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.2 Simulation of water networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.3 Removal of trees simplification . . . . . . . . . . . . . . . . . . . . . . . . . . 172.4 Pipes in series simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.5 Parallel pipes simplification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.1 Input file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.2 Class diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243.3 Overall algorithm - Main steps . . . . . . . . . . . . . . . . . . . . . . . . . . 25

2

Page 7: Automated simplification of water networks models

List of Tables

1.1 Internship stages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1 water network components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.1 Input file sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.2 Modifications of input file sections . . . . . . . . . . . . . . . . . . . . . . . . 22

3

Page 8: Automated simplification of water networks models

Introduction

This document is my five-month internship report carried out within Schneider ElectricCompany. The internship is concerned with simplification of water network models givenby Aquis which is a software used for simulating water networks behavior. This simplifi-cation aims to reduce energy optimization computing times.

Goal

The objective of this report is to describe the aims of the project, methodology followedand work realized. It also gives perspectives for an eventual continuation of the project.

Scope

This document is the final report intended to the master jury but it is not the final report ofthe project since more than a month remains to finalize the project. The final deliverables(specifications, mock-up and partial implementation) will complete this report.

Document structure

This report consists of three parts. First, background of the project is introduced, as wellas its objectives and organization. Then, an overview on water networks and their simpli-fications is given. Finally, the simplification algorithm implemented is described.

4

Page 9: Automated simplification of water networks models

Chapter 1

Description of the project

1.1 Context of the project

1.1.1 Schneider-Electric

Schneider Electric is a global specialist in energy management. With more than 130 000employees in over 100 countries, Schneider Electric offers integrated solutions for manymarket segments. Schneider Electric sales for 2012 reached e24 billion. Products andservices solutions cover [2]:

• Processes control and supervision

• Power supply and distribution

• Energy monitoring and control

• Utility management (lighting, ventilation, elevators, intruder alert, etc.)

• Smart electrical networks management

• Single site or multi-site production data management

• Critical power

• Offer prepayment systems that bring electricity to disadvantaged customers

1.1.2 The internship

The work presented in this report is part of the Arrowhead project. This 4-year projectstarted on March 1st 2013. Arrowhead project addresses energy efficiency and flexibleusage of energy through cooperative automation. More than 70 partners are involvedin the project. The contribution of Schneider Electric concerns three applications; water,manufacturing and elevators.

5

Page 10: Automated simplification of water networks models

The objective of Arrowhead project is to [1]:

• provide a technical framework adapted in terms of functions and performances;

• propose solutions for integration with legacy systems;

• implement and evaluate the cooperative automation through real experimentation;

• point out the accessible innovations thanks to new services;

• lead the way to further standardization work.

I did my internship among the team ”Analytics for solutions” which works on theArrowhead project. The team is responsible for developing pilots in the three domains:water, manufacturing and elevators.

1.1.3 Issue

Energy costs related to water production and transportation represent most of operatingcosts. However, some modulation in electricity consumption is possible thanks to largevolume of water storage in water networks and flexibility in managing pumping plans.Indeed, network tanks are very useful because of varying demands for water and the var-ious prices of consumption of electric energy [5]. The reserves stored in them are used inperiods of high demands and high energy prices. The possibility of accumulating waterin tanks and the fact that there are different prices of energy for different intervals of theday and night make possible to manage the system in such a way that the costs of energyused in the pumping stations are as low as possible [5].

Thus water networks offer a real opportunity for both energy efficiency and DemandResponse. Demand Response is an electric market mechanism which enables energy con-sumers to participate in energy markets by modifying their consumption profiles. Thesemodifications enable them to take advantage from low energy price periods and earn theirmoney back by curtailing energy load at peak times and returning it back to power grid.

One of Schneider Electric’s objectives in Arrowhead project is to turn this operationflexibility of the water network into an energy consumption flexibility offer, to decreaseoperational costs by means of new control systems and analytic decision making tools.

Schneider-Electric’s solution consists of calculating and managing Demand Responseoffers on the water network by combining network hydraulic simulation, demand fore-cast, energy price forecast and optimization techniques. First, prevision on pumpingschedule is done. When compared to the current pumping schedule, an eventual modula-tion is provided. Both prevision and modulation are updated in real time. The consumercan then propose a number of valuable services to service aggregator. The aggregator is aservice provider that creates and manages pools representing energy-buying alliance andensures purchase at the most competitive prices.

6

Page 11: Automated simplification of water networks models

Figure 1.1: Demand Response for water networks(reference:Schneider Electric)

Hydraulic simulation uses Aquis which is a tool marketed by Schneider Electric andthe optimization is performed by Artelys which is a partner in Arrowhead project. Bothpartners work on optimizing pumping schedules on an existing water network (Birkerodtown in Denmark). In the future, they aim to do optimization for any water network. Aswater systems are more or less large, solving the optimization problem can become diffi-cult. This is due to the non-linear equations that describe the behavior of the system (thisis detailed further in this document). Thus, simplification of water system models is veryuseful. Actually, aggregated-simplified- models require less computation time and pro-vide all information needed for the optimization. Hence they speed up the optimizationprocess and allow bigger models to be calculated [6].

7

Page 12: Automated simplification of water networks models

1.2 Description of the project

1.2.1 Goal

This work is concerned with automated simplification of water network models in orderto speed up optimization computing. It concerns the topological reduction of the network.An input file (a file with .inp extension) is generated from Aquis. This file contains data ofthe network. The aim is to create a tool that modifies this file in order to obtain a less com-plex network. This simplified network must maintain all operating controls unchanged.Input file of the simplified network obtained will be used to perform optimization.

1.2.2 Approach

The work consists of the following steps:

• Import network data (geometry, elements and demands) from Aquis through inputfile

• Perform automated simplification

• Export results to Aquis through a new input file

• Simulate the simplified model on Aquis

• Compare simulation results of simplified model to those of the initial model

• Validate the algorithm based on these results

1.2.3 Organization of work

Table 1.1 summarizes the steps I followed during the internship to realize the differenttasks

8

Page 13: Automated simplification of water networks models

] Step Duration Beginning End Realized(days) (%)

1

Introduction to project

27 05/06/2013 06/11/2013 100Software installationProcurement of licenses

Preliminary study

2 Bibliography 23 06/12/2013 07/12/2013 100Spec. of simplification methods

3 Specification of .inp file 20 06/17/2013 07/12/2013 100Learning how to use Aquis

4 Class diagram 15 06/24/2013 07/18/2013 100Spec. of simplification algorithms 19 06/24/2013 07/12/2013 100

5 Implementation of algorithms 53 07/18/2013 09/30/2013 506 Research of innovative simplifications 21 09/02/2013 09/30/2013 07 Realize a mock-up for these methods 16 09/09/2013 09/30/2013 08 Report writing 55 06/17/2013 08/30/2013 1009 Preparation of the presentation 10 08/26/2013 09/05/2013 10

Table 1.1: Internship stages

9

Page 14: Automated simplification of water networks models

Chapter 2

Water networks

An overview on water systems is required for a good understanding of how the createdtool works. The basic task of a water distribution system is to provide the consumers withthe needed amount of water from the source with a suitable pressure especially duringpeak demand periods.Moving water from the source to the customer requires a network of pipes, pumps, valves,and other appurtenances [4]. Storing water to accommodate fluctuations in demand, dueto varying rates of usage or fire protection needs, requires storage facilities (tanks) [4].Piping, storage, and the supporting infrastructure are together referred to as the ”waterdistribution system” [4].Water supply provided through the network must be with as little pipe leakage as possible[6].So, a suitable compromise must be found by optimizing the schedules of the controldevices in the network (pumps and valves) [6].The configuration of a water network is dictated by:

• Topography

• Street patterns

• Development of the area (number of inhabitants, types of activities...)

• Location of sources, treatment and storage works

Water networks can be either branched and/or looped (see Figure 2.1). In branchedsystems, water has only one path from the source to consumers. In looped systems, theremay be several paths. This is very useful because it allows isolation of a part of the net-work without depriving all consumers of water.

10

Page 15: Automated simplification of water networks models

(a) (b)(a) (b)

Figure 2.1: Water network topology. (a) looped system, (b) branched system

Type Element function

NodeJunction Removes water from the system (demand)

Reservoir Provides water to the system (source)Tank Stores water to meet peak demand

LinkPipe Transports water from one node to another

Pump Raises hydraulic head in case of elevation differences and friction lossesValve Controls flow and/or pressure

Table 2.1: water network components

2.1 Water network modeling

Water network model contains all of the various components of the system, and defineshow those elements are interconnected [4].

Modeling is mainly used for: sizing of piping improvements, analysis of system pres-sures, storage capacity analysis, fire flow analysis, scheduling of pumping, water qualityand water age analysis, emergency response planning, vulnerability analysis, transientanalysis and leak identification [9].

Networks models are comprised of nodes, which represent features at specific loca-tions within the system, and links, which define relationships between nodes [4]. Thetable 2.1 lists the elements of network models.

Some models consider controls to be separate modeling elements, and others considerthem to be an attribute of the pipe, pump or valve being controlled [4].

11

Page 16: Automated simplification of water networks models

(a)

(b)

Figure 2.2: Simulation of water networks. (a) water network in Epanet. (b) water networkin Aquis

The specific properties of water networks models are determined by the non-linearhead-flow relationships of its components (pipes, pumps, valves and reservoir dynamics).Some of network nodes have known hydraulic grade elevations; they represent boundaryconditions [4].

The non-linearity of hydraulic models makes the optimization time consuming whenthe network becomes large. Actually, the governing laws for flow in pipe systems understeady conditions are conservation of mass and conservation of energy.

Conservation of massAs described in [7], the law of conservation of mass states that the rate of storage in a sys-tem is equal to the difference between the inflow and outflow to the system. In pressurizedwater distribution networks, no storage can occur within the pipe network, although tankstorage may change over time. Therefore, in a pipe, another component or a node (theinflow and outflow) must balance.The equilibrium of volumetric flow rates of all pipes connected to the node is calculatedusing the following equation

Njp∑

i=1Qj

i = qj (2.1)

whereQj

i = flow in pipe i connected to node j

12

Page 17: Automated simplification of water networks models

qj = demand at node jN j

p = number of pipes connected to node j

The value of Q is positive for pipe inflows to the node and negative for pipe outflows fromthe node.

Conservation of energyAlso according to [7], conservation of energy states that the difference in energy betweentwo points is equal to the frictional and minor losses, and the energy added to the flow incomponents between these points. An energy balance can be written for paths betweenthe two end points of a single pipe, between two fixed-grade nodes through a series ofpipes, valves and pumps, or around a loop that begins and ends at the same point. In ageneral form for any path,

∑i∈Np

hL,i +∑

j∈Npu

hp,j = ∆E (2.2)

wherehL,i = head loss across component i along the pathhp,j = head added by pump j∆E = difference in energy between the end points of the pathNp = number of pipes in the pathNpu = number of pumps in the path

Signs are applied to each term in equation (2.2) to account for the direction of flow. Acommon convention is to determine flow directions relative to moving clockwise aroundthe loop. A pipe or another element of energy loss with flow in the clockwise directionwould be positive in Equation (2.2), and flows in the counterclockwise direction are givena negative sign. A pump with flow in the clockwise direction would have a negative signin Equation (2.2), whereas counterclockwise flow in a pump would be given a positivesign.

Head loss in pipes can be expressed by a number of empirical formulas. The generalrelationship is of the form

hL = rQn (2.3)

wherer = pipe resistancePipe resistance is only dependent on pipe characteristics (roughness, diameter and length)The following formulas are the most used in network simulators:

Darcy-Weisbach formula

hL = 8fLgD5π2Q

2 (2.4)

13

Page 18: Automated simplification of water networks models

wherehL = head loss due to friction (L)f = Darcy-Weisbach friction factorg = gravitational acceleration constant (L/T2)Q = pipeline flow rate (L3/T)

Hazen-Williams formula

hL = CfL

C1.852D4.87Q1.852 (2.5)

wherehL = head loss due to friction (L)L = pipe length (L)C = Hazen-Williams C-factorD = diameter (L)Q = pipeline flow rate (L3/T)Cf = unit conversion factor (4.73 English, 10.7 SI)

Chezy-Manning formula

hL = CfLn2

D5.33 Q2 (2.6)

wherehL = head loss due to friction (L)Cf = unit conversion factor (4.66 English, 10.29 SI)L = pipe length (L)n = Manning roughness coefficientD = diameter (L)Q = pipeline flow rate (L3/T)

Relationship between head loss and flow can also be written as follows

Q = khmL (2.7)

whereQ = the flowhL = head lossm = 1/nk is the pipe conductancek = 1/rm (r is the pipe resistance)

In addition to pipes, water networks contain pumps and valves. Common equations forapproximating a pump curve are

hp = AQ2 +BQ+ C (2.8)

14

Page 19: Automated simplification of water networks models

where Q is the flow and A,B, and C are constants

Head loss in valves and other fittings is of the form [7]

hm = kv

2gA2Q2 (2.9)

where hm is the head loss, A is the flow section, kv is an empirical coefficient and Q is theflow

The equations described above are used for the resolution of the optimization problem.Thus if the number of equations is reduced, the resolution will be less time consuming.This is realized through network simplification. Not all the equations will serve the sim-plification. Only pipe resistance and pipe conductance are computed and modified (thiswill be described further in this document). Note that their expressions differ dependingon formula used.

2.2 Water network simulation

The simulator is used as a ”virtual reality” to represent the behavior of a water network.There are two kinds of simulation; steady-state and extended-period simulation.A steady-state simulation computes the state of the system considering that hydraulic de-mands and boundary conditions do not change with time.An extended-period simulation computes the varying state of the system through a pe-riod of time by computing a series of steady-state simulations.Using the fundamental concepts of these two types of simulation, more advanced simula-tions can be built; water quality simulations, automated fire flow analyses, cost analysesand transient analyses [4].In this work, simulations are performed to validate the simplification tool. Both steady-state and extended-period simulations will be tested. The focus will be on the second typeof simulation which will be used for pump scheduling.

2.3 Water network simplification

There are two main ways to simplify a network model [6]:

• Simplification of network model componentsThe basic types of network components are maintained but some individual net-work components are combined and replaced.

• Black box simplificationThe network model is replaced with an abstract model, which provides the samefunctionality with less solution time. The work presented in this report deals withthe first type of simplification.

15

Page 20: Automated simplification of water networks models

Simplification of network model components:Also called ”skeletonization”, simplification of network model components is the processof selecting for inclusion in the model only the parts of the hydraulic network that have asignificant impact on the behavior of the system [3]. The level of skeletonization used de-pends on the intended use of the model; energy operation studies require minimal detail-which is the case in this work-, while determining available fire flow at individual hy-drants requires the most [4]. Skeletonization is not a single process but several differentlow-level element removal processes that must be applied in series to ensure that the de-mands are logically brought back to their source of supply [4].These skeletonization techniques are the following:

• Use of equivalent pipes in place of pipes connected in parallel and/or in series

• Deletion of trees

• Removal of excessive pipe segmentation caused by valves and fire hydrants

• Trimming of short pipe segments including dead ends (with no or little demand),service connections and fire hydrants

• Removal of small-diameter pipes (or low conductance pipes)

• Deletion of closed valves

• Elimination of small capacity tanks

• Reduce nodes with similar head to a single node with the total demand of the nodegroup

In a simplified model all elements with active controls and measurements remain un-changed, but the number of pipes and nodes is significantly reduced. So, reduced modelsinclude the system’s reservoirs, tanks, pumps, valves and pressure and/or flow monitor-ing nodes [8].Overall system demand must remain unchanged in skeleton model. Thus for each trans-formation, node demands are re-allocated based on an equal distribution of demand ora weighted distribution based on either pipe length or existing demands at the remain-ing junctions. If the removed junction has an associated demand, the demand must bere-allocated to one or both of the junctions at the ends of the new pipe. The equivalentpipe of two pipes in series or two parallel pipes includes initial pipes characteristics anddemands of related junctions. The trim method removes short dead-end pipes and theircorresponding junctions. As with the pipes in series, any removed junctions that have anassociated demand must be transferred to the demand of the remaining junction [3]. Thefollowing is a description of three types of simplification used in the created tool.

16

Page 21: Automated simplification of water networks models

N1 N2 N3

liA liB

(a) Before simplificationN1 N2 N3

liA liB

(b) After simplification

N4 N5

liA liB

liC liD

liE

liF

Q6=5

Q4=10

N4 N5

liA liB

liC liD

liEQ4=24

• Demands in junctions N7 and N8N6

N7 N8

Q7=4

Q8=5

Q6=5 • Demands in junctions N7 and N8

are transferred to N6

• Resulting demand in N6 is

transferred to N4

Figure 2.3: Removal of trees simplification

Removing trees

It consists of removing dead-end branches that do not contain tanks or reservoirs at theend. The demands are re-allocated to the closest node which is part of the loop (see Figure2.3). Thus this removal has no effect on the carrying capacity of the remainder of thesystem [4].

Use of equivalent pipe for pipes in series

It consists of combining two pipes in series to form an equivalent pipe. Two pipes are inseries when they share the same node; it is an end node for one of the two pipes and astart node for the other one. The common node must have no other links connected to it(see Figure 2.4). The demand of the node in common is split between the two nodes at theends of the resulting pipe according to user-specified rules. It can be evenly split or thedistribution can be weighted (length, diameter, resistance...). Length of equivalent pipe isequal to the sum of the lengths of the two pipes being combined. The head losses of thetwo pipes must be maintained through the new pipe. So head loss of the equivalent pipeis the sum of theses two pipes head losses. This is expressed by resistance (see equation(2.3)). Resistance of the new pipe is calculated by summing up the old pipes resistances[6].

rnew = rold,1 + rold,2 (2.10)

Diameter and roughness coefficient are then determined using equation (2.3) accord-

17

Page 22: Automated simplification of water networks models

N1 N2 N3

liA liB

(a) Before simplification

Q1=5 Q3=5Q2=12

liA liB

N1 N3

liA_liB

(b) After simplification

Q1=11 Q3=11liA_liB

• Demand in junction N2 is split between

junctions N1 and N3

• Characteristics of pipe liA_liB are calculated

using resistances of pipes liA and liB

Q1=11 Q3=11

Figure 2.4: Pipes in series simplification

ing to head loss formula chosen. Finally, minor losses and check valves are assigned tothe resulting pipe.

In order to avoid impacting model results when the node removed has a large demand,a limit on flows can be considered. Thus if the node flow exceeds this limit it will not beeliminated [4].

Use of equivalent pipe for parallel pipes

It consists of combining two parallel pipes to form an equivalent pipe. Two pipes are inparallel if they have the same beginning and ending nodes (see Figure 2.5).

Head loss between the nodes must stay the same, only flows are summed. This isexpressed by using pipe conductance (see equation (2.7)). So, equivalent pipe has thelength of one of the two pipes and either the diameter or roughness coefficient of thissame pipe. The pipe conductance of the new pipe can be calculated by summing up theold pipes conductances [6].

knew = kold,1 + kold,2 (2.11)

Diameter and roughness coefficient are then expressed with equation (2.7) according tohead loss formula chosen. If both pipes have check valves, then the resulting pipe shouldalso have a check valve.

Simplification process

These three simplifications are applied in series. They are repeated until:

18

Page 23: Automated simplification of water networks models

N3

(a) Before simplification

N1

liA

N1 N3

(b) After simplification

liB

N1

liA_liB

Characteristics of pipe liA_liB are calculated

using conductances of pipes liA and liB

Figure 2.5: Parallel pipes simplification

• all trees are simplified

• all pipes in series are replaced with their equivalent pipes

• all parallel pipes are replaced with their equivalent pipes

The simplification proposed in this work modifies all pipes and nodes which meet theconditions described above except pipes and nodes with a measurement or a control. Itdoes not modify pumps, valves, tanks and reservoirs.

The algorithm will implement two types of tree removal. The first is already imple-mented, it concerns the removal of the dead end branch without maintaining the headloss. The second will not only transfer the demand but also add the head loss of the deadend pipe to its neighboring pipe. This can be done by using the resistance of the pipe likefor pipes in series.

Since the aim of the simplification is the optimization of pump scheduling, normally atotal simplification is appropriate. A verification will be done once the implementation isfinished.

This total simplification would lead to pitfalls if the application is for instance waterquality. In this case some restrictions would be necessary. Some examples:

• pipes that close loops are not removed;

• if pipe removal removes a node with greater than a specified demand, then thatremoval action will not be carried out [4];

• large pipes are not simplified.

19

Page 24: Automated simplification of water networks models

Chapter 3

Water network simplification tool

3.1 Requirements and constraints

The tool created must simplify complex water networks which are described in a text file.The tool uses this file to retrieve data of the network. This file is specific to Epanet (ahydraulic simulation tool). However, the hydraulic simulation tool used in this project isAquis (company’s tool). Export of this file from Aquis has some limitations especially forcontrols and measurements. This is why part of the data must be retrieved from an Excelfile also exported from Aquis. The simplification tool must return a new input file wheredata of simplified model is summarized. This simplified model must meet all the require-ments of the detailed model. To ensure this, simulations for same operating points mustbe performed for both detailed and simplified models. Then, the results are compared inorder to validate the simplification tool.

3.2 Description of the input file

The input file has the format of input files of Epanet software (see Figure 3.1). It is orga-nized in sections. Each section starts with a keyword between brackets. These keywordsare listed below (Table 3.1) (see Epanet user guide). The order of sections is not importantbut each cited element must have been defined before. Each section has one or more linesof data. Blank lines can appear anywhere in the file and the semicolon (;) is used to indi-cate that what follows on the line is a comment, not data. A maximum of 255 characterscan appear on a line. The ID labels used to identify nodes, links, curves and patterns canbe any combination of up to 15 characters and numbers.

All sections are described in detail in the Epanet user guide (Epanet is public domainsoftware), some of them are described in the appendix. In this work, we are not interestedin water quality, so sections related to water quality will not be described. Besides, somesections are not exported from Aquis. Table 3.2 lists used sections and determines if anymodification is required. The second column lists the sections that are not exported fromAquis, these are excluded. The third column lists the sections that does not change aftersimplification. In the fourth column, ”Elements can be modified” means that for somelines, data can change. For example, in section [DEMANDS] the flow can change for an

20

Page 25: Automated simplification of water networks models

; ------------------------------------------------------------------------------------------------------------------------------------

; Model exported from Aquis on 21/06/2013 14:00:16 - C:\Users\SCHNEIDER\Documents\test.inp

;

; ------------------------------------------------------------------------------------------------------------------------------------

; ---- The following warnings were generated during export -----------------------------------------------------

; ------------------------------------------------------------------------------------------------------------------------------------

;

; Unsupported control: Pump L-0010 controls DWS pressure - Value 655264.2688

; Unsupported control: Node INLET has a conditional control

;

; -----------------------------------------------------------------------------------------------------------------------------------

[TITLE]

Model exported from Aquis on 21/06/2013 14:00:16 - C:\Users\SCHNEIDER\Documents\test.inp

[OPTIONS]

; ---------------------------------------------------------------------------------------------------

; Network Properties & Simulation Options

; ---------------------------------------------------------------------------------------------------

UNITS LPS

HEADLOSS D-W

PATTERN 1

[PIPES]

; -----------------------------------------------------------------------------------------------------------------------------; -----------------------------------------------------------------------------------------------------------------------------

; Head Tail (m) (mm) Roughness (Minor Loss (Check

; ID Node Node Length Diameter Coefficient Cofficient) Valve)

; -----------------------------------------------------------------------------------------------------------------------------

L-0680 BLYDE10 BLYDE17 100 80 25 0 OPEN ;

P-0761 HOBSVT HOKARP 300 100 0.25 0 CLOSED ;

[JUNCTIONS]

; ---------------------------------------------------------------------------------------------------

; ID Elevation(m)

; ---------------------------------------------------------------------------------------------------

BLYDE10 43.36000061 ;

Figure 3.1: Input file format

Network System Water Options and Networkcomponents operation quality reporting Map/Tags

[TITLE] [CURVES] [QUALITY] [OPTIONS] [COORDINATES][JUNCTIONS] [PATTERNS] [REACTIONS] [TIMES] [VERTICES][RESERVOIRS] [ENERGY] [SOURCES] [REPORT] [LABELS]

[TANKS] [STATUS] [MIXING] [BACKDROP][PIPES] [CONTROLS] [TAGS]

[PUMPS] [RULES][VALVES] [DEMANDS]

[EMITTERS]

Table 3.1: Input file sections

21

Page 26: Automated simplification of water networks models

Section Not exported Unchanged Elements can Lines can Lines canfrom Aquis be modified be removed be added

[CONTROLS] x[COORDINATES] x[CURVES] x[DEMANDS] x x x[EMITTERS] x[ENERGY] x[JUNCTIONS] x x x[LABELS] x[MIXING] x[OPTIONS] x[PATTERNS] x[PIPES] x x x[PUMPS] x[QUALITY] x[REACTIONS] x[REPORT] x[RESERVOIRS] x[RULES] x[SOURCES] x[STATUS] x[TAGS] x[TANKS] x[TIMES] x[TITLE] x[VALVES] x x[VERTICES] x

Table 3.2: Modifications of input file sections

existing demand. In the fifth column ”lines can be removed” means that for a specificsection, an element can be removed. For example, in section [JUNCTIONS] a junction canbe removed by removing all its attributes. In the last column ”lines can be added” meansthat a new element can be created. For example, when creating an equivalent pipe for twopipes in series, a new pipe appears in the section.

22

Page 27: Automated simplification of water networks models

3.3 Class diagram

Based on input file data, the class diagram of Figure 3.2 is defined. Some attributes andmethods not found in the input file data were added because of computing needs. Forexample, for class WaterNetwork, method createLinkNodeArray() allows to have in thesame array all links with their related beginning and ending nodes.

The main class is WaterNetwork. A water network is composed of many elements,these are represented by the class Component. A Component is either a node or a link.This is represented by inheritance where Component is the base class and the derivedclasses are Node and Link. A node is itself a tank or a reservoir or a junction. This is alsorepresented by an inheritance, Node is the base class and the derived classes are Reservoir,Tank and Junction. In the same way, Link is a base class and Pipe, Valve and Pump arederived classes. All these network elements have some characteristics expressed in theattributes and methods of their corresponding classes. The other characteristics are putin other classes like Coordinate, Vertice, Demand, Pattern, Curve and Control. ClassesSimulationTimes and Options describe the hydraulic characteristics of the simulation. Notall classes of the diagram are implemented, this is explained in the next section.

23

Page 28: Automated simplification of water networks models

WaterNetwork

+ title : string

+ createLinkNodeArray()

+ nodesNumber()

+ linksNumber()

+ junctionsNumber()

+ pipesNumber()

+ tanksNumber()

+ reservoirsNumber()

+ pumpsNumber()

+ valvesNumber()

Junction

+ elevation : float

+ totalDemandFlow : float [0..1]

+ totalDemandPattern : string

Pipe

+ pipeLength : float

+ pipeDiameter : float

+ roughnessCoef : float

+ minorLossCoef : float [0..1]

+ pipeInitStatus : Status [0..1]

+ resistance()

+ conductance()

Tank

+ elevation : float

+ initLevel : float

+ minLevel : float

+ maxLevel : float

+ diameter : float

+ minVolume : float

Pump

+ pumpPower : float [0..1]

+ pumpSpeed : float [0..1]

Valve

+ diameter : float

+ type : ValveTypes

+ lossCoef : float

Reservoir

+ totalHead : float

Demand

Node

+ /countStartNode : integer

+ /countEndNode : integer

+ /relatedPipesNumber : integer

Link

+ /startNodeId : string

+ /endNodeId : string

+ statusOrSetting : string [0..1]

Curve

+ type : string

PumpCurveEfficiencyCurvevolumeCurve HeadLossCurve

Description

Only one of pumpCurve or

pumpPower is required

Description

valveLossCoef has a value when the

valve is completely opened. Assumed

0 if left blank

Control

+ statement : string

SimpleControl RuleBasedControl

+ ruleId : string

+ rulePriority : integer

Status

OPEN

CLOSED

CV

Description

minorLossCoef assumed 0

if no value

Description

can be any value if there is

a VolumeCurve

Description

optional if there is a

VolumeCurve

Pattern

CurvePoint

+ x : double

+ y : double

PatternValue

+ multiplier : float

Options

+ unit : Unit

+ headLoss : HeadLoss

+ defaultPattern : string

+ demandMultiplier : float

Unit

CFS

GPM

MGD

IMGD

AFD

LPS

LPM

MLD

CMH

CMD

HeadLoss

H-W

D-W

C-M

CurveType

PUMP

EFFICIENCY

VOLUME

HEADLOSS

Description

If a Demand object is related to a

junction, totalDemandFlow and

totalDemandPattern are ignored

ValveTypes

PRV

PSV

PBV

FCV

TCV

GPV

Description

pipeInitStatus assumed OPEN

if no value

Vertice

SimulationTimes

+ duration : double

+ hydTimeStep : float

+ patternTimeStep : float

+ patternStart : float

+ startClocktime : double

Component

+ flowMeasure : float [0..1]

+ pressureMeasure : float [0..1]

+ /isModified : boolean

+ /isDeleted : boolean

+ modifNumberDE : integer

+ modifNumberPS : integer

+ modifNumberPP : integer

+ isSimplifiable()

+ isMeasured()

ValveGPV

+ valveSetting : string

ValveNonGPV

+ valveSetting : float

Coordinate

+ x : double

+ y : double

Description

Coordinates x and y: required if tank or

reservoir, optional if junction

SingleDemand

+ flow : double

+ pattern : string [0..1]

+ category : string [0..1]

+ links+ nodes

2 *

1

+ demands 0..1

+ pump

+ pumpCurve

1

0..1

+ pumpEfficiencyCurve 0..1

1

0..1

+ tank

+ tankVolumeCurve

1

+ valveHeadLossCurve

+ valve

1

0..1

+ curvePoints

1..*

1

+ patternValue

1 1..*

*

0..1+ pattern

+ demandPattern

1

1

+ headPattern

0..1

0..1+ reservoir

1+ pipe

*

+ vertices

1

1

3..*

1

1

+ control

0..1

0..1

0..1+ pumpPattern

0..1

0..1

1*

0..1

+ coordinate

1

Figure 3.2: Class diagram

24

Page 29: Automated simplification of water networks models

Retrieve network

data

Start

Perform

simplification

Create input file

of simplified of simplified

network

End

Figure 3.3: Overall algorithm - Main steps

3.4 Implementation

The algorithm is implemented in C] programming language. Microsoft development en-vironment Visual Studio 2010 Ultimate with .NET 4.0 Framework was used.C] programming language was chosen because of the need of a type-safe object-orientedlanguage and it was highly recommended by an expert programmer in the team.

3.4.1 The algorithm

As shown in Figure 3.3, the algorithm is realized in three steps. First, data is retrieved fromboth the input file and the Excel file. Then, simplification of the network is performed.Finally, an input file is created for the simplified model obtained.

3.4.2 Parsing the input file

It consists of:

• Opening the input file

• Creating and opening the output file

• Writing a header in the output file

25

Page 30: Automated simplification of water networks models

• Reading the input file line by line until no line is left

• For each line do the following :

If the line contains any of the following keywords ([COORDINATES], [DEMANDS],[JUNCTIONS], [PIPES], [TITLE], [VALVES] and [VERTICES]), a specific treatment is donecorresponding to each keyword.If the previous condition is not satisfied i.e. if the line contains any of the keywords([CURVES], [OPTIONS], [PATTERNS], [PUMPS], [RESERVOIRS], [TANKS] and [TIMES]),sections are written without any modification in the output file.

If the line read is a keyword which means the beginning of a section, data are reportedin data structures describing the water network.These data structures are dictionaries with keys representing the identifiers of the objects,and the values are objects which implement classes.Each class represents a real element of the network. There are several objects implement-ing only one class for each section. For instance, if keyword is [JUNCTIONS], each linecontains attributes of an object Junction. So, these attributes (in this case; identifiers andelevations) are retrieved and the object Junction formed is added to the dictionary junc-tionsList. This dictionary contains all junctions of the network.

Since sections [CURVES], [OPTIONS], [TIMES] and [PATTERNS] are not modified,their corresponding classes in the diagram are not implemented. They are directly copiedin the input file from the initial input file. Note that creation of the input file of the sim-plified network is done in the first step of the algorithm. The aim is to avoid readingthe input file of the detailed model several times. The modified sections obtained aftersimplification are added to the input file already created and partially filled.

3.4.3 Parsing the Excel file

Control and measurements are specified in Excel file. Depending on the element (pipe,junction...), they are found in different sheets. If an element of the network has a controlor a measurement, it is identified in order to exclude it from the simplification. This stepis not implemented yet.

3.4.4 Simplification process

Before describing the simplification process, the component qualifier ”unsimplifiable”must be defined. An unsimplifiable component is a node or a link that has to stay duringsimplification.

Identification of unsimplified components (this identification starts in Excel file pars-ing):

• Mark all reservoirs, tanks, pumps and valves as unsimplifiable;

• Mark all pipes and nodes with measurement (pressure and/or flow measurement)as unsimplifiable;

26

Page 31: Automated simplification of water networks models

• Mark all controlled nodes and pipes as unsimplifiable;

• Mark all pipes which are connected to unsimplifiable nodes as unsimplifiable aswell;

• Mark the start and end nodes of unsimplifiable links as unsimplifiable.

As mentioned before, only three types of simplifications are used; removal of trees, re-placement of pipes in series by an equivalent pipe and replacement of parallel pipes by anequivalent pipe. It is probably necessary to review the network because one simplificationmay create conditions where a previous simplification can be performed. This should betested once the three simplifications will be implemented.

Algorithm of tree removal

There is a tree when an end node is related to only one link.Identification of the end node: for each node in the dictionary nodesList, two attributesare evaluated: countStartNode and endStartNode.countStartNode counts how many times the node is a start node.countEndNode counts how many times the node is an end node.

countStartNode must be equal to 0 and countEndNode must be equal to 1.

Conditions: simplification can be done only if

• end node is simplifiable (node=junction, node 6=reservoir, node 6=tank, no control, nomeasurement)

• related link is simplifiable (link=pipe, link6=valve, link6=pump, no control, no mea-surement)

• related start node is simplifiable

If previous conditions are met, start simplification;

• Demand of end node is added to demand of start node;

• countStartNode of start node is decremented

• Related link is removed from sections [PIPES] and [VERTICES], it is also removedfrom all dictionaries where it can be found (recall that dictionaries are data structuresused for modifying sections of input file);

• Dead end node is removed from sections [JUNCTIONS], [DEMANDS] and [COOR-DINATES], it is also removed from all dictionaries where it can be found.

27

Page 32: Automated simplification of water networks models

Algorithm of equivalent pipe for pipes in series

Pipes are in series if they share the same node and this node is not connected to otherlinks.Identification of the common node: each node in the dictionary nodesList must have arelatedPipesNumber equal to 2. relatedPipesNumber counts the number of pipes a nodeis related to.

Conditions: simplification can be done only if

• Common node is simplifiable (node=junction, node 6=reservoir, node6=tank, no con-trol, no measurement);

• Two links are simplifiable (link=pipe, link 6=valve, link 6=pump, no control, no mea-surement);

• Start node of one pipe (which will be the start node of equivalent pipe) and endnode of the second pipe (which will be the end node of equivalent pipe) are bothsimplifiable.

If previous conditions are met, start simplification;

• Compute equivalent pipe characteristics (start node, end node, length, roughnesscoefficient, diameter, resistance) based on those of two pipes being simplified;

• Distribute demand of common node to new start and end nodes. Currently demandis all transferred to start node, this must be improved later. A rule for distributingdemands must be established);

• Delete two links from sections [PIPES] and [VERTICES];

• Delete common node from sections [JUNCTIONS], [DEMANDS] and [COORDI-NATES].

Algorithm of equivalent pipes for parallel pipes

Parallel pipes have the same start node and the same end node.

Conditions: simplification can be done only if

• Two links are simplifiable (link=pipe, link 6=valve, link 6=pump, no control, no mea-surement)

If previous condition is met:

• Compute equivalent pipe characteristics (start node, end node, length, roughnesscoefficient, diameter, resistance) based on those of two pipes being simplified

• Delete two pipes from sections [PIPES] and [VERTICES]

28

Page 33: Automated simplification of water networks models

This simplification has not been implemented yet.

These three algorithms should be applied iteratively till all simplifications are done.To reduce iterations over the dictionary nodesList several times, the conditions of treeremoval and pipes in series are checked simultaneously in one pass.

3.4.5 Preliminary results

The algorithm as it is currently implemented includes the two first types of simplifications.It was applied to Birkerod water network. This network serves 22 000 consumers.

It consists of 648 junctions and 742 pipes. After simplification, only 306 junctions and 400pipes remain in the network. Which is a very encouraging result.This result will be improved when the algorithm will be totally implemented.

29

Page 34: Automated simplification of water networks models

Conclusion

In this report, a method of automated simplification of water networks was presented. Itconcerns the topological reduction of the network. The tool that performs this simplifica-tion was implemented in C] language using Visual Studio 2010.Before simplifying, it was necessary to retrieve data from an input file. After data wasput in data structures such that modifications could be applied on the network, simplifiedmodel was written back in the same format of input file.The time spent to learn how to use simultaneously two hydraulic simulation softwarewas longer than expected. Aquis was the software required, but the format of input file isgiven by Epanet. Aquis permits the export of network in this format. Thus it was neces-sary to take into account export limitations.The most difficult was to start from scratch and to think for a solution from both hy-draulics side and software engineering side. Specification stage was longer than imple-mentation. Thus implementation is not totally finished.

Future work

The future works should cover the following aspects:

Code completion

Implementation of the tool is not complete. The following is a list of what still has to bedone:

• Parsing Excel file in order to (i) mark all unsimplifiable links and nodes, (ii) retrieveall condition controls and add them to the input file in [CONDITIONS] and [RULES]sections. Note that some conditions on pumps and valves of Aquis are not sup-ported in input file. A solution must be found to retrieve these data;

• Add exceptions in the code, for example if the input file cannot be opened;

• Handle two other formulas of head loss (Hazen-Williams and Chezy-Manning);

• Implement parallel pipes simplification;

30

Page 35: Automated simplification of water networks models

Verification and testing of simplification tool

Tool must be tested with small, medium and large scale networks. Hydraulic simulationoutput must be generated for the three skeletonized models and the corresponding all-pipes models in order to make a comparison. Points that must be checked are:

• Correct operational limits of tanks, pumps and valves;

• Tank’s volume evolution reproduced by the simulator must be identical to the realone.

If differences are too important, try to find errors to improve simplification algorithms.

Search other innovative simplification methods

prepare specifications and eventually realize a mock-up

Personal conclusion

It was interesting to experience working in a large company. It was also a big opportunityfor me to work within a research team. My role within the team consisted of integratingsome hydraulics techniques. As so, I was responsible for the technical choices regardingmy initial specialty. Another good aspect of the internship was learning how to use hy-draulic simulators Aquis and Epanet and learning a new programming language whichis C]. Thanks to this program, I am able today to handle a project from specification stepsto development. The master’s courses covered a large number of topics and techniques,the internship was then a perfect continuity as it enabled handling the practical aspectsstudied during the previous months. Moreover, the courses helped me to enhance mycommunication skills to better share and work with computer engineering teams.

31

Page 36: Automated simplification of water networks models

Bibliography

[1] www.arrowhead.eu.

[2] www.schneider-electric.com.

[3] R. Bahadur, J. Johnson, R. Janke, and W.B. Samuels. Impact of model skeletonizationon water distribution model parameters as related to water quality and contaminantconsequence assessment. 8th Annual Water Distribution Systems Analysis Symposium,Cincinnati, Ohio, USA, 2006.

[4] Haestad Methods, T.M. Walski, D.V. Chase, D.A. Savic, W. Grayman, S. Beckwith,and E. Koelle. Advanced water distribution modeling and management. Haestad Methods,Inc., 2003.

[5] R. Klempous, J. Kotowski, J. Nikodem, M. Olesiak, and J. Ulasiewicz. Some models forwater distribution systems. Journal of Computational and Applied Mathematics, 21(3):257–269, March 1988.

[6] T. Maschler and D.A. Savic. Simplification of water supply network models throughlinearisation. Technical report, Center for Water Systems, University of Exeter, UK,1999.

[7] Larry.W. Mays. Hydraulic design handbook. McGraw-Hill, 1999.

[8] A. Preis, A.J. Whittle, A. Ostfeld, and L. Perelman. Efficient hydraulic state estimationtechnique using reduced models of urban water networks. Journal of Water ResourcesPlanning and Management, 137(4):343351, July 2011. description of Ulanicki et al. algo-rithm for hydraulic aggregation.

[9] V. Speight and N. Khanal. Model calibration and current usage in practice. UrbanWater Journal, 6(1):23–28, March 2009.

32

Page 37: Automated simplification of water networks models

Appendix A Sections of input file

The following is a description of the most important elements which can be found in theinput file. It is directly reported from Epanet user manual.

[COORDINATES]Purpose:Assigns map coordinates to network nodes.Format:One line for each node containing:• Node ID label• X-coordinate• Y-coordinateRemarks:a. Include one line for each node displayed on the map.b. The coordinates represent the distance from the node to an arbitrary origin at the lowerleft of the map. Any convenient units of measure for this distance can be used.c. There is no requirement that all nodes be included in the map, and their locations neednot be to actual scale.d. A [COORDINATES] section is optional and is not used at all when EPANET is run as aconsole application.Example:[COORDINATES];Node X-Coord. Y-Coord; - - - - - - - - - - - - - - - - - -1 10023 1282 10056 95

[CURVES]Purpose:Defines data curves and their X, Y points.Format:One line for each X, Y point on each curve containing:•Curve ID label•X value•Y valueRemarks:

33

Page 38: Automated simplification of water networks models

a. Curves can be used to represent the following relations:•Head v. Flow for pumps•Efficiency v. Flow for pumps•Volume v. Depth for tanks•Head loss v. Flow for General Purpose Valvesb. The points of a curve must be entered in order of increasing X-values (lower to higher).c. If the input file will be used with the Windows version of EPANET, then adding acomment which contains the curve type and description, separated by a colon, directlyabove the first entry for a curve will ensure that these items appear correctly in EPANET’sCurve Editor. Curve types include PUMP, EFFICIENCY, VOLUME, and HEADLOSS. Seethe examples below.Example:[CURVES];ID Flow Head;PUMP: Curve for Pump 1C1 0 200C1 1000 100C1 3000 0 ;ID Flow Effic.;EFFICIENCY:E1 200 50E1 1000 85E1 2000 75E1 3000 65

[DEMANDS]Purpose:Supplement to [JUNCTIONS] section for defining multiple water demands at junctionnodes.Format:One line for each category of demand at a junction containing:•Junction ID label•Base demand (flow units)•Demand pattern ID (optional)•Name of demand category preceded by a semicolon (optional)Remarks:a. Only use for junctions whose demands need to be changed or supplemented fromentries in [JUNCTIONS] section.b. Data in this section replaces any demand entered in [JUNCTIONS] section for the samejunction.c. Unlimited number of demand categories can be entered per junction.a. If no demand pattern is supplied then the junction demand follows the Default DemandPattern specified in the [OPTIONS] section or Pattern 1 if no default pattern is specified.If the default pattern (or Pattern 1) does not exist, then the demand remains constant.Example:[DEMANDS]

34

Page 39: Automated simplification of water networks models

;ID Demand Pattern Category;---------------------------------J1 100 101 ;DomesticJ1 25 102 ;SchoolJ256 50 101 ;Domestic

[JUNCTIONS]Purpose:Defines junction nodes contained in the network.Format:One line for each junction containing:•ID label•Elevation, ft (m)•Base demand flow (flow units) (optional)•Demand pattern ID (optional)Remarks:b. A [JUNCTIONS] section with at least one junction is required.c. If no demand pattern is supplied then the junction demand follows the Default DemandPattern specified in the [OPTIONS] section or Pattern 1 if no default pattern is specified.If the default pattern (or Pattern 1) does not exist, then the demand remains constant.d. Demands can also be entered in the [DEMANDS] section and include multiple demandcategories per junction.Example:[JUNCTIONS];ID Elev. Demand Pattern;------------------------------J1 100 50 Pat1

[OPTIONS]Purpose:Defines various simulation options.Formats:UNITS CFS/GPM/MGD/IMGD/AFD/LPS/LPM/MLD/CMH/CMDHEADLOSS H-W/D-W/C-MPATTERN idDEMAND MULTIPLIER valueDefinitions:UNITS : sets the units in which flow rates are expressed where:CFS = cubic feet per secondGPM = gallons per minuteMGD = million gallons per dayIMGD = Imperial MGDAFD = acre-feet per dayLPS = liters per secondLPM = liters per minute

35

Page 40: Automated simplification of water networks models

MLD = million liters per dayCMH = cubic meters per hourCMD = cubic meters per dayFor CFS, GPM, MGD, IMGD, and AFD other input quantities are expressed in US Cus-tomary Units.If flow units are in liters or cubic meters then Metric Units must be used for all other inputquantities as well. The default flow units are GPM.HEADLOSS selects a formula to use for computing head loss for flow through a pipe. Thechoices are the Hazen-Williams (H-W), Darcy-Weisbach (D-W), or Chezy-Manning (C-M)formulas. The default is H-W.PATTERN provides the ID label of a default demand pattern to be applied to all junctionswhere no demand pattern was specified. If no such pattern exists in the [PATTERNS]section then by default the pattern consists of a single multiplier equal to 1.0. If this optionis not used, then the global default demand pattern has a label of ”1”.The DEMAND MULTIPLIER is used to adjust the values of baseline demands for all junc-tions and all demand categories. For example, a value of 2 doubles all baseline demands,while a value of 0.5 would halve them. The default value is 1.0.Remarks:a. All options assume their default values if not explicitly specified in this section.b. Items offset by slashes (/) indicate allowable choices.Example:[OPTIONS]UNITS CFSHEADLOSS D-W

[PATTERNS]Purpose:Defines time patterns.Format:One or more lines for each pattern containing:•Pattern ID label•One or more multipliersRemarks:a. Multipliers define how some base quantity (e.g., demand) is adjusted for each timeperiod.a. All patterns share the same time period interval as defined in the [TIMES] section.b. Each pattern can have a different number of time periods.c. When the simulation time exceeds the pattern length the pattern wraps around to itsfirst period.d. Use as many lines as it takes to include all multipliers for each pattern.Example:[PATTERNS];Pattern P1P1 1.1 1.4 0.9 0.7P1 0.6 0.5 0.8 1.0

36

Page 41: Automated simplification of water networks models

;Pattern P2P2 1 1 1 1P2 0 0 1

[PIPES]Purpose:Defines all pipe links contained in the network.Format:One line for each pipe containing:•ID label of pipe•ID of start node•ID of end node•Length, ft (m)•Diameter, inches (mm)•Roughness coefficient•Minor loss coefficient•Status (OPEN, CLOSED, or CV)Remarks:a. Roughness coefficient is unitless for the Hazen-Williams and Chezy-Manning head lossformulas and has units of millifeet (mm) for the Darcy-Weisbach formula. Choice of headloss formula is supplied in the [OPTIONS] section.b. Setting status to CV means that the pipe contains a check valve restricting flow to onedirection.c. If minor loss coefficient is 0 and pipe is OPEN then these two items can be droppedfrom the input line.Example:[PIPES];ID Node1 Node2 Length Diam. Roughness Mloss Status;-------------------------------------------------------------P1 J1 J2 1200 12 120 0.2 OPENP2 J3 J2 600 6 110 0 CVP3 J1 J10 1000 12 120

[PUMPS]Purpose:Defines all pump links contained in the network.Format:One line for each pump containing:•ID label of pump•ID of start node•ID of end node•Keyword and Value (can be repeated)Remarks:a. Keywords consist of:•POWER - power value for constant energy pump, hp (kW)

37

Page 42: Automated simplification of water networks models

•HEAD - ID of curve that describes head versus flow for the pump•SPEED - relative speed setting (normal speed is 1.0, 0 means pump is off)•PATTERN - ID of time pattern that describes how speed setting varies with timeb. Either POWER or HEAD must be supplied for each pump. The other keywords areoptional.Example:[PUMPS];ID Node1 Node2 Properties;---------------------------------------------Pump1 N12 N32 HEAD Curve1Pump2 N121 N55 HEAD Curve1 SPEED 1.2Pump3 N22 N23 POWER 100

[RESERVOIRS]Purpose:Defines all reservoir nodes contained in the network.Format:One line for each reservoir containing:• ID label• Head, ft (m)• Head pattern ID (optional)Remarks:a. Head is the hydraulic head (elevation + pressure head) of water in the reservoir.b. A head pattern can be used to make the reservoir head vary with time.c. At least one reservoir or tank must be contained in the network.Example:[RESERVOIRS];ID Head Pattern;---------------------R1 512 ;Head stays constantR2 120 Pat1 ;Head varies with time

[STATUS]Purpose:Defines initial status of selected links at the start of a simulation.Format: One line per link being controlled containing:• Link ID label• Status or settingRemarks:a. Links not listed in this section have a default status of OPEN (for pipes and pumps) orACTIVE (for valves).b. The status value can be OPEN or CLOSED. For control valves (e.g., PRVs, FCVs, etc.)this means that the valve is either fully opened or closed, not active at its control setting.c. The setting value can be a speed setting for pumps or valve setting for valves.d. The initial status of pipes can also be set in the [PIPES] section.

38

Page 43: Automated simplification of water networks models

e. Check valves cannot have their status be preset.f. Use [CONTROLS] or [RULES] to change status or setting at some future point in thesimulation.g. If a CLOSED or OPEN control valve is to become ACTIVE again, then its pressure orflow setting must be specified in the control or rule that re-activates it.Example:[STATUS]; Link Status/Setting;----------------------L22 CLOSED ;Link L22 is closedP14 1.5 ;Speed for pump P14PRV1 OPEN ;PRV1 forced open;(overrides normal operation)

[TANKS]Purpose:Defines all tank nodes contained in the network.Format:One line for each tank containing:• ID label• Bottom elevation, ft (m)• Initial water level, ft (m)•Minimum water level, ft (m)•Maximum water level, ft (m)• Nominal diameter, ft (m)•Minimum volume, cubic ft (cubic meters)• Volume curve ID (optional)Remarks:a. Water surface elevation equals bottom elevation plus water level.b. Non-cylindrical tanks can be modeled by specifying a curve of volume versus waterdepth in the [CURVES] section.c. If a volume curve is supplied the diameter value can be any non-zero numberd. Minimum volume (tank volume at minimum water level) can be zero for a cylindricaltank or if a volume curve is supplied.e. A network must contain at least one tank or reservoir.Example:[TANKS];ID Elev. InitLvl MinLvl MaxLvl Diam MinVol VolCurve;-----------------------------------------------------------;Cylindrical tankT1 100 15 5 25 120 0;Non-cylindrical tank with arbitrary diameterT2 100 15 5 25 1 0 VC1

[TIMES]

39

Page 44: Automated simplification of water networks models

Purpose:Defines various time step parameters used in the simulation.Formats:DURATION Value (units)HYDRAULIC TIMESTEP Value (units)QUALITY TIMESTEP Value (units)RULE TIMESTEP Value (units)PATTERN TIMESTEP Value (units)PATTERN START Value (units)REPORT TIMESTEP Value (units)REPORT START Value (units)START CLOCKTIME Value (AM/PM)STATISTIC NONE/AVERAGED/MINIMUM/MAXIMUM RANGEDefinitions:DURATION is the duration of the simulation. Use 0 to run a single period snapshot anal-ysis. The default is 0.HYDRAULIC TIMESTEP determines how often a new hydraulic state of the network iscomputed. If greater than either the PATTERN or REPORT time step it will be automati-cally reduced. The default is 1 hour.QUALITY TIMESTEP is the time step used to track changes in water quality throughoutthe network. The default is 1/10 of the hydraulic time step.RULE TIMESTEP is the time step used to check for changes in system status due to ac-tivation of rule-based controls between hydraulic time steps. The default is 1/10 of thehydraulic time step.PATTERN TIMESTEP is the interval between time periods in all time patterns. The defaultis 1 hour.PATTERN START is the time offset at which all patterns will start. For example, a value of6 hours would start the simulation with each pattern in the time period that correspondsto hour 6. The default is 0.REPORT TIMESTEP sets the time interval between which output results are reported. Thedefault is 1 hour.REPORT START is the length of time into the simulation at which output results begin tobe reported. The default is 0.START CLOCKTIME is the time of day (e.g., 3:00 PM) at which the simulation begins. Thedefault is 12:00 AM midnight.

[TITLE]Purpose:Attaches a descriptive title to the network being analyzed.Format:Any number of lines of text.Remarks:The [TITLE] section is optional.

40