You are on page 1of 11

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

A generic mathematical formulation of a piecewise linear


approximation of nonlinear hydrological storage processes
M. Ostrowski
1 Introduction
Hydrological modeling has been in the centre of interest for more than 50 years. Starting
from basic concepts like the unit hydrograph (Sherman, 1947) and the linear reservoir
concept (hier die erste Quelle finden) modeling efforts have shifted to more physically
based approaches using nonlinear differential equations. A well known example is the model SHE (Refsgaard et al) or further derivatives like the SHETRAN (O'Connell et al). These
more detailed models have proved their reliability and appropriateness to solve specific
practical problems. However, the necessary input data or the computational effort is often
too demanding for general practical application. The development of the approach presented started from the linear reservoir storage, being then further developed for soil moisture
modeling (Ostrowski (1982)). The soil moisture model was improved to perform more flexible (Ostrowski, 1991). Soon the basic concept of piecewise linearisation was described as
a generic approach (Ostrowski, 1992). From then the concept was further developed and
improved by the authors. Today the module is part of several simulation packages for hydrologic and water resources problems. In this paper the mathematical background of the
quasi nonlinear storage will be explained, giving some examples for its application at the
end. This late review of our own work might be helpful in the light of recent publications by
Clark and Kavetski and Kavetski and Clark about numerical monsters. I have frequently experienced numerical problems with non linear modelling, but I have never met such monsters. If Kavetski et al identify severe numerical instabilities in frequently applied models
such as the TOPMODEL by Beven, I would rather consider that missing scientific prudence.
I have searched for a while for a stable and numerically efficient solution approach for non
linear hydrological modellling I finally developed the mathematical solution during my visiting
professorship at the Addis Abeba University from 1988 to 1991. There might be better
methods available, Still, I think that our method is of general interest to the hydrological
community.

2 The linear reservoir concept


The initial linear reservoir approach started with a single inflow, single outflow storage element. Conceptual storage models for hydrological systems were first developed by Zoch
(1934). Theywere intensivelky used during the last 70 years, mainly in the form of single linear reservoirs. Numerous extensions led to more complex models such as the linear parallel
cascades, which still today play a major role in hydrological modelling. The use of a linear
differential equation has always bee considered a limitation. As early as 1969 Becker and
Glos describe first approaches to the non linear single reservoir with hints towards the required numerical solutions. The general basic non linear differential equation is given in Eq.
1, relating system outflow to storage.

V (t ) 1 / k Qo (t )

(1)

Erstelldatum: 31.03.2013 16:25:00


Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

V(t)
Qi(t)

V(t)

Qo(t)

n=1
n>1
n<1

Qo(t)

Figure 1: Scheme of a single inflow, single outflow storage


The continuity equation is given in Eq. 2 for the storage element given in Fig. 1 with inflow
Qi(t), assumed to be constant during the integration interval, but it can be a known function
also:

dV (t )
Qi Qo (V (t ))
dt

(2)

Eq. 3 defines Qo as a linear function (n=1) of storage content V(t):

Qo (t ) k V (t )

(3)

Combination of Eq. 2 and Eq. 3 results in Eq. 4, being the differential equation of the linear
reservoir:

dV (t )
Qi k V (t )
dt

(4)

The differential equation is of the linear first order type with an analytical solution . After
separation of variables we receive Eq. 5:

dt

dV
Qi k V (t )

(5)

After integration the solution is given in Eq. 6:

Erstelldatum: 31.03.2013 16:25:00


Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

1
t ln Qi k V (t ) C
k

(6)

From the initial condition of storage content V(t=t 0) = V0 the integration constant C can be
determined as stated in Eq. 7:

1
C t0 ln Qi k V0
k

(7)

After some rearrangements in Eq. 8 the final storage as a function of time is given in Eq. 9:

t t0 1 lnQi k V (t ) 1 lnQi k V0

k t t0 ln Qi k V (t )
Qi k V0

(8)

k V (t ) Qi Qi k V0 e k t t0

V (t )

Qi
1 e -k (t t0 ) V0 e -k (t t0 )
k

(9)

In Eq. 9 the first part quantifies the volume change due to inflow during time interval (t-t 0),
the second part describes the volume reduction due to outflow from initial storage volume
V0.
Combination of Eq. 3 and Eq. 9 in Eq. 10 allows the continuous computation of outflow Q o
(t) as a function of inflow and inital storage.

Qo (t ) Qi 1 e -k (t t0 ) V0 k e -k (t t0 )

(10)

Frequently the mean outflow during a time interval (t-t 0) is computed as the arithmetic mean
of outflows Qo(t0) and Qo(t). To determine the volume change it is multiplied with the time interval. As V(t) is non linear, this approximation will lead to computational errors which are related to the time interval and the degree of non linearity expressed by the integration constant k. To avoid such possibly large volume errors additional integration of Eq. 10 is required. It is assumed that integration is done for the same time interval starting with t 0. This
leads to the outflow volume Vo(t) according to Eq. 11:
t1

Vo Qo (t )dt Qi t e -k ( t t0 ) V0 e -k ( t t0 ) C
k

(11)

Assuming that Vo(t=t0) is Vo,0, the integration constant C can be determined according to Eq.
12:

Erstelldatum: 31.03.2013 16:25:00


Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

C Vo , 0 Qi t1 e -k (t1 t0 ) V0 e -k (t1 t0 )
k

(12)

resulting in Voutflow(t) according to Eq 13:

Voutflow (t ) Vo ,0 Qi t t0 e -k (t t0 ) 1 V0 e -k (t t0 ) 1
k

(13)

Finally the lost volume is defined as Vo = Vo(t) Vo,0 during interval t = t - t0 and Eq. 13
can be simplified according to Eq. 14:

Vo Qi t i V0 e -k t 1
k

(14)

Eq.13 is an exact value of the volume flown out of a linear reservoir within time step t. By
dividing the volume change by the time interval, the exact mean error free outflow can be
computed according to Eq. 14.

Qo

3
3.1

Vo
t

(15)

Piecewise linear reservoir


Consideration of a single process

Increasingly, the approximation of a non linear hydrological process by a linear reservoir


with static characteristics during a simulation period is considered inadequate. When approximating several storage -outflow- relationship the large differences between the linear
and the realistic non linear functions become evident.
Example:Outflow from a large reservoir through a small outlet.
Qo = f(h 0.5) and V = f(ha) Nonlinearity
To account for a better description of these non linear functions, the linear reservoir approach must be abandoned or extended, which leads to a mathematical problem.
Using n not equal to 1 results in a non linear differential equations without an analytical
solution. Defining long term continuous simulation as a basic objective, numerical solutions
have been considered computationally too unstable or expensive, but might be applicable in
the future. It is desirable to maintain the basic advantages of the linear reservoir concept
being numerical stability, minimisation of numerical errors and numerical efficiency instead
of using e.g. hydrodynamic numerical modelling approaches instead.
For these reasons, it seems to be attractive to replace non linear functions by piecewise linear polygons or characteristic functions (see Kundzecvicz, 1988). For each linear segment
Erstelldatum: 31.03.2013 16:25:00
Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

of the function the linear reservoir approach can be applied, provided some elementary precautions are taken.
In general the relationship according to Eq. 16 is valid:

Qo (t ) k (V ) V (t )

(16)

Figure 2 shows the principle. However, remarkable errors will occur, if during a given time
interval the boundaries of a storage reach would be under or overshot. It is necessary to
switch to the next lower or upper reach during such an interval. The polygon function must
be processed piecewise until the end of the computational time interval is reached.
Qo(t) is defined according to Eq. 17:

Qo,4

Qo(V)
i=4
k4

Qo,3

i=3

Qo(V(t))
k3

Qo,2

i=2
k2

Qo,1

i=1
V

k1
V1

V2

V(t)

V3

Fig. 2 Piecewise linearisation of function Q o = f (V)

Qo (t ) Qo , 2 k3 V (t ) V2

(17)

Introducing index i as the point number for discretisation, Eq. 18 is the general function of
the process.

Qo (t ) Qo ,i 1 ki V (t ) Vi 1

(18)

Dissolving the brackets it becomes possible to separate the terms into a part being constant
during the time interval t and the remaining part being a function of actual storage and
thus of time in Eq. 19.
Erstelldatum: 31.03.2013 16:25:00
Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

Qo (t ) Qo ,i 1 ki Vi 1 ki V (t )

(19)

f (t )

cons tan t

Replacing Qo(t) into continuity equation Eq. 2 leads to Eq. 20

dV
Qi Qo ,i 1 ki Vi 1 ki V (t )


dt

(20)

f (t )

cons tan tCON

By recomputing the constant part within the actual time interval, Eq. 20 can be transferred
by substitution into Eq. 4. As demonstrated before, Eq. 4 has an analytical solution. Consequently, the volume flown out Vo during time interval t can be computed using Eq. 21
according to Eq. 14:

CON

Vo CON t
V0 e -ki t 1
ki

(21)

The mean outflow within the time interval is determined according to Eq. 15 by dividing Vo
by t.
Problems occur, when due to the volume change determined during the actual time interval
t the validity limits Vi and Vi-1 of the constant ki for the linear reach assumed are violated.
Especially in case of long time intervals as for daily time or monthly steps this occurs frequently. To avoid severe mass balance errors resulting from such violation of limits the use
of an internal variable time step is advisable to determine the time required to reach the upper or lower boundary of the reach, respectively. To achieve this Eq. 22 can be used. Replacing Qi by the sum of constant terms CON from Eq. 21 results in Eq. 22:

V (t )

CON
1 e -ki (t t0 ) V0 e -ki (t t0 )
ki

(22)

The actual volume at the upper or lower end of the actual reach V limit is either Vi or Vi-1 and is
reached after the time tlimit:

Vlim it

CON
1 e -ki (tlim it t0 ) V0 e -ki (tlim it t0 )
ki

(23)

By rearranging Eq. 23 time tlimit can be computed according to Eq. 24:

t lim it

CON

Vlim it

1
ki
ln
ki
V CON
0
ki

t0

(24)

The remaining time to reach the end of the computational time interval is defined as t rest in
Eq. 25
Erstelldatum: 31.03.2013 16:25:00
Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

t rest t t lim it t t 0 t lim it

(25)

With this procedure the external fixed computational step is replaced by the sum of a number of internal time steps. The number and duration of internal time steps depends on the
degree of segmentation chosen, i.e. the number of linear reaches to approximate the non
linear function. The single volume changes Vo, t during each internal time interval are summarised and the resulting outflow is determined according to Eq. 26:

Qo

3.2

o ,t

(26)

Consideration of multiple processes

The method described under 3.1 considers the case that the storage has a single inflow
and a single outflow. In hydrology, however, most storage changes occur due to multiple
processes. Therefore, the approach was extended to consider several inflows and outflows
which can either be independent of storage or can be a function of the storage content. The
variables being independent of time are named time series Q i,,m, those being a function of
storage are named processes Qo,nV(t)).
A storage element loaded with several time series and processes is shown in figure 3.

V(t)
Qi,1(t)
Qo,1(t)
Qi,2(t)

Qo,1(t)

Qo,2(t)

Qo,2(t)

V(t)

Qo,3(t)

Qo,3(t)

Qi,3(

Qo,n(t)

t)

Figure 3: Scheme of a multiple input/output storage element


The continuity equation for such an element is written as:

dV (t )
Qi ,1 Qi , 2 Qi ,3 Qo ,1 (V (t )) Qo , 2 (V (t )) Qo ,3 (V (t ))
dt

(27)

The functional relationships are not explicitly given in the following equations, as the notation chosen is clear.
The Qi,m terms could also be known functions of time, but are considered constant during a
single computational time interval here. Thus, they can be summarised, which leads to Eq.
28.
Erstelldatum: 31.03.2013 16:25:00
Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

ne
dV (t ) me
Qi ,m Qo ,n
dt
m 1
n 1

(28)

According to Fig. 4, all processes Qo,n can be defined as piecewise linear functions of storage. To avoid mass balance errors according to 2.1 the integration over time has to consider the limits of linear reaches.

Qo1,,4

Qo(V)

Qo,,2,0

i=4

Qo,,2,,1

K1,4

Qo1,,3

i=3

Qo(V(t))
Qo,,2,,2

K1,3

Qo,1,2

i=2
K1,2

Qo,,2,,3

Qo,1,

i=1

K2,4

Qo,,2,,4
Qo,,1,,0

V0

K1,1
V1

V2

V(t)

V4

V3

Figure 4: Linearisation for two outflow functions

In Fig. 4 two processes Qo,1 (V) and Qo,2 (V) are given, replacing continuous non linear relationships by piecewise linear functions dividing the storage element into arbitrary reaches.
The slope of the linearised functions is defined by as k ,n,i. Each process can now be defined
according to Eq. 29.

Qo ,n (V (t )) Qo ,n ,l 1 k n ,l (V (t ) Vl 1 )

(29)

By dissolving the brackets two terms can be defined one being independent and the other
independent of V(t) according to Eq. 30:

Qo ,n (V (t )) Qo ,n ,l 1 k n ,l Vl 1 k n ,l V (t )

cons tan t

(30)

f (t )

The dependent process terms are then summarised according Eq. 31:

Erstelldatum: 31.03.2013 16:25:00


Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

ne

ne

ne

n 1

n 1

n 1

Qo,n Qo,n.l 1 kn.l Vl 1 kn.l V (t )

(31)

Inserting Eq. 30 into the continuity equation results in Eq. 32:


ne
ne
dV me
Qi ,m Qo ,n ,l 1 k n.l Vn 1 k n ,l V (t )
dt
m 1
1
n 1
n

C1
C3

(32)

Except for the + of the dependent term the equation is identical to the continuity equation of
the linear reservoir in Eq. 3. By setting C3 = -C2 and subsequent substitution we arrive at
Eq. 33:

dV
C 1 C 2 V (t )
dt

(33)

with known solution in Eq. 34:

V (t )

C1
1 e -C 2( t t0 ) V0 e -C 2( t t0 )
C2

(34)

As a convention, it is assumed that time series as well as processes are defined as Inflow

positive and Outflow negative. By summing up the single terms it is determined automatically whether the storage element is filled or emptied.
To determine the process intensity at a certain time t Eq. 34 can be solved for V(t), which is
then inserted into Eq. 30. to compute Qo,n(V(t)). The same problem occurs as in the case of
the linear reservoir concerning the determination of mean values during the computational
time interval, i.e. assuming linear processes might lead to relevant errors as well as the exceedence of sub reach limits during the external time interval. These are handled according
to the procedures demonstrated for the single inflow/outflow case.
3.3

Stability and accuracy

The method is based on the analytical solution of a linear first order differential equation
and thus is numerically stable. It should be mentioned, however, that the computer code is
written in FORTRAN. The intrinsic functions (EXP and LN) are approximated by Taylor
series with a high but still limited accuracy. In the case of very low ki(Vi) in very few cases
fluctuations occurred which had to be cured by special methods.
The author discussed the method with mathematicians to find out which type of integrator
was developed. According to Jens Lang, TU Darmstadt (2010, personal communication) the
approach might be a special type of exponential Euler integrator.

Erstelldatum: 31.03.2013 16:25:00


Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

3.4

Computational efficiency

The approach only requires a maximum of one additional computation to find out whether
the upper or lower bound of a reach is relevant. Otherwise no iterations are required.
Therefore, the algorithm is extremely efficient, which allows the non linear long term simulation of complex water systems at high temporal resolution. Also, the algorithm facilitates the
application of search methods for parameter estimation.

Application

Application to single hydrological compartments

4.1

Below the integration method is first demonstrated by simulation of single compartment processes. This
4.1.1

Kinematic Wave

The approximation for the kinematic wave equation for surface runoff was tested by means
of the overland flow experiment by

4.1.2

Flow routing in pipes

Flood routing in river and channels was based on the linear approximation of the stagedischarge relationship according to

4.1.3

Multi-purpose reservoirs

4.1.4

Simulation of a layered soil

Application within complex models

4.2

4.2.1

The WBR Model

4.2.2

The Blue Model

Summary

The piecewise linearised analytic approach described offers the opportunity to determine
multiple processes being non linear functions of storage content for a chosen time arbitrary
Erstelldatum: 31.03.2013 16:25:00
Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

Derivation of the linear and piecewise linear multiple inflow, multiple outflow storage processes

interval without excessive numerical iterations. By combination of external known or assumed stochastic events the relationship between process und storage can be scaled. This
also facilitates the simulation of operation und control rules.
References
Becker,A, Glos, E., 1969: Grundlagen der Systemhydrologie, Mitt. Des Instituts fr Wasserwirtschaft Berlin, Heft 32
Ewen, J., 1997: Blueprint for the UP Modelling System for Large Scale Hydrology, Hydrology and Earth System Sciences 1, Seiten 55-69, EGS
Karmeshu, Schurz, H.,1994: Moment evolution of the outflow-rate from nonlinear conceptual reservoirs, Institut fr Angewandte Analysis und Stochastik im Forschungsverbund Berlin
e.V.
Lempert, M., 2000: Ein GIS gekoppeltes rasterbasiertes Modell zur Berechnung des Wasserhaushalts kleiner Einzugsgebiete, Mitteilungen des Instituts fr Wasserbau und Wasserwirtschaft, Heft 110
Lohr, H., 2001: Simulation, Bewertung und Optimierung von Betriebsregeln fr wasserwirtschaftliche Speichersysteme, Mitteilungen des Instituts fr Wasserbau und Wasserwirtschaft, Heft 118, 2001
Mehler, R., 2000: Mischwasserbehandlung Verfahren und Modellierung, Dissertation am
Institut fr Wasserbau und Wasserwirtschaft der TU Darmstadt, Heft 113
Singh, V.P.,1988: Hydrological Systems: Rainfall Runoff Modelling, Vol.1 Chapter 16, Prentice Hall
Ostrowski, M.,1992 : Ein universeller Baustein zur Simulation hydrologischer Prozesse,
Wasser und Boden, Heft 11
Thiele, W., 1983: Untersuchung eines neuen Verfahrens zur Speichervorentlastung mit Hilfe von Simulationsverfahren, Dissertation an der Fakultt fr Bau-Wasser- und Forstwesen
des Wissenschaftsrates der Technischen Universitt Dresden
Wittenberg, H. 1997: Der nichtlineare Speicher als Alternative zur Beschreibung von Basisabfluss, Grundwasserspeicherung und Trockenwetterganglinie, Die Wasserwirtschaft Nr.
12, Dezember
Zoch, R. T. (1934). "On the relation between rainfall and streamflow." Monthly Weather Review, 62(9), 315-322

Erstelldatum: 31.03.2013 16:25:00


Zuletzt gespeichert: 12.10.2013 11:41:09 nachm.

You might also like