Hindawi Publishing Corporation Abstract and Applied Analysis Volume 2013, Article ID 169670, 13 pages http://dx.doi.org/10.1155/2013/169670 Research Article Error Analysis of Some Demand Simplifications in Hydraulic Models of Water Supply Networks Joaquín Izquierdo,1Enrique Campbell,1Idel Montalvo,2 Rafael Pérez-García,1and David Ayala-Cabrera1 1Flulng IMM, Universitat Polit` ecnica de Val` encia, Camino de Vera S/N, Edificio 5C bajo, 46022 Valencia, Spain 23S Consult GmbH, Albtalstraße 13, 76137 Karlsruhe, Germany Correspondence should be addressed to Joaqu´ ın Izquierdo;
[email protected] Received 29 October 2013; Accepted 4 December 2013 Academic Editor: Rafael Jacinto Villanueva Copyright © 2013 Joaqu´ ın Izquierdo et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Mathematical modeling of water distribution networks makes use of simplifications aimed to optimize the development and use of the mathematical models involved. Simplified models are used systematically by water utilities, frequently with no awareness of the implications of the assumptions used. Some simplifications are derived from the various levels of granularity at which a network can be considered. This is the case of some demand simplifications, specifically, when consumptions associated with a line are equally allocated to the ends of the line. In this paper, we present examples of situations where this kind of simplification produces models that are very unrealistic. We also identify the main variables responsible for the errors. By performing some error analysis, we assess to what extent such a simplification is valid. Using this information, guidelines are provided that enable the user to establish if a given simplification is acceptable or, on the contrary, supplies information that differs substantially from reality. We also develop easy to implement formulae that enable the allocation of inner line demand to the line ends with minimal error; finally, we assess the errors associated with the simplification and locate the points of a line where maximum discrepancies occur. 1. Introduction Inthetaskofmathematicalmodelingofsuchcomplex structures as water distribution networks (WDNs) the use of simplifications aimed to optimize the development and use of the models is unavoidable. Such simplifications stem from the complexity of the modeled infrastructure and, at thesametime,arerelatedtothelargespatialdistribution typical of WDNs. These models are applied in all the areas of hydraulics—including urban hydraulics [1,2]. Currently, with the generalized use of geographic information systems, models containing even hundreds of thousands of pipes and nodes are being built [3]. Extremely detailed modeling of real WDNs, even under the unrealistic hypothesis in which uncertainty can be ignored, produces a substantial amount of data and requires sophisticated computational tools and mechanisms to reliably interpret the obtained results in terms of what occurs in the system. Current computational power can be used to build hydraulic simulation models capable of providing a very detailed and accurate model but not an improved understanding of the main structure of the underlying system. Also, as such models would require very dedicated calculations, certain aspects must be considered to ensure efficient implementations. Specifically, optimization of WDNs, whether used for planning or operational purposes, often requires many iterations [4], each involving computationally expensive simulations and huge computer memory. Let us mention just a few of the most typical simplifications: the use of one equivalent pipe to represent two or more parallel or series pipes; the removal of short pipe segments including dead ends, service connections, and hydrants; the distribution of emitter exponents without considering leakage profiles along the WDN; the assumption of friction factor values without a detailed consideration of the pipes state; model calibration assuming values of one or more of the calibration elements as fixed; the use of a single friction factor for the entire WDN or for an entire sector; or the use of
2Abstract and Applied Analysis a single emitter leakage exponent for the entire network. The last two simplifications, in particular, are inescapable when working with EPANET [5], a tool of water network analysis in general use worldwide. Also, some simplifications can totally undermine studies of hydraulic transient phenomena inWDNs.See,forexample,[6,7]. Among the various simplifications used in the analysis of water distribution systems some are assumed in a generalized way without additional introspection. They are simplifications derived from the different levels of granularity at which a network can be considered. As mentioned before, real water distribution networks, especially those of large cities, cannot be efficiently modeled in their entirety. In approximate models some granulation reduction actions are performed such as skeletonization, grouping, pruning, and clustering.See,amongothers,[8–18]. In particular, one of these simplifications is the grouping of the consumptions associated with a line in one or both ends of the line. These points concentrate all the existing consumption points (users) within the line. The need for implementing this specific simplification is evident because a faithful consideration of demand would imply the inclusion of a large number of nodes equal to the number of consumption points. In a branched network with few consumers, this would not represent a major problem. However, problems ariseinWDNswithupto30connectionsperline(e.g.,a streetpipeline).InalargeWDN(e.g.,a500kmWDN)it would amount to considering about 150,000 nodes, which is impractical when it comes to the construction of the network model, the performance of the calculations, and the display and understanding of the results. This simplification copes with the continuity principle or conservation of mass. However,theenergyaspectsarecompletelyignored. The methods for calculating demand load in the models are one of the least studied aspects despite the obvious importance for defining model reliability. Recently, Giustolisi et al. [19] have addressed this problem from a global perspective andhavedevelopedamatrixtransformationapproachthat changes the classical solution of the nonlinear system of equations describing a WDN based on the conjugate gradient [20], into what they call enhanced global gradient algorithm (EGGA). Note that the solution in [20]isimplemented within the widely available freeware EPANET 2, used in a generalized way by many engineers and practitioners around theworld.EGGAreducesthesizeofthemathematicalproblem through a transformed topological representation of the original network model that preserves both mass and energy balance equations and improves the numerical stability of the solution procedure. According to the authors, EGGA significantly improves the model’s computational efficiency without sacrificing its hydraulic accuracy. However, this solution, although technically impeccable from a theoretical point of view, exhibits a number of practical drawbacks. Firstly, those matrix transformations are not implemented within EPANET and, as a result, are not available to the huge community of its users. Secondly, the transformations are too complex for most users of this program and, especially, too complex to be incorporated into the EPANET toolkit, given the in-depth knowledge of programming techniques that their implementation would require. Thirdly, the transformation matrices must previously be explicitly written; even though obtaining these matrices is relatively straightforward, the computational efficiency, at least in terms of memory needs, is not evident. One has to use several additional (very sparse) matrices of sizes or the order of the number of resulting pipes times the number of original pipes, and the number of resulting pipes times the number of unknown head nodes, are explicitly used. When solving real-world problems with hundreds of thousands of nodes and pipes, this may become a serious problem. Fourthly, for networks already modeled by excluding those intermediate demand nodes, the solution of matrix transformation will be useless. Fifthly, when planning and designing a new network starting from the household demand distribution, it would be perhaps desirable to start building the model by performing the simplification from the outset, in order to avoid later complications. Compelled by those drawbacks we have addressed the problem from another, we claim, more practical point of view. This paper analyzes the possible errors from the effect of using certain types of simplifications when loading demands in models, specifically, the widespread 50% rule, which allocates halfofthein-linedemandtoeachlineend.Weanalyze to what extent this simplification is acceptable or, on the contrary, supply information that differs substantially from reality.Also,weobtainformulaethatenabletoallocate inner line demand to the line ends with minimal error. Finally, a calculation of the maximum head point discrepancy associated is provided. Our proposal involves simple, direct methods that can be easily applied by any user of any WDN analysis package, since emphasis is not placed on programming ability, but on how to make a decision about the technical aspect of simplifying themodeland,thus,loadthedemandproperly.Users,having already developed models of their networks, may revise the allocation rule used and replace it, if necessary, with the values provided by the new formulae, what will enable them to obtain more reliable results. Also, users starting the model of a new network may make an a priori decision about how to simplify the network and suitably implement the associated simplifications. We first present a simple case that enables us to shed light onto the problem: a single line with variable distribution and granulation consumption is considered. Then an example of a real network is analyzed using the lessons learned. The paper closes with a conclusions section. 2. Line with Associated Demand Let us first consider the case of a single line associated with some internal consumption under steady state condition. Such a line is representative of the simplest installation (a line between two nodes) with a given inflow rate. The characteristics of the line are (i) length: 𝐿, (ii) diameter: 𝐷,
Abstract and Applied Analysis 3 (iii) upstream head (boundary condition at the upstream node): 𝐻0, (iv) friction factor: 𝑓, with its associated line resistance: 𝐾=8𝑓/(𝑔𝜋2𝐷5), (v) inflow: 𝑄in. Various demand scenarios of consumption in the line may be tested. Such scenarios are associated with two characteristics: (i) total demand in the line with regard to inflow, (ii) specific distribution of the demand along the line. Let us assume that the flow consumed within the line (total in-line demand) represents a percentage of the line inflow. If this fraction is represented by 𝐹𝑄,0<𝐹𝑄≤1,the actual demand in the line is given by the expression 𝑄𝑑=𝐹𝑄𝑄in.(1) 2.1. Uniformly Distributed Demand along the Line. To start with the study, we will assume that the actual demand of thelineisuniformlydistributedintoanumber𝑛of equally spaced interior points (nodes); 𝑛cantakeavalueranging from1(inthecaseofalinewithasingledemandnodeinthe middle) to a large integer number (in the case of an equally distributed demand throughout the line). Observe that we do not consider any demand at the end nodes, since we are only interested in the line demand associated with the interior nodes. Figure 1 shows various distributions of piezometric head corresponding to values of 𝐹𝑄equalto1,0.8,0.6,and0.4,fora set of values of 𝐿,𝐷,𝐻0,𝑓,and𝑄in.TobuildFigure 1 we have used the specific values 𝐿=500m, 𝐷=300mm, 𝐻0=50m, 𝑓=0.018,and𝑄in =0.25m3/s. As mentioned before, the demand has been equally distributed among 𝑛equally spaced interior nodes. Specifically, in Figure 1,𝑛takes the values 1, 3, 7, 11, 19, and “infinity.” The “infinity” case represents a uniform continuous demand. The various curves in Figure 1 have straightforward interpretation. For the polygonal hydraulic grade lines (HGLs) made out of segments between consumption points, the calculations correspond to the usual hydraulic calculation of losses. The polygonals start at the boundary condition (0,𝐻0), the other vertices being the 𝑛+1points as follows: (𝑗 𝐿 𝑛+1,𝐻0−𝐾𝐿 𝑛+1𝑄2 in 𝑗 ∑ 𝑘=1(1−𝑘−1 𝑛𝐹𝑄)2), 𝑗=1,...,𝑛+1. (2) Let us call 𝐻𝑅(𝐹𝑄,𝑛;𝑥)these HGLs, the subindex “𝑅” standing for “real” distribution of piezometric head along the line, as real demands are used to calculate (2). The calculation for the ideal HGL corresponding to a uniform continuous demand, which is used here as the limit for 𝑛→∞of the discrete uniform distribution of demands, is performed by integrating the differential loss Δ𝐻=−𝐾(𝑄in −𝑄𝑑 𝐿𝑥)2Δ𝑥 (3) along the line. The value 𝑄𝑑/𝐿is the (constant) demand per unit length and 𝑥is the distance to the upstream node. By integrating, and using (1), the piezometric head correspondingtothiscontinuouslossisgivenby 𝐻𝑅(𝐹𝑄;𝑥)=𝐻0−𝐾𝐿3𝑄2 in 𝐹𝑄[1−(1−𝐹𝑄𝑥𝐿)3], (4) which corresponds to the upper curve, a cubic, in each of the graphs in Figure 1. It becomes clear that the greatest discrepancies occur for values of 𝐹𝑄close to 1 (e.g., when a high percentage of the inflow is consumed along the line). As mentioned before, these “real” HGLs in Figure 1 have been calculated according to the demand distribution at the various inner points in the line. However, models of large WDNs do not usually take intermediate demands into account; in contrast, the demand of each line is allocated to the end nodes of the line, the 50% rule being generally used. 2.2. Allocation of In-Line Demand to the Line Ends: Is the 50% Rule Adequate? Let 𝐹𝑄𝑑bethefactorthatallocatesapartof the line distributed demand, 𝑄𝑑,toitsupstreamend.Thus, thedemandassignedtothisupstreamnodeis𝑄0=𝐹𝑄𝑑𝑄𝑑. As a result, 𝑄𝑙=𝑄in −𝑄0is the flowrate through the line. Note that, using (1), 𝑄𝑙=𝑄in (1−𝐹𝑄𝐹𝑄𝑑). (5) Then,thecalculatedheadvalue𝐻𝐶for a given value of 𝐹𝑄𝑑is 𝐻𝐶(𝐹𝑄𝑑;𝑥)=𝐻0−𝐾𝑄2 𝑙𝑥. (6) The HGL obtained is, thus, a straight line that connects the point (0,𝐻0)with the point (𝐿,𝐻𝐶(𝐹𝑄𝑑;𝐿)).Thislastvalue corresponds to the calculated head at 𝐿,thedownstream node. In Figure 2, dashed lines have been added to the first two charts of Figure 1. These new HGLs have been calculated togivethesamepiezometricheadatthedownstreamnode as the line corresponding to a demand concentrated in the middle point, 𝑛=1,forthecase𝐹𝑄=1(left chart), and as the line corresponding to a continuous demand for 𝐹𝑄=0.8 (right chart). These lines have been obtained by allocating a fraction of the interior line demand to the upstream node andtheresttothedownstreamnode.Analogousdashed lines can be obtained for other combinations of 𝐹𝑄and 𝑛. If the allocated fractions to the line ends are different, the corresponding (straight) lines (the lines given by the numerical model with lumped demands at the ends of the line)willalsobedifferent. Two problems arise at this point. (a) Firstly, it would be desirable to know the best allocation of the total in-line demand to the line ends, that is to say, to know the value 𝐹𝑄𝑑that solves the following problem: Minimize 𝐹𝑄𝑑𝐻𝐶(𝐹𝑄𝑑;𝑥)−𝐻𝑅(𝐹𝑄,∗;𝑥),(7)
4Abstract and Applied Analysis FQ=1 FQ= 0.8 FQ= 0.6 FQ= 0.4 50 48 46 44 42 40 38 36 34 50 48 46 44 42 40 38 36 34 50 48 46 44 42 40 38 36 34 50 48 46 44 42 40 38 36 34 0 250 500 0 250 500 0 250 500 0 250 500 Inf 19 11 7 3 1 Inf 19 11 7 3 1 Inf 19 11 7 3 1 Inf 19 11 7 3 1 Figure 1: Hydraulic grade lines in one single line for various uniform distributions of demand. FQ=1 FQ= 0.8 50 49 48 47 46 45 44 43 42 41 40 50 49 48 47 46 45 44 43 42 41 40 0100 200 300 400 500 0100 200 300 400 500 Lump Inf 19 11 7 3 1 Lump Inf 19 11 7 3 1 Figure 2: Examples of discrepancy between distributed and lumped demand models. for certain functional norm ‖⋅‖,where𝐻𝐶(𝐹𝑄𝑑;𝑥)is calculated by (6), according to the lumped demand allocation to both line ends, and 𝐻𝑅(𝐹𝑄,∗;𝑥)accounts for the real demand distribution, either calculated by (2)or(4) (or any other more general expression corresponding to not uniformly distributed demand, which we address later). The asterisk denotes other parameters, such as 𝑛in (2), which may appear in the expression of 𝐻𝑅. (b) Secondly, after having made a suitable line-end allocation decision, it is of interest to know the actual distribution of piezometric head errors on the line
Abstract and Applied Analysis 5 Table 1: Values of 𝐹𝑄𝑑as a function of 𝐹𝑄and 𝑛when solving (9). 𝑛(order) 𝐹𝑄 0.2 0.4 0.6 0.8 1.0 1 (1) 0.472 0.438 0.397 0.349 0.293 3 (2) 0.485 0.466 0.442 0.413 0.376 7 (3) 0.488 0.473 0.455 0.432 0.402 11 (4) 0.489 0.475 0.457 0.435 0.407 19 (5) 0.490 0.477 0.461 0.441 0.415 inf (6) 0.491 0.479 0.465 0.446 0.423 and, specifically, to identify at what point or points the maximum head discrepancy occurs: Maximize 𝑥𝐻𝐶(𝐹𝑄𝑑;𝑥)−𝐻𝑅(𝐹𝑄,∗;𝑥).(8) We start by discussing (7), and then address (8)in Section 2.4. The solution of (7) is here constrained by the nature oftheproblem:wehavetoadheretothefactthatoneor more lines (pipes) may be connected to the downstream end of the considered line. The connected lines need the correct piezometric head at 𝐿—upstream end for them— to suitably perform their respective calculations. It means that the piezometric head at 𝐿,givenby𝐻𝐶and 𝐻𝑅,must coincide. That is to say, (7) reduces, in our case, to Solve 𝐻𝐶(𝐹𝑄𝑑;𝐿)=𝐻𝑅(𝐹𝑄,∗;𝐿) for 𝐹𝑄𝑑.(9) By solving (9) the following expressions for 𝐹𝑄𝑑are obtained. (i) Case of continuous demand: 𝐹∞ 𝑄𝑑(𝐹𝑄)=1 𝐹𝑄(1−√1−(1−𝐹𝑄)3 3𝐹𝑄). (10) (ii) Case of demand equally distributed among 𝑛equally distributed nodes: 𝐹(𝑛) 𝑄𝑑(𝐹𝑄)=1 𝐹𝑄(1−√1 𝑛+1𝑛+1 ∑ 𝑘=1(1−𝑘−1 𝑛𝐹𝑄)2). (11) In Table 1 and in two-dimensional Figure 3,valuesfor(10) and (11)for𝐹𝑄values between 0.2 and 1 and for 𝑛varying along the previously used values, namely, 1, 3, 7, 11, 19, and infinity,arepresented.Notethatvalues1to6onthefrontal axis of Figure 3 symbolize, as shown in Table 1,thevalues𝑛= 1,3,7,11,19,andinfinity,respectively. The following facts are remarkable. (i) These values are independent of the problem data, namely, 𝐻0,𝑄in,𝐿,𝐷,and𝑓, and depend only on 𝐹𝑄 and 𝑛,inthecaseof(11); that is to say, they depend on the magnitude and the pattern of the distributed demand.Thisisaveryremarkableresult,sincethe present study thus becomes nondimensional and, as a result, completely general. 0.2 0.4 0.6 0.8 1 0.3 0.35 0.4 0.45 0.5 1 2 3 4 5 6 0.45–0.5 0.4–0.45 0.35–0.4 0.3–0.35 0.4 0.6 Figure 3: Solution of (9)for𝐹𝑄𝑑. (ii) The values of 𝐹𝑄𝑑range from approximately 0.3 to 0.5. This means that about 30%–50% of the total demand must be allocated to the upstream node and the remainder to the downstream node. (iii) The lowest 𝐹𝑄𝑑values correspond to the most awkwardcases:therateofdemandisclosetoorequals the total inflow in the line, and the demand is highly concentrated at a few points (upper right corner of the table, right front of the figure). (iv) The highest 𝐹𝑄𝑑values,closerto50%,correspond to the less problematic cases, meaning little total distributed demand in relation to the total inflow in theline,andwidelydistributeddemand(lowerleft corner of the table, bottom left of the figure). This valueapproaches50%astherateofinflowconsumed in the line approaches zero. (Observe that for both (10)and(11)lim 𝐹𝑄→0𝐹(⋅) 𝑄𝑑(𝐹𝑄)=0.5.) (v) It is also worth noting that lim𝑛→∞𝐹𝑛 𝑄𝑑=𝐹∞ 𝑄𝑑for all 𝐹𝑄; that is to say, the monotonic sequence of continuous functions {𝐹𝑛 𝑄𝑑}∞ 𝑛=1 converges to the continuous function 𝐹∞ 𝑄𝑑uniformly in [0,1](Dini theorem; see, e.g., [21,22]). This has a direct interpretation as thecontinuousdemandisthelimitofauniformly distributed demand among an increasing number of equally distributed points on the pipe. As mentioned before, it is common practice in mathematical modeling of WSN engineering to distribute the line flow into two parts: 50% for the upstream node and 50% for the downstream node, which approximately coincides with what is observed in Table 1 and Figure 3,exceptforcaseswhere the demand line is highly concentrated and represents a large percentage of the total flow through the line. As a result of what has been presented so far, it can be said that, for uniformly distributed in-line demand, the usual 50% rule seems, in principle, an appropriate solution provided
6Abstract and Applied Analysis that the inner demand of the line is small compared with thepipeinflowandthatsuchademandiswidelydistributed. However, equal demand allocation to the end nodes of the line may produce important discrepancies, since the study highlights the need for other assignments in certain cases. 2.3. Arbitrary Demand along the Line. To state the problem in its more general form, let us now consider a demand distribution on the line whose accumulated demand is given by a function 𝑄(𝑥)=𝑄𝑑𝑞(𝑥),where𝑞(𝑥)is the accumulated demand ratio, a function increasing monotonically from 0 to 1. While 𝐻𝐶is calculated as in (6), 𝐻𝑅is calculated by integrating the loss Δ𝐻=−𝐾(𝑄in −𝑄(𝑥))2Δ𝑥through the line [0,𝐿]as follows: 𝐻𝑅(𝐹𝑄;𝑞(𝑥);𝑥)=𝐻0−𝐾∫𝑥 0(𝑄in −𝑄(𝑢))2d𝑢. (12) Observe that this function is monotonically decreasing and concave upwards. Example 1. 𝑞(𝑥)=𝑥/𝐿, for the case of continuous uniform demand, which, by using (1), gives (4). Using (12) and the expression (6)for𝐻𝐶in 𝐿,written, using (5), as 𝐻𝐶(𝐹𝑄𝑑;𝐿)=𝐻0−𝐾𝐿𝑄2 in(1−𝐹𝑄𝑑𝐹𝑄)2,(13) the equation 𝐻𝐶=𝐻𝑅in 𝐿may be rewritten as −𝐾𝐿𝑄2 in(1−𝐹𝑄𝑑𝐹𝑄)2=−𝐾∫𝐿 0(𝑄in −𝑄(𝑥))2d𝑥. (14) By substituting 𝑄(𝑥)=𝑄in𝐹𝑄𝑞(𝑥),(15) one gets 𝐿(1−𝐹𝑄𝑑𝐹𝑄)2=∫𝐿 0(1−𝐹𝑄𝑞(𝑥))2d𝑥, (16) from where the following expression is readily obtained: 𝐹𝑄𝑑(𝐹𝑄)=1 𝐹𝑄(1−√1𝐿∫𝐿 0(1−𝐹𝑄𝑞(𝑥))2d𝑥). (17) The general solution for the problem at hand, when an arbitrary demand through the line is considered, may only be solved after having a specific expression for 𝑞(𝑥).Asa consequence, for arbitrary demands we will restrict ourselves to the case of discrete demands on a finite number of points ofthepipe,ashappensinreallife. Example 2. Let us start by considering a single demand withdrawnataspecificpointoftheline.Thatistosay,letus consider a demand distribution given by 𝑞(𝑥)=𝛿(𝑥−𝑥1)(18) 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 0.2 0.4 0.6 0.8 1 FQ= 0.2 FQ= 0.4 FQ= 0.6 FQ= 0.8 FQ=1 Figure 4: Demand allocation fraction to the upstream node depending on the location of a single withdrawal in the line. which concentrates the whole demand 𝑄𝑑at 𝑥1,where𝛿(⋅)is the well-known Dirac delta. In this case, (12)iswrittenas 𝐻𝑅(𝐹𝑄;𝛿(𝑥−𝑥1);𝐿) =𝐻0−𝐾∫𝐿 0[𝑄in −𝑄𝑑𝛿(𝑢−𝑢1)]2d𝑢 =𝐻0−𝐾∫𝑥1 0𝑄2 ind𝑢−𝐾∫𝐿 𝑥1(𝑄in −𝑄𝑑)2d𝑢 =𝐻0−𝐾𝑥1𝑄2 in −𝐾(𝐿−𝑥1)(𝑄in −𝑄𝑑)2 =𝐻0−𝐾𝐿𝑄2 in (𝜆+(1−𝜆)(1−𝐹𝑄)2), (19) where 𝜆=𝑥 1/𝐿is the fraction of the pipe where the concentrated demand is located from the origin. Equating again 𝐻𝐶=𝐻𝑅at 𝐿gives 𝐹𝑄𝑑(𝐹𝑄,𝜆)=1 𝐹𝑄(1−√𝜆+(1−𝜆)(1−𝐹𝑄)2). (20) As could be expected, these values not only depend on 𝐹𝑄, as in the case of uniform demand, but also strongly depend on 𝜆.InFigure 4 we have plotted these values as a function of 𝜆for various instances of 𝐹𝑄, namely, 1.0, 0.8, 0.6, 0.4, and 0.2. As expected, the worst cases occur once more for withdrawals representing a large percentage of the inflow to the line. For small in-line demands (see, e.g., the curve for 𝐹𝑄= 0.2;alsocalculatethelimitof(20)for𝐹𝑄approaching to 0),thedemandshouldbeallocatedtotheendnodesalmost linearly proportional to the relative distance of the demand point to the downstream end, as is completely natural. In contrast, this rule does not apply to large in-line demands, as their corresponding curves show, by becoming less and less linear. As an extreme case, let us consider the case of 𝐹𝑄=1.VariousHGLshavebeenplottedinFigure 5 by
Abstract and Applied Analysis 7 100 98 96 94 92 90 88 86 84 82 80 0 100 200 300 400 500 50% 0.1 0.25 0.5 0.9 Figure 5: HGLs depending on the location of a single withdrawal in the line and HGL (dashed line) corresponding to the 50% allocation rule. varying the location of the withdrawal point, specifically for values 𝜆 = 0.1, 0.25, 0.5, and 0.9. The (straight dashed) line, corresponding to the 50% allocation rule, has also been represented. We can observe that only for 𝜆=0.25 does the dashed line match the correct piezometric head at the downstream end (also, observe that the lower curve in Figure 4, corresponding to 𝐹𝑄=1, contains the point (𝜆,𝐹𝑄𝑑)=(0.25,0.5)). In the other cases, disagreements are not only important at the downstream end but all along the line. In the general case, we consider 𝑞(𝑥)=∑𝑛 𝑘=1 𝑑𝑘𝛿(𝑥−𝑥𝑘), where 𝑑𝑘are the demands at points 𝑥𝑘,with0<𝑥1<𝑥2< ⋅⋅⋅<𝑥𝑛−1 <𝑥𝑛<𝐿,suchthat∑𝑛 𝑘=1 𝑑𝑘=𝑄𝑑. Example 3. 𝑞(𝑥)=(1/𝑛)∑𝑛 𝑘=1 𝛿(𝑥−(𝑘/(𝑛+1))𝐿)in the case of uniform demand at 𝑛equally distributed points in the pipe. This demand produces the expression in (2). In the general case, 𝐻𝑅is calculated by 𝐻𝑅(𝐹𝑄,𝐿) =𝐻0−𝐾𝑥1𝑄2 in −𝐾(𝑥2−𝑥1)(𝑄in −𝑑1)2 −𝐾(𝑥3−𝑥2)(𝑄in −(𝑑1+𝑑2))2 −⋅⋅⋅−𝐾(𝑥𝑛−𝑥𝑛−1)(𝑄in −𝑛−1 ∑ 𝑘=1𝑑𝑘)2 −𝐾(𝐿−𝑥𝑛)(𝑄in −𝑛 ∑ 𝑘=1𝑑𝑘)2. (21) By denoting 𝜇𝑖=𝑑𝑖 𝑄𝑑,𝜇 0=0, 𝜆𝑖=𝑥𝑖 𝐿,𝜆 0=0, 𝜆𝑛+1 =1, for 𝑖=1,...,𝑛, (22) this expression can be written as 𝐻𝑅(𝐹𝑄,𝐿)=𝐻0−𝐾𝐿𝑄2 in 𝑛 ∑ 𝑘=0 (𝜆𝑘+1 −𝜆𝑘)(1−𝐹𝑄 𝑘 ∑ 𝑗=0𝜇𝑗)2. (23) Then, equating again 𝐻𝐶=𝐻𝑅at 𝐿gives 𝐹𝑄𝑑(𝐹𝑄,𝜆,𝜇) =1 𝐹𝑄(1−√𝑛 ∑ 𝑘=0 (𝜆𝑘+1 −𝜆𝑘)(1−𝐹𝑄 𝑘 ∑ 𝑗=0𝜇𝑗)2).(24) This expression can be easily calculated using, for example, a worksheet, as in Figure 6. In this figure, we consider a demand distribution at the (inner) points given by the values of 𝜆(0.246, 0.338,...,0.954), the demand values given by the values (0.171,0.084,...,0.329)of 𝜇, representing demand fractions at those points, according to (22). In the worksheet we can also read, besides the specific variable values used for the calculations, the value of 𝐹𝑄=0.8used, meaning that a demand of 𝑄𝑑=0.8⋅𝑄in =0.8⋅0.25=0.2m3/s is extracted in the line. By using formula (24), implemented in the cell below 𝐹𝑄𝑑,weobtaintherateofdemandthatmustbe allocatedtotheupstreamendtogetthecorrectpiezometric head at the downstream end. The graph in Figure 6 represents this situation. It can be clearly observed that the use of (24) provides a calculated HGL for the considered example (mid line) that perfectly matches the right end of the line representing the real HGL (lower polygonal). On the other hand, the application of the 50% rule (upper HGL) produces unacceptable errors. 2.4. Maximum Head Discrepancy When Using the Proposed Formula. As mentioned before, allocation of in-line demands to the end nodes of a line may be of great interest in order to reduce the size of the mathematical model of a WDN. In the previous section, we have given formulae to obtain allocation values that zero the piezometric head error at the downstream end of the line, a mandatory condition for correct calculation on the line(s) connected to this end. However, this reduction of the model size is at the price of making some piezometric head errors at the inner points of the line. The engineer analyzing a WDN should be aware of the magnitude of those discrepancies, in order to have a better representation and understanding of the problem. In this section we answer this question by solving problem (8).
8Abstract and Applied Analysis 0.000 100.000 0.000 100.000 100.000 0.246 95.297 1.000 93.114 88.025 0.338 93.979 0.8 0.2 0.604 90.763 0.688 89.775 0.797 88.705 0.000 0.000 0.000 0.954 88.060 0.246 0.246 0.171 0.171 1.000 88.025 0.338 0.093 0.084 0.256 0.604 0.266 0.017 0.272 0.688 0.084 0.078 0.351 0.797 0.108 0.321 0.671 0.954 0.157 0.329 1.000 1.000 0.046 0.000 0.137 0.246 0.204 0.069 0.218 0.168 0.281 0.052 0.537 0.056 0.800 0.034 0.002 0.626 0.261 88.000 90.000 92.000 94.000 96.000 98.000 100.000 0.000 0.200 0.400 0.600 0.800 1.000 H real H real HC (50%) HC formula H0Qin LfDK 𝜆 𝜆 HC (50%) HC formula 𝜆𝜆k+1 −𝜆 k𝜇Σ𝜇 FQ∗Σ𝜇 (𝜆k+1 −𝜆 k)(1 − FQ∗Σ𝜇) 2 FQQd 0.25 500 0.018 0.3 0.61205079100 FQ𝑑 Figure 6: Calculation of 𝐹𝑄𝑑for a nonuniform distribution of demand within a line and comparison among hydraulic grade lines. Inthe(ideal)caseofacontinuousdemandalongtheline, it is easy to show that (8)reducestofindthepoint𝑥where the derivatives with respect to 𝑥of 𝐻𝑅(𝐹𝑄;𝑥)=𝐻0−𝐾∫𝑥 0(𝑄in −𝑄(𝑢))2d𝑢, (25) 𝐻𝐶(𝐹𝑄𝑑;𝑥)=𝐻0−𝐾𝑥𝑄2 in(1−𝐹𝑄𝑑𝐹𝑄)2(26) coincide. Let us observe that 𝐻𝑅(𝐹𝑄;𝑥)is a differentiable function since 𝑄(𝑥)is continuous and that 𝐻𝐶(𝐹𝑄𝑑;𝑥)is a linear function of 𝑥.Thus,itiseasilyseenthatthemaximum discrepancy is located at the point 𝑥given by 𝑞(𝑥)=𝐹𝑄𝑑.(27) Example 4. Inthecaseofuniformcontinuousdemandthe solution of (8)isgivenby 𝑥∞=𝐿𝐹∞ 𝑄𝑑,(28) obtained using 𝑞(𝑥)=𝑥/𝐿,asinExample 1,and(10). Inthe(real)caseofadiscretedemandalongtheline,the maximum discrepancy occurs at one of the points 𝑥𝑘,since therealHGLisadecreasingconcaveupwardspolygonal(see Figure 6). Then, the problem reduces to identify the first 𝑥𝑘0 forwhichthenextsectionofthepolygonalhasaslopeequal toorlowerthantheslopeof𝐻𝐶(𝐹𝑄𝑑;𝑥)in absolute values (if equal, all the points between 𝑥𝑘0 and 𝑥𝑘0+1 will provide the maximum since the mentioned section of the polygonal and 𝐻𝐶(𝐹𝑄𝑑;𝑥)will run parallel between both points). So we have to solve the following problem. Find the first point 𝑥𝑘0 such that 𝐾(𝑄in −(𝑘0 ∑ 𝑖=1 𝑑𝑖))2≤𝐾𝑄2 in(1−𝐹𝑄𝑑𝐹𝑄)2.(29) This inequality may be simplified and written, in terms of 𝜇𝑖,as (1−𝐹𝑄(𝑘0 ∑ 𝑖=1𝜇𝑖))2≤(1−𝐹𝑄𝑑𝐹𝑄)2,(30) which gives 𝑘0 ∑ 𝑖=1𝜇𝑖≥𝐹𝑄𝑑,(31) in terms of 𝜇𝑖=𝑑𝑖/𝑄𝑑. That is to say, the problem may be rewritten as follows: Find the first point 𝑥𝑘0 such that 𝑘0 ∑ 𝑖=1𝜇𝑖≥𝐹𝑄𝑑.(32) Example 5. Inthecaseofuniformdemandon𝑛equally spaced points, this gives the following: Find the first point 𝑥𝑘0 such that 𝑘0 ∑ 𝑖=11𝑛=𝑘0 𝑛=𝑥𝑛 𝑘0 𝐿≥𝐹𝑛 𝑄𝑑. (33)
Abstract and Applied Analysis 9 Observe that lim𝑛→∞(𝑥𝑛 𝑘0/𝐿)≥lim𝑛→∞𝐹𝑛 𝑄𝑑=𝐹∞ 𝑄𝑑,since 𝐹𝑛 𝑄𝑑converges to 𝐹∞ 𝑄𝑑.Wealsohavethatlim 𝑛→∞(𝑥𝑛 𝑘0−1/𝐿)≤ lim𝑛→∞𝐹𝑛 𝑄𝑑=𝐹∞ 𝑄𝑑. But obviously these two limits are the same. As a result, one has from (28)that lim 𝑛→∞𝑥𝑛 𝑘0 𝐿=𝐹∞ 𝑄𝑑=𝑥∞ 𝐿.(34) Observe that 𝑥𝑛 𝑘0 isthepointwherethepolygonals(2) exhibit the biggest head discrepancy with the calculated head given by (9) corresponding to the allocation factor 𝐹𝑛 𝑄𝑑.Also, 𝑥∞is the point of maximum head discrepancy between the HGL corresponding to the uniform continuous demand and the calculated head corresponding to the allocation factor 𝐹∞ 𝑄𝑑. As we could expect, lim 𝑛→∞𝑥𝑛 𝑘0 =𝑥∞.(35) Expression (32) does not need any additional extra work inthegeneralcaseifthecalculationshavebeenorganized as shown in Figure 6.Ineffect,inthisfigurethefirstvalue of the accumulated rated demand that exceeds 𝐹𝑄𝑑=0.261 is ∑𝑘0 𝑖=1 𝜇𝑖= 0.272, which corresponds to the third inner demand point 𝑥𝑘0 =𝜆𝐿,with𝜆=0.604.Thismaximumis 𝐻𝐶(0.261;𝑥𝑘0)−𝐻𝑅(0.8;𝑥𝑘0)=92.767−90.763=2.003. (36) 3. Illustrative Example on a Real-World Network This section is aimed to present some significant results obtained when applying the lessons learned in the previous section to a practical situation. The assessment is carried out inarealwatersupplynetworkfromTegucigalpaCity(the capital of Honduras). The network, which is intended to be a districtmeteredarea,issuppliedbyonemainpipeconnected to one of the water tanks administered by the local water authority (SANAA). The network has 203 nodes and 211 pipes. Figure 7 shows the network model in EPANET. To illustrate the aspects previously studied, three scenarios have been put forward. For each scenario, intermediate demand nodes (mid nodes) areplacedinthemainpipe.Ineachcase,thedemandvalues loaded in the intermediates nodes, the distribution along the line, or the pipe diameter vary as it is indicated as follows. Case A. As it may be seen in Figure 8, an internal demand representing 60% of the total inflow in the main line is fixed in two nodes placed along the line. The first one, loaded with 25% of the total internal demand, is located at 50% of the total length.Thesecondintermediatenodeislocatedat80%ofthe total length and the remaining 75% of the internal demand is allocated to it. Case B. As shown in Figure 9, one single node is placed along the main line, at 50% of its total length. As it can be expected, 100% of the total internal demand is allocated to it. In this case the internal demand represents 80% of the total inflow. Case C. ThiscaseisfairlysimilartoCaseB.However,inthis case, the diameter of the main line is reduced from 600 mm to 450 mm. 3.1. Result (Case A). Figure 8 clearly reflects the characteristics and the results obtained for Case A. First, a hydraulic simulation was conducted with the internal demand loaded in the mid nodes. For that (real) case, the pressure in node B (downstream node) is 42.35 water column meters (wcm). When the internal demand is reallocated to the upstream and downstream nodes following the 50% rule, the result varies up to 12.2 wcm in comparison with the initial case. Through the application of formula (24), a more suited demandallocationruleisfound(22.45%fortheupstream node and 77.55% for the downstream node). When this rule is applied, the resulting pressure value is, as expected, exactly thesameasinthe(real)casewiththeinternaldemandlocated in the mid nodes. 3.2. Result (Case B and Case C). Given the fact that between Cases B (Figure 9)andC(Figure 10) there is only one difference, namely, the pipe diameter, the allocation rule in both cases is the same; 34.86% of the internal demand should be allocated to the upstream node and the rest to the downstream node. Nevertheless, the differences between the initial pressure values and the pressure obtained when applying the 50% allocation rule are larger in Case C than in CaseB,sinceinCaseCtheheadlossishigherthanthatin Case B. If Case A is included in the same comparison (higher head loss than Cases B and C), the importance of a demand allocationbasedontheproposedmethodologyovera50%- 50% becomes evident. Finally, to better visualize the negative impact of using the common50%demanddistributionruleinsteadofthesuited rule (24) developed in this paper, resulting pressure values obtained in four nodes of the example network (see Figure 11) are compared for Case A: first, when the demand is allocated usingthe50%rule,andthen,whenthesuitedrule,givenby formula (24), is implemented. The results of such comparison maybeseeninTable 2. 4. Conclusions The complexity of the interaction of all the input data in a mathematical model makes it impossible to include all the data accurately. The reality is very complex [2], and the use of simplifications in order to make the model feasible is therefore inevitable. The use of such tools should be, in any case, accompanied by a clear understanding of the consequences of such assumptions. It is obvious that the lower level of simplification corresponds with more complex tools. In this sense, software packages available in the market devoted to the analysis, design, and, in general, the simulation of the various states in a WDN should be used with the necessary caution. This research focuses on the study of the influence that the concentration of a distributed demand in a line on the line ends represents in modeling steady state conditions in