The estimation of the current state of a water distribution system based on digital models and observed measurements and the estimation of the system state in the future or under different conditions has been done in the past under different names (with different levels of approximations). In the last two years it has evolved to the name of Digital Twins (what is probably a better name, taken from previous application of similar concepts in other industries). No matter the name adopted, the problem is still the same: how can the utility know what is the current state of the water network and how it will “behave” if some conditions are changed?. And what is not less important: why do they need to know that and how it helps to improve the value creation process of the utility?. The topic is very wide to treat it in a single post and it will be more affordable to get concentrated in what could be considered one of the cores of any digital twin for water networks: the hydraulic model, specifically for the case of water quality analysis. There are commercial softwares having very good graphic user interfaces for water network modeling but their calculations are basically reproducing (or using directly) the ideas of EPANET developed more than 20 years ago. It wouldn’t be wrong to say that EPANET is the most used software base for water quality analysis and that’s why we will take it as a point of reference to explain issues with the reproducing the assessment of water quality in a digital twin. A simple practical water age calculation example will be used and in order to simplify the problem no consideration will be done regarding complete/incomplete mixing at nodes and the model for estimating demands, pressure and flows is assumed to be perfectly calibrated with field data. For the sake of simplicity we are going to use the network model A and B from the next figure. Model B only differs from Model A in the addition of the node 5 in the pipe R1-Node 1. Note that  node 5 has no demand, it is just dividing the pipe R1- Node 1 from model A in two pipes with different lengths.  Figure 1:  models A and B Theoretically both models should be fully equivalent and the existence of node 5 in model B should not make any influence in the water age calculated at nodes 1, 2, 3 and 4 compared to model A when both models are running under the same conditions. However, if both models are executed directly in EPANET the results obtained at the end of the simulation will be surprisingly different. Comparing the water age obtained at Node 1 for the models A and B Comparing the water age obtained at Node 1 for the models A and B Water age result for nodes 1 and 2 at the end of the simulation of model A Water age result for nodes 1 and 2 at the end of the simulation of model A Figure 2: Results of models A and B Why does it happen? Are the models really equivalent? Is there a problem in the EPANET algorithm? The models are really equivalent and they are included as part of the examples coming with the installation of Water-Ing (a software for water network modeling). The EPANET algorithm is not specifically the problem but it would have been great to get some warning from EPANET informing that the calculation time step should be reduced in order to meet the stability condition of the calculation method used, otherwise results may not be “totally right”. Why has such a warning not been included? That’s a very good question, but for this example the reality is that reducing the time step used for the calculation of model B solves the problem and the results are identical to the results obtained in model A as expected. The next questions are: how do we realize if the time step should be reduced? And in case it should be reduced, how much should we reduce it? There is not a direct way as far as we know in EPANET, one approach could be to run a calculation, reduce the time step, run the calculation again and compare with the previous calculation. If results are the same for every single node then the time step should not be reduced. Otherwise keep on reducing it until you reach a value where the calculation results do not change significantly for the nodes. And yes, it will be hard to achieve in EPANET with a network having several hundreds of nodes. The software Water-Ing, developed by Ingeniousware estimates internally the time step required to be used in the water quality calculations and informs the user about it whenever the timestep defined in the model does not guarantee the stability conditions of the calculations. The software was totally written in c# and despite it follows some of the principles used in EPANET, it adds several improvements regarding incomplete mixing, multi-species and the treatment of the time step to be used. There is a free community edition that can be used at no charge and an affordable professional edition at 99,00 eur/year to support the continued development of the application, providing also access to the plugin source code among other resources. The next figures represent the results obtained in Water-Ing for model A and B. As expected in both cases the results are the same because the models are totally equivalents. Model A executed in Water-Ing Model B executed in Water-Ing Is the situation different when using another professional water modeling package with a higher cost? If you are using Infoworks or Watergems the results wont be probably different. We were able to reproduce the same behavior found in EPANET both in Infoworks and in Watergems. Watergems was showing some additional options for the estimation of water quality but the results obtained when using those options were even more confusing for us. If you are interested in trying this by yourself you can download the EPANET .inp files for model A and B from here. A more detailed technical paper describing the problem and what was done in Water-Ing regarding water quality calculations can be downloaded here. Do not hesitate in contacting us if you are interested in additional work or consulting in this topic. You can also get registered in a Webinar about creating and running water quality models in Water-Ing:Utilities can apply to the Pilot Project Program of Ingeniousware to effectively evaluate the creation of value and the return of investment of digital models customized for their conditions.

Leave a Comment