2.1 System Components and Determination of Their Temporal Evolution
We consider a system that can be represented as a reservoir, with input
, output
, and storage
S. These three quantities are connected by the continuity equation, which expresses the conservation of mass and is written in differential form as:
In hydrosystems, the inflow is typically the upstream flow discharge and the outflow is the downstream flow discharge or a reservoir spill, and are usually expressed in terms of volumes instead of masses (but unless we deal with uncompressible fluids, we should stick with mass units). The reservoir could be a real one, upstream of a dam, but the use of imaginary reservoirs is not uncommon. For example, an entire catchment is often represented as a single imaginary reservoir with the inflow being the precipitation [
10,
11] or as a cascade of reservoirs [
12], in which outputs from upstream reservoirs are inputs to the downstream reservoirs in the cascade. Similar representations may be appropriate for groundwater stored in aquifers [
13].
Storage, however, is not limited to locally resolved processes of surface- or ground-water. The global hydrological cycle can be viewed in terms of mass exchange with the main storage being the oceans, but with the atmosphere having a crucial role when evaporation and precipitation are studied [
14]. Modelling of the carbon cycle can also be made in a similar setting, as will be shown in section 3.
The typical problem is to determine the outflow
for known inflow
. To fully describe the transformation of inflow to outflow, we need one more equation. The solution of the two equations is commonly known as
reservoir routing. In hydrology and hydraulics we usually construct the second equation by means of a stage-discharge and a stage-storage relationship. Different equations can be formulated, depending on the system dynamics, but the following power type (combined) equation is representative for most problems:
where
is a dimensionless parameter (exponent) and
and
are parameters with units of mass and mass flow, respectively. These are necessary to make the equation physically (dimensionally) consistent and here will be regarded to be the initial conditions (at time zero, i.e.
, and
, respectively). Notice that these parameters are not unique; for example we can multiply
and
by
and
, respectively, and get another pair of valid parameters.
It is well known that when
, we get a first-order linear differential equation with constant coefficients, i.e.,
where
is a characteristic time, whose meaning will be discussed below. This admits a closed solution:
This case (
) is known as the
linear reservoir [
15,
16,
17,
18,
19,
20] and the fact that it admits a general analytical solution makes it a useful tool. We will call a reservoir with
a
sublinear reservoir (as the discharge function
is sublinear, meaning that
). Conversely, we will call a reservoir with
a
superlinear reservoir. For both sublinear and superlinear reservoirs no general analytical solution can be found, except for very few special cases (e.g. [
21,
22,
23]), some of which will be discussed below and in Appendix A. Here we will seek general approximate solutions for
.
As a first step, we standardize the equation in the following form, in which all variables are dimensionless:
with initial conditions
where
with
,
denoting the values of the respective variable at time
. Notice the use of lower- and upper-case symbols for dimensionless and dimensional quantities, respectively, with the exception of dimensional time, where we use the common symbol
t, while we use the Greek symbol
τ for dimensionless time.
Now we make a first order linear approximation of
at
(similar to Basha [
24]), as
and neglecting the high order terms we get
whose solution is
If the dimensionless inflow is constant (i.e.
, or dimensional inflow
), this simplifies to
where, as
, the dimensionless outflow becomes
and the dimensional output becomes
.
It is important to note that, despite being an approximation, this preserves the mass balance precisely. Indeed, the time integral of outflow minus inflow is
while the change in storage is
and upon substituting
we confirm that the right-hand sides in the above two equations are identical.
It is readily seen that if
, then
, which describes a steady state flow. In this particular case, the solution is exact. When the inlow is zero, a case that is represented as
, the solution becomes
but it is not exact; the exact one will be discussed below. For
and
this results in
, meaning that the reservoir never empties. This looks absurd, but it is consistent with the linear approximation made, as seen in Equation (8), according to which no outflow occurs for
. For
, the resevoir empties at
and beyond that time
.
For inflow linearly varying with time, i.e.
, the solution becomes
where the rightmost equation can also be written as
If
, the solution is valid for any
τ; if
, it is valid for
.
Some special cases of
and
also admit exact analytical solutions, like in the linear reservoir problem. A first case is when the inflow is zeroed at time
, and continues to be zero (
) at any
. In this case the solution of the differential equation (5), which is now homogenous, with initial conditions (6) is easily found to be
and it apparently holds for
, that is, for any
if
, but for
if
; beyond that time
. As
, we have the limiting case:
We also examine the following two special cases, which are useful as benchmarks. The first benchmark case is superlinear,
, for which:
The second is sublinear,
, with
where
denotes the Lambert W function, defined as the inverse of the function
. The case
also has an analytical solution for changing inflow as a linear function but this is too complicated to write down. It is thus preferable to use numerical integration, which can work in every case, yet the analytical approximations are quite useful, as will be seen in the next sections. Additional cases of analytical solutions and different approximations are studied in Appendix A.1.
The good performance of the approximate solution is illustrated in
Figure 1 for constant inflow and in
Figure 2 for input linearly changing with time. From these figures we infer that, as long as the exponent
is between 1/2 and 2, and the initial dimensionless output
between 0.8 and 1.25, the linear approximation is satisfactory. In practical tasks these ranges cover the most typical applications. An exception is the determination of the response time (see section 2.3), in which the input is zero (and hence
) but for this case we have an exact solution (Equation (17)).
2.2 Residence Time
The above mathematical framework allows us to determine characteristic times, such as residence and response times and probabilities thereof. In this subsection we deal with the former, starting with its definition, and in the next one with the latter.
Definition 1: The residence time, W, is defined to be the time duration that a particle (molecule) spends in the reservoir from since it entered it up to the time it left it.
As a starting point, we consider a simple reservoir in which the flow is steady, laminar and one-dimensional, i.e., the flow properties change only along the flow direction, described with a variable
, while the cross-sectional area may change with
x and is
. As the flow is steady, the discharge
is constant in time and the same for all
x (inflow equal to outflow), while the velocity changes with
as
. Due to the laminar flow a molecule flowing into the reservoir at point
will follow a smooth trajectory and will travel a distance
in time
. Therefore, by integration, the total time that the molecule spends inside the reservoir, i.e., the residence time, denoted as
, is
and in this case is the same for all particles. The integral is the reservoir volume
and hence
As we will see below, this residence time, , despite being determined above by assuming a simplistic and unrealistically regular system, is characteristic for any reservoir, however complex and chaotic.
Next, we examine a fully random system, in which particles are well mixed and the residence time can only be modelled by a stochastic approach. Let be a stochastic variable (random variable) representing the time a molecule left the reservoir, once it entered at time . (Notice that we use the Dutch notational convention to underline the stochastic variables.) At time the mass stored in the reservoir is . At time the mass is . Of the molecules contained in at time , the proportion of those removed at time is found, by neglecting second order differentials, to be .
The event that a molecule, which entered the reservoir at
, has remained at time
, can be denoted as
}. The event that it leaves the reservoir in the next elementary interval
is
and its probability, conditional on
, is equal to the ratio of the mass leaving during this interval,
, to the total mass:
Applying the definition of conditional probability, we write
The numerator is the probability density multiplied by
, i.e. the derivative of the distribution function
. Hence
The solution of this differential equation is
and in dimensionless form, with
the distribution function of the dimensionless residence time is
or
This is simplified to the following expressions for the indicated special cases:
Linear reservoir (in which
), any inflow:
Superlinear benchmark reservoir,
, constant inflow:
Sublinear benchmark reservoir,
, constant inflow:
Equation (29) is the standard exponential distribution. The equations for the benchmark reservoirs are non-standard and look complicated, yet if we plot them we see that they do not differ substantially from the exponential distribution. To make the differences more visible we choose to plot the probability ratio
on a logarithmic axis, instead of the distribution function
, which would not show any visible difference. This is seen in
Figure 3, where indeed the body of each distribution is almost identical to each other, and differences appear in the tails (
, noting that both the mean and standard deviation of the standard exponential distribution equal 1).
Next we proceed to forming an approximation of the distribution function for the general case, i.e. not limited to the benchmark cases. Specifically, for the ratio
appearing in Equation (27) we propose the approximation:
where
are parameters. Then the integral in Equation (27) becomes
so that Equation (27) becomes
The distribution is interesting, and its domain is
if
and
if
. In both cases it has all its moments finite if
. For the special case
, the distribution becomes
To find the parameters, we match the true values of
at
and
and its derivative at
. The latter is found by approximating
from Equation (11). The obtained equations are
and their solution is
As seen in
Figure 3, the approximation compares very well to the exact solutions for the benchmark cases (Equations (29)-(31)).
By integration of
we find that the mean is
while in subcases not included above (e.g.
), the mean diverges to infinity. From the equation
the median is found to be
It is useful to note that for a linear reservoir (
) the above approximations result in
and, hence, recover the exact case of an exponential distribution, in which
. In the exponential distribution we have
and this property has been used to define other variants of characteristic times such as the so-called e-time (used by Berry [
25]), relaxation time, e-folding time, half-life, or decay constant (used by IPCC [
26,
27], but without providing definitions). Here we prefer not to use such terms, but stick to the probabilistically meaningful terms mean and median (dimensionless) residence times. The dimensional mean and median are found after multiplication by
.
We stress that, excepting some special cases, the above formulae provide approximations rather than exact values. To find a second approximation, simpler to apply, we conducted a numerical investigation and concluded with the following simple formulae, designated as approximation 2:
where the approximation of
also includes the case of a linear change of inflow with rate
(dimensionless).
Comparisons of the approximations of the mean residence time with the exact values for the benchmark cases and constant inflow are given in
Figure 4. It is observed that approximation 2 is somewhat better than approximation 1—and also simpler. In addition,
Figure 5 shows comparisons for changing inflows. Generally, the approximations perform well. Most importantly, both figures show that for the common ranges of
and
, the dimensionless residence time is close to 1, not differing more than ±10%. Therefore, this thorough theoretical investigation results in the simple conclusion that in practical problems it is sufficient to take
and
. Consequently, considering the dimensional time, in practice we may take the mean residence time as
and the median one as 70% of
.
2.3 Response Time
The response time is conceptually different from the residence time as it is related to the impulse response function (IRF), defined as follows:
Definition 2: The impulse response function (IRF), g(h), of a system is defined to be the system output at time lag h after the system is stimulated by an input that is an (instantaneous) impulse of unit mass (a Dirac delta function).
A thorough and general presentation of the IRF concept in a causality framework has been presented by Koutsoyiannis et al. [
28,
29,
30]. In our case, the following particular considerations are taken into account for a reservoir: (a) the system can be studied in terms of the dimensionless quantities and the dimensional ones can then be obtained through Equation (7); (b) the response function
for dimensionless time lag
is identical to the output function
for
, which results from the impulse of an otherwise empty reservoir; and (c) the system is causal, which means that
for
.
Based on these considerations and the framework in [
28], we proceed to the following:
Definition 3:
Based on the dimensionless IRF of a reservoir, g(η), we define the mean and the median dimensionless response time as the mean and the median of the function g(η), namely:
Notice that the median is defined by an implicit equation. To find the dimensional time lags we need to multiply those by the characteristic time .
To conceptualize the impulse, we imagine an empty reservoir (in dimensionless setting) with zero inflow, which at time zero receives instantaneously a unit input, increasing the storage to
and causing an outflow
. Subsequently, the input becomes zero and the outflow is decreased. Hence, the outflow is given by Equation (17) and, consequently:
It is then easy to find from Equation (41) the characteristic times, which are:
Notice that, for
, the mean
diverges to infinity. It is stressed that the quantity
is the dimensionless time required to empty half of the reservoir storage, and not that required for the outflow to be reduced to half its initial value (denoted as
and implicitly defined as
). For completeness, the resulting expression for the latter is
While the median
(similar to the mean
) is an increasing function of
,
is a decreasing one (for
), taking identical values only for
(linear reservoir). The particular values for
(linear reservoir) are identical to the mean and median residence times:
It is interesting to note that the original definitions of the characteristic lag times in causality framework of Koutsoyiannis et al. [
28] were based on a linearity assumption. On the other hand, Equations (27) and (17) did not assume linearity and thus the results found do hold for a nonlinear system (reservoir). This offers a basis for an extension of that causality framework. We note, however, that, while in the linear case the function
suffices to determine the output for any input through a convolution equation, this is not the case if the dynamics is nonlinear.
It is also easy to find the residence time in the case that the input is an impulse at time
. Using Equations (27) and (17) we find that its exact distribution function is
It is readily seen that Equation (46) fully corresponds to Equation (34), if the parameters of the latter are
. We note though that these parameter values are not determined from Equation (37), as this does not work for zero inflow.
For , this corresponds the exponential distribution; indeed, by taking the limit as , we recover equation (29). For the variable becomes bounded from above by , which means that the reservoir empties (and the outflow ceases) at a finite time. For the time to full emptying is infinite and for the mean of is also infinite.
Furthermore, it can be observed that
and if we take the derivatives, we find that the probability density function is
This is not a coincidence, but it can be easily shown that it holds for any function . We can thus state this result as follows:
Theorem 1: The mean and median response time equal the mean and median residence time for the case that the input is an impulse function.
For different input, though, the residence time is different from the response time. The former depends on the input, while the latter depends only on the exponent
(or more generally on the function
). Illustrations of the different residence and response times for characteristic values of
and
are shown in
Figure 6, which allows formulating the following:
Observation 1: For a linear reservoir, the mean residence time and the mean response time are equal to each other, with a value . The median residence time and the median response are also equal to each other and smaller than by a factor ln 2 = 0.69.
Observation 2: For a sublinear reservoir, the mean and median response times are generally smaller than the mean and median residence time, respectively, and can only become equal if the input is zero.
Observation 3: From a practical point of view and for a reservoir that is not superlinear, the response times are smaller than the characteristic value , and the residence times can only slightly (by < 10%) exceed this value (for highly sublinear reservoirs and initial inflow higher than outflow).
It is useful to notice that the linear reservoir approximation, which in this case takes the form of Equation (14), is not satisfactory when inflow is zero. This is illustrated in
Figure 7, where the approximation is compared to the exact one. The same is the case for the distribution function of residence time when inflow is zero, as seen in
Figure 8. However, this is not a problem in our framework, since the exact solutions in this case are explicit (Equation (17) for outflow and (46) for residence time).