On the Flow Problem in Water Distribution Networks: Uniqueness and Solvers
Manish K. Singh, Vassilis Kekatos

TL;DR
This paper investigates the water flow problem in distribution networks, establishing solution uniqueness, extending convex relaxation methods, and proposing multiple solvers with guaranteed convergence for different network configurations.
Contribution
It introduces new theoretical results on solution uniqueness and develops a hierarchy of solvers, including convex relaxations and algorithms, for water flow problems in complex water distribution networks.
Findings
Uniqueness of water flow solutions is extended to networks with multiple fixed-pressure nodes.
Convex relaxation methods are effective for networks without cycles and with certain pump configurations.
The proposed solvers reliably converge regardless of initial conditions, validated on benchmark networks.
Abstract
Increasing concerns on the security and quality of water distribution systems (WDS), call for computational tools with performance guarantees. To this end, this work revisits the physical laws governing water flow and provides a hierarchy of solvers of complementary value. Given the water injection or pressure at each WDS node, finding the water flows within pipes and pumps along with the pressures at all WDS nodes constitutes the water flow (WF) problem. The latter entails solving a set of (non)-linear equations. We extend uniqueness claims on the solution to the WF equations in setups with multiple fixed-pressure nodes and detailed pump models. For networks without pumps, the WF solution is already known to be the minimizer of a convex function. The latter approach is extended to networks with pumps but not in cycles, through a stitching algorithm. For networks with non-overlapping…
Click any figure to enlarge with its caption.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
On the Flow Problem in Water Distribution Networks: Uniqueness and Solvers
Manish K. Singh and Vassilis Kekatos Manuscript received February 12, 2019; revised August 13, 2019, March 31, 2020, and July 31, 2020; accepted September 17, 2020. Date of publication DATE; date of current version DATE. Paper no. TCONES-20-0170.M. K. Singh and V. Kekatos are with the Bradley Dept. of Electrical and Computer Engineering, Virginia Tech, Blacksburg, VA 24061, USA. Emails: {manishks,kekatos}@vt.edu. This work was supported by the U.S. National Science Foundation under Grant 1711587.Color versions of one or more of the figures is this paper are available online at http://ieeexplore.ieee.org.Digital Object Identifier XXXXXX
Abstract
Increasing concerns on the security and quality of water distribution systems (WDS), call for computational tools with performance guarantees. To this end, this work revisits the physical laws governing water flow and provides a hierarchy of solvers of complementary value. Given the water injection or pressure at each WDS node, finding the water flows within pipes and pumps along with the pressures at all WDS nodes constitutes the water flow (WF) problem. The latter entails solving a set of (non)-linear equations. We extend uniqueness claims on the solution to the WF equations in setups with multiple fixed-pressure nodes and detailed pump models. For networks without pumps, the WF solution is already known to be the minimizer of a convex function. The latter approach is extended to networks with pumps but not in cycles, through a stitching algorithm. For networks with non-overlapping cycles, a provably exact convex relaxation of the pressure drop equations yields a mixed-integer quadratically-constrained quadratic program (MI-QCQP) solver. A hybrid scheme combining the MI-QCQP with the stitching algorithm can handle WDS with overlapping cycles, but without pumps on them. Each solver is guaranteed to converge regardless of initialization, as numerically validated on a benchmark WDS.
Index Terms:
Water flow equations, convex relaxation, graph reduction, second-order cone program, uniqueness.
I Introduction
Water distribution systems serve as a critical infrastructure across the world. The direct dependence of human lives on the availability of water has motivated research on the security, resiliency, and quality of water supply systems [1], [2]. The high cost of installation for different WDS components renders long-term network planning an important problem [3], [4]. Furthermore, the relatively expensive operation of a WDS is primarily attributed to the electricity cost for running pumps to properly circulate water [5]. Thus, optimal pump scheduling for the daily operation of a WDS is a pertinent research problem [6], [7], [8], [9]. An inevitable component of the aforementioned computational problems is satisfying the physical laws governing water flow. Mathematically, the water flow (WF) equations consist of a set of linear equations ensuring mass conservation, along with a set of non-linear equations arising from energy and momentum conservation [10].
Solving the WF equations constitutes the water flow problem. Specifically, given water demand at all nodes, the standard WF task aims at finding the water flows within all pipes and the pressures at all nodes complying with the WF equations. Despite nonlinear, these equations enjoy a unique solution for networks with a single fixed-pressure node and when the pressure added by pumps is approximated as constant [11]. Modern renditions of the WF problem may incorporate pumps, valves, and pressure-based demands [12], [13]. Either way, handling the non-linear equations stemming from the conservation of energy and momentum remain the core challenge [10].
Existing WF solvers update iteratively a set of WF variables, which could be the pipe flows, loop flows, nodal pressures, or combinations thereof [14]. These solvers can be broadly classified into those relying on successive linear approximations, and those relying on Newton-Raphson-type of updates [10]. For example, the WF solver of [15] constitutes a fixed-point iteration and belongs to the former class, while EPANET (perhaps the most widely used WF solver) to the latter [13]. In fact, most of the schemes within each class have been shown to be equivalent to each other upon a (non)-linear transformation of variables [14], [10]. To cope with the problem of dimensionality, different preprocessing, partitioning, and reformulations have been reported in [16], [17], [18].
The aforesaid solvers exhibit two major shortcomings. First, their convergence and rate of convergence depend critically on initialization. For example, it has been numerically demonstrated that EPANET fails to find a WF solution for some practical water networks [19], [20]. Nonetheless, proper initialization may be challenging when dealing with stochastic planning or risk analysis, where the WF task has to be solved repeatedly and under varying demands [17]. As a second shortcoming, the existing solvers do not naturally extend to optimal water flow (OWF) formulations. Therefore, most OWF efforts resort to linear approximations; non-linear local optimization; or slow zero-order algorithms building on an independent WF solver such as EPANET; see [1]. Such OWF approaches lack scalability and/or optimality guarantees.
The contribution of this work is in two fronts. After a brief modeling of water networks (Section II), this work first generalizes the uniqueness of the WF solution to WDS setups with multiple fixed-pressure nodes and more practical pump models with flow-dependent pressure gains. Second, it puts forth a suite of solvers that can provably recover the WF solution under different network setups; see also Fig. 1:
- i)
In networks without pumps, it is already known that the WF solution can be recovered as the minimizer of a convex problem [11]. Sections IV-A devises SOCP- and dual decomposition-based solvers, while Section IV-C applies them to other pressure drop laws. 2. ii)
This energy function-based approach is extended to networks where pumps do not lie on cycles through the stitching algorithm of Section IV-B. 3. iii)
In networks with no overlapping cycles, the mixed-integer quadratically-constrained quadratic program (MI-QCQP) of Section V can find the WF solution. 4. iv)
A hybrid procedure combining the stitching algorithm and the MI-QCQP solver handles networks having overlapping cycles, but without pumps on them (Section VI).
These novel solvers not only operate under different network configurations, but constitute a hierarchy: Solver ii) builds on i); and solver iv) builds on ii) and iii). Numerical tests on benchmark networks evaluate the correctness and running times for i) and iii); and validate them against the EPANET solver (Section VII).
Regarding notation, lower- (upper-) case boldface letters denote column vectors (matrices). Calligraphic symbols are reserved for sets. The vectors of all zeros, all ones, and the -th canonical vector are denoted respectively by , , and , while their dimension will be clear from the context. The symbol ⊤ stands for transposition.
II Water Distribution System Modeling
A WDS can be represented by a directed graph . Its nodes are indexed by and correspond to water reservoirs, tanks, and points of water demand. Let be the rate of water injected into the WDS from node . For reservoirs apparently ; for nodes with water consumers ; tanks may be filling or emptying; and for junction nodes.
The edges in set with cardinality , are associated with pipes and pumps. The directed edge models the water pipe between nodes and . Its water flow is denoted by or depending on the context. If water flows from node to , then ; otherwise .
Conservation of water flow dictates that for all
[TABLE]
The connectivity of the WDS is captured by the edge-node incidence matrix with entries
[TABLE]
Given and upon stacking flows and injections respectively in and , the conservation of water flow across the WDS can be compactly expressed as
[TABLE]
The operation of WDS is also governed by pressures. Water pressure is surrogated by pressure head, defined as the equivalent height of a water column in meters, which exerts the surrogated pressure at its bottom. The pressure heads at all WDS nodes are measured with respect to a common geographical elevation level. The pressure head (henceforth pressure) at node is denoted by . Moreover, the pressure at a reservoir node typically serves as the pressure of reference.
With water flowing in a pipe, pressure drops along the direction of flow due to friction. The pressure drop across pipe is described by the Darcy-Weisbach law [21]
[TABLE]
where the constant depends on pipe dimensions [8], and the sign function is defined as
[TABLE]
The pressures at all nodes are collected in vector .
To maintain pressures at desirable levels, water utilities use pumps on specific pipes. Let be the subset of pipes hosting a pump. The pipes in can be considered lossless; this is without loss of generality since a pump can be modeled by an ideal pump followed by a short pipe. The remaining edges form the subset , and correspond to lossy pipes governed by (3). When pump is running, it adds pressure so that
[TABLE]
As detailed below, the pressure added by a pump decreases with the water flow through the pump [22], [23]. Moreover, for variable speed pumps, the pressure added increases with the pump speed. The exact relation is provided by manufacturers in the form of pump operation curves, and are oftentimes approximated with quadratic curve fits [22], [23], [7]. In detail, the pressure added by pump is modeled as
[TABLE]
where is the pump speed; and , , and are known pump parameters [7]. When pump is running, its flow has to be maintained within the range due to engineering limitations [21]. Whereas the speed for fixed-speed pumps is constant; for variable-speed pumps, it is controlled by the operator. Either way, for a WF task the speed of every pump is given; otherwise the problem would become under-determined. Given its speed , the pressure added by pump is
[TABLE]
where and . Because the pump parameters satisfy over the operating range of pump speeds , the pressure gain due to any pump is a strictly decreasing function of the water flow in the range . This observation is instrumental in establishing the uniqueness of the WF solution in Section III.
When pump is not running, water can flow freely in either directions through a bypass valve [22]. Because bypass valve sections are typically short, one can ignore the pressure drop along them to get and . In this case, the WDS graph can be reduced by removing pipe and node , and connecting to node the edges previously incident to . Alternatively, the valve can be modeled as a short lossy pipe, whose pressure drop is governed by (3).
Valves constitute a vital component for water flow control. They can be modeled by an on/off switch; a linear pressure-reducing model; a flow-dependent non-linear model; or a flow control model [7], [13]. Under the typical operational setup, the valve at the reference node regulates pressure, whereas the valves at the remaining reservoirs and tanks regulate flows.
Summarizing this section, a WDS operating point is described by the triplet satisfying the WF equations of (2), (3), and (5). This work deals with the uniqueness of a WF solution and efficient solvers for finding this solution.
III Uniqueness of Water Flow Solution
Different from the OWF problem where tanks and pumps are scheduled over a time horizon, the WF task aims at solving the WF equations given the water injections . As such, it constitutes a key component of WDS operation and planning. The WF problem is formally stated next.
Definition 1**.**
Given: i) water injections ; ii) the statuses and speeds for all pumps ; and iii) the pressure at the reference node ; the WF task aims at finding the flows and pressures satisfying (2), (3), (5).
The WF task involves equations over unknowns. The water balance in (2) yields linearly independent equations. In addition, the pressure drops across lossy pipes [cf. (3)], and the pressure gains due to pumps [cf. (5)] provide non-linear equations.
According to Definition 1, both and are unknown. Nevertheless, to find a triplet that satisfies (2), (3), and (5), it suffices to find either or . To see this, note that if is known, then can be calculated from (3)–(5) and . On the other hand, if is known, the flows can be found thanks to the monotonicity of (3) and the monotonicity of (5) in . In a nutshell, solving the WF task amounts to finding either or . Because this simple observation is used throughout our analysis, it is summarized as a lemma.
Lemma 1**.**
Given , a triplet satisfying (2), (3), and (5) is uniquely characterized by or .
The WF task can be posed as the feasibility problem
[TABLE]
Since (3)–(5) are quadratic equalities, problem (W1) is non-convex. For a tree WDS graph (for which ), the edge-node incidence matrix has linearly independent rows [24]. Then the flows can be found uniquely from (2), and the WF task is readily solved according to Lemma 1. However, handling the WF task in a loopy containing pumps remains non-trivial. Naturally, analyzing the uniqueness of a WF solution is a critical task. Reference [11] establishes the uniqueness of a WF solution under the assumption that the pressure gain added by a pump is constant. The next claim extends this uniqueness result regardless of the structure of and to the more detailed pump model of (5).
Theorem 1**.**
If the WF equations are feasible for some , they feature a unique solution.
Proof:
Proving by contradiction, assume and are two distinct solutions of (W1). Since the two flow vectors and satisfy (2), the vector lies in the nullspace of , that is . Then it follows that
[TABLE]
Let us decompose into its positive and negative entries as , where and . Plugging this decomposition into (6) yields
[TABLE]
Recall from (3) that the pressure drop across a lossy pipe is monotonically increasing in flow. Similarly, the pressure added by a pump described by (5) is monotonically decreasing in flow. In other words, the pressure drop along a pump is monotonically increasing in flow. Hence, for each edge :
[TABLE]
where is the -th row of matrix .
Consider the -th entry of vector . If , then and by definition of and . Then edge contributes to the left-hand side (LHS) of (7). The monotonicity in (8) entails that and so . The latter holds for all edges contributing to the LHS of (8), so that
[TABLE]
On the other hand, if , then and . Then, edge contributes to the right-hand side (RHS) of (8). The monotonicity in (8) entails . Applying the claim over all edges participating in the RHS of (8) provides
[TABLE]
The signs of the LHS and RHS contradict the equality in (7), thus proving the claim. ∎
Regarding the pressure drop law of (3), the Hazen-Williams equation is sometimes used wherein the flow is raised to the exponent of . This exponent is different from the exponent of in the Darcy-Weisbach equation; see for example [15]. While the Darcy-Weisbach equation is a theoretical formula, the Hazen-Williams equation is based on curve fitting of experimental data [4]. Either way, the uniqueness argument of Theorem 1 holds for any positive exponent on the water flow involved in the pressure drop equation of (3).
The WF problem posed in Definition 1 follows the most traditional setup pursued in WF literature [11], [25], [26]. However, with multiple sources feeding a WDS an alternate form of WF becomes pertinent. Specifically, multiple supply nodes may operate as fixed-pressure nodes while the remaining nodes act as fixed-injection nodes [27]. The ensuing result extends the uniqueness of a WF solution to this more general setting.
Proposition 1**.**
Given: i) pressures for in a subset of nodes ; ii) injections for all ; and iii) the statuses and speeds for all pumps; the set of equations (2), (3), and (5) has at most one solution.
Proof:
Consider two pairs and satisfying (2). If , the uniqueness of the WF solution follows from Theorem 1. Otherwise, [28, Lemma 3] dictates that there exists a path between fixed-pressure nodes and , along which the flows in differ from those in in a consistent direction, i.e., either or for all edges . However, in that case, the monotonicity argument used in (8) would entail for the respective pressures , which contradicts the hypothesis of and being fixed-pressure nodes. ∎
Having established the uniqueness of the WF solution, the ensuing sections develop a suite of WF solvers of complementary value: Each solver finds provably the WF solution under different network setups. The devised solvers exhibit different complexity, yet none of them requires a proper initialization. Figure 1 summarizes the particular WDS setups each solver can handle, and serves as a roadmap for the following sections. The solvers developed in this work are for the WF task as posed in Definition 1, whereas WF solvers for the setting considered in Proposition 1 are beyond the scope of this work.
IV Energy Function-Based Water Flow Solvers
For a WDS without pumps, the WF task simplifies to solving (2)–(3). These equations are structurally similar to the equations governing the flows and pressures in a natural gas network under steady-state conditions [28], [29]. Reference [25] finds the solution to the nonlinear WF equations in networks without pumps as the minimizers of a convex energy function; see also [26] and [30] for counterparts in gas networks. Upon briefly reviewing these reformulations, this section expands their scope to WDS with no pumps in cycles and other pressure drop laws; see roadmap of Figure 1.
IV-A Finding the WF Solution in WDS without Pumps
In the absence of pumps, the WF problem (W1) has been posed as a constrained minimization over [25].
Lemma 2** ([25]).**
In a WDS without pumps (), the vector of water flows satisfying (2)–(3) can be found as the unique minimizer of the convex minimization problem
[TABLE]
Moreover, if is the vector of optimal Lagrange multipliers corresponding to (9b), then the nodal pressures are provided by .
The claim follows from the optimality conditions of (9). The strict convexity of (9a) shows that the WF solution is unique in networks without pumps. This claim has also been established using a contraction argument in [15]. Theorem 1 and Proposition 1 generalize this uniqueness claim to networks having pumps and multiple fixed-pressure nodes.
We next present two ways for handling (9): an second-order cone program (SOCP) reformulation, and a dual decomposition approach. It is known that -norms can be handled using a hierarchy of second-order cone (SOC) constraints; see [31, Eq. (11)]. In the context of WDS, a more compact hierarchy of SOCs was originally put forth in [6] to handle the cubic powers of (9a) involved in an OWF problem. Adopting the latter reformulation, the minimizer of (9) can be found by solving the SOCP
[TABLE]
The fact that the ’s minimizing (9) and (10) coincide can be established by showing that the solution of (10) satisfies ; ; and for all ; see also [6]–[7] for details. Each constraint in (10d) is a rotated second-order cone [31].
Alternatively, problem (9) can be tackled via dual decomposition: During its -th iteration, the primal variable is updated by minimizing the Lagrangian function evaluated at the latest estimate of dual variables . The latter problem decouples across pipes and enjoys a closed-form solution as
[TABLE]
For a step-size , the dual variables are updated as
[TABLE]
Again for WDS without pumps, the WF task can alternatively be posed as an unconstrained minimization over [25]
[TABLE]
The objective of (11) is convex (by composition rules) and differentiable. The -th entry of its gradient is
[TABLE]
Setting this gradient equal to zero yields the WF equations after eliminating from (2)–(3). The ambiguity in pressures can be waived by shifting the minimizer of (11) to match the reference pressure . Once the pressures are found, the flow vector can be retrieved by Lemma 1. Problem (11) is amenable to any first-order method for unconstrained optimization, such as the gradient descent iterations for a step-size , or accelerated variants.
IV-B Extension to WDS with no Pumps in Cycles
Since problems (9) and (11) cannot handle water networks with pumps, this section extends their applicability to networks with pumps, but not on cycles. This is accomplished by adopting the reduction technique of [32] to build what we term stitching algorithm:
- S1)
Remove the edges of corresponding to pumps . The obtained graph contains disconnected components for . 2. S2)
Replace each component by a supernode, and connect the supernodes using the edges in to create the supergraph . Graph features a tree structure. 3. S3)
Find the total water injection per supernode . Since is a tree, the water flows on can be found readily. 4. S4)
If the flow along pump is , modify the injections at nodes and as and . 5. S5)
Solve (9) per connected component to find the water flows at all lossy pipes. 6. S6)
Having acquired vector , the pressure vector can be found from Lemma 1.
In S5), rather than solving the constrained minimization of (9), one could use its unconstrained counterpart of (11). Steps S1)–S4) are still needed to find a meaningful water injection vector per component . Once a pressure vector has been found per component, the pressures must be revised as follows: The pressures within the component containing the reference node, say component , are kept unaltered. Consider a pump running from node to node . Using the flow computed in step S3), the pressure gain can be found from (5). Having found by solving (11) in , the pressure at node can be computed as . If the pressure at node recovered by solving (11) in is , then all pressures within should be shifted by . The process is repeated for all components to recover the entire pressure vector .
IV-C Handling the Hazen-Williams Pressure Drop Law
The aforementioned WF solvers can be modified to handle the Hazen-Williams in lieu of the Darcy-Weisbach pressure drop equations. Recall that according to the Hazen-Williams pressure drop law, the exponent of in (3) changes from to . To handle this, problem (9) is generalized to
[TABLE]
where the exponent depends on the pressure drop law and could vary per pipe. Problem (12) remains convex for .
Even though the SOCP model of (10) cannot be used to solve (12), a different SOCP reformulation can be derived as long as is rational; see [31, pp. 12–13] for details. Moreover, the dual decomposition updates of Section IV-A can be adapted to solve (12). Similarly, the unconstrained minimization of (11) can be modified to
[TABLE]
Heed that the energy function-based solvers for (W1) can not handle the WF setups with multiple fixed-pressure nodes described under Proposition 1. This is because energy function-based solvers do not take reference pressure as an input to the problem. Rather, the obtained pressures are shifted a posteriori to agree with a given fixed pressure. For a single fixed-pressure node, the applicability of our WF solvers can be broadened to WDS with pumps in cycles. To do so, we next pursue an MI-QCQP solver. Unlike the energy function-based WF solvers of this section, the MI-QCQP solver of Section V applies only to the Darcy-Weisbach equation; its possible extension to the Hazen-Williams pressure drop law goes beyond the scope of this work.
V MI-QCQP Water Flow Solver
This section presents an MI-QCQP relaxation of (W1) along with sufficient conditions for its exactness.
V-A Problem Reformulation
The non-convexity of the WF problem (W1) is due to the quadratic equality constraints of (3) and (5). Adopting the convex relaxation approach of [7]–[6], the pressure drop along pipe is relaxed from (3) to
- •
for ; or
- •
for .
To handle the two cases, let us introduce a binary variable capturing the flow direction on pipe . By using the so-termed big- trick, the two cases can be modeled as
[TABLE]
The same MI-QCQP model has been also advocated for handling the pressure drop equations along the pipelines in natural gas networks; see e.g., [33], [34], [28]. Constraint (14a) implies that . If , the convex quadratic constraint in (14b) is activated, whereas constraint (14c) becomes trivial. The claim reverses for . Depending on the value , if either (14b) or (14c) is satisfied with equality, the relaxation is deemed as exact. If that happens for all lossy pipes, the feasible set of (14) has captured the original non-convex constraints in (3).
Similarly, the pressure added by pump is relaxed from (5) to
[TABLE]
which is a convex constraint since . Again, if the inequality in (15) is satisfied with equality for all pumps, the relaxation of (5) to (15) is deemed as exact.
One may now try solving the feasibility problem in (W1) by replacing (3)–(5) by (14)–(15). If all the relaxed constraints are satisfied with equality, the relaxation is exact. Unfortunately, toy numerical tests can verify that such relaxation is inexact even for simple water networks. To favor exact relaxations, we convert the feasibility to a minimization problem with a judiciously selected cost. We pose the MI-QCQP
[TABLE]
where the binary vector contains all , and the cost is defined as
[TABLE]
The cost sums up the absolute pressure drops across lossy pipes minus the pressure gains added by pumps. This is in contrast to the MI-QCQP of [29] that recovers a gas flow solution, whose penalty did not include compressors. It will be shown in Section V-B that the MI-QCQP formulation (W2) guarantees exactness under realistic network conditions.
Problem (W2) is non-convex due to the binary variables . Given the advancements in MI-QCQP solvers, this minimization can be handled for moderately sized networks. Recall that every lossy pipe is associated with one binary and one continuous optimization variable. To accelerate the computations, we next provide a simple pre-processing step to determine the flows in all edges not belonging to a cycle.
Lemma 3**.**
Let be the unique flow solution of (W1), and consider any vector satisfying . For any edge not belonging to a cycle, it holds that .
Proof:
Consider the minimum-norm solution to the linear system of (2), where is the pseudo-inverse of . Any other solution of (2) can be expressed as for some vector .
The space can be represented using the cycles of graph as explained next. For cycle in , select an arbitrary direction and define its indicator vector as
[TABLE]
We are particularly interested in a set of fundamental cycles defined as follows [24]: In graph , select a spanning tree . Every edge along with some edges of form a cycle. The cycles formed using all edges in comprise the set of fundamental cycles. In general, a graph may have multiple spanning trees, making the set of fundamental cycles non-unique.
A key property of fundamental cycles is that the space is spanned by the indicator vectors for any set of fundamental cycles [24, Corollary 14.2.3]. Therefore, the vector in can be decomposed as
[TABLE]
where is the indicator vector for cycle and .
Consider the -th entry of . If edge does not belong to any cycle, then it does not belong to any fundamental cycle. Then for all , and follows from (16). To conclude, if edge does not belong to a cycle, then all solutions of (2) agree in their -th entry. ∎
Lemma 3 ensures that for weakly meshed WDS, the number of variables in (W2) can be reduced markedly. Moreover, the flow on any edge not belonging to a cycle coincides with the related entry of the minimum-norm solution to (2).
V-B Exactness of the Relaxation
The next result provides conditions under which a minimizer of (W2) satisfies (14)–(15) with equality.
Theorem 2**.**
In a WDS where no edge belongs to more than one cycle, a minimizer of (W2) minimizes (W1) as well, if (W1) is feasible.
Theorem 2 (shown in the appendix) asserts that the MI-QCQP relaxation of (W1) to (W2) is exact in water networks with non-overlapping cycles, that is cycles sharing no edges. The claim holds regardless of water demand or the presence of pumps. This is in contrast to the exactness claims of [29], where compressors were not allowed on cycles. Although the assumptions of Theorem 2 may not always hold, the numerical tests of Section VII indicate the relaxation is exact and (W2) solves (W1) for practical WDS with overlapping cycles.
The condition of Theorem 2 cannot be relaxed analytically: One could construct pathological WDS with overlapping cycles that render the relaxation of (W2) inexact. To present such a counterexample, consider the -node and -pipe WDS of Fig. 2. The coefficients ’s are shown on the respective pipes. Nodes and host water demands, and the reference node supplies water at the reference pressure of . The edge belongs to two cycles and hence the condition of Theorem 2 is violated. The minimizer of (W2) satisfies the relaxed constraint (14) with strict inequality. The pressures at nodes and were found to differ by , while the frictional drop was . This WDS though is characterized by a strong disparity of pipe coefficients. For a WDS with limited variations in pipe dimensions and material, such disparity is not anticipated in practice. Similar to the example of Fig. 2, one can construct setups with multiple fixed-pressure nodes for which the MI-QCQP relaxation is inexact.
Since the WDS of Fig. 2 does not host pumps, the solution to the previous WF problem was eventually found via (9). This motivates us to exploit the ability of the energy function-based approach to handle overlapping cycles alongside the merit of the MI-QCQP relaxation to handle pumps in cycles. To solve the WF problem for a broader class of WDS network topologies, a hybrid solver is deferred to Section VI. Before that, the formulation of (W2) is contrasted to prior work.
V-C Comparison to Prior Work and Extensions
The proposed WF solver involves three ingredients:
- I1)
replacing (3) by the MIQP model of (14); 2. I2)
replacing (4) by the convex constraint of (15); and 3. I3)
The key contribution of this section is I3), since I1) and I2) have appeared before: References [6]–[7] and [35] consider the OWF problem assuming known flow directions (say for all pipes), and relax (3) to [cf. (14)]
[TABLE]
Regarding pumps, references [6]–[7] and [35] consider only variable-speed pumps. Moreover, each pump speed is limited within , which may be unrealistic since pumps come with positive lower speed bounds. Substituting this speed range into the monotonic formula of (5) yields the convex quadratic constraint
[TABLE]
Heed that the actual speed has been eliminated from (18). Nevertheless, once an OWF minimizer is found [and so a triplet satisfying (18)], the speed making (18) an equality can be readily recovered [6].
References [6]–[7] aim at minimizing the energy losses across pipes. Ignoring the details of geographical elevation and electricity prices, their cost simplifies to . Thanks to its form, minimizing this cost subject to (17)–(18) renders the relaxation in (17) numerically exact. This was also analytically shown granted the simplifying assumptions of: a1) no pumps on cycles; a2) known flow directions; a3) if a node is fed by more than one pipes, all of them have to be equipped with valves; and a4) no fixed-speed pumps. Reference [35] considers the joint scheduling of WDS and electric power distribution networks. Since the exactness of (17) is not promoted by the cost anymore, a feasible point pursuit-based approach is applied to find a stationary point satisfying (17) with equality.
From the preceding review, it is evident that albeit a relaxation of (3) is convenient, its exactness is not always guaranteed. While some OWF instances feature exactness [6]–[7]; others call for additional measures [35]. We shall next address the natural question: Q1) Can one use one of the aforesaid OWF solvers to solve the WF task? Numerical tests on WF instances even in simple WDS demonstrate that the approaches of [6]–[7] and [35] fail to solve (W1), that is the convex relaxation is not exact. This is because even if an instance of (W1) satisfies all other conditions needed for each one of these solvers, the common assumption a4) is violated since pump speeds are fixed for (W1).
One may reverse question Q1) and pose Q2): Can the developed WF solvers be used towards solving OWF tasks? One could identify two possible uses. First, the proposed tools can be used instead of EPANET in existing zero-order OWF algorithms that rely on a WF solver. Second, the success of the proposed penalized relaxation could be adopted in OWF tasks. For example, our previous work [8] deals with optimal pump scheduling under dynamic electricity pricing. This OWF task handles unknown flow directions and is relaxed to an MI-SOCP after in (5) is approximated as constant. The relaxation is provably exact under certain conditions and after adding a penalty to the cost of the MI-SOCP. The relaxation is numerically exact under a broader range of WDS conditions. Interestingly, the penalty that worked for [8] does not work for the WF task studied here. For this reason, this work put forth the penalty in (W2) and took a totally different route for establishing exactness. The sufficient conditions for exactness of Theorem 2 are significantly simpler compared to those in prior works on OWF.
VI A Hybrid Water Flow Solver
The hybrid WF solver relaxes the assumption of non-overlapping cycles of Theorem 2 to the following condition.
Assumption 1**.**
The water network has no pumps in overlapping cycles.
The assumption permits overlapping cycles, but these particular cycles should carry no pumps. For a network satisfying Assumption 1, the WF task can be solved through the following steps illustrated also in Fig. 3:
- T1)
Any cycle with pumps is non-overlapping. Thus, for any node belonging to , two cases arise:
i) Node belongs only to cycle (node of ); or
ii) Node belongs to other cycle(s) as well; yet and share no edge (e.g., node of ).
Then, reduce graph to through the steps:
- •
If for a cycle having pumps, all nodes do not belong to any other cycle, replace by a supernode .
- •
If for a cycle having pumps, node belongs to other cycle(s), identify the edges and , which belong to . These two edges belong to no other cycles as is non-overlapping. Split the node into and connected by a lossless edge , such that all edges in other than and that were incident on are now incident on . After repeating this step for all nodes in that belong to multiple cycles, replace by a supernode .
This process ensures that in all supernodes and the pumps left out from do not appear on cycles. 2. T2)
Use Lemma 3 to compute the water flows on the edges incident to supernodes ’s in . 3. T3)
For each edge in , modify the injection at node as . 4. T4)
Partition into a set of connected components by removing the supernodes and their incident edges. Each has known injections and bears no pumps in cycles. 5. T5)
Use the stitching algorithm of Section IV-B per component to find the flows within . 6. T6)
Each supernode is split back to the cycle it replaced. If the edge of corresponded to edge of , modify the injection at node as . 7. T7)
Solve (W2) per cycle to find the water flows on . 8. T8)
Given vector , find the pressure vector using Lemma 1.
Let us apply the previous steps on the -node and -pipe water network of Fig. 3. There are two cycles carrying pumps, marked as and . Node of cycle belongs to multiple cycles and hence it is split in and . Next, removing and along with the edges that connect these cycles with the rest of the graph results in the connected subgraphs , , and shown on the bottom of Fig. 3. The demands on boundary nodes are modified as per steps T3) and T6). The edge flows within each connected component are subsequently found by solving (9). The flows on and are finally found by (W2).
This WDS setup could not be handled by the energy function-based approach of Section IV alone due to the presence of pumps on cycles and . The convex relaxation of Section V alone is not guaranteed to succeed either, due to the presence of overlapping cycles. Combining the merits of each method and leveraging Lemma 3, this hybrid method can handle successfully this WDS setup.
VII Numerical Tests
The new WF solvers were evaluated under the different network configurations of Fig. 1. First, the new WF solvers were evaluated on the EPANET Example Network-2 representing a water network from Cherry Hills, Connecticut shown in Fig. 4 [2]. This network consists of pipes, demand nodes, one tank, and one pump station. We modified the network by representing the pump station as a reservoir with pressure ft connected to a fixed-speed pump. All nodes were assumed at the same elevation. The pipe friction coefficients ’s, and base demand vector , were derived from the EPANET benchmark. Note that the WDS in Fig. 4 has overlapping cycles but the pump is not in a loop. Thus, it qualifies for being solved using the energy function method alongside the stitching algorithm of Section IV-B.
We tested whether the proposed solvers yield the same solution as EPANET. For this purpose, we obtained WF solutions using the constrained energy function minimization of (9) and the MI-QCQP of (W2). Problem (9) was solved using the closed-form dual decomposition steps of Section IV-A for within iterations. The MI-QCQP in (W2) was solved using the MATLAB-based toolbox YALMIP along with the mixed-integer solver CPLEX [36], [37]. All tests were run on a GHz, Intel Core i5 computer with GB RAM. The flows obtained by the two solvers were very close to the EPANET solution, as illustrated in Fig. 5. EPANET uses more detailed flow models, e.g., the coefficient in (3) depends weekly on flow . The iterations for the primal-dual updates of (9) were completed within sec, and the running time of the MI-QCQP (W2) was sec.
We next evaluated the performance of the MI-QCQP-based solver of (W2) in finding the correct WF solution, when the conditions of Theorem 2 are not satisfied. Specifically, the network of Fig. 4 has overlapping cycles. To represent various demand levels, we generated random WF instances by scaling the benchmark demand by a scalar uniformly drawn from . Given a minimizer of (W2), we defined the inexactness over lossy pipe as . For each run of (W2) with a random input, the ranked maximum inexactness gap over all lossy pipes is displayed on Fig. 6 (top). Despite violating the conditions of Th. 2, the inexactness gap was small for all random tests. Computationally, the running time of (W2) over the instances with a median value of only sec; see Fig. 6 (bottom).
Our WF solvers were subsequently tested on the 20-node synthetic network of Fig. 7 and under different demands. The WDS of Fig. 7 was created by combining two copies of the popular 10-node WDS representing the modified Arava Valley network from Israel; see [8], [22] for network data. The additional pipes , , and have the same dimensions as pipes , , and , respectively. These were added to generate different network conditions. The parameters for all the pumps were derived by scaling the pump parameters of [7] by , and were set to .
The performance of (W2) was tested for two network configurations derived from the WDS of Fig. 7: C-i) pipe removed; C-ii) pipe removed. Note that configuration C-i) has pumps in non-overlapping cycle along side other overlapping cycles not hosting pumps. Thus, the WF problem for C-i) can provably be solved using the hybrid WF solver of Section VI. Moreover, configuration C-ii) has pumps in overlapping cycles and thus cannot be provably solved even by the hybrid WF solver. However, we numerically tried (W2) in solving random WF instances for both C-i) and C-ii).
The random WF instances were generated by fixing pressure m and drawing the remaining pressures independently as Gaussian random variables of mean m and variance m2, or . The on/off statuses of pumps were drawn as independent Bernoulli random variables with mean of . The flow for on pumps was drawn with uniform probability on the allowable pump flow mhr. For off pumps, flows were drawn from . The pressure added by pumps was then calculated using (5). For pump , the receiving node pressure was updated as . The water flow in all lossy pipes was calculated from the so obtained pressures and (3). Once the complete flow vector was obtained, the injections were computed from (21). The obtained vector of injections, pump on/off status, and pressure served as a feasible input for the WF task. Similarly feasible random WF instances were generated for configuration C-ii), and solved using (W2). The maximum time for solving (W2) was set to min in CPLEX.
The WF task for both configurations was solved within a -minute deadline for out of the random instances with the average time being and sec for C-i) and C-ii), respectively. The ranked maximum inexactness gap over all lossy pipes for C-i) and C-ii) is shown in Fig. 8. Although the conditions of Th. 2 were not satisfied by either configuration, the maximum inexactness obtained was less than for and out of the instances of C-i) and C-ii that were solved. For the two cases where the MI-QCQP failed to converge within the -min deadline, we modified the big- parameter value from to . The result was that the two instances were solved in and seconds with the inexactness gap being less than .
To evaluate whether the status of the pumps has any significant effect on runtime, we conducted the previous tests on the WDS of Fig. 7 with all the pumps running. The inexactness gap and running times were found similar to the tests with pump statuses randomly chosen. Interestingly, the inexactness gap and running times for the new tests did not show significant differences from the tests with random pump statuses; see Fig. 9. 99 out of the random WF instances were solved within the -min deadline with a median running time of sec. Thus, the MI-QCQP (W2) is in general a powerful WF solver for various network configurations.
VIII Conclusions
Using recent tools from graph theory, convex relaxations, energy function-based approaches, and mixed-integer programing, this work has provided a fresh perspective on the physical laws governing water distribution networks. It has been established that the WF problem admits a unique solution even in networks with multiple fixed-pressure nodes and flow-dependent pump models. This WF solution can be provably recovered via a hierarchical stack of WF solvers suitable for different network configurations. Radial networks can be handled by simple convex minimization tasks, whereas networks with cycles call for more elaborate MI-QCQP-based solvers. Nevertheless, numerical tests demonstrate that even the MI-QCQP approach scales well for moderately-sized networks. The MI-QCQP solvers have been derived upon a convex relaxation of the pressure drop equation followed by an objective penalization, an approach that sparked a parallel line of research on the OWF problem [8]. Network configurations hosting pumps on overlapping cycles remain to be a challenging case.
Proof:
The cost of (W2) can be written as
[TABLE]
To express pressure differences along the flow direction in a compact manner, define the edge-node incidence matrix : Its dependence on signifies that the directionality of each edge coincides with the flow directions in . Therefore, if the -th row of is associated with pipe , then its entry is
[TABLE]
For zero flows , the default pipe direction is selected without loss of generality.
Based on , the pressure differences along the direction of flows can be written as , and so
[TABLE]
If (W1) is feasible, denote its unique solution by . Since the base directionality of the WDS graph is arbitrary, let it coincide with the water flow directions of . Using this convention, it follows that and is identical to the base incidence matrix . Next, proving by contradiction, suppose is a minimizer of (W2), which is not feasible for (W1). Since both and satisfy (2) for , there exists a nonzero vector such that
[TABLE]
As shown in (16), vector can be expressed in terms of a set of fundamental cycles using the flow directions of . To simplify notation, let us define . Since every edge is assumed to belong to at most one cycle, the set of fundamental cycles is unique irrespective of the spanning tree selected. Therefore, the set of fundamental cycles in fact contains all cycles in the graph, implying .
Building on (16), consider a decomposition of as a weighted sum of indicator vectors ’s. If there exists a cycle , for which , then one can reverse the direction of cycle and substitute in (16) with . Hence, it can be assumed that for all without loss of generality.
Each vector can be decomposed as , where and . Because every edge belongs to at most one cycle, it holds that
[TABLE]
where the -th entry of vector is if edge does not belong to any cycle; and [math], otherwise. Using (21) in (19), the objective function of (W2) becomes
[TABLE]
Albeit will be evaluated for different pairs , the vectors ’s remain unchanged and depend on . Based on (16) and (22), we will next show that . To do so, we consider the three terms of (22) separately.
First summand of (22). Recall is a binary vector; and the base graph directionality is such that . Consider the entries of and for the edges related to . If , then . In that case, if edge and relates to a lossy pipe, we get
[TABLE]
where the first inequality stems from constraint (14) of (W2); the second one from ; and the equality from constraint (3) of (W1).
If edge relates to a pump, we can also show
[TABLE]
Consider cycle and sum up the LHS and RHS of (23) or (VIII) for all with to get
[TABLE]
where the inequality is strict if . Summing (25) over all cycles provides
[TABLE]
with strict inequality arising from the fact that not all ’s can be zero for a nonzero .
Second summand of (22). As explained earlier, if , then so remains positive. On the other hand, if , then . In the latter case, the flow has decreased, and its sign may have been reversed to negative. Since all ’s are positive, the flow reversals in ’s can be modeled as , where matrix is diagonal with the signs of on its main diagonal. Since the vectors ’s form a basis for , it holds that and so
[TABLE]
Similar properties hold for . To see this, the vector belongs to since
[TABLE]
Therefore, we also get that
[TABLE]
where and .
By definition of , if , then and . However, if , then or depending on the sign of , and so or . It therefore follows that
[TABLE]
Back to the -th term of the second summand in (22):
[TABLE]
where stems from (29b); from (28); from (29a); from (25); and from (27). Summing (VIII) over
[TABLE]
where the strict inequality stems from that argument in (VIII) is strict for , and not all ’s can be zero.
Third summand of (22). The third summand sums up the pressure differences along the direction of flow for all edges not lying in any cycle. If edge belongs to this case (i.e., ), then and so as in (23) we get
[TABLE]
Summing up over all edges with yields
[TABLE]
Adding (25), (31), and (32) by parts gives . This contradicts that is a minimizer of (W2) since is feasible for (W2), and concludes the proof. ∎
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] H. Mala-Jetmarova, N. Sultanova, and D. Savic, “Lost in optimisation of water distribution systems? A literature review of system operation,” Environmental Modelling & Software , vol. 93, pp. 209–254, 2017.
- 2[2] L. A. Rossman, R. M. Clark, and W. M. Grayman, “Modeling chlorine residuals in drinking-water distribution systems,” J. of Environmental Engineering , vol. 120, no. 4, pp. 803–820, Jul. 1994.
- 3[3] H. D. Sherali, S. Subramanian, and G. Loganathan, “Effective relaxations and partitioning schemes for solving water distribution network design problems to global optimality,” J. of Global Optimization , vol. 19, no. 1, pp. 1–26, Jan. 2001.
- 4[4] C. D’Ambrosio, A. Lodi, S. Wiese, and C. Bragalli, “Mathematical programming techniques in water network optimization,” European J. of Operational Research , vol. 243, no. 3, pp. 774 – 788, Jun. 2015.
- 5[5] J. E. Van-Zyl, D. A. Savic, and G. A. Walters, “Operational optimization of water distribution systems using a hybrid genetic algorithm,” J. of Water Resources Planning and Management , vol. 130, no. 2, pp. 160–170, 2004.
- 6[6] D. Fooladivanda and J. A. Taylor, “Optimal pump scheduling and water flow in water distribution networks,” in Proc. IEEE Conf. on Decision and Control , Osaka, Japan, Dec. 2015, pp. 5265–5271.
- 7[7] ——, “Energy-optimal pump scheduling and water flow,” IEEE Trans. Control of Network Systems , vol. 5, no. 3, pp. 1016–1026, Sep. 2018.
- 8[8] M. K. Singh and V. Kekatos, “Optimal scheduling of water distribution systems,” IEEE Trans. Control of Network Systems , vol. 7, no. 2, pp. 711–723, Jun. 2020.
