Professional Documents
Culture Documents
Short communication
CALHIDRA 3.0 e New software application for river water quality prediction based
on RWQM1
C.M. Cardona a, *, C. Martin a, A. Salterain a, A. Castro a, D. San Martn b, E. Ayesa a
a
b
CEIT and Tecnun, University of Navarra, Environmental engineering section, Manuel de Lardizbal 15, 20018 San Sebastin, Spain
EPTISA, Arapiles 14, 28015 Madrid, Spain
a r t i c l e i n f o
a b s t r a c t
Article history:
Received 13 September 2010
Received in revised form
25 January 2011
Accepted 2 February 2011
Available online 1 March 2011
This paper presents CalHidra 3.0, a new software package developed for dynamic simulation of water
quality in rivers. CalHidra 3.0 combines a 1-D hydrodynamic model based on Saint Venant equations,
a transport sub-model that incorporates the advectionedispersion terms, and a simplied version of the
River Water Quality Model 1 (RWQM1) for the biochemical transformations. This advanced biochemical
sub-model allows the dynamic simulation of the bacterial populations in rivers, making possible the
simulation of the river acclimatisation to changes of pollutant load or environmental conditions. The
software also includes new tools for a Monte Carlo based Bayesian calibration of the unknown model
parameters. CalHidra 3.0 is implemented based on the Component Object Model (COM) programming
paradigm and uses the Windows graphical environment. Three case studies illustrate the possibilities of
the CalHidra 3.0 software.
2011 Elsevier Ltd. All rights reserved.
Keywords:
Component Object Model
Monte Carlo method
River water quality
RWQM1
Saint Venant equations
ULTIMATE
Software availability
Name of software: CalHidra 3.0
Developer: CEIT Environmental Engineering Department
(http://www.ceit.es/)
First available year: 2008
Software requirements: Windows 2000 or XP
Programming language: C/C, Fortran and C#
Program availability and cost: The software application CalHidra
3.0 is property of the engineering company EPTISA S.A.,
Madrid, Spain.
Contact person: Diego San Martn.
E-mail: dsanmartin@eptisa.es
1. Introduction
Water quality models are nowadays widely used for the
management of the water quality in rivers and streams. Some
examples of these models are: SIMCAT, TOMCAT, QUAL2E, MIKE11,
ISIS, etc. (Cox, 2003). Some of them (SIMCAT, TOMCAT, QUAL2E) are
steady state models that estimate the dilution ratios for constant
pollutant loads. There are others (MIKE11, ISIS) that include the
hydrodynamic equations and the interaction with the sediment.
However, none of them can describe the growth and decay of
biomass and therefore they are not able to explain the biomass
acclimatization in long-term simulations. The River Water Quality
Model No. 1 or RWQM1 (Reichert et al., 2001) was proposed by the
IWA and incorporates the biomass concentrations as state variables
allowing the model to express the evolution of the different populations in time. This feature is very important as it makes the
model well suited for the description of case studies where the
pollutant load or environmental conditions vary over the simulation time.
One of the main drawbacks for a more general utilisation of
water quality models is that they need to be calibrated for each case
study. Generally, the trial and error approach is used to adjust
certain parameters until a reasonable agreement is attained
between model output and eld measurements. The GLUE
approach (Beven and Binley, 1991) is a widely used automatic
calibration method based on the Bayes Theorem (McIntyre and
Wheater, 2004; Martin et al., 2006a). It uses Monte Carlo simulations to yield the joint posterior distribution of parameters, which
explains the suitability of the parameters to obtain good modelling
performance. The main advantage of the method is that it provides
not only the optimum parameter values but also an assessment of
the parameters uncertainty.
974
qs Cdisk
U
vx
vt advectdispers
vx
vx
(1)
vCpark
vPTF$Cpark
v
vPTF$Cpark
E
qs Cpark
U
vx
vx
vx
vt advectdispers
(2)
where x is the coordinate in the longitudinal direction [L], t is the time coordinate
[T], Cdisk and Cpark denote the dissolved and particulate concentration of the kth
component [M L3], E is the dispersion coefcient [L2 T1], U is the average velocity
of water in x direction [L T1], qs is the volumetric ow rate per unit of volume
representing uid sink/sources [L3 T1], and PTF is a dimensionless parameter that
denotes the fraction of the particulate variables that is transported along the river.
The Biochemical sub-model is a simplied version of the IWA RWQM1 (Reichert
et al., 2001) that assumes no signicant changes of pH during the processes. The
resulting model includes 17 variables and 25 transformations (Martin et al., 2006b).
The biochemical transformations are expressed in Equation (3),
X
vCk
Ei;j $fri g
Rn
vt biochemical
HD Data base
(3)
where Ck denotes the concentration of the kth component [M L3], [Ei,j] is the stoichiometry matrix, {ri} the kinetics vector, and SRn the biochemical transformation
term [M L3 T1].
2.2. Numerical schemes
CalHidra 3.0 uses different numerical schemes for each model: a) the numerical
solution of the Hydrodynamic Model is based on a four-point implicit nite difference
scheme (Preissmann, 1960; Martin and McCutcheon, 1999) and b) the Split-Operator
(SO) approach splits the transport and reaction terms for the numerical solution of
the Water Quality Model (Kanney et al., 2003; Prommer et al., 1998). The advective
term is based on the explicit nite difference ULTIMATE (Universal Limiter for
Transport Interpolation Modelling of the Advective Transport Equation) method
(Leonard, 1991) and the parabolic dispersion term plus the sink/sources term are
solved by an implicit nite difference method. The biochemical transformation term
is computed by the multiplication of the stoichiometric matrix [Ei,j] with the kinetic
vector {ri} at every iteration step.
2.3. Calibration facility
CalHidra 3.0 includes a Monte Carlo based automatic calibration module. The
facility is based on the Generalised Likelihood Uncertainty Estimation (GLUE), which
assesses the parameter optimum values and their uncertainty. The method lies on the
Bayes Theorem and proposes to relax the classic likelihood estimators of statistical
theory. Basically, the GLUE approach consists of running a number of Monte Carlo
simulations with some randomly sampled parameter values. Each simulated
parameter set is associated with a value of a subjectively dened Likelihood
Measure, which assesses the model performance. The prior beliefs about possible
parameter values are expressed in form of prior probability distributions, while the
ability of random parameter sets to achieve a good level of agreement between the
simulation and experimental results leads to the posterior probability distributions.
The method provides the joint posterior distribution of the parameters as the
calibration result. For the calibration of n parameters, the joint posterior distribution
is an n-dimensional function, which is numerically estimated by the GLUE method
(Sincock et al., 2003). CalHidra 3.0 also calculates the marginal posterior distribution
and the means and standard deviations of the calibrated parameters. For further
information about the post-treatment analysis of the joint posterior distribution, see
Martin and Ayesa (2010). CalHidra 3.0 furthermore includes a Sensitivity Analysis
tool based on the KolmogoroveSmirnov (KS) statistic. KS takes values between 0 and
1 for each parameter: low values denote small sensitivity while high values mean
large sensitivity.
3. Software architecture
CalHidra 3.0 is an integrated software system, designed on the
basis of Component Object Model (COM) programming paradigm.
The communication with the modeller is by a Windows
WQ Data base
Boundary Conditions
HD results
Boundary and Initial Cds
(biochemical state vrbles.)
WQ parameter values
Hydrodynamic Model
Topology data
Network
Cross-sections
Transport sub-model
Advection/ Dispersion
equations
HD Results
Biochemical sub-model
Calibration facility
Monte Carlo based method
Sensitivity analysis
WQ Results
Calibration Results
975
Fig. 2. Tajo River basin: Manzanares, Jarama and Tajo river branches, WWTP
discharges and ICA and SAICA measurement stations.
Fig. 3. CalHidra 3.0 window with the simulation results of the Tajo River.
976
Fig. 4. Ebro River basin: Gllego, Huerva, and Ebro river branches, WWTP discharges and sampling points.
450
400
Flow (m 3/s)
In the Tajo case study, the biochemical activity has been estimated by adjusting only two parameters, the PTF and the KLa
parameter (Martin et al., 2006b). The PTF parameter regulates the
transport of particulates and the KLa parameter determines the
transfer of oxygen from the atmosphere to the bulk liquid.
Fig. 3 shows a CalHidra 3.0 window with the simulation results
for PTF 0.17 and KLa 13.7 day1 during February 2003. The
gure illustrates a reasonable level of agreement between the
simulated results (bars) and the experimental data (rhombuses) for
ammonium, nitrates, and dissolved oxygen concentrations. In this
case, the WWTPs spills provoke high concentration of ammonium
in the Manzanares branch, which is largely nitried along the
Jarama and Tajo rivers.
The low PTF value (0.17) implies high retention of particulate
variables along the river. Indeed, the high biomass concentrations
(XH, XN1 and XN2) have made possible the description of the nitrication activity in the river (by means of the SNH4 and SNO3
proles).
Simulated P1
350
300
Simulated P2
250
200
Simulated P4
150
100
Simulated P6
Simulated P3
Simulated P5
50
0
240
260
280
300
320
Time (hours)
340
360
35
100
80
Measured P1
Measured P5
Measured P6
30
SNO3 (mgN/l)
Simulated P1
Simulated P5
Simulated P6
60
40
25
20
15
10
20
0
450
10.0
360
9.5
X H (mgCOD/l)
TSS (mgCOD/l)
VSS (mgCOD/l)
120
270
180
90
Simulated P1
Simulated P4
Simulated P2
Simulated P5
Simulated P3
Simulated P6
9.0
8.5
8.0
7.5
60
120
180
Time (hours)
240
300
360
60
120
180
Time (hours)
Fig. 7. Urola River case study: the Urretxu WWTP and sampling points along the river.
240
300
360
978
Fig. 8. Graphical environment of the calibration facility. The marginal probability functions (a and c) and the joint posterior distribution (b and d) of the PTF parameter (left column)
and the KLa parameter (right column).
Fig. 9. Graphical environment for the sensitivity analysis. Cumulative marginal distributions of the PTF parameter (a) and the KLa parameter (b).
PTF (a) and KLa (b) parameters (Martin et al., 2006a). The KS statistic
shows that the PTF parameter is slightly more sensitive than the KLa
parameter.
The uncertainty and sensitivity analyses show reasonable
results and can provide useful information for the uncertainty
assessment in model calibration.
5. Conclusions
CalHidra 3.0 is a software package able to simulate different
scenarios related to river water quality. The descriptive capacity of
the models, the calibration facility and the windows environment
make it a very useful tool for engineering purposes. In this respect,
three different examples have shown the possibilities of the
software:
1. The biochemical sub-model has properly described the nitrication activity in the Tajo River. The low value of the
979
Cox, B.A., 2003. A review of currently available in-stream water-quality models and
their applicability for simulating dissolved oxygen in lowland rivers. The
Science of the Total Environment 314-316, 335e377.
Kanney, J.F., Miller, C.T., Kelley, C.T., 2003. Convergence of iterative split-operator
approaches for approximating nonlinear reactive transport problems. Advances
in Water Resources 26 (3), 247e261.
Leonard, B.P., 1991. The ULTIMATE conservative difference scheme applied to
unsteady one-dimensional advection. Computer Methods in Applied Mechanics
and Engineering 88 (1), 17e74.
Martin, C., Ayesa, E., 2010. An integrated Monte Carlo methodology for the calibration of water quality models. Ecological Modelling 221 (21), 2656e2667.
Martin, C., Cardona, C.M., Salterain, A., Ayesa, E., Eguinoa, I., Garca-Sanz, M., 2006a.
Uncertainty based calibration of a new river water quality model: application to
Urola river. In: Proceedings of the 7th International Conference on Hydroinformatics HIC, 2006, Nice, France, 1269e1276.
Martin, J., McCutcheon, S., 1999. Hydrodynamics and Transport for Water Quality
Modeling. Lewis Publishers, Florida.
Martin, C., Cardona, C.M., San Martin, D., Salterain, A., Ayesa, E., 2006b. Dynamic
simulation of the water quality in rivers based on the IWA RWQM1. Application
of the new simulator CalHidra 2.0 to the Tajo River. Water Science and Technology 54 (11e12), 75e83.
McIntyre, N.R., Wheater, H.S., 2004. A tool for risk-based management of surface
water quality. Environmental Modelling and Software 19 (12), 1131e1140.
Preissmann, A., 1960. Propagation des intumescences dans les canaux et rivres. In:
Proceedings of the 1er Congrs dassociation Franaise de calcul., 433e442.
Prommer, H., Barry, D.A., Davis, G.B., 1998. A one-dimensional reactive multicomponent transport model for biodegradation of petroleum hydrocarbons
in groundwater. Environmental Modelling and Software 14 (2e3), 213e223.
Reichert, P., Borchardt, D., Henze, M., Rauch, W., Shanahan, P., Somlydy, L.,
Vanrolleghem, P., 2001. River Water Quality Model No.1. SRT 12. IWA Publishing,
London.
San Martin, D., Rodriguez, E., Ayesa, E., Sancho, L., Salterain, A., Unze, J.A., 2004.
Development and verication of an Ebro River water quality model for its
course through Zaragoza. CalHidra. In: Proceedings of the 5th International
Symposium on Ecohydraulics. Aquatic Habitats: Analysis & Restoration, 2004,
Madrid, Spain, 182e186.
Sincock, A.M., Wheater, H.S., Whitehead, P.G., 2003. Calibration and sensitivity
analysis of a river water quality model under unsteady ow conditions. Journal
of Hydrology 277 (3e4), 214e229.