wrc stoat: tutorials guide

80

Upload: aoife-fitzgerald

Post on 08-Nov-2014

1.170 views

Category:

Documents


146 download

DESCRIPTION

A useful tutorials guide for the WRc STOAT wastewater modelling software. This contains several tutorials to help new users get accustomed to creating and running models of wastewater treatment plants. It is suitable for use with beginners and intermediate users of STOAT versions 4 and 5.

TRANSCRIPT

Page 1: WRc STOAT: Tutorials Guide
Page 2: WRc STOAT: Tutorials Guide
Page 3: WRc STOAT: Tutorials Guide

Copyright WRc plc

The contents of this manual and the accompanying software are the copyright of WRc plc and all rightsare 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 andrestricted to authorised users only.

This manual and the accompanying software are supplied in good faith. While WRc plc have taken allreasonable 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.

Page 4: WRc STOAT: Tutorials Guide
Page 5: WRc STOAT: Tutorials Guide

TABLE OF CONTENTS

1 INTRODUCTION 1

2. GETTING STARTED 22.1 CREATING A NEW SEWAGE WORKS 22.2 RE-USING AN EXISTING SEWAGE WORKS 42.3 CREATING A NEW RUN 42.4 SELECTING REPORTING OPTIONS 62.5 COMPLETING A RUN 7

3. TUTORIAL 1: A SIMPLE WORKS 83.1 BUILDING A SIMPLE ACTIVATED SLUDGE WORKS 83.2 RUNNING THE SIMULATION 103.3 LOOKING AT YOUR RESULTS 193.4 SUGGESTIONS FOR FURTHER SIMULATIONS 20

4. TUTORIAL 2: NUTRIENT REMOVAL 224.1 BUILDING THE WORKS 224.2 ADDING MIXED LIQUOR RECYCLES 234.3 RUNNING THE SIMULATION 264.4 SUGGESTIONS FOR FURTHER SIMULATIONS 31

5. TUTORIAL 3: STORM TANKS, PRIMARY TANKS, ACTIVATEDSLUDGE AND TRICKLING FILTER 32

5.1 BUILDING THE WORKS 325.2 CONSTRUCTING A STORM 335.3 RUNNING THE SIMULATION 355.4 SUGGESTIONS FOR FURTHER WORK 37

6. TUTORIAL 4: A MORE COMPLEX WORKS 386.1 BUILDING THE WORKS 386.2 PROGRAMMING A CHANGE 396.3 RUNNING THE SIMULATION 426.4 SUGGESTIONS FOR FURTHER SIMULATIONS 42

7. TUTORIAL 5: USING THE PID CONTROLLER TO MAINTAIN ACONSTANT WETTING RATE ON A TRICKLING FILTER 43

7.1 BUILDING THE WORKS 437.2 RUNNING THE SIMULATION 44

8. TUTORIAL 6: USING SENSITIVITY ANALYSIS FUNCTION WITHINSTOAT 51

8.1 BUILDING THE WORKS AND RUNNING THE FIRST SIMULATION 518.2 CARRYING OUT THE SENSITIVITY ANALYSIS 53

Page 6: WRc STOAT: Tutorials Guide

9. TUTORIAL 7 PRIMARY SEDIMENTATION AND NITRIFYINGTRICKLING FILTER 57

9.1 BUILDING TRICKLING FILTER WORKS 579.2 GENERATING INFLUENT FILE 589.3 TUTORIAL 7A: RUNNING SIMULATIONS/LOOKING AT RESULTS 609.4 TUTORIAL 7B: RUNNING SIMULATIONS/LOOKING AT RESULTS 639.5 SUGGESTIONS FOR FURTHER WORK 67

10. TUTORIAL 8 - SEQUENCING BATCH REACTOR 6810.1 BUILDING SBR WORKS 6810.2 GENERATING THE INFLUENT FILE 6910.3 RUNNING SIMULATIONS AND LOOKING AT THE RESULTS 70

Page 7: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 1 –

STOAT TUTORIALS GUIDE

1. INTRODUCTION

This guide is intended to take you through using STOAT, by building and running a series of examplesewage works. If you have a specific requirement for STOAT, and would like to see this covered bythe tutorials for other users, please contact us and we will prepare one.

The structure of this guide is:

Section 2 covers common material on using STOAT.

The subsequent sections present a range of worked examples:

Section 3 covers the modelling of a simple activated sludge works.

Section 4 extends this works to model nutrient removal.

Section 5 removes the nutrient removal option and extends the works to use a tertiary biological filterfor nitrification.

Section 6 extends the simple sewage works of Section 4 to multiple parallel trains and describes theeffect of losing 2 aeration lanes for maintenance purposes.

Section 7 uses a PID controller to continuously adjust the flowrate to a filter to achieve a constantwetting rate on the filter.

Section 8 describes the use of the ‘Sensitivity Analysis’ algorithm within STOAT to assess the effect ofvarying the settling velocity in a primary tank.

Section 9 covers the use of the Original BOD model for trickling filters and compares these resultswith the new biofilm growth model (COD) within STOAT.

Section 10 gives a tutorial showing how to set up and run an SBR model.

Page 8: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 2 –

2. GETTING STARTED

Start STOAT by double-clicking the STOAT icon from the Windows Program Manager.

When STOAT has loaded you are presented with a blank screen with five menu options, 'File', ‘Edit’,‘Options’, ‘Tools’ and ‘Help’. Select 'File.' If you are starting a tutorial for the first time select 'NewWorks'; if you are continuing a tutorial from where you left, select 'Open Works.'

The 'New Works' option asks you to give a name for the works. We suggest that you use the names'Tutorial 1', 'Tutorial 2' and so on. When you wish to use a tutorial again it will then be easier to selectthe right tutorial.

2.1 CREATING A NEW SEWAGE WORKS

'New Works' presents you with a blank drawing board, on which you can build up the description ofyour sewage works. From the Process Toolbox you can select which process you want to add to thedrawing board. Having selected the process, and keeping the left mouse button depressed, move theicon onto the drawing board and position it where you want. Releasing the mouse button 'drops' theselected process onto the drawing board. You can repeat this for all the processes that you want.

The Top Menu

The Processes Toolbox

This is the drawing board

Page 9: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 3 –

Every process has some stub lines marking influent and effluent connections, generally with influentson the left of the icon and effluents on the right.

You connect the processes by placing the mouse pointer over the OUTPUT stub, when the pointer willchange to a cross-hair symbol. Depending on the resolution of your screen, and the choice of mousepointer colour, the cross-hair may appear as a cross-hair or as a fat cross; the fat cross may be colouredblack or white. Pressing the left mouse button down, move the mouse to the INPUT stub on theprocess that you want to connect. When you are over the connection the pointer will change from across-hair to a 'chain-link'. Release the mouse button. The connection ('stream') between the twoprocesses has now been established. To ensure that a connection has been made to each required stub,RIGHT click on the process and choose “Connectivity” from the menu which appears.

Each stream must have a stream number assigned as in the screen shot above.

If any stream name is blank at this point you must reconnect the stream to the process. This is shown inthe above screen shot.

If you have made a mistake you can select and then delete the stream by right-clicking on the stream;you can also delete processes in the same way. You do not have to complete putting all the processes inplace before connecting processes; you can add processes and streams at any time.

Having created your sewage works you will need to save the configuration before you can proceed anyfurther. Select 'Save Works' from the 'File' menu.

Page 10: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 4 –

2.2 RE-USING AN EXISTING SEWAGE WORKS

Selecting 'File' and then 'Open Works' will present you with a list of existing works. (If nothingappears on the screen, then you have no works to choose from.) Select the works that you wish to use.

On the screen will first appear the drawing board, and then the works layout will be drawn. If this isthe works that you wish to model you can now select from the 'File' menu either to start a new run, orto complete an existing run. If you select 'Open run' you are presented with a list of all the runs thatyou have saved for that works. If a run has been completed you are not able to run it again, but you canview any of the data that was saved as part of the run.

You can use this works as the base for a new works, deleting processes that you do not wish to study,and adding new processes. You must then save the results as a new works. There will now be noruns associated with the works – all the runs having been associated with a works of differentgeometry. If you limit your changes to dimensions, keeping geometry the same, this is still treated as anew works. You will be asked to save the works before you can create any new runs, and you will havelost the initial conditions associated with the previous works.

To keep the initial conditions of a previous run when you have only changed the dimensions of aworks and had to save it as a New Works complete the following series of commands:

Open Works - Select the works you wish to changeNew Run - Make the changes to the dimensions (not the geometry)Save Works As - Assign new name to the modified worksSave Run As - Assign run name

You will now have the new works with the modified dimensions but with the initial conditions fromthe previous Works.

2.3 CREATING A NEW RUN

From the 'File' menu select 'New run'. If you have not correctly built the Works and are missing somestreams you will be presented with the following error message depending on which process the faultis at. You should check the connectivity for the process and re-connect the streams as described inSection 2.1.

Assuming the works has been correctly built, you will then be prompted for a name for the run, andwhat you want to use for initial conditions.

Page 11: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 5 –

There are three types of initial conditions that can be used in any run:

1. Specified by you (the cold start).

2. Taken as the same initial conditions as used in a previous run (allowing you to carry outsensitivity or comparability studies).

3. Use the end conditions from a previous run (allowing you to continue the simulation withcalculated, rather than estimated, initial conditions).

Following this you will be asked for details about the duration of the run.

Page 12: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 6 –

When specifying the simulation time the start time is fixed if you have chosen to use the initialconditions from a previous run. You can change the simulation length, specifying your required endtime in DD/MM/YY HH:MM format. You will be warned if you have typed in an illegal date or time.

The other piece of information you must supply is how frequently you want output. STOAT has norestrictions on the maximum output frequency but the default is 1 hour.

You can also set other simulation parameters, such as the average sewage temperature (used by theactivated sludge and biological filter models); the BOD equivalent of 1 g of biomass solids and volatile(but non-biomass) solids; and then numerical controls, such as the choice of integration method andaccuracy. We recommend that you leave these as the default values, changing only the temperature.

You can now set up the sewage works conditions for the run. You can do this for each process byright-clicking with the mouse on the process, where you will be offered a menu of the conditions thatyou can change. Changing any of the process data under 'Name and dimensions' defines a new sewageworks. You can change any of the other data at the start of the run, and you can change any of the'Operational' data during the course of the run, or program STOAT to have the changes madeautomatically for you.

2.4 SELECTING REPORTING OPTIONS

By right-clicking on a STREAM you can select what you would like displayed.

Select ‘Reporting Options’ and the following screen is displayed:

You can decide if you want data for the stream stored (‘Save Results’) for future use, and if you wantto look at the results as they are calculated ('In-simulation reporting'). If you want in-simulationreporting you can then select what components you would like to have displayed from the two options'Simple determinands' and 'Advanced determinands'.

Page 13: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 7 –

Simple determinands are the common sewage components, while advanced gives you access to all thestream components in STOAT. You can select determinands from both the simple and advancedoptions, and they will all be displayed on the same graph. We recommend you do not choose to look atevery determinand for every stream, as the result is more information than you can use during thesimulation. Select a subset that represents where you expect to be interested. Because you can save thedata for all the streams you can carry out a full post-mortem at the end of the run.

You can also select how you want the results displayed from 'Report View’. The default is as a graph,but you also have the option to have the results as a table, or as summary statistics (mean, maximum,minimum over the course of the simulation) or various combinations of these. Generally the mostuseful is the simple graphical display. You can change the report type during the simulation byselecting the report you want to change, then from the 'Window' menu selecting 'Display results as',which presents you with the same set of reporting types. Changing the display type during thesimulation may corrupt the display. (Whether you get a corrupted display will depend primarily on thenumber of profiles that you have chosen to display.) You can easily fix this by minimising thenrestoring the display – select the required window, double-click on the 'minimise' symbol (the down-arrow in the top right-hand corner); then double-click on the minimised icon that will appear at thebase of the STOAT window to restore the window, and clear any corruption of the display.

2.5 COMPLETING A RUN

When you have entered all your data save the run. Then run the simulation. This ensures that shouldyou have any problems during the run that you can start again. You start the run by selecting the 'Run'button symbol. You can pause the simulation with the 'Pause' button to make changes to theoperational parameters, and then continue the simulation with 'Play’. Selecting 'Stop' will stop thesimulation – you will not be able to continue afterwards with 'Play’.

Run name

Simulation startSimulation end

RunPause

Stop

Simulation timeElapsed tim

Progress monito

When the run is finished, and assuming you are happy with the outcome, then again save the run. Thispreserves the results for you to examine later. If you are not happy with the outcome, or if STOATencountered errors during the simulation, close the run from the 'File' menu and then open the run.Because you remembered to save the run before beginning the numerical calculations you canretrieve your starting point. Having done this you make whatever changes you feel are required, savethe result, and then again begin to run the simulation. You can repeat this cycle until you are satisfiedwith the results, when you can then save the run. Once a completed run has been saved you can nolonger make any changes to it. You can create a new run that will take either its initial conditions fromeither the initial or final conditions of previously completed runs.

Page 14: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 8 –

3. TUTORIAL 1: A SIMPLE WORKS

This tutorial covers the modelling of a simple works comprising a sewage influent, primary tank andan activated sludge tank.

3.1 BUILDING A SIMPLE ACTIVATED SLUDGE WORKS

Start by creating a new works. From the 'File' menu select 'New works’.

You will be asked for a name for the works. Enter 'Tutorial 1’.

The drawing board and process toolbox will now appear on the screen. For this tutorial, select theinfluent, primary tank, activated sludge aeration basin and activated sludge settling tanks, one effluent,two sludge and one no-entry icon. Select each and drag the icon from the toolbox to the drawing board.

Close the process toolbox, to remove the clutter on the screen.

Select this 'handlebarto get the 'Close' men

Page 15: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 9 –

When you have all the processes on the drawing board connect them together to create the flowsheetshown below.

Having completed the works geometry we now define the physical dimensions. For each process –primary sedimentation, aeration basin and settling tank – right-click on the process, select 'Input data'and then select 'Name and dimensions’. Set the processes dimensions as:

Primary sedimentation:

Name: Primary Tank 1Process Model: BODNumber of stages: 3Volume: 1,200 m2

Surface area: 400 m2

Aeration basin:

Name: Activated Sludge Tank 1Process Model: ASAL1Volume: 800 m3

Number of stages: 1Number of MLSS Recycles: 0Wastage Method: None (Note: This setting is only used if you wish to waste sludge from the aeration

tank - set to None if you are wasting from the settlement tank.)

Settling tank:

Name: Secondary Tank 1Process Model: SSED1Number of stages: 8 [this is the default]Surface area: 400 m2

Depth of Tank: 3 mDepth of Feed: 2 mRAS feed: Rate

Page 16: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 10 –

Wastage Method: Constant [you will find this by selecting the 'More' button at the bottom of theform].

Control Aeration Tank : Activated Sludge Tank 1Control aeration stage: 1

Having entered these you have now defined the works geometry and physical sizes. Save the result,using 'File/Save works’.

3.2 RUNNING THE SIMULATION

Now that the works has been defined and saved we can begin to carry out simulations for the works.Select 'File/New run’.

You will be asked first for a name to identify the run – accept the default of Run 1.

Now you are asked for details about the run.

Page 17: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 11 –

Take the default values, which set that the simulation will last for two days at 15°C. Simulating onlytwo days with the activated sludge model means that the results from the model will be heavilydependent on the initial conditions that we use. We will specify a suitable set of values, but we suggestthat when you are using STOAT your first simulation should be set for 20-40 days and should betreated as primarily a sighting run to evaluate a reasonable set of values for the initial conditions. (Therequired simulation time is set by the largest retention time in the sewage works. For activated sludgesystems this is normally the sludge age, and you should simulate three sludge ages to be confident thatyou are looking at a dynamic steady state, rather than the effect of the initial conditions. There will beother occasions when you have a good starting point and are interested not in the dynamic steady statebut the effect of short-term changes from your defined initial conditions.)

Having specified the base simulation parameters you can now set the process conditions for this run.

Begin by defining the sewage stream.

STOAT allows you to use any influent process icon to create a new influent data set (e.g. a repeatingdiurnal profile) but does not automatically associate this influent data set with the selected influentprocess icon. You therefore normally have a two-step process – first define the influent data set, thenassociate it with the influent process icon. You can subsequently edit the influent data set to modify thesewage profile to include storms or other periods of high or low flow or variations in sewage strengthfrom the 'normal’.

Right-click on the influent and select ‘Generate profile’.

Page 18: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 12 –

Select 'Sinusoidal' and click on ‘Edit Pattern’.

Accept the default values – this is an average flow of 100 m3/h, so that the settling tanks have averageupflow velocities of 0.25 m/h and the aeration basin a sewage retention time of 8 h. If you do wish tochange the values you can do so by saving the resulting pattern as a new name. Now click ‘Close’ andselect 'Create profile' and accept the defaults.

Page 19: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 13 –

Note that since the data file ends after 48 hours then attempting to use this file later for a simulation tomodel more than 48 hours will produce an error after the 48th hour has been modelled. Enter as the filename 'tut1.inf’.

You have now created a data file. You will be asked if you want to use this file with the influent.

Select ‘Yes’.

You will then be asked if you wish to view or edit the file.

Page 20: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 14 –

Select ‘No’.

Finally ‘Close’ the Generate profile menu.

If you now wish to alter the data you can do so by again right-clicking on the influent and selecting'Input data/Edit profile’. Next to the 'Edit profile' part of the sub-menu will be the filename of theassociated file.

We will leave most of the other processes at their default values. You can see the default values byright-clicking on each process and looking through the menus under each processes' 'Input data’. Forthis tutorial we will only change the default values for the settling tank and the initial conditions for allthe processes.

Right-click on the activated sludge settling tank and select 'Input data/Operation' Change the returnsludge rate from 0 m3/h to 150 m3/h, the sludge wastage rate from 0 m3/h to 5 m3/h, and the wastagepumping time and interval from 0 and 0 h to 24 and 24 h respectively.

Now we change the initial conditions. The default values are 0 for all determinands – we start with allthe tanks filled with water. Right-click on the primary tank, select 'Input data/Initial conditions’.Change the initial conditions to the following values:

Soluble BOD: 150 mg/lAmmonia: 40 mg/lSettleable particulate BOD: 70 mg/lNonsettleable particulate BOD: 30 mg/lSettleable volatile solids: 140 mg/lNonsettleable volatile solids: 40 mg/l

Page 21: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 15 –

Settleable nonvolatile solids: 40 mg/lNonsettleable nonvolatile solids: 20 mg/lTemperature: 15°C

Enter these for the first stage only. Then go to the top of the first stage input column and select the firstcell; keeping the left mouse button held down move the mouse pointer down to the base of the column.You should see the cells being highlighted. Keeping the mouse pointer within the highlighted regionright-click on the mouse button and select 'Copy' from the menu that will appear. Now use the mouseto highlight the data cells for the stage 2 column. Right-click on the highlighted cells, and select'Paste’. You should now see the contents of stage 1 also appear in stage 2. Highlight the data cells instage 3 and again right-click and select 'Paste’. Now select 'OK', so that you have defined the initialconditions for the primary tank.

Repeat this process for the activated sludge aeration basin. Use as the initial condition the followingvalues:

Soluble BOD: 5 mg/lAmmonia: 40 mg/lDissolved oxygen: 2 mg/lMLSS: 3000 mg/lViable autotrophs: 100 mg/lNonviable autotrophs: 0 mg/lViable heterotrophs: 1000 mg/lNonviable heterotrophs: 0 mg/l

The activated sludge settling tank cannot be treated using this copy and paste approach. The primarysettling tank is concerned with the longitudinal (rectangular tanks) and radial (circular tanks) variationin sewage concentration, not the vertical distribution. The activated sludge settling tank reverses this,being concerned with the vertical distribution and ignoring the radial/longitudinal variations. Thisdifference in emphasis requires that solids profiles in the final settling tank differ from stage to stage,

Page 22: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 16 –

increasing with increasing depth. Therefore, first enter the concentrations of the soluble componentsfor stage 1 and copy these into stages 2 - 8, using the column copy method described above. Use as theinitial condition the following values:

Soluble BOD: 5 mg/lAmmonia: 40 mg/lDissolved oxygen: 2 mg/l

For the solids settling we can idealise the solids profile as clarification above the feed point, a 'solidswaterfall' from the feed point to the base of the tank, and then a sludge blanket at the base of the tank.

Clarificationzone

Feedpipe

Sludge blanket

Sludge 'waterfall'

Schematic representation of sludge settling

Because we specified 8 stages and the feed to the settling tank at mid-depth we have the followingrelationship:

Clarifier stages: 1 - 3Waterfall stages: 4 - 7 (the feed stage is stage 4)Sludge blanket stage: 8

Use the following initial conditions for each part of the final tank:

Component Clarifier Waterfall SludgeTotal solids: 0 300 6000Viable heterotrophs: 0 100 2000Viable autotrophs 0 10 200

We are now ready to begin the simulation.

First save the run, using 'File/Save run’. This ensures that you will not have to re-enter the initialconditions, and any other data that you have specified, if for any reason the simulation fails (e.g. powerfailures, you forgot to specify part of the initial data – imagine what would happen if we had left thereturn sludge rate at zero flowrate or had not defined the influent sewage.)

Select 'Run' from the run buttons on the top menu. The simulation will now begin. The only signs youhave of progress are that the progress indicator bar slowly moves along, and the 'Current simulation

Page 23: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 17 –

time' indicator shows the simulation progressing. When the simulation is over you can view the resultsby selecting a process or stream and selecting 'Results' from the menu that will appear.

But you can also see the progress of the simulation as it happens. First select 'File/Close run', then'File/Open run' and select 'Run 1' from the list. You are now back at the start of the simulation that wehave just run. Right-click on the final effluent stream and select 'Report options’. Now select 'In-simulation reporting’. You can choose what you want to have displayed from two menus, 'Simple' and'Advanced' by first selecting which menu you want to look at and then selecting 'Determinands’. Youcan mix determinands from both the 'Simple' and 'Advanced' options. You should also select 'Reporttype' to select the reporting method you want – normally only the graph – and the scale factor to beapplied to the sewage flowrate. Finally select 'Close’. You may see a graph open on the screen beforeyou, or a small icon appear at the bottom of the STOAT window. If a small icon does appear thenselect the icon and select either 'Restore' or 'Maximise' to bring the graph up. If you now select 'Run' asthe simulation proceeds you will see the calculated results for the final effluent stream being displayedon the graph. The default scale is 0 - 100; you can change this by selecting 'Pause', then from the topmenu 'Window/Graph/Scale’.

Page 24: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 18 –

Minimised graph ico

Return graph todefault size

Make graph thefull screen size

Page 25: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 19 –

The final results from this simulation are shown below. You can see that ammonia started at 40 mg/land was gradually removed, so that the works is nitrifying. Total BOD started at 5 mg/l and droppedslightly while effluent solids rose to about 5 mg/l.

3.3 LOOKING AT YOUR RESULTS

Now that the simulation is finished you can look at the results at any point. As an example, select thestreams connecting the influent to the primary tank (the crude sewage), the primary tank to the aerationbasin (the settled sewage) and the final effluent. You will have to change the default scales from thecrude and settled sewage, from 0-100 to 0-350 for the crude sewage and 0-300 for the settled sewage.You can change the scales by placing the mouse over the graph and right-clicking, when you will beoffered a menu with 'Title', 'Scale', Pattern' and 'Font’.

If you now select 'Window/Tile/Vertical' you should see the following screen:

Page 26: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 20 –

The order of the graphs may differ on your computer – here the first graph is settled sewage, thesecond crude sewage and the final graph final effluent. You can see the removal of BOD, solids andammonia as the sewage progresses through the primary tank and the activated sludge unit. You canalso choose to look at the data as a timeseries or summary statistics – select the graph, then from'Window/View' select your preferred output. Graphs may be copied onto the Windows clipboard andinserted into word processor documents, while tables can be copied into tables in word processors orinto spreadsheets.

3.4 SUGGESTIONS FOR FURTHER SIMULATIONS

This simulation, like those that follow, concentrates on modelling only a few days of data. In practiseyou should normally choose to look at longer periods, covering at least three sludge ages to attain arepresentative dynamic equilibrium state. Our rule of thumb has been to carry out a simulation for40 days and then look at the last two days of diurnal results. If they are the same, we are at dynamicequilibrium. If not, then we repeat the simulation for a further 40 days. With STOAT you can alsochoose to monitor the effluent and take dynamic equilibrium as being reached when the effluentappears to have the same shape from day to day. You can then stop the simulation. We also suggestthat:

1. you start with a dynamic equilibrium before modelling storms.

2. you do not attempt to get a close match between data and predictions when what you arecomparing is a predicted dynamic equilibrium and a set of measurements that are not a dynamicequilibrium.

Page 27: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 21 –

Aside from looking at how the solution progresses over periods longer than two days, you could alsolook at:

a) the effect of different initial conditions – these should not affect the dynamic equilibrium, butwill have a marked effect on the short-term behaviour of the effluent quality,

b) changing the sewage characteristics or the sludge settleability for either the primary tank or thefinal settling tank,

c) changing the DO control in the aeration tank,

d) changing the wastage control methods and rates, and comparing the effect of wasting from theaeration basin with wasting from the return sludge line,

e) examining the effect of plug flow on treatment performance – vary the number of stages in theaeration basin using values of 1, 2, 4, 8 and 12.

Page 28: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 22 –

4. TUTORIAL 2: NUTRIENT REMOVAL

The sewage works developed in Tutorial 1 is adapted to nutrient removal by choosing a differentactivated sludge model. Different P-removal schemes are then modelled.

4.1 BUILDING THE WORKS

We start by looking at nitrogen removal only. The sewage works geometry is the same as in Tutorial 1,but without the primary tank. You can create this sewage works in two ways, either by starting anew,or by re-using the works layout in Tutorial 1.

4.1.1 Modifying the Tutorial 1 Sewage Works

Select 'File/Open works’. From the menu select the works 'Tutorial 1' (or whatever you chose to savethe tutorial works as). The works will now appear on the screen. Right-click with the mouse on theprimary tank and select 'Delete’. The primary tank and all its connections should be removed. Youmust re-connect the influent to the activated sludge tank. Save the sewage works as 'Tutorial 2' using'File/Save works As’.

4.1.2 Starting with a Blank Drawing Board

Select 'File/New works’. Name the sewage works as 'Tutorial 2’. The blank drawing board will appear,along with the processes toolbox. From the toolbox select and place on the drawing board the influent,activated sludge aeration basin and activated sludge settling tank. Connect the influent and settling tankreturn sludge to the aeration basin, and the aeration basin effluent to the settling tank influent. Finallyconnect streams to the two wastage points on the aeration basin and the settling tank. Only one of thesewill be used but STOAT requires that both must be connected.

Page 29: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 23 –

Now define the physical sizes of the processes. For the aeration tank enter the following:

Volume: 800 m3

Number of stages: 2Number of mixed liquor recycles: 1Sludge wastage: None

For the settling tank enter the following:

Settling area: 400 m2

Depth: 3 mFeed depth: 2 mNumber of stages: 8 [this is the default]Wastage method: Constant rateRAS flow: Rate

Save the works, using 'File/Save works'.

4.2 ADDING MIXED LIQUOR RECYCLES

The most common nutrient removal configurations use mixed liquor recycles to promote theconversion of ammonia through nitrate to nitrogen gas. You can select between nutrient removalschemes that are concerned with nitrogen removal only (select activated sludge models 1A) or nitrogenand phosphorus removal (select model 5A). The common configurations for the AO (Anoxic-Oxic –nitrogen removal), A2O (Anaerobic-Anoxic-Oxic – nitrogen and phosphate removal), Bardenpho(nitrogen and phosphate removal), UCT (University of Cape Town – nitrogen and phosphate removal)and MUCT (Modified UCT) are shown below, with the choice of model, number of stages and mixedliquor recycles, and the STOAT definitions for the connection of the recycles. STOAT assumes thatfixed-flow pumps are used, and the recycle flowrate used is therefore constant.

Sewage

Return activated sludge

Settlingtank

Anoxictank

Aerobic (Oxic)tank

The AO Process

Number of stages = 2No mixed liquor recyclesUse Model #1A

Page 30: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 24 –

Sewage

Return activated sludge

Settlingtank

Anoxictank

Aerobic (Oxic)tank

Mixed liquor recycle

The A O Process2

Anaerobictank

Number of stages = 3One mixed liquor recycle, from stage 3 to stage 2Use Model #5A

Anaerobic

AnoxicAerobic Anoxic

Aerobic

Sewage

Return activated sludge

Mixed liquor recycle

The Bardenpho Process

Number of stages = 5One mixed liquor recycle, from stage 3 to stage 1Use Model #5A

Page 31: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 25 –

AnaerobicAnoxic

Aerobic

Sewage

Return activated sludge

Mixed liquor recycle

The UCT Process

Number of stages = 3Two mixed liquor recycles

MLSS recycle 1 from stage 3 to stage 2MLSS recycle 2 from stage 2 to stage 1

RAS distribution: 0.0 to stage 1, 1.0 to stage 2, 0.0 to stageUse Model #5A

Anaerobic Anoxic Aerobic

Sewage

Return activated sludge

Mixed liquor recycle

The modified UCT Process

Anoxic

Number of stages = 4Two mixed liquor recycles

MLSS recycle 1 from stage 4 to stage 3MLSS recycle 2 from stage 2 to stage 1

Use Model #5A

Page 32: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 26 –

Notice that you must define the model type and the number of mixed liquor recycles under 'Name anddimensions' and that this therefore defines the sewage works. Changing these parameters will requirethat you save the works under a new name. The actual values for the mixed liquor flowrates, and thestages that they connect, are specified under 'MLSS recycles' and is a run parameter – you cannot setthese until you first define a run.

For this simulation we will restrict the model to a modified AO-type process. The activated sludgemodel should be model ASAL 1A and the settling tank model should also be model SSED1. There aretwo stages in series with one mixed liquor recycle, taking sludge from the second stage to the first. Thefirst stage is anoxic and denitrifies, converting nitrate to nitrogen. The second stage is aerobic,converting ammonia to nitrate. This nitrate is then taken back to the first stage for removal.

4.3 RUNNING THE SIMULATION

Save the works, then create a new run.

Define the mixed liquor recycle as <From> stage 2 <To> stage 1, with a flowrate of 400 m3/h(assuming that you have left the average sewage flowrate as 100 m3/h).

Under 'Flow distribution set the minimum and maximum KLa values for stage 1 to zero, and thedissolved oxygen setpoint also to zero – this ensures that this stage is anoxic. Leave the volumefractions as a 50:50 split.

Page 33: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 27 –

Set the 'Operation' conditions for the settling tank to a return sludge flow of 150 m3/h, a wastage rate of5 m3/h and the operating times for wastage pumps and wastage intervals to 24 hours.

For the influent select the same flowstream as you used in tutorial 1, 'tut1.inf’. Right-click on theinfluent icon, to bring up the following menu. Choose Select profile and from the resulting menuchoose tut1.inf.

Because you have defined a new works your first run must be a 'cold start' and you should enter thesame initial conditions as used in Tutorial 1.

Page 34: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 28 –

For the activated sludge aeration basin you must specify that the dissolved oxygen concentrationin the first stage is zero – this is because this stage is anoxic. All anoxic stages must be defined withthe KLa values, dissolved oxygen values and dissolved oxygen setpoints as zero.

Now define the initial conditions for the settling tank. The activated sludge settling tank is concernedwith the vertical distribution of solids and ignores the radial/longitudinal variations. This requires thatthe solids profile in the final settling tank differs from stage to stage, increasing with increasing depth.Therefore, first enter the concentrations of the soluble components for stage 1 and copy these intostages 2 - 8, using the column copy method described in Tutorial 1. Use as the initial condition thefollowing values:

Soluble BOD: 5 mg/lAmmonia: 40 mg/lDissolved oxygen: 2 mg/l

For the solids settling we can idealise the solids profile as clarification above the feed point, a 'solidswaterfall' from the feed point to the base of the tank, and then a sludge blanket at the base of the tank.

Page 35: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 29 –

Clarificationzone

Feedpipe

Sludge blanket

Sludge 'waterfall'

Schematic representation of sludge settling

Because we specified 8 stages and the feed to the settling tank at mid-depth we have the followingrelationship:

Clarifier stages: 1 - 3Waterfall stages: 4 - 7 (the feed stage is stage 4)Sludge blanket stage: 8

Use the following initial conditions for each part of the final tank:

Component Clarifier Waterfall SludgeMLSS: 0 300 6000Viable heterotrophs: 0 100 2000Viable autotrophs 0 10 200

Finally, select the final effluent stream to monitor during the simulation. The results should look likethe following figure:

Page 36: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 30 –

There is a high BOD peak at the start of the simulation, caused by the high influent BOD. The biomassresponds to this by growing, so that the BOD is taken up and the concentration eventually comesdown. The effect of the mixed liquor recycle can be seen in that the nitrate is less than the comparableplot for Tutorial 1. If the simulation had been left to run for longer – which would require specifyingan influent profile that lasted longer than 48 hours – then full nitrification would be seen, followed bydenitrification.

You can see this by selecting 'File/New Run’. If the 'New Run' option is greyed out then you must firstselect the drawing board because you currently have one of the graphs active. You can tell the activegraph by looking to see which one has its top title bar highlighted. Having selected 'File/New Run' youwill be asked if you want to save the results of the previous run. Answer 'Yes’. When the run menuappears on the screen select to continue from a previous simulation:

You will be asked which run you want to start from. Assuming that you called your first run 'Run 1',then select 'Run 1’. If you saved Run 1 with reporting graphs open then these graphs should also beopened as the new run is set up. If Run 1 was not saved with these graphs open then you will need toopen up a reporting graph to look at the final effluent quality. At the end of the simulation you shouldsee an effluent quality that looks like:

Page 37: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 31 –

The effluent profile is now beginning to repeat itself, showing that we are reaching the dynamicequilibrium conditions. The effluent quality is worse than in Tutorial 1 because the aerated volume ofthe tank is only 400 m3, compared to 800 m3 in Tutorial 1.

4.4 SUGGESTIONS FOR FURTHER SIMULATIONS

Mixed liquor recycles impose a large pumping requirement on the sewage works. Try comparing theperformance of the modified AO plant with a four-stage aeration basin where the sewage is fed intostages 1 and 3 at a ratio of 70:30. Stages 1 and 3 should be anoxic and stages 2 and 3 aerobic.Experiment with the relative volumes of the four stages – start with stages 1 and 3 at 10% of the totalvolume and stages 2 and 4 at 40%.

Also try running the Bardenpho and Modified UCT configurations to see the STOAT predictions forphosphorus removal. Unlike nitrogen, where the ammonia is ultimately converted to nitrogen gas andlost from the system, phosphate is accumulated in the biomass – it is transferred from solublephosphate in the sewage into a particulate form in the waste biomass. The waste sludge must thereforebe handled in such a way to prevent the release of phosphorus from the biomass back into the solubleform.

Page 38: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 32 –

5. TUTORIAL 3: STORM TANKS, PRIMARY TANKS, ACTIVATEDSLUDGE AND TRICKLING FILTER

One of the strengths of STOAT over many other wastewater modelling programs is that it allows youto include a variety of processes in series or parallel. This example presents a sewage works with ahigh-rate activated sludge plant followed by a tertiary nitrifying filter.

5.1 BUILDING THE WORKS

Create a new works and call this 'Tutorial 3’. Place on the drawing board an influent, storm tank,primary tank, aeration basin, activated sludge settling tank, trickling filter, humus tank, two two-waymixers, one three-way mixer and an overflow divider. Connect the processes to give you the layoutshown below.

Name the sewage flowstream connecting the overflow divider to the primary tank 'After overflow’.This will help identify this stream later.

For each process specify the following dimensions:

Page 39: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 33 –

Storm tank

Volume: 300 m3

Area: 100 m2

Control flowstream: After overflowThe storm tanks have deliberately been undersized so that we get a spill in this simulation.

Primary tank

Number of stages: 2 [this is the default]Volume: 600 m3

Area: 200 m2

Aeration basin

Model: 2ANumber of stages: 1Volume: 400 m3

Wastage: None

Settling tank

Model: Number 2. The model used in the aeration basin and the settling tank must match up to ensurethat the determinands used by the two are the same.

Number of stages: 8Area: 200 m2

Depth: 3 mFeed depth: 1.5 mRAS recycle: RatioWastage: Variable rate over fixed timeControl aeration tank: Activated sludge 1Control stage: 1

Trickling filter

Model: OriginalNumber of stages: 5 [this is the default]Area: 1,000 m2

Depth: 1.834 m

Humus tank

Area: 500 m2

Save the works.

5.2 CONSTRUCTING A STORM

Create a new run. We want to model the effect of a storm on the sewage works. Storm sewage data isdifficult to obtain so for this simulation we will continue to use the file 'tut1.inf’. We simulate thestorm by setting tank sizes and overflow settings so that flows above 100 m3/h imitate the effect ofhigh storm flows.

For each process change the following parameters:

Page 40: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 34 –

Influent (Select Profile)

Select the profile as the file tut1.inf.

Overflow (Operation)

Overflow setting: 100 m3/h

Storm tank (Operation)

Return tank contents at: 30 m3/hControl stream flow: 70 m3/h

When the flow past the overflow point drops below 70 m3/h then the tank contents will be pumpedback at 30 m3/h, so that the total flow to the works will not exceed 100 m3/h.

Primary tank

Nothing here to change.

Aeration tank

Nothing here to change.

Settling tank (Operation)

Wastage rate: 30 m3/hWastage interval: 24 hoursPumping time: 24 hoursRecycle ratio: 1

Trickling filter (Model Calibration - Process Unit)

Media dimension: 0.025 mSpecific surface area: 223 m2/m3

Effective surface area: 223 m2/m3

Specify the following initial conditions:

Storm tank:

Leave this empty – all values zero.

Primary tank

Leave all the values as zero.

Aeration basin

MLSS: 3000 mg/lViable autotrophs: 100 mg/lNonviable autotrophs: 0 mg/lViable heterotrophs: 1000 mg/lNonviable heterotrophs: 0 mg/l

Page 41: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 35 –

Activated sludge settling tank

MLSS Viable autotrophs Viable heterotrophsStages 1-3 0 0 0Stages 4-7 300 10 100Stage 8 6000 200 2000

Trickling filter

Heterotrophs: 100 mg/l on each stageAutotrophs: 2 mg/l on each stage

5.3 RUNNING THE SIMULATION

Select the effluent from the activated sludge settling tank and the humus tank to monitor during thesimulation. Then run the simulation. The completed profiles should look like the following figures:

You can see that the activated sludge plant is operating to remove BOD only and that it is overloadedduring the storm. The filter removes ammonia, but during the storm it also removes additional BOD,protecting the receiving water.

You can also follow the progress of the sewage during treatment. The following graphs show theinfluent and effluent from the storm and primary tanks. Stream 9 is the influent to the storm tank1,

1 The numbering of streams depends on the order in which you choose to connect them. Do notworry if your streams have different numbers, as long as they are connecting the processesdescribed.

Page 42: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 36 –

Stream 11 the pumped sewage returned from the storm tank, Stream 14 the primary tank effluent andStream 10 the storm tank overflow. The nature of the storm tank operation can easily be seen here.

Page 43: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 37 –

5.4 SUGGESTIONS FOR FURTHER WORK

1. Experiment with the overflow setting and its impact on effluent quality.

2. Place the overflow after the primary tank.

3. Increase the number of stages in the aeration tank – this shows the difference in behaviourbetween completely-mixed and plug-flow aeration basins.

Page 44: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 38 –

6. TUTORIAL 4: A MORE COMPLEX WORKS

This tutorial takes you through building up a sewage works with several parallel processes, includingsludge treatment, and programming changes in operational conditions.

6.1 BUILDING THE WORKS

Select 'File/Create new works’. Place the following processes on the drawing board:

1 x influent2 x primary tanks2 x activated sludge aeration tanks2 x activated sludge settling tanks1 x mesophilic anaerobic digester – use model MAD12 x two-way splitters5 x two-way mixers

Connect the processes as shown in the following flowsheet:

Now enter names and dimensions for the processes as follows:

Primary tanks:

Area: 100 m2

Volume: 300 m3

Number of stages: 2

Page 45: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 39 –

Aeration basins:

Model: 1AVolume: 400 m3

Number of stages: 1Sludge wastage: None

Activated sludge settling tanks:

Number of stages: 8 [this is the default value]Area: 200 m2

Depth: 3 mFeed depth: 1.5 mRAS method: RatioSludge wastage: Constant rate

Aeration basin: Connect the aeration basin name to the corresponding settling tank. If you haveconnected aeration tank 1 to settling tank 1, 2 to 2, then in settling tank 1 specify that the aeration basinshould be 'Aeration tank 1', for settling tank 2 'Aeration tank 2' and so on.

Aeration stage: 1 [there is only one stage specified for each tank]

Sludge digester

Sludge volume: 6000 m3

Save the works.

6.2 PROGRAMMING A CHANGE

Now create a new run. For this simulation we will investigate the effect if two of the aeration lanes aretaken out of service for maintenance.

Start by defining the following operating conditions:

Activated sludge

Initial conditions: In each aeration basin set the viable heterotrophs to 1,000 mg/l, the viableautotrophs to 100 mg/l, and the total solids 3,000 mg/l.

Activated sludge settling tanks:

Operational parameters: Set the return sludge flow to 50 m3/h, the wastage flow to 2.5 m3/h, and thetwo wastage times to 24 hours.

Initial conditions: Set the following:

Total solids Viable autotrophs Viable heterotrophsStages 1-3 0 0 0Stages 4-7 300 10 100Stage 8 6000 200 2000

Before you can run the simulation you must set the influent sewage data. Select the influent and right-click with the mouse. Then select 'Input data/Generate profile’. Now select 'Sinusoidal' and 'Createprofile’. Specify that the simulation length should be 96 hours, and that the file name should be'tut4.inf’. Finally right-click and choose 'Input data/Select profile’. Select the profile as 'tut4.inf’.

Page 46: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 40 –

Page 47: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 41 –

At this stage run the simulation and save the results. All we want this first simulation to do is to give usa reasonable starting point. Having saved the run select 'File/New run' and select 'End of old run’. Atthe next menu increase the simulation time from the default of two days to four days.

Now we are set up the changes in the flow split. We assume that the lower aeration lane on theflowsheet is to be taken out of service, and therefore after 48 hours set the flow split for 'AS Splitter'from 50:50 to 100:0. We then allow the tank to be back in service after a further 24 hours, and set theflow split for 'AS Splitter' from 100:0 back to 50:50. The simulation will then reflect the effects of thetanks being taken out of service and the subsequent re-establishment of performance when the tanksare returned to service.

Select this flow s

Save the run.

Page 48: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 42 –

6.3 RUNNING THE SIMULATION

Select the final effluent to view during the simulation, and then run the model. You should see a graphdevelop that will look like this:

You can see that the effluent quality deteriorated greatly during the period that all the flow had to gothrough only half the activated sludge capacity. Nitrification was temporarily lost but recoveredquickly, while effluent BOD rose to high levels. Looking at the suspended solids reveals that thesettling tanks were not hydraulically overloaded, so that the constraint on performance was most likelyto be oxygen limitation. A possible conclusion from this simulation is that increasing the oxygencapacity in the operational lane during maintenance, possibly by a VITOX boost unit, would improveplant performance.

6.4 SUGGESTIONS FOR FURTHER SIMULATIONS

You could look at the following:

1. What would happen to the effluent quality if all aeration in one lane failed? Because you cannotprogram a change in the aeration conditions at the start of a simulation you will have to decidewhen you would like to pause the simulation and set the maximum and minimum KLa values tozero in your chosen aeration lane.

2. What would happen if return sludge from one lane failed?

3. Re-design the works so that the two aeration lanes mix their effluent and the result is then splitbetween the four settling tanks, with the RAS from the two tanks being combined before beingsplit between the two aeration tanks. Then look at the effects of taking out a single aerationlane, or a single settling tank.

Page 49: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 43 –

7. TUTORIAL 5: USING THE PID CONTROLLER TO MAINTAIN ACONSTANT WETTING RATE ON A TRICKLING FILTER

This tutorial takes you through building a trickling filter and using the PID controller within STOAT tocontinuously adjust the influent flowrate to the filter to achieve a constant wetting rate.

7.1 BUILDING THE WORKS

Select ‘File/New Works’. Place the following processes on the drawing board:

1 x Influent1 x Overflow1 x two-way mixer1 x filter1 x humus tank1 x sludge1 x effluent1 x PID controller - Note that this is not physically connected to any of the other processes because no

flow actually passes through it. It is placed near the recycle stream upon which it acts.

Connect the processes as shown in the following flowsheet:

The overflow symbol must be rotated four times to be drawn in the manner shown above. This is doneby right-clicking on the symbol and choosing ‘Rotate’.

Rename the stream entering the trickling filter to be ‘CONTROLLED STREAM’. This is done byright-clicking on the stream and choosing ‘Input Data/Name’.

Notice that the effluent leaves through the overflow. The recycle is connected through the normalmain flow.

Page 50: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 44 –

Now enter the names and dimensions for the processes as follows:

Trickling Filter:

Name: DefaultModel: OriginalNumber of Stages: 5Number of layers: N/ADepth: 1.83Surface Area: 4000

Humus Tank

Name: defaultSurface Area: 200

Overflow

Name: Default

PID Controller

Name: DefaultModel: Continuous 1

Save the works.

7.2 RUNNING THE SIMULATION

Create a new run. For this simulation we will operate the works with the PID controller set up butswitched off.

Start by defining the following operating conditions:

Name of Run: Run 1Length of simulation: 48 hoursAverage Sewage Temperature: 15oC

Trickling Filter

Nothing to change.

Humus Tank

Nothing to change.

Overflow (Operation)

Overflow: 0

PID Controller

(Connectivity)

We are programming the PID controller to measure the flowrate in the ‘controlled stream’ and vary theoverflow rate of Overflow 1 to keep a constant flow of 100 m3/hr going onto the filter.

Input Stream or Process: Stream

Page 51: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 45 –

Name: Controlled Stream (This is the stream entering the trickling Filter)Stage: N/ADeterminand: Flow

Output Stream or Process: ProcessName: Overflow 1Stage: N/ADeterminand: Overflow rate

(Operation)

Set Point: 100

(Initial Conditions)

Nothing to change.

(Model Calibration - Process Unit)

Mode: Disable - This turns the PID controller off for the first simulationAction: PositiveSampling Interval: DefaultProportional Gain: 0.3Integral Time: 0.25Derivative Time: 0.1Maximum Output: 300 - This allows flow to be returned at a maximum rate of 300 m3/hrMinimum Output: 0

Before you can run the simulation you must set the influent sewage data. Select the influent and right-click with the mouse. Then select 'Input data/Generate profile’. Now select 'Sinusoidal' and 'Createprofile’. Specify that the simulation length should be 48 hours, and that the file name should be'tut5.inf’.

Select 'Sinusoidal' and click on ‘Edit Pattern’

Page 52: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 46 –

Accept the default values – this is an average flow of 100 m3/h,. Now click ‘Close’ and select 'Createprofile' and accept the defaults.

Page 53: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 47 –

At this stage run the simulation and save the results. When you click ‘Start’ the following warningmessage will appear:

This is telling you that the overflow has been set to 0 m3/hr and all the flow is therefore spilling.Normally this is a mistake - you do not want everything to flow into the overflow channel. However,because our effluent leaves via the overflow for this simulation you should choose ‘No’ and continuewith the simulation.

At the end of the simulation you should save the results and look at the stream entering the filter(‘Controlled Stream’), the effluent and the recycle streams. The following results graphs will appear.

Page 54: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 48 –

From the above results you can see that there is no recycle and the flow onto the filter is a sine curvewith a large variation of flow and load. We will now attempt to use the PID controller to smooth theflow curve onto the filter.

Choose ‘File/New Run’ and select to use a ‘warm start’ as follows:

This will allow you to keep all the previous settings use for Run 1.

Right-click on the PI controller and select ‘Input Data / Model Calibration (Process Unit)’. Select themode to be PI control. This will activate the controller to act as a Proportional-Integral controller.

Page 55: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 49 –

Save the New Run and then Start the simulation.

When the run has been completed, look at the results profiles for the controlled stream, the effluent andthe recycle streams. The results screens below show the effect of the PI controller.

These results show that the flow onto the filter has been added to where necessary to attempt to keep itat approximately 100 m3/hr.

Experiment with different values for the proportional gain and the integral time to assess what effectthey have on the stability and speed of response of the control action. Below is a set of results with theProportional gain set to 0.8.

Page 56: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 50 –

Page 57: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 51 –

8. TUTORIAL 6: USING SENSITIVITY ANALYSIS FUNCTIONWITHIN STOAT

This tutorial demonstrates how you use the sensitivity analysis function within STOAT to assess theeffect of varying the constant k in the settling equation V kC h= on the settled sewage suspendedsolids concentration from a primary tank.

8.1 BUILDING THE WORKS AND RUNNING THE FIRST SIMULATION

Construct the works as shown in the following screen shot.

Now enter the names and dimensions for the process as follows:

Primary Tanks:

Name: Primary Tank 1Model: BODNumber of stages: 2Volume: 300 m3

Surface Area: 100 m2

Save the Works and Create a New Run.

Accept the default values for the Run so that we are carrying out the run for 48 hours at a sewagetemperature of 15oC.

Generate an influent file by using a sinusoidal pattern and accept the default values given by STOAT.Call this file Tut6.inf.

Page 58: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 52 –

To begin with we will run the simulation using the default settling co-efficient values of:

k = 7.2

These are located under Model Calibration (Sewage) as shown in the screen shot below.

When the run is completed, Save the run and view the results profile for suspended solids in the settledsewage. It should look like the following results screen.

As you can see the average suspended solids in the effluent is 175 mg/l with a sinusoidal variationabout this mean. We will now look at the effect of varying the settling parameter k on the effluentsuspended solids.

Page 59: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 53 –

8.2 CARRYING OUT THE SENSITIVITY ANALYSIS

Begin a New Run and Select a warm start from Run 1. Call this New Run “Sensitivity Analysis” andagain select the default setting from the run menu so the run will last for 48 hours and be carried out ata sewage temperature of 15oC.

From the Top Menu, Select ‘Tools’/’Sensitivity..’. as shown.

You will now see the sensitivity analysis screen shown below.

This allows you to select the required inputs and select what output you wish to see the effect on. Youcan select two parameters to vary and these are called 1 and 2. These parameters can either be from astream or a process as required.

Page 60: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 54 –

Select Parameter 1 and Process.

In the Element box ‘Primary Tank 1’ will appear since this is the only process in the works. Nowselect parameter and a list of parameters that can be varied will appear. Select ‘Settling coeff K’.

We must now specify the values of K that we want to select to assess the effect on the effluentsuspended solids. The default value is 7.2. For this exercise we will vary K between 3 and 11 in stepsof 2. This will allow us to assess the effect on the effluent of values of K of 3, 5, 7, 9 and 11.

Enter Start = 3Step = 2End = 11

We must now set the output to be the element upon which we wish to see the effect of varying K.

Select the variable to be a stream.

Select the display to be time-series - this will show the effect as the run progresses.

Select the name of the stream to be the effluent stream.

Select the determinand to be ‘total suspended Solids (mg/l)’.

Once the setup has been completed you will be asked if you wish to Save the Run. If you Click on‘OK’ the first run of the sensitivity analysis will begin.

After each run has been completed, the next run will automatically start until the entire sensitivityanalysis is completed, when you will see the following message:

Click on ‘OK’ to view the results graph.

Page 61: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 55 –

For each variation of the parameter you will have a run with P=the number of the chosen parameter forthat run i.e. P=3 is the run where the settling coefficient K was set to a value of 3.

You can see that increasing K from 3 to 11 has the effect of reducing the peak effluent suspendedsolids from approximately 290 mg/l at a K value of 3 to approximately 220 mg/l at a K value of 11.This demonstrates how sensitive the effluent suspended solids is to variation in the settling parameterk.

The next time you wish to open a run you will see a screen something like the one shown below:

Page 62: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 56 –

The extra runs are those carried out at the various values of K from 3 to 11. It is recommended thatusers who wish to regularly carry out sensitivity analysis on various parameters make notes on rundetails otherwise it can be difficult to differentiate one run from the other.

Page 63: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 57 –

9. TUTORIAL 7 PRIMARY SEDIMENTATION AND NITRIFYINGTRICKLING FILTER

This tutorial covers the use of models to simulate conventional biological filters. It includes anexample of using the Original (Model 1) model (BOD) which requires calibration of heterotroph andautotroph concentrations and also the IAWQ model (COD) which includes biofilm growth kinetics.The new WRc model (BOD) which also includes biofilm kinetics is not covered in this tutorial.

9.1 BUILDING TRICKLING FILTER WORKS

The Original and IAWQ works models may both be conveniently generated at this stage and saved forsubsequent use.

TUTORIAL 7A - ORIGINAL FILTER MODEL

Choose ‘File/Create new works’. Call the works a suitable title e.g. Tutorial 7A or Original (Model 1)Model. Lift and drop the following processes on to the drawing board:

1 x influent1 x primary sedimentation tank1 x trickling filter1 x humus tank1 x effluent2 x sludge

Connect up the processes to generate the flowsheet shown below:

The next step is to enter the names and sizes of plant in each process as follows:

Primary sedimentation tank:

Name: Primary Tank 1Model: BODNumber of stages: 2Volume: 500 m3

Area: 200 m2

Page 64: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 58 –

Trickling filter:

Name: Biofilter 1Model: OriginalNumber of stages: 5Number of layers: 2Depth: 2 mSurface (plan) area: 2000 m2

Humus Tank:

Name: Humus Tank 1Surface area: 200 m2

At this stage select Save Works to retain an up-to-date version of the model.

TUTORIAL 7B - IAWQ FILTER MODEL

To generate this model select Save Works As and choose a new name, e.g. Tutorial 7B or IAWQmodel. Then input new values where required to give the following:

Primary sedimentation tank:

Name: Primary Tank 1Model: CODNumber of stages: 2Volume: 500 m3

Area: 200 m2

Trickling filter:

Name: Biofilter 1Model: IAWQ #1Number of stages: 2Number of layers: 2Depth: 2 mSurface (plan) area: 2000 m2

Note: Selection of two stages is sufficient to model the growth of heterotrophs in the upper part of thefilter bed to remove BOD (carbonaceous oxidation) and growth of autotrophs in the lower part of thebed to oxidise ammonia (nitrification).

Humus Tank:

Name: Humus Tank 1Surface area: 200 m2

At this stage select Save Works and then select Close Works.

9.2 GENERATING INFLUENT FILE

A new influent file is required that contains suitable flows and BOD/COD values for use with theOriginal and IAWQ filter models. Open each Works in turn to set up the following influent profile:

Page 65: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 59 –

TUTORIAL 7A - ORIGINAL FILTER MODEL

Select File/Open works and left-click on Tutorial 7A Works to open works.

Select File/New Run. Select Default (cold start) and choose OK. Input the values given below for a2 day run and a time step of 1 hour. Choose OK to initialise Run 1.

Right-click over influent icon, choose Generate profile/Sinusoidal/Default/Edit Pattern, and input thefollowing values (each with a Phase of 0 hours, Amplitude of 50%, and Frequency of 0.26):

Flow of 100 m3/h ,Temperature (of wastewater): 15°CSoluble BOD: 75 mg BOD/lSoluble inert COD: 30 mg COD/lParticulate BOD: 50 mg BOD/lParticulate inert COD: 0Volatile solids: 90 mg SS/lNon-volatile solids: 30 mg SS/lSoluble ammonia: 30 mg N/l

Close and save as Influent Pattern Tut7.

Double-click on Influent Icon, choose Generate profile/Sinusoidal/Influent Pattern Tut7/Create profileand input a Time step of 1 hour and End time of 240 hours.

Save As: Tut7.inf and make it the current influent file. At this stage select File/Save Works. Tocalibrate Works, keep Works open and proceed to next Section on Running Simulations. OtherwiseSelect File/Close Works.

Page 66: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 60 –

TUTORIAL 7B - IAWQ FILTER MODEL

Select File/Open works and left-click on Tutorial 7B Works to open Works.

Select File/New Run. Select Default (cold start), input the values given for Tutorial 7A and chooseOkay to initialise Run 1.

To set influent file for this Works, Right-click over influent icon, choose Select profile and left-clickon Tut7.inf. Close Works.

Both works should now be set up with influent files.

9.3 TUTORIAL 7A: RUNNING SIMULATIONS/LOOKING AT RESULTS

Select File/Open Works and choose Tutorial 7A works to obtain Works simulation using OriginalFilter Model.

The first step in calibrating the model is to insert the correct details for the filter medium. Right-clickon the Filter Icon. Select Input data/Model calibration (process unit). This tutorial uses the defaultvalues given below.

The next step is to check the details given for humus solids settlement. Right-click on the humus tankicon. Select Input data/model calibration (sewage). This tutorial uses the default settings for settlementof humus solids. Namely at an upflow velocity of 0.72 m/h, the proportion of humus solids which settleout of the effluent is 95%.

Page 67: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 61 –

With the initial values set for the filter and humus tank, initiate Run 1. On completion Save run. Thenright-click over effluent icon, select Results and choose OK to present effluent output given below.

The output chart indicates that current default settings cause model to predict high values for effluentSS, BOD and ammonia. Calibration entails increasing the autotrophs (from 2 to 10 mg/l) to reduceeffluent ammonia and increasing the absorption coefficient (from 0.0001 to 0.0003) to reduce effluentSS.

Page 68: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 62 –

Undertake Run 2 as a Repeat run of Run 1 with the autotroph concentrations set at 10 mg/l to calibrateeffluent ammonia and the absorption coefficient set at 0.0003 for SS calibration (note that theheterotroph concentration is not adjusted until SS are calibrated. The output from Run 2 given belowindicates that the effluent BOD, SS and ammonia have all improved. Remember to save run.

Page 69: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 63 –

With effluent SS calibrated, further runs are required to adjust the initial concentration of heterotrophsand hence calibrate effluent BOD. This usually involves further adjustments to the concentration ofautotrophs. The output given below for run 3 uses a heterotroph concentration of 200 mg/l and anautotroph concentration of 20 mg/l.

9.4 TUTORIAL 7B: RUNNING SIMULATIONS/LOOKING AT RESULTS

Select File/Open Works and choose Tutorial 7B works to obtain Works simulation using IAWQ FilterModel. Select Edit and move to second screen of Run Definition. Choose integration method MEDBF- full Jacobian with the values of relative tolerance (0.005), absolute tolerance (0.5), and minimum steplength (2.7E-20) as shown below:

Page 70: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 64 –

Initiate Run 1 (2 days duration at hourly time steps), using the default values. The Output Chart belowfrom Run 1 presents flow and quality data for humus tank effluent. Again it indicates high effluent SS.

For calibration (Run 2), select filter/input data/model calibration (process unit) and increase the valueof the attachment coefficient from 0.0001 to 0.0003 m/h.

Page 71: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 65 –

For calibration (Run 2), select filter/input data/model calibration (sewage) and increase the value of thehydrolysis rate from 0.07 to 0.3 1/h.

Predicted final effluent qualities for Run 2 (shown below) indicate that increasing the attachmentcoefficient has significantly improved effluent SS and hence effluent biodegradable BCOD (labelledBOD). Effluent ammonia is unchanged.

Page 72: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 66 –

Since this model includes biofilm growth kinetics, the concentrations of heterotrophs and autotrophs‘grow’ in response to the influent conditions. There is no need for manual adjustment of biomassconcentrations. The default values are set for typical nitrifying conditions.

The effect of biofilm growth on performance is best demonstrated by reducing the autotrophconcentration at start up. Create Run 3 (7 days at 1 hour time steps) as a repeat of Run 2. Select Inputdata/Initial conditions/biofilm stage 1 and reduce the autotrophs from 0.1 to 0.01 mg/l. Repeatconcentration reduction for Biofilm stage 2.

The output from Run 3 shown below indicates that after a period of 1 week the initial high effluentammonias (10 to 30 mg N/l) have reduced to significantly lower values (0 to 20 mg N/l). The cause isgrowth of autotrophs within the biofilm model.

Page 73: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 67 –

Right-click over filter and select Results/Time series data. The output presented below for the first andlast hours shows that for the upper/lower halves of the filter (stages 1 and 2), the autotrophconcentration has increased from 0.20/0.24 to 0.72/1.51 mg/l and the film thickness has grown from66/50 microns to 82/62 microns. These results demonstrate the commonly-held view that nitrificationoccurs in the bottom of the filter and film growth is highest in the top of the filter.

9.5 SUGGESTIONS FOR FURTHER WORK

1. Compare the simulation run times of the Original model and the IAWQ model to note the extrarun time required for simulation of biofilm growth kinetics.

Page 74: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 68 –

10. TUTORIAL 8 - SEQUENCING BATCH REACTOR

This tutorial is intended to demonstrate the use of the sequencing batch reactor model (SBR).

10.1 BUILDING SBR WORKS

Choose ‘File/Create new works’. Call the works a suitable title e.g. Tutorial 8. Lift and drop thefollowing processes onto the drawing board.

1x influent1 x 2-way flow mixer1 x balancing tank1 x SBR tank1 x no entry1 x effluent1 x sludge

Connect up the processes to generate the flow sheet shown below:

The next step is to choose the models and enter the names and sizes of each item of plant as follows:

Balancing tank:

Name: Balancing Tank 1Model : Version 2

Sequencing batch reactor:

Name: SBR tank 1Model: WRcNumber of stages: 8Maximum volume (m3): 2000Minimum volume (m3): 1400Area (m2): 450Wastage stage: 8

At this stage select “Save works” to save the works setup.

Page 75: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 69 –

10.2 GENERATING THE INFLUENT FILE

It is necessary to generate a new influent file for use with this tutorial. Select File/New Run. SelectDefault (cold start) and choose okay. Input the values given below for a 14 day run and time steps of0.25 hours. Other parameters should be left at the default values.

Choose okay to initialise Run 1.

Right click on the influent icon and choose Generate profile/Sinusoidal/Default/Edit Pattern. Input thefollowing value.

Flow: 100 m3/hTemperature (of wastewater): 15oCSoluble BOD: 150 mg/lParticulate BOD: 100 mg/lVolatile solids: 1100 mg/lNon-volatile solids: 60 mg/lSoluble ammonia: 30 mg/l

All other parameters may be left at default values. The phase, amplitude (%) and Frequency should beleft at 0, 50% and 0.26 respectively with the exception of the temperature where the amplitude shouldbe 0. The SBR model is based on the activated sludge model ASAL3. This model reads thetemperature from the input file rather than using the temperature given on the initial run menu above. Ifthe user wishes to run the model with a different ambient wastewater temperature then a new influentprofile must be generated with the new temperature.

Close and save as ‘Influent Pattern Tut10’.

Double click on Influent icon and choose Generate profile/Sinusoidal/Influent Pattern Tut10/Createprofile and input a Time set of 1 hours and End time of 336 hours (14 days). Save as Tut10.inf andmake it the current influent file. At this stage save the works by selecting File/Save works.

Page 76: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 70 –

10.3 RUNNING SIMULATIONS AND LOOKING AT THE RESULTS

A works has now been assembled and an input file has been created and selected. The next step is toinsert the necessary operational values and calibration parameters.

The type of balancing tank and its operation must be specified. Right click on the balance tank andselect Input data/Model calibration(process unit). Choose infinite volume and set the minimum volumeto 1m3 and select okay. Next, select Input data/Initial conditions and change the tank volume to 1m3,select okay. Finally, select Input data/Operation and change the pump rate to 600 m3/hr, select okay.

The SBR must now to set up. Right click on the SBR tank and select Input data/Modelcalibration(process unit). The process times listed should be set up as follows:

The SBR cycle will be as follows:

1. Fill/aerate for 1 hour;

2. React (i.e. aerate only) for 2.5 hours;

3. Settle for 1.5 hours;

4. Decant for 1 hour (N.B. The wastage of activated sludge will also occur at this part of thecycle).

Select the more button and choose “At all times” for the growth equations as indicated below:

Page 77: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 71 –

Right-click on the SBR tank and select Input data/Operation. Change decant flow 1 and wastage flow 1to the values indicated overleaf.

Page 78: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 72 –

Right-click on the SBR tank and select Input data/Initial conditions. Change the MLSS to 4400 mg/l inall eight stages. All other parameters should be left at their default values as indicated below:

Select File/Save Run. Initial Run 1 - Cold Start. Start the run using the play button.

Once Run 1 is completed, select File/Save Run. Now carry out a second run as a warm start from theend of Run 1. Select File/New Run and choose end of old run (warm start), then choose Run 1 - ColdStart, select okay. Choose start and finish dates to give a 410 run. Select File/Save Run and start toinitiate the new run. On completion of the run, select File/Save run.

Right-click over the effluent icon, select Results and Flow only then choose okay. The resultingwindow should look like the one given below.

Page 79: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 73 –

The graph shows the nature of the flow from the SBR unit. The total cycle time for the SBR is 6 hours.Treated effluent will be pumped from the SBR during the decant cycle. Pumping of effluent is at aconstant rate, in this case 600 m3/h, and will continue for one hour or until the minimum volume hasbeen reached. It should be noted that the statistics shown below the graph are for the entire run and notjust for the decant part of the cycle. The flow from the SBR is either 0 or 600 m3/hr.

To obtain data regarding sanitary parameters, right-click over the effluent icon, select Results andchoose BOD and SS only, then choose okay. The resulting window should look the one given below.

Again, the statistics are given for the whole of the run and not just for the period when effluent isleaving the SBR. To obtain the mean BOD and SS results for the run, it is necessary to carry out asimple mass balance calculation. This is done using the flow data and the total mass figures given inthe results window above. For this example, the mean flow leaving the works is 4656 m3/hr and so themean BOD and SS in the effluent are 2.2 mg/l and 6.2 mg/l respectively.

For longer STOAT runs on SBR systems using less regular input profiles, the calculation of meanBOD and SS results using mass balances is more complex and time consuming. An alternativeapproach is to connect the effluent line from the SBR unit to a balance tank which has been set up withan infinite volume and a zero discharge flowrate. At the end of the each run, the balance tank will

Page 80: WRc STOAT: Tutorials Guide

WRc plc Tutorials Guide

– 74 –

contain all the effluent discharged during the run and the results output will provide the mean sanitaryparameters. The profiles from the SBR unit can still be monitored by looking at the results output forthe line leading to the balance tank. The same technique can be used to examine the surplus activatedsludge results.

It is possible to string more than one SBR unit together and have them operating in a sequence. Forexample, to operate two units together would need a system laid out as follows:

In this example, the effluent from the two SBR units is being pumped to a balance tank to makeinterpretation of the effluent results easier.

It is important that when a works containing more two SBRs being used that the phase time are setcorrectly. The phase time is set on the Process calibration window. If it is set at zero the cycle for thatSBR unit will begin at the start of the run but if it is set at, for example, 3 then the start of the SBRcycle will be delayed by 3 hours. Care must be exercised when setting up several SBR units. The phasetimes must be set to avoid different SBR units trying to fill at the same time.

Running SBR models over long periods at output step of 0.25 hour will generate a large quantities ofoutput data. This can use up considerable amounts of disc space. Users should examine the importanceof the results from each line and process and consider turning off the generation of results for thosewhich are less important. This will cut down on the disc storage space required for each run. This isachieved by right-clicking on the line or process in question and then selecting Reporting options. Theuser should then click on Save results and final choose okay. During the run no results files will thenbe generated for this line or process.