The ESIM Activated Sludge Simulator Program is a powerful, flexible, and I think you'll find, enjoyable way to learn how the activated sludge process works. ESIM lets you design and operate a plant, getting results in seconds instead of days. You can try different strategies on the exact same operating conditions. You can display the results in a variety of ways, and even create DOS files containing results which you can analyze separately.

The first two chapters of this manual explain the basic information you will need to begin. It is assumed that you already know what the activated sludge process is. You should already know what is meant by terms such as BOD, suspended solids, return rate, etc.

The program allows you to "design" a system, or if you wish, it will design one for you. You might want to design a system similar to one you are familiar with. A word of caution is needed here: the program will behave similar to an actual system, but cannot predict exactly what a real system will do.

Once the system is designed, you can run it for any period of time you wish, while watching how the system changes. You can select several different displays: a schematic, which helps you visualize the physical layout of the system; a bargraph display, which enables you to visually grasp the distribution of system variables; and a numerical format, so that you can have the exact information available. In between running the system, you can make changes just as a treatment plant operator would, or, you can vary the flow, incoming BOD, or SVI of the activated sludge. You can also generate a graph of up to four variables as they change with time. This is called the trending capability.

Another capability is called save-restore. With it you can save current conditions, run a period of time, then restore the system to where it was when you saved it. This way you can try different strategies on the same situation to see which works better. You can also save the current conditions and the design parameters on a disk file for later use.

ESIM also uses input files and output files. The input files let you program changes in plant flows and influent BOD ahead of time. You can also tell ESIM to generate output files containing the results of the simulations. You can then further examine the results using spreadsheet or other programs to perform calculations and graphical displays of the results.


ESIM is available in an educational version, which is free to copy and distribute, provided the text copy of this manual in the DOS file is supplied with it, and neither the manual nor the program are modified in any way.

The educational version differs from the commercial version in two ways: most of the design capabilities have been disabled , and the user cannot change the model parameters. The user is able to select the type of activated sludge plant, but other design decisions, such as aeration tank volume or clarifier surface area, are restricted to the default values supplied by ESIM. ESIM assumes that the design is based on a 10 MGD plant treating wastewater with a BOD of 150 mg/L.


The program was developed because of a need to train operators, inspectors, and others, how the activated sludge process works, and provide them with something as close as possible to "hands-on" experience. This is usually not possible in the teaching of groups of people. Even if a real process were made available, training is only practical if the trainee can work with it day after day for a long period of time. This is so because the response time of the activated sludge process to some changes is on the order of days or weeks.

Operators and designers need a way to estimate unsteady-state effects in the process. Design equations can predict steady-state conditions, but only simulation can show the effect of varying flows and feed concentrations.

Computer simulation helps fill these needs. Although it is limited in some ways, it also has its own advantages. You find out the result of your action quickly. You can go back and try again, which you can never do in a real system! It provides continuous output of variables which you would not even measure in the field, because of limitations on lab time. Furthermore, the program allows many different processes to be tried.


In order that you get the most out of the program, it is important that you have some understanding of how the simulation works, and in what ways it is different from a real system.

The program simulates the absorption of biochemical oxygen demand, and its conversion into new cells (microbial growth) with the uptake of oxygen. The BOD is absorbed at a rate which depends on the dissolved oxygen concentration (DO), the BOD concentration, and the bacterial concentration in terms of volatile suspended solids. This is a fairly realistic model of the actual situation. However, the BOD in sewage is composed of many different compounds, each of which may be absorbed at different rates, or even may have inhibitory effects. The program may be considered to represent an average of these effects, which are not directly detectable in a real system, anyway. The program holds the influent BOD constant, although you can change it as often as you wish.

What the program is best at is in simulating the distribution of solids, DO, and BOD in the aeration tank, and the underflow concentration and sludge blanket of the clarifier. It responds realistically to changes in return and waste flow rates, and the biomass responds well to changes in BOD loading and the waste rate.

The greatest weakness of the program is its inability to predict changes in the settleability of the activated sludge flocs. This can be considered in relation to two different processes occurring in the final settler: clarification and thickening. Thickening is necessary to concentrate the sludge for return to the aeration tank. A settling tank is limited in its ability to thicken activated sludge. If the solids loading rate becomes too high, or the solids begin to settle and compress poorly (bulking or high SVI), the settler becomes overloaded and solids build up in the settler forming a blanket. When the blanket reaches the surface of the clarifier, there is a "thickening failure". The program does not change the settling properties, but it is under your control through the SVI command, so that you may simulate this kind of situation. In real systems this behavior is not very predictable.

Clarification is the removal of solids from the effluent. It is possible for a sludge to thicken well, yet not clarify well. The clarification function of the settling tank is even more unpredictable than the thickening characteristics. In a real system, the final effluent suspended solids is greatly affected by many factors, such as short term changes in BOD loading, wind over the clarifier, clarifier inlet design, nutrient deficiencies, and many other factors that make every plant different. Except for the case of thickening failure,the program calculates the final effluent suspended solids as being proportional to the solids loading rate on the clarifier times the overflow rate. This proportionality factor can be changed using the EFF command.

The most important thing is not to be able to duplicate any particular real treatment plant, but to duplicate the kind of thinking you will need to solve problems in a real plant, since every plant has different problems, and new problems are always appearing.

Now you should be able to make use of the program to simulate more problem situations than you would be likely to encounter in months of actual operation. The next chapter explains how to start running the program, and how to use some of the basic commands.



It is a good idea to keep a spare copy of the disk. If your system has a hard disk, and that disk is your default disk, you may wish to copy the programs to that disk using the DOS COPY command as follows: If your diskette drive is labeled drive A:, and you wish to copy to hard disk drive C:, just type


You may also wish to copy the other files from the distribution disk, including a printable version of this manual, called ESMANUAL.TXT, and the DSA programs.

To run the program, just type ESIM.

ESIM will display an introductory message, followed by:




The simplest thing to do would be just to type <enter>. The program will automatically design a complete-mix plant for you, and you can proceed with simulating this system, as described in the section called "Running the system".

You can also type "STO" at this point to exit the program and return to DOS.

The effect of typing RES will be described in Chapter 5, "Save and Restore Feature".

If you work at an activated sludge plant, or are familiar with a particular one, you will probably want to design a similar system. In that case, type DES <enter>. You are now ready to design your activated sludge plant.

The program places the computer in a special graphics display mode. If you inadvertently abort the program without using the "STO" command, the display will remain in this mode. To restore to the normal mode, simply type the following DOS command:



If you begin your simulation session by typing DES, or type DES at the command prompt at any time during the session, you will enter the design dialogue. The terminal types questions and you answer with information on the specifications of the system you would like to simulate. If you want to, you may let the program choose any of the design specifications for you.

Note: As was mentioned above, users with the free, educational version of ESIM cannot change most of the design choices from the default values provided by ESIM.

You can select one of four process modes: conventional; step-feed; complete-mix; or contact stabilization. This is the only design option open to users of the educational version of ESIM.

1. Conventional -- This indicates that the aerator is a plug-flow type basin, that is, it is a long, narrow tank which limits the amount of mixing along its length. The tank is folded along its length into passes or bays, separated by baffles. The return sludge and influent are introduced at one end of the tank, and the mixed liquor removed at the other end.

2. Step-feed -- This is also a plug-flow design, but the influent can be fed into the aerator at the beginning of any pass, or distributed in any proportion between several passes. The percentage of the total flow going into each pass can be set using the FEE command.

3. Complete-mix -- The aerator is assumed to be well-mixed throughout, so the concentrations are uniform throughout the tank.

4. Contact stabilization -- Consists of two completely mixed tanks. Return sludge is introduced to the first tank for about six to eight hours of aeration. It then flows into a second tank, together with the influent, for about one hour of mixing, before going to the settler.

Before designing a plant, you will need the following information:

1. The type of plant as described above: conventional,step-feed, complete-mix, or contact stabilization. This is the only design decision which users of the educational version have access to.

2. The number of passes in the aerator, if conventional or step-feed, (between two and ten are allowed).

3. The average daily design flow in millions of gallons per day.

4. The average influent BOD in mg/l (remember to use influent to the secondary, not the raw influent to primary sedimentation.

5. The desired return ratio as a percentage of the average daily flow.

6. Whether sludge wasting is to be done from the mixed liquor or return sludge lines.

7. The total aeration tank volume in millions of gallons (or volumes of both the reaeration tank and contact tank for contact stabilization).

8. Total secondary settler surface area in square feet, (if there are several settlers, add the areas of each together).

9. Clarifier side wall depth in feet; this value must be from five to twenty feet, and must be given as an integer (no decimals). The feed to the clarifier is fixed at four feet below the surface.

10. One of the following:

1. Sludge age in days;

2. Food-to-microorganism ratio (per day); or

3. Biomass, in terms of pounds of volatile suspended solids in the aerator.

When the program asks for one of the above pieces of information, it always shows a "default" value. You may select this value simply by typing <enter> instead of a number. You can use the default value for any response in the design dialogue. It is computed so as to give a "reasonable" plant design. In some cases it depends on answers you gave previously. For example, settler area depends on the plant flow you chose. Those with the educational version wind up with the default values regardless of their response to the design dialogue.

One thing to consider in choosing a system to run is execution speed. A plug-flow system like conventional or step-feed takes significantly longer to simulate a given period of time, and the more passes in aeration tank, the longer it takes. Complete-mix and contact stabilization usually run relatively quickly.

Extended Aeration And Pure Oxygen Systems

Extended aeration plants are usually complete-mix plants with long aeration tank detention times and a long sludge age. Setting the aerator volume equal to the plant flow and recycle ratio to 100% will result in a 12 hour aeration time, which is typical for extended aeration. The initial sludge age should be set to twenty days or more.

Pure oxygen systems are often designed as conventional or complete-mix systems, and have smaller aeration tanks than air systems. The aeration tanks have a detention time of about 2.5 to 3 hours, with a 30 to 40% recycle ratio. As a result of having smaller reactors, the mixed liquor suspended solids (MLSS) in pure oxygen system is much higher than in air systems. As a result, the solids loading rate to the clarifier is also high. Thus it may be necessary to use a larger clarifier surface area than the default value given by ESIM. After the system is designed, the OXS command should be used to set the dissolved oxygen concentration at saturation to about 30 to 35 mg/l, depending on temperature, oxygen purity, and other factors.


When the last choice has been made, the program will display a schematic of the system at the initial conditions. The display includes suspended solids in the aerator and at different levels of the clarifier, DO in the aerator, flows, effluent BOD, etc. The display is discussed fully in the next chapter.

Now you are ready to run commands. Note the area on the screen in the lower left-hand corner. All of the commands and responses which you type will appear in this area alongside a prompt. The initial prompt displayed is a "#".

A command consists of three or four letters you type in, followed by <enter>. A "#" is a prompt for alphabetic input, such as a command or a variable name. A "*" is a prompt for numerical input. Each command allows you to do something, such as change the waste rate, or display information. The commands will be explained in the course of the manual. A complete list of commands is in the appendix.

Any time you wish to stop the program, type "STO" <enter>. This will return you to the DOS prompt.

A common mistake that is made is failing to hit <enter> after each command, and before entering numbers. Numbers are never entered on the same line as a command.

The MEN command brings a list, or menu, of all the commands to the terminal. Type "MEN<enter>" and see what happens.

Simulating Periods of Time

After designing the system, a display of the initial conditions comes to the screen. The initial conditions are only approximations. You should run at least a day or two before considering the data to be realistic. It is not necessary to simulate a full plant startup; although this can be done by selecting a small initial biomass in the design dialogue.

There are two commands which cause the program to simulate a period of time: SIM and DAY. Either one will cause the program to prompt for an ending time and report interval. First enter the ending time, in hours and minutes for the SIM command, or in days and hours for the DAY command, and separate the two numbers by commas or spaces. The terminal will then type "REPORT:", and you should type the time interval that you want the program to wait between updating the display. Again, if you used the SIM command, the report interval is in hours and minutes, or in days and hours for the DAY command.

For example, if you want to simulate until 6:00 with a display update every hour-and-a-half, the display will look like this:



REPORT: 1,30

If you enter 0,0 for the report interval, updates will be suppressed until the ending time.

To run until day 10 and have the screen updated twice per day, use the DAY command as follows:



REPORT: 0,12

Caution: during a simulation, the program is out of your control until the ending time you specified. Do not make a mistake like typing SIM followed by 6,0 and 0,1 when the current time is 6:00. This will cause the program to update the display 1440 times, which on slower computers can take quite a while. If you do something like this, you may want to abort the program and start over from scratch, rather than wait for it to finish. To do this, type <CNTRL>C (Hold the key labeled Cntrl down while striking "C"). This will return you to the DOS prompt, and you can run the program again. To reset the display mode from DOS, type <MODE CO80>.

NOTE: There are two common mistakes made with the SIM and DAY commands:

The first is to forget to enter two separate numbers in response to the "ENDING:" and "REPORT:" prompts. The two numbers must be separated by a comma, space, or <enter>. The program will do nothing until it receives both numbers.

The second common mistake with these commands is to type a time interval instead of an ending time. For example, if the current time is 8:00, and you wish to simulate two hours, then your response to the "ENDING:" prompt should look like


If, instead, you type "2,0", the program will simulate until 2:00 the next morning.

Similarly, with the DAY command, if it is currently day 12, and you want to go to day 15 and you enter an ending time of "3,0", the program will recognize that it has already passed day three of the simulation, and will ignore the command.

Making Changes to Process and Control Variables

You have the same control over the simulated system that an operator has over a real one, and then some. Like the operator, you can change the return flow rate, the waste flow rate, the amount of air, and, in step-feed, the feed proportions. In addition, you have control over the influent BOD, influent flow rate, and SVI of the sludge. Typing each command causes the current value of that parameter to be typed on the screen. The program then prompts for a new value with an asterisk, and waits until you either type in a new value. Alternatively, you may type any letter to cause the old value to remain. Caution: if you just type <enter> in response to the asterisk, the program will set the value to zero. Below is a list of some of the parameters that you have control over.

WAS: Controls the waste rate in millions of gallons per day;

RET: Controls the return rate in millions of gallons per day;

FEE: This command lets you change the percentage of feed flow to go into each step-feed pass, by giving you the old value, and prompting for the new. ESIM will automatically adjust the values you enter so that they add up to 100 %;

FLO: Change average influent flow rate; flow continues to vary diurnally based on average;

FLS: Allows you to set the flow to a constant value, independent of time of day, useful for investigating steady-state situations;

FLD: Lets you set 24 hourly flows to be repeated daily. This command will prompt you for each hourly flow, one at a time, until you have entered all twenty-four; The FLO command can still be used to change the average flow, preserving the pattern entered using FLD;

SVI: Allows you to change the sludge volume index (SVI of less than 100 makes the simulation run slower);

KLA: This is a constant which may be assumed to be proportional to the volume of air blown into the aerators, so doubling the KLA is equivalent to doubling the volume of air. The actual number of cubic feet of air per minute are not entered, just the relative volume of air flow.

For example, if you wish to change the return flow rate, type "RET<enter>". The program will show you the current value, and you should type in the new value after the asterisk. Or, you could type a letter instead, to keep the old value. Your display will look like this after typing a new value of 7.5:

= 15.00000 *7.5

You will notice that the return rate is changed on the schematic display, too.

Other commands, such as those for changing model parameters, are given in appendix A. Remember to type <enter> after the command and before typing numbers. Numbers are never typed on the same line as the command.

File Input

The INF command allows you to tell the program to use data on daily flows and BOD which you specify. The input file must be generated as a text file outside of ESIM, such as by use of a text editor, and must have a file extension ".INF". To enable the input file, type INF at the command prompt. ESIM will then ask for the name of the input file. Type the DOS filename without the file extension.

Once enabled, ESIM will read one line from the input file at the beginning of each day. The data on the line will be used to set the following parameters for the rest of the day:

Average daily flow (MGD)
Return flow rate (MGD)
Waste flow rate (MGD)
Influent BOD (mg/L)

The input file is generated with these four numbers on each line, separated by spaces or commas. Note that the first number changes only the average influent flow. This will be adjusted by the diurnal variation unless the user first executes the FLS command to set the plant flow rate to a constant value.

To disable file input before the end of the input file is reached, use the INF command and hit return without typing a filename.

Other commands shown in the MEN menu control program operation or allow you to change the intrinsic model parameters which describe the process. The next few chapters describe the displays in more detail, and also the other useful features, file output, save and restore, and trending capability.


There are three modes of display available for the graphics program, called the schematic (SCH), the bargraph (BAR) and the numerical display (NUM). Each show different amounts of information, and shows the information in a different way.

Each display provides a synopsis of the system, that is, they give a glance of all the current information each time they report. You determine how often the reports are made when you enter the report interval in the SIM or DAY commands, and you always get the latest synopsis at the end of each simulation period.

You may simulate the passage of time while in any of the display modes (as well as in trend mode, described in another chapter). If you accidentally upset a graphics display, such as by typing in too many line-feeds, you can renew it by typing one of the display commands (SCH, BAR or NUM). Between simulations, you can switch back and forth among the display modes as much as you like.


Schematic Display Mode

The schematic display is the one that appears on the screen immediately after the design dialogue. It can also be called to the screen or renewed by typing the SCH command.

A diagram or schematic of the system you designed appears on the right-hand side of the screen. The box in the upper part represents the aeration tank, with baffles separating the passes in plug-flow designs. Inside the aerator, and within each pass for plug-flow, are labels showing the volatile suspended solids (SS) and dissolved oxygen (DO) concentrations in mg/L. The line coming down from the top, with an arrow pointing down, is the influent feed line. In step-feed, this line branches down both sides of the aerator, and the percentage of the feed going to each pass is displayed next to the feed line. The current plant flow and influent BOD is displayed above the aerator.

Below the aerator is a representation of the settling tank. The mixed-liquor line connects the aerator to the top of the settler. The concentration of the solids leaving the aerator is labeled MLSS. If sludge is wasted from the mixed liquor, there will be an arrow pointing to the right labeled WASTE indicating this. The arrow pointing to the left coming out of the top of the settler is the effluent line, labeled with the effluent BOD and SS in mg/l.

Inside the clarifier there is a bar-graph showing the solids distribution in the clarifier. The bars are horizontal, starting on the left. The length of the bar is the concentration of suspended solids. The vertical position of the bars correspond to the depth in the clarifier. The marks along the bottom represent multiples of one thousand milligrams per liter. For example, at initialization (immediately after the design dialogue), the longest bar is the one at the bottom. The length of this bar represents the concentration at the very bottom of the clarifier. If it extended to half way between the fifth and sixth mark, its concentration would be about 5500 mg/l. If you wanted to know the concentration at the five-foot depth of the clarifier (the clarifier is considered to be ten feet deep), you would look at the horizontal length of the bar about half way up the bar-graph. Its length should be short unless there is a sludge blanket at that depth. The inlet to the clarifier is four feet from the top, and the effluent, of course, is at the top.

The return sludge line goes from the bottom of the settler, up the center of the screen, and into the aeration tank. The return sludge concentration is labeled below and to the left of the settler. If sludge is wasted from the return line, an arrow pointing to the right, labeled WASTE, will indicate this.

In the upper left corner of the schematic display, certain design information is printed: activated sludge mode, total aerator volume in millions of gallons, the surface area of the clarifier in square feet, and the design flow in MGD.

Below the design data is the current day and the time in 24 hour format.

Next is a list of selected control and system parameters. This list is also on the numerical display. It shows the return and waste flow rates, the SVI, the clarifier solids loading rate in pounds per day per square foot, the total mass of solids in the system (biomass) in pounds and the dynamic sludge age (DSA). The total mass is calculated including the solids in the settler. The DSA is a calculation of the average sludge age which is more realistic for plants in which conditions are changing (unsteady-state) than is the traditional sludge age calculation. The DSA parameter is described in more detail in Chapter 6.

At the lower left-hand corner is the area where prompting for input occurs, and anything you type appears. This is true regardless of what display is on the screen.

Bar Graph Display

The bar graph display graphically shows the change in concentration of BOD, dissolved oxygen (DO), and suspended solids (S.S.) along the aerator. It is called to the screen by typing the command BAR. This display is most useful for plug-flow processes: conventional and step-feed.

Three graphs are displayed in the upper portion of the screen representing the BOD, DO and SS as they vary along the length of the aeration tank. The vertical axis represents position along the length of the aeration tank. The tic-marks show the position of the beginning of each pass. Each bar extents horizontally from the vertical axis, and its length represents the concentration at that position. The tic-marks at the bottom of each graph mark off units concentration. The numbers associated with these tic-marks are labeled below each graph. For example, if a bar on the BOD graph extends to about one and one-half tic-marks, and the label below the graph says "UNIT = 10 mg/l", that bar would represent a concentration of about 15 mg/l.

In the step-feed process, the feed flow percentages to each pass are at the extreme left of the graphs, alongside the tic-marks for their respective passes.

Below the suspended solids graph is the clarifier solids distribution. Just as in the schematic display, depth is on the vertical axis, and concentration on the horizontal. The scale unit is the same as the suspended solids graph. The tic-mark on the vertical scale indicates the inlet feed depth.

With any of the bar graphs, if a value starts to go off-scale, the program automatically changes the scale and re-draws the graph. Therefore, you must check the scale with each new display, since it might have changed since the last one.

The time and day are displayed at the left center of the screen. Below the time the plant flow, effluent BOD and suspended solids, and clarifier loading rate (SLR) are displayed.

The bar graph display can be the most revealing representation of information in the case of plug-flow systems. You can get a good feel for the dynamics of solids flow by seeing the effects of changes in return rate or feed flow percentages on the solids distribution.

Numerical Display

The numerical display gives the same information as the bar-graph display, but with more precision, although not as convenient to grasp. You might want to know the exact values of the variables for doing calculations. The numerical display is called by typing the command NUM.

On the right side of the screen, the BOD, DO, and S.S. are tabulated in mg/L, from the head of the aeration tank to the end. There are two values per pass in the conventional and step-feed processes. Contact stabilization has only two values, for the reaeration tank and contact tank, respectively. The complete-mix mode shows only one value. The solids concentrations of the ten layers in the clarifier are listed to the right of the aerator S.S. The top value for the clarifier is the effluent suspended solids, and the bottom layer is the return concentration. The feed flow percentages are to the left of the BOD.

The time and day are at the upper left, and the list of parameters is at the lower left, as in the schematic display.

The bar-display does not have the resolution to show small differences in concentration. Therefore you may need the numerical display to see, for example, the small amount of growth that occurs between the beginning of a pass and the end.


Printing The Screen

To get a hard-copy printout of any graphics program display, just type the command PRN. You must have an Epson- or IBM-compatible dot-matrix printer for this command to work properly. You will notice that the display on the screen will change to black-and-white until printing is done.

For this command to work properly with DOS version 2.0, you should have executed the DOS GRAPHICS command prior to running the program. A good idea is to place this command in the AUTOEXEC.BAT file for your system (see your DOS manual about the GRAPHICS command and the AUTOEXEC.BAT file). You can still use the PRN command without executing the DOS GRAPHICS command, but only the text on the screen will print. Actually, this might be desirable if all you want is a quick print of the numbers, since the text-only prints much faster than the graphical display.

The PRN command works slowly with graphics, and you cannot do anything else until it is done. If you are in a hurry, and decide you don't want the printout after all, you can switch the printer off-line, and the command will finish faster, but without actually printing.

Output Files

The OUT command initializes the program feature which writes results into a text file. This is useful if you want a permanent record of the results of a particular simulation, or if you wish to perform some analysis of the results. To generate the output file, type the "OUT" command, then enter an eight-letter DOS filename (do not type an extension). Output generated by ESIM will appear in a file with that name and with file extension ".out". The program first writes a heading into the file which describes the variables ESIM writes to the file. Each line of the output file will have the following variables, in order:






ESIM writes to the output file whenever the display is updated in SCH, BAR or NUM display modes. Thus, if you want to generate file output hourly for a two day period, just use the day command with report interval of one hour.

The output file can be closed using the OUT command by simply typing <enter> in response, instead of a file name. You can then access the name.out file after leaving ESIM, for other processing you might wish to do.


"Trending" is a capability built into the program that allows up to four variables which you choose to be saved for a period of time. You can periodically display the accumulated data. The other displays can only show "current" conditions.

For example, you may wish to see how biomass, dynamic sludge age, MLSS and average aeration tank DO change. The trending feature allows you to generate plots of these variables versus time.


You have to tell the program when to start trending and what variables to trend. You do this with the INI command. After typing INI, the terminal will print a list of variables that you can choose from. You must select four from the list. Type each one followed by a carriage return. When you simulate, the program will begin to store the values in memory, up to a maximum of six hundred and eight values. At first it will save a value every minute. When the memory gets full, the program deletes every other value, then continues to accumulate data, only every two minutes instead of every one. Every time memory gets full, the program wipes out half the data and continues collecting at half the previous rate.

The variables you can trend are:

BOD Influent biochemical oxygen demand

FLO Influent flow

RET Return sludge flow

WAS Waste sludge flow

MLSS Mixed-liquor suspended solids

RAS Return sludge suspended solids

ESS Effluent suspended solids

EBOD Effluent biochemical oxygen demand

KLA Aeration mass transfer rate coefficient

SLR Clarifier solids loading rate

MASS Total mass of solids in the system

SVI Sludge volume index

AVDO Average dissolved oxygen in the aerator.

Note that BOD, RET, WAS, KLA, and SVI are not changed by the program during simulation. They are included to help you keep track of changes you make.


To generate the trending display, type TRE. The computer responds by printing a list of the four variables that you selected when you initialized. You should type in one of the four variables, or type ALL. If you typed one variable, the program will display a vertical bar-graph of that variable. The horizontal axis is time. If you typed ALL, then four smaller bar-graphs will appear on the screen.

The vertical scale, which indicates the value of the variable, is marked off, and the difference between tick-marks is contained in the label beneath the graph. For instance, MLSS usually starts out at 100 mg/l, so if the graph is ten marks high at some point, it represents about 1000 mg/l. One thing to watch for: if a variable goes off scale at the top of the graph, the program changes the scale and redraws the graph to make it fit, and if the marks get too close together, the scaling factor becomes larger. In the example of MLSS, it can change to 1000 mg/l per tick-mark.

The tick-marks along the x-axis of the trend graph indicate units of time. The units they represent is printed in the lower right corner where it says "TIME UNIT = ". The time when trending was begun and the current time are also noted in this area.

If you need exact numerical results of trending, the TBL command can be used to print a table of trended results for one variable. The program will prompt you for the name of the variable to be displayed. This displays up to one-hundred and fifty values distributed over the time of trending. You can then use the PRN command to obtain a hardcopy printout of the screen.

There is a command that allows you to mark the x-axis, called the MRK command. By typing MRK while in command mode, you cause a mark to appear on the time scale at the current time. You may use this to mark when you've made some kind of control change. You can only have one mark at a time. Typing MRK again eliminates the old mark, and leaves a new one.

While in the trending display, you can still use any of the other commands, including SIM and DAY. As you simulate, the graph grows. When the graph gets full (six-hundred and eight values), the program throws away half the values, compresses the rest, then goes on collecting data at half the rate.


The END command stops the accumulation of data and wipes out that which has been stored already. You can also use INI to reinitialize trending.


Suppose that you are running a problem situation in a step-feed process, for example, a high SVI or bulking condition, and you increase the return rate and watch its effect for about twenty-four hours. Now suppose you decide you would like to see what would happen if, under the same conditions, you changed the feed positions. You would need to be able to restore the system to the exact same conditions as existed before the change in return rate. The save/restore feature allows you to do this.


The SAV command will cause all the current conditions to be stored, including the variable concentrations, control parameters, and the system's design parameters.

There are two ways to save--either in memory, or in a disk file. When you enter the SAV command, the program will respond with the following message:


If you type <enter>, the terminal's bell will sound, letting you know the system has been saved. You will notice that you hear the bell just after you complete the design of the system. This is because the initial system is automatically saved in memory.

Saving to memory is temporary. If the program is stopped, or if another save to memory is done, previous saves are lost. If you wish to save more than one state of the system, or you want to be able to save a state for later restoration, even after stopping the program, you should save to disk.

To save to disk, enter the SAV command. After the program responds with the "*" prompt, type a name, then <enter>. The name should have one to eight characters in it, and should consist only of letters and numbers. The system will be saved in a file with the name you gave it and the extension ".SAV".

For example, if you want to save to disk under the name "plant2", your display will look like this after you type the name:


If you later stop the program, you will find a file named PLANT2.SAV in your directory. You can save as many files as can fit on your storage device.


When you are ready to return to a previously saved system, type RES. The program will display the following message:


By striking the <enter> key, the system stored in memory will be restored. If, instead, you type a name, the program will look for a file of that name with extension .SAV, and restore that instead. For example, if you would like to restore the state previously saved in a file named plant2, just type "plant2" after the asterisk, then strike the <enter> key.

When this is done, the current system, and any changes you have made since the last save will disappear. Now you can continue running as before, but with a different control strategy, so you can compare the results of each. You can use the RES command to restore from memory or from the same file repeatedly, as often as you like. It will always go back to the same conditions, until you use the sav command again.

The RES command affects the trending feature in the following way: If you initialized trending before using sav, and then restore later on, the res command will wipe out the trending data that was accumulated after the save. Continuing after a RES will result in trending data being stored at the same frequency as it was being stored before the RES command. If the SAV was executed before INI, typing RES will terminate trend mode. Restoring from a disk file always terminates trending. The SAV command does not save trended data.


This chapter explains a little about how the program is able to calculate the changes in the activated sludge system. There are actually two separate simulations going on: an aeration tank simulation and a clarifier simulation. Both are calculated together since the output of one is the input to the other. The aeration tank simulation is based on Busby and Andrews [1975], with improvements by Stenstrom and Andrews [1979]. For more about the thickening simulation, see Vaccari [1989].


The aerator has three main components: BOD ( or substrate, the food for the microorganisms), dissolved oxygen (DO), and the microbial solids themselves. The solids are considered to have three components: the stored mass phase (XS), the active mass phase (XA), and the inert mass phase (XI). The sum of XS, XA, and XI is the total mass (XT).

So, in actuality, there are five components: substrate, DO, XS, XA, and XI. When substrate (S) is added, it is rapidly converted to stored mass. This represents the physical absorption of BOD by the floc particles. The XS is then converted to XA, corresponding to the biological process of growth, and part of the solids are combined with oxygen to form carbon dioxide and are lost to the system. This process is also known as exogenous respiration. Lastly, XA is converted to XI, with consumption of oxygen. This represents the process of endogenous respiration, or cell decay. Active mass represents the living cell material, and inert mass is the residue of cell decay.

Each conversion process occurs at a rate that depends on the values of different components. For example, the rate of formation of XS from S is higher the more substrate there is, but decreases as XS gets "filled up", or saturated. Another example is the absorption of oxygen by aeration. The rate of absorption is proportional to how much below saturation the DO is. At the same time, oxygen is being used up by the respiration processes at another rate. If the rate at which it is being absorbed is equal to the rate at which it is being used up, then the concentration will stay the same. If it is being absorbed faster, then the concentration of oxygen will increase. However, the increased oxygen concentration will cause an increased respiration rate, until the two balance again, if nothing else is changed. This is the steady-state condition. In a real plant, things are always changing, so steady-state is never reached, and the concentrations of the activated sludge components constantly vary.

The program contains rate equations that calculate the various rate processes, and figures out how much any concentration must change from minute to minute.


As described in the introduction, clarification and thickening can be thought of as two separate processes occurring in the same tank. Clarification is a very complex phenomenon, and is not something which can be predicted well by mathematical equations. Therefore, the program makes the simplifying assumption that the contribution to effluent suspended solids by non-solids is proportional to the solids loading rate times the overflow rate. This concentration is added to any solids present in the effluent due to thickening failure, as explained below. Also, each milligram of solids in the effluent adds 0.8 milligrams of BOD to the effluent.

The proportionality factor determining effluent suspended solids concentration can be changed using the EFF command. Increasing the value of EFF would simulate degraded clarification performance.

The thickening function of the clarifier is much easier to describe mathematically, and therefore can be predicted by the program. ESIM uses a modified form of the classical flux model which takes into account the effect of interparticle compression on the settling rate of the solids.

The classical flux model is based on "Kynch's assumption", which says that the velocity at which sludge settles depends only on its concentration. This is approximately true for activated sludge. As you would expect, the higher the concentration, the slower the sludge settles. However, sludge is transported to the bottom of the thickener not only by gravity settling, but also by bulk flow, which is due to the downward velocity caused by the return pumping. The flow of solids due to bulk flow increases with concentration. When sludge enters the clarifier, it eventually increases in concentration to that of the underflow. As it passes through the intermediate concentrations, it must pass through a concentration whose ability to transmit solids is a minimum, since that ability first decreases and then increases. That concentration is called the limiting concentration, and the rate at which it is capable of passing solids is called the limiting flux. If the solids loading rate applied to the clarifier is greater than the limiting flux, a blanket of sludge at the limiting concentration will appear and grow towards the surface of the clarifier as long as the excess loading condition exists.

The exact value of the limiting flux depends on the sludge settling characteristics, which you control in the program by means of the SVI command, and the return rate. The relationship between SVI and concentration and the sludge settling velocity is determined in ESIM by the Ekama and Marais model. Ekama and Marais developed their model using data from stirred SVI tests. In order to convert to unstirred SVI as used by ESIM, the SVI in the program is internally multiplied by 0.80.

The compression model used in ESIM is the Kos model [Kos, 1978]. Compression models behave more realistically than the classical flux model [Vaccari and Uchrin, 1989]. For example, according to the classical theory, there can be no sludge blanket in a clarifier unless it is overloaded. This contradicts with what operators observe under normal conditions.

The compression model works by decreasing the settling velocity when there is a concentration gradient present. This will have greatest effect near the bottom, where the concentration changes rapidly with height in the clarifier. As the concentration gradient decreases, the compression model approaches the behavior of the classical model. The version of the Kos model used has only one additional parameter, which is given by Cacossa and Vaccari [1994].


The sludge age, or mean-cell-residence-time (MCRT), of an activated sludge system is commonly computed as the ratio of mass in the system to mass removed by wastage and loss in effluent. This will be referred to here as the traditional sludge age calculation, or TSA. However, the TSA calculation is only appropriate for "steady-state" systems: those for which no changes are occurring in the system. An example shows the kind of problem which can occur in nonsteady-state systems: Suppose a plant was initially at steady-state with a biomass of 100,000 pounds, and was wasting 10,000 pounds per day. The TSA would be ten days. If the waste rate were cut in half, the TSA calculation would predict an immediate doubling in age, so that a sludge could "age" many days in just several minutes. More realistically, the MCRT adjusts gradually to a new steady-state value of twenty days.

The DSA calculation was developed to eliminate the inconsistencies associated with the TSA [Vaccari, et al, 1985]. The DSA is theoretically exact for computing the average age of a culture that is both growing and being wasted, for nonsteady-state situations. The user of the simulation program may find it interesting to experiment with the effect of different situations on the DSA. Vaccari, et al [1985] compares the changes in TSA and DSA under for both real plants and for controlled conditions using ESIM. Vaccari, et al [1988] corrects an error in the equations published in the 1985 paper, and adds an addition case for batch wasting.

The DSA Command

ESIM updates the DSA calculation every 60 minutes. The user can change the frequency of updates using the DSA command in ESIM. Type "DSA" in response to the command prompt, and the program will display the current "DSA COUNT", and prompt for a new one. The DSA COUNT is the number of minutes between updating the DSA calculation. Changing the DSA COUNT to some number, say 10, causes the program to compute the DSA every 10 minutes. An assumption is made that solids growth and wasting is constant during the count period. This is only approximately true, and therefore, the smaller the DSA COUNT, the more accurate the calculation will be. However, it has been found that in practice a DSA COUNT of from several hours to one day (1440 minutes) is accurate. In practice, the only reason you might need this command is if you would like to change the DSA COUNT from the default 60 minutes to 1440 minutes in order to make it correspond to the frequency used for manual calculations in most real plants.

The trend feature will also trend the DSA, just as it does for other variables. Try some experiments: run a simulation with a constant flow (use the FLS command) until it is approximately at steady-state, then save (SAV command). Now initialize trending for DSA, MASS, WLD, and EBOD. Try different step forcings on the system, one at a time, such as increasing or decreasing influent B.O.D. or influent flow, or waste flow rate. Observe the effect of each of these on the DSA, and compare with what would be predicted by the TSA calculation.

The DSA Programs

The program user may be interested in examining the DSA parameter on real plant data, separately from ESIM. Two programs are provided for this purpose. One is the file named DSA.EXE. To run it, just type: DSA<enter>. The program prompts for three numbers: T, M, and W. T is the time interval at the end of which the DSA is needed. M is the total mass at the end of that time. W is the total mass of solids wasted or lost over the period of time, T. The program then calculates the DSA and the TSA, so you can compare them. Initially, the DSA and the TSA are the same.

For example, if the first set of numbers you enter are 1, 100, and 10, (meaning 1 day, 100 pounds of solids in the system, and 10 pounds wasted or lost in the effluent over the past one day) the program will calculate a DSA and TSA of ten days. If you then enter: 1, 100, 5, you will get DSA = 10.49, TSA = 20.00. Of course, the sludge hasn't really aged 10 days in one day. The DSA more realistically shows what happened.

Consider another example, as shown here:


1 100 10 10.00 10.00

1 110 11 9.09 10.00

1 115 11.5 8.78 10.00

1 118 11.8 8.68 10.00

1 120 12.0 8.66 10.00

5 120 60.0 9.18 10.00

30 120 360. 9.96 10.00

Here is what's happening: For four days, the mass in the system is increasing, but the waste rate is increasing proportionately. This is what would occur in a real plant if the influent B.O.D. increased suddenly, but the influent and waste flow rates remained constant. The TSA stays at ten days because the waste rate is always one-tenth of the total amount of sludge per day. In reality, the average age of the sludge must get younger because there is an increased production of sludge. That is, there is a relatively large amount of "new" sludge present. This will remain so until the production achieves a new equilibrium with the waste rate. Eventually the DSA must return to the steady-state value of ten days, which it clearly is tending to do.

Notice that when T is 5, W is 60.0. This means that 60 units of sludge were wasted over the last five days, not 60 units per day. You should enter the total amount of sludge wasted over the time period entered.

A second program included in the ESIM package is a LOTUS 1-2-3 version of DSA called DSA.WK1. Use of this program assumes familiarity with the LOTUS 1-2-3 or similar spreadsheet program. This version is easier to use than DSA.EXE. Its use will be self-explanatory after to spreadsheet users after trying DSA.EXE.


Under certain, usually extreme, conditions, the numerical solution to the rate equations calculated by the program may become unstable and produce unrealistic results, such as either negative or very high concentrations. Sometimes instability appears as widely oscillating results where changes should occur smoothly. Instability is usually easy to detect, since once it occurs, it generally gets progressively worse.

At this writing, the only case where instability is known to occur with this simulator, is when KLA is very low, and therefore, dissolved oxygen concentrations approach zero. This can be seen by running a complete-mix system, setting KLA to 0.1, and trending AVDO. Soon, oscillations with a two-minute period will appear. These will not be seen when the report interval only stops on even minutes, until the simulation "blows up", or becomes seriously unstable. These situations are to be avoided.

Another problem has to do with model validity. In the course of the development of the program, it was found that the decay coefficient (RXI) used by Busby and Andrews did not result in realistic DO profiles in simulations of the step-feed process. However, a value that produces good DO's eventually caused instability in the growth process. This problem was circumvented by including a correction factor which changes RXI in the DO equation, but not in the solids growth equations. A value of twenty-four for the correction factor, called CF, works well. This value can be changed by the user by typing CF. Setting it to 1.0 eliminates its effect. Another difference between the simulator and Busby and Andrews' model is that they do not have any interaction between the conversion rates and the dissolved oxygen concentrations in the aerator. In the program, the conversion rates are modified by a Monod function. The half-rate constant is called KDO, and can be changed by the KDO command. Setting CF to 1.0 and KDO to 0.0 eliminates both effects, and the model reverts to that of Busby and Andrews.



Computer simulation of the activated sludge process arose because of a need to provide hands-on experience to trainees. Although it cannot completely replace actual hands-on experience, it will strongly augment classroom training, as well as improve the students' comprehension when they do get out into the field. In conjunction with the classroom, the simulation can even provide insight into the process that a period of hands-on operation might not. The important goal in training an operator is to stimulate the kind of thinking needed to make control decisions. With the simulator, the user can apply the knowledge he has gained in the classroom.

Once the program was developed, it became apparent that it could be used for design and operation purposes, also. Some of these uses will be outlined below.


In order for a user to benefit from the program, he or she should be fairly familiar with the basics of the activated sludge process already. Either a basic course in biological treatment or some actual plant experience would be sufficient prerequisites to using the program.

A designer or operator of activated sludge systems should also be familiar with accepted practice in those fields. As the user gains experience in the use of the simulator, they should develop a feel for the differences between its predictions and the results which would be expected from an actual plant.


Although each user should be allowed considerable time alone, running simulations, the learning experience should include classroom discussions. A course centered on computer simulation was developed as follows: The first session was a review of activated sludge fundamentals. This covered the biology/ecology of the process and discussed the microbial growth curve with respect to activated sludge, growth rates, BOD and DO uptake rates, and recycle systems. A discussion of control strategies was included. The users should understand the usefulness of parameters such as sludge age, food-to-microorganism ratio, and organic loading.

The second classroom meeting consisted of a description of the simulator, and a discussion of similarities and differences between real systems and the simulator. As mentioned in the Users' Manual, it is important to the learning process for the user to understand these similarities and differences. The instructor should be able to draw on his or her own knowledge of the process and experience with the simulator for this discussion. Finally, the use the program was explained and demonstrated.

The remaining classroom periods consisted of simulation sessions followed by group discussions of various simulations. The instructor suggests problem situations for the users to try, or the users can experiment on their own.

If the class includes individuals who already have some operating experience, the instructor should draw on them to try problem situations they are familiar with. Encourage the user to explain the problem to the group, along with the response of both the simulator and the real system to process control changes intended to cope with them. Realize the limitations of the simulator. For example, in the case of sphaerotilus bulking, it is possible to simulate the high SVI, but not the response of the sphaerotilus population to changes in process parameters.

In addition to the classroom discussions, it would be helpful for the instructor to spend some time with each user at the terminal, running simulations, and having individual discussions.

The user should be playing an active role in running the program. Besides watching what the terminal displays, he or she should have a pencil and paper handy, to record observations, and doing basic data calculations such as daily averages of hourly results, or checking loading rates or sludge age.

At all stages of the instruction, there should be an emphasis on comparing and contrasting the simulation with what would be expected at a real plant. Make the user think. If he thinks there might be a difference, have him explain why in terms of process fundamentals.


The program can be used for rapid generation of process designs for a variety of requirements. The program uses several "rules of thumb" to generate its design: the aeration tank volume is based on 155 gallons for every 100 pounds per day of BOD loading for conventional and complete-mix systems, and 94 gallons for every 100 pounds per day of BOD loading for step-feed. In contact-stabilization, the reaeration tank volume is based on a six hour detention time, and the contact tank has a one hour detention time. The clarifier surface area is based on an overflow rate of 800 gallons per day per square foot.

By overriding selected design defaults, the effects of particular constraints can be evaluated. For example, using longer sludge age usually requires a larger aeration tank. The aerator size and initial biomass can be manipulated to be certain that dissolved oxygen and clarifier loading constraints are not violated, and, on the other hand, that the aerator is not made larger than is needed. The factor CF should be set to 1.0 before oxygen uptake estimates are used.

The effect of model parameters may be simulated. For example, if it is known that the yield is low, as often occurs with highly biodegradable industrial wastes, Y1 can be changed. The system should then be simulated for a period of time equal to about three or four sludge ages to see the effect of this change. The net yield (pounds of sludge produced divided by pounds of BOD removed) should be checked to see if it approximates the desired value. A system with a much lower yield may be designed with a smaller aerator and clarifier.

An important use for the simulator in design is in predicting unsteady effects due to peak loads. After designing a plant, the FLD command can be used to set the diurnal flow variation. Changes in BOD concentrations must be made manually. Trending can then be used to see the variation and peak values obtained for sensitive parameters such as SLR, WLD (pounds per hour wasted), ESS (effluent suspended solids), and EBOD (effluent BOD).


The operator can use the simulator to anticipate alarm conditions and to compare the possible effects of various process control decisions. For this purpose, the operator should have some experience in tailoring the simulator to his particular plant. The major model parameters which should be checked are Y1 (yield), CF (correction factor for oxygen uptake), KLA (aeration rate coefficient), and RT (BOD. uptake rate coefficient). Usable values for these coefficients can be found by trial and error. Practice with the simulator until you can tell the effect of each one, then try adjusting them to match data collected from your plant. Then see if it works well enough at predicting future results.

The value of SVI given by the program might not correspond with the SVI of the plant. If it is known approximately what the limiting solids loading is for a given return rate at a particular SVI for your plant, find out by experiment what simulator SVI will give the same limiting loading under similar conditions. The limiting loading is the loading at which a sludge blanket starts to accumulate in the clarifier.

The above described procedure is by no means simple. It may be made a bit easier if the mathematical model by Busby and Andrews is understood itself--the meaning of the parameters will then become clearer. However, it can be done to an approximation, and experience will tell you how certain the model predictions are. In any case, such predictions are only a warning, and the operator must decide if there is a real problem.

Once a reasonable set of coefficients has been developed, the program can be used to estimate the effects of control changes, or even of uncontrolled changes such as in flow and influent BOD The program can even be interfaced to computerized data logging systems in plants that have these, so that the alarm anticipation process can be automated. Routinely simulating the next six or twenty-four hours, particularly if unusual changes have occurred, can help spot potential problems.

The short- and long-term effects of changes in control parameters such as waste rate or return rate can be checked before performing those changes.


The mathematical model used in the simulator sticks pretty closely to that of Busby and Andrews for the aeration basin reactions. A more advanced student may want to take advantage of the model packaged, as it is, in a flexible design and graphics program. There are a number of interesting exercises possible.

A student of sewage treatment plant design could "try out" various designs, to help him visualize the final result. Or, the effect of different control strategies could be examined. These can either be done "manually" by using the program's process control functions, or it can be done "automatically" using the INF command.

One who understands Busby's model might like to experiment with the kinetic rate constants. Functions for most of the constants are already part of the program. Changes in the kinetic equations can be made to simulate toxic effects.


In all of the following problems, steady-state conditions can be achieved by using the FLS command to set the influent flow rate to a constant value, then allowing three to four sludge ages to pass. Pseudosteady-state means to let diurnal influent flow variations continue (via the FLO command) without any other changes, for several sludge ages.

Most of these excercises can be done using any of the process design modes, but the simulations will run fastest if complete-mix is used.


Run system to steady state over a range of waste flow rates. At each steady-state, compute F/M, sludge age, observed yield, sludge production rate.


Compute soluble BOD (SBOD) from total effluent BOD (TBOD) and effluent suspended solids (ESS):


Using this and data from previous excercise above, compute maximum growth rate
(), Ks, Y and kd


At various steady-state conditions, compute the percentage of total system solids which is held in the clarifier. How will the calculation of sludge age be affected by solids in the clarifier if clarifier solids are neglected?

Achieve pseudosteady-state conditions at a fairly high sludge age (ten or more days), so as to be operating with a solids loading rate close to the limiting flux of the clarifier (find this by trial and error by decreasing waste flow until overload occurs, then decreasing it until the sludge blanket is held in the clarifier). Compute and plot the clarifier solids loading rate sludge blanket height and mass of solids in the clarifier on an hourly basis. Notice what happens just after the flow increases in the morning.

Repeat the previous excercise while varying the return sludge flow rate to be proportional to the influent flow. Which control technique minimizes the average sludge blanket thickness? Which control technique results in the lower maximum sludge blanket thickness? What is the effect on average effluent suspended solids? Try this at higher plant flow rates.


With the system at steady-state, compute the pounds per hour (kilograms per hour) of solids being wasted or discharged in effluent. Now, set the waste flow rate to zero. Allow the system to come to steady-state with solids being discharge in the effluent. Then, calculate the mass rate of discharge in the effluent. Compare to the results before wastage was stopped.


Use TREND feature to examine effect of changes in influent BOD, influent flow and waste flow rate on DSA and TSA. How can you explain the shape of the curve which results when only influent BOD is changed?

By how much do DSA and TSA differ from each other?


Design a six-pass step-feed system and allow it to come to steady-state with all of the feed flow entering pass three. Use TREND feature to plot changes in MLSS, RAS, AVSS and DSA. Execute the SAV command. Abruptly switch 100% of the feed flow to the first pass. Execute the BAR command, then simulate for three or four hydraulic retention times. Notice what happens to solids distributions in the aeration basins. Next, use TRE ALL to observe the temporal effects. Notice the "echo" of the changes which occurs. What is the effect on DSA of moving the feed towards the end or the beginning of the basin?

The following excercise should be tried with a variety of feed patterns such as:

1. 100% of feed into the first pass (conventional mode).

2. 100% of feed into the fourth (of six) passes.

3. 100% of feed into the last pass.

4. Feed equally distributed betwen all passes.

Set the feed pattern, then allow the system to come to pseudosteady-state. Then use the TREND feature to plot MLSS, RAS, FLO, and AVDO. Now, simulate three or four days and observe the resulting trends. Notice how variations in MLSS and RAS depend upon feed distribution, especially as you change from pattern 1 to 4. What will be the effect upon wasting? What will be the effect on solids loading rate to the clarifier? How will solids loading to the sludge handling process be affected if mixed liquor is wasted? (Or, if return sludge is wasted?)


Program Control Commands

MEN -- Causes a list of available commands to be typed. In the graphics version, requires a carriage return to be typed before entering any more commands.

SIM -- Allows the user to run the simulation for periods of hours and minutes.

DAY -- Allows the user to run the simulation for periods of days and hours.

TRE -- Used to produce a display of trended variables.

INI -- Used to initialize the four variables that will be trended.

END -- Ends trending and wipes out all stored data.

SAV -- Saves the current situation for future restoring.

RES -- Restores simulation to the most recently saved condition.

DES -- Design a new system, wiping out the current one.

INF -- Enable or disable use of input file.

OUT -- Enable or disable generation of output file.

STO -- Stop ESIM and return to DOS.

Process Control Variables

RET -- Change the return rate.

WAS -- Change the waste rate.

FEE -- Change the fraction of the feed entering each pass (in step-feed only).

FLO -- Change the average flow, but the flow continues to vary with the hour of the day.

FLS -- Set the flow to a constant, independent of time of day.

FLD -- Set hourly influent flow rates, in MGD.

BOD -- Change the influent biochemical oxygen demand.

KLA -- Change the aeration rate. The KLA is proportional to the amount of air, so doubling the KLA is equivalent to doubling the volume of air (7.0 per hour)

SVI -- Change the sludge volume index. An SVI less than 160 slows down the simulation.

EFF -- Proportionality factor for effluent suspended solids (15).

Model coefficients

Y1-- Changes yield coefficient for the conversion of stored to active mass (0.66).

Y2-- Yield coefficient for conversion of active mass to inert mass (0.25).

OXS -- The saturation value for dissolved oxygen (69 lbs./million gallons).

KDO -- Monod constant for oxygen utilization (8.0 lbs/MG).

RT -- Rate constant for conversion of S to XS (3 per hour).

RXA -- Rate constant for conversion of XS to XA (0.2 per hour).

RXI -- Rate constant for conversion of XA to XI (0.00125 per hr).

CF -- Correction factor for oxygen uptake rate (24).

KS -- Monod coefficient for substrate uptake (1250 lbs/MG).

KXS -- Monod coefficient for conversion of XS to XA (150 lbs/MG).

FH -- Maximum ratio of XS to XT (0.45).


SCH -- Produces schematic display.

BAR -- Produces bar-graph display.

NUM -- Produces numerical display.

MRK -- Places a mark on time scale of trend display.

PRN -- Print the display.

TBL -- Print a table of trended results.


BOD -- Influent biochemical oxygen demand (mg/l).

FLO -- Influent flow (MGD).

RET -- Return flow (MGD).

WAS -- Waste flow (MGD).

MLSS - Mixed liquor suspended solids (mg/l).

RAS -- Return activated sludge suspended solids (mg/l).

ESS -- Effluent suspended solids (mg/l).

EBOD - Effluent biochemical oxygen demand (mg/l).

KLA -- Aeration rate constant (per hour).

SLR -- Solids loading rate on the clarifier (lbs/day/sq ft).

MASS - Total pounds of biomass in the system (lbs).

SVI -- Sludge volume index (ml/g).

AVDO - Avg dissolved oxygen concentration in the aerator (mg/l).

WLD -- Waste load, pounds per hour wasted (lbs/hr).


Busby, J. B. and J. F. Andrews, "Dynamic Modeling and Control Strategies for the Activated Sludge Process", Journal of the Water Pollution Control Federation, v48, p1055 (1975).

Cacossa, K. and D.A. Vaccari, "Calibration of a compressive settling model from a single batch experiment" presented at the IAWQ biennial conference, Budapest, Hungary (1994).

Ekama, G.A. and G.v.R. Marais, "Sludge settleability and secondary settling tank design procedures", Wat. Poll. Control. v85, p101 (1986).

Kos, P., "Gravity Thickening of Sludges", Ph.D. Thesis, U. of Massachusetts (1978).

Stenstrom, M.K. and J.F. Andrews, "Real-time Control of Activated Sludge Process, J Env. Eng. Div. ASCE, vEE2, p245 (1979).

Vaccari, D.A., T. Fagedes, and J. Longtin, "Mean Cell Residence Time in a Nonsteady-State Activated Sludge System", Biotechnology and Bioengineering, v27, pp695-703, (1985).

Vaccari, D.A., A. Cooper, and C. Christodoulatos, "Feedback Control of Activated Sludge Waste Rate", JWPCF, v60, n11, pp 1979-1985, (1988).

Vaccari, D. A. and C. Uchrin, "Modeling and Simulation of Compressive Gravity Thickening of Activated Sludge", J. Envir. Sci. & Health, Part I -- Envir. Sci. & Engg., v24, n6 (1989).





David A. Vaccari

Stevens Institute of Technology
Hoboken, NJ 07030


Persuant to this Agreement, you may: a) use the program on a single computer; b) copy the program into any computer readable or printed form for back-up or modification purposes in support of your use of the program on the single computer; c) modify the program and/or merge it into another program for your use on the single computer; and d) transfer the program and license to another party if the other party agrees to accept the terms and conditions of this Agreement. If you transfer the program, you must at the same time either transfer all copies whether in printed or machine-readable form to the same party or destroy any copies not transferred; this includes all modifications and portions of the program contained or merged into other programs. If you transfer possession of any copy, modification or portion of the program to another party, your license is automatically terminated. The program contains codes identifying the original purchaser of the program.

TERM: The license is effective until terminated. You may terminate it at any other time by destroying the program together with all copies, modifications and portions in any form. It will also terminate if you fail to comply with any term or condition of this Agreement. You agree upon such termination to destroy the program and any copies, modifications and portions in any form.

LIMITED WARRANTY: ENVIROSYSTEMS, CO. warrants the diskettes on which the program is furnished to be free from defects in materials and workmanship under normal use for ninety (90) days from date of delivery.

The program is provided "as is" without warranty of any kind, either expressed or implied, including, but not limited to the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. Should the program prove defective, you assume the entire cost of all necessary servicing or correction. ENVIROSYSTEMS, CO. does not warrant that the program will meet your requirements or that the operation of the program will be uninterrupted or error-free.

In no event will ENVIROSYSTEMS, CO. be liable to you or any other person for any damages, including any incidental or consequential damages, expenses, lost profits, lost savings, or other damages arising out of the use of or inability to use such program.



This program is licensed for use by the original owner and on one machine only, and may not be copied or distributed for the use of other personnel in other locations. The program contains registration codes indicating the source of the program. The author would appreciate hearing about any comments or suggestions concerning the program or the manual, and particularly, any problems or bugs which may be discovered. Please send comments to:

David A. Vaccari
Dept. of Civil, Environmental and Coastal Engineering

Stevens Institute of Technology
Hoboken, NJ 07030





David A. Vaccari

Stevens Institute of Technology
Hoboken, NJ 07030

for users of the
Educational Version of ESIM

This software is given free for copying, provided that the file ESMANUAL.TXT is included with each copy, and that the author's name and references not be removed from these versions nor from any versions derived from them. No warranty is expressed or implied as to the accuracy of the software. It is up to each user to validate the results obtained with these programs.

A full-featured commercial version of this software is available. For information contact:

David A. Vaccari
Dept. of Civil, Environmental and Coastal Engineering

Stevens Institute of Technology
Hoboken, NJ USA 07030