GPSX - Techref 01
GPSX - Techref 01
GPSX - Techref 01
Copyright ©1992-2012 Hydromantis Environmental Software Solutions, Inc. All rights reserved.
No part of this work covered by copyright may be reproduced in any form or by any means -
graphic, electronic or mechanical, including photocopying, recording, taping, or storage in an
information retrieval system - without the prior written permission of the copyright owner.
The information contained within this document is subject to change without notice.
Hydromantis Environmental Software Solutions, Inc. makes no warranty of any kind with
regard to this material, including, but not limited to, the implied warranties of merchantability
and fitness for a particular purpose. Hydromantis Environmental Software Solutions, Inc., shall
not be liable for errors contained herein or for incidental consequential damages in connection
with the furnishing, performance, or use of this material.
Trademarks
GPS-X and all other Hydromantis trademarks and logos mentioned and/or displayed are
trademarks or registered trademarks of Hydromantis Environmental Software Solutions, Inc. in
Canada and in other countries.
Microsoft, Windows, Windows Server, Windows XP, Windows Vista, Windows 7, and
Windows 8 are trademarks of Microsoft Corporation.
GPS-X uses selected Free and Open Source licensed components. Please see the readme.txt file
in the installation directory for details.
TABLE OF CONTENTS
CHAP T ER 1 .........................................................................................................11
Modelling Fundamentals ...................................................................................................................................................... 11
Introduction to Modelling and Simulation ......................................................................................................................... 11
Why COD is Important to Know........................................................................................................................................ 14
Data Requirements ............................................................................................................................................................. 15
CHAP T ER 2 .........................................................................................................21
GPS-X Objects ...................................................................................................................................................................... 21
What is an Object?.............................................................................................................................................................. 21
Types of Objects ................................................................................................................................................................. 21
CHAP T ER 3 .........................................................................................................25
GPS-X State Variable Libraries .......................................................................................................................................... 25
What is a Library? .............................................................................................................................................................. 25
Types of Libraries .............................................................................................................................................................. 25
Carbon - Nitrogen Library (CNLIB) .................................................................................................................................. 26
Industrial Pollutant Library (CNIPLIB) ............................................................................................................................. 26
Carbon - Nitrogen - Phosphorus Library (CNPLIB) .......................................................................................................... 28
CNP Industrial Pollutant Library (CNPIPLIB) .................................................................................................................. 28
Advanced Carbon - Nitrogen Library (CN2LIB) ............................................................................................................... 30
Advanced Industrial Pollutant Library (CN2IPLIB) .......................................................................................................... 31
Comprehensive library (mantis2LIB) ................................................................................................................................. 32
CHAP T ER 4 .........................................................................................................35
GPS-X Composite Variable Calculations ........................................................................................................................... 35
What is a Composite Variable? .......................................................................................................................................... 35
Stoichiometry Settings........................................................................................................................................................ 35
Stoichiometry Calculations ................................................................................................................................................ 35
Displaying Composite Variables ........................................................................................................................................ 61
CHAP T ER 5 .........................................................................................................63
Influent Models ..................................................................................................................................................................... 63
Introduction ........................................................................................................................................................................ 63
Influent Advisor ................................................................................................................................................................. 63
Influent objects in CNLIB, CNPLIB, CN2LIB, CNIPLIB, CNPIPLIB, CN2IPLIB.......................................................... 66
Influent Appendices............................................................................................................................................................ 77
Influent objects in MANTIS2LIB ...................................................................................................................................... 86
CHAP T ER 6 .........................................................................................................95
Suspended-Growth Models .................................................................................................................................................. 95
Introduction ........................................................................................................................................................................ 95
Common Features ............................................................................................................................................................... 95
Activated Sludge Biological Models ................................................................................................................................ 117
Activated Sludge Model No. 1 (ASM1) ........................................................................................................................... 119
Activated Sludge Model No. 2 (ASM2) ........................................................................................................................... 121
Activated Sludge Model No. 2d (ASM2d) ....................................................................................................................... 121
Activated Sludge Model No. 3 (ASM3) ........................................................................................................................... 124
Mantis Model (MANTIS)................................................................................................................................................. 125
Two-Step-Mantis model (TWOSTEPMANTIS) .............................................................................................................. 126
New General Model (NEWGENERAL) .......................................................................................................................... 126
Comprehensive Model (ManTIS2) ................................................................................................................................... 131
iv Table of Contents
LIST OF FIGURES
Figure 4-5 Carbon – Nitrogen Phosphorus Library: Nitrogen Composite Variables and their Relationships to the State
Variables ........................................................................................................................................................... 44
Figure 4-6 Carbon – Nitrogen – Phosphorus Library: Phosphorus Composite Variables and their Relationship
to the State Variables ..................................................................................................................................... 46
Figure 4-7 Advanced Carbon – Nitrogen Library: BOD, COD and Suspended Solids Composite Variables and their
Relationship to the State Variables ................................................................................................................... 50
Figure 4-8 Advanced Carbon – Nitrogen Library: Nitrogen Composite Variables and their Relation to the State
Variables ........................................................................................................................................................... 52
Figure 4-9 MANTIS2LIB – Calculation Procedure for Composite Variables SCOD, COD, SBOD, BOD, SBODu and
BODu ............................................................................................................................................................... 56
Figure 4-10 MANTIS2LIB – Calculation Procedure for Composite Variables VSS, TSS ...................................................... 57
Figure 4-11 MANTIS2LIB – Calculation Procedure for Composite Variables STKN and TKN ............................................ 58
Figure 4-12 MANTIS2LIB – Calculation Procedure for Composite Variables STP, XTP and TP .......................................... 59
Figure 4-13 MANTIS2LIB – Calculation Procedure for Composite Variables STOC and TOC............................................. 60
Figure 5-1 - Opening the Influent Advisor Tool ........................................................................................................................ 63
Figure 5-2 - Influent Advisor Menu .......................................................................................................................................... 64
Figure 5-3 Influent Advisor Screen Showing Highlighted Cells and Negative Values High-lighted in Red ............................ 65
Figure 5-4 - Selecting the Influent Flow Data Menu ................................................................................................................ 67
Figure 5-5 - Influent Flow Data Menu, showing Flow Type Options ...................................................................................... 67
Figure 5-6 - The Influent Models (left - Wastewater, right - Chemical Dosage)...................................................................... 69
Figure 5-7 - CN Library Bodbased Influent Model Inputs ........................................................................................................ 70
Figure 5-8 - CN Library Nutrient Fractions for the Influent Models ......................................................................................... 71
Figure 5-9 - CODstates Influent Model Inputs .......................................................................................................................... 72
Figure 5-10 CN Library States Influent Model Influent Stoichiometry Inputs .......................................................................... 73
Figure 5-11 CN Library tsscod Model Particulate Inert Calculation ......................................................................................... 74
Figure 5-12 CN Library tsscod Influent Soluble Components Calculation ............................................................................... 74
Figure 5-13 CN Library Acetate Influent Model – Acetate Dose Form .................................................................................... 75
Figure 5-14 CN Library Methanol Influent Model Inputs.................................................................................................... 76
Figure 5-15 - Batch Input Menu - Flow Data Model Inputs ...................................................................................................... 77
Figure 5-16 - CN Library Organic State and Composite Variables ........................................................................................... 79
Figure 5-17 - CN Library Nitrogen State and Composite Variables ................................................................................... 80
Figure 5-18 - CN2 Library Organic State and Composite Variables ......................................................................................... 81
Figure 5-19 - CN2 Library Nitrogen State and Composite Variables........................................................................................ 82
Figure 5-20 - CNP Library Organic State and Composite Variables......................................................................................... 84
Figure 5-21 - CNP Library Nitrogen State and Composite Variables ....................................................................................... 85
Figure 5-22 - CNP Library Phosphorus State and Composite Variables ................................................................................... 85
Figure 5-23 - Accessing the Stoichiometry Parameters in MANTIS2LIB ............................................................................... 87
Figure 5-24 - Influent Specific Stoichiometric Parameters ....................................................................................................... 88
Figure 5-25 - Fixed Stoichiometric Parameters in MANTIS2LIB ............................................................................................ 88
Figure 5-26 - More Fixed Stoichiometric Parameters in MANTIS2LIB ................................................................................... 88
Figure 5-27 - Models in COD Chemical Dosage Influent Object ............................................................................................. 89
Figure 5-28 - Accessing Feed Chemical Details Menu ............................................................................................................. 89
Figure 5-29 - Selection of Feed Chemical and Setup of Chemical Properties ................................................................... 90
Figure 5-30 - Models in Acid Dosage Influent Object .............................................................................................................. 90
Figure 5-31 - Accessing Feed Chemical Details Menu ............................................................................................................. 91
Figure 5-32 - Selection of Feed Chemical and Setup of Chemical Properties ........................................................................... 91
Figure 5-33 Models in Alkali Dosage Influent Object .............................................................................................................. 91
Figure 5-34 - Accessing Feed Chemical Details Menu ............................................................................................................. 92
Figure 5-35 - Selection of Feed Chemical and Setup of Chemical Properties ........................................................................... 92
Figure 5-36 - Models in Nutrient Dosage Influent Object ......................................................................................................... 93
Figure 5-37 - Accessing Feed Chemical Details Menu ............................................................................................................. 93
Figure 5-38 - Selection of Feed Chemical and Setup of Chemical Properties ........................................................................... 93
Figure 6-1 Aeration Setup Form in Operational Form .................................................................................................. 108
Figure 6-2 - General Aeration Setup > More … Form ............................................................................................................ 108
Figure 6-3 - Diffused Aeration Setup > More … Form (Part 1) .............................................................................................. 109
Table of Contents vii
Figure 6-4 - Physical > More … Form Within an Object ........................................................................................................ 113
Figure 6-5 Physical Form (Layout-Wide Settings) ................................................................................................................ 115
Figure 6-6 - Blower Cost Form ............................................................................................................................................... 116
Figure 6-7 - ASM3 Model Processes ....................................................................................................................................... 125
Figure 6-8 - General Reaction Pathway. .................................................................................................................................. 146
Figure 6-9 - Schematic Diagram of the prefermenter Model ................................................................................................ 150
Figure 6-10 GPS-X Membrane Bioreactor Objects ................................................................................................................. 153
Figure 6-11 Membrane Bioreactor Model Structures .............................................................................................................. 154
Figure 6-12 - Physical - Membrane Forms .............................................................................................................................. 156
Figure 6-13 - Membrane Operational Parameters Menu ......................................................................................................... 161
Figure 6-14 - Membrane Display Variables Menu .................................................................................................................. 164
Figure 6-15 - MBR Cake Variables Menu............................................................................................................................... 164
Figure 6-16 - Regular SBR – Operational Cycle Parameters .................................................................................................. 166
Figure 6-17 - Advanced SBR Operational Parameters ............................................................................................................ 167
Figure 6-18 - Manual Cycle Operational Parameters .............................................................................................................. 169
Figure 6-19 - Oxidation Ditch Recirculation Mode Settings ................................................................................................... 175
Figure 6-20 - 2-D Greyscale Oxidation Ditch Output – Dissolved Oxygen ............................................................................ 176
Figure 6-21 - Schematic of High Purity Oxygen (HPO) System ............................................................................................. 177
Figure 17 variation of nitrifier kinetic parameter values with temperature ............................................................................. 196
Figure 6-24 - Toxic Inhibition Menu ....................................................................................................................................... 200
Figure 7-1 - Conceptual Diagram of the Trickling Filter Model ............................................................................................. 203
Figure 7-2 - Physical Dimensions of the Trickling Filter ........................................................................................................ 205
Figure 7-3 Integration of Soluble Components ................................................................................................................ 206
Figure 7-4 Integration....................................................................................................................................................... 206
Figure 7-5 Mass Transport Parameters............................................................................................................................. 207
Figure 7-6 Physical Dimensions of the Trickling Filter ................................................................................................... 208
Figure 7-7 Trickling Filter Display Variables .................................................................................................................. 209
Figure 7-8 2D Variables Outputs ..................................................................................................................................... 210
Figure 7-9 Conceptual Diagram of the RBC Model......................................................................................................... 211
Figure 7-10 Physical Dimensions of the RBC ................................................................................................................... 213
Figure 7-11 Physical Dimensions of the RBC ................................................................................................................... 214
Figure 7-12 Physical Dimension of the SBC ..................................................................................................................... 218
Figure 7-13 Physical Dimensions of the SBC (More…) .................................................................................................... 219
Figure 7-14 BAF Physical Parameters ............................................................................................................................... 224
Figure 7-15 BAF Operational Parameters .......................................................................................................................... 225
Figure 7-16 More BAF Operational Parameters ................................................................................................................ 226
Figure 7-17 Upflow and Downflow Denitrification Filter Objects .................................................................................... 229
Figure 8-1 One-Dimensional Sedimentation Model ........................................................................................................ 232
Figure 8-2 Solids Balance Around the Settler Layers ...................................................................................................... 233
Figure 8-3 Settling Velocity vs. Concentration ................................................................................................................ 235
Figure 8-4 Load Distributed into Settler .......................................................................................................................... 238
Figure 8-5 Circular Settler Shapes ................................................................................................................................... 239
Figure 8-6 Layered Flotation Model ................................................................................................................................ 241
Figure 8-7 Physical Parameters for the DAF Unit ........................................................................................................... 242
Figure 8-8 Operational Parameters for the DAF Unit ...................................................................................................... 243
Figure 8-9 Flotation Parameters for the DAF Unit........................................................................................................... 244
Figure 9-1 Operational Parameters Form – continuous Model ........................................................................................ 246
Figure 9-2 Operational Parameters Form – massbalance Model...................................................................................... 247
Figure 9-3 Filter Parameters ............................................................................................................................................. 249
Figure 10-1 Schematic Diagram of the Anaerobic Digestion Model ................................................................................. 252
Figure 10-2 General Reaction Pathway.............................................................................................................................. 253
Figure 10-3 Parameters Menu for the Anaerobic Digester ................................................................................................. 257
Figure 10-4 Physical Parameters ........................................................................................................................................ 258
Figure 10-5 Operational Parameters ................................................................................................................................... 259
Figure 10-6 Influent Parameters ......................................................................................................................................... 259
viii Table of Contents
LIST OF TABLES
Table 4-2 - CNLIB BOD, COD and TSS Composite Variables (All Models) .......................................................................... 38
Table 4-3 - CNLIB Nitrogen Composite Variables – MANTIS Model .................................................................................... 40
Table 4-4 - CNLIB Nitrogen Composite Variables – ASM1 Model ......................................................................................... 40
Table 4-5 - CNLIB Nitrogen Composite Variables – ASM3 Model ......................................................................................... 40
Table 4-6 - CNPLIB BOD, COD and TSS and Composite Variables ....................................................................................... 43
Table 4-7 - CNPLIB Nitrogen Composite Variables – MANTIS Model .................................................................................. 44
Table 4-8 - CNPLIB Nitrogen Composite Variables – ASM1 Model ....................................................................................... 45
Table 4-9 - CNPLIB Nitrogen Composite Variables – ASM2d Model ..................................................................................... 45
Table 4-10 - CNPLIB Nitrogen Composite Variables – ASM3 Model .................................................................................... 45
Table 4-11 - CNPLIB Nitrogen Composite Variables – NEWGENERAL model .................................................................... 46
Table 4-12 - CNPLIB Phosphorus Composite Variables – ASM1/MANTIS models ............................................................... 47
Table 4-13 - CNPLIB Phosphorus Composite Variables – ASM3 Model ................................................................................ 47
Table 4-14 - CNPLIB Phosphorus Composite Variables – ASM2d Model .............................................................................. 47
Table 4-15 - CNPLIB Phosphorus Composite Variables – NEWGENERAL Model ............................................................... 48
Table 4-16 - CN2LIB BOD, COD and TSS and Comp. Var. – MANTIS Model ..................................................................... 49
Table 4-17 - CN2LIB BOD, COD and TSS and Comp. Var. – TWOSTEPMANTIS Model ................................................... 49
Table 4-18 - CN2LIB Nitrogen Composite Variables – MANTIS Model ................................................................................ 51
Table 4-19 - CN2LIB Nitrogen Composite Variables – TWOSTEPMANTIS Model .............................................................. 51
Table 4-20 - Stoichiometry parameters used in estimation of BOD and BODU ........................................................................ 53
Table 4-21 Access Menus for Different Stoichiometry Parameters in MANTIS2LIB .............................................................. 55
Table 5-1 - State Variables Used in Each Biological Model Included in CNLIB and CNIPLIB ..................................... 78
Table 5-2 State Variables Used in Each Biological Model Included in CN2LIB and CN2IPLIB..................................... 80
Table 5-3 State Variables Used in Each Biological Model included in CNPLIB and CNPIPLIB ............................................ 82
Table 5-4 - Influent Objects in MANTIS2LIB .......................................................................................................................... 86
Table 5-5 - Alkali Chemicals and Affected States in the Feed .................................................................................................. 92
Table 5-6 Nutrient Chemicals and Affected States in the Feed ................................................................................................. 93
Table 6-1 Example Model Matrix (Wentzel et al., 1987a) .......................................................................................... 118
Table 6-2 - Model processes in GPS-X ................................................................................................................................... 152
Table 6-3 - MBR Model Modes .............................................................................................................................................. 155
Table 6-4– GPS-XTM MBR Model - Default Parameter Values .............................................................................................. 163
Table 6-5 - Calibration Suggestions ........................................................................................................................................ 173
Table 6-6 - Library-specific Algorithms for Empiric Pond Model .......................................................................................... 174
Table 18 Heat transfer terms with equations for estimation .................................................................................................... 197
Table 19 Parameters for the temperature model ...................................................................................................................... 197
Table 8-1 Sedimentation Model: Input-Output Summary ............................................................................................. 233
Table 11-1 Chemeq Parameters .............................................................................................................................................. 279
Table 13-1 Operating Costs Applied to Each Object/Model ............................................................................................ 322
Table 14-1 Summary of How to Use the Statistical Tests ................................................................................................ 358
APPENDICES
APPENDIX A: PETERSEN MATRICES ............................................................................................................................ A-1
APPENDIX C: RESPIROMETRY ....................................................................................................................................... B-1
APPENDIX D: REFERENCES ............................................................................................................................................ C-1
Modelling Fundamentals 11
CHAPTER 1
Modelling Fundamentals
When speaking about modelling and simulation, the following terms are often used:
• System
• Experiment
• Model
• Simulation
SYSTEM
In a general sense, the notion of a system may be defined as a collection of
A system is a set of
interdependent
various structural and non-structural elements which are interconnected and
components that are organized to achieve some specified objective by the control and distribution of
united to perform a material resources, energy and information (Smith et al., 1983).
specified function.
One of the basic aspects of a system is that it can be controlled and observed.
Its interactions with the environment fall into two categories:
2. Variables that are determined by the system that in turn influence the
behaviour of the environment (called outputs).
EXPERIMENT
An experiment is the process of extracting data from a system through the
manipulations of the inputs.
1. Controllability, and
2. Observability.
One of the major motivations for simulation is that in the simulation world, all
inputs and all outputs are accessible. This allows the execution of simulations
that lie outside of the range of experiments that are applicable to the real
system.
MODEL
One definition of a model is: a model is an approximation of a system to which
A model is an
abstraction of a
an experiment can be applied to answer questions about the system. A model
system. does not imply a computer program. We should be clear to distinguish between
a model and a computer program. A model could be a piece of hardware or
simply an understanding of how a system works. Models are often coded into
computer programs.
order, the knowledge gathered during the experiment is organized. Thus, the
system is better understood by the process of modelling.
SIMULATION
Again, many definitions exist for the term simulation; however, one of the
Simulation is to a
model what simplest is: a simulation is an experiment performed on a model. Again, this
experimentation is does not imply that the simulation is performed on a computer. However, the
to a system. vast majority of engineering simulations are performed using a computer
program. A mathematical simulation is a coded description of an experiment
with a reference point to the model to which this experiment is to be applied.
The goal is to be able to experiment with models as easily and conveniently as
with real systems. It is desired to be able to use the simulation tools as easily as
a control chart in the operation of a facility.
While the scientist is normally happy to observe and understand the world, that
is creating a model of the world, the engineer (applied scientist) wants to
modify it to his/her advantage. While science is analysis, the essence of
engineering is control and design. Thus, simulation can be used for analysis
and for design.
Simulation Tools
A wide variety of simulation tools are available to help you in this task.
Because the reader is assumed to be particularly interested in the dynamic
modelling of wastewater treatment, the tools appropriate for this task are
emphasized.
We could measure the 5-day Biochemical Oxygen Demand (BOD5) and suspended solids
as most plants in North America do. Suspended solids have the same problem as TOC
with respect to oxidation. BOD5 seems to give relevant information, but it is
inappropriate for continuous monitoring, and the accuracy of the results is not
comparable to other analytical methods. BOD5 measures only the part of organics which
were used for respiration in the BOD test during 5 days, and does not give information
about the amount converted into bacterial cells. Ultimate BOD (BODu) corrects this
problem but the analytical time and sometimes the accuracy is unacceptable. The BOD
test completely ignores a very important fraction of the influent wastewater (inert
particulates), which contributes in a major way to excess sludge production.
COD overcomes the above-mentioned problems. It can be automated and measures all
organic fractions of the wastewater. The sludge COD can also be easily determined. COD
measures all organics in oxygen equivalent; that is the electron donating capacity of the
organic matter. This way it provides a direct link between organic load and aeration
requirement. The yield constant is truly constant only if expressed in COD units. Mass
balance is easy to establish with COD in a non-nitrifying plant: in steady-state, the
influent COD must equal the effluent COD plus the COD of the wasted sludge, plus the
oxygen consumed in the degradation of organic matter.
It is for this reason that the International Association on Water Quality (IAWQ)
committee selected and endorses the use of COD as a measure of organic parameter in
simulation of activated sludge plants.
Data Requirements
For modelling purposes, each unit process/operation is represented by a process model
(mathematical model) that reflects the dynamic behaviour of that particular process. One
of the main features of GPS-X is that it is model-independent, meaning that GPS-X is not
limited to a specific process model. Accordingly, a variety of modelling approaches
(process models) are available within GPS-X to handle a specific unit operation or unit
process. For example, the activated sludge process can be modelled using any one of the
following GPS-X activated sludge process models:
• IAWQ Task Group models of the activated sludge process (Henze et al., 1987a;
Henze et al., 1994; Henze et al., 1998)
• The general (bio-P) model (Dold, 1990, Barker and Dold, 1997)
• Extended IAWQ (Mantis), (described in Chapter 6 of this document)
Each calibration/verification study follows the same general principles. Accordingly, the
purpose of this section is to provide some guidelines pertaining to the calibration of the
models to full-scale wastewater treatment plants. The most popular process models have
been selected for illustration purposes, including the IAWQ Task Group Activated
Sludge Model No. 1 (Henze et al., 1987a) and layered settler model developed by
Hydromantis (Takács et al., 1991).
directly or estimated from the literature are usually determined using nonlinear
dynamic optimization techniques based on actual plant records and/or
experimental data collected at the plant or in the lab. It is recognized that the
reliability of the calibrated model degrades with increasing numbers of
mathematically optimized parameters.
System Configuration
The General Purpose Simulator can handle practically any flow scheme. Based
on our experience it is very important to identify as closely as possible the
hydraulic characteristics of a plant, including plant by-passes, overflows, flow
splits and combiners, proportional, constant or SRT driven sludge wastage, etc.
Parallel trains, multiple units and plug flow systems are easily simulated, but
should be simplified where possible (unless the required supporting data
required for calibration is available).
This is an important data group. For example, if the aeration capacity is not
known (or cannot be estimated from the aerator power or other means), then
the correct dissolved oxygen (DO) level can be set by either changing the KLa
or some stoichiometric or kinetic parameters (yield coefficient, growth rate,
etc.). This makes the correct estimation of those parameters difficult. Similarly,
model parameters having a strong effect on the aeration tank Mixed Liquor
Suspended Solids (MLSS) are difficult to estimate when the wastage rate is not
known.
Nitrogenous Compounds
Based on our experience, the most important parameter to calibrate in the
IAWQ model is the autotrophic growth rate. It is possible to calibrate this
parameter using field ammonia and nitrate data, if:
1. The plant is not overloaded, i.e., the plant is at least partially nitrifying;
or
2. The plant is not seriously under loaded. In such a case, almost any
value of the growth rate constant (typically between 0.2-0.5 d-1) will
provide complete nitrification.
The autotrophic growth rate is easier to identify in a partially nitrifying plant.
Process start-up data (i.e., corresponding to a slowly developing nitrifier
population) can sometimes be used. Laboratory testing (oxidation of an
ammonia spike) is also a possibility.
Maximum floc settling velocity parameter. Dilute the activated sludge to 1-2
g/L, measure the settling velocity of large individual floc particles in a batch
test. In general, no floc particle will settle faster than the settling velocity of
individual floc particles under quiescent conditions.
Vesilind zone settling parameters. These two parameters give the settling
velocity of the sludge in the hindered settling zone (exponential portion of the
curve). They can be determined through a series of column tests (Vesilind,
1968).
Flocculant settling parameter. If all the above settling parameters are known,
then this one is generally easy to estimate by fitting the simulated effluent
suspended solids simulations to observed data.
the beginning, then modifying those which need adjustment and observing the
response of several system output variables.
It is possible to start with a steady-state calibration, e.g., taking the dry weather
days from a daily log of the treatment plant and optimizing for the average of
these values. Averages, which contain high flow periods (typical monthly or
yearly averages), should not be used for steady-state calibration.
Dynamic calibration should follow with typical diurnal data or selected high
disturbance (storm flow) events. The larger the scale of the disturbance
between reasonable limits, the more sensitive the calibration procedure will be.
Hydraulic shocks are usually ideal for settler calibrations, while diurnal data,
process start-up, or recovery is better for calibration of organic degradation and
nitrification.
One fully documented event gives reasonable confidence for the given
conditions (flow, temperature, influent composition, etc.). If the model is to be
used under varying conditions, the above procedure has to be repeated
accordingly (e.g., winter, summer, dry weather, wet weather, etc.). Verification
means simulating a dynamic event with a given calibrated set of parameters,
without modifying those, and finding reasonable accordance of simulated data
with the measurements.
A few or several may be missing from the physical, operational and influent
group. This does not make calibration/verification impossible, as the
interdependencies in a treatment plant are complex and default values are
relatively well known. Reasonable estimation of unknown parameters is
sometimes possible. In the case of underflows, the solids mass distribution
between the aeration tank and the settler depends largely on the recycle flow.
Knowing aeration tank MLSS and underflow concentration (maybe sludge
blanket height), the missing value can be recreated by numerically fitting these
variables as a function of the underflow. However, with increasing number of
such optimized parameters the confidence in the predictions of the model
erodes.
CHAPTER 2
GPS-X Objects
What is an Object?
An Object refers to the icon, which appears on the GPS-X Drawing Board when selected
from the Process Table. An object is a symbolic representation of a unit process without
any process model associated. There are several items associated with the object:
2. Physical attributes;
3. Operational attributes;
4. Display variables;
6. Sources.
The hydraulic configuration refers to the number of connection points on an object and
the operation of these connection points; that is, whether the connection point is incoming
or outgoing. The parameters and stream labels are under the Parameters sub-menu and
Labels... sub-menu respectively. Additional sub-menu items are found under the
Parameters menu, which are process model and library specific. The Display Variables menu
item is used to select model variables for display on a graph, while the Sources menu item
displays the object number that acts as a source for some of the Parameters.
Not all menus are active. For example, until the model is chosen for an object, the
Parameters and Initialization menus (if they exist for the object) are not active and appear
greyed out. Once the model as been specified, these menus will become active.
Types of Objects
COMMON PROPERTIES
Before describing each object that appears on the GPS-X Process Table, an
outline of the properties common to some objects is presented. The objects in
the Process Table can be described as either having volume or not. There are
some deviations from this general rule, but they can be ignored for now. For
example the control splitter object does not have any volume (called zero
volume), while the equalization basin does have volume. The zero volume
objects do not have any dilution or residence time while the objects with
volume do.
Objects with volume have one or more influent connection points and one or
more effluent connection points. For example, the settler objects have one
influent connection point plus three effluent connection points, while the PLUG
FLOW-TANK(2) object has three influent connection points and two effluent
connection points. The effluent connection point(s) will have an overflow
connection plus one or more pump connections. The overflow is located at the
upper right hand corner of the object (as oriented in the Process Table), while
any additional output connections are located on the right hand side or bottom
of the object. The additional output connections (either called pump or
underflow) simulate a constant or variable flow pump so that a flow rate can be
specified (up to the maximum pump capacity).
The volume of fluid in the tank depends on the net influent - effluent flow. If
this is a negative value, then the volume of the tank will decrease until it
reaches zero. At this point the effluent will equal the influent, regardless of the
pump flow set. If the net influent-effluent flow is positive, the tank volume will
increase until the maximum (specified by the user). At this point, the tank
begins to overflow, so that the effluent flow (sum of the overflow and pump
flows) will be equal to the influent flow. The effluent flow over and above the
effluent pumped flow rates will leave through the overflow connection point. If
the net influent-effluent flow is zero, then the volume will not change.
The mass balance for variable volume tanks is shown in Equations 2.1-2.4:
d (C ⋅ V ) ∂C ∂V
QinCin − Qout C + r = =V ⋅ +C
dt ∂t dt (2.1)
∂V
= Qin − Qout (2.2)
∂t
Qin (Cin − C ) + r = V
dC
dt (2.3)
Qin
(Cin − C ) + r = dC (2.4)
V V dt
where:
Another feature to the objects with volume is their initial volume. When a
simulation begins, the user can specify what volume the tank initially has
through the use of a logical variable called start with full tank, located under
Initial Conditions > Initial volume. If this logical switch is true, then the tank will be
full at the beginning of the simulation. If this logical variable is false, then the
user can specify the initial reactor volume at the start of the simulation. As a
consequence of this, the user can specify the starting volume as full by two
ways:
dX Qin Q
= ⋅ X in − out ⋅ X OUT (2.5)
dt V V
where:
At steady-state, the time derivatives are zero and equation 2.5 becomes:
where:
CHAPTER 3
What is a Library?
A library in GPS-X is a collection of wastewater process models using a set of basic
wastewater components, or state variables. The term state variable refers to the basic
variables that are continuously integrated over time. The composite variables are those
variables that are calculated from (or composed of) the state variables. In discussing the
state variables for the different libraries listed below, volume is not explicitly stated as a
state variable as it is common to all libraries. The relationships presented in this chapter
between the state and composite variables are used in every connection point of the plant
layout.
Please Note: In GPS-X, BOD refers to the carbonaceous BOD5 (CBOD) unless otherwise
stated. This is to distinguish the oxygen demand for organic carbon removal from the
oxygen demand for ammonia oxidation. The values of these two analyses for the same
sample can be considerably different.
Types of Libraries
Seven libraries are available for GPS-X:
The state variables used in the libraries are listed in the appropriate section below.
STATE VARIABLES
Sixteen (16) state variables are available in the Carbon - Nitrogen library (Table 3-1).
STATE VARIABLES
Forty-six (46) state variables are available in the Industrial Pollutant library.
Sixteen (16) are pre-defined and thirty (30) are user-definable (15 soluble, 15
particulate). They are listed in Table 3-2.
STATE VARIABLES
Twenty-seven (27) state variables are available in the Carbon - Nitrogen -
Phosphorus library (Table 3-3).
STATE VARIABLES
Fifty-seven (57) state variables are available in the CNP Industrial Pollutant
library (CNPIPLIB). These include the 27 state variables from CNPLIB, as
well as 30 user-definable variables (15 soluble and 15 particulate - Table 3-4).
STATE VARIABLES
Forty-nine (49) state variables are available in the Advanced Industrial
Pollutant library (Table 3-6). The major difference between this library and the
Advanced Carbon - Nitrogen library is the addition of Thirty (30) user-
definable state variables (15 soluble and 15 particulate).
STATE VARIABLES
Fifty-two (52) state variables are available in the Comprehensive Model
(MANTIS2LIB) library (Table 3-7).
CHAPTER 4
These particular state variable components are not always easily measurable or
interpretable in practical applications. Therefore, a series of composite variables are
calculated from the state variables. The composite variables combine the state variables
into forms that are typically measured, such as total suspended solids (TSS), BOD, COD
and Total Kjeldahl Nitrogen (TKN).
Stoichiometry Settings
The way that the composite variables are calculated from state variables changes from
library to library and to a great degree from model to model.
Composite variables are calculated from state variables with the use of stoichiometric
constants. These constants describe the relationships between various states and
composites, and depend on the type of composite calculations used.
Stoichiometry Calculations
NOMENCLATURE
In this chapter, diagrams and tables are used to depict the relationships between
the state and composite variables included in a library.
Box-and-arrow Diagrams
The nomenclature used in the box-and-arrow diagrams is explained in Figure
4-1.
Y3
x1 k x3
1
Y1 Y2
x2 x4
(depends on model)
The variables in the boxes and above the connection lines are known (either
previously calculated or user input). The variables in BOLD CAPITALS
represent the composite variables which are to be calculated. The connection
line shows the direction of calculation and always begins from a known or
boxed variable. Multiple lines converging to one unknown variable imply a
summation operator. In the example shown above, the variable Y1 is calculated
by multiplying the variable x1 by the stoichiometry parameter k and summing
it with variable x2. If no stoichiometry parameter appears above the connection
line, it implies a default value of 1. When a broken line circle is drawn on the
lines, it indicates that the stoichiometry parameters for these lines are model
dependent. In certain situations two or more calculated composite variables are
used to calculate an additional composite variable. For example, Y3 is
calculated by adding the calculated composite variables of Y1 and Y2.
In addition to diagrams which explain the general way composite variables are
calculated, composite variable tables are used to explain model-specific
calculations. The nomenclature used in the composite variables tables is
explained in Table 4-1, Example Composite Variable
Calculations.
The composite variables being calculated are shown across the top of each
column. The state variables used in the calculations are shown down the left
side of the table. To calculate the composite variable, each state variable is
multiplied by the coefficient in the table for that particular composite variable,
and then summed down the column.
For the example data given in Table 4-1, the calculations for
SCOMP, XCOMP and TCOMP are:
si
SCOD
xs
BOD5 BODU
xbh
fbod XCOD
XBOD5 XBODU xba
-1
xsto icv
xu
VSS
xi
X
xii XISS Total
Suspended
Solids
Figure 4-2
Carbon – Nitrogen Library (CNLIB): BOD, COD and Suspended Solids Composite
Variables and their Relationship to the State Variables
Table 4-2 - CNLIB BOD, COD and TSS Composite Variables (All Models)
SBOD XBOD BOD SBO XBO BO SCO XCO CO VS XIS X
U U U D D D D D D S S
si 1 1
ss 1 1 fbod fbod 1 1
xi 1 1 icv- icv
1 -1
-
xs 1 1 fbod fbod 1 1 icv icv
1 -1
xu 1 1 icv- icv
1 -1
-
xst 1 1 fbod fbod 1 1 icv icv
1 -1
o
xii 1 1
The COD composite variables are a sum of state variables (where units are
gCOD/m3). Soluble COD (SCOD) is the sum of the soluble inert organics (si)
and readily biodegradable substrate (ss), while particulate COD (XCOD) is the
sum of the slowly biodegradable substrate (xs), active heterotrophic biomass
(xbh), active autotrophic biomass (xba), cell internal storage product (xsto),
unbiodegradable particulates from cell decay (xu), and particulate inert
organics (xi). The total COD (COD) is the sum of the soluble and particulate
COD.
The suspended solids composite variable (X) is calculated from the particulate
COD (XCOD) by dividing it by the XCOD:VSS ratio (icv), which changes the
units of the XCOD to mgVSS/L, resulting in the volatile suspended solids
(VSS) composite variable. To calculate the suspended solids composite
variable (X), VSS is added to particulate inert inorganic material (XII). By
default in the CN library, particulate inert suspended solids (XISS) is equal to
xii.
Nitrogen Fractions
(depends on the model)
sno TN xbh
xba
snh TKN
xu
snd STKN XTKN
xi
ss xs
si xnd
Figure 4-3
Carbon – Nitrogen Library: Nitrogen Composite Variables and their Relationships to the
State Variables.
The nitrogen fractions of xbh, xba, xu, xi, ss and si vary from model to model.
The nitrogen composite variable relationships for the mantis , asm1 and asm3
models are shown in Table 4-3 through Table 4-5.
As all the state variables are in units of gCOD/m3, the COD composite
variables are simply a sum of the appropriate state variables. In general, the
soluble COD (SCOD) is a sum of the soluble inert organics (si), volatile fatty
acids (slf), fermentable readily biodegradable substrate (sf), and readily
biodegradable substrate (ss). The particulate COD (XCOD) is a sum of the
slowly biodegradable substrate (xs), active heterotrophic biomass (xbh), active
autotrophic biomass (xba), polyphosphate accumulating biomass (xbp), stored
glycogen (xgly), poly-hydroxy-alkanoates (xbt), unbiodegradable particulates
from cell decay (xu), cell internal storage product (xsto) and particulate inert
organics (xi). The total COD (COD) is the sum of the soluble and particulate
COD.
si
sf
SCOD
SBOD5 fbod SBODU slf
COD
ss
BOD5 BODU
xs
fbod xbh
XBOD5 XBODU
XCOD
xba
-1
icv
xbp
xgly VSS
xbt
X
Total
xsto Suspended
Solids
xu
xi
xii
xmep
xmeoh XISS
xpp
xppr
Figure 4-4
Carbon – Nitrogen – Phosphorus Library: BOD, COD and Suspended Solids Composite
and their relationship to the State Variables.
Table 4-6 - CNPLIB BOD, COD and TSS and Composite Variables
SBODU XBODU BODU SBOD XBOD BOD SCOD XCOD COD VSS XISS X
ss 1 1 fbod fbod 1 1
sf 1 1 fbod fbod 1 1
slf 1 1 fbod fbod 1 1
xs 1 1 fbod fbod 1 1 icv-1 icv-
1
-1
xbh 1 1 fbod fbod 1 1 icv icv-
1
-1
xba 1 1 fbod fbod 1 1 icv icv-
1
-1
xbp 1 1 fbod fbod 1 1 icv icv-
1
si 1 1
xi 1 1 icv-1 icv-
1
-1
xu 1 1 icv icv-
1
xii 1 1
xmeoh 1 1
xmep 1 1
xpp 3 3
xppr 3 3
Nitrogen Fractions
(depends on the model)
sno TN xbh
snh xba
TKN
snd xbp
STKN XTKN
sni xu
ss xi
si xs
sf Nitrogen Fractions
xnd
(depends on the model)
Figure 4-5
Carbon – Nitrogen Phosphorus Library: Nitrogen Composite Variables and their
Relationships to the State Variables
The calculation for nitrogen state variables differs slightly from model to
model. In particular, the nitrogen fractions of biomass and other particulate
components have different names from model to model. Table 4-7 through
Table 4-11 shows the nitrogen composite variable calculations for the mantis ,
asm1, asm2d , asm3 and newgeneral models in CNPLIB.
Phosphorus Fractions
(depends on the model)
xi
Phosphorus Fractions
(depends on the model)
sf xs
TP
ss xu
xba
sp
0.205 xbp
Figure 4-6
Carbon – Nitrogen – Phosphorus Library: Phosphorus Composite Variables and
their Relationship to the State Variables
Table 4-16 - CN2LIB BOD, COD and TSS and Comp. Var. – MANTIS Model
SBODU XBODU BODU SBOD XBOD BOD SCOD XCOD COD VSS XISS X
si 1 1
ss 1 1 fbod fbod 1 1
ssh
xs 1 1 fbod fbod 1 1 icv-1 icv-
1
-1
xbh 1 1 fbod fbod 1 1 icv icv-
1
xbaa 1 1
xi 1 1 icv-1 icv-
1
-1
xu 1 1 icv icv-
1
xii 1 1
Table 4-17 - CN2LIB BOD, COD and TSS and Comp. Var. – TWOSTEPMANTIS Model
SBODU XBODU BODU SBOD XBOD BOD SCOD XCOD COD VSS XISS X
si 1 1
ss 1 1 fbod fbod 1 1
ssh 1 1 fbod fbod 1 1
xs 1 1 fbod fbod 1 1 icv-1 icv-1
xbh 1 1 fbod fbod 1 1 icv-1 icv-1
xbai 1 1 fbod fbod 1 1 icv-1 icv-1
xbaa 1 1 fbod fbod 1 1 icv-1 icv-1
xi 1 1 icv-1 icv-1
xu 1 1 icv-1 icv-1
xii 1 1
si
ssh
SCOD
SBOD5 fbod SBODU
ss
COD
BOD5 BODU xs
xbh
-1
xbaa icv
xu
VSS
xi
X
xii XISS Total
Suspended
Solids
Figure 4-7
Advanced Carbon – Nitrogen Library: BOD, COD and Suspended Solids
Composite Variables and their Relationship to the State Variables
Nitrogen Fractions
(depends on the model)
snoa xbh
SNO TN
snoi xbaa
TKN
sni xbai
STKN XTKN
snh xi
snd xu
xni
xnd
Figure 4-8
Advanced Carbon – Nitrogen Library: Nitrogen Composite Variables and their
Relation to the State Variables
Table 4-19 show the nitrogen composite variable calculation in tabular format
for the mantis and twostepmantis models respectively and Figure 4-8 shows the
nitrogen composite variable calculation in graphical format.
Table 4-19 shows the relationships between the state and composite variables
that are used in the CN2IPLIB models.
The Figure 4-10 shows the scheme for estimation of Volatile Suspended Solid
(VSS), Inorganic Suspended Solid (XISS) and Total Suspended Solid (TSS)
concentration. In the estimation of VSS, each biomass concentration is
multiplied by a corresponding VSS to COD factor. For example, ivsstocodxbh
is the VSS to COD ratio for heterotrophic biomass, xbh. The VSS to COD
ratio for each biomass type are calculated based on the biomass composition.
The default composition of biomass can be accessed and changed in the
System > Input Parameters > Global Fixed stoichiometry menu.
As the composition of xs and xi are not well known, the VSS to COD ratios for
these states ivsstocodxs and ivsstocodxi are provided as direct inputs. These
ratios can be accessed and changed in System > Input Parameters > Influent
Stoichiometry menu. The state variable of xns is included in the calculation of
VSS for being consistent with the practice of considering the N fraction in
biomass as part of VSS. A stoichiometry factor of 17.0/14.0 is used to convert
N to NH3.
individual biomass type is calculated by using the set biomass composition, for
example ivsstossxbh is the VSS to SS ratio calculated for the xbh biomass type.
The composite variable of XISS also includes the contribution from the
inorganic states in the model. The mass contributions from the xpp and xps
states are calculated by using a stoichiometry factor of 95/31. The factor
reflects the conversion from molecular weight of P to molecular weight of
PO43-. For all the other inorganic states a stoichiometry ratio of 1 is used.
The Figure 4-11 shows the scheme for estimation of soluble part of Total
Kjeldahl Nitrogen (STKN), particulate part of Total Kjeldahl Nitrogen
(XTKN), Total Kjeldahl Nitrogen (TKN), Total Nitrogen (TN) and Total
Nitrogen including dissolved Nitrogen (TN & dissolved gas). In the estimation
of STKN, the stoichiometry ratio of, insi is used to estimate the organic
nitrogen present in the si state variable. In the estimation of XTKN, each
biomass concentration is multiplied by a corresponding stoichiometry factor
representing the N content in the corresponding biomass. For example, inxbh is
the stoichiometry factor representing the N content in the heterotrophic
biomass, xbh. The N fraction for each biomass type is calculated based on the
biomass composition. The default composition of biomass can be accessed and
changed in the System > Input Parameters > Global Fixed stoichiometry menu. In the
calculation of XTKN, the N contained in the MgNH4PO4 is also included.
Although, in strict sense this is not a part of the organic nitrogen, it is assumed
that the ammonia contained in the precipitate shall reflect in the analytical
measurement of TKN.
The Figure 4-12 shows the scheme for estimation of soluble part of Total
Phosphorus (STP), particulate organic part of Total Phosphorus (XTOP),
particulate inorganic part of Total Phosphorus (XTIP) and Total Phosphorus.
In the estimation of STP, the stoichiometry ratio of, ipnsi is used to estimate
the phosphorus present in the si state variable. In the estimation of XTOP,
each biomass concentration is multiplied by a corresponding stoichiometry
factor representing the P content in the corresponding biomass. For example,
ipxbh is the stoichiometry factor representing the P content in the heterotrophic
biomass, xbh. The P fraction for each biomass type is calculated based on the
biomass composition. The default composition of biomass can be accessed and
changed in the System > Input Parameters > Global Fixed stoichiometry menu. In the
calculation of XTIP, the P contained in various P- precipitates is included. The
stoichiometry factor for each precipitate are estimated based on the
composition of the precipitate. These stoichiometry factors are also available in
Global Fixed stoichiometry menu. The composite variable of XTP is estimated by
the sum of XTOP and XTIP. The TP is estimated by the sum of STP and
XTP.
The Figure 4-13 shows the scheme for estimation of soluble part of Total
Organic Carbon (STOC), particulate part of Total Organic Carbon (XTOC),
and Total Organic Carbon. In the estimation of STOC, the stoichiometry ratio
of icsac, icsmet, icspro are estimated based on the substrate compositions. The
stoichiometry factor of icscol, icsi and icss on the other hand needs to be set by
direct user input. These factors can be accessed and changed in System > Input
Parameters > Influent stoichiometry menu. In the estimation of XTOC, each
biomass concentration is multiplied by a corresponding stoichiometry factor
representing the C content in the corresponding biomass. For example, icpxbh
is the stoichiometry factor representing the C content in the heterotrophic
biomass, xbh. The C fraction for each biomass type is calculated based on the
biomass composition. The default composition of biomass can be accessed and
changed in the System > Input Parameters > Global Fixed stoichiometry menu. For
the particulate states of xi and xs, the user can directly enter the C content in the
System > Input Parameters > Influent stoichiometry menu. The composite variable of
TOC is estimated by the sum of XTOC and STOC.
Table 4-21 presents the summary of the stoichiometry parameters used in the
MANTSI2LIB and access menus for changing the default values.
Table 4-21
Access Menus for Different Stoichiometry Parameters in MANTIS2LIB
Stoichiometry Access Menu
Parameter
yhglobal System > Input Parameters > Global Fixed stoichiometry
fuu System > Input Parameters > Global Fixed stoichiometry
fssbodtosscod System > Input Parameters > Global Fixed stoichiometry
fpsbodtopscod System > Input Parameters > Global Fixed stoichiometry
fbbodtobcod System > Input Parameters > Global Fixed stoichiometry
COD to VSS ratio for System > Input Parameters > Global Fixed stoichiometry
biomass (Calculated based on biomass composition)
COD to VSS ratio for System > Input Parameters > Influent stoichiometry
xs and xi
VSS to SS ratio for System > Input Parameters > Global Fixed stoichiometry
biomass (Calculated based on biomass composition)
N fraction in biomass System > Input Parameters > Global Fixed stoichiometry
(Calculated based on biomass composition)
N fraction in xi, si Influent Characterization menu of influent object
P fraction in biomass System > Input Parameters > Global Fixed stoichiometry
(Calculated based on biomass composition)
P fraction in xi, si Influent Characterization menu of influent object
C fraction in biomass System > Input Parameters > Global Fixed stoichiometry
and sac, spro, smet (Calculated based on biomass/substrate composition)
C fraction in System > Input Parameters > Influent stoichiometry
xcol,xss,si,xi,xs
ss
(1-yhglobal*fuu)
SBODU sac
spro
SBOD
fssbodtosscod
SCOD
smet
BOD
fpsbodtopscod scol
BODU XBOD
fbbodtobcod
si
xbt xs
COD
(1-fuu)
xbh
XBODU xbai
(1-yhglobal*fuu)
xbaa
XCOD
xbp
xbpro
xbacm
xbh2m
xbax
xbmet
xbf
xi
Figure 4-9
MANTIS2LIB – Calculation Procedure for Composite Variables SCOD, COD, SBOD,
BOD, SBODu and BODu
-1
icodtovssxbh xbh 1-ivsstossxbh 95/31 xpp
-1
icodtovssxbai xbai 1-ivsstossxbai 95/31 xps
-1
icodtovssxbaa xbaa 1-ivsstossxbaa xaloh
-1
icodtovssxbp xbp 1-ivsstossxbp xalpo4
-1
icodtovssxbpro xbpro 1-ivsstossxbpro xfeoh
-1
icodtovssxbacm xbacm 1-ivsstossxbacm Xfepo4
-1
icodtovssxxbh2m xbh2m 1-ivsstossxbh2m xcaco3
-1
icodtovssxbax xbax 1-ivsstossxbax xmgco3
-1
icodtovssxbmet xbmet 1-ivsstossxbmet xmgnh4po4
-1
icodtovssxbf xbf 1-ivsstossxbf xcapo4
xmghpo4
VSS XISS
xii
-1
icodtovssxi xi
-1
icodtovssxs xs
-1 TSS
icodtovssxbt xbt
17/14 xns
Figure 4-10
MANTIS2LIB – Calculation Procedure for Composite Variables VSS, TSS
xbh inxbh
sn2
xbaa inxbaa
xbacm inxbacm
TKN
xbh2m inxbh2m
xi inxi insi si
inxmgnh4po4
xu inxu
xns xmgnh4po4
Figure 4-11
MANTIS2LIB – Calculation Procedure for Composite Variables STKN and TKN
xbh ipxbh
xbai ipxbai
STP
xbaa ipxbaa sp
xbacm ipxbacm
XTP
xbh2m ipxbh2m
xpp
xps
Figure 4-12
MANTIS2LIB – Calculation Procedure for Composite Variables STP, XTP and TP
xbh icxbh
xbai icxbai
xbaa icxbaa
xbp icxbp
xbpro icxbpro
icsac sac
xbacm icxbacm
icscol scol
TOC
xbh2m icxbh2m
icsmet smet
xbmet icxbmet
icss ss
xbf icxbf
icsi si
xi icxi
xu icxu
xs icxs
xbt icxbt
Figure 4-13
MANTIS2LIB – Calculation Procedure for Composite Variables STOC and TOC
It is possible to use a model in the layout that does not simulate the fate of all
components of a given library (e.g. mantis in CNPLIB, which does not model
phosphorus even though there are phosphorus state variables in CNPLIB). In
these cases, these extra components will be modelled as if they were inert (i.e.
no biological transformation applied, but mixing and settling are applied).
The composite variable list displayed in the Display Variables > Composite
Variables menu is the list associated with the library used to create the layout
(e.g. CNPLIB). All composite variables are calculated for the given library,
even if the component states are not modelled biologically in the reactor. For
the example above (mantis model in CNPLIB), soluble phosphorus (sp) is not
modelled biologically, and therefore behaves the same as si (soluble inerts).
However, because CNPLIB contains the composite variable TP (total
phosphorus), it will be calculated (from sp and other components) even though
sp was modelled as an inert.
It is important to take this into consideration when selecting which model and
library you will be using when creating your plant layout.
CHAPTER 5
Influent Models
Introduction
For every influent model that is used in a wastewater plant layout, it is important to
properly specify the influent characteristics and also the influent stoichiometry.
Influent Advisor
To help users better understand influent characterization, a special utility program, called
Influent Advisor, was developed by Hydromantis. The tool helps users to visualize and
debug influent characterization data. It is recommended that users make use of this utility
tool so that influent characterization errors can be avoided.
The mathematical description of the influent wastewater that is fed to the plant model is
the single most important aspect of a simulated system. Without significant consideration
of the influent characterization, the plant model will be limited in its ability to predict the
dynamic behavior of the plant.
To access the Influent Advisor tool, right-click on any Wastewater Influent object, and
select the Composition > Influent Characterization menu item.
The Influent Advisor screen shows three columns of data: User Inputs, State Variables,
and Composite Variables, as shown in Figure 5-2
As the user changes values in the left-hand column, the variables in the centre and right-
hand columns are automatically updated. This allows for easy debugging of confusing or
conflicting influent characterization data.
Clicking on any variable in the centre and right-hand column illustrates how that value is
calculated. The formula will be displayed in the formula box (located in the lower middle
of the screen – you may need to scroll down to see it). The values used in the formula
will be highlighted in the tables so that the applicable cells can be identified. If a negative
value is calculated in either table, the cell will turn red. Correcting problematic data is a
matter of adjusting the input cells to achieve non-negative values.
Figure 5-3
Influent Advisor Screen Showing Highlighted Cells and Negative Values
High-lighted in Red
The influent models used in GPS-X make certain assumptions about what data may or
may not be available. For instance, no influent model uses both COD and BOD data,
even though this data may be available and may provide important information about
how that organic material is partitioned into the available state variables. Influent Advisor
helps overcome this shortcoming.
Take an example in which BOD and COD data is available and the BODbased model is
chosen for the influent object. The applicable data can be entered into Influent Advisor,
including the available BOD data. The user can then scroll to the right table and check
the COD value calculated based on the input data. If the COD data is in agreement with
the measured COD data (assuming no negative values in any cells), then the user can be
assured that the input data is consistent with the available data. If the COD data is
different from the measured COD, then the unknown (or estimated) input data should be
adjusted until acceptable agreement is achieved.
Please Note: Because correctly setting up the influent is critically important to the
simulation, a set of warning messages has been developed and when necessary
these will appear in the Command window. For instance, if the user inadvertently
enters a value for xsto, but has chosen ASM1 as the local biological model, then a
warning message (`time = <timestamp> xsto<streamlabel> is non-zero, xsto
is not a state variable in ASM1') will appear in the Log window. This is a
signal to go back to the influent data forms and correct a problem with the influent.
It is recommended that Influent Advisor be used to debug your influent
characterization.
Hydromantis recommends that users make full use of Influent Advisor as a tool to help
identify problems and understand the interconnectivity between state and composite
variables.
During a simulation error messages related to the influent may appear in the simulation
Log window. These messages will most likely be the result of improper influent
stoichiometry. If an error message does appear, then the influent stoichiometry should be
examined for possible errors.
Models
Name Object Use
Available
bodbased
codfractions
Continuous wastewater flows codstates
Wastewater Influent
(steady or dynamic) sludge
states
tsscod
acetate
COD Chemical Dosage of COD
methanol
Dosage into streams or objects
water
bodbased
codfractions
Batch deliveries of septage or
codstates
Batch Influent other discontinuous wastewater
sludge
flows
states
tsscod
The three influent objects contain models, options and features that are relevant to the
type of influent being used. For example the continuous wastewater model has options
for specifying a diurnal pattern for influent flow, a feature not found in the chemical
dosage object.
Figure 5-5 - Influent Flow Data Menu, showing Flow Type Options
1. Data – users set the flow rate directly, via menu entry or read from file
3. Diurnal Flow – a daily diurnal pattern is set via flow rates at different
times of the day
4. Diurnal Flow Factor – a daily diurnal pattern is set via factors (for
different times of the day) which are multiplied by the influent flow set
in the menu or read from file
RUNOFF MODEL
The runoff flow model uses a parallel linear reservoir model to simulate wet
weather flow in sanitary and combined sewer systems. This model is not a
mechanistic hydrological model, but a simple mathematical transformation.
The equations are:
and
Pi × Ci = Ptotal (5.2)
where:
Qtotal = Qd + Qi (5.3)
Qi = Ki ×Vi (5.4)
Qd = Kd ×Vd (5.5)
= (Pi × A) − Qi
dVi
(5.6)
dt
= (Pd × A) − Qd
dVd
(5.7)
dt
where:
The descriptions of the influent models that follow are an overview of how
they work; however, due to their complexity and their dependence on the local
biological model and the library currently in use, users are referred to Influent
Advisor to understand the calculations being made in each model.
BODbased
The bodbased influent model is the choice when BOD data is available and
COD data is not available. However, due to the approximations and the nature
of the BOD measurement, special care must be taken to properly estimate
influent particulate inerts. If this model is selected, the user inputs total
carbonaceous BOD5, total TKN, total suspended solids, a few state variables
(the state variables are normally zero except for the soluble inert organics,
soluble ortho-phosphate (cnplib) and alkalinity (Figure 5-7 and Figure 5-8 and
several stoichiometric fractions. These inputs are used to calculate the
remaining influent state variables: readily biodegradable substrate (ss), slowly
biodegradable substrate (xs), particulate inert organics (xi), free and ionized
ammonia (snh), particulate biodegradable organic nitrogen (xnd), and soluble
biodegradable organic nitrogen (snd).
The relationships between the six calculated state variables and the composite
and stoichiometric fractions are library-specific and the relationships are shown
in the appendix to this chapter (Figure 5-25 and Figure 5-26). BODultimate is
assumed to be equivalent to the biodegradable COD and therefore has units of
mg COD/L.
the asm1 or mantis models the amount of free and ionized ammonia (snh) is the
fraction of ammonia (fnh) multiplied by the TKN. The remainder is the
biodegradable organic nitrogen, which is partitioned into three areas including
nitrogen associated with particulate state variables (i.e. xbh, xba, xi and xu),
and soluble and particulate organic nitrogen (snd and xnd) using the fxn
fraction and the nitrogen fractions of the particulate state variables (Figure
5-8).
CODFractions
This model requires an input of total COD, total TKN, total phosphorus (in
CNPlib), state variables (the state variables are normally zero except for
ammonia, soluble ortho-phosphate and alkalinity) and several stoichiometric
fractions. From these inputs, the complete set of state variables, composite
variables and nutrient fractions are calculated (Figure 5-20 and Figure 5-21).
The calculation of the nitrogen and phosphorus (CNPlib) state variables and
fractions is complicated in the codfractions influent models. This is because
some of the nitrogen and phosphorus in the influent is associated with the
organic state variables (i.e. N content of active biomass). Therefore, the model
must adjust itself depending on the applicable composite variable model and
the current organic states. As with the other influent models, these nutrient
fractions are specified in this model. However, in the event that a mass balance
is not achievable with the user input data, the codfractions model will
recalculate these nutrient fractions to force the mass balance. It is
recommended that Influent Advisor be used to set-up and understand these
calculations
This model has the advantage that each of the calculations is based on the total
COD, total TKN, total phosphorus (CNPlib), soluble ortho-phosphate (CNPlib)
and ammonia inputs. Therefore, (as often is available in practice) a series of
these data over a period of time can be read in from a data file and the influent
state variables will vary with the load. This is in contrast to other influent
models in which some state variables are input directly and will not
automatically vary with a load change.
CODstates
This model works similarly to the codfractions influent model, however all
COD input fractions are set as a fraction of total COD. This allows users to
specify total COD, TKN and ammonia as their main characterization inputs.
Soluble inert COD (si), readily biodegradable substrate (ss, sf or slf),
particulate inert material (xi), unbiodegradable cell products (xu) and biomass
concentrations (xbh, xba and xbp) are specified via fractions of total COD, as
shown in Figure 5-9.
Sludge
This model has been designed to mimic the input of a sludge stream. The user
inputs the total suspended solids, a few state variables, and a couple of
GPS-X Technical Reference
Influent Models 73
stoichiometric fractions. From these inputs, the organic solids are partitioned
into heterotrophic biomass (i.e. degradable particulate material), polyphosphate
accumulating biomass (CNPlib only) and unbiodegradable particulate material.
The remaining particulate organic state variables are set to zero. Except for
dissolved oxygen and alkalinity, all the soluble state variables are defaulted to
zero in this model.
States
This model is appropriate if a full influent characterization has been performed
and the influent state variables have been calculated manually. If the user
selects the states model, input values for the state variables (
Table 5-2), and a few stoichiometric fractions used for calculating the
composite variables are required. The CNlib states data entry form (Composition
> Influent Composition) is shown in Figure 5-9, and the stoichiometry entry form
Figure 5-10
CN Library States Influent Model Influent Stoichiometry Inputs
TSSCOD
The tsscod influent model can be used successfully if the influent was
characterized using COD and suspended solids as the main components. The
tsscod influent model was developed based on the Activated Sludge Model No.
2 report (Henze et al., 1995).
If this model is selected, the user inputs total COD, total TKN, total suspended
solids, a few state variables (the state variables are normally zero except for the
soluble inert organics, soluble ortho-phosphate (CNPlib) and alkalinity and
several stoichiometric fractions. These inputs are then used to calculate the
remaining state variables (Figure 5-7 and Figure 5-8).
Particulate COD (XCOD) is calculated from the TSS using two stoichiometric
fractions. This is then divided into its component parts via stoichiometric
fractions or explicitly as read from the data input forms leaving the particulate
inert organics component (xi) to be calculated by subtraction. Figure 5-12
shows how the soluble COD (SCOD) components are calculated from the
COD, XCOD and the stoichiometric parameter, frsi. See the bodbased model
for the calculation of the nitrogen and phosphorus (CNPlib) state variables. It is
recommended that Influent Advisor be used to understand these calculations.
REMAINING
TSS ivt (1-frxbh-frxs) XCOD
icv
VSS XCOD
frxs -1 XI
XS xba
frxbh -1
xu
XBH -1
xsto
Figure 5-11
CN Library tsscod Model Particulate Inert Calculation
frsi SI
COD
SCOD 1-frsi
-1 SS
XCOD
Figure 5-12
CN Library tsscod Influent Soluble Components Calculation
Acetate
The acetate influent model can be used to simulate the addition of acetate to the
treatment process. The acetate dose (as acetic acid) can be entered as a
percentage of purity, or in a variety of units (mol acetate/L,
g(acetate*COD)/m3, g(acetate)/L, etc.), by selecting from the drop-down units
menu (Figure 5-13). The COD equivalent of the acetate dose is automatically
converted to slf if asm2d or newgeneral have been chosen for the local biological
model or ss (readily biodegradable substrate) for all other local biological
models.
Figure 5-13
CN Library Acetate Influent Model – Acetate Dose Form
Methanol
The methanol influent model can be used to simulate the addition of methanol to
the treatment process. The methanol dose can be entered as a percentage of
purity, or in a variety of other units (mol methanol/L, g(methanol*COD)/m3,
g(methanol)/L, etc.), by selecting from the units drop-down menu (Figure
5-14). The COD equivalent of the methanol dose is automatically converted to
sf if asm2d has been chosen for the local biological model or ss (readily
biodegradable substrate) for all other local biological models.
Water
This influent model was developed to simulate a rain event or alkalinity
addition whereby the influent hydraulic load could be increased without
increasing the organic or nitrogen load to the plant. In the water influent, the
only variable to be provided in the composition menu is the alkalinity. All
other state variables are set to zero.
In the batch influent, if the average flow and load types are selected, the model
will behave exactly like the continuous influent.
If the individual flow type is selected, there will be an intermittent (or batch)
influent. Under the Flow sub-menu item individual , the user can specify the
starting and ending time of the batch influent, and the volume of each truck (1
truck per day by default - the number of trucks per day is specified in the
Influent Composition sub-menu). The total volume specified will be fed at an
averaged rate over the total dumping time specified, that is there will be one
influent flow spike.
If the individual load type is selected, the loading is determined by the amount
specified in the Individual Loads sub-menu. The stoichiometry is specified in the
Influent Characterization menu and the number of trucks per day is specified in
the Composition sub-menu (see Figure 5-15).
Influent Appendices
The composite variable figures are copies of the figures presented in the
composite variables chapter of this Reference; however, they are repeated here
because of their importance to the influent model calculations.
Table 5-1 - State Variables Used in Each Biological Model Included in CNLIB and
CNIPLIB
si
SCOD
fbod
SBOD5 SBODU ss
BOD5 BODU xs
COD
fbod xbh
XBOD5 XBODU
xba XCOD
icv-1
xsto
VSS
xu
xi
X Tota l
Suspended
XISS Solids
xii
Nitrogen fractions
xbh
si
TN TKN xnd xs
Table 5-2
State Variables Used in Each Biological Model Included in CN2LIB and CN2IPLIB
State Variable Mantis TwoStepMantis
si
ss
ssh
xi
xs
xu
xbh
xbai
xbaa
so
snh
snd
xnd
snoi
snoa
sni
xni
snn
salk
xii
si
ssh
SCOD
ss
fbod
XBOD5 SBODU
xs
BOD5 BODU COD
xbh
fbod
SBOD5 XBODU
xbai
XCOD
icv-1
xbaa
VSS
xu
X Tota l
Suspended
Solids
xi
XISS
xsto
3 3
xu
SNO
xi
STKN
xni xnd
xbaa
TKN
XTKN xbai
TN
Table 5-3
State Variables Used in Each Biological Model included in CNPLIB and
CNPIPLIB
State Mantis ASM1 ASM2d ASM3 NewGeneral
Variable
si
ss
sf
slf
xi
xs
xu
xbh
xba
xbp
xbt
xsto
so
GPS-X Technical Reference
Influent Models 83
sp
xpp
xppr
snh
snd
xnd
sno
snn
salk
xmeoh
xmep
xii
si
sf
slf SCOD
fbod ss
SBOD5 SBODU
xs
BOD5 BODU
COD
xbh
fbod
XBOD5 XBODU
xba
XCOD
xbp icv-1
xgly VSS
Total
xbt X Suspended
Solids
xsto XISS
3
xu 3
xba
Nitrogen fractions
(depends on the model)
xbp
STKN XTKN
xi
xu
TN TKN xnd
xs
sf
(depends on the model)
Phosphorus fractions
STP TP xpp
ss
xppr
sp
si XTP
0.205 xmep
bodbased
codbased
Wastewater Continuous wastewater flows codstates
Influent (steady or dynamic) states
sludge
tssfrac
bodbased
codbased
Batch deliveries of septage or other codstates
Batch Influent
discontinuous wastewater flows states
sludge
tssfrac
COD
Dosage of COD chemicals into
Chemical
streams or objects codfeed
Dosage
Nutrient
nutrifeed
Dosage Nutrient addition
The seven influent objects contain models, options and features that are relevant to the
type of influent being used. For example the continuous wastewater model has options
for specifying a diurnal pattern for influent flow, a feature not found in the other influent
objects. The influent models in MANTIS2LIB are similar to influent models in other
libraries with a few differences.
Figure 5-29. For the selected chemical, two input parameters of % purity and
density of chemical solution at the selected %-purity are required. Depending
on the chemical selection, the concentration of the corresponding state variable
is set. For example, if acetic acid is selected, the concentration of acetate (sac)
is set to the value determined by the set % purity and density of the chemical
solution.
The COD chemical dosage object has a built-in flow rate controller. The
controller is useful for controlling the feed rate of COD based on a user defined
controlled variable.
The alkali dosage object has a built-in flow rate controller. The controller is
useful for controlling the feed rate of alkali based on a control variable (e.g.
pH) in a reactor of interest.
Feed Chemical Details menu (Figure 5-37). The Feed Chemical Details menu is as
shown in Figure 5-38. For the selected chemical, two input parameters of %
purity and density of chemical solution at the selected %-purity are required.
The chemical and corresponding state variables which are set in the feed are
shown in Table 5-3.
(NH4)3PO4 snh, sp
H3PO4 sp
The nutrient dosage object has a built-in flow rate controller. The controller is
useful for controlling the feed rate of nutrient for a user defined control
variable.
CHAPTER 6
Suspended-Growth Models
Introduction
This chapter examines the suspended-growth models that are available in the different
GPS-X libraries. Each of the biological models available in GPS-X is implemented in
both the completely mixed and plug-flow formats in many different unit process objects.
The biological model is the same, however, regardless of the hydraulic implementation.
Common Features
V
dC L
dt
( )
= QCin − QC L + K L a C∞* − C L V + rV
(6.1)
where:
The volume, flows, and reaction rates are known from specifications or other
modelling equations leaving two terms that must be calculated in order to solve
the dissolved oxygen mass balance over time for the DO concentration in the
reactor, CL:
C ∞* = τ × β × Ω × C ∞* 20 (6.2)
where:
C st* (6.3)
τ= *
C s 20
where:
Pb + p de − pv (6.4)
Ω=
Ps + p de − pv
where:
The barometric pressure at elevation and air temperature is calculated using the
following formula taken from Appendix B-2 of Metcalf and Eddy (2003):
gM (z b − z s ) (6.5)
Pb = exp − Ps
RTair
where:
The vapour pressure of water at the liquid temperature is determined using the
Antoine equation (Felder and Rousseau, 1986):
B (6.6)
log10 pv = A −
T +C
where:
A, B, C = Antoine coefficients (found in System > Input Parameters > Physical form
in GPS-X under Physical Constants )
T = wastewater temperature (oC)
p de = (δ − 1)(Ps − pv ) (6.7)
where δ is the depth correction factor for oxygen saturation and is given by
δ = 1+ 0.03858(d ) (6.8)
Coarse Bubble
(
C∞* 20 = δ C s*20 ) (6.10)
1. If known, the user can directly supply the KLa at 20 oC (no alpha,
fouling, or temperature correction) for both diffused and mechanical
aeration. GPS-X converts the KLa to field conditions.
where:
The α correction factor can be specified along the length of the aeration tank in
the case of a plug flow unit process.
GPS-X calculates other useful process variables from the standard and field
KLa as detailed below:
(
OTR = K L aT C∞* − C L V ) (6.12)
SOTR (6.14)
Gs =
SOTE × CF1
where:
CF1 = conversion factor to account for the density, molcular weight, and O2
mole fraction of the standard air (U.S. Standard = 277.6533841;
European Standard = 300.495893)
In the case of user-defined standard air (see Entering Airflow section below),
the airflow is calculated using Equation 6.15.
SOTR (6.15)
Gs =
ρ user
SOTE × molfrO2 × MWO2 ×
MWuser
where:
Gs , field =
(T field + 273.15)
×
Ps
× Gs
(6.16)
(Ts tan dard + 273.15) Pb
where:
Equation 6.16 assumes that the field air has the same humidity as the standard
air. If the humidity of the field air is different than for the standard air, the user
can multiply the GPS-X calculated field air by the ratio of the mole fraction of
oxygen in the field air by the mole fraction of air in the standard air.
Pb − pv (6.18)
Ω=
Ps − pv
(
OTR = K L aT C∞* ,mechanical − C L V ) (6.20)
K L aT (6.21)
SOTR = × C s*20V
αθ T − 20
SOTR (6.22)
Pmechanical =
η × CF2
where:
Entering Airflow
The airflow can be entered at either standard or field conditions. At standard
conditions the user has 3 options:
molfrO2
C st* = × C st*
0.2095 (6.23)
GPS-X converts the airflow to U.S. standard conditions and then calculates the
SOTR using Equation 6.13. The OTR is calculated using Equation 6.24.
OTR =
SOTR (αF )θ T −20 C∞* − C L ( ) (6.24)
C∞* 20
DO Control
The user has the option of controlling the aeration supply to the reactor to
maintain a specific dissolved oxygen setpoint. In this case the model will
calculate the necessary oxygen mass transfer coefficient at field conditions to
maintain the DO at the setpoint.
For diffused aeration with DO control, GPS-X uses Equations 6.12 to 6.14 to
calculate the SOTR, OTR, and airflow. For mechanical aeration with DO
control, GPS-X uses Equations 6.20, 6.21, and 6.22 to calculate the OTR,
SOTR, and mechanical power.
Alternatively, GPS-X has SOTE correlations for fine bubble, coarse bubble,
and jet diffusers. For fine bubble aeration, the SOTE correlations are based on
a regression equation developed by Hur (1994) which is shown below:
where:
The values of the regression coefficients can be found in the System > Input
Parameters > Physical > More form.
A separate correlation for coarse bubble and jet diffusers has been developed
by Hydromantis based on data found in Mueller et al. (2002) as shown in
Equation 6.26:
As shown, the SOTE for coarse bubble and jet diffusers is dependent upon the
airflow per diffuser and the diffuser submergence.
In all the SOTE correlations, the airflow per diffuser is been limited to be
within the ranges used for calibration. The correlations are empirical and
should not be extrapolated outside of the calibration range. The ranges used are
as follows:
Fine Bubble
Coarse Bubble
14 ≤ AF ≤ 58 m3/h/diffuser
Jet
8 ≤ AF ≤ 140 m3/h/diffuser
GPS-X prints a warning message to the log window if the airflow per diffuser
is outside the ranges given above.
SOTE = A1 + A2 × AF + A3 × AF 2 + A4 × d + A6 × d 2 + A5 × DD (6.27)
The regression parameter A6 can be accessed in GPS-X in the Input Parameters >
Operational > More form. The parameter A6 was estimated by Hydromantis using
linear regression to fit Equation 6.26 to the solid curve in Figure 8 of Pöpel and
Wagner (1994). In order to perform the regression it was necessary to first
adjust the airflow per diffuser and the diffuser density to match the SOTE of 20
% at depth of 5 m shown in Figure 8 of Pöpel and Wagner (1994).
The deep tank SOTE correction is only applied for fine bubble diffusers. It can
be turned off by setting the parameter A6 to zero in GPS-X.
DP (6.28)
WP =
e
where:
wRTa P
K
(6.29)
DP = d − 1
K Pa
where:
Pd = Ps + g × d + ∆pd (6.30)
where:
Pa = Ps − ∆pa (6.31)
where:
Oxygen mass transfer coefficient (clean water): Clean water KLa at 20 oC with no
alpha or fouling factor correction.
By clicking on the More … button the form shown in Figure 6-2 and Figure 6-3
can be accessed. The parameters found in this form are discussed in the
subsequent sections.
Standard air conditions (U.S. (air temp 20C, 36% humidity)/European (air temp 0C, 0%
humidity)/User-Defined): If the aeration method is diffused, this switch selects
which standard conditions are used to calculate the standard air flow used
within GPS-X and displayed as an output. If user-defined standard air is
slected the user must enter the properties of their air in the Properties of User-
Defined Air sub-section. The user-defined air option provides the user with a
method of specifying pure oxygen.
The output variables associated with the blower calculations can be accessed
by right-clicking on the object (single tank objects only) or the overflow
stream and selecting Output Variables > Operating Cost .
STATE VARIABLES
A few comments about the state variables used in each of these models is
required. For all the models, the symbolic name of the state variables is
prefixed with either an X for particulate component, S for soluble component,
or in some cases a G for gaseous component. This designation follows the IWA
(Henze et al., 1987a) convention but is somewhat arbitrary because some
soluble and particulate components are colloidal and will pass through a
0.45µm filter but still be classified as part of a particulate component. For
example the slowly biodegradable material, designated Xs, may include soluble
and/or colloidal material. This approach greatly facilitates the model
development; however it invariably introduces some error into the models. The
issues of wastewater characterization are important and the modeller should
refer to the papers listed with the individual models discussed below.
MODEL MATRIX
Most biological process models now follow a standard matrix format. An
example of this format is shown in
Table 6-1
1 1− Y µ̂S s
1 Growth 1 − − XB
Y Y K S + SS
2 Decay -1 -1 bXB
[M(COD)L-3]
[M(COD)L-3]
Substrate
COD)
Y Constant: KS
Specific decay rate: b
The entries within the table are the stoichiometric parameters or relations,
designated vij, used in defining the net process rate for a component. These
parameters define the mass relationships between components and are defined
in the lower-left hand corner of the table. If a process does not directly affect a
component's rate, then the table cell will be empty (the entry is assumed to be
zero in this case).
The net reaction rate of a component, designated ri, is the sum of all the
process rates, which cause a change in the mass of that component. The
expression used to determine the net rate is listed in the table in the row labeled
"Observed Conversion Rates". When the model is presented in matrix format,
this equation has a simple visual interpretation. To determine the net rate of
change for a component, first identify the column of the component of interest
and move down that column until you find a table cell containing an entry.
Multiply the table cell entry by the process rate shown in the rightmost column.
The sum of these individual process rates is the net reaction rate. Do likewise
for all remaining rows in the column, which contain stoichiometric parameters.
STOICHIOMETRIC PARAMETERS
Two common stoichiometric parameters appearing in the biological models in
this chapter are derived from their respective chemical equations. First is the
nitrogen to oxygen stoichiometric parameter used in the denitrification
equation. A value of 2.86 is used throughout the GPS-X libraries for all the
biological models. This value is derived from the molecular ratios shown in the
equation below:
−
4 NO3 + 2 H 2 O → 2 Ν 2 + 5O2 + 4OH −
The ratio of mass oxygen produced per mass nitrogen gas produced is 160:56
or 2.86:1. Similarly, the stoichiometric ratio of oxygen to nitrogen required for
nitrification (used in many of the biological models) has a value of 4.57 which
is derived from the molecular ratios shown in the equation below:
−
NH +4+2O2 → NO3 + H 2 O + + 2 H +
Since these stoichiometric ratios cannot change, the values are hard-coded in
GPS-X without user access. Other similar stoichiometric ratios are used in the
CN2 and CN2IP libraries, since they consider partial ammonia oxidation to
nitrite as well as complete ammonia oxidation to nitrate.
INTRODUCTION
The International Association on Water Pollution Research and Control
(IAWPRC) Task Group realized that due to the long solids retention times and
low growth rates of the bacteria, the actual effluent substrate concentrations
between different activated sludge treatment plants did not vary greatly. What
was significantly different were the levels of MLSS and electron acceptor
(oxygen or nitrate). Thus the focus of the Activated Sludge Model No. 1 (called
asm1 in GPS-X) is the prediction of the amount and change of the solids and
electron acceptor.
The Task Group considered the trade-off between model accuracy and
practicality. They identified the major biological processes occurring in the
system and characterized these processes with the simplest rate expressions
that could be used, resembling the real reactions.
The use of switching functions was made by the Task Group since some
reactions depended on the type of electron acceptor present. These functions
were of the form:
SO
K OH + S O
CONCEPTUAL MODEL
In the development of activated sludge modelling, the manner in which the
quantity of organic matter is measured (BOD, COD or TOC) is inconsistent.
The Task Group decided to use COD since mass balances can be carried out
and since it has links to the electron equivalents in the organic substrate,
biomass and electron acceptor.
1. heterotrophic; and
2. autotrophic.
The heterotrophic biomass is generated by the growth on readily biodegradable
substrate under aerobic or anoxic conditions and decays (including endogenous
respiration, death, predation and lysis) under all conditions. The autotrophic
biomass is generated under aerobic conditions only utilizing ammonia for
energy and decays under all conditions.
INTRODUCTION
This model (asm2d ) is an implementation of the Activated Sludge Model No.
2d (Henze et al., 1998). The model structure, default values and all other model
aspects follow the publication in every detail.
The asm2d model is implemented in the CNP and CNPIP library, and the
Model Matrix is found in Appendix A.
State Variables
The state variables here are similar to the newgeneral model with the exception
of the fixed nutrient fractions. Examining the soluble components first, this
model differentiates between two substrates:
Looking at the particulate states, the model includes three types of biomass:
2. poly-phosphate (xpp ).
Processes
The processes described by this model are separated into four groups:
The hydrolysis processes include the aerobic, anoxic and anaerobic hydrolysis
of slowly biodegradable organic material into soluble substrate (processes 1-3).
The rate equations are similar for the three processes; however, the rate
constants under these different environmental conditions are not well known.
The hydrolysis of organic nitrogen is not explicitly included in this model.
Rather, a fraction of the organic particulate material is assumed to be organic
nitrogen and therefore hydrolyzes at the same rate as the organic particulate
substrate.
4. the lysis of the bacteria and their corresponding internally stored products
(processes 13-15).
The final two processes in the model are the aerobic growth of the nitrifiers
(process 16) and their death and lysis (process 17). The kinetic parameters of
this model, like those of the mantis model, are temperature dependent. A similar
Arrhenius type function is used to describe this dependency.
This model is a minor extension of the original asm2 model. It includes two
additional processes to account for phosphorus accumulating organisms
(PAOs) using cell internal storage products for denitrification. Whereas the
asm2 model assumed PAOs to grow only under aerobic conditions, the asm2d
model includes denitrifying PAOs.
Endogenous XI
O2 /NO3 Respiration
O2 /NO3
SS
X STO
Internal compounds storage XBH O2 /NO3
hydrolysis XBH growt h
Xs
SI Endogenous
respiration
O2 NO 3
SNH X BA
XBA growth
• Two additional growth processes are introduced, one for the autotrophic
organisms and one for the heterotrophic organisms.
• The kinetic parameters are temperature-dependent.
• Aerobic denitrification is introduced.
The additional growth processes account for the observed growth of organisms during
conditions of low ammonia and high nitrate. Under these conditions, the organisms can
uptake nitrate as a nutrient source.
When the sole rate limiting step for the overall nitrification process is the conversion of
ammonia to nitrite as generally observed (Benefield and Randall, 1980; Poduska and
Andrews, 1975), the modelling of nitrification may be adequately represented as a single-
step process. However, transient build-up of nitrite has been observed in full and lab-
scale experiments, and in batch respirometry assays (Mauret et al., 1996), suggesting the
conversion of nitrite to nitrate step could be limiting in certain cases. When this is the
case, the single-step nitrification approach may not be accurate, as shown in recent
studies (Chandran K. and Smeth B.F., 2000).
Aerobic denitrification is also implemented by giving the possibility to adjust the oxygen
half-saturation coefficients for all the anoxic reactions.
INTRODUCTION
Dold's general model is not implemented in GPS-X, in favour of the newgeneral
model. However, a description of the general model (which makes up the basis
for the newgeneral model) is presented here.
In the following sections the general model of Dold (1990) is described. This
model was derived from a combination of the asm1 model for non-polyP
heterotrophic organisms and autotrophic organisms (Henze et al., 1987a,
1987b) and the Wentzel et al. (1989b) model for polyP organisms. The
The values of the kinetic parameters, as with the asm1 model, are those for 20
degrees Celsius.
The modelling of BNR activated sludge systems has identified mass balance
problems in some facilities. That is, several experimental and full-scale
evaluations of BNR facilities have revealed imbalances between what is going
into the plant and what is going out (i.e. less COD is going out than going in,
hence the COD 'loss'). Both from a theoretical and modelling point of view,
this causes some problems, and there is no world-wide accepted explanation
for these imbalances. Nevertheless, these discrepancies must be modelled. To
account for these mass balance problems (referred to as anaerobic stabilization
or COD losses), four COD loss terms are included in the newgeneral model.
These include:
The newgeneral model has proven itself to be a reliable predictive tool for the
BNR process. Nevertheless, users should be aware that the newgeneral model in
its default condition does not result in a COD balance across the system. To
eliminate COD losses (and thus force a COD balance across a newgeneral -
based layout) each of these stoichiometric loss terms should be set to 1.0.
Included in newgeneral are two new heterotrophic yield terms to account for
differences in yield under varying electron acceptor conditions. Where the
general model assumed the same yield irrespective of the electron acceptor,
newgeneral differentiates the yield depending on the presence of oxygen and
nitrate. The added stoichiometric terms include:
• Yield (anoxic).
• Yield (anaerobic).
In total, two state variables and eight processes have been added to the general
model. These include:
State Variables
• Non-releasable polyphosphate (XPP).
• Soluble inorganic nitrogen (SNI).
Processes
• Anoxic hydrolysis of stored/enmeshed COD.
• Anaerobic hydrolysis of stored/enmeshed COD.
• XPP lysis on aerobic decay.
• XPP lysis on anaerobic decay.
• Anoxic decay of PolyP organisms.
• XPPR lysis on anoxic decay.
• XPP lysis on anoxic decay.
• XBT lysis on anoxic decay.
Phosphorus Uptake
As evidence exists that not all polyphosphate is releasable, a new state variable
to represent non-releasable polyphosphate was incorporated. The uptake of
phosphorus (both aerobically and anoxically) in newgeneral results in the
storage of both releasable and non-releasable polyphosphate. The partitioning
of the storage is stoichiometrically determined based on the total phosphorus
taken up.
PolyP Decay
In the general model decay of PolyP organisms was modelled as an aerobic or
anaerobic process. The newgeneral model includes anoxic decay of XBP to
those processes. This results in the anoxic lysis of XBT and XPPR modelled in
a similar way to the aerobic lysis of these variables in the general model. To
account for the lysis of XPP, newgeneral includes three new processes: one for
aerobic lysis, one for anoxic lysis and one for anaerobic lysis.
Hydrolysis
The hydrolysis of particulate COD to soluble material suitable for growth is a
critical step in the COD cycle. The general model modelled hydrolysis as an
aerobic process only, but newgeneral includes hydrolysis under anoxic and
anaerobic conditions and uses these processes as a sink for COD 'loss'.
Fermentation
Whereas the fermentation of SS to SLF was a non-growth related process in the
general model, in newgeneral , this process is associated with the growth of
heterotrophic organisms and hence a portion of the fermented COD winds up
as new biomass; however, equally important is the stoichiometry of this
process because, like hydrolysis, this process includes a COD 'loss' component.
INTRODUCTION
A new comprehensive model incorportaing the most commonly observed
biological, physical and chemical processes in wastewater treatment plants is
developed and implemented in the GPS-X 6.1. MANTIS2 is the outcome of
Hydromantis’ commitment to provide the state of the art models to its clients
through research and development. The MANTIS2 model incorporates a large
amount of information which has become available in technical literature in the
last decade. The motivation behind the development of a compreshensive
model arises from the fact that after the publications of ASM2d and ADM1,
there has been growing interest in extending the capabilities of models to
incorporate the side stream treatment processes like struvite precipitation,
nitritation-anammox for nitrogen removal and other precipitation processes.
Although, state variable interfaces between ASM2D and ADM1 are well
defined, the state variable mapping between two models present practical
challenges in model implementation and limits the versatility in modeling.
• Anaerobic digestion processes with gas phase modeling for N2, CO2, H2
and CH4
• pH and alkalinity estimation in both liquid and solid train
• Precipitation of MgNH4PO4. 6H2O, CaCO3, MgHPO4. 3H2O, CaPO4,
AlPO4, FePO4, Al(OH)3 and Fe(OH)3
• Unified composite variable calculation
In addition to above, reference is made to other well accepted models e.g. New
General model, ADM1 and UCTCN and MANTIS model in formulating the
model structure and finalizing the default stoichiometry and kinetics of model
parameters. The modeling approaches for two-step nitrification, two-step
denitrification, denitrification on methanol and ANAMMOX are adopted from
recent research studies.
The essential components of the model like state variables; stoichiometry and
model processes are discussed next.
State Variables
A complete description of the state variables in MANTIS2 model is provided
in the chapter on GPS-X State Variable Libraries.
The soluble states in the model can be classified into four categories. The
soluble inert organic, soluble biodegradable organics, soluble inorganic ions
and dissolved gases. The states in each category are described in following
sections.
The state represents the inert organics in the wastewater. The soluble inert
organics are not degraded in the wastewater treatment processes. MANTIS2
model considers the generation of soluble inert organic during the hydrolysis of
slowly biodegradable substrate. By default, the fraction of soluble inert organic
production is set to zero. In the anaerobic digestion process, the fraction may
be set to a non-zero value to calibrate the soluble inert COD from the digesters.
1. acetate (sac)
2. propionate (spro)
The state of fermented substrate (slf) in ASM2D is splitted into two states of
acetate (sac) and propionate (spro). The inclusion of an additional state of spro
is required as it is one of the important intermediate products in anaerobic
digestion.
The additional state of methanol (smet) is added to the model. It is now well
accepted that the single carbon methanol is degraded by special microorganism
which have different kinetics than the ordinary heterotrophic organism. This
additional state is helpful to track the degradation of methanol based on the
degradation kinetics of methylotrophic biomass.
Soluble Inorganic
The soluble inorganic carbon, stic, represents the sum of carbon in all the ionic
species in the carbonic acid system i.e. H2CO3, HCO3-, CO32-. In previous
models like ASM2D and New General, the alkalinity (salk) is used to express
the buffer capacity in the wastewater. In MANTIS2, soluble inorganic carbon
is used instead of alkalinity as the state variable as it is a conserved quantity.
The alkalinity in the model is estimated by considering the soluble inorganic
carbon and the estimated pH of the system.
Two oxidized form of soluble nitrogen, i.e. soluble nitrite and nitrate are
considered in the model. This choice is necessary to model the two step
nitrification process.
The additional inorganic states like soluble calcium (sca), soluble magnesium
(smg) are introduced to model the key precipitation reaction involving these
ionic species. The state variable of soluble potassium (spot) is included to
model the uptake and release of potassium during polyphosphate formation and
degradation. The dissolved anion (sana) and cation (scat) represent all other
strong anion and cation in the wastewater. These states are used in formulating
the charge balance equation for estimating the pH in the wastewater.
Soluble Gases
In addition to soluble oxygen (so), MANTIS2 includes soluble gases states for
nitrogen (sn2), methane (sch4) and hydrogen (sh2). The soluble CO2 is
estimated by the pH and the stic concentration in the wastewater. The soluble
oxygen plays an important role in the aerobic biological systems. The other
gases are more relevant in the anaerobic digestion and fermentation processes.
For each soluble gas, gas-liquid transfer equation are used to model the
dissolution/stripping of the gas in the unit processes.
The particulate states in the model are classified into four categories of
Particulate Inert Organics, Particulate Organic Substrate/Storage, Active
Biomass and Particulate Inorganic.
The model includes two states of Inert Organic Particulate (xi) and
Unbiodegradable Organic Matter from cell decay (xu) in the model. The inert
organic particulate is the inert organics fraction that is contributed by the
influent wastewater. Having two states for inert organic compounds makes it
easier to differentiate between the amount of inert organics accumulated from
the wastewater and the amount that is produced by cell decay in the system.
The MANTIS2 provides one particulate Organic Substrate (xs) and one organic
storage compound for intracellular PHA (xbt). These states are equivalent to
the states in ASM2D and New General Models.
Active Biomass
Several biomass states are added in MANTIS2. To model the two step
nitrification process, two autotrophic biomass Ammonia Oxidizer (xbai) and
Nitrite Oxidizer (xbaa) are considered. Methylotrophic biomass (xbmet) is
included to model the biodegradation of methanol. The Fermentive biomass
(xbf), Acetogen (xbpro), Acetate Methanogens (xbacm) and Hydrogen
methanogens (xbh2m) are included to model the anaerobic transformation in
anaerobic digestion.
Particulate Inorganic
The particulate inorganic states include the model precipitates like Aluminum
hydroxide, Aluminum phosphate, Iron hydroxide, Iron phosphate, Calcium
carbonate, Calcium phosphate, Magnesium hydrogen phosphate, Magnesium
carbonate and Ammonium magnesium phosphate (struvite). In addition to
these precipitates Particulate inert inorganic is used as a composite state for the
unidentified inorganic in the wastewater. The N and P components associated
with the slowly biodegradable organics are included as Nitrogen in slowly deg.
organics and Phosphorous in slowly deg. organics. The inorganic Poly-
phosphate accumulated in PAO is also included as a state.
Composite Variables
MANTIS2 uses a well defined stoichiometry for each state variable to estimate
the composite variables. The state variables and their relationships to the
composite variables are shown in the GPS-X Composite Variable Calculation
chapter.
Processes
The processes included in MANTIS2 model are described below.
Adsorption/Enmeshment
10. Growth on acetate (sac) using NO3 as electron acceptor: The process of
heterotrophic growth on acetate using NO3-N is similar to the process #9
except that the growth rate is proportional to the ratio of acetate
concentration to the total soluble substrate (ss+sac+spro) available to
heterotrophic biomass.
13. Growth on acetate (sac) using NO2 as electron acceptor: The process of
heterotrophic growth on acetate using NO2-N is similar to the process #12
except that the growth rate is proportional to the ratio of acetate
concentration to the total soluble substrate (ss+sac+spro) available to
heterotrophic biomass.
The model considers two step conversion of NH3-N to NO3-N. The two steps
are mediated by ammonia oxidizer and nitrite oxidizer sequentially.
18. Decay of ammonia oxidizer: The process rate of ammonia oxidizer decay
is modeled similar to that in ASM2d model.
19. Decay of nitrite oxidizer: The process rate of nitrite oxidizer decay is
modeled similar to that in ASM2d model.
The processes mediated by PAO are based on the ASM2D model. Three new
processes describing the storage of PHA on propionate, growth of PAO on
PHA using NO2 as electron acceptor and anoxic storage of XPP using NO2 are
added to the processes mediated by PAO.
20. Storage of PHA by PAO using acetate: The rate expression for PHA
storage by PAO using acetate as used in ASM2d is modified to include the
effect of propionate, another VFA used by PAO. The rate expression is
modified by assuming that PAO can utilize acetate and propionate
simultaneous in proportion to the availability of each substrate.
21. Storage of PHA by PAO using propionate: This is a new process and
describes the storage of PHA by PAO using propionate. The kinetics and
stoichiometry of the process is based on concepts used in describing
process #20.
24. Growth of PAO on PHA using NO3 as electron acceptor: This process
of PAO growth takes place in the presence of NO3-N. The stoichiometry of
this process is developed by considering partial reduction of NO3-N to
NO2-N. The rate expression for the process uses an inhibition term for
oxygen and a saturation term for the NO3-N. The reaction rate expression
also reduces the amount of PAO biomass by the fraction of NO3-N to total
NOX nitrogen available in the system. It is assumed that when the PAO
biomass is converting NO3-N to NO2-N, it is not participating in the
conversion of NO2-N to N2 gas.
25. Storage of XPP on PHA using NO3 as electron acceptor: In this process
the storage of poly-phosphate takes place while the stored PHA compounds
26. Growth of PAO on PHA using NO2 as electron acceptor: This process
of PAO growth takes place in the presence of NO2-N. The stoichiometry of
this process is developed by considering partial reduction of NO2-N to N2-
N. The rate expression for the process uses an inhibition term for oxygen
and a saturation term for the NO2-N. The reaction rate expression also
reduces the amount of PAO biomass by the fraction of NO2-N to total NOX
nitrogen available in the system. It is assumed that when the PAO biomass
is converting NO2-N to N2-N, it is not participating in the conversion of
NO3-N to NO2-N.
27. Storage of XPP on PHA using NO2 as electron acceptor: In this process
the storage of poly-phosphate takes place while the stored PHA compounds
are oxidised using NO2-N as an electron acceptor. The conversion of NO2-
N to N2 is considered in process stoichiometry formulation. Similar to the
process #26, a reduction factor equal to the ratio of NO2-N to NOX –N
concentration is applied to account for fraction of total biomass mediating
this process.
28. Decay of PAO: The stoichiometry and rate expression for this process is
same as ASM2d except that alkalinity saturation term is not used.
29. XPP lysis: The stoichiometry and rate expression for this process is same
as ASM2d except that alkalinity saturation term is not used.
30. PHA lysis: The stoichiometry and rate expression for this process is same
as ASM2d except that alkalinity saturation term is not used.
35. Growth of fermentative bacteria at low H2: This process models the
fermentation by acidogens under low H2 partial pressure. The process
stoichiometry is developed based on a conversion of model fermentable
substrate (glucose) to acetic acid, H2 and CO2. The kinetic expression for
the process uses a H2 inhibition term to reduce the reaction rate as the
partial pressure of H2 increases.
36. Growth of fermentative bacteria at high H2: This process models the
fermentation by acidogens under high H2 partial pressure. The process
stoichiometry is developed based on a conversion of model fermentable
substrate (glucose) to acetic acid, propionic acid, H2 and CO2. The kinetic
expression for the process uses a H2 saturation term to account for
increased rate at higher partial pressure of H2.
39. Decay of acetogens: The stoichiometry and kinetic expression for the
decay process of fermentative biomass is based on the same principles as
for other biomass types.
42. Growth of Acetoclastic methonegens: In this process the the acetic acid is
converted to methane and CO2 by acetoclastic methanogens. The kinetic
expression of the process includes an acetate saturation term.
1NH4+ + 1.32 NO2- + 0.066 HCO3- + 0.13 H+ 1.02 N2 + 0.26 NO3- + 0.066
CH2O0.5N0.15 +2.03 H2O
The precipitation reactions in MANTSI2 are adapted from Musvoto et al. 2000
with some modifications. In addition to the processes of precipitation of AlPO4
and FePO4 which are included in ASM2d, five commonly observed
precipitation processes in wastewater treatment are included in the model. The
key differences from Musvoto et al. 2000 are 1) the effect of ion-pair is
neglected in the calculations; 2) the kinetic rate equations use the approach
suggested in ASM2d with a few modification and 3) the mole based
stoichiometry is replaced with mass based stoichiometry for maintaining model
consistency. The kinetic expression for the precipitation reactions uses the
concentration of participating ions, rate of precipitation and solubility product
of the precipitate. The kinetic rate expression is formulated such that the
precipitation and dissolution reactions can be modeled by a single equation.
Ca2+ and CO32- ions in the solution. The concentration of CO32- is estimated
by using the soluble inorganic carbon and the pH of the system.
Similar to the gas liquid transfer of oxygen, four additional processes as below
are added in the model. The gas-liquid transfer is modeled using a mass
transfer constant (kLa) and the gas saturation concentration at the given
temperature and pressure. The mass transfer constant for each gas can be
correlated to the oxygen mass transfer using gas diffusivities. For
simplification, fractional factors are applied to the mass transfer constant of
oxygen to obtain respective mass transfer constant.
ALGEBRAIC PH SOLVER
Stoichiometric Parameters:
The stoichiometric parameters to be specified in the influent section are used to
calculate the concentration of soluble, high molecular weight substrate (Cis)
from the influent readily biodegradable substrate (ss) and the concentration of
methanogenic biomass (Cxm) from the influent slowly biodegradable substrate
(Xs):
• fss: fraction of soluble high molecular weight substrate (Cis) in the influent
readily biodegradable substrate (ss).
• fxm: fraction of methanogenic biomass (Cxm) in the influent slowly
biodegradable substrate (Xs).
• fm: conversion factor from COD to cubic meters for methane production
(m3 CH4 /g COD).
Kinetic Parameters:
The model kinetic parameters are:
Process rates:
The process rates described in the model are:
Ammonification of proteins
C prot ⋅ C e
ramm = k amm
C xa
Decay of acidogens
rd , a = d a ⋅ C xa
Decay of methanogens
rd , m = d m ⋅ C xm
Decay of enzymes
rd , e = d e ⋅ C xm
Model Structure
A schematic diagram of the prefermenter model is shown in Figure 6-9 (adapted
from Munch et al., 1999)
rde
Cis Ye*rhis Cprot
Css
Ye*rhs
(1 –Ye)*rhis Ce
ramm
(1 – Ye)*rhs
Cmo
rda
(1-Ya)*rxa rdm
Ya*rxa
Ya*inbm*rxm
CH4 Cxm
The Model Matrix for the prefermenter model can be found in Appendix A.
1. The first choice to be made is the GPS-X macro library. If you are only
concerned with carbon and nitrogen processes, then you should use the
CN (1-step nitrification) or CN2 (2-step nitrification) library. If you are
interested in modelling phosphorus, then the CNP library should be used.
In each case, extra user-defined components can be added to the models
by selecting the associated IP (Industrial Pollutant) library - CNIP, CNPIP
or CN2IP.
2. It is a good rule of practice to keep the model as simple as possible at the
beginning, until you interpret the results and are comfortable with that
model's level of complexity. You can then move to more complicated
models. If you are unsure of which model to start with we recommend
using asm1, asm3 or mantis .
3. The choice of model should depend on the amount and type of data that is
available to support its use. For example, if you have little information
about different substrate types in your system, it is advisable to use models
that have fewer substrates.
The choice of model should reflect the need to simulate certain processes. For
example, if you are interested in exploring P-removal or alkalinity control, you
will need to use models that contain processes that are relevant to those
components. Table 6-2 summarizes the processes in each model, and may be
useful in choosing a model. You can consult the model descriptions earlier in
this chapter or the Model matrices found in Appendix A to see the details of the
processes contained in each model.
twostepmantis
newgeneral
Mantis2
asm2d
asm1
asm3
Fermentation Step X X X
Nitrification/Denitrification X X X X X X X
Aerobic Denitrification X X
Aerobic Substrate Storage X
COD "Loss" X
2-Step Nitrification/denitrification X X
NO3- as a N source for cell synthesis X X X
Alkalinity consumption/generation X X X X X X
Alkalinity (as a limiting factor for growth X
processes)
Biological phosphorus removal X X X
Precipitation of P with metal hydroxides X X
Temperature dependency X* X* X X X X X
pH X
Struvite, other Calcium and Magnesium ppt. X
Anammox X
Methylotroph X
The deep shaft header tank is modelled with two complete-mix reactors (by default), and
is under atmospheric pressure. The downcomer and the riser shafts are modelled with
twenty complete-mix reactors (by default).
Input
Overflow Input Overflow
Filter Filter
Pump Pump
The structure of the MBR model combines a conventional activated sludge tank model
(plug-flow or CSTR) with an in-tank solids separation filter, as shown in Figure 6-11. In
the case of the plug-flow MBR, the filter is placed in the final tank (an optional internal
recycle is shown for illustrative purposes). Permeate flow is drawn through the filter at a
rate determined by the filter model.
Completely-Mixed MBR
∞ ∞ ∞ ∞
Plug-Flow MBR
Both of the MBR models in GPS-X feature two different modes of operation: Simple
Mode, Intermediate, and Advanced Mode. Simple Mode assumes that the filter is
properly operated to maintain flux, and does not consider the effects of trans-membrane
pressure (TMP), cake formation, fouling, backwashing, and membrane resistance. The
Intermediate model mode calculates the TMP, cake formation, fouling, backwashing,
and membrane resistance based on the specified backwash rate and cleaning frequency,
but the required permeate flux is calculated based on the influent flow and waste flow to
ensure that the liquid volume in the last tank remains constant. The Advanced model
mode is similar to the Intermediate model mode, however the liquid volume in the tank is
variable and can increase or decrease based on the calculated permeate flux. The user can
control the liquid level using a feedback controller that manipulates the trans-membrane
pressure. Table 6-3 summarizes the differences between Simple Mode, Intermediate,
and Advanced Mode.
All physical and operational parameters relating to the specification and operation of the
activated sludge reactors are identical to the CSTR and plug-flow tank objects (with one
exception – mechanical aeration is not available). The specification of the membrane
filter physical characteristics is done in the Input Parameters > Physical – Membrane menu, as
shown in Figure 6-12. All parameters except solids capture rate are ignored (and greyed-
out on these menus) when the model is set to Simple Mode.
The GPS-X MBR model calculates the removal of solids due to the membrane using a
mass balance and the solids capture rate (actually a fraction) specified in the
Input Parameters > Physical – Membrane form . The default solids capture rate has been selected
to provide a permeate TSS concentration of 1 mg/L or less for typical MBR MLSS
concentrations (i.e. 8,000 to 12,000 mg/L). A separate mass balance is applied to each
particulate component in the biological model.
In the simple mode, the permeate flow (and flux) is calculated using a volumetric balance
and the specified influent and pumped flows. In advanced mode, the permeate flux
through the membrane is modelled using a resistance-in-series model (Choi et al., 2000)
as shown below:
∆P (6.32)
J=
µ (Rm + Rg + R f )
where:
(
µ = 1.793 × 10−3 e −0.043T
0.864
) (6.33)
where:
T = temperature (oC)
mp (6.34)
δc =
ρ P (1 − ε )Am
where:
The dry mass of the cake layer (see Equation 6.33) is calculated using the following
dynamic mass balance on the cake layer:
dm p qcross xcake
= q perm xliq f capture
− qbackw xcake f bw − f cross
Am xcake + K s , cake
dt (6.35)
where:
The cake layer mass balance considers the bulk convection of solids to the surface of the
membrane, the solids removed due to backwashing, and the solids removed due to cross-
flow aeration. Equation 6.34 ignores the diffusion away from the cake layer into the bulk
liquid as this term is assumed to be small compared to the other terms in the mass
balance. The half-saturation coefficient for cross-flow air and the switching function
based on the mass of cake solids is used to smoothly stop the solids removal as the cake
layer disappears.
The default density of a cake layer particle (see Equation 6.33) is equal to the density of
dry biofilm already used in the GPS-X fixed-film reactors. The default porosity of the
cake layer (see Equation 6.33) is given in the Input Parameters > Physical – Membrane >
More… form and is estimated using information given in Chang et al. (1999). The
membrane surface area (see Equation 6.33) is site-specific and should be selected to
achieve a flux within the range normally recommended by the manufacturer (e.g. a
typical range for hollow fiber membranes is 17 to 25 L/m2/h; see Wallis-Lage et al.,
2005).
The backwash solids removal rate(see Equation 6.34) is specified in the Input Parameters >
Physical – Membrane > More … form . It is multiplied in Equation 6.34 by the backwash flow
and the cake solids mass (term 2 in Equation 6.34) to give the mass of solids removed
from the filter cake per unit time. The default backwash solids removal rate was calibrated
using data from Garcia and Kanj (2002). The default backwash flow (see Equation 6.34) is
entered in the Input Parameters > Operational – Membrane form and is based on data provided
by Garcia and Kanj (2002).
The cross-flow solids removal rate (see Equation 6.34) is the mass of solids removed from
the filter cake, per unit of cross flow air, per unit surface area of the filter. The default
value is entered in the Input Parameters > Operational – Membrane > More … form and is
calibrated based on data in Garcia and Kanj (2002). The cross-flow air flow (see
Equation 6.34) is entered in the Input Parameters > Operational – Membrane form. The
default value gives an airflow per surface area of 0.37 m3/m2/h (see Wallis-Lage et al.,
2005) for the default membrane surface area. The cross-flow airflow should be changed
to reflect changes in the membrane surface area.
The cake layer resistance, Rc, is calculated by combining Equation 6.33 and the Kozeny-
Carman equation for flow through porous passages as follows:
(1 − ε )m p (6.36)
Rc = 180
d p2ε 3 Am ρ p
where:
The default effective cake particle diameter is given in the Input Parameters > Physical –
Membrane > More … form and is estimated using information given in Shin et al. (2002).
The fouling resistance is calculated as follows (adapted from Choi et al., 2000):
(
R f = R f , max 1 − e
−k f t
) (6.37)
where:
The maximum fouling resistance and fouling rate constant can be found in the Input Parameters
> Physical – Membrane > form . They are selected based on data in Merlo et al. (2000). The
model assumes that the fouling material is completely removed during a recovery clean
so that the time for fouling starts after each recovery clean.
The membrane operational parameters can be set in the Input Parameters > Operational –
Membrane form , shown in Figure 6-13.
A helpful warning alarm can be set in the Membrane Backwash …More… menu. The warn if
tank is overflowing or empty alarm will print information to the Command Window if the filter flow
causes the final tank to overflow or become empty.
A membrane flux controller can be activated to maintain the trans-membrane pressure at the
membrane flux setpoint using a built-in controller with the rate of pressure increase being the
controller gain.
The cross-flow air used to clean the membranes is assumed to be delivered using a coarse-bubble
aeration system. The alpha factor for cross-flow air is based on total suspended solids
concentrations of between 8,000 mg/L and 10,000 mg/L in the MBR. The standard oxygen
transfer efficiency (cross-flow) is based on a coarse bubble aeration system at a submergence of
4.3 m (14 ft).
The cleaning frequency sets how often physical/chemical cleaning is used to reset the membrane
fouling resistance to zero.
Display Variables
Several membrane-specific display variables are available to be plotted. The Membrane Filter
Variables menu is accessed from the overflow connection point (not the filter connection point),
and is shown in Figure 6-14.
The MBR Cake Variables menu (shown in Figure 6-15) provides display variables for total cake mass
and cake thickness .
The following points are useful to keep in mind when setting up an MBR simulation:
• Use Simple Mode initially to establish the required operating conditions such as MLSS,
SRT, waste flow, etc. and in cases where details on the maintenance of the permeate flux
are not required. If you are only interested in the biological treatment aspects of the
system, use Simple Mode. If you need to also simulate the physical aspects of the filter
operation (e.g. different backwash cycles, TMP management, etc.), then Advanced Mode is
required.
• When using Advanced Mode, pay close attention to the volume in the reactor(s), as it is
easy to either drain or overfill the reactor that contains the membrane filter.
• If you wish to have a membrane “relaxation” period (rather than a backwash period), set
the duration and frequency as normal, but set the backwash flow rate to zero. This will
cause the permeate flow to cease for the appropriate period of time, but there will be no
backwash flow into the tank. This can be done in both the Intermediate and Advanced
modes.
• There is no steady-state solution for the model in Advanced Mode. The discontinuous
backwashing and cleaning cycles render the model without a true steady equilibrium state
(similar to why the SBR object does not have a steady-state solution). When using
Advanced Mode, you may wish to run a long dynamic simulation (~100 days) to allow time
for the system to reach a cyclic or periodic equilibrium. Due to the fact that there is no
backwashing or cleaning in Simple Mode, the steady-state solver can be used.
• The coarse-bubble cross-flow aeration can provide significant oxygen transfer in small
tanks, so you may find that DO control for biological purposes difficult to maintain.
A summary of the default values of the GPS-XTM MBR model parameters are shown below in
Table 6-4.
COMMON FEATURES
The models associated with the sequencing batch reactor (SBR) object are
combinations of suspended-growth and sedimentation models. The various
aerated and mixed phases use a suspended-growth model, assuming a
completely mixed hydraulic configuration, while the settling and decanting
phases use a reactive sedimentation model. The models are combined together
to form the whole unit process model.
MODES OF OPERATION
There are three different SBR objects in GPS-X: the simple sequencing batch
reactor (SBR) object, the Advanced SBR object, and the Manual SBR object.
All three objects have the same functionality, appearance and choice of
biological models. They differ in the manner in which the user specifies the
operation of the SBR unit.
The simple and advanced SBR objects require the specification of the timing and
flow rates to define the phases. The manual SBR object requires that the entire
operational cycle be defined by the user, either by having the liquid flows, air
flows, and mixing on interactive controllers, or as file inputs. The manual object
is suited to operator training, while the simple and advanced objects are typical
for an SBR application.
When using multiple, parallel SBRs, it may be desirable to stagger the cycle
times of the units. For example, if two parallel SBRs are in use, each with a
6-hour cycle time, it may be desired to shift one of the SBRs by 3 hours. If both
have 3 hours of detention time, then a continuous influent could be switched
between the two unit processes. To specify a timeshift for an SBR model using
either the simple or advanced objects, the user enters the desired timeshift for
the timeshift for simple and advanced cycles parameter. The timeshift parameter
cannot be set to a value greater than the cycle time.
With the normal SBR object, the seven phases making up this cycle are fixed in
sequence (the order is shown in the form). The total length of all seven phases
must not exceed the cycle time specified. If the total length of all seven phases
adds up to less than the cycle time, the tank will be idle until the end of the cycle
time. If it adds up to a value greater than the cycle time, the remaining time
and/or phases beyond the cycle time will be ignored. A phase can be disabled
by setting its length to zero.
The decant flow rate (pumped flow parameter) and waste flow rate (underflow rate
parameter) are entered in the Parameters > Operational - Flow Control form.
The influent flow to the SBR is taken from the upstream object (e.g. influent
object) if the influent #1 pump label parameter is left blank in the Flow Control
form. The user must then make sure that the influent flow is synchronized with
the SBR cycle (i.e. entering the SBR during the appropriate phase).
Alternatively, in the Flow Control form, you can enter a stream label for the
influent #1 pump label parameter, a flow rate for the first influent flow parameter,
and the SBR influent flow will be automatically taken from that stream during
the appropriate phase within the cycle (automatic synchronization). The stream
label must be associated with a pumped flow stream (`qcon' variable), for
example an influent icon or pumped flow from a tank. The influent #2 pump label
parameter is ignored in this cycle type.
The influent flow to the SBR is taken from the upstream object (e.g. influent
object) if the influent #1 pump label and influent #2 pump label parameters are left
blank in the Flow Control form. The user must then make sure that the influent
flow is synchronized with the SBR cycle (i.e. entering the SBR during the
appropriate phase). Alternatively, you can enter stream labels for the influent #1
pump label and influent #2 pump label parameters in the Flow Control form, flow
rates for the influent #1 flow in phase and influent #2 in phase parameters in the
form (Advanced section), and the SBR influent flow will be synchronized
automatically.
The stream labels must be associated with pumped flow streams (`qcon...'
variables), for example an influent icon or pumped flow from a tank. Most
applications will only use one influent, but second influent was provided for
cases were methanol is added, for example.
The decant flow rate (pumped flow parameter) and waste flow rate (underflow rate
parameter) can be entered in the Parameters > Operational - Flow Control form.
The influent flow to the SBR is taken from the upstream object (e.g. influent
object) if the influent #1 pump label parameter is left blank in the Flow Control
form. The user must then make sure that the influent flow is synchronized with
the SBR cycle (i.e. entering the SBR during the appropriate phase).
Alternatively, in the Flow Control form, you can enter a stream label for the
influent #1 pump label parameter, a flow rate for the first influent flow parameter,
and the SBR influent flow will be automatically taken from that stream during
the appropriate phase within the cycle (automatic synchronization). The stream
label must be associated with a pumped flow stream (`qcon' variable), for
example an influent icon or pumped flow from a tank. The influent #2 pump label
parameter is ignored in this cycle type.
Pond/Lagoon
The pond object contains only the empiric model, which simulates the transformation,
dilution and mixing of state variables in a pond. Unlike the activated sludge models, the
empiric model is empirical in nature. It does not use fundamental mechanistic dynamic
processes to determine the rate of change of the states (such as those found in the Model
Matrices in Appendix A), but simulates behavior that has been observed in existing
ponds, bench-scale studies and pilot-scale studies.
The empiric model simulates three different kinds of ponds: anaerobic , facultative, and
aerated . The pond models are discussed in detail below.
ANAEROBIC PONDS
In the anaerobic pond model, the BOD and TSS removal is simulated using a
simple regression model derived from anaerobic pond behavior in North
America (Beier, 1987).
The following equations describe the amount of BOD and TSS removal:
hrt
REMOVALBOD = ( ABOD ⋅ ln (n ) + BBOD )
K hrt + hrt
hrt
REMOVALTSS = ( ATSS ⋅ ln (n ) + BTSS )
hrt
K + hrt
Because the empirical equations above only deal with GPS-X composite
variables (BOD and TSS), a methodology is required to transfer this
information back to the state variables. The following list outlines the
relationships for the state variables in CNLIB.
A fraction is calculated for each particulate state variable (xbh, xba, xs, xi, xu,
xsto for CNLIB) that is equal to that variable's concentration over incoming
xcod .
A new TSS value (x) is calculated from the above empirical REMOVAL
equation.
New VSS (vss ) and particulate COD (xcod ) concentrations are calculated as:
vss= ivt * x
xcod = icv * vss
A new BOD value is calculated from the above empirical REMOVAL equation,
and then compared to the BOD value calculated as the sum of the fractions
from step 1 times the new xcod times fbod.
If the BOD calculated from the fractions is less than the BOD calculated from
the empirical equation, excess soluble BOD (the difference between bod and
xbod ) is assigned to ss .
If the BOD calculated in step 3 from the fractions is greater than the BOD
calculated from the empirical equation, the excess particulate BOD (xbodu ) is
assumed to be converted to xu . Soluble substrate (and soluble BOD) is then
assumed to be zero.
Inert and non-reacting variables are mapped through the pond object (si , salk ,
and snn ).
The effluent oxygen concentration (so ) and nitrate concentration (sno ) are
assumed to be zero in the anaerobic pond environment.
The loss of heterotrophic (xbh ) and autotrophic (xba) biomass results in the
production of ammonia (snh ).
FACULTATIVE PONDS
The approach for facultative ponds is similar to that for anaerobic ponds, but
uses a different model for BOD reduction, and a slightly different approach for
determining state variable concentrations. The empirical BOD removal model
used for facultative ponds is from Thirumurthi (1974):
where
and
CTEMP = θ (TEMP − 20 )
SLR
CO = 1 − 0.083 log
LR
where
TEMP = temperature, C
θ = temperature correction constant
SLR = standard loading rate (kg/ha/d)
LR = current loading rate (kgBOD/ha/d)
The methodology for the determination of the state variables xba, xbh, xs, xu,
xi, xsto, si, salk, snn, ss, snd and xnd are identical to that for anaerobic ponds.
so = SOST ⋅ AERDEPTH
where
AERATED PONDS
The aerated pond uses the same empirical BOD and TSS reduction models as
the facultative pond model. However, the default value for the BOD removal
The methodology for the determination of the state variables xba, xbh, xs, xu,
xi, xsto, si, salk, snn, ss, snd and xnd is identical to that for facultative ponds.
Ammonia is assumed not to change, due to the assumption that most of the
biomass will be settled out of the water column. Therefore, snh is mapped
through the pond object.
CALIBRATION
The parameters found in the Parameters > Physical page of the pond object
include pond type and settings for pond size. Number of cells in series describes
the degree of plug flowness for the pond system. Typically, BOD and TSS
removal increases with increasing numbers of cells in series. The temperature
values found on the More... page are used in the temperature correction
equations in the facultative and aerated pond models.
The parameters found on the Parameters > Empirical Model Constants include those
used to calibrate the BOD and TSS removal, and the half-saturation coefficient
KHRT that is used to decrease removal efficiency for very short HRTs.
Table 6-5 summarizes suggested calibration techniques for the empirical pond
models found in the empiric model.
Oxidation Ditch
The oxidation ditch object operation as 16 CSTRs in series (a plug flow tank)
with a large recycle from the last tank to the first. The recycle can be specified
in 4 different ways, from the operational menu, using the ditch recirculation mode
setting, shown in Figure 6-19.
Set ditch velocity – specify a constant surface velocity of the ditch flow
Set constant ditch flowrate – rather than specifying velocity, set the flow
Set proportional ditch flowrate – make the ditch flow proportional to the incoming
flow to the oxidation ditch. Typically, the ditch flow would be 50 to 200 times
the incoming flow.
Set constant outlet fraction – specify the fraction of the ditch flow that exits the
ditch each time around.
point depends on the setting in the influent fractions menu). The flow moves
clockwise around the ditch.
Five different variables are available for output: dissolved oxygen (DO),
ammonia, nitrate, oxygen uptake rate (OUR), and denitrification rate (DNR).
Figure 6-20 shows an example of the 2-D greyscale DO graph for a typical
oxidation ditch.
Flow Out
Flow In
Please Note: Due to the high recycle rate within the object (and subsequent
short HRTs for each section of the ditch), the oxidation ditch model often will
take longer than normal to converge to steady-state with the steady-state solver.
You may find it necessary to increase the iteration termination criteria and/or the
damping factor on final approach in the steady-state solver menu to achieve a
reasonable solution.
If you are having difficulty with steady-state solutions, you can halt the steady-
state solver at a higher iteration termination value, and run a short dynamic
simulation to test if the steady-state solver solution is adequate. If the dynamic
solution does not diverge appreciably from the steady-state conditions, then the
higher iteration termination value is suitable. If you have any questions or
problems, please contact us for assistance at support@hydromantis.com.
HPO Feed In
Vent Gas Out
The flow of gas and flow of water are modelled separately. The exchange of
O2 gas, N2 gas and CO2 gas at the air/water interface is determined using
Henry’s Law, corrected for temperature and headspace pressure.
The regular biological models have been supplemented in the HPO object with
stoichiometry to calculate CO2 gas generation. As the gas travels downstream,
O2 is transferred into the liquid and consumed by the biological activity. N2
and CO2 are generated, and equilibrated with the gas concentrations in each
headspace. Consequently, the composition of the gas (fraction of the gas that is
O2, N2 and CO2) can be displayed for each reactor in the plug-flow system.
Display variables for the gas composition can be found in the HPO System
Variables display variables menu.
Because the HPO system is capped, and CO2 gas is contained in the headspace
at concentrations often much higher than atmospheric values, HPO systems
may have atypical pH. The GPS-X HPO object contains a pH calculator that
determines the pH in the liquid for each reactor. For details on the pH model,
refer to the pH discussion in the “Tools” chapter (the model in the Toolbox is
the same one used here). It is important to properly specify the anion and
cation concentrations in the tank to achieve a calibrated pH calculation.
The pH that is determined for each reactor can be set to inhibit biological
growth, using the pH inhibition settings in the Physical parameters more… button.
The pH inhibition is set to OFF by default.
inhib = [1 − 0.833(7.2 − pH )]
which is bounded between zero and one. This creates a linear decline between
pH = 7.2 and pH ≈ 6.1.
V
dC L
dt
( )
= QC in − QC L + K L a C ∞* − C L V + rV
where:
The volume, flows, and reaction rates are known from specifications or other
modelling equations leaving two terms that must be calculated in order to solve
the dissolved oxygen mass balance over time for the DO concentration in the
reactor, CL:
*
1) DO saturation concentration at field conditions, C ∞ , and
C∞* = τ × β × Ω × η × C∞* 20
where:
τ = temperature correction factor (unitless)
C st*
τ=
C s*20
where:
Pb − pv
Ω=
Ps − pv
where:
The barometric pressure at elevation and air temperature is calculated using the
following formula taken from Appendix B-2 of Metcalf and Eddy (2003):
gM (z b − z s )
Pb = exp − Ps
RT air
where:
The vapour pressure of water at the liquid temperature is determined using the
Antoine equation (Felder and Rousseau, 1986):
B
log10 pv = A −
T +C
where:
A, B, C = Antoine coefficients
d
Ps + 9.8
δ =
2
Ps
(
C∞* 20 = δ C s*20 )
molfrO2
η=
molfratmO2
Where:
The estimation procedure for the gas composition in the out gas is provided in
later section.
C∞* = τ × β × Ω × δ × η × C s*20
GPS-X provides four different ways to specify the user inputs to estimate the
gas-liquid transfer in the open basin HPO system.
2) Specifying the gas flow rate at standard condition of 1 atm pressure and
20oC temperature
4) Use a DO controller
In each of the above option, the user has the option of specifying SOTE. The
default value for SOTE for high purity oxygen is considered to be 90%
where:
(
OTR = K L aT C∞* − C L V ) 6.12)
(
SOTR = K L a20 C∞* 20 V ) 6.13)
SOTR
Gs =
ρ gas 6.15)
SOTE × molfrO2 × MWO2 ×
MWgas
where:
The airflow at standard condition is converted to field conditions using the ideal gas
law:
Gs , field =
(T field + 273.15)
×
Pfeed
× Gs
(Ts tan dard + 273.15) Pb 6.16)
where:
The SAE is estimated based on the correlation provided by Praxair. The expression is
valid for SOTE in the range of 86% to 100%. If the user specified SOTE is less than
80% then the SAE is bounded at 7.11 kg/kWh.
Where:
SOTR
Pmechanical =
SAE × CF2 × η motor 6.22)
where:
ENTERING AIRFLOW
The gas flow rate is entered at a given at standard conditions of 1 atm and 20oC.
ρ gas
SOTR = Gs × SOTE × molfrO2 × MWO2 ×
MWgas
where:
Estimate OTR
OTR =
SOTR (αF )θ T − 20 C∞* − CL( )
C∞* 20
SOTR
K L a20 =
C∞* 20 × V
OTR
K L aT =
(
C∞* − CL × V)
SOTR
Gs =
ρ gas
SOTE × molfrO2 × MWO2 ×
MWgas
where:
The airflow at standard condition is converted to field conditions using the ideal gas
law:
Gs , field =
(T field + 273.15)
×
Pfeed
× Gs
(Ts tan dard + 273.15) Pb
where:
The SAE is estimated based on the correlation provided by Praxair. The expression is
valid for SOTE in the range of 86% to 100%. If the user specified SOTE is less than
80% then the SAE is bounded at 7.11 kg/kWh.
Where:
SOTR
Pmechanical =
SAE × CF2 × η motor
where:
The SAE is estimated based on the correlation provided by Praxair. The expression is
valid for SOTE in the range of 86% to 100%. If the user specified SOTE is less than
80% then the SAE is bounded at 7.11 kg/kWh.
Where:
where:
Estimate OTR
OTR =
(
SOTR (αF )θ T − 20 C∞* − CL )
C∞* 20
SOTR
K L a20 =
C∞* 20 × V
OTR
K L aT =
(
C − CL × V
*
∞ )
SOTR
Gs =
ρ gas
SOTE × molfrO2 × MWO2 ×
MWgas
where:
The airflow at standard condition is converted to field conditions using the ideal gas
law:
Gs , field =
(T field + 273.15)
×
Pfeed
× Gs
(Ts tan dard + 273.15) Pb
where:
DO CONTROL
K L aT
K L a20 =
(αF )θ (T −20 )
where:
(
OTR = K L aT C∞* − C L V )
(
SOTR = K L a20 C∞* 20 V )
SOTR
Gs =
ρ gas
SOTE × molfrO2 × MWO2 ×
MWgas
where:
The airflow at standard condition is converted to field conditions using the ideal gas
law:
Gs , field =
(T field + 273.15)
×
Pfeed
× Gs
(Ts tan dard + 273.15) Pb
where:
The SAE is estimated based on the correlation provided by Praxair. The expression is
valid for SOTE in the range of 86% to 100%. If the user specified SOTE is less than
80% then the SAE is bounded at 7.11 kg/kWh.
Where:
SOTR
Pmechanical =
SAE × CF2 × η motor
where:
The volume of the virtual headspace is estimated by using the following expression.
Where:
The partial pressure of each gas in the head space is then integrated using the
following derivative equation.
Where:
There are a number of models which may be applied to model the temperature
dependent kinetics for biological reactions. Depending on the structure of the model,
the model may require estimation of model parameters which may be very different
than the traditional temperature coefficient approach used in the wastewater
engineering. Generally, the Arrhenius equation is used to model the temperature
effect on kinetic parameters in the range of 5oC-35oC. This equation requires one
parameter of temperature coefficient. The values of temperature coefficients are well
researched. Therefore, using any other model which deviates from this relationship
will require recalculating of model parameters. To model such a curve the following
three parameter model was used.
1) Estimate the kinetic coefficient at the optimum temperature – The kinetic parameters
values in GPS-X are listed at 20oC. Therefore, this value is translated to a value at the
optimum temperature using the following equations.
Where:
kopt – kinetic coefficient at Topt, unit
k20 – kinetic coefficient at 20oC, unit
Topt – optimum temperature at which the value of kinetic coefficient is maximum, oC
θ1 – Arrhenius coefficient for low temperature, -
θ2 – Arrhenius coefficient for high temperature, -
Where:
kT – kinetic coefficient at T, unit
T – actual temperature, oC
1.2
0.6
0.4
0.2
0
20 25 30 35 40 45
Tempertaure, oC
TEMPERATURE MODELING
The current GPS-X model uses a user defined temperature in the biological unit
processes. In using these models, it is assumed that the user has previous knowledge
about the expected temperature in different biological reactors. In this project, it was
decided to estimate the temperature in the biological units based on the heat balance
in the tank considering heat losses and gains.
A simple heat balance model as proposed by van der Graff (1976) and later validated
by Gillot and Vanrolleghem (2003) was used to model the temperature change in a
biological tank. The model was appropriately modified to account for the heat
generation in denitrification and nitrifications reactions. The details of the model are
described in following sections.
The equations described in Gillot and Vanrolleghem (2003) were developed for a
completely mixed basin under steady state conditions. These equations were
appropriately modified to model the temperature under dynamic conditions. The
completely mixed hypothesis assumes that the water temperature is uniform over the
basin, and equals the outlet temperature. The energy balance over the reactor can be
expressed with following equation.
𝑑𝑇𝑤𝑜
𝑉. 𝜌𝑤 . 𝑐𝑝𝑤 . = 𝑄𝑤 . 𝜌𝑤 . 𝑐𝑝𝑤 . [𝑇𝑤𝑖 − 𝑇𝑤𝑜 ] + ∆𝐻
𝑑𝑡
Where:
V -volume of the reactor, m3
The ΔH term includes the following terms which are also shown in Figure.
The calculation method for each heat transfer term is shown in Table 7. The present
model neglects the heat transfer due to solar radiation and long wave radiation. The
surface convection and evaporation losses are lumped into the convection and
evaporative heat transfer due to aeration.
The list of parameters used in the temperature estimation model is as shown in Table 8.
liquid/air wall
Ala Liquid-air contact wall area m2 Variable
Uls Heat transfer coefficient for W/m2/C 1.0 (default)
liquid/air wall
Ts Soil temperature C Variable
Als Liquid-soil contact wall area m2 Variable
Paer Total aerator power W Variable
Huaer Unit heat production during J/g O2 consumed 13985.0 (default)
aerobic reaction
Hudn Unit heat production during J/g NO3-N consumed 32000.0 (default)
denitrification
Huaut Unit heat production during J/g NH4-N consumed 25000.0 (default)
nitrification
rou Oxygen uptake rate g O2 consumed/s Estimated by model
rdn denitrification rate g NO3-N consumed/s Estimated by model
raut Ammonia oxidation rate g NH3-N oxidized/s Estimated by model
All the heat transfer terms are estimated and the heat balance equation is solved both for
steady state and dynamic conditions. An iterative Newton-Raphson method is used to
solve for temperature at steady state.
SORPTION ISOTHERMS
In the CN, CNP and CN2 libraries, the only components being sorbed from
solution onto the PAC are ss (soluble substrate) and si (soluble inerts). In this
2-component system, the sorption rates are:
MASI ⋅ SI
adsrate SI = ⋅ X PAC ⋅ R ADS
SS
KLSI ⋅ 1 +
KLSS
MASS ⋅ SS
adsrate SS = ⋅ X PAC ⋅ R ADS
SI
KLSS ⋅ 1 +
KLSI
where
The PAC model calculates the amount of “fresh” PAC (PAC that is available to
sorb components), and “used” PAC (PAC that has components sorbed onto it,
and is not available to sorb more), and the fraction of total PAC that is “fresh”
and available to sorb.
Toxic Inhibition
The growth rates for biomass (both heterotrophic and autotrophic) in the
Mantis biological model is appended with a switching function for the presence
of toxic inhibitors. The user must identify which components are the toxic
components, and specify the relative inhibition of each component. The Toxic
Inhibition menu contains the parameters used in the inhibition switching
function. Figure 6-23 shows the Toxic Inhibition menu, with sza (IP state
variable “soluble component ‘a’”) filled in as Toxic Component #1.
The sorption parameters for the toxic components are found in the PAC Addition
menu, in the more… button. These components are added to the ss and si
sorption isotherms described above, to make a 5-component competitive
sorption system. The sorption rates for a 5-component system are all of the
form:
MAvar ⋅ var1
adsratevar = ⋅ X PAC ⋅ RADS
SI SS var 2 var 3
KLvar 1 1 + + + +
KLSI KLSS KLvar 2 KLvar 3
CHAPTER 7
Attached-Growth Models
Introduction
This chapter describes the aerobic attached-growth models available in GPS-X. These
models are associated with the trickling filter, rotating biological contactor (RBC),
submerged biological contactor (SBC) and biological aerated filter (BAF) objects.
The major difference between these models and the suspended-growth models described
in Chapter 5 is the inclusion of the diffusion process in the biofilm. Although diffusion
occurs in suspended-growth systems (substrate and oxygen must diffuse into the activated
sludge floc), it is usually neglected since the rate limiting steps are the biological
reactions. However, in attached-growth processes, the diffusion and biological reactions
must be considered, increasing the complexity of the models.
The trickling filter, RBC, and SBC processes are similar. They provide biofilm biological
treatment, with excess biofilm sloughing separated in a clarifier object. The SBC and
BAF are flooded processes, with mechanical supplemental aeration. The BAF differs
from the other processes in that it:
INTRODUCTION
The trickling filter model is available in all the libraries, using the same
biological reactions found in the suspended-growth models in the appropriate
library. The model can predict the extent of carbon and nitrogen removal (by
uptake or oxidation) and denitrification, and phosphorus uptake and release (in
the CNP library). This model incorporates the growth kinetics and transport
processes for the corresponding state variables. The profiles of the various
To reduce the complexity of the model, some assumptions are necessary. The
limitations of this model concern the hydraulics of the trickling filter and the
biofilm itself. The model assumes that the flow rate and solids loading to the
filter can always be processed; that is, clogging and headlosses through the
filter are not modelled. Also the maximum thickness of the biofilm is not
calculated, rather the user specifies it. This assumption was made because there
are little or no data available for calibration/verification of the maximum film
thickness calculations. It is assumed that there is equal flow distribution over
the entire surface area of the trickling filter and the media inside the trickling
filter. The effect of the rotation speed of the rotary distributor is neglected.
The dimensions of the trickling filter model are larger than the suspended-
growth models since the state variables are now modelled through the film as
well as down through the trickling filter. The suspended-growth models only
considered the state variables along the reactor (1-dimensional). The additional
dimension in the biofilm has some impact on the simulation speed; therefore,
more time is required when using this model. Improvements to the speed of
this model have been made by integrating the state variables with different
frequencies. For example, the particulate components were found to change
more slowly than the soluble components since they are diffusing through the
biofilm. Therefore, the integration of the soluble components was handled
differently from the particulate components (see Figure 7-3).
CONCEPTUAL MODEL
The trickling filter is divided into ‘n’ horizontal sections (default is 6 sections)
each representing a cross-section of the trickling filter at a different depth. The
transfer of the state variables between each of these horizontal sections through
the liquid film is through liquid flow. The biofilm in each of these horizontal
sections is modelled as a number of layers (default is one layer for the liquid
film on top of five layers for the biofilm). The transfer of soluble state variables
between each of these layers is by diffusion only. Particulate variables have a
certain physical volume associated with them and can be displaced into the
neighbouring layer by growth processes. Each layer of the biofilm is modelled
as a CSTR with the same biological reactions as the suspended-growth
biological model (See Appendix A for the mantis model). Attachment and
detachment coefficients are used to provide for a means of transfer of
particulate components between the biofilm surface and the liquid film. This
conceptualization is shown in Figure 7-1. The concentration of each particulate
state variable is converted to volume based on the dry material content of biofilm
and the density of biofilm (both user inputs). When the volume of each layer is
filled (based on maximum biofilm thickness and number of biofilm layers ) the next
layer begins to fill. When the film thickness approaches the specified
maximum, increasing detachment of biofilm will occur.
equivalent
volume
x
liquid
media film
biofilm detail
DO
profile
MATHEMATICAL MODEL
The mathematical equations used within each layer of the biofilm are provided
in the corresponding Model matrix (for example, see Appendix A for the mantis
model). The equation used for the diffusion of the state variables from the bulk
liquid into the biofilm is provided below. The diffusion through the biofilm is
described by Fick's second law and supplemented with biological reactions:
Accumulation in liquid film Liquid flux Diffusion into Air:water exchange (if
Biofilm applicable e.g. for DO)
dS L
Aa δ L ( ) ( )
= QL S Lj −1 − S Lj − K M Aa S Lj − S BLi
j (
+ K ML Aa S − S Lj ) (6.1)
dt
where:
∂S
∂t
= − Ds
d 2S
dy 2
(
+ S Bj −1 − S Bj ) AQδ
B
− RS (6.2)
B
where:
MODEL PARAMETERS
This section of the chapter discusses the various model parameters and inputs
that the user would encounter when using this model. The examples and
discussion below pertain to the mantis model in the CN library.
Physical
These menu items are found under the Parameters sub-menu item Physical and
contain both real physical dimensions to describe the actual trickling filter
being modelled, as well as model dimensions which allow the user to specify
how the physical system will be modelled. There are two items under the
heading Speed, which allow the user to optimize the simulation speed of this
model by changing the frequency of integration for the soluble components. As
seen in Figure 7-2, the real dimensions of the trickling filter require inputs such
as: the filter bed depth , filter bed surface and specific surface of media. Together,
these three parameters will provide an estimation of the total biofilm surface
area in the model. The liquid retention time in filter refers to the retention time of
the liquid flowing past the biofilm, the maximum attached liquid film thickness
refers to the liquid film which is not moving past the biofilm due to friction
(no-slip layer) and the maximum biofilm thickness will be reached only with
infinite sloughing. The density of biofilm and dry material content of biofilm are used
to convert the concentration of each state variable to a volume measurement.
The model dimensions are fixed, that is, the number of layers in the biofilm is six
(one liquid layer and five biofilm layers). Also, the number of horizontal and
vertical sections in the model is fixed at six and one respectively.
The next two items in this form, under the heading Speed , concern the
integration of the soluble state variables. Since these variables are diffusing
through the biofilm, and consequently change rapidly when compared to the
particulate state variables, which are changing only due to their growth rates,
they tend to dominate the numerical solver. To increase the speed of
simulation, the soluble states can be integrated less frequently without loss of
accuracy. When the variables are scheduled to be integrated their derivatives
are calculated from equations (6.1) and (6.2) shown above. Otherwise, the
derivatives are set to zero. There are two variables used to specify how
frequently the soluble states are integrated and the duration for integration or
how long the states are integrated for each period: the soluble integration period
and soluble integration length . These concepts are shown in Figure 7-3 with the
results on ammonia shown in Figure 7-4.
discrete integration
Ammoni a
continuous integration
Mass Transport
The parameters shown in Figure 7-5 are used for the transport model
(diffusion) of the various components through the biofilm. Since there are
insufficient data in the literature concerning the diffusion of various
components through a biofilm, the values used for the diffusion through water
are reduced by a constant fraction, shown as reduction in diffusion in biofilm . The
default diffusion coefficients shown for water are used for the diffusion of
components from the liquid layer to the first layer (outside) of the biofilm. The
detachment rate and attachment rate are used for calculating the sloughing rate
and particulate components attachment to the biofilm, respectively.
Figure 7-6 shows more physical components associated with oxygen. The
oxygen mass transfer coefficient is calculated from the physical conditions
within the filter (thickness of biofilm and diffusion rate of oxygen) and is
DISPLAY VARIABLES
In addition to the standard effluent parameters, there are a number of fixed film
specific variables that can be displayed. Figure 7-7 shows the variables
available for display for the trickling filter. They are explained below:
Biofilm Profiles
This provides all the state variables plus the suspended solids composite
variable for each horizontal section of the trickling filter (i.e. six profiles for six
horizontal sections). The first layer in the profile is the liquid film, followed by
the biofilm layers (i.e. liquid and maximum of five biofilm layers).
2D Variables
This is used for plotting both the filter horizontal sections and biofilm layers
variables using the 3D bar chart or grayscale outputs. Examples are shown in
Figure 7-8. From left to right is the liquid layer and five biofilm layers. In the
3D bar chart, the top of the filter is located in the foreground, and the bottom of
the filter in the background. In the greyscale graph, the six horizontal trickling
filter horizontal sections are shown from top to bottom (i.e. top layer of the
filter is shown at the top of the graph).
INTRODUCTION
The rotating biological contractor (RBC) model is available in all the libraries,
using the same biological reactions found in the suspended-growth models in
the appropriate library. The model can predict the extent of carbon and nitrogen
removal (by uptake or oxidation) and denitrification, as well as phosphorus
uptake and release (in the CNP library). This model incorporates the growth
kinetics and transport processes for the corresponding state variables. The
profiles of the various components through the biofilm are modelled so that
different environments (aerobic, anoxic and anaerobic) can exist within the
biofilm.
To reduce the complexity of the model, some assumptions are necessary. The
limitations of this model concern the hydraulics of the rotating biological
contactor and the biofilm itself. The model assumes that the flow rate and
solids loading to the RBC can always be processed; that is, clogging and
headloss are not modelled. Also the maximum thickness of the biofilm is not
calculated, rather it is specified by the user. This assumption was primarily
made because there are little or no data available for calibration/verification of
the maximum film thickness calculations. The effect of the rotation speed and
direction of the RBC and its impact on media sloughing and aeration
requirements is neglected.
Similar to the trickling filter model, the RBC is more complex than the
suspended-growth models since the state variables are modelled through the
biofilm as well as through various RBC stages.
CONCEPTUAL MODEL
The rotating biological contactor is divided into ‘n’ stages (default is 1 stage)
each representing a baffled RBC system. The transfer of the state variables
between each of these stages is through the liquid flow. The biofilm in each
stage is modelled as a number of layers (default is one layer as the liquid film
on top of five layers as the biofilm). The transfer of soluble state variables
between each of these layers is by diffusion only. Particulate variables have a
certain physical volume associated with them and can be displaced into the
neighbouring layer by growth processes. Each layer of the biofilm is modelled
as a CSTR with the same biological reactions as the suspended-growth
biological model (See Appendix A for the mantis model). Attachment and
detachment coefficients are used to provide for a means of transfer of
particulate components between the biofilm surface and the liquid film. This
conceptualization is shown in Figure 7-9. The concentration of each particulate
state variable is converted to volume based on the dry material content of
biofilm and its density, both input by the user. When the volume of each
biofilm layer is filled (based on maximum biofilm thickness and number of
biofilm layers) the next layer begins to fill. When the biofilm thickness starts to
approach the specified maximum, increasing detachment of biofilm will occur.
MATHEMATICAL MODEL
The mathematical equations used within each layer of the biofilm are provided
in the corresponding Model matrix (For example, see Appendix A for the
mantis model). The equation used for the diffusion of the state variables from
the bulk liquid into the biofilm is provided in the trickling filter section.
MODEL PARAMETERS
This section of the chapter discusses the various model parameters and inputs
that the user will encounter using this model. The example and discussion
below pertains to the mantis model in the CN library.
Physical
These menu items are found under the Parameters sub-menu item Physical and
contain both real physical dimensions to describe the actual rotating biological
contactor modelled, as well as model dimensions which allow the user to
specify how the physical system will be modelled. There are two items under
the heading Speed, which allow the user to optimize the simulation speed of
this model by changing the frequency of integration for the soluble
components. As seen in Figure 7-10, the real dimensions of the rotating
biological contactor require inputs such as the rbc liquid volume, the rbc media
volume and the specific surface area of media. Together, these three parameters
provide an estimation of the total biofilm surface area in the model. The
submerged fraction of the biofilm refers to the percent of the RBC submerged at
any given time, the maximum attached liquid film thickness refers to the liquid film
which is considered to be associated with the biofilm due to friction (no-slip
layer), and the maximum biofilm thickness will be reached only with infinite
sloughing. The density of biofilm and dry material content of biofilm are used to
convert the concentration of each state variable to a volume measurement. The
model dimensions include the number of RBC tanks in series or stages. The
model assumes each tank or stage is of equal size. If the stages are of unequal
size (different media density and/or parallel feeding), the user should tie
individual RBC objects together to simulate the process.
The next two items in this form, under the heading Speed , concern the
integration of the soluble components. Since these components are diffusing
through the biofilm, and consequently change rapidly when compared to the
particulate components, which are changing only due to their growth rates, they
tend to dominate the numerical solver. To increase the speed of simulation, it
was found that these components can be integrated less frequently without loss
of accuracy. When the soluble variables are scheduled to be integrated, their
derivatives are calculated from equations (6.1) and (6.2). Otherwise, the
derivatives are set to zero. There are two variables which are used to specify
how frequently the states are integrated: the soluble integration period , and the
duration for integration or how long the states are integrated for each period
(soluble integration length ). These concepts are shown in Figure 7-3, with the
results for ammonia shown in Figure 7-4.
Mass Transport
The parameters shown in Figure 7-5 are used by the RBC for the transport
model (diffusion) of the various components through the biofilm. Since there
are insufficient data in the literature concerning the diffusion of various
components through a biofilm, the values used for the diffusion through water
are reduced by a constant fraction, shown as reduction in diffusion in biofilm.
The default diffusion coefficients shown for water are used for the diffusion of
components from the liquid layer to the first layer (outside) of the biofilm. The
rate of detachment and attachment is used for calculating the sloughing rate
and particulate components attachment to the biofilm.
DISPLAY VARIABLES
In addition to the standard effluent parameters, there are a number of fixed film
specific variables that can be displayed. These are accessed through the object's
Display Variables menu item.
• RBC variables (See Trickling Filter Variables in the Trickling Filter Model
section)
• Liquid concentrations(See Liquid Film Concentrations in the Trickling
Filter Model section)
• 2D variables (See 2D Variables in the Trickling Filter Model section).
INTRODUCTION
The submerged biological contactor (SBC) model is a modification of the RBC
model for units that are air driven or are provided with supplemental aeration.
Units with supplemental aeration tend to be more submerged than conventional
RBCs (conventional RBCs are generally 40 percent submerged) providing
additional contact of the media with the influent, since the unit is not dependent
on ambient air for oxygen.
The SBC model discussed herein is available in all the libraries, using the same
biological reactions found in the suspended-growth models in the appropriate
library. The model can predict the extent of carbon and nitrogen removal (by
uptake or oxidation) and denitrification, as well as phosphorus uptake and
release (in the carbon-nitrogen-phosphorus library). This model incorporates
the growth kinetics and transport processes for the corresponding state
variables. The profiles of the various components through the biofilm are
modelled so that different environments (aerobic, anoxic and anaerobic) can
exist within the biofilm.
To reduce the complexity of the model, some assumptions are necessary. The
limitations of this model concern the hydraulics of the submerged biological
contactor and the biofilm itself. The model assumes that the flow rate and
solids loading to the SBC can always be processed; that is, clogging and
headloss is not modelled. The maximum thickness of the biofilm is not
calculated, rather it is specified by the user. This assumption was made because
Similar to the trickling filter model and the RBC, the SBC is more complex
than the suspended-growth models since the state variables are now modelled
through the film and through various SBC stages (or shafts).
CONCEPTUAL MODEL
The submerged biological contactor is divided into a number of stages (default
is 2 stages) each representing a baffled SBC shaft. The transfer of the state
variables between each of these stages is through the liquid flow. The biofilm
in each stage is modelled as a number of layers (default is one layer as the
liquid film on top of five layers as the biofilm). The transfer of soluble state
variables between each of these layers is by diffusion. Particulate variables
have a certain physical volume associated with them and can be displaced into
the neighbouring layer by growth processes. Each layer of the biofilm is
modelled as a CSTR with the same biological reactions as the suspended-
growth biological model (See Appendix A for the mantis model). Attachment
and detachment coefficients are used to provide for a means of transfer of
particulate components between the biofilm surface and the liquid film. For the
SBC the process is the same as the RBC (conceptually shown in Figure 7-9).
The concentration of each particulate state variable is converted to volume
based on the dry material content of biofilm and its density input by the user.
When the volume of each layer is filled (based on maximum biofilm thickness
and number of biofilm layers) the next layer begins to fill. When the film
thickness starts to approach the specified maximum, increasing detachment of
biofilm will occur.
MATHEMATICAL MODEL
The mathematical equations used within each layer of the biofilm are provided
in the corresponding Model matrix (for example, see Appendix A for the mantis
model). The equation used for the diffusion of the state variables from the bulk
liquid into the biofilm is provided in the trickling filter section.
MODEL PARAMETERS
This section of the chapter discusses the model parameters and inputs that the
user will encounter using this model, in particular those different from the other
fixed film models. The example and discussion below pertains to the mantis
model in the Carbon - Nitrogen (CN) library.
Physical
These menu items are found under Parameters > Physical , and contain both real
physical dimensions to describe the actual submerged biological contactor
being modelled, and model dimensions which allow the user to specify how the
physical system will be modelled. there are two items under the heading Speed ,
which allow the user to optimize the simulation speed of this model by
changing the frequency of integration for the soluble components.
1) tanks in series ;
Based on the volume set up method (input 2), the user either specifies the
individual volumes per tank (inputs 3 and 4), or the volume fractions based on
the total volumes (inputs 5, 6 and 7). The latter two items are used to convert
the concentration of each state variable to a volume measurement. Model
dimensions include the number of SBC tanks in series or stages.
1) maximum attached liquid film thickness , which refers to the liquid film which
is considered to be associated with the biofilm due to friction (no-slip
layer);
The next two items in this form under the heading Speed , concern the
integration of the soluble components. Since these components are diffusing
through the biofilm, and consequently change rapidly when compared to the
particulate components, which are changing only due to their growth rates, they
dominate the numerical solver. To increase the speed of simulation, it was
found that these components could be integrated less frequently without loss of
accuracy. When the soluble variables are scheduled to be integrated their
derivatives are calculated as normal. Otherwise, the derivatives are set to zero.
There are two variables which are used to specify how frequently the states are
integrated (Soluble integration period ) and the duration for integration or how
long the states are integrated for each period (Soluble integration length ). These
concepts are shown in Figure 7-3, with the results for ammonia shown in
Figure 7-4.
The oxygen mass transfer coefficient is calculated from the physical conditions
within the filter (thickness of biofilm and diffusion rate of oxygen) and is
affected by temperature and the saturated dissolved oxygen concentration.
These values are input in the general data entry area or specifically set for each
object as shown in this screen.
Operational
The operational parameters are similar to the activated sludge model
(See Chapter 5). Like the activated sludge model, the aeration method can be
chosen as either “Enter KLa” or “Enter Airflow”. No mechanical method is
provided since this method is not appropriate for the SBC. For details on the
modelling of the oxygen transfer see Chapter 5.
Mass Transport
The parameters shown in Figure 7-5 are used by the SBC for the transport
model (diffusion) of the various components through the biofilm. Since there
are insufficient data in the literature concerning the diffusion of various
components through a biofilm, the values used for the diffusion through water
are reduced by a constant fraction, shown as reduction in diffusion in biofilm.
The default diffusion coefficients shown for water are used for the diffusion of
components from the liquid layer to the first layer (outside) of the biofilm. The
rate of detachment and attachment is used for calculating the sloughing rate
and particulate components attachment to the biofilm.
DISPLAY VARIABLES
In addition to the standard effluent parameters, there are a number of fixed film
specific variables that can be displayed. They are the same as the trickling
filter. These are accessed through the following subheadings:
CONCEPTUAL MODEL
The model consists of four major components: hydraulics and filter operation,
filtration, biological reactions, and a biofilm. They are described in the
following.
In the simplest implementation (number of units is 1); the model simulates the
behavior of a single BAF unit. This unit can be in filtration, standby,
backwash, or flush mode. In filtration, standby and flush mode, the filter is
represented hydraulically as a tank consisting of a certain number of horizontal
sections (6 in the default case). The actual filtration bed is preceded by a mixed
tank without filter material to describe the dilution effects of the volume of
water under the filter bed. A similar mixed tank is added to account for the
liquid on top of the filter media. In backwash mode the horizontal sections of
the filter are combined and converted to one mixed tank. The model assumes
that during backwash the filter media is ideally mixed.
The influent loading to the filter determines if the filter is in filtration, standby,
backwash, or flush mode. In filtration and flushed modes, flow is entering the
filter through the input stream and coming out through the output stream. In
standby mode, there is no flow through the filter. In backwash mode, flow is
entering the filter through the backwash input stream and coming out through
the backwash output stream.
For this purpose the hydraulics of the filter (which now can be thought of as a
series of units) is described in three different ways. A certain fraction of the
total number of units is in filtration mode, i.e. layered with influent flowing
through them. Another fraction is in standby mode, with light aeration and no
influent loading. A third fraction is in backwash mode. The sum of the three
fractions adds up to the total number of units. At times any one of these
fractions may be completely missing, i.e. the number of units in backwash or
standby mode can be zero. In GPS-X, the individual fractions are specified in
two ways:
As constants. This allows a simple run when the number of units in standby
mode does not change. When a particular backwash criterion is reached, a
certain number (user specified) of units in filtration mode are backwashed. This
mode can be used if an actual operation of a filter plant is recorded and has to
be replayed in GPS-X. The number of units can be read in through the GPS-X
file input facility and the original loading conditions recreated.
Filtration Component
The modified Iwasaki equation (Horner et al., 1986) was used to calculate the
filtration rate, while headloss is calculated according to the Kozeny equation.
In the filtration mode, the number of horizontal sections is determined by the
plug flow characteristics of the BAF bed (6 by default). This component of the
model is used in predicting solids capture, effluent suspended solids and other
constituents and backwash quality. In backwash mode, the backwashed fraction
of the bed is treated as an ideally mixed tank; biofilm layers are retained.
The filtration element of the model is available without the biological reactions
in the current sand-filter model in GPS-X described in Chapter 9 (simple1d
model).
Biofilm Component
The existing biofilm model in GPS-X is based on Spengel and Dzombak
(1992). This model was adapted to the BAF configuration. The model handles
soluble material diffusion, biofilm growth, and particulate attachment and
detachment. Details are described in the Trickling Filter Model section of this
chapter.
MATHEMATICAL MODEL
The mathematical equations used within each layer of the biofilm are provided
in the corresponding Model matrix (see Appendix A for the mantis model). The
equations used for the diffusion of the state variables from the bulk liquid into
the biofilm are provided in the Trickling Filter Section of this chapter. The
equations used for the filtration component are provided in Chapter 9 (simple1d
model).
MODEL PARAMETERS
This section discusses the various model parameters and inputs that the user
will encounter when using this model.
Physical
The physical parameters are found under the Parameters sub-menu item
Physical . It contains physical dimensions to describe the actual BAF being
modelled, and model dimensions, which allow the user to specify how the
physical system will be modelled. There are three items under the heading
Speed, which allow the user to optimize the simulation speed of this model.
As seen in Figure 7-14, the unit dimensions of the BAF require inputs such as
the single filter bed surface area, the total filter bed depth from support , the media fill
(empty bed depth) (the difference between the last 2 inputs giving the water
height above the media), and the water height below support . The number of units
makes the simplified multiple units operation possible.
The next section of this form, media, includes inputs to characterize the media
being used in the filter: specific surface of media together with the filter bed depth
and surface area provides an estimation of the total biofilm surface area in the
model; equivalent particle diameter , where multi-media filters can be described;
clean bed porosity (void space); and ultimate bulk biofilm volume, the maximum
space the biofilm can take up before completely clogging the filter.
The next two items under the Biofilm heading, density of biofilm and dry material
content of biofilm , are used to convert the concentration of each state variable to
a volume measurement. The Model Dimensions section includes the number of
sections in filter , the model assumes each horizontal section is of equal size.
Figure 7-14 shows physical components associated with oxygen solubility and
model speed. The oxygen mass transfer coefficient is calculated from the
physical conditions within the filter (thickness of biofilm and diffusion rate of
oxygen) and is affected by the liquid and air temperatures, and the oxygen
fraction in air (See Chapter 5). These values are input in the general data entry
area or specifically set for each object as shown in this screen. The first two
items under the heading Speed concern the integration of the soluble
components, which is described in the Trickling Filter Model section of this
chapter. The third item, calculate DO in liquid , is used to improve the speed of
simulation if the BAF installation maintains a relatively high level of DO in the
liquid (close to saturation). By setting this parameter to OFF, a constant DO
level is maintained in the liquid and integration of the DO state variable is
bypassed, thereby speeding up the simulation. The constant DO level can be
adjusted in the initial conditions form (Process Data > Initialization > initial
concentrations ).
Operational
In the first part of the Operational menu item, aeration constants are available
similar to all aerated biological units. Specific to the BAF is the ability to
specify a different KLa (or air flow, if the aeration method is set to diffused)
The entry under the Cycles heading, backwash operation , is used to set up the
method by which a backwash operation will be initiated when operating the
filter(s). The backwash operation can be time-based , headloss-based , effluent quality
based , or manual. The filter can be operated in single unit mode (the whole
volume will be in filter, backwash, standby or flushed mode), or multiple unit
operation. In multiple unit operation (if the number of units is greater than one),
the number of units in filter mode can be specified, and the remaining units are in
standby mode. The number of simultaneously backwashed units will be taken out of
the filtration mode and replaced with standby units when a backwash operation
is initiated if the constant filter loading rate controller is on. The target loading rate
on the filter fraction can be specified and thus the volume of filter in filtration
mode will vary to maintain the target loading rate.
reach a threshold level (e.g. 10 g/m3). This last mode may be useful for
optimizing plant performance in the mathematical model. In manual mode, the
operation of the BAF has to be done through a Control window (or file input),
which needs to be set up with all the operational variables.
DISPLAY VARIABLES
Hydraulics
Here, hydraulic information can be accessed and displayed for each of the
horizontal filter sections (6 by default). It includes dilution rate and headloss-
related variables: Reynolds number, friction factor, and headloss in each
horizontal filter section for both clean and dirty filter beds.
2D BAF
The solids capture rate during filtration can be displayed for each of the
horizontal filter sections. The other variables (O2 partial pressure, pore size,
biofilm thickness, deposit concentration, bulk deposit volume) can be displayed
on 3D graphs. The x-axis has the 6 horizontal filter sections, the y-axis has the
5 biofilm layers and liquid phase, and the z-axis displays the variable value.
Filter Segment
The state variables and the solids composite variable can be displayed on 3D
graphs. The x-axis has the 6 horizontal filter sections, the y-axis has the 5
biofilm layers and liquid phase, and the z-axis displays the variable value.
Hybrid-System
The Hybrid-System model in GPS-X is based on a combination of the standard plug flow
tank configuration with suspended growth biomass, and the GPS-X biofilm model
representing fixed film growth on the media inserted into the tank. Any type of media
will be represented in the model as long as the specific surface area is set correctly. Thus
the model is able to represent commercial systems such as MBBR, Ringlace, Captor,
Bionet and other types of hybrid systems, whether they contain sludge recycle or not.
Biological Component
The hybrid-system uses the same biological reactions found in the suspended-
growth models. For more specific information on biological models, please
consult Chapter 5.
Biofilm Component
The existing biofilm model in GPS-X is based on Spengel and Dzombak
(1992). This model was adapted to the hybrid-system. The model handles
MODEL PARAMETERS
This section of the chapter discusses the various model parameters and inputs
that the user will encounter when using this model.
Physical
The physical parameters are found under the Parameters sub-menu item
Physical . It contains physical dimensions to describe the hybrid-system, and
model dimensions which allow the user to specify how the physical system will
be modelled.
The hybrid-system requires inputs such as the specific surface of media, the water
displaced by media, and the specific density of media.
Operational
In the Operational form, aeration constants are available similar to all aerated
biological units. Specific to the hybrid-system is the ability to specify two
additional recycle streams. These streams are internal recycle with carrier (if
internal recycle carries carrier with it) and flow from tank # with carrier (if the
carrier can flow from one cell to the next one).
Further model parameters are included in the mass transport , stoichiometric and
kinetic menu items in the hybrid-system model. As these forms are described in
the Trickling Filter Model section of this chapter they are not discussed again
here.
INITIALIZATION
In addition to the standard initial volume input, the hybrid-system requires the
reactor portion filled by media (media or empty bed fill), which can be input in the
Initial Volume sub-menu form.
DISPLAY VARIABLES
In addition to the standard effluent parameters, there are a number of fixed film
specific variables that can be displayed. These are accessed through the object's
display variables menu item.
Denitrification filter
The denitrification filter objects are found in the “Tertiary Treatment” group of objects,
rather than in the “Attached Growth” group, as the other biofilm objects.
The denitrification filter model is similar to the trickling filter model in hydraulic
structure. There are, however, a few fundamental differences:
2) The trickling filter model is assumed to be downflow, whereas there are two
different denitrification filter models: upflow and downflow, as shown in Figure
7-17.
Biological Component
The denitrification filter model uses the same biological reactions found in the
suspended-growth models. For more specific information on biological models,
please consult Chapter 5.
Biofilm Component
The existing biofilm model in GPS-X is based on Spengel and Dzombak
(1992). This model was adapted for use in the attached-growth objects such as
the trickling filter and denitrification filters. The model handles soluble
material diffusion, biofilm growth, and particulate attachment and detachment.
Details are described in the Trickling Filter Model section of this chapter.
Filtration Component
The filtration of solids is modeled as a simple capture of the particulate state variables
from the effluent layer of the denitrification filter (bottom layer in the downflow filter and top
layer in the upflow filter). Users specify a capture fraction, and all solids captured are removed
through the backwash connection stream. Backwashing (and its associated removal of solids) is
modeled as a continuous process flow.
MODEL PARAMETERS
This section of the chapter discusses the various model parameters and inputs
that the user will encounter when using this model.
Physical
The physical parameters are found under the Parameters sub-menu item
Physical . It contains physical dimensions to describe the denitrification filter,
and model dimensions which allow the user to specify how the physical system
will be modelled.
The denitrification filter requires inputs such as the specific surface of media and
the porosity of media.
Operational
The operational menu contains three parameters that define the removal of
solids via backwash. The solids capture fraction defines the fraction of
particulate state variables (on a concentration basis) that is removed from the
effluent stream. The parameters backwash duration during 24-hr period and
backwash flow are used to determine the total amount of flow leaving through
the backwash connection point per day. The backwash concentration is
calculated as the total amount of captured solids divided by the daily backwash
flow rate.
Other Menus
Further model parameters are included in the mass transport , stoichiometric and
kinetic menu items in the denitrification filter model. As these forms are
described in the Trickling Filter Model section of this chapter.
INITIALIZATION
The initialization menu of the denitrification filter object is the same as for the
trickling filter object, and contains the initial concentrations of the state
variables in each layer of the filter.
DISPLAY VARIABLES
In addition to the standard effluent parameters, there are a number of fixed film
specific variables that can be displayed. These are accessed through the object's
display variables menu item.
CHAPTER 8
This chapter provides a description of the sedimentation and flotation models available in
GPS-X.
Sedimentation Models
Sedimentation is one of the most important unit processes in activated sludge treatment
plants. The sedimentation unit, whether it is a primary settler, secondary clarifier, or
sludge thickener, provides two functions: clarification and thickening. The primary
settlers and sludge thickeners are designed and operated to take advantage of the
thickening process, while the secondary clarifiers are designed and operated to take
advantage of the clarification process.
In GPS-X, the sedimentation models are either zero- (point) or one-dimensional (1d
suffix), and either reactive (mantis, asm1...) or nonreactive (simple). The following models
are available:
In reactive models, biological reactions are included, and the model names are associated
with the corresponding suspended-growth models described in Chapter 5. For example,
the mantis sedimentation model uses the mantis suspended-growth model.
ONE-DIMENSIONAL MODELS
In the one-dimensional models, the settler is divided into a number of layers
(10 by default) of equal thickness, as depicted in Figure 8-1.
(Qi+Qr)Xi Qi X1=QiXeffluent
top layer 1
2
3
4
5
feed layer 6
7
8
9
bottom layer 10
The models are based on the solids flux concept: a mass balance is performed
around each layer, providing for the simulation of the solids profile throughout
the settling column under both steady-state and dynamic conditions.
Table 8-1 shows the appropriate contribution of each layer of the settler to the
mass balance. There are five different groups of layers, depending on their
position relative to the feed point. This is shown schematically in Figure 8-2.
Jup,2 =
Qi X2 + -
Ac - +
layers 2
above the
feed layer -
+
- +
feed 4
layer
- -
+ +
layers 5
below the
feed layer - -
+ +
bottom 10
layer
- Q rX
− rhin • X j − rfloc • X j
vsj = vmax e − vmax e (8.1)
where:
The settling function is shown in Figure 8-3. The four regions depicted in this
figure are explained as follows: I) the settling velocity equals zero, as the solids
attain the minimum attainable concentration; II) the settling velocity is
dominated by the flocculating nature of the particles; thus the settling velocity
is sensitive to the rfloc parameter; III) settling velocity has become independent
of solids concentration (particles have reached their maximum size; and IV)
settling velocity is affected by hindering and becomes dependent on the rhin
parameter (the model reduces to the Vesilind equation).
vma x
vbnd
I II III IV
Xmin
Concentration (X)
Figure 8-3 Settling Velocity vs. Concentration
Simple Models
In the simple1d sedimentation model, the only numerically integrated variable is
the suspended solids concentration. This model can be used when biological
reactions in the settler can be ignored. The concentrations of particulate state
variables in the influent to the settler (heterotrophic organisms, etc.) are stored
as fractions of the total suspended solids concentration entering the settler.
Once the model completes the numerical integration of the suspended solids in
the settler layers (at the end of each numerical integration time step), the
concentrations of particulate state variables in the effluent, underflow (RAS),
and pumped flow (WAS) are restored using those fractions. The concentrations
of soluble state variables are not changed in the simple1d model.
COMMON FEATURES
Common features of the sedimentation models are discussed in this section.
The SVI test characterizes the sedimentation, which occurs in the high solids
concentration band of a clarifier. To specify the sedimentation characteristics
over the full concentration spectrum, another parameter, the Clarification factor,
is needed to specify the settling behavior in the flocculant or low solids
concentration regions. This factor is a relative clarification index; a high
number (1.0) indicates good clarification and a low number (0.1) indicates poor
clarification. The correlation equations are:
(
v max = fcorr1 + ( fcorr 2 ⋅ SVI ) + fcorr 3 ⋅ SVI 2 ) (8.3)
(
rhin = fcorr 4 + ( fcorr 5 ⋅ SVI ) + fcorr 6 ⋅ SVI 2 ) (8.4)
rfloc = fcorr 7 + ( fcorr 8 ⋅ clarif ) + ( fcorr 9 ⋅ clarif ) 2
(8.5)
where:
To use the correlation, the user must set the parameter use SVI to estimate settling
parameters to ON. The Sludge Volume Index and Clarification parameters can then
be specified and the settling parameters are calculated automatically by GPS-X.
The correlation coefficients can be accessed in the Options > General Data >
System > Parameters > Miscellaneous form.
Please note: The default values of the correlation factors are for SVI. A
correlation with SSVI has not been performed. The default values of the
correlation coefficients are based on five sewage treatment plants.
When the upflow velocity is between the quiescent zone maximum upflow velocity
and complete mix maximum upflow velocity, a smooth transition of feed distribution
between the low loading case and the high loading case is generated. An
average (medium) loading condition is initially calculated where the upflow
velocity (vuavg) is the average of the quiescent zone maximum upflow velocity
(vumin) and the complete mix maximum upflow velocity (vumax). At this hydraulic
loading, the input distribution is equal to the feed layer and all layers below.
A similar algorithm will ensure smooth flow distribution above vuavg. The
algorithm first calculates the feed fraction to the bottom layer. If vu is higher
than vuavg, then the algorithm distributes the rest evenly.
feed point in the settler. The flow distribution aspect of the model captures this
phenomenon.
feed layer
feed layer
bottom layer
Very high flow: load into bottom layer
Figure 8-4 Load Distributed into Settler
Types of Settlers/Clarifiers
There are four types of settler objects in GPS-X:
• rectangular primary
• circular primary
• rectangular secondary
• circular secondary
All of the settler objects contain the same settling model (described above). The
difference between primary and secondary clarifiers are the default settling parameters
and the SVI correlation (SVI correlation is not used in the primary settlers).
The difference between the circular and rectangular configurations is restricted to the
specification of the area and/or geometry of the tanks. The rectangular tanks require only
a total surface area for input, whereas the circular tanks have several shapes available.
Flat-bottom
Flotation Model
This section of the chapter describes the flotation model (simple1d) associated with the
DAF unit.
ONE-DIMENSIONAL MODEL
The one-dimensional flotation model will predict the amount of solids removal
achieved by the DAF unit. Solids are removed from the top of the unit in the
float stream. Effluent is removed from the bottom of the DAF unit in the
effluent stream. The one-dimensional flotation model is primarily based on the
solids flux theory presented previously in this chapter, but it is modified to
account for flotation as opposed to sedimentation. The major difference
between the flotation and sedimentation models is the direction of solids flux
and the parameters controlling it.
In the one-dimensional flotation model, the DAF unit is divided into a number
of layers (10 by default) of equal thickness, depicted in Figure 8-6.
1 top layer
2
3
4
Qin Xin 5
6 feed layer
7
8
9
10 bottom layer
The model is based on the solids flux concept: a mass balance is performed
around each layer, providing for the simulation of the solids profile throughout
the DAF unit under both steady-state and dynamic conditions.
The solids flux due to the bulk movement of the liquid is calculated by
multiplying the solids concentration by the liquid bulk velocity (flow divided
by area), which may be up or down depending on the position relative to the
feed layer.
The solids flux due to flotation is specified by the same double exponential
function used for sedimentation (Equation 8.1). The parameters within
Equation 8.1 are altered to account for effects of flotation:
MODEL PARAMETERS
This section of the chapter contains a description of the various model
parameters and inputs that the user encounters when using the flotation model.
Physical
These menu items are found under the Parameters sub-menu item Physical . This
input form contains the actual physical dimensions of the DAF unit being
modelled, including the tank surface area, the maximum water level or height of
the tank, and the location of the feed point relative to the bottom of the tank.
The fourth item on the form allows the user to define the number of equivalent
layers contained within the model. The physical parameter form is shown in
Figure 8-7.
Operational
The operational parameters for the DAF unit are located within the Parameters
sub-menu item Operational . This input form contains the polymer dosage (g
polymer/kg solids) and the air-to-solids ratio (g air/g solids) for daily operation
of the DAF unit. The maximum float flow is an upper boundary limit for the
amount of float that can be removed from the DAF unit. The operational input
form is shown in Figure 8-8.
Under the sub-heading other parameters , the optimal polymer dosage and optimal
air-to-solids ratio are defined. These two values provide an estimate of the best
expected solids condition. The optimal values may be expressed based on past
operating experience with the actual DAF unit or may be provided through
manufacturer literature. The dry material content of the float at the optimal
polymer dosage is defined as a percentage. The dry material content of the float
without polymer dosage is also defined. The model will use the range between
these two values to predict the dry material content of the float under actual
operating conditions.
Flotation
The Flotation parameters, shown in Figure 8-9, are used to define the variables
contained within the model (Equation 8.1). The maximum floating velocity
provides an upper boundary limit for the model. The next variable is the
expected floating velocity under the optimal air-to-solids ratio, as defined
under the operational input form. The hindered zone and free floating zone floating
parameters control the floating velocity defined in Equation 8.1. There will
likely be a fraction of solids, which can not be removed by flotation. This
fraction is characterized as the non-floatable fraction and an upper boundary for
this parameter as a concentration is set as the maximum non-floatable solids .
CHAPTER 9
Introduction
This chapter describes the deep bed granular filtration models available in GPS-X. The
continuous and massbalance models are based on empirical removal efficiencies. The
simple1d model is a mechanistic model based on continuity and kinetic equations that
describe the removal of suspended particles by deep bed granular filters.
Continuous Model
The basis for the continuous model is the direct specification of the filter performance
through two parameters: the backwash flow fraction and the backwash solids mass fraction
(Figure 9-1). The backwashout connection (bottom left of object) is not used in this model.
The backwash flow fraction (frqbw) is the fraction of the incoming flow to the filter (input
connection - top left of object) that is used for backwash. Using this parameter, GPS-X
will calculate a continuous backwash flow (Qb) associated with the backwashout stream
(top right of the object):
Qb = Qi × frqbw
The continuous output flow (bottom right of the object), is then calculated from the
difference between the input flow and the backwash flow:
Qo = Qi − Qb
The backwash solids mass fraction (frxbw) is the fraction of incoming solids that is captured
by the filter, ending up in the backwash stream. Using this parameter, GPS-X calculates
the solids concentration in the backwashout stream (Xb):
Qi × X i × fwxbw
Xb =
Qb
Qi × X i × (1 − frxbw)
X0 =
Qo
where:
The massbalance model accounts for the mass accumulated in the filter during the filter
cycle time. The accumulated mass is removed during backwash. Therefore,
stoichiometric parameters for the filter effluent and the backwash may be specified. The
operational parameters for the massbalance model are shown in Figure 9-2.
One-Dimensional Model
The basis for the simple1d model is the combination of the continuity (mass balance) and
the kinetic partial differential equations by Horner et al. (1986), which describe the
removal of suspended particles by a granular filter:
dσ λ ⋅ C ⋅ u
=
dt 1 − ε d − C
where:
λ = filtration coefficient
t = time
When combined with defining equations for the deposited (attached) solids (X = σ⋅d) and
the unattached solids (X=C⋅δd) in the filter, the following equation is derived for the
simple1d model:
dX d λ ⋅ (1 − ε d ) ⋅ X ⋅ u
=
dt X
1− εd −
δd
where:
X = unattached solids
δd = density
The filter bed is divided into layers and it is assumed that the specific deposit is uniform
across each layer. During the backwash cycle, the average deposit through all layers of
the filter is used. The average deposit after backwash is used as the initial condition for
the subsequent filter run.
MODEL PARAMETERS
This section discusses the various model parameters and inputs that the user
encounters when using the simple1d model.
Physical
These menu items are found under the Parameters sub-menu item Physical and
contain both real physical dimensions to describe the actual filter modelled,
and model dimensions which allow the user to specify the number of layers and
an effective particle diameter. The real dimensions of the filter are the bed
surface area and the bed depth.
Operational
Operational items, found under the Parameters sub-menu, include the basis for
the duration of the filtration run. The duration of the filtration run may be based
on a user-specified time, headloss or effluent suspended solids concentration.
The filtration run may also be set manually. Other operational parameters
include the influent flow and specification of the backwash parameters
(duration, rate).
Stoichiometric
The stoichiometric fractions available for the model are the ratios of particulate
COD to VSS, VSS to TSS and BOD5 to BODultimate.
Filter
The filtration constants required for the model are shown in Figure 9-3. The
filtration constants include the clean bed filtration coefficient (λo), the initial porosity
of the filter bed (εo) and the porosity of deposited solids (εd), the ultimate bulk specific
deposit (σu), and the density and dry material content of the solids . The packing
factor is used in the defining equation for the variation of the filtration
coefficient with the bulk specific deposit as given by Ojha and Graham (1992).
DISPLAY PARAMETERS
The flow and characteristics of the filter flow and backwash can be displayed
on output graphs. There are various filter variables available in the sub-menus
under Display Variables . The display variables include dilution , headloss and rates ,
the unattached and attached solids in the filter and filter conditions (i.e. bulk
deposit, bed porosity).
CHAPTER 10
Digestion Models
This chapter describes the aerobic and anaerobic digestion models used in GPS-X.
CONCEPTUAL MODEL
The basic anaerobic digestion model consists of two reactors: one for the liquid
phase and the other for the gaseous phase. Both are modelled as completely
mixed reactors. Transfer of gaseous products between the liquid phase and the
gaseous phase is modelled using a standard two-film mass transfer equation.
Gaseous carbon dioxide (CO2) and methane (CH4) are assumed to follow the
ideal gas law. No further reactions take place in the gaseous phase, which has a
total gas pressure of 760 mm of Hg (i.e., atmospheric pressure).
State Variables
Composite Variables
MATHEMATICAL MODEL
The mathematical equations used in the liquid and gaseous phases are provided
in the corresponding Model matrix form in Appendix A. The general reaction
pathway is shown in Figure 10-2.
Stoichiometry
The relative amounts of chemical components produced by the biological and
chemical reactions in the anaerobic digester are specified by stoichiometric
coefficients. The chemical reaction stoichiometry is defined by the balanced
chemical reaction equations. The biological stoichiometry is defined by the
yield coefficients.
ya = slf / vss
yb = sco2t / vss
yc = xmh / slf
yd = sco2t / xmh
ye = gch4 / xmh
yf = snhi / vss
yg = xmh / snhi
In each case the yield is defined as the ratio of the change in a product to the
change in a reactant. Volatile acids and volatile suspended solids are expressed
as their equivalent chemical oxygen demand (COD).
The rate of hydrolysis of VSS is assumed to be first order with respect to the
concentration of VSS. A temperature correction factor (ftkco) is calculated
using the Arrhenius equation with a base temperature of 35 degrees Celsius.
The temperature correction factor is incorporated in the equation for the
hydrolysis rate:
Methanogenic Organisms
xmh ⋅ mumh
r2 = ⋅ ftmumh
ks slfn snh
1 + + +
slfn kia kin
r 3 = − kd ⋅ xmh
where kd is the decay rate coefficient. The effect of toxic substances (stox,
input as a special component to the influent parameters) is taken into account
by using a first order expression for the rate of inactivation of methane
bacteria:
r 4 = −ktox ⋅ stox
where ktox is the inactivation rate coefficient. Based on the above rates, the net
rate of generation of methanogens (rxmh) is:
rxmh = r 2 − r 3 − r 4
Toxic Substances
r 5 = kb ⋅ stox
The kinetic expression for total volatile fatty acids (slf) can be established
using the previously presented kinetic expressions and appropriate yield
coefficients:
d (slf )
= rslf = ( ya ⋅ r1) −
r2
dt yc
where (ya ⋅ r1) is the rate of generation of slf by hydrolysis, and –r2 / yc is the
rate of utilization of slf by the growth of methanogens.
Methane
d (ch4 )
= qch4 = vm ⋅ r 2 ⋅ ye
dt
Carbon Dioxide
The mass transfer of carbon dioxide between the liquid and gas phases is
calculated using the standard two-film gas transfer equation.
where KLaco2 is the mass transfer coefficient for CO2, co2sat is the saturation
concentration of CO2 in the liquid phase, and. H2co3=sco2t-hco3-co2.
The pH model within the basic digester model calculates bicarbonate (hco3)
and carbonate (co2). The concentration of dissolved CO2 in the liquid phase at
equilibrium (co2sat) is calculated using Henry's law:
where henryco2 is Henry's law constant for CO2 , and gco2 is the partial
pressure of CO2 in the gas phase. Combining the above equations:
The rate of biological generation of total soluble carbon dioxide (rsco2t) can be
expressed in terms of bacterial growth rates and yield coefficients. Combined
with the above equation results in the total reaction rate for dissolved CO2
(rsco2):
rsco 2t =
( yb ⋅ r1) + ( yd ⋅ r 2) + r 6
gvol
1000
where (yb ⋅ r1) is the rate of generation of sco2t by the hydrolysis of vss, (yd ⋅
r2) is the rate of generation of sco2t by the growth of methanogens, and gvol is
the gas constant for CO2 in L/mole. The mass transfer of CO2 between the
liquid and gas phases (r6) is negative when CO2 is transferred from the liquid
to the gas phase.
Ammonia
rsnh = ( yf ⋅ r1) −
r2
yg
The chemical equilibria and the pH calculation used for ammonia (snh) and
ammonium ion (snhi) are based on Hydromantis' pH Model and is explained in
Chapter 11.
Model Parameters
This section of the chapter discusses the various model parameters and inputs
that the user would encounter when using this model. The Parameters menu is
shown in Figure 10-3.
These menu items are found under the Parameters sub-menu item Physical and
Operational .
The Physical parameters are the volume of the liquid phase or maximum volume
(vm), the volume of the gas phase (vg), the total pressure of dry gas @35C (ptg), and
the digester temperature (temp) (Figure 10-4).
These menu items are found under Parameters sub-menu items Influent and
Effluent .
The Influent sub-menu, shown in Figure 10-6, allows the user to define influent
parameters that are exclusive to the basic digester model: soluble total CO2
(sco2t), toxic substance concentration (stox), methanogens concentration (xmh) and
net cations (strong bases) (sz).
The Effluent sub-menu, shown in Figure 10-7, allows the user to define special
components to the effluent of the anaerobic digester: inert soluble COD (si) and
the fraction of the effluent VSS that is inert (frinert).
These parameters, found under the Parameters sub-menu item pH Solver Set up
(Figure 10-8) define the initial pH value (ph), the pH boundaries: minimum
(lowph), and maximum (highph) values, and the required pH accuracy (errorph).
Parameters for the search routine of the pH, described in Chapter 10, are
presented in this sub-menu.
The kinetic parameters (shown in Figure 10-9) are found under Parameters sub-
menu item kinetic . The maximum specific growth rate for methanogens (mumh) and
the rate constant for hydrolysis of vss (kco) are defined for 35 degrees Celsius and
corrected by the model using the Arrhenius equation with the temperature
coefficients indicated at the bottom of this menu (tmumh & tkco). The rest of
the kinetic parameters in the basic model are not temperature-dependent.
The stoichiometric parameters (Figure 10-10) are found under Parameters sub-
menu item Stoichiometric . The first set of stoichiometric parameters consists of
conversion factors: particulate COD (xcod) to vss ratio (icvcon), BOD5 (bod) to
BOD ultimate (bodu) ratio (fbodcon).
Conversion factors that are unique to the digester basic model are the mass
acetic acid to COD factor (ac2cod), the molecular weight of fatty acids (mwfat) and
the gas constant (gvol).
Using these factors and the parameters defined in the Effluent sub-menu, the
basic digester model establishes the values for the composite parameters.
These parameters will modify the stoichiometry of the effluent stream.
( ) (
kn = kncon − 0.336 × 10 −5 + 2.134 × 10 −7 ⋅ temp − 2.242 × 10 −9 ⋅ temp 2 )
The rest of the dissociation constants are not corrected for temperature changes
in the basic model.
Gas transfer parameters are also defined on this form. The mass transfer
coefficient for carbon dioxide gas (sco2) between the liquid and gas phases
(KLaco2) is not corrected by temperature in the basic model. Henry's law
constant for carbon dioxide (henryco2) is also included in this item and is not
corrected for temperature.
• The differential equation for Sh2 has been converted to an algebraic equation to
improve the simulation speed. This process is very fast and contributes to the
stiffness of the system of differential equations. This approach is described by
Rosen et al. (2005).
These changes substantially increase the solution speed of ADM1 in GPS-X and allow an
integration algorithm other than Gear’s Stiff to be used. Double Precision arithmetic
should be used when solving ADM1 in GPS-X (accessed in Options > Preferences > Build
tab)
The structured model includes five process steps including disintegration, hydrolysis,
acidogenesis, acetogenesis and methanogenesis. The model uses 32 dynamic state
variables, 6 acid-base kinetic processes, 19 biochemical processes, and 3 gas-liquid
transfer processes.
A simplified ADM1 material flow diagram is shown in Figure 10-11. For a full
description of the model, the reader is referred to Batstone et al. (2002). Implementation
details are found in Rosen and Jeppsson (2002).
Short-chain FA
Hydrogen
Methane
Acetate
In GPS-X, the ADM1 model makes use of an ASM1 to ADM1 interface developed by
Copp et al. (2003). This interface allows ADM1 to be used within a full-plant layout that
uses ASM1 to model activated sludge processes.
• The influent stream is represented by an influent object. This case is more difficult
and requires that you specify the influent in the influent object and in the Influent
Form in the digester object. See Figure 10-12 for a graphical description of this
procedure. The section entilted “ADM1 MODEL SETUP SUGGESTIONS” gives
suggestions on how to characterize the influent.
The influent stream is an output stream from another object. This case is
simpler as the object that precedes the digester will take care of the
characterization of the stream itself. The user still needs to specify the
parameters found in the Influent form of the digester object. See
• Figure 10-13 for a graphical description of this procedure. The section entilted
“ADM1 MODEL SETUP SUGGESTIONS” gives suggestions on how to characterize
the influent.
In typical simulation practice, you will not have all the information you need, and will
have to estimate the values for many of the ADM1 influent parameters. These guidelines
can be useful for making sure that the estimates are used correctly. The following
suggestions are for the Carbon-Nitrogen Library (CNLIB).
Parameter Suggestion
of the Sin (inorganic nitrogen) state in ADM1.
long chain fatty acids Must be measured or estimated. It is part of Ss in the
influent object form.
total valerate Must be measured or estimated. It is part of Ss in the
influent object form.
total butyrate Must be measured or estimated. It is part of Ss in the
influent object form.
total propionate Must be measured or estimated. It is part of Ss in the
influent object form.
total acetate Must be measured or estimated. It is part of Ss in the
influent object form.
hydrogen gas Set to zero
methane gas Set to zero
proteins Must be measured or estimated. It is part of Xs in the
influent object form.
sugar degraders Set to zero
amino acid degraders Set to zero
long chain fatty acid Set to zero
degraders
valerate and butyrate Set to zero
degraders
propionate degraders Set to zero
acetate degraders Set to zero
hydrogen degraders Set to zero
Parameter Suggestion
inert inorganic suspended Must be measured or estimated. It is not an ADM1 state
solids but will impact the solids concentration.
Parameter Suggestion
Total acetate, and Carbohydrates states in ADM1. Make
sure this value is the sum of the values entered for these
states in the ADM1 influent stream.
particulate inert organic Same as Xi state in ADM1.
material
where:
Parameter Suggestion
Mantis, 0.06 in ASM1)
Xu = conc. of unbiodegradable particulates from cell decay
Ni = nitrogen fraction of Si and Xi
Si = conc. of soluble inerts
Xi = conc. of particulate inerts
Naa = nitrogen fraction of amino acids (0.098)
Saa = conc. of amino acids
Nxc = nitrogen fraction of composites (0.0376)
Xc = conc. of composites
nitrate and nitrite Not in ADM1 but used by GPS-X to estimate the COD
demand of the influent stream. It is assumed that both
oxygen and nitrate will be reduced instantaneously upon
entering the anaerobic environment, so the total incoming
COD is reduced by this incoming COD demand to
compensate for the reduction of the electron acceptors
present in the incoming stream.
dinitrogen Set to zero.
alkalinity Sic state in ADM1 (inorganic carbon).
The models associated with the aerobic digester are given the name <model>dig , where
<model> is the associated activated sludge model (such as asm1, etc.). The only
difference between the activated sludge model and its corresponding aerobic digester
model is an added first-order reaction. This additional reaction adjusts the particulate
inert organic concentration to account for the destruction of the inert organics:
rxi = −ki * xi
where rxi is the rate of reaction for particulate inert organics (xi), and ki is the inert organics
bioconversion rate. The latter can be found under the Parameters - Kinetic menu of the
aerobic digester object.
No loss of COD is involved in this process, and no electron acceptor is utilized. This
destruction process converts particulate inert organics (xi) to slowly biodegradable
substrate (xs). The slowly biodegradable substrate formed is then hydrolyzed, releasing
an equivalent amount of readily biodegradable COD.
UASB/EGSB model
The UASB/EGSB model is available only in MANTIS2LIB. The Mantis2 model is used
to model the biological-chemical reactions in the reactor. Some of the assumptions made
in the development of model are listed below.
2) The substrate diffusion into the granule is assumed to be not limiting and the
reactions are modeled similar to the suspended growth systems.
3) The average granule properties are used to estimate the granule settling
velocity and bed expansion in the reactor.
The simplified model structure is a first attempt to dynamically model the UASB//EGSB
reactors for practical engineering problems.
Some of the important inputs and outputs of the model are described in following
sections.
Reactor Parameters
Additional set of input parameters are required for the UASB/EGSB model to
estimate the granule settling velocity, bed fluidization and solid distribution
profile above the sludge bed.
The Reactor Parameters can be accessed from the Input Parameters menu item
(Figure 10-14). The Reactor Parameters form is as shown in Figure 10-15.
Average granule size – This parameter is used to calculate the settling velocity
of the granules in the granular bed. The estimated settling velocity is also used
in estimating the bed expansion in the reactor. A default value of 2mm is used.
Void ratio of stationary granular bed – This parameter defines the void volume
in the granular bed under no flow conditions.
Solid recovery efficiency of gas solid separator – The solid distribution curve
above the granule bed is used to estimate the solids concentration reaching the
gas solid separator at the top UASB/EGSB reactors. Depending on the
efficiency of the gas solid separator the concentration of solids escaping in
effluent is estimated.
CHAPTER 11
Other Models
Splitters
The proportional splitters in GPS-X can be set up for constant flow split, variable split
based on a timer, or variable split based on flow. In the Parameters > Splitter Set up form
you can select the appropriate splitting mode. They are described below.
Constant - When using this splitting mode, the split fractions do not change (as entered
under the Constant section), or are read from a file, or are controlled by any other method
(controller tool or customization).
Timer based - When using this splitting mode, the split fractions, as entered under the
Constant section, will be rotated through the connection points according to the specified
time interval.
Flow based - When using this splitting mode, the split fractions, as entered under the
Constant section, will be rotated through the connection points according to the specified
volume. Once the specified volume has passed through the splitter input, the fractions
will be moved to the next output connection.
A typical example of using this functionality is a multiple train SBR plant, where the
influent has to be sent to a different SBR tank either by timer control or by discharged
volume.
Control Splitter
A control splitter can be used to split flow into a set flow rate and an overflow. This
object is useful for setting flow bypass controls.
The pumped flow rate is set in the Parameters > Pumped Flow menu. If the incoming flow is
equal to or less than the pumped flow rate, all of the flow will exit through the pump
connection point. If the incoming flow is greater than the pumped flow rate, the excess
flow will exit through the overflow connection point.
An automatic PID controller can be used in this object to control another variable in GPS-
X with the pumped flow rate.
Pumping Station
The noreact model for Pumping Station is modified for the fixed water level option.
In the fixed water level option, the pumping flow rate used to be equal to the input flow
rate. One of the issues with the model was that in a flow scheme with pump recycle, the
pumped flows gets unbounded.
In the variable water level option, the main problem was the undefined flow rates for the
steady state calculations.
Both of these problems are addressed in the new model. In the new model, the fixed level
option is made equivalent to the continuous pumping while the variable water level
option is considered equivalent to intermittent pumping with water level control.
Average daily pump flow rate – this flow rate is used for continuous pumping rate and
also in the calculation of steady state calculations when intermittent pumping is selected.
Low volume for pump OFF – this variable defines the volume in the tank below which
the pump operates at minimum pumping capacity.
High volume for pump ON – this variable defines the volume in the tank above which the
pump operates at maximum pumping capacity.
Minimum pump capacity – this is the capacity at which the pump operates when the
volume in the tank is below the low volume.
Maximum pump capacity – this is the capacity at which the pump operates when the
volume in the tank is above the high volume.
Membrane Filter
One model is available for this object (empiric ).
In this zero-volume model, the soluble state variables are not affected, but solids are
partitioned into one of two streams based on a user-defined solids separation factor. Flow
can be pumped from either of the effluent connection pipes and the difference between
the pumped flow and influent flow is diverted to the other effluent connection. Solids
concentrations in the two effluent streams are calculated through a mass balance based on
flows and the separation factor. An example calculation is given below:
Equalization Tank
In the nonreactive noreact model, the effect of dilution on wastewater components is
described, but all reaction rates are set to zero (no biological reactions are occurring). The
tank has aeration terms (for modelling of pre-aeration) and a built-in pump, and both
aeration and pumped flow can be controlled with feedback controllers (P, PI, PID)
analogous to the ones found in aeration tanks and settler/clarifier objects.
This model can be used to simulate an equalization tank either off-line or in-line, as the
volume is variable. In an off-line or variable volume mode (flow equalization), the pump
connection should be used with the proper controller set up, while for concentration
equalization in fixed volume tanks the overflow connection is best used.
Reactions can be added by double-selecting the model (noreact ) and editing the rate
equations of the individual components.
Sludge PreTreatment
In a sludge pretreatment process, the particulate organic compounds are converted into
soluble organic compounds. The degree of solubilization normally depends on the
intensity of the treatment. There are many different types of sludge pretreatment
processes. These processes can mainly be divided into thermal, mechanical and chemical
treatment. Thermal, mechanical disintegration, ultrasound, microwave, alkaline treatment
ozonation, Fenton etc. are some of the treatment which have been normally applied. For
thermal and mechanical treatments, the main operational parameter affecting the degree
of solubilization is the specific energy input, while for chemical treatment it is the
specific chemical dose. The specific energy input and specific chemical dose are
normally expressed in terms of per unit of solids. As the mechanisms in sludge
pretreatment processes are normally too complex to describe through a mechanistic
model, empirical approach of modeling is normally adopted. For general engineering
purpose, this approach is sufficient to evaluate different options and help in decision
making.
The general sludge pretreatment process model in GPS-X includes the following
transformations.
The inert particulate COD is reduced during the sludge pretreatment. A part of the
particulate inert COD is assumed to convert to the slowly biodegradable COD. The
particulate inert COD also solubilize and results in soluble biodegradable and soluble
inert COD. Depending on the treatment a part of the inert organic COD may be lost.
The particulate slowly and very slowly biodegradable COD is solubilized and results in
the soluble biodegradable substrate.
The implemented model is an input-output model in which all the input states are
instantaneously converted to the output states. It is assumed that the retention time in the
chemical-mechanical disintegration reactors are small.
Therefore, one mole of aluminum ion reacts with one mole of phosphate or, on
a mass basis; one gram of aluminum ion (Al3+) reacts with 1.148 grams of
phosphorus (P). The dosage that is required is the mass of aluminum ion that is
added rather than the mass of alum, which may be in different forms (hydrated,
etc.). This method of calculating the stoichiometric requirements for alum and
the other chemicals avoids the issue of different compounds and their
molecular weights. The phosphorus stoichiometric coefficients for alum and
the other chemicals are already defined, but could be modified for modelling
another chemical that is not predefined.
Although the stoichiometric ratios are used as the basis of the precipitation
model, the complexities of wastewater chemistry, including the effects of pH,
alkalinity and other elements, means that the stoichiometric ratio is only the
maximum achievable phosphorus removal in presence of a large overdose of
chemical. In practice, a significantly lower removal is achieved because all the
chemical added is not available for phosphorus addition. However, the
available fraction, and therefore the required dosage, must be estimated or
calibrated from site to site and specified in the model.
P removal
max removal
half of max
removal
half saturation
P concentration
The mass of chemical precipitant formed is also calculated and added to the
particulate inert inorganic component (xii). The stoichiometric amount of
chemical sludge produced is based on the stoichiometry of the basic reaction.
For example, in Equation 11.1, the mass of chemical precipitant (AlPO4) is
4.52 g per 1g of aluminum ion reacted.
The model provides the user with two dosage methods: mass flow based and flow
proportional . The former requires the user to specify a continuous flow rate for
the chemical, while the latter allows the user to specify a flow rate of chemical
per unit flow of liquid entering the basin. The dosage rate can be set up as a
manipulated variable to maintain the phosphorus at a specified setpoint at any
location downstream of the chemical addition.
number of chemicals .Currently four chemicals (alum, ferrous and ferric, plus a
user defined) are available.
The following stoichiometry parameters (for all compounds) are found under
the More… button, and are described in Table 11-1.
All nitrogen and phosphorus fractions of COD components are recalculated for
mass balance after the precipitation has taken place.
DOSAGE CONTROLLER
The chemeq model contains a P-removal dosage controller, which is available
in the Input Parameters > Chemical Dosage menu (see Figure 11-3 Dosage
Controller Parameters).
1. The metal species exists in the form of Me(OH)3. All the other soluble and
insoluble species of metal are not modeled. Thus the model results outside the
pH range of 6-8 may not be applicable.
3. The solubility product is based on the PO43- ion which is estimated based
on the solution pH and dissociation coefficient of H3PO4.
The equation describing the relationship among the metal ion, phosphate ion
and the solubility product is as below.
X me ( oh )3, o
.S p , o .α = kSP
a
The set of above equations are solved simultaneously to calculate the soluble
phosphorus removal in the in-line chemical dosing object. The main calibration
parameter in the model is the solubility product of the metal phosphates. The
default values are provided based on the evaluation of reported values in
literature. The values however may need to be adjusted to account for the
differences in wastewater characteristics, mixing regimes and other parameters
which affect the P-precipitation process.
1. The metal dose to flocculate unit soluble component is a function of the soluble
component concentration.
2. The metal dose required per unit soluble component removed is expressed as
an exponential function with minimum bound.
The equation for metal dose per unit SS removed can be expressed as below.
F = Fmax .e − k a C + Fmin
The shape of the curve represented by the above equation is as shown in Figure
11-4.
25
20
15
gMe/gSS
10
0
0 5 10 15 20 25 30
SS concentration (mg/l)
The integration of curve in Figure 11-4 between the limits of Sin (concentration
of soluble component in influent) and So (concentration of soluble component
in effluent) results in the following expression. For a given metal dose and inlet
concentration, the equation is solved to estimate the So, concentration of
soluble component in effluent.
Pme = [
Fmax − k a S o
ka
.e ]
− e − k a S in + Fmin .(Sin − So )
Fmax
Pme,c = . �e−So ka − e−Sin ka � + Fmin (Sin − So )Pme = metal dose, gMe/m3
ka
There are three parameters Fmax, Fmin and ka used in the model. The parameter
Fmax may be interpreted as the amount of metal required to remove the said
component at very low concentrations. It is general observation that the amount
of metal required at lower concentration of soluble component is much higher
than the metal amount required when the concentration of soluble component is
higher. The parameter of Fmin, can be interpreted as the amount of metal
required to remove the said component at high concentrations. The parameter
of ka signifies the transition between the Fmin and Fmax. Higher values of ka will
result in a very steep transition between the Fmin and Fmax, essentially
improving the removal efficiencies. Conversely, lower values of ka will result
in a mild transition and thus decreasing the removal efficiencies.
Grit Chamber
The model associated with this object is a simple empirical model where grit
production is directly proportional to the flow coming in the grit chamber. The
amount of grit produced (in grams per m3 of influent) is user specified.
Disinfection Unit
where:
The chlorine dosage, rate of kill , and volume of the unit are specified as operational
parameters.
N = f (D )
n
where:
D = UV dose (mW·s/cm3)
f = A(SS ) (UFT )
a b
where:
Dewatering
Three models are associated with this object: simple, press and asce.
In the model, the user inputs two operational parameters: solids capture (%), and
simple
polymer dosage (g/m3). From these two parameters, the dewatering parameters (under
Parameters > Calibration ) and the input solids concentration (Xi), the cake (Xs) and centrate
(Xo) solids concentrations are calculated:
solidscapture
X o = 1 − × Xi
100
The optimal polymer dosage and sludge treatability are used to define the performance of the
unit. The minimal sludge concentration for processing is a limit concentration under which the
unit will not operate. The cake dry material content is a function of the treatability and the
expected content from easy to treat sludge at optimal polymer dosage, hard to treat sludge at
optimal , and no polymer dosage.
Using the following mass balance, the output flow rates (Qo and Qs) can be computed:
Qi X i = Qo X o + Qs X x
The press model is based on the simple model but has, in addition, a parameter for the filter
press surface area and a maximum load on the press . These two parameters are used to model
the reduced efficiency of dewatering as the loading on the press increases.
The asce model is based on a paper by the Task Committee on Belt Filter Presses for the
American Society of Civil Engineers (ASCE, 1988). Based on this work, which involved
information collected as part of a survey through the United States, a relationship was
developed between the feed solids and cake concentration. The primary sludge fraction (i.e.
percent of sludge for processing originating from primary sludge) is the main parameter
in determining the cake solids from the unit. The solids capture is used to determine the
centrate solids concentration and the developed relationship is used to determine the cake
solids. A material balance is used to determine the two output flows.
The dewatering object should not be confused with the thickener object. The thickener is
configured like a nonreactive settling tank. The sedimentation models are described in
Chapter 7.
Black Box
The Black Box object contains three models: empiric , pipe, and shuffler .
EMPIRIC MODEL
The empiric model contains a number of empirical equations that can be set up
to change the value of the BOD, TKN and the suspended solids between the
input connection point and the output connection point.
1) constant;
2) proportional;
3) linear;
4) quadratic;
5) exponential;
6) power; or
7) user-defined.
After choosing the correlation type, the user specifies what variable is the
independent variable (either influent flow, influent concentration or both). Finally,
the user must supply the parameters in the regression equation. See Figure 11-5
for typical equations that can be set up using the Black Box object.
PIPE MODEL
The pipe model can be used to simulate the lag effect caused by significant
residence times in pipes or channels between unit process objects. By default,
GPS-X does not simulate any travel time between objects.
The pipe model is a plug-flow tank model without any biological reactions.
INTERCHANGE MODEL
The interchange model is an empirical model that can be used to transfer
concentrations between state variables. Note that this is a “mapping function”
(which doesn’t necessarily obey mass balance, etc.) and should only be used
for advanced applications.
There are two options available to specify the state variable mapping – from
menu , and from custom macro :
from menu – menu is used to specify the outgoing state variable for each
incoming state variable (see Figure 11-6).
Figure 11-6 Specifying the outgoing state variable in the interchange model
from custom macro - state variable mapping is specified in the custom macro file
in the interchange model file (accessible by selecting the
interchange model twice). More advanced mapping
calculations can be performed in the custom macro (see
Figure 11-7). For details on how to write custom
calculations, see the Customizing GPS-X chapter in the
User’s Guide.
CHAPTER 12
Tools Object
This chapter discusses the models found in the Tools Object. Each model is listed in
separate sections below.
Data Transfer
The datatransfer model is used for transferring data between GPS-X data files and ACSL.
When data is read from GPS-X's .dat files, it can only be displayed on graphs or
controllers. With the datatran model, this data is sent to a data array and therefore is
available for processing by ACSL commands (e.g. through the Command : line in the
Simulation Control window).
The data transfer parameters are accessed by selecting Parameters > Set up in the Process
Data menu. These parameters are detailed below:
data variable name: This is the cryptic name of the data variable found in the .dat file.
data transfer (ON – OFF): This switch activates the data transfer.
Sampler
The sampler model will sample any stream either at regular time intervals (i.e., take a
sample every `x' hours) or in proportion to the flow rate of that stream (take a sample
every `x' m3 of flow). It reports either daily or total simulation run average values.
The sampling tool parameters are accessed by selecting Parameters > Set up in the Process
Data menu. These parameters are detailed below:
label of sample stream : This is the label of the stream being sampled. All of the state and
composite variables in this stream are sampled.
sampling period ( Daily / Total Run ): This is the time period used when calculating the
averages of the sampled values. The averages can be calculated on a daily basis or for the
entire run.
take a sample every (m3): This parameter controls how often the stream is sampled when the
sampling mode is set to Flow Proportional .
take a sample every (hour):This parameter controls how often the stream is sampled when
the sampling mode is set to Regular Time Intervals .
PH Tool
The ph tool allows the user to estimate the pH of a wastewater stream in the layout, or do
a pH estimation directly from parameters entered into the menu. These two options are
available in the pH Model Set up menu (Figure 12-1).
The pH model operation menu item specifies whether the calculation is a stand alone pH
estimation using the components under the Wastewater Components (stand-alone model)
header, or uses the components from a specific flow point in the plant layout.
If you select link pH estimation to label , the calculation will use the concentrations of
ammonia, nitrate, etc., from the stream label specified in label of point where pH is to be
estimated . If you would like to estimate the pH at several different points throughout the
plant, place one ToolBox object per pH calculation into the layout, and link each box to a
different point in the layout where pH is to be estimated.
The calculation is based on a model developed by Vavilin et al. (1995). The model is
simplified to include only strong bases, strong acids, total ammonia, total acetate, and
total carbon dioxide. The model uses an iterative process, in combination with the
concentration of each component, to determine the pH value.
The relationship between the concentration of a component and the concentration of its
ions is related through a dissociation constant (K). The concentration of hydrogen ion is
used to determine pH:
[H ] = 10
+ − pH
The initial pH identified on the pH solver set up control form is used to calculate the
initial concentration of hydrogen ion. An example of this control form is shown in Figure
12-1. The default initial guess for pH is 7.
A second control form, shown in Figure 12-2, is used to input various equilibrium and
temperature constants.
[ammonium] = K n [totalammon
K
ia ]
[H ] + K
+ n
[OH ] = Kw
[
H + ]
[acetate] = K a ⋅ [totalaceta te]
[H ] + K+
a
K ⋅ [H ]⋅ [totalCO ]
+
[bicarbonate] = c1 2
(K ⋅ [H ]) + (K ⋅ K ) + [H ]
c1
+
c1 c2
+ 2
(K c1 ⋅ K c 2 ) ⋅ [totalCO2 ]
[carbonate] =
(K c1 ⋅ [H + ]) + (K c1 ⋅ K c 2 ) + [H +
]
2
The dissociation constants used in these equations can also be input on the control form
shown in Figure 12-2. The default dissociation constants are taken from the literature.
The ammonium dissociation constant is corrected for temperature.
To properly reflect the presence/absence of added alkalinity (lime addition, etc.) the
alkalinity state variable salk is assumed to be all carbonate alkalinity that is available (and
completely dissociated) for acid neutralization.
In the above equations, totalCO2 is the total CO2 available (converted to equivalent
charge). Because the alkalinity is assumed to be in the form of completely dissociated
CaCO3, a 2+ charge cation is also assumed present in the equilibrium system.
The above equations are combined with the charge balance shown below:
An implicit nonlinear equation solver is used to solve this system of equations for [H+].
The calculated pH values are bounded by the low bound and high bound parameters shown
in Figure 12-1.
Once the solution is complete and the concentrations of the ionized components have
been calculated, the concentrations of the non-ionized components are calculated from
the speciation equation shown above.
The calculated pH and the concentrations of the individual components can be displayed
on an output form similar to that shown in Figure 12-3.
This pH model is also used in the HPO (High-Purity Oxygen) object for pH estimation.
Low-Pass Filtering
The lowpass model can be used for analog or digital filtering, or a combination of both.
The input signal is fed to a first-order analog filter, a first-order digital filter, and a zero-
order sample-and-hold. Any of these components may be used or bypassed. This is done
by setting the filter type as Analog , Digital , or Analog+Digital , and by setting sample and hold to
either ON or OFF. When the filter type is set to OFF, both filters are bypassed and the final
output is either the input signal or the sampled input signal, depending on the state of the
sample and hold setting. A signal flow diagram is shown in Figure 12-4. In this figure, the
switches are set for a digital filter with sampling.
First-order linear filters have one tuning parameter, the cutoff frequency ωc, which
corresponds to the corner frequency, i.e. the reciprocal of the filter time constant. The
amplitude ratio of a first-order system at the corner frequency is 1/√2, with corresponding
phase lag φ=45 degrees’
With u(t) and y(t) representing the input and output of a first-order filter respectively, the
filter models are:
dy (t )
ω c (u (t ) − y (t )) (analog)
dt
GPS-X Technical Reference
Tools Object 297
( )
y (t ) = e −ω c ∆t y (t − ∆t ) + 1 − e −ω c ∆t u (t ) (digital)
One menu of parameters is defined for the lowpass model. It is accessed from the Tools
Process Data menu by selecting Parameters > Filter Settings . The available parameters are
detailed below:
sample and hold (ON - OFF): The value of this parameter determines if the digital filter
output is sampled and held for the sampling period specified above.
Digital filtering without sampling is useful if the filtered signal is to be used in a unit that
already implements a sample-and-hold on its input.
On/Off Control
On/off controllers are a simple form of feedback control. This type of controller is used in
a wide variety of common applications. For example, household heating and cooling
systems operate using on/off control.
controller sampling time: This parameter determines the length of time between
controller executions. A high value (corresponding to a long interval between
executions) may be appropriate for slower processes (e.g., MLSS control using
the sludge wastage rate), while other processes may require faster sampling
frequencies.
control variable (CV) with label : The cryptic name of the variable to be controlled.
upper bound : The upper bound on the controlled variable. If the value of the
controlled variable exceeds this value, then the value of the manipulated
variable will be set to its low setting.
lower bound : The lower bound on the controlled variable. If the value of the
controlled variable is less than this value, then the value of the manipulated
variable will be set to its high setting.
PID Control
PID controllers are widely used in industrial applications because of their simplicity and
good performance. PID is an acronym for Proportional, Integral, Derivative, which are
the three modes of the PID controller. In continuous form, the PID controller algorithm is
given by:
dE (t )
MV (t ) = K c ⋅ E (t ) + ∫ E (τ )dτ + TD ⋅
1
+I
TI 0 dt
dCV (t )
MV (t ) = K c ⋅ E (t ) + ∫ E (τ )dτ + TD ⋅
1
+I
T dt
I 0
where
The individual modes of the PID controller can be used individually or in pairs; common
combinations include P-only and PI control, in addition to full PID control. The output of
the PI controller, for example, includes the first two terms in the PID controller
expression above; the output of any combination can be calculated similarly. The
proportional mode is given by:
MV p (t ) = K c E (t )
Kc τ
MVI =
TI ∫ E (τ )dτ
O
dE (t )
MVd (t ) = K c Td ⋅ (Derivative kick protection off)
dt
dCV (t )
MVd (t ) = − K cTd ⋅ (Derivative kick protection on)
dt
IMPLEMENTATION IN GPS-X
Since the vast majority of PID controllers are now implemented using digital
computers, the discrete form of the PID algorithm is used more frequently than
its continuous form. Accordingly, all controllers in GPS-X are modelled in
discrete form. Bounds on the manipulated variable are frequently used to
reflect limitations due to physical equipment or safety. Therefore, the PID
algorithms implemented in GPS-X have the following forms, where ∆t
represents the controller execution interval:
∆t T
∆MV N = K c E N − E N −1 + E N + d (E N − 2 E N −1 + E N − 2 )
TI ∆t
∆t
∆MVN = K c EN − EN −1 + EN − d (CVN − 2CVN −1 + CVN − 2 )
T
TI ∆t
∆t N T
MV * N = K c E N + ∑ Ei + d (E N − E N −1 ) +I
TI i =1 ∆t
∆t N T
MV * N = K c E N + ∑ Ei − d (CV N − CV N −1 ) + I
TI i =1 ∆t
DERIVATIVE FILTERING
Derivative filtering is another strategy by which large jumps in the manipulated
variable can be prevented. Filtering reduces the effect of sudden setpoint
changes and high frequency noise present in the error signal, which may
produce large values of the error derivative. When derivative filtering is
selected, the signal fed to the derivative mode of the PID (error or controlled
variable) is passed through a discrete first-order filter before being used in the
calculation of the derivative mode. The filter is tuned by a single parameter, the
cutoff frequency, which corresponds to the filter's `corner frequency', i.e. the
reciprocal of its time constant.
In addition to the PID controller in the tools object, PID controllers for
common variable pairings are built into many of GPS-X's process objects. For
example, a PID controller for controlling the dissolved oxygen concentration is
available in the plug flow tank object. These controllers have essentially the
same parameters as the PID controller in the tools object except that the
manipulated variable and possibly the controlled variable have already been
defined.
setpoint for control variable: This is the value of the setpoint for the controlled
variable. The controller acts to keep the controlled variable at the setpoint.
The following parameters are accessed by clicking on the More... button in the
Control Variable form. Only the parameters in the Controller Set up sub-section are
discussed here. For a discussion of the Controller Tuning sub-section see Tuning
PID Controllers (below).
controller effect on controlled var - direct (ON - OFF): Since the value of the
proportional gain in GPS-X must be positive, this parameter controls the
`direction' of the controller. If a positive step in the manipulated variable
results in a positive change in the controlled variable (at steady-state), i.e. the
process gain is positive, then this parameter should be ON (e.g. an increase in
air flow causes an increase in DO). Otherwise, it should be OFF (e.g. an
increase in wastage rate causes a decrease in MLSS concentration).
derivative filtering (ON - OFF): The derivative filter is used to filter the signal fed
to the derivative mode of the PID controller.
cutoff frequency:
This is the derivative filter's corner frequency (i.e. reciprocal of
its time constant).
label of manipulated variable: This is the stream label of the manipulated variable.
value of manipulated variable: This is the initial value of the manipulated variable.
• Start with a small proportional gain and a large integral time; set the
derivative time to zero. As a rough rule of thumb:
− Use a value of 0.5/Kp as a starting value for the proportional gain
(Kp is the steady-state process gain, defined as the change in the
controlled variable at steady-state for a one-unit change in the
manipulated variable).
− Use a value of 1.5t as a starting value for the integral time (t is the
time constant of the first-order response that most closely
approximates the controlled variable response to a step in the
manipulated variable).
• Gradually increase the proportional gain until further increases result in
a deterioration in control performance.
• Gradually decrease the integral time until further decreases result in a
deterioration in control performance.
• Gradually increase the derivative time.
• Fine-tune the parameters as needed.
A facility for tuning PID controllers based on the Ciancone correlations for
setpoint changes is available for all PID controllers in GPS-X. The PID tuning
parameters calculated using the Ciancone correlations are based on estimates of
the process gain, dead time, and time constant, obtained by a least-squares fit
of the time series data collected under tuning mode.
The controller tuning parameters for the PID controller are accessed by
selecting Parameters > Control Variable > More... in the Process Data menu of the
tools object. Setting tuning to ON starts the tuning mode. The controller sampling
time must be set to an appropriate value. The process should have been brought
to steady-state, or reasonably close to steady-state, prior to the activation of the
tuning mode. This may be done with or without a PID controller currently ON.
While this mode is active, a step input is applied to the manipulated variable,
forcing the controlled variable to be perturbed.
The estimates of the process parameters (i.e. process gain, dead time, and time
constant) may be tagged for display in the Display Variables menu of the object
or stream associated with the controller.
The other settings which affect the operation of the tuning mode are:
time of step :
The interval of time that will elapse between the activation of the
tuning mode and the application of a step in the manipulated variable.
maximum possible dead time: Upper bound on admissible values of dead time in
the first-order plus dead time model. This may be used to reduce the time
required to compute tuning constants, or may be used to force a dead time of
zero in the model used to derive the tuning constants.
While operating in tuning mode, time series data of the manipulated and
controlled variables are sampled (at each controller sampling time) and stored
in arrays of fixed maximum size. Data for 3000 sampling times can be stored.
If that capacity is to be exceeded, a warning will be displayed, and a scrolling
time window that will retain data for the last 3000 sampling times will be
initialized. This should not be a limitation in most cases, as this storage
capacity is enough for data sampled every 10 minutes over 20 days. The
storage capacity is a global setting labeled controller tuning array size, found in
General Data > System > Parameters > miscellaneous . If this value is increased, the
layout must be recompiled for the change to take effect, i.e., this value may not
be changed inside a scenario.
For more information on tuning PID controllers, consult Marlin (1995) or Perry
and Chilton (1973). The Ciancone correlations are presented and discussed in
Marlin (1995).
Feedforward-Feedback Controllers
In feedforward control, an input disturbance is measured and the controller adjusts the
manipulated variable to compensate for the disturbance before the controlled variable
deviates from its setpoint. Feedforward control is usually combined with feedback control
to retain the beneficial properties of feedback.
The pidforward model of the Tools object combines a PID controller for feedback and a
lead/lag algorithm for feedforward control. Lead/lag feedforward control is a simple
feedforward strategy that provides enough flexibility for most applications. The PID
controller algorithm is presented in the section entitled PID Controllers above. In this
section we present the lead/lag algorithm.
A feedforward term may be added to the feedback control action of the PID controller
when measurement of a process disturbance is available. The lead/lag feedforward
controller is represented in transfer function form as:
τ ld s + 1
MVFF (s ) = − K FF e −θs D(s )
τ lg s + 1
and its time-domain representation is given by:
dMVFF (t ) dD(t − θ )
τ lg ⋅ + MVFF (t ) = − K FF τ ld + D(t − θ ) + I FF
dt dt
where
When both the process and disturbance dynamics are represented by first-order plus dead
time models, perfect feedforward control can in principle be achieved if one:
• the dead time θ to the difference between disturbance and process dead times
(possible only when the process dead time is less than the disturbance dead time);
IMPLEMENTATION IN GPS-X
The feedback control action is calculated from a PID control algorithm as
described above, and the feedforward control action is added to it as follows.
{ {
MVN = max min MVN −1 + ∆ MV FB
N + ∆ MV N , MVub MVlb
FF
} }
Feedforward/Feedback (PID in position form):
{ {
MVN = max min MVN * + ∆MV N , MVub MVlb
FF
} }
disturbance variable with label : The cryptic name of the disturbance variable
including the stream label.
lag time: The feedforward controller tuning parameter, τlg. The ratio of lead to
lag times should usually be kept below 2:1 to minimize the effects of noise.
negative feedforward gain (ON - OFF): This parameter controls the `direction' of
the controller. The `normal' sign of the feedforward gain is negative. This
occurs when both the process and disturbance gains have the same sign, in
which case this setting should be ON (the default value). Otherwise, it should be
OFF.
Timer Control
The timer is used to schedule and control intermittent plant operations. For example the
timer control can be used to implement intermittent aeration in an activated sludge tank.
Another application is the desludging of a primary settler.
The timer works in cycles. At the start of each cycle the timer sets its manipulated variable
to a pre-defined ‘on’ value. The manipulated variable is kept at this value for a
user-defined fraction of the cycle. For the remainder of the cycle, the manipulated
variable is set to a pre-defined ‘off’ value. This is ideally suited for intermittent aeration
because the controller can turn on the air flow at regular intervals for a user defined
length of time.
The timer control parameters are accessed by selecting Parameters > Set up in the Process
Data menu. These parameters are detailed below:
manipulated variable with label : The cryptic name of the manipulated variable including the
appended stream label.
ontime in one cycle: The length of time (starting at the beginning of the cycle) that
manipulated variable value is set to the `on' value during a cycle.
value of manipulated variable when off : The `off' value of manipulated variable.
Multivariable Controllers
The multivar model is used in conjunction with the Advanced Control Module. See the
Advanced Control Module Manual for details on using multivariable controllers in
GPS-X.
The input form for the Flow Timer Model is as shown in Figure 12-6.
Manipulated variable with label – This input variable is used to specify the cryptic
variable name of the flow variable that needs to be controlled.
Cycletime – This input variable is used to specify the total duration of the cycle including
the ON and OFF time.
Starttime for ON cycle – This input variable controls the start time of the cycle.
Ontime in one cycle – This input variable defines the duration of ON cycle.
Average value of manipulated variable during cycle – This input variable defines the
average flow rate during the whole cycle.
The default setup of the flow controller defines a cycle of total length of 0.05d, the cycle
remains OFF for 0.01d, gets ON at 0.01d and remains ON until 0.04d. The flow is OFF
from 0.4d-0.5d. This cycle then repeats itself.
Scheduler Model
Some of the operations at wastewater treatment plant follow a repeating schedule. For
example, the sludge wasting schedule may require wasting on the weekdays and no
wastage on weekends. Until now, these repeating schedules were modeled by inputting
the scheduled inputs through a file input. This approach requires preparation of file inputs
for the duration of dynamic simulation. To simplify modeling a repeating schedule, a new
scheduler model is implemented in the toolbox object of the GPS-X. The structure of the
scheduler model is generic and can be used to model cyclic schedules of operation in a
treatment plant. The scheduler model can control flow rates, split ration and any other
model input variable.
The scheduler model can be selected by right-clicking on the tool box object and
selecting scheduler. The scheduler model is useful when the treatment plant is operated in
a well-defined cycle containing many different phases and in each phase a set of model
variables is manipulated in a well-defined manner. In the current scheduler model, a set
of 15 model variables can be manipulated to define complex operational schedules in
treatment plants.
The input data to the model is set by using the input form of the scheduler model. The
input data form is as shown in Figure 2. A brief explanation of each input variable is
given below.
Number of phase in sequence – This variable defines the number of distinctive phases
in a cyclic-sequence. The default value is set to 8.
Duration of each phase – This variable defines the time duration of each phase. The sum
of the time duration of each phase is equal to the total sequence (cycle) time. The Figure
3 shows the input form for setting the duration of each phase.
Cycle start phase – This define the phase at which the cycle starts. The value of the
variable can be between 1 to number of phases defined above.
Cryptic name of model variables– This defines the cryptic names of the model
variables which are manipulated in each phase. By default, a maximum of 10 model
variables can be used to set the sequence. All the variables are set to blank (nothing is
manipulated in the sequence). To include a model variable in the scheduler set-up, the
blank should be replaced by the full cryptic name of the variable available in the layout.
For example, to set the influent flow rate for an influent object in the sequence, the blank
variable can be replaced by qconinf (qcon is the cryptic for influent flow rate and inf is
the stream id). If there are more than one variable, they can be similarly defined.
Tip: To see the cryptic name of a variable, you may point the cursor over the variable
description name in the data input window. The cryptic variable name is displayed for
few seconds in a small window.
Value of model variable in each phase - The value of a model variable during each phase
can be set here. For example, to set the values of control variable in each phase, click on
the button to the right of control variable to open the input value form for
model variable (Figure 4).
Figure 12-10 Input form for setting the value of a control variable in each phase of a
sequence
CHAPTER 13
Introduction
GPS-X contains operating cost models for most of the objects in the process table. Each
object can be set up to calculate costs for energy, chemical dosage and sludge handling
(as appropriate to that object).
This chapter discusses the structure of the operating cost models, and their use and
calibration.
Model Structure
For each of the wastewater unit process objects in GPS-X, a set of operating costs has
been assigned. These costs reflect the typical operating costs associated with that
particular unit process.
GPS-X can be used to dynamically simulate these operating costs in the same way that it
dynamically simulates the wastewater unit process itself.
GPS-X can simulate two different aeration methods - mechanical and diffused
air. If mechanical aeration is chosen, an aeration power (kW) is entered. If
diffused aeration is chosen, the power requirement is calculated as shown in
Equations 6.27 and 6.28 in Chapter 6.
The wire power is multiplied by the energy price ($/kWh), and then integrated
over time to determine the total cost for aeration energy during the simulation.
waterflow head
⋅
86.4 × 10 H 2 Odens
7
energy =
blowereff
where
The energy value is multiplied by the energy price ($/kWh), and integrated
over time to determine the total cost for aeration energy during the simulation.
For blower energy costs, the head value represents the sum of the actual head
and the piping headloss. There is no additional equipment headloss as with
aeration energy costs.
where
This daily cost is integrated over time to determine a total cost for the
simulation.
SLUDGE DISPOSAL
Several objects in GPS-X have connection points which represent thickened or
dewatered sludge (e.g. dewatering unit). A sludge disposal cost can be
associated with these flows to determine a sludge handling cost.
The cost is determined by multiplying the per-unit disposal cost by the rate of
sludge disposal:
where
This daily cost is integrated over time to determine a total sludge disposal cost
for the simulation.
− these forms contain general operating cost parameters that apply to the entire
layout: e.g. energy prices and schedules.
The price of energy can be set in two different ways, by selecting from the
Energy Pricing menu:
• Constant Price
When Constant Price is selected, the energy price is set to the value entered on
the form. This value can be changed in a scenario or by placing the price on an
interactive controller, or set constant for the entire simulation.
When Time-based Pricing is selected, the energy price will cycle through a user-
defined set of prices on a user-defined schedule. The number of different
energy prices is unlimited. This mode can be used to simulate lower energy
costs during the night.
The operating cost model parameters shown in the Operating Cost parameters
form depend on the object and choice of model.
Figure 13-3 Layout Operating Cost Display Form (total for all objects)
The display variables available include energy usage and sludge disposal rates
as well as total energy, chemical and disposal costs for that particular object.
The specific costs calculated (and available in this menu) depend on the
operating costs associated with the particular object and model.
To calibrate the models to the behavior of the plant being simulated, the user will need to
adjust various parameters in the models. This list can be useful in guiding calibration:
AERATION:
- Enter the hydraulic head and headloss for the system if known. Otherwise, use
the defaults. Calibrate with the blower efficiency and diffuser headloss.
PUMPING:
- Enter the hydraulic head and headloss for the system if known. Otherwise, use
the defaults. Calibrate with the pump efficiency and/or piping headloss.
MISCELLANEOUS:
- The miscellaneous energy use is a flat rate, so it is calibrated by adjusting this
rate as appropriate.
simple1d X
UASB mantis2 X X
SLUDGE mantis2 X X
PRETREATMENT
DISINFECTION empiric X
UNIT werfuv X
CHAPTER 14
Optimizer
Introduction
This chapter describes the GPS-X optimizer and its associated forms. More detail on the
maximum likelihood objective function and the statistical tests provided in the solution
report can be found in Appendix A and Appendix B, and the Optimizer Solution Report,
respectively, in this chapter. The complete list of nomenclature used is found in Appendix
C: Nomenclature, of this chapter. The references cited in this chapter are listed in
Appendix D: References, also in this chapter.
When using the optimizer in GPS-X it is recommended that layouts be built in double
precision. Switch to double precision by selecting the Double Precision option in the
Options > Preferences > Build tab.
Optimizer Description
The optimizer is a module designed to minimize the value of a user-selected objective
function by adjusting the free variables in this function. In the case of parameter
estimation, these free variables are the unknown process parameters. The optimizer uses
the Nelder-Mead simplex method (Press et al., 1986) for minimization. The algorithm has
been modified to handle bounds on the optimization (i.e. free) variables.
The simplex method is a multi-dimensional procedure that does not rely on gradient
information. The algorithm searches through the multidimensional "surface" using a
direct search method to find a local minimum of the objective function.
The procedure starts with an initial point in the multi-dimensional parameter space and
then generates new points in space by perturbing the initial point a scaled amount along
each parameter direction. This leads to p + 1 points in space that define a polyhedron (the
simplex) where p is the number of optimization variables. The points are called the
vertices of the simplex.
At each iteration, the simplex method reflects the vertex with the highest function value
(worst point) through the centroid of the remaining p points of the polyhedron. The
amount of reflection is controlled by a reflection constant . If the reflected vertex is the new
best point (lowest function value) then the polyhedron is expanded along the direction of
If after the reflection step the reflected vertex is worse than the second worst vertex on
the previous iteration, the polyhedron is contracted. The reflected vertex is contracted
through the centroid of the remaining p vertices if it is the new worst point. If the
reflected vertex is the new second worst point, the worst point is contracted through the
centroid. The amount of contraction is controlled by a contraction constant .
When a contraction step is unsuccessful, the polyhedron is shrunk by moving the vertices
toward the best point. The amount of shrinkage is controlled by a shrink constant .
At each step checks are made to ensure that the parameter bounds have not been violated.
If they have been, the new vertex is moved back inside the bounds.
When the optimizer termination criteria are satisfied, the optimizer runs one additional
simulation using the parameter values from the best point found during the iteration
process. There is the possibility of encountering a local minimum that is not the global
minimum of the objective function. This is a problem that is common to most
optimization algorithms. As a result, it is important to solve optimization problems (e.g.
parameter estimation or process optimization problems) from a number of different
starting guesses to ensure that the optimizer has found the global minimum.
If the user requests the printing of confidence limits or derivative information (See
Summary of the Optimizer Settings and Parameters (below)) the optimizer conducts
additional simulations to generate numerical derivatives.
The constants that control the reflection, expansion, contraction, and shrinkage of the
polyhedron in the simplex method can be accessed by selecting General Data > System >
Parameters > Optimizer and then clicking on the More... button in the Static sub-section. The
resulting form is shown in
Figure 14-1. You can change any of the constant values if you wish. The parameter
entitled scaled step size in initial guess is used to control the initial perturbation size.
Absolute Difference
m nj
F = ∑ ∑ zi , j − f i , j (14.1)
j =1 i =1
Relative Difference
m nj
z i, j − f i, j
F = ∑∑
j = 1 i =1 zi , j
(14.2)
Sum of Squares
F = ∑ ∑ ( zi , j − f i , j )
m nj
2
j = 1 i =1
(14.3)
Relative Sum of Squares
2
m z − fi , j
nj
F = ∑ ∑ i, j (14.4)
z
j =1 i =1
i, j
Maximum Likelihood
1 m 1
F = ∑ n j (ln (2π ) + 1) + n j ln
nj
(z − f i , j )
2 nj
2 j =1 nj ∑ i, j
γ
f i , jj
+ γ j ∑ ln f i , j
(14.5)
i =1 i =1
In the objective function expressions given above the following nomenclature is used:
fi,j is the value of response variable j predicted by the process model in experiment i
These objective function types are accessed by clicking on the inverted triangle beside the
Optimize icon and then selecting Type from the drop-down menu.
The other objective functions can be used for curve fitting when calculating
statistically optimal parameter estimates is not a concern.
To solve this type of problem in GPS-X you need to treat the problem as a data
fitting exercise. For example, if you want to minimize the value of a certain
model variable you need to specify an arbitrarily small target value for the
model variable in a .dat file and have the optimizer minimize the difference
between the calculated variable value and the target value using the absolute
difference objective function. This is equivalent to minimizing the model
variable directly. The target value should be made small enough so that the
optimizer cannot reach it.
You are not limited to using one performance measure. You can select a
number of different performance measures and have GPS-X optimize these
variables simultaneously by fitting them to user-supplied targets.
Termination Criteria
There are four different criteria used to terminate the optimizer:
The specific values used for the termination criteria can be accessed from the
General Data menu. Right-click in an empty region of the drawing board to
display the menu and select System > Parameters > Optimizer to display the form
shown in Figure 14-2.
Types of Optimization
The optimizer module is equipped to handle three different types of process
measurements: time series measurements, long term operational data that are averages of
the original process measurements, and on-line measurements. Each type of measurement
set leads to a different type of optimization problem in GPS-X. These optimization types
can be accessed by clicking on the inverted triangle to the right of the Optimize and
selecting Type.
For this type of optimization, you enter your measured data into a text file with
a .dat extension. This text file should follow the naming and formatting
conventions discussed in the GPS-X User's Guide.
For parameter estimation involving a dynamic model, the data entered into the
text file will be a set of time series values for each of the response variables. In
GPS-X the response variables are referred to as target variables.
Steady-state optimization is a time series -type optimization with only one data
point for each target variable. The steady-state solver is used and the simulation
has a stop time of 0.0. This type of optimization is useful for calibrating the
model to data reported as daily, weekly or monthly averages. Data of this type
are typically obtained from composite samples and thus do not accurately
reflect the time dynamics of the real process. In a steady-state optimization, the
average data are used as the targets and selected model parameters are adjusted
to fit these targets.
When doing process optimization, you enter single target values for your
process performance measures at the desired points in time. As mentioned
earlier, you should also make sure to use the absolute difference objective
function.
GPS-X will fit your model to the measured data using the objective function
that you select. If you prepare output graphs to display the predicted values of
the model, GPS-X will automatically display the measured values provided in
the .dat file on the graphs.
GPS-X will draw a new curve for the predicted values at each optimization
iteration, in order to track the progress of the optimizer. At the end of the
optimization process, final predicted responses are displayed so that you can
visually assess the fit. An example of this type of graph is shown in Figure
14-3.
PROBABILITY OPTIMIZATION
GPS-X also allows you to perform probability optimizations. This involves
fitting the cumulative probability of simulation results to the cumulative
probability of real data. The cumulative probability is the probability that
values X will have a value less than or equal to a specific value x. It is a
cumulative sum of all probabilities less than or equal to x.
The data requirements for this type of optimization are substantial due to the
need to perform long-term simulations.
Minimizing the difference between cumulative probabilities for real data and
simulation results is achieved by reducing a special weighted error measure.
Both real data and simulation results are first ordered based on absolute
magnitude. Differences are taken between each pair of values in the ordered
lists. The differences are then grouped on the assumption that they are normally
distributed and the average difference for the group is weighted accordingly.
For example, the highest 10 percent of the differences are assumed to have a
probability of occurrence less than about 13 percent. The sum of these
weighted differences serves as the objective function for the optimization. The
net effect of the optimization is to achieve a close fit between cumulative
probability distributions for real data and simulation results.
The model parameter values resulting from this type of optimization may differ
significantly from those obtained from a time series optimization.
The motivation behind DPE is that parameters in process models are often not
constant, but vary with time. For example the oxygen mass transfer coefficient
in an aerated tank is often slowly time-varying.
The length of the time window controls how often the parameters are updated.
The shorter the time window, the more often the parameters are updated.
When using short time windows it may be necessary to filter the data to
eliminate noise so GPS-X does not fit the noise.
To ensure proper termination of the optimization routine when using the DPE
feature, it is suggested that the time window and the communication interval be
chosen such that the time window is an integer multiple of the communication
interval.
The termination criteria found on this form were discussed under Termination Criteria in
this chapter. The form accessed from the More... button in the Static sub-section contains
the simplex method constants. The remaining settings and parameters found in the
Optimizer form are described below. You can access the different sub-sections by scrolling
down the form.
STATIC SUB-SECTION
number of optimized parameters : This sets the number of variables to be adjusted
by the optimizer. It should correspond to the number of parameters specified as
Optimize variables in the Controls Setup window.
so that GPS-X can handle the majority of data sets without having to change
this value.
solution report to file (ON - OFF): If this option is set to ON, the statistical output is
appended to file stats.txt in the current directory.
DYNAMIC SUB-SECTION
DPE timewindow : This is the time window for dynamic parameter estimation.
level of significance. These reference bounds are calculated using the reference
standard deviations. In addition, if this option is ON a chi-square test is
performed on the sum of squares of the standard deviations of the weighted
residuals divided by the reference standard deviations. This option is set to OFF
by default. It does not affect the outcome of an optimization run.
Level of significance: This value is used for computing the reference bounds if
use specified standard deviations as reference is set to ON . This value cannot affect
the outcome of an optimization run.
treat the different target variables as one target (ON - OFF): If there is more than one
target variable and the maximum likelihood objective function is used, this
switch controls whether the different targets are treated as the same target for
the purposes of calculating the degrees of freedom used in the Student’s t-
statistic in the confidence limits calculations. This feature is useful if you have
a number of different target variables that are actually the same variable
measured in different experiments.
when the maximum likelihood or the sum of squares objective functions are
used. It does not affect the outcome of an optimization run.
replication sum of squares ( User Supplied / Calculated ): This option allows the user
to specify whether the replication sums of squares used in the lack of fit test are
user supplied or calculated by GPS-X using repeat measurements.
number of target variables : This is the number of target variables used in the
optimization. It is only used to size the replication sum of squares array and the
degrees of freedom for replication sum of squares array.
PORTMANTEAU SUB-SECTION
portmanteau test on weighted residuals (ON - OFF): This switch turns the
Portmanteau test on or off. The Portmanteau test is used to detect trends in the
weighted residuals. The Portmanteau test is designed for data taken in sequence
(e.g. time or space). If trends are present, the residuals are not independent.
This violates one of the assumptions of the maximum likelihood method and
indicates that the model does not account for all of the non-random variability
in the data. An appropriate message is printed depending upon the outcome of
the test. This test is only reported when the maximum likelihood objective
function is used. It does not affect the outcome of an optimization run.
Optimization Strategies
Before using the optimizer tool to estimate optimal parameter values or optimize
operating conditions, it is usually best to experiment with manual adjustment of the
optimization variables. By conducting interactive simulations you can observe the effects
of the model parameters on the response variables of interest. With this information you
will be able to make better judgements on appropriate variables to use in a parameter
estimation or optimization run.
For example, you can set up an interactive simulation with slider controls for the
parameters and then try adjusting these variables to try and achieve a visually acceptable
fit. You can plot actual data along with the target variables so that you can compare
simulation and actual data. This approach is useful for generating starting guesses for
parameter estimation and process optimization runs.
INTRODUCTION
In this appendix the maximum likelihood method is discussed in more detail.
First a general introduction on parameter estimation is given based on material
found in Bard (1974). This is followed by a detailed discussion of the
maximum likelihood method as implemented in GPS-X. Finally, a brief
description of the sum of squares objective function is given.
PARAMETER ESTIMATION
Parameter estimation is the procedure of fitting a mathematical model of a
process to measured data by calculating optimal estimates of the model
parameters. Parameter estimation differs from simple curve fitting in that the
criterion used to judge the best fit is not arbitrary but is based on statistical
considerations. In addition, the model structure is based on theoretical
principles and the model parameters often have physical significance. In curve
fitting, the choice of model structure is more arbitrary and is often chosen to
simplify the computations. The aim of parameter estimation is to not only fit a
model to data but to calculate parameter values that are good estimates of the
true values of the physical quantities.
n
1 n −1
Lθ ,V1 ,V2 ,...,Vn = 2π − ( nm ) / 2 ∏ V i exp − ∑ eiT V i ei
−1 / 2
(14.6)
i =1 2 i =1
where
This expression is derived by substituting the residual vector, ei for the error
vector in the multivariate normal probability density function (pdf). The error
vector in the multivariate normal pdf contains the differences between the
measured values of the response variables (the variables that we are fitting) and
the true values. See Bard (1974) for details.
GPS-X also assumes that the measurement errors are independent from
observation to observation and from response variable to response variable.
This means that the variance-covariance matrices found in Equation (14.6) are
diagonal but not necessarily equal.
− nm
InL =
2
1 n m
2 i =1 j =1
( )
1 n
In(2π ) − Σ Σ ln σ i2, j − Σ eiT Vi −1ei
2 i =1
(14.7)
where:
1 n (z i , j − f i , j )
2
ω = ∑
2
j γ (14.9)
n i =1 f i, jj
where z i , j is the measured value of response j in experiment i.
Substituting this expression into Equation (14.8) yields the estimate for the
variance that accounts for nonhomogeneous measurement errors:
1 γ n (z − f )
2
s = f i . jj Σ i , j γ j i , j
2
i, j (14.10)
n i =1 fi. j
If Equation (14.10) is substituted into Equation (14.7) the log-likelihood
function becomes:
1 n m 1 n (z i , j − f i , j ) 1 n m
2
lnL = −
nm
(ln(2π ) + 1) − Σ Σ ln Σ γ 2Σ
− Σ γ j , lnf i, j (14.11)
2 2 i =1 j =1 n i =1 f i , jj i =1 j =1
To allow for the possibility that the number of observations is different for each
response variable, Equation (14.11) is re-written as (Steiner et al., 1990):
1 m 1 n j (z i , j − f i , j )2 nj
( ( ) ) −γ
2Σ nj Σ
π jΣ
lnL = − n ln 2 + 1 − n ln lnf (14.12)
j =1
j j
f
γj i, j
i =1 i, j i =1
This is the function that is maximized by GPS-X to fit process models to
measured data and obtain optimal parameter estimates. Equation (14.12) is a
measure of the probability that the measurements were generated by the
process model.
Note that you can set the heteroscedasticity factors or have GPS-X estimate
their optimal values for you.
As process models are generally nonlinear, the parameter values that maximize
Equation (14.12) cannot be determined analytically. An iterative optimization
method is required to maximize Equation (14.12). As mentioned earlier in this
chapter, GPS-X uses the Nelder and Mead simplex method (Press et al., 1986)
for optimization. This method is a type of direct search algorithm that does not
require the calculation of partial derivatives. This is helpful when estimating
parameters in systems of differential equations. The simplex method also has
the advantage that it can handle objective functions containing discontinuities.
This method is generally slower than derivative-based optimization methods,
but can handle a greater variety of objective functions and is often found to be
quite robust in finding solutions. The version of the simplex method
implemented in GPS-X allows for bounds to be placed on the parameters.
Due to the fact that the simplex method is designed for minimization, GPS-X
minimizes the negative of Equation (14.12) to determine the optimal parameter
estimates.
If we make the additional assumptions that all of the variances are equal (i.e.
all responses have same variance) and the variances do not change from
observation to observation (i.e. the heteroscedasticities are all zero) then the
maximum likelihood function reduces to the sum of squares objective function
in the multi-response case. The assumptions used to derive the sum of squares
objective function in the multi-response case do not apply in most practical
situations. Therefore, it is recommended that the maximum likelihood
objective function be used for calibration problems with more than one target
variable.
INTRODUCTION
In this appendix the solution report provided in the Log window after a GPS-X
optimization run is discussed. The solution report provides the user with the
solution found by the optimizer and a number of additional statistics that are
valuable when doing parameter estimation. This report also may be printed to
the stats.txt file. First we discuss the basic report and the detailed
statistical report. This is followed by a summary on using the statistical tests
and a discussion of overparameterization.
Note: In the solution report, the parameters are given generic names and are
numbered according to the order that the parameters are listed in the Control window
containing these parameters. For example, the parameter at the top of the Control
window is labeled Parameter 1.
Many of the statistics in the solution report are organized according to target
variable names. Generic target variable names are used and the names are numbered
according to the order given for the target variables in the target variables form that
is accessed by selecting Target Variables ... from the Optimize drop-down menu. For
example, statistics corresponding to the first target variable in the form are presented
under the heading Target 1.
BASIC REPORT
The basic solution report, which is printed to the Log window, includes the
number of iterations required by the optimizer, the initial and final values of
the objective function, the initial and final values of the parameters (i.e. the
optimization variables), the heteroscedasticity parameter values, and a
summary of the chosen optimizer settings. In addition, the statistics discussed
below are provided if requested in the Optimizer form.
T
∂F ∂F ∂F
∇F (θ ) = , , ..., (14.14)
∂θ 1 ∂θ 2 ∂θ p
The variable F is the objective function. The variables θ1, θ2, …, θp are the
optimization variables. In the case of parameter estimation these variables are
The partial derivatives are calculated numerically using the following forward-
difference formula:
∂F F (θ k + hk ) − F (θ k )
= (14.15)
∂θ k hk
where k = 1,, p and hk is the step or perturbation size. The step size is
calculated using the following formula:
hk = 10 −7 θ k (14.16)
The gradient provided in the solution report is calculated at the solution. If the
solution is a local minimum, the elements of the gradient vector should be
close to zero. Because poor scaling of the parameters and the objective
function can make the gradient appear large, the relative gradient is also
reported. The elements of the relative gradient are calculated by scaling the
gradient elements using the following equation:
θ k ∂F
RelGradk = (14.17)
F ∂θ k
The infinity norm of the relative gradient vector is also reported. If the solution
is a local minimum, this norm should be close to zero.
The gradient is only reported when the report objective function gradient and
Hessian switch in the Derivative Information sub-section in the Optimizer form is set
to ON.
∂f i , j f i , j (θ k + hk ) − f i , jθ k
= (14.18)
∂θ k hk
In this equation fi,j is the jth target variable at the ith data point. The step size is
calculated in the same way as for the gradient.
The sensitivity coefficients are only reported when the report model sensitivity
coefficients switch in the Derivative Information sub-section in the Optimizer form is
set to ON.
∂ 2F ∂ F
2
∂θ 12 ∂θ 1 ∂θ 2
H = (14.19)
∂ F ∂2 F
2
∂θ ∂θ ∂θ 22
2 1
In GPS-X the elements of the Hessian are calculated using the Gauss-Newton
approximation. For the sum of squares objective function, each Hessian
element is defined as:
m n j ∂f ∂f
∂2F
= 2 Σ Σ i , j i , j (14.20)
∂θ k ∂θ l j =1 i =1 ∂θ k ∂θ l
ei , j = z i , j − f i , j (14.22)
The variable zi,j is the measured value of response j at the ith data point.
The Hessian matrices for the other objective functions are not calculated
because they cannot be approximated using the Gauss-Newton approximation.
As a result, they require the calculation of second order sensitivities.
If any of the optimization variables are at their bounds, the elements of the
Hessian involving these variables are zero.
The Hessian matrix is only reported when the report objective function gradient
and Hessian switch in the Derivative Information sub-section in the Optimizer form
is set to ON.
Confidence Limits
GPS-X calculates linear-approximation confidence limits for the parameter
estimates using the variance-covariance matrix. For the sum of squares
objective function, the variance-covariance matrix of the parameter estimates is
defined as (Bard, 1974):
Vθˆ = 2s 2 Hˆ −1 (14.23)
The matrix Ĥ is the inverse of the Gauss-Newton Hessian approximation to
-1
−1
the sum of squares objective function at the solution. The variable s 2 is the
variance estimate for the measurement errors and is defined as:
SS (θˆ)
s2 = (14.24)
n− p
()
where SS θˆ is the value of the sum of squares objective function at the
solution, n is the number of data points (total number considering all target
variables), and p is the number of parameters (i.e. optimization variables).
Vθˆ = Hˆ −1 (14.25)
The matrix Ĥ is the inverse of the Gauss-Newton Hessian approximation to
-1
For both the sum of squares and the maximum likelihood objective functions,
the 100(1-α)% confidence limits for parameter k are:
α = 1−δ (14.27)
The variable se(θˆk ) is the standard error of the kth parameter at the solution. It
is defined as the square root of the (k,k)th element of the variance-covariance
matrix as shown below:
The confidence limits are only reported when the printing of confidence limits
switch in the Confidence Limits sub-section in the Optimizer form is set to ON.
(Vθˆ ) k ,l
(Cθˆ ) k ,l = (14.29)
(Vθˆ ) l ,l (Vθˆ ) k ,k
where (Vθˆ ) k ,l is the (k,l) element of the variance-covariance matrix.
By definition, the elements of the correlation matrix are always between zero
and one. Unless some parameters are on their bounds the diagonal elements are
always equal to one. The off-diagonal elements indicate the degree of
correlation between pairs of parameters. A large off-diagonal element indicates
a high degree of correlation between a pair of parameters. This provides
evidence that some of the parameters in the model are unnecessary and the
model is overparameterized. This may indicate that the model is not adequate
for the task at hand or that the data do not provide enough information to allow
estimation of all of the model parameters (Draper and Smith, 1981).
The variance-covariance and correlation matrices are only reported when the
printing of confidence limits switch in the Confidence Limits sub-section in the
Optimizer form is set to ON.
SS j
R 2j = 1 − (14.30)
SSmean j
It is multiplied by 100 to get a percentage. The variable SSj is the weighted
residual sum of squares for response j and is defined by:
nj
ei2, j
SS j = Σ
γ
(14.31)
f i , jj
i =1
The variable SSmeanj is the total weighted sum of squares corrected for the
mean and is defined below:
SSmean j = Σ
nj
(z i, j − zj)
2
(14.32)
γ
i =1 f i , jj
nj
zi, j
Σ
i =1
γ
f i , jj
zj = nj
(14.33)
1
Σ
i =1
γ
f i , jj
The overall variation explained is calculated as:
Σ SS
j =1
j
R =1−
2
m (14.34)
Σ SSmean j
j =1
The % variation explained is not a model adequacy test but is useful because it
shows how much of the variation in the data is accounted for by the fitted
model. This test is only reported when the maximum likelihood or sum of
squares objective functions are used.
Significance of Regression
This test involves testing the null hypothesis that all the model parameters are
zero against the alternative hypothesis that all the parameters are not zero.
The following sum of squares ratio is calculated for each response variable:
SSreg j
p −1
( F − value ) j =
SS j (14.35)
nj − p
where SSregj is the weighted regression sum of squares for target variable j and
is defined by:
GPS-X reports the F-value for each target variable and reports the probability
that it is from an F-distribution with p-1 and n j − p degrees of freedom. If the
probability is larger than the chosen significance level it provides evidence that
the parameters are all zero and the regression is not significant for the
corresponding target variable. The significance level is entered in the General
Data > System > Parameters > Optimizer form in the Significance Of The Regression
sub-section.
If the probability value is smaller than the significance level it indicates that the
F-value does not follow an F-distribution and therefore we accept the
alternative hypothesis that the model parameters are not all zero. In this case
the regression is significant for the corresponding target variable and the
variation explained by the regression is greater than expected by chance. For a
model to be useful for predictive purposes the F-values should be large and the
probability values should be close to zero.
GPS-X provides messages that summarize the results of the significance test.
The significance test is based on linear regression theory and is only
approximate for nonlinear models.
This test is only reported when the maximum likelihood or the sum of squares
objective functions are used.
For each target variable, the following sum of squares ratio is calculated:
SSlof j
n j − p − repdof j
( F − value ) j = (14.37)
SSrep j
repdof j
The variable SSrepj is the weighted replication sum of squares for target
variable j and is calculated as:
SSrep j = Σ Σ
η nrν (z u ,v − zv )
2
(14.38)
γ
v =1 u =1 f v , jj
where η is the number of independent variable values for which there are
replicates, nrv is the number replicates for the vth value of the independent
The variable repdofj is the degrees of freedom for the weighted replication sum
of squares for target variable j. It is defined as:
η
repdof j = Σ nrv − η (14.39)
v =1
As mentioned earlier, in this chapter, repeat measurements are inserted into
GPS-X by placing measurements very close together in time in the .dat file.
See the previous Lack of Fit sub-section, located in this chapter, for details.
The weighted lack of fit sum of squares for the jth target variable, SSlofj, is
calculated as:
As mentioned in this chapter, the user also can provide the replication sum of
squares and the replication degrees of freedom in the Lack Of Fit sub-section of
the Optimizer form. In order for these values to be used by GPS-X, the replication
sum of squares option in the Lack Of Fit sub-section of the Optimizer form must be
set to User Supplied .
The sum of squares ratio or F-value follows an F-distribution if the errors in the
measurements are independent, normally distributed random variables and if
the weighted lack of fit sum of squares is not much larger than the weighted
replication sum of squares.
GPS-X reports the F-value for each target variable and reports the probability
that it is from an F-distribution with n j − p − repdof j and repdof j degrees
from freedom. If the probability for a certain target variable is smaller than the
chosen significance level, it indicates that there is a lack of fit associated with
this target variable. The significance level is entered in the General
Data>System>Parameters>Optimizer form in the Lack of Fit sub-section.
GPS-X provides messages that summarize the results of the lack of fit test. The
lack of fit test is based on linear regression theory and is only approximate for
nonlinear models.
This test is only reported when the maximum likelihood or the sum of squares
objective functions are used and the lack of fit switch in the Lack Of Fit sub-
section in the Optimizer form is set to ON.
100(z i , j − f i , j )
%E i, j = (14.41)
z i, j
where %Ei,j is the percent error between z i , j and f i , j .
Residuals
As discussed earlier the residuals are defined as:
ei , j = z i , j − f i , j (14.42)
They are an estimate of the error in the measurements assuming that the model
is correct.
The weighted residuals and standardized residuals are only reported when the
maximum likelihood objective function is used. The weighted residuals are
defined as:
(z − f i, j )
(e )
i , j wt =
i, j
γ (14.43)
f i , jj
These are scaled residuals that are not as dependent on the magnitude of the
measurements and the predicted values as are the unscaled residuals.
(e ) =
(z i, j − fi , j )
(14.44)
i , j std
si , j
The variable Si,j is the estimated variance of response j for the ith data point
and is defined in Equation (14.10).
The standardized residuals and their associated plots can be used to check
whether the residuals are independent and normally distributed. This
assumption is fundamental to the development of the maximum likelihood
objective function used in GPS-X. The standardized residuals are normalized
and should have a mean of zero and a variance of one if the residuals are
normally distributed.
To check the assumption that the errors are normally distributed, the
standardized residual plots should be examined to see if the residuals are
randomly scattered about zero. In addition, the values of the standardized
residuals should be examined to check whether approximately 95 percent of the
residuals lie between +2 and -2.
The standardized residual plots are scaled to fit in the Log window. The largest
standardized residual for each response variable is represented by the
maximum number of " * " characters, which is seven. The remaining
standardized residuals for a response variable are scaled relative to this
maximum residual for the purposes of calculating how many " * " characters to
print. You should consult the actual values of the standardized residuals
provided in the Log window to determine whether the actual magnitudes of the
residuals for a response variable are large.
If the assumption that the residuals are independent and normally distributed is
violated it provides evidence that our model is inadequate to represent the
experimental data. If the process model structure is correct, it should account
for the non-random variability in the data.
Portmanteau Statistic
The Portmanteau test is used to detect trends in the weighted residuals. If
trends are present, the residuals are not independent. This violates one of the
assumptions of the maximum likelihood method and indicates that the model
does not account for all of the non-random variability in the data. The
Portmanteau test is designed for data taken in sequence (e.g. time or space).
Q j = n j Σ ( ρ j (k ))
τ
2
(14.45)
k =1
where nj is the number of data points for response j, τ is the number of time
lags, and ρj(k) is the sample autocorrelation among the weighted residuals up to
lag k for response j.
Ω j (k )
ρ j (k ) = (14.46)
Ω j (0 )
Ω j (k ) =
1 nj − k (
z
i+ k , j − f i+ k , j ) (z − f i , j )
Σ
i, j
( )
(14.47)
nj i =1
γ
f i+ k , j j
( f i, j )γ j
The sample autocorrelations are approximately independent, normally
distributed random variables with mean zero and a variance of 1/nj if the
weighted residuals are independent and identically distributed (Brockwell and
Davis, 1996). This approximation gets better as the number of measurements
increases. Although the residuals themselves are not necessarily identically
distributed (they can have different variances), the weighted residuals should
be identically distributed because they are scaled.
be independent and normally distributed with mean zero and variance one.
Due to the fact that the Portmanteau statistic is a sum of squares of these
variables, it is distributed as a chi-squared variable.
GPS-X reports the Portmanteau statistic for each target variable and reports the
probability that it is from a chi-squared distribution with τ degrees of freedom.
If the probability for a certain target variable is smaller than the chosen
significance level it provides evidence of a trend in this target variable's
weighted residuals. The significance level is entered in the General Data > System
> Parameters > Optimizer form in the Portmanteau sub-section.
GPS-X provides messages that summarize the results of the Portmanteau test.
This test is only reported when the maximum likelihood or the sum of squares
objective functions are used and the portmanteau test on weighted residuals switch
in the Portmanteau sub-section in the Optimizer form is set to ON.
OVERPARAMETERIZATION
Overparameterization occurs when there are more parameters in the process
model than necessary to fit the data. This situation leads to correlations
between model parameters as mentioned earlier in the context of the correlation
matrix. As a result the objective function near the solution to the parameter
estimation problem has elongated contours and the solution is not very
sensitive to changes in certain parameters.
Appendix C: Nomenclature
α = significance level for the parameter estimates
C^ = correlation matrix at the solution
θ
δ = confidence coefficient
ei = m x 1 residual vector that contains the differences between the measured values of
the response variables and the values predicted by the mathematical process
model
ei , j = zi, j − f i, j
%Ei,j = % error between the measured and predicted values at point for response j in
experiment i
fi,j = value of response variable j predicted by the process model in experiment i
F (θ k ) = objective function evaluated at θk
∂F = the partial derivative of the objective function with respect to parameter θk
∂θ k
∂f i , j = partial derivative of respect to fi,j with respect to parameter θk
∂θ k
∂2F = second partial derivative of the objective function with respect to θk and θl
∂θ k ∂θ l
Appendix D: References
Bard, Y. A., Nonlinear Parameter Estimation. Academic Press, New York (1974).
Draper, N. R., and Smith, H. Applied Regression Analysis. John Wiley & Sons, (1981).
Reilly, P. M., Barjramovic, R., Blau, G. E., Branson, D. R., and Saverhoff, M. J.
Guidelines for the Optimal Design of Experiments to Estimate Parameters in First
Order Kinetic Models. Can. J. Chem. Eng., 55, 614 (1977).
Steiner, E. C., Rey, T. D., and McCroskey, P. S. SimuSolv Reference Guide. The Dow
Chemical Company, Midland, MI, Vol. 2 (1990).
Chang, I.S., Lee, C.H., Ahn, K.H. (1999). Membrane Filtration Characteristics in
Membrane-Coupled Activated Sludge System: The Effect of Floc Structure on
Membrane Fouling. Separation Science and Technology, 34(9), pp.1743-1758.
Choi, S., Yoon, J., Haam, S., Jung, J., Kim, J., Kim, W. (2000). Modeling of the
Permeate Flux during Microfiltration of BSA-Adsorbed Microspheres in a Stirred
Cell. Journal of Colloid and Interface Science, 228, pp. 270-278.
Garcia, G.E., Kanj, J. (2002). Two Years of Membrane Bioreactor Plant Operation
Experience at the Vejas Tribe Reservation. Proceedings of the Water Environment
Federation’s 75th Annual Technical Exhibition and Conference, September 28th –
October 2, Chicago, Illinois.
Merlo, R.P., Adham, S., Gagliardo, P., Trussell, R.S., Trussell, R. (2000). Application of
Membrane Bioreactor Technology for Water Reclamation. Proceedings of the Water
Environment Federation’s 73rd Annual Technical Exhibition and Conference,
October 14 - 18, Anaheim, CA.
Shin, H-S., Lee, W-T., Kang, S-T. (2002). Formation of Dynamic Membrane in
Submerged Membrane Bioreactors (MBRs). Proceedings of the Water Environment
Federation’s 75th Annual Technical Exhibition and Conference, September 28th –
October 2, Chicago, Illinois.
Wallis-Lage, C., Steichen, M., deBarbadillo, C., Hemken, B. (2005). Shopping for an
MBR – What’s for sale? Water Environment & Technology, 17(1), pp. 31-35.
CHAPTER 15
Miscellaneous
The parameters for this feature can be accessed at the bottom of the General Data > System >
Parameters > Simulation Set up form (Figure 15-1). The Real Time Synchronized Mode
parameter will switch the real time clock ON or OFF. When the real time clock is ON, the
simulation speed is equal to a multiple of real time. The multiplication factor used is
specified by the Real Time Accelerator Factor . For example, setting the accelerator factor to
24 causes one simulation day to take one real hour. Note that the real time clock feature
forces the Communication interval to be equal to one second.
Steady-State Solver
The steady-state solver used in GPS-X is a robust routine based on a direct search
algorithm (that is, no gradients are used). Sometimes, the steady-state convergence
appears slow or diverges due to a problem in the way that the model is set up. For
example, if the underflow rate from a settler is too low, that settler will begin to fill up
with solids. Since the concentration ranges of solids in the ten layers become large, the
changes in these layers between loops of the steady-state solver also become large which
may cause slow convergence or divergence.
In all cases of poor convergence, the user should closely examine all the unit processes
for proper specification. The easiest way to do this is to examine the dsum# variable
associated with each unit process where # represents the overflow stream label. You can
do this by issuing the display command in the Command line of the Simulation Control
window. The sum of the individual dsum values equals the dsum value displayed in the
Log window. Having done that, there are a number of parameters associated with the
steady-state solver that can be fine-tuned (See Figure 15-2 and Figure 15-3).
The forms shown in Figure 15-2 and Figure 15-3 are accessed by selecting General Data >
System > Parameters > Steady-State.
The parameters in these forms are described below.
The first menu item, number of retries on iteration indicates the number of times the steady-
state solver will try to reach convergence if it fails.
The error limit on individual variables is a tolerance below which the steady-state ignores a
variable. If the steady-state solver is making changes to a state variable that become
smaller than this tolerance, the solver will ignore the variable, assuming it is at steady-
state.
When the solver achieves a sum of state variable derivatives below the iteration termination
criteria, a steady-state convergence is triggered. The default value is 10.0, but in some
systems it may need to be increased when in single precision.
The contract constant and expand constant refer to the step size made by the steady-state
solver between iterations. A larger step is taken if an improvement is found, while a
smaller step is taken if no improvement is found. The performance of the steady-state
solver can be greatly affected by these parameters. The expansion factor is limited to the
maximum step size in one iteration . This maximum step size is dampened as the steady-state
solution is reached. The damping factor on final approach will control the damping effect. A
zero value means no damping, while a value of 1.0 means that the maximum step size is
limited to one tenth of the maximum step size.
The initial step size that the steady-state solver takes is governed by the initial perturbation
parameter. This number is normally set smaller than the maximum step size to prevent a
poor initial guess by the solver.
The next four items shown in these forms deal with other termination criteria and output
control. The status of the solver is printed at a frequency controlled by the convergence
output interval , while the steady-state loop counter initial value specifies which iteration loop
will be first printed to the simulation Log window. The maximum number of iterations limits
the steady-state solver to attempting only this many iterations. The loop counter is reset
after each retry. Another steady-state termination criteria is the maximum number of
unsuccessful iterations which will cause the steady-state solver to terminate if
improvements in the value of the sum of the derivatives is not made within this number
of loops.
The trim parameters shown here refer to the output of the ACSL trim function. This is an
alternative steady-state solver, which uses the Jacobian matrix for accelerated searches.
However, this gradient type routine was not found to be very robust with the large models
encountered within GPS-X.
Numerical Control
The numerical issues discussed in this chapter are important because the success of a
simulation depends on the input data and the models and on the numerical solver used to
do the calculations.
Any modeller using dynamic simulation should have an understanding of the underlying
numerical methods used to solve the equations to properly interpret the results.
Understanding the numerical methods used will help to identify problems that are
numerical in nature.
The choice of which numerical solver to use is important. There are several numerical
integration methods available in GPS-X. The numerical solver can be set in the Simulation
Control window or can be saved into a scenario or the layout by setting it in General Data >
(Figure 15-4).
System > Input Parameters > Integration Control
Generally the default integration method, Runge-Kutta-Felberg(2), works very well for
most models; however, there are situations where the solver may need to be changed. In
general the trade-off is between numerical accuracy and simulation speed. The fixed step
algorithms (i.e. Euler, Runge-Kutta(1), and Runge-Kutta(2)) are faster than the variable
step algorithms (i.e. Adams-Moulton, Runge-Kutta-Fehlberg(1), Runge-Kutta-
Fehlberg(2), Gear's Stiff, and Differential Algebraic Solver) but are not as accurate.
If the system is stiff then you may need to use the Gear's Stiff algorithm. A stiff system is
one in which there are processes occurring at very different time scales (e.g., a very fast
process such as the transfer of oxygen into a tank and a very slow reaction occurring at
the same time).
In addition to the numerical solvers, the user can change some of the numerical
parameters that control the simulations. Changing the default parameters however
requires extreme caution because in some cases it may introduce errors in the results. The
numerical parameters are accessed by making the following selections: General Data >
System > Parameters > Numerical . The form is shown in Figure 15-5.
These parameters include bounds on flow, state variables, state derivatives, parameters,
exponentials, and volumes. The parameters for the implicit solver (IMPL - used for
solving implicit functions evaluated as residuals, where the residuals are reduced to zero)
used in the exact code option can be set here. Some of the parameters are discussed in
more detail in the sub-sections below.
DO
F=
DO + KOH + padbyz
SPEED SUB-SECTION
The parameters in the Speed sub-section of the Numerical form concern the
pump flow rates used in all the objects. Since the switching of pumps on and
off introduces sharp changes in the flows, the numerical integration routine
may require a very small step size to reduce the numerical error. In some cases,
these small step sizes will result in a very slow simulation. If the smooth pump
discharge at discontinuities logical is turned ON (default is OFF), then the pumped
flow rate is ramped up to the specified amount as follows:
1
Q= par
− par •t −
1+ e 2
where
Large Models
Although GPS-X allows the user to build very large and complex layouts, there are some
restrictions. First, the simulation language used, ACSL, currently has a limit on the
number of discrete blocks of code that can be specified. What this means to the user is
that the number of automatic controllers for a given layout cannot exceed 25. Since a
number of objects have built-in controllers (e.g., settler has a controller for both the
pumped flow and underflow), the user can quickly use all the allowable discrete code
blocks. To circumvent this problem, the user can select either the Big option, which
combines all the automatic controller code into one discrete block, or the Big+ option,
which disables all controllers. In selecting the Big option, the user can no longer specify
the sampling time for each individual controller loop. One sampling interval will override
the rest. This sampling interval (controller sampling time) is found under General Data >
System > Parameters > Miscellaneous .
Integration Considerations
If you suspect that the simulation results are not accurate, you should first
check that the physical dimensions of the process objects and the values of the
process flows are reasonable. A numerical value may have been entered
incorrectly.
If you are confident that the model parameters are reasonable then the next step
is to determine whether a modelling simplification or numerical problem is
leading to inaccurate results. Some helpful information is listed below:
• If you suspect that the simulation results are not accurate, you may wish to
try the Exact code option. (Build > Code menu item). The Quick option
(default) results in a faster simulation but is not as accurate when recycle
flows are present. When the Quick option is used the recycle flows at each
time step are simply the values taken from the previous time step. When the
Exact option is used the recycle flows are calculated exactly using an
implicit nonlinear equation solver. In most situations using the Quick option
is acceptable, because the integration time steps are small and recycle flows
usually don't change dramatically. In an application with a number of
recycle flows and sudden extreme dynamic changes this simplification may
cause some problems.