Next Article in Journal
Transpiration Water Consumption by Salix matsudana and Populus simonii and Water Use Patterns at Different Developmental Stages on Sandy Land
Previous Article in Journal
Isotopic and Remote Sensing-Based Characterisation of a Rainfall Event over Western Sierra de Gádor (Spain): Implications for Carbonate Aquifer Recharge
Previous Article in Special Issue
Risk Assessment Model for the Renewal of Water Distribution Networks: A Practical Approach
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

EPANET INP Code for Incomplete Mixing Model in Cross Junctions for Water Distribution Networks

by
Daniel Hernández Cervantes
1,
José Antonio Arciniega Nevárez
2,
Helena M. Ramos
3,*,
Xitlali Delgado Galván
2,
Joseph Daniel Pineda Sandoval
4 and
Jesús Mora Rodríguez
2,*
1
División de Ingenierías del Campus Guanajuato, Universidad de Guanajuato, Guanajuato 36000, Mexico
2
Departamento de Ingeniería Geomática e Hidráulica, Universidad de Guanajuato, Av. Juárez 77, Guanajuato 36000, Mexico
3
Civil Engineering Research and Innovation for Sustainability (CERIS), Civil Engineering Department, Instituto Superior Tecnico, University of Lisbon, Av. Rovisco Pais 1, 1049-001 Lisboa, Portugal
4
Engineering Division, Universidad de Guanajuato, Guanajuato 36000, Mexico
*
Authors to whom correspondence should be addressed.
Water 2023, 15(24), 4253; https://doi.org/10.3390/w15244253
Submission received: 10 November 2023 / Revised: 9 December 2023 / Accepted: 10 December 2023 / Published: 12 December 2023
(This article belongs to the Special Issue Drinking Water Distribution Systems: Hydraulics and Water Quality)

Abstract

:
EPANET can be used to simulate quality on water distribution networks. The EPANET model considers that the mixing on cross junctions of pipes is complete, including the cases of two contiguous inlets and two contiguous outlets. The output concentration of this model is the same value on the two outlets. This research proposes a code to generate an INP file for EPANET but with an incomplete mixing scenario in the crossings. The cross junctions are identified, and their hydraulic and concentration conditions are analyzed for each quality time step. Bypass pipes are included in the model to remove concentrations generated by the complete mixing model, preserve continuity in water quality and ensure the correct allocation of concentration. The concentration at the outlets is obtained by a system of polynomial equations representing the incomplete mixing model as a function of the hydraulic and concentration at the junction inlets. The outlets’ concentrations are incorporated by setpoint boosters. Validations are described to demonstrate the achievement of the new code. An average relative concentration difference of up to 14% is obtained in networks with different scenarios for the two mixing models.

1. Introduction

EPANET 2.00.12 simulates quality models on pressure pipes for diverse studies. In the case of the model for the outlets after a Cross Junction (CJ), EPANET proposes that the concentration of a substance be a result of a simply flow-weighted sum of the concentrations coming from the inlet pipes. In this case, the mixing of fluid is taken to be complete and instantaneous [1]. Some researchers have demonstrated numerically and experimentally that the resulting mixture is neither instantaneous nor complete after CJ [2,3,4,5,6,7,8,9,10,11,12]. Most of these researchers rely on computational fluid dynamics (CFD) with the use of tracers to obtain the distribution of concentrations in the flows after CJ. The most common tracers are salts, Sodium Chloride, Chlorine, Copper Sulphate, and the use of color in laminar flow [11,12,13,14]. The use of a tracer in experimental models is important to obtain the concentration at the outlets of the CJ under diverse conditions to validate the numerical scenarios normally modeled in CFD.
Simulating the concentration at the outlets in the CJs more accurately is important because it allows us to know the effect that these simulations generate on the total concentration in the network. For this case, there are two water quality applications that have modified the EPANET functions to incorporate the Incomplete Mixing Model (IMM): One of them is EPANET-BAM [5], and the other is AZRED II [15]. Both have been published in scientific journals. In fact, the calculation methodology used by EPANET-BAM has been considered by the authors of EPANET to incorporate that mixing model in a prototype version of EPANET 3.0 [16], but it has not been made available yet. These kinds of applications are restricted to some specific networks and require validation with experimental and real networks.
In 2021, ref. [17] proposed a System of 12 Polynomial Equations (S12PE) to obtain an IMM at CJs. The equations were obtained by the relation of the concentrations in the inlets and the outlets of the CJ. Each equation was obtained with nine scenarios simulated with a CFD model (a total of 108 scenarios was obtained). The CFD model was validated using four experimental scenarios described in [18] by the same authors.
The S12PE of the IMM was validated for various diameters of CJ with a CFD model [17]. Diameters variate in 0.076 m × 0.051 m; 0.076 m × 0.076 m; 0.102 m × 0.076 m; 0.102 m × 0.102 m; 0.152 m × 0.102 m; 0.203 m × 0.254; 0.203 m × 0.305 m; 0.305 m × 0.305 m and 0.76 m × 0.305 m. The CJs simulated in CFD maintain the hydraulic structure and numerical parameters of their accurate representation from the experimental model that was used for its validation. The concentration at the outlets of the CJs varied from 0.1% to 11.8% in the S12PE regarding the CFD model. However, 72.5% of the outlets have an error below 2.0%. The other 17.5% of the outlets have an error between 2.2% and 4%, and finally, 10% of the outlets have an error greater than 4% [17]. Therefore, the IMM by S12PE has an efficient representation of different configurations of CJs commonly used in water distribution networks.
The consequence of better representing the IMM on CJs in the water distribution network is that the lack of accuracy in the simulation of water quality can lead to errors in two kinds of applications: (1) The detection of low concentrations of chlorine, which may affect the proposal of Booster Chlorine Stations needed to maintain the minimum required concentration [5,19,20,21,22,23,24] and (2) the design of monitoring systems, such as the optimal placement of sensors to detect contaminant events [25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47]. The accuracy of these models is also necessary to simulate the spatio-temporal dispersion of the chemical and microbial agents during accidental or intentional pollutant events. In this paper, the IncByPass code is described to generate an INP file that implements the IMM on CJs in the EPANET scenarios. In the methodology section, the process to generate the IncByPass and its validations to guarantee the results of the hydraulic and quality simulation with the IMM in EPANET is described. The novelty of this paper is the application of a new Incomplete Mixing Model (IMM) to obtain the concentration at the outlets according to their flow and concentration inlets. This IMM was validated experimentally for the concentrations and with a CFD model for diverse kinds of diameters used on distribution water networks. The outlet concentrations from the CJs are determined in a code named IncByPass, which considers:
  • Identifying the time step in which the CJ has a flow with two contiguous inlets and two contiguous outlets;
  • Including a bypass at the CJ that was identified to incorporate the IMM;
  • The IMM was implemented by the S12PE for every CJ at every time step;
  • It was assigned the concentration at the outlets according to its similarity with the flows and concentrations on the CJ validated with the CFD model;
  • Patterns and controls of EPANET were programmed to activate booster stations and open and close pipelines in the bypass according to the flow conditions to guarantee the two contiguous inlets and outlets of every time step;
    These novelties proposed by the IncByPass code were validated on diverse network scenarios described in the following chapters of the paper.

2. Materials and Methods

The methodology to generate the IncByPass and its validation is made with the following steps: (1) Description of EPANET water quality model related to CJs and the application of the IMM. (2) Description of the code IncByPass to explain the process that generates the modification of the network to implement the IMM and the incorporation on EPANET. (3) Application of IncByPass with constant consumption verifying the results of the generated code. And finally, (4) validation of the model on constant consumption and tanks around the network to verify the stabilized conditions on the hydraulic and quality with the IncByPass.

2.1. EPANET Quality Model Related to CJs and the Application of the IMM

The EPANET water quality model uses a Lagrangian approach for tracking at fixed time intervals for a series of discrete sections of the pipe (Figure 1). In each step, it generates a mix along the pipe and the nodes [1].
The time intervals used to simulate the quality model must be shorter than the hydraulic calculation interval; EPANET proposes 5 min for each qstep. However, the uncertainty comes from the complete mixing at the CJs, which could have an impact on the effectiveness of their results since the concentration is obtained by Equation (1), which averages the value of the concentration for both outlets, according to the weighted of concentrations and flows on the inlets of the CJ.
C i = j I k Q j C j + Q k , e x t C k , e x t j I k Q j + Q k , e x t
where Ci represents the concentration at the outlets on the CJ. Qj is the flow rate at the inlets of the CJ. Qk,ext is the external source flow entering at node k. Ck,ext is the concentration of the external flow entering at node k. Ik is the set of pipes at the inlets on node k.
In contrast, the IMM that is going to be applied in the IncByPass considers the S12PE [17] to obtain the concentration at the outlets of the CJ (Figure 2). The inlets at the CJ are represented by the flows QN and QW and concentration CN and CW; they are represented by the relation IN (horizontal axis in Figure 2). And the outlets are represented by the flow QE and QS, and the concentration CE and CS that are going to be obtained by the relation OUT (vertical axis in Figure 2).
Finally, to obtain the adequate polynomial equation for the specific concentration at the outlets, the most similar proportion of the flow between the inlets and the outlet flows must be obtained (Equation (2)).
Q r I N = Q N Q W           a n d           Q r O U T = Q E Q S
where Q r I N and Q r O U T are the proportion of the flows at the inlets and the outlets of the CJ. These relations are used to verify the minimum difference of flow relations from one of the 12 polynomial equations, considering Equation (3).
R i = Q r I N Q r I N i + Q r O U T Q r O U T i
where Ri is the absolute sum of differences for the polynomial equation for i from 1 to 12. Q r I N and Q r O U T i are the proportion of the flows at the inlets and outlets of the CJ for each of the polynomial equations. The minimum value of Ri will be considered similar to the most similar scenario to use the relation OUT to obtain the concentrations at the outlets for a specific CJ.
The assumptions to apply the S12PE are regarding the velocity and the concentration. The velocity in the pipes around the CJ is between 0.4 m/s and 2.5 m/s, with a relation from 0.3 to 3.0 for the velocities at the inlets and for the velocities at the outlets. The concentrations at the inlets assumed a relationship from 0 to 2.0 (horizontal axis of Figure 2).
In this case, the limits of the S12PE occur when the range of velocities around the CJ is 0.30 and 3.0. And for the concentrations, the limits are in relation to the value IN; for 10 of the polynomial equations, the limit of IN is around 5, and only for the equations S6 and S10 is the limit of IN around 2.5.

2.2. Code to Generate IncByPass

To apply IncByPass on EPANET, auxiliary nodes and pipes are implemented at each CJ of the network. This process was made to eliminate the resulting concentration from the complete mixing model at the outlets of the junction and to establish the value of the proposed concentration with the IMM by the S12PE described in Section 2.1. This modification was performed by maintaining the hydraulic functionality of the network during the extended simulation period and establishing the adequate properties of the auxiliary nodes and pipes.
Firstly, new junctions are generated: Naux, Waux, Eaux and Saux (Figure 3) around the CJs. These junctions are 1 cm from the CJ, and the auxiliary junctions acquire the elevation of the CJ without demand. These junctions will function as a quality source of the type of setpoint boosters; this is a source that fixes the concentration of any flow leaving the node [1].
Secondly, the pipes around the CJ were cut 1 cm distance to connect them to the auxiliary nodes (Figure 3). Now, junction “C” is connected to the auxiliary nodes with 4 new pipes of 1 cm in length. These new pipes maintain the same diameter and roughness, and the length of the original pipes are updated by reducing 1 cm length of the bypass.
Thirdly, the next step is to generate bypasses with two pipes of 0.5 cm in length, with the same diameter and roughness as the original one. The bypasses include a node with the same elevation as the CJ without demand. The bypasses connect the auxiliary nodes with the junction “C”. At the beginning of the simulation, the bypass pipes have a closed status. This does not affect the hydraulic functionality.
To activate the IMM, the CJ must present a condition of flow with two contiguous inlets and two contiguous outlets. Therefore, the direction of the flow must be verified for every step of the hydraulic simulation. In Figure 4, diverse cases of this flow for any CJ can be observed. The boundaries are identified with the cardinal directions (North, South, East and West).
In any case of flow mixing, the bypass will be activated at the outlets (Figure 5), and those pipes’ status changes to open. The original pipes at the outlets change the status to closed (symbol X in Figure 5). At the pipes of the bypass, a high bulk coefficient (kb = −2000) is assigned with the objective of consuming the chemical concentration, considering that the concentration at the final of the pipe, on the auxiliary nodes, the quality must be zero. At that moment, the incomplete mixing is calculated with the S12PE, as was described in Section 2.1, and the result will be assigned to the property of Source Quality of EPANET for the nodes CE and CS and, in this way, continue the following quality steps.
In each quality step of 5 min, the code made the complete analysis for the mentioned CJs. Therefore, the hydraulic simulation requires actualization every 5 min. This process was codified following the next steps to obtain the incomplete mixing:
  • The network is loaded, the CJs are recognized, and the properties of the connection are organized to generate the auxiliary nodes, as in Figure 4;
  • The hydraulics and quality parameters are initialized with counters, and empty matrices are generated to be filled with information on the following steps;
  • If the CJ presents flows with two inlets and two contiguous outlets (Figure 5), then the bypass is going to activate at the outlets (the original outlets change their status to closed, and the pipes of the bypass change their status to open);
  • Then, the flow is registered in the matrix at the four boundaries and the quality concentration at the inlets (N and W);
  • The incomplete mixing is calculated by the S12PE, and the results are assigned to the property Source Quality at the final nodes of the bypass at the outlets (E and S);
  • The results are registered in the matrix that will be used to generate patterns for the node working as source quality in EPANET. The Patterns of EPANET are generated, indicating the concentration that is going to be established at the outlets;
  • The model is simulated with these changes to obtain the quality of the results and continue to the next quality step;
  • Once a simulation is completed in the total hours (e.g., if the original network simulation is 24 h), it compares the quality results at time 0:00 with the final time, 24:00. If there is a relative error less than 0.001 in all the nodes, an additional day of simulation will be run until the relative error mentioned above is reached (another 24 h of simulation is increased);
  • In the last 24 h, with the relative errors less than 0.001, the model will be simulated to generate controls of EPANET by IncByPass. The controls are generated to indicate when the outlets and source quality should operate based on the hydraulic direction flows around the CJs;
  • And the code IncByPass is finished (Figure 6).
EPANET can export the scenarios in a file with an INP extension. This file is written in ASCII text format [1]. The INP file contains the description of the network and the operating conditions of the simulation, and the file can be created or modified in any text editor, spreadsheet program or by programming codes. It is organized into 27 sections (Table 1), [1]. This file can be read back into EPANET by importing it for analysis of the modifications. This property is used by the code IncByPass to incorporate the IMM with the hydraulic and quality modifications validated to simulate on EPANET.
All the simulations made on EPANET consider a chemical substance without reaction in the track through the distribution networks. The quality model simulates a chemical in mg/L with a relative diffusivity of 1. The reaction model for the wall and bulk is of first order in both cases. However, the reaction coefficient for the wall pipe and bulk flow is zero. In this case, the simulations are going to show the effect of the mixing at the CJs to measure the differences of the IMM with the Complete Mixing Model (CMM) of EPANET.

2.3. Application of IncByPass with Constant Demand to Verify the Results of the Generated Code

This section is going to show the application of IncByPass for the modification of the CJs to prepare the scenarios for the IMM in two networks (Figure 7). The networks are IM1.net and IM2.net and have a constant demand during the simulation, with diverse concentrations from the reservoirs. IM1.net is the only CJ with two reservoirs at the inlets, one of them with a chemical concentration of 1.0 mg/L and two demand nodes at the outlets (Figure 7a); the pipes are 2 inches in diameter. The IM2.net (Figure 7b) has two reservoirs, one with a chemical concentration of 1.5 mg/L, seven CJs, with diverse diameters 6 × 6, 6 × 4, 4 × 4, 4 × 3, 3 × 2, 2 × 2 (inches). One junction has a set point source quality of 1.5 mg/L. The demands are 10 and 20 L/s, respectively.

2.3.1. Application of Incomplete Mixing on IM1.net with Constant Consumption

The network IM1.net was proposed to show the differences in the concentrations considering EPANET mixing CMM and the IMM with the S12PE for constant consumption and to show the effect of the application of the IncByPass. The relative difference obtained is up to 80% when the inlets have 1.0 mg/L on the west reservoir and 0.0 mg/L on the north reservoir. At the outlets, the CMM obtains a value of 0.5 mg/L, and with the S12PE, the values are 0.10 mg/L for the east node and 0.90 mg/L for the south node (Figure 8).
The function of the Bypass allows the nodes with the quality source to assign the concentration proposed by the S12PE. As shown in Figure 9, the pipes of the bypass (from node C to nodes NauxC-1 and NauxC-2) have a high coefficient reaction (Kb = −2000) to eliminate the homogeneous concentrations of 0.5 mg/L for both bypasses, that EPANET mixing provides. Therefore, the IMM of S12PE is assigned by the variable source quality in the nodes NauxC-1 and NauxC-2 working as Setpoint Booster and with a specific time pattern obtained from the INP code.

2.3.2. Application of Incomplete Mixing on IM2.net with Constant Demands

The IM2.net obtains a relative mean error of 231% in the chemical obtained at the nodes for the two kinds of mixing. The concentration around the networks with the EPANET mixing shows a range of concentrations between 0.40 and 1.50 mg/L, and, on the other hand, there are concentrations from 0.00 to 1.5 mg/L. The main difference is that the model with the IMM has zones with extreme concentrations compared with the CMM (Figure 10).
The numerical results in the chemical concentrations are obtained from the relative difference based on the IMM. Figure 11 shows 23 of the 30 junctions, where 3 of them have a relative error greater than a thousand, 2 junctions with a value higher than a hundred and 2 junctions with infinite value due to the fact that the concentration on the IMM was 0.0 mg/L and on the CMM was 0.40 mg/L.

2.4. Validation of the Model with a Variable Consumption and Tanks around the Network to Verify the Stabilized Conditions on the Hydraulic and Quality with the IncByPass

The model validation is developed to guarantee that the simulation maintains the hydraulic and quality conditions with the incorporation of the auxiliary junctions and pipes and the patterns and controls for the IMM of the S12PE. In this validation, the tanks around the network must maintain an established cycle every 24 h to emptying, filling and the concentration of the chemical.
The scenario of the networks will remain constant if the hydraulic and quality variables do not change every 24 h of simulation. This can be verified when these parameters do not change over time in the following days of the simulation. Regarding the quality parameters, the junctions and tanks must initially have a specific concentration. This concentration must be verified at hour zero, and these values will serve as the initial parameters of the simulation for the next quality steps.
The third network is the Net3.net from EPANET (Figure 12), which has 2 reservoirs, 3 tanks around the network, 2 pumps, 117 pipes, and 92 nodes—9 of them are CJ and present 1 general pattern and 4 specific patterns of consumption in some nodes. The total base demand is 192 L/s. The pipes have diameters of 8 to 99 inches, with 65.48 km of length; the roughness varies from 110 to 199 with the friction loss calculated by the Hazen–Williams equation. To evaluate the steps of the IncByPass with variable consumption, the chemical concentration is to be injected in two different concentrations from the sources. From the reservoir on the left, the injected concentration is 5 mg/L, and from the reservoir on the right, the injected concentration is 1 mg/L.
According to the methodology described in steps 1, 2 and 3, the process involves recognizing the CJ to perform some parameters. Here, a modified network is obtained according to the presence of CJs and the generation of support matrices, with the information of the CJs and the mixing cases (ID of nodes and auxiliary pipes and matrix with the hydraulic behavior of the CJs).
In step 4, the matrices are generated according to the codification of two subroutines that present the information of the CJ by the Counters and IDs of the CJs and the auxiliary node indexes and for new pipes in the Bypasses. Then, a support matrix is generated indicating one of the four types of mixing cases being carried out at the CJ with the contiguous flow inlets and contiguous flow outlets at the CJs.
The network originally had simulation times that were set as default (Table 2). However, since this analysis depends on the quality time step (qstep), then the hydraulic steps will be coupled to these qsteps without altering its base performance. Therefore, the simulation times will be adapted as follows in Table 2.
In the following steps 5 to 7 of the methodology, the main objective is to maintain simulation every 5 min. This frequency is necessary because the dynamics of chemical concentrations will be handled in the boosters based on the result of the S12PE. The chemical concentrations at the outlets of the bypasses are simulated in EPANET with patterns associated at the junctions, like a set point booster on the source quality property (Figure 13).
The multiplier values of the patterns will be adapted according to the number of times of the qstep (Figure 14). That is, if hstep = 1 h = 3600 s and qstep = 5 min = 300 s, then the number of times that qstep fits into hstep would be established by Equation (4).
n = h s t e p q s t e p
In this case, n would have a value of 12, representing the number of times a multiplier will be repeated for each qstep. By repeating each of the 24 multipliers 12 times (a standard 24 h simulation pattern), a modified pattern with 288 multipliers in total is generated (Figure 14). This process is performed for each demand pattern in the network; in Net3.net, five demand patterns were modified.
The process of the IncByPass explained in Section 2.1 is implemented, and the network changes its name to NET3_INC.inp, and it identifies the nine CJs in the network. Figure 15 shows an example of the IncByPass for each pipe around a CJ, considering that the distance of the auxiliary nodes with the CJ is 1 cm. The IncByPass generates 4 auxiliary pipes, 8 pipes of the bypass, 4 nodes on the original pipes, and 4 other nodes on the bypass for each CJ.
In step 8 of the methodology, the performance of the hydraulic and quality model of the original NET3.inp has been maintained, and a further comparison was made between the flow rates of the pipes from the sources (Figure 16) and of the level in the three tanks of the network with the NET3_INC.net (Figure 17). The simulation was modified according to the time options for the Hydraulic Step and Time Reporting Step to 5 min for both, and the Total Time Simulation, with 10 days of simulation, could observe the preservation of the hydraulic with the IncByPass.
For step 9 of the methodology, Figure 18 shows a numerical comparison of the flow rates at the final hour of the simulation (hour 240); all the flow rates are conserved in the same proportion. These verifications corroborate that the modification by these bypasses does not affect the hydraulic functionality and that they can be applied to control incomplete mixing.
Finally, at the end of step 9, the resulting process from the IncByPass is that controls are generated in the pipelines around the nodes to specify when the bypasses are open during the simulation. For example, at the CJ 119 (Figure 19), from hour 16, the inlets are the pipes Taux119-2 and Taux119-4, and the outlets are the bypasses 119-1 a and b, and 119-3 a and b. The value 1.0000 can be seen in the third column of the control when the status of the pipe is open, and the value of 0.0000 when the status is closed.
After verifying the hydraulic constant conditions for the IncByPass, the quality model is evaluated to show the comparison between the concentration of the tanks along the network (Figure 20). In this case, the simulation requires more than 40 days to obtain the constant concentration on the tanks for the complete mixing. It could be observed that tank 2 is the most affected by the mixing model at the CJ. In this network, 10% of the junctions have two inlets and two outlets, and the effect of the mixing at the CJ is minimal.
Finally, after the validations of the methodology for the constant consumption and the constant conditions for the hydraulics and chemical concentration, a description of the results of the IncByPass for the scenarios considering a variation on the consumption during 24 h for a scenario of network with a high quantity of CJs and a real case for the quantification of the differences of the CMM and the IMM are provided in this research.

3. Results

The results are described with the application of the IncByPass for two cases. The first case is a network with a high quantity of CJ, and the second case is an adapted sector of downtown Romita, México.

3.1. Network with a High Quantity of CJs

This network is based on [48], where the network has two reservoirs, 961 nodes, 843 of which are CJ, and 1862 pipes, which are practically 88% of the nodes. The simulation is made with constant demand. The injected concentration is 1.6 mg/L for the upper reservoir and 0.8 mg/L for the left one. This specific scenario has reaction coefficients of −0.327 for the bulk and −0.195 for the wall. The diverse variation of the chemical across the pipes is shown in Figure 21. The five junctions with a major difference in concentration are identified in the rectangular zone of the network (Figure 21a).
The simulation was developed considering a constant demand with reaction coefficients to obtain a diverse case of analysis and visualize the effect of the reaction of the chemical along the network. The junctions that present higher differences in concentration are shown in Figure 22. The major difference in concentration was on node 863, with 0.29 mg/L, representing a relative difference of 26%.
According to the analysis of the concentrations at the 961 junctions, 8% of the junctions have differences between 0.15 and 0.29 mg/L (Figure 23). Most of the junctions have differences between 0.14 and 0.05 mg/L, representing 67% of the junctions, and 25% of the junctions have a difference of less than 0.04 mg/L. The relative difference regarding the IMM shows that the greater difference is 54%, and the mean relative difference is 14%, with a standard deviation of 0.0874.
In this network, with the scenario of reaction coefficients and specific location of sources, the difference in concentration shows that the CMM of EPANET maximizes the concentration of a chemical. In the case where the CMM is used for simulations of disinfectants like chlorine, this maximization affects the establishment of the concentration injected at the sources.

3.2. Network Based in Romita Downtown in Guanajuato State in México

The second case is a network based in a sector of downtown Romita in México. According to [49], the population registered in the city’s water supply system is 31,066 inhabitants. The network was adapted to use in this research. The network has two reservoirs near them to show another case different from the case in Section 3.1. The chemical injected from the tanks at the left and bottom of the network is 1 and 5 mg/L, respectively. In this case, there are no chemical reactions. The network has 143 pipes with 14.22 km of length and 81 junctions, 46 of which are CJ, and it has one general pattern of consumption with multipliers varying between 0.606 and 1.372. The total demand simulated in the network is 60.75 l/s. The pipes are 3, 4 and 6 inches in diameter, with 140 and 150 pipe friction coefficients for the Hazen–Williams equation. After the simulation of the IncByPass, the results of the chemical concentration on pipes are shown in Figure 24. In this Figure, a less extreme concentration on the CMM could be observed. Also, the junction numbers in the network (a) are those with major difference concentrations respecting the IMM.
The simulation was made considering a variable demand consumption. However, the concentration of the chemical is maintained constant due to the reaction coefficient being zero during this simulation. Also, the consumption flow varies in the same proportion due to one pattern for all the consumption junctions, and the flow direction on the pipes does not change during the simulation time. The junctions that present a higher concentration difference are shown in Figure 25. The chemical concentration obtains a constant value after 5 h of simulation for the CMM. In the case of the IMM, the IncByPass generates the scenario with stabilized conditions for the beginning of the simulation.
In Figure 26, the difference between the two mixing procedures is shown. According to the analysis of the concentrations at the 81 junctions, 28.4% of the junctions have values between 1.03 to 0.09 mg/L, a higher concentration is obtained by the CMM, with a range of 91 to 8% of relative error, and 50.6% of the junctions have an absolute relative difference of 5% with more concentration until 0.09 mg/L. Finally, 21% of the junctions have a reduced concentration of between 1.22 and 0.27 mg/L, with a range of 23 to 7% relative error. The mean relative difference is 12%, with a standard deviation of 0.1931.
In this network, without the scenario of reaction coefficient, the difference in concentration shows that the CMM of EPANET in some zones of the network minimizes the concentration of the chemical. However, generally, the CMM tends to uniformize concentration. The accuracy of models in designing monitoring sensors to detect pollutant events could be affected by this tendency to uniformize the CMM of EPANET. The proposed IMM obtained by IncByPass is a validated and more realistic alternative to follow solutions for the quality models in water networks.

4. Discussion and Conclusions

In summary, the main aspects of the proposed code, IncByPass, are as follows: (a) Identifying the CJs in the network, as well as their properties, like IDs, connections, infrastructure and their hydraulic operability; (b) the code that modifies the network, adding nodes and accessory pipes that allow concentration control at the identified crossings; (c) the generation of Patterns associated to the nodes at the outlets of the CJ, where the concentration is obtained by the IMM with the S12PE for each quality time interval, qstep (normally of 5 min); (d) a network is obtained in INP format for further simulation and analysis, using the EPANET.
EPANET has demonstrated performance issues during extended simulations under slow flow variations, leading to oscillations and instabilities, particularly in scenarios with multiple tanks in the network. In response to these challenges, Ref. [50] proposed a methodology utilizing the Global Gradient Algorithm (GGA) for unsteady problems involving variable tank heads. However, this approach introduced numerical problems and oscillations, impacting the accuracy of the simulations. Although a patch released on 18 May 2020 addressed accuracy bugs related to tanks in EPANET, a fundamental problem persists. In this model, mixing at tanks considers a long period simulation of 248 h to stabilize quality conditions at tanks; further hours showed no changes in quality parameters in the tanks.
The ongoing challenge with EPANET and many existing approaches lies in the absence of cross terms, such as the space derivative of the head in mass balance equations and the time derivative of volume in momentum equations. This leads to a separation of the integration of mass balance equations in time from the integration in the space of momentum equations, as highlighted by [51].
The software tool known as IncByPass affords users an alternative approach to calculating water quality within the context of the EPANET modeling framework. This alternative approach is underpinned by a proposed mixing model, which has been demonstrated in prior research to enhance the precision of concentration predictions in comparison to the default model employed by EPANET.
Utilizing IncByPass allows users to gain the capacity to seamlessly integrate their water quality calculations with EPANET, avoiding the cumbersome file downloading and import/export processes often associated with alternative software solutions. It is important to note that the utilization of IncByPass ensures that water distribution networks remain unaffected hydraulically, as confirmed through validation exercises involving both constant and variable consumption scenarios. This unaltered hydraulic integrity engenders a heightened level of trustworthiness in the ensuing water quality analyses.
The computational resources required for generating the IMM files exhibit significant time variability depending on the complexity of hydraulic networks. The measure of the time was made with the integrated function in MATLAB R2018b tic and toc. However, it used a system equipped with a 3.7 GHz processor, 5.5 GB RAM, and a 127 GB solid-state drive. These hardware specifications played a crucial role in the performance and the time required to obtain results. For relatively simple networks with a few CJs examples, the process can be completed within seconds, whereas for more intricate networks, such as the one incorporating 843 CJs components, it may extend to up to 10 h. It is noteworthy that the variability in result generation time is directly associated with the number of CJ components in the networks and the technical specifications of the utilized equipment. This time span encompasses various tasks, including network modification, step-by-step simulation, identification of mixing instances, control and pattern generation for integration into EPANET, and determination of initial concentrations to establish a representative model from the outset. Notably, the most intricate network, denoted as “net3,” which encompasses dual sources, pump controls, multiple storage tanks, diverse usage patterns, and 20% of nodes featuring CJ elements, underscores the disparities between the EPANET and IncByPass mixing models. It is imperative to compare the results following a specific number of days to attain a state of cyclic water quality behavior and discern the disparities within the final 24 h of consumption. During this validation process, it becomes evident that more than 40 days are requisite for the tank concentrations to stabilize at a consistent level.
It is significant to emphasize that the disparities between the mixing models of EPANET and IncByPass can exceed a relative error of 90% in certain locations. In both cases, under varying conditions, the concentration trends established by IncByPass circumvent the attainment of averaged concentrations that could otherwise lead to network homogeneity. The IncByPass model introduces the IMM, which furnishes an alternative approach to visualizing the simulation of disinfectant distribution within the network and aids in the strategic placement of sensors for pollutant detection. This capability significantly enhances the accuracy and efficacy of pertinent studies in this domain.
The outcomes are made attainable through the implementation of a software program named IncByPass, which has been meticulously crafted to facilitate water quality simulation, accounting for incomplete mixing within the EPANET framework. Importantly, this tool leverages the EPANET-MATLAB toolkit [52], a comprehensive collection of programming functions tailored to the EPANET programming environment, thereby streamlining the process of incorporating IncByPass into existing workflows.

Author Contributions

Conceptualization, D.H.C., J.A.A.N. and J.M.R.; methodology, D.H.C., J.A.A.N. and J.M.R.; software, D.H.C.; validation, D.H.C., J.D.P.S. and J.M.R.; formal analysis, D.H.C., J.A.A.N., H.M.R., X.D.G. and J.M.R.; investigation, D.H.C.; resources, J.A.A.N., H.M.R., X.D.G. and J.M.R.; data curation, D.H.C., J.D.P.S. and J.M.R.; writing—D.H.C. and J.M.R.; original draft preparation, D.H.C. and J.M.R.; writing—review and editing, J.A.A.N., H.M.R., X.D.G., J.D.P.S. and J.M.R.; visualization, J.D.P.S. and J.M.R.; supervision, J.A.A.N., H.M.R. and X.D.G.; project administration, J.M.R.; funding acquisition, H.M.R., X.D.G. and J.M.R. All authors have read and agreed to the published version of the manuscript.

Funding

The authors would like to thank CERIS for the funding support through the Foundation for Science and Technology through the funding UIDB/04625/2020, EAPA_0001/2022—HY4RES and the opportunity to develop this research.

Data Availability Statement

Data is contained within the article.

Acknowledgments

Water System Supply of Romita and Comisión Estatal del Agua of Guanajuato for sharing information for academic projects. Acknowledgment for the scholarship of CONAHCYT for the first and fifth authors and the SNI of CONAHCYT for the fourth and sixth authors.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Rossman, L.A. EPANET 2. User’s Manual; US Environmental Protection Agency: Cincinnati, OH, USA, 2000; p. 200. Available online: http://nepis.epa.gov/Adobe/PDF/P1007WWU.pdf (accessed on 7 December 2023).
  2. Van Bloemen, W.B.; Hammond, G.; Shadid, J.; Collis, S.; Murray, R. A comparison of Navier-Stokes and network models to predict chemical transport in municipal water distribution systems. In Proceedings of the World Water and Environmental Resources Congress. Impacts of Global Climate Change, Anchorage, AK, USA, 15–19 May 2005. [Google Scholar] [CrossRef]
  3. Webb, S.W. High-fidelity simulation of the influence of local geometry on mixing in crosses in water distribution systems. In Proceedings of the ASCE World Water & Environmental Resources Congress, Tampa, FL, USA, 15–19 May 2007. [Google Scholar] [CrossRef]
  4. Romero-Gomez, P.; Ho, C.K.; Choi, C.Y. Mixing at cross junctions in water distribution systems. I: Numerical study. J. Water Resour. Plan. Manag. 2008, 134, 285–294. [Google Scholar] [CrossRef]
  5. Ho, C.K.; Khalsa, S.S. EPANET-BAM: Water quality modeling with incomplete mixing in pipe junctions. In Proceedings of the Water Distribution Systems Analysis, Kruger National Park, South Africa, 17–20 August 2008. [Google Scholar]
  6. Song, I.; Romero-Gomez, P.; Choi, C.Y. Experimental verification of incomplete solute mixing in a pressurized pipe network with multiple cross junctions. J. Hydraul. Eng. 2009, 135, 1005–1011. [Google Scholar] [CrossRef]
  7. Andrade, M.A.; Rojano, F.; Romero-Gomez, P.; Choi, C.Y. Integrated water quality modeling of water distribution systems. In Proceedings of the Water Distribution Systems Analysis, Tucson, AZ, USA, 12–15 September 2010. [Google Scholar] [CrossRef]
  8. Liu, H.; Yuan, Y.; Zhao, M.; Zheng, X.; Lu, J.; Zhao, H. Study of Mixing at Cross Junction in Water Distribution Systems Based on Computational Fluid Dynamics. In Proceedings of the ICPTT 2011: Sustainable Solutions for Water, Sewer, Gas, and Oil Pipelines, Beijing, China, 26–29 October 2011. [Google Scholar] [CrossRef]
  9. Yu, T.C.; Shao, Y.; Shen, C. Mixing at cross joints with different pipe sizes in water distribution systems. J. Water Resour. Plan. Manag. 2014, 140, 658–665. [Google Scholar] [CrossRef]
  10. Shao, Y.; Yang, Y.J.; Jiang, L.; Yu, T.; Shen, C. Experimental testing and modeling analysis of solute mixing at water distribution pipe junctions. Water Res. 2014, 56, 133–147. [Google Scholar] [CrossRef] [PubMed]
  11. Mompremier, R.; Pelletier, G.; Mariles, Ó.A.F.; Ghebremichael, K. Impact of incomplete mixing in the prediction of chlorine residuals in municipal water distribution systems. J. Water Supply Res. Technol.—AQUA 2015, 64, 904–914. [Google Scholar] [CrossRef]
  12. Hernández-Cervantes, D.; Delgado-Galván, X.; Nava, J.L.; López-Jiménez, P.A.; Rosales, M.; Mora Rodríguez, J. Validation of a computational fluid dynamics model for a novel residence time distribution analysis in mixing at cross-junctions. Water 2018, 10, 733. [Google Scholar] [CrossRef]
  13. McKenna, S.A.; O’Hern, T.; Hartenberger, J. Detailed investigation of solute mixing in pipe joints through high speed photography. In Proceedings of the Water Distribution Systems Analysis, Kruger National Park, South Africa, 17–20 August 2008. [Google Scholar] [CrossRef]
  14. Ho, C.K.; O’Rear, L., Jr. Evaluation of solute mixing in water distribution pipe junctions. J. Am. Water Work. Assoc. 2009, 101, 116–127. [Google Scholar] [CrossRef]
  15. Choi, C.Y.; Shen, J.Y.; Austin, R.G. Development of a comprehensive solute mixing model (AZRED) for double-tee, cross, and wye junctions. In Proceedings of the Water Distribution Systems Analysis, Kruger National Park, South Africa, 17–20 August 2008. [Google Scholar] [CrossRef]
  16. Rossman, L.A. An overview of EPANET version 3.0. In Proceedings of the Water Distribution Systems Analysis, Tucson, AZ, USA, 12–15 September 2010. [Google Scholar] [CrossRef]
  17. Hernández Cervantes, D.; López-Jiménez, P.A.; Arciniega, N.J.A.; Delgado, G.X.; Jiménez, M.M.R.; Pérez-Sánchez, M.; Mora, R.J. Incomplete mixing model at cross-junctions in EPANET by polynomial equations. Water 2021, 13, 453. [Google Scholar] [CrossRef]
  18. Hernández, C.D.; Mora, R.J.; Delgado, G.X.; Ortiz, M.J.; Jiménez, M.M.R. Optimal use of chlorine in water distribution networks based on specific locations of booster chlorination: Analyzing conditions in Mexico. Water Sci. Techol. 2016, 16, 493–505. [Google Scholar] [CrossRef]
  19. Ewald, G.; Zubowicz, T.; Brdys, M.A. Multiprocessor implementation of parallel multiobjective genetic algorithm for optimized allocation of chlorination stations in drinking water distribution system-a new water quality model approach. IFAC Proc. Vol. 2013, 46, 123–128. [Google Scholar] [CrossRef]
  20. Meng, F.; Liu, S.; Auckenthaler, P.; Bai, L.; Wang, H.; Wu, X. Optimization of booster disinfection with backtracking algorithm. In Proceedings of the 1st International Conference on Consumer Electronics, Communications and Networks (CECNet), Xianning, China, 16–18 April 2011. [Google Scholar] [CrossRef]
  21. Hongxiang, W.; Wenxian, G.; Jianxin, X.; Hongmei, G. A hybrid PSO for optimizing locations of booster chlorination stations in water distribution systems. In Proceedings of the International Conference on Intelligent Computation Technology and Automation Changsha, Changsha, China, 11–12 May 2010. [Google Scholar] [CrossRef]
  22. Drewa, M.; Brdys, M.A. Optimized allocation of chlorination stations for integrated quantity and quality control in drinking water distribution systems. IFAC Proc. Vol. 2007, 40, 73–78. [Google Scholar] [CrossRef]
  23. Kurek, W.; Brdys, M.A. Optimised allocation of chlorination stations by multi-objective genetic optimisation for quality control in drinking water distribution systems. IFAC Proc. Vol. 2006, 39, 232–237. [Google Scholar] [CrossRef]
  24. Alcocer-Yamanaka, V.H.; Tzatchkov, V.G.; Arreguín-Cortés, F.I. Modelo de calidad del agua en redes de distribución. Ing. Hidraul. Mex. 2004, 19, 77–88. Available online: http://repositorio.imta.mx/handle/20.500.12013/743 (accessed on 7 December 2023).
  25. Afzali, A.S.; Jafari-Asl, J.; Banifakhr, E.; Houssein, E.H.; Ben Seghier, M.E.A. Risk-Based Design Optimization of Contamination Detection Sensors in Water Distribution Systems: Application of an Improved Whale Optimization Algorithm. Water 2023, 15, 2217. [Google Scholar] [CrossRef]
  26. Piazza, S.; Sambito, M.; Freni, G. Analysis of optimal sensor placement in looped water distribution networks using different water quality models. Water 2023, 15, 559. [Google Scholar] [CrossRef]
  27. Brentan, B.M.; Carpitella, S.; Izquierdo, J.; Montalvo, I. Multi-objective, rule and preference-based placement of quality sensors in water supply networks. IFAC-Pap. 2022, 55, 482–489. [Google Scholar] [CrossRef]
  28. Tsitsifli, S.; Kanakoudis, V. Identification of Suitable Locations in a Small Water Supply Network for the Placement of Water Quality Sensors Based on Different Criteria under Demand-Driven Conditions. Water 2022, 14, 2504. [Google Scholar] [CrossRef]
  29. Marlim, M.S.; Kang, D. Optimal water quality sensor placement by accounting for possible contamination events in water distribution networks. Water 2021, 13, 1999. [Google Scholar] [CrossRef]
  30. Nikolopoulos, D.; Ostfeld, A.; Salomons, E.; Makropoulos, C. Resilience assessment of water quality sensor designs under cyber-physical attacks. Water 2021, 13, 647. [Google Scholar] [CrossRef]
  31. Shahra, E.Q.; Wu, W.; Gomez, R. Human Health Impact Analysis of Contaminant in IoT-Enabled Water Distributed Networks. Appl. Sci. 2021, 11, 3394. [Google Scholar] [CrossRef]
  32. Ciaponi, C.; Creaco, E.; Di Nardo, A.; Di Natale, M.; Giudicianni, C.; Musmarra, D.; Santonastaso, G.F. Reducing impacts of contamination in water distribution networks: A combined strategy based on network partitioning and installation of water quality sensors. Water 2019, 11, 1315. [Google Scholar] [CrossRef]
  33. Nono, D.; Basupi, I. Robust booster chlorination in water distribution systems: Design and operational perspectives under uncertainty. J. Water Supply Res. Technol.—AQUA 2019, 68, 399–410. [Google Scholar] [CrossRef]
  34. Palleti, V.R.; Kurian, V.; Narasimhan, S.; Rengaswamy, R. Actuator network design to mitigate contamination effects in water distribution networks. Comput. Chem. Eng. 2018, 108, 194–205. [Google Scholar] [CrossRef]
  35. Taormina, R.; Galelli, S.; Tippenhauer, N.O.; Salomons, E.; Ostfeld, A.; Eliades, D.G.; Aghashahi, M.; Sundararajan, R.; Pourahmadi, M.; Banks, M.K.; et al. Battle of the attack detection algorithms: Disclosing cyber attacks on water distribution networks. J. Water Resour. Plan. Manag. 2018, 144, 04018048. [Google Scholar] [CrossRef]
  36. Xuesong, Y.; Jie, S.; Chengyu, H. Research on contaminant sources identification of uncertainty water demand using genetic algorithm. Clus Comp. 2017, 20, 1007–1016. [Google Scholar] [CrossRef]
  37. Rathi, S.; Gupta, R. Optimal sensor locations for contamination detection in pressure-deficient water distribution networks using genetic algorithm. Urban Water J. 2017, 14, 160–172. [Google Scholar] [CrossRef]
  38. Rathi, S.; Gupta, R. A simple sensor placement approach for regular monitoring and contamination detection in water distribution networks. KSCE J. Civ. Eng. 2016, 20, 597–608. [Google Scholar] [CrossRef]
  39. Zeng, D.; Gu, L.; Lian, L.; Guo, S.; Yao, H.; Hu, J. On cost-efficient sensor placement for contaminant detection in water distribution systems. IEEE Trans. Industr Inform. 2016, 12, 2177–2185. [Google Scholar] [CrossRef]
  40. Rathi, S.; Gupta, R. A critical review of sensor location methods for contamination detection in water distribution networks. Water Qual. Res. J. Canada 2015, 50, 95–108. [Google Scholar] [CrossRef]
  41. Di Nardo, A.; Di Natale, M.; Musmarra, D.; Santonastaso, G.F.; Tzatchkov, V.; Alcocer-Yamanaka, V.H. A district sectorization for water network protection from intentional contamination. Procedia Eng. 2014, 70, 515–524. [Google Scholar] [CrossRef]
  42. Rathi, S.; Gupta, R. Monitoring stations in water distribution systems to detect contamination events. ISH J. Hydraul. Eng. 2014, 20, 142–150. [Google Scholar] [CrossRef]
  43. Schwartz, R.; Lahav, O.; Ostfeld, A. Integrated hydraulic and organophosphate pesticide injection simulations for enhancing event detection in water distribution systems. Water Res. 2014, 63, 271–284. [Google Scholar] [CrossRef] [PubMed]
  44. Alvisi, S.; Franchini, M.; Gavanelli, M.; Nonato, M. Near-optimal scheduling of device activation in water distribution systems to reduce the impact of a contamination event. J. Hydroinform. 2012, 14, 345–365. [Google Scholar] [CrossRef]
  45. Janke, R.; Murray, R.; Haxton, T.M.; Taxon, T.; Bahadur, R.; Samuels, W.; Morley, K. Threat Ensemble Vulnerability Assessment-Sensor Placement Optimization Tool (TEVA-SPOT) Graphical User Interface User’s Manual; US EPA National Homeland Security Research Center (NHSRC): Cincinnati, OH, USA, 2012; p. 115. Available online: https://cfpub.epa.gov/si/si_public_record_report.cfm?Lab=NHSRC&subject=Homeland%20Security%20Research&dirEntryId=257684 (accessed on 7 December 2023).
  46. Weickgenannt, M.; Kapelan, Z.; Blokker, M.; Savic, D.A. Risk-based sensor placement for contaminant detection in water distribution systems. J. Water Res. Plan. Man. 2010, 136, 629–636. [Google Scholar] [CrossRef]
  47. Preis, A.; Ostfeld, A. Multiobjective contaminant response modeling for water distribution systems security. J. Hydroinform. 2008, 10, 267–274. [Google Scholar] [CrossRef]
  48. Paez, N.; Saldarriaga, J.; Bohorquez, J. Water quality modeling considering incomplete mixing in extended periods. Proc. Eng. 2017, 186, 54–60. [Google Scholar] [CrossRef]
  49. CEAG. 22 Diagnóstico Sectorial de Agua Potable y Saneamiento 2019; Comisión Estatal del Agua de Guanajuato: Guanajuato, Mexico, 2019.
  50. Avesani, D.; Righetti, M.; Righetti, D.; Bertola, P. The Extension of EPANET Source Code to Simulate Unsteady Flow in Water Distribution Networks with Variable Head Tanks. J. Hydroinform. 2012, 14, 960–973. [Google Scholar] [CrossRef]
  51. Todini, E. Extending the Global Gradient Algorithm to Unsteady Flow Extended Period Simulations of Water Distribution Systems. J. Hydroinform. 2010, 13, 167–180. [Google Scholar] [CrossRef]
  52. Eliades, D.G.; Kyriakou, M.; Vrachimis, S.; Polycarpou, M.M. EPANET-MATLAB Toolkit: An Open-Source Software for Interfacing EPANET with MATLAB. In Proceedings of the 14th International Conference on Computing and Control for the Water Industry, Amsterdam, The Netherlands, 7–9 November 2016. [Google Scholar] [CrossRef]
Figure 1. Segments of pipes in quality steps during a simulation in EPANET.
Figure 1. Segments of pipes in quality steps during a simulation in EPANET.
Water 15 04253 g001
Figure 2. Model of S12PE to obtain the outlet concentration at CJs.
Figure 2. Model of S12PE to obtain the outlet concentration at CJs.
Water 15 04253 g002
Figure 3. Implementation of auxiliary nodes and bypasses at the CJs.
Figure 3. Implementation of auxiliary nodes and bypasses at the CJs.
Water 15 04253 g003
Figure 4. Cases of mixing for two inlets and outlets contiguous.
Figure 4. Cases of mixing for two inlets and outlets contiguous.
Water 15 04253 g004
Figure 5. Activation of the bypass assigning the incomplete mixing at the CJ outlets.
Figure 5. Activation of the bypass assigning the incomplete mixing at the CJ outlets.
Water 15 04253 g005
Figure 6. Flowchart of the code of IncByPass.
Figure 6. Flowchart of the code of IncByPass.
Water 15 04253 g006
Figure 7. Networks IM1.net (a) and IM2.net (b) for the application and validation of IncByPass.
Figure 7. Networks IM1.net (a) and IM2.net (b) for the application and validation of IncByPass.
Water 15 04253 g007
Figure 8. Mixing results from the EPANET model and the S12PE.
Figure 8. Mixing results from the EPANET model and the S12PE.
Water 15 04253 g008
Figure 9. Function of a Bypass at the CJ.
Figure 9. Function of a Bypass at the CJ.
Water 15 04253 g009
Figure 10. Comparison between EPANET mixing and incomplete mixing in IM2.net.
Figure 10. Comparison between EPANET mixing and incomplete mixing in IM2.net.
Water 15 04253 g010
Figure 11. Difference in the concentration and the relative error compared to the IMM. Seven nodes are not considered here.
Figure 11. Difference in the concentration and the relative error compared to the IMM. Seven nodes are not considered here.
Water 15 04253 g011
Figure 12. Network Net3.net for the application and validation of IncByPass for variable consumption.
Figure 12. Network Net3.net for the application and validation of IncByPass for variable consumption.
Water 15 04253 g012
Figure 13. Pattern for concentration on the node Naux189-4 injected like source quality.
Figure 13. Pattern for concentration on the node Naux189-4 injected like source quality.
Water 15 04253 g013
Figure 14. Modification of the demand patterns of the network to obtain 288 multipliers.
Figure 14. Modification of the demand patterns of the network to obtain 288 multipliers.
Water 15 04253 g014
Figure 15. Example of the CJ resulting from the INP code to incorporate the incomplete mixing.
Figure 15. Example of the CJ resulting from the INP code to incorporate the incomplete mixing.
Water 15 04253 g015
Figure 16. Comparison between NET3.net and Net3_INC.net for flow rate for three pipes (furthest from the sources).
Figure 16. Comparison between NET3.net and Net3_INC.net for flow rate for three pipes (furthest from the sources).
Water 15 04253 g016
Figure 17. Comparison of the pressure in tanks 1, 2 and 3 of the NET3.net and NET3_INC.net.
Figure 17. Comparison of the pressure in tanks 1, 2 and 3 of the NET3.net and NET3_INC.net.
Water 15 04253 g017
Figure 18. Comparison at the end time of 10 days of flow rates of some pipes and its absolute error.
Figure 18. Comparison at the end time of 10 days of flow rates of some pipes and its absolute error.
Water 15 04253 g018
Figure 19. Controls for the activation of the pipes at the CJ 119.
Figure 19. Controls for the activation of the pipes at the CJ 119.
Water 15 04253 g019
Figure 20. Concentration in tanks and a comparison between the two mixing models.
Figure 20. Concentration in tanks and a comparison between the two mixing models.
Water 15 04253 g020
Figure 21. Comparison between EPANET mixing (a) and IMM of 843 CJs (b).
Figure 21. Comparison between EPANET mixing (a) and IMM of 843 CJs (b).
Water 15 04253 g021
Figure 22. Junctions with major differences of concentration in the network of 843 CJs.
Figure 22. Junctions with major differences of concentration in the network of 843 CJs.
Water 15 04253 g022
Figure 23. Difference of the concentration and relative error in the network of 843 CJs.
Figure 23. Difference of the concentration and relative error in the network of 843 CJs.
Water 15 04253 g023
Figure 24. Comparison between EPANET mixing and IMM in Romita.net.
Figure 24. Comparison between EPANET mixing and IMM in Romita.net.
Water 15 04253 g024
Figure 25. Junctions with major differences of concentration in the Romita network.
Figure 25. Junctions with major differences of concentration in the Romita network.
Water 15 04253 g025
Figure 26. Difference of the concentration and relative error in the Romita network.
Figure 26. Difference of the concentration and relative error in the Romita network.
Water 15 04253 g026
Table 1. Sections of Input file format on EPANET.
Table 1. Sections of Input file format on EPANET.
Network
Components
System
Operation
Water
Quality
Options and
Reporting
Network
Map/Tags
TitleCurvesQualityOptionsCoordinates
Junctions *Patterns *Reactions *Times *Vertices
ReservoirsEnergySources *ReportLabels
TanksStatusMixing Backdrop
Pipes *Controls * Tags
PumpsRules
ValvesDemands
Emitters
Note: * Sections modified by the IncByPass to incorporate the IMM.
Table 2. Change in calculation times for application with IncByPass.
Table 2. Change in calculation times for application with IncByPass.
Time Parameters in EPANETDefault Values in EPANET (h)Times Modification in IncByPass (h)
Hydraulic Time Step1:000:05 *
Quality Time Step0:050:05
Pattern Time Step1:000:05 *
Reporting Time Step1:001:00
Note: * Values changed by IncByPass.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Hernández Cervantes, D.; Arciniega Nevárez, J.A.; Ramos, H.M.; Delgado Galván, X.; Pineda Sandoval, J.D.; Mora Rodríguez, J. EPANET INP Code for Incomplete Mixing Model in Cross Junctions for Water Distribution Networks. Water 2023, 15, 4253. https://doi.org/10.3390/w15244253

AMA Style

Hernández Cervantes D, Arciniega Nevárez JA, Ramos HM, Delgado Galván X, Pineda Sandoval JD, Mora Rodríguez J. EPANET INP Code for Incomplete Mixing Model in Cross Junctions for Water Distribution Networks. Water. 2023; 15(24):4253. https://doi.org/10.3390/w15244253

Chicago/Turabian Style

Hernández Cervantes, Daniel, José Antonio Arciniega Nevárez, Helena M. Ramos, Xitlali Delgado Galván, Joseph Daniel Pineda Sandoval, and Jesús Mora Rodríguez. 2023. "EPANET INP Code for Incomplete Mixing Model in Cross Junctions for Water Distribution Networks" Water 15, no. 24: 4253. https://doi.org/10.3390/w15244253

APA Style

Hernández Cervantes, D., Arciniega Nevárez, J. A., Ramos, H. M., Delgado Galván, X., Pineda Sandoval, J. D., & Mora Rodríguez, J. (2023). EPANET INP Code for Incomplete Mixing Model in Cross Junctions for Water Distribution Networks. Water, 15(24), 4253. https://doi.org/10.3390/w15244253

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop