Abstract
A Lagrangian method to simulate the advection, dispersion, and reaction of a single chemical, biological, or physical constituent within drinking water pipe networks is presented. This Lagrangian approach removes the need for fixed computational grids typically required in Eulerian and Eulerian-Lagrangian methods and allows for nonuniform computational segments. This makes the method fully compatible with the advection-reaction water quality engine currently used in EPANET. An operator splitting approach is used, in which the advection-reaction process is modeled before the dispersion process for each water quality step. The dispersion equation is discretized using a segment-centered finite-difference scheme, and flux continuity boundary conditions are applied at network junctions. A staged approach is implemented to solve the dispersion equation for interconnected pipe networks. First, a linear relationship between the boundary and internal concentrations is established for every pipe. Second, a symmetric and positive definite linear system of equations is constructed to calculate the concentrations at network junctions. Last, pipe internal concentrations are updated based on the junction concentrations. The solution generates exact results when the analytical solutions are available and leads to more accurate water quality simulations than advection-reaction-only water quality models, especially in the areas where dispersion dominates advection.
Introduction
For nearly 30 years, engineers have used computational tools like EPANET and other commercial or research models to assess the hydraulic and water quality conditions of water distribution systems (Rossman 2000; Walski et al. 2003). Such tools are commonly used to design new water infrastructure components, solve water quality problems, and plan for future scenarios. Many drinking water quality problems have been studied through the use of these models, including low chlorine residuals, high water age that leads to elevated disinfection byproducts, mixing of different source waters, contaminant propagation and monitoring, and waterborne disease outbreaks (Panguluri et al. 2005).
Water quality within distribution systems can be impacted by the type of flow in the pipes. Laminar or turbulent flow can occur in pipes depending on the Reynolds number. Flow in pressurized pipe networks used for drinking water distribution is often highly turbulent, and in these cases, advection is the main mass transport mechanism. When laminar flow conditions occur, dispersion can play more of a role in mass transfer. Here, dispersion in a pipe refers to the tendency of constituents to spread out from high to lower concentrations. In laminar flow, it is caused by the combined action of molecular diffusion in the radial direction and nonuniform flow velocity profile over the cross section (Taylor 1953), whereas in turbulent flow, the transfer is mainly driven by the hydraulic turbulence (Taylor 1954).
Even in turbulent flow, a laminar boundary layer still exists and dispersion can have significant impact on mass transport, especially when the Reynolds number is below 10,000 (Levenspiel 1958). Additionally, understanding the dispersion process of a contaminant under certain hydraulic conditions is critical to predict the spread of the contaminant and calculate the amount of contaminated water in the pipes (e.g., after an accidental or intentional contamination event). In both laminar and turbulent flow, the spread and peak concentration of the contaminant is a function of the travel time and the dispersion coefficient (Fischer et al. 1979). Advection-only transport modeling does not consider dispersion, and mixing at junctions and storage facilities is the only dilution mechanism included in advection-reaction (AR) models. Having advection-dispersion-reaction (ADR) capability in EPANET and other modeling tools will enable the analysis of more diverse kinds of water quality problems under a wider range of flow conditions found within water distribution systems.
Simulating water quality, or the fate and transport of chemical, biological, or physical constituents (e.g., chlorine as a disinfectant) in turbulent conditions has been accomplished with a variety of methods. Both Eulerian and Lagrangian methods have been used to approximate solutions to the AR equations. A comprehensive review and numerical comparison of the AR algorithms can be found in the literature (Rossman and Boulos 1996). Liou and Kroon (1987) demonstrated that the time-driven Lagrangian methods were both computationally efficient and sufficiently accurate. A time-driven Lagrangian method was used for AR modeling in EPANET (Rossman 2000). The algorithm creates multiple computational cells, called water quality segments, and tracks, combines, and splits them as they are moved along the pipes according to advection and get mixed at network junctions. Because of the dynamic hydraulics, the number and length of the water quality segments change for each pipe throughout a simulation.
In turbulent flows within water distribution systems, the dispersive effect can often be neglected, especially in skeletonized network models. However, both laminar and transitional flow conditions can exist in the dead-end regions of a network and in premise plumbing systems (Abokifa et al. 2016; Burkhardt et al. 2020) where dispersion cannot be ignored.
It is challenging to solve the ADR transport problem because when the transport is advection-dominated, the equation to solve is close to a first-order hyperbolic equation; however, if the transport is dispersion-dominated, the equation is close to a second-order parabolic equation. In a water distribution system, advection-dominated and dispersion-dominated flow conditions can exist simultaneously within the network, and a pipe can experience both types of flow throughout a simulation as water demands can change dramatically at consumption points. Operator splitting methods, such as Eulerian-Lagrangian methods, have been used to solve the ADR transport problem within water distribution systems (Tzatchkov et al. 2002; Li 2006; Basha and Malaeb 2007) or in single dead-end pipes (Abokifa et al. 2016) to model the impact of dispersion.
In Eulerian-Lagrangian methods, the ADR transport process is split into the AR process and dispersion process, and they are solved separately. Tzatchkov et al. (2002) divided each pipe into grids with uniform size based on the pipe length, pipe flow velocity, and water quality time step, and discretized the dispersion equation with an implicit finite-difference scheme. The method of characteristics was used to solve the advection transport. In the Lagrangian stage, interpolation was applied to link the concentration at a computational point to the concentration at some upstream location. Basha and Malaeb (2007) applied nonuniform discretization to the network pipes and allowed the last computational cell in a pipe to have a different size from the others. The concentration at the center of the computational cells represents average concentration within the cell, and the mass of a constituent in the cell was calculated by multiplying the cell’s volume with its concentration. This discretization approach accounts for mass explicitly and was adopted in the present study. In both Eulerian-Lagrangian methods and the proposed Lagrangian method, a tridiagonal system of linear equations was formed for each pipe after first-order discretization of the dispersion equation. The system of equations can be efficiently solved using classical numerical algorithms, such as the Thomas algorithm.
Another consideration of these methods is how dispersion is handled at network junctions. Basha and Malaeb (2007) assumed no dispersion at network junctions, and the concentrations obtained in the Lagrangian stage were used as pipe boundary conditions in the Eulerian stage. Tzatchkov et al. (2002) considered dispersion at the junctions by applying the numerical Green’s function to establish a linear relationship between a pipe’s internal and boundary concentrations. The mass balance condition was applied to the junctions, and a linear equation system was solved to obtain the junction concentrations before pipe internal concentrations were updated accordingly.
Although the Eulerian-Lagrangian approaches were successful, they were not directly implementable with the Lagrangian-only scheme used in EPANET. This is because the Eulerian-Lagrangian approaches require a fixed computation grid, whereas the Lagrangian-only method as implemented in EPANET uses dynamic water quality segments that move with the flow. A Lagrangian method to solve the ADR equation has been applied to river water quality studies (Fischer 1972; Schoellhamer and Jobson 1986) in which the constituent mixing was calculated based on the flow exchange of the neighboring water quality segments. This explicit method is very efficient and practical but requires small time steps to maintain numerical stability. Devkota and Imberger (2009) developed a fully Lagrangian method to solve the one-dimensional advection-diffusion equation in both steady-state and unsteady open-channel flows. This approach employed a Crank-Nicolson-type scheme that can be explicit, semi-implicit, or fully implicit.
Lagrangian methods do not require fixed computational grids, and the water quality segments move with the mean flow velocity. One advantage is that this removes the numerical diffusion caused by the concentration interpolation between fixed computational points. Combining water quality segments at junctions still introduces some numerical diffusion, but this can be controlled by selecting an appropriate water quality time step. Further, Lagrangian methods are easy to understand in a physical sense and are simple to implement algorithmically (Jobson 1980). The potential advantages of the Lagrangian methods and their successful applications to river water quality studies motivated the present work to develop a Lagrangian method to model ADR in water distribution systems in a way that can be adapted into EPANET.
This work presents the first implementation, to the authors’ knowledge, of a Lagrangian ADR solution for water distribution systems. This approach is directly compatible with the AR solution scheme used in EPANET, and three examples are presented to demonstrate its effectiveness.
Methodology
In every water quality time step, the proposed Lagrangian ADR method calculates dispersion after the AR process is modeled. For the dispersion process, the method solves tridiagonal systems of linear equations to get pipes’ internal concentrations and a symmetrical system of linear equations for concentrations at network junctions. The method to solve the dispersion equation is described in the following five sections. First, the operator splitting approach and discretization of the dispersion equation are illustrated for the Lagrangian methods. Second, the segment-centered difference scheme to discretize the dispersion equation for individual pipes is presented. Third, the flux continuity condition applied to network junctions is introduced. Fourth, the linear relationship between a pipe’s internal and boundary conditions is established. Finally, the procedures to compute the concentration at network junctions, given the AR solution and the linear relationship between a pipe’s internal and boundary concentrations, are described.
Operator Splitting and Discretization of the Dispersion Equation
One-dimensional ADR mass transport in a pipe with a uniform cross-sectional area can be described as follows:
| (1) |
where x = distance alone the pipe; c = constituent concentration; v = averaged flow velocity; D = effective dispersion coefficient; and γ = constituent’s reaction rate, which is a function of c.
Fig. 1 shows schematically how the Lagrangian method developed in this research is used to solve Eq. (1) in a pipe under hydraulic velocity, v. The pipe contains multiple water quality segments, and each segment is assumed to be completely mixed. The concentration at the center of the segment represents the average concentration across that segment. The constituent concentration at the time step n for the segment i is defined as . The water quality segments are advected with the mean flow velocity v for one water quality time step, Δt, and the water quality segment concentration is updated from to according to the reaction function. At this moment, only advection and reaction are modeled, and so a indicates that this is an intermediate step in updating the concentration that only incorporates advection and reaction but not yet dispersion. The dispersion process is then solved through a first-order implicit discretization
| (2) |
where = concentration in the segment i after solving the AR process; li = length of the segment i; and 0.5(li+l + li) = distance between the centers of the segments i + 1 and i.
Fig. 1.
Nonuniform pipe discretization and Lagrangian transport.
Eq. (2) can be rearranged into a tridiagonal form
| (3) |
With uniform segment size, Eq. (3) can be simplified
| (4) |
where Δx = segment length.
Eq. (4) is the same as the first order discretization previously used by Tzatchkov et al. (2002) to solve the dispersion process within a Eulerian-Lagrangian method. The key difference of the present Lagrangian approach is that the computational segments move with the flow, whereas the computational grid is fixed in space in Eulerian-Lagrangian methods. Fig. 1 shows the updating of the constituent concentration in segment i at time step n + 1 () and the dispersion of some of the simulated constituent to its neighboring water quality segments.
Segment-Centered Difference Scheme
In a Lagrangian method, water quality segments travel with the mean velocity of the water in the pipe, and the longitudinal dispersion occurs due to the concentration gradient between the neighboring segments. Fig. 2 shows the segment-centered discretization used in the present Lagrangian method.
Fig. 2.
Segment-centered discretization.
Because there is no computational point at either boundary in the segment-centered scheme, two ghost segments are introduced: Segment 0 with the size of the upstream (left) segment is added to the upstream end and segment s + 1 with the size of the downstream (right) segment is added to the downstream end. For the Dirichlet boundary conditions, the ghost segment values can be eliminated through linear extrapolation
| (5) |
| (6) |
where cj = concentration at the pipe’s upstream boundary (junction j); ck = concentration at the pipe’s downstream boundary (junction k); c1 = concentration of the upstream segment; and cs = concentration of the downstream segment.
Combining Eqs. (3), (5), and (6) eliminates the ghost segment concentrations and leads to a set of linear equations. Without losing generality, equal segment length is assumed here and Eq. (4) is used instead of Eq. (3) to demonstrate the mathematical form of such a linear system of equations
| (7) |
where α = D(Δt/Δx2).
For the Neumann boundary conditions, the concentration gradients on the upstream and downstream boundaries of a pipe can be specified as follows:
| (8) |
| (9) |
Replacing the ghost segment values based on Eqs. (8) and (9), another tridiagonal linear equation system can be written
| (10) |
When the dispersion coefficient value D approaches zero, α also approaches zero and the square matrix on the left side of Eqs. (7) and (10) approaches a unit matrix. As expected, for very small D values, dispersion has little impact on the final water quality modeling results and the ADR solution will not differ much from the AR solution.
Flux Continuity Condition at Network Junctions
The linear system of equations, Eqs. (7) or (10), can be used to solve the one-dimensional dispersion problem for any pipe that is subject to specific boundary conditions. The coefficient matrix is tridiagonal and strictly diagonally dominant. In a realistic water distribution network, junctions can be connected to multiple incoming and outgoing pipes. A simple solution to get the constituent concentrations at the network junctions is to assume that there is no dispersion at the network junctions and the junction concentrations are determined by the AR process only (Basha and Malaeb 2007).
If dispersion at the network junctions is included and dispersion occurs between neighboring pipes, concentrations both at the network junctions and inside the water quality segments need to be solved simultaneously. Considering the size of a pipe network and the total number of the water quality segments, the size of the system including all the unknown concentration variables can be very large. A more computationally efficient approach is to solve the junction concentrations first and then update the segment concentrations based on the junction concentrations. In order to implement such a staged approach that solves the junction concentrations and segment concentrations separately, the relationship between a pipe’s end concentrations and segment concentrations needs to be established.
Tzatchkov et al. (2002) constructed a control element around a junction and applied the mass-balance condition to the element. The control element comprises half of the computational cell from every incoming or outgoing pipe. In the segment-centered scheme used here, the water quality segments account for all the pipe volume, and it can be assumed that the control element around the junction is infinitely small with no mass accumulation. Such a flux continuity condition is expressed
| (11) |
where j = junction index; Ij = set of the pipes connected to the junction j; Dp = effective dispersion coefficient in the pipe p; ap = cross sectional area of the pipe p; and (∂cp/∂dx)j = concentration gradient evaluated at the junction j for the pipe p. The gradient is defined
| (12) |
where cj = concentration at the junction j; cpj = segment concentration at the j end of the pipe p; and lpj = length of the segment.
Combining Eqs. (11) and (12) for any junction j leads to
| (13) |
In order to solve Eq. (13) for junction concentrations, concentrations at a pipe’s end segments need to be represented by the junction concentrations, i.e., the values of cpj in Eq. (13) need to be expressed explicitly as a function of the concentrations at the network junctions.
Solution for Individual Pipes
For a pipe linking the junction j and k, as shown in Fig. 2, the general form of Eq. (7) is given in Eqs. (14) and (15)
| (14) |
| (15) |
where A is a tridiagonal matrix, and the diagonal elements are
where li = length of the segment with index i.
In a general Lagrangian transport scheme, A is most likely a nonsymmetric matrix because of the nonuniform segment length. With the first-order differentiation, the matrix is always tridiagonal and strictly diagonally dominant. Therefore, the matrix is invertible, and the linear system of equations Ac = b has a unique solution.
The right side of Eq. (14) can be decomposed into
| (16) |
where h is the vector that contains the initial segment concentrations after AR process
Three tridiagonal linear systems, Aηh = h, Aηl = l, and Aηr = r, are solved and based on the linear superposition, the solution to Ac = b is
| (17) |
The vector αh is the contribution to the ADR solution by the segment concentrations obtained after the AR process modeling. The vectors βl and βr contain the impact on segment concentrations by boundary conditions at a pipe’s two end junctions.
Solution for Network Junctions
Eq. (17) links water quality segment concentrations to junction concentrations through a set of linear equations. A similar approach was described as the numerical Green’s function technique in the literature (Tzatchkov et al. 2002). This section describes how the junction concentrations are updated in the dispersion process solution.
With Eq. (17), the flux continuity equation at any junction j [Eq. (13)] can be rewritten
| (18) |
where p → j = index of the junction at the other end of the pipe p; cp→j = concentration at the junction p → j; hpj = contribution of the segments’ initial conditions to cpj; wpj = impact coefficient of the cj on cpj and = impact coefficient of the cp–>j on cpj. If the first water quality segment is on the junction j end, then hpj, wpj, and correspond to the first element in the vectors βh, βl, and βr, respectively; otherwise hpj, wpj, and correspond to the last element in the vectors βh, βl, and βr, respectively.
Eq. (18) is set up for every network junction and a linear system of equations with the size of the number of junctions is constructed
| (19) |
where c is the vector of the junction concentrations after dispersion; and r is a vector containing the right side of Eq. (18), i.e., rj = ∑p∈Ijhpj(Dpap/lpj). The coefficient matrix on the left side of the linear system, defined as B, is sparse with nonzero elements at diagonal elements and any nondiagonal element (j, k) if there is a pipe connecting the junction j to k. According to Eq. (18)
| (20) |
| (21) |
where p(j, k) = index of the pipe linking junction j and k.
An interesting characteristic of the matrix B is, for any pipe p(j, k)
| (22) |
This feature makes Eq. (19) easy to solve because the coefficient matrix B is symmetrical, i.e., Bjk = Bkj.
This relationship between the impact coefficients on the segment concentration and the segment length is illustrated using a pipe with three segments as shown in Fig. 3. The pipe index p(j, k) is omitted from the notations for brevity.
Fig. 3.
Impact of a pipe’s junction concentrations on its segment concentrations.
The first-order implicit difference scheme was applied to the three segments in Fig. 3, and three algebraic equations are obtained
| (23) |
| (24) |
| (25) |
The tridiagonal coefficient matrix A written in the form of a tridiagonal matrix is
| (26) |
The tridiagonal system Ac = cl for this three-segment pipe can be solved, given unit boundary concentration at the junction j, to get the impact coefficient of cj on the concentration of Segment 3
| (27) |
Similarly, the tridiagonal system Ac = cr for this pipe can be solved to get the impact coefficient of ck on the concentration of Segment 1
| (28) |
where det(A) is the determinant of the matrix A.
The ratio of the two linear impact coefficients is the same as the ratio of segment lengths:
| (29) |
For a pipe with s segments, based on the tridiagonal matrix characteristics (Usmani 1994), the impact coefficient of the upstream junction (junction j) concentration on the downstream segment (segment s) concentration can be calculated
| (30) |
And the impact coefficient of the downstream junction (junction k) concentration on the upstream segment (Segment 1) concentration is
| (31) |
As mentioned previously, matrix A is strictly diagonally dominant, and that is why the determinant of A, det(A), is always nonzero. Again, the ratio of the impact coefficients is the same as the ratio of the segment lengths
| (32) |
Additionally, the sum of the impact coefficients on any water quality segment cannot be larger than 1.0. Otherwise the segment concentration would be larger than 1.0 mg/L when both boundary conditions are 1.0 mg/L and segment initial concentrations are all zero. Physically that is not possible for dispersion. Mathematically, the following relationship can be expressed for the segment at junction j end of the pipe p(j, k):
| (33) |
Eqs. (20)–(22) and (33) show that the matrix B is not only symmetrical, but also diagonally dominant and therefore positive definite. Cholesky decomposition, which is used to solve the nodal head equations in EPANET, can then be utilized to solve the set of junction concentration equations, i.e., the set of Eq. (18), for all the junctions in a network.
Algorithm Implementation
The algorithm to solve the one-dimensional ADR equation was added to the Lagrangian AR algorithm currently implemented in the EPANET codes (Rossman 2000). As in EPANET, a pipe is divided into multiple water quality segments where constituent concentration is assumed to be represented by the segment’s center concentration. In order to reduce the possible numerical diffusion in the dispersion solver, pipes are initialized with more than one water quality segment and, as implemented in EPANET, a water quality accuracy threshold is used to control the generation of new segments and combination of existing segments.
For every water quality time step, dispersion is solved after AR process is solved using the algorithm already implemented in EPANET. The algorithm to solve dispersion for a water quality time step is as follows:
A tridiagonal pipe coefficient matrix A[Eq. (15)] is established for each pipe using the segment-centered difference discretization.
The segment concentrations obtained after solving AR process are used as the initial segment concentrations for the dispersion solver.
The tridiagonal system of equations [Eq. (14)] is solved three times for each pipe to obtain the impact of initial and boundary conditions on the segment concentrations. The linear relationship linking a pipe’s segment concentrations to its initial and boundary conditions is shown in Eq. (17).
A linear system of equations [Eq. (19)] is constructed for network junction concentrations by assuming flux continuity at network junctions and applying the linear relationship between the junction and segment concentrations that is obtained in Step 3. The coefficient matrix on the left side of the system, B, is defined by Eqs. (20) and (21) and it is symmetrical because of Eq. (22).
The symmetrical linear system of equations that is built in Step 4 [Eq. (19)] is solved to get the junction concentrations using the symmetrical matrix solver implemented in the EPANET hydraulic solver.
Eq. (17) that is obtained in Step 3 is evaluated for all the pipes based on the junction concentrations calculated in Step 5 and the segment concentrations are updated.
Two assumptions are made here:
For links other than pipes, such as the pumps and the valves, there is no segmentation, and it is assumed that there is no dispersion within these links and between them and the connected network junctions.
To avoid the further complexity introduced by the tank mixing model, tank concentration is assumed to not be affected by the dispersion between a tank and pipes that are connected to the tank. Because the pipes connected to the tanks are usually in highly turbulent condition, it is reasonable to assume that dispersion has little impact on the tank concentration.
Simulation Examples
This section presents three examples using the Lagrangian ADR algorithm as implemented within EPANET and described in the previous sections. The first two examples are tested against analytical solutions: (1) a constant source concentration, and (2) a short duration pulse concentration change at the source. The final example includes one of EPANET’s example models, Cherry Hill/Brushy Plains (Net2 in the EPANET program), and associated tracer measurement data to simulate a more realistic system.
Example 1
This example was modified from an illustrative network (Axworthy and Karney 1996) and is shown in Fig. 4. It simulates a step-change in concentration of an unspecified constituent supplied to the system at Node S. The diameter of all the pipes in this simple system is 0.5 m. Junction E is the only node with water demand and so water leaves Node S and flows through the 11-pipe network with the flow velocity of 0.004 m/s. Because there is no demand at these intermediate junctions, theoretically the results should be the same as the results from a long pipe without these intermediate nodes. The added source constituent concentration at Node S is 1.0 mg/L. The first 10 pipes are 100 m long each, and the 11th pipe from n10 to Junction E has the length of 10,000 m, making the water quality near Junction E zero for the duration of the simulation study. The constituent decays with a first-order rate constant of 6.417 × 10−6 s−1 and has a longitudinal dispersion coefficient of 13.68 m2/s. The water quality time step was set to 3 min.
Fig. 4.
Schematic diagram of a simple pipe network system.
The analytical solution (van Genuchten and Alves 1982) for such a semi-infinite domain is
| (34) |
with
| (35) |
where erfc( ) = complementary error function; and C0 = source concentration, which was set to be 1.0 mg/L.
The constituent concentration profile results at Simulation hour 47 are shown in Fig. 5. As shown in Fig. 5, the proposed Lagrangian ADR method matches the analytical results exactly. The difference between Lagrangian ADR and EPANET’s AR method is significant in this example in which a large dispersion coefficient is used. Further, when ADR is modeled without dispersion at the junctions, the results do not match either the analytical solution or the results of EPANET (i.e., the flux continuity condition leads to the correct solution but ignoring dispersion through the junctions creates significant deviation from the analytical results).
Fig. 5.
Numerical results for the simple pipe network with constant boundary condition (1 mg/L).
Example 2
In the second example, the same pipe network as in Example 1 was used (Fig. 4). A contaminant with the concentration of 10 mg/L was introduced at Junction S for the first hour of the simulation (i.e., a pulsed short-duration injection such as those frequently used in water security modeling exercises). The water quality time step was still set at 3 min, as in Example 1.
The analytical solution for such boundary condition can be found in van Genuchten and Alves (1982)
| (36) |
when t > t0 where c0 = 10.0 mg/L and t0 = 3,600 s for this example; u is defined in Eq. (35); and erfc() = complementary error function.
The results are shown in Fig. 6 for Simulation hour 3. Like Example 1, the Lagrangian ADR produced the same results as the analytical solution. Transport by advection alone requires more than 3 h to reach node n1 and therefore concentrations simulated by EPANET are zero at all the junctions at Simulation hour 3. This shows the importance of considering dispersion when contamination happens at upstream locations. Advection only modeling can underestimate the spread of the contamination and overestimate the time that is needed for the contaminant to reach the consumer ends.
Fig. 6.
Numerical results for the simple pipe network with rectangular pulse boundary condition (10 mg/L for the first hour).
As in Example 1, neglecting dispersion at the junctions slows down the propagation of the contaminant significantly. This shows that to accurately predict contaminant transport, dispersions both within a pipe and between pipes need to be included in the water quality modeling, especially for laminar flow conditions.
Example 3
This example demonstrates the capability of the Lagrangian ADR solution to handle both laminar and turbulent flow conditions simultaneously. The Cherry Hill/Brushy Plains network (Fig. 7) model that came as an example input file in the EPANET 2.0 program (Rossman 2000) was used. Field-measured fluoride concentrations were available to assess the accuracy of the EPANET water quality model (Rossman et al. 1994). It has been shown that EPANET’s AR simulation results matched the observed data very well at advection-dominated part of the network. But in the dead-end areas with low velocities, EPANET failed to represent the water quality changes (Tzatchkov et al. 2002).
Fig. 7.

Cherry Hill/Brushy Plains network with water quality sampled locations.
In application to real networks, the dispersion coefficients need to be determined according to the changing hydraulic conditions. For laminar flow with complete cross-sectional mixing in the pipe, the dispersion coefficient is given as follows (Taylor 1953):
| (37) |
where r = pipe radius; v = flow velocity; and D0 = molecular diffusion coefficient, which is assumed to be 1.2 × 10−9 m2/s in this example.
Given dynamic flow conditions in a water distribution system, a complete cross-sectional mixing condition may never be reached, and the final steady-state dispersion coefficient given in Eq. (37) usually overestimates the dispersion. To account for this, a time-dependent dispersion coefficient in steady-state laminar flow can be expressed
| (38) |
where τ = elapsed time; and C = constant number. In this study, a value for C of 12.425 as used in Basha and Malaeb (2007) was adopted, and the water travel time within a pipe (pipe length divided by flow velocity) was used as the elapsed time τ. This is based on the findings that in steady-state condition, the longer the travel time within a pipe, the closer the pipe’s effective dispersion coefficient gets to the Taylor’s formula, i.e., Eq. (37). When the dimensionless time, D0t/r2, is larger than 0.5, the diffusivity calculated with Eq. (38) is basically the same as with Eq. (37). This approach obviously neglected the impact of velocity changes and was empirical rather than mathematically rigorous. But it is easy to implement and does not introduce additional computational cost. The investigation of the most appropriate formulas to efficiently calculate the dispersion coefficients under changing laminar flow conditions is out of the scope of the present study and is an interesting research topic by itself (Lee 2004).
Under transitional and turbulent flow conditions, advection dominates dispersion, and the transport modeling results are less sensitive to the dispersion coefficient equation than in laminar flow. The formula implemented by Basha and Malaeb (2007) was used here
| (39) |
where R = flow’s Reynolds number; and u* = shear velocity of the flow.
The simulation was run for 55 h with a water quality time step of 1 min. The concentration of fluoride, a conservative tracer, was modeled using both EPANET (AR solution) and the proposed Lagrangian ADR solution and the results were compared with the observed fluoride concentrations.
The two dispersion coefficient models for laminar flow were used for comparison purposes. As shown in Fig. 8, the ADR-37 curve was generated with Eq. (37) as the dispersion coefficient model, whereas ADR-38 was generated with Eq. (38). Fig. 8 shows that for Junctions 11 and 25, which are in the advection-dominated zones, the choice of the laminar flow dispersion coefficient model does not have much effect on the transport results. EPANET, which does not model dispersion, generated similar results to the ADR model. Both EPANET and the proposed ADR solver generate simulation results that are very close to the observed data.
Fig. 8.
Simulated fluoride tracer concentrations against field measurements at four junctions within Cherry Hill/Brushy Plains network.
In contrast, for Junctions 34 and 10, which are located within the end areas of the network, the fluoride concentrations are more affected by dispersion. EPANET’s simulation results significantly differ from the observed data, whereas the ADR model represents the observed fluoride measurements much better.
For the ADR solver, the choice of the laminar flow dispersion coefficient model impacts the modeling results. The dispersion coefficient calculated based on Eq. (37) is larger than that calculated based on Eq. (38). This can explain why the ADR-38 curve lays between the EPANET curve and the ADR-37 curve most of the time. Both ADR-37 and ADR-38 curves are closer to the observed curve than the EPANET results. Especially for Junction 10, the ADR model predicts the fluoride concentrations much better than EPANET. The discrepancies that still exist between the simulated and the observed results was likely caused by both an inadequate dispersion coefficient model and the difficulties of calibrating the network water demand (Rossman et al. 1994).
In order to understand the relative importance of the dispersion process within a real network, such as this example network, the dimensionless dispersion coefficient [equal to D/(2vr)] was calculated for all the pipes over the simulation period. Eqs. (38) and (39) were used to calculate the effective dispersion coefficients in laminar and turbulent flow, respectively. Eq. (38) was chosen for laminar flow because most likely it is closer to the reality than Eq. (37). According to the literature (Levenspiel 1958; Hart et al. 2016), for turbulent flow with Reynolds number larger than 5,000, the dimensionless dispersion coefficient is typically below 2.0; however, for highly turbulent flow (Reynolds number larger than 50,000), the dimensionless dispersion coefficient is much less than 1.0. In laminar flow, the dimensionless dispersion coefficient is highly variable and can be much larger than in turbulent flow. Therefore, the dimensionless dispersion coefficient can be used as a measurement of the relative importance of the dispersion effect.
The cumulative distributions of the dimensionless dispersion coefficient and Reynolds number were calculated and are shown in Fig. 9. There are 40 pipes in the example network and the hydraulic simulation includes 55 steps. All the pipes were sampled for every hydraulic time step. Fig. 9 shows that about 23% of the flow conditions are highly turbulent with Reynolds number larger than 50,000 and about 26% of the flow conditions are laminar with Reynolds number less than 2,000. For the dimensionless dispersion coefficient, about 25% of the values are larger than 5 and about 9% of the values are larger than 20. It is clear from Fig. 9 that dispersion is an import mechanism for mass transport at least in part of this network, for example, around Junctions 10 and 34.
Fig. 9.
Cumulative distribution of Reynolds number and dimensionless dispersion coefficient for Cherry Hill/Brushy Plains network model.
Both the distribution of the dimensionless dispersion coefficient and ADR simulation results depend on the dispersion coefficient models. An appropriate dispersion coefficient model, especially for laminar flow and when the Taylor theory is not valid, is critical to accurate water quality modeling of the drinking water distribution systems.
Discussion
The impact of dispersion may be negligible for many parts of water distribution systems under normal conditions. However, Tzatchkov et al. (2002), Abokifa et al. (2016), and Burkhardt et al. (2020) all highlighted the importance of considering dispersion when modeling dead-end segments of a system or premise plumbing systems. Dispersion may also be important when modeling water quality as part of resilience studies (i.e., insufficient supply/pressure conditions leading to lower flow conditions), contamination exposure studies (i.e., when small changes in contaminant concentrations or the time of arrival of a contaminant will greatly influence study results), or premise plumbing flushing studies. In all these cases, having an accurate understanding of the time profile of chemical, biological, or physical constituents in the water can be critical to gaining understanding about water quality in those systems.
This work demonstrated an approach for modeling the dispersion process that could be directly implemented in the widely used modeling tool EPANET. Previous efforts used a less-compatible Eulerian-Lagrangian approach or were not implemented in the widely used and free EPANET software but rather with MATLAB version R2013a (Abokifa et al. 2016) or other programs. The ADR method discussed here is capable of calculating dispersion in all pipes without predetermining dead-end sections or generating the fixed computation grid required by previous approaches.
Further work to investigate the appropriate treatment of dispersion coefficients was beyond the scope of this work; however, agreement with analytical solutions (Examples 1 and 2) and general applicability to a real-world example (Example 3) highlight this method’s usefulness. For the well-studied Cherry Hill/Brushy Plains system, the proposed method can generate similar results as the previous ADR modeling studies (Tzatchkov et al. 2002; Abokifa et al. 2016). Tzatchkov et al. (2002) demonstrated that they were able to get good agreement for Junction 10 when including dispersion in their tool IMTARED. Similarly, Abokifa et al. (2016) demonstrated general agreement at dead end junctions using Eulerian-Lagrangian methods to solve water quality problem for dead end pipes. A more rigorous approach (Lee 2004) was used by Abokifa et al. (2016) to determine the dispersion coefficient. That approach was not attempted here because it required stochastic demand generation and redistribution of the aggregated demand at a dead-end junction to multiple demand points on the corresponding dead-end pipe.
Introduction of the dispersion solver can increase the computational cost of water quality modeling significantly. For Example 3, the CPU time for water quality analysis of 55 h of simulation time increased by a factor of 25 from about 10 to about 250 ms, on a personal computer with an Intel Core i7-4810 MQ CPU at 2.80 GHz. For reference, the hydraulic simulation took about 5 ms. For large network models with tens of thousands of pipes, such increase of computational cost may hinder the application of ADR water quality modeling.
Eq. (19) needs to be solved only once per water quality time step, and CPU time analysis found that the majority of the computation costs introduced by the dispersion solver was on solving Eq. (14) for all the pipes. This is encouraging because in each water quality time step, Eq. (14) can be solved in parallel for all the pipes. Additionally, there is no need to solve Eq. (14) if the dispersion within the pipe is negligible and the matrix A [Eq. (15)] can be approximated as a unit matrix. If the dispersion coefficient is zero, solving Eq. (14) does not change segment concentration from the AR results at all. For a large network, it is expected that most of the pipe flows are turbulent. Therefore, at each water quality time step, dispersion needs to be solved only for a small fraction of the pipes, resulting in significant potential reductions in computational cost. Further investigation is underway to improve the computational performance of the Lagrangian ADR solver and bring this ADR solution to practical applications with large network models.
Conclusion
This work demonstrated the mathematical derivation of a Lagrangian method that solves ADR constituent transport within water distribution systems. This approach could be implemented directly into the AR scheme already used in EPANET through an operator splitting method. The ability to extend the capabilities of EPANET into scenarios where dispersion cannot be ignored is important for the water distribution system modeling community. Although continued work is needed to improve the accuracy of the dispersion coefficients, this work provides a foundation from which to build on ADR modeling in distribution systems.
Simulation results for two simple examples matched the available analytical solutions. For both simple examples, neglecting dispersion at junctions and assuming no dispersion between adjacent pipes lead to unrealistic results in these dispersion-dominated systems. Applying this method to a real-world network that contained a range of flow conditions highlighted its ability to handle both laminar and turbulent conditions simultaneously. Negligible differences were observed in turbulent (advection-dominated) regions of the network. The impact of modeling dispersion was observed in dead-end (dispersion-dominated) regions of the network. Additionally, the formula used to calculate dispersion coefficients and thereby the calculated values were also observed to impact the modeled concentrations in dispersion-dominated portions of the network.
These example results support the use and further development of the Lagrangian ADR method discussed herein, specifically for use in EPANET. To the authors’ knowledge, this is the first time a Lagrangian ADR method was applied to drinking water pipe networks. In this method, the dispersion process solution could be easily included or excluded (as required for a simulation, and from user input) because it does not require any significant changes to EPANET’s AR engine, and even when a full ADR simulation is run, the advection-dominated regions will have consistent results with an AR only scheme. Therefore, the proposed method is an ADR approach fully compatible with the current EPANET water quality solution that only considers the modeling of AR process.
Footnotes
Disclaimer
The US Environmental Protection Agency (EPA) through its Office of Research and Development funded the research described herein. It has been subjected to the Agency’s review and has been approved for publication. Note that approval does not signify that the contents necessarily reflect the views of the Agency. Any mention of trade names, products, or services does not imply an endorsement by the US Government or EPA. The EPA does not endorse any commercial products, services, or enterprises. The contractors’ role did not include establishing Agency policy.
Data Availability Statement
Data associated with this work are available from https://catalog.data.gov/dataset/epa-sciencehub. Please contact the corresponding author for any additional model or data needs.
References
- Abokifa AA, Yang YJ, Lo CS, and Biswas P. 2016. “Water quality modeling in the dead end sections of drinking water distribution networks.” Water Res. 89 (February): 107–117. 10.1016/j.watres.2015.11.025. [DOI] [PubMed] [Google Scholar]
- Axworthy D, and Karney B. 1996. “Modeling low velocity/high dispersion flow in water distribution systems.” J. Water Resour. Plann. Manage 122 (3): 218–221. 10.1061/(ASCE)0733-9496(1996)122:3(218). [DOI] [Google Scholar]
- Basha HA, and Malaeb LN. 2007. “Eulerian-Lagrangian method for constituent transport in water distribution networks.” J. Hydraul. Eng 133 (10): 1155–1166. 10.1061/(ASCE)0733-9429(2007)133:10(1155). [DOI] [Google Scholar]
- Burkhardt JB, Woo H, Mason J, Shang F, Triantafyllidou S, Schock MR, Lytle D, and Murray R. 2020. “Framework for modeling lead in premise plumbing systems using EPANET.” J. Water Resour. Plann. Manage 146 (12): 04020094. 10.1061/(ASCE)WR.1943-5452.0001304. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Devkota BH, and Imberger J. 2009. “Lagrangian modeling of advection-diffusion transport in open channel flow.” Water Resour. Res 45 (12): 406–419. 10.1029/2009WR008364. [DOI] [Google Scholar]
- Fischer HB 1972. A Lagrangian method for predicting pollutants dispersion in Bolinas Lagoon, Martin Country, California. US Geological Survey Professional Paper 582-B. Washington, DC: USGS. [Google Scholar]
- Fischer HB, List JE, Koh CR, Imberger J, and Brooks NH. 1979. Mixing in inland and coastal waters. Cambridge, MA: Academic Press. [Google Scholar]
- Hart JR, Guymer I, Sonnenwald F, and Stovin VR. 2016. “Residence time distributions for turbulent, critical, and laminar pipe flow.” J. Hydraul. Eng 142 (9): 04016024. 10.1061/(ASCE)HY.1943-7900.0001146. [DOI] [Google Scholar]
- Jobson HE 1980. “Comment on ‘A new collocation method for the solution of the convection-dominated transport equation’ by George E. Pinder and Allen Shapiro.” Water Resour. Res 16 (6): 1135–1136. 10.1029/WR016i006p01135. [DOI] [Google Scholar]
- Lee Y 2004. “Mass dispersion in intermittent laminar flow.” Ph.D. dissertation, Dept. of Civil and Environmental Engineering, Univ. of Cincinnati. [Google Scholar]
- Levenspiel O 1958. “Longitudinal mixing of fluids flowing in circular pipes.” Ind. Eng. Chem 50 (3): 343–346. 10.1021/ie50579a034. [DOI] [Google Scholar]
- Li Z 2006. “Network water quality modeling with stochastic water demands and mass dispersion.” Ph.D. dissertation, Dept. of Civil and Environmental Engineering, Univ. of Cincinnati. [Google Scholar]
- Liou C, and Kroon J. 1987. “Modeling the propagation of waterborne substances in distribution networks.” J. Am. Water Works Assn 79 (11): 54–58. 10.1002/j.1551-8833.1987.tb02943.x. [DOI] [Google Scholar]
- Panguluri S, Grayman WM, Clark RM, Garner LM, and Haught R. 2005. Water distribution system analysis: Field studies, modeling and management. EPA/600/R-06/028. Washington, DC: USEPA. [Google Scholar]
- Rossman LA 2000. EPANET 2 users manual. Cincinnati: USEPA. [Google Scholar]
- Rossman LA, and Boulos PF. 1996. “Numerical methods for modeling water quality in distribution system: A comparison.” J. Water Resour. Plann. Manage 122 (2): 137–146. 10.1061/(ASCE)0733-9496(1996)122:2(137). [DOI] [Google Scholar]
- Rossman LA, Clark RM, and Grayman WM. 1994. “Modeling chlorine residuals in drinking-water distribution systems.” J. Environ. Eng 120 (4): 803–820. 10.1061/(ASCE)0733-9372(1994)120:4(803). [DOI] [Google Scholar]
- Schoellhamer DH, and Jobson HE. 1986. Programmers manual for a one-dimensional Lagrangian transport model. US Geological Survey Water Resources Investigation Rep. No. 86–4144 Washington, DC: USGS. [Google Scholar]
- Taylor GI 1953. “Dispersion of soluble matter in solvent flowing slowly through a tube.” Proc. R. Soc. London, Ser. A 219 (1137): 186–203. 10.1098/rspa.1953.0139. [DOI] [Google Scholar]
- Taylor GI 1954. “The dispersion of matter in turbulent flow through a pipe.” Proc. R. Soc. London, Ser. A 223 (1155): 446–468. 10.1098/rspa.1954.0130. [DOI] [Google Scholar]
- Tzatchkov VG, Aldama AA, and Arreguin FI. 2002. “Advection-dispersion-reaction modeling in water distribution networks.” J. Water Resour. Plann. Manage 128 (5): 334–342. 10.1061/(ASCE)0733-9496(2002)128:5(334). [DOI] [Google Scholar]
- Usmani RA 1994. “Inversion of a tridiagonal Jacobi matrix.” Linear Algebra Appl. 212–213 (November): 413–414. 10.1016/0024-3795(94)90414-6. [DOI] [Google Scholar]
- van Genuchten MT, and Alves WJ. 1982. Analytical solutions of one-dimensional convective-dispersive solute transport equation. Technical Bulletin No. 1661 Washington, DC: USDA. [Google Scholar]
- Walski TM, Chase DV, Savic DA, Grayman W, Beckwith S, and Koelle E. 2003. Advanced water distribution modeling and management. Waterbury, CT: Haestad. [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
Data associated with this work are available from https://catalog.data.gov/dataset/epa-sciencehub. Please contact the corresponding author for any additional model or data needs.








