United States
Environmental Protection
Agency
Municipal Environmental Research
Laboratory
Cincinnati OH 45268
EPA-6OO/2-79-1 58
December 1979
Research and Development
Computer-Aided
Synthesis of
Wastewater
Treatment and
Sludge  Disposal
Systems

-------
                 RESEARCH REPORTING SERIES

 Research reports of the Office of Research and Development, U.S. Environmental
 Protection Agency, have been grouped into nine series. These nine broad cate-
 gories were established to facilitate.further development and application of en-
 vironmental technology. Elimination  of traditional grouping was  consciously
 planned to foster technology transfer and a maximum interface in related fields.
 The nine series are:

      1.  Environmental Health Effects Research
      2.  Environmental Protection Technology
      3.  Ecological Research
      4.  Environmental Monitoring
      5.  Socioeconomic Environmental Studies
      6.  Scientific and Technical Assessment Reports (STAR)
      7,  Interagency Energy-Environment Research and Development
      8. "Special" Reports
      9.  Miscellaneous Reports

 This report has been assigned to the ENVIRONMENTAL PROTECTION TECH-
 NOLOGY series. This series describes research performed to develop and dem-
 onstrate instrumentation, equipment,  and methodology to repair or prevent en-
 vironmental degradation from point and non-point sources of pollution. This work
 provides the new or improved technology required for the control and treatment
 of pollution sources to meet environmental quality standards.
This document is available to the public through the National Technical Informa-
tion Service, Springfield, Virginia 22161.

-------
                                           EPA-600/2-79-158
                                           December 1979
COMPUTER-AIDED SYNTHESIS OF WASTEWATER TREATMENT AND
               SLUDGE DISPOSAL SYSTEMS
                         by

                  Lewis A. Rossman
            Wastewater Research Division
     Municipal  Environmental Research  Laboratory
                Cincinnati, Ohio   45268
      MUNICIPAL ENVIRONMENTAL RESEARCH LABORATORY
          OFFICE OF RESEARCH AND DEVELOPMENT
         U.S.  ENVIRONMENTAL PROTECTION AGENCY
                CINCINNATI, OHIO   45268

-------
                                DISCLAIMER


     This report has been reviewed by the Municipal Environmental Research
Laboratory, U.S. Environmental Protection Agency, and approved for publica-
tion.  Mention of trade names or commercial products does not constitute
endorsement or recommendation for use.
                                   ii

-------
                                  FOREWORD
     The Environmental Protection Agency was created because of increasing
public and government concern about the dangers of pollution to the health
and welfare of the American people.  Noxious air,  foul  water, and spoiled
land are tragic testimony to the deterioration of our natural environment.
The complexity of that environment and the interplay between its components
require a concentrated and integrated attack on the problem.

     Research and development is that necessary first step in problem solution
and it involves defining the problem, measuring its impact, and searching for
solutions.  The  Municipal Environmental Research Laboratory develops new and
improved technology and systems for the prevention, treatment, and management
of wastewater and solid and hazardous waste pollutant discharges from municipal
and community sources, for the preservation and treatment of public drinking
water supplies, and to minimize the adverse economic, social, health, and
aesthetic effects of  pollution.  This publication is one of the products of
that research; a most vital communications link between the researcher and the
user community.

     The work presented here describes  the development and  use of a computer-
aided preliminary design procedure for  wastewater treatment and sludge
disposal systems.   It enables a designer to efficiently synthesize and analyze
large numbers of alternative treatment  schemes and  rank them with respect to
several different cost, energy, and environmental criteria.  Such a design
tool  should  enhance our capability to develop more  innovative and efficient
waste treatment  systems in  these  times  of stricter  environmental standards
and  increasing resource costs.
                                       Francis T. Mayo
                                       Director, Municipal Environmental
                                       Research Laboratory
                                      m

-------
                                 ABSTRACT
     A  computer-aided  design  procedure  for  the preliminary synthesis of
wastewater  treatment and  sludge  disposal  systems  is developed.  It selects
the_components  in  the  wastewater treatment  and sludge disposal trains from
a  list  of candidate process units with  fixed design characteristics so
that criteria on effluent quality, cost,  energy,  land utilization, and
subjective  undesireability are best satisfied.  The computational procedure
uses implicit enumeration coupled with  a  heuristic penalty method that
accounts for the impact of return sidestreams from sludge processing.  The
programmed  version of  the design procedure, called EXEC/OP, has been inter-
faced with  the  unit process subroutines contained in a previously EPA
developed system evaluation program known as EXECUTIVE.  A number of
case study  design problems are presented  to demonstrate the versatility
of EXEC/OP.  Included  among these is a  preliminary cost/energy-effective-
ness analysis for a hypothetical design problem containing over 15,000
alternative system configurations.  The design approach described in this
report will be of interest to engineers and planners involved in the genera-
tion and evaluation of alternative wastewater treatment and sludge disposal
systems.

     This report-covers a period from February 1978 to October 1978 and work
was completed as of February 1979.

-------
                                  CONTENTS
Foreword	   ""!""
Abstract 	    JY
Figures  	    ..
Tab! es	   V11

     1.  Introduction	    ].
     2.  Conclusions   ,.	    6
     3.  Elements of the System Design  Process  	    JJ
     4.  An Overview of  the System  Synthesis  Model  	    ijj
     5.  Case Studies  		    19

                                                                          50
References  		-	

Appendices

     A.  Mathematical  Description of the Model  	    53
         References  	    ^
     B.  EXEC/OP  Users'  Guide	    '
     C.  Unit Process  Descriptions	
         References			
     D.' Program  Listing	

-------
                                   FIGURES
Number

  1
  2
  3
  4
  5
  6
  7
 Al
 A2
 Bl
 82
 B3
 B4
 B5
                                                             Page

Conceptual Flow Diagram of a Waste Treatment System  	   10
Multi-Option Flow Diagram for a Hypothetical Design  Problem   15
Multi-Option Flow Diagram for Case Study 1  	           22
Multi-Option Flow Diagram for Case Study 2  	  	   28
Multi-Option Flow Diagram for Case Study 3  ...       	   35
EXEC/OP Output for Case Study 4	  	   38
Illustration of the Non-Inferior Set	   45
Flow Chart of the Implicit Enumeration Procedure .'.'	   56
Overall System Design Algorithm 	.'.'."   59
Multi-Option Flow Diagram for a Hypothetical Design*Probiem   62
Organization of Input Data for EXEC/OP 	   54
Input Data for Hypothetical  Design Problem	  	   68
EXEC/OP Output for Hypothetical  Design Problem	.".'!""   71
EXEC/OP Output for Single Design Evaluation 	""   73
                                    VI

-------
                                  TABLES
Number

  1      Evaluation Criteria for The LA/OMA Sludge Management Study

  2      Assessment of Waste Treatment System Optimization Models
  3      Unit Processes Contained in EXEC/OP 	
  4      Waste Stream Parameters in EXEC/OP 	
  5      Influent Waste Characteristics Used for Case Studies .....
  6      Economic Parameters Used for Case Studies	
  7      Input Process Design Parameters for Case Study 1 	
  8      Input Design Parameters for Vacuum Filtration and
         Centrifugation 	
  9      Least-Cost Designs for Case Study 1 	
 10      Input Process Design Parameters for Case Study 2	
 11      Least-Cost Designs for Case Study 2 	
 12      Input Process Design Parameters for Case Study 3 	
 13      Least-Cost Design for Case Study 3 	
 14      Least-Cost Energy Constrained Design for Case Study 5 	
 15      Non-Inferior Cost/Energy Systems for Case Study  5 	
 Bl      EXEC/OP Unit Processes  	
 B2      EXEC/OP Design Criteria	
 B3      EXEC/OP Waste Stream Parameters 	
 B4      EXEC/OP Economic Parameters  	
 8
12
13
20
21
23

25
26
30
32
34
36
47
48
63
64
65
66
                                      vn

-------

-------
                                  SECTION 1
                                INTRODUCTION

     The effective synthesis of waste treatment systems is a challenging
engineering task.  The term synthesis refers to the speculation of both
a svstem structure - the choice and arrangement of unit processes and
operations - anS the design of the individual units within that structure
so thai a set of design objectives is fulfilled.  Although the primary
goal may be the treatment of liquid wastes, .decisions Carding sludge
handling and disposal can have significant impacts on total system
performance, in both an economic and environmental sense.

     Tn the oreliminary phases of the system design process the designer
needs to efficient y evaluate the performance of a large number of potential
system designs to identify  a smaller number of  attractive designs that will
then become the  subject of  a more detailed  and  Curate evaluation.  This






                                                              S
 feedback effect  of  these  recycles  complicates  the numerical  calculation
 of system performance.   In many instances these two  factors can  combine to
 mike a  complete  evaluation of all  possible system designs computationally
 tractae   If on y intuition were used to select  a more manageable
 number of designs to examine, one could never be sure that some  truly
 attractive alternative was not .overlooked.

        third reason for the complexity of the screening process  is reflected

  IltlrnStive  sysS  deigns  that  show the  kinds of trade-offs that may exist
  between  various  design  criteria.

       This  report describes  a  computerized system synthesis model , called
  EXEC/OP, that can aid the designer in  the preliminary  stages of  the  system

-------
                                                                       ,







of recycled sidestreams from sludge processing.                  ertects
        J]lowin9 sections of this report discuss the various features


    vesat? m!  ^P^nn3 H"-"156" f Sample design Prob1ems "hat ?
 h  ^ ?   ] y',,  he , aPPendl ces contain a mathematical development of
the model and a Users'  Guide and program listing of EXEC/OP?

-------
                                  SECTION  2

                                 CONCLUSIONS

     The EXEC/OP computer program for synthesizing waste treatment systems
provides a useful tool  for the preliminary screening of alternative designs.
Its features include an integrated design  of both the wastewater and sludge
treatment sub-systems,  consideration of multiple components in the waste.
stream!, selection of both the type and design level for unit processes,
and consideration of multiple design criteria.  The penalty augmented
implicit enumeration method employed in its optimization algorithm is an
efficient means of searching for the best combinations of process options.
Usually only a small fraction of the computational effort.that would>have
been required for complete enumeration of all possible alternatives is
needed.

     The program gives the designer a useful means for exploring trade-offs
between such criteria as  cost, energy consumption, land utilization, and
subjective  undesinability ratings.  These  factors can be-weighted and
combined  into a  single criterion function or  can  be treated as constraints
placed  on the system design.  Additional flexibility is provided by the
M  next-best design  feature of EXEC/OP.  This  can  be used to identify a
group  of  designs  that are close  together with respect  to one  Primary
objective (e.g.  cost)  but could  have varying  levels of other  secondary
objectives.

     The  case  studies  described  in this report  show that the  program  is
 capable of  analyzing design  problems with  from  15.000  to 21,000  alternative
 system configurations  in several  minutes  of computer  processor  time.  The
 core storage  requirements of the program  are modest at 25  K words,   me
 subroutines that model  the  performance of the treatment processes  have been
 employed in a  modular  fashion so that  improvements and new types of unit
 processes may be easily added at a later  time.

-------
                                  SECTION 3

                    ELEMENTS OF THE SYSTEM DESIGN PROCESS

       ?S .Wit5.most engineering problems, the design  of wastewater  treatment
  and  pJffit?nnPr?i   Srfeni? invlv!s  the elements of synthesis, analysis,
  and  evaluation  [3].   The  element of synthesis  refers to the conception of
  a  system  structure and  its  operating  characteristics.   Analysis  determines
  !A?1Ven  STutem s?ruc*ure  wil1  behave under specific design and operating
  conditions.  The  evaluation step compares the  performance of alternative
  system designs  so that  a  best design  may be  identified.

       The  entire design  process consists  of a linking together of  these
  three elements  in a-n  iterative fashion.   Information feedback from the
  analysis  and evaluation phases is  used  to suggest changes to be made in
  the synthesis step.  Any  new  designs  so  generated are then analyzed and
  e*a]ua. ?? as.the  Process  cycles  through  another iteration.  Also,  the level
  of detail and accuracy maintained  in  the analysis will  usually increase as
  the process proceeds.   In the preliminary stages, levels just high enough
  to perform an efficient yet reliable  screening of a  very large number of
 alternative system designs  is all that is required.

      There are two types of decisions  to be made when  synthesizing a  waste
 treatment system.   The first type involves the system  structure -  a choice
 nLl*  -II      treatment processes to employ and the  arrangement  of  these
 Z,?H hi  , hJh  anther ln tf?e system'   Examples of such  structural choices
 would be  whether to use  activated sludge or  a trickling  filter  for BOD
 removal,  whether to employ a single treatment train  for  sludge  processina
 SDrP^^nVv^-H1'0!' Cerent  types of sl^es, and whether  to  use land
 spreading  of  liquid  sludge or  landfill a dewatered sludge.  The second
 type  of decision relates to the design of each  individual  unit  process and
 operation. It  specifies the values of those  parameters that describe the
    *  KPeIu in  9haracten'st1cs  a^ performance of  each unit.  Examples
    e  ?li     *   I?6 f-an  overflow rate for  a settling tank, the value of
 h,    in reten*lon  ^me  to use  in an activated sludge unit, or the  choice
 between 10 cu. yd. and 15  cu.  yd.  size trucks for hauling sludge.

     The identification  of a best overall  system design requires a search
 over the space of  feasible structural  configurations and over the  space
 of design  options  associated with  the  individual treatment units in each
 configuration.  The fact that  the  treatment units are interconnected to
 one another makes  the  performance  of any  one unit in the system dependent
 on the design decisions made for  all other units in the system.   Thus
I?hnXaniCle'.the best design of an activated sludge unit cannot be  assured
without knowing the performance achieved  in primary sedimentation  and,

-------
because of the recycled sidestreams, the design choices in the sludge
processing train.

     The evaluation of a system design must be made with respect to a set
of decision criteria.  The criteria that seem most relevant to waste
treatment systems can usually be grouped into the categories of economics,
environmental effects, performance, and feasibility of implementation.
Table 1 lists the evaluation criteria that were used in the recent LA/OMA
sludge management study for Los Angeles and Orange Counties in California
[4].  The U.S. Congress, in the Clean Water Act of 1977, has set forth
several goals that could serve as the basis for design criteria.  The act
provides monetary incentives for communities to employ treatment technology
that will result in (a) greater recycling and reuse of water, nutrients,
and natural resources; (b) increased energy conservation, reuse, and recycling;
(c) improved cost-effectiveness in meeting specific water quality goals;
(d) improved toxics management[!].

     Criteria such as described above may be expressed in the form of a
performance objective to be minimized or maximized, as constraint relations
with fixed target levels, or as fuzzy combinations of objectives and
constraints (e.g., design a system-that has some resource conservation in it
but is not too costly).  Alternative designs that do not meet the constraint
target levels can be discarded as infeasible.  Of the remaining designs, if
one ranks better in each objective than all other designs then this is
clearly the best choice.  What is more likely to occur though is that one
design performs better than another with respect to one objective but is
inferior with regard to a second objective.

     For example, the treatment system that minimizes cost would probably
not be the system that also minimizes energy consumption.  In such cases
the objectives are said to be conflicting and a final choice cannot be made
without the designer imposing a subjective value judgment on the relative
worth of one objective versus another.  For the cost-energy situation, the
designer would be faced with the question, "how much increase in cost am I
willing to accept as I move from the most cost-effective system to the
most energy-effective system?".  Engineering analysis can only Inform the
designer of what trade-offs exist among the objectives in the alternative
designs available.   It cannot answer questions involving value judgments
and thus cannot  serve as the means for automatically reaching -a final
design decision.

     The traditional approach  to waste treatment system design has been to
divide the system into its various component stages  (e.g., primary treatment,
secondary  treatment, sludge stabilization, sludge dewatering, and final
sludge disposal), define performance objectives for  each stage, and select
the treatment units  that best  accomplish these objectives.  The result can
be an  uncoordinated  and wasteful overall system design.  More systematic
approaches have  recognized the interaction between various treatment
components and have  used mathematical models programmed for computer
implementation to evaluate the overall performance of alternative system
designs.   The pioneering effort  in  this area was made by Smith and his

-------
TABLE 1.  EVALUATION CRITERIA FOR THE LA/OMA SLUDGE MANAGEMENT STUDY
      Direct Cost

           Capital Costs
           Operation and Maintenance Costs
           Revenues

      Indirect Costs

           Employment Generation
           Induced Land Value Changes
           Alterations in Economic Productivity

      Energy Impacts

           Direct Energy Demands
           Indirect Energy Demands

      Environmental Impacts

           Public Health Hazards
           Land Form Alteration
           Soil Contamination, Conditioning,  Reclamation
           Water Quality
           Air Quality
           Ecosystem Impacts
           Resource Utilization
           Social  Resources
           Growth Inducement
           Safety
           Control  of Hazardous  Substances
           Transportation  System Impact

      System Effectiveness

           Implementability
           Flexibility with Time
           Reliability
           Compatibility with Existing Land Use
           Compatibility with Related Planning Programs
           Compatibility with Legal Requirements

-------
co-workers at the U.S. Environmental Protection Agency [5].   This work has
culminated in the development of EXECUTIVE, a computer program that simulates
the steady state performance and evaluates the cost of a number of wastewater
and sludge treatment unit processes that can be arranged into any reasonable
system configuration [2].  Additional simulation programs devoted primarily
to wastewater treatment systems have been reported on by Silveston [6], Chen,
et. al. [7], and Shoemaker and Barkley [8].  Similar works devoted mainly to
sludge management include those of Bennet, et. al. [9], Kos, et. al.  [10],
Smith and Eilers [11], Burley and Bayley [12], and the San Francisco Bay
Region [13].

     All of the above approaches are evaluative in nature - they rely on
the designer to first specify the system design in advance.   For a large
number of alternative designs the computational burden can become excessive
if each alternative-must be synthesized and analyzed separately.  To
overcome this limitation, a number of mathematical optimization models have
been developed for waste treatment systems in recent years.   With varying
degrees of generality and sophistication these models will select values
for the system design variables that will meet effluent discharge standards
at least total cost.

     Table 2 compares a number of these models with respect to several
features thought to be of particular value in the preliminary phases of the
system design process.  These features can be summarized as follows:

(1)  The design of the wastewater and sludge treatment sub-systems should
     be done in an integrated fashion, with consideration given to the
     treatment requirements of the sidestreams produced during sludge
     processing;

(2)  The model should select both a  system structure and the design of the
     individual process  units within that structure, at least from among a
     finite number of discrete alternatives;

(3)  The capability should exist to  handle multiple pollutants or waste
     stream parameters and their interactions;

(4)  Whenever possible,  principles of mass balance and reaction kinetics
     should be employed  in predicting process performance and resource
     utilization;

(5)  A capability to  consider other  kinds of  system evaluation criteria
     besides cost should be  included;

(6)  A solution method more  computationally efficient  than  complete
     enumeration of all  possible system  designs should be used.

     None  of the models  in Table 2  contains all six features.   It  is  possible
to discern two types  of  modeling approaches in these past efforts.  The
first, representative of the dynamic programming  models, can only  synthesize
the wastewater treatment sub-system with respect  to one or  two  pollutants

-------




^
U
c
H-
S
E

fr
Q.
O
s
Cj
I-
fe
s
p
UJ
ps

UJ
to

u.
o

i
V)
UJ
S
CM
 J
CO
ss










c


in
4-1
c
<
e
o
c
o ai
r 3
4J C
IM E
1-5
r
E
ai
U> Ol 4->

U) E Ol
in 
* 4^ "O C
a 10 3 01
5> oilo -P
01 4-> ro
w in -o ai
: re E j-


V)
1
"*

o
4->
Pioneering applica
of optimization
techniques
i
oi cn
r L.
1 Q.




a:












o



tn
01




=


r-^
01 CMI  1
E r~ 1 1
 '
Ol
4-> CO
tn "O
O 3
Oi
in
4J
1- S-
E O
O 4->
Ol E
X 3r
i- o re
tf- o in
o o
re re Q.
in
tn o i
Ol 4->T3
in
cn co
E E
r *r-
fs IE
re o) to Oi
E O E O




z -2




s s







o o



in tn
Ol CD




o o

 E
re i i E i~^
tn j=to
4->r ini
Oil 	 I 1 1 J
O to oS to 1C
in 01 01
E r .E r
Ol^-^ >^^^
UJ CO

E
"r~
oi re
o
E tn
re re E
'sir--?
re re tn
> > Ol E
o-o o
in E >f~
s- S3-o s-
Ol S- E Ol
o o ->
r- Q Cl -i-
in o oi s-
E CD tn O
o
cn cn
E E
TI E oi E
+J re E 10
Ol S- i- S-
01 i  cn
O E O
01 S- O S-
C3 O- Z 0-



tn
O CD




in
z >J







tn
O CD
^f ^



tn
01 O




tn
g 01
r- (O * %
a. i- o
r r~l El~~l t3 CT1
r f**. re CO E r
LUI  t Ol  I Ol
Q E- XT'.
O oB i  3 tn
osr~. i^ o s
01 s. cn .c o
J= O Ol "o
CO UJ CO O-


4-
E
Optimizes recycle
arrangements and
parallel treatmei
schemes
Ol
Ol E
i  Ol
c o
0 S.
Z O-




o




in
CD







tn
01



tn
01




-


i  r i
tO C^
CM
+JI 1
QJ
"CO
"w-^-
E


O
Considers recycle <
sidestreams from
sludge treatment
CO
E
Nonlinea
Programm




o
z




in
Ol







tn
01
>'


o




in
tu
'^ *
CM
r 1  1
* - re CM
CO CM
1*^. 4J  t
cn 01
O -to
a: 01 cn
51C.
HH O
O CO
cn
i
S
S-
.LJ
Does not consider
recycle of sides
o
Complete
Enumerat




z




in
01







tn
01
*"


tn
01




tn
01
in ~*
O.IO
s- r-~
o cn
<_> r
s- in
< s-
cni  i
 E ro
CO UJ CM
i  i
=3 0

s- cn
Ol E
Refinement of earl
dynamic programm-
model
cn
E
U 
10 cn
E O
>> s-
e?o-




o




o







0
52


in
Ol




*



c:
o*-*.
i/> > o
3 0
r i-
O. O-
Ul
CO
CD E
E re
I- S-
i CO

z a.




o




in
ai







in
ai
*~


0




in
CD


in
El  1
to
Cl ^ -
a



"oi
C.
t i
O




































-------
using simple process performance relations.   The second is representative of
the various nonlinear programming models.   It requires that the system
structure first be specified in advance and then proceeds to optimize the
integrated design of the individual units  within that structure.  It is
capable of dealing with a complex system structure, multiple pollutants and
realistic process performance models.  Although a recent paper by Adams
and Panagiotokapoulos [26] addresses many of these same concerns and suggests
an approach for dealing with them, detailed computational results are only
presented for a relatively simple design problem previously considered by
Shih and Krishnan [16].

     The decision model described in this report, EXEC/OP, has been designed
to include the six features listed above.   In addition, it is capable of
identifying the M system designs that are within X% of the best design,
where M and X are specified by the designer.  This feature is especially
useful in sensitivity analysis.  In multi-criteria studies, it can identify
system designs that are close to one another with regard to one criterion
(e.g., cost) but could have varying levels of other criteria (e.g., energy
consumption, land utilization).  The emphasis has been placed on developing
a useful design tool, capable of generating attractive alternatives that
could warrant more critical evaluation, rather than producing an automated
procedure for arriving at an optimal design.

-------
                                 SECTION 4

                 AN OVERVIEW OF THE SYSTEM SYNTHESIS MODEL

     This section provides a description of the various conventions  and
assumptions employed in the system synthesis model  EXEC/OP.   It also
discusses the initial steps needed to organize any given design problem
into a suitable form for EXEC/OP.  Detailed instructions on  the use  of
the program can be found in Appendix B.

     EXEC/OP views a waste treatment system as consisting of three treatment
trains - one for wastewater, one for secondary sludge,  and one  for primary
or mixed primary and secondary sludge.   Figure 1  shows  how these  trains are
connected to one another.   Note how the  liquid sidestreams off  of the sludge
treatment trains are recycled back to the wastewater treatment  train.  The
mixing of secondary sludge with primary  sludge is shown with a  dashed line
to indicate that the exact point of mixing will  depend  on the choice of
treatment units in the secondary sludge  train.
                                              Wastewater
                                              Treatment Train
                                              Secondary Sludge
                                              Disposal Train
                                              Primary/Combined
                                              Sludge Disposal Train
           P = Primary Sludge
           S = Secondary Sludge
           R = Recycled Sidestream


       Figure 1.   Conceptual flow diagram of a waste treatment system
                                    10

-------
     The building blocks of each treatment train are referred to as treat-
ment stages.  For each stage the designer indicates the various unit
process options that are available for selection.  These units can be
different types of treatment processes or operations (e.g., activated sludge
versus trickling filter), or different design levels of the same process
(e.g., activated sludge with mixed liquor volatile solids concentration of
2000, 2500, or 3000 mg/1).  Table 3 lists the types of unit processes and
operations that are currently available to EXEC/OP.  Each of these has a
performance model, in the form of an EXEC/OP subroutine, that will compute
effluent quality, sidestream quality, equipment size, and resource utiliza-
tion (cost, energy, land) as a function of the influent waste quality and
a set of process design parameters.  Most of these subroutines have been
taken from the EPA EXECUTIVE program [2].  Appendix C lists the design
parameters associated with .each process, indicates which additional design
information is computed by the process model, and cites references for the
technical details of the models.

     It is important to understand that the design level or performance of
each process option is fixed in advance by the analyst by assigning values
to these input design parameters.  Thus, for example, if EXEC/OP should
choose gravity thickening over air flotation thickening at some sludge
treatment stage, it does so on the basis of the solids loading rate and
thickened solids concentration that was assumed for each type of thickener.
Of course the designer is free to employ several gravity and/or flotation
thickener options, each with different performance levels, to help refine
the selection.

     Within each treatment train only a serial arrangement of processing
stages is possible.  Parallel treatment units or recycling of waste streams
among the units of the same treatment train is not allowed.  Thus a group
of process units that normally operates with a recycle flow, such as the
aeration basin and final settler of the activated sludge process, is treated
as a single unit with its own performance model and EXEG/OP subroutine.
Added flexibility for creating alternative configurations of units is provided
by means of the "null process" unit.  'This simply indicates that the choice
of no processing at a given stage  is also a possibility.  Examples illustrat-
ing the use of the null process alternative are shown in the various sample
design problems considered throughout this report.

     Each treatment stage has an influent waste stream entering it, an
effluent stream leaving  it for the next stagehand, in most cases, a side-
stream generated from the processing activity.  For wastewater treatment
stages these  sidestreams would be  sludge streams while, for sludge treatment
stages they may be filtrates, supernatants, etc.   Each sludge stream is
assigned to either the primary or  secondary sludge treatment trains for
processing.   Of course eventual mixing of these  streams  is possible depending
at what stage secondary  sludge treatment ends.  All sidestreams from sludge
treatment are sent to a  designated stage in the wastewater treatment train.

     The contents of each wastewater  and sludge  stream are modeled with the
parameters  listed in Table 4.   In  addition to these, each  sludge  stream is
                                      11

-------
          TABLE  3.   UNIT  PROCESSES  CONTAINED  IN  EXEC/OP
   Wastewater Treatment
   Sludge Treatment
Raw Wastewater Pumping
Preliminary Treatment
Primary Sedimentation
Aeration and Final Settler
(Activated Sludge)
Primary Sedimentation, Aeration,
Final Settler with waste activated
sludge returned to the primary settler
Trickling Filter
Rotating Biological Contactor
Chlorination
Gravity Thickening
Air Flotation Thickening
Anaerobic Digestion
Aerobic Digestion
Nonoxidative Heat Treatment
Elutriation
Sand Drying Beds
Vacuum Filtration
Centrifugation
Multiple Hearth Incineration
Truck Transport/Land Spreading
Truck Transport/Landfill ing
Sludge Holding Tanks
                                12

-------
        TABLE 4.   WASTE STREAM PARAMETERS  IN  EXEC/OP
   Q
 SOC
SNBC
 SON
 SOP
 SFM
SBOD
 VSS
 TSS
 DOC
DNBC
   DN
   DP
 DFM
 ALK
 DBOD
 NH3
  N03
Volumetric Flow, mgd
Suspended Organic Carbon, mg/1
Suspended Nonbiodegradable Carbon, mg/1
Suspended Organic Nitrogen, mg/1
Suspended Organic Phosphorus, mg/1
Suspended Fixed Matter, mg/1
Suspended 5-Day BOD, mg/1
Volatile Suspended Solids, mg/1
Total  Suspended Solids, mg/1
Dissolved Organic Carbon, mg/1
Dissolved Nonbiodegradable Carbon, mg/1
Dissolved Nitrogen,  mg/1
Dissolved Phosphorus,  mg/1
Dissolved Fixed Matter,  mg/1
Alkalinity, mg/1
 Dissolved 5-Day BOD, mg/1
 Ammonia Nitrogen,  mg/1
 Nitrate Nitrogen,  mg/1
                               13

-------
 characterized as to  its origin  (primary, secondary, or mixed primary and
 secondary) and the type of stabilization it receives  (no stabilization, lime
 stabilization, digestion, digestion plus elutriation, and heat treatment)
 This feature allows many of the sludge treatment processes to be assigned
 different design parameter values depending on the type of sludge handled.

 m    In summary, the preliminary steps needed to organize a design problem
 into a format acceptable to EXEC/OP are as follows:

 (1)  Determine the number of treatment stages to employ in the wastewater
      and sludge treatment trains;

 (2)  Decide on what process options and design parameter values to use
      at each treatment stage;

 (3)  Assign each sludge sidestream generated from wastewater  treatment  to
      either the primary or secondary sludge treatment  train;

 (4)  Determine to which wastewater treatment stage the sidestreams  from
      sludge treatment should be  recycled.

 In practice it will  probably be  necessary to perform steps  1  and  2
 simultaneously to insure that  the  desired options  are  considered  in the
 proper  order.

      Figure 2  illustrates what may be  the result of applying  these prepara-
 tory  steps  to  a  hypothetical design  problem.   Noteworthy features of this
 example as  as  follows:

 (1)   Several design options for  the  same process are included at stages 3,
      T', y, and 12;

 (2)   Sludge from primary sedimentation is sent to the primary sludge train
     while sludge from the activated sludge unit is sent to the secondary
      sludge train;                                                      J

 (3)  The null process option is used in several places to increase the
     number of possible system configurations;

 (4)  The mixing point for secondary and primary sludges will  depend on at
     what stage secondary sludge treatment ends.   E.g., if the null  process
     is chosen by EXEC/OP at stages 6 and 7, mixing occurs at  stage 8    If
     the null  process is chosen at stage 7 but not at  stage 6, then  stage 9
     becomes the mixing point;

(5)  The sidestreams generated  from sludge processing are  returned to
     stage 3.
                                     14

-------
Raw Wastewater
Pumping



Preliminary
Treatment

i *

Primary
Sedimentation 1
Primary
Sedimentation II
1  ^-


Activated Sludge 1
Activated Sludge II
Activated Sludge IV
                                                              Chlorination
T*-
| ' g
Null Process
Flotation
Thickening
8
Null Process
Gravity
Thickening
(R)-*-




Null Process
Aerobic* 
Digestion
(R)
9
Null Process
Lime Stabilization
Anaerobic Digestio
Aerobic Digestion

	 n
1
1
1
1
1
1


nl


10
Null Process
Gravity Thickening
Elutriation


vr/
11 12



Null Process
Vacuum Filtration
Centrifugation
Sand Dryina Beds

--



Truck Transport
& Landfilling
Truck Transport
& Land Spreading 1
Truck Transport
& Land Spreading II
Multiple Hearth
Incineration
Figure 2.  Multi-option flow diagram for a hypothetical design problem

     Once a multi-option flow diagram such as Figure 2 has been established,
EXEC/OP can be used to select the process option at each stage of the system
that will best meet a particular set of design criteria.  The current
version of EXEC/OP contains eight criteria.  They are as follows:

(1)  Initial construction cost (million dollars);

(2)  Annual operation and maintenance costs, including all energy costs
     (dollars/million gallons of flow treated);

(3)  Total equivalent annual cost consisting of amortized capital costs
     plus annual operation and maintenance costs  (dollars/million gallons
     of  flow treated);

(4)  Gross energy consumption consisting  of the direct electrical energy
     needed to  operate equipment, the kwh equivalent of all  fuel consumed,
     and the kwh equivalent of the  energy used in chemical production
      (kwh/million gallons of flow treated);

(5)  Gross energy production as the kwh  equivalent  of  the usable energy
     contained  in treatment by-products  such as digester gas and incinerator
     exhaust gas  (kwh/million gallons of flow treated);
                                      15

-------
  (6)  Net energy consumption which is the difference between criteria 4 and 5
       (kwh/million gallons of flow treated);

  (7)  Total land utilization, excluding those process units with small  land
       requirements (acres);

  (8)
Subjective system undesireability rating,
       The first seven criteria should be self-explanatory.   The  system
  undesireability rating is  arrived at in the  following way.   Each process
  option  is given a  rating by the  designer on  some  convenient scale, say
  u  to  10.   The  higher this  rating,  the more undesireable the process from
  whatever standpoint  the designer wishes to view it.  For example, anaerobic
  digestion may  be rated as  10 and truck  transport/land application of sludge
  be rated  at  3  on the basis  of reliability.   If public acceptance were the
  lusi!el  ?he?e scores  might  be reversed.   Scoring systems can  also be devised
  that  take into account several forms  of undesireable effects.  The total
  system  score is  simply the  sum of  the unit process scores for those options
  selected  in  the  system design.   This  is  an admittedly crude  attempt to
  incorporate  qualitative factors  into the screening process.  Obviously the
  designer  should  use  this feature with considerable caution to insure that
  treatment options are  being  compared on an equitable and acceptable basis.

      The heating value of all  fuels is converted into an equivalent
  electrical energy rating by  using an assumed conversion efficiency figure
 This figure reflects the thermodynamic efficiency of converting  heat energy
 into electrical energy.  Typical  values  would be from 8,500 BTU/kwh (40  per-
 cent conversion efficient)  to 11,300 BTU/kwh (30 percent conversion
 efficiency).

      The criteria listed above can be combined into a weighted objective
 function whose  value is to  be minimized  or can be  assigned  target  limits
 and treated as  constraint conditions by  EXEC/OP.   The objective  function
 would  have the  form
       v =
                                        -  W5C5
                                           ws c6  + w7 c7  + w8
where  the w^  1=1,...,  8  are weighting  coefficients chosen by the designer
and  the  c-,  i=l,...,  8  are  the  individual criteria values.  Note that w. c.
is given d negative value since energy  production is to be maximized,  fhe5
weights  should  reflect  the  relative value that each criterion should contri-
bute to  deciding which  system design is "best".  For example, if reducing
total  cost were thought to  be twice as  important as reducing gross enerav
consumption, then the values of w~ and w.
simply minimizing total cost, onewould S
                                    should be in the ratio 2-1
                                  et w
                                                                       For
                                               = 1.0 and all other w. = 0
                                                                    i
     Another use for these weights would be to assign a cost credit to any
energy produced through waste treatment.  For example, if the value of such
energy net of its conversion cost was $0.011/kwh and one was trying to
minimize total cost then w3 = 1.0 and wg = 0.011 with all other w. = 0
                                     16

-------
Note that the cost of energy consumption is accounted for in the cost
criteria 2 and 3.

     When the above criteria are considered as constraints, each is
assigned an upper limit (or lower limit for energy production) which
cannot be exceeded by any feasible system design.   An additional set of
constraints consists of the required effluent quality of the wastewater
discharge.  EXEC/OP can consider effluent standards for 5-day BOD, total
suspended solids, phosphorus, ammonia nitrogen, and nitrate nitrogen.  Limits
on discharges of residuals to the land and air can appear as part of the
design parameter data for the individual process units.  For example, the
process model for land application of sludge asks the designer to supply an
allowable nitrogen loading rate in Ib N/acre.

     EXEC/OP can operate in- two different modes of calculation.   In the
optimization mode it selects the combination of process options that will
best meet the stipulated design criteria.  In this mode the program can
also be asked to identify the M next-best designs that are within U of
best, where M and X are chosen by the designer.  The single design evaluation
mode allows the  user to obtain a detailed description of the  performance of
a  particular system design.  This includes the composition  of  all wastewater
and sludge streams and the values of all computed unit process  design
parameters -  information that is not available from  the optimization mode
because  it would require a prodigious amount  of computer output.  The  same
input  data is used for both modes except that the last lines  of data for a
single  design evaluation lists  the  process option to be  selected  at  each
stage  of  the  system.

     The  computational algorithm of EXEC/OP  employs  two  basic features.  The
first  is  the  replacement of  the'recycle stream from  the  sludge treatment
 trains  by a  vector of  penalty  terms.  These  penalties  approximate the  change
 in the value of each design  criterion as a unit of .mass  flow of each com-
 ponent of the sidestreams  from sludge  treatment  is returned for treatment
 in the wastewater treatment train.   This device converts the entire treatment
 system into  a serial  one,  where the waste  stream  entering  stage i is only
 affected by  the decisions  made at stages  1,  2	  i-1.

      The second computational  feature is an implicit enumeration algorithm
 that is used to find the .optimal unit process choices for the penalty-
 augmented serial system.   It is able to screen out large categories of
 possible process combinations by employing a simple bounding property.  I he
 result is that only a small fraction of the total number of system configura-
 tions need to be explicitly evaluated.

      Since the values of the recycle penalties depend on the choice of
 unit processes  in the system, an iterative procedure is employed to update
 the values of these penalties.  After each iteration has identified a new,
 potentially optimal system design by implicit enumeration, the units
 selected for that design are used to establish new  penalty values and-
 another  iteration begins.  The process stops when a previously generated
 system design  is once again arrived at.  The final  design  is  taken as the
                                      17

-------
ss
                                             a
     The use of recycle penalties is a heuristic device and thus thPrP ic
no guarantee that EXEC/OP will be able to identify the true mathematfca
optimum design   However the error involved would most certainly be sma 1
since the recycle stream from sludge processing usually represents onT?

JhpT?J Kf .th,6 *tal !?aSte Ioad1ng on the s"stem'   Also! the sea?chyfor
dSJlSn X ^  ^  f?19"5 SaS6d n Pena1ty values ma* be able to identify a
design that actually performs better than the best design arrived at in the
optimization portion of the algorithm.   An example of this is  shown in one
nf 22 "s?.s*udles Presented in the next section.   Finally,  gi Jen the nature
of the _ preliminary screening process, the designer is less interested  in
obtaining a mathematical  optimum than in generating a set of attractive

               ^^                            Clea^ ^^or.   EXEC/OP was
                                   18

-------
                                  SECTION 5

                                CASE STUDIES
     This section demonstrates the capabilities of EXEC/OP by means of
several system design case studies.  It should be understood that the
problems analyzed are purely hypothetical.   The values used for the process
design parameters were specifically chosen  to make several processes com-
petitive with one another.  Therefore, no general conclusions regarding
the general superiority of one type of process versus another should be
drawn from these examples.

     The case studies to be presented were chosen to illustrate the following
types of design problems:

(1)  Cost minimization of a conventional secondary treatment system with
     the emphasis on the choice of sludge management strategies;

(2)  A cost minimization of secondary treatment featuring several non-
     conventional arrangements of primary sedimentation and activated
     sludge units;

(3)  Refinement of the design for Case Study 1 with the emphasis on the
     choice of design parameter values for a fixed arrangement of process
     units;

(4)  A detailed performance evaluation of the design arrived at in Case
     Study 3;

(5)  A cost/energy-effectiveness analysis for the process options considered
     in  Case Study 1.

     All of the case studies  are for  a 10 mgd system whose  influent waste-
water  characteristics are given in Table 5.  Values assumed for various
economic parameters  are  shown in Table 6.  All examples must provide  an
effluent quality of  30 mg/1 of 5-day  BOD and 30  mg/1 of suspended.sol ids.

CASE STUDY 1
      In  this  example,  the  least  cost  combination  of  process  units will be
 found for the multi-option flow  diagram  in  Figure 3.   In  addition, the
 four system designs  closest to least-cost will  also  be sought.   Note that
 several  choices  of primary sedimentation and  activated sludge design
 levels are available.   Separate  thickening  and/or aerobic digestion of
                                      19

-------
  TABLE 5.  INFLUENT WASTE CHARACTERISTICS USED FOR CASE STUDIES
             Component
 Value
 Volume flow, mgd
 Suspended organic carbon, mg/1
 Suspended nonbiodegradable carbon, mg/1
 Suspended organic nitrogen, mg/1
 Suspended organic phosphorus, mg/1
 Suspended fixed matter,  mg/1
 Suspended 5-day BOD,  mg/1
 Volatile suspended solids,  mg/1
 Total  suspended solids,  mg/1
 Dissolved organic carbon, mg/1
 Dissolved nonbiodegradable  carbon, mg/1
 Dissolved nitrogen, mg/1
 Dissolved phosphorus, mg/1
 Dissolved fixed matter, mg/1
Alkalinity, mg/1
Dissolved  5-day BOD, mg/1
Ammonia nitrogen as N, mg/1
Nitrate nitrogen as N, mg/1
  10.  (37,850 cu  m/day)
 105.
  30.
  10.
   2.
  30.
 140.
 224.
 254.
 43.
 11.
 19.
  4.
500.
250.
 60.
 15.
  0.
                                20

-------
       TABLE 6.   ECONOMIC PARAMETERS USED FOR CASE STUDIES
EPA Sewage Treatment Plant Cost Index
Wholesale Price Index
Discount Rate
Planning Period
Direct Hourly Wage
Fraction of Direct Hourly Wage
  Charged to Indirect Labor Costs
Cost of Electricity
Cost Escalator for Yardwork, Laboratories,
  Legal Fees, Engineering and Interest
Efficiency of Converting Heat Value of
  Fuels to Equivalent Electrical Energy
2.88 (December 1977)
2.00 (December 1977)
              i
0.06375
20 yr.
5.91 $/hr.

0.15
0.033 $/kwh

1.33,

0.31
                                21

-------
waste activated  sludge  is  also  possible.  Ultimate sludge disposal can be
accomplished by  either  land  spreading at one of two alternative sites,
landfill ing, or  incineration.   The  process options shown in Figure 3 can
be arranged into 15,360 different system configurations.
Ran Waslonater
Pumping
 i
Preliminary
Treatment

	 1 >.
Primary
Sedimentation 1
Primary
Sedimentation II
 ff
Activated Sludge 1
Activated Sludge II
Activated Sludge III
Activated Sludge IV
                                                              Chlorination

]r
i
i
.*.


Null Process
Flotation
Thickening
8
Null Process
Gravity
Thickening

-r-
I
i
1

1
Null Process
Aerobic*
Digestion

Ol)
9
Null Process
Lime Stabilization
Anaerobic Digestion 1
Anaerobic Digest!
Aerobic Diaestion

^-^


on II

*-l
1
'



(P)
10
Null Process
Gravity Thickening
Elutriation






(S)
11
Null Proc

Vacuum Filtration
Sand Drying Beds





12
Truck Transport
& Landfilling
& Land Spreading 1
Truck Transport
Si Land'Spreading II
Multiple Hearth
Incineration
           Figure 3.  Multi-option flow diagram for case study 1

     Table 7 provides information on the input design parameters for the
unit process options.  Additional data for the vacuum filtration and centri-
fugation options are given in Table 8.  Since this example seeks to minimize
total cost, the only non-zero selection criterion weight is for criterion 3,
total cost.  All constraint limits on the various criteria have been set to
arbitrarily high numbers  (or to 0 for energy production).

     The results of running this problem with EXEC/OP are shown in Table 9.
The first portion of the  table lists the designs arrived at for each itera-
tion of the optimization  phase of EXEC/OP.  These are then followed by a
listing of the 5 least-cost designs identified in the sensitivity phase of
the program.  These results show that three iterations were needed on the
penalty terms to obtain the least-cost design.  It consists of using 60
percent solids removal in primary sedimentation, activated sludge at 3000 mg/1
mixed liquor volatile solids and 30 percent recycle, anaerobic digestion of
mixed primary and secondary sludge for 15 days, thickening to 5 percent
solids, sludge drying on sand beds, and incineration .of dried sludge.   The
total cost is 27.6 
-------
        TABLE 7.   INPUT PROCESS DESIGN PARAMETERS FOR CASE STUDY 1
 PRI = primary sludge
          Process
WAS = waste activated sludge
   Design Parameter
MIX = PRI + WAS
      Value
Pumping

Preliminary Treatment



Primary Sedimentation I

Primary Sedimentation II

Activated Sludge Ia


Activated Sludge II


Activated Sludge III


Activated Sludge IV


Chlorination
Air Flotation
Thickening
Gravity Thickening
Pumping Head, Ft.

Grit Removal
Flow Measurement
Screening

TSS removal, %

TSS removal, %

MLVSS, mg/1
Recycle ratio

MLVSS, mg/1
Recycle ratio

MLVSS, mg/1
Recycle ratio

MLVSS, mg/1
Recycle ratio

Chlorine dosage, mg/1
Contact time, min.

Solids recovery ratio
Underflow TSS,.%
Loading, Ib/day/sq ft

Solids recovery ratio
Underflow TSS,

Loading, Ib/day/sq ft
   30.0

   Yes
   Yes
   Yes

   40.0

   60.0

 2000.0
    0.3

 2000.0
    0.5

 3000.0
    0.3

 3000.0
    0.5

    8.0
   30.0

    0.95
    4.0
   48.0

    0.9
    8.0 (PRI)
    5.0 (MIX)
   16.0 (PRI)
    8.0 (MIX)
aAll activated sludge alternatives are also required to attain an effluent
 quality of 30 mg/1 BODg and 30 mg/1 TSS.

                                (continued)
                                     23

-------
                            TABLE  7  (continued)
           Process
    Design  Parameter
    Value
Anaerobic Digestion  I

Anaerobic Digestion  II

Aerobic Digestion

Lime Stabilization

Elutriation




Vacuum Filtration


Centrifugation



Sand Drying Beds


Incineration



Land Spreading I
Land Spreading II
Landfill ing
 Detention time, days

 Detention time, days

 Detention time, days

 Dosage, Ib/ton dry solids

 Solids recovery ratio
 Underflow TSS, %
 Loading, Ib/day/sq ft
 Washwater ratio

 Loading, gph/sq ft
 Chemical dosage, %

 Solids recovery ratio
 Cake solids, %
 Feed rate, gpm

 Cake solids %
 Storage detention time, days

 Mass loading, Ib/hr/sq ft
 Heat value of volatiles, BTU/lb
 Type of fuel

 One way haul distance, miles
 Cost of land, $/acre
 N application rate, Ib/acre/yr
 Site preparation cost, $/acre
 Spreading cost, $/dry ton

 One way haul distance, miles
 Cost of Iand3 $/acre
 N application rate, Ib/acre/yr
 Site preparation cost, $/acre
Spreading cost, $/dry ton

One way haul distance, miles
Cost of land, $/acre
   15.0

   20.0

   10.0 (WAS)
   20.0 (PRI & MIXl
  200.0

    0.76
    4.0
    8.0
    3.0

   10.0
   See Table 8

   See Table 8
   30.0
   15.0
    2.0
10000.0
        oil
   10.0
 3000.0
  400.0
  500.0
   10.0

   30.0
 2000.0
  600.0
  500.0
   10.0

   10.0
 3000.0
                                       24

-------




^y
o
1  1
1 

CD
 )
u_
1  1

1
2:
LU
O

*
"Z.

r~




T3
CU
P
CO
a CD
co a>
CO !
za a

CO
CO
cu
0
o
s_
D-
-a
c cu
0 E
I-" *I^
p _l
ro
N
i 
i
r
"S
p
CO
3

fV









0)
Q.
>.
i

cu
a>
-o
	 3

CO







CD
0 -*.
~^ UO
=* CM
* 
co  ^> ^
S $ !"
fO 03 -P
_E _E 0

tl si
Q- D-
a.
C7)

r>
CU
p
rO
S-

-a
cu
cu
u_

^^^

c:
o
-p

_Q
r

CU
CO CO
a> o
i TD

rO S-
r- 
"> ^
o
C Q_
cn
i  **-^.
CO
cu ^^
a
E CO
o -a

P J
to o
cn co
^3
H CU
S- 03
P CJ)
E
cu -^
O

o
 pM
-p
rO
S-
>.
i.
CU
>
0
o
cu
s-

co
-a
i 
i 
0
oo

-o
cu
-p
rO

g
4-^
3
i_
LU
-^
-a
cu
p
CO
cu
CD
1
a



-a
cu
-p
to
T3 0)
a> C3i
CO -r-
13 Q

CO
CO
cu
o
o
s-
Q-
T3
c cu
0 E
I *!""
4-> f
fd
N
f
1 '
I
"S
4_>
CO
^
itS
o;









cu
Q.
>^
H-

CU
cn
"^CJ
3
r
co





o
o
1
^^
CM
^^
LO
CM
"^^
cn







o
o
^
CM
^^^
LO
^
^
rO
S
|
S-
D-





O
CO
"***.
^J~
"^X^,
OJ
CM
"-*^.
LO
CTi







o
CO
*"^.
<*
CM
CM
LO
CO
*



O
{)
P
^}-
o"
CO
"""N,
CTi



0
CO
""^.
j >
S -r
res -P
E 0
r~ ^C
S-
D-
25

-------
 to
 UJ
 co

 g
 

 CO

 CD
 t 
 to
 LU
 Q
CO
O
o

CO
2
cr>

LU
_J
CO
               O  CT
 >> o
 CO 3
 s- -a
 cu  o
 E  S- S
LU ca-
            CO E
            s- o
            cu -P- co
            E +>
           Ul Q.I
               E'
           , CO 3
            to to 
            O E .
            S- O
           CD (-3 .
   -P
   to  fO
   O
   CJ
               rd i
   to
   to
   CO  to
   O  E
   CU 4->
      a
   cu cu
   COr-
   o cu
   3 C/J

   to
 to
 to
 cu
 o
 Ore
 S- to
Q_ E
    o

 CU -P
-P O
 rd CU

 cu "cu
P CO
 to
 rd
                 O!
                 P
                 to
                 a>
                 o
                                                     01
 CO
 CM
          o
          co
                         cr>
                         CM
                          E
                       CO O
                       E T-
                      i- -P
                       E CO
                       CU CU
                      j*: co
                       O !-
    co
    E


 O  rd
i  CU
         3 O.
 -P  O -r- CO
 r-  S-  S-
 >  CU -P -O
 rd  rd  3 E
 S-  E i rd
 CS > rd
-Q >, 1_  S-
 O -P Q  CU
 S- !     E
 cu > -a T-
 rd rd  E  o
 E S-  fd  E

_E  -r-

 il  o
Cu  =
                                                     J- rd
                                                     fd >
                                                     S-
                                                    Q.
                                                        0
                        E
                        O
                       r-
                       P
                        fd CU
                        N tO
            r- Q_
            P
             Q.
            O
                                                                                                            CO
                                                                                     o
                                                                                     CO
                                                                                               LO
                                                                                               IO
                                                                                               CM
                                                                                     CM
                                                                                   cu
                                                                                   to
                                                                                   rd

                                                                                   D_

                                                                                   E
                                                                                   O
                                                                                   i
                                                                                   -P
                                                                                   fO
                                                                                   N
                                            P

                                            O


                                            O

                                            CM

                                            E
                                            CO

                                            CO
                                            cu
                                            Q

                                            to
                                            fd

                                            cu

                                            fd
                                            co
                                                                                              00
                                                                                                *


                                                                                              CM
 O CO
r- E
-P -t- t-H
 CO E
 CU CU  CO
 co-i*:  E
I- O !-
a !- -a
    -E  td
 O h-  CU

-Q >, Q.
 O -P to
 S_ -t-
 cu > -a
 rd fd  E
 E S-  fd
et CJ3 _J
                                                                                             E
                                                                                             O HH
                                                                                             t I  t
                                                                                             P 1-1
                                                                                             fd
                                                                                             -P  cu
                                                                                             E  CO
                                                                                             cu -a
                                                                                             E  3
                                                                                             r- r
                                                                                             -a to
                                                                                             cu
                                                                                             00 T3
                                                                                                 cu
                                                                                     -a
                                                                                     cu
                                                                                     3
                                                                                     E
                                                                                     r~
                                                                                     -P
                                                                                     E
                                                                                     O
                                                                                     o
                                                                           > CU
                                                                          i- CO
                                                                          -P rd
                                                                        CU
                                                                        to
                                                                                             S-  rd
                                                                                             fd  >
                                                                                             E T-
                                                                                             r- -P
                                                                                             S-  O
                                                                                             CU <
                                                                                                        CM
                                                           26

-------

































	 ^
73


E
1 ^
E
O
O
UJ
03
eC


























E r
O 03
r- 05

^ Q , 	
cn 3 T-
s--o E
cu o ~-.
E s- -E
UJ Q- S



>^ ** 
Cn E i
S- 0 03
cu -i cn
E 4->
1 1 1 Q-r
E--
CO 3 E

0 E -E
S- O 3
CD o j*:

CO 03
0 en
CD
i 0
03 O
O --^
I -o-






co
CO
cu co
O E
o o
S- T-
p +J
o
cu cu
cnr
"O CD
3 OO




co
CO

o
o
S- CO
D- E
O
S- -r-
Ol 4->
4-> 0
03 CU
cu a>

co
3:





c
cn
CO
cu
O



cn
r











LO
CM
CM
^






co
CM



i l

^-
o cn

4-J -i CO
co E -a
cu cu cu
cn-!*? CQ
i- O
O -r- cn cn
-C E E
O \ -r- T-
.Q >> S-  
0 +?Q -r-
S- - 4-
a> > -a -o
03 03 E E
E S- 03 03
C CD CO 	 1


i  i
i  i
O i i
1 1  1
4-3 1 1
03
4-> CU
E cn
cu -a
E 3
1 r 
T3 OO
a>
CO ~O
^i 1 %
i- 03
03 >
S- O
Q_ eC




CO








CM
**










CO
LO
CO
i 






O
CO
CM



HH
1  1

E
O CJ)
r- E
4-> T CO
CO E T3

cn-^ CQ
i- O E
f~** i cn o
-E E !-
0 H- -r- 4->
r- >, 03
-Q >, S- S- .
f- T- E
CD > T3 !-
fl3 03 E O
E i- 03 E
=f CD CO H-I


i  i
H-l
E
0 H-l
1 H-l

03
4-> cu
E cn
cu -a
 3
r r~
T3 00
CU
C/) "O
CU

S- 03
03 >
S- O
D- eC




^1-








CM
**"










n
r^^
CM
r~






~^
CO
CM



I l
l  i

E
O cn
r- E
4^ !- CO
co E -a
cu (v cu
cn-^ CQ
r- O
Q -i CT> cn
.E E E
O 1 T- T-
-Q >, S- ^
0 4-?Q -^
i. -r- CH-
cu > -a -o
03 03 E E
E S- 03 03
<: CD c/> _j



I"H
E
O HH
I 1  1
4-> H-l
03
4-> CU
E cn
 4-^
S- 03
03 >
S- O
Q- 

4-3
E
a>
03
OJ
s-
4->

S-
d)
4-^
03
'S
d)
4-3
CO
03
CU
.E
E
i
E
O
i
03
E
si
O
f"
O

a
E
03

*
E
CU
fO
cu
t
S-
03
E
r
J;
'a!
S-
0-

E
r-
CX
3
D-
a>
N
r
'43
3
CO
cn
CO
CU
a
I 	
i 
^c
03
27

-------
the low cost of dewataring on sand beds,  the rather severe  nitrogen limita-
tion  on the nearby sludge spreading site,  and the absence of  any air
pollution controls on  the incinerator.  Note that designs 2 and  3 of the
sensitivity phase are  only 0.7 percent  (0.2  
-------
any primary sedimentation.  Several  different design levels for the activated
sludge units have been considered.  Note how, the "null  process" is used
at stages 3 and 4 to allow a choice of one or the other of the two types
of activated sludge options.  The values of the input design parameters
for the unit process options are given in Table 10.  The options shown
in Figure 4 can be arranged into 21,600 different systems.  Once again
EXEC/OP will be used to estimate the top five least-cost designs.

     The results for this study are displayed in Table 11.  Note that
one of the "next best" designs (number 1) is actually lower in cost (by
only 0.5 percent) than the best design found in the optimization phase
(number 2).  This is a result of the heuristic nature of the optimization
algorithm of EXEC/OP and  it demonstrates another advantage to using the
next-best design feature  of the program.

     The least-cost design employs activated sludge at a mixed liquor
volatile solids concentration of  3000 mg/1 and a recycle ratio of 0.3
with the waste activated  sludge returned to the primary sedimentation
tank. Sludge processing consists  of anaerobic digestion, gravity thickening,
sand drying, and incineration.  Total cost is 27.8  
-------
         TABLE 10.  INPUT PROCESS DESIGN PARAMETERS FOR CASE STUDY 2
PRI = primary sludge
     Process
                          WAS = waste activated sludge
                               Design Parameter
                             MIX = PRI + WAS

                                    Value
 Pumping

 Preliminary Treatment

 Primary Sedimentation

 Activated Sludge  Ia


 Activated Sludge  II


 Activated Sludge  III


 Activated Sludge  IV


 Chiorination

 Air Flotation Thickening

 Aerobic Digestion

 Gravity Thickening
Anaerobic Digestion

Lime Stabilization
 See Table 7

 See Table 7

 TSS removal,  %

 MLVSS,  mg/1
 Recycle ratio

 MLVSS,  mg/1
 Recycle ratio

 MLVSS,  mg/1
 Recycle ratio

 MLVSS,  mg/1
 Recycle ratio

 See Table 7

 See Table 7

 Detention time, days

 Solids  recovery ratio
 Underflow TSS, %

 Loading, Ib/day/sq. ft.


Detention time, days

See Table 7
                                 (continued)

                                     30
                                                                   50.0

                                                                 2000.0
                                                                    0.3

                                                                 2000.0
                                                                    0.5

                                                                 3000.0
                                                                    0.3

                                                                 3000.0
                                                                    0.5
                                                                  10.0

                                                                   0.9
                                                                   2.0 (WAS)
                                                                   5.0 (MIX)
                                                                   6.0 (WAS)
                                                                   8.0 (MIX)

                                                                  15.0
                                                                 effluent

-------
                            TABLE 10 (continued)
      Process
Design Parameter-
Value
Elutriation
Vacuum Filtration


Centrifugation



Sand Drying Beds

Land Spreading
Landfill ing

Incineration
Solids recovery ratio
Underflow TSS, %

Loading, Ib/day/sq. ft.
Washwater ratio

Loading, gph/sq. ft.
Chemical dosage, %

Solids recovery ratio
Cake solids, %
Feed rate, gpm

See Table 7

One way haul distance, miles
Cost of land, $/acre
N application rate, Ib/acre/yr
Site preparation cost, $/acre
Spreading cost, $/dry ton

See Table 7

See Table 7
   0.76
   2.0  (WAS)
   4.0  (MIX)
        (WAS)
        (MIX)
                                                                    6.0
                                                                    8.0
   3.0

   10.0
See Table 8

See Table 8
  10.0
3000.0
 400.0
 500.0
  10.0
                                       31

-------
 CM
 a
 LU
 OO
 > O
              05 =5
              S- t3
              CO  O . _
              =  S- S
             UJ Q. J^
 CD C
 s- o
 O) T-
 E +J
UJ Q.t

 tO 3
 C/> to
 O E
 S- O 3
CD O
    to rcf
    o
   CJ
                03
UJ
_J
OQ
=C
   10
   to
   cu  to
   o
   o  o
   S- !-
   a. -4-3

   cu  a
   COi
   o  cu
   3 CO

   oo
                to
                to
                cu
                o
                OrcJ
                S-  tO
               Cu  E
                co ->
               4->  O
                (O  CO

                co
               -> CO
                to
                   E
                   CD

                   to
                   CO
                  o
                       LO
                       00
              LO
              OO
                                   CO
                                   r-
                                   CM
              1^.

              CM
CTl
                       oo
                       CM
                                    E
                                    O
                       to
                       co
                                   O
                                   O
                                   S-
                                   CO
                                   eO
                                   E
                                   =C
       en
       E

    E -a
    o  ea
   -r-  CU
   -P  S-
    n3  Q.
   -p- 00
    S-
   -P T3
    3  E
   r   -a -a
 03  03 E  E
 E  S- 03  03
=a:  CD oo _i
                       E i i
                       O I i

                      43  CO
                       tO  CO
                      P -O
                       E  3
                       CO r
                      a -a
                       cu  cu
                      co -P
                          03
                                   03 -P
                                   E O
                                  Q- +
             p  co
             03  CO
             p -a
             E  3
             CO r
             -a -o
             co  co
             co -P
                 03
                                                10 -P
                                                Q. +
                CM

                 E
                 CO

                 to
                 CO
                Q

                 to
                 03

                 CO

                 03
                CO
            E
            O

            p
            03  CO
            N  to
            r-  03
            E J=
            r- O_
            p
            CL
            O
                                    LO
                                    OO
                  LO
                  OO
                                   OV
                                   CTl
                                   CM
                                                                                                               03
                                                                                                  E
                                                                                                  CU
                                                                                                               03
                                                                                                               CU
                                                                                                               S-
                            CU

                            03

                            CO

                            to

                            

                            CU
                                                co


                                                CM
                                                                       
                                                                       O CO
                                                                      i- E
                                                                      P '
                                                                                                    CM
                                                                       to
       to
     T3
 CD CD CD
 CO-i^ OQ
r- O     
Q T- CO O
   -  T-
 O 1 T- -P
r-    >, 03
-Q >, S_  S-
 O -P Q  CO
 S- T-     
 o> > -a !-
 03 03   O
  S- 03  
 co
                                     i tO
                                     -P (O
                                     r- JE
                                      tO Q.
                                      E
                                      CD
                                     CO
                                                                                                              03
                                                                                                              S-
                                                                                                              o
o

-a
 E
 03
                                                              E
                                                              CU
                            03
                            CU

                           I
                                                                                                 ro
                                                                                                 E
                                                              CU

                                                             Q_
                           CO
                           E
                                                                                                 CU
                                                                                                 N
                                                             to
                                                             
                                                             CO

                                                             to
                                                             CD
                                                             -a
                                                                                                         -a
                                                                                                          co
                                    E
                                    0
                                    O
                                                         32

-------


































^  s
-o
cu
3
E
. ^
E
o
0

LU
CQ
i
































E CD
O
-P *
>5 O -r-
CD 3 E
s_ -o ^.
CU 0 -E
C S- 3
| i i ft . ^jf




CD E (O
S- O CD
CU !-
E -P 
LU Q-r .
E T-
 3 E

O E -E
S- 0 3
CD O -i^



P i
to 03
O CD
0
i 0
03 O
P t
O *.
(_ -fcj-





t/5

cu to
O E
o o
D- -P
O
CU CU
CDr
-a cu
3 OO

CO



to
t/J

o
Oo3
S- tO
D- E
O
S- !
CU -P
P O
fO CU
3 i 
CU CU
P CO
t/)
fO
^3






E
CD
to
CU
o


,
LO
oo











r
OO
oo









,
00
CM







E
O CD
i- E
P T IO
to E "D
CU CU CU
CD-i CQ
r- U E
a !- CD o
-E E !-
O 1  T- +J
^ >, 5- S-
O 4-> Q CU
S- -r- E
cu > -a -
03 03 E O
E S- 03 E
eC C!3 CO i i


E >
0 I-H
I
*-> CU
03 CD
)-> -a
E 3
cu 
E oo

-a -o
cu cu
oo +->
03

g^ ^r
03 -4->
E 0
*I^ ^^
Q- +





oo






^.
LO
00











en
CM
r








CM
OO
CM







E
O CD
r- E
-P T- tO
10 E -O
CU CU CU
CD-i^ CQ
r- O
O v CD CD
-E E E
0 1 -r- -r-
r- >>-
ja >> s- i 
o -P a T-
S- T- M-
cu > -a -o
03 03 E E
E i- 03 03
=C CD CO _l


E >

*|
-P CU
03 CD
P T3
E 3
CU 
E 00
*r^
-a -a
cu cu
oo -P

>, >
t- *r~
03 -P
_E o
Z
a- +





^j-






,_)-
LO
OO











p 
CM
" 








OO
oo
CM







E
0 CD
i E
+J -
t/> E
CU CU CD
CD-^ E
1- O T-
- Q T- -a
-E 03
0 1 CU
I  &-
-Q >> a.
o -P co
S- T-
CU > T3
03 03 E
E S- 03
< CD _J


i  i
0 I-H
 [_
-P CU
03 CD
P "^5
E 3
CU r
EOO
r-
a -o
cu cu
OO -P

>, >
^ *r"-
03 -P
_E o
tl
Q- +





LO




.
E
03
i-

P
E
CU
E
03
CU
i-

^
cu
-P
03
CU

to
03
*
cu
p
E
r

E
0
r
"P
03
E
r-
S-
o
r
C_>
ID
E
03

4!
a>
E
03
CU
s-

>^
5-
E
r-
t 
cr
r-
CU
S-
a.

*
CD
E
r-
CL
E
3
n.

cu
ISl
r-
r
4J
3
to
E
CD
to
CU
-a
r_
^~
^c
n3
33

-------
        TABLE 12.  INPUT PROCESS DESIGN PARAMETERS FOR CASE STUDY 3
Process
Pumping
Preliminary Treatment
Primary Sedimentation I
Primary Sedimentation II
Primary Sedimentation III
Activated Sludge Ia
Activated Sludge II
Activated Sludge II
Activated Sludge III
Activated Sludge IV
Activated Sludge V
*
Activated Sludge VI
Activated Sludge VII
Activated Sludge VIII
a
Design Parameter
See Table 7
See Table 7
TSS removal , %
TSS removal , %
TSS removal, %
MLVSS, mg/1
Recycle ratio
MLVSS, mg/1
Recycle ratio
MLVSS, mg/1
Recycle ratio
MLVSS, mg/1
Recycle ratio
MLVSS, mg/1
Recycle ratio
MLVSS, mg/1
Recycle ratio
MLVSS, mg/1
Recycle ratio
MLVSS, mg/1
Recycle ratio
MLVSS, mg/1
Recycle ratio
	 Value


60.0
50.0
55.0
3000.0
0.3
2500.0
0.3
2500.0
0.3
3500.0
0.3
2500.0
0.35
3000,0
0.35
3500.0
0.35
2500.0
0.25
3000.0
0.25
All activated sludge alternatives are also required to attain
quality of 30 mg/1 BODg and 30 mg/1  TSS

                               (continued)


                                    34
an effluent

-------
                           TABLE 12 (continued)
      Process
  Design Parameter
                                                                 Value
Activated Sludge IX

Chlorination
Anaerobic Digestion I
Anaerobic Digestion II
Anaerobic Digestion III
Gravity Thickening I

Gravity Thickening II

Gravity Thickening III

Sand  Drying Beds
Incineration
MLVSS, mg/1
Recycle ratio
See Table 7
Detention time, days
Detention time, days
Detention time, days
Solids recovery ratio
Underflow TSS, %
Loading, Ib/day/sq. ft.
Solids recovery ratio
Underflow TSS, %
Loading, Ib/day/sq. ft.
Solids recovery ratio
Underflow TSS, %
Loading, Ib/day/sq. ft.
See Table 7
See Table 7
3500.0
   0.25
  15.0
  12.0
  17.0
   0.9
   5.0
   8.0
   0,9
   4.0
  12.0
   0.9
   7.0
   5.0
 aAll  activated  sludge alternatives are also required to attain an effluent
  quality  of  30  mg/1  BODg and  30 mg/1 TSS
                                     35

-------
                            [R
Raw VYastowater
Pumping
^

Preliminary
Treatment

I

Primary Sedimentation 1
Primary Sedimentation II
Primary Sedimentation III
                                                    Activated Sludge I
                                                    Activated Sludge II
                                                    Activated Sludge IX
                                     Chlorination
             Null Process [. Null Process |
             Null Process
                        Anaerobic Digestion I
                        Anaerobic Digestion II
                        Anaerobic Digestion III
Gravity Thickening 1
Gravity Thickening II
Gravity Thickening III
(FiV 	
*-| Sand Drying Beds


             Figure 5.  Multi-option flow diagram for case study  3

      The significant input  design parameter values  associated with the unit
process options  are given in  Table 12.   The resulting least-cost selection
arrived at by  EXEC/OP is shown in Table  13.  Since  only the single least-cost
design is desired there is  no sensitivity phase listing for this example.
Only two iterations on the  recycle penalty values were needed to reach a
design whose total  cost is  26.95 if/1000  gal.   This  gives only a  2.4 percent
savings over the initial design.  The improved design indicates  that one
should try to  remove as much  solids as possible in  primary sedimentation,
use  the highest  solids concentration and  lowest recycle ratio in activated
sludge, use the  minimum amount of digestion time and  thicken to  the greatest
extent possible.   The CPU time required  for this problem was 26.63 seconds
on the DEC POP 11/70.
                       TABLE 13,  LEAST-COST DESIGN FOR CASE STUDY 3
Wastewater Process
isign Selections
Sludge Process
Selections
Total Cost

-------
     The results of this case study leads one to speculate on the relative
importance of system structural choices versus individual  unit design
choices.  It may be that in general the former are more critical.  This
would follow as a result of the fact that the acceptable ranges of the
design parameters for most processes are usually fairly small and, as borne
out in this example, the total system resource utilization will be relatively
insensitive to adjustments in the design of a single process unit.

CASE STUDY 4

     This example demonstrates the single design evaluation feature of
EXEC/OP.  Detailed performance is to be obtained for the least-cost design
arrived at in Case Study 3.  This simply requires that the EXEC/OP input
data for Case Study 3 be re-run with the addition of two lines of data that
specify the choice of process options at each stage of the system to be
analyzed.

     The results of running EXEC/OP on this problem are shown  in the printout
reproduced in Figure 6.  Summaries of the process options, the selection
criteria, and the economic parameters are first presented.  Note that each
process option  is identified  by a user assigned option number, a standard
process code number, and the  number of the stage at which the  process.
appears.  Next  there appears  a listing of the criterion values associated
with the process option chosen at each stage of the system.  This is followed
by a detailed listing of the  input and computed output design  parameter
values  and the  composition of the  influent, effluent, and sidestream waste
streams for each process.  For reasons of programming economy, the process
design  data are listed  in  the order in which they are specified  for  each
process description given  in  Appendix C without any additional explanatory
headings.  The  headings on the waste stream constituents  correspond  to the
abbreviations used  in Table  4.

CASE STUDY  5

     The  examples  presented  up until now have  all  been  single  objective
design  problems, i.e.,  minimize  total  cost.   In  this  case study  the  conflict-
 ing  objectives  of  minimizing cost  and  minimizing  energy consumption  will
 be  considered.   It is  shown  how EXEC/OP  can  be used  to  efficiently  identify
 those  system designs  that offer meaningful trade-offs between  these  two
 objectives.   The implication behind a  cost/energy-effectiveness  analysis  is
 that the  market price  of  energy or fuel  does  not represent its true  social
 value  as  a scarce  resource and that the least-cost design will not  also  be
 the least-energy design.

      The set of design options to  be used in this example is the same as
 used in Case Study 1  (see Figure 3).   The analysis is performed by making a
 series of runs with EXEC/OP in which total  cost is minimized while energy
 consumption is constrained not to  exceed a specified target level.   As the
 target level is varied, systems with different cost-energy combinations
 will be generated.  None of these  designs will be inferior in the sense  that
 there will exist some other design that has  both lower values of cost and
                                      37

-------
        u
        t-
        tc
        u
        X
        t-
   ~*   1C
   s.   u
ic   et.
*->   K
a to
13 a.   u
a.      -c
   =.1X1
blOO
-i U. U.
= r-i
o*.
u;i
Xi-
u: E-
   a.
   o
       U
       cc
       D.
                  J- Z
   OC *-l
 z o t*
 u en u
 Vi < U)
 < J tQ

 z 3: to a
 ou 1-1 -< z o
a. LU *
=3 H *
a * H
1 u z
a: a; u
OCOCKKKQtlXCC
oooooooo
atpnunanrf
WlOWtOWWWJWl
WTOIOO303WWW
isSS^g^S
a
a;
SS3500
DOSAGE)
z v

a>
                                                                                                  I to tO O

                                                                                                  I >H >f (O
                                                                                                                 i a a cw
                                                                                                                       in
                                                                                                  i -  c
        H
*> *P W U.
^ r*^ sc
     c o
o o o w

** *' *P IX
     O X
     m -NL
                                                       i o
                                                        -u
                                                        to
                                                 13: H. .
                                                 I   J :
                                                 13 Ui 
                                                 K a: I
                                                 lac a. c
          UJ
          cs
Z CO to to *H
o to to to a
-4 ui (x) Id
(" O U O t>
 o o o -*
z o: a: a: 20
H a. a. a o
a.        a:
o J ^ j u
a J -a J 
                                                                                                        ^:
                                                                                                        U
                                                                                                                       X
                                                                                                                       fc-
                                                                                                                       a.
                                                                                                                       a.
                                                                                                                       o
                                                                                                                to
                                                                                                                an
                                                                                                                  z
                                                                                                               u> o
                                                                                                                               a a
                                                                                                                               o u
                                                                                                                              O w
                                                                                                                              z u
                                           *  !

                                           SS'?
                                           f Z
                                           to -t
                                           o to
                                           ta o
                                                                                                                             *


                                                                                                                             o
                                       (U
                                       to
                                       *
                                       o

                                       s-
                                       o
                                      t-
                   =3
                   Q-
                  4->
                   3
                   O

                  CL.
                  o

                  o
                  LU
                  X
                  LU
                                                                                                                                           IO
                                                                                                                                            O)
                                                                  a> CD DO a> cr 10 -
                                                             .!
                                                          g.!
                                                          11 O  I (
                                                                    38

-------
                                                                                           jooooooooo
                                                                                             ooooooooo
                 oooooooo
                 oooooooo.

                 oooooooo
                 O O O O    O O O
                 G O O O    O O O
                 O O O O    COO
                                                          ooooopor^o*
                                                          oo ooomofno*
          si
                                                                                     fit ir>
                                                                                     u
                                                                                     1
                                                                                     M
                                                                                     a:
                                                                                     U
                                   OOOOOO>OOD
                                   oooootrooo

                                   ooooomooo
                                                                                           |m * S. -X      X
                 f"xi  > H      i ti 
                    03 IO   .=> 4
                   o o aaifl   >
                 a U O U' U E -F-
                 t-      Z U D C 
^
{M
tg^
O

u
H
^
o
z
o

U1







X
u
a x
2 u
MO


m
O Ul
u o






a
x

(g


U

s
3

O
*-t to
CO Ul
l-t U
> fo.
a.

0,0
a to
IO 11

o
fr* QC
0
Ob.

Ut Cft




X X
x u

>t [ll
-^<
y

X fcu

t^t b]
U
HI Z
K O







IK
O

U

U.

X

Ul
[>!
m















                                                                                             |ottr>
                                                                                             n
OC
U
11
                                 a: "->
                  aji32O>*- z K K
                  >-l t .3 IS O 1C   IO
                  f S X O.U.    p U
                                                          f- 111 O   t III >
                                                          W *3 X Z t>    Z E
                                                          = t   O  U- O
                                                                                                                                  H

                                                                                                                                  o
                                                                                                                                  o
                                                                        (S3

                                                                        iA
UXOU.UUb.OU
                                                                                     s z
                                                                                     J O
                                                                                     to ("
                           IO
                           to Z
                           Ul O

                           o e
                           a a.
                           a. o


                           u

                            o

                           to
                                                                                                                      
-------
                                  o o
                                  o o
                                  o o
                   o o o    o o o
                   o o o    o o o
                lOOOOf>OOO
                                                         O O
                                                         o o
                                                         o o
o

z
u
                      o o
                      o o
                      o o
 o o
 o o
 c o
         o o     o o o
 o o
 o o
 o o
 o o
 o o
 o c
      O CM O    O f> O
      o ty o    o H o
   toomomooo
   CO      X  *    *
 til
 O
                      o o
                      o o
                      o o
 e  o
 o  o
 o  o
 uo
k.

J

=3
^^


Z
o
l-l
t-
CL
O

(O
03
U


cc
a.






ii3

^

IO


c o
o o
0 0
*  *
< o o
H

o


tr
M
WOO
u c o
Q 0 0

f- O O

a
=:
-*



0 V
o o
O O
 


0 0
o o
 o o

f-t O O
X
o

p-


09
u o c
ooo
o o
C-i  
=J C 0
a.

^
a



o o
0 C
o o

X

u:
 M    O O O    O O O
10    O O O    O O O
OOOOOC3OOO
*H O   *      O       *
HtCCOCOCDOOO
co to ^- *r    o  o>
u
<
a;    coo    ooo
<    ooo    ooo
xsrooo^coo
uu.      - j  .   .
   toocce o
U Q otr o D o  o
ti O      *O      
HttlOCHOOiOtO
tO tQ ** *V    O ^O xD


IX
                                                                                          o o       o o
                                                                                          o o       o o
                                                                                          O C     m* O O
                                                      to o o    u o o
                                                      U3 O O    OOO
                                                      000       00
                                                         o o
                                                         o o
                                                         o o
                                                                                                                  X X
                                                                                                                  u u.
                                                                                                                     IO
                                                                                                                  bl
                                                                                                                  (X
                                                                                                                        o m o ac o -H o
                                                                                                                  to a.
                                                                                                                     o
                                                                                                                   t to
                                                                                                                        o m o    o o o
                                                                                                                        o r< o    o o o
                                                                                                                        o o o x o o e
                                                                                                                                                    a
                                                                                                                                                     a)
                                                                                                                                                     o
                                                                                                                                                     o
                                                                                                                    OJ
                                                                                                                    S-
                                                                                                                    3
                                                                                                                    CD
                              o in o
                              O CM O
                                                                                      o in o
                                                                                      0^*0
                                                                                              Q  
                                                                                     a o o o    **

K
ul
U.
10
cc
                  O O O    O O O
                  o o o    o o o
               00002000
                                                         O O
                                                         oo
                                                         oo
                                                                                                                     2O*1O
                     o c
                     o o
                     o o
ooo
ooo
ceo
      o e o    ooo
      ooo    ooo
   UOGGOOCO
o o
o o
o o
000
ooo
coo
     o r c    c o c
     O M3 O    OOO
  cjotrocjooo
o
u
                                 in c o
                                 ooo
                                 CD O O
                  000    000
                  ooo    ooo
               oooouooo
                       * o      
                  o o o O rn m o
                                             c  o
                                             o  o
                                             o  o
            ooo
            ooo
            000
                  ooo    o tn  o
                  o <*  o    o CM  o
               OOOCCJOM9  O
                                                                  40

-------
            o o
            o o
            o o
                 ^o co n    o o o
                 *r  o    o o o
               CQC* to CM m o Q o
o o
o o
o o
o o
o o
o o
 > *4       O O
   CM mm    mm m
   O O    -!-
oa in m m m o oo
to     x      *
>rinco sEtnmiA
   m a* 4    V* 4 v*
                                                                                 o o
                                                                                 CD O
                                                                                 ^ O
  m <- to    m a* a*
  CM o CM    -  *H
  mmoimoceao
5  *    " DC      -
  in ^ *- z: in - -*
  o* P r-    * CM CM
O O
O O
O O
o o
o o
o o
                        tl Q
                        -l O
                        t-t a)
                        J
                        i-t
                        at
                        ui
                         o       
                 ov   m OD ** 4 -

0
*-t

Cb
CD

to

Ul
u
a
QC
O.






O
i*
to
0
o
 m
< 0

(^
Q

Z
w
to*
to o

Q O

t- o

o.
z
to*

9
0
o

o



o
o
o

*
^4

0
o

o







o
0
c

o





o
0
o

o



o
0
o

o



,.
*

t
a

z
w
M

u
a

fr*
=3
a.

a
o
















0
o

o







0
o
0

o





o
o
o

0



o*
CM
CM

v^
M
CM
O
O
0

o







0
o
0

o





o
o
o

0



o
0
0

0


4
z z m
Ob. "
to m
Z ^n
4
bl
ac
t-
to

Q m

to a, o
o 


E-
Z
U
2
i 
U CM

I O 
to o
z *^
UJ
u.
to* O>
m
O *>D
HI 
zm
to m

CM CO
<*>:>
 **3
m tn <

*o
41




CM r**

ao m z
 tz.
o -r Q

f



CM Ok
co m

-  Q

0
CM

to m

^ CD Z
 -a
m r
4 CM
r*
*o
m
^4
*
CM
\D
CM





O
3
0

O
o




-n
^4
*

^O
CM





0
o
o


o
tn



m
*M
a
CM
O
CM





0
o
o
*
o
o
in



A m m
V*
o

^



vt
o*
*
'S1



0* O*
o


CM
CM

o
*

(M
CM

^4
o

*



ex
o
t*

CM
CM

o o
o o
o o
CM O O
^ o o
10 O O
                           O  *CQ     
                           vjae m m z   t
                              o ^ - a*^  


z
c
l-l

a,
o
m
m
bl
U
O
a
a.

*

u
u
(I
CO


















0
o
0

o
o
0
tn
 
< o
ft
O

Z

*-
(0 O
td O
O 0
f- O
O 0
CL CM
to*


0
m
CM
C




O
o
0
0
o
in
*>
o
o
o
o
m

0
o
0

0
o
0

w





o
o
0
J




o
o
o
o
m



o
o
o
o
o
CD

o
tn
o
o






EC
4
0
z
19
M
to

a

0
CL

a






















CO
r--
<4J

o
c

CM

o





o
o
o
4




"1
r-
in
m
4



r+-
0
o
o



^
tn
-
<^


0
o

r*-
o
in
CM
<
o





r-
m
r*
ax




j^.
CM
00
o
CM
ao


O
1C

m
o
m

*C (ft
r* o
-4 tn
CO CM

CM
 mm
oo .* ^.
u o ~**
* c  
e- cc * r-
to co in
a
u
a CM os
i r* o*

U fef  

u
cc
4
to
Ii3
O CM O
 i m *tJ*
03 & OB CM
1 CC 0 0
9-
u
=5
J
U. CM V
al CD m
35 * O
J ** CM
fr'
2
 ^*
U m m
S m o
*T 

* cc
ITS Q
CM
in
tn
w

 3
0 





t^.
v -x.
0 O
.4



o
*
** Oi
in*0
^i
^*-


m



CM
CM




O
0
o
0
o
m



(>
CD
c^*
tn




S
OB
T
CM


0
O
o
H
04

a
OJ
c


l~*
d
0
0
*i ^




^O

<1J
Z3
O5
r"
LL.




















            in o o
            =T> o o
            ** o o
                                                                                  O O
                                                                                  o o
                                                                                  o c
                                                                                  C* O f-
                                                                                  CC O CD
                                                                                  (MOO
                                                                                     a- o c*    IT   <~
                                                                                     *- O '    01 r*  p
                                                                                  o c o o u * CM  c*
                                                                                            o      
                                                                                     o o o Q m r*  r->
                                                                  41

-------
             o o
             o o
             o o
                                           o o  o    o o o
                                           o o  o    o o o
                                        to o o  o m o o o
                                        tO         O    *  
                                        HOOO2OOO
                                                                                            00*0
                                                                                            r- m o
                                                                                         tO f*- OD O f
                                                                                                                             o o  o
                                                                                                                             o o  o
                                                                                                                            ) O O  O
              30       00
              90       00
              >0       00


              >       O O
                               - -*  O   Ov C* O
                               O O  O   t  O
                            to r*) r*i  o *** co CD o
                            to      x      

                            >*>^>  c z ->  c
                               CM CM       CM CM
                                                              O O
                                                              o o
                                                              o o
                                                                 
                                                              o *~
                                                                                               o o
                                                                                               =3 O
                                                                                               o o
 oo
 o o
 o o
  >T1       CO
                                         in in o    in in o
                                     CO     $ O    ^ * O
                                     UQ^" O CU> IT O
                                     MO     O  
                                     H co r-r- o a CM CM o
                                     tO CO          O CM CM
                                                                                   c o
                                                                                   o o
                                                                                   o o

                                                                                   o o
                                                                          o  o
                                                                          o  o
                                                                          o  o
                                                                             
                                                                          o  c
                                         O O O    TJ- f- o


                                     CJQ01OOOOI-G
                                                                                               H    CM OC
2
o
o.
o

U3
m
UI
u
             c. o
             o o
             oo
   o  o
   o  o
  o  o
  >"    KO O
         IQ O O
         u o o
         a oo

         H O O
         = =>
         Q. 
o o
oo
m o
m
uo o
o o o
   o o
I-     
so o
a.
*
=>
o
                        o o
                        o o
                        o o
                        (-.
                        z
                        u
                               tF o o    TO m o
                               o> ot o    t^- r- o
                               ^C -D OX -4-4 O
                             .    *   J       
                               in m o < CM CM o
                               o o o    o o o
                               ^ *r o    o o o
                            O.CNOJ 0X000
                            o       u*  
                            eaooooooo
                                           o o
                                           in in
                                         .^*^0
                                                
                                          in m o
fl
a.
o

n
ta
u
u
D
OC
   o o
   o o
   o c

c o o
f
a
o
                                                                               woo
                                                                               1*2 O O
                                                                               a o o
   o c
   o o
 o o

t-i O O

a
            10
            tu o o
            on o
                                                                                                          x :
                                                                                                          U 1
                                                                                                                m in
                                                                                                                *c %c
                                                                                                                tn in
               bl
               a
               H
               re
               u:
               O    <4? v-l O
               H    !~ fV O
                                                                                                           OACMCC C
                                                                                                                  m
                                                                                                                 CM r-
                                                                                                                                            TD
                                                                                                                                             O)
                                                                                                                                            o
                                                                                                                                            o
                                                                                                                                                         o    -- *
                                 r- o     -^
                                          CMC*
                                                                                  o o
                                                                                  o o
                                                                                  in o
                                                                        ^ o
                                                                        m o
                                                                        CC C
                                                                                                                            - *- o
                                                                                                                            cc r* o
                                                                                                                          :  -  o o o
                                       D     CO  
                                       woo cz->  o
                                          **    o  
                                                                                 o o
                                                                                 o o
                                                                                 o o
                                                                        If} O O
                                                                        o o o
                                                                         o o
                                                                                                                   *CD  *
                                                                                                               r-r-  02   o
                                                                                                               O *)     O -*->
           OC
           O O
           OC
            00
            V  O O
            000
                                          o o o    -*  o
                                          o o o    r* r* o
                                       O O O O O CM CM o
                                                o      
                                          o o o a i-" r- o
                                                            o c
                                                            o o
                                                            o o
                                                                                                          o       
                                                                                                    o o  o a  **>  o  o
                                                                    42

-------
                       o o
                       o o
                       o o
                                         O O O
                                         o o o
                                        O O O
x
O
            O O
            O O
            o o
o o
o c
o o
                       o o
                       o o
                       o o
            o o
            o o
            o o
                                   ..    c o c
                                   O D '
                                   -< O
                                               c  c: oc oc  -
                                       i r-     ^ i ^ O    C O C
                             CM r* c    o o o
                            . ^r ac oz,s- oe
                             "  " ~ '"  E*.       
                                                                                    a>
                                                                                    s-
            o o
            o o
            o o
            oo  o
            in  o
               
            m o
                                         r^To o a. w er  o
                                          o  
                                         in %c o    coo
            o o
            o o
            o c
            o o
            o o
            o o
                             CD W  C    O O O
                             CN O*  O    O O C
                             *^*  eoooo
                        o c o
                        o o o
                        coo
                                            o o o o o o
                                                                             43

-------
                               CM O*T    OOO
                               in 000    ooo
                            CO CO O - *> O O O
                            to  .    . o    .  .
                            fr**OCMZOOO
                               m o to
                                O 0>
                               < O CM
                                                                     O O
                                                                     O O
                                                                     O O
                                                                        .

                                                                     O O
                                                                                                               ooo    ooo
                                                                                                               ooo    ooo
                                                                                                            toooomooo
                                                                                                            16       . o   .    .
                                                                                                            CHOOCZOOO
                                                                                                               000
                                                                                                               ooo
                                                                                                               O O 01
                                                                                                               r- o
 o o
 o o
 o o
o c
o o
o o
                                                                                  o o
                                                                                  o o
                                                                                  o o
                                                                                    o  o
                                                                                    o  o
                                                                                    o  o
                               a* ** cs    t  
                               r- in -
                               in * CM
                                                                                      r^ r- cs z r
                                                                                      ^ O r-
                                                                                      in to   >
                            10 ^  CM O
                        s:   m  in oo
to
u
o    *c
*-l    CM f
to a. CM c
   o  .
                                          ooo
                                          \o ic  to
                                         C CO CD  CD
                                          000
                                          ooo
                                          o o o
o o
o o
o o
            o a
                
            o c
           2
           U
           3
           J
           U.
           u.    m
           u    r-
                                   - 00  O O O O
                                   ) -<    000
                                         m in m
                    CM r
f o o
Z I 00
O 1 0 O
HI ....
El
a.
0

IO
ra
u
u
o
cc
Cb


~

u
1
fc-l
to
MI m o

(^
a


w
^4
to c o
w o o
on o
e* o o
3
a
M

0 0
0 0
0 0
o o
 00

t- 0 O

o

X

t^
10
III O O
ooo
0 0
 o o
a.
c
0

o o
o o
                                                                                                    oo o <*>    r* r- r-



                                                                                                *HO      O   
                                                                                                E-tOQO  a>
                                                                                x    in CM cs    m  m
                                                                                t    * CD m    r* r- r-
                                                                                U    tD vO       (M Oi (N
                                                                                cc    ^ r-
                                                                                      r- CM *4
                        z
                        u
                        =>
                        J
                        u.
                   i QD m a.a^ o
                     *   o        
                   > fO A    OOO

                   . m _    ^, ^
                    n
               o c o
               000
	     _.   o o o
O    *  * IK*  
O9r-f*ICMOOOO
   m CM -H    ooo
   *^f GO       to m if)
                                                                                                a.
                                                                                                U.    CM * **    V ^ 
                                                                                                U    fs o w    r r> r^
                                                                                                   zoo r->aDa.oia*
                                                                                                IO    *  " D  *
                                                                                                   to m u> -*    ooo
                                                                                                fr-t    ^ * r*    0*0*0-
                                                                                                at    m v       -H -H *4
                                                                                                U    CM O
                                                                                                                     -a
                                                                                                                      (U
                                                                                                                      3
                                                                                                                                   O
                                                                                                                                   o
                                                                                                                     10
                                                                                                                                   0)
                                                                                                                                  CT>
                           z as n o    in in in
                           o *
                                                                                      in r~ ~* o -^ *H *^
                                                                                      to *H to
                                                                                       o
                        in o o
                        in o o
                        so o o

                        D O O
                        in
                              a- ^- *c    tn in in
                              o o o o o o o
                                                                     o o
                                                                     o o
                                                                     n o
                                                                    o- c o
                                                                     oo
                                                                    r~ o e
                                                                                                   cr o  o  c  o  o o
                                                                    44

-------
energy.  It is only from this  reduced,  non-inferior set of alternatives
that trade-offs between cost and energy need  to  be made to arrive at a final
design decision [27].

     The concept of the non-inferior or efficient set  of  alternatives in
a multi-objective design problem is graphically  illustrated  in  Figure 7.
This figure considers  a case where there are  only ten  feasible  system designs
and plots the position of each alternative on a  set of cost-energy axes.
Consider a comparison  between alternative A and  alternative  B.   No meaningful
trade-off exists since B dominates A in both  cost and  energy.   A is said to
be inferior to B and can be discarded from the decision making  process,
providing that cost-and energy-effectiveness  are the only decision criteria.
The non-inferior or efficient set of designs  are those that  are not inferior
to any other design.  By inspection we see that  alternatives B, D, F, and
H form the non-inferior set for Figure 7.  All other alternatives  could  be
ignored.
                500
             CD
             o
             u


             3  300

              O)
              L.
              0)
              C  -
             LU
                200
                 100
                               .A
                           B\
                    10
                                      
                                               J_
                                                 H
20
   30       40       50

Cost, t/10OO gal.
                Figure 7.   Illustration  of the non-inferior set
                                      45

-------
      For the ten designs considered in Figure 7 it was possible to identify
 the non-inferior set by inspection.  Had there been a larger number of
 alternatives and objectives a more systematic procedure would be needed.
 The constraint method, as described above, wherein cost is minimized while
 energy is constrained not to exceed various target levels, is one such
 procedure.  Thus in Figure 7, if we minimize cost and constrain energy to
 not exceed 150 kwh/day we obtain alternative H; for energy constrained any-
 where between 150 and 220 kwh/day alternative F is identified;  and so on
 Of course a final choice between systems B, D, F,  and H would depend on the
 designer s subjective preferences regarding the relative value  of the cost
 and energy figures for these designs.   Although the concept of  non-inferiority
 was demonstrated here for only two objectives it also applies to higher
 dimensional problems as well.

      Referring back to the process options of Figure 3,  EXEC/OP was used to
 perform a cost/energy-effectiveness analysis for two different  conditions:
 a) no energy recovery was practiced and b) digester gas  was converted into
 electricity with 31  percent efficiency at a net credit of 0.011  $/kwh (the
 commercial  price of electricity minus  an assumed conversion cost of 0.022
 $/kwh).   In both cases the same EXEC/OP input data as  in Case Study 1
 (Tables  7 and 8) was used with the following exceptions.   With  no  energy
 recovery,  the value of the constraint  limit on gross energy consumption was
 reduced  from one run to the next to obtain a series of least-cost  designs
 under progressively tighter energy constraints.  A similar procedure  was
 followed for the case of digester gas  recovery except  that the  weighting
 coefficient for  energy production was  set equal  to the cost credit  of 0.011
 $/kwh  and  the net energy consumption constraint  limit  was  reduced at  each
 successive  run of EXEC/OP.

     As  an  example of the  type  of results  obtained from  this  procedure,
 Table  14 summarizes  the  EXEC/OP  output  for  the case where  net energy  con-
 sumption  (with digester  gas  recovery) was constrained  to be at or below 850
 kwh/mil. gal.  Note  that the  first  design arrived  at in  the optimization
 phase  is infeasible  because  its  net energy  consumption is  911 kwh/mil.  gal.
 The best design  is found to be number 2.   In comparison with the least-cost,
 energy unconstrained  design it substitutes  landfilling for  incineration of
 sludge, thus reducing net energy consumption from  888  kwh/mil. gal. to  806
 kwh/mil. gal.  Note that the objective function values for  this design  equals
 the total cost of the system, 27.76 tf/1000  gal. minus the energy credit of
 0.011 $/kwh times 418.9 kwh/mil.  gal. (the  energy  content of the digester
 gas), or 0.46 
-------












LO

a
:D

co
LU
OO
<=c
o

a:
o
Li
221
CS
i i
OO
III
ill
Q
Q
LU
J2:
I  l
c
cc
CO

o

j^,
c5
f^ff
1 1 1
^
LU

1 
CO
o
0
1
CO
> O M-
05 3 E
s- -a **.
CU O-.E
E S- 3
LU D- -li
E i
>> 0 03
i?"-P """
CU O-i 
E E "r~
LU 3 E
CO ~^
P E .E
CU 0 3
'ZZ. O ^.



p I
CO 03
O Cf5
0
i O
03 O
P i
O ^~-
1 -fc>-

cu

r- CU
-P 3
O <
CU 03
r?
O





CO
CO
CU CO
O E
O O
S- r-
p , +J
O
CD CU
O5r
"O , 03
ja 03 s- s-
O "i  Q CU
S- S- E
CU -P "O -r-
OS 3 E O
E r 03 E
et LU CO i i
i i
E
O i-
-P i i
03
P CU
E O>
CD "O
E 3
o co
cu
OO T3
CU
E >>-P
0 S- 03
r- 03 >

tO CU -r- -P
N CO S- O
r- 03 O- C
E -E
r- Q-
Q.
O r-


.
CO
r 
^*





O
.
UD
O
OO








CO
^
1 
CM




O
CO
*
r*-
CM


1 <
E
0 01
i  E
P *f-~ CO
co c: -a
cu cu cu
CO-iii CQ
t- O
0 -r- 05 CO
-E E E
0 f r~ 1-
i >->r 
0 -P Q ^
S--i t-
cu > -o -a
03 03 E E
E S- 03 03


r- -P
S- 0
Q- -=C



CM


.
00
r
^"





cr>

ID
=r
CO








r^-
r-
i^
CM




, 
CO

P--
CM


f  i
C
0 05
r- E
P *^ t *
CO S=
CU CU O5
CO ^ E
i O -i
f\ r^ "O
-E 03
0 1 CU
.a >> D-
O -P CO
S- T-
cu > -a
(tlT (0 ^Z
E S- 03
 [ I
-P CU
E O5
cu -o
_E 3
o co
cu
CO T3
cu
S- 03
03 >

i  -P
S- 0
D- 
-------

in
>-
CO
co
c
C
O
LJU
CO
5
co
CO
s
UJ
2:
I,M
co
o
0
INFERIOR
1
o

Lf>
UJ
_1
CQ
^


i
P (0
cu > cn
"Z. >*,
o> 
CU CU T-
PEE
CO UJ -^,
> -E
^ J
tO
E  en
CU -l->
P co o
t/) O O
>,0 0
CO i
-
6ULLL.LJ-PUB1
uoLq-EaauLOUi
spsg
6iUA"aQ PUBS
uot4B6nj.Lvi:LU93
6ULU9>|01.1|1
A~tj.LABag
UOLq.BZLLJ.qBq.S
aiULi
(step 91)
I 'iio 14596 LQ DLqoa9Bu\/
6UJ.U8>]DLL|1
uoLq-BioLJ JLV
O)
t->
t/>
%
r~-Looooai covoxi-
C3CMCTtCOC3 COCDOO
POCMOOO ooooi^
3ci^.Lncy> CMCOVO
t~~.i~^Oi  i  r> r^ r-
C\JC\JCOOOCO CMOJCM
X X X X XX
1  1 H 1 1 1  1 1  1 1 1
s s: s s: s: s:
X X
i  i i  i
s s
XX X XXX
H-H 1 1 1 1 1 ( ) 4 | 1
s: s: s s s s:
X X
t ) K 1
s s
XX XXX
1  1 I  i 1  \ 1  1 1  1
s s: s s: s:
X X
1  1 1  1
s: s
XX XXX
i i i  i i  iiii  i
s: s: ^. s s:
a>
j_. .....,_
S- to
cu ^: co
> H-> <
0 OJ 3
o s:
 	 	 	
a: q-
tO to to tO fO O -O .O .O
>, i evi co ^- ir> i CM co
? ^
OJ O)
E >
uj o
o
o  T3
                                                       c  c
                                                       C1J  tO

                                                      +j co
                                                       to co
                                                       CD >
                                                       S	1
                                                       fO  CD
Q
D-

II

X
l l
s:





cu
CD
o
3
to

o
cu

to
>

p
o
to

O)
CO
to
3

II

co
s^
3








CU
CD
o
3
r~
to

>^
S-
to
E
r-
S-
Q.
II
l  i
Q.

E 0
r- 0
. O
CU CO
i- ^-^
D-
l  l
> t 1
r- cu
CL. CD
E -a
3 3
Q- i
C/>
|
-a
E CU
tO tO
S- >

-P
P 0
E cC
CU
E "
^^-N
fO r 
O) tO
s- >
-P 0
^ I
CU S-
-p
to co
S "O
CU !-
P r
to o
to co 
3 E
^^ o
CU CD !-
E 3 -P
tO ^-*^ fO
to E
CU HH S-
jc o
-P E i
O .E
cu -r- o
N -P
i tO TD
 -P E
r- E IO
p cu
3 E >

to -a cu
E O) r
cu co u
P >>
CO >> O
>> i- CU
CO tO S-
1^ i- o
et Q- CO
                                                      CU
                                                      P
                                                      O
48

-------
percent increase in cost.  Of course the final  choice will  depend on the
designer's feelings regarding the relative importance of these objectives
as well as any other criteria that are relevant to the design process.

     The computer runs made for this case study averaged about 2.5 minutes
of CPU time each on a DEC PDF-11/70 computer.  From three to four iterations
on the penalty terms for sludge treatment recycle streams per run were needed.
In addition, each run was asked to identify the five most,least-costly solu-
tions.  It is estimated that on the average, the computatlona  effort required
of each run was only 2.5 percent of that needed to evaluate all 15,360
possible system arrangements individually.

     Hopefully these case studies have  shown how EXEC/OP can be used as a
practical tool for  the preliminary synthesis of waste treatment systems.
Perhaps its most productive  use would be to generate alternative  system
designs that emphasize different objectives in various  degrees.   It^can also
be used to explore  the sensitivity of these designs  to  uncertainty  in various
process performance parameters.  The  information derived from  such  analyses
would  ultimately enter into .the  value trade-off process that culminates  in
a final design  decision.
                                       49

-------
                                   REFERENCES
  1.  Eilers, R. G., et al., "Applications of Computer Programs in the
           Preliminary Design of Wastewater Treatment Facilities -
           Section II", EPA-600/2-78-185b, U. S. Environmental Protection
           Agency, Municipal  Environmental Research Laboratory, Cincinnati,
           Ohio (1978).

  2.  Hendry, J  E., Rudd, D. F. and Seader, J.  D., "Synthesis in the Design
           of Chemical  Processes", AIChE Jour.,  19, 1  (1973).

  3.  "LA/OMA Project Phase I Report", Regional  Wastewater Solids Management
           Program, Los Angeles/Orange County Metropolitan Area, August (1976).

  4.  "Clean Water Act  of 1977", Public Law 95-217, United States Congress,
           \'y//)

  5.  Smith, R., "Preliminary Design and Simulation of Conventional  Wastewater
           Renovation Systems Using the Digital  Computer", Water Pollution
           Control  Research Series Pub.  No.  WP-20-9, U.S.  Department of
           Interior,  Federal  Water Pollution Control Administration,
           Cincinnati,  Ohio (1968).

  6.   Silveston, P.  L.,  "Digital  Computer Simulation of Waste Treatment Plants
           Using the  WATCRAP-PACER System",  Water Poll. Control.  69.,  686 (1970).

  7.   Chen,  G. K.,  Fan,  L. T. and  Erickson,  L. E.,  "Computer  Software for Waste
           Water Treatment Plant  Design",  Jour.  Water  Poll. Control  Fed., 44,
           / T"O \ 1 ./ /  J 

 8.  Shoemaker, T. E. and Barkley, W. A., "Interactive Computer Design  of
          Wastewater Plants," Jour. Environ. Eng.  Div.. Proc. Amer  Soc
          Civil Engr.,  103, 919  (1977).                  '	'

 9.  Bennet, E. R., Rein, D.  A., and Linstedt,  K.  D., "Economic Aspects of
          Sludge Dewatering and Disposal", Jour. Environ. Eng., Div., Amer
          Soc. Civil Engr., 99_, 55 (1973).	'

10.  Kos, P., Meier, P. M. and Joyce, J. M., "Economic Analysis of the
          Processing and Disposal of Refuse Sludges",  EPA-670/2-74-037,
          U.S. Environmental  Protection Agency,  National  Environmental
          Research Center, Cincinnati, Ohio (1974).
                                      50

-------
11.   Smith, R.  and Eilers,  R.  G.,  "Computer Evaluation of Sludge Handling
          and Disposal  Costs", Proceedings of the 1975 National  Conference
          on Municipal  Sludge Management and Disposal, Anaheim,  California,
          August 18-20 (1975).

12.   Burley, M. J. and Bayley, R.  W.,  "Sludge Disposal Strategy:  Processes
          and Costs", Hater Poll.  Control, 76, 205 (1977).

13.   San Francisco Bay Region Wastewater Solids Study, "Screening of Alterna-
          tives", Task Report for Task 3-4.7, Oakland, California (1978).

14.   Lynn, W. R., et al, "Systems Analysis for Planning Wastewater Treatment
          Plants", Jour. Mater Poll.  Control Fed., 34, 565 (1962).

15.   Evenson, D. E., et al., "Preliminary Selection of Waste Treatment Systems",
          Jour. Water Poll. Control Fed.. 41_, 1845 (1969).

16.   Shin, C. S. and Krishnan, P., "Dynamic Optimization for Industrial Waste
          Treatment Design", Jour. Water Poll. Control., 41, 1787 (1969).

17.  Shih, C. S. and DeFilippi, J. A., "System Optimization of Waste
          Treatment Plant Process Design", Jour. San. Eng.  Div., Proc.
          Amer. Soc. Civil  Engr., %_,  402 (1970).

18.   Ecker, J. G. and McNamara, J. R., "Geometric Programming and the
          Preliminary Design of Industrial Waste Treatment Plants",
          Waste Res. Research, 7_, 18 (1971).

19.   Berthouex, P. M'. and Polkowski, L. B., "Optimum Waste Treatment Plant
          Design Under Uncertainty", Jour. Water Poll. Control Fed.. 42,
          1589  (1970).

20.   Mishra, P. N., et al., "Biological Wastewater Treatment System Design,
          Part  I. Optimal Synthesis",  Canad. Jour, of Chem. Engrg., 51_
          694  (1973).

21.  CIRIA,  "Cost-Effective Sewage Treatment - The Creation of an Optimizing
          Model", CIRIA Report 46, Construction  Industry Research and
           Information Association, London, Gt. Brit.  (1973).

22.  Bowden, K.,  et al., "Evaluation of the CIRIA Prototype Model for the
           Design  of Sewage-Treatment Works", Wat. Pollut. Control, 75_
           192  (1976).

23.  U.S. Army Corp of Engineers,  "Computer Assisted  Procedure  for the
           Design  and Evaluation of Wastewater Treatment Systems  (CAPDET)",
           Draft Report, Office of  the Chief of Engineers, Corps  of Engineers,
           Department of the Army  (1976).
                                      51

-------
24.  Patterson, K. E., "Dynamic Programming Approach to Cost-Effective Waste-
          Water Treatment Alternative Selection", presented at 49th Annual
          Conference, Water Poll. Control Fed.. Minneapolis, Minnesota,
          October 3-8, (1976).

25.  Dick, R. I. and Simmons, D. L., "Optimal Integration of Processes for
          Sludge Management", Proc. of the Third National Conf.  on Sludge
          Management Disposal and Utilization, Miami Beach, Florida,
          December 14-16, (1976).

26.  Adams, B. J.  and Panagiotakopoulos, D., "Network Approach to Optimal
          Wastewater Treatment System Design", Jour. Water Poll.  Control
          Fed., 4, 623 (1977).

27.  Keeney, R. L. and Raiffa, H.,, "Decisions With Multiple Objectives:
          Preferences and Value Tradeoffs", John Wiley and Sons,  New York
          (1976).
                                     52

-------
                                APPENDIX A

          MATHEMATICAL DEVELOPMENT OF THE SYSTEM SYNTHESIS MODEL
     To simplify the notation we consider a system consisting of one waste-
water treatment train and one sludge treatment train with the sidestreams
from sludge treatment returned to the head of the plant.  The total number
of treatment stages in the system is N where the first L of these belong
to the wastewater treatment train.

     Each waste stream is characterized by its volumetric flow rate and the
mass flow rates of a number of pollutants of interest (e.g., suspended BOD,
dissolved BOD, total suspended solids, volatile suspended solids, various
forms of nitrogen, etc.).  In general, these streams could also be^described
by such physical characteristics as temperature, viscosity, specific
resistance, etc.  Let each stream contain M components with x.  the flow
rate of component m influent to stage i and s,  the flow rate 6f component
m in the sidestream generated at stage i.  Denote the vector representations
of these waste flows at  stage i as X.. and Si, respectively.

     To once again simplify the notation, assume that each stage has J
alternative process units available for selection.  Let z.. be a decision
variable whose value is  1 if unit j is chosen at stage  i and is 0 otherwise.
Also let f.. and g.. be  vector valued functions that describe how the
influent wake stream to stage i  (X.) is transformed into an effluent stream
(X.,,) and a sidestream  .(S.), respectively, when unit j is chosen.  These
functions will take into account  the type of unit employed, its design
specifications, and the  nature of the influent waste stream.  No restriction
is placed on their  level of complexity.

     To complete the mathematical specification of  the  problem, assume
that K different design  criteria  must be satisfied.   In order to formulate
a meaningful optimization model,  assume that one of these  is stated as  an
objective to be minimized  (e.g.,  total cost) and all others  have target
values b, that must not  be exceeded.  Alternatively, two or more of the
criteria could  be  combined into  a single objective  function  by  forming  a
weighted  sum..   Let c...  be the  contribution  to  criterion k by choosing
 process  unit  j  at  statjli  i.   The  same  remarks made for  the  functions f.. and
 g..  apply  to  c....   In  addition,  it is assumed  that the c..^ are positive
 and non-decreasing with  respect to  the waste stream components  xin).
                                      53

-------
      The system design problem can now be written in the following form:
                Minimize v,
                                 N    J
                   (1)
      subject to v.
                          N    J
                   (2)
                          X,
                   (3)
                          Si   =
                                 j=l
                  (4)
                                                                          (5)
                         =  0  or  1
i = 1.....N

J = I j...5J
(6)
                                        L
                                        Z   S
                                       1=1   1
                  (7)
                                                                         (8)
where v.  is the value of criterion k and Xn is the plant influent waste
stream Vector.                            

     Equations (1) and (2) represent the design criteria, (3) and (4) express
the stagewise transformation of influent waste flows and the generation of
sidestreams, while (5) and (6) insure that only one process unit is chosen at
each stage.  Equation (7) expresses the influent to the sludge treatment train
as the sum of the sludge sidestreams generated in the wastewater treatment
                                      54

-------
train.  Finally, equation (8) closes the loop by adding the sludge treatment
sidestreams to the plant influent.

     Explicit constraints on effluent discharges from the system need not
appear in the formulation since they can be satisfied by careful specifica-
tion of the unit process alternatives.  For example, the process waste stream
transformation functions f.. can be chosen so that effluent concentration is
the fixed design parameter rather than such quantities as percent removal
or size of the unit.

     The above model is a nonlinear integer programming problem with decision
variables z.. and state variables x.  and s. .  Considerable difficulty is
caused by tne presence of the recycle equation (8).  Removal of this relation
would make the waste stream vector entering stage i dependent only on the
process units chosen at stages 1 through i-1 and results in a much simpler
problem.  Suppose that equation (8) is ignored and instead a penalty is
attached to each component of the sidestreams generated by sludge treatment.
Let the penalty p.   be the increase in criterion k per unit increase in
component m of the recycle stream.  A method for computing these penalties
is given below.  Now replace the original optimization problem with a
penalty-augmented one wherein equation (8) is dropped and penalty terms are
added to equations (1) and (2) to give the following revised system criterion
values:
                   =  v,
                               N
                           +   T,
                             1=L+1
                                M
                                S
                               m=l
pkm
sim
(9)
     An efficient implicit enumeration technique is available to solve this
new penalty-augmented problem [Al].  It makes use_of the following bounding
property.  Suppose that a feasible system design z.. with criterion values
v.' has been found.  If at stage q a different process r is proposed and
q-1   J
 Z    E
1=1  j=l
                    cijk
                              qrl<
                                                 for  k=l
                                                 or
                                            b.  for any k
                                                                       (10a)
                                                                       (10b)
then process r and all combination of process units beyond stage q can be
excluded from consideration.  (Note that penalty terms should be added to
expression (10) if q > L.).  This, type of result can considerably reduce the
number of unit process combinations that need to be evaluated.  A systematic
procedure for using this property to identify the optimal values of the
is given in Figure Al .

     The problem remains of establishing representative values for the
penalties for sludge treatment recycle streams.  Since these values will
depend on the choice of process units, which are unknowns, a heuristic,
                                                                         ^ .
                                     55

-------
Figure AT.  Flow chart of the implicit enumeration procedure



                           (continued)
                             56

-------
Figure Al.  (continued)
           57

-------
 iterative approach that successively generates new system designs  and
 corresponding penalty values is employed.   It is described in  the  flowchart
 of Figure A2.

      After each iteration has identified a new candidate  design, the
 criterion values with and without the sludge treatment recycle stream
 (vk(X,)  and v. (X ),  respectively) for this design are  computed.  Then
 new penalty values can be found from
           pkm
 M
 2
1=1
                                       (Av
                                     (ii)
where  (Av.)   is  the change  in  v. (X  ) when a quantity  (AX  )  is added to the
m-th component of the plant infTueHt.  The  (Av. )m are evaluated numerically
by  solution of equations  (l)-(4) and (7) as X0K1S pertubed by an amount
(AX )   under  the current  candidate  system design.  The first term in
brackets  is a numerical approximation to the partial derivative of criterion
k with  respect to system  recycle component m.   The second term is an adjust-
ment factor that allows v^(X,) to satisfy a first.order Taylor series
expansion about  v,.(X ).      '
                 K  0

     Very often  a designer  would be interested  in identifying the system
designs that are within a percent of least-cost (or least-energy, etc.).
The solution procedure previously described can easily be extended to
provide such information.  After the best candidate design is identified,
its corresponding penalty values are used once again in solving the penalty-
augmented problem.  Only this time the right hand side of the bounding
relation (10a) is multiplied by (l+a/100).   Each complete system design
generated during the course of the implicit enumeration algorithm that is
within a percent of the best design is  saved.   Its true performance is
later evaluated  by solving equations (l)-(4),  (7) and (8).
                                     58

-------
                   Begin with all  penalty values at zero.
                Find a candidate system design by,solving the
                penalty-augmented problem 01-17).
                the resulting criteria values as v.
Stop with the final
design as the best of-
the candidate designs.
                         (XQ1.
Yes
 Has  this  design  been
obtained  before  from
 a  previous  iteration?
                                           No
                 Evaluate the true performance of the design
                 by solving equations (l)-(4), (7), and (8).
                 Denote the resulting criteria values as vC
                 Determine a new set of penalty values based
                 on the process units contained in the current
                 candidate design from equation (]!)
                 Figure A2.  Overall system design algorithm
                                     59

-------
                                REFERENCES
AT.  Rodrigo, B., F. R. and Seader, J. D., "Synthesis of Separation Sequences
          by Ordered Branch Search", AIChE Jour.. 21_, 885  (1975).
                                     60

-------
                                APPENDIX  B

                           EXEC/OP USERS'  GUIDE


     As a preliminary step to using the EXEC/OP computer program 1t is
suggested that the user first prepare a multi -option flow diagrant of the
waste treatment system.  An example of such a diagram for a hypothetical
design problem is shown in Figure Bl.  The following simple rules must be
followed in preparing these diagrams:

(1)  Treatment stages are numbered in order, starting with those in the
     wastewater treatment train, followed by those in the secondary sludge
     train, and then by those in the primary/mixed sludge treatment train.

(2)  There must be at least one stage in  each of the three treatment trains.
     If  the possibility of separate  treatment of primary and secondary
     sludges  is not to be considered then the user can  simply use a single
     stage with the "null process" as its only option in the secondary
     sludge train.

 (3)  The unit process  options selected for  consideration at each stage  must
     be  from  those  listed  in Table Bl.   The same type of process can  be
     used at  several different  design  levels  and at  several different
     stages in the  system.

 (4)  The sidestreams from sludge  processing 'can  be  assigned to  any waste-
     water treatment stage except the  first stage.

     Once a multi-option flow diagram has been prepared,  EXEC/OP can  be
 used to select the process option at each stage of  the  system that will
 best meet a set of design criteria.   These criteria are listed in Table BZ.
 They can be combined together in a weighted objective function whose value
 is to be minimized and they can have constraint levels  associated with them
 whose values are not be be violated by any feasible design.
      Figure B2 shows the general organization of the 1jPu*
 A brief description of each category of input along with its FORTRAN format
 now follows:

 Title Card - contains a descriptive title for the problem (40A2).

 Influent Waste Cards - gives the values of the influent waste parameters
      listed in Table B3 (8F10..0).
                                      61

-------
Effluent Standards Card - gives the required effluent  standards for 5-day
       Ds                         nitrogen'  nitrate
Economic^aramete^Cards^ gives values  for  the economic parameters listed


System Structure Card - lists  the number of  stages in the wastewater treat-
     ment, secondary sludge, and primary sludge trains, respectively,  the
     total number of process options considered, and the stage where si fe-
     streams from sludge processing are  returned for treatment (5110)
                  Cf V  9lVes the fta9e where the sludge from each waste-
                                                            Chlorination
1 I
! . 	 8 9 | 10
|?^ Null Process I
' Gravity ~^
Thickening
L_
Null Process
Lime Stabilization
Anaerobic Digestion 1
Anaerobic Digestion II
Aerobic Diaestion


I Null Process
Gravity Thickening




11
Null Process
Vacuum Filtration
Sand Drying Beds

^^



12
Truck Transport
8 Landlilling
Truck Transport
a Land Spreading 1
i truck Transport
& Land Spreading II
Multiple Hearth
Incineration
Figure Bl.  Multi-option flow diagram  for a  hypothetical design problem
                                  62

-------
                TABLE Bl.   EXEC/OP UNIT PROCESSES
     Process
                                        Subroutine ID  Number
Null Process                                     0
Preliminary Treatment                            1
Primary Sedimentation                            2
Activated Sludge (Aeration Basin
  and Final Settler)                             3.
Anaerobic Digestion                              6
Vacuum Filtration                                7
Gravity Thickening                               8
Elutriation                                      9
Sand Drying Beds                                10
Trickling Filter - Final Settler                11
Chlorination - Dechlorination                   12
Flotation Thickening                            13
Multiple Hearth Incineration                    14
Raw Wastewater Pumping                          15
Sludge Holding Tanks                            16
Centrifugation                                  17
Aerobic Digestion                               18
Truck Transport/Land Disposal of Sludge
   (Land Spreading or Landfilling)               22
Lime Stabilization                              23
Rotating Biological Contactor -
    Final Settler                                24
Primary Sedimentation  -  Activated  Sludge -
   Waste Activated Sludge Returned  to Primary
   Clarifie                                     25
Nonoxidative  Heat Treatment                    26
                                63

-------
                     TABLE B2.  EXEC/OP DESIGN CRITERIA
1,
2.
3.
4.
5.
6.
7.
Initial Construction  Cost,  million $
Annual Operation and  Maintenance Cost,  $/mil.  gal
Total Equivalent Annual  Cost,  $/mil.  gal.
Gross Energy Consumption, kwh/mil.  gal.
Gross Energy Production, kwh/mil.  gal.
Net Energy Consumption,  kwh/mil.  gal.
Land Utilization, acres.
8.  Undesireability Index.
                                    ' Single
                                      Design Card
           Figure B2.  Organization of input data for EXEC/OP
                                    64

-------
         TABLE B3.   EXEC/OP  WASTE  STREAM  PARAMETERS
   Q
 SOC
SNBC
 SON
 SOP
 S.FM
SBOD
 VSS
 TSS
 DOC
DNBC
   DN
   DP
  DFM
  ALK
 DBOD
  NH3
  N03
Volumetric Flow, mgd
Suspended Organic Carbon, mg/1
Suspended Nonbiodegradable Carbon, mg/1
Suspended Organic Nitrogen, mg/1
Suspended Organic Phosphorus, mg/1
Suspended Fixed Matter, mg/1
Suspended 5-Day BOD, mg/1
Volatile Suspended  Solids, mg/1
Total  Suspended Solids, mg/1
Dissolved Organic Carbon,  mg/1
Dissolved Nonbiodegradable Carbon,  mg/1
Dissolved Nitrogen, mg/1
Dissolved Phosphorus,  mg/1
 Dissolved Fixed Matter,  mg/1
 Alkalinity, mg/1
 Dissolved 5-Day BOD, mg/1
 Ammonia Nitrogen, mg/1
 Nitrate Nitrogen, mg/1
                               65

-------
               TABLE B4.   EXEC/OP  ECONOMIC  PARAMETERS
  EPA Sewage Treatment  Plant Cost Index (1957-59=1.0)

  Wholesale Price  Index (1957-59=1.0)

  Discount Rate

  Length of Planning Period, yrs.

  Direct Hourly Wage, $/hr.

  Fraction of Direct Hourly Wage Charged to Indirect Labor

 Cost of Electricity, $/kwh

 Cost Escalator for Yarkwork,  Laboratories,  Legal  Fees,
   Engineering and Interest

 Efficiency  of Converting  Heating Value of Fuels into
   Equivalent  Electrical Energy


 1-st card - tells at which stage the option appears, the identifiratinn
      number assigned to the process, the  identification number of Se
      process  subroutine (see Table Bl), the maximum energy production
      in??,^frOIY^ prSess  (1n e^iva^nt kwh/mil. gal. of plan?
      (3110? 2Floao)     undesi>eab^"ty rating for the process


2-nd  Card - contains a descriptive title for the process (40A2).

3-rd  and 4-th cards -  lists the values of the 16 input design  parameters
      for the process  (see Appendix C).   (8F10.0).            parameters

Additional  Cards -Contains any supplementary input data (see  Appendix



                                                    Selection
                                66

-------
Criteria Constraint Card - gives the upper allowable limit (lower limit for
     energy production) for each, selection criterion of Table B2 (8F10.0).

Design Selection Card - gives the values of M and X where the user desires
     to identify the M best designs that are within 100X% of one another
     (with respect'to the weighted objective function).  (110, F10.0).

Single Design Card - lists the identification number bf"the process option
     to be selected at each stage .of the system (used only when no optimiza-
     tion is to be performed and the user desires detailed performance data
     for a particular system design) (8110).

     Appendix C provides a description of the input parameters needed for
each type of unit process.  A sample input deck for the flow diagram of
Figure Bl is shown in Figure B3.  The DEC PDF-11/70 computer on which this
problem was run allows a data field to be terminated by a comma and two
successive commas  indicates a value of 0.  Thus the input data appearing in
Figure B3 does not line up in field widths of 10 spaces each.  The last three
lines of this data indicate that the design problem involves total cost
minimization, that no  constraints are placed on the design criteria (values
of  the constraint  limits are set to very  high numbers  or zero for energy
production), and that  the five  best designs whose costs are within 5 percent
of  one another is  desired.

     The resulting EXEC/OP output for this example  is  shown  in  Figure_B4.
The first three tables  present  summaries  of the  input  data.  The  section
titled  "Optimization Phase"  lists the designs arrived  at while  searching
for the  first-best solution.  The "Sensitivity Phase"  section gives the
five top designs with  respect to  total  cost.  Each  design  listing  in these
sections  indicates the process  option used  at each  stage  of  the system
 (stages  using the  "null  process"  are skipped), the  amount  of sludge either-
generated or  handled,  and  the values of the  eight  system  selection criteria.
The stage where mixing of  primary and secondary  sludges occurs  is  shown
with an asterisk.  At  the  end of  the output  is shown  how  efficient the
search  method of  EXEC/OP was in comparison  to a  complete  enumeration of  all  ,
possible system configurations.  (Note:   the total  number of possible  system
configurations  equals  the product of the number  of process options considered
at each stage.  This number  is  15,360 for the system in  this sample  problem).

      The user is  advised that because of the heuristic nature of the  optimiza-
 tion method used  in  EXEC/OP, the "best" design  arrived at in the "Optimiza-
 tion Phase" may be close to  but not equal to the true optimum.   In such cases
 one of the M next-best designs  listed  in the "Sensitivity Phase" results
 may have a better objective function value.   Thus the use of the M next-best
 design feature provides added insurance that the true mathematical optimum.
 is not missed in addition to its other useful informational properties.

      Should the user desire a  detailed performance evaluation of any parti-
 cular design configuration of  the multi-option flow diagram, the single
 design evaluation feature of EXEC/OP can be used.  For example, assume that
 this kind of information is requested for the least-cost design in our sample
                                      67

-------
       nc                   CASE STUDY 1
        J?" ??"  " 2" 30" 14" 229'
     ., 43., 11., 19., 4., 500., 250., 60.
  15t  0 
  30,,  30., 10000,,  10000., 10000,
  2.88, 2., ,06375,  20,,  5.91, ,]5, ,033, 1.33

  5, 2, 5, 31,  3
  8, 8, 8, 6,  6
  1,1,15,  0,,  0,
  RAW WASTEWATER PUMPING
  30.,  ,,,,,,,
    '  i  i  ,  ,  1.
  2,2,1,  0,, 0,
  PRELIMINARY TREATMENT
  *,,,,,,
  ',,,!,
  3,3,2,  0,, 0,
  PRIMARY  SEDIMENTATION (40% SOLIDS REMOVAL)
  14, 200.,  14,,  , , , t t
  '  t ,      , 1,, 1,
  3,4,2, 0,, 0,

  .6, 200., 14., , ,  .
  ',,,,!,,!.
 4,5,3, 0,, 0,
 ACTIVATED SLUDGE (MLVSS=2000, Rs 3)
 7" nS"fi^-; *3'  2" -5' ^.  
 7., .05, 800.. 30,,  1,,  1.,  ,., j
 *,D,3, 0,, 0,
 3ft                CMLVSS=2000, Ha.5)
 7 " oJ"B2S'5 '5'  2" '5' l5"  *48
 7,, .05,  800.,  30.,  1,,  i.,  ,.,  t;
 4,7,3, 0,,  0.
                  (MLVSSslOOO,  Pa.3)
 7 " n?"ann"  *3'  2"  '5'  l5"  .48
 J:s,j"s.!X:f  30"  *'-  l-  l-
                  (MLVSS33000,  Rs.5)
 ? " n^"Q^00"  '5'  2" '5'  ^"  48
 59 iSS'n   V  3" 1>f J" '^ '
 5,9,12, 0,, 0,
 CHLORINATION (8 MG/L DOSAGE)
 8,,  30,,  220,,  2.5, 180.,  , ,  ,
 !'''*  *' 1.
 6,30,0, 0,, 0,
 NULL PROCESS
6/10,13, 0,, 0.


     Figure B3.   Input data for hypotetical design problem
                           68

-------
A1P FLOTATION THICKENING (TO 4% SOLIDS)
.95, 40000., 1150,, 48,, 96,, 10,, ,45, 0..
,,,,,,, It
7,30,0, 0,, 0,
NULL PROCESS
7,11,18, 0,, 0.
AEROBIC DIGESTION flO DAYS)
0,, 0,, 0,, 20,, 10,, ,48, ,5, 0.
0,, 7,, ,05, 0,, 0,, 08, 1., I.
8,30,0, 0,, 0,
NULL PROCESS
8,12,8, 0,, 0,
GRAVITY THICKENING  (TO 8% FOP PPI, 5% FOP MIXED SLUDGE)
,9, 0,, 700,, 0,, 80000,, 20000,, 50000,, 16,
6, 8., , , , , , 1*
9,30,0, 0,, 0,
NULL PROCESS
9,13,23, 0,, 0,
LIME STABILIZATION  C200 LBS/TON)
200,, 25,, ,,,,,,
, i , , , , i 1,
9,14,6, 2000,, 0,
ANAEROBIC DIGESTION (15 DAYS)
13
,
9,

20

*
,
\

.

,

5

,

JU
, ,
,6

30

* ,
,
e=>
V
2000

* ,


5

1
1
.

,


1
,


1
31,
.
o.

31,
*
, , ,


(20 !
, f ,

,


5A
,

9,16,18, 0,, 0,
AEROBIC DIGESTION  (20
     DAYS)
20,, .48, ,5, 0,
0., 0,, J,, 1,
0,, 0., 0,, 20,,
0,, 7,, .05, 0.,
10,17,8, 0B, 0,
GRAVITY THICKENING  (TO 5% SOLIDS)
.9, 0,, 700,, 0,, 80000,, 20000,,  50000,,  16,
6. ,8, ,,<>,,,],
10,18,9, 00, 0,
ELUTRIATION (WASHWATEP RATIO   3,  THICKENS  TO  4%)
.76, 0,, 3a, 800.,  0,, 60000,,  20000,,  40000,
16., 6,, 8 g , ,  ,  ,  ,  1,
10,30,0, 0., 0,
NULL PROCESS
11,19,7, 0,, 0.
                  Figure B3.  (continued)
                             69

-------
VACUUM FILTRATION (10 GPH/SQ FT)
0,, 35., 2000,, 0,, 0., 0,, .064,  ,0125
0,, .33, 1,, , , , , I,
10,, 10,, 10,, 10,, 10,, 10,, 10,, 10,
10,, 10,, 10,, 10,, 10,, 10., 10,
42,, 0,, 52., 42,, 0,, 40,* 76,, 0.
110,,  68,, 0., 125,, 0,, 0., 0,
176,, Of, 200., 0,,
370,, ,,,,,,
**,*,,,,
                     0.,  0,,  240
                                0 
0.
                     2., 0., 2.

                              .85
11,20,17, 0., 0,
CENTRIFUGATION
0, 0,, 35,, 0., 0,,
It* ***** ,  1.
,9, ,85,  .9, ,9, ,85,  .9,  .9,
.85, ,9,  ,85, .85, 0,,  0,,  0,
32., 10., 19., 30.,  18,, 30.,  25.,  15,
22., 25,, 15., 22.,  0., 0,,  0,
3f, 6,, 6,, 3,,  4.,  4,, 2,  4,
4,* 2,, 4,, 4.,  0.,  0., 0,
90,, 80,, 80,, 160., 160.,  160.,  100.,  80.
80,, 100,, 80,,  80,, 100,,  80., 80.
11*21,10, 0., 0,
SAND DRYING BEDS C30% CAKE  SOLIDS)
0,, 2000,, ,3, .3, .3,  15,,  1,, 3000,
******!.
11*30,0,  0,, 0,
NULL PROCESS
12,22,22, 0,, 0,
LAND SPREADING (10 MILE HAUL,  3000  S/AC,  400 LB  N/AC/YR)
2160,, 10,, 6,,  .5*  3000,,  0,,  ,25* 400.
500,,  10., 0,, 0,, 0.,  0.,  1.,  1.
12*23,22* 0,, 0.
               (30 MILE HAUL,  2000  S/AC*  600 LB  N/AC/YR)
2160,, 30,, 6,,  ,5,  2000,,  0,,  ,25, 600,
500,,  10., 0., 0., 0.,  0,,  lt,  1.
12,24,22, 0,, 0.
LANDFILLING (10 MILE HAUL,  3000 S/AC)
2160., 10., 6.,  ,5,  3000,,  1,,  0.,  0,
****** 1.* 1,
12*25*14, 0., 0.
INCINERATION (2 LB/HP/SQ FT)
2,, 2.* 35,, 5., 0., 10000., 1.,  ,3
!.*******!.
Oi 0,* I., 0,, 0.,  0,, 0,,  0,
10000,, 10000,, 10000,, 10000., 0,* 10000,, 10000,,  10000,
5, ,05
                 Figure B3.   (continued)
                            70

-------
       03
       X
       X
       I-
       U
       K
o a.   u
o u>   t->
a >   o
a.     <
  Z OC 3C
U O O
 Mb. b.
>- ft   O
t- *
                 X
                 a
              > co
              u a M
              z on
              U ID O
              o xu
               O U* 
               Z Z
t-Z  -<
> hi   C*

tt .AX
   4 bi
   Q, i-
03 l-i B

3 MO]
   Z
   3
                                                                     K   
                                                                   0.   Z
                                                                        O
                                                                     a.
                                                       *   o        o
                                             OOOOW   H   "^   b.   CO > X
                                               ooou   w   co        m
                                                                >   *   J a o
                                                                     zmou>b>caucofii-i
                                                                     oraMcauiOMco>3a
                                                                             a   o    o *
                                                                      zKoeuccxixt-tc
                                                                      t^Oj*no.*-*CLb*a'^'l^l**'lr''^l^f*lf*>*nmff>'n'*)'*>f
                                                                                                                                        OJ

                                                                                                                                       _Q
                                                                                                                                        O
                                                                                                                                        J_
                                                                                                                                        a.

                                                                                                                                        c
                                                                                                                                        01
                                                                                                                                       I
                                                                                                                                        I/)
                                                                                                                                        OJ
                                                                                                                                       o
 (O
 o
I
+J
 O)
.c
4P
 O
 a.
 >>
 s-
 o
M-

)->
 s
 a.
4->

 o

o.
o

C_3
LLl
X
UJ
                                           CO
                                           CO
                                           U  
                                           uo
                                           oz
                                           a.
                                           a
                                                                                                                                        co

                                                                                                                                        (U

                                                                                                                                        3
                                                                                                                                        05
                                                                                                             >    <  Kl 
                                                                     71

-------
                   oo ocoooo
                   O S OO    O O O
                   G O O O    O O O
                   O O O O    O O O
                                                               ooooomoroo*
                   o o -*o o o o o
cc
u
u
10
                   31 U U U UZ
                                                                       z
                                                                       o
                                                                       M tQ
                                                                       f
                   o oo -.
        a.    x u
     cc bi  ac z
x   ac a o > u    cc
u   x. => m M    o
o x- 10 M   o    EH
SSW      3Z n    U
l-i C O    X b.    
   Z U(-  K b.    b.
F- MO    O  bl
m    o h. u       x
O bl * b)    M Z    CC
                O    !D


-
U  I
                                                               OO.CCXAUCOIU
                                                               >->    = u J J hi a. w
                                                               t- u c   t u >   cc
                                                               U J X Z O    Z I-
                                                                                                     -a
                                                                                                      OJ
                                                                                                      3
                                                                                           o
                                                                                           O
CQ

 CD
 S-
 3
 CD
                      o z u o. cc a u
                               u u cc
                   t- s f K a.   au
                   *z K- u u toe a
                                                               OXOb.lXJb.au
                                                                        72


-------
                          |O OOOOOOOO
                           ooooooooo
                           ooooooooo
                           {0000000*10
                           ooooooono
                           OOOOOOOlO
                          |f- wr*-n^*-ior^  | -*
                          DO O O O O I
                          DO O O O 0<
                     ft. in
                     u
                     t-

                     a.
                     u
                          OOOOGCDGOO
                         I -> m co o o  * <
m



z
HI
a
u
o

n
u u
=9 -3
U1JO
3 > S
< u
>X K
U
X !- I
UCQ 0
MX a
WWW.

0 X
X H
H O J
ua 
 o. z
x a. u
u < o*
n
u
o

CO

X
u

to
to

u
X
e
CO





U
a
      u
      >a
      u
          0
          -"
          BO
z
u
f*
CO
               fr-
               u
                           F.
                           IB
            * CM or w cs   mrn
                                                                 -a
                                                                 cu
                                                                 o
                                                                 o
                                                                 CQ
                                                                 d)
                                                                 s-
                                                                 o>
                                                                r~
                                                                U-
                          ooooooooo
>
 <
t1 Q
0 <0
a s:
J 0
co e-
10
CO Z
u o


1

09

                    u 
                    a o
                    (- z
                    10
         I          V
         r*""""0"5"
                                          5
                                          H
                          74

-------
               oooo ooooo
               ooooooooo
               oooo ooooo
                                                                      ooooooooo
                                                                      ooooooooo
              BO ooo o o o m o
              ioooo o o o mo

              |OOOO OOOi O
                                                                              OOOOOOOCD
                r- eM-r- mm o  o   |o
                                                                              v* in o> o o 
f-
OJ
        a.
        u
u

u
m
        r^CMoti^fvimomo   leo
        mr4r^fmcDfMCD**i   |r

s
Ow If)
u
M
a.
u
as
O
fr*
U ^*
u
J
o o o o o r*
o o o o o a^
o o o o o CD
V4
*


r- c -* r*- m CD

** m oo o o 
*r ft c< ff>
< vD * d

o o o
O 0 O
o o o




*H  ^
c* o> v
* o ?*
v4


d
CD
^



o
c?>
^*
d
cv
*
w
a
                                                      u
                                                      3
                                                      a
                                                      *c


                                                      z
                                                      u

                                                      CO
                                                      >*
                                                      CO
                                                               x
                                                               u
                                                                              crir>9dininr^o*4
                                                                              m-*co o*mdr-d

                                                                                                            a
                                                                                                            O)
                                                                                                                     c
                                                                                                                     o
                                                                                                                     
                                                                                                                     CD
                                                                               ooo-*ooo oo
        J O
        o f
                oooooomoo  fo
                o o P- P*- o t *         "

                O O * v O CD *
                                                                           !r
u ^  I ^ c* ^ i
O f-  1
O. O.  I
a, o  i
                                                                       

-------
design problem (i.e.,-design 1  in the "Sensitivity Phase"  results  of Figure
B4)   The same input data deck is used with the addition of the single
design cards to the end of the deck.  These cards give the number  of the
process unit selected at each stage of the particular system configuration
under study.  In this example they would be:

     1, 2, 4, 7, 9, 30, 30, 30

     14, 17, 21, 25

The output produced by EXEC/OP is shown in Figure B5.  Each stage of the
system  (except those  employing the  null process) has its influent, effluent
and sidestream waste  streams described along with values of the input and_
computed design parameters for the  process used at the stage.  The abbrevia-
tions used for the components in the waste streams are explained in Table B3.
The meaning  of the input and output design parameter values can be found by
looking up the process description  in the  listing of Appendix  C.

      The programmed  version of EXEC/OP, listed  in Appendix  D,  is dimensioned
to accommodate up  to  19  processing  stages  and  50  different  types of process
options.   For those  unit processes  that require  supplementary  input data
 tables  (vacuum filtration  and centrifugation)  a  maximum of  5 different
design  levels may  be used.  The  program is capable of  generating up to  40
 next-best  designs.
                                       77

-------
                                                                                                      u
                                                                                                      u
                                                                                                      o
         n
         x
         to
         X
         03
x o    a
>-<    n
oc tc
o a.    u
Olil    C
a >    w
a.       *.
   2 tt X
U) O O
> u. u.
= M    W
O     **
IOX    10
X 1-4    U

   O,    K
   O    
       X
         10


         X
         K
o ex. -t
Z O t->
U 1C U
U X U
< Jto

Z X CO CD
O UM 10
t-* ex to CN
t- *c x m
U U.3V
u to .
<< Z O w
tt u)Z E-i
a x o c
u zu z
X OU Z
Z tt    M
O 1-4 O U
a; =z z
CO
to
U
u
o
cc
                    1 U
                   0.11
                 0 1>
                   U X
                 a 1-1 10
                    z
                           o o                  co
                           XX                  o
                           U U                  M
                           a. a. .-%.-...-%       ,j

                           to to       .       to
                           o o     u  H
                           w  tx  a. K cc       <

                           o o - .   .       *
                           tocooooo^>    o
                                 O  O O O W    t-4
                           iF>OGOOU    -

                           4    (M*-'^OfHb]
              l-l    Z Z X
              EI    a i-i to
              to     z <
                                                                     fa.

                                                                     O
                                                  C
                                                  CO

                                                  Ul
                                                                                    ZtOOCOUCOC>tOI-tM
                                                                                                                                            40 40 C_)
                                                                                                                                                  <
                                                                                                                                            O O X.
                                                                                                                                            o o >
                                                                                                                                            o c
                                                                                                                                            r> CM o
                                                                                                                                                  O
                                                                                          0
                                                                                          to
                                                                                 j j x >.
                                                                                  M    K
                                                                                 XXUX
                                                                                       j v
                                                                                 o O t-l D
                                                                                  mXJ
                                                                                 ^ ^-
                                                                                       o Ct
                                                                                 C9    *4^'
                                                                                 Z    ^^
                                                                                 *-l       Z
                                                                                                               f    tc >-< 
                                                                                                                                                                     O5
                                                                                                                                                                    r-*
                                                                                                                                                                     t/)
                                                                                                                                                                     (U
                                                                                                                                                                    -a

                                                                                                                                                                     a>
                                                                                                                                                                    ^
                                                                                                                                                                     D>
                                                                                                                                                                    (->
                                                                                                                                                                    3
                                                                                                                                                                    a.
                                                                                                                                                                    zs
                                                                                                                                                                    o
                                                                               o.
                                                                               o
                                                                                                                                                                   o
                                                                                                                                                                   LU
                                                                                                                                                                   X
                                                    O CO
                                                    MU
                                                    to o
                                                    bl      |
                                                    15   .  |
                                                    0  !-
                                                    i- Z  I
                                                          I
                                                                                                                                                 LO
                                                                                                                                                 ca

                                                                                                                                                  a>

                                                                                                                                                  rs
                                                                                                                                                  a>
                                  to
                                  u>  
                                  u o
                                  o z
                                                           lin i CMC
                                                           r
                                                                                                                 *- ~*    o* cs e*j 
                                                   E- z
                                                   o.
                                                   o
                                                                                78

-------
            s  f
            5  I
                     o o oooooo
                     o o o  o    o  o o
                     o o o  o    o  o o
                     o o o  o    coo
                                                                    ooooooor-o>
2   I
a-   I

S   I

2   1
u   I
     I
Z   I

2   *

u   I
(d
Ifl
            S  !
            s  f
                    oooooooo
                    00000000
                     O O ~4 O O G  O O
                                                        s
                                                        Q
                                                        o
                                                        z
                                                        o
                     f-   X X  -tO M
                     >o       x z a id a
                                                                             z
                                                                             o
                                                                             1-4 tO
u    -s. => v> BW    a
Q X  W2 M    U    &
Z Ul       Z  !-    O
i- O  -O    > b.    
   Z hi f* CL 6- b.    h.
{-ii-IO    O i- U>
ca    < a u. o       x
a us u    M z    K
W    ^ at a; o    ui
                                                                                                          -a
                                                                                                           a>
                                                                                                           o
                                                                                                           o
                                                                                                          uo
                                                                                                          CO
                                                                                                           (U
                        00 CO  =><
                       o a o a    ix
            a.
            u
                            oa o   a: *-*
                                    bl    (fl
                              oc. a    o u
                                                                    DZOU.UUU.QO
                                                                                   79

-------
         ooooooooo
         ooooooooo
         ooooooooo
         oooooootno
         ooooooomo
ectn
u)


a.
l>

s
o
H
t-l


-J
u:
to
         r*c* *( m * *+*o r-  i-i
         **> c r- -* m m p* o> to  id
         OOOOOC4OOO
         O O O O O O O O O
         00000=0 ooo
                              ,0
                            
                              O^
                              o*
                                                                                           00
                                                                                           o o
                                                                                           o o
                                                                                                      o o
                                                                                                      o o
                                                                                                      o o
                                                                                                     o o
                                                                                                     o o
                                                                                                     o o
                                     o o
                                     o o
                                     o o
      I0.*1.".'
       Iooi c rr* M
                        I^C40t  |OO
                        tf>f*i3t  10*

                        -. o*cT  ir-^
                           c *^
  m
  01
J u;

                                                                                        
                                                                                        Q
 O O      O  O
 00      00
 o o     o  o

COO    (-.00

          o
                                                                                u
                                                                                V
                                                                                1
                       M         
                       to o o    u o o
                       u o o    o o o
                       a o o      o o
                                 ->   
                       * O!O     O O
                       =>         a,
                       a.         i->
                       =         =>
                       w         o
                                    o o
                                    o o
                                    o o
                                                                                                                   a
                                                                                                                    a>
                                                                                                                    3
                                                                                                                    E
                                                                                                                    o
                                                                                                                    o
                                                                                                                   LO
                                                                                                                   CO

                                                                                                                    a>
                                                                                                                    s-

                                                                                                                    cn
        OOO-fOODOG
                         o o
                         o o
                         o o
                                                                                                   o o
                                                                                                   o o
                                                                                                   o o
an
=> z
u>o
Oi-l
ao.
0.0
                                                                  O
                                                                  a.
                                                                  a.
                                                                  o
                                                                  u
                                                                                          o o
                                                                                          o o
                                                                                          o o
                                                                                         o o
                                                                                         o o
                                                                                         o o
                                    ooo
                                    ooo
                                    o c o
                                         
                                    o c o
                                   10 O O
                                   000
                                   ac o o
                                                                           80

-------
     o o o    ooo
     ooo    o o o
     O OOf) O O O
      *    "O      *
   +*r *r ozooo
     m m
              oo
              00
              oo
                                                                       O v4 O    O O O
                                                                       O Ift p    O O O
                                                                    co p o> o f*> o o o
     ooo    o o o
     o  o  o    o o o
   IOO  O  Ofl OOO
   CO      *X      
   > 0*  a*  o as m in o
  o o
  o o
  o o
                                                      o o
                                                      00
                                                      oo
                                                         
                                                      00
"    OOO    OOO
    OOO    OOO
c> o o ooo ooo
M O  *    "O      
HI mo o o to o o o
03 (O * *    Q * J>
   o o
   o o
   o o
                       oo
                       oo
                       oo
                                                                  *    ocvo
                                                                  to    ooo
til
H
u

a    ooo    ooo
.4    POO    O P P
X 5 O OO^MC OOO
CJ E*.  '*    *W3      *
   0 O PO< OOO
*&    m m       in m
 ta
 tx)
 o    ooo    poo
 l-t    OOP    OOO
 IQO.P  O O 3E POO
    O      bu.     *
 I  D3C4CVOOOPO
                  p- o
 H               lf> tf)
  ,    ooo    ooo
       o p o    poo
    20000. OOO

ra
w

o
at
a.
                                                       o o
                                                       o o
                                                     00
fc*
c
a
to o o    u o o
b3 O O    OOO
OOO       O O
          E-    
E^ O O    S3 O O
=:          a.
a,          f-
2          =1
                                             O O
                                                 
                                             O O
                                                                    Id
                                                                    If
                          x :
                          u i
                          Id
                          ac
                          fc^
                          to
                          u
                          o
                                            OOO
                                            o w o
                                 or- o    ooo
                                 o r- o    ooo
                             0.000x00,0
                             o   **u<   
                             WWP4OOOOC
                                            o c
                                            V) U>
                                                                -a
                                                                  O    O ^ O
                            1     o in o    o 01 o
                              3SOTOO.OWO
                              O      *O      
                               O O O    V > O
M    OOO    OOO
      000    OOO
   uooozooo
   fr>    *O  *
   2 O O O    O> 9 O
   /*>!*>       w- *H
                                              o o
                                              o o
                                              P O
                o o
                o o
                o o
                                                                        (C  *    *O
                                                                        5- o m o
        ooo   ooo
        OOO   OOP
        o o o o o o. o
    o o
    o o
    o o
                                                        000
                                                        000
                                                        ooo
                                          o m o
                                          o ^-* o
        o c o    ooo
        000    POO
     oc o o c> o o o
             o  *  *  *
        C O P O ** ** O
     o o
     o o
     o o
                                                         ooo
                                                         ooo
                                                         ooo
                                                                                       o ts o
                                                                                       O -J3 O
                                        o     *  
                                  O P O O * ^ P
                                                                                      81

-------
              o  o
              o  o
              o  o
              o o
              o o
              o o
                     t CM O*    O O O
                     tfl < O>    O O O
                  IOOD o CM *n o o o
                                a o r-
                                ci * f*
                                                                                               r-    oo ***
                                                                                             * o>    *-t <4> 10
                             =*< m OD z in m m
  O O
  o o
  o o
              o o
                 *
              o o

z
o
l-l
a.
3
vs
w
u
S i
a.


s e
o o
C 0
too
1-
*
a
s
jj
W O 0
a] o o
2 s a
!" O O
p
z
o o
o o
" O 0
fr o o

Q
a:

1/3
Ul 0 0
QO s
O 0
a o o
a.
                          CJOC- O CD Q CO CO CD

                          E-*CDOt*DvHCBOOO



                          W          CM

                          u

                          oc
                         X 
                         u u.
                         Ul
                         a.
                                 i *i r*    o o o
                                 I Cft <*>    CM CM CM
                                     r-    CM CM CM
             tO Q* O
                a  *
              I 10 CM

             f-t
             A
             u
             =1
             -3
             U.

             u   rf>

             t  a  *
                                  m -r    o o o
                                  **1 *O    O O O
                                  CD "* 5E O O O
                                   *   * u*      
                                  o uo a o o o
                                     *    o o o
                                     r    in in in
                                                          ia
                                                          w
                                                          u
                                                          o
                                                           O O
                                                           o o
                                                           o o
                                                          O O       4> <
                                                          O O       sO <
                                                          in o      CM *
                                                         S   1
                                                       *

                                                       a
     u         m
i    M         to
I    WOO    U1O 
I    U O O    Q O .
f    O O O       o I
I               fr  
I    ^ O     S3 O '
                                                                       
                                                                     O O
c o
o a
c o
                           CO
                           3C **!
                           to m
                      ot n    Cft c* Q*
                      CM O    * * ^
                      *o ov  z TT ^ ^r
                         "  Q   >*
                      ro m    CM CM CM
                      -4 a*    CM CM .-M
                                                                     O O
                                                                     O O
                                                                     O O
                                                                                 o P
                                                                                 O CM
                                                                                                     > o o
                                                                                   uomoadD>fivo
                                                                                   - a       o       
                                                                                   c^oQ*r-r^caocMCM
                                                                                   CO CO tn    (T* Q  * CM CM
                                                                                                    m m o*     o o o
                                                                                                    tn CM w     CM CM CM
                                                                                             a    'i co ao    o o o
                                                                                             M    m m so    o o o
                                                                                             toouaocMinxooo
                                                                                                 O        *,  *  *  
                                                                                             u*    t A n     * r~ r
                                                                                             w    o* c* c*     c* o c

                                                                                              I  O    "".o  "11"


                                                                                             :          o
                                                                                             U          M
                                                                                             d
                                                                                             ^)
                                                                                             u.
                                    CM O I*-    ! <) 4)
                                    -^^rr-z ra>cc
                                                                                                                                     -a
                                                                                                                                      O)
                                                                                                                                      3
                                                                                                                                      c:
                                                                                                                                     i
                                                                                                                                     fj
                                                                                                                                      
                                                                                                                                      O
                                                                                                                                      O
LO
CQ

 O)

 13
 CO
c o
3 O
COO
CO O O
moo
                                 
                                                                       82

-------
                    00
                    o o
                    o o
               o o o    o o o
               o o o    o o o
             10 ooomooo
             ta**o**
             &4OOOZOOO
                                                                                                        oo M o   000
                                                                                                        r^ m o   o o o
                                                                                                     nooomooo
                                                                                                            o CD
                                                                                                            o CD
          o o
          o o
          o o
o o
o o
o o
                                      o    TV o
                                      o    iO >o o
                                      o >* OD OD o
                                        x       
                                                                     O O
                                                                     o o
                                                                     o o
                                                            o o
                                                            o o
                                                            o o
                                                                                                            t~ tv
                                                                                                            in o>
          o o
          o o
          o o
o o
o o
o o
                                          -n* 4* o
                                           o o o
                           ua    co ao o
                           UQf*)<*koatoto
                           *H a      *o    
                           &4CDt^r> m o   -  o
                                                                                                       to to m 
                                                                                                       *-t    CD >
                                                                                                       K    
Q.
o
i      o o

   -c-
    t*
    c
    a
                     o o
                     o o
                     OO
u
u
o
a.
a
    CO O  O
    u o  o
    a o  o
       u
       -*
       

z
111
                                fa.
                                ^   JO 00 O
                                ij   CM C4 O
                                e-
                                z
z:
0
a.
o
m
to
c>
o
oc
a.






u
c

CO
0 0
o o
00
coo
fr*
-X
a
z
5
CO O O
hi 0 0
Q 00
* 
H CO

a

t-t


0 0
*-i O
. ft O
* 
0 0



o
o
* o
(~* O
t
o
z
o
03
it] -
O43
*
SM 
oo

* f)
3 0



*
n
in

CD
<>
00
*>
O
o
o
o

c
0
0

0






o
o
o
* .
0



STREAM CHARAC
U
0

to

t

fr
2.
k;
Z3
bu
u.
U

1

t-
2
U
VC vJ 0
CD OD O
O 0
in m

o tc o
in c* o
Db f> -OP O E

OS  *O O Q
CO M
0. ^




moo
o> * o

O   Q

*-i-r*

^
o m
cv -
IN *

0 0
0 0
o o

o o
0 0
in m




O *P
in r-

* *
in o*
c


o
0

0
o
o

o






o
0
o

o



                                                                                                                     0)
                                                                                                                     3

                                                                                                                     C
                                                                                                                     C
                                                                                                                     O
                                                                                                                     o
                                                                                                                                     LO

                                                                                                                                     CO
                                                                                                                                         zs
                                                                                                                                         05
                                a
                                b.
           o o
           o o
           o o
                                        r^ o   -  o
                                                              00

                                                              o o

                                                              IT O
                                                                 

                                                              O O
                                                                                                        CD CD O    O <
                                                                                                        O O O    OD <

                                                                                                       ^ *C O O Z " "
O O
o o
o o
 *  *
o o
                      00 O C
                       o o
                      to o o
                            o o o
                            o o o
                            o oc
                                                                                         m c o
                                                                                         o o o
                                                                                          o c
            o o
            o o
            o o
  r- o o
  CM O O
  ceo
                                                                              o o
                                                                              o o
                                                                              o o
                                                                                             *r o o
                                                                                             moo
                                                                                             (N O O
                                                                               83

-------
              o o
              o o
                    -* oc*    o  o o
                    *n o o    o  o o
                 COOONflOOO
                 ca      o       
                 t* Of O - Z O  O O
                    9 o m
                    OD O O>
                    CD OCM
                                                                                 o o
                                                                                 o o
                                                                                 o o
                                   o o o    ooo
                                   o o o    o o o
                                coooomooo
                                W   *  *   O  *  *  
                                fr  0002000
                                   o  o o
                                   o  o o
                                   O  O 
                                  in  o
> o       o o
>o       o o
> o       o o

> -t       O O
                                                                        o o
                                                                        o o
                                                                        o o
                                                                       o o
                                                                       o o
                                                                       o o
                                <* Ift -  Z CO  CD GO
                                C4CO O\    M -*-*

                                00 tO O
                                                                                         m o r- z co CD CD
                                                                                         00 -^sO    -H ^








r*
**
O
f
o.
o
n
10

U
cc.
o.
o
Id
<

M

O O
O 0
0 0
 
o o
o
o
o
in

o o
o o
o o
coo
H 0
*. o
Q 0
(M
X
u
000
u o o
a o o
 
f"l O O
= O
a. o
 o
MCO

O 0
O 0
0 0
 
O 0
0 0
o o

0 0




o o
o o
 O O
H 0 O
a

u
M
to
U O 0
ooo
0 0
(-. . .
=100
a.
t-
3
0

o o
o o
o o
 
m
u
1-4

to
cc
u
E-4
u
c
<
X
u
X
^
u
cc
EH
00
u
a
m
i
1
It.
U*
u
*
m in to
in m.m
a **i in f>
o *  *
CD m ex r-
ior -o
*o r-



co r* CM
o *n r-
to fi


CLOD OsD
0 * * *
B0*O Of
^i 1*1


o **> v

D - * *
COCDCD
a  -*-
o   *
a m in in
Q ^ ^ 
CH (M(M



x\n
* ^* <*
fM CN Oi


OOO
ooo
Z 0 0 0
[*.
o o o o
ooo
in in in


^ *V 9

3   m








cs
2
0
t_t
EH
a.
o

CO
u
1

CO


l/>

0 0
0 0
o o
 
4 O




i co
I o o
1 00
< m o
<
3
2

*-t
(000
woo
O f O
f- o o
a.
w

O 9
0 0
 
0 0
0 0
o o
 
o o




o o
0 0
" 0 0
fr, 0 0
Q

IS

tQ
CO O O
ooo
O 0
E-i  
a 
*-<
^
o

o o
0 0
O 9
 *
 m - *^ CD CD CD
CO f*| O O *<,*
uoincsv)O^*H
*H O   O  * 
t^cocs^oDiomm m
to co - *o o Q *H ^ *-*
OS vH ff
w

<^
*I r- CD 03 -^ ^*^
X  o o tn Kin in in
UU--...JJ...
W-^Ch CM < CM  kO so
W   CM CMCM
g,,
IjQ
U
a m f- *i ooo
*"* ^ CO O OOO
COCLOsO r* m in m
u
u.

u ch o o* *. r r*.
-zo*otva,wam







*~^
a
g
Jj
o
o

LO
CQ
CU
s-
~J

lal



                             CQ *- C* *    O*  Ov Ov
                         ft    f- CD O    %C  ^> tO
                         2    * r- *    *^  -* *^
                                                                                                        '     en 9> o>
 o o
 o o
 o o
  *  *
 o o
 o
o o
o o
o o
                                                                 o o
                                                                 o o
                                                                 m o
                                                                                             fa.
                                                                                             z
                     CD  %O   CD CD CD
                                                                                   CD     *  
o o
o o
o o
o c o
000
o o c
                                        o o o
                                        o o o
                                        o oo
o o
o o
o o
000
o o o
o o o
o oc
o
o
                  o *~ i- a -*  ^-<
            ooo
            o e  o
            ,0 o  O
                  J O\ f>    O VD v>
                  10  f*>    fn **/*>
               oooouooo
                   * *   c      *  
                  O O O O t \O *
                              CM O* 
                                                                            o*  o o
                                                                            moo
                                                                            ooo
                              - O     *T) *^ *,

                           o ooooooo
                                   . o      
                              O O O O ^ %> ^>
                                                                           84

-------
                       o o
                       o o
                       o o
                    o o o    o o o
                 wooomooo
                           o      
           o o
           o o
           ! O
  o o
  o o
  o o
      i!> O O   *  O O
      o o o   f^  o o
   asm OOITOO
       -  -Z      
   >OOOZODOO
           o o
           o o
           o o
m
m
u
o
o
         << o
         a o
         TO o o
         u o o
         a o o
  o o
  o o
  O O
                        o o
                        o o
                     ~o o
                     4  *  
                     HOC"
                     c
                     a
09
u  o
a  o
   o o
-    *
pin o
"    -t O O    CD O O
to    o o o    * o o
t^OWOOQ^^OO
H*Q       O  *    
t^CD^f OOffitflOO
CO PS 03       O *
fr-4    O9          Ol
tc    o
w

u

K    ** o o    fn o o
-t    00 O O    *- O O
      o o o acw o o
 a    r* o o    o o o
 m    OD O O    OOP
 tOOi<
                                                                       s-
            o o
            o o
            o o
   at o
   _t o
   in o
       
   m o
   r-
   o
      in  o o    o o
       o  o o   f~ o o
    Z9O9O.OVOO
                                    ,K    CM
                                    u    o
                                    3    
            o  o
            o  o
            0  O
   r* o
   (S O
   o c
                   o o o
                   oc O O
                   ** OC
             O O
             o o
             o o
    moo
    o o o
    r* o o
                                        O     03
                                        1C 
-------
                               APPENDIX  C

                   LISTING OF UNIT  PROCESS  DESCRIPTIONS


     The following pages provide a listing of the design parameters used in
the individual unit process model  subroutines of EXEC/OP.  The processes
are listed in order of their subroutine  identification number.  Input
parameters are those which must be supplied as input data to the program.
Normally there are 16 parameters for each  process.  Of these 16, those
that are not described in these pages are assigned the value of 0.  Output
parameters are those which are calculated during the execution of EXEC/OP.

     The nominal sizes of all equipment  are based on providing enough
capacity for normal system operation.  Actual sizes are computed by multi-
plying the nominal values by an excess capacity factor.  These factors
account for any reserve capacity needed  to handle peak flows or for
periodic cleaning and maintenance.  They are specified as part of the
input parameter list for each unit  process.
                     Process:  Preliminary Treatment

                       Subroutine ID Number:  1

Input Design Parameters:

     1 - program,control number:  0 = grit removal and flow measurement;
         1 = grit removal, flow measurement, and screening

    16 - excess capacity factor

Output Design Parameters:  None

Notes:

1.  Cost functions are from Ref. Cl.

2.  Energy consumption is from Refs.  C2 and C3.


                     Process:  Primary Sedimentation

                       Subroutine ID  Number:  2

Input Design Parameters:

     1 -  fractional removal  of influent suspended solids (.4-.6)

                                    86

-------
     2 - ratio of solids concentration in settler underflow to solids
         concentration in settler influent  (150  -  250)
     3 - hours per week that sludge pumps are operated
    15 - excess capacity factor for sludge pumps
    16 - excess capacity factor for settler basin

Output Design Parameters:

     1 - overflow rate for settler, gpd/sq. ft.
     2 - surface area of settler, sq. ft./1000
     3 - pumping capacity of sludge pumps, gpm

Notes:

1.  Relation between fractional solids removal and overflow rate is from
    Ref. C4.

2.  Cost functions are from Ref. Cl.

3.  Energy consumption is from Refs. C2 and C3.


     Process:  Activated Sludge (Aeration"Basin  and Final  Settler)

                    Subroutine ID Number:  3

Input Design Parameters:

     1 - effluent BOD, mg/1
     2 - effluent suspended solids, mg/1
     3 - mixed liquor volatile suspended solids, mg/1   (2000  - 4000)
     4 - sludge recycle ratio  (.2-.8)
     5 - half-velocity constant, mg/1  (20-1000)
     6 - true yield coefficient  (.5-.7)
     7 - maximum substrate removal rate coefficient, I/day  (3-20)
     8 - biomass decay coefficient at a 1 day sludge age,  I/day  (.1-.5)
     9 - maximum removal rate coefficient for nitrification, I/day   (7)
    10 - oxygen transfer efficiency of aeration  equipment     (.05-.08)
    11 - overflow rate of final settler, gpd/sq. ft.   (600-800)
    12 - return sludge pumping head, ft.   (10-20)
    13 - excess capacity factor for final settler
    14 - excess capacity factor for return sludge pumping
    15 - excess capacity factor for air blowers
    16 - excess capacity factor for aeration basin

Output Design Parameters:

     1 - influent 5-day BOD, mg/1
     2 - sludge age (solids retention time), days
     3 - ratio of settler effluent to settler influent solids concentration
     4 - surface area of final settler, sq. ft./lOOO
     5 - maximum substrate removal rate coefficient, I/day
                                    87

-------
     6 - biomass decay coefficient, I/day
     7 - aeration basin volume, million gallons
     9 - concentration of active biomass in aeration, rng/1
    11 - concentration of refractory organic solids in aeration, mg/1
    12 - concentration of nondegradable solids in aerator due to
         cell destruction, mg/1
    13 - concentration of inert inorganic solids in aerator, mg/1
    14 - concentration of BOD removed in aerator, mg/1
    15 - sludge return ratio
    16 - maximum removal rate coefficient for nitrification, I/day
    17 - diffused air requirement for the aerator, scf/day
    18 - size of air blower required, cfm
    19 - diffused air requirement per gallon of entering wastewater,  scf/gal
    20 - volume of return sludge stream, mgd.

Notes:

1.  BOD removal kinetics, sludge production, and air requirements are  based
    on the models of Refs.  C5, C6, and C7.  The input kinetic parameters
    (items 5-9) are also based on these models.

2.  Nitrification is normally assumed to begin after a sludge age of  5 days.
    If nitrification is not allowed then input design parameter 16 should
    equal 0.

3.  Cost functions are from Ref. Cl.

4.  Energy consumption is from Refs. C3 and C8.


                     Process:  Anaerobic Digestion

                        Subroutine ID Number:  6

Input Design Parameters:

     1 - detention time, days   (15-30)
     2 - sludge temperature in digester, degrees C  (30-40)
     3 - climate correction factor (1.0 for northern U.S., 0.5 for middle
         U.S., 0.3 for southern U.S.)
     4 - efficiency in converting BTU content of digester gas into
         equivalent kwh
    16 - excess capacity factor

Output Design Parameters:

     1 - rate constant for digester, I/day
     2 - rate constant for biodegradable carbon, I/day
     3 - digester volume, cu. ft./1000
     4 - methane production, scf/day
     5 - carbon dioxide production, scf/day
                                     88

-------
Notes:

1.  Kinetics of biodegradable carbon destruction is described in  Ref.  C4.
2.  Cost functions are from Ref.  Cl.
3.  Energy consumption is from Refs. C2 and C3.
                       Process:   Vacuum Filtration

                         Subroutine ID Number:   7

Input Design Parameters:

     2 - hours per week of operation
     3 - suspended solids concentration in filtrate,  mg/1  (1500-2500)
     7 - cost of ferric chloride, $/lb
     8 - cost of Lime, $/lb
    10 - cost of polymer, $/lb
    11 - identification number of supplementary input tables
    16 - excess capacity factor

Supplementary Input Design Parameter Tables:

     1 -  filter dewatering rate, gph/sq.  ft.   (8-18)
     2 - ferric chloride dosage, Ib/ton (0-200)
     3 - lime dosage, Ib/ton  (0-400)
     4 - polymer dosage, Ib/ton  (0-40)

Output Design Parameters:

     1 - percent moisture of filtered sludge
     2 - filter surface area, sq. ft.
     3 - filter cake dry solids production rate, Ib/day

Notes:

1.  Supplementary input data tables consist of parameter values for the 15
     categories of sludge types shown below and are entered  into the program
     input by column
                                                 Digested       Heat
               Raw     Limed     Digested     + Elutriated     Treated
Primary
Secondary

Primary +
Secondary

     2.


     3.

     4.
Prediction of cake moisture and required surface area is from
Ref. C9.
Cost functions are from Ref. Cl.
Energy consumption is from^Refs.  C2 and C3.
                                     89

-------
                       Process:  Gravity Thickening

                         Subroutine ID Number:  8

 Input Design Parameters:

      1 - solids recovery ratio  (.9-.98)
      3 - overflow rate, gpd/sq. ft.  (400-800)
      5 - underflow thickened solids concentration for primary sludge,  mg/1
      6 - underflow thickened solids concentration for secondary sludge,  mg/1
      7 - underflow thickened solids concentration for mixed primary and
          secondary sludge, mg/1
      8 - solids loading rate for primary  sludge,  Ib/day/sq.  ft.   (20-30)
      9 - solids loading rate for secondary sludge,  Ib/day/sq.  ft.   (4-18)
     10 - solids loading rate for mixed primary  and  secondary sludqe,
          Ib/day/sq.  ft.   (8-20)
     16 - excess capacity factor

 Output Design Parameters:

      1  - surface area  of thickener,  sq. ft.

 Notes:

 1.   Cost functions are from Ref.  Cl.
 2.   Energy consumption is  from Refs. C2 and  C3.


                         Process:   Elutriation

                         Subroutine  ID  Number:   9

 Input Design  Parameters:

     1 -  solids  recovery ratio   (.7-.9)
     3 -  ratio of wash water volume to influent volume  (3)
     4 -  overflow rate, gpd/sq. ft.  (400-600)
     6--  underflow solids concentration for primary sludge, mg/1
          underflow solids concentration for secondary sludge, mg/1
          underflow solids concentration for mixed primary and secondary
          sludge, mg/1
          solids  loading rate for primary sludge, Ib/day/sq. ft.  (20-30)
          solids  loading rate for secondary sludge, Ib/day/sq. ft. (4-18)
          solids  loading rate for mixed primary and secondary sludqe,
          Ib/day/sq. ft.   (8-20)
          excess capacity factor
 7
 8 -

 9 -
10 -
11 -

16 -
Output Design Parameters:

     1 - surface area of elutriation tank, sq.  ft.
                                     90

-------
Notes-:    	                          .--..

1.  Wastewater effluent is used as wash water stream
2.  Cost functions are from Ref. Cl.
3.  Energy consumption is from Refs.  C2 and C3.
                       Process:  Sand Drying Beds

                        Subroutine ID Number:  10

Input Design Parameters:

    2 - suspended*'solids concentration in filtrate, mg/1  (200-3000)
    3 - solid fraction of sludge cake for primary sludge  (.2-.4)
    4 - solid fraction of sludge cake for secondary sludge  (.15-.3)
    5 - solid fraction of sludge cake for mixed primary and secondary sludge
    6 - detention time required for sludge holding tanks, days  (5-20)
    7 - excess capacity factor for sludge holding tanks
    8 - cost of land for drying beds, $/acre
   16 - excess capacity factor, for drying beds

Output Design Parameters:

    1 - bed area, sq. ft.

Notes:

1.  Required bed area is computed as in Ref. C9.
2.  Cost functions are from Ref. Cl.
3.  Energy consumption is from Ref. C3.
                Process:  Trickling  Filter  - Final Settler
                         Subroutine  ID  Number:   11

 Input  Design  Parameters:

     1  -  effluent 5-day  BOD,  mg/1
     2  -  water temperature,  degrees  C
     3  -  hydraulic loading on filter (without  recycle), mgd/acre   0040)
     4  -  specific surface area of  the filter,  sq.  ft./cu. ft   C935)
     5  -  effluent suspended  solids,  mg/1
     6  -  suspended solids concentration in  sludge  underflow from  final
         settler (mg/1)   (10000-40000)
     7  -  ratio of recycle flow to  filter influent   (Hi1
     8  -  overflow rate of final, settler,  gpd/sq. ft.   (600-800)
     9  -  sludge production factor, Ibs  sludge/lb BOD  removed   (.4-.65)
    10  -  ratio of settled to unsettled  effluent BOD   (.5)
    14  -  excess capacity factor for recirculation  pumps
    15  -  excess capacity factor.for final  settler
    16  -  excess capacity factor for filter

                                      91

-------
 Output Design Parameters:
      1 - surface area of final settler, sq. ft./lOOO
      2 - volume of trickling filter, 1000 cu ft
      3 - area of filter face, acres
      4 - depth of filter, ft.
 Notes:
 1.
 2.
 3.
 4.
Recycle of filter effluent and use of final settler are optional
Filter is sized according to Ref. CIO.
Cost functions are from Ref. Cl.
Energy consumption is from Refs.  C3 and C8.
                  Process:   Chlorination  -  Dechlorination
                         Subroutine ID  Number:   12
 Input Design  Parameters:
      1
      2
      3
      4
      5
    14
    15
    16
     dose of chlorine,  mg/1   (2-15)
     chlorine contact time,  minutes   (15-30)
     cost of chlorine,  $/ton
     dose of sulfur dioxide  for  dechlorination, mg/1   (2.5)
     cost of sulfur dioxide, $/ton
     excess  capacity factor  for  the  sulfur dioxide feed system
     excess  capacity factor  for  the  chlorine feed system
     excess  capacity factor  for  the  contact basin
Output Design Parameters:

     1 - volume of the chlorine contact basin, cu. ft.
     2 - amount of chlorine used, tons/yr.
     3 - amount of sulfur dioxide used, tons/yr.

Notes:

1.  Costs are from Ref. Cl.
2.  Energy consumption is from Ref.  C3.
                     Process:   Flotation Thickening
                        Subroutine ID Number:   13

Input Design Parameters:
     1
     2
     3
     4
     5
    solids recovery ratio  (-95)
    suspended solids concentration of thickened sludge,  mg/1
    overflow rate, gpd/sq. ft.   (700-1200)
    solids loading rate, Ib./day/sq.  ft.   (24-96)
    hours per week of operation
                                     92

-------
     6 - dose of polymer, Ib./ton
     7 - cost of polymer, $/ton
    16 - excess capacity factor

Output Design Parameters:

     1 - surface area of each thickener used, sq. ft.
     2 - number of thickeners used
     3 - total surface area required, sq. ft.
Notes:

    1.
    2.
    3.
       Thickeners are chosen from among a set of commercially available sizes,
       Costs are taken from Ref. Cl.
       Energy consumption is from Ref. C8.
                 Process:  Multiple Hearth Incineration

                        Subroutine ID Number:  14
 Input.Design  Parameters:
                                                      (2)
    1  - mass  loading,  Ib./hr./sq. ft. of  hearth area
    2  - number  of multiple  hearth incinerators  (2)
    3  - hours per week of operation
    4  - number  of start-up  periods per week
    5  - wind  velocity, mph
    6  - higher  heat value for volatiles,  BTU/lb.   (10000)
    7  - type  of fuel  used;  1  = fuel  oil,  2 =  natural  gas,  3  =  digester  gas
    8  - cost  of fuel  oil, $/gal.
    9  - cost  of natural gas,  $/1000  cu.  ft.
   10  - efficiency  in converting  BTU content  of exhaust gas  into
       equivalent  kwh
   16  - excess  capacity factor

Output Design Parameters:

    1  - total hearth area,  sq. ft.
    2 - total fuel  usage,  Ib./yr.
    3 - amount of dry solids incinerated, Ib./day.
    4 - cost of electrical  power to operate the incinerator, $/yr.
    5 - cost of fuel to operate the incinerator,  $/yr.

Notes:

1   Hearth sizing and  fuel  requirements are computed as in Refs.  C9 and
    Gil on the basis  of exit gas temperature of 800F.

2.  Costs are  from Ref. Cll.  Does  not include air pollution control
    equipment  or ash  disposal.
                                       93

-------
  3.   Energy consumption is  from Ref.  Cll.
                                                                   ambient
                      Process:   Raw Wastewater Pumping

                         Suroutine ID Number:  15

 Input Design Parameters:

      1 - pumping head, ft.   (10-30)
     16 - excess capacity factor

 Output Design Parameters:

      1 - peak flow capacity of the raw wastewater pumping system,  mgd

 Notes:

 1 .   Costs are from Ref.  Cl .
 2.   Energy consumption is  from Ref.  C8.


                           Sludge Holding  Tanks

                         Subroutine  ID  Number:  16
 Input  Design  Parameters:

     1 -  dentention  time, days
     16 -  excess  capacity factor

 Output Design Parameters:

     1 -  volume  of holding tanks, cu. ft./lOOO

 Notes:

 1.   Costs are from Ref. Cl.
                        Process:  Centrifugation

                        Subroutine ID Number:   17
Input Design Parameters:
     3
     6
     8
     9
hours per week of operation
cost of polymer, $/lb.
minimum number of centrifuges to be used
identification number of supplementary input tables
                                     94

-------
Supplementary Input Design Parameter Tables:

     1 - solids recovery ratio  (.5-.9)
     2 - percent solids of centrifuged sludge  .(5-35)
     3 - dose of conditioning polymer, Ib/ton   (0-15)
     4 - sludge feed rate, gpm   (10-200)

Output Design Parameters:

     1 - design capacity of the centrifuges,  gpm
     2 - dry solids processed, tons/yr.
     3 - capital recovery factor for centrifuges based on a 10 year lifetime
     4 - size of each centrifuge used, gpm
     5 - number of centrifuges used

Notes:

1.  Supplementary input data tables consist of parameter values for the 15
    categories of sludge types shown below and are entered into the program
    input by column.
               Raw
Limed
Digested
  Digested
+ Elutriated
                                                                  Heat
                                                                 Treated
Primary

Secondary

Primary +
Secondary

2.  Determination of the number and sizes of centrifuges is described in
    Ref. C9.

3.  Costs are  from Ref. CT.

4.  Energy  consumption  is  based on 1 hp/gpm as quoted in Ref. C13.


                        Process:  Aerobic Digestion

                        Subroutine ID  Number:  18

Input Design Parameters:

      4 -  sludge temperature,  degrees C
      5 -  process detention time, days   (12-22)
      6 -  biomass decay  rate coefficient at a sludge age of
          1  day at 20C, I/days  (.1-.5)
      7 -  true  yield  coefficient for 5-day BOD  l-b-./j
     10 -  maximum removal rate coefficient for  nitrification,  I/day   (7)
     11 -  oxygen transfer efficiency  (.05-.08)
     15 -  excess capacity factor for blowers
     16 -  excess capacity factor for digester
                                      95

-------
Output Design Parameters:

     1 - digester volume, cu. ft./1000
     2 - size of air blower, cfm

Notes:

1.  Complete mix, continuous flow operation is assumed.

2.  Solids destruction is modeled as in Ref. C14.  Adjustment of biomass
    decay rate to reflect solids retention time in both digester and
    activated sludge unit is from Ref. C6.

3.  Costs are from Ref. Cl.

4.  Energy consumption is from Ref. C8.
                                                                    (600)
              Process:  Truck Transport/Land Disposal of Sludge

                        Subroutine ID Number:  22

Input Design Parameters:

     1 - working hours per year
     2 - one-way hauling distance, miles
     3 - amortization period for trucks, years
     4 - fuel cost, $/gal.
     5 - cost of land, $/acre
     6 - program control; 0 = land spreading, 1 = landfilling
     7 - storage period for liquid sludge, years  (-1-.5)
     8 - maximum allowable nitrogen application rate, Ib./acre/yr.
     9 - land spreading site preparation cost, $/acre
    10 - land spreading application cost, $/ton
    15 - excess capacity factor for trucks
    16 - excess capacity factor for sludge storage

Output Design Parameters:

     1 - number of trips per year per truck
     2 - number of trips per year by all trucks
     3 - total  number of trucks
     4 - volume of sludge storage, cu.  ft./lOOO
     5 - amount of dry solids applied to land, tons/yr.
     6 - land area required, acres
     7 - equivalent annual  interest cost on capital  investment  in land,  $/yr.
     8 - capital  cost of land,  $
     9 - capital  recovery factor for trucks
                                    96

-------
Notes:

1.  Sludge spreading may involve either liquid or dewatered sludge.   Only
    dewatered sludge may be landfilled.  Dewatered sludge has a solids
    content of 15% or more.

2.  Land used for sludge spreading has a resale value equal to its initial
    cost.

3.  Costs and energy consumption of truck transport are from Ref. C15.

4.  Costs for landfills are from Ref. C16.

5.  Costs of storage lagoons are from Ref. Cl.

6.  Energy consumption for land spreading and landfill ing is from Ref. C3.


                      Process:  Lime Stabilization

                        Subroutine ID Number:  23

Input Design Parameters:

    1 -  lime dosage, Ib./ton of dry solids   (200-500)
    2 -  cost of  lime, $/ton
    16 -  excess capacity factor

Output Design Parameters:

    1 -  lime addition rate,  Ib./day
    2 -  amount of sludge  treated,  tons  of dry  solids/day

Notes:

1.  Costs  are from Ref. Cl.
2.  Energy consumption  is from  Ref.  C3.

          Process:  Rotating  Biological  Contactor -  Final  Settler

                        Subroutine ID Number:   24

 Input Design Parameters:

      1  - effluent 5-day BOD, mg/1
      2  - number  of stages in series  for the process  (4)
      3  - temperature.of the wastewater, degrees C
      4 - rate constan-t for BOD removal at 20C, gpd/sq.  ft.  (6-9)
      5  - rate constant for nitrification at 20C, gpd/sq. ft.   (4-5)
      6 - overflow rate for final  settler, gpd/sq. ft.  (600-800)
      7  - concentration of BOD at which nitrification begins, mg/1  (20-30)
      10 - sludge production factor, Ib sludge/lb BOD removed


                                      97

-------
      8 - concentration of waste solids from the final settler
          underflow, percent
      9 - cost of installed concrete, $/cu. yd.
     15 - excess capacity factor for the final settler
     16 - excess capacity factor for the rotating biological  contactor

 Output Design Parameters:

      1  - loading rate for BOD removal  adjusted for water temperature,
          gpd/sq. ft.
      2  - loading rate for nitrification adjusted for water temperature,
          gpd/sq. ft.
      3  - area per contactor stage,  sq.  ft.
      4  - total  active contactor area,  sq.  ft.
      5  - number of stages required  to  achieve the BOD concentration  at
          which  nitrification begins
      6  - number of remaining stages for nitrification
      7  - fraction of influent BOD remaining  in effluent
      8  - percentage ammonia nitrogen removal
      9  - overall  hydraulic  loading, gpd/sq.  ft.
     10  - surface area  of  final  settler,  sq.  ft.
     11  - solids  wasting rate,  Ib. dry  solids/day
     12  - fraction of suspended  solids  remaining after settling
     13  - number  of 100,000  sq.  ft.  shafts  per  stage
     14  - number  of 100,000  sq.  ft.  shafts  required
     15  -  materials  and supplies  cost, $/yr.
     16  -  electrical  power cost,  $/yr.
     17  -  labor cost, $/yr.

Notes:

1.  Waste stream transformation and  sludge production is modeled as
    in  Ref. C8.

2.  Cost functions are from Ref. Cl.

3.  Energy consumption is from Ref.  C3 and C8.


Process:  Primary Sedimentation - Activated Sludge - Waste Activated  Sludge
            Returned to Primary Clarifier

                        Subroutine ID Number:  25

Input Design Parameters:

     1 - option  number assigned to primary clarifier unit

     2 - option  number assigned to activated  sludge unit
                                     98

-------
Supplementary Input Design Parameters:  '
     1 through 16 - see Primary Sedimentation subroutine
    17 through 32 - see Activated Sludge subroutine
Output Design Parameters:
     1 through 20 - see Activated Sludge subroutine
Notes:
1.  See notes for Primary Sedimentation and Activated Sludge subroutines.
                  Process:  Nonoxidative Heat Treatment
                        Subroutine ID Number:  26
Input Design Parameters:
     4 - operating temperature, degrees C   (150-220)
     5 - hours per week of operation
     6 - number of start-ups per week
     7 - fuel cost, $/milli-- TTU
     8 - detention time for sludge holding tanks, days
     9 - excess capacity factor for sludge holding tanks
    16 - excess capacity factor for heat treatment
Output Design Parameters:
     1 - capacity of heat treatment unit, gpm
     2 - fraction of suspended COD remaining in effluent
     3 - fraction of volatile suspended solids remaining in effluent
     4 - annual heat requirement, million BTU/yr.
Notes:
1.  Reduction in BOD and volatile solids is based on operating temperature
    as described in Ref. C17.
2.  Costs are from Ref. C18.
3.  Energy consumption is from Ref. C19.
                                      99

-------
                                  REFERENCES
 Cl
 C2,
 C3,
C4,
C5.
C6.
C7.
C8.
C9.
 Patterson, W.  L.  and Banker, R.  F., "Estimating Costs and Manpower
      Requirements for Conventional  Wastewater Treatment Facilities",
      Water Pollution Control Research Series 17090 DAN 10/71,  U.S.
      Environmental  Protection Agency (1971).

 Smith,  R., "Electrical  Power Consumption for Municipal  Wastewater
      Treatment",  EPA-R2-73-281,  U.S.  Environmental  Protection  Agency,
      Cincinnati,  Ohio (1973).

 Wesner,  6. M.,  et al.,  "Energy Conservation  in Municipal  Wastewater
      Treatment",  EPA-430/9-77-001,  U.S.  Environmental  Protection
      Agency, Office of  Water Program Operations,  Washington, D.C.
      \'y/' / 

 Smith,  R., "Preliminary Design of Wastewater Treatment  Systems",
      Jour.  San. Eng.  Div., Proc. Amer. Soc.  Civil  Engr.,  95, 117,
      (1969).                   	*-   

 Lawrence,  A. W. and McCarty,  P.  L.,  "Unified Basis  for  Biological
      Treatment  Design and Operation", Jour.  San.  Eng. Div., Proc.
      Civil  Engr., 96., 757, (1970).                  	

 Goodman, B. L.  and  Englande, A.  J.,  "A Unified Model of the Activated
 Sludge Process", Jour.  Water  Poll. Control Fed. 46, 312 (1974).

 Christensen, D. R.  and  McCarty,  P. L., "BIOTREAT:  A Multi-Process
 Biological Treatment Model" presented at the Annual Conference of the
 Water Pollution Control Federation, Denver,  Colorado, October 8, (1974)

 Eilers, R. G., et al.,  "Applications of Computer Programs in the
     Preliminary Design of Wastewater Treatment Facilities -
     Section II",  EPA-600/2-78-1856, U.S. Environmental Protection
     Agency, Municipal  Environmental Research Laboratory,  Cincinnati,
     Ohio  (1978).

Smith, R. and Eilers, R. G., "Computer Evaluation of Sludge Handling
     and Disposal  Costs", Proceedings of the 1975 National Conference
     on Municipal  Sludge Management and Disposal, Anaheim, California,
     August 18-20  (1975).
                                    100

-------
CIO.  Roesler, J.  F.  and Smith R.,  "A Mathematical  Model  for a Trickling
           Filter", U.S. Department of Interior,  Federal  Water Pollution
           Control Administration,  Advanced Waste Treatment Research
           Laboratory, Cincinnati,  Ohio (1969).

Cll.  Unterberg, R.,  Sherwood, J.,  and Schneider, G.  R.,  "Computerized
           Design and Cost Estimation for Multiple Hearth Sludge
           Incinerators", available from National Technical Information
           Service as NTIS-PB-211-264, July (1971).

C12.  Smith, R., "Total Energy Consumption for Municipal  Wastewater Treatment",
           EPA-600/2-78-149, U.S.  Environmental  Protection Agency, Municipal
           Environmental Research Laboratory, Cincinnati, Ohio (1978).

CIS.  Haug, R. T., Tortorici, L.  D., and Raksit,  S. K., "Sludge Processing
           and Disposal:  A State of the Art Review", Regional Wastewater
           Solids Management Program, Los Angeles County/Orange County
           Metropolitan Area, April (1977).

C14.  Adams, C. E., Jr., et-al., "Modification to Aerobic Digestion Design",
           Water Res.. 8, 213 (1974).

C15.  Ettlich, W.  F., "Transport of Sewage Sludge", EPA-600/2-77-216,
           U.S. Environmental Protection Agency,  Cincinnati, Ohio (1977).

C16.  Wyatt, J. M. et al, "Sludge Processing, Transportation and Disposal/
           Research Recovery:  A Planning Perspective", EPA-440/9-76-002,
           U.S. Environmental Protection Agency,  Washington, D.C. (1975).

C17.  Heidman, J.  A., "Oxidative and Nonoxidative Heat Treatment of Waste-
           water Sludges - Part I:, Internal Memorandum,  U.S. Environmental
           Protection Agency, Municipal Environmental Research Laboratory,
           Cincinnati, Ohio, May 3 (1978).

CIS.  Ewing, L. J., Jr., et al., "Effects of Thermal  Treatment of Sludge on
           Municipal  Wastewater Costs", Final Report for EPA Contract
           No. 68-03-2186, U.S. Environmental Protection Agency, Municipal
           Environmental Research Laboratory, Cincinnati, Ohio (1978).

C19.  Heidman, J. A., "Oxidative and Nonoxidative Heat Treatment of Waste-
           water Sludges - Part II", Internal Memorandum, U.S. Environmental
           Protection Agency, Municipal Environmental Research Laboratory,
           Cincinnati, Ohio, June 29 (1978).
                                     101

-------
                     APPENDIX  D - PROGRAM LISTING
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
25
30
                EXECOP - MAIN

EXEC/OP - OPTIMIZATION VERSION OF EPA EXECUTIVE PROGRAM

SELECTS BEST COMBINATION OF UNIT PROCESSES FOR TREATING
HASTEWATER AND DISPOSING OF RESIDUAL SLUDGES.
SELECTION CRITERIA INCLUDES COST, ENERGY, LAND UTILIZATION.
AND A SUBJECTIVE PROCESS UNOESIREABILITY RATING.
PROGRAM CAN ALSO IDENTIFY UP TO 40 NEXT-BEST DESIGNS,

        WRITTEN BY L. RQSSMAN, EPA, MERL, DECEMBER 1978


INTEGER OS1,OS2
COMMON SMATX(20,4S),DMATX(20,50),OMATXC20,50),IP(50),
       INP,IO,ISl,IS2,asi,OS2,N,IAERF,CCQST<5),CaSTOC5),
       ACaST(5),DHR,PCT,HPI,CCI,RI,AF,RATIO,CKWH,
       CF,HER,EEP,ALAND
COMMON/PROC/ NPROC(20),KPRQCUO,20),NWPS,NPSPS,NSSPS,
             NTPSNTPU,JSTRM(22),JSIDE(20),P(20,10),
             IPOPT20),PINFLO(20),EFFSTD(20),ISC(45),IDC(45)
COMMON/COST/ CC20,10),CP(10),RHSC10),(10),UDR(50),
             IPSAVE(40,20),JMSAVE(40),TEPMAX,KMAX,FACTR,TUPE
             ,EEPMAXC20)
COMMON/TABLES/ DUMMYC600)
DIMENSION CSIM(10),CSAVEC10)
DIMENSION PSAVEC20.10]
EQUIVALENCE CPSAVEC1,1),IPSAVE(1,1)).CJMIX,JSTRM(21))
        INITIALIZE COUNTERS AND UPPER BOUND
        MITMAXalO
        MITER1
        TUPEaO.
        TSE^O.
        NITSUMaO
        ZUB*1.E20
        NPHASEal
        INP5
        I05
        CALL SUBROUTINE THAT READS IN INPUT
        ISWaO
        CALL INPUT(ISW)
        INITIALIZE PLANT INFLOW AND RECYCLE PENALTIES
DO 30 1=1,20
SMATX(I.1)*PINFLO(I)
DO 30 K3l,10
PSAVE(I,K)30.
PCI,K)xO.
P(2,5)3-10000,
P<2,6)310000.
TEPMAX3H(5)TEPMAX
                                   102

-------
c
c
c
c
c
c
c
c
40
400
C
C
C
C
45
50
C
C
C
90
100
t05

C
c
c
c
110
240
C
C
C
250
 230
 C
 C
 c
 235
 C
 C
 C
 25*
        If SYSTEM DESIGN  IS FIXE0, EVALUATE PERFORMANCE

IF  CISW ,EQ. 0) GO TO 40
CALL SOLVEfTCSfCSIM,NITER-)
CALL OUTPUTCISH,l,TCS,-l.,-l,)
STOP

        OPTIMIZATION PHASE
WRITECI0.400)
FORMAT(////,49X, "OPTIMIZATION PHASE' /49X. 18 ( '_' ))

        PERFORM SYSTEM OPTIMIZATION USING PENALTY TERMS TO
        ACCOUNT FOR SLUDGE RECYCLE FLOWS.

IF(MITER.GT.MITMAX)GO TO 300
TCOat.OUZUB
CALL OPTIM3XF12. 3)
        IF TCS VALUE WAS REACHED ONCE BEFORE, STOP WITH CURRENT
        UPPER BOUND AS OPTIMAL,

CONTINUE
IFtMITER.Efl.DGO TO 250
J2MITER-1
DO 240 Jj3l,J2
IF(CSAVE(JJ).EQ.TCS)GO TO 295
CONTINUE

        PERFORM FEASIBILITY CHECK

IFEAS31
DO 230 Kal.10
IFCC5IMCK) ,GT.RHSK))IFEAS*0
CONTINUE

        SAVE OBJECTIVE VALUE AND PRINT DESIGN OF CURRENT SYSTEM

CALL OUTPUTCISW)
IF (IFEAS.EQ.OJWRITEC 10.235)
FORMAT(//42X,'* SOLUTION IS NOT FEASIBLE **')
CSAVE(MITEH)*TCS
IF(IFEAS.EQ.O)GO TO 260

        IF TCS LESS THAN CURRENT UPPER BOUND t REPLACE UPPER BOUND

IF(ZUB.LE.TCS) GO TO 260
ZUBaTCS
DO 255 131,20
DO 2S5 Kal,10
                                    103

-------
 260

 C
 C
 C

 C
 C
 C
 C
 275
 285
280

290
C
C

C
295
305
C
C
C
C
300
405
C
C
C
C
C
310
C
C
C
330
 MITMINsMITER
 MITEPsMlTER+1
 IFCMITER.GT.MITMAXJGO TO 300

         COMPUTE NEW RECYCLE PENALTY  VALUES

 CALL PNALTYCCSIM)

         RE-ARRANGE ENTRIES IN PROCESS LISTS SO THAT CANDIDATE
         OPTIMAL PROCESS TRAIN APPEARS FIRST

 DO 290 Jl,NTPS
 L1NPROCCJ)
 DO 275 Lai,LI
 IF(KPROCCL,J).EQ.IPOPTCJ}>GO TO 285
 CONTINUE
 LSTARaL
 IFCLSTAR,EQ,1)GO TO 290
 KSAVE*KPROCCLSTAR,J)
 LlsLSTAR-l
 DO 280 Ll,LI
 L2LSTAR-L+1
 KPPOC(L2J)3KPROC(L2-1,J5
 CONTINUE
 KPROC(l,J)aKSAVE
 CONTINUE

         BEGIN ANOTHER  OPTIMIZATION  ITERATION
 GO TO  45

 WRITECIO,30S1 JJ
 FORMAT C/45X,SA"ME  SYSTEM AS  DESIGN  ,I3)

         SENSITIVITY PHASE
NPHASE32
IF(KMAX.LE.l) GO TO 360
WRITECIO,405)
FORMAT(////,49X,'SENSITIVITY PHASE/49X,17 1."})

        PERFORM SYSTEM OPTIMIZATION USING RECYCLE PENALTY VALUES
        ASSOCIATED WITH OPTIMAL SYSTEM DESIGN  (PSAVE) AND IDENTIFY
        ALL DESIGNS WITHIN  'FACTOR' OF OPTIMUM.

DO 310 1*1,20
DO 310 KalflO
PCIfK)aPSAVE(I,K)
LIHITaKHAX
FACTORmFACTR
TCOt.OlZU8
CALL OPTIMCNPHASE,LIMIT,FACTOR,TCO,TCP,1FEAS3
JFCIFEaS.EQ.OJSTOP

        EVALUATE TRUE PERFORMANCE OF EACH DESIGN

ZUBalOO.E20
DO 350 KSal,LIMIT
DO 330 Jxl,NTPS
IPOPT(J)>IPSAVE(KS,J)
JMIXaJMSAVE(KS)
CALL SOLVECTCS,CSIM,NITER)
TSEaTSE+1.
NITSUMaNITSUM+NITER
HRITECIO.IOO)  KS.TCS-TEPMAX
CALL OUTPUT (ISVJ)
IF(ZUB.LE.TCS)GO TO 350
                                   104

-------
350
360
370
C
C
C
390
390
395
C
C
C
C
C
C
C

10

15



20
25
C
C
C
C
   ZUBsTCS
   MITMINsKS
   CONTINUE
   WRITE(IO,370)MITMIN
   FORMAT(//45X,'BE5T DESIGN IS NUMBER ',13)

           COMPUTE SEARCH EFFICIENCY

   FEMst,
   DO 380 Jal.NTPS
   FEMFEMNPROCCJ)
   FEMFEM*NTPS*NITSUM/TSE
  ,5EFFsTUPE/FEM*100
   WRITE(IO,390)SEFF
   FORMAT(//33X,'SEARCH EFFORT WAS ",F8,4'% OF TOTAL',
                  ENUMERATIONi)
   WRITE(IO,395)
   FOPMAT(//47X,'  * SLUDGE MIXING POINT')
   STOP
   END
                   INPUT SUBROUTINE

   SUBROUTINE INPUT(ISW)

   INTEGER OS1,OS2
   COMMON SMATXC20,45),DMATX(20,50),OMATXC20,50),IPC50),
1         INP,IO,ISl,IS2rOSt,OS2N,IAERF,CCOST(5),COSTO(5),
2         ACOST(5),DHR,PCT,WPI,CCI,RI,AF,BATIO,CKWH,
3         CF,EER,EEP,ALAND
   COMMON/PROC/ NPROCC20),KPROCC10,20),NWPS,MPSPS,NSSPS,
2               NTPS,NTPU,JSTRMC22),JSIDEC20),P(20,10),
3               IPOPT(20),PINFLOC20),EFFSTD(20),ISC(4S),IDC(45)
   COMMON/COST/ CC20,10),CP(10),RHS(10),ri(10),UDR50J,
2               IPSAVEC40,20),JMSAVEC40),TEPMAX,KMAX,FACTR,TUPE
3               EEPMAX(20)
   COMMON/TABLES/ VACFiC3,S,5),VACFS(3,5,5),VACF6<35,5)rVACF9(3,5,5)
2       ,CENTU3,5,5),CENT2C3,5,5),CENTS(3,5,S),CENT7C3,5,5)
   DIMENSION TITLEC40)
   EQUIVALENCE (JMIX, JSTRM21J)

           READ IN JOB TITLE

   READ(INP,10)TITLE
   FORMAT40A2)
   WRITE(IO,15)
   FORMAT(X49X,'EXECUTIVE PROGRAM I/46X,'CQPTIMIZATION VERSION)'
2         /56X,'FOR/33X,'PRELIMINARY SXNIHESIS OF WASTE ',
3         "TREATMENT SYSTEMS')
   WRITECIQ,20)
   FORMAT(//39X,"U.S. ENVIRONMENTAL PROTECTION AGENCY'X36X,
2   'MUNICIPAL ENVIRONMENTAL RESEARCH LABORATORY'X39X
3   'SYSTEMS AND ECONOMIC ANALYSIS SECTION'X46X,
4   'CINCINNATI,  OHIO 45268')
   WRITECI0.25) TITLE
   FORMAT////I7X,40A2)

           READ IN INFLUENT WASTE CHARACTERISTICS, EFFLUENT
           DISCHARGE STANDARDS, AND ECONOMIC DATA.

   PINFLO(1)1,
   PINFLOf20)30,
   READCINP.l) (PINFLOCI),1x2,19)
   PEADCINP.U (EFFSTO(I),I1,5)
   READCINP,!) CCI.MPI.PI,YRS,DHR,PCT,CKWH,RATIO,CF
   AFaRI*(l.+RI)*YRS/C(l.+RI)e#XRS-l.)
                                    105

-------
c
c
c
c
c
c
c

c
c
c
c

c
c
c
c
c
c
c
c
c
c
c
c
c
c
30

c
c
c
c
32
c
c
c

33

35

40
        READ IN t HASTEWATER PPQCESS SI AGES,
         I SECONDARY SLUDGE PROCESS STAGES,
        * PRIMARY SLUDGE PROCESS STAGES, TOTAL * PROCESS UNITS,
        SLUDGE RECYCLE STAGE, AND STABILIZATION STAGES FOR

        SECONDARY AND PRIMARY SLUDGES.


READCINP,2)NWPS,NSSPS,NPSPS,NTPU,JRECYC


        ESTABLISH SEGMENT ID NOS. FOR PROCESS STAGES AMD ZERO OUT

        LENGTH OP PROCESS LISTS.


NTPSNWPS+NPSPS+NSSPS
 1-2
 3-4

 5-fr
 7-10

11-12
13-14
15-17

   20
   21
   22
        JSTPH CODE

        HASTEWATER PROCESSING STAGES
        SECONDARY SLUDGE PROCESSING STAGES
        PRIMARY SLUDGE PROCESSING STAGES
        SLUDGE STREAM FROM HASTEWATER TREATMENT
        SECONDARY SLUDGE RECYCLE STREAM
        PRIMARY SLLUDGE RECYCLE STREAM
        HASTEWATER, SECONDARY AND PRIMARY SLUDGE EFFLUENT STREAMS
        RECYCLE RETURN STAGE
        SECONDARY AND PRIMARY SLUDGE MIXING STAGE
        NULL PROCESS NUMBER
JSTRM(l)al

J5TRM(21aNWPS
JSTRM(3JaJSTRM(2m
JSTRM(4)aJSTRMC3)+NS5PS-l

JSTRM(S)aJSTRMC4m
JSTRM(6)aJSTRM(5J+NPSP5-l
JSTRM ( 7 ) a JSTPM C 6 ) + 1

JSTRM(10JaJSTRMC7)+NKPS-l
JSTRMCUJaOSTRMUOm

JSTRM(12)3JSTRM(U>+NSSPS-1
JSTPH (135aJSTPM{ 12) -H
JSTRMC14)*JSTRM(13)+NPSPS-1
JSTRHC15)3JSTRM(14J-fl

JSTRM < 1 6 ) aJSTRM U S ) + 1
JSTRMCl7)aJSTRM(16)+l

JSTRMC20)aORECYC
DO 30 J1,NTPS
NPROCCJlaQ

NaO


        READ IN STAGES ASSIGNED TO SLUDGE STREAMS FROM

        HASTEWATER TREATMENT


REAOCINPr2) (JSIDECI),Izl,NHPS)

UJaJSTRM(3)
DO 32 I3JJ,NTPS

JSIDECIJaJRECYC


        READ IN INFORMATION ON ALTERNATIVE PROCESS UNITS


DO 33 I*1,NTPS

EEPMAX(I)aO.

HRITECIO,35)
FORMAT(////47XlPROCESS ALTERNATIVES' /47X20C '_') 5
HRITE(IO,40)

FORMATC//' OPTION  PROCESS  STAGE  SIDESTREAM/
      HO,     HO.     NO.   DESTINATION", i7X-,  REMARKS-'
          
                                               '
                                                         t
                                    106

-------
45

50
51
53
55
60
C
C
C

115

120

125
130




135



C

200

210
        00 60 K1,NTPU
        READ(INP,3)J,N,IPROC,EMAX,UDRCN)
        IF (EMAX GT. EEPMAXCJ)} EEPMAXCJJaEMAX
        READ(INP,45) (TITLE CJJ),OJ= 1,40 3
        FORMATC40A23
        WRITE(IO,50) N,IPROC,J,J5IDC>J), (TITLE (JJ) ,JJ=1 , 40)
        FORMATC1X, 14,318, 9X.40A25
        NPROC(J)NPROC(jm
        KPROCCNPROC(J),J)=N
        IP(N)IPROC
        IF(IPRQC.EQ,0)JSTRMC22)sN
        IFUPROC.EQ.OJGO TO 60
        READUNP,1)CDMATXU,
        IF(IPROC.EQ.7}GO TO 51
        IFCIPROC.EQ.17)GO TO S3
        IFCIPROC.EQ.25JGO TO 35
        GO 'TO 60
        LaDMATXCilN)
                                   16)
        READ(lNP.l)
        READ{INP,ntCCENT5(I,JJ,L),Ial,3),JJ=U53
        READ(INP.lK(CENT7CI,JJ,L)Ilf3),Jj3l,5)
        GO TO 60
        NSAVE3DMATXO,N)
        READ(INP,1) (DMATX(I,NSAVE),Isljl6)
        NSAVEDMATX(2,N)
        REAOdNPd) CDMATXC I, NSAVE3 ,131,16)
        GO TO 60
        CONTINUE

                READ IN SELECTION CRITERIA DATA

        00 115 Kal,10
        W(K)sO,
        WRITECIO,120)
        FORMAT(X///48X, iSELECTION CRITERIA ' X48X, 18 ( l_! 3//)
        RITE(IO,125)
        FORMAT (32X ICRITERION i ,2SX 'WEIGHT  , 1 IX, 'LIMIT i ,
        READaNP,l)CW(K),K3l,8)
        HRITE(IO,130)(W(K),RHS(K),K3l,4)
        FORMAT(25X,' 1.  INITIAL CONSTR. COST, MS   I,6X,2CF10,2,8X),
     2        /25X,' 2.  ANNUAL 0 i H COST, SXMG',9x,2(F10.2,8X),
     3        /2SX,' 3.  TOTAL ANNUAL COST, SXHG',9x,2-
                                    107

-------
220
C
C
C
160
C
C
C
C
C
C
C
C
70
80
1
2
3
4

C
C
C
C
C
C
20
         WRITE (10, 220)  RATIO, CKHH,CK,RI,AF
         FORMATC33X," COST  ESCALATOR  FOR  MISC.  FEES' ,6X,F12.4/
                33X,'-COST  OF  ELECTRICITY, S/KWH > ,9X, F12.4/
                33X,l FUEL  CONVERSION EFFICIENCY ' ,9X,F12.4/
                33X, I DISCOUNT RATE > , 22X,F12. 4X
                33X, CAPITAL  RECOVERY FACTOR < , 12X,F12.4)
         CCHCCI/1.506
         WPIaWPI/1.122

                 INITIALIZE TARGET VALUES  OF CRITERIA  LIMITS

         TEPMAXaO.
         00  160  Jxl,NTPS
         TEPMAX*TEPMAX+EEPMAXCJ)
         RHSt5)TEPMAX-RHSC5)
         RHS(6)aTEPMAX+RHSC6)

                 READ IN  *  NEXT BEST  DESIGNS WANTED WITHIN iFACTR' OF
                 OPTIMAL  DESIGN.

         READ(INP,4) KMAX,FACTR
         FACTR*U+FACTR

                 IF SYSTEM  DESIGN IS  TO BE  FIXEO, READ IN PROCESS UNIT NOS,
                 AND FIND MIXING STAGE FOR  SECONDARY AND PRIMARY SLUDGES.

         READCINP,2,END380MIPOPTCJ),J3l,NTPS)
         ISW1
         JTJSTRMC4)
         JMIXaJSTRH 1 5 ) +NSSPS
         IF  CIP(IPOPTCJTJ)  ,NE. OJ GO TO 80
         JHIXJMIX-1
         JT*JT-1
         ir  CJT  .GT. JSTRM(2)1 GO TO  70
         JHIXaJSTRHCS)
         RETURN
         FORMATfSFlO.O)
         FORHATC8IIO)
         FQRMAT(3I10r2F10.03
         FORHATHO,F10.0J
         END


                OUTPUT SUBROUTINE

         SUBROUTINE OUTPUT CISWJ

         INTEGER OS1,OS2
        COMMON SHATXC20,45),DMATXC20,50),OMATX(20,SO),IPt50),
               INP,IO,IS1,IS2,OS1,OS2,N,IAERF,CCOSTC5),COSTOCS),
               ACOSTC5J,DHR,PCT,.WPI,CCI,Rl,AF^RATia,CKWH,
               CF,EER,EEP, ALAND
        COHMON/PROC/ NPROC20),KPROCC10,20),NWPS,NPSPS,NSSPS,
                     HTPS,NTPU,JSTRM( 22 J,JSIDEC20:,P (20,10),
                     IPOPTf 20 ) , PINFLO ( 20 ) , EFFSTD ( 20 ) , ISC C 45 } , IDC ( 45 )
        COMMON/COST/ CC20,10),CPC10),RHSC10),WUO},UDRC50),
                     1PSAVE(40,20)JMSAVE(40),TEPMAX,KMAX,FACTR,TUPE
                     ,EEPMAX(20)
        DIMENSION CTOTC10)
   FORMAT(// STAGE
2             NO,
3
        JMIXJSTRM(21)
                          PROCESS
                          OPTION
                                   SLUDGE, " ,38X, 'SELECTION CRITERIA'/
                                   TONS/DAYI,2X,8(6X,I1,4X)X
                                   108

-------
30
C
C
50
C
60

90
C

95

110
120

130

140


190
 200

 210

 220

 230

 240

 250
 255
STOTaO.
DO 30 Kl,10
CTOTCKJaQ,

DO 120 J1,NTPS
SMIX*' '
NalPOPTCJ)
IPROCaiPCN)
IFaPRQC.EO,0)GO TO 110
IFCJ.GT.JSTRMC2))GO TO 50
OS2NTPS+J
S2SATX (2 ,OS2)SMATXC10,OS2)8.. 33/2000.
STOTBSTOT+S2
GO TO 60

S2aSMATX  2, J)SMATXC10,J)*8. 33/2000.

IF(J,EQ.JMIX)SMIXa
WRITE t 10, 90) J,SMlX,N,S2,(CCJK),Ksl,8)
FORMAT(2X*I2,A1,5X,I2,5X,F8,2,2X8F11.2)

DO 95 K=l,10
CTOT /40X,35C '' }
  //49X,VQI,UME FLOW,  MGD ' /49X, ICONCENTPATION ,  MG/L/15X,
  'CONSULT PROGRAM REFERENCE MANUAL FOR MEANING OF  PROCESS  INPUT* ,
   AND OUTPUT DESIGN  DATA.1//)
DO 260 J1,NTPS
NIPOPTtJ)
IPROC*IP,9X,
   'SFHi,8Xr'SBOD' ,9X, 'VSS1 ,9X, 'TSS' )
 WRITE (10, 240)  (SMATXC I, IS 13,1=2,10), CSMATX C I ,031 ) , 1=2 , 10 ) ,
               SMATX(I,OS2),I*2,10)
 WRITECIO,255)
 FORMAT(7X,"DOC,8X, 'ONBC '  10X, 'ON ' , 10X, ' DP ' , 9X, ' DFM ' , 9X, ' ALK I ,
        8X,"DBODi,9X,iNH3i,9X,>N03')
 WRItE(IOr240)-(SMASX
-------
260
145
 C
 C
 C
 C
 90
 10
 C
 C
 C
 C
 C
 35
 40
 C
 C
 C
SO
C
C
C
too
 CONTINUE
 RETURN
 END
                 SYSTEM SOLUTION SUBROUTINE

 SUBROUTINE SOLVECTCS,CSIM,NITER)

 INTEGER OS1.0S2
 COMMON SMATXC20,45),DMATXC20,50),OMATXC20,50),IP(50),
        INP,IO,IS1,IS2,OS1V"OS2,N,IAEPF,CCOSTC5),COSTOC5),
        ACOSTC5),DHR,PCT,WPI,CCI,RI,AI?,*ATIO,CKWH,
        CF,FER,EEP,ALAND
 COMMON/PROC/ NPROCC20),KPROCUO,20),HWPS,NPSPS,NSSPS,
              MPS,NTPU,JSTRMC22),asiOE(20),PC20,lO),
              IPOPT(20),PINFLO(20J,EFFSID(20),ISCC4S),IDCC45)
 COMMON/COST/ C(20,10),CPC10),RHSC10J,W(10),UDP(50),
              IPSAVEC40,20).JM5AVEC40J,IPMAX,KAX,FACTR,TUPE
              ,EEPMAX(20)
 DIMENSION CSIMC10),TRECYCC20),RECYCC20)
 DATA NITMAX/20/,EPS1/.001/,EPS2/,0001/

 00 5 Il,20
 RECYCCDsO.
 DELSUMaO.
 NITER*0

         EVALUATE TOTAL SYSTEM  PERFORMANCE WITH CURRENT VALUE
         OF RECYCLE FLOW

 NITERSNITE.R + 1
 IFCNITER.GT.NITMAX)  GO TO 100
 DO 10 lal,20
 TRECYCCI)RECYCCI)
 SMATX(I,1)=PINFLOCI)
 SUMOLDsDELSUM
 CALL SYSTEM(TCS,CSIM,RECYC)

        MIX RECYCLE  FLOWS  OFF  OF  SLUDGt UNITS  TOGETHER

 THE  VALUE OF J  SHOULD BE  SET TO THE DIMENSION  OF  THE SECOND
 INDEX OF  SMATXU.J).
J2JSTPM(61
J3=JSTRMf20)
CALL SMIX(J,J1,J2,J3)
00 40 1*2,20
PECYCtI)3SMATX(I,J)

        CHECK FOR CONVERGENCE

ISTOP1
DELSUMaO.
DO SO 1=2,20
DELaABS(PECYC CI)-TRECYC(I))
DELSUMxDELSUM+DEL
IF(DEL,GT.EPS1RECYC(IJ) ISTOP^O
CONTINUE
IF(A8StDELSUM-SUMOLD).LT.EPS2*DELSUM) GO TO 100
IFCISTCP.EQ.l) GO TO 100
GO TO 90
        CONVERGENCE IS ATTAINED.
        RETURN
        END
                                        110

-------
V.
c
c
c
c
c
c
c
c
c
 c
 c
 c
 15
 20
 25
 C
 c
 c
 c
 30
 C
 c
 c
 c
 c
           OPTIMIZATION SUBROUTINE


   IMPLICIT ENUMERATION OPTIMIZATION PROCEDURE


   SUBROUTINE OPTIMCNPHASE, LIMIT, FACTOR, FMIN, PMIN, IFEAS)


   INTEGER QS1.QS2
   COMMON SMATXC20,45),DMATXC20,50),OMAtXC20,50),IPC501,
1         INP,IO,IS1,IS2,OS.1,OS2,N,IAERF;CCOSTC5),COSTOC5),
2         ACOSTC5),DHR,PCT,WPI,CCI,RI,AFRATIO,CKHH,

3         CF,EER,EEP, ALAND
   COMMON/PROC/ NPROC(20),KPROCUO,20),NWPS,NPSFS,NSSPS,
2                NTPS,NTPU,J5TRMC22J,JSIDE(20J,PC20.10),
3                IPOPTC20),PINFLOC20),EFFSTDC20),ISCC45),IDCC45)

   COMMON/COST/ CC20, 10) ,CP< 10) ,RHS C 10} i C 10) ,UDR{50) ,
2               IPSAVEC40(r203.JMSAVEt40)TEPMAX,KMAX,FACTR,TUPE

3               .EEPMAXC20)
   DIMENSION LSAVE(20),FSAVEt40)IPMIN(20)
   DIMENSION FTEMPClO),PTEMpaOJFJC20,10),PJC20,10)
   EQUIVALENCE (JLEFF, JSTRHC15) )  (JSSEFF, JSTRMC16) ) ,
2              L
   NKPROCCL,J)
   IPROCIP(N)
   ISlaJ
   IS20
         IF(J.EQ.JSTRM2))OSl3jLErF
         IF(J.EQ,JSTRM(4) lOSlstJSSEFF
         IF(J.EQ.JSTPM6))OS13JPSEFF
    IF(J.EQ.JSTRM(3))GO  TO  30
    IFCJ.EQ.JSTRMCSnGO  TO  40

    GO  TO  60


           JaSTART OF SECONDARY SLUDGE PROCESSING.
           MIX SECONDARY SLUDGE STREAMS TOGETHER.


    J13JSTPM(1)
    J23JSTRMC23
    CALL SMIXCJ,J1.J2,J5

    IDCCJ)*!
    ISCCJ)30
    IF  CSMATXt2rJ3  .GT.  0.) ISCCJ)*2

    GO  TO  80


           JaSTART OF PRIMARY SLUDGE -PROCESSING.
           MIX PRIMARY  SLUDGE STREAMS TOGETHER.
           FIND MIXING  POINT OF PRIMARY AND
            SECONDARY SLUDGES t JMIX) .
                                     m

-------
 c
 40
 45

 50
 C
 60
 C
 C
 C
 65
 70
 C
 C
 C
 C
 C
 80
75

85

C
C
C
C
95

C
C
C
 JlsJSTRMCl)
 J2JSTRM(2)
 CALL SMIXCJ,J1,J2,J)
 IDCCJ)1
 ISC(J)0
 IF (8MATXC2.J) .GT. 0.) ISCCJJel
 JT*JSTRM(4)
 JMIXJSTRM(5)+NSSPS
 IFCIPCIPOPTCJT)).NE.O)GO TO 60
 JMIXJMIX-1
 JTJT-1
 IFCJT.GT.JSTPMC2))GO TO 50
 JMIXSJSTRMC5)
 IF (J .EQ.  JMIX)  GO TO 65

 IFCJ.NE.JMIX  .OR. L .GT. DGO TO so

         J*JMIX. MIX PRIMARY AND  SECONDARY SLUDGES  TOGETHER,

 TEMPlasMATXC2,JSSEFF)+SMATXC2,J)
 00 70 1x3,20
 TEMP2sSMATX(2,J)SMATXl.J)+SMATXC2,JSSEFF)#SMATXCI,JSSEFF)
 SMATXCIrJJ*TEMP2/TEMPl
 SHATXC2/JJ3TEHP1
 ISCCJ)3lSCCJ)-HSCCJSSEFF)
 IF aSC(JJ  ,EQ. 2)  IDCCJ)*IDC(JSSEFF3
 IF CISCCJ3  .EQ, 3)  IDCt J)*10*IDCC JJ+IDCCJSSEFF)

         EVALUATE  SELECTION  CRITERIA FOR CURRENT PROCESS AND ADD
         TO  SYSTEM VALUES, CHECK  IF  CONSTRAINTS ARE MET AND
         CURRENT UPPER  BOUND NOT  EXCEEDED,

 CONTINUE
 CALL  UNIT(J,IPROC)
 PSUM*0,
 FSUMaO.
 DO  85 K>1,10
PTEMPCK)Pa(J,KJ+CP(K)
IFCK,EQ.5JFTEMP
-------
100
c
c
c
105

C
C
110
C
c
120
C
C
C
 130

C
C
C
 140
 C
 C
 160

 170

 180
 C
 C

 C
 C
 C
 90
 C
 C
 c
  190
JMMtroajMIX
DO 100 Jal.NTPS
IPMIN(JJsIPOPTCJ)

        IF THIS IS SENSITIVITY PHASE* INSERT NEW SOLUTION ' INTO LIST

IF(NPHASE,EQ,1)GO TO 180
IFCKOUNT,EQ.O)GO TO 120

   LOCATE POSITION OF LARGEST ENTRY  IN LIST
FMAXnO.
DO 110 Mal.KOUNT
IF(FTOT.EQ.FSAVECM))GO TO  180
IF(FSAVECM),LE.FMAX)GO TO  110
FMAXaFSAVECM)
KFMAXaM
CONTINUE
IFCFTOT.GE.FMAXJGO TO 140
IFtKOUNT.EQ.LIMITJGO TO  130

   LENGTH OF LIST IS LESS  THAN LIMIT
KINaKOUNT+1
KQUNTSKIN
GO TO  160

   LENGTH OF LIST EQUALS LIMIT.  REPLACE  LARGEST  ENTRY  WITH
   NEW SOLUTION.
KINaKFMAX
GO TO  160

   NEW SOLUTION IS  LARGER  THAN  LARGEST  ENTRY IN  LIST.  IF LENGTH
   OF  LIST  EQUALS LIMIT, REJECT  NEW SOLUTION.
 IF(KOUNT,EQ,LIMIT)GO  TO  180
 FMAXaFTOT
 KFMAXKOUNT+1
 GO TO  120

   PLACE NEW SOLUTION INTO LIST.
 FSAVECKlNJaFTOT
 DO  170 Jal.NTPS
 IPSAVE(KIN,J)*IPOPTCJ3
 JMSAVE(KIN)aJMIX
 CONTINUE


 JaNTPS

         MOVE TO NEXT PROCESS OPTION AT CURRENT STAGE
         IF NO MORE OPTIONS THEN MOVE BACK ONE STAGE
 LaLSAVE(J)+l
 IF(L.LE,NPROCCJMGO TO  25
 IF(J.GE,JSTART)GO TO 90

         IF CANNOT MOVE BACK ANY MORE STAGES THEN STOP THE SEARCH

 JMIXsJMMIN
 00 190- Jal.NTPS
 IPOPTCJ)aIPMINCJ)
 LIMITaJCOUNT
 RETURN
 END
                                     113

-------
  c
  c
  c
 5
 C
 C
 C
 C
 c
 c
 c
 10
C
C
C
c
30
C
C
C
c
          SYSTEM EVALUATION SUBROUTINE


  SUBROUTINE SYSTEMCTCS,F, RECYC)

  INTEGER OSUOS2
  COMMON  5MATXC20,45),DMATXC20.50),OMATXC20,50),IPC50),
         ^Pa'IS1'IS2'OS1'OS2'N'IAERF'CCosTC5),COSTCHS>,
         ACOST<3),DHR,PCT,WPI,CCI,RI,AF,RATIO,CKWH,
         CF,EER,EEP, ALAND
  COMMON/PROG/  NPROCC20) ,KPROCC 10,20) ,NHFS,NPSPS,NSSPS,
               NTPS,NTPU,JSTRM{22),JSIDE120),P(20,10),
  ,.,,        IPPT<20)'PINFLOC203,EFFSIDC20),ISCC45),IDCC453
  COMMON/COST/  CC20.103 ,CPC10) ,RHSC10} ,w'ciO} ,UDR<503 ,
               IPSAVEC40,20},JMSAVEC40),IEPMAX,KMAX,FACTR,TUPE
               9 EEPMAX C 20 }
  DIMENSION  FU03.RECYCC20)
  EQUIVALENCE (JLEFF, JSTRMflS) ) , ( JSSEFF, JSTPH( 16J ) , (JPSEFF,

             JSTRMC17)),CaRECYC,J5TRM(20)),(JMIX,JSTRMC21)}

  TCS0.
  DO 5 Kal,10
  FCKJ30,


         EVALUATE SELECTION CRITERIA FOR THE PROCESS SELECTED
         AT EACH STAGE,

 DO 90 J1,NTPS
 N3IPOPTCJ)
 IPROCIP(N)
 IS1J
 IS2>0
 OS1J+1
 IP(J.EQ,JSTRM(2))OSl5BJLEFF
 IF(J.EQ.JSTRMt4})OSlsJSSEFF
 IFCJ.EO.JSTRHC63)OS1JPSEFF
 OS2NTPS*J
 IFCJ.Efl.JRECYOGO TO  10
 IFCJ.EQ.JSTRM(33)GO TO 30
 IFCJ.EQ.JSTRMC5))GO TO 40
 GO TO 60


         J3RECYCLE MIXING POINT. MIX  INFLUENT  AND RECYCLE  STREAMS.

 TEMP1SMATX(2,J)+RECYC(2)
 DO 20 133,20

 TEMP2SMATXC2,J)SMATXCI,J)+RECYCi:2)*RECYCCl)
 SMATXCI,J)3TEMP2/TEMP1
 SMATXC2,J>aTEMPt
 SMATXCl,J)l.
GO TO 80


        JSTART OF SECONDARY SLUDGE PROCESSING.
        MIX SECONDARY SLUDGE STREAMS TOGETHER.

JlatJSTRMtn
J2sJSTRM(23
CALL SMIXCJ,J1,J2,J)
IDCCJ)1
ISCCJJaO
IF (SMATXf2,J) ,GT. 0.) ISC(J)*2
GO TO BO


        J5TART OF PRIMARY SLUDGE PROCESSING.
        MIX PRIMARY- SLUDGE STREAMS TOGETHER.
                                   114

-------
40
60
C
C
C
70
C
C
C
30
81

82
35
90

95
C
C
C
C
  JlaJSTRMU)
  J2*JSTRM2)
  CALL SMIXJ,J1.J2,J)
  IDCJ)1
  ISC(J)0
  IF  SMATX2,J)  .GT.  0.)  ISC(J)1
  IF(J.NE.JMIX)GO  TO  80

          JsMIXING POINT  OF  PRIMARY  AND SECONDARY SLUDGES.

  TEMP1*SMATX2,JSSEFF).+SMATX2,J)
  DO  70  1*3,20
  TEMP2sSMATX2,JSSEFF>SMATXI,JSSEFF)+SMATX2,J}*SMATXI,vn
  SMATX(I,J)TEMP2/TEMP1
  SMATX2J)sTEMPl
  ISCJ)ISCf J)+ISCJSSEFF)
  IF  ClSCtJ)  .EQ.  2)  IDC(J3aIDC(JSSEFF)
  IF  (ISCtJ)  .EQ.  3)  IDCJ)slO*IDCvmiDCJSSEFF)

          DETERMINE PERFORMANCE OF  PROCESS N AT STAGE J.

  CALL UNITJ,IPROC3
  DO  85  KS1.10
  IFCK,EQ.5)GO  TO  81
  IFK.EQ.6)GO  TO  82
  F(K)3F(K)-)-CCJK)
  GO  TO  85
  F(K)F(K)+EEPMAXJ)-CCJ,K3
  GO  TO  85
   CONTINUE
   CONTINUE
   DO 95 K'1,10
 C
 C
 C
        RETURN
        END
           UNIT PROCESS EVALUATION SUBROUTINE

   SUBROUTINE UNITJ,IPROC)

   INTEGER OS1,OS2
   COMMON SMATX20,4S),DMATX20,50),OMATXC20,50),IPSO),
1         INP,IO,ISl,IS2,OSl,OS2,N,IAERF,CCaST5),COSTO5),
2         ACOSTS),DHR,PCT,,WPI,CCI,PI,AF,RATia,CKWH,
3         CF,EER,EEP,ALAND
   COMMONXPROCX NPROC 20) ,KPROC  10,20),NWPS,NPSPS,NSSPS,
2               NTPS,NTPU*JSTRM22),.JSIDEC20),P20,10),
3               IPQPTC20),PINFLO20),EFFSTD20),ISC4S),IDC45)
   COMHON/COSTX C(20 , 10") ,CPf 10) ,RHS 10) , W(10) ,UDR50 ) ,
2               IPSAVE40,20),JMSAVE40),TEPMAX,KHAX,FACTR,TUPE
3               ,EEPM&X(20)
   COMMONXTABLESX VACFl3,5,53,VACF53,5,5),VACF63,.5,5),VACF93,5,5)
2       ,CENT13,5,S),,CENT2(3.5,5),CENTS3,5,S),CENT73,5,5)
   DIMENSION SAVEC20)
   EQUIVALENCE J2LP JSTRM2)-)  JLEFF, JSTHMf 15) ) ,
2   JMIX,JSTRM21))JSSEFF.JSTRM16))

   TUPETUPE*1.

           INITIALIZE ERROR INDICATOR

   IAERF*0
                                    115

-------
 c
 c
         INITIALIZE OUTPUT STREAMS ANO dtLtCTION CRITERIA
 15
 16
C
C
C
C
C
C
10

C
C
C
20

C
c
c
30
C
C
C
60
C
C
C
C
C
C
70
C
c

71
73
 ISCCOSt
 IOCCOS1 )slDC(ISl)
 00  5  1*1,20
 SMATXCTOSnsSM4TX(I. IS1)
 s--.Arxcr,os2)=o.
 00  15 Tt=t,5
 CCOST(II)sO,
 cosTocri)=o.
 ACOSTCTHsO.
 CONTINUE
 DO  16 K=l,tO
 CP(K)sO,
 CCJ,K)aO.
 EER=0.
 EEP=0,
 ALAND=0.

        DETERMINE  WHICH  PROCESS SUPROUIINt TO CALL

 IFCIPPOC.EQ.OGO TO  560
 IF(SMATXC2,I51) .EQ.O. )GQ TO  560
 GO  10 (10, 20, 30, 560, 560, 60, 70. SO, 90, 100, 110, 120, 130, 140, 150, 160,
       170, 180, 560 ,560, 360,220, 230, 2 40, 250. 2eO) ,IPPOC
 GO  TO 560
        PRELIMINARY  TREATMENT
CALL PPEL
GO TO 500
        PPIMAHY  SEDIMENTATION

CALL PRSET
GO  TO 500

        ACTIVATED  SLUDGE

IF  CDMATA(1,N) .GT.  . 75* (S-MATXC8  IS1J +SMA TX C1 7 , IS1 ) )
    GO TO 225
CALL AERFS
IF(IAEPF)50U,500,22S

        ANAEROBIC  DIGESTION

CALL DIG

    UPDATE SLUDGE DIGESTION CODE
IDCC051)s3
GO  TO 500

        VACUUM FILTRATION

  DETERMINE SLUDGE TYPE
I1=ISC(IS1)

  DETERMINE TYPE OF STABILIZATION
GO  TO (71,71,73),II
JlsIOCCISl)
J2=J1
lsl,
2=0.
GO  TO 74
IFCIDCflSU.LT. 10)60 TO 71
JlsIDCf ISD/10
JisIDCfJS6EFF)
                                    116

-------
c
c
74
C
C
C
C
80

81
C
C
82
C
C
83

C
C
c
c
90

C
c

c
c
c
c
c
c
100
 105
TEMPlsSMATX(2,JMIX)*SMATXC10,JMIX)
TEMP2SMATXC2,JSSEFF}*SMATXC10JSSEFF)
W2*TEMP2/TEMP1
W11,-W2

  DETERMINE PROCESS PARAMETERS
LOMATX(U,N)
DMATXa,N)WlVACFiai,Jl,L)+W2*VACFKU,J2,L)
DMATXt5N)Wl*VACF5airJlrL)+W2#VACF5CIi,J2,L)
DMATX(6,N)Wl*VACF6CIl,JtrL)-t'W2VACF6(Il,J2,L)
DHA'EX(9N)HlVACF9(ll,aUL>*2*VACF9(Il,J2,L)
CALL VACF
GO TO 500

        GRAVITY THICKENING

  SAVE SECONDARY INFLUENT STREAM
IFC1S2.EQ.ODGO TO 82
DO 81 I32>20
SAVE
-------
c
c
c
c

c
c
c
c
c
c
c
110
c
c
c
140

145

C
c
c
ISO

c
c
c
160

C
C
c
c
no
  CHECK THAT MINIMUM INFLUENT SOLIDS CONC. IS MET
IF(3MATX(10,IS1)/10000..LT.1.12)GO TO 225


   FIND COST OF SLUDGE HOLDING TANKS
SAVE1)DMATXC1,N)
SAVE(16>DMATXU6,N)
DMATXCl,N)aDMATX(6,N)

DMATXU6,N)DMATXC7,N)
CALL SHI

CCOSTC2)CCOSTUJ
COSTaC2)COSTOU)
DMATXCl.NJaSAVE(l)
DMATXtl6N)aSAVEC16)


   DETERMINE SLUDGE TYPE
   DETERMINE CAKE SOLIDS CONC.
DMATX{l,N)aDMATXC2+Il,N)
CALL SEEDS


   FIND COST OF LAND
CCOSTC3)DHATXC8,N3*ALAND
GO TO 500


        TRICKLING FILTER


IF CDMATXClrN) ,GT. .75*(SMATX(8 IS1 J+SMATXC 17. IS1 J ) )
   GO TO 225
CALL TPFS
IF CIAERF .GT. 0) GO TO 225
GO TO 500
C
c
c
120

C
C
C
130

CHLQRINATION

CALL CHLOR
GO TO 500

FLOTATION THICKENING

IF(1S2.GT.OJSAVEC2)SMATX{2,:
CALL TFLOT
IF(IS2.GT.O)SMATXC2,IS2)*SAVEC2)
GO TO 500


        INCINERATION


CALL MHINC
DO 145 1*1,20
SHATX(T,OSn0.
GO TO 500
        RAH HASTEWATER PUMPING
CALL RHP
GO TO 500
        SLUDGE HOLDING TANKS


CALL SHT
GO TO 500


        CENTRIFUGATION-


 DETERMINE SLUDGE TYPE
I1*ISC(IS1)
                                    118

-------
c
c
171
173
C
C
174
C
C
C
C
180
183
185
186

C
C
C
C
C
220
C
C
C
C
227

C
C
220
  DETERMINE TYPE OF STABILIZATION
GO TO (171.171. 173), II
JlsIDCf ISt )
J2=J1
Wlal.
GO TO 174
IFdOCf ISn.LT. 10)60 TO 171
JlalDCf ISD/10
J2*IDC{JSSEFF)
rEMPl=sMATX(2.JMIX)*SrtArX(10.JMIX)
TEMP2=SMATX(2,JSSEFF)*SMATX(10,JSSEFn
K2sTeMP2/TEMP1
  DETERMINE PROCESS PARAMETERS
L=OMATX(9,N)
DM ATX (1 ,N)=HtCENTl lll.jl . L ) +*2CENT U 1 1 J2 , L )
TEMP=W1*CENT2CIl,J1 .L) M2*.CENT2 ( 1 1 , J2 . L )
DMATX(2.N)aTEMP*t ,E4
DMATX(5N}sWtCeNT5(Il,Jl.LJ+2CENT5(ll,d2,L)
DMATXC7.N)=Wl*CENT7CTl,Jl,l;)+W2*CENT7(ll,J2,L)
CALL CENT
GO TO 500

        AEROBIC DIGESTION

   FIND SRT OF ACTIVATED SLUDGE UNIT
DO 183 Jl=t.J2LP
LsIPCIPOPTCJt) )
IF(L,EQ.3)GO TO 185
IF(L.EQ.25)GO  TO 185
CONTINUE
DMATX(3,N)=0,
GO TO 186
CONTINUE
CALL AEROB

  UPDATE SLUDGE STABILIZATION CODE
IOCCOSl)s3
GO TO 500

        LAND DISPOSAL

IF(OHATX(Of N) .EQ.DGO TO  227

  CHECK TO SEE THAT SLUDGE  IS STABILiZtD
IF UDCCIS1) ,LE.  1) GO TO  225
IF CIDC(ISl) .LT.10) GO TO  228
IF (IDC(ISI)XIO ,LE, 1) GO  TO 225
IF flDC(JSSEFF) .LE. 1) GO  TO 225
GO- TO 228

   CHECK THAT SOLIDS IS OVER  15%  IF  LAMOF1LLING
TEMpsSMATXUO,ISi)l.E-6
IF(TEMP.LT.0.15)GO TO 225

   CHECK IF FINAL  DISPOSAL  INCURS  ANK  COST
IFCDMATXf 16,N),EQ.O, )GO T.O  560
CALL
                                    119

-------
229

C
C
225
226
C
C
C
230
C
C
C
C
C
240

C
C
C
C
250
C
C
C
C
260
C
C
261
262
DO 229 1=1,20
SHATXCI, 031)30.
GO TO 500

  INFEASIBLE OPTION, MAKE OBJECTIVE VALUE VERY HIGH.
DO 226 Kal,lQ
CCJ,K)100.E20
CCJ.5)0.
RETURN

        LIME STABILIZATION

CALL LIME

  ADJUST SLUDGE STABILIZATION CODE
ZDC(OSl)s2
GO TO 500

        ROTATING BIOLOGICAL CONTACTOR

CALL RBC
GO TO 500

        PRIMARY SEDIMENTATION - ACTIVATED SLUDGE - WASTE
        ACTIVATED SLUDGE RETURNED TO PHIMAR* SETTLER

CALL PSASFS
IFCIAERF.GT.OJGO TO 225
GO TO 500

        HEAT TREATMENT

   FIND COST OF HOLDING TANK
IF(DMATX(8,N),EQ.O.)GO TO 261
SAVEC1)DMATXC1,N)
SAVEC16)DMATXU6NJ
DMATXCl,N)aDMATXC8,N)
DMATXC16,N)3DMATXC9,N)
CALL SHT
CCOSTC3)sCCOST(l)
C05TO(3)3COSTOU)
DMATX(1,N)*SAVE1)
DMATX(16N)3SAVEC16)

   CHECK IF SLUDGE DIGESTED AND FIND STREAM NOS.  AT MIXING POINT
DMATX(3rN)>0.
IF(IDC(IS13.EQ.3) OMATXC3N)d.
I1JMIX
I2-JSSEFF
IFCJ.GE.JMIXIGQ TO 262
IlaJ
12*0
IFCJ.GE.JSTRMCSnGO TO 262
12*0
DMATX(1,N3*I1
DMATXC2.NJ3I2

   FIND COST OF THERMAL REACTOR
CALL HEAT

IDCCOS1)5
GO TO 500
                                   120

-------
C
C
500
510

520
530
540
C
C
C
550
553

C
C
C
560

570
C
C
C
600
        SUM SUB-UNIT AMORTIZATION AND O&M COSTS.

DO 540 Hal, 5
CCOSTClI3CCOSTai3CCIRATIO
CaSTOClI3*COSTO(II3RATIO
IFCACOSTII33520,510,520
ACOSTII3*CCOSTII3AF/3650,PINFLO23}
SO TO 530
ACOSTII3ACOSTUI3*CCIRATia
CJ,33sCJ,33+ACOSTII3+CCISTOII3
Cj,i3cj,i3>ccosTin
CfJ,2}CJ,2>+COSTOUI3
CONTINUE;

        EVALUATE SELECTION CRITERIA
        CJ,2)C(J,2310,
        CJ,33CJ. 33*10.
        CCJ5)EEP/PINFLOC2)
        CJ,63C(Jf4)-C(J,5)
        CCJ,75aALAND
        C(J 8}aUDPCN)

                EVALUATE PENALTIES FOR EACH CRITERION

        ir(J.LE.J2LP)GO TO 600
        DO 555 Ksl.10
        CPtK)ap(2,K)SHATX(2,OS23
        TEHPlasMATX(2,OS2)
        DO 550 I3,19
        TEMP23SMATX(I,OS2)
        IFCI.EQ.9)TEMP2aSMATXC9,OS2)-SHATX(3a52)-SMATXC5,QS2)-SMATXC6/OS2)
        IFCI.EQ.13)TEMP2SHATXCl3,OS2>-SMATX(l8,QS2}-SMATX(19,aS23
        IFtTEHP2.LE.O. )TEMP20,
CONTINUE
60 TO 600

        PROCESS IS NULL PROCESS WITH ZERO COST

DO 570 1*1,20
SMATX(I,OSl)3SMATXCI,ISn
SMATXd, 032)30.
NJSTRMC22)
GO TO 600

        CHECK EFFLUENT STANDARDS ON BOO* TSS, TKN, HQ3, AND P

IF(J.NE.J2LP)RETURN
IFtSMftTX(9,JLEFF3+SMATX(17,JLEFF).GT.EFFSTDa))GO TO 225
IF(SMATXaO,JLEFF).GT,EFFSTD<23)GO TO 225
IF(SMATX(5,OLEFF)4-SMATX(i8,JLEFF)GTEFFST.DC3)3GO TO 225
IF(SMATX(10,JLEFF3.GT.EFFSTD(433GO TO 225
IF(SMATX(14,aLEFF3.GT.EFFSTD(533GO TO 225
RETURN
END
                                    121

-------
c
c
c
c
c
c
10
c
c
c
c
IS
c
c
c
c
c
c
c
c
20
c
c
c
40
c
c
c
so
                PENALTY SUBROUTINE
SUBROUTINE PNALTYCCSIM)

COMMON SMATX'C20,4S),DUMMY1C2000),IDUMMK58J,
       DUMMY2C27)
COHMON/PPOC/ ID(225),JSTRMC22},JSIDEC20),,P(20,10),IPOPTC20),
             PINFLOC20),EFFSTD(20),ISC(45),IDCC4S)
DIMEHSION TPECYCC20),DCC20,10),CRECYCC10),COPTaO).TSUMC10)
          ,CSIMUO),RECYCC20:)


00 5 Kl,10
TSUM(K)30.
DO 10 132,20
RECYC(I)0.
DO 10 K*1,10
PU,K)aO.
DCCI,K)0,

        EVALUATE SYSTEM PERFORMANCE WITH NO RECYCLES
        MIX RECYCLE FLOWS TOGETHER

CALL SYSTEM(TCS,COPT,RECYC)
JaJSTRMdV)
J1JSTRMC3)
J2>JSTRM(6)
J3JSTPMC20)
CALL SMIXCJ.J1,J2,J3)
DO IS 1^2,20
TRECYCCI)aSMATXCIJ)

        EVALUATE MARGINAL TREATMENT CRITERIA FOR RECYCLE
        COMPONENTS BY FINDING CHANGE IN CRITERIA FOR TREATING EACH
        COMPONENT SEPARATELY.

Q1TRECVC(2)
02.001*PINFLO(2)                                       .   '
IFCTRECYCC2).LT,Q2)RETURN
DO 200 132,19                                              v
GO TO (200,20,200,40,50,60.70,80,200,200,200,120,200,140,200,
       140,170.190}, I
GO TO 200
RECYCC2)*TRECYCC2)
GO TO 180

        SNBC

RECYCC2)Q2
RECYCC4)aTRECYCC4J*Ql/Q2
RECYC3)RECYCC4)
PECYCt9)*RECYCC4J
FECYCtlO)*RECYCC4J
GO TO 180

        SON
        RECYCC5JTRECYC(S)*Q1/Q2
        RECYCt9)RECYCC5)
        RECYC(lO)3RECYCjt53
        GO TO 180
                                    122

-------
c
c
60
C
C
C
70
C
C
C
80
C
C
C
90
C
C
C
120
C
C
C
130
C
C
C
140
C
c
c
170
C
C
C
190
C
C
180
135
        SOP                               ;

RECYCC23sQ2
RECYC<63TRECYC< 63*01/02
RECYCC93*RECYCC63
RECYC(10)aRECYCC63
GO TO 180

        SFH

RECYCC23=Q2
RECYCC7)TRECYCC73Q1/Q2
RECYCC103aRECYCC73
CO TO 180

        SBOD

PECYC2)sQ2
RECYCC83sTRECYCC83*Ql/02
RECYC(3)*RECYCC8)/1,87
RECYCC93SRECYCC8 3/1.87
RECYC(103>RECYCC8)/1,87
GO TO 180

        OTHER VSS (NOT SOC, SON, OR SOP)

RECYC(2)=Q2
RECYCC93CTRECYC(9)-TRECYC(33-TRECYC(5)-TRECYC(6))Q1/Q2
RECYC(10)aRECYCC9)
GO TO 180

        DNBC

RECYC(2)Q2
RECYCC12)TRECYC( 123*01X02
RECTfC113RECYCC123
GO TO 180

        OTHER DN tHOT NH3 OR N03)

RECYCC23Q2
RECYCU 3 3{TRECYCC 13 3-TRECYCt 18 3-TRECYCC 19))*Q1/Q2
GO TO 180

        DP AND ALK
RECYCI)3TRECYC( 13*01/02
GO TO 180

        DBOD

RECYC(23aQ2
RECYCC173TRECYC( 173*01/02
RECYCCll3RECYCa7)/l,87
GO TO 180

        NH3

RECYC2302
PECYCtl8)aTRECYCfl8)Ql/Q2
RECYCC13)RECYCC18)
DO 18S 1132,20
IFCRECYC(II3.IjT.O.)RECYC(II)aO.
CALL SYSTEMCTCS,CRECYCRECYC3
                                    123

-------
186
194
195
200
C
C

210
C
C
C
C
C
C
220
C
C
C
225
230
C
C
C
C
C
10
20
30
40

50
60
 DO  186  K*l,10
 DC(I,K)*CRECYC(K)-COPT(K)
 TSUM(K>TSUM(K)4>DCaK)
 DO  195  11*2,20
 RECYC(II)*0.
'CONTINUE
 DO  210  1*1,20
 RECYCmTRECYC(I)

         PENALTY   MARGINAL  CHANGE  IN  CRITERION  /  MASS  FLOW  *
                                 ADJUSTMENT  FACTOR
         ADJUSTMENT  FACTOR a (CRITERION  WX RECYCLE -  CRITERION  W/0
                                 RECYCLE) /  SUM  OF MARGINAL  CHANGES

 DO  230  Kl,10
 IF(TSUM(K).EQ.O.)GO TO  230
 DEL* (CSIMCK) -COPT CK) )/TSUMCK)
 P(2,K)DC(2,K)*DEL/TRECYC(2)
 DO  220  1*3,20
 IFCTRECYC(I).EQ.O.)Gd TO 220
 P(I,K)*DCU,K)#DEL/(TRECYCC2)*TRECYC(I))
 CONTINUE

         CORRECT  COMPUTED PENALTIES FOR  OTHER  VSS  AND ON

 TEMP*TPECYC ( 9 } -TREC YC c 3 J-TREC YC < s ) -TPEC YC c t> )
 IF(TEMP.LE.O.)GO TO 225
 P(9,K)*P(9,K)*TRECYC(9)/TEMP
 TEMPTRECYC (13) -TRECYC 18) -TREC YC (19)
 IF(TEMP,LE.O.)GO TO 230
CONTINUE
RETURN
END
         STREAM  MIXING  SUBROUTINE
SUBROUTINE  SMIX(J,J1,J2,J3)

COMMON SMATX(20,45),DUMMY1(2000),IDUMMY(58),
       DUMMY2(27)
COMMON/PROC/  ID(223),NTPS,NTPU,JSTRM(22),JSIDEC20),P(20,10),
              IPOPT(20),DUMMY(40),ISC(45),IDC(45)

SMATX(1,J)1.
TEMPl'O.
DO  10 JT*J1,J2
IF  (JSIDECJT) .HE. J3) GO TO  10
TEMP1*TEMP1+SMATX(2,JT+NTPS)
CONTINUE
IF(TEMpl.EO,0.)GO TO 50
DO  30 1*3,20
TEMP20,
DO  20 JT*J1,J2
IF  (JSIDECJT) .HE. J3) GO TO  20
lEMP2*TEMP2+SMATX(2rJT+NTPS)SMATX(I,JT+NTPS)
CONTINUE
SMATX(I,J)TEMP2/TEMP1
SMATX(2rJ)*TEMPl
RETURN
DO  60 1*2,20
SMATX(I,J)*0,
SMATX(2,J)>0.
RETURN
END
                                   124

-------
   SUBROUTINE PREL
           PRELIMINARY TREATMENT
   INTEGER OS1,GS2
   COMMON SMATXt20,45),DMATX{20,50),OMATXC20,50},IP(SO),
  . INP.IO,IS1,IS2,OS1,052,N,IAERF,CCOST(S),COSTOC5),
  . ACQSTCS),DHR,PCT,WPICCI,RI,AFRATIO,.CKWH(.
  . CF,EER,EEP,ALAND
   DO 10 132*20
10 SMATXU,OSnSMATX(IISl)
   IPREL3DMATXC1,N)
   X3ALOGCSMATXC2,ISnDMATX<16,N))
   IFCIPREL) 30,20,30
20 CCOST(1)*EXPC2.S66569+.619151*X31000,
   G.O TO 40
30 CCOSTC1)EXP<3.2S9716+.6191S1XJ*1000,.
40 X3ALOGCSMATXC2,IS1))
   OHPSEXPC6.398716+.230956*X+.164959*X*2-,014601X**3)
   XMHRS3EXP(5.846098+,206513*X+.068842*X*2+,023824X#3=
  . .004410*X**43
   TMSUEXP(7.23S657-|..399935X-,224979*X2-t-.110099X3-
  . ,011026*X*4)
   COSTOCnOHRS+XMHRS>DHR(l.+PCT)VrMSUWPI)/SMATX(2,n/3650.
     EEPEXPt2.64866*.53261lX-.034378X**2t.007274X#*3)
     EEREER+EXP(.47668+.256486X-.051504*X**2+.02465X**3)
     EER*EER+DHATXC1,N)#3.01EXP(.249*X)
   RETURN
   END

   SUBROUTINE PRSET
           PRIMARY SEDIMENTATION
   INTEGER OS1.QS2
   COMMON SMATXC20,45),DMATXC20,50J,OMATX(20,50) ,IP(503,
  . INP,IO,IS1,IS2,OSI,OS2,N,IAEPF,CCOST(5),C05TO(5),
  . ACOST(5),DHR,PCT,WPI,CCI,RI,AF,RATIO,CKKH,
  . CF.EER.EEP,ALAND
   HPWKsDMATX(3N>
   SMATX(2OS2)=DMATX(1,N)*SMATXC2,IS1)/DHATX(2,N)
   SHATX(2,QSl)=5MATX(2,ISn.SMftTXC2,OS2)
   TEHPla(l.-DMATX(l,N))SMATXC2,ISl)/SMATXC2,OSn
   TEMP23DMATXCl,N)SMATXC2,,ISn/SMATX{2,GS2)
   DO 10 1=3,10
   SHATXC1,OS1}TEMP1*SMATXaTEMPl*SMATX(20,131)
     SMATXC20QS2)TEMP2SMATX(20,151)
   DO 20 1311,19
   SMATXCI,OS2)nSHATX(I,ISl)
20 SMATXCI,OS1)3SHATXCI,OS2D
   GPS-2780.ALOG(DMATXtl,N)5-551.7
   APS3SHATXC2,IS1)1000./GPSDMATX(16,N)
   XBALOG(APS)
   CCOST(1)EXP<3.716354+,389861X+.084S60X*2-,004718#X#3)#
  . 1000,
   X3ALQG(APS/DMATXC16fN))
   OHPS3EXP(5.846565>,254813*X-t'.ll3703X2-.010942X3)
   XMHRS3EXP(5.273419+.228329*X+.122646X*2-.011672*X*3)
   THSUEXP(5.669881+.750799*X)
   CaSTO
-------
c
c
c
c
c
c
c
c
c
101
c
c
102
c
c
15
103
     X3*IiOG
    CBaCBlSRT*-.415
    BOD2*CStl.+CBSRTJ/(SRT(CYCK-CB3-l.)
    INDEX33
    GO TO 25
    IFCABS(BODEFFBODLIM}.LE.O,001*BODLIH)(>0 TO 30
                                    126

-------
c
c
20
C
C
25
C
C
30
C
C
STEP 4  DISCARD OLD POINT THAT IS ON SAME SIDE OF BODLIM AS IS THE
         CURRENT 8QDEFF AND RETURN TO STEP 3
    IFm(BODEFF-BODLIM),LE.O.)GO TO 20
C
C
40

C
c
c
c
so
c
c
60
70
    XlaX2
    Y2BODEFF-BODLIM
    X2SRT
    GO TO 15

COMPUTE HRT. SETTLER EFFICIENCY, AND BODEFF
    HRTSRT/MLVSS*(MLRSS+CY*(BOD1-BOD2)/(1.+CB#SRT)*(1,+.2#CB*SRT))
    XRSSBTSSt,I/MLVSS-t-MLISS*SRT/HRT)
    BODEFFsBOD2+,97.8*XRSSSRT/HRTCY*{BODl-BOD2)/(l,+CB*SRT)
    GO TO (101,102,103), INDEX

COMPUTE CONC. OF SOLIDS IN AERATOR
    MLASSsSRT/HRT*CY*(BODl-BOD2)/(l.+CBSRT)
    MLRSSs.2CB*MLASS*SRT+SRT/HRT*MLRSS
    MLISSSRT/HRT*MLISS
    MLSSsMLVSS+MLISS

FIND HASTE SLUDGE SOLIDS CONC. AND FLOW RATE
    SMATX(10,OSl)sTSSLIM
    SMATX(10,OS2>*MLSSXRTURN*(1.*RTURN-HPT/SRT)
    SMATX(2OS2)SMATX (2, IS1)*(MLSS*{1. +RTUR)-SMATX( 10,051 )-
 2               SMATX( 10, OS2)*RTURN)/(SMAIX(10,OS2)-SMATX(1 0,051))
    SMATX(2,OSl)aSMATX(2,ISl)-SMATX(2,OS2)

COMPUTE CONC. OF SOLIDS SPECIES IN OVERFLOW
    SMATX(4,OSl)3XPSS*(,2*CBMLASSSRT/2.46+SMATXU,ISl)*SRT/HRT)
    SMATX(4,OSl)sSMATX(4,OSl)+XRSS.2MLASS/2.46
    SMATXC3,OSl)SMATXC4,OSl)-t-XRSS.8MLASS/2.46
    SMATXC5,OSl>aXRSSC.12*MLASS+.06MLRSS)
    SMATX(6,OS1)XRSS*.025MLASS
    SMATX(7,OSl)sXRSSMLISS
    SMATX(0,OS1)3BODEFF-BOD2
    SMATX(9,OS1 }sXRSSMLVSS
    SHATXC20,OS1 )=XRSS*MLASS

COMPUTE CONC. OF SOLID SPECIES IN UNDERFLOW
    PSMATX(10,OS2)/SMATX(10,OSl)
    DO 40 I3,9
    SMATX(I,OS2}3SMATX(I,OS1)*R
    3HATXC20,OS2)3SMATXC20,QS1)R

COMPUTE DISSOLVED C, N, P, AND FIXED MATTER
    SMATXClt OS1)SMATXC 12, IS1)+BC)D2/BOD1(SMATXU1,IS1)-SMATXC 12,151 ))
    SMATX(12,OSl)aSMATX(12,ISl)
    SMATX(13,OS1>3SMATX(13,IS1)+SMATX(5,IS1)-SMATX(5,OS1)#SMATX(2,OS1)/
 2  SMATX(2,IS1)-SMATX(5,OS2)SMATX(2,OS2)/SMATX(2,IS1)
    SMATX(14,OS1)SMATX(14,IS1)+SHATXC6,IS1)-SMATX(6,QS1)SMATX(2,OS1)/
 2  SMATX(2,IS1)-SMATX(6,OS2)#SMATX(2,OS2)/SMATX(2,IS1)
    SMATX(1S,OS1}BSMATXC1S,IS1)

CHECK FOR NITRIFICATION (SRT ,GE. 5 DAYS)
    IF(SRT.LT.5.)GO TO 50
    IP(SRT,05CKN,LE.1.)GQ TO 30
    SMATXU 8,051 )!.*( 1,/(CSRT.05*CKN )-!,))
    SMATX(19,OSl)aSMATX(13,-OSl)-SMATX(lS,OSl)
    GO TO 60
    SMATX(19,OS1)*SMATX(19,IS1)
    SMATX(18,OS1)>SMATX(13,081)SMATX(19,OS1)

ADJUST ALKALINITY AND DISSOLVED BOD
    SMATX(l6,aSl)*SMATX(16,ISl)-7.14#
-------
c
c
c
c
SIZE THE  AERATION  TANK
    VAERHRTSMATXC2,1S13*DMATXU6,N3
    XALOG(YAER*1000./7.48)
    CCOSTC133EXPC2, 41 4380+.175682*X+.084742X*#2-.002670X**3 3*1000.
    COSTOC1330.

COMPUTE AIR REQUIREMENTS
    ARCFD*C1. 5-1, 42cy)5MATXC2.ISl 3* (BOD 1-80023*8.33
    ARCFD3ARCFD+1.42CB*.8*MLASS*VAER*8,33
    ARCFDARCFD+4.6*CSMATX<19,OS1)-SMATXC19,IS133*SMATXC2,IS13*8.33
    ARCFD3SRCFD/AEFF/.232/.075        ,
    BSIZEARCFOX 1 440 . *DHATX U 5 , N 3
    CFPCL3ARCFD/1,E6/SMATX(2,IS13
    XaALOGtBSIZE/lOOO.)
    CCOSTC2)3EXPC4,145454+.633339*X-I-. 031 939X*2-. 00241 9*X*3 3*1 000,
    X*AIiOG(BSIZE/1000./DMATXC15,N))
    QHRSaExP(6.900586+,32372S#X+.059093*X*2-.004926*X**3J
    XHHRS3EXPC6.169937+.2948S3*X+-.175999X**2-.040947*X**3+
 2            ,003300X*4)
    HP3BSIZE/DHATXC15,N)8.l*144./(33000,*t8)
    XKN*.8*HP
    XKWPXXKW24.*365.
    ECOST3XKWPY*CKWH
    SCOST3EXP(.62138+,482047*X)*1000,
    THSUECOST+SCOSTWPI
    COSTO(2)=(COHRS+XHHRS3DHR*(1.+PCT)+TMSU)/SMATXC2,1)/3650.

COMPUTE RETURN SLUDGE PUMPING REQUIREMENTS
    QRxRTURNSMATX(2,ISl)*DMATX(14,N)
72

74
76

78
80
C
C
    CCOSTC333EXP(3.4815S3+.37748S*X+.093349*X*2-.006222X#*3)1000.
    X3AI,OGCQR/DMATX(14,M))
    OHRS3EXP(6.097269+.2S3066X-.193659*X*2+,078201X**3-
             .006680*X**43
    XMHRS3EXPC5.911541-.013158*X*.076S43*X*2)
    IF (QR-1.44J 72,74,74-
    PEFF,7
    GO TO 80
    IF (OR-10.08) 76,78r78
    GO TO 80
    PEFF3.83
    YKwPY3QRl.E6HEAD/l440r/3690./pEIfF/,9*,745724,365.
    ECOST3YKWPXCKWH
    SCOSTEXP(S.051743+.r301610*X*.197183*X*2-.017962*X**3J
    TMSU3ECOST+SCOSTWPI
    COSTOC3)3tOHRS+XHHRS3#DHR(l.*PC1ir)+TMaU)XSMATXC2|l)/3650,

COMPUTE FINAL SETTLER REQUIREMENTS
    AFSaSMATXC2,aSl)*1000./GSS*DMATXU3,N)
    AFS2.04SMATXC2,IS13*tl.+RTURN)HLSS/lOOO.(SMATX(10faS2)X1000,3**,6
    IFCAFS2.GT.AFS3AFS3AFS2
    X3ALOGCAFS)
    CCOST t4>=EXP (3. 71 6354*. 389861 *X+ 08 4560*X**2-. 0047 18X*3 )1000,
    X3ALOG(AFS/DMATXC13,NJ 3
    OHRS*EXPC5.84656S-t-,2S4813*X-t-,113703*X*2-.010942*X*33
    XMHRSEXP(5.273419*.228329X-t',122646*X2-.OU672X33
    TMSUEXPt5.669881+.750799*X3
    COSTO(43a(CaHRS+XMHRS3DHR*(l.+'PCT3+TMSUWPI3/SMATXt2,13/3650.
                                    128

-------
C
C
     FILL  tN  OUTPUT  MATRIX  VALUES
        OMATXC1N)  3BOD1
        OMATX-CZrN)  SR$
        OMATXC3N)  sXRSS
        OMATXC4.N)  sAFS
        OHATX(5N)  aCK
        OMATXC6.N3  3CB
        OMATXC7.N)  aVAER
        OMATX(8N)  aVAER
        OMATXC9.N)  aMLASS
         QMATXdO.NJaO.
         OMATX(llN)=MLRSS
         OHATX(12,N)s.2#CBSRTMl,ASS
         OMATX(l3,M)aHLI5S
         OHATX(l4N)BOOt-BOD2
         QHATX(IS,N3=RTURN
         OMATXU6,tO=CKN
         OMATX(l7,N)sARCFO
         OMATXC18,NJ=BSIZE
         DMATX(19,N)3CFPGL
     COMPUTE ENERGY REQUIREMENTS
1000
         RETURN
         lAERFal
         RETURN
         END
      SUBROUTINE DIG
C             SINGLE STAGE ANAEROBIC DIGESTION
      INTEGER'osi,os2
      COMMON SMATX<20,45),DMATX(20,50),OMATX(20,503,IP(50),
     . INP.IOflSl,IS2,OSl,OS2,N,IAERFfCCOST(5)COSTOC53.
     . ACOST(5),DHR,PCT,HPI,CCI,RI,AF,RATIO,CX*H,
     . CF,EEREEPALAND
      C1DIG*.28XEXP(.036C35.-DMATXC2,N)))
      C2DIG*700,*EXP(,10(35.-DMATX(2,N]))
      DIG12aSHATX(3,ISl)-SMATX(4,ISl)+SMATXCU.ISn-SMATXC12,ISl)
        TDaDMATX(l.N)
        DIGt3sC2DIG/tClDIGTD-l.)
20      TEMPlatOIG12"DIG13)/(SMATX(3ISl)+SMATXCllISin
      SMATX(2lQSl)sSMATXC2.Isn
      SMATX(3.0S1)=SMATX(4,IS1)+.75OIG13
      SMATXt4,OSl}aSMATX(4,ISl)
      SMATX(5,OSn3(l.-TEMPl)*SMATX(SfISl)
      SMATX(6>OS1)3C1.-TEMP1)SHATX(6,IS1)
      SMATXt7,OSl)aSMATX(7,ISn
      SMATXC8,OSn3{SMATX(3,OSl)-SMATX(4OSl))1.87
      SMATX(9,OSl)3SMATXt3fOSl)*2,38
      SMATX(10,OSl)sSMATX(9,OSn*SMATX<7,OSl)
      SMATX(U,OSl)3SMATXU2,ISl)-t',25DIG13
      SMATX( 12, OSnaSMATXC 12.ISI)
      SMATXC13,OSn3SMATXU3,ISl)+SMATXC5,Isn,65TEMPl
      SHATX{ 14,051 )SHATX ( 14. IS1) -CTEMP 1SMATX (*> > ISi }
      SMATXC15,OS1)3SMATXU5,IS1)
      SMATXC16,OSl)=SMATXC16.ISn+(SMATXtl3,OSi}-SATX(13,ISl)J*3,S7
      SMATXC17,OSlJs(SHATX(11OS13-SMATXC12,051))*1.87
      SH ATX C 18, OSU=SM ATX C 18,131)
      SMATXC19,asl)=SMATXC19,ISn
         SMATX20,OSl)3SMATXt20,Isn*.7SDlG13/CSMATXC3,ISl)-
      2                 SMATX(4,ISin
      CH43163.3S(OIG12-DIG133*SMATX(2,IS1)
      C0224909*CDIG12-DIG13)*SMATX2,IS1)-CH4
      VDIGaSMATXC2,IS13TD1000.y7,48DMATX(16N)
      XALOG(VDIG3
       IF(VDIG-20.)  22.25,25
                                     129

-------
20
   22 CCOSTU3aEXPC4.594215+.127244X..004001*X*23iOOO.
      GO TO 28
   25 CCQST(l)aEXPe7.679634-1.949689X+.402610X*2-.018211X*33
      1000.
   28 X3ALOGCVDIG/DMATXC16,N33
      IFCVDIG-20.3 30,40,40
   30 OHRSEXP(6,163803 + .U6305X-.012470*X*2J
      XMHRS3EXPC5.726981*.113674*X3
      TMSU3EXPC6.531623-|..198417X+.02J,660*X*23
      GO TO 50
   40 OHRS*EXPC9.129250-1.816736*X+.373282X*2-.017290X**33
      XMHRS3EXPC 8, 566752-1. 768l37*X-t-. 363173X*2-.016620*.X*3 3
      TMSUaEXPf8.702803-1.182711*X+.282691X*2-.013672X**3)
   50 "STOO 3.UaHRS+XMHRS3*DHR*U.+PCT3+TMSU*WPI)/SMATXC2, 13/3650.
      OMATX(lN3aClDIG
      OMATXC2,N33C2DIG
      OHATXC3,NJaVDIG
      OHATXC4,N)aCH4                                              ,
      OHATXC5,NJ3C02
      E19.589*VDIG/DMA7XC16,N)
      TDIG3l.8*DHATX(2,N3+32.
      CAPSHATXC2,IS1)*8.33*1.E6CTDIG-60.)
      XXALOG(CAP/1000./24.3
      E2a.75*24.*.7457EXPC2.00069-1.02649*XX+.127492*XX#2)
      E3*,000293CAP*CF/r75
      E4aVDIG/DMATXC16,N)62500.*DHATXC3,N)#,000293*CF/.75
      EER3E1+E2+E3+E4
      EEPCH4*600,.000293*DMATX(4,N)
   RETURN
   END

   SUBROUTINE VACF
           VACUUM FILTRATION
   INTEGER dSl,OS2
   COMMON SMATX(20,45},DMATX(20,50),OMATX(20,50),IPC50),
  ,  INP,IO,IS1,IS2,OS1,OS2,N,IAERF,CCOSTC5),COSTO(5),
  .  ACOST(5),DHR,PCT,WPI,CCI,RI,AF,RATIQ,CKHH,
  .  CF,EER,EEP,ALAND
   FECL33DMATXC5,N)
   CAODMATXC6,N)
   CFECLsDHATXC7,N)
   CCAO>DMATXC8,N)
   DPOIiVaDHATX(9,N)
   CPOLVaDMATXtlO.N)
     SAVE1=SMATXC7,IS1)
     SAVE23SHATX10,IS1)
   SMATX(7,ISl)sSMATXC7,I51)+CFECL3+CAO+DPOLY)*SMATXaO,ISl)/2000.
   5HATX(10, ISl )sSMATX( 10, ISlJ-f-(FECL3*CAO+DPOLI3SMATXC 10,1313/2000.
   SMATXC10,OS233DMATXC3,N3
   Wps88./CsMATXC10,1313/10000.3**.123
   SHATXC10,0513s(100.-HP3*10000.
   SMATX(2,OS133(SMATX(2,IS13*SMATX(10,IS133/(SMATXtlO,OS13-
  . SMATXC10,OS233
   SMATXC2,OS23sSMATXC2,ISl3-SMATXC2,OS13
   TEMP23SMATXC10,OS13/SMATX(10,IS13
   TEMP33SHATXC10,0323/SMATX(10,1513
   DO 10 1=3,9
   SMATXCIrOS13sTEMP25MATXCI,IS13
10 SMATX(I,OS23sTEMP3*SMATX(I,IS13
     DO 20 1311,19
     SMATX(I,OS13sSMATX(I,IS13
     5MATXCI,OS2)3SMATXI,IS13
     SMATX(20,OS133SMATX(20,I513TEMP2
     SMATXC20,OS2)3SMATXC20,IS13*TEMP3
   5FSMATXt10,1513/10000.
   SCalOO.-WP
   FVF*DMATX(lrN3/11.99/l./SF-l./SC)
   AVFSMATXC10,IS13SMATXC2,IS13*58.31/FVF/DMATXC2,N3*DMATX(16,N3
   IVACF31.
   P5DDSMATX(10,IS1)*SMATX(2,IS138.33
                                   130

-------
   XsALOGCAVF)
   CCOSTCUsEXP 3,288028+, 194537*X+.038313*X*2)1000,
   X3ALOG(PSDD365./2000)
   IFUVACF)  40,30,40
30 aHRSaEXPC6.0694t9-,,009894X+,042699X*2i
   GO TO  50
40 OHRSsEXPc3.714368>.850848*X-.074615*X**2+.005085X3)
50 XMHRSaEXP(4.306UO-,09369S*X*.047738X**2)
   SUPPaEXP(-3,U35l54-,718466*X5*iOOO.
   CHEMaPSDD*36S,/2000.CFECL3CFECLtCAOCCAO+DPaLYCPOLY)
   COSTO < 1 )  C (OHRS+XMHRS ) *DHR* ( 1 . -t-PCT ) +SUPPWPI+CHEM ) /
   .  SHATXC2,1}/3650.
   OMATXC1,N)3WP
   OMATXC2,H)AVF
   OHATX(3,N)*PSOO
      XALOG(AVF/DMATX(16,N)}
      EER3EXPC3.21323*.378196X+.036877X**2)
      EEREER-(.PSOD*(FECL3*,44>CAO*.36+DPaLX*.14)/2000.
      XSALOGCSMATX (2, isi)*sMATxtto,isn*8. 33/2000.)
                  ,0057516X*3)
      SMftTXC7,ISl>aSAVEl
      SMATXC10,IS1)=SAVE2
    RETURN
    END
   SUBROUTINE THICK
           GRAVITY THICKENING
   INTEGER 051,032
   DIMENSION SMATC20)
   COMMON SMATXC20,45),DMATXC20,50)rOMATXC20,50),IPC50),-
  . IMP,IO,IS1,132,051,052,N,IAERF,CCOST(53COSTO(5),
  . ACOST(5),DHR,PCT,WPI,CCI,RI,AF,RATIO,CKKH,
  . CF,EER,EEP,ALAND
   DO 2 1*1,20
 2 SMATCI)=0.
   IFCIS2) 7,7,4
 4 DO 6 1=1,20
 6 SMAT(I)3SMATX(I,IS2)
 7 SMATXCIO,OSI)3DMATX(2,N3
   SMATXC2,OSl)sDMATX(l,N)*(5MATXC2,ISl)#SMATXC10,ISl)+SMATC2)
  . SMAT(10))/SMATXtlO,OSl)
   TEMP>DMATX(4,N)XDMATX(3,N)*1000000e/8.33
   IFCIS2) 9,8,9
 8 WRTaO,
   GO TO 10
 9 WRT3(SMATXUO,ISt)-TEMP)/(TEMP-5MAT10))
   SMATXC2,IS2)aRTSMATXC2,IS13
   SMAT(2)3SMATX(2,IS2)
10 SMATXC2,OS2)=SHATX(2,ISn+SMATC2)-SMATXC2,OSn
   TEMPSMATX(2,IS1)SMATX(10,IS1)+SMATC2)*SMATC10)
   SMATXC10,OS2>3CTEMP-SMATX(2,OSl}SMATXC10,OSl))/SMATXC2,OS2)
   TEMPaTEMp/(SMATXC2,ISl)*SMATC2))
   TEMPlaSMATX(10,051)/TEMP
   TEMP2aSMATXC10,QS2)/TEMP
   DO 15 I3,9
   TEMP33tSMATXt2,ISl)*SMATXtI,ISl)+SMATC2)SMAT(I))/
  . (SMATX(2IS1)+SMAT(2))
   SMATXCI,OSn=TEMPlTEMP3
15 SMATX(I,OS2)aTEHP2TEMP3
     TEMP3(SMATXC2,I31)SMATX20,IS13-t-SMATt2)*SMAT(20)3/
  2        {SMATX(2,IS1)+SMAT(2))
     SMATXC20,OS1)3TEMP1TEMP3
     SMA'TXC20,OS2>aTEMP2*TEMP3
                                 131

-------
     DO 20 I'll, 19
     SMATXCI,OSl)3CSMATXCI,IS13SMATXC2,ISl3.t.SMATCI3*SMAT(233/
    . C5MATX(2IS13+SMATC233
  20 SMATXCI,aS233SMATX(I,OS13
     ATHl*DHR(l.+PCT)+TMSU*WPI)/SMATX(2,l)X3650.
     OHATXC2fN)aHRT
       X3AIiOG(ATHM/DMATX(16,N))
       EER*EXPC 5. 50543-1. 597 89*X-t-, 2061 2 1*X**2-. 0056 17X*3)
     RETURN
     END
   SUBROUTINE EIiUT
           ELUTRIATION
   INTEGER OS1,OS2
   COMMON SMATXC20,45),DHATXt20,50),OMATX(20,50),IP(503,
    INP,IO,IS1,IS2,OS1,OS2,N,IAERF,CCOSTC5),COSTQ(5J,
    ACOSTCS),DHP,PCT,WPI,CCI,RI,AF,RATIO,CKWH,
    CF,HER,EEP,ALAND
   SMATX(10,OSl)aDHATXC2,N)
     SAVEaSHATXC2,152)
   SMATX(2,IS2)3DMATX(3,N)SMATX(2IS1)
   AE1(SMATX(2,IS1)+SMATXC2,IS2J31000000./DMATX(4,N3
   AE2SMATXC2,IS1)*SMATX(10,IS1)*8.33/DMATX(5,NJ
     AE2*AE2-t-(SMATX(2,IS23*SMATX10,IS2)8.33/DMATX(:5,N3)
   IF(AE1-AE23 20,20,10
   AEaAElDMATX(16,N3
   GO TO 30
20 AEsAE2DMATXC16,N)
30 SMATX(2,OSt)sDMATXtlN)SHATXC2,ISl)5ATXC10,IS13/SHATXC10,OS13
   SMATXC2,OS23SMATXt2,IS13+SMATX(2,lS23-SMATX(2,OS13
   TEMPSMATXC2,IS13SMATXC10,IS13+SMATX(2,IS23*SMATXC10,IS23
   SMATXC10,OS23a
   TEHPaTEHP/{SMATX(2,IS13+SHATXC2,IS233
   TEMPlaSMATXt10,0313/TEMP
   TEMP2aSMATXClO,OS2)/TEMP
   DO 40 133,9
   TEMP3{5MATXC2,IS13*SMATX(I,IS13+SMATX<2,IS23*SHATXI,IS2)3/
  . CSMATXC2.IS13+SMATXC2,IS233
   SHATXCI,OS1)3TEHP1TEMP3
40 SMATXCI,QS23=TEMP2TEMP3
     TEMP33CSMATXC2,IS13*SMATXC20,IS13+SMATX2,IS23SMATXC20,IS233/
  2        (SMATXC2,IS13+SMATX(2,IS233
     aHATXC20,OS13aTEMPlTEMP3
     SHATXC20,OS2)aTEMP2*TEMP3
                                132

-------
     DO  50  1*11,19
     SMATX(I.OSI)(SMATX(I,1S1)SMATX(2,1S1,)+SMATX(I,IS2)SMATX(2, IS2))
     /(SMATX(2,IS1)+SMATX(2,IS2))
  50  SMATX(I,OS2)*SMATX(I,OS1)
     XaAIiOGCAE/1000.)
     CCQST(1)*EXP(3.725902+.397690*X+.075742X*2-.001977X**3-
    . ,000296*X*4)*1000.
     X*ALOG(AE/1000./DMATX(16,N))
     IF(EXP(X}-1.)  60,70,70
  60  DHRSS350..
     XMHRS190.
     TMSU250,
     CO  TO  SO
  70  OHRSaEXP(5,84656S*.2S4813X+.113703X2-,010942X3)
     XMHRSaEXPtS. 273419*. 228 329X*,122646X*2-. 01 1672*X*3)
     TMSUsEXP(S,66988H>.750799*X)
  80  CQSTOtl}e(QHRS+XMHRS)DHP>*(l.'t-PCT)-('TMSUWPI)/SMATX(2,l)/3650.
     OHATX(lN)aAE
       EEPEXP( 5. 50543-1, 597 89*x+. 206 12 1#X*#2-.OOS617X**3)
       SMATX(2IS23*SAVE
     RETURN
     END
30
40
   SUBROUTINE SBEDS
           SAND DRYING BEDS
   INTEGER OS1.QS2
     COMMON SHATX(20.45),,DMATX(2050},OMATX(20(,50),IPt50),
  , INP,IOIS1,IS2,OS1,OS2,N,IAERF,CCOST(5)COSTOC5J,
  , ACOST(5),DHR,PCT,WPI.CCI,RI,AF,RATIO,CKWH,
  ,. CF,EER,EEP,AI,AND
   SMATXC2,OS2)*SMATXC2,IS1j
   SMATXC10,OS2)=DMATXC2,N)
   TEMPSMATXC10,OS2)/SMATX(tO,Isn
   00 10 1*3,9
10 SMATX(I,OS2)aTEMPSMATX(I,IS13
     SMATX(20,OS2)sTEMP*SMATX(20,151)
     DO 20 1311,19
20 SMATX(IrOS2)sSHATX(I,ISl)
   SFSMATX(10,131)/l0000.
   SC*OMATXtl,NJ#100.
   FSB(29.84SF-33.3J/SC
   TEMPSMATX(2,IS1)*SMATX{10,IS1)*249.9
   ASB*TEMPyFSB*DMATXU6,N3
   PSDDSHATX(10,IS1)*SMATXC2,IS1)8.33
     SMATX(10,OS1)DMATX(1,N)*1.E&
     TEMPSHATXC10,051)/SMATX(10,IS1)
     SMftTXt2,OSl)SMATX(2,ISl)/T^MP
     DO 30 133,9
     SMATX CUOSl)aTEMP*CSMATX(1,151)-SMATXU,OS2J)
     SMATX C20,OSl)aTEMP (SMATX ( 20, ISD-SMATXC20, 052))
     DO 40 1311,19
     SMATX(I,OS1)>SMATX(I,IS1)
   XaAliOdCASB/1000.)
   CCOST(1JEXP(1.971125*.083841*X+.1467S1*X2-.007718*X*3}*
   . 1000.
   XAI,OG(PSDD365./2000.)
   OHRSEXP(6.345052-.476780*X*101319X2)
   XMHRS3EXP(4,290089-,098293*X*.075453X**2)
   TMSUEXP(.693148+1.000000*X)
   COSTOU)((OHRS+XMHRS)*DHRU.+PCT)VrMSUWPI)/SMATX(2.1)/3650.
   OMATX(lN)aASB
     GPMaSMATX(2,ISl)*l.E6/1440.
     EER(,4355GPM*SF*1.116r*293,CF/365.
     ALAND3ASB2.2E-5
   RETURN
   END
                                    133

-------
c
c
20
C
C
10
C
C

C
C
   SUBROUTINE TPFS

           TRICKLING FILTEP - FINAL SETTLfcF

   INTEGER 061,032
   COMMON SMAIX(2045) , DMA IX ( 20. bO )  OMATX C20 50 ) t IP (50 ) 
2         INP. 10, IS t, 152,03 1,032 , N , I AERF ,CCOST (5 ),COSTO(5).
3         ACOST(b),DHR,PCT,WPI,CCI.PI,AF,P.ATIO,CKWH,
4         CF/EER.EEP, ALAND

   lAERFsO

   BUD5SDMATXC1.N)
   DEGCsDMATXC2N)
   HUsDMATXC3,N)
   SAREAsDMATXC4.Nj
   TS57=DMATXCb,N)
   RR=DMATX(7,N)
   GS53DMATX(8,N)
   VIELDsDHATX(9,N)
   SRATIO=DMAXXC10,N3
   TSS5=4.5+,51BOU5
   IF CTSS5 ,GT. OMAIXC5,N)) GO TO 200

           COMPUTE REMOVAL EFFICIENCY UF ULIER TO MEET EOU LIMIT
   BOD2sSMATX(8,ISl)*SMATX(17,ISn
   BOD4=BODS/SPATIU
   F=BOD4/BQD2
   IF (F ,GT, 1. .OR, F .LI. 0.) GO TO 200

           COMPUTE FILTER AREA AND DEPTH
   BETA=.0245M.U33*CDEGC-20,)
   XNs,91-6,45/SAHfA
   A=ALOG((l.*FHRJ/(F+FPR)5/BETA/SARtA
   RHQ=((RR+1.)HQ)XN
   DEPTH=PHQ*A
   IF (DEPTH ,I/E. 30.) GO TO 10
   DEPTH=30.
   BHQS30.XA
   HG=(l./(RR+l.))RHQ**tl./XN)
   FAPEAsSMATXC2,ISl)/HQ43560.

           COMPUTE SLUDGE PRODUCTION
   PDSDsDHATX(9,N)*CBOD2-BQD5)*SMATXt2Isn*8.33

           COMPUTE FLOW PATES IN EFFLUENT AND SLUDGE STREAMS
   SMATX(2OS2)=PDHD/TS57/8,33
   5MATX(3OSl)=SMATXC2.ISl)-SMATX(2.aS2J
c
c
   SMATXC10,OS2)=TSS7

           COMPUTh CONC. OF SOLID SPECiES IN EFFLUENT
   R=TSSSSMATXC2,1S1)/(TSS5*SMATXC2,OSI)+TSS7*SMATX(2,OS2))
   SMATXC4,051)=RSMATX(4,IS1)
   SHATX(8.0Sl)=(SMATXf 10OS1)-4.S).87
   SHATXC3,Osn=SMATX(8,OSnl,6/2.7+SMATX(4,asn
   SMATX(S,OSl)=.lSMATX(3,OSn
   5MATX(6i051)=.01*SMATXC3,OSl)
   SHATX(7,OS1)3RSMATXC7.IS1)
   SMATX(9.0S1)=SMATX(10,OS1 )-SMATX 1 7 ,OS 1 )

           COMPUTE. CONC, OF DISSOLVED SPECIES IN EFLLUENT
   SMATXC17.0S1 )=8QD5-SMATXC8,Osn
   SMATX(ll,OSl}sSXATX(12fISn+5MATXClV,aSl)*1.6/2,7
                                    134

-------
50

70

C
C
95
C
C
C
C
110
        SMATXC12,OS1)=SMATX(12,IS1)
        TEMP3SMATX(2,OS1)XSMATX(2,IS1)
        TEMpsTEMP+5MATX(2,OS2)XSMATX(2,ISl)*SMATX(10,OS2)XSMATX(10OSl)
        SMATXC13,OS1)BSMATX(5,IS1)+SMATX(13,IS1)TEMP5MATX(5,OS1)
        SMATXU4,OS1)=SMATX(6,ISU+SMATXU4,JS1)-TEMP*SMATX(6,051)
        SM ATX (15, OS1)=SM ATX (15,151)
        BODLD=BOD25HATXC2,I51)8,33/FAREA/UfcPTH/1000,
        RNst,-EXP(-.05BODLD)
        SMATX(18,OS1)=RNSMATX(18,IS1)
        SMATX(19,OS1)=(1.-RNJSMATX(18,IS1)+SMATXU9,IS1)
        SMATX(16,OSl)=5MATXU6,ISl)-10,(SMATXtt8,ISl)-SMATX(18,QSl))
        SMATX(20,OS1)=0,
 120

 130
 140
        COMPUTE CONC, OF SPECIES
RlaSMATX(10,OS2)XSM ATX C10,OS1)
DO 50 1=3,9
SMATX(I,OS2)=RlSMATX(I,OSn
DO 70 1=11,19
SMATX(I,OS2)=5MATX(I,OSl)
SMATX(20,OS2)=0.

        COMPUTE FILTER COSTS
VOL=FAflEADEPTH*OMATX(16,N)
X=AtOG(VOL/lQOO.)
                                         IN SLUDGE STREAM
               ,004587*X3)*1000.
X=ALOG(5MATX(2,IS1)/HQ43560./1000.)
OHPSEXP( 4. 536510-. 0957 31X+. 1737 18#X#e2-. 0101 14X*3)
XMHPSsEXP(4.312739..052122*X+.157473*X2-.010245*X3)
TMSU=EXP(5,105946+,465100XJ
CQSTO(l)a((OHBStXMHR5)OHR(l,+PCT)+TMSUWPI)/SHATX(2,l)/3650.

        COMPUTE SETTLER COSTS
AFSsSMATX(2,ISl)t.Eb/GSSDMATX(15,.N)
X=ALOG(AFS/1000.)
CCOST(2)aEXP(J.716354+t3898blX+,08456*X**2-.004718*X*3.)
           1000.
X=ALOG(AFS/1000./DMATX(15,N))
OHRSsEXP(b.84b565+.254913X+.U3703X2-.010942*X*3)
XMHRSsEXP (5,273419*. 228329X*,12264b*X*2-.011672X*3)
TMSU=EXP(5.S6S831+,750799X)
COSTO(2)
-------
ISO
IbO
C
C
C
C
170

200
GO TO 160
PEFF=.83
YRKW3SMATXC2,IS13#(l.+RR)l.Eb*(DEPTH+b,3
XRKW3XRKW/144U,/3960./PEFF/.9*.7457*i4,3b5.
ECOSTsXRKW*CKWH
SCOST=EXPC5.851743+,30161X+,197183X*2-,017962*X*33
TMSUsECOST+SCOSTwPI
COSTOC333(CaHKS+XMHRS3OHR*Cl.+PCT3+TMSU3/SMATX(2. 13/36bO.

        fill IN OUTPUT MATRIX  VALUES
OHATXC1N3SAFS/1000,
OMATX(2,N3=VOL/1000,
OMATXC 3, N 3 =F AREA/43560.
OHATX(4,N)=DEPTn

        COMPUTE ENERGY AND LAND CONSUMPTION
XsALOG(AFS/1000./DMATX(15,N))
EERsEER+EXP(2.8248+,30093X+.022308X2+.0035144#X*3)
ALAND=FAREA/4J5oO.
RETURN
IAERF=1
RETURN
END
      SUBROUTINE CHLOR
              CHLORINATION - DECHLORINATION
      INTEGER 031,032
      COMMON SMATX(20,45),DHATXC20,50),OMATX(20,50),IPC50),
     . INP,IO,IS1,IS2,OS1,OS2,N,IAERFCCOSTC53,COSTO(53,
     . ACOST<5),DHR,PCT,WPI,CCI,RI,AF, RATIO, CKWH,
     . CF,EER,EEP, ALAND
      DCL2DHATXC1,N)
      CCIi2DHATX3.N)
      DS02DHATX(4.N)
      CS02DMATXt5,N3
      BVOLaSMATXt 2, IS 1)*TCL2/ 1.44/7. 48*1000. *DM ATX Cl 6, N)
      XaALOGCBVOL/1000.)
      CCOST(1)3EXP 2. 048061*. 52 1909#X-. 00267 4*X*2+. 004 159#X*3)
     . 1000.
      COSTOCDaO.
      CU5EaSHATXC2.ISl)*DCL2*8. 33*365. X2000.
      SUSESHATXC2(.ISn*DS028.33*365./2000,
      FACTR*CUSE/CCUSE+SUSE)
      X*AlJOG(CUSE*2000./365.*DHATX(15.N3-fSUSE2000./365.*DMATX(14,N))
      XCOSTaEXP (2. 264294-, 04427 1*X+.065029*X**2-.002536*X**3}#1 000.
      CCOSTC2)FACTP*XC05T
      OHRSEXP(4,538517+.543669*x)
      XHHRS3EXP(3.7S2071-.224812*X+,158849*X2-.0060b4*X*3)
      TMSU3EXPC6.126105+.287016*x)
      OC*FACTR*OHRS
      XCFACTPXHHRS
      THSUCaCUsECCL2+FACTRTHSU
      COSTOC2)sC(OC+XC)*DHR(l.-l-PCT)+THSUC)/SMATX (2, 13/3650.
      IFCDS023  10,10,20
   10 CCOSTC330.
      COSTOC3)0.
      GO TO  30
   20 CCOSTC3)aXCOST-CCOST(2)
      OS*OHRS-OC '
      XSXHHRS-XC.
      TMSUSSUSECS02-K 1 ,-FACTP3*TMSU
      CDSTO(3)*(COS-.XS3*OHR*C1.+PCT3+THSUS3/SMATXC2, 13/3650.
                                   136

-------
50
60
30 DO 40 I*2>20
40 SMATX(I,OS1)3SMATXCI.IS1)
   OMATX(1,N)3BVOL
   OMATXC2N)*CUSE
   OMATX(3,N)3SUSE
     PCL2DSOMATXC 1,N ) SMATX C2,IS 1)*8 ,33
     X3ALOG{PCL2D)
     EER1.5*CUSE*2000./365,
     IFCDMATX(4,N),GT,0.)GO TO 50
     EEREER+EXP(-.07l827+.44044X+.076407*X*2-.0030Q3*X*3)
     GO TO 60
     EEREEH+EXP(-.259363*.69229X+.025652X*2)
     EEPsO.
   RETURN
   END
       SUBROUTINE TFLOT
               FLOTATION THICKENING
       INTEGER 031,052
       DIMENSION YC12),SMATC20)
       COMMON SMATX(20,45J,DMATXC20,50),OHATXC20,50),IP(50),
      . INP,10,131,IS2,QS1,OS2,N,IAERF,CCQSTO)>COSTOC5),
      . ACOST(5),DHR,PCT,WPI,CCI,RI,AF,PATIO,CKH,
      . CF,EER,EEP,ALAND
       DATA Y/2S.,50.,100.,ISO,,200,,250,,300,,400.,500.,600.,800,,1000./
       DO 5 1=1,20
     5 SMAT(I)=0.
       IFCIS2) 20,20,10
    10 DO 15 131,20
    15 SMAT(I)3SMATXCI,IS2J
    20 SMATXC10,OS13=DMATXC2,N)
       SMATXC2,aSl)sDMATXUN)*(SMATX(2,ISl)*SMATXUO,ISl} +
      . SMAT(2)SMAT(10))^SMATXC10,OS1)
       ATHl*(SMATXC2,ISn*SMATX(10,ISl)+SHATC2)-SMATC10))
      . 8.33/DMATX(4,N)*168./DMATX(S,N)
       IFCIS2) 30,25,30
    25 ARCYaO.
       GO TO 35
    30 ARCYa.00288*ATHl
       SMATX(2,IS2)sARCY
    35 SMAT(2)ARCY
       SMATXt2,OS2)=SMATX(2,ISl)+SMATC2D-SMATX(2,051)
       ATH2*SMATX(2,OS2)*1000000./DMATX(3,N)16<(./DMATXC5,N]
       IFCATH1-ATH2) 40,50,50
    40 ATHMATH2DMATX(16,N5
       GO TO 60
    50 ATHMATH1*DMATXU6,N)
    60 TEMP*SMATX(2,IS1)*SMATXUO,IS1)+SMAT<2)*SMATUO)
       SMATXC10,OS2)3(TEHP-SMATXC2,031)SMATX(10,OSl)3/SMATXt2,OS2)
       TEMPsTEMPX CSMATX{2,151)tSMAT C 2 J)
       TEMPIsSMATX(10,051)/TEMP
       TEMP2aSMATX(10,OS2)/TEP
       DO 70 I3,9
       TEMP33(SMATX(2,ISl)SMATX(I,Isn--SMATC2)*SMAT(I))/
      . (SMATX(2,I51)+SMAT(2))
       SMATXCIrOSl)*TEMPl*TEMP3
    70 SMATX(I,OS2)aTEMP2TEMP3
         TEMP3a(SMATX(2,ISl)5MATX(20,ISl)+SMATC2)5MAT(20))/
      2        (SMATX(2,IS1)>5MAT(2))
         SMATX(20,OS1)=TEMP1*TEMP3
         SMATX(20,OS2)tiTEMP2TEMP3
       DO 80 1311,19
       SMATX(I,OSl)s(SMATXtI,ISl)*SMATX(2,ISl)-t-SMAT(I)*SMAT(2))
      . /(SMATX(2,IS1)+SMAT(2))
    80 SMATX(I,OS2)sSHATX(I,OSt)
                                      137

-------
    ATHMlsATHM
    XNaO,
    XX0.
    DO 100 1=1,12
    IF(ATHM-Yd)) 90,90,95
 90 ATHMzYtl)
    GO TO 110
 95 IFCI-12) 100,96,100
 96 ATHHs*C12)
100 CONTINUE
110 IFCATHM-25.) 120,120,130
120 ATHH*25%

    XNsl.
    GO TO 180
130 IF(ATHH1-1000.J  170,170,140
140 XNaATHMl/1000.
    KSXN
    XXaK
    1F(CXN-XX)*1000.-500.) 150,150,160
150 XNsXX+,5
    GO TO 180
160 XNaXX+1.
    GO TO 180
170 ATHHmATHM/2.
    XN*2.
180 XsAIiOGCATHM)
    CCOSTCDsEXPC 1.7 17538 +.453735*XJ1 000. *XN
    X3AIiOGCATHM/DMATXC16,N)XN}
    OHRS3EXP(4.992517-.325053*X+.084026*X*2)
    XHHRS=EXPC4.832373-.336S04X+.083020X*2J
    HPDaEXP(-1.254959-t..852347X)
      EIiEC=HpD*.746365.CKWH*DHATX(5,N)/7.
    PWASs(SHATXC2,lSn*SMATXC10,ISl)+SMAT(2)*SMAT(10})*8.33
    POIjCsPWAS*365,/2000.*DMATX(6,N3DMATXC7,N}
    COSTOCl)aCCOHRS+XHHRS)*DHP(l.+PCT)+ELEC+POLC)/
   . SHATX(2,l)/3650.
    OMATXCl,NJsATHM
    OHATXC2,N3=XN
    OHATXC3,N)3ATHH1
      EER=HPD.746OMATXC5,N)/7.
    RETURN
    END
    SUBROUTINE HHINC
            HUtTIPLE HEARTH INCINERATION
    INTEGER 051,032
    DIMENSION SFHAC59)
    COMMON SMATXC20,45),DMATXC20,50),aMATXC20,50),IP(50),
     INP,IO,IS1,IS2,OS1,OS2,N,1AERF,CCQSTC5),COSTO(5),
     ACOSTC5),DHR,PCT,WPI,CCI,RI,AF,RATIO,CKWH,
     CF,EER,EEP,ALAND
    DATA SFHA/85.,98.,112.,125.,126.,140.,145.,166.,187.,193.,208.,
     225.,25"6.,276.,288.,319.,323.,35l.,364.,383.,411.,452.,510,,560.,
     575.,672.,760^,845.,857,,944.,988.p1041.,1068.,1117.,1128.,1249.,
     1260.,1268.,1400.,1410.,1483.,1540,1580.,1591.,1660,,1675,,
     1752.,1849,,1875,i1933,,2060,,2084,,2090.,2275.,2350.,2464.,
     2600.,2860.,3120,/
    PSDOsSMATXC10,ISl)SMATXC2,ISl)*8.33
    FHATa58.3lSMATXC2,ISl)SMATXC10,ISn/DMATX(3,N3/DMATXUN)#
   , DMATXU6,m
    XXsFHAT/DMATX(2,N)
    DO  20 1=1,59
    IFCXX-SFHACin  10,10,20
 10 FHAsSFHA(I)
    GO  TO 30
 20 CONTINUE
                                  138

-------
   FHA*3120.
 30 IFCFHA-200.)  40,40,50
 40 CYT318.
   GO  TO  100
 50 IFCFHA-1700.) 60,60,70
 60 CYTsl3.+.024FHA
   GO  TO  100
 70 IFCFHA-2300.) 80,80,90
 80 CYT=,09*(FHA-1100,)
   GO  TO  100
 QO f*VT5Sl08
100 PASH3(SMATXC10,IS1)-SM*TXC9,,IS1))/SMATXC9,IS1)
   HASH=68.*PASH
   PWAT3( 1000000, -SMATXUO,IS1))/SMATX (9, IS1)
   HWSL=1404.3*PWAT
   SAERA=64.03FHA**.51
    VSPHSMATXC9,lSl)*SMATXC2,rSl)*58.31/DMATXC3,N)
      =. .,
    OTRAN3ao279H>HC)100rSAEp.A*DMATXC2.N)/VSPH
    QCOOL=267,*FHA*OMATX(2,N)/VSPH
    QNETs2725,-i-HASH+HWSL+QC001J*QTRAN-DMATXC6,N)--246
    IF(QNET) 105,105^106
105 QNETsO.
106 TEMP3SMATXC9,IsnSMATX(2,ISl)*8. 33*365.
    QNET3<3NET*TEMP
    YS8H38.C*T/9,+8736.-52.OMATX(3,N)7./9e
           ,
    QHUP*YHUH*1913.FHADMATX(2,)
    QSB=YSBH315,FHA*DMATXt2,N)
    QTOT3QHOP+QS8>QNET
    IFCDMATX(7,N)-1.) 130,130r140
 130 WFYR=QTQT/15019.
    FCOST=WFYR/7.481OMATXC8,N5
    GO TO  130
 140 IF(DMATX(7,N)-2.) 150,150,160
 150 WFYR=QTOT/15581,
    FCOST3WFYR/45.8DMATXC9rN)
    GO TO  180
 160 IF(DMATX(7,N)-3,) 170,170,180
 1-70-
 180 Typ=SMATX(10,ISl)*SMATXC2,ISl)*1.52
     WTON3554.24/FHA*.3572
190
     DPTONsFCOST/ CPSDO*365 ,/2000 . )
     XaALOGCPSDD/24.DHATX(16,N))
     CCOSTtl)sEXPC2.377364-t..598986*X)*1000.
     X= ALOG(PSDD*365./2000.*CSM ATX (9, ISl ) /SAIXt 10,
     QHRSaEXPf 3. 402537 + 1. 215130X-,157203X**2-(.. 00977 1*X**3)
     XHHRSsEXPC 3. 90655 3+. 70247 1X-.088337*X*2+.006827X3)
     TMS03EXP(7.864729-.338816X+,054026X2)
     COSTO(l>3CCOHRS+XMHRS)DHR(l.+PCT)-l-TMSUWPH-ECOST+FCOST)/
    , SMATX(2,1)/3650.
     OMATX(1,.M)3FHA
     OMATX(2,N)=WFYR
     OMATXC3pN)3PSDD
     OMATX(4,N)sECOST
     OHATXt5fN)=FCOST
     OHATX(6,N)=CFDG
       EERsECOST/CKWH/3*S.+QTOT/365.*.000293CF
       FSsSMATXC10,ISl)/l.E6
       FVsSMATX(9,ISl)/SMATX(10,ISl)
       WSaCl.-FS)/CFS*FV)
       EX3-((QNET-2725,)-2113.)yi223.
       IF(EX.LT.,5)EX3.5
       IFCEX.GT.1.5)EX=1.5
       OPDVSst800.-60.)C.505WS+2.55+2.09EX)
       IF30MATX(7,N)
       GO TO  (190, 200, 210), IF
       Fl=4.13a
       F23WFYR
                                   139

-------
        GO TO 220
200     FlsS.63
        F23WFYR
        GO TO 220
210     F133.151
        F2=CFDG.069S
220     QPD3QPDVS*SMATX(9,I51)SMATXC2,IS1)*8.33
        OPD=OPD-t-C800.-60.)/365,FlP2
        EEP3QPD*.000293*DMATXC10,NJ
      RETURN
      END
     SUBROUTINE RWP
             RAH WASTEWATER PUMPING
     INTEGER OS1.0S2
     COMMON  SHATXC20,453,DMATX(20,50),DMATX(20,50),IPC50J,
    . INP,IO,IS1,IS2,OS1,OS2,N,IAERF,CCOSTC5),COSTOC5),
    . ACOSTC5).DHR,PCT,WPI,CCI.Rl,AF,RATIO,CKViiH,
    . CF,EER,EEP,ALAND
     DO  10  1^2,20
  10 5MATXCI,OS1)3SMATX(I,I51)
     HEADsOMATXCl.N)
     QPsl.78-*SMATXC2,ISl)*.92
     XsALOG(QPDMATXC16,N))
     CCOSTCn3EXPC4.004828+.519499X+.082262X*2-.006492X3)
    . 1000.
     XaALOGCSMATXC2fISD)
     OHRS3EXP(6.097269+.253066*X-,193659*X2+.078201*X3-
    . .006680*X*4)
     XMHRSsEXPC5.911541-.013158X+.076643X*2)
     IFCSMATX(2,IS1)-1,44)  20,30,30
  20 PEFF=.70
     GO  TO  60
  30 IFCSMATX(2,ISn-10.08) 40,50,50
  40 PEFFs.74
     GO  TO  60
  50 PEFFs.8-3
  60 YRKWsSMATX(2,IS1)*1000000.HEAD/1440./3960./PEFFX.9*.7457*24.365,
     ECOSTsYPKrtCKWH
     SCOSTsEXP{5.851743+,301610X+.197183X2-,017962X#3)
     TMSUaECOST+SCOST-WPI
     COSTOC1) = CCOHRS-|-XHHRS)*OHR*(1.+PCT}+.TSU)/SMATXC2,1J/3&50.
     OMATXC1,N)=QP
      EER3YRKW/365,
     RETURN
     END
     SUBROUTINE SHT
             SLUDGE HOLDING TANKS
     INTEGER  QS1,OS2
     COMMON  SMATX(20,45),DMATXC20,50),OMATXC20,50),IP(50),
    .  INP,IO,IS1,IS2,QSI,OS2,N,IAERF,CCOSTCS3,COSTOC5),
    .  ACOST(5),DHR,PCT,WPI,CCI,RI,AF,RATIO,CKWH,
    ,  CF,EER,EEP,ALAND
     DO  10 132,20
  10  SMATXCI,OS1)3SMATXCI,IS1)
     VSHTaSMATX(2,ISl)*OMATX(l,N)*1000./7.48OMATXC16,N)
     XaALOGCVgHT)
     CCaSTtl)sEXP(2,625751 +.484180*X-I'.000613*X**2-t-.002252*X#*33
    .  1000.
     VlsSMATX(2,ISl J-DMATX(l,N)1000,/7.48
     XsAIiOGCVl)
     OHRS3EXP(5."727345*.000762*X'I-098701*X2".006786*X*3}
     XMHRS3EXPC4.506628-t..214662*X+.071402*X2-.004681X*3)
    THSUaEXPCS.479939+.299282*X+,106008*X*2-.008658X**3)
    COSTO(l}3((OHRS-t-XMHRSJDHR*(l,+PCT)-l-TMSU*WPI)/SMATX( 2, 13/3650.
    OMATXC1,N)=VSHT
      EERsO.
    RETURN
    END
                                  140

-------
  SUBROUTINE CENT
          CENTP.IFUGATION
  INTEGER 031,052
  COMMON SMATXC20,45),DMATX(20,50),OMATXC20,50),IPC50),
 . INP, 10, 131, 132,031, 052, N,IAERF.CCOSTC5),COSTOC5),
 , ACOST<5).DHP,PCT,WPI,CCI,P.IAF, RATIO, CK"H,
 . CF,EER,EEPALAND
    DIMENSION CPOATA(4,2)
    DATA CPDATA/.73..8,,43,.41,1.6,1.48,.81,,74/
  HPWK=DMATX(3,N)
  XCENsl.
  POI,=DMATX(S,N)
  CPOLY=DMATX(6,N)
  GPMNaDMATX(7,N)
  CNMIN=DMATX(8,N)
    SAVEl3gMATX(7,ISl)
    SAVE2=SMATXC10,IS1)
  SMATXC7,ISl)=SMATX(7,ISl)+POL1fSMATXUO,lSl)/2000.
  SHATX(10.IS15=SMATXC10,ISn*POLX*5MATX(10,ISl)/2000.
  DSOLaSMATXC 10, IS1)*SMATXC2,IS1)*8, 33*365. X2000.
  SMATX(10,OS2)a((l.-DMATXCl,Nn/(l.-DMATX(l,N)*SHATX(10,Isn/
  . DMATXC2,N)))*SMATXUO,IS1)
  TEMPlaDMATXt 2, Ni/SMATXC 10,131)
  TEHP2aSMATXC10,OS2JXSMATX(lO,ISl)
  5MATXC10,OS1>=DMATXC2,N)
  SMATXC2,OSl)aCSMATX(lO,ISn-SMATX(10,OS2n*SMATX(2,ISl)/
  .  CSMATXC10.0Sn-SMATX(10,OS2)}
  SMATX(2,OS2)3SMATXt2ISl)-SMATXC2,OSl)
  DO  11  1=3,9
  SMATXCI,OSl)aTEMPlSMATX(I,ISl)
11 SHATXtI,OS2)=TEMP2SMATXCI,ISl>
     SMATXC20,OS1)=TEMP1SMATX(20,IS1)
     SM ATX C 20, 032 )=TEMP2*SMATXC 20,131)
  DO  21  Iatlrl9
   SMATXtI,OSl)sSHATX(I,ISl)
21  SMATXU,OS2)*5MATXCI,IS1)
  CN=CNMIN
  CGPMSMATX(2,IS1)U6666.7/HPWK*DMATXC16,N)/CN
   GPMMSHATX(2,IS1)*1000000./1440.
   CSIZE=.27S*PMN
   IFCCGPM-CSIZE) 8,8,2
 2 CSIZE3.3SO*GPMN
   IFCCCPM-CSIZE) 12,12^4
 4 CSIZE=.S90*GPMN
   IFCCGPM-CSIZE) 16.16,6
 6- CSIZEsGPMH
   CN*NCN+1
   GO TO 20
 8 IF(GPMM-CSIZE
-------
       GO TU 20
    24 CCOST (1)378500. *(!.-. 044* (CN-2.) }*CN
       GO TO 32
    26- CCOS-T CD *9&000. +{1. -.044* (CN-2.))*CN
       GO TO 32
    28 CCOSTClJsl 40000, (l.-.044CCN-2.n*CN
       GO TO 32
    30 CCOST Cl )sl 60000, *C1.-. 044* (CH-2.) 3 CN
    32 AFC3Rl*(l.+RI)*10./t(l.-l-RI)iO,-.l,)
       ACOST(l)3CCOSTa)*AFC/SMATX(2,n/'36SO.
       XsALOGCDSOL)
       IFCXCENJ 40,34,40
    34 OHRS3EXP(7,6215t7-.476977*X + 1,07l516X**2}
       GO TO SO
    40 OHRS3EXPc7.264153-.466246X*.0695S2*X*-2)
    50 XMHRS3EXPC5.997U5-.493809*X*.070892*X**2)
       SUPPsEXP(-2.822519+.700948X)1000.
       COSTOCUsC COHRS-(-'X.MHRS)DHR(l.+PCT}-.SUPPWPI-fCHEM)/
      . SMATXC2, 13/3650,
       OMATX(l,N)sCGPH
       O.MATXC2,N)=DSOL
       OMATX(3,N)sAFC
       OHATXC4,N)3CSIZE
       OMATX(5,N)3CN
         SHATX(10,IS1}3SAVE2
         EERsGPMM*. 7457*24,
       RETURN
       END
C
C
C
C
C
C
C
C
    SUBROUTINE AEROB

            AEROBIC DIGESTION

    INTEGER 051,052
    COMMON SMATXC20,45),DMATXC20,50),OMATX(20,50),IPCSO),
 2         INP,IO,IS1,IS2,OS1,OS2,N,IAERF,CCOST(5),COSTO(5),
 3         ACOST(53,DHR,PCT,WPI,CCI,RI,AF,HATIO,CKWH,
 4         CF,EER,EEP,ALAND

    SRT3DMATX(3,M)
    OEGC3DMATX(4,N)
    DTADMATXC5,N)
    CB1 aOMATXC6,N)
    CY  *DMATXC7N)
    TSSl3DMATXC9,NJ
    TSS23DMATXC9,N]
    CRN 3DMATXC10,NJ
    AEFFDHATX(11,N)

COMPUTE INFLUENT BIOMASS, REFRACTORIES,  AND BOD
    XASSINsSMATX(20,ISl)
    XRSSINsSMATXC4,ISl)/SMATXC3,ISl)SMATXC9,ISl)-,2XASSIN
    SIN3SMATX(8,Isn+SMATX(17,ISl)-.97*,8*XASSIN


FIND EFFLUENT SOLIDS CONC.
    CB3CB1CSRT+OTA)*-,415(1,05)CDEGC-20.)
    XAS53CXASSIN+CY5IN)/(!,+,8CB*DTA)
    XRSS=XRSSIN+,2*ffB*XA5SDTA
    TSS3SMATXC7, IS1) *XASS4-XPSS
                                   142

-------
60
C
C
70
80
C
C
 90

 C
 C
 100
 110
FIND FLOW PATES IN OUTPUT STPEAMS
    IFSMATX(t4,ISl)+SMATX(6,ISl>-SMATX(6,OSl)SHATXC2,OSl}/
 2  SMATX(2IS1)-SMATX{6,OS2)SMATXC2,OS2)/'SMATXC2,IS1}
    SMATX(IS,OS1)*SMATX(15IS1)

CHECK FOP NITRIFICATION
    IFtSRT+DTA.LT.5.)  GO TO  90
    IFtCKN.EQ.O.)  GO  TO  90.
    CKN*CKN*1.0S*DEGC"20.)
    SMATXd8,031331./CCSRT+OTA).05*CKN-1.)
    SMATX(19,031>SMATXC13OS1)-SHATXC18,031)
    GO TO 100
    SHATXC19,OS1)=SMATXC19,IS1)
    SMATXCl8,OSl)aSMATX(l3,OSl)-SMATX(19,OSl)

ADJUST ALKALINITY  AND SOLUBLE BOD
    SMATX(16,OSl)SMATXC16,ISi)-7.1411,19
    SMATXtl.OS2)aO.
 120
 130
 C
 C   SIZE DIGESTOR
 140      VAER3DTA*SMATXC2,IS1)*DMATXC16,N')1000.X7,48
         X3ALOGCVAER)
         CCaSTCl)3EXPC2,414380*.173682*X+.084742*X*2-.002
-------
 150

 160
 C
 C
 C
 C
COMPUTE AIR REQUIREMENTS
    ACFM3C1.5-1.42*CY)SMATX(2,1S1)SJ:N8.33
    CB3CB1*U.05*CDEGC-20.))CSRT+DTA)**-,415
    ACFMaACFM+l.42#CB*.8-XASS*VAERl,E3*7.488,33Xt.E6
    ACFM3ACFM+4.6*CSMATXU9,OSl)-SMATXU9,ISinSMATXC2,ISn*8.33
    ACFMACFMXAEFF/.232X.07SX1440.DMATXC15,N)
    IF(20,VAER*DHATXa5,N).GT.ACFM)ACFM320.VAER*DMATXCl5,N)
    XaALOG(ACFM/1000.)
    CCOSTC2)=EXP4.145454*.633339*X+.031939*X*2-.002419X3)lrE3
    XX3ACFMX1000.XDMATXC15.N)
    X*ALOG{XX3
    IFCXX.GE.DGO TO ISO
    OHRS*850,
    XMHRSS350.
    GO TO 160
    OHHSsExP (6.900586-1..323725X+.059093*X*2-.004926*X3)
    XMHR53EXP(6.169937+.294853*X+.17599X*2-.040947X**3+.0033X**4J
    HPACFMXDMATXC15,N}8,1*144,/(33000,*,8)
    XKWa.8*HP
    XKWPY3XKW*24.*365.
    ECOSTsXKWPYCKHH
    8COST31000,*EXPC.62138+.482047X)
    TMSUsECOST*SCOST*WPI
    COSTO(2)aOHRS+XMHRS)*DHR*(l.+PCT3't'TMSU)/SMATXC2,l)X3650.

ASSIGN VALUES TO OUTPUT MATRIX
    OHATX(l,N)aVAER
    OHATX(2N}3ACFM
    OHATXC3NJ=0.
    OHATX(4fN>0.

COMPUTE ENERGY REQUIREMENTS
    EERXKWPXX365.
    RETURN
    END
C
C
C
           LAND DISPOSAL SUBROUTINE

   SUBROUTINE LANDD

   INTEGER 051,032
   COMMON SMATX(20,45),DMATXC20,50)rOMATX(20,50),IP(50),
          INP,IO,ISl,IS2,OS1.0S2N,IAERF,CCOSTC5),CaSTOC5},
          ACOST(5),DHR,PCT,WPI,CCI,RIAF,RATIO,CKWH,
          CF,EER,EEP,ALAND
   DIMENSION CAPACC6),TRUCKffiJ,OPER(6J,XMPG(6)
   DATA CAPAC/1200.,2500.,5500.,10.,1!.,30./
   DATA TRUCK/25000.,42000.,55000.,25000.,42000.,50000.X
   DATA OPER/.2,.25,.3,.2,.2S,.3X
   DATA TMPGX4.5,4.5,3.5,4.5,4.5,3,5X

   HHPY3DMATXC1.N)
   DISTDMATX(2,N)
   YRSI,DMATX(3,NJ
   FCOST3DMATXC4.N)
   SP3DMATX(7,N)
   TNMAXDMATX(8,N)
   ECFTsDHATXtt5,N)
   AFCTRRIC1,+RI)*YPSLX C(1.+RIJ *YRSL-1.)
                                   144

-------
c
c
10

20
 30

 C
 C
 25
  26
  27
  28
        COMPUTE HAULING COSTS

SLV0.
JSTXPEsO
WS3(SMATXUOIsn+5MATXCt5.1Sm*SMATXC2,ISl)*8,33
WWsSMATXC2ISl)*8,33E6-WS
IFCHS/CWS+W}.CE.0.15) JSTYPE1
IFtJSTYPE.EQ.nGO TO 10
ASV*SMATXC2,IS1)*365.E6
JlsO
GO TO 20
ASV*CWS+WW}365./55,/27,
CTsl,E20

IF{DIST.GT.20.}ARSs(25I>20./DISTm35.*CDIST-20.)/DIST5
AHPT*(2.*OIST/ARS)+.75
         DO  30  KTYPE*1,3
         TPYaASVVCAP AC C J 1 +KTYPE )
         MT*TPY/'rPTPY-ECri + , 9999999
         ATMTPY*2.*01ST
         TMHPYAHPTTPY*1.1
         CCsNTTRUCKCJl*KTUPEJ*WPI*H8.2/150,2
         CAsCC.35*AFCTR+.15CCRr
         COCO'>TMHP1fDHR*f 1 . +PCT5
         IF(CA+CO.GE.CT)GO  TO 30
         CTsCA+CO
         CCOST(2)aCC
         ACOSTC2)aCA
         COSTQC2)CO
                                                 *3/170.3
         OMATX{l,N)aTPY/NT
 OHATX(3>N)NT
 CONTINUE
 EER3EEJ*#14000a-.*i,000293*CF/36S,

    ADD ON FACILITY COSTS
 IFCJSTYPE.EQ.13GQ TO 25
 QzASV/l.ES
 Cl200lS.a*.32
 C3*  936*Q*.22
 C4*  900.Q,3
 GO TO 28
 Q3ASV/1.E3
 IFtQ.LT.lS.KO TO 26
 Cl13849.0*.32
 GO TO 27
 Cls32387,
 C2sl7700,Q**.40
 C3s  936.*Q22
 C4  900.Q**.3
 CCOST(23CCOST(23*C1
 ACOST(2)'(ACOSTt2)+ClAF)/SMATX(2,l)/3650.

 TMSUaC2CKWH+C3*WPI                  ,uc,,,,
 COSTO(2)s(COSTO(2)+(C4*DHR(l.+PCT)-ctMSU)}
 COSTOC2)COSTO(2)/SMATXC2U/3650.
 EERsEER>C2/365,
                                      145

-------
c
c
 40
C
C
C
50
55

C
C
C
60
C
C
C
70
         COMPUTE STORAGE COSTS

 TONSWS365./2000.
 IFCDMATXC6,N).GT.0.3GO TO 60
 ALANDSMATXC2,IS13CSMATXC5,IS13.t.SMATXU3,IS1333040./TNMAX
 IF(JSTYPE,EQ.13GO TO 50
 SLVSP365.S.MATXC2,I513t,E6/7.48/l.E3*DMATXC16,N3
 IF(SLVrLE.O,)GO TO 40
 XaALOG(SLV)
 CCOSTCl)EXP(.375449+r394996#X+.O.i4726*X**2j1000.
 IFtTONS.LE.O.JGO TO 50
 XALOG(TONS3
 OHRSEXPC&.567594-,971759X*,09S689*X*2)*SP
 XMHRSsEXPC-2.087393+2.395831*X-.340388*X#*2+
             ,017499*X*33SP
 COSTO(l)C(OHRS+XMHRS)DHR*(l,+PCm/SATXC2l)X3650.

         COHPUTE LAND AND  APPLICATION- COSTS

 CCOST(3JAI.ANDDMATX(9,N)
 COSTOC3)tALAND*DMATXCS,N)*RI+TONSDMATX(10,M))/SMATXC2,l)/3650.
 IFCJST1fPE.EQ.l3GO  TO 55
 EEREER-H80.SHATXC2,IS13293.CF
 GO TO 70
 EEREER+71.43*ASV/1000.293.*CF/365.
 GO TO 70

        COHPUTE LANDFILL COSTS

 WTPDTONS/365,+HW/2000,
 ALAHD3.75E-3HTPD*365.
 CCOST3)3ALANDOMATX(S,N)+l.E4CTPD**,743*1.506/2.4
 COSTOC3)a9480.*(WTPD*.625)1.192/1,7/SMATX(2,13/3650.
 EERaEER+18.*ASV/1000.*293rCF/365,

        FILL IN  OUTPUT DATA

 OMATXC4,N)3SLV
 OMATX(5N)*TONS
 OMATX<6,N)ALAND
 OMATX(7KJsALANDDMATX(5.N3RI
 IP(DHATXfr,N-).GT.O.>OHATX7,H>BO.
 OMATXC8,M)aALAND#DMATXC5,N3
 OHATXC9,N3AFCTR
RETURN
END
     SUBROUTINE LIME
             LIME ADDITION  TO  SLUDGE
     INTEGER OS1,QS2
     COMMON SMATXC20,4S),DMATX(20,50),OMATXC20,503,IPC50),
     .  INPfIO.IS1,IS2;OS1,OS2,N,IAERF,CCOSTC53COSTOC53,
     ,  ACOSTCS3,DHR,FCT,WPI,CCI,R!,4F,RATIO,CKrtH,
     .  CF,EER,EEP,ALAND
     DLIMEaDMATXCUN)
     CIiIMEaDHATXC2,N}
     DTOMa(SMATXC10,IStJ+SMATX(l5,ISl))SMATXC2,IS 13*8.33/2000.
     PPDLDLIME*DTONDMATX{16,N3
     DO  10 1*2,6
  10 SMATX(I,OS1)3SMATX(I,IS1)
     5MATX(7,OS13SMATX(7,IS13+PPDL/8.33/SMATX(2,IS13
     SHATXC8,OSl)aSHATXC9,IS1)
     SMATX(9,QS13aSMATXC9,IS13
     SMATXC10,OSl)3SMATX(lO,IS13+PPDl-'8.33/SMATXC2,IS13
       SHATXC20,031)30.
                                   146

-------
   DC 20 I3ll19
20 SMATXCIOS1)SMATXCI.IS1)
   OHPSoO
   XMHRSEXPC6,0600S4+.t97073*XJ
    BETUFN
    END
                      BIOLOGICAL CON'tACTOH^- FINAL SETTLES
 SUBROUTINE R8C
         POTA1ING

 COMHONPSATXC20,45),DMATXC20,50),OMATX120,50),IF<50),
  INP,IO,IS1,IS2,OS1,OS2,N,IAEHF,CC05TC5),COSTO<5),
. ACOSTC5), DHR,PCt,v,PI,CCI.RI,AF,PATIO ,CKiH,
. CF.EER,EEP,ALAND
 80D=DMATXUN>
 XNSTG=DMATX(2,N)
 DEGCsDMATX(3,N)
 QPA8I3DHATX(4,N)
 QPANI=DMATX(5,N)
     BODN=DMATX(7,N)
     TSS=DMATX(8,N)
     CPDisDMATXt9iN)
     QPA8sOHATX(4,N)*t.04CDHATX(3,N)-20.)
     QPANSDMATX(5.N)*1.04*(OMATXC3.N)-20.)
     PBOOaDMATX(lfN)/(SMATXCl7,ISX)*SMATX{Bf J&l
     TEMP1=ALOGCPBOD)/DHATX(2,N)
     TEHP2al ,/EXP(TEI*Pl)-le '
     APSTGaSMATX (2, IS 1) 1000000. TEHP2/QPAB
       NTRN=APSTGDMATXC16,N)/1.E5
       NTPN=NTRN*1
       NSHFT=NTRN*XN5TG
       XNTRNaNTRN
       XSHFTsNSHFT
      TEMP3=1  /(l.+QPABAPSTG/SMATXt2.ISl)/1000000.)
      P80D=DMATXC7,N}/(SMATXtl7.I51)+SMATXC8.ISn)
      FNSTG3ALOG(P80D)/ALOGCTEMP3)

      pNH3S(t!/(U+aPANAPSTG/SMATXC2,ISl)/1000000.))*RNSTG
      SMATXU8,OSU=SHATX(18fISl)PNH3
      SMATX (2,052 )=PD5D/DHATX(8,N)/10000./8. 33
             *
      SMATX(10,OS1)=4.5*.51DMAIXC1,N)
      SHATX(10.0S2)=DMATXC8,N)10000.
      SMATX(8,OSl)=CSHATXC10,OSl)-4,5).897
      SMATXC17,OSn=OMATXCl.N)-SMATXC8,OSn
      SWATX{l9,OSl)5SHATX(l8,ISl)-SMArX(lfOSl)
      UPSS=5HATX(2.Isn/(5MATXC2.asn*SMATXl2,aS2)*5MATXC10,

     , SHATX(10,aSl) )
      SMATX{4,OS1)=UHSSSMATX(4,IS1)
      SMATX(3,OSl)=SATX(8,aSt)1.6/2t7+SMATXl4,OSl)
                                    147

-------
 70
 80

 90
100
   "SMATXC6,OS1)=,01SMATXC3,OS1)
   5MATXC7,OS1)=URSSSMATX(7,IS1)
   SMAIXC9,OS1)3SMATX(10,OS1)-SMATXC7,OS1)
   SMATX(ll,OSl)=SMArxC12,ISl)+SMATXC17,USn1.6/2.7
   SMATX(12,OSl)sSMATXC12,ISl)
     TEMPsSMATX(2,031)/SMATX(2ISlJ
     TEMP=TEMP+SMATXC2, 032 )/SMATXC 2, IS1)SMATX CIO, 032 )/SMATX (10,051)
     SMATXC13,OS1)=SMATXC5,IS1)+SMATX(13,IS1)-TEMP*SMATXC5,051)
     SMATXC14,OSl)sSMATX(6,ISl ) +SHATX ( 14. 1S1 ) -TEMP*SMATX C6 . OS 1 )
   SMATXC15,OsnsSfAtX(15. JS1)
   SMATXCl6.0Sn=SMArXC16,ISl)-lO,*(SMATX(18,XSl)-SMATX(18,051))
     5HATXC20,OSUsO,
     SATXC20fOS2)=0.
   TEMP43SHAIX ( 1 0, Ooi 3 /SM ATX t 10,031)
   DO 60 J=39
60 SM'ATX (U,052~) STEM? 4SM ATX 1 0,031)
   00 70 Jsll,19
   SMATX(J,OS2)sSHATX(J,OSl)
   AFS3SMATXC 2,031 ) 1000000, /DMATXC6 ,N ) UM AIX ( 1 5, N)
   PREHs(SMATX( 18, IS1)-SMATX(18,OSI))100./SMATX( 18,151)
   OPATsSMATX(2,Isn1000000./APSTG/XNSTCi
   IF(NSHFT-20)  80,30,90
   CC05T(l) = (28500,+45.*DMAT.X(9,N))N5riFT*1.50b/2.12l5
   GO TO 100
   CCOSTC1 ) = t 23000, +45, *DHATXC9,N) )NSHFT1 , 506/2 . 1 215
   XSALOGCAPEA/IOOO ,/DMArxd6,N) )
   OHPSxEXPC1.323670+,5242l5X+.023076X*2)
   XMHRSsEXP(-,124185+,840104*X*,007757#X*i)
   COSTH3(CCOSTC1)-45,*DMATX(9,N)*NSHFT1 ,506/2.1215)*. 02
   COSTEsNSHFT5,.746*24.365,CKH
   THSUsCOSTM+COSIb
   COSTO(l)a(CUHRStXMHRS)DHP(l,+PCT)+'rMSUJ/SMATX(2,l)/3650.
   XsALOGfAFS/1000.)
    1000.
   X3ALOGAFS/1000./DMATX(15,N) )
   OHRSsEXP(5,846565t,254813X+,ll J703*X#2- . 0 10942X3 )
   XMHRSsEXPCS. 27341^+. 228 329X+.122646X*^.,011672#X#3)
   TMSU3EXPC5, 66988 1+, 750799* X)
   COSTO(2)s((aHRS+XMHRS)DHR*(l.+PCT)t'rMSUWPI)/SMATXC2, 1)/3650,
   OHATX(l,N)sQPAB
   OHATX(2,N)sQPAN
   OCATX(3,N)=APSTG
   OMATX(4,N)sAREA
   OHATXC5,N)sFNSTG
   OMATX(6,N)sRNSTG
   OHATXC7,N)=RATIO
   OMATX(8,N)=PREM
   QMATX(9,N)sQPAT
   OMATX(10,N)=AFS
   OHATXC11,N)=PD3U
   OMATXC12,N)sURS5
   OMATXC13,N) = XNTflN
   OHATXC14,N)=XSHFT
   OHATX(1S,N)=COSIM
   OHATXC16,N)=COSTE
   OHATX(17,N)=COSTL
    EERsCOSTE/36b,/CKWH
    EER3EEP+EXP(2.3248+.30093*X+.022308X*2+
 2               ,OOJ5144X3)
   HETURN
   END
                               148

-------
c
c
c
c
c
c
c
 10
 C
 C
 C
 20
 30

 C
 C
 C
 40
 43
       SUBROUTINE PSASFS

       PRIMARY SEDIMENTATION,  ACTIVATED SLUDGE, *AS RETURNED TO PRIMARY
       CLARIFIES.

       INTEGER OS1.0S2.0S11, 0312,0821, 0522, QSlSAV,OS2SAV
       COMMON SMATX(20,45),DMATX(20,50),OMATXt20,50),IP(50),
              INP,IO,IS1.IS2,OS1OS2,N,IAERF,CCOSTCSJ,COSTO(5),
              ACOSTC53rDHR,PCT,WPI,CCI,RI,AF, RATIO, CKWH,
              CF,EER,EP, ALAND
       DIMENSION TPECCC20),CTEMP(5)TEMPO(5),ATEMPC5)

               SAVE STREAM AND PROCESS ID NUMBERS

       NITERsl
       ISISAValSl
       OSlSAVsOSl
       QS2SAVaOS2
       NSAVEsN
       Nl3DMATX(l,N5
       N2aDMATX(2.N)
       EPSs.OQl
       N1TMAX320
       IS113QS2+1
       OS11SQS2-I.2
       OS123QS2
       OS213QS1
       OS22=OS2*3
       DO  10  1=2,20
       SMATX(IrOS22JsO.
       TRECYC(IJ=0.

                MIX STREAM  IS1SAV WITH QS22

       TEMPlSMATXC2,OS22)+SMATXC2,ISiSAV3
       DO  30  133,20
       TEMP2sSMATXC2,OS22)*SMATXCIOS22)
       TEMP2*TEMP2+SMATX(2,IS1SAVJSMATX{I,IS1SAV)
       SMATXtIIS115sTEMP2/TEMPl
       SMATX(2IsmaTEMPi

                EVALUATE PROCESS PERFORMANCES

       NN1
       ISlsISll
       OSlaOSll
       OS2OS12
       DO  40 131 ,5
       CCOSTCDaO.
       COSTOClJaO.
       ACQSTCIJaO.
       CALL  PRSET
       DO  45 131,5
       CTEMP ( I JaCCOST ( I )
       TEMPO(I)=CaSTO(I)
        ATEMP(I)ACQST(I)
        EEPTMPaEER
5.0
         ISl^QSll
        - OS13QS21
         OS230S22
         DO 50 isl, 5
         CCOSTtDsO.
         ACOST{I)0.
         cosToen=o.
         CALL AERFS
         IF(IAERF.GT.O)GO TO 1000
                                     149

-------
 55

 C
 c
 C
 60

 C
 C
 C
 C
 70
 80

 C
 C
 C
 90

 100

 C
 C
 C
 1000
    DO 55 131,5
    CCOSTCIJsCCOSTm+CTEMPm
    COSTO CI) sCOSTO C I) -(-TEMPO (I )
    ACOST(I)3ACOSTCIJ+ATEMPU)
    EERaEER+EERTMP

            COMPARE RECYCLE STREAM QS22 WITH TRECYC

    DO 60 132,20
    IF(ABSCSMATXU,OS22)-TRECYCCIJ)-SMATXU,OS22)*EPS)60,60,70
    CONTINUE
    GO TO 90

            CONVERGENCE NOT ATTAINED. INCREMENT ITERATION COUNT.
            SAVE STREAM QS22 IN TRECYC. REPEAT ANOTHER ITERATION,

    NITER3NITEP-H
    IFCNITER.GT.NITMAXJGO TO 100.0
    DO 80 132,20
    TRECXCCI)3SMATXCI,OS22)
    GO TO 20

            CONVERGENCE ATTAINED,

    NsNSAVE
    DO 100 1=1,20
    OMATXCI,N)3dMATX(I,N2)
    RETURN
            ITERATION  LIMIT  EXCEEDED  OR  HtASS  CANNOT  BE  ATTAINED,
         IAEP.F31
         GO TO 90
         END
 C
 C
 C
c
c
10

20
C
C
30
   SUBROUTINE HEAT

           HEAT TREATMENT SUBROUTINE

   INTEGER 031,052
   COMMON SMATXC20.45),DMATXC20,50),QMATXt20,50J,IP(50),
2         1NP.IO,IS1,IS2,OS1,OS2,N,IAERF,CCOST(5),COSTO5),
3         *COSTC5),DHR,PCT.WPI,CCI,RI,AF,BATIO,CKWH,
4         CF,EER,EEP,ALAND

   IlsDMATXCl.N)
   I2DMATXC2,N)
   IDIGsDMATXC3,N)
   TEMPsDMATXC4,N)

   FIND FRACTION OF SLUDGE FROM PRIMARY TREATMENT
   IF(IDIG.GT.O)GO TO 30
   IFCI1.EQ.OJ  GO TO 10
   IF(I2,EQ.O)  GO TO 20
   FPpl3l.-SMATXC2,I2)*SMATX.aO,I2)/SMATXC2,Il)/SMATXUO,Il)
   GO  TO 30
   FPRIsO.
   GO  TO 30
   FPPIsl.

   COMPUTE EFFLUENT STREAM CHARACTERISTICS
   AS3l.32S5-.00457TEHP
   APsl.8112-.00596*TEMP
   AD1.9698-.00709TEMP
   BS3t,5855-.00657TEMP
   BPal.8455-.00657TEMP
   BDsl.9855-.00757TEMP
   GNDs.00163*TEMP-|..1755
   CDs.00163TEMP+,0755
                                   150

-------
c
c
        ALPHA3(l-IOIG)*CFPRIAP.t.+IDIGBD
        GAMMA3(1-IDIG)*GNO+IDIGGD
        5MATX(2,OSn=SMATXC2.ISl)
        SMATXC3,QSn=SMATXC3,ISn*8ETA
        SMATX<4,OSn3SMATXC3,OSnSMATX(4,ISl)/SMATXC3,ISl)
        SMATXC5OSn3SMATX(5ISnBETA
        SMATXC6,QSt)3SHATXC6,ISnBETA
        SMATXC7,051}3SMATX7rISl)
        SMATXC9,OS1)3SMATX(8.IS1)ALPHA
        SMATXC9C)SnsSMATXC9,ISnBETA
        SMA.TXCtO,OSn=SMATXC7,CJSl).+SMATXC9,CISU
        SHATX(12,QSl)*SMATXai,OSl)*(l.-<3AMMA]
        SMATXC13^0Sl)=SMATX(13,ISl)-t-SMATXC5,ISl}tl-."BETA)
        SMATXCl4,QSl)=SHATXC14,Isn+SMATX(6,ISl)*.073395*X#*2 3 1000.. 60873
OHRS3EXP(8.428l-.084636*X*.0596HX*23
OHPSsQHRS*BMA7X{5rN)*S2i/8000.-
XMHRS=,25OHRS
TMSU=EXPC8.8497-.13093X+.073644*X*23*.6643WPI
XKWPY3.007GPM/DMATX16,N)#60,DMATX(5.N)*52.
ECOST=XKWPY*CKWH                                  ,
OTQTs(TEHP-20.)*,25*lSry.75*GPM/DMATXC16N)60.DHATX(5,N}*52.
HPDsDMATXC5,N)/DMATX(6,N)
IF(HPD.LT.8.3FKs2000.
IF(HPD.LT.16,)FK=1500.
IF(HPO.LT,24.)FK3lOOO.
IFCHPD.GE.24.)FK=Q.
SPYDHATX(6,NJ52.
QTOT3QTOT*C12.2000.+FK(SPV-12.))GPM/DMATXC16,N)60.
>COST3FUEL*DMATX(7,N)/1.E6
TMSUsTMSU+ECOST+FCOST
CaSTOCl)3(COHPS>XMHRS)DHP(l.+PCT)-)-THSU)/SMATX(2,l)/3650.
EER3XKHPY/365.+QTOT/ 365. , 00029 3CF

FILL IN VALUES OF  OUTPUT  MATRIX
OMATXC1,N)=GPM
OMATXC2*N)3ALPHA
OMATX(3,N)=BETA
OMATX(4N)=QTOT/1.E6
RETURN
END
                                    151

-------
                                   TECHNICAL REPORT DATA
                            (Please read Instructions on the reverse before completing)
1. REPORT NO.
  EPA-600/2-79-158
                                                           3. RECIPIENT'S ACCESSION-NO.
4. TITLE AND SUBTITLE
 COMPUTER-AIDED SYNTHESIS  OF  WASTEWATER TREATMENT
 AND  SLUDGE DISPOSAL SYSTEMS
               5. REPORT DATE              :
                December 1979 (Issuing  Date)
               6. PERFORMING ORGANIZATION CODE
7, AUTHOR(S)
                                                           8. PERFORMING ORGANIZATION REPORT NO.
 Lewis  A.  Rossman
9. PERFORMING ORGANIZATION NAME AND ADDRESS
 Municipal  Environmental Research LaboratoryGin., OH
 Office of Research and Development
 U.S.  Environmental Protection  Agency
 Cincinnati, Ohio 45268                          	
               10. PROGRAM ELEMENT NO.

                 1BC821,  SOS  1
               11. CONTRACT/GRANT NO.
12. SPONSORING AGENCY NAME AND ADDRESS
 Same  as  above
               13. TYPE OF REPORT AND PERIOD COVERED
                 Inhouse  (Feb.  -  Oct. 1978)
                                                           14. SPONSORING AGENCY CODE
                                                              EPA/600/14
15. SUPPLEMENTARY NOTES
 Project  Officer:   Lewis A. Rossman  513/684-7636
16. ABSTRACT

      A computer-aided design procedure for the preliminary  synthesis of wastewater
 treatment  and sludge disposal  systems is developed.   It selects  the components in
 the wastewater treatment and sludge disposal trains from a  list  of candidate process
 units with fixed design characteristics so that criteria on effluent quality, cost,
 energy,  land utilization, and  subjective undesireability are best satisfied.  The
 computational procedure uses implicit enumeration coupled with a heuristic penalty
 method that accounts for the impact of return sidestreams from sludge processing.
 The programmed version of the  design procedure, called EXEC/OP,  has been interfaced
 with the unit process subroutines  contained in a previously EPA  developed system
 evaluation program known as EXECUTIVE.   A number of case study design problems are
 presented  to demonstrate the versatility of EXEC/OP.  Included among these is a
 preliminary cost/energy-effectiveness analysis for a  hypothetical  design problem
 containing over 15,000 alternative system configurations.
17.
                                KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
                                              b.lDENTIFIERS/OPEN ENDED TERMS
                            c.  COSATI Field/Group
 Waste treatment
 Sludge disposal
 Facilities
 Systems analysis
 Optimization
  Alaste water treatment
  Alaste treatment facilities.
  Sludge treatment
  Treatment facilities
  System synthesis
  Multi-objective planning
13B
18. DISTRIBUTION STATEMENT
 Release to public
  19. SECURITY CLASS (ThisReport)
    Unclassified
                                                                         21. NO. OF PAGES
                                                                           160
  20. SECURITY CLASS (Thispage)

    Unclassified
                                                                         22. PRICE
EPA Form 2220-1 (9-73)
152
                                                                   U.S. GOVERNMENT PRINTING OFFICE: 1980-657-146/5556

-------

-------
                                                                      t n


                                                                      3*


                                                                      o* ^

                                                                      ~" y>
                                                                      -p~
                                                                               mc|
                                                                                            <0 3

                                                                                               -
                                                                                              CD n> r

                                                                                              3
                                                                                               W
                                                                                              2
                                                                                              ID
        ta 2.^" 2, S CD"

        gg i-ga
        Z.^r, 2 =
m
O
o
ro
 i
tn
oo
                5-
        sgi:
        3 w o
ffl

c -


i-* 5

M. W


f S





ll



5-1
              af S.
                
                                                                                            oom

                                                                                            = ii
                                                                                            o ^ .

                                                                                            3'! O
                                                                                            33
                                                                                            01   Z}
                                                                                            r-f   3
                                                                                               (D

                                                                                            o   =
                                                                                            x   S



                                                                                            s   :

                                                                                            i   I
                                                                                                3

                                                                                                3"

                                                                                                i

                                                                                     m > TjrniTD
                                                                                     -Ota 3 3 ra o
                                                                                           S   0.

                                                                                           0)
                                                                                      III

-------
-------
                  00030000
                                                                                   ooooooooo
                  000000010
                  OOOOOOO43
                                                                                   oo ooooomco
                                                                                   ooooooo<*ir
                                                                                   OOOOOOO-4F*-
                  - in co CD o   in
                  *?      CM CM CM    4
n
                                                         in
                                                         u
                                                         a
                                                                           IE
                                                                           U
                                                                           u
                                                                           to
                                                                                            oo oooinooo
                                                                  u
                                                                  3
                                                                  a
                                                                                                               CM       -*
                                                                                                                                0)
                                                                                                                                s:
                                                                                                                                3
                                                                                                                        10
                                                                                                                        Ell
                                                                                                                        a
                                                                                                                                Of.
                                                                                                                                u
                                                      u
                                                      j
                                                                                                                                b.
                                                                                                                                a
                                                                                                                                         E-t
                                                                                                                                         X
                                                               z

                                                               u

                                                               a
                                                                                                                                                  a
                                                                                                                                                   O)
                                                                         c
                                                                         o
                                                                         o
                                                                                                                                                  CQ
                                                                                                                                                           CD
                                                                                                                                                           S-
                lO9cff^r^>o**'*>
            CM  J    ^r -.      
                                                                                                                      *^

                                                                                                                      |V

                                                                                                                      r
                                                                                                                                a.
                                                                                                                                o
                                                                                                                                b.
                 OCMtn*VCM\O^F

                 000*^0000
           X   |o o o  o fm   l-o-
         ua
         a >
         an
         = z
         JO
         tac
                                             ".  |c
                                             w   io
                                                                             >t  |OOOOOOr*1OO   |O
                                                                            h<  i o o r- p o * m o ov   i
                                                                                   wx
                                                                                   a
                                                                                   JO
                                                                                   03 E->
                                                                                          |GOvo-Oa><*in>
         VI
         
                                                                   76
-------
                       CM CO O
                       M  O
                           
                        a o
                       a* in
                       CM N
id
to
a
H4
t*

ta
M
x
a.
o
                S> fj
t   CO
> z a
   u:
z n a:
a 03 o
IH X K
10 CO U,
                       S- O J
                       t> OL *
                                         I O O 9 O OOO.99
                                           ooooooootn  |tfl
                                           oooooooom  i*>
                                           OGOOOO9O**
                                           *- tn at; CD -4  v  cc
                                                                                ooooooooo    o
                                                                                ooooooooo

                                                                                ooooooooo    o
                                                                                O000000100
                                                                                ooooo o o m o

                                                                                ooooooo*-*o
             tL in
             u
             t-.
             M
             a
             u
                                    w

                                    ut
                                           OOOOOOOOO   ft*C
                                           OOOOOO  00   |*H
                                                                                   in -*
                                                                                   ir> * CN
                                                                                   ^ in *n

                                                                                   to o ei
                                                                                   r*- OD *
                                                                                   NCM
                                                                                                a, in
                                                                                                u
                                                                                                t-.
                                                                                 ooooootooo  I P*
                                                                                 OOOOOWOOO  |O^
                                                                                  .........  I*
                                                                                 OOOOOODOOO  	
                                                                                                O    |m CM i^  in  z a.
                                                                                      bl
                                                                                   X K Z
                                                                                   10 too
                                                                                   t- J-OC
                                                                                    X O.U
                                                                                    UAO.
                                                                                                          ^O^CMCNCNt^CNOi  }ncn  ten
                                                                                                                       OJ
                                                                                                                       3
                                                                                                                                              O
                                                                                                                                              u
                                                                                                                                             CQ
                                                                                                                                              O)
                                                                                                        o o N r^f^ i -* o ex
                                                                                                        oo o * o o o.o o
                                    U O
                                    IS X
                                    O to
                                    9 2
                                    O O
                                    ca fr-
              CO Z
              uo  .
              OX  |^ CN>
              Of  I
              ceo.  i
              a, o  I
              S    I
              si  r1
              09     I
                                                                                    O 1C "t o
                                                                                                   X  10 O - OO -<

                                                                                                 id O

                                                                                                 o n


                                                                                                 tot-
                                                                                                 CO     I
                                                                                                 CO Z
                                                                                                 u o
                                               >

                                               z
                                               u
                                                                                                 S
                                                                                                 K O.
                                                                                                 O. o
                                                                                                     . I
                                                                                                                                  U
                                                                                                                                  t-t
                                                                                                                                  05
                                                                     73