Chlorine Decay Modeling in a Water Distribution Network in Mohammedia City, Morocco

Water quality modeling has become a recurring request from drinking water network managers, due to regulatory changes but also to contribute to all users’ satisfaction with the taste of the water. The objective of this research project is to provide network managers, both for the understanding of the phenomena studied and for the technical valuation of the approaches considered, with a new methodology to develop a predicting method for free residual chlorine concentrations using an accurate hydraulic model. The development of the chlorines model needed knowledge of the network’s hydraulic behavior. The model established can be used in a proactive and daily mode of operation. It is helpful to show the quality of drinking water, particularly chlorine concentration, during peak demand and the lowest demand times before it is found in the distribution network’s district hydraulic part. Based on the results of this simulation, we have identified a low content of free chlorine in the cast iron pipes due to the high consumption of chlorine by the ferrous ions (Fe 2+ ), which generates a significant vulnerability among con - sumers. The outcomes demonstrated that utility managers may more easily optimize residual chlorine in sizable water distribution networks using the suggested approach.


INTRODUCTION
In order to ensure compliance with drinking water regulations and for the health of consumers, it is crucial to provide people with adequate supplies of safe quality and quantity through storage tanks and pipes of diverse materials between sources and consumers. The sustainability of the work and the resource's availability in the natural environment are both harmed by low-quality networks.
Chlorine is used as a disinfectant in the treatment of drinking water and is currently the most widely used product for this purpose, as well as the most effective for the elimination of pathogenic germs and the safety of the transport of water in pipelines. It prevents the multiplication of germs (bacteria and viruses) in water distribution pipes, from treatment plants to consumer taps (Yang et al., 2009). There are also more techniques for purifying water, such as (i) sodium hypochlorite (ii) chlorine (iii), dioxide (iv), ozone, and ultraviolet light (UV). However, the water distribution networks (WDN) currently uses chlorine as its primary disinfectant. The use of chlorine in the WDN reduces microbial contamination between the water treatment facility and the user (Hall et al., 2009). The chlorine introduced into the drinking water networks is consumed primarily by organic matter to give combined chlorine (chlorinated compounds such as chloramines, trihalomethanes, etc.). These compounds are then destroyed by the addition of chlorine (breaking point). Chlorination to the breaking point results in the complete disappearance of ammonia.

Chlorine Decay Modeling in a Water Distribution Network in Mohammedia City, Morocco
Any absence of chlorine in the necessary quantity entrains the increase of the bacterial density at the level of biofilm on the internal walls of the pipe, which in turn engenders the decrease of the section of passage of the water and afterward the conveyance of the pipes (Lehtola et al., 2006).
The residual chlorine in the water supply system is reduced in the bulk water as well as in the pipes and surface walls, including the storage tanks located along the distribution system. Therefore, evaluating the wall and the coefficients for bulk decay must be done separately in the water quality models for chlorine reduction (Philip et al., 2008).
The operators of the networks of drinking water are sensible in ensuring a satisfying service based on the plans' availability and quality of the water. The complexity of the functioning of these networks makes this a difficult task. In the face of these difficulties, the development of tools for good hydraulic management and the quality of these networks is imperative.
This paper is mainly focused on the design of a hydraulic model and the quality of the distribution networks of WDN, taking into consideration the degradation of the chlorine in the network. This degradation is the result of two phenomena: (i) the water-related consumption of chlorine; and (ii) the consumption of chlorine related to the microfilms that develop on pipes.
By identifying problem areas and likely causes of non-conformities, as well as by implementing technical solutions that can be tested through modelling, chlorine quality modelling aims to be able to put in place the necessary means to meet the health objective in the network sectors where maintaining a chlorine residual is very challenging (Seyoum et al., 2014).
This research project is focused on the application of an EPANET model, coupled with a water quality model; this study should help distribution network managers to identify areas of vulnerability for customers where residual chlorine concentration is lower than local regulations.

Software
The US Environmental Protection Agency created the open-source programme known as EP-ANET (EPA). It enables the hydraulic balancing of the network by computing pressure losses, flow velocity, flow in the pipes, and pressure at the nodes from the representation of the distribution network (nodes, pipes, tanks, valves, pumps, etc.). Chlorine decay is one of the most common techniques for modeling water quality. EPANET software packages have a predefined set of water qualities that can be used to model chlorine decay due to bulk decomposition and a decay coefficient in the wall (Rossaman, 2000).

The study area
The study area is situated in pressure stage 82 of the city of Mohammedia in Morocco; the map in Figure 1 shows the district area of the pressure stage. The WDN has approximately 1000 nodes, with a total length of 154 km for the WDN system. The WDN consists mainly of 54% cast iron pipe, as shown in Figure 2. The structural condition of the network was assessed as moderately degraded with a potentially high obstruction rate (70%). The zone is fed by 2 entry points (pipes of diameter 600 and 800). With two separate flow meters, each with a diameter of 400, the zone's two inlets are well-hydraulically controlled. A review of past network interventions and customer complaints in this industry reveals that there are 1.62 leakage complaints and 1.1 complaints about colored water for every kilometre of cast iron pipe, respectively.
The DN 600 entry point was shut down for the duration of the study in order to ensure that water was only supplied through the DN 800 point and to regulate the water quality in the study region.
Three sampling points were chosen from the study region in order to assess the effects of the device and gauge its effectiveness. We were able to calculate the residual levels of free chlorine in a few communities thanks to the sampling efforts. The pH, temperature, conductivity, and other ions were measured in order to determine the water's quality. Conductivity tests confirmed that the water originated from the Mohammedia City's distribution system. Table 1 presents the outcomes.

Chlorine consumption in the network
It is commonly considered that the degradation of chlorine in a network is the result of two phenomena: (i) consumption of chlorine related to water; (ii) the consumption of chlorine linked to the microfi lms that develop on the pipes. These two phenomena of consumption linked to corrosion may eventually overlap. Thus, according to the previous studies (Monteiroa et al., 2014), it is considered that the decrease in the concentration of chlorine over time follows a decreasing exponential law (Eq. 1): where: [Cl 2 ] -chlorine concentration, K b -the bulk decay rate coeffi cient (hour -1 ), K w -the wall reaction rate coeffi cient (hour -1 ), t -residence time with the kinetics waters and network.
The disappearance of the chlorine due to the reactions in the water is modeled by the calibration of the K b coeffi cient. The reactions on the internal walls of the conductors are approached by the calibration of K w coeffi cient (Powel et al., 2000).
In general, a global coeffi cient K like that in (Eq. 2) is used to calculate the global chloride degradation: Table 2 shows the values of decay constants related to water obtained in certain sectors. Note that from one measurement campaign to another, the values obtained for this constant can be very variable. It depends on the temperature of the water and the concentration of total organic carbon (TOC) (Ababu et al., 2019). Table 3 illustrates a few orders of magnitude by determining the maximum remanence time of free chlorine beginning with a given injection concentration.
The ideal and safe chlorine residual in a small, communal water supply is between 0.2 and 0.5 mg/L, as determined by the World Health Organization (WHO, 2011).   It must fall between 0.1 and 1.0 mg/L on the Moroccan distribution system. Distributors must receive water from producers that has a concentration of 0.5-1.0 mg/L. The Moroccan standard NM03.7.001 serves as the source for these values.
The network administrators in this zone initially maintain 0.9 mg/L of chlorine.
In our example, if a flow rate of 200 L/s with a concentration of 0.9 mg/L exits the tank, we will have: 200 L/s · 0.9 mg/L = 180 mg/s or 15.5 kg/d of chlorine leaving the tank.

Quality modeling methodology
Chlorine modelling is primarily divided into three steps, according to Ohara et al. (2015): • Phase 1: measurement campaign -includes a chlorine measurement campaign with an adjusted hydraulic measurement campaign. The precise dynamics of water are also understood at this time. • Phase 2: hydraulic adjustment -entails changing the hydraulic model's flow to replicate the network's demands during the chlorine measurement campaign. • Phase 3: chlorine setting -entails tracing the history of the network and identifying the kinetics of chlorine disappearance unique to each network based on its components, pipe ages, and hydraulic working regimes.

Calibration of the models (Daily Demand Curves)
The need for water varies greatly during the day. Therefore, to make the simulation more useful while analyzing a prolonged simulation time, this research selected a regular curve that changes periodically during the day. The curve in Figure 3 shows how water consumption changes throughout a day (which consists of 24 hours) and provides the highest demand factors as multipliers that can be used to increase the average base demand at any particular period. The model's calibration was flawless. By contrasting the measured and simulated pressures and flows, it was examined and validated. The outcomes are displayed in Figures 4 and 5. Figure 5 shows a comparison of data from models and measurements taken in the study area at the main flow inlet and the critical pressure point sensor. The measured pressure is represented by the green squares, whereas the simulated pressure is shown as a red line in EPANET. The comparison demonstrates that the model is calibrated and prepared for simulation because the simulation results are quite similar to the measurements. As illustrated in Figure 6, the calibration is also performed against chlorine, and the chlorine simulation's outcome (red line) is quite similar to the measurement in the green shape.
Chlorine calibration is performed after the hydraulic adjustment of the model. It is advisable to integrate, in the same way as the measurements of flow rates, levels, and pressures, the occasional and continuous measurements of chlorine obtained during the measurement campaign for the nodes chosen in the model.
The duration of the chlorine measurements should be adjusted considering, on the one hand, the change in chlorine concentrations at the source points and, on the other hand, the residence times (WHO, 2011). It should be kept in mind that the concentration of chlorine observed at a point is the result of the history of the operation of the network from the point of injection. Thus, to model the    chlorine concentration at a point in the network, it is necessary to have monitoring of the concentrations and injection rates over a suffi ciently long history. As a result, actual data of chlorine residuals in supply systems must be used to calibrate the decay model parameters in water quality modeling software like EPANET (Mays, 2011). It is required to collect chlorinated water from various sources supplying the network in order to calculate the kinetics of chlorine disappearance in addition to its interaction with the biofi lm that is already present on the interior surface of the pipes. To calculate the decrease in chlorine as a function of time in an environment protected from climatic aggression, a laboratory must determine the own water kinetics for each source (Hallam et al., 2002).
The employed chlorine modeling methodology is summarized in Figure 7. A negative exponential equation connecting the starting concentration and residence time with the water and network kinetics is the one used by the chemical model (Eq. 1).

RESULTS AND DISCUSSION
It is required to collect chlorinated water from the various sources supplying the network in order to calculate the kinetics of chlorine disappearance without interfering with the biofi lm that is already present on the interior surface of the pipes. In order to calculate the decrease of chlorine as a function of time in an environment shielded from climatic aggressions, a laboratory must determine the water kinetics for each source.
The network manager's methodological approach entails using an exponential regressive technique to take into account the kinetics of chlorine elimination in order 1. The following factors can aff ect measurement accuracy: (i) the technology utilised; (ii) the operator; and (iii) the object sampled -is it mains water or service water?
A point that is notoriously far from the regression line must be excluded from the fi t, especially if it is at one end of the line, because the linear fi t must account for measurement uncertainties. In the fi rst approach, an error of the order of 10% on the measurement can be taken into consideration. After the modifi cation is done, it must then be statistically tested to verify its applicability: (i) a test to see if the regression is signifi cant, (ii) a confi dence interval for the slope of the regression. Figure 8 shows a linear regression with a 90% confi dence interval for the slope of the line. In this case, the resulting value of the water-specifi c disappearance coeffi cient is 0.0828 h -1 , with a 90% The semi-log scale concentration logarithms against time on the x-axis in hours were used to illustrate the residual chlorine concentrations recorded at various time intervals following dosing. The figure displays the results. The charts show that the data often fit a well-known first-order decay rate model. 0.9834 is the R 2 determination coefficient. It is also crucial to remember that the coefficient of determination is strong for low initial concentrations compared to large initial concentrations. It is advantageous for the use of first order modelling since dosage rates are consistently low for treated water sources.

Water age simulation
It should be noted that simulation timeframes for chlorine quality modeling are typically longer than those for hydraulic simulations since it frequently takes several days to "stabilise" the residence time throughout an oscillatory cycle. Increasing the number of hydraulic periods is not helpful for this aim, though. EPANET can link a single hydraulic calculation over a 24-hour period to a chain of quality calculations over n days.
The concept of Water Age refers to the residence time of water in the distribution system. The studies of (Clark and Haught, 2005) show that water quality decreases over the network, and as the water's residence time increases, it is difficult to maintain residual chlorine for long periods of water residence. This correlation between the water age and chlorine concentration in a network node is shown in Figure 9.
Because there are too many connections in the network, the water has a shorter residence period, which allows organic matter to grow and interact with the chlorine, resulting in very low chlorine residuals (blue line) on the curve. Figure 10 shows the chlorine content in the network as simulated by EPANET during the busiest time of the day. The figure demonstrates that there are areas of the network where the chlorine concentration is less than the 0.2 mg/L level advised by the World Health Organization (WHO, 2011). Despite the fact that flow is at its highest during peak hours, the network's water velocity is higher, ensuring efficient transfer of chlorine during peak consumption times. This was regrettably not the case.

Chlorine concentration in the network
The zones of low chlorine concentration (less than 0.2 mg/L) increase the risk of microorganism proliferation in the WDN systems. According to Seyoum et al. (2014), the wall decay coefficient varies depending on pipe material and condition.
According to Mohamed et al. (2011), there is evidence that with pipe age, the same process of increasing pipe roughness will also lead to an increase in the reactivity of the pipe wall to certain chemicals (such as chlorine and other disinfectants), which indicates the rate of chlorine decay tends to increase as the roughness of the pipe increases. Internal corrosion processes cause the wall to weaken, increasing the risk of perforation and breakage as well as the development of pustules on the pipe's internal wall. At the same level of corrosion, the blockage of the pipe increases as the internal diameter decreases (Clark and Rossman, 1995).
The SIG criteria demonstrate that the cast iron pipes, mostly grey, are signifi cantly damaged based on the diagnoses made by the distribution managers. The obstruction reduces the hydraulic effi ciency of the network and raises pressure drop losses; this can also lead to a lack of water quality management.
Therefore, the age and composition of the pipe can aff ect the wall response coeffi cient.In this instance, a state like this may be caused by the presence of substances that readily oxidise and consume chlorine, indicating that the chlorine requirement has not been suffi ciently met (Vincenzo et al., 2018). The network's consumption of free chlorine is due to the recurrent phenomenon of degradation brought on by some contact with the distribution materials. In our case study, the areas with low chlorine content during peak demand hours are centred in the areas with a predominance of cast iron pipes (Fig.  8). Regardless of the oxygen content and pH of the water, according to research by Vasconcelos et al. (1996) and Tonev et al. (2020) in the case of cast iron pipes, a signifi cant portion of the free chlorine is devoured by ferrous ions (Fe 2+ ) in the form of hypochloric acid (HCIO).
In the case of cast iron pipes, it should be noted that free chlorine consumption in the biofi lm is negligible. Indeed, by the biofi lm, free chlorine consumption by ferrous ions is much faster and more complete than that (Vascancelos et al., 1996). Figure 11 shows the density of ductile iron pipes in the study area.
Chlorine concentration trends at two separate nodes during the simulated time period are shown in Figure 12. In contrast to the chlorine concentrations in ductile iron pipes, Figure 12 demonstrates that chlorine concentrations in plastic pipes like PVC are high and safe.
In contrast to the concentration seen at the ductile iron pipes, the green fi gure demonstrates that the network's chlorine concentration in plastic material remains above the 0.2 mg/L needed by the World Health Organization (WHO, 2011) and Moroccan requirements (red plot).
Given the extent of chlorine degradation highlighted, a strengthened renewal programme for grey cast iron pipes is essential to limiting the process of water quality degradation.

CONCLUSIONS
In order to calculate the chlorine residuals required to ensure compliance with water quality criteria, the decay of chlorine in distribution systems must be modeled. Many widely used models, such as EPANET, require accurate input of mass decay coeffi cients, which are often determined experimentally. In order to forecast the chlorine concentration in the various materials of the distribution network for this study, a water  . Density of ductile iron pipes in the study areas quality model was constructed using the hydraulic model of the distribution network. According to the results of the modeling, pipes made of ironcast material have a substantial reduction in free chlorine. Compared to plastic materials, ductile iron pipes need a substantial amount of chlorine.
As a result, it is possible to identify consumer vulnerability areas when chlorine concentrations are less than 0.2 mg/L and to adjust to new drinking water network plans and approaches that aim to lower the size of the network. Rechlorination in areas with very low chlorine concentrations seems to be the most obvious of these. The simulation tool used by EPANET has proven to be effective in simulating the processes that lead to water distribution system quality decline. The experiment should be replicated in other ways, especially to talk about the impact of switching from cast-iron to plastic pipes on elevating chlorine concentrations.