It should be noted that when very small calculation time steps are used, both the LED and LTD improved methods give similar results. However, the processing times are shorter for LED for the same accuracy, and successive refinements are unnecessary as it is an exact method.
Based on the advantages offered by the LED method, a novel application of this method is proposed, consisting in tracking a particle with a given pollutant load through the network, starting from a given junction at a given time, and travelling forward or backward in time.
2.1. Forward Particle Tracking
Forward particle tracking (FPT) is an extension of the LED method. Just as the LED method associates each event front with a segment of equal concentration behind it, particle tracking only tracks the pollutant load associated with a certain particle located within one of the segments of the event method, not necessarily in the front.
The particle will advance and disperse through the outlet pipes of the junction it reaches. Part of the particle mass will leave the network if it is a demand node, while the rest will continue onward. In fact, when the particle reaches a new junction, it disappears, and new descending particles are created, as many as the number of outlet pipes of the junction.
For conservative substances, each particle has an associated mass flow rate of substance, expressed in mg/s (G); when a particle arrives at a junction and disperses, the total load of new sub-particles created plus the load leaving the network due to the outflow at the junction (demand) must be equal to the substance load of the incoming particle. Thus, when arriving at a junction, only the substance load arriving at the junction through the particle is assessed, without considering the load of the same substance that may arrive at the same junction via other routes. This fact differentiates the tracking of a particle’s load from the LED calculations, where in an event the total mass of the same substance present in all segments that converge at the junction is considered when performing the mass balance to determine the new concentration at the junction.
Therefore, being
the concentration of a particle reaching a junction through a pipe with flow
, the concentration
of the new outgoing particles will be:
Being I the set of inflows to the junction.
This equation represents a particular application of the more general mixing equation in junctions [
24], which considers the mass transported by a particle arriving through a single pipe.
It is important to note that the numerator exclusively considers the load arriving at the junction from the pipe through which the particle travels, disregarding the other junction’s inlet pipes.
The mass balance at the junction is thus satisfied, as the substance load of the incoming particle, expressed as mass flow, is:
And that of outgoing particles will be:
So, it is fulfilled:
where
O is the set of flows leaving the junction, including the demand external flow. It should be noted that the final equality is derived by applying (1).
Now suppose that one of the newly generated particles leaving the junction with a concentration designated by
, travels along pipe j and reaches its downstream junction at a subsequent point in time. The concentration of the new particles leaving that junction will be determined using the same Equation (1), but with the value of
on the right-hand side replaced by the concentration
of the arriving particle, assuming the substance is conservative. In general, as new particles are generated in downstream junctions, there will be a cascade dilution effect on the concentrations. Consequently, the concentration
of a sub-particle leaving junction
N, located
n sections downstream from the starting point
O, and following a path
, will be:
where
denotes the concentration of the initial particle given by
, with
being the load of the particle, measured in terms of mass flow rate, and
the flow rate of the pipe from which the particle is originated. The product extends to all intermediate junctions
n of the analyzed path
that connects the origin junction
O with the destination junction
N, excluding the source junction and including the destination junction. The flow listed in the numerator as
is the flow of the pipe through which the particle reaches junction
n at the arrival time, while the denominator is the sum of all flows in going to junction
n at this time. It should be noted that these flows may change as the simulation progresses and the flows evolve along the path followed. The result of the product can be summarized in the factor
, called dilution factor, which depends only on the circulating flows and their evolution. This factor expresses the relationship between the concentration of the initial particle
and that of the sub-particle that reaches junction
N via path
, named as
.
Other sub-particles from junction
O have the potential to reach junction
N, following a different path
k, whilst maintaining compliance with the direction of flow at each moment. The travel time between the starting junction
O and the destination junction
N will vary for each path, and will be given by:
where the time taken by a sub-particle to travel through the pipe that accesses junction
n is denoted by
. It is acknowledged that
can be affected by changes in flow rates as the simulation progresses and the particle travels along the pipe, even flow can reverse in some cases resulting in the final junction n becoming the same as the starting junction of the pipe.
As there may be many paths connecting the
O and
N junctions, it follows that different sub-particles can arrive at junction
N at different times, each sub-particle being characterized by its own load. If junction
N is a demand node, a proportion of the sub-particle load will be discharged to outside in accordance with the demand flow, and the remaining load will continue travelling downstream through the outgoing pipes. Therefore, the total load discharged from junction
N to outside, originating from the initial particle, after a time T from when that particle started to travel, will be:
where
is now the set of paths connecting junction
O with junction
N, while
and
denote the concentration and the demand of junction
N at time
when the sub-particle travelling along path
k arrives to it.
After a long time, and upon the complete dissipation of all sub-particles emanating from the initial particle, a total load
will have been extinguished from junction
N. Consequently, by considering all demand nodes
N downstream of junction
O, the subsequent balance equation must hold true:
This final balance allows to determine which junctions have consumed the load of the initial particle, and to what extent at each junction.
Alternatively, we could also have formulated a global mass load balance for any time T after the starting time, as follows:
In the above expression, the first term represents the load of the sub-particles that are still travelling through the network at time T via the different paths k, being the concentration of a sub-particle travelling along path k after time T, and the flow rate circulating at that moment through the pipe in which it is located. The second term denotes the load that has left the network through the demand junctions up to the time T, according to (7).
It is important to note that, to track the load of a particle and determine its destination, it is sufficient to know the evolution over time of the flows circulating through the pipes and the flows leaving the junctions.
To clarify all these concepts, let us follow the progression of a single particle within a simple network configuration, as depicted in
Figure 3. The network is fed by a single tank, with nine pipes and seven junctions forming two loops. The total demand for these junction s is 100 L/s. The figure illustrates the flow rates circulating through each pipe, their direction, velocities and travel time, assuming permanent regime and according to physical properties of pipes and the nodal demands.
The initial particle leaves tank A with a concentration of 100 ppm, which is equivalent to a load of 10 g/s for a flow rate of 100 L/s. This initial particle will travel along different paths, creating new sub-particles that finally reach the end junction H at different times. According to flow directions,
Figure 4 shows the only three possible paths from tank A to junction H, enumerated from the fastest to the slowest as 1 (orange), 2 (green), and 3 (blue), respectively. New sub-particles will be created each time a diversion occurs to follow the different paths.
Upon reaching a junction, each particle contributes a specific mass, thereby determining the junction’s new quality. Then new sub-particles with this quality are created to follow the different paths. In accordance with the principles of the LED method, it can be postulated that particles travel riding a segment of water of uniform quality. When reaching a junction, the segment’s mass is consumed, and new segments are created downstream. Assuming that the chosen particle occupies the initial front of a segment, its arrival at a junction will modify its quality until the arrival of a new segment. The newly generated sub-particles will be positioned at the forefront of the newly formed segments that emerge downstream.
This explains the stepped variation in quality observed at junction H, shown in
Figure 5, where a correlation between the observed variations in quality and the travelling routes have been shown. In effect, the fastest particle completes its trajectory along path 1 in 100 s, resulting in an increase in the junction load of 1.6 g/s. This load is sustained until the arrival of the second particle at 120 s, at the forefront of a new segment that follows path 2. This results in an increase in the junction load to 2.8 g/s. At 150 s, the third particle arrives at the front of a new segment that travels along the slowest path 3, resulting in a load of 4 g/s at junction H.
However, this result should not be considered definitive in justifying the load observed at a given junction at a given time, since at that time other particles at the front of other segments from different sources could reach the junction at the same time. Even other particles leaving the same source later with a different concentration can overtake some sub-particles that took a longer path to reach the junction, changing the quality of the junction in advance. For simplicity, this is not our case.
For more detailed tracking of the initial particle’s destination in our illustrative example,
Figure 6 shows the status of the particle and its sub-particles at different times, until its total load exits the network through the nodal demands.
Figure 6a shows the initial status. The particle that had previously left tank A reaches junction B after a period of 10 min (
Figure 6b). At this point, according to Equation (1), the particle divides into two new sub-particles, with loads of 3 and 6 g/s, respectively, while a load of 1 g/s left the network through the nodal demand (
Figure 6c). The two new particles travel to junctions
C and
E, which they reach at 25 min and 30 min, respectively, where they are dispersed again into new sub-particles (not shown for simplicity). At 60 min (
Figure 6d), three particles remain in the network (blue dots). The load balance at this particular time, following Equation (9), gives that a load of 2 + 2 + 2 = 6 g/s persists in their trajectories, while a load of 1 g/s has left the network via each demand node B, C, D, and E (orange dots), summing the remaining 4 L/s (load leaving demand node E not shown for simplicity).
As illustrated in
Figure 6d, a sub-particle with a load of 2 g/s arrives at junction F from junction
E at the aforementioned time of 60 min. There is also a flow that arrives at this junction from junction
C, carrying another particle which is scheduled to arrive at junction
F later. Subsequently, upon applying Equation (1), it concludes that there will be just a single term in the numerator and two terms in the denominator. It is important to emphasize that this is a distinction between the FPT method and the LED method, where in the second method all the load entering the junction from the segments was considered. This results in the creation of a new sub-particle with a load of 1.5 g/s travelling to junction G, while 0.5 g/s exit the network through demand node F, as illustrated in
Figure 6e. At that time, an additional particle with a load of 2 g/s is also in transit through the pipe DG, so still three particles remain in motion. This particle had its origin at junction
D at 45 min and is expected to arrive at junction
G at 70 min, exiting 0.4 g/s at this junction and creating a new particle with the remaining load of 1.6 g/s that flows to junction H (the precise instants are not displayed for the sake of simplicity).
The sub-particle travelling from C to F reaches this junction at 90 min, at the same time the sub-particle leaving junction
D at 60 min reaches junction G (
Figure 6f). Both create new sub-particles that travel towards junctions G and H, respectively, while part of the load exits outside from demand nodes F and G, specifically 0.5 g/s and 0.3 g/s, which add up to a total load discharged by these demand nodes up to this point of 1 g/s and 0.7 g/s, respectively (
Figure 6g).
After 100 min, the particle travelling previously from D to G is the first sub-particle to reach junction H (
Figure 6g), resulting in the complete discharge of its load of 1.6 g/s at that demand node.
Due to the looped nature of the network, the two remaining sub-particles will reach the final junction H at later times, as they follow slower routes. So, the second sub-particle arrives at junction H at 120 min, where it deposits its load of 1.2 g/s (
Figure 6h). Subsequently, the third and final sub-particle arrives at junction H after 150 min to deposit other 1.2 g/s, giving a total of 4 g/s discharged at this junction. (
Figure 6i). At that time, the total initial load is known to have departed from the network. A quantitative analysis reveals that finally 1 g/s has exited through demand nodes B, C, D, E, F, and G, and 4 g/s through demand node H, in accordance with the demands of each junction, as depicted in Equation (8).
In the event of a flow reversal, in more complex networks with extended period simulations, the particle may backtrack and return along a previously travelled path and reach a previously visited junction. In this case it will continue to disperse along the outgoing pipes according to the new flow directions at the arrival time to those downstream junctions.
Not all load of the initial particle will eventually leave the network through demand nodes. It can leave the network through reservoirs with incoming flow or be diluted in the tanks until it disappears. In the case of the tanks with inflows, the particle tracking is lost as soon as it reaches them. In order to continue the particle tracking analysis, it would be necessary to consider new particles starting from the point of discharge of the tank, when it is delivering water to the network.
For non-conservative substances, the particle will be losing substance load as it reacts in the bulk and pipe walls while it travels through the network. Assuming that the reaction is first order, for a particle travelling from junction i to junction j through the pipe connecting them, taking a time
and whose reaction constant is
kij, the following equation can be derived [
24]:
It should be noted that this type of analysis can only be carried out using the LED method, as the Eulerian methods do not track the movement of water masses through the network, and the LTD method, which employs fixed time intervals, does not allow for the precise determination of the substance arrival time at junctions.
The distinctive feature of this analytical approach is its capacity to provide a comprehensive and detailed understanding of the progression of substances within a network, beginning from a specified point of origin. Moreover, given that the final concentration observed at a junction is the superposition of all the paths and starting points, this method enables the influence of each chosen starting junction to be determined.
Nevertheless, if the total concentration observed at a junction at a given moment was to be justified using a forward analysis, it would be necessary to analyze all the particles arriving at that junction at that moment from different starting points. The determination of the origin of each component could be a significant challenge; however, a more efficient method of ascertaining the answer to this question is to perform a backward analysis, as will be outlined in the subsequent section.
2.2. Backward Particle Tracking
Backward particle tracking (BPT) is a more fruitful and versatile research avenue than FPT. BPT analysis facilitates the explanation of the quality measured at a given junction and at a given moment, or the quality obtained as a result of a full simulation previously performed with any of the quality models described in the introduction. However, using the LED method for the full quality simulation has significant advantages, again as will be described.
The current challenge is more intricate, given that the quality of the particles attaining a particular junction at that specific instant is attributable to the superposition of the qualities of a multitude of other particles emanating from diverse supply sources at different times, and dispersed en route to their designated targets, as delineated within the framework of the FPT method. Consequently, upon their concurrent arrival at the junction, these particles retain only a fraction of their initial mass.
To justify the quality observed at a junction N at a given moment, a particle located at that point is considered to trace its trajectory backwards in time, using the same illustrative example as for the forward analysis.
As illustrated in
Figure 7, it is assumed now that a particle with a load of 4 g/s is detected at junction H at time t
0 = 0 min (
Figure 7a). This particle reached junction H through the single pipe that supplies it, coming from junction G. The particle departed from that junction 30 min earlier, with the same load under the assumption of conservative substance (
Figure 7b). Junction G is fed by two pipes, and the load of the particle when it leaves junction G will be the result of mixing the loads of two other particles that arrived at that junction at the same time, each with a different load, being the concentration
of the leaving particle given by the mixing equation:
Which is a generalization of Equation (1), in which now all pipes converging at the junction contribute to determining the load of the particles leaving the junction.
Conducting a preliminary hydraulic analysis enables the determination of flow rates arriving at junction G at this moment, so Qin,j will be known in Equation (11). However, there are still multiple unknowns Cin,j, and a single equation is insufficient to fully address this system of equations. It is needed then to conduct also a preliminary quality analysis to know the fraction of the particle’s load leaving junction G that was contributed by other particles coming from the upstream junctions, D and F.
In a conventional LTD method, it is not always possible to ascertain the precise quality that reached the junction through each pipe at the exact moment the particle departed, as this may not align with a calculation instant. During the time interval encompassed by this method, it might occur that multiple segments would be consumed from some of the pipes feeding the junction, each with a distinct concentration, particularly if the pipes are of short length and the time interval is comparatively large.
In contrast, the LED method is the only approach that allows for the accurate determination of the quality arriving at a junction at any time. This is because, until a new event arrives at the junction through a pipe, the quality of the final segment of the pipe remains constant. This results in a stepped curve of concentration variation at the junctions, as illustrated in the previous
Figure 1 and
Figure 2, and justified in
Figure 5 for this particular example.
Consequently, in order to track particles backwards in time, in addition to being aware of the flow rates, as is the case in the tracking process when particles are moving forward in time, it is also necessary to know the concentration variation at each junction obtained using the LED method, particularly its values before and after the moment when it changes.
As illustrated in
Figure 7c, the particle that arrived at G from junction F departed from that junction 30 + 30 = 60 min before the designated instant. Using the LED method, the quality analysis reveals that the particle’s load was 3 g/s at the time of its departure. In contrast, the particle that originated from junction D departed 30 + 25 = 55 min earlier with a load of 2 g/s. Consequently, both reach junction G simultaneously, 30 min before the designated moment, resulting in an aggregated load of 3 + 2 = 5 g/s. According to Equations (3) and (11), at junction G 1 g/s leaves the network in the demand node, and 4 g/s persist in their trajectory through junction H, matching with the observed load at that junction.
Extending this reasoning to all network, finally three initial particles contributed to providing the load of 4 g/s to the observed particle in junction H at the designated instant. The more recent particle left tank A 100 min earlier, bearing a load of 10 g/s (
Figure 7d). At that particular instant, two additional particles were already in travelling through pipes BE and CF, with respective loads of 3 g/s and 2 g/s. The first of them was a consequence of another particle that departed from tank A 120 min prior (see
Figure 7e), while the second was a consequence of other particle that left the same tank 150 min earlier (see
Figure 7f).
In the backward analysis, each time a particle reaches a junction, new particles are created that converge on it, one for each pipe that feeds the junction, so the trajectories that converge on the destination junction fanning out. However, it can be demonstrated that these trajectories ultimately converge to focus on the sources (tanks, reservoirs and junctions with negative demand), which represent the only possible origins. The total number of particles that will depart from the supply sources is equal to the number of paths consistent with the circulating flows that connect the different sources to the observation junction. It is important to note that each of these particles will leave the source at a different instants, so that the sum of the time lag between that instant and the moment of departure of the slowest particle, plus the time taken to travel the entire path given by (6), must always be the same for the coincidence at the destination junction to occur at the moment of observation.
In the provided example, the three particles originate from the same point. The travel times for each of the routes are 100, 120, and 150 min, respectively. The first particle departs 50 min after the third, which is the slowest, and the second departs 30 min after the third.
To verify the results, a FPT analysis of each of these particles can be performed. Upon reaching a junction, the creation of new particles is initiated downstream, as many as there are pipes coming out of the junction. However, it should be noted that only those particles which follow one of the paths constructed during the preceding BPT analysis will reach the destination junction at the moment of observation, and only these particles will contribute to justifying the load observed at the destination junction.
To determine the proportion in which each travelling particle contributes to the final load, Equation (1) can be referred once more, which ultimately leads to Equation (5). It must be noted that, while the BPT analysis generates as many particles for each junction as pipes feed it, the FPT analysis of the source particles considers an independent behaviour for each one of them, despite their potential convergence at a given junction and moment along their trajectory towards the destination junction. In fact, multiple particles which embarked on their journey at distinct times and origins, must progressively coincide at the intermediate junctions along their trajectories. This gradual convergence of particles ultimately culminates in a state of simultaneity at the same destination junction and instant.
According to the provided description, the overall mass balance leads to the following equation:
being the total load observed at the destination junction N, the set of all paths leading to the destination junction from the different origins O, the departure time for each path according to the travelling time given by Equation (6), and the overall dilution factor for each path given by Equation (5). The initial load of the particle at the departure time is the product of the concentration of source O and the output flow rate at that time, so . Finally, this load will eventually be diluted according to the factor .
Conversely, at any given moment T during the period in which the particles move toward their destination, the following must hold true:
where the first term constitutes the aggregate contribution to the final load of the particles travelling along paths that leads to the destination junction at time T. The dilution factor
of these particles will be a fraction of the overall dilution factor for the path
, which only accounts for the part of the path that has already been travelled on the journey backwards in time. The second term represents the contribution of particles that will leave their sources at a time after T, that is, of the particles that have already completed their journey backwards at that moment.
For the sake of clarity, let us apply the above mass balances to our illustrative example. It has been shown that the total load of junction H is attributable to the contribution of three particles that departed from tank A at designated times t
6 = −100 min, t
8 = −120 min, and t
11 = −150 min, bearing each particle a load of 10 g/s. According to Equation (5) and the flow rates shown in
Figure 3,
Table 1 summarizes the resulting mass balances, where the loads are expressed in g/s, and the concentrations in ppm. First, the dilution factors are calculated for three specific times: t
1 = −30 min (
Figure 7c), t
6 = −100 min (
Figure 7d), and t
11 = −150 min (
Figure 7f). At the bottom of
Table 1, for each case, the load of the particles under consideration is initially converted into concentration by dividing it by the flow rate of the pipe in which they are located. Then, the corresponding dilution factor is applied, and the final concentration is converted back into the contributed load to the observed load at the destination junction by multiplying it by the flow rate at this point. It can be verified that the aggregated load contributed by all particles equals 4 g/s in all cases, which corresponds to the observed load.
As illustrated in
Figure 7c, when t
1 = −30 min, the partial dilution factor for the particle following path 1 (
Figure 4) is
, while for the particle resulting from the merger of paths 2 and 3, it is
. The final charge contributed by each particle is 1.6 g/s and 2.4 g/s, respectively, giving a total of 4 g/s. When applying Equation (13), only the first term is considered in this case, since no particle has yet reached its point of origin. In the case of
Figure 7d, one of the particles has already reached the tank, and its load is considered in the second term of Equation (13), contributing 1.6 g/s to the final load, of the initial 10 g/s. Finally, in the case of
Figure 7f, when the slowest particle leaves, only the second term of Equation (13) is counted. This is equivalent to applying the global Equation (12), which defines how each of the initial particles contributes to justifying the final load observed in H.
A more general mass balance reveals that the total output mass of the original particles is 10 + 10 + 10 = 30 g/s, of which only 4 g/s reach junction H, with no reactions occurring. The remaining mass has three possible destinies: it has either already left the system through the demand nodes, has arrived at junction H prior to the moment under consideration, or is currently in transit through the network’s pipes and is scheduled to arrive at junction H later. For example, in the scenario where a particle is emitted from the tank at t
8 = −120 min (
Figure 7e), a sub-particle derived from it follows the fastest path (path 1) and arrives at junction H earlier, while another follows the slowest path (path 3) and will arrive at junction H later. Only the particle that follows path 2 arrives at the precise moment, thereby contributing a total of 1.2 g/s to the observed load. In other networks, some sub-particles may also be travelling through the network at a given moment that will never reach the observation point. These sub-particles do not form part of the balance of Equation (13).
It is important to note that, once the paths leading to the observation junction from the sources, and its departure times have been identified, the initial load of the particles that contribute to the observed load at the destination junction can be determined from data, as well as the contribution of each of these particles to that final load. This condensed model is referred to in the literature as an input-output model [
18]. Following this model, it is now possible to reproduce the progress of each particle and observe how their load is diluted downstream following the multiple paths created according to the method described in
Section 2.1, but to justify the observed load at the destination junction we must restrict the progress only to the paths that lead to it. However, this type of analysis will require as many forward analyses as there are particles contributing to the final load.
On the other hand, if a prior quality model has been executed by the LED method, by applying the BPT method, it is possible to determine in a single execution which particles contribute at each moment to justify the observed load, their location at each time, and the load they have at that moment. This load will increase as we approach backward to the source node, as illustrated in
Figure 7. This is a critical consideration for future applications, such as the use of the BPT method to identify the injection point of a pollutant.
Finally, it should be noted that the illustrative example assumes constant flows and the transport of a conservative substance. As articulated in the FPT method, all flow changes must be considered in practice, which may occur while the particles are in the middle of a pipe, and their direction may even undergo a reversal. Moreover, for non-conservative substances, the concentration of the particle at the pipe’s end junction must undergo correction with respect to its concentration at the initial junction, employing in the case of first-order reactions Equation (10) in reverse order. These considerations will affect the calculation of the dilution factors by extending Equation (5), while the other considerations made in this section remain valid.