Low dimensional modeling of Double Tjunctions in water distribution networks using Kriging interpolation and Delaunay triangulation
 Denis Gilbert^{1},
 Iraj Mortazavi^{2}Email author,
 Olivier Piller^{1} and
 Hervé Ung^{1}
DOI: 10.1186/s4073601600268
© The Author(s). 2016
Received: 21 September 2015
Accepted: 2 December 2016
Published: 20 January 2017
Abstract
Water distribution networks are subject to potential intentional contaminations to cause harm to the consumer. Reliable transport models are needed to detect, trace and follow any contaminant transported inside the network. For now, the transport of contaminants in pipes has been mostly modeled assuming perfect mixing conditions at Tjunction. However, some studies have shown that it is not always the case when crosses or double Tjunctions are involved. In this paper an imperfect mixing at Double Tjunction model is developed considering 3D mixing behavior. A reduced model is then constructed in the form of a 1D law to apply it to current 1D transport models for water distribution networks. The methodology to create such law is detailed and can be applied to any reduced model problem including multi parameters and time consuming simulations. The procedure is composed of three steps: first calibrate the Kriging interpolation method parameters; then couple it with the Delaunay triangulation method to select simulation points with maximum gain; and finally implement a 1D law based on the simulation results and the interpolation.
Keywords
Water distribution network Imperfect mixing Transport modeling CFD Laminar Turbulent Design of experiment 1D reduced model Kriging Delaunay triangulation1 Introduction
Security is an important topic for Water Distribution Networks (WDN), as water is an essential component of society. Realtime sensors are now installed in water network to monitor and better understand the behavior of water quality through the network. Improvements in technology require improvements in the precision of water quality modeling. This work has the dual objectives to develop and enhance methods to detect any contamination in the network and to get reliable realtime transport models for source contamination identification and proper countermeasures.
Water distribution systems are modeled by a graph composed of links transporting water for several pipes in series, pumps and valves, and nodes that can represent either water sources, consumers or junctions. A hydraulic model is used to compute the water velocities in links and the head at nodes. Then a transport model is applied to simulate the quality state of the water inside the network, such as the water chlorination concentration. The transport model equations that are usually used in water distribution hydraulic models are the 1D advectionreaction equation and a perfect mixing law. Different resolution approaches exist. Epanet software [17] uses the Lagrangian transport model with an eventdriven model [3], whereas Porteau software [16] resolves equations with an Eulerian approach and a timedriven model [9, 12]. Both are coupling a 1D transport model for the water quality inside the links and a 0D model for mixing at nodes.
Two imperfect mixing models exist in the literature. Ho and Khalsa [13] developed the Epanet BAM model for imperfect mixing at cross junction. They used both experiments and simulations to deduce an imperfect mixing law in between no mixing and imperfect mixing results, with a scale parameter that need to be calibrated depending on each real cross. Choi et al. [7] developed the AZRED model based on an experimental data filled lookup table with interpolation or extrapolation for inputs not in the table to model both imperfect mixing at crosses and Double Tjunctions. It was validated on experimental values with a large range of flows. One limitation is the need for extrapolation for Reynolds number approaching zero or infinity. Also, a 2D resolution has been proposed in [19] to better assess the mixing at the junction by applying adjoint method and resolving Stokes equation in laminar flow (Reynolds number (Re) < 2000).
The aim of this paper is to complement the previous models generating a generalized onedimensional model. The approach uses a Computational Fluid Dynamics (CFD) based method [4, 18]. This study enhances the transport model with an accurate mixing model of contaminants at Double Tjunctions. This is done by creating a lookup table with results from 3D CFD simulations. These simulations are time costly, therefore an interpolating method is used to extract a global imperfect mixing behavior from this table. Two methods are needed for its creation and utilization, first a high order interpolation Kriging, and second a design algorithm based on the Delaunay triangulation. That table is finally used in a 1D law that can be coupled to the existing transport models in real time computation.
It should be mentioned that here, the 3D simulations are used to estimate both laminar and turbulent dynamics at Double Tjunctions. They are performed solving Navier–Stokes equations with either the advection equation or mixture model. Each simulation represents the behavior of the mixing at double Tjunctions at some design points depending on the 4 Double Tjunction parameters: the length of the interpipe (the distance between two pipe junctions), the average interpipe Reynolds number and the input and output Reynolds number ratios (see Fig. 2). To get the solution for any other combination of the parameters’ value, a Kriging interpolation is performed.
This interpolation method is used because it is suitable for cloud point distribution [20], which conforms to limited number of CFD simulations. Firstly, the Kriging interpolation needs a calibration of its parameters and is solved with a maximum likelihood function. Then the solution of the interpolation is defined as a weighted sum of the CFD simulation results with these weights found through the resolution of a linear system. An example is then given to explain its application. That interpolation is also used to define the error of interpolation that is used in the Delaunay triangulation method. This algorithm allows us to know which simulation points to do next as to minimize the interpolation error. This maximizes the gain of each new CFD simulation, which is important as they are time consuming. The results of the CFD simulations are placed in a lookup table which is coupled to the Kriging interpolation to create a reduced model under the form of a 1D law that can enhance current transport model reliability.
Such methodology can be used for any other reduced model problem that include multiple parameters and time consuming simulations. The two important steps in the procedure are to calibrate the Kriging interpolation parameters and to select the simulation points with the Delaunay triangulation design method.
The paper is organized as follows: we will describe first the problem equations as well as the CFD simulations procedure. Then the Kriging theory and calibration method is explained and the Delaunay triangulation design method is given. Afterwards, the generalization to the reduced 1D model is discussed. The second part of this article is dedicated to the study of the results: first is given the Kriging calibration results on the mixing for the Double Tjunction, then is explained how the Delaunay triangulation helps the design point choice and finally a discussion on CFD simulation results is given to explain the imperfect mixing behavior.
2 A theoretical model for mixing in WDN
In this part, first the imperfect mixing problem and equations as well as the CFD simulation parameters and procedures, are described. Then, a discussion on the design of experiment is written which explains the need for both an interpolation method and a design approach. Thereafter the Kriging interpolation is given in two parts: resolution and calibration connected to the Delaunay triangulation algorithm which is necessary to identify optimal simulation points. Finally, CFD simulation results are used to build a 1D law that can be used in any case of flow rate and concentration for the mixing at Double Tjunctions.
2.1 Transport model and CFD simulations
With C _{ i } is the mass concentration of the agent in link i, t is the time, x the space, u _{ i } the average velocity in the link i; and K _{ i } and α _{ i } are the kinetic constant and the order of the reaction respectively.
Where In _{ j } is the set of links with water entering node j; Q _{ i } is the flowrate of link i; and C _{ j } is the resulting concentration at node j. C _{ j } will be used as boundary condition for propagating the agent in the next adjacent links see Eq. (1).
In recent studies, Ho and Khalsa [13] and Choi et al. [7], showed that mixing at Tjunctions is important with regards to security. It is therefore essential to add it when calculating the hydraulic quality state of the network. Ho and Khalsa [13] developed, and adjusted with experiments, the BulkAdvective Mixing model BAM for the imperfect mixing at crossjunction that depends on the Reynolds number at the inlets and outlets.
Where s is a coefficient to calibrate, which depends on the real state of the crossjunction; C _{ j } the imperfect mixing condition concentration at either outlet j = 3 or j = 4 in Fig. 1; \( {C}_j^{perfect} \) is the concentration computed with perfect mixing hypothesis at outlets 3 and 4 using Eq. (2); and \( {C}_{\mathrm{j}}^{bulk} \) is calculated with Eq. (3). Ho and Khalsa [13] proposed to calibrate the s coefficient from experiments. Their results for X and Njunctions (or double Tjunctions) is implemented in the EpanetBAM module [13].
Another research study, The AZRED model [7] proposes the use of a lookup table with interpolation or extrapolation for inputs not in the table to model both imperfect mixing at crosses and Double Tjunctions. It was validated on experimental values with a large range of flows. One limitation is the need for extrapolation for Reynolds number approaching zero or infinity. What is proposed is to complete the two previous models into another onedimensional model. The approach is to use a Computational Fluid Dynamics (CFD) based method with some results published in [4, 18].
Therefore, the third parameter chosen is \( {R}_1^{in} \), which represents how much flow goes in inlet 1 compared to the average Reynolds number. By fixing this parameter, it also determines \( {R}_2^{in} \). Finally, the fourth parameter is like the third one and corresponds to the outlets, it is noted \( {R}_1^{out} \). To summarize, the four parameters which are expected to modify the behavior of the mixing in the simulations, are: L, Re _{ average }, \( {R}_1^{in} \) and \( {R}_1^{out} \).
It is proposed to use 3D CFD simulations to create a 1D law based on a lookup table and a 4D Kriging interpolation method. Code Saturne [2] has been used to simulate laminar flows and ANSYS Fluent for turbulent flows. Some common simulations have been completed on both software for turbulent cases and have given similar results, which justifies that they can both be used to model the phenomenon. They have been computed on the Mésocentre de Calcul Intensif Aquitain (MCIA) and Irstea computation grid respectively. The Jade supercomputer of Centre Informatique National de l’Enseignement Supérieur (CINES) has been used to assure the validity of the grid convergence.

The first one is composed of the laminar flow (Re ≤ 2000) and transitional flow (2000 < Re < 4000) cases. Direct Numerical Simulations (DNS) have been used and the transport model is the resolution of the advection equation for a concentration. In Fig. 2, the boundary conditions are 0 mg/L for the straight inlet (In1) and 1 mg/L for the other one (In2). The velocities at 3 boundary surfaces are calculated from the laminar velocity formula:$$ v(r) = 2*vm*\left(1\frac{r2}{R2}\right) $$
With v the velocity that is calculated, vm the average velocity, r the radius from the center of the pipe and R the internal radius of the pipe. The last boundary surface is set as pressure outflow.

The second one is composed of the turbulent cases (Re ≥ 4000). Large Eddy Simulation (LES) has been applied with Smagorinsky model. The Mixture model of ANSYS Fluent has been used. Two fluids are defined to be water with similar properties but different limit conditions, the volume fraction of each fluid is set to 0 and 1 respectively at each input. Turbulent profiles have been developed and injected at the inlet and flow percentages are defined for each output.
Parameters’ range
Parameters  Values 

Reynolds average: Re  1000; 2000; 5000; 10,000; 20,000; 
Interpipe length: L (Diameters)  5; 8; 10; 20; 
Inlet Reynolds ratio: \( {R}_1^{in} \)  0; 30; 50; 70; 100 
Outlet Reynolds ratio: \( {R}_1^{out} \)  0; 30; 50; 70; 100 
An important issue is the choice of boundary conditions (cases when either \( {R}_1^{in} \) or \( {R}_1^{out} \) equals 0 or 100): contrary to previous studies, the boundary conditions are fixed to be the perfect mixing case (Eq. 2).
Initially 180 simulations were carried out but some grid refinement was necessary for better capturing the variations of the concentration at outlets. In this paper, we have placed iteratively new simulation points to minimize the error of interpolation by the Delaunay method. The interpolation is first described and kriging method is used.
2.2 Kriging interpolation
The Kriging method is a wellknown method [5, 11, 14] invented in geological sciences by Matheron and Krige. It gives an effective way of interpolating nonstructured points outside the initial Cartesian grid.
There are two objectives for estimating the weights: to obtain minimal variance of estimation and to constrain the minimal variance objective.
Kriging is a minimum variance method based on the definition of a probability distribution at each of the n sample points x_{i}. It is based on the theory of regionalized variables and provides best results when data points are not evenly spread. Compared to radialbased interpolation, it gives more predominance to closer nodes [20]. It also has the advantage to be a generalization of radialbased function [10]. A comparison of 12 different types of interpolations is accomplished in [6] and Kriging interpolation gives a very good approximation but is quite slow. However, the time of interpolation can be neglected in this study compared to the CFD simulation time, therefore Kriging interpolation is a good choice. The method chosen is the universal Kriging that we detail below.
2.2.1 Kriging interpolation solution
With f_{l} the polynomial component functions, β_{l} the unknown coefficients of the polynomial and p the polynomial order.
Remark: if the rowvector F(s) is only composed of one element equal to 1, the method is called ordinary Kriging, otherwise it is universal Kriging.
Where Z and Y are the column nvectors with components (Z(s _{i})) and (Y(s _{i}))
Where m is the dimension of the problem (here 4) and θ_{k} and γ_{k} are to be estimated. The same equation is used when calculating R(Y(s_{0}),Y(sj)) with the coordinates of the estimation point s_{0} instead of any observation point s_{i}.
Where the λ_{i} are the unknowns of the problem.
We have found that the function to minimize is quadratic in lambda with Hessian K that is symmetrical definite positive (under mild conditions of θ). It is therefore strongly convex.
With k_{i}(s_{0}) = Cov(Y(s_{0}), Y(s_{i})) and k_{00} = Cov(Y(s_{0}), Y(s_{0})) = σ^{2} are given by Eq. (6).
The parameters σ, β, θ (Eqs. 5 and 6) are estimated at maximumlikelihood sense and calibrated in different process that is detailed in Appendix. The γ_{k} are fixed to 1 s; a regularization term α is added to the diagonal of the correlation matrix.
The interpolation is used in the 1D law based on the lookuptable of the results, and to determine the errors of interpolation used with a Delaunay triangulation to choose new points of simulation from an initial set.
2.3 Delaunay triangulation
One limitation of such a study is the limited number of simulations to be performed. Indeed, DNS and LES simulations are computationally demanding, therefore a method is needed to find the best point of simulation. One wellknown method is the LatinSquare design [1] consisting in dividing the space into a fixed number of squares and then randomly picking points in each square. However, for numerical simulations, a major drawback is that it requires a lot of simulation points, at least one for each region defined. In this study we have selected the Delaunay triangulation method. It consists of the calculation of interpolation error sums (based on the Krigging as described before) in the triangulation domain to define the region the most susceptible to be poorly modelled. It was made to enrich the database of principal components analysis basis functions used in oscillating airfoils in a compressible flow context. Points of simulations could have been chosen from structured method or Latin Hypercube method [15] which is a generalization of the LatinSquare design, however more points of simulation would have been needed.

For each point of the design plan, we define the interpolation error as the absolute difference between its value and the interpolated value at that point when it is not considered;

For every Delaunay triangle the sum of the interpolation error of its vertices multiplied by its area is calculated;

The best point candidates to include in the design plan are the centers of gravity for triangles with the highest weight; then, in this research, the selected point is the closest point with rounded coordinates, which is more convenient for simulation.
Example of the Delaunay method with associated errors
M (x, y)  x = 0  x = 1  x = 2  E (x, y)  x = 0  x = 1  x = 2 

y = 2  3  3  3  y = 2  0.70  0.48  0.70 
y = 1  2  2  2  y = 1  0.57  0.53  0.57 
y = 0  1  0  1  y = 0  1.75  1  1.75 
The method divides the space in eight triangles of equal area. The maximum error is found at the points (0,0) and (2,0) equal to 1.75. In this case, the twobottom triangles will most likely be chosen for new simulations (blue crosses), this is where more accuracy is needed. The method detects the most problematic point, here the only point not in the plan z = y + 1, and refines around it.
To summarize, the Delaunay triangulation method and a greedy algorithm are used here to select appropriate new simulation points. With such a formulation, the gain of the selected point is maximized.
2.4 1D law
Once the appropriate simulation points are selected and computed (the lookup table is filled), a 1D law can be developed to couple it with current transport models which are all one dimensional. Simulations are time consuming and therefore can only be done in a very small network, but it is impossible in a real one. So, a 1D model should be designed in order to predict the transport in an operating network that can be used in real time. It uses the lookup table of the simulations results and determines the proportion of mixing with the help of the Kriging interpolation. The simulations are executed based on the following scenario: pure water coming from In1 and contaminated water coming from In2. The law first needs to be generalized in case of any water concentration at each inlet.
θ* is the coefficient saved in the lookup table. θ* is bounded from below by −1 and from above by +1. In practice θ* was found in the range [−0.056, 0.361].
From \( {\uptheta}^{*}\left({R}_1^{in},{R}_1^{out},\ \mathrm{R}\mathrm{e},\frac{\mathrm{L}}{\mathrm{D}}\right) \), that is interpolated at values which are not in the table by the Kriging method, \( \uptheta \left({R}_1^{in},{R}_1^{out},\ \mathrm{R}\mathrm{e},\frac{\mathrm{L}}{\mathrm{D}}\right) \) is calculated from Eq. (14).
We thus have a system of three equations and six unknowns (C_{3}, C_{4}, θ_{13}, θ_{23}, θ_{14}, θ_{24}), since we know the flows, C_{1} and C_{2}. To resolve the system, we need three more constrains, they can be found as follows:
C_{3} and C_{4} can be calculated from θ, C_{1}, C_{2} and the flows rates.
These equations allow the definition of a law that can be used for every double Tjunction (with equal diameters). CFD simulation results have helped to fill a lookup table with a nondimensional indicator of the deviation from the perfect mixing. A system of equations that generalizes the case of an introduction of a contaminant only at inlet 2 to both inlets is derived. Firstly the Kriging interpolation is used to determine the coefficient θ and then is put as input in Eq. (21) to get the concentration at the outlets.
For instance, let’s consider a Double Tjunction with a diameter of 0.1 m and an interpipe of length L = 5D. The flow rates are for each input and output such that Reynolds numbers are Re1 = Re2 = Re3 = Re4 = 2500. The four parameters are respectively, Re = 5000, L = 5, \( {R}_1^{in} \) =50, \( {R}_1^{out} \) =50. The interpolation function returns θ = 0.6, then θ_{2} = 0.6 and θ_{1} = 0.4. Let’s say that a contaminated water comes from inlet1 with C_{1} = 1 mg/L and another water at inlet 2 with C_{2} = 4 mg/L then the concentration on both outputs are: C_{3} = 2.8 mg/L and C_{4} = 2.2 mg/L.
3 Results
In this part the results are given and interpreted. First the Kriging calibration and the explanation for the parameter choice are described. Then, it is shown how the Delaunay triangulation helps to choose the design points and reduces the computational overall cost. Finally, the CFD simulation results, for different Reynolds numbers and contaminant inletexit ratios (Fig. 14), are given and interpreted to explain the behavior of the imperfect mixing in Double Tjunctions depending on the different entry parameters.
3.1 Kriging calibration
This part follows the theory on the calibration of the Kriging parameters. It has been shown that after simplification, the Eq. (15) can be used to determine the parameters (σ, θ_{k} and γ _{ k }).
For k between 0 and 3 and SK, there are 3 regions for α. If α is too small (<0.45), the R matrix may not be invertible (because it is not regularized enough), therefore its determinant is zero and the function f equals infinity. On the other hand, if α is too large (>0.6), the correlation matrix may be too close to (1 + α)I_{n}, therefore its determinant is approximately (1 + α)^{n}, the matrix is invertible but its determinant in floatingpoint arithmetic is +infinity.
To get the optimized parameters, the system presented in the Appendix (Eq. 24) has been resolved by choosing \( \tilde{\uptheta}=4 \) at first iteration (because visually near the minimum) and α = 0.5, for k =0, 1, 2, 3:
Result of optimization of the Kriging parameters by resolving the loglikelihood function with respect to the shape parameter theta and the regularization parameter for no polynomial and polynomial degree equals to 0, 1, 2 and 3
Polynomial degree  No polynomial  k = 0  k = 1  k = 2  k = 3 

\( \tilde{\uptheta} \)  2.76  2.81  2.85  3.13  3.63 
α  0.5  0.5  0.5  0.5  0.5 
\( \mathrm{f}\left(\tilde{\uptheta},\upalpha \right) \) initial  2902.92  2895.64  2891.3  2855.29  2806.2 
\( \mathrm{f}\left(\tilde{\uptheta},\upalpha \right) \) optimal  2866.93  2864.77  2863.32  2841.27  2804.62 
average error  1.75  1.94  1.86  1.82  
standard deviation  3.40  3.24  2.83  2.37  
min  0.02  0  0  0  
max  35.19  34.09  31.4  26.86 
Finally, we have chosen k =3, \( \widehat{\upsigma} \), \( \widehat{\upbeta} \), \( \tilde{\uptheta}=3.63 \) and α = 0.5 with γ_{k} components all being fixed to 1 that correspond to a minimal standard deviation in this case.
3.2 Delaunay triangulation
In the Theoretical part it was shown that the Delaunay triangulation can be used for the design of simulation points. Here, it is described how it can be also used to reduce the computational cost overall compared to a classical Structured design algorithm.
Delaunay points for distance = 5D and Re = 1000
Number  \( {R}_1^{in} \)  \( {R}_1^{out} \)  Mean. error  Max error  Number  \( {R}_1^{in} \)  \( {R}_1^{out} \)  Mean. error  Max error 

0  30  30  5.1  14.1  6  60  80  4.4  11.1 
0  30  70  5.1  14.1  7  80  30  3.9  13.3 
0  50  50  5.1  14.1  8  80  20  4.1  12.4 
0  70  30  5.1  14.1  9  70  20  4.1  12.4 
0  70  70  5.1  14.1  10  80  80  4.2  12.4 
0  50  30  5.1  14.1  11  70  80  3.7  12.4 
0  50  70  5.1  14.1  12  70  10  3.6  13.3 
0  30  50  5.1  14.1  13  90  10  3.8  9.8 
0  70  50  5.1  14.1  14  80  10  3.8  9.8 
1  80  40  5.2  14.7  15  40  60  3.7  9.6 
2  80  60  4.9  13.9  16  70  60  3.3  12 
3  60  60  5.1  14.3  17  90  20  3.3  12 
4  60  40  5.3  11.9  18  50  20  3.3  12 
5  80  50  4.5  11.9  19  50  90  3.0  8.2 
The Delaunay method has been used for space partitioning for selecting new CFD simulations to perform. At each step, it calculates the absolute interpolation errors, which can be used as a stop criterion. For instance, if we have fixed the mean error at 3 as the criteria of convergence, there is no need to continue the simulations after the 19th simulation. It gives an effective way to consume less computational time, by favoring simulations that give the most information.
For both average and maximum interpolation error, the Delaunay method gives better results with a steady average behavior of error decreasing. For the average error, both methods give similar results at first, until a point when the Delaunay method error stays smaller compared to the Structured error. For maximum error, the Structured method doesn’t have a welldefined behavior compared to average steady decrease of the Delaunay method. Each new peak of increase can be explained by new regions of space not well modeled. The Delaunay triangulation is then selecting points in that region until the error decreases again. This justifies the use of the Delaunay method over the Structured method.
The Delaunay method has been used for space partitioning for selecting new CFD simulations to perform. At each step, it calculates the absolute interpolation errors, which can be used as a stop criterion. For instance, if we have fixed the mean error at 3 as the criteria of convergence, there is no need to continue the simulations after the 19th simulation. It gives an effective way to consume less computational time, by favoring simulations that give the most information.
3.3 Simulation results and interpretations
In this part, the CFD simulation results and the parameters influence on the behavior of the mixing in the Double Tjunctions, are given and interpreted.
Results of the CFD simulations for different parameters (nonexhaustive)
Distance (in diameter)  Reynolds number  \( {R}_1^{in} \)  \( {R}_1^{out} \)  Z= \( ave\ {R}_1^{out} \)  \( ave\ {R}_2^{out} \)  Distance (in diameter)  Reynolds number  \( {R}_1^{in} \)  \( {R}_1^{out} \)  Z= \( ave\ {R}_1^{out} \)  \( ave\ {R}_2^{out} \) 

5  1000  20  20  21.6  78.4  5  10,000  50  50  62.5  37.5 
5  1000  20  80  81.1  18.9  5  10,000  50  70  82  18 
5  1000  30  30  30.1  69.9  5  10,000  70  50  69  31 
5  1000  30  70  71.7  28.3  8  5000  30  30  31  69 
5  1000  70  30  58.8  41.2  8  5000  30  50  50  50 
5  1000  70  70  93.4  6.6  8  5000  30  70  70  30 
5  1000  80  20  54.8  45.2  10  1000  20  20  21.5  78.5 
5  1000  80  80  86.3  13.7  10  1000  20  80  81.5  18.5 
5  5000  20  20  20  80  10  1000  30  30  32.5  67.5 
5  5000  20  80  79  21  10  1000  30  70  70.5  29.5 
Now, CFD simulations are plotted and interpreted. First is given the repartition of simulations that have been carried out for the four parameters (Re, L, \( {R}_1^{in} \) and \( {R}_1^{out} \)). Then, two ways of interpreting the results are presented. One is by fixing the Reynolds number and the distance, the other by fixing the inlet and outlet Reynolds ratios.
All simulation points have been gathered on
More than 250 simulations have been made to describe the phenomenon in four directions (Reynolds, inter T distance, \( {R}_1^{in} \) and \( {R}_1^{out} \)). The results have been interpolated and projected on two different spaces (\( {R}_1^{in} \), \( {R}_1^{out} \)) and (Re, L). When the first input is dominated (\( {R}_1^{in} \) < 50) the mixing is perfect. The mixing becomes imperfect when \( {R}_1^{in} \) increases. This behavior shift is more pronounced for laminar cases whatever the inter Tjunction distance, and progressive in turbulent cases. There is a maximum of imperfect mixing around \( {R}_1^{in} \) = 70. The mixing tends to perfect mixing when the inter Tjunction distance increases, it is almost perfect for L = 20D in the turbulent case. It also decreases when the Reynolds number is increased but tends to equilibrium that may not be perfect mixing (tends to 10 when L = 5D, % \( {R}_1^{in} \) =70, \( {R}_1^{out} \) = 50). The behavior described can be explained by looking into the longitudinal section of the double Tjunction. The mixing is created by hitting the walls, which depends on the ratios of the flow rates in input and output.
4 Conclusions
In this paper, the objective was to improve water distribution quality transport modeling for security management in case of contamination events. The focus was made on mixing conditions at Double Tjunctions. Numerous 3D CFD simulations of different configurations of Double Tjunction mixing were performed and a 1D law for imperfect mixing was derived that is added to the full network transport model. The mixing was explored using four input parameters: Reynolds number in the interpipe, the length between the two Tjunctions and the ratio of Reynolds number at the inlets and at the outlets. As it is impossible to perform computations at every point, a problemspecific Kriging method was developed for interpolating mixing percentages at nonsimulated configurations. For sampling design we adapted a Delaunay triangulation method to determine new configurations to simulate.
To complement this study, two CFD simulation tools were mainly used, Code Saturne for direct numerical simulations (DNSs) and Fluent for Large Eddy Simulation (LESs). The results of the simulations were included in a lookup table and were interpolated with the interpolation Kriging method.
The parameters of this method were optimized for the problem by minimizing a loglikelihood function. As the problem is not strictly convex and not defined everywhere, choices were made to simplify the problem allowing a linear system of equations to be solved.
Moreover, a Delaunay method was used to optimize the repartition of simulation points and therefore the sampling design. The Kriging interpolation was then coupled with the Delaunay triangulation method and was compared to a Structured algorithm and performed better with fewer points. It shows that the Delaunay triangulation is a simple and efficient method to find new points of simulation reducing the number of calculations to be made.
The results were interpreted by fixing both the Reynolds number and the length of the interpipe, or both the Reynolds number ratio at the inputs and at the outputs. The contamination was introduced through one of the two inlets, namely inlet In2. The results show that perfect mixing still occurs when inlet In2 is dominating. It is due to the fluid coming from the input 2 going straight to the wall, creating a lot of turbulence. In the other cases, we observe imperfect mixing with a peak at around \( {R}_2^{in} \) =30. It can also be seen that when the length increases the mixing becomes perfect for all configurations, except in laminar cases where imperfect mixing can still be observed for a length of 20 diameters. In the same way, the increase of the Reynolds number decreases the imperfect mixing impact, but at some point, it converges to a value that may not be the complete mixing.
Finally, a 1D transport model was created and implemented. It considers advection/reaction along pipes, imperfect mixing for Double Tjunctions, and perfect mixing for simple junction nodes. For imperfect mixing the mean crosssectional concentration at the two outlets was calculated. The result depends on the Reynolds number at half distance, on the two inlet and outlet flow rate ratios and on the interpipe length. A lookup table was deduced from the CFD simulations, and the Kriging method was used for points that are not in the table. In cases of imperfect mixing, the interpipe length is most likely small and therefore the transport inside such pipe is neglected. The concentrations at the beginning of the outlet pipes depend directly on the flow rates and concentration of the end of the inlet pipes based on the 1D law defined in this paper.
This article gives a procedure to create a reduced order model for any problem with high computing demanding simulations and multiple parameters. The first step is to define a basic design of experiment, for instance a coarse design of points. From those simulations, the Kriging parameters are calibrated solving an optimization problem. Then the Delaunay triangulation method is used to get new simulation points that reduce the overall error of interpolation. Afterward, a lookup table is filled for values with smallest numerical error. Finally, this table is used with the Kriging interpolation to define a 1D law that defines the reduced order model. This model can be used in real time as contrary to the simulations.
This study was performed for the general case of Double Tjunctions, composed of pipes with the same diameter, and no slipwall condition in CFD simulations. Future research will consist of generalization of the mixing law to pipes of unequal diameters and for pipes with large roughness that influences the turbulence inside the Double Tjunctions.
Declarations
Acknowledgments
We wish to acknowledge the three following institutes for letting us use their computation cluster to carry out the simulations performed in this project:
 Mésocentre de Calcul Intensif Aquitain (MCIA), Avakas supercomputer.
 Centre Informatique National de l’Enseignement Supérieur (CINES), Jade supercomputer.
 Irstea Clermont computation grid.
This work has been performed in the framework of the SMaRTOnlineWDN project. The SMaRTOnlineWDN project is supported by the German Federal Ministry of Education and Research (BMBF; project: 13 N12180) and by the French Agence Nationale de la Recherche (ANR; project: ANR11SECU006).
Authors’ contributions
All authors read and approved the final manuscript.
Competing interests
The authors declare that they have no competing interests.
Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
Authors’ Affiliations
References
 Abraham, W.: On the efficient design of statistical investigations. Ann. Math. Stat. 14(2), 134–140 (1943)MathSciNetView ArticleMATHGoogle Scholar
 Archambeau, F., Méchitoua, N., Sazik, M. Code Saturne: A Finite Volume code for the computation of turbulent incompressible flows – Industrial Applications. International Journal on Finite Volumes (2004)Google Scholar
 Boulos, P.F., Altman, T., Jarrige, P.A., Collevati, F.: An eventdriven method for modeling contaminant propagation in water networks. Appl. Math. Modelling. 18, 84–92 (1994)View ArticleMATHGoogle Scholar
 Braun, M., Bernard, T., Ung, H., Piller, O., Gilbert, D.: Model based investigation of transport phenomena in water distribution networks for contamination scenarios. Procedia Engineering. 70, 191–200 (2014)View ArticleGoogle Scholar
 Chauvet, P., Galli, A.: Universal kriging, Centre de Géostatistique  Ecole des Mines de Paris (France). (1982)Google Scholar
 Yang, C.S., Kao, S.P., Lee, F.B., Hung, P.S. Twelve different interpolation methods: a case study of surfer 8.0. National Chung Hsing University, Taichung, Taiwan, ROC and Feng Chia University, Taichung, Taiwan, ROC (2004)Google Scholar
 Choi, C.Y., Shen, J.Y., Austin, R.G.: Development of a Comprehensive Solute Mixing Model (AZRED) for DoubleTee, Cross, and Wye Junctions. Water Distribution Systems Analysis 2008, 1–10 (2008)View ArticleGoogle Scholar
 Conn, A.R., Gould, N.I.M., Toint, P.L.: Global convergence of a class of trust region algorithms for optimization with simple bounds. SIAM J. Numer. Anal. 25(2), 433–460 (1998)MathSciNetView ArticleMATHGoogle Scholar
 Constans, S., Bremond, B., Morel, P.: Simulation and control of chlorine levels in water distribution networks. J. Water Resour. Plann. Manag. 129(2), 135–145 (2003)View ArticleGoogle Scholar
 Costa, J.P., Pronzato, L., Thierry, E. A comparison between Kriging and Radial Basis Function networks for nonlinear prediction. Conference: Proceedings of the IEEEEURASIP Workshop on Nonlinear Signal and Image Processing (NSIP’99), Antalya, Turkey, June 20–23, 1999.Google Scholar
 Cressie: Statistics for spatial data. Wiley, New York (1993)MATHGoogle Scholar
 Fabrie, P., Gancel, G., Mortazavi, I., Piller, O.: Quality modeling of water distribution systels using sensitivity equations. J. Hydraul. Eng. 136(1), 34–44 (2010)View ArticleGoogle Scholar
 Ho, C.K., Khalsa, S.S.: EPANETBAM: water quality modeling with incomplete mixing in pipe junctions. In: Proceedings of the Water Distribution System Analysis Conference, Kruger National Park, South Africa. (SAND20083065C), p. 11. (2008)Google Scholar
 Yin, J., Ng, S.H., Ng, K.M. A study on the effects of parameter estimation on kriging model’s prediction error in stochastic simulations. Proceedings of the Winter Simulation Conference (2009)Google Scholar
 Kay, M.D., Beckman, R.J., Conover, W.J.: A comparison of three methods for selecting values of input variables in the analysis of output from a computer code. Technometrics 21(2), 239–245 (1979)MathSciNetMATHGoogle Scholar
 Porteau, http://porteau.irstea.fr/. Accessed on 22 Nov 2016.
 Rossman, L.A. EPANET users’ manual. U.S. Environmental Protection Agency, National Risk Management Research Laboratory, Office of Research and Development, Cincinnati (2000)Google Scholar
 Ung, H., Piller, O., Gilbert, D.: Quasireal time modeling for security of a drinking water distribution network. Procedia Engineering. 70, 800–809 (2014)View ArticleGoogle Scholar
 Waeytens, J., Chatellier, P., Bourquin, F.: Inverse computational fluid dynamics: influence of discretisation and model errors on flows in water network including junctions. J. Fluids Eng. 137(9), 17 (2015)View ArticleGoogle Scholar
 Wim C.M. van Beers, Jack P.C. Kleijnen. Kriging interpolation in simulation; a survey. Proceedings of the Winter Simulation Conference (2004)Google Scholar