Modeling of the Chlorine Content Degradation in a Network of Drinking Water

In an urban water supply network, the chlorine is used as a disinfectant. Its absence involves the risk of microbial contamination which can degrade the quality of water. According to the standards of World Health Organization, the residual chlorine content in water shouldn’t be lower than 0.25 mg/l. Chlorine reacts with many compounds and thus undergoes degradation throughout its transit in the conduct of the network. This degradation is the result of several physical factors (age of conduct, matter, flow, speed...) and bacteriological (germs, coliform, biofilm...). In this paper, we use a mathematical model for mapping the degradation of the Chlorine along the water supply network. The concentration of chlorine in each control is also performed. We used an algorithm of Hierarchical Classification taking into account some characteristics (nature of conduct, speed, flow). Results shows that degradation of Chlorine calculated matched well with the measured one. This model allowed us to have a real-time data about the Chlorine content and thus to overcome the problem of the measure of the chlorine due to the non accessibility of the conducts.


Introduction
The water distribution services must comply with international quality standards adopted by the World Health Organization (WHO) which set the critical values of tolerance related to chemical and biological compounds.Faced to these quality requirements, and prior to mass distribution, the water undergoes special treatment whose main operations are: -Aeration to remove tastes and odors; -Filteration to remove algae and suspended particles; -Sterilization by chlorination and / or ozone treatment to eliminate all forms of microbial life.
All these treatments are made, in post distribution, in storage tanks.The evaluation of the quality of the water during its distribution is determined by taking specimens, as possible, at the level of various nodes of the distribution network.This analysis, often outstanding, concerns several parameters like turbidity, chemical composition, content in chlorine, bacterial population, etc.The causes of degradation of the rate of the chlorine along the network are numerous.It depends at first, to the physico-chemical and microbiological quality of the water produced in treatment plant, and then, to the nature of materials placed on touch with the water during its transport, and also to the properties of pipes (material, age, diameter, flow rate, etc.).However, it turns out that the bacterial growth on the walls of the distribution networks is one of the main of germ contamination of the water, which is at the origin of some diseases like typhoid fever, cholera or the bacillary dysentery (Crittenden, Trussel, Hand, Howe, & Tchbanoglous, 2005).Indeed, the percentage of active bacteria in network constitutes about 3.6 % against 0.3 % at the exit of the treatment plants which is 12 times higher.
All company working in a water supply distribution system requires a perfect knowledge of the distribution of the content of chlorine in every point of the network.To reach this end they have to mobilize, in every hour, a significant number of technicians and materials to perform measurements.But sometimes it is unable to access a conduct due to the complexity of the network.
In this article, we describe developement of software based on a mathematical model of degradation of chlorine in pipes; this software allows calculating the rate of the chlorine in every point of the network in an optimal way, without calling the technicians and the logistics for it.First, we are going to approach all the algorithms of the classification "k means" to classify all the conducts of the network in classes has base of resemblance.Afterward we are going to install "k" sensors on "k" conducts by "k" classes; these conducts are accessible in taking specimens for the calculation of the rate of the remaining residual chlorine.This rate of the residual chlorine is the same for every conducts of this class.

Modeling of the Degradation of the Chlorine Content in the Network
The chlorine is a chemical element (symbol Cl) belonging to the group of halogens and the atomic mass of which is 35,457 (Santé Canada, 2009) reacts with many compounds and thus undergoes, degradation throughout its transit in the conducts of the network.
The majority of the models published in the literature consider that the degradation of chlorine follows kinetics for the first order to obtain (Andréanne Simard, 2008).The assessment of the chemical reactions of the chlorine with all the compounds (Wable, Dumoutier, Duguet, Jarrige, Gelas, & Depierre, 1991) presents in the distribution network is written as: (1) Where: -Cl 2 is the concentration of the free chlorine in the water; -P the compound reacting with the chlorine; -Cl and P-Cl are products resulting from the reaction.
The reaction rate of the chlorine consumption is written as: (2) Where represent the constant kinetics of reaction of chlorine with the reacting products.This speed depends on the temperature, on the nature of products and on the type of the chlorine (HClO or ClO-).
The integration of the equation (2), gives: (3) The equation (3) can be transformed to obtain (Andréanne Simard, 2008): (4) As the concentration in compounds reacting with the chlorine is generally unknown, we introduce a constant visible kinetics K of the first order (Munavalli & Mohan Kumar, 2005), named: constant of degradation.It is expressed by: We replace KcL 2 P (P) by k, the equation (4) becomes: (5) Two essential parameters, the factor of degradation K and the residence time ts, appear in this expression.The relation (4) will be used to calculate the decrease of the chlorine in the whole of the conducts of the distribution network compared with a state of well determined functioning.

Residence Time
The transit time of the water from the storage tank to the consumer, depends on the demand of the subscribers and consequently on the diet of functioning of the distribution network.Indeed, the low speed of flow and long residence time of the water increase the consumption of the chlorine and the microbial growth (Le Chevallier, 1990).We distinguish three slices of consumption: (figure 1) -Hollow phase: characterized by a low demand, and it is generally situated at night; -Advanced phase: where the demand is very important in the middle of the day; -Intermediate phase: connect previous both diets.It is characterized by an average consumption.The evolution of the microbiological quality within the network of drinking water interested more of one authors, such as (le chevalier, 1990); (Le Chevalier, Cawthon, & Lee, 1988), among these authors, several have tried to connect this degradation with the turbidity or the temperature but without success.Others studies has found the link between this degradation and the residence time (Kerneis, Nakache, & Degum, 1995).The role of the residence time in the network as a mattering factor explaining the difference between entering water produced in the entrance of the network and the water consumed at the end of network.(Kennedy, Sarikelle, & Suravollop, 1991).To calculate the residence time of the water within a conduct it is necessary to determine the time that water takes between the beginning and the exit of this conduct.

Identification of Degradation Coefficient
This parameter is determined by the concentrations upstream and downstream of the pipe, and by the slope of the line.It's represented by the equation ( 7).

( ) = ( ) − (7) Experimental Procedure
On a pipe AB accessible to sampling (cupping, fire hydrants, or load tap tap) of length L and velocity V, the sampling point A (start node) at time t = t0 provides the initial chlorine [Cl 2 ] 0 (Figure 3).Several studies propose methods to count the germs in the water.The daily frequency of measurement of these methods requires to be simple and economical (Gauthier et al., 2001).But, this is not possible, in most cases, due to the expense of reliability, efficiency and accuracy.
For a better simulation, we decided to assign a specific coefficient to each pipe degradation.However, all pipes are not suitable for measuring this parameter.Thus, we used the automatic classification of lines (machine learning algorithm) based on theres characteristics (the nature of the conduct, its diameter and its age commissioning ...).This leads us first through unsupervised classification, to partition a set of classes in the visible lines in the measurement of the degradation coefficient.In this case, each class will label the average value of this coefficient.Then a supervised classification will allow us to assign to driving (not accessible to measurement) the value of the degradation coefficient corresponding to the label (calculated value) of the class in question.

Unsupervised Classification Algorithms
The principle of unsupervised classification algorithms (MacQueen, 1967) reads optimization in general in terms of a well-defined mathematical criterion.This criterion is intended both to optimize intra-class and inter-class inertia.It's expressed by the Institut de Mathematics of Luminy: (8) Where: 2 2 ) , ( We can say that this optimization process attempts to form from unlabeled pipes, c classes that are as homogeneous and natural potential."Homogeneous" and "Natural" means that the classes obtained should contain the most similar possible objects, while objects of different classes should be as dissimilar as possible.

Supervised Classification
Supervised classification conduct not accessible to measure the chlorine content was performed using the classical algorithm of k nearest neighbors "according Zahid (1999)."Its principle is to calculate the k nearest conducted at the unlabeled sample using a measurement distance dij.This measurement is performed using the Euclidean metric: Let X ={x1, x2, … , xn} a set of n lines and labeled to be driving to classify.In a first step, the algorithm form the set E of k nearest neighbors of y in the direction of the distance d used.Then it will affect either the majority class in this set or the class whose objects are closest to conduct it (based on the sum of the minimum distances).
Automatic classification has helped to overcome the problem of assessing the degradation coefficient for inaccessible pipes in order to identify this parameter.This constitutes a major step in the development of a powerful simulation tool of the chlorine distribution.

Determination of the Coefficient of Degradation
A measurement campaign for determining the degradation coefficient was conducted on several floors of REDAL.In all distribution networks along the lines selected for this purpose, we were able to monitor the level of free chlorine and according residence time in these pipelines.Results of the measurement conducted on the stage 61 of the Rabat distribution network are plotted on the figure 4.
Table 1.Stage 61Measurements The value of the K coefficient depends on several parameters related to the intrinsic properties of the pipe and the overall network operating condition.The distribution system is comprised of a heterogeneous set of pipes.Each of them is characterized firstly by static parameters such as the nature of its material, its diameter and its length, and secondly by dynamic parameters such as its commissioning age and flow velocity water in the pipe.

Results and Discussion
With a campaign measurement conducted in collaboration with technical teams from the control water distribution in the wilaya of Rabat (Redal), we were able to collect the necessary information for the development of the results of this work.Before presenting the results, we first present the network covered by the study.

Overview of the Network of the Wilaya
The distribution network of drinking water REDAL is divided into several pressure stages.(Figure 5 and 6).All studies performed on all floors refer only to larger diameter pipes or equal to 150 mm.
The classification results have allowed us to partition the set of identified conducted in n classes (Table 2).The label for each of them is defined by the average of the coefficients of deterioration of its components.To accomplish its tasks, the tool uses first data likes: the geometry of the studied network, such as information relating to the nodes (name, code, history) and pipes (code starting node, destination node, length, diameter, coefficient of chlorine degradation in driving).And secondly, the data representing the hydraulic state like flow distribution at the nodes, the water temperature (summer or winter season) and the water flow rate in each pipe.The tool also uses two essential parameters to the simulation of the distribution of chlorine in the network, which are: the reference value of the chlorine content in the injection point (tanks, wells and pipes with a chlorine booster station) and the minimum threshold (0.1mg / l) chlorine below which a node is declared deficit.Based on these data, the decision support tool developed chlorine distribution anywhere on the network and selects and displays the data of each pipe or selected node.
In this work, we limit ourselves to the presentation of results for two-stage characteristics of the wilaya network.Thus, we have deliberately chosen a floor on the outskirts of Rabat: Témara and another in the center of the city in this case the 86-floor reduces fueling neighborhoods of Akkari, Yacoub el Mansour and Hay el Fath.

Floor 86 Reduced
This floor has the distinction of being supported only by coming transfer lines, as shown in (Figure 5), stages 86 and 126.It consists of 141 pipes (diameter> = 150mm) forming 105 knots.
The analysis of the simulation results (Figure 7) shows that 18% of the nodes are in deficit, 4% in a precarious situation (between 0.25 and 0.3 mg/l), 24% in medium range between (0.3 and 0.45 mg/l), the remaining 54% are in a comfortable position because their concentration is above 0.45 mg/l.It is clear that the number of nodes deficit increases with the value of the threshold.

Temara Low Floor
Temara The distribution network consists of two pressure stages.We present only the results of the bottom floor.
This floor has the distinction of being less dense than the center of Rabat.It consists of 26 nodes interconnected with 29 lines.Figure 9 shows the graphical interface of the simulation tool with information displayed on the conduct and highlighted node (in white) in the diagram.We also note that the locations of the nodes deficit generally occurs at the terminal ends of the network.
Simulation results for a set of 0.6 mg/l and a tolerance of 0.25 mg/l, are shown in Figure 10.Indeed, it appears from this simulation that 19% of the nodes are in deficit, and 4% are in a critical level (between 0.3 and 0.25 mg /l).
Taking into account the simulation results of the two floors, we find that 20% of the network is below the international quality standards.Therefore curative measures are required.

Evaluation of the Method
This work was performed in the laboratory system design and the Faculty of Science in Rabat Morocco, The fundamental objective of this work is the search for an optimal method for calculating the rate of chlorine at any point in the network and solving the problem of inaccessible pipes to the measure.
To evaluate this method, we proceed in accordance with a value judgment by comparison with hydraulic simulation software.For this reason we have chosen for comparison a popular software in the water property (EPANET 2.0).This software provides a quality module that calculates the concentrations of chemicals, water residence time in different parts of the network.It also tracks the origin of the water.Using this quality module requires a prior hydraulic timing.To do this, it is required to enter data for all the lines which are: Feedback coefficient in the mass of water, and the Reaction coefficient to the walls.
To calculate:  The flow velocity.
 The pressure drop.
 The friction factor Darcy-Weisbach.
 The mean reaction rate (along the pipe).
 The average quality of the water (along the pipe).
EPANET Suppose that all pipes are full at all times (which is not obvious).Each formula uses a different roughness coefficient to be determined empirically, hence the problem of choosing the formula.
The Hazen-Williams formula is the head loss formula most used in the United States.It can not be used for liquids other than water and was originally developed only for turbulent flows.The Darcy-Weisbach formula is theoretically the most correct and is the most widely used in Europe.It applies to all flow regimes and all liquids.The Chezy-Manning formula is generally used for flow in open channels and for large diameters.The Darcy-Weisbach formula is selected by default (Manual epannet 2.0).Each formula uses the following equation to calculate the pressure drop between the n.uds start and end of the pipe: The advantage of our method is that it is over all these problems choosing the roughness coefficient and optimizes material and human resources by and offers a very simple method to optimize the time and cost at the same time.

Conclusion
The study of the laws governing the phenomena of degradation of the quality of water in urban distribution networks has permitted us to develop a mathematical model capable of evaluating the chlorine content in any point of the network in optimal manner.The reliability of this simulation tool comes from the efficienty in the estimation of the constant chlorine degradation kinetics.Moreover, this parameter depends on the physico-chemical and microbiological quality of water distribution and status lines (kind of pipes, commissioning age and diameter).Due to the inability of the identification of this coefficient for each pipe, we opted for an automatic classification of pipes which is mainly based on their similarity indices.Thus, we have reduced the complexity of the problem, assigning to each pipe, not accessible to measurement, the best coefficient of degradation to be as close as the actual structure of the network.This allows to refine the calculations and also to consider small diameter pipes, where the degradation is intense.Thus, we will provide users a reliable and powerful tool.The tool is thus designed to offer the user a snapshot of the chlorination system.This one allowed a cost reduction measures (reagents, samples, travel), and also the identification of critical areas where the implementation of chlorine concentration is below international health standards.Finally, this simulation tool will be the starting point of an optimal search for locations of intermediate chlorination stations in order to continuously maintain a tolerable concentration of chlorine anywhere on the network.

Figure 1 .
Figure 1.Average speed consumption of a network floor ) is the distribution of residence times in the conduct.It's equal to 1.E(t)d(t)is the fraction of the exit flow of the conduct.

Figure 2 .
Figure 2. Distribution of residence times (E (t) dt is the fraction of the output rate)

/
Another swab is levied at the point B (exit node) to determine the residual concentration [Cl 2 ] chlorine after it passes through the pipe.

Figure 3 .
Figure 3. Portion of the pipe th measure the distance provided by the metric A (positive definite symmetric matrix); -xk: the pipe characterized by the parameters (age, kind, diameter and coefficient of degradation of the pipe); -Vi: the center of gravity of class i (1≤ i ≤ c); -P ik : the weight of the pipe in the class i xk we made equal to 1, to facilitate any parameters on others.

Figure 5 .
Figure 5. Configuration of Rabat network

Figure 8 .
Figure 8. Block diagram of the 86-floor reduced

Figure 9 .
Figure 9. Block diagram of the Temara floor

Table 2 .
Classification results