1. Introduction
Multiple infrastructures gather, store, treat, and distribute water from a water source to customers with variable demands in a water supply or distribution system. Any water distribution system (WDS) should provide water in sufficient quality and pressure by integrating these infrastructures. Water storage is one of the most prominent and essential components of water supply systems used to manage water supply by ensuring hydraulic reliability through maintaining pressure. Furthermore, this storage can be used as a water source at times of emergency or power outage [
1].
Many WDSs in high-water-demand areas use large volume tanks that are positioned, constructed, and operated primarily for structural safety and hydraulic resiliency [
2]. However, utilizing them raises water quality concerns, such as poor mixing and lengthening the retention duration (the length of time spent in the water inside the tank before being drafted for use) [
3]. An extended retention period causes the water to become older. Due to this, the concentration of disinfectants will not be powerful enough to stop germs from growing in the distribution system. Reduced disinfectant residuals, bacterial growth, nitrification, growth of disinfectant by-products, and the development of aesthetic alterations in water taste, odor, and appearance are the most significant effects on water quality [
4]. Such events directly impact water quality, which is in direct opposition to the need for more water. In addition, the breakdown of water quality in storage might impair the overall efficiency of the WDS.
Substantial research has been carried out to better understand the phenomena that occur in storage facilities related to water quality. Mixing and aging are two interconnected phenomena that affect water quality [
5]. When water enters a storage tank, it may be of acceptable quality, but it may be of poor quality when it leaves the tank. If a reservoir is not correctly vertically mixed, stratification ensures that the water near the surface is retained for longer [
6]. An experiment conducted by [
7] showed that ammonia-oxidizing bacteria (AOB) concentrations in the surface layer (0.3 m below the surface) were 10–20 times greater than concentrations 5 m below the surface. The deterioration of water quality in Philadelphia’s ground-level storage tanks was investigated by [
8]. During the summer, reservoirs were discovered to have thermal, chemical, and microbiological stratification. A long detention time can cause the disinfectant residuals to diminish, leaving the finished water vulnerable to additional microbiological pollutants that exist in the distribution system downstream of the storage facility [
8]. A loss of chlorine residuals and subsequent biological growth can theoretically result in sour flavors [
9]. As a result, in the design and operation of distribution system storage facilities, limiting the detention time and preventing parcels of water from remaining in the storage facility for lengthy periods should be implicit goals.
Because water quality issues are crucial in the design and operation of water storage facilities, various innovative sampling techniques have been used to evaluate the temporal and spatial distribution of water quality within and outside the tank. Although this is one approach to identifying potential water quality issues, its application is limited to researching remedies for water quality problems. Modeling water tanks and reservoirs should be the primary method for examining different design, upgrade, and operation approaches for decreasing negative water quality impacts [
10].
Water quantity and quality modeling, in general, covers a wide range of issues and necessitates the collaboration of several disciplines. For example, water flow and mixing mechanisms are influenced by hydrology and hydrodynamic parameters [
11] All physical movement, such as advection and diffusion (or dispersion), the chemical process of dilute solutions, chemical kinetics, and biology are taken into account when deciding the fate of molecules dissolved or suspended in water. Issues with water quality can arise from a variety of sources. For example, water storage facilities have problems with microbiological, chemical, and physical impurities [
12]. Some scholars have proposed methods for simulating changes in water quality in pipe distribution networks, assuming that the storage facilities are continuously stirred tank reactors (CSTR) with complete and immediate mixing [
13,
14]. However, due to the complexity of the hydraulic patterns contained within these facilities, the assumptions may not be applicable in all storage configurations [
11,
15,
16].
In the last two decades, a multi-compartment modeling approach has been used to assess water quality under the assumption that the interchange between compartments is the primary physical process inherent in storage reservoirs [
15,
16]. Explicit analytical or numerical solutions have been provided by formulating various configurations in terms of the number of compartments, the arrangement of inlet/outlet, the flow mechanism, or the decaying behavior of the substance [
11,
13,
15,
16]. Most simulation problems are solved using numerical methods that give an approximation result. Numerical solutions generally only produce one answer. Analytic/symbolic solutions, on the other hand, provide answers to a wide range of problems. In other words, the numerical technique must be recalculated for each set of parameters. In contrast, the analytic approach allows for all (or at least some) solutions at once. A three-compartment hydraulic storage tank model based on hydrodynamic and statistical methods to forecast tracer concentration variations over time and model water’s age was built by [
4]. In 2000, the EPANET water quality mixing model was developed. It characterizes mixing within storage tanks using four alternative models (full mixing, two-compartment mixing, first-in–first-out (FIFO) plug flow, and last-in–first-out (LIFO) plug flow) [
17]. The developed models [
15,
16] take into consideration five different multi-compartment arrangements—a continuous flow stirred tank, a two-compartment tank, a three-compartment tank, a four-compartment tank, and a plug-flow tank. The turbulent flow patterns within the storage tanks significantly impact the mixing behavior and its implications on water quality. Explicit analytical methodologies were used to arrive at the solution.
This paper includes descriptions of multiple investigations and the results, producing a comprehensive mathematical model of water quantity and quality in water storage (tanks) using analytical approaches. This study provides a mathematical formulation of water quantity and water quality in water storage (tanks) using analytical solutions. Analytical solutions were provided in the past for this problem, but this study extended and combined previous solutions in one comprehensive paper for multiple cases of inputs and outputs of water quality constituents to water distribution system tanks for conservative and non-conservative water quality parameters. The proposed method should aid in the management of distribution water quality, and the proposed equations’ performance was demonstrated through various examples and compared to numerical finite-difference methodologies. In addition to assisting with water quality control, the model can be utilized for multi-objective optimization in WDS management. WDS management issues include competing objectives, such as lowering design and operational costs, maximizing reliability, limiting hazards, and minimizing deviations from water quantity, pressure, and water quality targets. Multi-objective optimization algorithms allow for optimizations that consider multiple objectives simultaneously; each goal can be a minimization or a maximization of output [
18].
2. Model Development
In this study, a three-compartment model for conservative material and a two-compartment model for non-conservative material were created using a conceptual picture of the internal reservoir mixing and flow patterns. Discrete volume compartments were used to illustrate these mixing features [
16]. In addition, calibration was used to determine the capacity of each compartment. It was assumed that the outflow was always at the bottom, and the inlet could come from any compartment level in both circumstances. The flows were traditional inflow/outflow storage tanks, in which the water volume expands and contracts in response to service demand [
11]. For both situations, the following basic assumptions were used to develop the analytical solutions to mixing behavior.
For a given period, the inflow and outflow rates were constant. Even though this is not an actual occurrence in WDSs, it was assumed that the given duration corresponded to the time during which either the inflow or outflow was constant [
15,
16]. The flow rate between compartments was assumed to be constant. The interchange flow rates between compartments were represented as constant flow rates. In contrast, the flows in and out of the tank’s variable bulk volume compartment were modeled as tank inflow and outflow, respectively [
15,
16]. Consistency was maintained in a compartment with changing bulk volumes. The volume of the bulk volume compartment may change over time depending on the difference between inflow and outflow [
11,
15,
16]. The flow was unidirectional and ran either into or out of the tank or any compartment, but not simultaneously. This assumption remains true for most storage facilities for short periods [
15].
Chlorine decay was assumed and related to conceptual transport models that consider the tank an ideal reactor, such as the continuous flow stirred tank reactor (CSTR), consisting of an intensively mixed volume with a uniform concentration distribution, and the plug flow reactor (PFR), where transport is only due to advection in the flow direction and complete transverse mixing [
2]. The initial concentrations are simplified so that before interacting with the next compartment, each upstream compartment is permitted to establish a pseudo equilibrium condition at each step. As a result, the concentration transmitted to the next compartment is assumed to be constant. This assumption is valid for a short period of time [
15].
For non-conservative species, the boundary concentrations were kept constant for exponential compounds. When factoring out the decay behavior of reactive chemical material, this assumption is a mathematical idea that gives the differential equations the correct form regarding nonhomogeneous boundary conditions. The decaying coefficient is the first-order kinetic reaction rate coefficient, which could be calculated based on the premise mentioned above [
15,
16].
Using the aforementioned assumptions, the system of equations describing mixing in the tanks for each model was effectively reduced from a set of dependent, linear differential equations with non-constant coefficients to a series of independent, linear differential equations with either constant coefficients or separate terms, where all equations are solvable by direct integration. These assumptions aid in the development of explicit analytical solutions for the given models [
15].
4. Example Application
For both the filling and draining stages, full analytical solutions were developed, taking into account all the combinations and arrangements for both conservative and non-conservative materials. A simulation can be run to calculate the volume and concentration at any time in a specified compartment by providing all of the necessary input variables. A user enters the following as inputs:
- −
The fixed volumes of Compartments A, B, C; a calibration was used to choose the volume of each compartment.
- −
The delta t and total simulation time T.
- −
The inlet points.
- −
The initial levels and volumes of water and the initial concentrations.
- −
The inflow Qin(t) with its Cin(t) and outflow Qout(t) for different delta t (during total time T).
Using the appropriate equation, concentrations were calculated at any time for each compartment. In addition, the results were validated by comparing them with numerical results.
The following are assumed to be true for the flow.
- −
Constant for specific delta t.
- −
It can be either filling (Qout = 0) or draining (Qin = 0) at any time.
- −
It was given for the total simulation time T.
When it was filling (Qin > 0), there was a Cin(t) (inlet concentration).
A sample of theoretical data and field data from [
11] were taken to test the model for both conservative and non-conservative constituents.
4.1. Conservative Material
A tank was divided into three compartments and had volumes of 500 m
3, 400 m
3, and 600 m
3, starting from the bottom. The simulation was carried out for a total of 10 h, with delta t (Δt) being 1 h. The flow at each hour is given in
Table 9.
Two arrangements (initial levels of water concentrations) are presented in
Figure 10.
Result and Discussion
Using the appropriate equations, the volumes and concentrations were calculated at each time step. The volume and concentration graphs are presented as follows.
Figure 11 shows the volume of each compartment as a function of time. In (a), at first, Compartment A contained 50 m
3 of water. It rose when there was inflow and fell when there was outflow, according to the flow tables. Water flowed into Compartment B when it exceeded its capacity volume of 500 m
3, increasing the volume of Compartment B. The water level did not reach Compartment C in this flow example. As a result, the volume of Compartment C was nil. (b) Initially, Compartment A contained 500 m
3 of water (maximum capacity), while Compartment B had 50 m
3 of water. The volume in Compartment A remained constant according to the flow tables, while the volume in Compartment B increased when there was inflow and reduced when there was outflow. Water flowed into Compartment C when it exceeded its capacity volume of 300 m
3, increasing the volume of Compartment C.
Figure 12 shows the fluoride concentration as a function of time. Because the material was conservative, the concentration inside each compartment rose or fell with time to approach the inlet concentration in both arrangements. Compartment A had a 35 mg/L concentration in (a). It lowered over time since it was more than the inlet concentration (25 mg/L). Because there was no water in Compartments B and C, the concentrations were zero. When water entered Compartment B, the concentration instantly rose and gradually approached the input concentration until it reached zero, when the water level returned to Compartment A. The water level did not reach Compartment C in these specific situations. As a result, the concentration always stayed zero. For the second configuration (b), Compartments A and B had 35 mg/L concentrations at first. Because the entrance came from Compartment B, in the first hour of filling, mixing occurred only in Compartment B. As a result, although Compartment B’s concentration decreased to approach the inflow concentration, Compartment A’s concentration remained unchanged. Whenever Compartment B was draining, water with a certain concentration flowed into Compartment A. The concentration in Compartment A lowered to maintain equilibrium.
Since the water level reached Compartment C in the fourth hour, the concentration of the water increased rapidly.
4.2. Non-Conservative Material
A tank was divided into two compartments and had volumes of 500 m
3 and 650 m
3, starting from the bottom. The simulation was carried out for a total of 10 h, with delta t (Δt) at 1 h. The flow rate at each hour is provided in
Table 9. The decay constant K was taken as 0.5. Two arrangements (initial levels of water and initial concentrations) are presented in
Figure 13.
Results and Discussion
Using the appropriate equations, the volume and concentrations were calculated at each time step. The volume and concentration graphs are presented as follows.
Figure 14 shows the volume of each compartment as a function of time. (a) At first, Compartment A contained 50 m
3 of water. It rose when there was inflow and fell when there was outflow, according to the flow tables. Water flowed into Compartment B when it exceeded its capacity volume of 500 m
3, increasing the volume of Compartment B. (b) At first, Compartment A contained 500 m
3 of space (their maximum capacity). The volume of water in Compartment B was 50 m
3. The volume in Compartment A was constant, according to the flow tables. Due to the unique flow arrangement, only Compartment B experienced a change in volume.
Figure 15 illustrates the graph of concentration as a function of time. (a) Unlike the conservative material, the concentration changed not only because of mixing, but also as a result of the effect of decay constant K. Initially, the concentration in Compartment A was 20 mg/L. The concentration inside the tank began to rise, approaching the higher inlet concentration of 25mg/L. However, because of the decay constant K, it instantly began to decline. If new water entered the tank with an inlet concentration that was higher than the concentration inside the tank, the concentration rose to maintain equilibrium. This may be seen in the graphs for the second, fourth, seventh, and ninth hours. (b) Initially, the concentrations in Compartments A and B were the same at 20 mg/L. Due to the decaying constant and the full initial volume, it began to decline instantly in Compartment A. In Compartment B, the concentration rose at first due to the higher input concentration but then fell due to the decaying constant. If new water entered the tank with an inlet concentration that was higher than the concentration inside the tank, the concentration rose to maintain equilibrium. This can be seen in the graph for Compartment B in the second, fourth, seventh, and ninth hours, and Compartment A in the first, fifth, and eighth hours. The decay constant prevented a full equilibrium like that of the conservative material. For all non-conservative materials, if the decay constant value k approached zero, the graph resembles that of a conservative material.
The above answers were discovered using analytical methods, and the results were validated by comparing them to numerical finite difference methods. Once the differential equations were developed, rather than solving them analytically, a numerical finite difference method was applied to generate the concentration at each time step using the previous values for both arrangements given in
Figure 10a and
Figure 13a.
Figure 16 shows the numerical solution.
The numerical and analytical results for each compartment are nearly identical. Furthermore, if they are plotted on the same graph, they overlap. This is because analytical solutions are the exact solutions derived from a differential equation with a constant coefficient and are separable rather than approximation solutions.
4.3. Field Example
To test the model, empirical data was taken from the previous study conducted by [
11]. The obtained field data was a part of a large-scale field investigation conducted in [
4]. The concentrations of the tracers were measured at the inlet and outlet of the tank. The research was carried out in the Cherry Hill Brushy Plains service area, which is virtually exclusively residential, with single-family homes and apartment/condominium units. The Cherry Hill pump station pumps water from the Saltonstall system into the service area. The Brushy Plains tank provides storage inside the Cherry Hill Brushy Plains service region. The pumps’ operation is dictated by the water level in the Brushy Plains tank, which has a volume of 3790 m
3. The pumps are configured to activate when the water height in the tank lowers to 17.0 m, and to turn off when the elevation reaches 19.7 m in typical conditions. The fluoride feed was shut off at the Saltonstall plant, which supplies the system to record the fluoride residual.
The study in [
11] used a three-compartment model, with the bottom and top compartments presumed to be dead zones. Only in the middle did the volume shift. This was relaxed on this model by allowing every compartment to change its volume according to the flow. After regressing the calculated outcomes against the observed data from the effluent data and calculating the relevant R-squares, the 30–40–30 arrangement was discovered to be the best fit [
11]. 3030 m
3 of water was initially present in the tank. The fluoride content (conservative species) was 0.95 mg/L at the start. The flows were time dependent. To fit into the model developed, an average was taken. The input variables were applied to the model developed.
Figure 17 shows the calculated fluoride residuals with respect to time. A comparison was made with the field results found in the same study in
Figure 18. The red dots in
Figure 18 present some of the results found from the field measurements.
The good fit of the model-generated data to the field-measured data for fluoride supports the use of the compartment models to approximate tank mixing hydrodynamics. More field data and measurements are needed for more confirmation.
5. Conclusions
For anticipating system reactions and pollutant migration and fate, mathematical modeling is a useful tool. However, the majority of published model results are based on the assumption of complete and immediate material mixing. The physical processes that describe the complicated internal mixing and flow interchange characteristics that occur within distribution storage facilities have largely been overlooked.
This study presented a compartment model to characterize mixing behavior inside the tanks. A governing equation was formulated that was dependent on the inlet point and the level of water. The differential equations were solved through the analytical method, and their validity was compared with the results of the numerical solutions. The flows were traditional inflow/outflow methods where only one of them happens for specific delta t. Four example applications with two different arrangements were reviewed to apply the solutions. The solutions fit with the physical assumptions that the concentration inside the tanks either decreases or increases to approach the concentration that comes; it increased when the concentration inside the tank was less than the concentration that was coming and vice versa. Concentration changes happened either because of mixing water with two different concentrations or if there was a time-dependent inlet concentration. The analytical solutions were compared to numerical results and no differences were found; this is because the differential equation is solvable, and an exact solution can be found without approximation. This model can be incorporated into the optimization problem. Field data was applied to the model and there was a good fit between the results of the model and the field measurements.
The substances for the non-conservative material assumed in this paper were used in only two compartments, which identifies the potential future direction of this work. Further study can be done on a decaying material by adding compartment numbers. The model developed here can be incorporated into multi-objective optimization problems in water distribution system-related problems, such as the least costly design, operation, water age, and others.