Você está na página 1de 146

INSTALLATION

AND USER
GUIDE

Copyright WRc plc


The contents of this manual and the accompanying software are the copyright of WRc
plc and all rights are reserved. No part of this publication may be reproduced, stored
in a retrieval system or transmitted, in any form or by any means electronic,
mechanical, photocopying, recording or otherwise, without the prior written consent of
WRc plc. The information contained in this manual is confidential and restricted to
authorised users only.
This manual and the accompanying software are supplied in good faith. While WRc
plc have taken all reasonable care to ensure that the product is error-free, WRc plc
accepts no liability for any damage, consequential or otherwise, that may be caused
by the use of either this manual or the software.
Trademarks
Windows is a registered trademark of Microsoft Corporation.
IBM is a registered trademark of International Business Machines Corporation.
WRc plc
Frankland Road
Blagrove
Swindon
Wiltshire SN5 8YF
United Kingdom
Tel: +44 (0)1793 - 865185
Fax: + 44 (0)1793 - 865001
E-Mail: STOAT@wrcplc.co.uk
www.wrcplc.co.uk/products/stoat

TABLE OF CONTENTS

1.
1.2

SOFTWARE AND HARDWARE REQUIREMENTS ....................................... 1


INSTALLATION........................................................................................... 1

1.3 RUNNING STOAT........................................................................................... 9


1.4 PROBLEMS WITH INSTALLING STOAT .................................................... 11
1.4.1
A message appears that there is not enough disk space............... 11
1.4.2
A message appears that a file is in use.......................................... 11
1.5 UN-INSTALLING STOAT ............................................................................. 12
2.

INTRODUCTION ........................................................................................... 14
2.1
WHAT IS STOAT?............................................................................. 14
2.2
SOME HISTORY ................................................................................ 14
2.3
CONVENTIONS USED IN THIS MANUAL ........................................ 15

3.

GETTING STARTED..................................................................................... 16
3.1
LOADING STOAT AND CREATING A SEWAGE WORKS ............... 16
3.2
BUILDING UP THE WORKS FLOWSHEET ...................................... 17

4.

BUILDING A WORKS................................................................................... 31
4.1
Introduction ......................................................................................... 31
4.2 BUILDING A MODEL ........................................................................... 33
4.2.1 Data Preparation ............................................................................... 33
4.2.2 Data Requirements............................................................................ 33
4.3 - DATA REQUIREMENTS OF INDIVIDUAL UNIT PROCESS MODELS 36
4.3.1 Overflow Separators.......................................................................... 36
4.3.2 Storm Tank........................................................................................ 36
4.3.3 Primary Tanks ................................................................................... 37
4.3.4 Wet Wells .......................................................................................... 37
4.3.5 Balancing Tanks ................................................................................ 38
4.3.6 Activated Sludge / Oxidation Ditch and Secondary Settlement ......... 38
4.3.7 Biological Filters and Humus Tanks .................................................. 39
4.3.8 Mesophilic Anaerobic Digestion......................................................... 39
4.3.9 Thermophilic Aerobic Digestion ......................................................... 39
4.3.10 Separator......................................................................................... 39
4.3.11 Black Box......................................................................................... 39
4.3.12 PID Controller .................................................................................. 39
4.3.13 Predicting Performance in Storms: Urban Pollution Management... 40
4.4 EXAMPLE TRUMPTON SEWAGE TREATMENT WORKS .............. 40
4.5 MODELLING NON-STOAT STANDARD PROCESSES AND PRACTICES
...................................................................................................................... 43

4.5.1 Return Of Storm Tank Contents ........................................................ 43


4.5.2 Alternatives To Single Biological Filtration......................................... 44
4.5.3 Grit Removal ..................................................................................... 44
4.6 TESTING THE MODEL ........................................................................ 44
4.6.1 Consistency and reasonableness...................................................... 44
4.6.2 - Calibration and Verification ................................................................ 45
4.7 DOCUMENTING A SIMULATION ........................................................ 46
4.7.1 Model Building ................................................................................... 46
4.8 COMMON PROBLEMS........................................................................ 48
5.

USING STOAT TO MODEL A WORKS........................................................ 50


5.1
RUNNING A SIMULATION................................................................. 50
5.2
LOOKING AT RESULTS .................................................................... 55
5.2.1
Viewing results during a simulation ................................................. 55
5.2.2
Customising a graphs appearance................................................. 58
5.2.3
Viewing results at the end of the simulation ................................... 60
Viewing Stream Results ................................................................................ 60
Viewing Process Results ............................................................................... 61
5.2.4
Some considerations when viewing results..................................... 61
5.3
SAVING YOUR WORK....................................................................... 62

6.

MENUS WITHIN STOAT............................................................................... 64

7.

STREAMS..................................................................................................... 75
7.1
CREATING A STREAM ...................................................................... 76
7.2
NAMING THE STREAM ..................................................................... 77
7.3
CUSTOMISING THE STREAM APPEARANCE ................................. 77
7.4
DEFINING INITIAL CONDITIONS ...................................................... 78
7.5
SELECTING STOAT OUTPUT........................................................... 79
7.6
VIEWING RESULTS........................................................................... 82
7.7
CONVERTING STOAT STREAMS..................................................... 82
7.8
EXPORTING TO SEWERAGE MODELS ........................................... 83

8.

PROCESSES IN THE TOOLBOX................................................................. 85

APPENDICES
APPENDIX A PROGRAM LIMITS .................................................................... 89
APPENDIX B TIPS FOR EFFICIENT RUNNING .............................................. 90
APPENDIX C STOAT DEFAULT FILES (THE STOAT.INI FILE) ..................... 91
APPENDIX D ERROR MESSAGES.................................................................. 93
APPENDIX E GENERAL PROTECTION FAULTS ......................................... 101
APPENDIX F USING THE COPY DATABASE UTILITY ................................ 102
APPENDIX G SENSITIVITY STUDIES ON MODEL PARAMETERS ............. 107
G.1 Introduction........................................................................................... 107
G.2 Diurnal load variations .......................................................................... 108
G.2.1 Influent Sewage To The Primary Tank .............................................. 108
G.2.2 Influent Settled Sewage To The Activated Sludge Plant.................... 109
G.3 Primary settlement tank ........................................................................ 110
G.3.1 Design Of The Example Primary Settlement Tank ............................ 110
G.3.2 Sensitivity Tests................................................................................. 112
G.3.2.1 Tank mixing characteristics ............................................................ 112
G.3.2.2 Influent sewage characteristics....................................................... 114
G.3.2.3 Settling velocity parameters............................................................ 116
G.3.3 Storm Event....................................................................................... 118
G.3.3.1 Model set-up ................................................................................... 118
G.3.3.2 Model response .............................................................................. 122
G.4 Activated sludge plant............................................................................... 125
G.4.1 Design Of The Example Activated Sludge Plant................................ 125
G.4.2 Sensitivity Tests................................................................................. 128
G.4.2.1 Nitrification rate............................................................................... 129
G.4.2.2 SSVI3.5 .......................................................................................... 129
G.4.2.3 The settling velocity characteristic of low solids concentration ....... 133
G.4.2.4 Threshold suspended solids concentration for settlement .............. 135
G.4.2.5 Temperature ................................................................................... 136
G.4.3 The Effect Of Low Dissolved Oxygen Concentrations ....................... 138
G.4.4 Ammonia Spike.................................................................................. 142

INSTALLATION AND USER GUIDE

1.

SOFTWARE AND HARDWARE REQUIREMENTS

STOAT runs under Microsoft Windows 95/98/ME/NT 4/2000/XP. You must have this on
your computer to use STOAT. You must have an IBM compatible PC with a Pentium
processor and at least 32 MB of memory (preferably 64 MB or more). You will require at least
100 MB of free disk space. When running STOAT you will require additional disk space to
store your models and results. You will also require a 'mouse' and a VGA or SVGA screen
and video adapter.
You should have the following for STOAT:
One CD containing the STOAT program.
One dongle to allow STOAT to run.
A set of 3 manuals - Installation and User Guide (this document), Process Model Descriptions
and Tutorials Guide. These manuals are also provided in electronic format on the CD.

1.2 INSTALLATION
Depending on your PC settings the CD may automatically start after you placed it in your CD
player, in which case you will see the following screen:

or you will need to start the program yourself.

There are many ways in Windows to do this, but the two simplest are:

Use Windows Explorer (or its equivalent: NT Explorer under Windows NT, for example).
Go to the CD drive, and double-click (some versions of Windows may only require a
single-click) on the file SETUP.EXE.
Use the [Start] button, locate Settings/Control panel/Add/Remove programs and then
Install. This will take you through a Microsoft series of screens to locate and install
STOAT.

The setup program will now copy its own files on to your own PC. You will see the following
screen:

Once this is finished the STOAT install screen will appear:

The first screen will allow you to change the default installation location for STOAT:

If you wish to install STOAT to a directory other than the recommended default, click on the
Browse button and the following screen is displayed to allow you to choose the required
directory. (The screen details will vary with your version of Windows)

You may then choose whether to install all the STOAT files, the minimum necessary, or your
own choice:

If you select Custom you will be given the following screen to change the choices:

Next you will be able to change the Program Folder used to contain the icons and short-cuts
for running STOAT:

Once you have chosen the required directory, STOAT will display the following screen
updating you on the status of the STOAT installation

If you are installing STOAT on a network you may want a common copy of the program, with
each user having their own private set of datafiles. There is more information on the CD in the
directory \Network, which also contains the networked version of STOAT, for which you will
need a network dongle.
If a file is in use on your PC you may get a warning message, similar to that below. It may
vary, depending on your operating system. It is usually safe to select No or Ignore (the
choice of button will vary, depending on the circumstances for this kind of message.)

Finally, you get the choice to install STOAT using US or metric units as your default;

Thats it! STOAT has finished, and the final screen should be:

You should now check that your computer is set up to use a period as a decimal separator.
You do this using the Windows program Control Panel. On most PCs this program is installed
either in the Main or the Accessories group. In the screenshot below Control Panel is located
in the Main group. From the Control Panel select the International icon, and that the decimal
separator (under Number format) is set as a period. You can see the screens involved in the
series of screen shots below.

Note that the decimal separator must be the same under both Number and Currency, and
must not be the same as the thousand separator.

1.3 RUNNING STOAT


Before running STOAT ensure that the security dongle is inserted into the printer port on your
PC. You may have to tighten the screws on the dongle to make sure that the electrical
connection between the dongle and the printer port are reliably completed. Note that you can
plug your printer into the back of the dongle.
STOAT can be run from the [Start] button, under the Programs entry. The location may vary,
depending on your operating system and any changes you may have made during
installation.

The default, under Windows 95/98/ME, will look like the following:

Double-click with the mouse on this icon to run STOAT. Once STOAT is loaded you will have
the following screen in front of you.

You now have a working copy of STOAT. The Tutorials will help you to use STOAT. The
equations describing the STOAT process models can be found in the Process Model
Description, this also describes calibration procedures and may help with understanding
unexpected simulation results.

10

1.4 PROBLEMS WITH INSTALLING STOAT


1.4.1

A message appears that there is not enough disk space

There is not enough space on the disk for you to load STOAT. You will have to leave STOAT
and make sufficient disk space available.
1.4.2

A message appears that a file is in use

Answer Ignore. The file will not be installed, but since it is in use you know that you already
have it.
1.4.3

Dongle is inserted but the program does not run

1.

On some computers the connection between the dongle and the printer port is
incomplete unless the dongle is firmly screwed into place on the port.

2.

The dongle is designed so that a printer can be plugged into the back of the dongle.
Some printers can switch off the printer port unless the printer is on. If you are having
this problem either disconnect the printer completely or switch the printer on while you
are running STOAT.

3.

Some PCs (we know of this affecting some IBM PS/2 machines) allow you to define the
access level allowed to the printer port. Check your computer setup (this option may be
offered during the various checks made when you switch your computer on; otherwise it
will require a special setting up program, normally supplied with the computer) and
adjust the settings of the printer port - consult your computer manual for advice.

4.

While the dongle is inserted you may find that some networking programs will not run
correctly, if you are connecting to the network through the printer port. There is currently
no work-around to this problem, other than inserting an expansion card in your
computer as a dedicated network interface card.

11

1.5 UN-INSTALLING STOAT


Use the uninstall option provided with Windows. The following screen shots show how.

12

13

2.
2.1

INTRODUCTION
WHAT IS STOAT?

STOAT is a dynamic sewage treatment works modelling package. This means that you can
build up a description of a sewage works, defining the treatment processes, the way that they
are connected and operated, and then predict the performance of the works over a period of
time. This does not make STOAT a panacea for design work. STOAT takes care of solving
differential equations describing process performance. You, the user, are responsible for
selecting processes, deciding how they shall be connected, sized and operated. You are also
responsible for interpreting the results, and deciding which to accept.
STOAT may be used for a number of applications. These include:

2.2

Designing new sewage treatment works.


Designing extensions to existing sewage treatment works.
Developing new operational practices.
Testing 'What If' situations.
Process audits.
Catchment planning.
SOME HISTORY

Sewage flow and strength varies over time daily, weekly and seasonally. Designing and
assessing sewage treatment works must take this into account. Without access to computer
models the approach has been to build in over-capacity and design the sewage works on
average flow and load. The design methods considered each process in isolation, generally
ignoring the effect of recycle streams, such as co-settling crude sewage and waste activated
sludge.
The first computer models were intended to automate the manual design methods, with the
inclusion of the recycle streams. Following on from this optimisation methods were added to
help design the 'best' sewage works. Examples of this type of software are CAPDET (US)
and STOM (UK). The simulation results were stated to be trusted as averages for
performance over periods of a month or longer they could not be used to assess day-to-day
performance.
This is what the dynamic models address hourly variations in sewage quality and works
performance. This makes dynamic models ideal for design work that reduces the overcapacity in new designs, or to assess the over-capacity in existing works. Dynamic models
can also provide realistic predictions for maximum and minimum effluent quality
concentrations, as well as the average; and with some additional work the model predictions
can be transformed into 95%-ile values. But the models are not limited to the short-term. They
can be applied to modelling weeks, months or years of works performance, allowing you to
study storms, recovery from storms, the effect of differing sizes of storms and periods
between the storms. The results from the simulations can be passed into river quality models
to predict the effect on river quality, studying the best treatment practice not just for a sewage
works but for the river catchment. In addition predictions from sewerage quality models can
be used as inputs to the dynamic models, thereby assessing the effect of sewerage schemes
on the receiving works.

14

STOAT can be integrated with the leading sewerage quality models, MOSQITO and
MOUSETRAP, and the river quality model MIKE 11. STOAT began development in 1988 as
part of the UK Urban Pollution Management (UPM) programme. UPM addressed the need to
model catchment basins rainfall models, sewerage transport, sewage treatment, and river
quality and defined a standard method for carrying out such assessments. STOAT was
validated against sewage works data through 1990-1992, and used with the UPM triad of
models MOSQITO, STOAT and MIKE 11 in 1992-1993. In 1993 further development
began on STOAT, uprating the user interface. This development continued to produce the
first version of STOAT which was released in November 1994 with a spreadsheet interface.
Further developments continue to upgrade and improve the software.
2.3

CONVENTIONS USED IN THIS MANUAL

Terms in CAPITAL LETTERS and enclosed by brackets, such as [RETURN] or [F1], refer to
single keys on the keyboard. Thus [RETURN] is the carriage-return key, and [F1] is the
function key labelled F1, usually (but not always) found on the top row of keys on the
keyboard.
We assume that you are familiar with using your computer and the Windows operating
system. If you are not then we recommend you consult the Windows manual that came with
your computer, and use the training facilities including the games that are on the
computer.

15

3.

GETTING STARTED

This section helps you to achieve a general overview of how to use STOAT by describing
how to create a simple sewage works, how to enter data and run the model as well as looking
at the results.
STOAT can be thought of as modelling a sewage works in four phases:
Works creation
Simulation definition
Simulation runs
Results.
Works creation also known as the Design phase is discussed in Section 3.1, and describes
how you connect processes together to define the sewage works. This phase is begun once
you have chosen to build a new works, or to open a works that you had created previously.
Should you change the details of an existing works then STOAT will flag this and you will
have to save the works with a new name as a new works.
Simulation definition is begun by selecting a new run, or opening an old run that was saved
previously but not actually run. At this point you define the length of the run, sewage
temperatures, operational conditions and initial conditions. The simulation definition phase is
over once you begin to run the simulation. You can also select what run data you wish to
have saved for later examination, and for which streams you wish to have results displayed
during the run.
Simulation runs start once you select Run from the STOAT menu. After the run has
commenced, you may PAUSE the simulation and change the operational conditions or the
sewage and process data; you can change the initial conditions, but the change will not be
recognised by STOAT (since the run has started, the initial conditions are no longer required);
but you cannot increase the length of the simulation or change works-related parameters.
You can STOP the simulation at any point; once stopped you may not restart. (If you wish to
restart you must pause the simulation.) During the simulation you can elect to look at the
results in flowstreams, and to change the way that the results are viewed (graphs, tables or
statistics); if you decide to look at a stream after the simulation has started then you see only
the data calculated after that point.
Results are available after you have stopped a simulation, or if you open a run that has been
previously completed and saved. In results mode you are not able to make changes to any of
the data. However, you are able to copy and to paste results to a spreadsheet for further data
manipulation.
3.1

LOADING STOAT AND CREATING A SEWAGE WORKS

Run STOAT from the Windows Program Manager. You will have a short wait while STOAT
loads, and then you will be faced with a blank screen, with a menu containing two items, 'File'
and 'Help.'

16

You can create your sewage works by selecting 'New works' from the 'File' menu.

You will be asked to give this works a name. You can choose any name you want 'Works 1',
'Scottish works #1', or anything else. If you press [RETURN] you will accept the default name
'Works 1', 'Works 2', and so on. You can use the [BACK SPACE] and [DELETE] keys to
remove the default name, and then type in your own name. Press [RETURN] or click on 'OK'
to tell STOAT you are finished.

It is recommended that you give each model a recognisable name for ease of reference later
on in the work cycle.
3.2

BUILDING UP THE WORKS FLOWSHEET

You are now presented with a blank 'drawing board' and a list of processes.

17

Top menu

Process toolbox

Drawing
board

Using the mouse, select any process from the 'Process toolbox.' Keeping the left mouse
button pressed down, move the mouse pointer back to your 'drawing board', and position the
process wherever you want. Release the mouse button, and you will see the process appear
on the drawing board.
As an example, select the 'Influent' process and place this on the drawing board. Now
select the primary tank and place this on the drawing board.
You should now have a screen that looks like the figure below. There is one small line
connected to the 'Influent' symbol, and three connected to the 'primary tank' symbol. These
allow you to connect the influent to the primary tank, and to define the primary tank effluent
and sludge.

Place the mouse pointer over the influent exit line, until the pointer changes from an
arrow to cross-hair. (Depending on your screen resolution and mouse software the crosshair may be a fat cross, either white or black, rather than a true cross-hair.) Click with the
left mouse button. This marks the start of a connecting stream. Keeping the left mouse
pressed down, move the cross hairs over to the primary tank influent the small line
on the left of the primary tank. The cross-hair will change to a chain-link symbol when
you can make a connection. Let the left mouse button go. You have now connected the
influent to the primary tank.
You must do the same for the primary tank effluent and sludge they must have
streams connected to them. Leaving them as stub lines will cause an error when you try to
run STOAT.
18

Notice the principle for connecting processes by streams the direction is from the first
process to the second. You will only get the chain-link symbol if you have placed a stream
over a legal process influent. You will get a cross-hair over both influents and effluents, but
when you select an influent and try to draw the connecting stream nothing will happen. It is
important to note that you can connect a stream to a process but you cannot move a process
onto a stream.
If you draw a stream going 'nowhere' and then wish to connect it a process, select the stream
by pointing to it and clicking the left mouse button. It will change from a solid line to a dotted
line, and there will be small nodes at either end of the stream. Select the free end, and by
holding the left mouse button down you can extend the stream to the process you wish to
connect to. Notice that you now have a node in the middle of your stream. This is a bend. By
selecting the bend you can move the stream around. If you wish to insert further bends, place
the mouse at the point where you want the bend, then click with the right mouse button. You
will be faced with a menu, amongst which is 'Insert bend.' Select this to insert a bend. On this
menu you can also see how to delete bends, delete the stream, and change the style. This
menu also allows you to give the stream a meaningful name by selecting 'Input data.'

We now have a simple model of a primary treatment works. If you select the primary tank,
and then click once on the right key, you will see a menu appear. Select the 'Input data'
option, to see the following. You will notice that most of the menu options are greyed out. This
indicates that you cannot use them at present.

19

The reason for this is that STOAT organises the sewage works into a series of runs. You
enter physical sizes under 'Names and dimensions'. These are not greyed out, as they
represent the sewage works. The 'Connectivity' menu allows you to double check that the
streams have been connected and labelled as you intended. The remaining menu options
'Operation', 'Initial conditions', 'Sewage calibration data' and 'Process calibration data' are
activated once you select a run. The data on these menus can change from one simulation to
the next, and are kept track of by specifying a run name with which to identify them.

20

Select name and dimensions for the primary tank, and define the volume as 1,200 m3
and the area as 400 m2. Note that you can change the name from the default of Primary
tank 1 to something that would be more meaningful for your sewage works.

You set up a run by going to the 'File' menu, and selecting 'New run'.

Before you can begin a run you must save the works using 'Save works.' If you do not,
you will be asked to do this. Once the works has been saved, future runs do not require you
to save the works, because it has been saved. But if you make any changes to the works
for example, decide to add a second primary tank this will be treated as a new works and
you will again have to save the works under a new name. This new works will not contain the
previous runs carried out under the unmodified works.
After saving the works you are first asked to give the run a name, and then set the
conditions for the simulation the start and stop dates and how frequently you want to

21

see the results. The equations are calculated at quarter-hourly intervals, so that the output
interval must be in integer multiples of 15 minutes.

When you now select the primary tank and then right-click with the mouse you will find
that the 'Input data' menu option has all its sub-options enabled.

More information on them is given in the following section. For now accept the default
values.
Now you need to specify the influent sewage entering the primary tank. Select the influent,
right-clicking on it. You are presented with the following menu:

22

From this menu select Generate profile. This creates a new sewage profile for your
simulations. The following form will appear:

On this form select (default) and then Edit pattern. (If you wish to use a diurnal or
sinusoidal pattern then you first select that pattern option, after which you select Edit pattern.)
You are now presented with a simple form that allows you to specify the sewage flowing into
the works. Remember that we specified that we wanted constant conditions, and that we
could have specified diurnal or sinusoidal conditions.

Enter your choice try changing the flowrate from 100 m3/h to 50 m3/h. Then save the
pattern, selecting the Save As key. Save the changed profile as Constant 1. Once you
have given the pattern a name you can edit the pattern and either save it with the same name
(Save key) or with a different name (Save As key). (If you have changed the pattern and use
Save you will still be asked if you wish to save the pattern under a new name.) You then
return to the Generate profile menu.

23

Now select Create profile1. The following form appears:

Enter the frequency with which you want the sewage conditions to be calculated, and the total
simulation time. The defaults are 1 hour for the timestep and for the profile to be of the same
length as was specified for the simulation when you were defining the run . Because we are
using constant conditions the timestep does not matter, but when using diurnal data you may
wish to use a timestep of 1 hour. Select OK, after which you are asked for a file name
under which to save the sewage data. For this example we chose the name test1.inf.
You should remember to type the .INF suffix for the filename.

STOAT organises sewage data as patterns, which control the shape of the sewage profile, and profiles, which
repeats the pattern for as many hours as you choose to specify.

24

You will now be asked if you wish to associate this datafile with the influent (Select Yes)
and then if you wish to view the data (select No). You will now be back at the Generate
profile menu; select Close to return to the drawing board.
At this point you can run the simulation by clicking on the 'Run' symbol on the top menu. This
part of the menu also allows you to stop the simulation; pause, while you change some of the
model parameters; or single-step, so that you reach each output time at your own speed.
Next to these control symbols is a display of where the simulation has reached.

Run

Single-step

Pause

Stop

Click on the 'Run' button with the left mouse button. STOAT begins to run the simulation,
the time window displays the current simulation time, and an hour-glass symbol flickers on
the screen. While the hour-glass is displayed STOAT is calculating the solution; the flicker is
caused by STOAT alternating between calculations and looking for any response from you.
Select the 'Pause' button. The hour glass symbol vanishes. You can make any changes
you want to the operational process data, and start from where you paused by
selecting 'Play' again. When the simulation is finished you will get a message informing you
of this. You can now look at the results from the simulation.

25

If you right-click on any process or stream you will get a menu similar to the following:

Selecting Results will now present you with one of the following:
If no results were saved for that process then you will get an error message to say that the
results file cannot be found. Results are not saved if the process does not have any
meaningful results (e.g. mixers and splitters, where all the information is available from the
streams going in and coming out), or if you chose not to save the results (by default results
are saved where these would be meaningful).
If you select Results from a process, you will be offered a menu to look at the data as a table
of timeseries; summary statistics; or a combined table of timeseries and summary statistics.
Click on OK to see the results. You get rid of the results by selecting Window from the top
menu bar, with the table active (it will have a highlighted top bar) and then select Close
results. Selecting Close all results will shut down all open results windows.
If you select Results from a stream then you are first presented with a list of determinands to
view; you can select and deselect from this menu, and the menu has multiple pages
accessed by clicking the More button at the foot of the menu. When finished click on OK.
You are now presented with a variety of ways of looking at the data - graphs, statistics or
timeseries. Select how you wish to look at the data and then click on OK. You will now have
the results report appear. You can close down the results screen in the manner described in
the previous paragraph.
In that run nothing happened other than the time display counting up as the simulation
progressed. You can get a more visual display of progress by selecting 'Reporting options.'
First select New Run from the File menu. You need not save the previous simulation.
Again you will be asked for information about the run, and again you can take the
defaults. Now that the model has been set up for a new run, select a stream for example,
the effluent stream and right-click. Select 'Reporting options' from the menu.

26

You are presented with the following:

You can choose to save the results ('Generate profile file' this option is also available for
processes). The default is to save results for all streams, but you can disable this for any
streams that you are not interested in. For streams, but not for processes, you can also select
to look at the results during the simulation, and to select from either a common set of
determinands ('Simple' option) or all the calculated determinands ('Advanced' option). For
now, select Simple and check the following boxes. These are the determinands that will
be displayed during the simulation.

The graph for displaying your choices will now appear. Repeat this for all three streams
crude sewage, sludge and primary effluent.

27

When you now run the simulation you will be presented with graphs showing the results as
they are calculated. The three graphs and the drawing board will be overlaid on the screen.
From the menu select Window, then Tile and finally Horizontal. You will be presented
with a tidied-up version of the four windows.

28

When you now run the simulation you will see the results being displayed on the graphs as
they are calculated. You have now completed the bare outlines of a STOAT simulation. You
can save the results, using File/Save Run, print the results using File/Print, or copy the
graphs to a word-processor by selecting the graph and using either [CONTROL] + [C],
pressing the two keys together (not one after the other), or by selecting Edit/Copy. If you want
the numbers behind the graphs then you can acquire these by selecting the
Window/View/Time series data option on each stream window. When the run is completed
you can also get results by selecting any stream or process, right-clicking, and selecting
Results you must remember to check the Reporting options to ensure that the data will be
saved - this is the default for streams, but not for processes. For streams you get the choice
of raw data, graphs or summary statistics; for processes, raw data or summary statistics.

29

You can export the raw data to a spreadsheet for further analysis or graphing, by selecting
the top cell, holding the [SHIFT] button down, and dragging the mouse down to the end of the
data. The data cells should be highlighted. Now either type [CONTROL] + [C], again pressing
the two keys and holding them down together, or by selecting Edit/Copy from the top menu.
You can then paste the data into a spreadsheet.

30

4.
4.1

BUILDING A WORKS
Introduction

From the top menu select File/New works to start on a new works, or File/Open works if you
wish to make changes to an existing works. You will be presented with a request for a name
for the works. Type in any name you wish. Please note that this name is for you, not STOAT.
Therefore you can have multiple sewage works, all with the same name, and STOAT will
keep track of them as separate models. If you wish to make changes to a works and
overwrite the old version you must first save the changed works under a new name, then
delete the old works.

Having given the works a name you are now presented with the drawing board and
processes toolbox.

This is the drawing board

This is the
processes toolbox

As described in Section 3, a works is built up by selecting a process from the processes


toolbox. Keeping the left mouse button pressed down the mouse is used to drag the process
onto the drawing board and positioned where required. Then the left mouse button is
released. The process icon will expand from its toolbox to its drawing board size. Repeat
this process to place the processes you require on the drawing board. For a discussion of the
different processes please see Section 6. You can delete a process by right-clicking on the
process and selecting Delete.
When you have all the required processes assembled on the drawing board you can then
proceed to connect them together. If required you can close the process toolbox by selecting
Close from the toolbox menu - you get this menu by clicking on the minus sign that is at the
top left hand corner of the toolbox. If you later need additional processes you can redisplay
the toolbox by selecting Window/Process toolbox.
31

You connect processes together by moving the mouse over the outlet line stubs on each
process. Generally stubs at the right-hand end are outputs from that process, and left-hand
stubs are the inlets. When the mouse is over an unconnected stub it will turn from an arrowpointer into a cross-hair. If the stub is an outlet you can press the left mouse button down,
and keeping it down produce a line (stream) to connect that process to the inlet of another.
Dragging the stream over an inlet the mouse will change from a cross-hair to a chain link. If
you now let go of the mouse button a link will be completed between the two processes.
Repeating this process will connect the sewage works in the manner you desire. Note that all
stubs must be connected, even if you do not intend to have any flow through them; and that
any stream that is not connected to another process is treated as an effluent. You can
connect streams to explicit effluent icons. There are three such icons, for sludge, final
effluent, or a this stream not used symbol. These are, however, optional.
When the works has been completed you should then right-click on each process and select
Input data/Names and dimensions and provide the required data for each process. Section 5
provides further details for this, or you can obtain help by pressing key [F1]. You can also
change the default names of the streams to more descriptive alternatives by right-clicking on
the stream and selecting Input data/Name. We recommend naming common streams, such
as the final effluent, to help you later when looking at graphs of results.
When you have defined the works you should select File/Save works. When you are ready to
begin a simulation you can then select File/New run. At this point error checking will be
carried out on the works to ensure that all dimensions are non-zero and that every process
has its required input and output streams. Once you have a run associated with the works
any further changes to the works will require that you save the works as a new works.
Changes to the works are adding or deleting processes or streams, or changing any of the
data (including descriptive names) on the Name and dimensions menus for the processes
and Name menu for streams.
Tip: A common problem in STOAT is starting with a base design and adjusting
tank dimensions only to evaluate the minimum works size that will meet the
required duty. Having built up the base design and carried out several simulations
it is possible to change the dimensions and carry out the equivalent of a warm start
(see the next section for a discussion of warm starts).
You do this by loading the base works, called (say) Timur Emirate #1. Create a
new run and use a warm start from the run of your choice. Now alter the works
dimensions that you wish for the next design study. Save the changes using
File/Save Works As. We suggest that you use a naming scheme such as Timur
Emirate #1.1 and add notes about the changes (before you save the works) using
Edit/Works to access the memo notepad. Finally, save the run using File/Save Run
As. This associates the run with the new works, and also adjusts the internal
numbering of the run so that it will be the first run for that works. You can now
proceed with running simulations on the new works.

32

4.2 BUILDING A MODEL


There are three steps to building a STOAT model.
Designing the layout
Entering process data
Creating influent data
After building, the model is usually calibrated against measured data if the model is based on
an existing works. This may also be followed by verification if an accurate representation of a
particular works is required.
4.2.1 Data Preparation
A works flow sheet may be built up from site drawings. Inaccuracies can sometimes be found
in a drawing, particularly if it is fairly old or if streams have been re-routed. The data required
is dependant on the models being used.
Survey data may be collected to allow a STOAT model to be calibrated and to provide a
means of verifying that the model will give good results outside the limits of its calibration
data. The accuracy of a STOAT model as a representation of an existing works is dependent
almost entirely on the quality and quantity of data collected. The importance of this step
should not be underestimated. Where possible two sampling exercises should be carried out,
the first to collect data to calibrate the model and the second for model verification.
Verification data are used to provide error estimates for the model predictions and may not be
required if the model is to be used only for simple procedures. Carrying out a survey and
analysing samples is an expensive business and should be costed into the budget for
building the model. It is possible that the cost of the survey will exceed the cost of building the
model itself.
The following sections give guidelines based on current experience for collecting survey data.
An example follows to demonstrate how the survey may be carried out. The Process Model
Descriptions manual describes the recommended methods for analysing non-standard
parameters.
4.2.2 Data Requirements
The survey should ideally include 3 days (72 hours) of dry weather and 2 storms. One of the
storms need be monitored only sufficiently to allow calibration of the storm tank. The dry
weather data would be used for calibrating the majority of the model and the other storm fully
monitored for verification of the model. The duration of the storm surveys will depend on the
duration of the storm itself, and the control of storm tank emptying after the storm.
For calibration and verification to be attempted, the minimum requirement is that two survey
periods be carried out for each process, with different flows. The data for the higher flow
should be used for verification. Clearly it is preferable to collect the data for each process, for
either calibration or verification, concurrently as many sampling points can be doubled up
(one processs effluent is anthers influent) and hence the total number of samples reduced.
This also makes verification of the model potentially easier as only one run may be required.
It is recommended that the basic STOAT model is constructed before planning the survey to
ensure all required sample and flow points are included.
Flows in the model and quality samples for input and output of each unit process are
required. In addition operational routines, such as manual desludging , and any unavoidable

33

changes in operation of the works between or during surveys should be well recorded (for
example a primary tank may be taken out of operation for maintenance or repair, or the
setting of an overflow changed). Changes to the normal operational routine should be
avoided if possible.
Flexibility is required when choosing suitable monitoring sites. It is not always possible to
place a sampler or flow monitor in the desired position. Instead the sampler may have to be
upstream or downstream of the desired sampling point. In such cases flow and quality for the
ideal position can often be calculated using mass balances.
Flow Recording
If possible measure flows before carrying out the main survey, especially if any flows are to
be calculated rather than measured directly. This allows any potential problems to be
identified and addressed before sampling.
It is important to be aware of all possible flows to and from the main stream, and monitor
those which are judged to be significant. For example, the flow entering the works, flow to
treatment and flow to storm tanks are required. Some flows do not usually constitute a
significant proportion of the main flow, for example, liquors from sludge and screenings
treatment returned on an intermittent basis or if the works treats a high level of sludges from
other sites.
Flows that are digitally recorded rather than recorded on a works chart recorder are much
easier to deal with when it comes to putting them into the model. The flow should be recorded
as frequently as possible to allow short term peaks to be identified, and averaged over the
same time period as each quality sample, for entry to the model.
Flows to be monitored
Inlet flow (upstream of inlet works)
Flow upstream of overflow to storm tanks
Flow to full treatment
Overflow to storm tanks }
Recycle flows (liquor and sludge)
Return process liquors
Additional influents (e.g. trade effluents)
Flow splits
Storm tank overflows

Monitor if model is to used in conjunction with


sewerage model.
}
}
}
}
}

At least 2 of the 3 to be monitored.


Monitor if within bounds of model and
estimated to be significant at any time.
Monitor if included in model.
Monitor

34

Quality Monitoring
Where to sample
The quality of the sewage is needed upstream and downstream of each modelled process or
flow split and sometimes from the process itself. Downstream samples for one process are
equivalent to the upstream sample for the following process providing no other flows join the
connecting stream. In addition, if the model is to be used in conjunction with a sewerage
model, the inlet flow and quality should also be monitored.
Frequency of sampling
Samples usually consist of up to 4 spot samples, composited over 1 or 2 hours to reduce
analysis costs, for most sample points. Less frequent sampling gives a poor representation of
the diurnal variation. Spot sampling every 1 or 2 hours may miss short term peaks or troughs
in quality. On overflows which operate over short time periods, sampling frequency may need
to be shorter. For example, a storm overflow may be sampled half or quarter hourly. Sludge
samples need be taken only on a daily basis, unless sludge is wasted virtually constantly and
sludge treatment models are to be used, or there are grounds for believing that the sludge is
highly variable. Separate samples can always be mixed together as a composite,
composites cannot be separated.
What to measure in the sample
Below are listed a number of common analyses usually carried out on samples. The list is not
exhaustive.
All sewage samples are analysed for total suspended solids (TSS), ammoniacal nitrogen and
total BOD or total COD if required. These are referred to in the rest of this document as the
Standard analyses and are used widely for both calibration and verification.
All sludge samples should be analysed for TSS.
When resources are limited COD may be analysed in place of BOD providing it can be shown
that there is a consistent relationship between the two values at the works. Any relationship
may not hold under extreme conditions. Therefore, COD measurement is not recommended
as an alternative to BOD measurement.
Volatile solids and to a lesser extent, soluble BOD are useful for calibrating a number of
process models. They may also be used for verification if a high level of confidence is
required in the model. They are also useful in identifying whether calibration errors are due to
mismatches in either settlement or biological processes. They would be analysed in typically
1 in 3 samples, particularly in the influent samples.
In addition, it is useful to measure settleable solids and particulate BOD of settleable solids in
some (typically 1 in 3) of the influent samples to help calibrate the storm and primary tanks.
Settleable solids are also useful for the activated sludge model and its variants.
Analysis of nitrate (or TON) downstream of nitrifying processes aids calibration and
verification of those processes.
Total Kjehdahl nitrogen should be measured in the raw sewage (typically 1 in 3 samples) to
assess the ultimate ammoniacal nitrogen load on the plant.
Analysis of soluble phosphorus aids calibration and verification of processes with p-removal
occurring.
35

If anaerobic digestion model 2 is used additional parameters will need to be monitored.


Finally, ensure all samplers are in good working order before and after transit to site. Carry
spare samplers and parts if possible. Ensure sample bottles are clean beforehand by
washing thoroughly in mains water and draining. If desired, bottles can be rinsed in the liquid
to be sampled, although this is not usually necessary.
Influents And Returns From Unmodelled Processes
The flow and quality of each influent should be known if it constitutes a significant proportion
of the main flow, nominally over 5% of flow or quality at any time. Ideally the influent itself
should be monitored. Where this is not possible, for example, where it enters through closed
pipes, it should be monitored in the next downstream channel. If that channel mixes or splits
with other channels these should also be monitored, as necessary, and the influent flow and
quality back-calculated by mass balance.
4.3 - DATA REQUIREMENTS OF INDIVIDUAL UNIT PROCESS MODELS
This section describes to the user what the data requirements are for each of the unit
processes available within STOAT. It should be consulted when setting up a data collection
exercise for the calibration and verification of a STOAT model.
4.3.1 Overflow Separators
The overflow setting can be found by measuring the flow in the downstream main channel
when the overflow is operating. The quality can be assumed not to change, so it need by
measured in one lane only. This usually corresponds to a sample for an up- or down- stream
process.
4.3.2 Storm Tank
The position of the storm tanks and the operation of returning their contents to the main
stream varies from works to works, and a variety of monitoring points are practicable:
The influent sewage
The influent flow and quality to the storm tanks should be known. It may usually be assumed
that the sewage quality at the overflow to the storm tanks is the same for both outgoing
streams and only one need be monitored. In addition to the standard parameters, samples of
influent sewage may be analysed for soluble BOD, VSS, settleable solids, particulate BOD of
settleable solids, and settling velocities. These analyses should be performed sufficiently
often to establish any diurnal variation and provide an average value for the model, where
required.
The storm tank contents
Monitoring storm tank contents may help calibration of the model, but is not required when
monitoring for verification data. Ideally the storm tanks should be empty prior to monitoring. If
they are part full an estimate of the volume in them should be made and a representative
sample taken of the sewage to allow the initial state of the tank to be estimated in the model.
To get a representative sample is not easy, but it should not be taken too close to the edges,
top of bottom of the tank contents. The sampler hose should be placed in an area of limited
mixing (i.e. not in a still area and not too close to the entry point for flow to the tank). Where
several tanks fill sequentially the positioning of the sampler hose should take into account the
frequency with which the tanks fill, the size of the tanks and the time taken for flow to enter

36

each tank.
The position of the hose should be recorded, and any visual indicators, such as sludge
resuspension, will help define the representativeness of the samples.
The return sewage
The return sewage needs to be monitored for flow and quality if it is returned downstream of
the main influent for the model. It may also be monitored to aid calibrations and/or verification
of the model. The return sewage may be sampled during emptying of the storm tanks.
Operational regimes for returning storm tank contents vary considerably, many are operated
manually and rely on a compromise between staff being on-site and the desire to return
sewage at times of low flow (usually overnight). STOAT assumes that sludge which has
settled out is resuspended in the liquor when the volume in the tank has dropped to some
fraction of its maximum volume (specified by the user).
The storm overflow
The storm overflow should be monitored for flow and quality when in use. The frequency of
sampling should be matched to the usual duration of storm overflows at that time of year. For
example, if the storm overflow only operates for about half an hour, samples should be taken
every 5 or 10 minutes. If it is likely to operate for 4 hours, half hourly sampling should be
sufficient. When in doubt, sample frequently and composite if necessary.
4.3.3 Primary Tanks
The influent to and effluent from the primary tanks should be sampled.
The influent sewage
The influent flow and quality to the primary tanks should be known. In addition to the standard
analyses, samples of influent sewage should be used to measure soluble BOD, VSS,
settleable solids, particulate BOD of settleable solids, and settling velocities. These analyses
should be performed sufficiently often to establish any diurnal variation and provide an
average value for the model, where required.
4.3.4 Wet Wells
The operation of any wet wells should be recorded. This may be achieved either by
monitoring depths in the wet well or pump operation. This will allow switch on and switch off
levels to be calibrated.

37

4.3.5 Balancing Tanks


The operation of any balance tanks should be well understood. Three modes may be
modelled:
Constant volume
The influent and effluent quality should be measured to calibrate the load balancing effect. An
estimate of the volume inside the tank will speed up calibration.
Infinite volume
The influent and effluent quality should be measured to calibrate the load balancing effect.
Either the depth of liquor in the tank or the outflow should be measured to calibrate the
outflow setting.
Overflow
The values measured for the infinite volume mode should also be monitored for the overflow
mode. In addition the flow in the overflow channel or the maximum volume should be
measured to calibrate the maximum volume of the tank.
4.3.6 Activated Sludge / Oxidation Ditch and Secondary Settlement
Model 1
The influent to the basin and effluent from the clarifiers should be monitored for quality.
Monitoring MLSS on a daily basis will aid calibration of the wastage control parameters.
Dissolved oxygen levels in the aeration tanks may be monitored to help the oxygen control
section to be calibrated. Mixed liquor recycle rates should be monitored where they exist.
Nitrate (or TON) should be monitored downstream of the secondary tanks to calibrate and
verify nitrification parameters. KLa may be calculated by monitoring the oxygenation system.
The calculation is described in Appendix C of the Process Model Descriptions Manual.
Model 2
Model 2 is used at works with very low retention times, frequently under storm conditions. In
addition to the data required for Model 1, the volatile solids may be monitored in the influent
and effluent samples.
Model 5
Model 5 includes a simple biological p-removal model. In addition to the data required for
Model 1, the soluble phosphorus should be monitored in the influent and effluent samples.

38

Final tank models


Parameters in the final tank models can be calibrated using the average SSVI, non-settleable
solids, and maximum settling velocity of the MLSS
4.3.7 Biological Filters and Humus Tanks
Quality samples should be taken upstream of the filters and downstream of the humus tanks.
In addition to the standard parameters, nitrate (or TON) should be monitored in the effluent
from the humus tanks, and volatile solids in the influent to the filter and effluent from the
humus tanks, and volatile solids in the influent to the filter and effluent from the humus tanks.
A tracer test may be used to work out the retention time and hence aid calibration of the
depth of pools value (see Process Model Descriptions Manual).
4.3.8 Mesophilic Anaerobic Digestion
Model 1
The simple MAD model requires volatile solids and total BOD of the influent to and effluent
from the process to be measured for calibration and verification. In addition, a 30 day batch
test to calculate the degradation rate and initial biodegradable fraction of volatile solids and
BOD content of volatile solids may help calibrate the model.
Model 2
This model is far more detailed than model 1. Volatile solids, volatile fatty acids, carbon
dioxide, hydrogen, methane, pH, and biodegradable fraction of volatile solids, of the influent
to and effluent from the process may all be monitored to aid calibration and/or verification.
4.3.9 Thermophilic Aerobic Digestion
The volatile solids and total BOD should be measured in the influent to and effluent from the
process. The volume in the TAD tank and the temperature of the process should also be
recorded. Pump rates and power are also useful for calibration.
4.3.10 Separator
The separator model splits streams into 2 flows of variable concentrations, modelling
processes such as dewatering presses and membranes. The average performance of the
processes should be assessed to give percentage splits for flow, soluble material and
particulate material.
4.3.11 Black Box
The components included in a black box model of a process should be monitored up and
down stream of it, if it is to be calibrated and/or verified.
4.3.12 PID Controller
If an existing controller is to be included in the model, the minimum and maximum output
values should be established, if possible.
4.3.13 Predicting Performance in Storms: Urban Pollution Management
If a storm occurs during a survey period which has not been fully monitored it may be useful

39

to analyse two or three samples of final effluent for suspended solids, BOD and ammonia.
These samples should be taken when the first peak flows are observed and then periodically
through the storm. These can be used to assess the performance of the model under high
flow conditions.
More information on Urban Pollution Management can be found in the book Urban Pollution
Management (UPM): A planning guide for the management of urban wastewater discharges
during wet weather, Foundation for Water Research Report No. FR/CL 0002, 1994, ISBN 0 9521712 - X. Published by Foundation for Water Research, Marlow, UK. This book
discusses the use of dynamic sewage treatment works models within the wider context of
integration with sewerage and river quality models, and the use of these models for planning
catchment investment and operation decisions.
4.4 EXAMPLE TRUMPTON SEWAGE TREATMENT WORKS
A STOAT model of Trumpton Sewage Treatment Works is to be made as part of a catchment
planning exercise, aimed at improving the quality of the river Chigley. For this exercise
STOAT is to be used in conjunction with sewerage and river models, and the data collection
exercise needs to take this into account. The data for the other 2 models has already been
collected and so to ensure a smooth transition of data from one model to the next the survey
should include sampling points at the end of the sewerage model (the works inlet) and the
entry points to the river (the storm overflow and final effluent channels). It has been decided
not to include the sludge treatment processes in the model.
The layout of the works and sizes of each process have been established. Each of the
processes with tanks in parallel are modelled as a single tank.
The following figure shows the various sample and flow points for the survey. Each sample
point is discussed below. Flow is measured at 2 minute intervals and accumulated over the
sampling period. With the exception of the storm tank overflow, samples are taken every 30
minutes and composited over 2 hours.

40

Storm tank
overflow

Limits of
STOAT model

Partially-treated
industrial effluent

C2
Storm tank
C1

F1
Biological filters

B3
Influent
A

Wet
well

Grit
channels

B1

Over
flow

B2

Primary
tanks

Flow
mix

G
Co-settled sludge to
sludge treatment
Humus sludge
I

Flow Sampling Positions for Trumpton Sewage Treatment Works

41

Final
effluent

F2

E
Main pump house

Humus tanks

The dry weather survey lasted 3 days. One storm was monitored around the storm tanks for
8 hours. No spill occurred. The data from these surveys were used for calibration. A second
storm was monitored around the site for 26 hours, including 1.25 hours of storm overflow
and the return of some of the storm tank contents. These data were used for verification.
Sample point A
Flow and quality are required here to allow the STOAT and sewerage models to be linked.
The data may also be used as influent to any black box or separator model used to model
the preliminary processes.
Every sample is analysed for TSS, total BOD and NH4-N. Every 6th sample is analysed for
filtered BOD and volatile solids.
Sample point B
Three points are marked on the works flowsheet. These points allow calibration of the
overflow and provide flow and quality data for the influents to the storm and primary tanks
and flow data for the flow mixer. they may also be used to calibrate and verify any black box
or separator model used to model the preliminary processes (screens and grit channels).
A sample should be taken from one of these points (preferably B1 or B2) and flows should
be recorded at any 2 of the 3 points to determine the level of the overflow. In this case B1 is
a rising main so the sampler is sited at B2 and flow meters located at B2 and B3.
Every sample is analysed for TSS, total BOD and NH4-N. Every 3rd sample is analysed for
settleable solids, particulate BOD of settleable solids, filtered BOD and volatile solids.
Sample point C
Two points are marked on the flowsheet. Quality data are monitored at C1 to calibrate the
storm tanks during fill and quiescent settling. Quality data are monitored at C2 to calibrate
the draw down parameters for the storm tanks. The same sampler could be used for C1 and
C2.
Every sample is analysed for TSS, total BOD and NH4-N.
Sample point D
Flow and quality are monitored at point D to calibrate and verify the storm tank model and to
provide input data for the river model. Quality samples are taken every 15 minutes as the
overflow is expected to operate for around 1 hour.
Every sample is analysed for TSS, total BOD and NH4-N. A continuous dissolved oxygen
monitor is installed for use in the river model.
Sample point E
Quality samples allow the primary tank to be calibrated and verified and provide influent data
for the flow mixer and biological filters.
Every sample is analysed for TSS, total BOD and NH4-N. Every 6th sample is analysed for
filtered BOD and volatile solids.
Sample point F
Two sample points are shown. Flow and quality data are monitored to provide influent data
42

for the flow mixer and biological filters. F1 is the preferred site but it cannot be used as the
pipe is closed. F2 is used instead and the data for F1 calculated using the mass balance:
Flow @ F1 = F(F1) = F(F2) F(E)
Quality @ F1 = Q(F1) = (Q(F2) x F(F2)) (Q(E) x F(E))
F(F1)
Every sample is analysed for TSS, total BOD and NH4-N. Every 6th sample is analysed for
filtered BOD and volatile solids.
Sample point G
The co-settled sludge is sampled daily to help calibrate and verify the primary tanks
Every sample is analysed for TSS.
Sample point H
This point is monitored to allow calibration of the biological filters and humus tanks and
provide input to the river model.
Every sample is analysed for TSS, total BOD, NH4-N and NO3-N. Every 6th sample is
analysed for filtered BOD and volatile solids. A continuous dissolved oxygen monitor is
installed to provide data for the river model.
Sample point I
The humus sludge is sampled daily to calibrate the humus tanks.
Every sample is analysed for TSS.
Changes in Operation
One of the 5 (equally sized) storm tanks was taken out of operation just before the surveys
began, so the modelled storm tank capacity was reduced by one fifth.
4.5 MODELLING NON-STOAT STANDARD PROCESSES AND PRACTICES
4.5.1 Return Of Storm Tank Contents
Many works return storm tank contents by manual operation and/or allow flow to return
under gravity. Neither of these options is automatically accounted for in STOAT but may be
modelled with a little ingenuity.
To model manual control set the parameter flow below which storm tank contents are
returned to less than the minimum influent flow, e.g. 1 l/s. When flow is to be returned
increase this value to the same as the overflow to the storm tanks, usually around 3 times
DWF. Alternate between these two values to control manually.
To model the return of flows by gravity is more difficult, as it requires some knowledge of the
flow rate, which will become less as the head of liquid in the tank is reduced. Ideally the flow
rate should be monitored starting with a full set of tanks. This will then supply a curve which
may be used to control the modelled return pump rate using the PID controller.

43

4.5.2 Alternatives To Single Biological Filtration


High rate filters can be modelled with changes to the parameter values. The pool depth
parameter and number of heterotrophs will be much higher than for conventional filters.
Good starting parameters are given by multiplying the values by the proportional increase in
the hydraulic loading rate of the filter over conventional loading rates (typically 1 m3/m3d).
Double filtration may be treated as two filters in series. Lower heterotrophic populations are
likely in the second filter.
Alternating double filtration should be modelled as a single filter of the combined capacity of
all the filters and a humus tank with the capacity of the second set of humus tanks only (to
model the correct settling velocity). ADF is used to prevent build up of the biofilm, but this
build up is not modelled in STOAT and so it is unnecessary to model ADF exactly. In this
case the sewage should be sampled upstream of the primary filters and downstream of the
secondary humus tanks.
4.5.3 Grit Removal
This can be crudely modelled using the primary tank model, with a small single mixed tank.
4.6 TESTING THE MODEL
4.6.1 Consistency and reasonableness
Run the model with a few days data and look at the results for each stream.
1.

Check that the sizes of units have been allocated correctly, for example, when
modelling 3 equally sized lanes of 3 tanks of activated sludge as a single lane with 3
tanks, the modelled size of each tank should equal 3 times that of a single tank.

2.

Check that flow splitters divert flow in the chosen proportions to the appropriate
stream(s).

3.

Check overflow settings.

44

4.6.2 - Calibration and Verification


There are two possible methods for calibrating a model. The first is to calibrate each process
individually and then verify the model as a whole, if appropriate. The second is to take the
whole model and calibrate each process from upstream to downstream. The first approach
requires each process to be built as an individual model but will ensure that each process is
not affected by modelling differences upstream. The second method requires running the
whole model to calibrate a single process, but is more appropriate when data have been
measured upstream of a recycle flow for example, when the data for the primary tank
influent is measured on the crude sewage upstream of the return of secondary sludge. The
choice of method will depend on the works layout and the level of data available.
Calibration
All calibration data which have been measured in advance should be used in place of
default values. Any survey data should be used to set up initial conditions for each process.
Setting appropriate values for initial conditions reduces the time that the initial conditions
have an effect on the model simulation. For a process with several stages (for example,
activated sludge or the biological filter) you can use interpolated values between the influent
and effluent values for each soluble parameter. Solid components may increase in
secondary processes from stage to stage, caused by biological growth or settlement. For the
biological filter we recommend that you set solids determinands to those of the influent for all
stages.
Run the model with a cyclical influent data set until equilibrium is reached (that is, the results
for subsequent cycles are the same). Influent data for calibration usually consists of a
repeated diurnal dataset, or 2 or 3 days of data repeated, or average values with the diurnal
variation ignored.
Using average values allows an equilibrium point to be reached quickly and may be used
initially to provide a crude calibration. This will not show the effect of diurnal variation and
reaction times to changes in the influent, and peaks and troughs will be poorly modelled.
Therefore diurnal data is recommended for the fine tuning of the calibration parameters
associated with rates of change.
Where mismatches are found between the data and model predictions, those parameters for
which data have not been measured may be varied. Appendix B lists the model parameters
and the range of values allowed. It also details which parameters should not normally be
changed from their default value. You can then re-run the model, repeating the adjustment
of the model parameters until you have a match between the model predictions and the
calibration data. There is little point in searching for a match between the model and the
data that is better than the measuring error in the calibration data.
When deciding the goodness of fit of a calibration the following should be considered:

The average values of the measured and predicted data


The peak and trough values of the measured and predicted data
The timings of peaks and troughs

45

If the timing does not match for an hour or so check what the times recorded for the
measured data represent. If the data were a composite sample then the recorded sampling
time may be the start, middle or end of sample collection. Where composite data have been
collected the model estimation should be based on composite model predictions, rather
than comparing composite data with spot predictions.
Verification
After calibration is complete model accuracy may be verified against data which exceeds the
limits of the calibration data. This usually consists of running storm event data through the
model to determine whether it correctly predicts effluent quality. The mismatch between
predicted and measured data should not exceed that observed for the calibration data. The
same comments on timing apply for verification simulations as for calibration ones.
If verification shows up discrepancies then one or more parameters may be in error. This
may be because the calibration parameter values are wrong or because different values are
applicable for that parameter under different conditions. We are currently aware of this
applying mainly for primary tank settling rates, where the effluent quality is commonly
insensitive to the settling velocity parameters during dry weather flow, and will therefore
need calibration under high flows.
4.7 DOCUMENTING A SIMULATION
The records you keep for each model and run should be sufficient to recreate it and get
exactly the same results. When a works layout is created print the layout or archive it with a
unique name, such as Trumpton 1. If the layout is changed or extended then store it in the
same way with a consecutive name, such as Trumpton 2.
You should keep a record of every run you perform. Some parameters and files in your
model will be used over and over again in different simulation runs. Rather than record every
parameter for every run, store similar details together under a single heading and refer to
this heading in your run record, along with any changes for this run. You can also reduce the
record size by assuming that all parameter values are the default unless specified otherwise.
You should record the STOAT version number as default parameter values may alter or the
models be updated.
4.7.1 Model Building
As an example, the Trumpton layout #1 is shown below. The following pages show a run
record. This run is attempting to calibrate the primary tanks. Three sets of reference data are
indicated. The Trumpton static data set contains tank sizes for the works. The Calibration
parameters 1 set contains the first estimates at calibration parameters based on various
tests carried out, where the values did not equal the default values. The Calibration control
parameters are set up to use the most representative day of the collected data (repeated
over 10 days) to bring the model close to a diurnal equilibrium.

46

RUN RECORD
Model: Trumpton 1
Run Name/Number: Calibration Dry 7
Influent Data file: TrumpDry

STOAT Version Number: 1.0


Date: 1/7/1994

All parameter values are assumed to be default values unless otherwise stated
Process Data: Trumpton static data, Calibration parameters 1
Primary tank
Number of completely mixed stages in series = 3
Settleable fraction of volatile solids = 0.85
Settleable fraction of particulate BOD = 0.75
Initial Data: Calibration Dry 4 2/5/1994 00:00
Control Parameters: Calibration Control Parameters
End simulation time = 10/5/1994 00:00
Run successful: Yes
Comments on results: Effluent solids and BOD from primary tank under-predicted,
decrease settleability of solids for next simulation.

PROCESS DATA
Trumpton static data
Storm tank
Volume = 4,821 m3
Area = 1,727 m2
Primary tank
Volume = 4,460 m3
Area = 1,487 m2
Biological filter
Area = 1,668 m2
Depth = 1.8 m
Media dimension = 38 mm
Specific surface area = 135 m2/m3
Humus tank
Area = 420 m2
Calibration Parameters #1
Sewage temperature = 14.6C

47

Overflow to storm tanks


Setting = 210 l/s
Storm tank
Settleable fraction of volatile solids = 0.8
Settleable fraction of BOD = 0.7
Mixing volume fraction during filling = 0.2
Primary tank
Settleable fraction of volatile solids = 0.8
Settleable fraction of BOD = 0.7
Sludge solids = 4.5%
Sludge specific gravity = 1.01
Humus tanks
Sludge solids = 4.2%
Control parameters
Calibration control parameters
Start time = 02/05/94 00:00
End time = 12/05/94 00:00
Influent timestep = 2 hours
Effluent timestep = 2 hours
Global timestep = 0.25 hours
Recycle tolerance = 0.01
Maximum number of iterations = 10

4.8 COMMON PROBLEMS


Check that any flow separators upstream send a proportion of the flow to the stream.
Check overflow settings
Check the wastage control parameters, particularly time before first wastage event and
duration of each event.
Check the output timestep. The results shown are the condition of the works at each output
timestep and so do not show what has happened in between output timesteps. Thus if the
model is working to a 0.25 hour internal timestep, it will work out the state of the works every
15 minutes. The output timestep is usually 1 or 2 hours so only 1 in 4 or 1 in 8 of those
states is recorded. Either reduce the output timestep (which will increase the time taken to
run the model) or, if the offending stream is waste activated sludge, try changing the
wastage control to a longer event duration.
If this occurs on storm tank overflow where real data have been used, do a mass balance
check on the flow going to the storm tank to check that it exceeds the storm tanks capacity.
In reality as the tank approaches capacity water may start to spill intermittently into the
overflow channel. Also, flow monitors are difficult to calibrate exactly. When 3 monitors are
placed around an overflow the sum of the 2 outflows rarely equal the inflow, and small flow
measurement has a relatively high degree of uncertainty associated with it. Do not worry
unduly if you fail to model flow of a small (less than 30 minutes) overflow correctly, or if the
model predicts a small overflow when none was thought to have occurred.

48

Check that dissolved oxygen within the aeration tank (excluding anoxic and aerobic tanks) is
greater than 1.0. Dissolved oxygen values less than 1.0 frequently lead to the model running
slowly.
Check that there is a return sludge flow from each secondary settling tank.
Check that each activated sludge tank has a route to a wastage flow. Wastage can be from
the aeration basin or settling tank, and it is possible to mix the flow from several aeration
basins, split to several settling tanks, and choose to waste sludge from only one of the
settling tanks.

49

5.
5.1

USING STOAT TO MODEL A WORKS


RUNNING A SIMULATION

You can begin a new simulation by selecting File/New run from the top menu.
A new run allows you to start the run with your specified initial conditions (cold start), the
initial conditions from a previous run (repeat run), or the initial conditions taken as the final
conditions from a previous run (warm start).

If you do choose to use the initial conditions from a previous run then you are asked to
select which run you want to use for this. Any previously saved run for that works may be
used for a repeat run or a warm start.

Having chosen to continue from an old run (repeat run or warm start) the start date cannot
be changed this is now defined by the previous simulation. You can still change the length
of the simulation.
The run definition form allows you to set the following:

50

Name of Run: You specify the name of the run. It is important that the name used can
identify the run adequately for any future user.
Start Date and Time: This is the time that specifies the start of the run. For a cold start the
date is automatically set to the present date by the computers clock which you can change
if required. For a repeat run or a warm start, the date is set from the previous runs and
cannot be changed.
End Date and Time: This is the date that specifies the end of the run. STOAT gives a default
of 2 days (48 hours) which you can change. It is important that the influent profile you
use is at least as long as the specified run time.
Input Timestep: This is the timestep that STOAT uses in its internal calculations. You will not
normally have to alter this number.
Output Timestep: This is the timestep with which STOAT generates its results. The default is
1 hour which means means that STOAT will generate a result every hour of the simulation.
This can be changed if longer or shorter time spans are of interest.
Average sewage temperature: This is an important parameter as it defines the reaction rates
in the activated sludge and biological filter processes, and will affect the heat loss in the
thermophilic aerobic sludge digester. Important: ASAL3/3A, OXID3, IAWQ#1 and IAWQ#2
models take their temperature from the values specified for the flow stream, not from
the value specified at the Run Setup menu.
BOD of volatile solids
BOD of biomass solids
These two parameters are used to estimate the removal of volatile solids that you can
expect to get from the removal of particulate BOD, and the particulate BOD contribution that
lost biomass solids add to the total BOD of your effluent. The default values should normally
be used to begin with and these parameters can be altered as part of the calibration
51

exercise.

Choice of Integration Method: You have a choice of fourteen integration methods.

We recommend the Runge-Kutta-Cameron method for general use.

We suggest that the Runge-Kutta-Sarafyan method be used when simulations are


taking a long time. The Sarafyan method is designed to be efficient when solving stiff
differential equation systems, and is less efficient for more general use than the
Cameron method.

The Runge-Kutta-Fehlberg and Runge-Kutta-Gill methods should be used if you


suspect that you are getting peculiar results caused by the integration method2. You
can also use the Adams method for this purpose.

The fixed-step version of the Runge-Kutta-Gill algorithm can be used if you are
confident that you can select a stable step size. You will find that you will get much
faster run-times by using the fixed step mode. However, we do not recommend that
you use this option. We have provided it following a request from a user who is
confident of being able to use this mode. If you do use this mode then you must set
the step size as the maximum step length. Note that the default maximum is 0.25 h,
and this is nearly always unstable for a fixed step length algorithm within STOAT.

It is rare for integration methods to fail and calculate a false solution; there are academic problems designed to
show this behaviour, but in this respect the Runge-Kutta methods are more robust than many other integration
algorithms.

52

The MEBDF - full Jacobian algorithm should be used when you are modelling any of
the biofilm processes e.g. RBCs, BAFs etc. as they take a long time for each
simulation.

The Runge-Kutta-Cash and Runge-Kutta-Chebychev algorithms should be


investigated when you are modelling a large number of biofilm processes on one
flowsheet. We also suggest that you change the default relative and absolute
integration tolerances from 0.001 and 0.1, respectively, to 0.01 and 0.01.

You may find that the VODE family of integrators is more efficient for some biofilm
problems and therefore wish to experiment.

Relative Tolerance
Absolute Tolerance:
The accuracy to which STOAT calculates the solution for the processes is determined by the
relative and absolute tolerance. If you enter a value of zero (or a negative value) then
STOAT will use its default values. The relative tolerance specifies the number of significant
figures that you want in your results. A relative tolerance of 0.001 would mean accurate to
three significant figures, while 0.1 would mean accurate to one significant figure. The
absolute tolerance specifies the number of decimal places of accuracy that you want. An
absolute tolerance of 0.1 would mean accurate to one decimal place, while a value of 0.001
would mean accurate to three decimal places. STOAT uses a combination of the two
methods, so that a relative tolerance of 0.001 and an absolute tolerance of 0.1 mean that
you want the solution to be accurate to three significant figures if the result is greater than 1,
or one decimal place if the result is less than 1. We recommend that you leave these figures
as their default values unless you run into difficulties and need to change the integration
method as described above. The default values are relative tolerance of 0.001 and absolute
tolerance of 0.1.
Maximum Step
Minimum Step
STOAT integrates the differential equations describing the process models using numerical
methods. The numerical methods require that an accuracy level be specified for the
calculations. This accuracy level is calculated using the relative and absolute integration
tolerance. An error is estimated for each equation being solved, and each equation must
have an error that is less than
relative tolerance x current equation value + absolute tolerance
The current equation value can be a tank volume, a concentration or a temperature.
If the error is greater than the permitted error it is possible to reduce the error by using a
smaller integration timestep and repeating the calculations. If the time step being used
reaches the minimum time step then you will get the message Tolerance too tight for DLL it is not possible to meet the specified accuracy requirements even using the smallest
allowed time step.

53

When this happens you can do one of the following:


1.
2.
3.

Increase the relative integration tolerance. The default is 0.1%, and this can be
increased up to 5% - a value of 0.05.
Increase the absolute integration tolerance. The default is 0.1. This can be increased
up to 0.5.
Reduce the minimum time step. The default is 1 ms (2.8 x 10**-7 h) and this can be
reduced to 1 x 10**-15 h.

We suggest that you first reduce the minimum time step to 10**-10. This may lead to the
simulation running slow for a period of time, but usually this slow period does not last for
long. If you still get the error message then increase the relative tolerance. If you are still
getting the error message then finally reduce the minimum time step to 10**-15. If the error
message persists then contact WRc. This is a sign that either the works you are modelling
has been specified incorrectly (for example, all the sewage enters the works with no way for
the sewage to leave the works) or there is a problem with the internal calculations in
STOAT.
Recycle Calculation Options
Convergence Tolerance
Maximum Number of Recycle Iterations:
If you know that you have no recycle loops in your flowsheet we strongly recommend that
you specify that recycle calculations be turned off. If in doubt, let STOAT calculate recycle
loops. If you are calculating recycle loops then you need to specify the accuracy to which
you want the loops to be calculated, and an upper limit on how many times STOAT should
solve the recycle calculations before giving up if there is no convergence. As with most of
the parameters in this part of STOAT we recommend that you leave the values as the
defaults. You can specify the convergence tolerance for recycle loops, and the maximum
number of iterations used - if more are required then STOAT will stop and proceed with an
incorrect value. STOAT usually converges in two iterations.
As with all the parameters controlling the numerical methods in STOAT we recommend that
you stick with our defaults.
Having entered the data controlling the run length and sewage temperature you may now
alter any of the data on the flowsheet, other than data in the menus Name and dimensions.
Pause
Run

Stop

You start the simulation by selecting the Run button on the top menu bar, and can
pause or stop the simulation. Once you STOP the simulation you cannot restart it;
you must instead define a new simulation. You should use PAUSE if you wish to
make some changes and then continue. Having paused a simulation you continue by
selecting the run button again.
5.2

LOOKING AT RESULTS

Results are available for all the flow streams both during and after a simulation, and for

54

processes after a simulation has been completed. The following sections describe how to
get access to these results and how you can alter the way that results are presented to you.
5.2.1 Viewing results during a simulation
Results are generated primarily for the streams. By selecting a stream with the right mouse
button you are presented with a menu. If you select Reporting Options you get the following
form.

Generate profile file: Saves the data for that stream, allowing you to look at the results when
the simulation is over. If this is de-selected, no results will be available for this
stream/process either during the simulation or after the simulation has finished.
In-simulation reporting presents results during the course of the simulation. In-simulation
reporting allows you a choice of determinands simple being the common subset, and
advanced giving you access to all the stream data that STOAT models.
In-simulation reporting: This option allows you to look at certain determinands while the
simulation is being carried out. This allows you to assess if the simulation is accurate or if
you need to adjust some parameters to get the correct results. You can select simple or
advanced reporting and by clicking on determinands you get the following screens.

55

Determinands available from the simple list:

Determinands available from the advanced list:

56

Report view: Selecting this option produces the following form. You can select that the
results be displayed as a graph, as a table of the values (Timeseries) or as summary
statistics (mean, maximum, minimum, and standard deviation). You can change the report
type during the course of a simulation by selecting the results stream you want changed and
altering its characteristics from the Top Menu, Window, View report As option. You will be
given the same set of options as on the form below.

57

You can select in-simulation reporting for as many streams as you want. For each stream
you will get a graph that looks similar to that below. By default the graphs will be piled on top
of each other. You can have them re-arranged to be tiled, either horizontally or vertically, by
selecting Window, then Tile and either Horizontal or Vertical from the top menu.

If you right-click on a process and select Reporting options you are presented with a simpler
menu. You can choose to save data for later study by clicking on Generate profile to put a
cross in the box. The data files can become very large, so that we recommend you consider
carefully what process units and streams you wish to keep data for.

5.2.2 Customising a graphs appearance


Each graph can be customised. By right-clicking on each graph you are offered a menu to
change the default Graph Type, Titles, Scale, Style and Fonts etc.

58

Some of the options that are available in the STOAT graphics package are unsuitable for
use with the STOAT results files. You are encouraged to experiment with the various options
and change the scales, styles etc.
The results can also be viewed as a table of numbers. Select the graph that you wish to look
at as numbers, and then select Window/View results As/Table. The graph display will
change to a table that will fill up with numbers during the course of the simulation.

59

Another option is to view the Statistics during the simulation. You should be aware that the
statistics quoted may be inaccurate due to Start-up situations etc.
5.2.3

Viewing results at the end of the simulation

Viewing Stream Results


At the end of the simulation you can right-click on each stream and select Results to look at
the results. You can also achieve this by left-clicking on the stream. There may be a short
delay while data is being read in from files and the database. You must have selected, under
Reporting Options, that you want the results for that stream kept before you begin the
simulation. (The default is to keep all results unless you specify that you do not want this.)
You will be asked to select what stream components you wish to view, using the same set of
forms as with Reporting Options and a graph will be plotted. You can change the graph to a
table of figures using the Window/View Results As menu.

60

The results can be printed out or selected and copied to other applications, such as word
processors or spreadsheets. The following methods are available:
Graphs
Press [PRINTSCREEN] to capture the entire contents of the screen on the Windows
Clipboard. From your application (e.g. the word processor) then select Paste special
(usually under the Edit menu) to put the clipboard contents into your document.
Press [ALT] + [PRINTSCREEN] to capture the contents of the active STOAT screen on its
own. The result is again saved in the Windows Clipboard. This will normally capture all the
open windows.
Select Edit and then Copy. This will put only the active STOAT window (the one with the
top bar highlighted) onto the clipboard.
Select File/Print to print the graph.
Tables
First select the area of the table that you wish to copy. You do this by selecting any of the
corner cells that you want, and then, keeping the left mouse button down, move the mouse
to encompass the cells that you wish to copy. The selected cells will be highlighted. When
you have finished this select Edit and Copy from the top menu. You can then use Paste
special to put the results as a table of numbers into word-processors or spread-sheets.
Unlike the graphs you can subsequently manipulate these numbers in your spreadsheet.
Select File/Print to print that portion of the table that is visible on the screen.
Viewing Process Results
You can select to see process results at the end of a simulation by right-clicking on the
process and selecting Results. You will be offered a choice of looking at the results as tables
of time-series or as summary statistics.
5.2.4

Some considerations when viewing results

BOD: For the biological processes the BOD reported for that process is the BOD that is
available for degradation within that process. This therefore excludes the BOD that is
associated with the biomass in the process. The streams leaving that process do include the
biomass BOD in the reported total and particulate BOD. If the stream is connected to a
similar process then the biomass BOD will continue not to be available as BOD but if the
stream connects to a different process (e.g. waste activated sludge going to sludge
digestion) then the BOD tied up in the biomass becomes available, because under the new
conditions the biomass is treated as a substrate by the new bacteria.

61

STOAT calculates the average concentration in each flowstream. This sometimes may lead
you to think that the mass balance is not being correctly observed. This is not the case. As
an example, assume the following is entering an initially empty tank:
Hour 1: Flow = 200 m3/h, concentration = 100 mg/l.
Hour 2: Flow = 10 m3/h, concentration = 50 mg/l.
Hour 3: Flow = 0 m3/h.
Assume the flow leaving the tank = 105 m3/h.
The average concentration entering the tank over the two hours will be calculated as (100 +
50) / 2 = 75 mg/l - the concentration that would be calculated using a simple sampler without
flow proportioning.
At the end of the first hour the concentration in the tank will be 100 mg/l, and the volume in
the tank will be 200 - 105 = 95 m3.
At the end of the second hour the volume in the tank will be 0 m3 (95 m3 left after hour 1, 10
m3 added in hour 2 and 105 m3 removed in hour 2), and the concentration in the last bit of
liquid leaving the tank will be
(95 x 100 + 10 x 50) / (95 + 10) = 95 mg/l
The average concentration in the effluent over the two hours will then be calculated as (100
+ 95) / 2 = 98 mg/l.
Looking at the average concentrations over the two hours, STOAT would report that 75 mg/l
went into the tank and 98 mg/l left the tank. This may lead you to believe that more mass is
leaving the tank than is entering. This is not the case. The mass balance is correctly
calculated. The average is calculated in the most common way, rather than using a flowweighted average.
Dynamic Equilibrium: Mass balances may also appear to be broken in dynamic modelling
when the real case is that material has either accumulated within a vessel, or been stripped
out. Dynamic models are frequently run until a dynamic equilibrium (the time-varying
equivalent of steady-state) has been reached; if the results are compared with results from a
process that has not reached dynamic equilibrium incorrect conclusions about the adequacy
of the model, or the application of the results, are likely to be drawn. Where model results
are to be compared with experimental data the need to compare similar time trajectories
must be borne in mind.
5.3

SAVING YOUR WORK

STOAT organises the simulations as a collection of RUNS associated with a WORKS. The
data entered under Name and dimensions defines the sewage works. If you change any of
these then you have defined a new sewage works, and must save the new works before you
can continue simulations in STOAT.
All other data are defined as associated with runs. When you change any of these you
should save the result as a new run. STOAT will not automatically save a run for you.

62

From the File menu you can select New Works, Open Works, Save Works, Save Works As
or Delete Works, Open Works offers you a selection of works, as does Delete Works. You
select the works you wish to open or delete.

Once the works is open you can define New runs, Open old runs, or Save the run. If you had
previously completed the run then when you open it, it remains completed you can look at
the results but you cannot make any changes. If you do change any of the data then the run
is automatically flagged as a new run and you will have to save it with a new name.
The internal STOAT representation is something like:
Unique works ID: (allocated internally by STOAT)
Your name for the works
Layout
Works dimensions
Unique run ID: (allocated internally by STOAT)
Your name for the run
Run data
Run results
It is the internal ID that STOAT uses in organising data. Because of this you can have as
many duplicate works and run names as you wish; STOAT will keep them separate, even if
you do not. When you are given lists of works or runs these are ordered by the internal ID.
STOAT will re-use IDs if you have deleted works or runs that were previously identified with
these, so that the order in which they are listed is not necessarily the same as the order in
which they were created.
You are recommended to continuously save your work as you proceed.

63

6.

MENUS WITHIN STOAT

The main menu is designed to give you access to requirements such as saving your work
and customising STOAT, as well as setting global parameters required by STOAT.
There are four top menus, depending on whether you are:
1.

beginning your STOAT session with no databases open:

2.

designing a new works or editing an existing works (Design mode):

3.

carrying out a simulation or examining a previous simulation:

4.

examining the results of a simulation:

The first item on each menu is File, which has the following options:

64

Create a new works the starting point for each works that you wish to model.
Open a works you can open a works, add new processes to it, and then save the
works under a new name. This way you can build up extensions to existing works
descriptions.
Save the works that you have created.
Save the works under a different name.
Close the works this does not automatically save anything that you have done since
you last saved the works, although you will be asked if you wish to save the works.
Delete the works all the works definitions are held in a central database. You may
wish to get rid of some works when you have finished your modelling exercise.
Start a new run. The results from each run are automatically added to the works
database.
Open an old run to continue from where you stopped, or to look at old results.
Save the current run.
Save the current run under a different name. This allows you to try out 'what ifs' from a
common starting point, and keep the results from the scenarios separate.
Close the current run.
Delete the run if the results of the run are not necessary for your records you can
delete the run, freeing disk space.
Print - allows you to print the active window in STOAT.
Printer Setup - Allows you to select the printer settings for use with different printers.
Exit - This option will exit STOAT after a prompt has been displayed.

If you have no databases open, the following menu is displayed:

65

The File menu now offers three new options:


Create a new database: STOAT holds the data about a works layout, geometry and
operational conditions in a database. You can elect to create new databases for different
works. The STOAT menu will allow you to do this, but with two limitations:
1.

You must create a directory to hold the database in. STOAT will not do this for you.
You must not have more than one database per directory.

2.

The default database you will see when you start STOAT is held in the file STOAT.INI
in the \WINDOWS directory. STOAT will not alter this setting to reflect the last
database that you worked with.

Switch to a different database: Although STOAT will not automatically open the last
database that you worked on, you can change to any valid database. You must first Close
Works to detach STOAT From the current database, before you can attempt to connect to a
new database.
Compact the database: When you delete a run or a works in STOAT the database entries
are not physically removed. They are marked as deleted, and cannot be recovered, but they
still take up disk space. You must select the Compact Database option for STOAT to go
through the database and strip out the deleted information. We recommend that you do this
at regular intervals if you are deleting many works or runs.
The next item on each menu is Edit

This is an option that allows you to use the keyboard instead of the mouse. 'Cut', 'Copy',
'Paste' and 'Delete' permit you to select a process on the flowsheet and then cut or copy them
to paste somewhere else, or delete the process entirely.
Notes, if selected at the works design stage, has a memo pad that allows you to include notes
about the works. This is useful in keeping track of the progress of a range of possible works
designs and the attached runs. You cannot change the works name from this menu. You can
add comments describing the work that you are doing on the model. We recommend that you
use this option to enhance future use and archiving of your modelling.

66

Run, this allows you to change any of the parameters that specify the simulation boundary
conditions as described in Section 4.1.
Stream, Process, Influent, Effluent, Rainfall and Gas allow you to use the menu bar instead
of the mouse to access any results or other information about the selected stream or process.
e.g. If the influent is selected, then influent will be activated on this menu.
Audit, this selection allows you to edit the audit trail if it has been turned on under Options.

The Options menu contains the following sub-menus:

This menu sets global parameters.

Edit new process forces the menu for Input data/Name and dimensions to be displayed each
time a process is selected in the process toolbox and placed on the drawing board. If you
select this option there will be a tick-mark next to it. The default is for this menu only to be
displayed if requested, by right-clicking the process.
Pop up tips if selected will display the name of the run buttons (run, step, pause and stop)
when the mouse is placed over these buttons. The default is to display the names.
Process results when selected ensures that process results are saved by default for each
process during each simulation. You may then select specific processes to switch off saving
results. When there is not tick mark next to Process results then the default is to save no
results for any of the processes, and you will have to enable saving results for those processes
of interest to you.

67

Links style sets the default colour and arrowheads for the streams on the flowsheet. You can
subsequently set the colour and arrowheads for a given stream separately from the global
value.
Audit switches on the audit trail for that STOAT session. This allows you to keep track of
everything you do in any given session by using the Edit/Audit menu described above.

The Run menu duplicates the functions of the 'run icons.' This allows you to run STOAT
simulations using the keyboard, rather than the mouse. You can also use the function keys
[F5], [F6], [F7] and [F8] in place of either the mouse or the menu. You can only use the
function keys [F5] - [F8] if the menu with Run is visible.

The Tools menu allows you to access the Sensitivity Analysis, Calibration and
Optimisation and Batch options.

The Sensitivity Analysis option allows you to see what effect changing certain calibration
parameters has on your effluent quality. After selecting the Sensitivity Analysis you will be
faced with the following screen:

68

INPUT
Parameter Number
Type
Name
Stage
Parameter:
You can carry out a sensitivity analysis on one or two parameters at any one time. The
parameters can be either from a stream or a process and although you can change stream
parameters these are held constant for the period of the analysis, so any diurnal variations
will be lost. If you specify a process parameter from a process that has multiple stages e.g.
an aeration tank, you must specify in which stage is the parameter to be varied.
Start
Step
Stop:
For each parameter you specify an initial (start) and final (stop) value, and the step size to
be used between these two limits. STOAT will carry out the first run at the initial value, the
next run at the initial + step value and continue until the final value has been reached.

69

OUTPUT
Stream
Process
Name
Stage
Determinand:
You also need to specify a stream or process determinand to look at, so that you can see
the response. Here you choose which determinand you wish to view to see the effect that
varying the parameters in the input has. These are chosen as described for the input.
Time Series
Phase Plot
You have a choice of looking at the result as a time series, where each parameter value is
plotted as a new line, or as a phase plot, where the final simulation value is plotted against
parameter value.
The Calibration option allows you to compare your actual data against the STOAT predicted
data and automatically vary certain chosen calibration parameters to get the nearest
mathematical fit possible.
Calibration is provided through minimising the difference between your measurements and
the STOAT predictions. Different algorithms and criteria may provide different final results.
Your choice of the initial values for the parameters will also affect the final result. It is
therefore worth trying more than one calibration run, varying the starting values for the
parameters. The following screens allow you to use the calibration options.

Algorithm:
A choice of minimisation algorithms. Simplex is likely to be slower than Powell but is also
likely to be more robust.
Criteria:
Start with least-squares. Experiment with the other options only if least-squares appears to
be inappropriate. You will get different (usually only a small difference) results with the
different criteria. The best criterion is probably min-max followed by absolute deviation, but
these are difficult problems to solve. Least-squares is recommended as a starting point
because it is the easiest criterion for minimisation algorithms to solve.

70

Maximum number of iterations:


If no minimum has been found after this number of iterations the calibration exercise will
stop. You should look at the number of iterations actually used to decide if the calibration
work appeared to locate a minimum.
Convergence tolerance:
The criteria are evaluated with each choice of parameters during the calibration run. When
the relative change in criteria between two sets of parameters is less than this convergence
tolerance the algorithm will stop, assuming that it is now close enough to the minimum.
Parameters:
Opens up a form that allows you to specify the parameters to be changed for the calibration
run.

Select the name, stage (if applicable) and determinand. Then specify a lower and an upper
bound. The initial value for the parameter will be selected at random between these bounds.
Data:
Opens up a form that allows you to specify the data to be used for the calibration work.

71

Specify the time, location and value of your measurements. Your can also specify a weight,
to allow setting some equality when finding a minimum on mixed liquor suspended solids
and effluent ammonia.
The lower and upper bounds are only required if you have specified bounded as your
optimisation criteria. Then, if the predictions are within the bounds no error is calculated.
When the predictions exceed the bounds then a least-squares error is calculated, using the
measured value and weight.
The Optimise option allows you to optimise the size of the process based on parameters
e.g. effluent quality that you have selected.

Optimisation is provided through minimising the sum of the optimisation parameters.


Different algorithms and parameter weights may provide different final results. Your choice
of the initial values for the parameters will also affect the final result. It is therefore worth
trying more than one optimisation run, varying the starting values for the parameters.

72

Algorithm:
A choice of minimisation algorithms. Simplex is likely to be slower than Powell but is also
likely to be more robust.
Maximum number of iterations:
If no minimum has been found after this number of iterations the optimisation exercise will
stop. You should look at the number of iterations actually used to decide if the optimisation
work appeared to locate a minimum.
Convergence tolerance:
The criteria are evaluated with each choice of parameters during the optimisation run. When
the relative change in criteria between two sets of parameters is less than this convergence
tolerance the algorithm will stop, assuming that it is now close enough to the minimum.
Parameters:
Opens up a form that allows you to specify the parameters to be changed for the
optimisation run.

Select the name, stage (if applicable) and determinand. Then specify a lower and an upper
bound. The initial value for the parameter will be selected at random between these bounds.
Also specify a weight. The algorithm will attempt to minimise the sum of all the parameters.
The weight is intended to provide a means of sensibly comparing costs, areas and volumes.
Constraints:
Opens up a form that allows you to specify the constraints on effluent quality.

73

Specify the location and permitted range for effluent and other values. You can also specify
a weight, to allow setting some equality when finding a minimum on mixed liquor suspended
solids and effluent ammonia. If the predictions are within the bounds no error is calculated.
When the predictions exceed the bounds then a least-squares error is calculated, using the
measured value and weight.
The Batch menu allows you to set up a series of simulation for various Works and Runs and
then to run the simulations as a batch process. On selecting Edit... the following setup
screen is displayed:

You select the works and runs that you wish to be executed in the batch run and click the
Right arrow button to include them in the batch run. You use the left arrow button to deselect
them. After you have decided on what simulations are to be included in the batch run, you
click OK. When you wish to execute the batch select Tools/Batch/Run and each simulation
will be carried out one after the other. This facility is very useful if you wish to carry out long
runs overnight.

74

Window allows you to set the windows opened by STOAT as cascaded (one on top of
another, diagonally displaced) or tiled, and the tiling method to be horizontal (piled up one
on top of another long and thin) or vertical (side-by-side tall and narrow). Processes
toolbox allows you to display the list of processes at any time. Because the toolbox normally
floats on top of all other applications it can become intrusive. You can close the toolbox, and
then when you need to use it again this option will display the toolbox on the screen.

If you are looking at a results screen, there is different Window menu as shown below:

As before Cascade, Tile and Arrange Icons are available but there are also other options. If
you select View, you can change your results view between displaying Graph, Timeseries
Data, Statistics, Graph and Statistics and Timeseries and Statistics. Close Results
closes the current window and Close all results closes all open Results windows.
Help is available by selecting the Help option. You can also ask for help when using the
different data entry forms. Help is provided through the standard Windows help program,
and you can get help on how to use help. The STOAT help is available in two ways. The first
is 'Contents', which lists the headings available. By selecting a heading you are then
presented with the help text for that heading. The alternative method is to select 'Search.'
You then type in a keyword that you want help on, and the help program will present the
nearest word available. If your keyword is not in the help dictionary then you will have to try
related keywords. Help is also available by pressing the [F1] key.

7.

STREAMS
75

Streams are the links which connect processes together. Sewage and sludge flow
through the streams instantaneously, so that there are never time delays caused by flow
transport. This is a reasonable assumption for the flowrate, because the flowrate responds
to changes instantaneously. The concentration changes do not respond as rapidly, and
because of this you may have some temporal discrepancies between the STOAT predictions
and measured data.
Sections 7.1 (creating a stream), 7.2 (naming a stream) and 7.3 (customising the link
appearance) discuss features that are available, or should only be changed, during the
works definition.
Sections 7.4 (initial conditions), 7.5 (selecting output) and 7.6 (selecting results) discuss
features that are only available before, during or after a run.
7.1

CREATING A STREAM

Creating a stream can only be done at the works design stage. Once you have selected a
run you can no longer create or modify the streams.
Connecting processes with a stream requires placing the cursor over a process effluent
point, when the cursor will change from the arrow pointer to a cross-hair. Press and hold
down the left mouse button. Keeping the button pressed, move the mouse towards the
process you wish to connect. When the mouse is over an influent point the cursor will
change from a cross-hair to a 'linked chain' symbol. This indicates that you can now create a
legal stream. Release the left mouse button. The stream between the two processes has
been established.
You can adjust the shape of the stream by moving the processes around; the stream will
follow whichever process is moved, stretching and contracting as necessary. You can also
insert bends, and later delete them, into the stream. Do this by selecting the stream at the
point where you want the bend and pressing the right mouse button. You will see the
following menu. Select Insert bend' to create the bend. The bend is displayed as a small
grey square. By placing the mouse over this square and holding the left mouse button down
you can now move this bend around. This is useful when tidying up a busy flowsheet for
presentation in a report.

76

7.2

NAMING THE STREAM

For each stream you can supply a name. Again you right-click on the stream and pull up the
menu as above. Select Input Data to get the following menu.

The name provides a unique identifier which will be used in other parts of STOAT to help
you identify how the processes are connected together. The name can be anything you
want, from the terse default 'Stream 1' to descriptions of the form 'Sewage stream
connecting North works primary tank #1 to activated sludge lane 3.'

Some processes need reference to certain streams and it is easier to refer to Control
Stream or Settled Sewage than to Stream 14 and Stream 28.
7.3

CUSTOMISING THE STREAM APPEARANCE

On selecting Style from the stream menu, you can select Arrowheads or Colour. At the
present time Arrowheads are not available, but to change the colour of the stream, select
Colour from the menu. The colours for the stream can be chosen only from the 'basic
colours', not from the 'Custom colours.' The colour for that stream will be changed. If you
change the stream colour from the main menu (Options/Streams/Colour) then the new
colour will be used for all streams drawn after the change. You can use this to colour-code
your drawings so that sewage lines are blue (say) and sludge lines black.

77

7.4

DEFINING INITIAL CONDITIONS

The initial conditions do not need to be set, because they will be calculated by STOAT.
Where you have a sewage works with a large number of recycle streams you may find that
STOAT will run a little faster if you do specify the initial conditions, because the recycle
streams require an iterative 'guess and correct' solution method. Whenever you start a
simulation from an old simulation the initial conditions will be set to the values from the
previous solution, and you should have no need to change them.
Our recommendation is to leave the stream initial conditions at the default values and
let STOAT take care of calculating the values.
Before a simulation is begun left-clicking on the stream will automatically bring up the initial
conditions menu.

78

7.5

SELECTING STOAT OUTPUT

The output created by STOAT for the streams is selected from Reporting Options.
'Generate profile file' saves the results of the simulations and will later allow you to produce
a report of the flows and concentrations in the stream. By default this is set for all the
streams. You can save disk space by turning the option off for any stream that you are sure
that you do not want to examine.
Selecting 'In-simulation reporting' will present the results as they are calculated. You should
use this option sparingly as you can quickly clutter up the screen with graphs. For insimulation reporting you can choose to look at the most common set of determinands or at
the full set of determinands within STOAT.

79

The 'simple' option allows you to choose from a small set of common determinands,
including total BOD and suspended solids. You must place a cross in the box for each
determinand you wish to have displayed.

'Advanced' allows you to display the determinands that are in STOAT. This does not include
total BOD or solids, because they are partitioned into soluble and particulate BOD, and
volatile and non-volatile solids. As with the 'simple' option you select which components you
want to have displayed.

80

Selecting Report view produces the following form. You can select that the results be
displayed as a graph, as a table of the values (Timeseries) or as summary statistics (mean,
maximum, minimum, and standard deviation). You can change the report type during the
course of a simulation by selecting the window you want changed and altering its
characteristics from the Window, View report As options. You will be given the same set of
options as on the form overleaf.

81

7.6

VIEWING RESULTS

Results can be examined once a simulation has been completed. Right-clicking on the link
will present a menu with Results enabled (and Reporting options disabled). Selecting
Results will take you through the same menus as Reporting options, but omitting the first
menu asking you if you want to generate a profile or have in-simulation reporting, and
forcing you through the menus for in-simulation reporting determinands and report view.
Once the simulation is complete (or has been stopped) left-clicking on a stream will
automatically bring up the results menu.
7.7

CONVERTING STOAT STREAMS

This facility allows results streams from previous runs to be converted to Influent streams for
future runs.
On the stream menu is the option Convert... When chosen this option will bring up a file
selection menu. Entering a file name will then lead to the stream being converted from its
internal STOAT name and representation to a name of your choice, and in a format that
STOAT can use for an input file. The resulting file will start at the first time you specified for
results; that is, if you asked for results to be displayed every hour, the first time in the file will
be 0.25 h; if you specified output every two hours the first time will be 2 h. When you use
this file for a simulation STOAT will take the results at time zero to be the initial conditions
specified for the flowstreams and use linear interpolation to calculate influent flowstreams at
intermediate times.

82

This facility can be used most effectively if you need to simulate a large works. You can
break the large works down into smaller works and for example carry out simulations on the
primary sedimentation plant and convert the effluent stream to use as the influent to the
secondary treatment plant.
7.8

EXPORTING TO SEWERAGE MODELS

Selecting the option to export files brings up two menus. The first menu asks for the name of
a file. This name will be used as the base name for files in the MOSQITO export format. The
files produced by STOAT are:
MOS:
.HYQ: Flow data
.HAD: Ammonia
.HBD: Non-settleable
.HB1: Settleable BOD
.HS1: Settleable solids

QM
.HYQ
.CND
BOD .CBD
.CBI
.CSI

83

The conversion data menu asks for the following:


A descriptive title;
The start date for the results, for which the default is the current date and time;
The sediment size, density and settling rate; and
The ratio of particulate BOD to nonsettleable BOD.
The sewerage models split BOD into settleable and nonsettleable fractions; sewage
treatment models into soluble and particulate. When exporting data STOAT assumes that all
solids are equivalent to the solid fractions defined for the .HS1 file, but that some of the
particulate BOD will be associated with the BOD in the .HBD file. The sewerage models
define BOD in the .HBD file as BOD remaining in the supernatant after 15 minutes settling,
and solids in the .HS1 file as solids that have settled out after being left to settle for 15
minutes. WRc experience is that the modelling difference between filtered solids and
settleable solids after 15 minutes can be ignored, but that the effect on BOD does require a
correction. The correction will differ from effluent to effluent, but a factor of 0.5 is reasonable.
If you export STOAT files to sewerage files, and then import from these files back into
STOAT you will find that the flows do not match. This is caused by truncation: STOAT uses
flow in m3/h, while the sewerage models use m3/s. The results written to the .HYQ file are to
three decimal places; this imposes a loss in accuracy of around 4 m3/h between STOAT and
the sewerage results.

84

8.

PROCESSES IN THE TOOLBOX

STOAT allows you to build and simulate any sewage treatment works by putting various unit
processes onto a drawing board and connecting them together with streams to form a
representation of the actual plant. These processes are stored in a toolbox which appears
every time you are in design mode of the program.

It can also be displayed via the Window/Processes Toolbox menu bar. You select the
processes from the toolbox and drag them onto the drawing board for use (Section 3.1).`
This section gives a list of all the processes in the toolbox that are available for use.
Data for each of the processes can be entered by placing the mouse over the process and
pressing the right mouse button. You will then have a small pop-up menu. All the data are
entered through the first menu item, 'Input data.' The left mouse button must then be used to
select items from the pop-up menu and the sub-menus below it.

85

On all the data entry forms you will see at the bottom the following set of buttons:

These have the actions:


'OK':
Accept the changes made to the data on the form.
'Cancel':Quit the form, making no changes.
'Reset': Any data on the form that has a default value will be set to the default. Data
that has no default will be left unchanged.
'Help': Get help on the data requirements for this form.
There may be a fifth button, labelled More. This indicates that there are more data available
than is displayed; selecting More will move you through the additional data forms.
It is recommended that if a more button exists on a form, you should always click on
it to see the other forms.
The following processes are available within STOAT for modelling and have BOD and COD
models available as shown:
PROCESS
CATCHMENT MODELLING:
Rainfall
Rainfall Area / Sewer
CSO Tank
Inline Detention Tank
Offline Detention Tank

BOD

COD

*
x
*
x
x

INFLUENT
Influent (sewage)
Industrial Effluent
Landfill Effluent

*
*
*

*
*
*

STORM SEWAGE TREATMENT


Storm Tank
Blind Storm Tank

*
*

*
*

*
*

*
*

PRIMARY TREATMENT
Primary Tank
Lamella Separator
Chemically Assisted
Sedimentation

86

PROCESS
BIOLOGICAL FIXED FILM
PROCESSES
Trickling Filter
Humus Tank
Upflow Biological Aerated
Filter
Downflow Biological Aerated
Filter
Rotating Biological Contactor
Submerged Biological
Contactor
Oxygenator
Fluidised Bed
BIOLOGICAL SUSPENDED
PROCESSES
Activated Sludge
Oxidation Ditch
Secondary Sedimentation
Tank
Sequencing Batch Reactor
Intermittently Decanted
Extended
Aeration (IDEA)
Deep Shaft
Degasser
SLUDGE TREATMENT
PROCESSES
Dissolved Air Flotation
Mesophilic Anaerobic
Digestion
Thermophilic Aerobic
Digestion
Sludge Dewatering
Incineration
Counter-current Heat
Exchanger
Co-current Heat Exchanger
Sludge Dryer
Indirect Sludge Dryer

BOD

COD

*
x
*

*
*

*
*

*
*

*
*

*
*

*
*

*
*

*
*

*
*

*
*

*
x

x
*
*

*
*
*

*
*
*

*
*
*

CONTROLLERS
PID Controller
Ladder Logic Controller
Instrument Probe

87

PROCESS
OTHER PROCESSES
Balancing Tank
Wet Well
Pipe holdup
Chemical Disinfection
Black Box
Chemical P Removal
Separator

BOD

COD

*
*
*
*
*
*
*

*
*
*
*
*
*
*

MIXERS & SEPARATORS


2-way flow divider
2-way Gas flow divider
3-way flow divider
3-way Gas flow divider
Alternating Divider
Sludge Divider
2-way flow mixer
2-way Gas flow mixer
3-way flow mixer
3-way Gas flow mixer
Overflow
Gas Overflow
DO NOTHING SYMBOLS
Effluent
Sludge
No Entry
You should not normally attempt to mix COD and BOD models on the same flowsheet. If you
do have to do this you should use a black box model to convert between COD and BOD
units - you are responsible for defining the appropriate conversion parameters.
An asterisk means that the model can be used for either providing that you specify BOD as
meaning biodegradable COD. An 'x' means that currently there is only one model supported.
A detailed description of each model as well as the specific data requirements of each
model is given in the Process Model Description sManual.

88

APPENDIX A PROGRAM LIMITS


1.

Number of sewage works: 4,096

2.

Number of runs per works: 256

3.

Number of links per works: 4,096

4.

Number of processes per works: Limit is set by available memory.


As an example of the memory limit: 100 activated sludge processes with settling
tanks would require around 2 Mbytes of free memory.

5.

Sum of links and processes must be less than about 400.

89

APPENDIX B TIPS FOR EFFICIENT RUNNING


1.

If the sewage works comprises multiple parallel streams then model one of the
streams.

2.

If the sewage works comprises multiple parallel streams and it is not possible to find
a way through the flowsheet to model a single train, then you would have to assume
that the flowsplits are at all points are equal abnd lump each set of parallel units
together.

As an example, suppose that 5 activated sludge aeration basins (all different volumes)
feed 8 settling tanks (all different areas) but that the flow split is designed so that the
five aeration basins have the same retention time, and the eight settling tanks the
same overflow rate. As a first approximation, the works can be modelled as one
aeration basin and one settling tank. You can refine the works arrangement later if
the modelling predictions indicate that this is required (for example, if there are large
discrepancies between the model predictions and data, or if the settling tanks cannot
be reconciled to have nearly equal overflow rates and retention time).
3.

Choosing a data output interval as large as you can accept, so that the size of the
results database is kept down.

4.

Displaying, during the simulation, the minimum number of link variables that you
require to monitor the progress of the simulation.

5.

Switching off Generate Profile File for any streams that you are not interested in.

6.

Simplifying the modelling detail to reflect the work required. As an example, if you are
concerned only with the activated sludge unit you may choose not to model the
sludge train, and to use settled sewage data rather than include storm or primary
tanks.

7.

From Windows select the Control Panel (usually in either your Main or Accessories
groups). Use the Enhanced program to set the virtual memory to be permanent.

8.

If you are using the activated sludge model check that dissolved oxygen in aerated
tanks is in excess of 1.0 mg/l. Low values of dissolved oxygen will cause the program
to run slowly.

90

APPENDIX C STOAT DEFAULT FILES (THE STOAT.INI


FILE)
STOAT locates its working directory by looking at the contents of the STOAT.INI file. This
can be found under STOAT DEFAULT FILES. You can alter this file to allow you support
several projects, with each project keeping its results in a separate directory.
In the STOAT programme group, there is an icon labelled STOAT default files. If you
double-click on this, you will be allowed to edit the STOAT.INI file. you should see the
following displayed.
[Stoat filing system]
STOAT_DIR=C:\STOAT
STOAT_USER_DIR=C:\STOAT\DATABASE
STOAT_MDB_USER=USER.MDB
STOAT_MDB_EMPTY=STOAT.MDB
STOAT_MDB_DIALOG=DIALOG.MDB
You may change the lines STOAT_USER_DIR and STOAT_MDB_USER.
Each time you start on a new project, create a new directory. We assume you call it
Project1. Copy the file STOAT.MDB, which will be in whatever directory has been assigned
to STOAT_DIR (usually C:\STOAT), and rename it as USER.MDB. You should now have a
file in the directory Project1 called User.mdb.
Add a new line to STOAT.INI. Directly below STOAT_USER_DIR add the line
STOAT_USER_DIR=C:\Project1
and insert a semicolon at the start of the previous line. STOAT.INI should look like:
[Stoat filing system]
STOAT_DIR=C:\STOAT
;STOAT_USER_DIR=C:\STOAT\DATABASE
STOAT_USER_DIR=C:\Project1
STOAT_MDB_USER=USER.MDB
STOAT_MDB_EMPTY=STOAT.MDB
STOAT_MDB_DIALOG=DIALOG.MDB
When you save STOAT.INI and next load STOAT you will find that the database is empty.
All work you now do will be saved in Project1. If you have several projects you would have a
STOAT.INI file that looked like:
[Stoat filing system]
STOAT_DIR=C:\STOAT
;STOAT_USER_DIR=C:\STOAT\DATABASE
;STOAT_USER_DIR=C:\Project1
;STOAT_USER_DIR=C:\Project2
STOAT_USER_DIR=C:\Project3
STOAT_MDB_USER=USER.MDB
STOAT_MDB_EMPTY=STOAT.MDB
STOAT_MDB_DIALOG=DIALOG.MDB

91

Project3 would be the active project, because this is the one without a semicolon in front of
it. The semicolon allows you to add comments to STOAT.INI, so that you could have a file
that looks like:
[Stoat filing system]
STOAT_DIR=C:\STOAT
;STOAT_USER_DIR=C:\STOAT\DATABASE
;STOAT_USER_DIR=C:\Project1
;STOAT_USER_DIR=C:\Project2
STOAT_USER_DIR=C:\Project3
STOAT_MDB_USER=USER.MDB
STOAT_MDB_EMPTY=STOAT.MDB
STOAT_MDB_DIALOG=DIALOG.MDB

; Location of STOAT.EXE
; Original database
; Works for Design case #1
; Training examples
; Works for Timur Emirate
; Name of the working database
; Master empty copy of database
; This contains menu text

The files USER.MDB, STOAT.MDB and DIALOG.MDB are all Microsoft Access Version 2
database files. You can look at the contents of these files with Microsoft Access.

92

APPENDIX D ERROR MESSAGES


Activated sludge aeration tank: If you
are going to specify a value for the
saturation dissolved oxygen, it must
be greater than zero. Please re-enter.

The saturation dissolved oxygen must be


greater than zero. A value of -1 is used to
signal that the internal correlation should
be used. You can enter a value of -1, but
it would be preferable to use the option
provided on the menu.

Activated sludge aeration tank: No


MLSS recycles are defined for this
activated sludge aeration tank. You
should set a non-zero number of
recycles first.

You should specify under Names and


dimensions the number of internal MLSS
recycles present in the tank. If this is zero
then you cannot access the MLSS
recycles menu. If you change the number
of MLSS recycles then this has changed
the works geometry, and you must save
the works with a new name.

Activated sludge aeration tank: The


feed distribution must sum to 1 over
all stages. Please re-enter.

The feed distribution is entered as a


fraction. These must sum to 1.0. Zero
fractions are permitted; negative values
are disallowed.

Activated sludge aeration tank: The


maximum number of MLSS recycles is
the number of stages squared. Please
enter a valid number.

The maximum number of recycles that


you could define for an aeration tank is
the number of stages squared.
Practically, the number is usually in the
range 1-4.

Activated sludge aeration tank: The


maximum pumping time per wastage
event must be less that the period
between wastage events.

The pump ON time cannot exceed the


ON + OFF (period between wastage
events) time.

Activated sludge aeration tank: The


MLSS cant be less that the sum of
viable and nonviable heterotrophs and
autotrophs.

Total solids cannot be less than the sum


of the biomass solids.

Activated sludge aeration tank: The


return distribution must sum to 1 over
all stages. Please re-enter.

The return sludge distribution in the tank


must sum to 1.0. Zero fractions are
permitted; negative values are
disallowed.

Activated sludge aeration tank: The


tank in which MLSS is measured must
be one of the tanks stages. Please reenter.

A tank with N stages can only have the


MLSS measured in stages 1, 2, 3, ... N.
Using a value of 0 or greater than N is
physically impossible.

Activated sludge aeration tank: The


tank in which MLSS is wasted must be
one of the tanks stages. Please reenter.

A tank with N stages can only have the


MLSS wasted from stages 1, 2, 3, ... N.
Using a value of 0 or greater than N is
physically impossible.

93

Activated sludge aeration tank: The


volume distribution must sum to 1
over all stages. Please re-enter.

The sum of the volume fractions must be


1.0. Zero values are not permitted, and
will trigger this message.

Biofilter: You must enter -1 or a


number greater than zero for the
equilibrium dissolved oxygen. Please
re-enter.

The saturation dissolved oxygen must be


greater than zero. A value of -1 is used to
signal that the internal correlation should
be used. You can enter a value of -1, but
it would be preferable to use the option
provided on the menu.

Database error: Unable to create new


storm tank.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred.

Database error: Unable to initialise


storm tank run data.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred.

Database error: Unable to open


results profile file.

The results profile file was either deleted


or not created. This will happen if you
have unchecked the Save results profile
option under Reporting options. You will
get this message if you have Saved As ...
a previous completed run the old
results are not copied to the new name.

Database error: Unable to read


flowstream data from database for a
warmstart.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred. This
error message is usually non-fatal and
can be ignored. STOAT will calculate
the required conditions on running the
model.

94

Database error: Unable to read


flowstream run data from database.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred. This
error message is usually non-fatal and
can be ignored. STOAT will calculate
the required conditions on running the
model.

Database error: Unable to read storm


tank run data from database.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred.

Database error: Unable to read storm


tank static data from database.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred.

Database error: Unable to write storm


tank run data to database.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred.

Database error: Unable to write storm


tank static data to database.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred.

Device error: That device appears to


be unavailable.

The most common source of this


message is that the STOAT.INI file
contains various assignment statements
which have been assigned to directories
that do not exist, or have been
commented out. See Appendix D for
more details.

95

Drive error: File name is illegal.

A filename that is not legal under DOS


has been used. Please ensure that the
file is only 8 characters long and does
not contain the characters
asterisk (*)
space
comma (,)
open angle brackets (<)
close angle brackets (>)
periods (.) A maximum of one period is
allowed.
question mark (?)
backslash (\) Unless to mark a directory
vertical bar (|)

Drive error: Insert a disk into the drive


and try again.
Drive error: The disk is full.

You need to create some space on your


hard disk. You will have to delete some
files to proceed.

Error creating run: Unable to find


initial storm tank conditions from old
run.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred.

Error creating run: Warm start tank


data missing - initialising with default
data.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred.

File error: Attempt to read past end of


file.

The file has been corrupted, so that


STOAT is looking for data on the file that
has been lost.

File error: File cannot be opened with


specified access type.

Internal STOAT error. Please contact


WRc.

File error: File is already open.

Internal STOAT error. Close down


STOAT, and restart the computer.

File error: Path does not exist.

The directory you have specified does


not exist.

96

File not found: Cannot find this file.

The file you have specified does not


exist.

Flowsheet full: Unable to add bend to


flowsheet.

You have reached a limit on the


complexity of the flowsheet. Save the
worksheet, close it, and then open it.
This may free some additional memory
and allow you to continue. If this does not
work you will have to simplify your
flowsheet.

Flowsheet full: Unable to add process


to flowsheet.

You have reached a limit on the


complexity of the flowsheet. Save the
worksheet, close it, and then open it.
This may free some additional memory
and allow you to continue. If this does not
work you will have to simplify your
flowsheet.

Flowsheet full: Unable to add stream


segment to flowsheet.

You have reached a limit on the


complexity of the flowsheet. Save the
worksheet, close it, and then open it.
This may free some additional memory
and allow you to continue. If this does not
work you will have to simplify your
flowsheet.

Graph error: The number of X values


and the number of Y values are
different.

Internal STOAT error. Please contact


WRc.

Graph error: Unable to plot any more


points on the graph. There is an upper
limit of 6,000 points on the graph.
Invalid control sequence: All elapsed
times in a control sequence must be
consecutive - invalid entries have
been ignored.

The Operational menu allows you to


program changes for the operational
conditions. The times for these changes
must occur so that each change occurs
after the previous change.

Results reporting error: Error reading


from results profile file.

The results profile file has been


corrupted. One cause of this error is
specifying under Windows that decimal
points shall be written as commas.

Stopping run: The end of an influent


data file has been reached.

You have attempted to carry out a


simulation using a sewage data file that
was not long enough.

97

Table/Grid error: Unable to add any


more columns to table/grid. There is
an upper limit of 400.

You have reached an internal Windows


limit.

Table/Grid error: Unable to add any


more rows to table/grid. There is an
upper limit of 2,000.

You have reached an internal Windows


limit.

Unable to identify storm tank model.

A similar message is available for all


processes. If you get this message then
either the database has been corrupted
or deleted; or the database directory is
invalid; or the disk is virtually full; or an
internal STOAT error has occurred.

Unexpected error: An error occurred


when saving the works flowsheet. No
changes were made to database.

The database has been corrupted or


deleted, or the disk is full.

Unexpected error: Error deleting run


table.

Internal STOAT error. Please contact


WRc.

Unexpected error: Error reading


flowstream lines.

Internal STOAT error. Please contact


WRc.

Unexpected error: Error reading


process pictures.

Internal STOAT error. Please contact


WRc.

Unexpected error: Error reading works Internal STOAT error. Please contact
WRc.
name and memo.
Unexpected error: Error saving
flowstream lines.

Internal STOAT error. Please contact


WRc.

Unexpected error: Error saving


process pictures.

Internal STOAT error. Please contact


WRc.

Unexpected error: Error saving works


name and memo.

Internal STOAT error. Please contact


WRc.

Unexpected error: HMIN too small for


DLL.

STOAT would have to use time steps of


less than 1 millisecond to calculate the
changes taking place in the sewage
works. This suggests that you are trying
to do something physically impossible, or
that you should increase the integration
tolerances.

98

Unexpected error: Insufficient memory Close the works, then re-open it. STOAT
allocates memory for each simulation
for DLL.
and normally deallocates it after each
simulation. This may sometimes fail
(usually after error messages that expect
that you would have closed down the
works), and closing the works forces the
deallocation of memory.
Unexpected error: Tolerance too tight
for DLL.

Increase the tolerance you have


specified for integration.

Unexpected error: Unable to find


process ID in process ID-Index lookup
table.

Check that the activated sludge settling


tanks have their control tanks assigned
to legal aeration tanks on the flowsheet.

Unexpected error: Unable to find


stream ID in stream lookup table.

Check that the storm tank control stream


has been assigned to a legal flowstream
on the flowsheet. Check that all
processes are connected (using Input
data/Connections.)

Unexpected error: Unable to open the


selected works

Internal STOAT error. Contact WRc.

Unexpected error: Unknown return


code from DLL.

Internal STOAT error. Contact WRc.

Unexpected error: Unrecognised


integrator passed to DLL.

Internal STOAT error. Contact WRc.

Works validation error: A storm tank


area is zero or negative.

Similar messages are available for all


processes. You have specified a
physically meaningless area.

Works validation error: A storm tank


volume is zero or negative.

Similar messages are available for all


processes. You have specified a
physically meaningless volume.

Works validation error: A stream to a


storm tank has not been set.

Check that the storm tank control stream


has been assigned to a legal flowstream
on the flowsheet.

Works validation error: Zero or


negative biofilter depth.

Similar messages are available for all


processes. You have specified a
physically meaningless depth.

99

APPENDIX E GENERAL PROTECTION FAULTS


STOAT may sometimes crash with a General Protection Fault (GPF). A GPF occurs when a
program attempts to use memory that is being used by another program. With the two
programs each attempting to use the same area of memory a program failure occurs. This is
not a STOAT problem.
The most common causes of this problem are:
1. Network software, where the network software does not fully integrate with Windows;
2. Computers with less than 4 MB of memory, so that the GPF is caused by Windows
attempting to work with insufficient memory;
3. A large number of programs running at the same time, so that the GPF is caused by
Windows attempting to share insufficient memory with the programs;
4. The use of a high-resolution screen, or an intricate wallpaper pattern, so that critical
areas of Windows memory are low.
5. GPFs will frequently occur if Windows resources drop below 25%. You can see how
much of the resource is available by selecting Help/About from the Program Manager or
File Manager in Windows.
The possible solutions to GPF problems are:
1. Increase memory
2. Run as few programs as possible at a time
3. Get rid of wall paper ad background patterns
4. Use the a lower resolution screen setting
5. Investigate the possibility of programs such as network drivers (or battery managers,
Plug and Play software, or any other software that is designed to work directly with the
hardware) causing Windows to incorrectly allocate memory.

100

APPENDIX F USING THE COPY DATABASE UTILITY


STOAT comes with a utility that allows you to extract records from the STOAT database.

This facility should be used to update STOAT2 databases to run under STOAT3.
Running this program produces the first menu:

Here you can specify if you wish to copy an entire database, extract part of the databse, or
extract some of the influent sewage patterns.
Selecting Copy a database asks for the source and target databases.

101

You will then be asked to confirm that you wish to copy the database. Copying the databse
does not copy the associated results data, only the information required for warm starts.

If the old database was from an earlier version of STOAT you will get the following warning
message:

102

Finally you will be asked if you wish to make this the new default database.

The second option, copying part of a database, also requests a source and target database:

103

If the two databases are from different versions of STOAT you will be given a warning about
this. If you choose to proceed then the differences in data held in the databases will not be
updated, and these will use the defaults next time you run STOAT. You will get this message
from different versions of STOAT, even if the database structure is the same. You can
normally safely ignore this message and continue.

You are then given a list of works available in to the source database that can be copied.
You can choose to copy these one at a time by running the copy utility several times, or in a
single batch. You select multiple works by the following procedure:
(a)
(b)

Holding [CONTROL] down click on the works you wish to copy. This highlights the
selected works.
If you wish to copy several works that are together you can do this by selecting the
uppermost name, then holding the [SHIFT] key down selecting the lowermost name.
All the names between these two will also be highlighted.

Again you are asked for confirmation.

104

When the selected works have been copied to the target database you are then given the
option to have the target made the new default STOAT database.

The final option, to copy selected influents, will take you through a similar set of menus to
those for copying selected works.

105

APPENDIX G SENSITIVITY STUDIES ON MODEL


PARAMETERS
G.1 Introduction
The STOAT model contains a large number of parameters. Several of these parameters
have been set to a universal value applicable to all process simulations (e.g. the maximum
specific growth rate of heterotrophic organisms). However, many of the model parameters
must be specified by the user. Some of the parameters which fall into this category can be
readily determined (e.g. the dimensions of the primary tank and the activated sludge
aeration vessel). There are also several parameters which may be determined by relatively
simple direct measurements (e.g. the maximum settling velocity of activated sludge flocs).
Methods for estimating model parameter values are given in the Process Model Descriptions
guide. Certain parameter values may be difficult to determine or may not be available (e.g.
activated sludge floc maximum settling velocity in the design stage of a sewage treatment
works). Under such circumstances default values may be used. Recommended parameter
default values are also given in Appendix B of this guide.
The outputs from the various unit processes incorporated within STOAT are dependent both
upon the influent to that process (e.g. diurnal variation of settleable suspended solids in the
influent to a primary tank) and to the value of the model parameters. The model output is
sensitive to the magnitude of the different parameter values to varying degrees, such that an
increase in the value of one model parameter may not have the same effect upon the model
output as an equivalent increase in another model parameter. Knowledge of the sensitivity
of the model to different parameter values is important as more time may then be allocated
to the determination of parameters to which the model is most sensitive.
A full sensitivity analysis of the STOAT model using a factorial experimental design in which
each of n model factors appears at two levels (high value and low value) would require a
minimum of 2n model simulations 3. For a model containing say 10 parameters the number
of simulations required to carry out a full sensitivity analysis would be 1024. STOAT contains
many more than 10 parameters and therefore a full sensitivity analysis is not feasible.
Consequently, the scope of the sensitivity tests was restricted to an investigation of the
primary settlement tank and the activated sludge vessel. In addition only the effect of single
parameter variations upon model outputs was tested, i.e. for each of the example unit
processes a universal baseline condition was simulated. Individual parameters were then
varied independently by choosing a higher and lower value relative to the baseline case.
The results of these analyses were then compared graphically.

This section of the guide is divided into the following sub-sections:

Section G.2 specifies the diurnal flow pattern and pollutant concentrations
assumed to be in the influent sewage.

Section G.3 describes the results of sensitivity tests on the performance of the example
primary settlement tank, and the effect of a storm event on the tank.

Section G.4 describes the sensitivity tests performed on the example activated sludge
plant. In addition, the effect of low dissolved oxygen concentrations and an ammonia
spike in the influent sewage are shown.
3

Benefield L. and Reed R. B. (1985) An activated sludge model which considers toxicant concentration:
simulation and sensitivity analysis Appl. MatG. Modelling 9 pp 454-465

106

G.2 Diurnal load variations


To obtain comparable results from the sensitivity tests on STOAT a consistent influent to the
unit processes was required. Sewage diurnal flow patterns and loadings arriving at a
sewage treatment works are highly complex and infinitely variable. A sinusoidal
mathematical function can be used to simulate an ideal diurnal variation of flowrate and
loading. Such a function was used for the STOAT sensitivity simulations, namely:
C = Co(1 + a sin .t')
where,
C
Co
a

t'

parameter value
mean parameter value
amplitude (taken to be 0.5)
2f, and f (frequency) = 1/24, i.e. one wavelength in 24 hours.
time (t-6) to get correct phase, i.e. minimum at midnight

G.2.1 Influent Sewage To The Primary Tank


The sewage influent values assumed to be entering the primary tank are given in Table
G.2.1.
Table G.2.1 Influent sewage to the test primary tank
parameter

BOD
(mg/l)

BODsoluble
(mg/l)

average value
minimum
value
maximum
value

300
150
450

NH3-N
(mg/l)

flow
(l/s)

150
75

suspended
solids
(mg/l)
350
175

30
15

100
50

225

525

45

150

A flowrate of 100 l/s is equivalent to a population equivalent (PE) of 43200 assuming a


contribution of 200 l/PE.
The diurnal variation of the influent sewage to the primary tank is shown in Figure G.2.1.

107

Figure G.2.1 Diurnal variation of the sewage to the example primary tank
600

160
140

500

100

300

80

Flow (l/s)

Concentration (mg/l)

120
400

60

200

40
100

20

118

114

110

106

98

102

94

90

86

82

78

74

70

66

62

58

54

50

46

42

38

34

30

26

22

18

14

10

0
2

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

G.2.2 Influent Settled Sewage To The Activated Sludge Plant


The parameter sensitivity tests were carried out on the activated sludge tank and associated
secondary settlement tank assuming that the influent was a settled sewage, i.e. no primary
tank was used in the simulations.
The influent settled sewage assumed to be entering the activated sludge vessel is given in
Table G.2.2.
Table G.2.2 Influent sewage to the activated sludge plant
parameter

BOD

BODsolubl
e

(mg/l)
average
minimum
maximum

200
100
300

(mg/l)
125
62.5
187.5

suspended
solids
(mg/l)

NH3-N

flow

(mg/l)

(l/s)

125
62.5
187.5

30
15
45

100
50
150

The diurnal variation of the settled sewage entering the activated sludge plant is shown in
Figure G.2.2.

108

Figure G.2.2 Diurnal variation of the settled sewage to the example activated
sludge plant
160

300

140

250

100
80

150

Flow (l/s)

Concentration (mg/l)

120
200

60

100

40
50

20
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

G.3 Primary settlement tank


This section of the guide is sub-divided as follows:

Section G.3.1 describes the design of the example primary settlement tank.
Section G.3.2 describes the sensitivity tests performed on the primary tank model.
Section G.3.3 describes the effect of a storm event on the primary tank model response.

G.3.1 Design Of The Example Primary Settlement Tank


The influent raw sewage diurnal profile to the example primary tank is given in Section
G.2.1. The example primary settlement tank was designed based on the following criteria:

To provide a 6 hour hydraulic residence time at dry weather flow (DWF). DWF was
assumed to be 100l/s.
To give an upflow velocity of 0.5m/s at DWF.

Using these criteria the dimensions of the example primary tank were:
tank volume = 2160m3
tank surface area = 720m2
The value of the parameters used for the baseline simulation of the example primary tank
are given in Table G.3.1. The values chosen were generally the same as the recommended
default values, or values considered to be "reasonable" on actual plant data.

109

Table G.3.1 Primary tank baseline parameter values


parameter
value
tank mixing characteristics
3
number of CSTRs*
0
scouring parameter
influent sewage characteristics
0.5
proportion of particulate BOD
0.6
settleable fraction of particulate BOD
*
0.7
settleable fraction of suspended solids
settling velocity parameters
14.4
value of K*
1.3
value of h*
sludge composition
0.958
sludge moisture fraction
1.012
sludge specific gravity
Parameters marked with * were analysed as part of the sensitivity tests on the
primary tank model.

A 5 day simulation was run using the data in Table G.3.1 for the example primary tank,
assuming that the primary tank was initially full of clean water. The results of this simulation
are shown in Figure G.3.1. As shown in Figure G.3.1, the effluent from the primary tank
rapidly reached a dynamic steady value (diurnal equilibrium). Pollutant concentrations in the
effluent were at greater than 95% of their diurnal equilibrium values within 14 hours of the
start of the simulation.
Figure G.3.1 Baseline case primary tank effluent
160.0

600

140.0
120.0

400

100.0
80.0

300

60.0

200

Flow (l/s)

Concentration (mg/l)

500

40.0
100

20.0

118

114

110

106

98

102

94

90

86

82

78

74

70

66

62

58

54

50

46

42

38

34

30

26

22

18

14

10

0.0
2

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

SS influent (mg/l)

Flow
(l/s)

The baseline primary tank effluent results following the attainment of diurnal equilibrium are
given in Table G.3.2.

110

Table G.3.2 Summary of the primary tank baseline effluent results at diurnal
equilibrium
parameter

BOD
(mg/l)

average
maximum
minimum

245
309
176

BODsolubl
e
(mg/l)
167
210
119

suspended
solids
(mg/l)
147
187
108

NH3-N
(mg/l)

flow
(l/s)

33
42
24

100
150
50

G.3.2 Sensitivity Tests


Sensitivity tests were carried out on the parameters marked in Table G.3.1 and are
described in Sections G.3.2.1 to G.3.2.3. Simulations were run for a 5 day period to obtain a
diurnal equilibrium response. Diurnal equilibrium was confirmed by checking that the
magnitude of the various effluent components was identical at the same time on consecutive
days.
G.3.2.1 Tank mixing characteristics
The number of CSTRs
The primary tank model allows the number of CSTRs chosen to simulate the mixing within
the vessel to vary from 1 to 5 inclusively. Model simulations using values for the number of
CSTRs of 1 and 5 were performed. Ammoniacal nitrogen (NH3-N) passes through the
primary tank unchanged and therefore acts as a tracer material. The effluent NH3-N
concentration for each of the simulated number of CSTR runs are compared with the
baseline case and the influent NH3-N concentration in Figure G.3.2 and Table G.3.3.
Figure G.3.2 The effect of varying the number of CSTRs on the effluent NH3-N
concentration from the primary settlement tank
45.00

35.00
30.00
25.00
20.00
15.00
10.00
5.00

CSTR = 3

CSTR = 1

CSTR = 5

111

influent

118

114

110

106

98

time (h)

102

94

90

86

82

78

74

70

66

62

58

54

50

46

42

38

34

30

26

22

18

14

10

0.00
2

ammonia concentration (mg/l)

40.00

Table G.3.3 Effluent NH3-N concentration dependency on the number of CSTRs in the
primary tank model
number of CSTRs
1
maximum
minimum
3 (baseline)
maximum
minimum
5
maximum
minimum

NH3-N concentration
(mg/l)

percentage deviation
from baseline case

40
26

-4.8
8.3

42
24

43
22

2.4
-8.3

As shown in Figure G.3.2, as the number of CSTRs increased the primary tank showed an
increasing degree of plug flow behaviour. This behaviour was characterised as an
increasing tendency for the effluent from the primary tank to be directly linked (but lagging in
time) the influent NH3-N concentration, i.e. less deviation from average values.
Figure G.3.3 and Table G.3.4 show the effect of varying the number of CSTRs on the
primary tank effluent suspended solids concentration after diurnal equilibrium had been
reached.
Figure G.3.3 The effect of varying the number of CSTRs on the effluent suspended
solids concentration from the primary settlement tank
600.0

500.0

300.0

200.0

100.0

time (h)
CSTR = 3

CSTR = 1

CSTR = 5

112

influent

120

118

116

114

112

110

108

106

104

102

98

100

96

94

92

90

88

86

84

82

80

78

76

74

0.0
72

SS (mg/l)

400.0

Table G.3.4 Effluent suspended solids concentration dependency on the number of


CSTRs
number of
CSTRs

1
average
maximum
minimum
3
average
maximum
minimum
5
average
maximum
minimum

effluent
suspended
solids
concentration
(mg/l)

percentage
deviation
from
baseline
case

percentage
reduction in the
influent suspended
solids
concentration

176
231
124

20
24
15

50
56
38

147
187
108

58
64
46

141
180
99

-4
-4
-9

60
66
51

From Figure G.3.3 it can be seen that increasing the number of CSTRs used to simulate the
primary tank reduced the suspended solids concentration in the effluent stream. This effect
became less noticeable as the number of CSTRs was increased.
Scouring parameter
The scouring parameter is generally assigned a value of zero and its effect on the
performance of the primary tank was therefore not investigated
G.3.2.2 Influent sewage characteristics
Settleable fraction of suspended solids
The effect of varying the settleable fraction of suspended solids in the influent to the primary
tank on the effluent suspended solids concentration is shown in Figure G.3.4 and Table
G.3.5.

113

Figure G.3.4 The effect of the fraction of settleable suspended solids concentration in
the influent to the primary tank on the effluent suspended solids concentration
600.0

500.0

SS (mg/l)

400.0

300.0

200.0

100.0

96

94

92

90

88

86

84

82

80

78

76

74

72

70

68

66

64

62

60

58

56

54

52

50

48

0.0
time (h)
settleable fraction 70%
(base)

settleable fraction 95%

settleable fraction 45%

influent SS

Table G.3.5 Effluent suspended solids concentration dependency upon the fraction of
settleable suspended solids in the influent
fraction of
effluent
percentage
percentage
settleable
suspended
deviation
reduction of
suspended
solids
from
influent
solids in
concentration
baseline
suspended
influent
(mg/l)
case
solids
concentration
0.45
36
53
225
average
46
51
283
maximum
18
52
164
minimum
0.7
58
147
average
64
187
maximum
46
108
minimum
0.95
74
-38
91
average
76
-33
125
maximum
69
-42
63
minimum
Figure G.3.4 illustrates the reduction in the effluent suspended solids concentration from the
primary tank as the percentage of settleable fraction of suspended solids in the influent
increased.
Proportion of particulate BOD and settleable fraction of BOD
Variations in the magnitude of these parameters would have a similar effect on the effluent
BOD as variations in the settleable fraction of suspended solids had upon the effluent
suspended solids.
G.3.2.3 Settling velocity parameters
Parameter h

114

The effect of varying the baseline value of h (h = 1.3) by 50% is shown in Figure G.3.5 and
Table G.3.6.
Figure G.3.5 The effect of varying h on the effluent suspended solids concentration

suspended solids concentration (mg/l)

600.0

500.0

400.0

300.0

200.0

100.0

120

118

116

114

112

110

108

106

104

102

98

100

96

94

92

90

88

86

84

82

80

78

76

74

72

0.0
time (h)
h=0.65

h=1.3 (base)

h=1.95

influent SS

Table G.3.6 Average effluent suspended solids concentration dependency upon the
value of h
value of h

0.65
average
maximum
minimum
1.3
(baseline)
average
maximum
minimum
1.95
average
maximum
minimum

effluent
suspended
solids
concentration
(mg/l)

percentage
deviation from
baseline case

percentage
reduction in
influent
suspended
solids

123
155
88

-16
-17
-19

65
70
56

147
187
108

58
64
46

188
256
141

28
37
31

46
51
30

As shown in FigureG.3.5, a reduction in the value of h resulted in a decrease in the


concentration of suspended solids in the effluent.

115

Parameter K
The effect of varying the baseline value of K (K = 14.4) by 50% is shown in Figure G.3.6
and Table G.3.7.
Figure G.3.6 The effect of K4 on the effluent suspended solids concentration from the
primary tank

suspended solids concentration (mg/l)

600

500

400

300

200

100

120

116

112

108

104

100

96

92

88

84

80

76

72

tim e (h)
K=2

K=4.0

K=6

influent SS

Table G.3.7 Effluent suspended solids concentration dependency upon the value of K
value of K

7.2
average
maximum
minimum
14.4
(baseline)
average
maximum
minimum
21.6
average
maximum
minimum

average effluent
suspended
solids
concentration
(mg/l)

percentage
deviation
from
baseline
case

percentage
reduction in the
influent
suspended solids
concentration

175
226
126

19
21
17

61
57
37

147
187
108

58
64
46

136
171
100

-7
-9
-7

50
67
50

In this figure K has the units cm/s; multiply by 3.6 to convert to the units of m/h used in the body of the text.

116

As shown in Figure G.3.6, as the value of K increased the suspended solids concentration in
the effluent decreased.
G.3.3 Storm Event
G.3.3.1 Model set-up
In order to determine a typical response of the primary tank and storm tank models to a
storm event a simulation of such an event was carried out. The sinusoidal diurnal influent
variation used for the primary tank parameter sensitivity tests was used for the storm event
simulation. The storm event was obtained from a real 1 in 9 month storm which occurred at
a sewage treatment works in the UK. The influent load characteristics from the real storm
were measured as a direct proportion of the dry weather flow at the receiving sewage
treatment works and these proportions were used to size the loadings at the example
primary tank and storm tank. The influent to the theoretical works calculated on this basis is
given in Figure G.3.7.
Figure G.3.7 Influent sewage for storm event
4000

600

3500

500

400

2500
2000

300

1500

Flow (l/s)

Concentration (mg/l)

3000

200

1000
100

500

0
1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
101
105
109
113
117
121
125
129
133
137
141
145
149
153
157
161
165

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

Figure G.3.7 shows that the influent flow is truncated at 600l/s (equivalent to 6 DWF). The
flowrate was truncated at this level as it was assumed that flows above 6 DWF were diverted
directly to the receiving water. Detailed profiles of the influent sewage during the 24 hour
period of the storm are shown in Figure G.3.8.

117

Figure G.3.8 Detailed influent profile for the storm event

Figure 3.8A Effect of storm on flow sinusoidal diurnal variation


800.00
700.00
600.00

flow (l/s)

500.00
400.00
300.00
200.00
100.00

22

23

24

22

23

24

21

20

19

18

17

16

15

14

13

12

11

10

0.00
time (h)
DWF

storm flow

Figure 3.8B Effect of storm on BODtot and BODsol sinusoidal diurnal variation
4000.00
3500.00

2500.00
2000.00
1500.00
1000.00
500.00

21

20

19

18

17

16

15

14

13

12

11

10

0.00
0

BOD (mg/l)

3000.00

time (h)
DWF BODtot

storm flow BODtot

DWF BODsol

118

storm BODsol

Figure 3.8C Effect of storm on suspended solids sinusoidal diurnal variation


1000.00
900.00
800.00

SS (mg/l)

700.00
600.00
500.00
400.00
300.00
200.00
100.00
20

21

22

23

24

20

21

22

23

24

19

18

17

16

15

14

13

12

11

10

0.00
time (h)
DWF SS

storm SS

Figure 3.8D Effect of storm on ammonia sinusoidal diurnal variation


45.00
40.00

NH3-N (mg/l)

35.00
30.00
25.00
20.00
15.00
10.00
5.00

19

18

17

16

15

14

13

12

11

10

0.00
time (h)
DWF NH3-N

storm NH3-N

The suspended solids concentration during the storm event showed a distinctive early peak.
This peak is known as the "dirty flush" and was the result of accumulated solids in the sewer
and catchment area being washed through to the sewage treatment works at the beginning
of a storm. The peak in the suspended solids concentration was accompanied by a peak in
the BOD concentration profile. This peak also occurred due to washing through of
accumulated solids. Following the initial peaks in the suspended solids and BOD
concentration profiles there was a drop in their values below that of the normal DWF pattern.
This effect was a result of the dilution effect of the rainwater following the initial dirty flush.
Ammonia and its compounds are not accumulated to any great extent in catchment areas
and the dilution effect of the rain water was therefore seen at the outset of the storm event.
The primary tank was designed on the same basis as that used in the sensitivity tests
(Section G.3.1). The storm tank was designed based on a capacity of 68 l/PE with a surface
area which would give an upflow velocity of 0.5 m/h at 1 DWF (i.e. 100 l/s).5 . The parameter
values used in the storm tank model are given in Table 0.3.8.

Nicoll E. G. (1988) Small Water Pollution Control Works Design and Practice Published by Ellis Horwood
Limited

119

Table G.3.8 Parameter values used in storm tank model


Parameter
tank volume
tank surface area
proportion of tank influenced by mixing
during fill
during draw
scouring parameter
proportion of BOD which is particulate
settleable fraction of particulate BOD
settleable fraction of suspended solids
settling velocity of suspended solids
settling velocity of BOD
rate of removal during filling for solids
rate of removal during filling for BOD
flowrate below which contents are
returned
pumping rate at which contents are
returned

Value
2938 m3
720 m2
0.8
0.0
0
0.5
0.6
0.7
2
2
0.2
0.2
250 l/s
50 l/s

The parameters in Table G.3.8 are default values (Appendix B) or values considered to be
"reasonable" based on analysis of actual plant data.
G.3.3.2 Model response
At each stage of the STOAT model a profile of the partially treated sewage can be viewed.
The position of each of these stages is shown in Figure G.3.9.
Figure G.3.9 STOAT model representation of the primary tank/storm tank simulation
3.10C
3.10A

3.10D

3.7
3.10E

3.10F

3.10B
3.10G

The code numbers on Figure G.3.9 refer to accompanying figures. The profile of the partially
treated sewage at each of the stages shown on Figure G.3.9 are given in Figures G.3.7 and
G.3.10.

120

Figure G.3.10 Flow and concentration profiles for the simulation of the storm event

600

300

500

250

400

200

300

150

200

100

100

50
0
1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
101
105
109
113
117
121
125
129
133
137
141
145
149
153
157
161
165

Flow (l/s)

Concentration (mg/l)

Figure 3.10A Influent sewage overflowing to storm tanks

Elapsed time (hours)


SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

Figure 3.10B Influent sewage to primary tank mixer


300

4000

250

3000

150

2000
1500

100

1000
50

500
0

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

121

NO3
(mg/l)

Flow
(l/s)

Flow (l/s)

200

2500

1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
101
105
109
113
117
121
125
129
133
137
141
145
149
153
157
161
165

Concentration (mg/l)

3500

300

250

250

200

200

150

150

100

100

50

50

Flow (l/s)

300

1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
101
105
109
113
117
121
125
129
133
137
141
145
149
153
157
161
165

Concentration (mg/l)

Figure 3.10C Effluent from storm tank overflow

Elapsed time (hours)


SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

Figure 3.10D Storm tank settled sewage to primary tank


50

120

45
40
35

80

30
25

60

20
40

Flow (l/s)

Concentration (mg/l)

100

15
10

20

5
0
1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
101
105
109
113
117
121
125
129
133
137
141
145
149
153
157
161
165

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

Figure 3.10E Mixed influent and storm tank sewage


4000

300
250

3000

2000

150

1500

100

1000
50

500
0

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

122

NO3
(mg/l)

Flow
(l/s)

Flow (l/s)

200

2500

1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
101
105
109
113
117
121
125
129
133
137
141
145
149
153
157
161
165

Concentration (mg/l)

3500

Figure 3.10F Primary tank (final) effluent


800

300
250

600
200

500
400

150

300

Flow (l/s)

Concentration (mg/l)

700

100

200
50

100

0
1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
101
105
109
113
117
121
125
129
133
137
141
145
149
153
157
161
165

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

Figure 3.10G Primary tank sludge


2

120000

1.8
1.6
1.4

80000

1.2
1

60000

0.8
40000

Flow (l/s)

Concentration (mg/l)

100000

0.6
0.4

20000

0.2
0
1
5
9
13
17
21
25
29
33
37
41
45
49
53
57
61
65
69
73
77
81
85
89
93
97
101
105
109
113
117
121
125
129
133
137
141
145
149
153
157
161
165

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

G.4 Activated sludge plant


This section of the guide is sub-divided as follows:
Section G.4.1 gives details of the design of the example activated sludge plant.
Section G.4.2 describes the sensitivity tests performed on the activated sludge model.
Section G.4.3 describes the activated sludge model simulation of low dissolved oxygen
concentration conditions.
Section G.4.4 describes the effect of an ammonia spike in the influent sewage on the
activated sludge model response.
G.4.1 Design Of The Example Activated Sludge Plant
The influent sewage profile to the example activated sludge plant is given in Section G.2.2.
The basis for the design of the activated sludge plant was as follows:

Nitrifying activated sludge plant with a first stage anoxic zone.


A 12 hour hydraulic retention time in the activated sludge tank based on DWF (DWF =
100 l/s) with the tank divided into an anoxic zone plus 5 equally sized aerated zones.
A 0.75 hour hydraulic retention time in the anoxic zone based on DWF.
Final settlement tank with an upflow velocity of 1.0 m/h at 3 DWF.
Hydraulic residence time in the final settlement tank of 9 hour at DWF.

123

Based on these criteria the dimensions of the activated sludge plant were:
total activated sludge volume =
4320 m3
anoxic zone volume =
270 m3
volume of aeration tank stages =
810 m3
surface area of settlement tank =
1080 m3
volume of settlement tank = 3240 m3
An activated sludge tank baseline case was simulated against which other simulations could
be compared. The parameters used for the baseline simulation are given in Table G.4.1.
Table G.4.1 Baseline parameter values for the activated sludge model
parameter
anoxic zone volume
number of aeration stages (excluding
anoxic zone)
volume of each aeration stage
area of sedimentation tank
depth of sedimentation tank
nitrification rate*
SSVI*
maximum possible settling velocity (Vo)*
settling parameter characteristics of the
hindered settling zone (b1)*
settling parameter characteristics of low
solids concentration (b2)*
non-settleable fraction of mixed liquor
suspended solids
threshold suspended solids
concentration for settlement *
mixed liquor suspended solids set-point
stage where MLSS are measured
time interval between wastage events
method of wastage
proportion of sewage entering stage 1
aeration stage receiving recycle
recycle ratio
DO set-point stage 1
maximum KLa stage 1
DO set-point stages 2-6
maximum KLa stages 2-6
temperature*

value
270 m3
5
810 m3
1080 m2
3m
normal
100 ml/g
9.15 m/h
0.00058
0.029
0.001
375 mg/l
4000 mg/l
6
8 hours
constant rate 10 l/s
1 (anoxic zone)
1 (anoxic zone)
1
0.0 mg/l
0.0 h-1
2.5 mg/l
15 h-1
15C

The values marked * in Table G.4.1 were used in the sensitivity studies. The values of V0
and b1were calculated from equations given in the Process Model Descriptions guide. The
value of b2 was set at 50 times the value of b1.
A 40 day simulation was run using the baseline data given in Table G.4.1 for the example
activated sludge plant. The results of the last two days of this simulation are shown in
Figure G.4.1.

124

Figure G.4.1 Baseline case activated sludge plant final effluent


160

30

140

25

100

15

80

Flow (l/s)

Concentration (mg/l)

120
20

60

10

40
5

20
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0
Elapsed time (hours)
SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

Figure G.4.1 shows that there was a non-smooth sinusoidal flow variation compared with
that of the influent flow (Figure G.2.2). This effect was caused by the sludge wastage
procedure during which sludge was diverted from the recycle sludge stream, as shown in
Figure G.4.2.

10

9000

8000

7000

6000

5000

4000

3000

2000

1000

Flow (l/s)

10000

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

Concentration (mg/l)

Figure G.4.2 Sludge wastage from the activated sludge plant

Elapsed time (hours)


SS
(mg/l)

BOD
(mg/l)

NH3
(mg/l)

NO3
(mg/l)

Flow
(l/s)

G.4.2 Sensitivity Tests


Sensitivity tests were carried out on the parameters marked in Table 0.4.1 and are
described in Sections 0.4.2.1 to 0.4.2.5. Simulations were run for a 40 day period in order to
attain a dynamic steady state effluent profile (diurnal equilibrium). Diurnal equilibrium was
confirmed by checking that the magnitude of the various effluent components was identical
at the same time on consecutive days.
G.4.2.1 Nitrification rate
The nitrification rate was varied between high, normal and low rates. Changing these rates
varied the maximum specific growth rate of the nitrifying bacteria used in the model

125

algorithm. The effect of changing the nitrification rate on the final effluent NH3-N and nitrate
concentrations is shown in Figure 0.4.3 and Table G.4.2.
Figure G.4.3 The effect of varying the nitrification rate on the final effluent ammonia
and nitrate concentrations
30.00

conconcentration (mg/l)

25.00

20.00

15.00

10.00

5.00

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0.00
time (hours)
NH3-N low rate

NO3-N low rate

NH3-N normal rate

NO3-N normal

NH3-N high rate

NO3-N high rate

Table G.4.2 Summary of the final effluent ammonia and nitrate concentrations for the nitrification rate
simulations
parameter (mg/l)
NH3-N
average
maximum
minimum
NO3-N
average
maximum
minimum

nitrification rate
low

normal

high

4.0
7.9
0.1

3.9
7.8
0.1

3.7
7.7
0.1

22.1
25.0
19.9

22.1
25.1
19.9

22.2
25.2
19.8

As shown in Table G.4.2 and Figure G.4.3, varying the nitrification rate had virtually no effect
upon the final effluent ammonia and nitrate concentrations under the conditions studied.
This was probably due to the high sludge age in the example activated sludge plant which
meant that a relatively large population of nitrifying bacteria were present in the aeration
basin for the range of growth rates stipulated (low to high nitrification rates). A greater effect
might have been observed if the sludge age was lower (nearer to the washout value for
nitrifying bacteria), or if there was a higher ammonia concentration in the influent.
G.4.2.2 SSVI3.5
The SSVI3.5 was used to calculate the value of the maximum possible settling velocity (Vo)
and the settling parameter characteristic of the hindered settling zone (b1) from equations
given in the Process Model Descriptions guide. The settling velocity characteristic of low
solids concentration (b2) was then calculated as:
b2 = 50 x b1

126

Sensitivity tests based on independent variations of b2 are described in Section G.4.2.2.


Sensitivity tests were performed at SSVI3.5 values of 80 and 150 ml/g. An SSVI3.5 of 80
ml/g is characteristic of a good settling activated sludge, whereas an SSVI3.5 of 150 ml/g is
characteristic of a bulking activated sludge. A summary of the parameter values used in the
simulations carried out at different SSVI3.5 values is given in Table G.4.3.
Table G.4.3 Parameter values used for the sensitivity tests at different SSVI3.5 values
parameter
Vo (m/h)
b1
b2

SSVI3.5 (ml/g)
80
10.38
0.00047
0.023

100 (baseline)
9.15
0.00058
0.029

150
6.08
0.00102
0.054

The effect of varying the SSVI3.5 value on the final effluent pollutant concentrations is
shown in Figure G.4.4 and Table G.4.4.

127

Figure G.4.4 The effect of varying SSVI3.5 on the final effluent from the activated
sludge plant
Figure 4.4A Effluent suspended solids concentration

suspended solids concentration (mg/l)

600
500
400
300
200
100

48

45

42

39

36

33

30

27

24

21

18

15

12

0
tim e (hours)
SSVI3.5 = 80

SSVI3.5 = 100

SSVI3.5 = 150

Figure 4.4B Effluent BOD concentration


300

200
150
100
50
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

BOD concentration (mg/l)

250

time (hours)
SSVI3.5 = 80

SSVI3.5 = 100

128

SSVI3.5 = 150

Figure 4.4C Effluent NH3-N concentration


14.00

NH3-N concentration (mg/l)

12.00
10.00
8.00
6.00
4.00
2.00

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0.00
time (hours)
SSVI3.5 = 80

SSVI3.5 = 100

SSVI3.5 = 150

Table G.4.4 Summary of the final effluent results from the SSVI3.5 simulations
parameter
SS (mg/l)
average
maximum
minimum
BOD (mg/l)
average
maximum
minimum
NH3-N (mg/l)
average
maximum
minimum

SSVI3.5
80

100 (baseline)

150

5.0
5.8
4.2

5.0
5.9
4.2

115.0
557.4
3.6

2.8
3.7
2.3

3.6
5.8
2.5

62.3
284.3
3.1

29
6.4
0.1

3.9
7.8
0.1

7.6
12.4
0.6

As shown in Figure G.4.4 and Table G.4.4, increasing the SSVI3.5 from 80 to 100 ml/g had
only a marginal effect upon the final effluent quality. However, the simulation run at an
SSVI3.5 of 150 ml/g produced high solids carry over from the final settlement tank at high
diurnal flowrates, a consequence of the poor settling characteristics of the activated sludge
flocs. Although the final effluent ammonia concentration increased as the SSVI3.5
increased, there was no dramatic peak as observed for suspended solids and BOD at an
SSVI3.5 of 150 ml/g. This observation is due to ammonia being soluble, and therefore not
directly dependent on solids carry over from the final settlement tank, and implied that
despite the high peak of solids the sludge age remained high enough to maintain a
significant nitrifying bacterial population.

129

G.4.2.3 The settling velocity characteristic of low solids concentration


The settling velocity characteristic of low solids concentration (b2) can be used to calibrate
the activated sludge model and was therefore varied independently of the parameters Vo
and b1 tested in Section G.4.2.2. The values of b2 used in the sensitivity tests were:
b2 = 10 x b1 = 0.0058
and
b2 = 100 x b1 = 0.058
where b1 is the baseline value of b1 = 0.00058. The results of the sensitivity tests on b2 are
given in Figure G.4.5 and Table G.4.5.

130

Figure G.4.5 The effect of varying the value of b2 on the final effluent from the
activated sludge plant

Figure 4.5A The effect of b2 on the final effluent suspended solids concentration

suspended solids concentration (mg/l)

16
14
12
10
8
6
4
2

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0
time (hours)
b2 = 50x b1

b2 = 10xb1

b2 = 100xb1

Figure 4.5B The effect of b2 on the final effluent BOD concentration


10

BOD concentration (mg/l)

9
8
7
6
5
4
3
2
1
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0
time (hours)
b2 = 50x b1

b2 = 10xb1

b2 = 100xb1

Figure 4.5C The effect of b2 on the final effluent NH3-N concentration


8

6
5
4
3
2
1
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

NH3-N concentration (mg/l)

time (hours)
b2 = 50x b1

b2 = 10xb1

131

b2 = 100xb1

Table G.4.5 Summary of the final effluent results from the b2 simulations
parameter
(mg/l)
suspended
solids
average
maximum
minimum
BOD
average
maximum
minimum
NH3-N
average
maximum
minimum

b2 = 0.0058

b2 = 0.029
(baseline)

b2 = 0.058

10.8
15.3
6.4

5.0
5.9
4.2

4.4
4.8
4.1

6.6
9.8
3.9

3.6
5.8
2.5

3.3
5.4
2.4

3.9
7.8
0.1

3.9
7.8
0.1

3.9
7.8
0.1

Figure G.4.5 and Table G. 4.5 show that increasing the value of b2 reduced the final effluent
concentration of suspended solids and BOD. However, this increase was relatively small,
increasing from an average of 4.4 mg/l at the low value of b2 tested (b2 = 10 x b1 = 0.0058)
in comparison with 10.8 mg/l at the high value of b2 tested (b2 =100 x b1 = 0.058). In
addition the peak suspended solids concentration was 15.3 mg/l at b2 = 0.0058 in
comparison with 4.8 mg/l at b2 = 0.058. The final effluent ammonia concentrations were
identical for all values of b2. This result is expected as the sludge age for all values of b2
would be virtually the same due to the low solids loss in the final effluent.
G.4.2.4 Threshold suspended solids concentration for settlement
Test simulations were carried out on the threshold suspended solids concentration for
settlement (XT), at 250 and 500 mg/l (33% of baseline value = 375 mg/l). The results of
these simulations are shown in Figure G.4.6.
Figure G.4.6 The effect of varying XT on the final effluent from the activated sludge
plant
8
7

5
4
3
2
1
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

concentration (mg/l)

time (hours)
suspended solids b2 all values

BOD b2 all values

132

NH3-N b2 all values

Figure G.4.6 shows that the value of XT had no effect on the final effluent profile under the
conditions of these simulations.
G.4.2.5 Temperature
Simulations were performed at 5C and 25C and these runs are compared with the
baseline simulation in Figure G.4.7 and Table G. 4.6.

133

Figure G.4.7 The effect of varying the temperature on the final effluent from the
activated sludge plant

Figure 4.7A Effluent ammonia and nitrate concentrations


30

concentraion (mg/l)

25
20
15
10
5

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0
time (hours)
NH3-N at 15C

NO3-N at 15C

NH3-N at 5C

NO3-N at 5C

NH3-N at 25C

NO3-N at 25C

Figure 4.7B Effluent suspended solids concentration


6

concentraion (mg/l)

5
4
3
2
1

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0
time (hours)
SS at 15C

SS at 25C

SS at 5C

Figure 4.7C Effluent BOD concentration


16

12
10
8
6
4
2
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

concentraion (mg/l)

14

time (hours)
BODtot at 15C

BODsol at 15C

BODtot at 5C

BODsol at 5C

BODtot at 25C

134

BODsol at 25C

Table G.4.6 Summary of the final effluent results from the temperature simulations
parameter (mg/l)
suspended solids
average
maximum
minimum
BODtotal
average
maximum
minimum
BODsol
average
maximum
minimum
NH3-N
average
maximum
minimum
NO3-N
average
maximum
minimum

temperature (C)
5

15

25

5.0
5.9
4.2

5.0
5.9
4.2

5.0
5.9
4.2

7.1
15.0
2.9

3.6
5.8
2.5

2.6
3.1
2.1

4.6
12.5
0.1

1.1
3.2
0.0

0.1
0.3
0.0

6.7
11.4
0.4

3.9
7.8
0.1

3.3
7.2
0.1

20.6
24.2
18.6

22.1
25.1
19.9

20.9
24.4
18.2

Figure G.4.7A shows that the concentration of ammoniacal nitrogen in the final effluent
decreased as the temperature increased. This effect was expected as increasing the
temperature increases the growth rate of the nitrifying bacteria. The relatively small increase
in the effluent ammoniacal nitrogen concentration as the temperature was decreased
implied that the sludge age in the simulated activated sludge plant was sufficiently high as to
maintain a significant population of nitrifying bacteria, even at temperatures as low as 5C.
Figure 0.4.7B shows that temperature did not affect the effluent suspended solids
concentration and hence the predicted settling characteristics of the activated sludge flocs.
Figure G.4.7C shows that as the temperature decreased, the BOD in the final effluent
increased. This observation was due to a predicted increase in the BODsol concentration in
the final effluent at lower temperatures. As with nitrifying bacteria, the growth rate of
heterotrophic bacteria decreases with decreasing temperature leading to a reduction in the
uptake rate of BODsol, and hence an increase in BODsol in the final effluent.
G.4.3 The Effect Of Low Dissolved Oxygen Concentrations
The dissolved oxygen (DO) concentration set-point for the sensitivity tests described in
Section G.4.2 was fixed at 2.5 mg/l. In all simulations run the DO concentration remained
greater than 1.8 mg/l in aeration stage 2 (the aeration stage following the anoxic zone). At
these levels of DO there would be no oxygen limitation. In order to simulate circumstances
in which oxygen might be limiting, the DO set-point in each of the 5 aeration stages of the
activated sludge vessel was reduced to 0.5 mg/l. In addition the KLa was reduced from the
set-point value of 15 h-1. It was necessary to decrease the value of KLa as the STOAT
activated sludge model incorporates a minimum mixing energy requirement to maintain the
activated sludge flocs in suspension. This value is calculated from the KLa, and by virtue of
the energy input required to maintain the solids in suspension oxygen is simultaneously
transferred. The DO concentration in aeration stage 2 is shown in Figure G.4.8 for DO setpoint values of 2.5 and 0.5 mg/l.
135

Figure G.4.8 DO concentration in the second aeration stage


3.5

concentration (mg/l)

3
2.5
2
1.5
1
0.5

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0
time (hours)
DO at DO set-point = 2.5mg/l

DO at DO set-point=0.5mg/l

The average DO concentration in the first aeration stage of the activated sludge vessel was
close to the set-point value for both simulations.
The results of the low DO concentration set-point simulation are compared with the baseline
simulation in Figure G.4.9 and Table G.4.7.

136

Figure G.4.9 The effect of DO concentration on the final effluent from the activated
sludge plant

Figure 4.9A Final effluent ammonia and nitrate concentrations


30

concentration (mg/l)

25
20
15
10
5

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0
time (hours)
NH3-N at DO = 2.5mg/l

NO3-N at DO = 2.5mg/l

NH3-N at DO=0.5mg/l

NO3-N at DO=0.5mg/l

Figure 4.9B Final effluent BOD concentrations


25

concentration (mg/l)

20

15

10

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

0
time (hours)
BODsol at DO = 2.5mg/l

BOD at DO = 2.5mg/l

BODsol at DO=0.5mg/l

BODat DO=0.5mg/l

Figure 4.9C Final effluent suspended solids concentration


6

4
3
2
1
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

concentration (mg/l)

time (hours)
SS at DO = 2.5mg/l

SS at DO=0.5mg/l

137

Table G.4.7 Summary of the final effluent results for the DO simulations
parameter
DO (mg/l)
average
maximum
minimum
NH3-N (mg/l)
average
maximum
minimum
NO3-N (mg/l)
average
maximum
minimum
BODtot (mg/l)
average
maximum
minimum
BODsol (mg/l)
average
maximum
minimum
suspended solids (mg/l)
average
maximum
minimum

dissolved oxygen set-point (mg/l)

2.5
3.5
1.9

0.3
0.9
0.1

3.9
7.8
0.1

14.2
22.1
1.4

22.1
25.1
19.9

12.9
22.1
7.3

3.6
5.8
2.5

9.9
21.7
2.9

1.1
3.2
0.0

7.4
19.3
0.1

5.0
5.9
4.2

5.0
5.9
4.2

As shown in Figure G.4.9A, final effluent ammonia concentrations peaked at 22.1 mg/l in the
low DO simulation (DO = 0.5 mg/l) in comparison with a peak of 7.8 mg/l for the baseline
simulation (DO = 2.5 mg/l). This result shows that nitrification ceased at low DO levels
during periods of high loading due to oxygen limitation.
Figure G.4.9B shows that the total BOD (BODtot) in the final effluent from the low DO
simulation was considerably greater than that for the baseline simulation (BODtot maximum
21.7 mg/l and 5.8 mg/l respectively). The final effluent suspended solids concentrations for
both simulations were indistinguishable (Figure G.4.9C). Consequently, the difference in
BODtot between the two simulations was a result of the relatively high soluble (BODsol) in
the final effluent from the low DO simulation. The STOAT model assumes that all BOD is
solubilised on entering the activated sludge vessel. The non-soluble BOD is then calculated
as a fixed proportion (50%) of the suspended solids leaving in the final effluent. The
relatively high effluent BODsol concentration for the low DO simulation implied that there was
a period of DO limitation under high loading conditions. The DO set-point had no effect on
the effluent suspended solids concentration, i.e. the settling characteristics of the activated
sludge flocs.

138

G.4.4 Ammonia Spike


The STOAT activated sludge model was run with an ammonia spike in the influent in order
to investigate the model response and final effluent ammonia concentration attenuation
under such circumstances. The model was run under baseline conditions with sinusoidal
diurnal feed variation for the first 35 days of the simulation in order to achieve a diurnal
equilibrium. On day 36 the influent ammonia concentration was increased to 90 mg/l (2
times usual peak ammonia concentration) for a period of two hours during the peak diurnal
loading. The influent profile during this period is shown in Figure G.4.10.
Figure G.4.10 Influent profile during period of the ammonia spike
160.0

90.00

140.0

80.00

60.00

flow (l/s)

100.0

50.00
80.0
40.00
60.0

30.00

40.0

concentration (mg/l)

70.00

120.0

20.00

24

23

22

21

20

19

18

17

16

15

14

13

12

11

10

0.00
2

0.0
1

10.00

20.0

time (hours)
flow

NH3-N

The results from the ammonia spike simulation are shown in Figure G.4.11 and Table G.4.8.

139

Figure G.4.11 The effect of an ammonia spike in the influent settled sewage on the
final effluent ammonia and nitrate profile

30

concentration (mg/l)

25

20

15

10

0
2
4
6
8
10
12
14
16
18
20
22
24
26
28
30
32
34
36
38
40
42
44
46
48
50
52
54
56
58
60
62
64
66
68
70
72
74
76
78
80
82
84
86
88
90
92
94
96

0
time (hours)
NH3-N baseline

NO3-N baseline

NH3-N spike

NO3-N spike

Table G.4.8 Summary of the final effluent results from the ammonia spike simulation

parameter

baseline case
maximum
(mg/l)
7.8
25.1
5.9

ammonia spike
maximum
(mg/l)
19.1
27.8
5.9

minimum
(mg/l)
0.1
19.9
4.2

minimum
(mg/l)
0.1
19.9
4.2

NH3-N
NO3-N
suspended
solids
BOD
5.8
2.5
5.8
2.5
Note: Maximum and minimum values refer to the 72 hour period immediately
following the ammonia spike.

The 90 mg/l ammonia spike in the influent occurred from time 11 to 13 hours in Figure
G.4.11. The ammonia peak in the effluent occurred at 20 hours, 9 hours after the initial high
ammonia influent spike. The high ammonia concentration in the final effluent after 20 hours
rapidly attenuated such that by 34 hours the ammonia concentration was indistinguishable
from that of the baseline concentration. The maximum ammonia concentration following the
influent ammonia spike was 19.1 mg/l, i.e. 2.5 times the maximum baseline final effluent
concentration of 7.1 mg/l.

140