Mathematical Models and Methods in the Water Industry - Science Direct

3 downloads 6744 Views 2MB Size Report
design processes into real optimization problems where the classical methods ...... correct design of a water distribution network is a complex process with many ...
Available online at www.sciencedirect.com

ECIENCE ~DIRECT ELSEVIER

e

MATHEMATICAL

AND COMPUTER

MODELLING

Mathematical and Computer Modelling 39 (2004) 1353-1374 www.elsevier.com/locate/mcm

M a t h e m a t i c a l M o d e l s and M e t h o d s in the Water I n d u s t r y J. IZQUIERDO M u l t i d i s c i p l i n a r y G r o u p of F l u i d M o d e l i n g D e p a r t m e n t of A p p l i e d M a t h e m a t i c s U n i v e r s i d a d P o l i t ~ c n i c a de Valencia, Valencia, S p a i n

P~. PISREZ AND

P. L. IGLESIAS

Multidisciplinary Group of Fluid Modeling Department of Hydraulics and Environmental Engineering Universidad Polit6cnica de Valencia, Valencia, Spain

(Received and accepted July 2003) A b s t r a c t - - T h e study field of water comprises a large variety of activities and interests, and therefore, areas of work. These areas face real engineering problems and, as a consequence, the contributions by some techniques from applied mathematics are really important. On the one hand, it is necessary to have analysis tools t h a t allow us to carry out reliable simulations of the different models by analyzing different configurations, operation modes, load conditions, etc., in order to study existing installations from their basic characteristic data. They are determinist processes whose mathematical expressions consist of coupled systems of different types of equations, algebraic, ordinary differential, and partial differential equations, typically nonlinear, for which specific numerical techniques are necessary. In addition, given the uncertainty of many of the d a t a (especially in existing configurations), it is frequently necessary to solve important inverse problems where other techniques (statistical, minimum quadratic, etc.) are also highly interesting. On the other hand, design is necessary in order to carry out new configurations. Frequently, the absence of initial d a t a and the need of fulfilling different types of restrictions (some of t h e m prone to subjectivity) turn design processes into real optimization problems where the classical methods frequently fail and for which the most current techniques based on neural networks, genetic algorithms, fuzzy theory, chaos theory, etc. are indispensable. This document describes the most i m p o r t a n t mathematical aspects needed in some of the stages of the integral cycle of water, with special emphasis on the most current topics. Q 2004 Elsevier Ltd. All rights reserved.

1. I N T R O D U C T I O N Almost half of the current world population lives in cities and it is calculated that by the middle of the 21 st century, nearly 90% of the I0 or 12 thousand million inhabitants of the world will live in cities. The increasing urban-planning development represents a permanent source of challenges for the management of many resources, especially water. This paper has been developed with the support of the CICYT of the Direcci6n General de Investigaci6n of the Ministerio de Ciencia y Tecnologfa of Spain within the research project REN2000-1152/HID. We would like to t h a n k the Foreign Language Co-ordination Office at the Polytechnic University of Valencia for their help in translating this paper. 0895-7177/04/$ - see front m a t t e r (~) 2004 Elsevier Ltd. All rights reserved. doi: 10.1016/j .mcm. 2004.06.012

Typeset by A f l / ~ - ~ X

1354

J. IZQUIERDOet al.

Cities change their hydrological cycle in a way that, frequently, they damage the quality of water and the environment. It is essential to minimize the negative effects and tend towards improved water management. Nowadays, there is a great deal of concern over the search of mechanisms of sustainable water supply at a reasonable cost. For different reasons, water management, in developed countries as in the third world, requires a great deal of innovation. Urban water management technology is developed at a regional level, although much more slowly than the technology devoted to large supply and storage systems. Therefore, the field of urban hydraulics has an important future projection and has important high-priority lines in R&D programs. With the increase of the urban water demand, new methodologies are required to seek the efficiency in the local use and distribution of water, by considering as sources all the urban waters and aiming at a reduction of losses. The new hydrological cycle should also include an integration of these new technologies. And all the components of the system should be planned, designed, and managed so that the supply is reliable. But reliability is a concept with a great component of subjectivity, difficult to be quantified and applied. The technologies in the water industry already involve a great number of disciplines: mechanics, electricity, communications, computer hardware, control methods, mathematics, and software. The challenge of planning, designing, and managing urban water systems is more and more difficult as different systems are needed and appear constantly. This article revises some of the contributions from mathematics to the water industry, especially urban hydraulics. We will present them under the following headings: modeling techniques, analysis techniques, design techniques, and new tendencies. 2. M O D E L I N G

TECHNIQUES

A model is an abstraction of reality. A model is a mechanism that transforms inputs, x, into outputs, y, by means of a set of relationships that can be algebraic equations, difference equations, ordinary differential equations, partial differential equations, and integral equations. If the inputs are directly transformed into outputs, the model consists of a transfer function or, in other words, the structure of the model is a transfer function. We will consider this type of model, sometimes called phenomenological, empiric, heuristic, or black boxes, when revising the new tendencies in the last section. Classic models, also called mechanicist, physical, transparent, or white boxes, apply some specific laws and natural relationships that encapsulate a certain phenomenon and require certain state variables that contain the necessary information to define the system and act as intermediaries between the inputs and the outputs. The physical relationships underlying the models that we are considering can be classified into two large categories: those called basic laws that are, fundamentally, conservation laws, and those called auxiliary relationships that are other additional expressions. In combination, these two groups of physical laws and relationships provide the tools to establish the mathematical models. 2.1. M o d e l s in F l u i d M e c h a n i c s The conservation laws for systems that imply transport and chemical reactions are those of conservation of mass, energy, and momentum. Fluid mechanics is highly based on the law of conservation of mass (known as continuity equation) and on the law of conservation of momentum that, in its most generic form, leads to the well-known Navier-Stokes' equations. The application of these laws to the systems or processes that we study here leads to equations called balances. Thus, the law of conservation of mass (continuity equation) leads to the balance of the mass of a given species, for example, a balance of water. The balances of momentum, obtained upon applying the corresponding law of conservation, have a dual character because the

Mathematical Models and Methods

1355

variation of momentum is equivalent to a force. Therefore, these balances are also called balances of force or Newton's law. Once the basic balances have been established, it is necessary to express the primary magnitudes they contain in terms of other appropriate secondary state variables and parameters. This is done by means of the so-called auxiliary or constitutive relationships that appear in different disciplines such as thermodynamics, kinetics, transport theory, fluid mechanics, etc. The parameters contained in such relationships are frequently determined, in an experimental way, in the calibration processes. The data for a model can be deterministic, stochastic, and fuzzy. Deterministic data are supposed to be exactly known, without uncertainties. By default, the data of a model are usually considered deterministic. In general, one can assume that the constants are deterministic, but for the state variables and the parameters such an assumption is not clear. The stochastic data are based on the theory of the probability analysis. These data are associated with some function of density of probability. Finally, fuzzy data, although also based on the assumption of an imprecise knowledge, are different from the stochastic ones. Instead of having a function of density of probability associated, they are characterized by a function of membership that expresses the extent to which an element belongs to a set. We will start by considering the models as deterministic, leaving the consideration of uncertainties for later. Many hydraulic engineering problems use as dependent variables the pressure, p, or the piezometric head, H, and the velocity, V, or the flowrate, Q, although the density of the fluid itself, p, can also be used as dependent variable. In an absolutely general way, the independent variables that appear in almost all the processes are time and the three space coordinates. The space and geometric considerations appear upon considering whether the balance should be carried out on a differential element (infinitesimal), which results in a differential equation, or if it should be extended to a complete finite domain such as a tank or a complete water column, in which case, algebraic equations as well as differential are obtained. The first ease refers to differential or microscopic balances and the resulting models are often called models of distributed parameters. Such balances provide, after solving the problem, solutions that are distributions or profiles of the state variables depending on the space (steady magnitudes) or on the time and the space (nonsteady magnitudes). Thus, a one-dimensional balance on a differential element of a pipeline will provide, once the model is solved, a distribution of pressures and flows along the pipe and at each point in time. When the balance is carried out on a complete finite domain, it refers to an integral or macroscopic balance and the models obtained are known as models of lumped parameters. The solutions given by these models usually provide global relationships between the input and the output on such finite domain. When we apply the conservation laws to an infinitesimal volume, we obtain the basic differential equations of the flow. In a specific problem, the equations will be integrated, but taking into consideration the initial and boundary conditions that correctly define a given problem. The exact analytic solutions can only be found under certain cases of especially simple geometries and/or boundary conditions. In general, the solution is obtained by means of numerical methods. In any case, it should not be forgotten that the models have to be experimentally validated by using dimensional analysis techniques and preparing experiments that reproduce with the appropriate reliability the problem and allow us to appropriately assess the numerical results. Next, we will try to deal, not in great detail, with the equations posed, although we will immediately turn to relevant cases for hydraulic engineering and, especially, to pressurized systems. We will focus mainly on single-phase liquids, especially water, which is an incompressible liquid (although for certain purposes a certain degree of compressibility is considered) and viscous (with the viscous effects concentrated in a parameter of friction in the wall). We will consider steady states as well as transients, and, finally, in most of the cases, we will center on one-dimensional flows. Finally, we will exclusively consider, for the sake of brevity, differential balances.

1356

J. IZQUIERDO et al.

2.1.1. D i f f e r e n t i a l b a l a n c e s W h e n carrying out a balance of differential mass on a differential control volume (CV) the so-called continuity equation (differential form) is obtained Op 0-7 + v . ( p v ) = o.

As special cases, we consider the following. • Steady flow: ~-T op = 0. The continuity equation is then v . (pv) = o

t h a t it is a nonlinear equation. • Incompressible flow: p = constant and ~t = 0, therefore, in the previous equation, p may leave the divergence operator, and the equation is linear V.V=0. For a basic flowing particle, the conservation of m o m e n t u m is written dV p-~ = pg- Vp+ V.a,

where g = acceleration of the gravity and a = tensor of viscous efforts. Particular cases are as follows. • Nonviscous flow: Euler's equation dV p --~ = pg -- Vp.

• Newtonian flow: Navier-Stokes equations. The viscous efforts are proportional to the speed of deformation through the coefficient of viscosity, #, which allows us to write the equation as dV p - ~ = pg - V p + / ~ V ( V • V) + #AV, which for the incompressible flow, V • V = 0, is written dV p - ~ = pg - V p + ~ A V .

Some of these aspects can be found in [1]. 2.2. M o d e l s in P r e s s u r i z e d

Flow

W h e n the mass and m o m e n t u m balances are particularized to a one-dimensional pressurized flow, the equations of continuity and m o m e n t u m are written [2] g dH

d--7 +

OV

g VsinO=O,

+

(2.1)

dV __ YlY I ~ 0, dt + g o~x + : 2D

ddt being the total derivative operator, a = pressure wave speed, 0 - pipe slope, f = friction factor, and D = pipe diameter. T h e equations of continuity and m o m e n t u m constitute a set of partial differential equations t h a t model the behavior of a compressible pressurized one-dimensional flow.

Mathematical Models and Methods

!357

Not all the terms in these equations have the same relevance in the field of pressurized water. After rendering them dimensionless, using certain well-known physical properties and using the fact that the convective terms are not significant as opposed to the rest, the equations that describe the behavior of pressurized flows are those of the so-called elastic model OH a2 0 V 0-T + -g Ox av

-

0,

(2.2)

vIvl

---~ + g ~ x + j - ~ - ~

=0.

(2.3)

If the variations in section and density are negligible or not significant, that is, if the pipe and fluid are rigid, it can be verified that there will not be spatial variation of speed ( ov ox ~ 0). In that case, the fluid will move in a compact way, as if it were a rigid solid. On the contrary, when the temporary variations of section and density are significant, pipe and fluid evidence their elastic properties, all the terms of the continuity equation are important, and the speed of the fluid cannot be the same in all the points of the pipe. A hydraulic transient in which the elastic effects are not relevant can be analyzed using the socalled rigid model or mass oscillation. On the other hand, when the elastic effects are outstanding, the complete equation of continuity should be used, and then the analysis of the transient is carried out by means of the elastic model or water hammer equations. For the rigid model, the incompressibility of the fluid and the indeformability of the pipelines lead to write the continuity equation (2.2) as follows: OV 0-7

=

o.

(2.4)

And, as (2.4) shows, since V does not depend on x, the equation of m o m e n t u m is written

1 dV f V]V I OH g d-T + D 2---g--+ ~-x = 0.

(2.5)

For a line of flow, this equation can be integrated between two points x0 and x X - xo V[V[

H(xo, t) = H(x, t) + f - D

-2g

X - xo d V

+

2g

dt'

(2.6)

This equation characterizes the rigid model and expresses that the energy of the fluid as a piezometrie head in x0 is invested between x0 and x in three aspects: part remains as head energy in point x. The rest is distributed into: kinetic energy that allows the acceleration of the fluid, and energy that is dissipated by the effect of friction. Once the permanent regime is reached, there is no longer temporary variation of the speed, the kinetic term is zero, and the whole difference of piezometric heads corresponds completely to the losses. The system is in steady state that, if there is flow circulating through the line, is governed by Darcy-Weisbach equation H(x0, t) - H ( x , t ) = f x -D

v l2g vl

(2.7)

Each one in its way--one in a simpler but less real way, the other one in a more complex but closer to real way, the rigid and elastic models manage the waves, pulses of pressure or perturbations throughout the system. But these perturbations are generated by certain elements present in the system and they are modified (reflected, absorbed, damped, amplified, etc.) by other elements. For example, the conduits themselves, with their resistance to the fluid flow, damp such pulses. Other elements (pumps, valves, junctions, side discharge orifices, etc.) located at the ends of

1358

J. IZQUIERDO et al.

the conduits that form an installation generate and modify such pulses. The behavior of these elements can be modeled by certain equations called boundary conditions. These boundary conditions are indispensable to correctly define the hydraulic analysis of a transient, that is to say, to pose a problem adequately. In general, the description of the elements' behavior is not simple and lumped and/or steady models are used, together with some simplifications, to build approximate but useful models of such elements. The boundary conditions are classified into dynamic and nondynamic, and the latter into autonomous and nonautonomous. A large number of devices is studied throughout the specialized literature (see, for example, [2]). A general mathematical modeling is presented in [3] that allows the virtual simulation of any combination of elements in a given point of an installation. Equations (2.7), (2.6), and system (2.2),(2.3) represent the behavior of the fluid in a simple pipe in steady, rigid transient, and elastic transient states, respectively. However, the distribution of water is carried out by means of networks of such pipes interconnected to each other. Although some of these networks are branched (dendritic), in general, urban water supply networks are looped. We only take into consideration here the steady problem for looped networks. Let us consider a general looped network with N P pipes, N J junctions (excluding fixed grade nodes), N L closed loops, and N F fixed grade nodes or reservoirs. It can be proved by means of the graph theory [4] that the following relationship is verified: N P = N J + N L + ( N F - 1). The model (see [5]) consists of the consideration of

(i) the layout of the network, (ii) the demands in all the junctions (Q1, Q 2 , . . . , QNJ), (iii) the diameters and the friction factors of all the pipes (D1,D2,. • • ,DNp, and f l , f 2 , . . . ,fNP, respectively), (iv) the piezometric head in the fixed grade nodes, (v) the N P flows circulating through the pipes (ql, q 2 , . . , qNP), (vi) the N J piezometric heads at the junctions (H1, H 2 , . . . , HNj). The equations that relate all these magnitudes are as follows. (a) The equations of continuity NPJ

~-~ qj +Q~ = 0,

for all the junctions i = 1 , . . . , N J,

(2.8)

j----1

(b)

where qj represents the flows for the N P J lines connected to the node i (the output flows are considered positive). The equations for the losses. For a pipe j between two junctions i and k, the loss is measured by means of a relationship Hi - Ilk = hj ( L j , D j , f j , q j ) ,

(2.9)

where Lj is the length of the pipe j and ha- is a nonlinear function of q~. The relationship is taken as quadratic, in general. However, when considering that the friction factor fj depends strongly on the flowrate qj through the Reynolds' number of the current flow, the nonlinearity of this equation is more than remarkable. Equations (2.8) and (2.9) constitute a nonlinear system of N J + N P algebraic equations. In the analysis, the unknowns are, in general, the flows qj of the pipes and the heads at the junctions Hi, considering as known (in deterministic, stochastic, or fuzzy way) all the other

Mathematical Models and Methods

1359

elements. Nevertheless, the need to solve the so-called inverse problem is more and more urgent. In effect, the networks have been installed for a long time and, although the lengths have not changed, the diameters have, due to the deposit of sediments inside the pipes, and also due to the friction factors, as a result of their aging. For the calibration of a system, whose objective is exactly the determination of the current available diameters and the real friction factors, this system should be solved in an inverse way, using as data measured values of flows in some pipes and heads in some junctions. This can lead to either underdetermined or overdetermined problems. On the other hand, the demands are not known accurately, they are variable with time and depend on different circumstances such as the time of the day, the season, the weather, etc. In addition, in many water supply systems there are leaks and nonlocalized consumptions that make the problem still more complex. As we will see, there is an increasing interest at present in the early detection of anomalies and leaks in water supply networks. Finally, in the design of new systems, as it can be seen later on, some or all of the diameters and lengths are unknown, which turns the design into a true optimization problem, when considering certain constraints, functional, legal, etc., on the network. Transient phenomena in complex systems are modeled also using the continuity equation (2.8) at the junctions, but taking into consideration in each line, instead of equation (2.9), equation (2.6), characteristic of the rigid model, if this model is used, or equations (2.2) and (2.3) if the elastic model is necessary. Thus, algebraic-differential mixed systems are obtained for whose solution special techniques are required, some of which will be described in the section on analysis techniques.

2.3. Models in Urban Drainage Urban drainage systems have had two basic objectives, to maintain public health and to avoid floods. More recently, pollution control to allow the preservation of aquatic ecosystems has been added to the list. The mathematical models as design and operation tools of these systems include these objectives. There are detailed models for the collection of rainwater and wastewater, from treatment plants and receiving streams that describe the operation according to objectives and specific necessities. At the moment, the challenge consists of integrating all these models within a global model that allows an integrated management of an urban drainage system. The basic principles are known, but assembling mechanisms for the existing models of the different subsystems are needed to allow such a global management [6]. The collection of water is carried out through networks of collectors in which the behavior of the flow can be modeled by the so-called equations of Saint Venant, obtained, once more, by carrying out balances of mass and momentum in channels through which the flow circulates in a free surface regime [7]

Od a2 0 V V Od 0---[ + --g --Ox + -5-;x = O,

(2.10)

OV Od OV O-T + g ~ + V - ~ + E = O .

(2.11)

Here d is the depth of water in the channel and the term E considers the gravitational forces and those of friction. These equations are very similar to those that characterize the pressurized flow. On the contrary, a characteristic of drainage is that the direction of the flow is always downstream, for which the complex systems are modeled, in general, by means of branched structures. The result is that the steady problems have an explicit solution and do not involve sets of simultaneous equations as for the looped networks. The behavior of a treatment plant does not only depend on biological processes but also physical. In a typical way, the mixing properties are modeled by means of serial tanks carrying

J, IZQUIERDO et al.

1360

out integral balances of mass of the substances of interest [8]. This modeling leads to nonlinear sets of equations that are posed by means of transformation techniques, convolution of integrals, etc. The reason for an integrated model to exist is the need of measures that improve the operation of the system, especially water quality in the receiving streams. It is fundamental to characterize the impacts of urban, industrial, or agricultural waste in the ecosystems, regarding biological, physical, hygienic, aesthetic, hydraulic aspects, and also in terms of time: sharp, discontinuous, accumulative episodes, etc. Typically, it is not necessary to model with all detail the enormous variety of effects in a receiving stream but to emphasize the dominant aspects. Thus, typically only pollutants and processes that have a direct significance should be taken into consideration. Among them, the dissolved oxygen consumption (DO), in processes such as the decomposition of organic matter, nitrification, and breathing, is of great importance. Although DO is recovered by means of reaeration and photosynthesis processes, the low concentrations observed in some receiving streams can result in serious problems for the fauna as well as for the flora of the area. For a one-dimensional receiving system of uniform flow, the quality model of the DO can be formulated by means of a variant of the advection-diffusion equation [9]

OC

OC

O~C

0--[ + U -~z = K , Oz----~ -

~ rkkkCk + T fc,

(2.12)

k where C = C(x, t) represents the concentration of DO, Kl is the coefficient of longitudinal diffusion, rk are stequiometric constants, the subindex k refers to all the substances consumed by DO, and T f c represents the sources of DO. The concentrations of the substances consumed by DO, Ck, in turn, verify decay equations as OCk

O---t-+

U OCk

~

02Ck

= K1 ~

- kkCk + Tfc~.

(2.13)

2.4. U n c e r t a i n t y in the M o d e l s Uncertainty is an inherent property of modeling. It is not realistic to expect that a model works perfectly. The modeling that takes into consideration the uncertainties provides information on the inappropriate operations of the model, for example, on the quality of the data that is not good enough to be useful, on the structure of the model that is incorrect, and on the available information that is not enough for the calibration of all the parameters. The encapsulated uncertainty in a model is a combination of the uncertainty in the input variables, the uncertainty in the structure of the model, and the uncertainty in the parameters of the model. In addition, in the simulations, uncertainty also exists in the initial conditions. The analysis of the error of a model allows us to recognize the constrains of the model, which motivates the quantitative evaluation of error bounds, fundamental for correct decision making. It also provides information and vision of the model that helps to avoid incorrect interpretations of the modeling, and therefore, it allows a satisfactory operation of the model. As it has already been stated, the inaccuracy of a model comes from the uncertainty of the input data, from the poor structure of the model, and from the parameters. In addition, in the simulation, the uncertainty of the initial and boundary conditions also have their contribution. Therefore, it is necessary to be able to estimate the uncertainty in the results, given the magnitude and distribution of the errors of the model. However, in many cases, the magnitude and distribution of the errors are unknown. In such cases, the bounds or intervals of uncertainty are frequently determined by the modeler's own experience, by means of the values obtained from the literature and also by means of calibration processes supported by field measurement. Study techniques of error propagation are then necessary. In the section about analysis, we present some of the most frequently used techniques.

Mathematical Models and Methods 3. A N A L Y S I S

1361

TECHNIQUES

This section presents a brief revision of the most frequently used analysis techniques for the solution of the problems outlined in the models described in the previous section. We will begin with the consideration of the static problem in a water distribution system. Then we will approach the dynamic problems. And, finally, we will devote a paragraph to uncertainty analysis.

3.1. Steady Analysis of a Water Distribution Network The steady analysis of a network is modeled by equations (2.8) and (2.9) in reference to all the connections and all the pipes [5]. This constitutes a nonlinear system of NY + N P equations whose unknowns, for analysis purposes, are the piezometric heads at the junctions and the flows through the pipes. The size of the problem can be reduced by means of some of the following techniques. (a) The equations of the loops. Losses, given by (2.9), are taken into consideration on each one of the N L loops and they are equal to zero. On the other hand, N F - 1 equations of losses between pairs of nodes with known heads (reservoirs) are written. Between two such nodes, the losses are equaled to the head difference between them. Thus, the heads in the junctions are removed from the system leaving only the N J equations of continuity and the N L + N F - 1 equations of the loops, the only unknowns being the N P flows that circulate through the lines. If there are initial values of the flows that satisfy the continuity in each junction, the number of equations is reduced to N L + N F - 1, called equations of loops whose unknowns are the /~qk of each loop or path between the fixed grade nodes. (b) Equations of the nodes. Equations (2.9) are used to express the flows in terms of head differences. When substituting into the equations of continuity (2.8), a nonlinear system of N J equations with an equal number of unknowns is obtained: the piezometric heads at the junctions. In both cases, the model results in a large nonlinear system of equations even for small water supply networks consisting of hundreds and even thousands of nodes and lines. All the techniques involve numerical iteration, as was expected. From the most frequently used techniques we can mention: (a) (b) Ca) (d)

the Hardy-Cross' method [10], Newton methods [11], the linear method [12], the method of conjugate gradient [13,14].

In general, the latter is currently used. It is, for example, the method that uses the package SARA (GMMF) [15], whose calculation routine is that implemented by the program EPANET [16] of the US EPA (Environmental Protection Agency).

3.2. Quasi-steady Analysis The steady analysis of water supply networks is combined with discrete integration techniques of the flows that circulate through the pipelines to carry out studies of the behavior of a network that evolves very slowly along a period of time (usually the 24 hours of a day), taking into consideration the variations of consumptions. The model obtained is called quasi-steady and its computer implementation extended period simulation [2].

3.3. Dynamic Analysis in Pressurized Systems When the conditions are more quickly changing, inertiM dynamic models, the rigid model, or the elastic model have to be used. These models, as it has been shown, are characterized

1362

J. IZQUIERDOet al.

by sets of nonlinear differential e q u a t i o n s ~ r d i n a r y differential equations of type (2.6) for the rigid model and sets of partial differential equations (2.2),(2.3) for the elastic model, besides the equations of continuity in the junctions that are algebraic. In addition, there are frequent cases in which problems of moving boundaries, or singularities, etc., are added. For example, in pipes with entrapped air, the behavior of the air pockets that are generated have to be analyzed if one wishes to have an evaluation of the potential risks. The rigid model provides an acceptable solution [17,18]. The problem is modeled by means of a mixed integral-differential-algebraic system, together with the initial and boundary conditions that should be resolved to find the unknowns: speed of the water columns, location of the interfaces water-air and pressure of the air pockets. This specific problem presents a number of difficulties. • It is a mixed problem. • The equation of the water column has a singularity at the origin. • It is verified that the unknown magnitudes present phases of quick variation together with moments of almost zero variation. So it becomes essential to use a method with adaptive variable step. • Finally, the number of equations decreases every time a block column completely empties through the downstream end of the pipe, as it has been stated above, and thus a special management of the set of equations is necessary. The hydraulic transients in pressurized systems are modeled in a general way by means of the so-called elastic model [2,19,20]. This model is characterized in each pipe by the set of equations (2.1). This quasi-linear system belongs to the hyperbolic type, in the sense that A(V) has different real eigenvalues for each V. In fact, the typical eigenvalues of A(V) are A = V =t=a, that are real and different, keeping in mind that a is at least two orders of magnitude higher than V in the pressurized hydraulic systems. From the methods used to solve these equations we highlight the following. • the wave plan method [21], with more physical foundations, that is the basis for the package SURGE [22]. • Implicit finite differences [23] without restrictions as for stability, therefore, a priori, there are not theoretical constrains in the selection of the temporary discretization step, which is attractive at first, but for different practical reasons it is not as it is very complex to combine with general boundary conditions that appear in real systems. In addition, it produces certain undesirable spurious solutions. • Methods of finite elements [24,25], originally unable to capture abrupt front waves. A number of techniques have been devised over the years to overcome this drawback using SDFEM methods [26] and DG methods [27,28] among others. Also, techniques combining implicit time integration procedures including finite differences and finite elements schemes [29] have been shown to provide alternatives to the more sophisticated and expensive space-time methods for simulation of unsteady flows on incompressible fluids. • Methods of boundary elements [30]. • Spectral methods [31] appropriate for specific cases, basically periodic, as problems of resonance, and pseudospectral methods [32] that use characteristic points of Chebyshev or Legendre's polynomials as collocation points and transform the system of PDEs into a coupled system of ODEs. • The method of characteristics (MOC) [2,19,20]. It is the most popular and generally used. It is used by DYAGATS [33] and ARhIETE [34]. Its popularity lays in the fact that it has proved to be superior to the other ones in several aspects. It is simple to program. It is also computationally efficient because, with certain cautions, it can always remain explicit and linear, which avoids expensive matrix manipulations and iterations and avoids rounding errors. It allows the capture, better than the others, of abrupt fronts of waves,

Mathematical Models and Methods

1363

without smoothing or damping them numerically or artificially as some of the mentioned methods. It illustrates the propagation of waves perfectly, avoiding, as it can do without unnecessary interpolations, effects such as the acceleration of waves. Usually, a fixed mesh is used when applying the MOC to the resolution of hydraulic pressurized transients. To choose the time interval for a complex system is a difficult problem due to two conflicting restrictions. On one hand, for the appropriate simulation of the boundary conditions, for example, to obtain heads and flows in junctions of two or more pipes, it is necessary that the time interval be the same in all the pipelines. The second restriction comes from the specific nature of the MOC. After rejecting the convective terms in (2.1) (as it is almost always justified), equations (2.2) and (2.3) control the phenomenon. The stability of the MOC requires that the ratio between the time, At, and the spatial, Ax, intervals coincide with the celerity of each pipe. In other words, Courant's number C = a A t / A x must be exactly equal to one. For any complex system, with pipelines, in general, of length and velocities with wide ranges, it is impossible for Courant's number to be 1 for all the pipelines and for a reasonable At. This is especially serious when there are very short reaches in the system, since a minimum spatial discretization in a short reach conditions dramatically the number of calculation points necessary for the long pipes. This increases the need for computational resources, and thus, makes the simulation unfeasible. Also, many boundary conditions are complex and, for the reason stated above, their different elements cannot be considered connected by short reaches of pipe. In front of this challenge, researchers have developed different specific techniques that allow carrying out reasonable and reliable simulations. On one hand, mechanisms for the efficient treatment of complex boundary conditions have been designed [34,35] that allow us to model virtually any boundary condition in a water distribution system without using short pipes. This widespread treatment of the boundary conditions uses abundant numerical techniques. Also, the ELLAM formalism introduced by Celia et al. [36,37] provides a general characteristic solution procedure, presents a consistent framework for treating general boundary conditions, and allows coarse spatial discretization and large time steps while generating accurate numerical solutions [38]. On the other hand, there has been an attempt to relax the numerical restrictions of the model. Basically, two strategies have been used. On one hand, one of the data known with more uncertainty, wave speed, has been adjusted artificially so that the condition of Courant-FriedrichsLewy (C < 1) is met. In spite of the liberties that this method takes with the physical problem, this technique is widely recommended in the literature [2,19,20]. The second option consists of allowing Courant's number to be lower than the unit and to carry out space as well as time interpolations. Several interpolation proposals appear in the literature: space interpolation [39], in time [40], mixed [41], more complex interpolation schemes [42], using cubic splines [43], other flexible algorithms [44]. It can be verified, for many of the interpolation strategies suggested, that their use is equivalent to the consideration of a system of EDPs to represent the model that substitutes system (2.1), called EHDE (equivalent hyperbolic differential equations) [45]. Thus, it can be seen that any interpolation technique distorts the original equations by introducing numerical dissipation and dispersion and it produces effective changes in the wave speed. There are many study topics related to the analysis of transients in complex systems. An aspect that fully connects with one of the most current concerns for the water industry is the detection of leaks in a network. Leaks imply economic losses, sometimes very important, and they can be the cause of environmental damages. The early detection of leaks allows a quick action and it can avoid or minimize damage. From the techniques used, some of them quite recent, we stress here those based on hydraulic transients. Leaks contribute to damp hydraulic transients. This fact allows the localization and identification of the magnitude of a leak with the solution expressed as a Fourier series. Indeed, if there is no leak, all the terms of the Fourier series are damped uniformly, but in the presence of a leak the terms are damped in a different way, which allows their localization and assessment [46,47]. Also, techniques based on response methods in

1364

J. IzQUmP~o et

al.

frequency are used [48]. When studying the transient produced, for example, by the maneuver of a valve by the MOC and upon analyzing the solution in the domain of the frequency, it can be observed, in presence of leaks, resonant peaks of pressure that are added to the response produced by the system in case there is no leak. The analysis of these peaks allows the localization and characterization of the leaks. Among other examples of topics related to the water industry, we only cite here, for the sake of completeness, the following: two-phase problems (see [49,50]), suspension flows, partial phase separation and cavitation (see [51]), fluid-structure interaction (see [52,53]), 3-D problems for higher Reynolds number fluid flows (turbines, etc.) (see [54]), modelling of water treatment installations (see [55]), etc. 3.4. U n c e r t a i n t y A n a l y s i s Although a mathematical model can be fully accurate, calculations are based on data that contain a significant amount of uncertainty. This uncertainty has a decisive influence on the precision with which it is calculated. Therefore, it is very important not only to have the data from flows and pressures in the network at any moment, but also some indication of their reliability, that is to say, the degree of uncertainty at which they are affected. The assessment of the imprecision of the performed calculations originated by the uncertainty of the input data can be carried out by means of adequate robust estimation procedures, for example, by means of reliability interval analysis [56]. These techniques do not provide a single estimated state, but rather they calculate groups of feasible states that correspond to a certain level of uncertainty in the measurements. These sets consist of a series of higher and lower bounds for the individual variables of the system, and therefore, they provide bounds for the potential error from each variable. The analysis of confidence intervals is a calculation process of bounds of uncertainty for the estimations of states originated in the inaccuracies of the input data. Basically, the question is, what is the reliability of the estimated state x* for a model, knowing that the vector of measurements y is not unique but rather it can vary in a region [y - by, y + 5y]? When referring, for example, to consumption in water distribution network, that it is the real truth. A method to quantify the uncertainty of the solution of nonlinear systems with uncertainties is the Monte Carlo method. The basic idea that underlies this method is the use of an estimator of determinist states, repeatedly, for a large number of vectors of measurements chosen from the range [y - by, y + 5y]. Each state estimation calculated is compared with the maximum and minimum values obtained in previous simulations and the new bounds are established, if applicable, in an appropriate way. In this way, the error bounds for the state variables separate and after many tests they converge asymptotically to their true values. The use of this method could be justified by means of the recognition of the nonlinearity of the model for water networks. However, their computational inefficiency makes the method inappropriate for on-line control applications. In [57], a technique of linearization of the set of equations is used that describes the water distribution network that allows us, by means of the simulations carried out massively, to obtain results comparable to those of the Monte Carlo method but requiring much smaller computing times. 4. D E S I G N

TECHNIQUES

In the design of pipeline networks, the problems hinge on the election of the diameters (and even, possibly, the layout) of an interconnected pipeline system so that the specified demands in the consumption nodes and levels of minimum pressure are met [58]. During the last decades important efforts have been devoted to the development of algorithms and water supply network design models. And annually, important investments in infrastructures for the distribution of

Mathematical Models and Methods

1365

water are carried out: In many cases, the primary objective of the models has been the minimization of the cost (investment and operation) of the network [59-61]. However, in practice, the correct design of a water distribution network is a complex process with many objectives that involves a delicate balance between the cost of the network and its reliability [62]. The term reliability in a water distribution network does not have a clearly defined meaning. Reliability conveys the capacity of the network to provide an appropriate service to consumers, under normal as well as under extraordinary operation conditions [63]. The suitability of the service is measured in terms of quantity and quality of the water received by consumers. The quantity is specified in terms of flows that should be delivered and minimum pressures of service. Quality is determined by the concentrations of disinfectant and/or harmful substances transported in water. Nevertheless, the real analysis of reliability is a complex process that should keep in mind the impacts of a range of factors that include the failure of components, the variability of the demands, and the uncertainty in the capacity of a pipe to provide a required service. A direct consequence of this complexity is the lack of generally accepted solutions for the design of water supply networks based on the optimization of cost and reliability. A large part of the optimization models that try to include reliability do it by means of restrictions within traditional design models based on minimum cost. Also, the models were completely determinist. It is clear that certain probabilistic, heuristic, etc., considerations should be considered in the treatment of the reliability that take into account rates of devices failures, statistics of occurrence of large demands, for example, before the appearance of fires, etc. [64,65]. Research has been highly centered on the attempt to incorporate new concepts and measurements of reliability and, consequently, to develop models and improved formulations [62,66,67]. Ostfeld and Shamir [68] have developed a model for the design of reliable multiquality water distribution systems. This model includes restrictions of reliability that assure the appropriate supply to consumers in terms of quantity and quality. It will be briefly presented here. It is based on the principle of decomposition by Alperovits and Shamir [59]. For the flows in a looped system, the optimal design is the solution of a convex quadratic programming problem that keeps in mind not only hydraulic considerations, but also quality. It can be divided into two problems: one hydraulic and a quality one. The hydraulic problem is a linear programming one and that of quality has a convex quadratic objective function subject to constraints that are linear inequalities. The system includes pipes, pumps, treatment plants, sources, and consumptions. It has N pipes, N S O supply sources (including treatment), N N C internal junctions, N E I internal pipes (excluding those connected to the sources), and N B pumping stations. The network consists of N L loops and N P paths. There are also N D commercial diameters, so that the number of possible pipe segments is N S = N D x N. The problem, for the N L O load conditions that are considered (indexed with k) is written in matrix form

subject to k k (qk)]Xp=bk, [LplpY~

Vk,

(4.2)

k k k [P;IpJp (qk)] XB