Validation of a Computational Fluid Dynamics Model for a Novel Residence Time Distribution Analysis in Mixing at Cross-Junctions

: In Water Distribution Networks, the chlorine control is feasible with the use of water quality simulation codes. EPANET is a broad domain software and several commercial computer software packages base their models on its methodology. However, EPANET assumes that the solute mixing at cross-junctions is “complete and instantaneous”. Several authors have questioned this model. In this paper, experimental tests are developed while using Copper Sulphate as tracer at different operating conditions, like those of real water distribution networks, in order to obtain the Residence Time Distribution and its behavior in the mixing as a novel analysis for the cross-junctions. Validation tests are developed in Computational Fluid Dynamics, following the k- ε turbulence model. It is veriﬁed that the mixing phenomenon is dominated by convection, analyzing variation of Turbulent Schmidt Number vs. experimental tests. Having more accurate mixing models will improve the water quality simulations to have an appropriate control for chlorine and possible contaminants in water distribution networks.


Introduction
In recent years, useful life of a several number of Water Distribution Networks (WDN) has been exceeded, so that there are certain points or sectors that do not reach enough disinfectant. This problem could produce the formation of biofilm on pipe walls [1,2], promoting bacterial growth and its transport through water. On the other hand, the system's own useful life, the intermittency in the supply, the leaks level, and the demands behaviour cause a great variety of residence times of the drinking water and variations of reaction of the disinfectant in the network [3,4].
Chlorine disinfection is one of the principal factors in drinking water treatment processes. This chemical agent is used mainly to ensure the destruction of pathogen organisms that could be present in water and that are coming from the sources of supply. The disinfection prevents gastrointestinal diseases due to the consumption of contaminated water. However, it is also true that chemical disinfection has caused unwanted risks due to by-products that are generated in the reactions with contaminants present in water, such as trihalomethanes (THM), among others [1,2,[5][6][7][8][9].
In EPANET and in most hydraulic simulation programs, it is assumed that the solute mixing is complete and instantaneous [21]. Therefore, the concentration of the substance (for example: residual chlorine) that leaves the cross-junction, will be the weighted average of the solute concentrations of the arriving pipes. For a given node k, the concentration leaving the node is obtained by Equation (1).
where: i, link with flow leaving node k; I k , set of links with flow into k; L j , length of link; Q j , flow (volume/time) in link j; Q k,ext , external source flow entering the network at node k; and, C k , ext , concentration of the external source flow entering at node k. Several authors [25][26][27][28][29][30][31][32][33][34][35][36] have numerically and experimentally demonstrated that the mixing in these unions is far from being "complete and instantaneous". Most of these researches were based on physical experiments and simulations through Computational Fluid Dynamics (CFD) using tracers for the concentration distribution analysis. Some researchers [26][27][28][31][32][33][34][35][36] implement experimental scale models of a cross-junction and tee junctions with different pipe diameters, which are driven by elevated tanks where tracer is injected into one of them. Once the mix of the flows was made, mixing coefficients were formulated based on their experimental measurements. Some others based their approaches on CFD simulations directly, even for small geometric configurations [25,29,30]. The most commonly used tracers were salts, such as NaCl. Other authors considered colored dyes and high speed photography too [34,35]. Conducting a study directly with chlorine as a solute turns out to be somewhat complicated, although Mompremier [33] used in-line chlorine loggers/dosers to analyze the mixing at different conditions.
The developed studies carried out to date allow for the derivation of mathematical functions for the computation of the incomplete mixing, even two codes have been formulated to be implemented as toolkits for EPANET (one of them, called AZRED II and developed by [36]). However, these applications have not been disseminated globally yet, because most of them were performed by scaled experimental devices reaching low velocities and turbulent flows that were close to 4000. In some cases, they are still subject to specific calibrations of each network and there is a lack of experimental sufficiency in real networks of high interconnection.
The lack of precision in water quality simulations can lead to erroneous projects of monitoring systems of the location of re-chlorination systems necessary for the control of disinfection [28]. The accuracy in these models is also necessary to simulate the spatial-temporal dispersion of chemical and microbial agents during accidental or intentional contamination events.
This paper presents a validation of the phenomenon of mixing in cross-junctions by means of CFD, in which the distribution of the disinfectant is not considered as homogenous mixing. The presented scenarios were performed at velocity and pressure conditions that were similar to those real WDN thanks to the impulsion and conduction equipment used. This avoids making measurement adjusts or extrapolations, that makes it different from many other jobs working at lower turbulence flows. The model is validated by a novel analysis of RTD curves for mixing cross-junction, resulting from the execution of tests of different velocity conditions and its corresponding measurement of copper sulfate injection response. The correct model meshing degree is verified for the study of the phenomenon in the CFD model.

Experimental Model
The cross-junction used for the mixing analysis is situated on an experimental network of the "Universidad de Guanajuato"; the pipe material is galvanized iron of four inches in diameter ( Figure 1). The flows are conducted by a 15HP hydraulic pump, which reaches 30 L per second at pressures of 1.78 bar for the pipes on the cross-junction. Open valves are available at each border for flow velocity control for inlets and outlets. They are located at 2 and 7.5 m upstream water from the cross-junction. It is done to reduce turbulence generated by the obstruction of the valve, and so that the flow could be uniformized along the pipeline. Operating conditions that are close to WDN can be approximated by the physical characteristics of the experimental network. All of the mixing tests were developed contemplating two inlets and two outlets flow. The boundary distances (shown in Figure 1), that were established for the numerical model, are the location points of the pressure measuring devices. The north inlet (N) corresponds to the upper boundary. The West inlet (W) is the left boundary, and in the same way for the outlets boundaries on the East (E) and South (S) (Figure 1). In addition, the numerical model is performed with the objective of maintaining the flow direction with a sense from left to right and from top to bottom.
North and West inlets flows are measured with the support of two flow meters, of them being of electromagnetic type, DOROT brand, model MC608-A (Figure 2a). The second one is a propeller meter, of the company Hidrónica ® , model MP-0400 (Figure 2b), both with datalogger capabilities. For measures at the outlets, the outflowing water is conducted up to four flowmeters, two for each outlet. For the East outlet, the flowmeters are of electromagnetic type, of Badger Meter Inc. brand, model M2000 (Figure 2c). For the South outlet, the water is conducted to two propeller volumetric flow meters (Figure 2d). A digital storage oscilloscope with four measuring channels, a Tektronix ® brand model TDS-2004C ( Figure 2e) was available to the pressure registration on the four boundaries of the cross-junction. In this case, the oscilloscope visually represents the electrical signals that are captured by pressure transducers. These transducers are of WIKA ® brand model S-10, comprise a measuring range of 0-10 V of electrical signal intensity corresponding to the range −1 to 9 bar of pressure.
The tracer that was used for the tests is copper sulphate pentahydrate (CuSO 4 ·5H 2 O) of fine grade, Fermont ® brand. The 0.25 mol/L solutions are prepared, which return an effective response to the concentration measurement. The tracer injection is done by pumping, with a monophasic equipment, Siemens brand, 1HP power and rotor speed of 3515-3535 rpm. The tracer is stored in a volumetric test tube of four liters size, and then, in each test, the tracer is pumped 150 mL approximately. The injection point is located at 3.50 m before the cross-junction ( Figure 3). The pump equipment allows for overcoming the pressures of water flow in the network and the controlled intrusion of tracer that is injected through the opening and closing ball valve of a 0.5 inch.
A potentiostat-galvanostat, brand BIOLOGIC, model SP-150 was used to apply an electric potential, with which copper adhesion will occur on the electrodes ( Figure 4). This equipment has software that allows for current intensity registration at fixed time intervals. The electrodes were placed at the outlet boundaries of the pipes, close to the pressure transducers. The electrodes must be made of a metal with suitable properties for electrical conduction. They were developed with the characteristics that are shown in the Table 1.

Material Solid Copper
Electrode diameter 4.4 mm Length of electrodes 9.5 cm (covers more than 90% of the pipe diameter) Electrodes separation 4.6 mm Insulation material resin The velocity alternatives for the case of two inlets and two outlets are described in Figure 5. To simulate equal velocities is difficult because of working with high magnitudes of velocity and pressure. Therefore, the scenarios were approximated as much as possible to cover the four-velocity combinations in Figure 5. It has been determined that the flow velocities are closer when the variation between both of the inlets or outlets boundaries are by a percentage with a relative difference is less than 25%, otherwise, for the variations that are presented with a relative difference of 25% or greater, it is considered that the velocities are different. The objective is to cover trials that involve the different mixing conditions, likely in a cross joint. The alternatives are classified in these four groups, according to their velocities. Table 2 contains contents values of the four scenarios V1 to V4 proposed.

Turbulent Flow
The numerical simulations for the dynamic flow are based on the mass conservation Equation (2) and the Reynolds Averaged Navier-Stokes (RANS). These last equations consider the turbulent flow applying Reynolds decomposition by its average over a small-time increment; the flow quantities are decomposed in a temporal mean and a fluctuating component [37]. The decomposition results in the RANS Equation (3) [38,39].
where u is the mean-averaged velocity vector, P is the pressure, µ is the dynamic viscosity, and ρ is the fluid density.
The fluctuating component introduces a closure problem [37], which could be solved by diverse type of models: Eddy Viscosity or First-Order and Second-Moment Closure (SMC). The standard k-ε model is one of SMC that works with high Reynolds number turbulence valid only for fully turbulent free shear flows that cannot be integrated all the way to the wall [40]. Modeling flows close to solid walls requires integration of the two equations over a fine grid to correctly capture the turbulent quantities inside the boundary layer [40,41]. Then, the so-called Reynolds stresses can be stated in terms of a turbulent viscosity µ T , according to the standard k-ε turbulence model; Equations (4) to (6).
where k is the turbulent kinetic energy, ε is the turbulent energy dissipation rate, P k is the energy production term (P k = µ T [∇u : (∇u + (∇u) T ]), and C µ (0.09), C e1 (1.44), C e2 (1.92), σ k (1), and σ ε (1.3) are dimensionless constant values that are obtained by data fitting over a wide range of turbulent flows [38]. K. Hanjalik [41] used the k-ε model over other types of turbulence models for simulation in pressure pipes with high Reynolds numbers, with the same empirical constants. Furthermore, RANS k-ε models have proposed good results also in mixing and concentration analysis, when these models have been validated with measurements, as in [42,43].

Boundary Conditions
Due to the high values of the Reynolds number that were reached in the scenarios, velocities in regions near the walls model decrease rapidly. The fluid velocity becomes dependent on these boundaries. The wall functions used are based on a universal distribution of velocities depending on the proximity of the wall, Equation (7).
where u + is the normalized velocity component in the logarithmic layer of the wall, κ is the Von Karman constant (0.4187), E is a constant that depends on the roughness of the wall, and y + is the dimensionless distance from the wall. The input parameters that are assigned to the CFD analysis (shown in Table 2) were established them in the following way, at the same distance like in the experimental model: Inlet velocity at N; Inlet velocity at W; Pressure at E outlet; and, Pressure at S outlet.
The velocity values (Table 2) are multiplied by the unit normal vector n, u = −vn, then, the input velocity is a vector of equal magnitude in the surface input boundary. The parameters k 0 and ε 0 must be defined, which are obtained from the Equations (8) and (9).
Turbulent intensity I T (dimensionless) varies between 0.05 and 0.10. For the turbulent scale length, L T (long unit) can be obtained according to the pipe radius r, obtaining 7% of it. L T = 0.07r [39]. Therefore, the values were fixed on I T = 0.05 and L T = 0.07 × 0.0508 m = 0.003556 m.

Residence Time Distribution
To sketch RTD curve in a fluid for transport of diluted species in dynamic regime, an averaged convection-diffusion equation for turbulent flow is used, Equation (10).
where u is the velocity vector determined from Equation (2) of the hydrodynamic analysis, C is the tracer concentration, and D is the diffusion coefficient of the tracer. Under turbulent flow conditions, the concentration and the fluctuation parameters can be grouped in a turbulent diffusion term, D T . This term can be evaluated considering the Schmidt Number (turbulent), Sc T , for which, the equation proposed by Kays-Crawford [41] was used, Equations (11) and (12).
where Sc T∞ is the value of Sc T at a distance far from the wall, and it is fixed with a value Sc T∞ = 0.85. It is considered to be a perfect mix at the tracer input boundary due to the distance with which it is injected. The RTD curve is estimated by Equation (13) and it describes the distribution of the tracer through model at certain fixed time periods, from the injection of the tracer to the point of contact with the electrodes at outlets.
where C (t) is the concentration that is time-dependent on time. The development of RTD curves was executed taking C (t) from the Equation (10). Both DTR curves obtained, experimental and simulated will have different dimensions, so it is necessary to make a parameterization. A normalized function E (θ) can be defined as [23]: where the dimensionless time θ is obtained by the spatial residence time τ = V/Q, V is the fluid volume of the model, and Q is the volumetric flowrate in each outlet. The boundary and the initial conditions for solving the Equation (10) can be established as the tracer concentration, that is zero, C = 0, before the tracer injection in the reactor (t = 0) is performed. To simulate the tracer pulse injection, a mean form of the RTD is employed RTD at the outlets.
The mixing analysis was implemented in CFD, by the COMSOL Multiphysic software, 4.3b version in a computer of 64-bits operating system, Dual Core Xeon 2.30 GHz processor, and 96 GB of RAM. COMSOL has efficient simulation capabilities and complete graphic settings over other simulation commercial software packages [44]. This allows for better describing of different development patterns by function mathematical assignments in the simulation of tracer injection and the calculation of turbulent flow implemented in this study.
The discretization of the cross-junction volume was done using an unstructured mesh with tetrahedral, pyramid, and prism elements for simulation. According to the COMSOL manual [45], the mesh depends on the fluid flow and on the accuracy required. In many cases, the standard k-epsilon model with wall functions, that in this case, may deliver an accurate enough result at a much lower computational cost.

Mesh Selection and Sensibility Analysis
The COMSOL software already has predefined mesh grades for simulations in turbulent flow, varying only the mesh density degree. A sensitivity analysis ( Figure 6) was carried out among nine different fineness degrees to determine which density is adequate for the numeric representation regarding the measurements that were made of pressure and velocity in the real experiment. Also, it is verified that by means of the value of y + there is an adequate representation of the velocity profile. The sensitivity analysis for scenario V1 is shown in Figure 6. For the degrees of coarse mesh (extremely coarse, extra coarser, coarser, coarse, and normal), the speed is having a variation for both outlets. However, from the FINE fineness level, besides the speeds adjusted and the increase of the degree of fineness, there is no other significant change. Therefore, the appropriate degree of mesh for the simulations is the FINE grade, it is conformed of 493,438 to 444,610 mesh elements, with the minimum and maximum edge lengths of 1.92, 0.362 cm, respectively; the number of elements depends on the drop of pressure that is generated from the experimental valves that control the flow that in the CFD was represented with an obstruction on the flow. Although only one case of sensitivity analysis is shown, it is not necessary to perform one for each scenario, since the geometry of the model varies insignificantly. [46], y + values in a range of (11.06 to 12.00) have important effects to turbulence production near the wall. As shown in the graph of Figure 6, the u velocity with respect to the mesh degree (by number of elements) stops varying from the FINE mesh degree. Therefore, this mesh degree was selected for the CFD model, which guarantees that the mesh tetrahedra established in the contours maintains a minimum y + value of 11.1 (those were verified plotting values of y + in a mesh graphic). The wall roughness was assumed to have a negligible effect. The solver that was employed was iterative, a generalized minimal residual, and a relative tolerance of accuracy of the CFD simulations considered a convergence criterion below 1 × 10 −5 . The typical solution around these meshes elements was unchanged.

CFD Simulation
The tracer injection must be defined in CFD simulations. However, the internal geometry of the sphere valve for the injection is controlled manually, and because of that, it is very irregular and difficult to obtain a chemical input pattern. Therefore, an interpolation was made between the tracer curves obtained at the outputs of the cross-junction. With this, a tracer input average is obtained at the injection point, and with this, the simulation is performed.
In the Table 3, it can be verified that the approximation between the experimental and CFD results has a significant proximity. For velocity values, the average error is 0.76% and the maximum value reached is 1.72%. The errors in terms of pressure are on average 0.80% on the N boundary and 0.92% on the W boundary. In part, pressure differences that are presented will have to do with the decimals with which the readings were recorded. The values in CFD have 16 decimals of floating point, while the oscilloscope used registers of an average value of signal, in a given time, with two decimals. The velocity values that were obtained in CFD correspond to vectors of a velocity field solved in the Navier Stokes Equation (3) for turbulent flow (k-ε model). However, to obtain an average value, COMSOL can estimate averages in a specific area (Figure 7). The selected mesh (FINE grade) approached the area of a contour (the outlet) of the pipe with good approximation (0.641% with respect to the real geometry obtained by a circumference).  Figures 8-11 show the RTD curves, experimental and numerical, at different inlet velocities (V1 to V4). The current intensity value (milliAmperes), recorded in time intervals, varies by the exchange of copper ions in the electrode cells for the experimental RTD. On the other hand, the numerical RTD is the tracer concentration through time. The parameterization was made according to the Equation (14). It is important to emphasize that the CFD curves maintain a constant value most of the time, which is the stabilization of the received signal giving the supplied potential. Once the curves of the experimental and simulated tests are derived, a comparison is made between the curves to analyze the representation of the simulation. The dimensions of the axes of the graphs are: The dimensionless time (θ) on the horizontal axe and the normalized function for the concentration E (θ) on the vertical axe; in all the cases, there are diverse values indicating a not complete mixing. Close agreement between simulation and experimental tests were attained. The shape of the RTD curves evidences that the mixture in the pipe junctions does not obey a perfectly mixed model, owing to the fact that the maximum of the peak is far from θ = 0. The maximum of the curves was found at values of θ, higher than of the unity, what indicates that the fluid elements loss kinetic energy in the cross-junction due to the coalition of the hydrodynamic streams and the bifurcation of the fluid flow.    The variations between the experimental and theoretical RTD curves may be caused by the variability of the manual injection of the tracer, and tracer detection may be compared with the numerical convection-advection model on CFD. In almost all the cases, the peak of the experimental model is higher than in the CFD, resulting on the maximum concentration obtained in the experimental scenarios. Specially the Figure 11, where the RTD curve on the E outlet is too short when compared to the RTD curve on the S outlet, this is due to the outlet velocities that are registered on the experimental test, 1.25 m/s on the E outlet and 0.43 m/s on the S outlet, the tracer goes faster for the first velocity. The curves that were obtained for the validation tests V1 to V4 show that the tracer is following a tracer flow pattern that is similar to the experimental injection. To quantify these variations, an average error was calculated by the Root Mean Square Error (RMSE), Table 4.

Residence Time Distribution Curves
Despite these differences, even the trend maintains a good proximity in terms of the distribution of the tracer, which shows that the proposed mathematical model is sufficiently calibrated model for describing the experimental mixture phenomenon in cross-junctions.

Variation of Sc T Coefficient
A variation of the turbulent diffusivity is presented, in the search to verify if the model, under these conditions of pressure and velocity, varies significantly if the Sc T coefficient is modified. The turbulent diffusivity was simulated in different values, using assignments to the Schmidt Turbulent Sc T number. The range of values for this parameter is 0.61, 0.71, 0.81, and the value that was obtained by the Kays-Crawford model [41], which amounts to 0.5666.
The results indicate that the model is not sensitive to the variation of these Sc T coefficients, since the parameterization of the curves reflects practically homogeneous results. This conclusion is verified, if a RMSE for each case is obtained again ( Table 5).  Table 5 shows that the variation is verified of the value used of Sc T was based on the model of Kays-Crawford [41], and it was the most appropriate in most cases. The values of Sc T have a very low impact in scale for the simulated model. In Figure 12, it is observed that the diffusion increases in the zones of greater recirculation, and there is less speed in the model. This should have a more significant influence, according to the bibliography. For the moment, it can be determined that the speed and pressure range far exceed the studied cases, and this tells us that at high levels of speed and pressure, the turbulent diffusivity does not have a significant impact on the transport of solute.

Incomplete Mixing Simulations
Once the CFD model has been calibrated, the mixing grade can be evaluated for diverse scenarios with the tracer injection at the two inlets, N and W. To represent the development of the mixing graphically, it was introduced by two parameters: Inlet relation (C N /C W ); in the same way, Outlet relation (C E /C S ). The diverse scenarios implemented were made by the combination of concentration at the inlets, in intervals of 0.25 mol/L, in a range Inlet relation = [0.00-2.00]. In the case of Inlet relation = 0.00, it means that C N = 0.00 mol/L and C W = 5 mol/L. At the same way, for an Inlet relation = 1.50, it means that C N = 7.5mol/L and C W = 5mol/L. The scenarios are represented in Figure 13, with the results for the outlet relation after the cross-junction mixing. The four curves V1-V4 that are shown in Figure 13 represent the concentration relation between the two outlets E and S. Each curve (apparently straight lines) has different slopes. It can be observed that curves V1 and V2 have a similar development pattern, and are different from the curves V3 and V4. This is because V1 and V2 have closer input and output flow velocities, around 1 m/s for each one. However, curves V3 and V4 correspond to the input and output velocities with a wide degree of difference, between 0.427 to 1.302 m/s. This indicates that the transport of solute is by convective flow. This difference between velocities causes the tracer to flow at a higher rate at one output than at the other one. Therefore, the greater the difference between the input and output velocities, the greater the change in the slope of the generated curve.
Due to the behavior of the velocities mentioned above, the mixing behavior is maintained in a different proportion to the outlets in practically all of the cases. The complete mixing is not carried out on any scenario. Even the scenario with the same concentration in both inlets (Inlet Relation = C N /C W = 1) might not be a complete mixing. That is, since the result contains the same concentration at the inlets, it does not mean that a total mixture of the two incoming flows has been made. The complete mixing model assumes that "Outlet relation" must be equal to one in all cases, by the reason that the estimation assigns the same concentration at the two outlets. No one scenario has the behavior like a complete mixing.

Discussion and Conclusions
The physical characteristics of the experimental network, the pumping equipment, and the measuring devices used, allowed for achieving higher conditions of turbulence in the experimental model. To analyze the mixing that occurs in the cross-junction under these turbulence conditions, four scenarios were generated for flow velocities between 0.43 and 1.53 m/s; and for pressures around the cross-junction between 1.56 and 1.96 bar, we considered four kinds of similar velocities for the inlets and outlets boundaries around the cross-junction. It is common for these conditions to occur at these variations in real drinking water distribution networks.
The RTD curves present a novel and an adequate approximation, having RMSE values that are between 0.0072 and 0.0509. It means that the average distance of separation in some points of the curves carries this value. These separations occurred for the most part in the peaks of the curves. However, in the ascending and descending curvatures, they present a very precise similarity. In most of these regions, slopes are well represented, in all validation tests.
The variation of Sc T solved many questions about the role of turbulent diffusion and the impact that it generates in these operating conditions. The RTD curves showed a minimal change between them. The change is almost inappreciable graphically. Therefore, more checks were obtained using the RMSE error for each curve, and the variation is seen up to the fourth decimal place of precision of the RMSE. This allows for concluding that convection is the main transport in diluted species, and that the diffusion does not affect much in the simulation of the tracer course through the cross-junction. Even with this, it was found that the model that was proposed by Kays-Crawford [41] was the adequate parameter when presenting the minimum RMSE values with respect to the turbulent Schmidt variation.
The mesh selection and the geometric construction were adequate, because the values that were derived from flow and average velocity in a contour surface correspond approximately to those that were calculated with analytical formulas. Also, the simulation times did not require extensive periods, and convergence was achieved without the presence of broken curves in the graphics. The graphics could be processed with a reasonable degree of affinity in the surface of symmetry. The hydrodynamic approach retains a low degree of error with respect to experimental measurements. The errors that were obtained at the inlet boundaries, for the pressure was between 0.502% to 1.478% on the four scenarios and at the outlets boundaries, for the velocity, was between 0.133% and 1.720%. It not only depended on the simulation in CFD and the mesh, but also on the continuity adjustments that were made in the experimental tests. These adjusted tests ensure that the entry costs were equivalent to the costs of exit in the trials, which was also kept in the CFD environment since one of the principles of its coding is based on the continuity equation for three dimensions.
Finally, the mixing grade that was evaluated for the scenarios with tracer injection at the two inlets, varying nine combinations, shows that the mixing behavior is maintained in a different proportion to the outlets in practically all the cases. This is due to the behavior of the velocities that are mentioned above; the complete mixing is not carried out on any scenario and it was verified with the RTD analysis, where they show us on the graphics of the RTD curves how the tracer was obtained on the outlet boundaries at different times and peaks. It also could be verified on the scenarios with the same concentration at the inlets, obtain the same concentration, but it does not mean that a total mixture of the two incoming flows has been made, and that was validated with the same RTD curves. No one of the scenario has any behavior like complete mixing.