stoat tutorials eng

99
STOAT Tutorials WRc Ref: UC8616.04 July 2013

Upload: hicheree

Post on 19-Aug-2015

852 views

Category:

Documents


267 download

DESCRIPTION

Design of water and used water treatment plants

TRANSCRIPT

STOAT Tutorials WRc Ref: UC8616.04 Jul y 2013 STOAT Tutorials Report No.:UC8616.04 Date:March 2013 Authors:J . Dudley, L. Poinel Project Manager:L. Poinel Project No.:15504-0 Client: Client Manager: JDudley WRc Ref: UC8616.04 Jul y 2013 Contents 1.INTRODUCTION ......................................................................................................... 1 2.GETTING STARTED................................................................................................... 2 2.1CREATING A NEW SEWAGE WORKS ..................................................................... 2 2.2RE-USING AN EXISTING SEWAGE WORKS ........................................................... 4 2.3CREATING A NEW RUN ............................................................................................ 5 2.4SELECTING REPORTING OPTIONS ........................................................................ 7 2.5COMPLETING A RUN ................................................................................................ 9 3.TUTORIAL 1: A SIMPLE WORKS ............................................................................ 10 3.1BUILDING A SIMPLE ACTIVATED SLUDGE WORKS ............................................ 10 3.2RUNNING THE SIMULATION .................................................................................. 12 3.3LOOKING AT YOUR RESULTS ............................................................................... 23 3.4SUGGESTIONS FOR FURTHER SIMULATIONS ................................................... 24 4.TUTORIAL 2: NUTRIENT REMOVAL....................................................................... 26 4.1BUILDING THE WORKS .......................................................................................... 26 4.2ADDING MIXED LIQUOR RECYCLES..................................................................... 27 4.3RUNNING THE SIMULATION .................................................................................. 30 4.4SUGGESTIONS FOR FURTHER SIMULATIONS ................................................... 38 5.TUTORIAL3:STORMTANKS,PRIMARYTANKS,ACTIVATED SLUDGE AND TRICKLING FILTER ......................................................................... 40 5.1BUILDING THE WORKS .......................................................................................... 40 5.2CONSTRUCTING A STORM .................................................................................... 42 5.3RUNNING THE SIMULATION .................................................................................. 43 5.4SUGGESTIONS FOR FURTHER WORK ................................................................. 46 6.TUTORIAL 4: A MORE COMPLEX WORKS ............................................................ 47 6.1BUILDING THE WORKS .......................................................................................... 47 6.2PROGRAMMING A CHANGE .................................................................................. 48 6.3RUNNING THE SIMULATION .................................................................................. 52 6.4SUGGESTIONS FOR FURTHER SIMULATIONS ................................................... 52 7.TUTORIAL5:USINGTHEPIDCONTROLLERTOMAINTAINA CONSTANTWETTING RATE ON A TRICKLING FILTER...................................... 54 7.1BUILDING THE WORKS .......................................................................................... 54 WRc Ref: UC8616.04 Jul y 2013 7.2RUNNING THE SIMULATION .................................................................................. 55 8.TUTORIAL6:USINGSENSITIVITYANALYSISFUNCTIONWITHIN STOAT ...................................................................................................................... 63 8.1BUILDING THE WORKS AND RUNNING THE FIRST SIMULATION ..................... 63 8.2CARRYING OUT THE SENSITIVITY ANALYSIS ..................................................... 65 9.TUTORIAL7PRIMARYSEDIMENTATIONANDNITRIFYING TRICKLING FILTER .................................................................................................. 69 9.1BUILDING TRICKLING FILTER WORKS ................................................................. 69 9.2GENERATING INFLUENT FILE ............................................................................... 71 9.3TUTORIAL 7A: RUNNING SIMULATIONS/LOOKING AT RESULTS ...................... 72 9.4TUTORIAL 7B: RUNNING SIMULATIONS/LOOKING AT RESULTS ...................... 76 9.5SUGGESTIONS FOR FURTHER WORK ................................................................. 82 10.TUTORIAL 8 - SEQUENCING BATCH REACTOR .................................................. 83 10.1BUILDING SBR WORKS .......................................................................................... 83 10.2GENERATING THE INFLUENT FILE ....................................................................... 84 10.3RUNNING SIMULATIONS AND LOOKING AT THE RESULTS .............................. 85 WRc Ref: UC8616.04 Jul y 2013 List of Tables No table of figures entries found. List of Figures No table of figures entries found. WRc Ref: UC8616.04 Jul y 2013 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 WiltshireSN5 8YF United Kingdom Tel: +44 (0)1793 865185 Fax: +44 (0)1793 865001 E-Mail: [email protected] WRc Ref: UC8616.04 Jul y 2013 WRc plcTutorials Guide 1.INTRODUCTION This guide is intended to take you through using STOAT, by building and running a series of example sewage works. If you have a specific requirement for STOAT, and would like to see this covered by the 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.Section5removesthenutrientremovaloptionandextendstheworkstousea tertiary biological filter for nitrification.Section6 extends the simple sewage works of Section 4 to multiple parallel trains and describes the effect of losing 2 aeration lanes for maintenance purposes. Section7usesaPIDcontrollertocontinuouslyadjusttheflowratetoafilterto achieve a constant wetting rate on the filter. Section8 describes the use of the Sensitivity Analysis algorithm within STOAT to assess the effect of varying the settling velocity in a primary tank. Section9coverstheuseoftheBODsemi-dynamicmodelfortricklingfiltersand compares these results with the new biofilm growth model (COD) within STOAT. Section 10 gives a tutorial showing how to set up and run an SBR model. 1 WRc plcTutorials Guide 2.GETTING STARTED StartSTOATbydouble-clickingtheSTOATiconfromtheWindowsProgram Manager.WhenSTOAThasloadedyouarepresentedwithablankscreenwithfivemenu options, 'File', Edit, Options, Tools and Help. Select 'File.' If you are starting a tutorialforthefirsttimeselect'NewWorks';ifyouarecontinuingatutorialfrom 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 select the right tutorial. 2.1CREATING A NEW SEWAGE WORKS 'New Works' presents you with a blank drawing board, on whichyou can build up thedescriptionofyoursewageworks.FromtheProcessToolboxyoucanselect which process you want to add to the drawing board. Having selected the process, right click on it you will see the small icon of a process, move the icon onto the drawingboardandpositionitwhereyouwant.Pressanymousebuttonitwill 'drop' the selected process onto the drawing board. You can repeat this for all the processes that you want. 2 WRc plcTutorials Guide Everyprocesshassomestublinesmarkinginfluentandeffluentconnections, generally with influents on 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 will change to a cross-hair symbol. Depending on the resolution of your screen, and the choice of mouse pointer colour, the cross-hair may appear as a cross-hair or as a fat cross; the fat cross may be coloured black or white. Pressing the left mouse button down, move the mouse to the INPUT stub on the process that you want to connect. When you are over the connection the pointer will change from a cross-hair to a 'chain-link'. Release the mouse button. The connection ('stream') between the two processes has now been established. To ensure that a connection hasbeenmadetoeachrequiredstub,RIGHTclickontheprocessandchoose Input data/Connectivity from the menu which appears. 3 WRc plcTutorials Guide Each stream must have a stream number assigned as in the screen shot above. Ifanystreamnameisblankatthispointyoumustreconnectthestreamtothe process. This is shown in the above screen shot. Ifyouhavemadeamistakeyoucanselectandthendeletethestreambyright-clicking on the stream; you can also delete processes in the same way. You do not havetocompleteputtingalltheprocessesinplacebeforeconnectingprocesses; you can add processes and streams at any time. Having createdyour sewage works you will need to save the configuration before you can proceed any further. Select 'Save Works' from the 'File' menu.2.2RE-USING AN EXISTING SEWAGE WORKS Selecting 'File' and then 'Open Works' will present you with a list of existing works. (If nothing appears 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 is the works that you wish to model you can now select from the 'File' 4 WRc plcTutorials Guide menu either to start a new run, or to complete an existing run. If you select 'Open run' you are presented with a list of all the runs that you have saved for that works. If a run has been completed you are not able to run it again, but you can view 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 anewworks. There will now be no runs associated with the works all the runs having been associated with a works of different geometry. If you limit your changes to dimensions, keeping geometry the same, this is still treated as a new works. You will be asked to save the works before you can create any new runs, and you will have lost the initial conditions associated with the previous works. To keeptheinitialconditionsofapreviousrunwhenyouhaveonlychangedthe dimensions of a works and had to save it as a New Works complete the following series of commands: Open Works - Select the works you wish to change New Run - Make the changes to the dimensions (not the geometry) Save Works As -Assign new name to the modified works Save Run As -Assign run name You will now have the new works with the modified dimensions but with the initial conditions from the previous Works. 2.3CREATING A NEW RUN From the 'File' menu select 'New run'. If you have not correctly built the Works and are missing some streams you will be presented with the following error message depending on which process the fault is at.You should check the connectivityfor the process and re-connect the streams as described in Section 2.1. Assuming the works has been correctly built, you will then be prompted for a name for the run, and what you want to use for initial conditions. 5 WRc plcTutorials Guide There are four types of initial conditions that can be used in any run: 1.Specified by you (the cold start).2.Takenasthesameinitialconditionsasusedinapreviousrun(allowingyoutocarryout sensitivity or comparability studies).3.Usetheendconditionsfromapreviousrun(allowingyoutocontinuethesimulationwith calculated, rather than estimated, initial conditions). 4.Continue old run (retain operational data). Following this you will be asked for details about the duration of the run. 6 WRc plcTutorials Guide When specifying the simulation time the start time is fixed if you have chosen to use theinitialconditionsfromapreviousrun.Youcanchangethesimulationlength, specifying your required end time 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 no restrictions on the maximum output frequency but thedefault is 1 hour. Youcanalsosetothersimulationparameters,suchastheaveragesewage temperature(usedbytheactivatedsludgeandbiologicalfiltermodels);theBOD equivalent of 1 g of biomass solids and volatile (but non-biomass) solids; and then numericalcontrols,suchasthechoiceofintegrationmethodandaccuracy.We recommendthatyouleavetheseasthedefaultvalues,changingonlythe temperature. You can now set up the sewage works conditions for the run. You can do this for eachprocessbyright-clickingwiththemouseontheprocess,whereyouwillbe offered a menu of the conditions that you can change. Changing any of the process data under 'Name and dimensions' defines a new sewage works. You can change anyoftheotherdataatthestartoftherun,andyoucanchangeanyofthe 'Operational'dataduringthecourseoftherun,orprogramSTOATtohavethe changes made automatically for you. 2.4SELECTING 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: 7 WRc plcTutorials Guide Youcandecideifyouwantdataforthestreamstored(SaveResults)forfuture use,andifyouwanttolookattheresultsastheyarecalculated('In-simulation reporting'). If you want in-simulation reporting you can then select what components youwouldliketohavedisplayedfromthetwooptions'Simpledeterminands'and 'Advanced determinands'.Simple determinands are the common sewage components, while advanced gives you access to all the stream components in STOAT. You can select determinands from both the simpleandadvanced options,and theywillallbedisplayed on the same graph. We recommendyou do not choose to look at everydeterminand for everystream,astheresultismoreinformationthanyoucanuseduringthe simulation.Selectasubsetthatrepresentswhereyouexpecttobeinterested. Becauseyoucansavethedataforallthestreams youcancarryoutafullpost-mortem at the end of the run. Youcanalsoselecthowyouwanttheresultsdisplayedfrom'ReportView.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 most useful is the simple graphical display. You can change the report type during the simulation by selecting the report youwanttochange,thenfromthe'Window'menuselecting'Displayresultsas', which presents you with the same set of reporting types. Changing the display type during the simulation may corrupt the display. (Whether you get a corrupted display willdependprimarilyonthenumberofprofilesthatyouhavechosentodisplay.) You can easily fix this by minimising then restoring 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 the base of the STOAT window to restore the window, and clear any corruption of the display. 8 WRc plcTutorials Guide 2.5COMPLETING A RUN When you have entered allyour data save the run. Then run the simulation. This ensures that should you 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 tomake changes to the operational parameters, and then continue the simulation with 'Run. Selecting 'Stop' will stop the simulation you will not be able to continue afterwards with 'Run. When the run is finished, and assuming you are happy with the outcome, then again savetherun.Thispreservestheresultsforyoutoexaminelater.Ifyouarenot happywiththeoutcome,orifSTOATencounterederrorsduringthesimulation, closetherunfromthe'File'menuandthenopentherun.Becauseyou remembered to save the run before beginning the numeri calcal culations you canretrieveyourstartingpoint.Havingdonethisyoumakewhateverchanges you feel are required, save the result, and then again begin to run the simulation. You can repeat this cycle until you are satisfied with the results, when you can then save the run. Once a completed run has been saved you can no longer make any changes to it. You can create a new run that will take either its initial conditions from either the initial or final conditions of previously completed runs. 9 WRc plcTutorials Guide 3.TUTORIAL 1: A SIMPLE WORKS This tutorial covers the modelling of a simple works comprising a sewage influent, primary tank and an activated sludge tank. 3.1BUILDING 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. Thedrawingboardandprocesstoolboxwillnowappearonthescreen.Forthis tutorial,selecttheinfluent,primarytank,activatedsludgeaerationbasinand activatedsludgesettlingtanks,oneeffluent,twosludgeandoneno-entryicon. Select each and drag the icon from the toolbox to the drawing board.Close the process toolbox, to remove the clutter on the screen. When you have all the processes on the drawing board connect them together to create the flowsheet shown below. 10 WRc plcTutorials Guide 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 1 Process Model: BOD Number of stages: 3 Volume: 1,200 m2 Surface area: 400 m2 Aeration basin: Name: Activated Sludge Tank 1 Process Model: ASAL1 Volume: 800 m3 Number of stages: 1 Number of MLSS Recycles: 0 Wastage Method:None(Note:Thissettingisonlyusedifyouwishtowaste sludge from the aeration tank - set to None if you are wasting from the settlement tank.) 11 WRc plcTutorials Guide Settling tank: Name: Secondary Tank 1 Process Model: SSED1 Number of vertical layers: 8 [this is the default] Surface area: 400 m2 Depth of Tank: 3 m Depth of Feed: 2 m RAS flow: Rate Wastage Method:Constant rate [you will find this by selecting the 'More' button at the bottom of the form]. Control Aeration Tank : Activated Sludge Tank 1 Control aeration stage: 1 Having entered these you have now defined the works geometry and physical sizes. Save the result, using 'File/Save works. 3.2RUNNING THE SIMULATION Nowthattheworkshasbeendefinedandsavedwecanbegintocarryout 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. 12 WRc plcTutorials Guide Now you are asked for details about the run. Take the default values, which set that the simulation will last for two days at 15C. Simulatingonlytwodayswiththeactivatedsludgemodelmeansthattheresults from the model will be heavily dependent on the initial conditions that we use. We will specify a suitable set of values, but we suggest that when you are using STOAT your first simulation should be set for 20-40 days and should be treated as primarily a sighting run to evaluate a reasonable set of values for the initial conditions. (The required simulation time is set by the largest retention time in the sewage works. For activated sludge systems this is normally the sludge age, and you should simulate three sludge ages to be confident thatyou are looking at a dynamic steady state, 13 WRc plcTutorials Guide ratherthantheeffectoftheinitialconditions.Therewillbeotheroccasionswhen you have a good starting point and are interested not in the dynamic steady state but the effect of short-term changes from your defined initial conditions.) Havingspecifiedthebasesimulationparametersyoucannowsettheprocess 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.arepeatingdiurnalprofile)butdoesnotautomaticallyassociatethisinfluent data set with the selected influent process icon. You therefore normally have a two-step process first define the influent data set,then associateitwith theinfluent process icon. You can subsequently edit the influent data set to modify the sewage profile to include storms or other periods of high or low flow or variations in sewage strength from the 'normal. Right-click on the influent and select Generate profile/Advanced. Select 'Sinusoidal' and click on Edit formul ae. 14 WRc plcTutorials Guide Accept the default values this is an average flow of 100 m3/h, so that the settling tanks have average upflow velocities of 0.25 m/h and the aeration basin a sewage retention time of 8 h. If you do wish to change the values you can do so by saving the resulting pattern as a new name. Now click Close and select 'reate data file' and accept the defaults. Note that since the data file ends after 48 hours then attempting to use this file later for a simulation to model more than 48 hours will produce an error after the 48th hour has been modelled. Enter as the file name 'tut1.inf. 15 WRc plcTutorials Guide 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. 16 WRc plcTutorials Guide 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 the associated file. We will leave most of the other processes at their default values. You can see the defaultvaluesbyright-clickingoneachprocessandlookingthroughthemenus under each processes' 'Input data. For this tutorial we will only change the default values for the settling tank and the initial conditions for all the processes.Right-clickontheactivatedsludgesettlingtankandselect'Inputdata/Operation' Change the return RAS flow from 0 m3/h to 150 m3/h, the sludge wastage flow from 0 m3/h to 5 m3/h, and the wastage pumping 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 startwithall the tanks filledwithwater. Right-click on the primary tank, select 'Input data/Initial conditions. Change the initial conditions to the following values: Soluble BOD: 150 mg/l Ammonia: 40 mg/l Settleable particulate BOD: 70 mg/l Nonsettleable particulate BOD: 30 mg/l Settleable volatile solids: 140 mg/l Nonsettleable volatile solids: 40 mg/l Settleable nonvolatile solids: 40 mg/l Nonsettleable nonvolatile solids: 20 mg/l Temperature: 15C 17 WRc plcTutorials Guide Enter these for the first stage only. Then go to the top of the first stage input column and select the first cell; 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. Keepingthemousepointerwithinthehighlightedregionright-clickonthemouse buttonandselect'Copy'fromthemenuthatwillappear.Nowusethemouseto 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 in stage 3 and again right-click and select 'Paste. Now select 'OK', so that you have defined the initial conditions for the primary tank. Repeatthisprocessfortheactivatedsludgeaerationbasin.Useastheinitial condition the following values: Soluble BOD: 5 mg/l Ammonia: 40 mg/l Dissolved oxygen: 2 mg/l MLSS: 3000 mg/l Viable autotrophs: 100 mg/l Nonviable autotrophs: 0 mg/lViable heterotrophs: 1000 mg/l Nonviable heterotrophs: 0 mg/l 18 WRc plcTutorials Guide Theactivatedsludgesettlingtankcannotbetreatedusingthiscopyandpaste approach. The primary settling tank is concerned with the longitudinal (rectangular tanks) and radial (circular tanks) variation in 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. This difference in emphasis requires that solids profiles in the final settling tank differ from stage to stage, increasing with increasing depth. Therefore, first enter the concentrations of thesolublecomponentsforstage1andcopytheseintostages2-8,usingthe columncopymethoddescribedabove.Useastheinitialconditionthefollowing values: Soluble BOD: 5 mg/l Ammonia: 40 mg/l Dissolved oxygen: 2 mg/l Forthesolidssettlingwecanidealisethesolidsprofileasclarificationabovethe feed point, a 'solids waterfall' from the feed point to the base of the tank, and then a sludge blanket at the base of the tank. ClarificationzoneFeedpipeSludge blanketSludge 'waterfall'Schematic representation of sludge settling Becausewespecified8stagesandthefeedtothesettlingtankat mid-depthwe have the following relationship: Clarifier stages: 1 - 3 Waterfall 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: 19 WRc plcTutorials Guide ComponentClarifi erWaterfall Sludge MLSS:03006000 Viable heterotrophs:01002000 Viable autotrophs010200 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-entertheinitialconditions,andanyotherdatathatyouhavespecified,ifforany reason the simulation fails (e.g. power failures, you forgot to specify part of the initial dataimaginewhatwouldhappenifwehadleftthereturnsludgerateatzero flowrate or had not defined the influent sewage.) Select 'Run' from the run buttons on the top menu. The simulation will now begin. Theonlysignsyouhaveofprogressarethattheprogressindicatorbarslowly movesalong,andthe'Currentsimulationtime'indicatorshowsthesimulation progressing. Whenthesimulationisoveryoucanviewtheresultsbyselectinga process or stream and selecting 'Results' from the menu that will appear. Butyoucanalsoseetheprogressofthesimulationasithappens.Firstselect 'File/Close run', then 'File/New run', 'Start of old run (repeat run)' and select 'Run 1' from the list. You are now back at the start of the simulation that we have 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 three menus, 'Simple' 'Advanced' and 'ADM1' by first selecting which menu you want to lookatandthenselecting'Determinands.Youcanmixdeterminandsfromthe 'Simple','Advanced'and'ADM1'options.Youshouldalsoselect'Reporttype'to selectthereportingmethodyouwantnormallyonlythegraphandthescale factor to be applied to the sewage flowrate. Finally select 'Close. You may see a graph open on the screen before you, or a small icon appear at the bottom of the STOAT window. If a small icon does appear then select the icon and select either 'Restore'or'Maximise'tobringthegraphup.Ifyounowselect'Run'asthe simulation proceeds you will see the calculated results for the final effluent stream being displayed on the graph. The default scale is 0 - 100; you can change this by selecting 'Pause', then from the top menu 'Window/Graph/Scale. 20 WRc plcTutorials Guide 21 WRc plcTutorials Guide The final results from this simulation are shown below. You can see that ammonia started at 40 mg/l and was gradually removed, so that the works is nitrifying. Total BOD started at 5 mg/l and dropped slightly while effluent solids rose to about 5 mg/l. 22 WRc plcTutorials Guide 3.3LOOKING AT YOUR RESULTS Now that the simulation is finished you can look at the results at any point. As an example, select the streams connecting the influent to the primary tank (the crude sewage), the primary tank to the aeration basin (the settled sewage) and the final effluent.Youwillhavetochangethedefaultscalesfromthecrudeandsettled sewage,from0-100to0-350forthecrudesewageand0-300forthesettled sewage. You can change the scales by placing the mouse over the graph and right-clicking, when you will be offered a menu with 'Title', 'Scale', Pattern' and 'Font. If you now select 'Window/Tile/Vertical' you should see the following screen: 23 WRc plcTutorials Guide The order of the graphs may differ on your computer here the first graph is settled sewage, the second crude sewage and the final graph final effluent. You can see theremovalofBOD,solidsandammoniaasthesewageprogressesthroughthe primary tank and the activated sludge unit. You can also choose to look at the data as a timeseries or summary statistics select the graph, then from 'Window/View' selectyourpreferredoutput.GraphsmaybecopiedontotheWindowsclipboard and inserted into word processor documents, while tables can be copied into tables in word processors or into spreadsheets. 3.4SUGGESTIONS FOR FURTHER SIMULATIONS This simulation, like those that follow, concentrates on modelling only a few days of data. In practise you should normally choose to look at longer periods, covering at leastthreesludgeagestoattainarepresentativedynamicequilibriumstate.Our rule of thumb has been to carry out a simulation for 40 days and then look at the last two days of diurnal results. If they are the same, we are at dynamic equilibrium. If not, then we repeat the simulation for a further 40 days. With STOAT you can also choose to monitor the effluent and take dynamic equilibrium as being reached when 24 WRc plcTutorials Guide the effluent appears to have the same shape from day to day. You can then stop the simulation. We also suggest that: 1.you start with a dynamic equilibrium before modelling storms. 2.youdonotattempttogetaclosematchbetweendataandpredictionswhenwhatyouare comparing is a predicted dynamic equilibrium and a set of measurements that are not a dynamic equilibrium. Asidefromlookingathowthesolutionprogressesoverperiodslongerthantwo days, you could also look at: a)the effect of different initial conditions these should not affect the dynamic equilibrium, but will 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 the final 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 the aeration basin with wasting from the return sludge line, e)examining the effect of plug flow on treatment performance vary the number of stages in the aeration basin using values of 1, 2, 4, 8 and 12. 25 WRc plcTutorials Guide 4.TUTORIAL 2: NUTRIENT REMOVAL ThesewageworksdevelopedinTutorial1isadaptedtonutrientremovalby choosing a different activated sludge model. Different P-removal schemes are then modelled. 4.1BUILDING THE WORKS Westartbylookingatnitrogenremovalonly.Thesewageworksgeometryisthe sameasinTutorial 1,butwithouttheprimarytank.Youcancreatethissewage worksintwoways,eitherbystartinganew,orbyre-usingtheworkslayoutin Tutorial 1. 4.1.1Modifying the Tutorial 1 Sewage Works Select 'File/Open works. From the menu select the works 'Tutorial 1' (or whatever you chose to save the tutorial works as). The works will now appear on the screen. Right-click with the mouse on the primary tank and select 'Delete. The primary tank and all its connections should be removed. You must re-connect the influent to the activated sludge tank. Save the sewage works as 'Tutorial 2' using 'File/Save works As. 4.1.2Starting with a Blank Drawing Board Select 'File/New works. Name the sewage works as 'Tutorial 2. The blank drawing boardwillappear,alongwiththeprocessestoolbox.Fromthetoolboxselectand placeonthedrawingboardtheinfluent,activatedsludgeaerationbasinand activated sludge settling tank. Connect the influent and settling tank return sludge to the aeration basin, and the aeration basin effluent to the settling tank influent. Finally connect streams to the twowastagepoints on the aeration basin and the settling tank.OnlyoneofthesewillbeusedbutSTOATrequiresthatbothmustbe connected. Nowdefinethephysicalsizesoftheprocesses.Fortheaerationtankenterthe following: 26 WRc plcTutorials Guide Volume: 800 m3 Number of stages: 2 Number of MLSS recycles: 1 Wastage method: None For the settling tank enter the following: Surface area: 400 m2 Depth of tank: 3 m Depth of feed: 2 m Number of vertical layers: 8 [this is the default] Wastage method: Constant rate RAS flow: Rate Save the works, using 'File/Save works'. 4.2ADDING MIXED LIQUOR RECYCLES Themostcommonnutrientremovalconfigurationsusemixedliquorrecyclesto promote the conversion of ammonia through nitrate to nitrogen gas. You can select between nutrient removalschemes that are concernedwith nitrogen removal only (selectactivatedsludgemodels1A)ornitrogenandphosphorusremoval(select model5A).ThecommonconfigurationsfortheAO(Anoxic-Oxicnitrogen removal),A2O(Anaerobic-Anoxic-Oxicnitrogenandphosphateremoval), Bardenpho(nitrogenandphosphateremoval),UCT(UniversityofCapeTown nitrogen and phosphate removal) and MUCT (Modified UCT) are shown below, with the choice of model, number of stages and mixed liquor recycles, and the STOAT definitionsfortheconnectionoftherecycles.STOATassumesthatfixed-flow pumps are used, and the recycle flowrate used is therefore constant. 27 WRc plcTutorials Guide SewageReturn activated sludgeSettlingtankAnoxictankAerobic (Oxic)tankThe AO ProcessNumber of stages =2No mixed liquor recyclesUse Model #1ASewageReturn activated sludgeSettlingtankAnoxictankAerobic (Oxic)tankMixed liquor recycleThe A O Process2AnaerobictankNumber of stages =3One mixed liquor recycle, from stage 3 to stage 2Use Model #5A 28 WRc plcTutorials Guide AnaerobicAnoxicAerobicAnoxicAerobicSewageReturn activated sludgeMixed liquor recycleThe Bardenpho ProcessNumber of stages =5One mixed liquor recycle, from stage 3 to stage 1Use Model #5AAnaerobicAnoxicAerobicSewageReturn activated sludgeMixed liquor recycleThe UCT ProcessNumber of stages =3Two mixed liquor recyclesMLSS recycle 1 from stage 3 to stage 2MLSS recycle 2 from stage 2 to stage 1RAS distribution: 0.0 to stage 1, 1.0 to stage 2, 0.0 to stageUse Model #5A 29 WRc plcTutorials Guide Anaerobic Anoxic AerobicSewageReturn activated sludgeMixed liquor recycleThe modified UCT ProcessAnoxicNumber of stages =4Two mixed liquor recyclesMLSS recycle 1 from stage 4 to stage 3MLSS recycle 2 from stage 2 to stage 1Use Model #5ANotice that you must define the model type and the number of mixed liquor recycles under'Nameanddimensions'andthatthisthereforedefinesthesewageworks. Changing these parameters will require that you save the works under a new name. The actual values for the mixed liquor flowrates, and the stages that they connect, are specified under 'MLSS recycles' and is a run parameter you cannot set these until you first define a run. ForthissimulationwewillrestrictthemodeltoamodifiedAO-typeprocess.The activatedsludgemodelshouldbemodelASAL1Aandthesettlingtankmodel should also be model SSED1. There are two stages in series with one mixed liquor recycle, taking sludge from the second stage to the first. The first stage is anoxic anddenitrifies,convertingnitratetonitrogen.Thesecondstageisaerobic, converting ammonia to nitrate. This nitrate is then taken back to the first stage for removal. 4.3RUNNING THE SIMULATION Save the works, then create a new run. Define the mixed liquor recycle as stage 2 stage 1, with a flowrate of 400 m3/h (assuming that you have left the average sewage flowrate as 100 m3/h). 30 WRc plcTutorials Guide Under Stage Data set the minimum and maximum KLa values for stage 1 to zero, andthedissolvedoxygensetpointalsotozerothisensuresthatthisstageis anoxic. Leave the volume fractions as a 50:50 split. Setthe'Operation'conditionsforthesettlingtanktoareturnsludgeflowof150 m3/h,awastagerateof5m3/handtheoperatingtimesforwastagepumpsand wastage intervals to 24 hours. 31 WRc plcTutorials Guide For the influent select the same flowstream as you used in tutorial 1, 'tut1.inf. Right-click on the influent icon, to bring up the following menu. Choose Select profile and from the resulting menu choose tut1.inf. 32 WRc plcTutorials Guide Because you have defined a new works your first run must be a 'cold start' and you should enter the same initial conditions as used in Tutorial 1.Fortheactivatedsludgeaerationbasinyoumustspecifythatthedissolved oxygenconcentrationinthefirststageiszero thisisbecausethisstageis anoxic.AllanoxicstagesmustbedefinedwiththeKLavalues,dissolved oxygen values and dissol ved oxygen setpoints as zero. 33 WRc plcTutorials Guide Now define the initial conditions for the settling tank. The activated sludge settling tankisconcernedwiththeverticaldistributionofsolidsandignoresthe radial/longitudinal variations. This requires that the solids profile in the final settling tankdiffersfromstagetostage,increasingwithincreasingdepth.Therefore,first enter the concentrations of the soluble components for stage 1 and copy these into stages2-8,usingthecolumncopymethoddescribedinTutorial1.Useasthe initial condition the following values: Soluble BOD: 5 mg/l Ammonia: 40 mg/l Dissolved oxygen: 2 mg/l Forthesolidssettlingwecanidealisethesolidsprofileasclarificationabovethe feed point, a 'solids waterfall' from the feed point to the base of the tank, and then a sludge blanket at the base of the tank. 34 WRc plcTutorials Guide ClarificationzoneFeedpipeSludge blanketSludge 'waterfall'Schematic representation of sludge settling Becausewespecified8stagesandthefeedtothesettlingtankat mid-depthwe have the following relationship: Clarifier stages: 1 - 3 Waterfall 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: ComponentClarifi erWaterfall Sludge MLSS:03006000 Viable heterotrophs:01002000 Viable autotrophs010200 Finally, select the final effluent stream to monitor during the simulation. The results should look like the following figure: 35 WRc plcTutorials Guide There is a high BOD peak at the start of the simulation, caused by the high influent BOD. The biomass responds to this by growing, so that the BOD is taken up and the concentration eventually comes down. The effect of the mixed liquor recycle can be seeninthatthenitrateislessthanthecomparableplotforTutorial1.Ifthe simulationhadbeenlefttorunforlongerwhichwouldrequirespecifyingan influent profile that lasted longer than 48 hours then full nitrification would be seen, followed by denitrification. You can see this by selecting 'File/New Run. If the 'New Run' option is greyed out then you must first select the drawing board because you currently have one of the graphs active. You can tell the active graph by looking to see which one has its top title bar highlighted. Having selected 'File/New Run' you will be asked if you want to save the results of the previous run. Answer 'Yes. When the run menu appears on the screen select to continue from a previous simulation: 36 WRc plcTutorials Guide 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 be opened as the new run is set up. If Run 1 was not saved with these graphs open then you will need to open up a reporting graph to lookatthefinaleffluentquality.Attheendofthesimulationyoushouldseean effluent quality that looks like: 37 WRc plcTutorials Guide The effluent profile is now beginning to repeat itself, showing that we are reaching the dynamic equilibrium conditions. The effluent quality is worse than in Tutorial 1 becausetheaeratedvolumeofthetankisonly400m3,comparedto800m3in Tutorial 1. 4.4SUGGESTIONS FOR FURTHER SIMULATIONS Mixed liquor recycles impose a largepumping requirement on the sewageworks. Try comparing the performance of the modified AO plant with a four-stage aeration basin where the sewage is fed into stages 1 and 3 at a ratio of 70:30. Stages 1 and 3shouldbeanoxicandstages2and3aerobic.Experimentwiththerelative volumes of the four stages start with stages 1 and 3 at 10% of the total volume and stages 2 and 4 at 40%. Also try running the Bardenpho and Modified UCT configurations to see the STOAT predictionsforphosphorusremoval.Unlikenitrogen,wheretheammoniais ultimatelyconvertedtonitrogengasandlostfromthesystem,phosphateis accumulated in the biomass it is transferred from soluble phosphate in the sewage into a particulate form in the waste biomass. The waste sludge must therefore be 38 WRc plcTutorials Guide handled in such a way to prevent the release of phosphorus from the biomass back into the soluble form. 39 WRc plcTutorials Guide 5.TUTORIAL3:STORMTANKS, PRIMARYTANKS,ACTIVATED SLUDGE AND TRICKLING FILTER One of the strengths of STOAT over many other wastewater modelling programs is that it allows you to include a variety of processes in series or parallel. This example presentsasewageworkswithahigh-rateactivatedsludgeplantfollowedbya tertiary nitrifying filter. 5.1BUILDING THE WORKS Create a new works and call this 'Tutorial 3. Place on the drawing board an influent, stormtank,primarytank,aerationbasin,activatedsludgesettlingtank,trickling filter,humustank,twotwo-waymixers,onethree-waymixerandanoverflow divider. Connect the processes to give you the layout shown below. Namethesewageflowstream connectingtheoverflowdividertotheprimarytank 'After overflow. This will help identify this stream later. 40 WRc plcTutorials Guide For each process specify the following dimensions: Storm tank Volume: 300 m3 Surface area: 100 m2 Control stream: After overflow Thestormtankshavedeliberatelybeenundersizedsothatwegetaspillinthis simulation. Primary tank Number of stages: 2 [this is the default] Volume: 600 m3 Surface area: 200 m2 Aeration basin Process model: ASAL2A Number of stages: 1 Volume: 400 m3 Wastage method: None Settling tank Model:SSED2.Themodelusedintheaerationbasinandthesettlingtankmust match up to ensure that the determinands used by the two are the same. Number of vertical layers: 8 Surface area: 200 m2 Depth of tank: 3 m Depth of feed: 1.5 m RAS flow: Ratio Wastage method: Variable rate over fixed time Control aeration tank: Activated sludge 1 Control aeration stage: 1 Trickl ing filter Model: BOD semi-dynamic Number of stages: 5 [this is the default] Surface area: 1,000 m2 Depth: 1.834 m Humus tank 41 WRc plcTutorials Guide Surface area: 500 m2 Save the works. 5.2CONSTRUCTING A STORM Create a new run. We want to model the effect of a storm on the sewageworks. Storm sewage data is difficult to obtain so for this simulation we will continue to use the file 'tut1.inf. We simulate the storm by setting tank sizes and overflow settings so that flows above 100 m3/h imitate the effect of high storm flows. For each process change the following parameters: Influent (Select Profile) Select the profile as the file tut1.inf. Overflow (Operation) Overflow: 100 m3/h Storm tank (Operation) Return pump rate: 30 m3/h Control stream flow: 70 m3/h When the flow past the overflow point drops below 70 m3/h then the tank contents will be pumped back 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) Sludge wastage flow: 30 m3/h Wastage pump run time: 24 hours Wastage cycle time: 24 hours RAS ratio: 1 Trickl ing filter (Input data/Process cali ration) 42 WRc plcTutorials Guide Characteristic dimension of media: 0.025 m Packing superficial specific surface area: 223 m2/m3 Packing effective specific 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/l Viable autotrophs: 100 mg/l Nonviable autotrophs: 0 mg/l Viable heterotrophs: 1000 mg/l Nonviable heterotrophs: 0 mg/l Activated sludge settling tank MLSSViabl e autotrophsViabl e heterotrophs Stages 1-300 0 Stages 4-730010100 Stage 860002002000 Trickl ing filter Heterotrophs: 100 mg/l on each stage Autotrophs: 2 mg/l on each stage 5.3RUNNING THE SIMULATION Selecttheeffluentfromtheactivatedsludgesettlingtankandthehumustankto monitorduringthesimulation.Thenrunthesimulation.Thecompletedprofiles should look like the following figures: 43 WRc plcTutorials Guide You can see that the activated sludge plant is operating to remove BOD only and that it is overloaded during the storm. The filter removes ammonia, but during the storm it also removes additional BOD, protecting the receiving water.Youcanalsofollowtheprogressofthesewageduringtreatment.Thefollowing graphs show the influent and effluent from the storm and primary tanks. Stream 20 is the influent to the storm tank1, Stream 19 the pumped sewage returned from the stormtank,Stream4theprimarytankeffluentandStream17thestormtank overflow. The nature of the storm tank operation can easily be seen here. 1 The numbering of streams depends on the order in which you choose to connect them. Do not worry if your streams have different numbers, as long as they are connecting the processes described. 44 WRc plcTutorials Guide 45 WRc plcTutorials Guide 5.4SUGGESTIONS FOR FURTHER WORK 1.Experiment with the overflow setting and its impact on effluent quality. 2.Place the overflow after the primary tank. 3.Increasethenumberofstagesintheaerationtankthisshowsthedifferenceinbehaviour between completely-mixed and plug-flow aeration basins. 46 WRc plcTutorials Guide 6.TUTORIAL4:AMORECOMPLEX WORKS Thistutorialtakesyouthroughbuildingupasewageworkswithseveralparallel processes,includingsludgetreatment,andprogrammingchangesinoperational conditions. 6.1BUILDING THE WORKS Select 'File/Create new works. Place the following processes on the drawing board: 1 x influent 2 x primary tanks 2 x activated sludge aeration tanks 2 x activated sludge settling tanks 1 x mesophilic anaerobic digester use model MAD1 2 x two-way divider 5 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: Surface area: 100 m2 Volume: 300 m3 Number of stages: 2 47 WRc plcTutorials Guide Aeration basins: Process model: ASAL1AVolume: 400 m3 Number of stages: 1 Wastage method: None Activated sludge settling tanks: Number of vertical layers: 8 [this is the default value] Surface area: 200 m2 Depth of tank h: 3 m Depth of feed: 1.5 m RAS flow: Ratio Wastage method: Constant rate Aeration basin: Connect the aeration basin name to the corresponding settling tank. If you have connected aeration tank 1 to settling tank 1, 2 to 2, then in settling tank 1 specifythattheaerationbasinshouldbe'Aerationtank1',forsettlingtank2 'Aeration tank 2' and so on. Control aeration stage: 1 [there is only one stage specified for each tank] Sludge digester Sludge volume: 6000 m3 Save the works. 6.2PROGRAMMING A CHANGE Now create a new run. For this simulation we will investigate the effect if two of the aeration lanes are taken 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 viable autotrophs to 100 mg/l, and MLSS 3,000 mg/l. Activated sludge settling tanks: Operation: Set the RAS flow to 50 m3/h, the sludge wastage flow to 2.5 m3/h, the wastage pump run time to 24 hours, wastage cycle time to 24 hours. 48 WRc plcTutorials Guide Initial conditions: Set the following: Total solidsViabl e autotrophsViabl e heterotrophs Stages 1-3 000 Stages 4-730010100 Stage 860002002000 Before you can run the simulation you must set the influent sewage data. Select the influentandright-clickwiththemouse.Thenselect'Generateprofile/Advanced. Nowselect'Sinusoidal'and'Createdatafile.Specifythatthesimulationlength should be 96 hours, and that the file name should be 'tut4.inf. 49 WRc plcTutorials Guide At this stage run the simulation and save the results. All we want this first simulation to do is to give us a reasonable starting point. Having saved the run select 'File/New run' and select 'End of old run. At the next menu increase the simulation time from the default of two days to four days. 50 WRc plcTutorials Guide Now we are set up the changes in the flow split. We assume that the lower aeration lane on the flowsheet 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 the flow split for 'AS Splitter' from 100:0 back to 50:50. The simulation will then reflect the effects of the tanks being taken out of service and the subsequent re-establishment of performance when the tanks are returned to service. Save the run. 51 WRc plcTutorials Guide 6.3RUNNING THE SIMULATION Select the final effluent to view during the simulation, and then run the model. You should see a graph develop that will look like this: You can see that the effluent quality deteriorated greatly during the period that all the flow had to go through only half the activated sludge capacity. Nitrification was temporarilylostbutrecoveredquickly,whileeffluentBODrosetohighlevels. Lookingatthesuspendedsolidsrevealsthatthesettlingtankswerenot hydraulically overloaded, so that the constraint on performance was most likelyto beoxygenlimitation.Apossibleconclusionfromthissimulationisthatincreasing theoxygencapacityintheoperationallaneduringmaintenance,possiblybya VITOX boost unit, would improve plant performance. 6.4SUGGESTIONS FOR FURTHER SIMULATIONS You could look at the following: 52 WRc plcTutorials Guide 1.What would happen to the effluent quality if all aeration in one lane failed? Because you cannot program a change in the aeration conditions at the start of a simulation you will have to decide when you would like to pause the simulation and set the maximum and minimum KLa values to zero 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 split between the four settling tanks, with the RAS from the two tanks being combined before being split between the two aeration tanks. Then look at the effects of taking out a single aeration lane, or a single settling tank. 53 WRc plcTutorials Guide 7.TUTORIAL5:USINGTHEPID CONTROLLERTOMAINTAINA CONSTANT WETTINGRATEONA TRICKLING FILTER This tutorial takes you through building a trickling filter and using the PID controller withinSTOAT to continuously adjust theinfluent flowrate to the filter to achieve a constant wetting rate. 7.1BUILDING THE WORKS Select File/New Works. Place the following processes on the drawing board: 1 x Influent 1 x Overflow 1 x two-way mixer 1 x filter 1 x humus tank 1 x sludge 1 x effluent 1 x PID controller - Notethatthisisnotphysicallyconnectedtoanyoftheotherprocesses 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 done by right-clicking on the symbol and choosing Rotate. 54 WRc plcTutorials Guide Rename the stream entering the trickling filter to be CONTROLLED STREAM. This is done by right-clicking on the stream and choosing Input Data/Name. Notice that the effluent leaves through the overflow. The recycle is connected through the normal main flow. Now enter the names and dimensions for the processes as follows: Trickl ing Filter: Name: Default Model: BOD semi-dynamic Number of Stages: 5Number of layers: N/A Depth: 1.83 Surface Area: 4000 Humus Tank Name: default Surface Area: 200 Overflow Name: Default PID Controll er Name: Default Model: Continuous 1 Save the works. 7.2RUNNING THE SIMULATION Createanewrun.ForthissimulationwewilloperatetheworkswiththePID controller set up but switched off. Start by defining the following operating conditions: Name of Run: Run 1 Length of simulation: 48 hours Average Sewage Temperature: 15oC Trickl ing Filter 55 WRc plcTutorials Guide Nothing to change. Humus Tank Nothing to change. Overflow (Operation) Overflow: 0 PID Controll er(Connectivity) We are programming thePID controller to measure the flowrate in thecontrolled streamandvarytheoverflowrateofOverflow1tokeepaconstantflowof100 m3/hr going onto the filter. Input Stream or Process: Stream Name: Controlled Stream (This is the stream entering the trickling Filter) Stage: N/A Determinand: Flow Output Stream or Process: Process Name: Overflow 1 Stage: N/A Parameter: Overflow rate (Operation) Set Point: 100 (Initial Conditions) Nothing to change. (Input data/Process cal ibration) Mode: Disable - This turns the PID controller off for the first simulation Action: Positive Sampling Interval: Default Proportional Gain: 0.3 Integral Time: 0.25 Derivative Time: 0.1 56 WRc plcTutorials Guide Maximum Output: 300 - This allows flow to be returned at a maximum rate of 300 m3/hr Minimum Output: 0 Before you can run the simulation you must set the influent sewage data. Select the influentandright-clickwiththemouse.ThenselectGenerateprofile/Advanced. Nowselect'Sinusoidal'and'Createdatafile.Specifythatthesimulationlength should be 48 hours, and that the file name should be 'tut5.inf. Select 'Sinusoidal' and click on Edit Pattern 57 WRc plcTutorials Guide Accept the default values this is an average flow of 100 m3/h,. Now click Close and select 'Create profile' and accept the defaults. Atthisstagerunthesimulationandsavetheresults.WhenyouclickStartthe following warning message will appear: 58 WRc plcTutorials Guide Thisistellingyouthattheoverflowhasbeensetto0m3/hrandalltheflowis 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 continue with the simulation. Attheendofthesimulationyoushouldsavetheresultsandlookatthestream enteringthefilter(ControlledStream),theeffluentandtherecyclestreams.The following results graphs will appear. From the above results you can see that there is no recycle and the flow onto the filter is a sine curve with a large variation of flow and load. We will now attempt to use the PID controller to smooth the flow curve onto the filter. Choose File/New Run and select to use a warm start as follows: 59 WRc plcTutorials Guide This will allow you to keep all the previous settings use for Run 1.Right-click on the PI controller and select Input Data / Process Calibration. Select the mode to be PI control. This will activate the controller to act as a Proportional-Integral controller. Save the New Run and then Start the simulation.Whentherunhasbeencompleted,lookattheresultsprofilesforthecontrolled stream, the effluent and the recycle streams. The results screens below show the effect of the PI controller. 60 WRc plcTutorials Guide These results show that the flow onto the filter has been added to where necessary to attempt to keep it at approximately 100 m3/hr.Experimentwithdifferentvaluesfortheproportionalgainandtheintegraltimeto assess what effect they have on the stability and speed of response of the control action. Below is a set of results with the Proportional gain set to 0.8. 61 WRc plcTutorials Guide 62 WRc plcTutorials Guide 8.TUTORIAL6:USINGSENSITIVITY ANALYSIS FUNCTION WITHIN STOAT Thistutorialdemonstrateshowyouusethesensitivityanalysisfunctionwithin STOATtoassesstheeffectofvaryingtheconstantkinthesettlingequation V kCh=on the settled sewage suspended solids concentration from a primary tank. 8.1BUILDING 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 1 Model: BOD Number of stages: 2 Volume: 300 m3 Surface Area: 100 m2 Save the Works and Create a New Run. AcceptthedefaultvaluesfortheRunsothatwearecarryingouttherunfor48 hours at a sewage temperature of 15oC. Generate an influent file by using a sinusoidal pattern and accept the default values given by STOAT. Call this file Tut6.inf. To begin with we will run the simulation using the default settling co-efficient values of: k =7.2 63 WRc plcTutorials Guide ThesearelocatedunderSewagecalibrationdataasshowninthescreenshot below. When the run is completed, Save the run and view the results profile for suspended solids in the settled sewage. It should look like the following results screen. 64 WRc plcTutorials Guide Asyoucanseetheaveragesuspendedsolidsintheeffluentis173mg/lwitha sinusoidal variation about this mean. We will now look at the effect of varying the settling parameter k on the effluent suspended solids. 8.2CARRYING OUT THE SENSITIVITY ANALYSIS BeginaNewRunandSelectawarmstartfromRun1.CallthisNewRun Sensitivity Analysis and again select the default setting from the run menu so the run will last for 48 hours and be carried out at a sewage temperature of 15oC. From the Top Menu, Select Tools/Sensitivity. as shown. You will now see the sensitivity analysis screen shown below. 65 WRc plcTutorials Guide This allows you to select the required inputs and select what output you wish to see the effect on. You can select two parameters to vary and these are called 1 and 2. These parameters can either be from a stream or a process as required.Select Parameter 1 and Process. In the Element box Primary Tank 1 will appear since this is the only process in the works. Now select 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 effluent suspended solids. The default value is 7.2. For this exercise we will vary Kbetween3and11instepsof2.Thiswillallowustoassesstheeffectonthe effluent of values of K of 3, 5, 7, 9 and 11.EnterStart =3 Step =2 Stop =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-seri es - this will show the effect as the run progresses. Select the name of the stream to be the effluent stream. 66 WRc plcTutorials Guide Select the determinand to be total suspended Sol ids (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 sensitivity analysis is completed, when you will see the following message: Click on OK to view the results graph. For each variation of the parameter you will have a run with P=the number of the chosen parameter for that run i.e. P=3 is the run where the settling coefficient K was set to a value of 3.YoucanseethatincreasingKfrom3to11hastheeffectofreducingthepeak effluentsuspendedsolidsfromapproximately290mg/lataKvalueof3to 67 WRc plcTutorials Guide approximately220mg/lataKvalueof11.Thisdemonstrateshowsensitivethe effluent suspended solids is to variation in the settling parameter k. The next time you wish to open a run you will see a screen something like the one shown below: The extra runs are those carried out at the various values of K from 3 to 11. It is recommended that users who wish to regularly carry out sensitivity analysis on various parameters make notes on run details otherwise it can be difficult to differentiate one run from the other. 68 WRc plcTutorials Guide 9.TUTORIAL7PRIMARY SEDIMENTATIONANDNITRIFYING TRICKLING FILTER This tutorial covers the use of models to simulate conventional biological filters. It includes an example of using the BOD semi-dynamic model (BOD) which requires calibrationof heterotrophandautotroph concentrations and also the IAWQ model (COD)whichincludesbiofilmgrowthkinetics.ThenewWRcmodel(BOD)which also includes biofilm kinetics is not covered in this tutorial.9.1BUILDING TRICKLING FILTER WORKS TheBODsemi-dynamicandIAWQworksmodelsmaybothbeconveniently generated at this stage and saved for subsequent use.TUTORIAL 7A - BOD semi -dynamic FILTER MODEL ChooseFile/Newworks.Calltheworksasuitabletitlee.g.Tutorial7AorBOD semi-dynamic model. Lift and drop the following processes on to the drawing board: 1 x influent 1 x primary sedimentation tank 1 x trickling filter 1 x humus tank 1 x effluent 2 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 1 Model: BOD 69 WRc plcTutorials Guide Number of stages: 2 Volume: 500 m3 Surface area: 200 m2 Trickl ing filter: Name: Biofilter 1 Model: BOD semi-dynamic Number of stages: 5 (This model does not divide the biofilm into layers, so use the default value.) Depth: 2 m Surface (plan) area: 2000 m2

Humus Tank: Name: Humus Tank 1 Surface 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 IAWQ model. Then input new values where required to give the following: Primary sedimentation tank: Name: Primary Tank 1 Model: COD Number of stages: 2 Volume: 500 m3 Surface area: 200 m2 Trickl ing filter: Name: Biofilter 1 Model: IAWQ #1 Number of stages: 2Number of layers: 3 Depth: 2 m Surface (plan) area: 2000 m2

Note: Selection of two stages is sufficient to model the growth of heterotrophs in the upper part of the filter bed to remove BOD (carbonaceous oxidation) and growth of autotrophs in the lower part of the bed to oxidise ammonia (nitrification). 70 WRc plcTutorials Guide Humus Tank: Name: Humus Tank 1 Surface area: 200 m2 At this stage select Save Works and then select Close Works.9.2GENERATING INFLUENT FILE A new influent file is required that contains suitable flows and BOD/COD values for use with the BOD semi-dynamic and IAWQ filter models. Open each Works in turn to set up the following influent profile:9.3TUTORIAL 7A - BOD semi-dynamic FILTER MODEL Select File/Open works and left-click on Tutorial 7A Works to open works.SelectFile/NewRun.SelectDefault(coldstart)andchooseOK.Inputthevalues given below for a 2 day run and a time step of 1 hour. Choose OK to initialise Run 1. Right-click over influent icon, choose Generate profile/Advanced/Sinusoidal/Default/ Editformulae,andinputthefollowingvalues(eachwithaPhaseof0hours, Amplitude of 50%, and Frequency of 0.26): Flow of 100 m3/h , Temperature (of wastewater): 15C 71 WRc plcTutorials Guide Soluble BOD: 75 mg BOD/l Soluble inert COD: 30 mg COD/l Particulate BOD: 50 mg BOD/l Particulate inert COD: 0 Volatile solids: 90 mg SS/l Non-volatile solids: 30 mg SS/l Soluble ammonia: 30 mg N/lClose and save as Influent Pattern Tut7.Right-click on Influent Icon, choose Generate profile/ Advanced/Sinusoidal/Influent Pattern Tut7/Create data file and 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.TocalibrateWorks,keepWorksopenandproceedtonextSectionon Running Simulations. Otherwise Select File/Close Works.9.4TUTORIAL 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 choose Okay to initialise Run 1. To set influent file for this Works, Right-click over influent icon, choose Select profile and left-click on Tut7.inf. Close Works. Both works should now be set up with influent files.9.5TUTORIAL 7A: RUNNING SIMULATIONS/LOOKING AT RESULTS Select File/Open Works and choose Tutorial 7A works to obtain Works simulation using BOD semi-dynamic Model.Thefirststepincalibratingthemodelistoinsertthecorrectdetailsforthefilter medium.Right-clickontheFilterIcon.SelectInputdata/Processcalibration.This tutorial uses the default values given below. 72 WRc plcTutorials Guide The next step is to check the details given for humus solids settlement. Right-click onthehumustankicon.SelectInputdata/Sewagecalibrationdata.Thistutorial usesthedefaultsettingsforsettlementofhumussolids.Namelyatanupflow velocity of 0.72 m/h, the proportion of humus solids which settle out of the effluent is 95%. With the initial values set for the filter and humus tank, initiate Run 1. On completion Saverun.Thenright-clickovereffluenticon,selectResultsandchooseOKto present effluent output given below. 73 WRc plcTutorials Guide The output chart indicates that current default settings cause model to predict high valuesforeffluentSS,BODandammonia.Calibrationentailsincreasingthe autotrophs(from2to10mg/l)toreduceeffluentammoniaandincreasingthe absorption coefficient (from 0.0001 to 0.0003) to reduce effluent SS. 74 WRc plcTutorials Guide Undertake Run 2 as a Repeat run of Run 1 with the autotroph concentrations set at 10 mg/l to calibrate effluent ammonia and the absorption coefficient set at 0.0003 for SS calibration (note that the heterotroph concentration is not adjusted until SS are calibrated). The output from Run 2 given below indicates that the effluent BOD, SS and ammonia have all improved. Remember to save run. 75 WRc plcTutorials Guide WitheffluentSScalibrated,furtherrunsarerequiredtoadjusttheinitial concentrationofheterotrophsandhencecalibrateeffluentBOD.Thisusually involvesfurtheradjustmentstotheconcentrationofautotrophs.Theoutputgiven belowforrun3usesaheterotrophconcentrationof200 mg/landanautotroph concentration of 20 mg/l. 9.6TUTORIAL 7B: RUNNING SIMULATIONS/LOOKING AT RESULTS Select File/Open Works and choose Tutorial 7B works to obtain Works simulation using IAWQ Filter Model. Select Edit and move to second screen of Maths options. ChooseintegrationmethodMEDBF-fullJ acobianwiththevaluesofrelative tolerance (0.005), absolute tolerance (0.5), and minimum step length (2.7E-20) as shown below: 76 WRc plcTutorials Guide Initiate Run 1 (2 days duration at hourly time steps), using the default values. The OutputChartbelowfromRun1presentsflowandqualitydataforhumustank effluent. Again it indicates high effluent SS. 77 WRc plcTutorials Guide For calibration (Run 2), select Biofilter/Input data/Process calibration andincrease the value of the attachment coefficient from 0.0001 to 0.0003 m/h. Forcalibration(Run2),selectBiofilter/Inputdata/Sewagecalibrationdataand increase the value of the hydrolysis rate from 0.07 to 0.3 1/h. 78 WRc plcTutorials Guide Predicted final effluent qualities for Run 2 (shown below) indicate that increasing the attachmentcoefficienthassignificantlyimprovedeffluentSSandhenceeffluent biodegradable COD. Effluent ammonia is unchanged. Since this model includes biofilm growth kinetics, the concentrations of heterotrophs andautotrophsgrowin responseto theinfluent conditions. There is no need for 79 WRc plcTutorials Guide manual adjustment of biomass concentrations. The default values are set for typical nitrifying conditions. The effect of biofilm growth on performance is best demonstrated by reducing the autotroph concentration at start up. Create Run 3 (7 days at 1 hour time steps) as a repeatofRun2.SelectBiofilter/Inputdata/Initialconditions/Biofilmstage1and reducetheautotrophsfrom0.1to0.01mg/l.Repeatconcentrationreductionfor Biofilm stage 2. The output from Run 3 shown below indicates that after a period of 1 week the initial high effluent ammonias (10 to 30 mg N/l) have reduced to significantly lower values (0 to 20 mg N/l). The cause is growth of autotrophs within the biofilm model. 80 WRc plcTutorials Guide Right-clickoverfilterandselectResults/Timeseriesdata.Theoutputpresented below for the first and last hours shows that for the upper/lower halves of the filter (stages1and2),theautotrophconcentrationhasincreasedfrom0,12/0,21to 0,73/1,49mg/landthefilmthicknesshasgrownfrom69/53micronsto84/63 microns. These results demonstrate the commonly-held view that nitrification occurs in the bottom of the filter and film growth is highest in the top of the filter. 81 WRc plcTutorials Guide 9.7SUGGESTIONS FOR FURTHER WORK 1.Compare the simulation run times of the Original model and the IAWQ model to note the extra run time required for simulation of biofilm growth kinetics. 82 WRc plcTutorials Guide 10.TUTORIAL8-SEQUENCINGBATCH REACTOR Thistutorialisintendedtodemonstratetheuseofthesequencingbatchreactor model (SBR).10.1BUILDING SBR WORKS Choose File/New works. Call the works a suitable title e.g. Tutorial 8. Lift and drop the following processes onto the drawing board.1x influent1 x 2-way flow mixer 1 x balancing tank1 x SBR tank1 x blanked off. 1 x effluent1 x sludgeConnect 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 1 Model : Version 2 Sequencing batch reactor: Name: SBR tank 1 Model: WRcBOD 83 WRc plcTutorials Guide Number of layers: 8 Maximum volume (m3): 2000Minimum volume (m3): 1400 Area (m2): 450Wastage layer: 8At this stage select Save works to save the works setup.10.2GENERATING THE INFLUENT FILE Itisnecessarytogenerateanewinfluentfileforusewiththistutorial.Select File/New Run. Select Default (cold start) and choose okay. Input the values given below for a 14 days run and time steps of 0.25 hours. Other parameters should be left at the default values. Choose okay to initialise Run 1.RightclickontheinfluenticonandchooseGenerateprofile/ Advanced/Sinusoidal/Default/ Edit formulae. Input the following value.Flow: 100 m3/hTemperature (of wastewater): 15oC Soluble BOD: 150 mg/l Particulate BOD: 100 mg/lVolatile solids: 180 mg/lNon-volatile solids: 60 mg/l 84 WRc plcTutorials Guide Soluble ammonia: 30 mg/lAll other parameters maybe left at defaultvalues. The phase, amplitude (%) and Frequency should be left at 0, 50% and 0.26 respectively with the exception of the temperaturewheretheamplitudeshouldbe0.TheSBRmodelisbasedonthe activated sludge model ASAL3. This model reads the temperature from the input file rather than using the temperature given on the initial run menu above. If the user wishestorunthemodelwithadifferentambientwastewatertemperaturethena new influent profile must be generated with the new temperature.Close and save as Influent Pattern Tut10.RightclickonInfluenticonandchooseGenerateprofile/Advanced/Sinusoi dal/ InfluentPatternTut10/Createdatafile and input a Time set of 1 hours and End time of 336 hours (14 days). Save as Tut10.inf and make it the current influent file. At this stage save the works by selecting File/Save works.10.3RUNNING SIMULATIONS AND LOOKING AT THE RESULTS A works has now been assembled and an input file has been created and selected. Thenextstepistoinsertthenecessaryoperationalvaluesandcalibration parameters.The type of balancing tank and its operation must be specified. Right click on the balance tank and select Input data/ Process calibration. Choose infinite volume and settheminimumvolumeto1m3andselectokay.Next,selectInputdata/Initial conditionsandchangethetankvolumeto1m3,selectokay.Finally,selectInput data/Operation and change the pump rate to 600 m3/hr, select okay. TheSBRmustnowtosetup.RightclickontheSBRtankandselectInput data/Process calibration. The process times listed should be set up as follows: 85 WRc plcTutorials Guide 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.Decantfor1hour(N.B.Thewastageofactivatedsludgewillalsooccuratthispartofthe cycle).SelectthemorebuttonandchooseAtalltimesforthegrowthequationsas indicated below: 86 WRc plcTutorials Guide Right-click on the SBR tank and select Input data/Operation. Change decant flow 1 and wastage flow 1 to the values indicated overleaf. 87 WRc plcTutorials Guide Right-clickontheSBRtankandselectInputdata/Initialconditions.Changethe MLSS to 4400 mg/l in all eight stages. All other parameters should be left at their default values as indicated below: 88 WRc plcTutorials Guide 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 the end of Run 1. Select File/New Run and choose end of old run (warm start), then choose Run 1 - Cold Start, select okay. Choose start and finish dates to give a 408 run. Select File/Save Run and start to initiate 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 resulting window should look like the one given below. 89 WRc plcTutorials Guide 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.Pumpingofeffluentisataconstantrate,inthiscase600m3/h,andwill continue for one hour or until the minimum volume has been reached. It should be noted that the statistics shown below the graph are for the entire run and not just for the decant part of the cycle. The flow from the SBR is either 0 or 600 m3/hr.Toobtaindataregardingsanitaryparameters,right-clickovertheeffluenticon, selectResultsandchooseBODandSSonly,thenchooseokay.Theresulting window should look the one given below. 90 WRc plcTutorials Guide Again,the statisticsare given for thewholeof the runand not just for theperiod when effluent is leaving the SBR. To obtain the mean BOD and SS results for the run,itisnecessarytocarryoutasimplemassbalancecalculation.Thisisdone using the flow data and the total mass figures given in the results window above. ForlongerSTOATrunsonSBRsystemsusinglessregularinputprofiles,the calculation of mean BOD and SS results using mass balances is more complex and timeconsuming.Analternativeapproachistoconnecttheeffluentlinefromthe SBR unit to a balance tank which has been set up with an infinite volume and a zero discharge flowrate. At the end of the each run, the balance tank will contain all the effluentdischargedduringtherunandtheresultsoutputwillprovidethemean sanitary parameters. The profiles from the SBR unit can still be monitored by looking at the results output for the line leading to the balance tank. The same technique can be used to examine the surplus activated sludge results.It is possible to string more than one SBR unit together and have them operating in a sequence. For example, to operate two units together would need a system laid out as follows: 91 WRc plcTutorials Guide In this example, the effluent from the two SBR units is being pumped to a balance tank to make interpretation of the effluent results easier.ItisimportantthatwhenaworkscontainingmoretwoSBRsbeingusedthatthe phasetimesaresetcorrectly.ThephasetimeissetontheProcesscalibration window. If it is set at zero the cycle for that SBR unit will begin at the start of the run but if it is set at, for example, 3 then the start of the SBR cycle will be delayed by 3 hours. Care must be exercised when setting up several SBR units. The phase times must be set to avoid different SBR units trying to fill at the same time. RunningSBRmodelsoverlongperiodsatoutputstepof0.25hourwillgenerate large quantities of output data. This can use up considerable amounts of disc space. Users should examine the importance of the results from each line and process and consider turning off the generation of results for those which are less important. This will cut down on the disc storage space required for each run. This is achieved by right-clicking on the line or process in question and then selecting Reporting options. The user should then click on Save results and final choose okay. During the run no results files will then be generated for this line or process. 92