EPA-600/2-78-074
April 1978
Environmental Protection Technology Series

   INTEGRATING  DESALINATION AND AGRICULTURAL
                    SALINITY  CONTROL ALTERNATIVES
                               Robert S. Kerr Environmental Research Laboratory
                                        Office of Research and Development
                                       U.S. Environmental Protection Agency
                                               Ada, Oklahoma 74820

-------
                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-78-074
                                            April 1978
     INTEGRATING DESALINATION AND AGRICULTURAL
            SALINITY CONTROL ALTERNATIVES
                         by
                   Wynn R. Walker
Department of Agricultural and Chemical Engineering
             Colorado State University
           Fort Collins, Colorado  80523
                 Grant No.  R803869
                  Project Officer

                 Arthur G. Hornsby
              Source Management Branch
  Robert S. Kerr Environmental Research Laboratory
                Ada, Oklahoma  74820
  ROBERT S. KERR ENVIRONMENTAL RESEARCH LABORATORY
         OFFICE OF RESEARCH AND DEVELOPMENT
        U.S. ENVIRONMENTAL PROTECTION AGENCY
                ADA, OKLAHOMA  74820

-------
                          DISCLAIMER
     This report has been reviewed by the Robert S. Kerr
Environmental Research Laboratory, U. S. Environmental Protection
Agency, and approved for publication.  Approval does not signify
that the contents necessarily reflect the views and policies
of the U. S. Environmental Protection Agency, nor does mention
of trade names or commercial products constitute endorsement
or recommendation for use.
                               11

-------
                           FOREWORD


     The Environmental Protection Agency was established to
coordinate administration of the major Federal programs designed
to protect the quality of our environment.

     An important part of the Agency's effort involves the ,
search for information about environmental problems, management
techniques and new technologies through which optimum use of
the Nation's land and water resourcescan be assured and the
threat pollution poses to the welfare of the American people
can be minimized.

     EPA's office of Research and Development conducts this
search through a nationwide network of research facilities.

     As one of these facilities, the Robert S. Kerr Environmental
Research Laboratory is responsible for the management of programs
to:  (a) investigate the nature, transport, fate and management
of pollutants in groundwater; (b) develop and demonstrate
methods for treating wastewaters with soil and other natural
systems;  (c) develop and demonstrate pollution control tech-
nologies for irrigation return flows; (d) develop and demonstrate
pollution control technologies for animal production wastes;
(e) develop and demonstrate technologies to prevent, control or
abate pollution from the petroleum refining and petrochemical
industries; and  (f) develop and demonstrate technologies to
manage pollution resulting from combinations of industrial
wastewaters or industrial/municipal wastewaters.

     This report contributes to the knowledge essential if the
EPA is to meet the requirements of environmental laws that it
establish and enforce pollution control standards which are
reasonable, cost effective and provide adequate protection for
the American public.

                                           0.

                               William C. Galegar
                               Director
                               Robert S. Kerr Environmental
                                 Research Laboratory
                              111

-------
                           ABSTRACT


     The cost-effectiveness relationships for various
agricultural and desalination alternatives for controlling
salinity in irrigation return flows are developed.  Selection
of optimal salinity management strategies on a river basin scale
is described using a four level decomposition analysis.  The
first level describes the cost-effectiveness of individual
alternatives applicable in subbasin or irrigated valley situ-
ations.  Included at this level are desalination of drainage
return flows with multi-stage flash distillation  (MSF), vertical
tube evaporation - MSF  (VTE-MSF), vapor compression - VTE-MSF
(VC-VTE-MSF), electrodialysis (ED), reverse osmosis (RO),
vacuum freezing - VC  (VF-VC), and ion exchange (IX).  Feedwater
is assumed to be supplied by groundwater wells or surface
diversions, whereas brine disposal may be accomplished with
either injection wells or evaporation ponds.  Agricultural
salinity control alternatives at the first level include canal,
ditch, and lateral lining, and on-farm improvements (irrigation
scheduling, automated surface irrigation, sprinkler irrigation,
and trickle irrigation).  The second level representing the best
management practices for the subbasin is defined by selecting
the minimum cost policy of level 1 alternatives which reduce
subbasin salinity by preselected amounts.  The establishment
of second level cost-effectiveness functions allow evaluation
of salinity management at the river subsystem cost-effectiveness
functions provide the optimal basin-wide strategies and their
respective structures.  A case study of the Grand Valley in
western Colorado is presented to demonstrate the model.

     This report was submitted in fulfillment of Grant No.
R-803869 Colorado State University, under the sponsorship of
the U. S. Environmental Protection Agency.  This report covers
the period July 15, 1975 to July 14, 1977, and was completed
as of October 1, 1977.
                               IV

-------
                          CONTENTS
Foreword	,	iii
Abstract 	  .....  iv
Figures	.	  vi
Tables	ix
Acknowledgements	xi

     1.  Introduction	   1
     2.  Conclusions 	  ,...*.,.   4
     3.  Recommendations 	 .........   6
     4.  Cost-Effectiveness Analysis  . , .  .  ,	   7
             Optimization Method	   8
             Application to Regional Salinity Problems .  ,  17
     5.  Simulation of Desalting Cost^-Ef f ectiveness  ...  23
             Desalination Cost Analysis  .........  24
             Process Description	  29
             Feedwater and Brine Disposal	  .  51
             Desalting Cost Analysis  ...........  55
     6.  Simulation of Agricultural Salinity Control Costs  62
             Water Conveyance System Analysis   	  62
             On-Farm System Analysis  , . .  „	69
     7.  Optimizing Desalination-Agricultural Salinity
         Control Strategies  	 ...  91
             Description of Case Study Area	92
             Development of First Level Cost^Effectiveness
             Functions	  99
             Development of Second Level Cost<-
             Effectiveness Functions	  . 109
             Discussion of Results	113
             Evaluation at the Third and Fourth Levels .  . 116

References	 119
Appendices 	 	
    A.  Desalting Cost Analysis Computer Code	125
    B.  Optimizational Analysis Computer Code   	 143
                             v

-------
                            FIGURES
Number                                                     Page

  1  Conceptual decomposition model of a regional
     or basin salinity control strategy 	   18

  2  Desalting cost function for an RO system having
     feedwater at 4000 mg/£ and product water at 500
     mg/£	   28

  3  Schematic diagram of a typical desalination
     system	   30

  4  Diagram of typical multi-stage flash distillation
     system	   31

  5  Illustration of the basic vertical tube evaporation
     effect	   35

  6  Schematic diagram of VF-VC desalting process 	   40

  7  Generalized view of a electrodialysis desalting
     process	   43

  8  Flow diagram of typical RO desalting system	   45

  9  Illustration of basic RO process 	   45

 10  Ion exchange desalting process 	   49

 11  Relationship of plant capacity and desalting costs
     for various systems	   57

 12  Effects of feedwater salinity concentration on
     desalting costs	   59

 13  Comparison of concrete and buried plastic pipeline
     lining costs 	   70

 14  Graphical representation of sprinkler irrigation
     uniformity analysis	   75

 15  Dimensionless cost functions for various types of
     pressurized irrigation systems 	   80

                              vi

-------
                      FIGURES  (continued)
Number                                                     Page

 16  Definition sketch of surface irrigation application
     uniformity in the case where part of the field
     is under-irrigated	   86

 17  Definition sketch of surface irrigation application
     uniformity in the case of zero under-irrigation ....   87

 18  Sketch of surface irrigation uniformity under
     conditions of significant over-irrigation	   88

 19  Land use in the Grand Valley	   96

 20  Mean annual flow diagram of the Grand Valley
     hydrology	100

 21  Cost-effectiveness function for the first level,
     on-farm improvement alternatives, in the
     Grand Valley	105

 22  Optimal Grand Valley canal lining cost-effectiveness
     function	108

 23  Grand Valley desalination cost-effectiveness
     function	110

 24  Dimensionless level 1 cost-effectiveness curves
     for the Grand Valley	112

 25  Grand Valley second level salinity control cost-
     effectiveness function	114

 26  Marginal cost-function of optimal salinity control
     strategy in the Grand Valley	117

B-l  Illustrative flow chart of the subroutine
     DIFALGO	146

B-2  Illustrative flow chart of the subroutine
     REORGA	147
                              VII

-------
                      FIGURES (continued)
Number                                                     Page

B-3  Flow chart of the subroutine NEWTSIM used to
     solve systems of non-linear equations 	   148

B-4  Illustrative flow chart of the subroutine
     DECDJ	   149
                             vxn

-------
                            TABLES
Number                                                     Page
  1  Summary of Cost Functions for a MSF Desalting
     Plant	    34

  2  Summary of Cost Functions for VTE-MSF Desalting
     Plants	    37

  3  Summary of Cost Functions for VC-VTE-MSF Desalting
     Plants	    38

  4  Summary of Cost Functions for VF-VC Desalting
     Plants	    41

  5  Summary of Cost Functions for ED Desalting
     Plants	    44

  6  Summary of Cost Functions for RO Desalting
     Plants	    48

  7  Summary of Cost Functions for IX Desalting
     Plants	    50

  8  Summary of Capital Construction Costs Functions for
     Feedwater, Cooling, and Brine Disposal Facilities
     in $ Million	    53

  9  Summary of Annual 0 & M Cost Functions for Feedwater,
     Cooling, and Brine Disposal Facilities in
     $ Thousands	    54

 10  Standardized Desalting Model Input Parameters for
     Variable Sensitivity Analyses 	    56

 11  Hydraulic Characteristics of the Grand Valley
     Canal and Ditch System. ..... 	    95

 12  Consumptive Use Estimate for the Grand Valley  ....    97

 13  Seepage Data for the Fourteen Major Canal System
     in the Grand Valley	    98
                               IX

-------
                      TABLES (continued)


Number                                                     Page

A-l  Input Data Printout from Example Analysis 	   126

A-2  Example Cost Analysis for a Reverse Osmosis Desalt-
     ing System Supplied by Feedwater Wells and Disposing
     of Brine Through Injection Wells	   127

B-l  Definition of Subroutine Functions	   145

B-2  Summary of Parameters Required as Input and Problem
     Set-up	   150
                               x

-------
                       ACKNOWLEDGEMENTS
     The author is indebted to colleagues at Colorado State
University for their assistance during this project.  Mr.  Gaylord
Skogerboe and Mr. Robert G. Evans supported the work by re-
viewing drafts of some sections and providing timely suggestions
as to the description of the salinity control alternatives.
Mr. Jan Gerards developed the surface irrigation hydraulic
description as part of his own work and allowed a summary to be
included herein.  Mr. Stephen W. Smith and Mr. Richard L. Aust
prepared and supervised the drawing of many of the drawings
in this report.

     Ms. Clarice Petago, Ms. Sue Eastman, and Ms. Debby Wilson
typed the various drafts and their patience is very much
appreciated.

     And finally, the author wishes to thank the project officer,
Dr. Arthur G. Hornsby, whose direction maintained the proper
scope of the project.
                               XI

-------
                           SECTION 1

                         INTRODUCTION
OBJECTIVES OF STUDY

     Controlling salinity in a major river basin is a difficult
task because of the mixture of diffuse and point sources of
salinity.  Generally, the best practicable solution lies in
combining the strong features of several control measures and
applying each to the conditions for which it is best suited.
Salinity control technology in this regard remains to be de-
veloped since few investigations have managed to integrate the
alternatives.  Probably the area needing first priority is the
combined use of desalting and irrigation return flow quality
control.  In an irrigated area, for example, traditional salinity
control measures include canal and lateral linings along with
improved irrigation practices such as irrigation scheduling.
Nevertheless, treatment of the agricultural system does not
completely alleviate local salinity problems because only the
salt pickup component of salinity can be reduced.  By considering
desalination, a total salinity control program is possible by
removing salts being transported through the irrigated system
thus, creating even more than a "zero discharge" capability.
Desalting should therefore be considered in not only controlling
the quality of irrigation return flows, but also controlling
salinity from mineralized springs, seeps or highly saline
groundwater.

     The objective of this study was to develop an analytical
procedure for optimizing salinity control strategies in salinity
affected areas by integrating desalting measures.  As a case
study for verification of the analysis, the main stem of the
Colorado River extending from the Colorado-Utah border to its
headwaters will be examined.  This reach of the river includes
the Grand Valley where considerable agricultural related research
has either been concluded or is underway on various salinity
control measures.  In addition, Glenwood Springs which adds more
than 300,000 tons of salt annually to  the river and several
anticipated  important energy and urban water developments which
are expected to create significant salinity increases in the
river are also in this region.  It is, therefore, a prime area
for developing such an analysis.  In this regard, the specific
objectives were :

-------
     1.  To identify the saline water flows in the region as
         to quality characteristics, flow magnitude and vari-
         ation, location with regards to power and labor
         supplies, brine disposal, and environmental impact,
         and requirements for collection and conveyance;
     2.  To determine the costs of desalting a fraction or
         all of these flows to achieve a range of salinity
         control in the river system;
     3.  To formulate an analytical procedure for selecting
         an optimal level of desalination in an area where
         other methods of control could also be used.  This
         procedure requires that the cost-effectiveness of
         desalination be compared with similar relationships
         describing the other alternatives, subject to a
         salinity control potential, an agricultural, urban,
         or industrial water development plan, and a policy
         for maintaining or reducing salinity concentrations
         basin-wide; and
     4.  To determine the specific data requirements, research
         needs, and system parameters most influential on
         the structure of a regional salinity control tech-
         nology in order to insure reliability in its eventual
         implementation and provide the basis for applying
         these results to other salinity affected river systems.

     The Upper Colorado River Basin contains vast reserves of
oil shale and coal essential to the future energy needs of the
nation.  The rapidly growing urban centers of Denver, Salt
Lake City, and Albuquerque will require substantial interbasin
transfers to meet their water resource needs.  These developments
will compound the already serious salinity problem in the basin
and steps must be taken to offset the expected damages.  Because
of the serious nature of the salinity problem in the Lower
Colorado River Basin, the most binding constraints on future
water resource developments in the Upper Basin might very well
be salinity rather than each state's entitlement under the
Colorado River Compact of 1922.  The specific recommendations
for resolving this problem are still being investigated with
the exception of possibly the decision to construct the desalting
facilities on the We11ton-Mohawk Drain.  There has, however,
been a statement of policy by the basin states and the U. S.
Environmental Protection Agency to the effect that salinity
concentrations should be maintained at or below existing levels.
The EPA has supported salinity related investigations in the
basin for a number of years to identify alternative control
measures and their feasibility.  The Bureau of Reclamation
through a  Congressional mandate has been given the responsi-
bility of planning for and implementing salinity controls in
the basin.  Both agencies will necessarily rely on previous
investigations in coordinating their policy and instigating

-------
other studies as new research needs become apparent.  The results
of this project, an evaluation which optimizes agricultural
salinity control and desalting, are intended as an aid to planners
in developing an effective salinity control program.

     The efforts involved in completing this investigation fell
quite naturally into four phases of work:

     1.  Developing an optimizational analysis for the problem
         of managing salinity in a river basin;
     2.  Modeling the cost-effectiveness relationships associated
         with alternative improvements in the irrigation system
         to improve flow quality;
     3.  Simulating the costs of desalting saline flows; and
     4.  Determining the least cost combination of agricultural
         and desalting measures which achieve a desired level
         of salinity control in the study area.

-------
                           SECTION 2

                          CONCLUSIONS


     Desalting is a very expensive but nevertheless feasible
salinity control alternative.  Unit costs are inversely pro-
portional to plant capacity and feedwater salinity and pro-
portional to land, energy, and material prices.  It appears a
reverse osmosis system having feedwater in the 7,000-10,000
mg/£ range will offer the most cost-effective system for a
regional salinity management application.  The capital costs
(1976 base) for such a system are approximately $320 for a 30
year removal of one metric ton annually.

     Desalting cost estimates are affected by several site-
specific conditions like land costs, environmental concerns,
climatic conditions, energy availability, and labor.  The supply
of feedwater and the removal and disposal of brines are also
serious considerations in desalting system designs.  In the
Upper Colorado River Basin or others of a similar nature, these
factors would not significantly alter the unit cost noted above.

     Because irrigated agriculture is a large contributor to
most western salinity problems, the feasibility of desalination
depends on the cost-effectiveness of improving irrigation
efficiency.  The reduction of salinity concentrations in irri-
gation return flows is primarily a matter of minimizing the
subsurface component of the hydrology by lining conveyance
systems to reduce seepage, increase on-farm irrigation efficiency
to diminish deep percolation, and utilize field relief drainage
to intercept deep percolation.  Desalting the return flows is
generally a more cost-effective alternative than relief drainage
and compares favorably with large canal linings in low seepage
areas.  However, most on-farm improvements such as head ditch
linings, automation of surface irrigation, conversion to
sprinkler systems, or better water management practices  (irri-
gation scheduling) have better cost-effectiveness characteristics
than desalting.  Conversion to trickle irrigation and desalting
return flows have comparable cost-effectiveness.  It should be
emphasized that the relative feasibilities of these technologies
are highly dependent on site specific factors and can change
measurably from location to location.

     Salinity control strategies involve complex, constrained
and nonlinear mathematics when reduced to their most elemental

-------
form.  Trade-offs exist among alternative salinity control
measures and some are prerequisite on the implementation of
others.  It is therefore difficult, if not impossible, to
identify the best program to implement without incorporating
an optimizational analysis.  A case study of the Grand Valley
of western Colorado using these tools demonstrated a 20-30% cost
savings over the existing salinity control plan. On  a  larger
scale such as the Upper Colorado River Basin, the benefits of
optimization basin planning could amount to many millions of
dollars annually.

     Unfortunately, there is not enough data in most irrigated
areas for a Grand Valley type investigation and one may be
inclined to wonder at the value of this study.  The problem
in other areas will be delineating the best management practices
at the first levels of salinity control planning.  It should be
possible to identify the relative emphasis on desalting on-
farm improvements, conveyance system linings, and drainage,
but not the individual characteristics of these alternatives.
Consequently, the value of the optimizational techniques in
the planning process will occur in two stages.  The first
analysis can identify the priority among the primary control
measures to serve as a guide to more detailed studies.  Then
as is the case in the Grand Valley, the process can be repeated
with the added data to determine the policies for implementation,
on a more detailed level.

-------
                           SECTION 3

                        RECOMMENDATIONS
     The results of this project should be extended to the basin
level development of optimal salinity control policies in the
Upper Colorado River Basin, the Rio Grande River Basin, and
others facing critical salinity management decisions.  These
studies are needed to provide agencies having the responsibility
for implementing salinity control programs with information that
will maximize the effectiveness of funds and manpower.  The
dimensionless curves distributing costs and salt loading re-
ductions (or return flow rates) should be used in lieu of the
costly investigations necessary to define such relationships
in each individual subbasin or valley.

     The models presented in this report have only been partially
tested with respect to the sensitivity to important parameters
and assumptions that were made during the formulations.  This
work should be completed to not only establish the reliability
of the models but also to identify the field data having the
most impact in determining the optimal salinity control
strategies.  Since these models are dependent on predictions
made by more detailed hydro-salinity simulation models, the
sensitivity to the simulation model assumptions and parameters
should also be evaluated.

     The costs of building and operating desalination systems
should be updated in the form utilized in this report.  Tech-
nological advances since 1972 need to be included as well as
inflational cost increases not completely encompassed by
various cost indexes.  More efforts are also needed in evalu-
ating the costs of irrigation system improvements.

     Evaluative techniques for defining irrigation efficiencies
in large areas with available or easily collected field data
should be developed for the water quality planning agencies
and consultants.

-------
                           SECTION 4

                  COST-EFFECTIVENESS ANALYSIS
INTRODUCTION

     There is probably no other means as commonly used or as
widely accepted for evaluating the merits of a water resource
system as its economic attributes.  Although water resources
can be classified primarily as public commodities, significant
influences on pricing and management are due to water uses in
the private market.  In most states, water is not legally
"owned" by an individual other than the state, but rights can
be obtained for the use of water by individuals.  However, when
the legal interpretation implies that the water is tied to the
land and cannot be transferred, then the value of the land is
enhanced by its water right.  These cases give water a market
value obtainable by a right holder even when the resource is
administered as public property.  As in the case of grazing
privileges on public lands, the pricing is usually lower than
that obtainable in the private economy.  As a consequence, right
holders are often reluctant to accept changes to improve their
use efficiency and thereby reduce their water requirement.

     Reservoirs, diversion works, and distribution systems aid
management of water which tends to remain fixed in spatial
distribution but randomly distributed with time.  These facili-
ties, without which water use would be constrained to local
utilization, allow wider water use between adjoining watersheds
and along a river system.  However, the diversion of waters for
most uses create externalities  (downstream water quality
detriments, for example) which are usually not considered by
local planners.  Thus, maximum economic efficiencies are only
achieved when the economic evaluations assume a regional
interpretation.

     This section deals with an optimization procedure intended
to determine the most cost-effective means of managing salinity
from non-point agricultural sources.  The interpretation is on
a regional scale so that economic efficiency is addressed.

Optimization Criterion

     Optimization is generally a maximization or a minimization
of concise numerical quantities reflecting the relative

-------
importance of the goals and purposes associated with alternative
decisions.  Of themselves, neither the goals nor purposes directly
yield the precise quantitative statements required by systems
analysis procedures.  Therefore, the objectives require a mathe-
matical  description before alternative strategies can be
evaluated (Hall and Dracup, 1970).  Presumably, such a comparison
would permit a ranking of these policies as a basis for decision
making.  The specific measure to facilitate this examination
can be defined as the optimizing criterion.

     The central problem is to link the descriptions of the
physical environment via mathematical models with the social and
political environment (Thomann, 1972).  Probably the most
commonly used and widely accepted "indicators" are found among
the many economic objective functions.  However, considerable
controversy exists as to the most realistic of these tools.  If,
for example, aspects of a water quality problem could be priced
in an idealized free market monetary exchange, the forces that
operated would insure that every individual's marginal costs
equalled his marginal gains, thereby insuring maximum economic
efficiency.  In the absence of this ideal situation water quality
cannot be quantified with a high degree of accuracy and the
optimizing criterion in any case is at best an indicator of the
particular alternative.

     Among the more adaptable economic indicators are maximi-
zation of net benefits, minimum costs, maintaining the economy,
and economic development.  The use of each depends on the ability
to adequately define tangible and intangible direct or indirect
costs and benefits.  In water resource development, and water
quality management specifically, the economic incentives for
more effective resource utilization are negative in nature
 (Kneese, 1964).  A large part of this problem stems from the
fact that water pollution is a cost passed on by the polluter
to the downstream user.  Consequently, the inability of the
existing economic systems to adequately value costs and benefits
has resulted in the establishment of water quality standards,
however, inefficient these may be economically (Hall and Dracup,
1970).  The immediate objective of water resource planners is
thus to devise and analyze the alternatives for achieving
these quality restrictions at minimum cost, the criteria
chosen for this study.

OPTIMIZATION METHOD

     The search for an optimizing technique to evaluate the
relative merits of an array of alternatives depends largely
upon the form of the problem and its constraints.  While the
allegorical Chinese maxim cited by Wilde and Beightler (1967)
stating "There are many paths to the top of the mountain, but
the view there is always the same," is also true in this case;
not every method can be applied with the same ease.  Each

-------
optimization scheme has its unique properties making it adapt-
able to specific problems, although many techniques when
sufficiently understood can be modified to extend their
applicability.

     Most conditions encountered in irrigated agriculture
involve mathematical formulations which are nonlinear in both
the objective function and the constraints.  Furthermore, the
constraining functions may be mixtures of linear and nonlinear
equalities  and inequalities.  Without simplifying these
problems or radically changing existing optimization techniques,
it is possible to derive solutions based upon what Wilde and
Beightler  (1967) describe as the "differential approach."

     Most techniques for selecting the optimal policy do so by
successively improving a previous estimate until no betterment
is possible.  These may be classified as direct or indirect
methods depending on whether they start at a feasible point and
stepwise move toward the optimum or solve a set of equations
which contain the optimum as a root.  In a majority of cases,
the differential approach can be used to describe the method.

     The optimizing technique used in this effort is called the
"Jacobian Differential Algorithm."  Theoretically, it is a
generalized elimination procedure which is computationally
feasible under a wide variety of conditions.  The characteristics
of convexity are assumed and since the maximization problem
is simply the negative of a minimization one, the following
discussion will be limited to the latter case.  As in all direct
minimizing procedures, the algorithm involves four steps:

     1.  Evaluate a first feasible solution, x°, which
         satisfies the problem constraints.  The underbar
         indicates vector notation and the superscript °
         is used to describe the "old" or initial points ;
     2.  Determine the direction in which to move such that
         the objective function, y, is decreased most rapidly.
         This requires a move from x ° to the new point., xv,
         in which the superscript v represents the new point
         notation;
     3.  Find the distance that can be moved without violating
         any of the problem constraints;and
     4.  Stop when the optimum is reached.

The user is left only with providing the first feasible solution,
step 1.  This may seem to be a drawback for the problem, but in
real situations a feasible solution already exists as a current
policy.  Step 4 is accomplished by an examination of what are
now referred to as the "Kuhn-Tucker conditions."  These criteria
do not indicate whether the procedure has reached a local or
global optimum; consequently, it is necessary to derive a
means for checking.

-------
Theoretical Development

     Consider the problem in which the minimum value of the
objective function is sought subject to a set of constraining
functions.  Writing this problem mathematically,

     y = min y (x) 	(1)

subject to,

     f(x) > 0  	(2)

where the notation y(x)  denotes "as a function of the vector x."
The number of x variables is defined as N and the number of
constraints as K.  The method of analysis depends largely upon
the structure of the constraints.  When all the constraints are
inequalities and "loose" or "inactive" (strictly >) at the
initial feasible point x°, the problem is "unconstrained."  In
the other case when either some of these functions are strict
equalities or when some of the inequalities are "tight" or
"active," the problem is referred to as "constrained."  Although
both of the conditions may occur in the solution of a problem,
they require somewhat different approaches as the algorithm
progresses toward the optimum.

Elimination Procedure —

     The elimination nature of the technique is derived from the
fact that it is at least conceptually possible to employ only
the currently active constraints to eliminate some of the x's
from the problem, making it temporarily unconstrained.  To begin,
define the number of active constraints as T and reorder the
constraint set so that the first T is the active constraint
with index t = 1, 2, ..., T.  Further, introduce "slack"
variables to the active constraints so they take the form,

     f_(x) - £ = C> 	(3)

and become strict equalities, where £ is the vector of slack
variables.  The purpose of this transformation is that by
continual observation of the slack variables the distinction
between active and inactive functions can be determined.  The
problem now contains N original variables plus T slack variables
which are related by T active constraints.  If the constraints
are linear, T of the variables can be eliminated from the
objective function by the constraint expressions, making the
problem unconstrained.  However, in the general situation,
the constraints are nonlinear, and it is not directly possible
to substitute for  the dependent variables, but rather to first
linearize the functions by taking the first partial derivatives
with respect to the x variables.  Even though the nonlinearity
may still exist due to the nature-of the terms in the constraints


                               10

-------
if it is  assumed, that the changes toward the optimum point  are
sufficiently small, then only a small deviation is  introduced.
The elimination procedure takes place by partitioning the vari-
able set into "states" and "decisions."  The state  variables are
the selected variables which are to be eliminated by the T active
constraints.  The decision variables are the remaining  independent
variables which will be employed to seek the minimum value of the
objective function.  The criteria for the partition include  two
aspects:

     1.  All slack variables are taken as decisions unless no
         other x-variable is available to be a state variable.
         Since all ^. are identically equal to zero, when the
         algorithm moves from the old point x° to the new one
         xv in its search for the minimum there is  a 50 percent
         chance that the tj>t will become negative.   This is a
         violation of the problem constraints; and
     2.  Since the same basic reasoning applies to  the x-vari-
         ables, the largest absolute valued variables are best
         suited to be state variables.

In the computer code of the algorithm described in  Appendix  B,
the selection of states and decisions is undertaken in a much
more complex procedure to insure numerical stability.

     After partitioning the x-vector into state and decision
variables, the variables can be relabeled s for states and d
for decisions.  Equation 1 at the initial point x°  can then  be
written,

     y = min y(s ,s ,. . .,sT,d ,d , . . . ,dD)	(4)

in which D is the number of decision variables and  equals
(N - T).  In addition, the constraints listed in Eq. 3 can be
rewritten as:

     f (s_,d) - £ = 0 	(5)

The next step is to employ the chain rule of calculating the
total differential of y.  In vector notation,

     9y =  (V v) Ss 4-  (V,y)3d	 . (6)
            g    	     Q   	

where the symbol 3y is used to denote the total differential
rather than the standard notation of dy.  This modification  is
made so that .the d can be reserved to denote the decision
variables.

     The derivatives of the constraining functions  can also  be
written in vector form,

     (V f)3s + (V,f) 3d -9cj> = 0 	(7)
       s—  —     d—  —   """~

                               11

-------
where the gradient,  (V f ) , is called the Jacobian Matrix, J,
and the matrix  (Vdf) can be relabeled as C.  Employing these
variables in Eq.7 and rearranging terms:

     J3s_ = -C3d + 3  ........................................ (8)

The vector 3s_ can be solved for if the Jacobian matrix is always
taken non-singular:

     3s = - J~ l C 3d + J~ ' 3^ .................................. ( 9 )

     The elimination of the states is now possible by sub-
stitution of Eq. 9 into Eq. 6.  After rearranging terms, the
final unconstrained equation is developed:

     3y -  v,y  - (V vJJ^el 3d +  (V vJJ^ScJ)  ............... (10)
                         —
             ,
            Q.      o     — 1        S

Kuhn-Tucker Conditions —

     By definition of the total differential, another expression
can be written in terms of the variables indicated in Eq . 10.
If the elimination of the state differentials were accomplished
then the total differential of y would be written:

     SY = M  3d + || 34, .................................. (11)

in which 6y/6d and 6y/64> are called "constrained derivatives."
The deviation in notation is made to distinguish the 3y/3x,
which is a partial derivative viewing all variables as inde-
pendent, from 6y/6d which is a partial derivative considering T
of the variables as functions of the remaining N variables.
By comparing Eqs . 10 and 11 it can be seen that,
     M = V -
and,
The solution of Eqs. 12 and 13 when equated to zero yield a
stationary point when the decision variables are free, or in
other words, allowed to assume any positive or negative value.
In most instances, decision variables are not free, but subject
to non-negativity conditions.  Stationary points may be local
or global minimums, maximums, or inflection points.  The evalu-
ation of stationary points in these cases will depend on
criteria reported by Kuhn and Tucker  (1951) which provide neces-
sary and sufficient conditions for a minimum.  in the problem
solution at the feasible point under examination, a minimum
exists if the following conditions are met:
                              12

-------
     1.  Necessary conditions prerequisite  for  a minimum must
         consist of the following:

             >_ 0, d. £ 0, and  &  d. =  0,j  =  1,2,...,D ..(14)
           D       J             j  3
         and
                               6y
         -Ft  > 0,  0, and  ^±  $. =  0,  t =  1,2,...,T  ...(15)
         0 (p  —      "C. —         0 (p    "t

     2.  If Eqs. 14 and 15 are satisfied, then  sufficient
         conditions for a minimum are:

            > 0 j = 1,2,...,D  	(16)
           '3
         and

         — > 0 t = 1 2     T                                (17)
         6cf>t  U r   i,^,...,i  	U/J

The minimum has been reached when both the  necessary and
sufficient conditions have been satisfied.  However, if for
example, 8y/6dj equals zero and dj > 0,  the tests are incon-
clusive since the sufficient conditTons  have not been met.  In
this case, it is necessary to take the second derivatives of
the objective function with respect  to the  x-vector.  This
analysis yields a square matrix of second order partial deriva-
tives called the Hessian matrix written  mathematically as:

     H = V2 y 	(18)

In order for the stationary point to be  a minimum (local or
global) the value of the Hessian matrix  must be positive-
definite, and since the properties of positive-definite matrices
can be found in most texts on linear algebra, no further
description will be given here.

Evaluation of Optimal Direction —

     In addition to the description  of the  fundamental elim-
ination technique of this optimizing technique, the preceding
sections also provided the definition of the constrained de-
rivatives of the objective function  in terms of the decision
and slack variables.  Furthermore, criteria were given with
which these parameters can also be evaluated to see when the
minimum is achieved.  In this section, these same derivatives
will be used to determine the direction  a particular decision
variable, dp orcf>p, must be "moved" in order to create the
maximum reduction in the value of the objective function during
each iterative step.  Among the nonlinear programming tech-
niques for optimization, several essentially alter all of the
decision variables at each iteration.  In the Jacobian


                             13

-------
Differential Algorithm, one decision variable  (dp or p) is
selected from among the set which when moved will result in the
most progress toward the minimum.  If an individual term from
Eq. 11 is written in discrete element form, the new value of the
decision variable (or slack variable) can be determined,
or,
 V    O
y  - y  =
                         V
                                                             (19)
                                                             (20)
where the reader is reminded that the superscripts   and   refer
to the functional evaluations made at the old and new feasible
solutions.  It may also be worth mentioning that 4>p can only
be increased, whereas dp can be also decreased (assuming the
non-negativity constraints are not violated).   As a result, the
increase in a slack variable is in reality a loosening of an
active constraint.

     The choice of the decision variable or the slack variable
to be modified is primarily made on the basis of largest
absolute value among the respective constrained derivatives.
Three general categories are examined.  To begin with, the
largest positive valued derivative with which the associated
decision variable is greater than zero is determined and the
Kuhn-Tucker conditions are checked according to the previous
section.  Mathematically, this first alternative can be written,
     find: max
           TSy
           L6di
> 0
0,  i = 1,2, . . . ,D
(21;
where the notation
being positive."
               d.:  > 0 means "subject to the value of
     The second alternative selection for the step direction
is in the negative constrained derivatives.  In this case, the
specific decision variable will be increased and unless an
upper bound on the variable is imposed, no examination of the
decision need be made.  Symbolically then,
     find: min
      i = 1,2,.
                                         D
                                                        (22)
     Finally, the largest reduction in the objective function
may be facilitated by loosening a particular active constraint.
Unless the constrained derivative of y with respect to the
slack variable is negative, the Kuhn-Tucker conditions are
satisfied.  Therefore, this solution can be expressed as:
                              14

-------
     find: min
        0,  t = 1,2,.
                      (23)
     Once these maximums and minimums have been selected, the
next item is to compare them with each other and select the
largest absolute valued one.  After having made the choice, the
index on the specified decision or slack variable is now denoted
by a "p" , and these variables now become dp or cj>p depending on
the decision among alternatives.

Determining the Step Size --

     Because the particular decision variable or slack variable
to be modified has been selected, the remaining decisions and
slacks will remain constant and can therefore be temporarily
ignored.  The next computation necessary is to determine which
of the boundaries of the problem are approached first.  If the
non-negativity constraints on the variables are in effect, one
consideration is how far a decision or slack variable can be
moved without forcing a state variable to become negative.  In
order to accomplish this, the constrained derivatives of each
state variable with respect to the particular decision or
slack variable are computed using  Cramer's  rule on the matrix
of systsm derivatives. From these values, the maximum move may
be computed.  Writing the appropriate relationships in discrete
form,
                 V   j O
                   "~" Cl
                                                             (24)
or for the slack variables:
        v
         ~ si
                             v
                                             (25)
Three cases exist in which a state variable can be driven to
zero, namely a decrease in dp,  an increase in dp, and an
increase  (or loosening) in p.  Since a search is necessary
among the state variables to see which specific state goes to
zero first, Eqs. 24 and 25 can be incorporated:
     Case 1.  Decreasing dT
     d  = max
d
                       s.
> 0
(26)
                               15

-------
     Case 2.  Increasing dr
       v
         = min
0
d° Si
P /6si\°
(fid )
L \ P/
6si < o
6d




                                     (27)
     Case 3.  Increasing (j> .

                      s.
                       i
       v
         = min
6si < 0
                                     (28)
     The next possible limitation on the change in the decision
or slack variables is the forcing of a previously inactive
constraint into an active role in the problem.  In order to
facilitate this analysis, the constrained derivatives of the
loose slack variables is computed.  Again, three conditions
must be considered:

     Case 1.  Decreasing d^
v
d = max



t^+\°
d °- *£
P / *f+\°
I £ \
L \~HJ
5f+
6f£
fid

                                      > 0
                                     (29)
     Case 2.  Increasing dr
     d v= min
      P
                         Sf,
                   < 0
                              (30)
     Case 3.  Increasing
           mm
6f~,
             6f,
           <  0
                                                             (31)
     A final limitation which should be noted is when a decrease
in dp is to be made and neither condition above is violated
before non-negativity is encountered.  In such a case, the
maximum decrease would be - dp assuming the non-negativity
conditions hold.  Once this and the other values of dp and _
have been made, the most limiting case is evaluated.
                               16

-------
     If by varying a slack or decision variable a state is
driven to zero, a decision variable must be selected to trade
positions with the state to avoid zero valued state variables.
In addition, when a loose constraint is tightened, a new state
variable must be selected from the rest of the decision variables,
The exception to this is when a loose constraint is tightened by
loosening a currently active constraint.

APPLICATION TO REGIONAL SALINITY PROBLEMS

     On a basin-wide scale, a salinity problem is the combined
effect of many irrigated areas, saline springs, diffuse natural
inflows, and other miscellaneous sources.  These salinity sources
not only occur sequentially due to the geographic structure of
an hydrologic area, but are also often governed by differing
administrative formulas.  Consequently, the problem of deter-
mining an "optimal" strategy for a large area like the river
basin rapidly becomes too large and too complex for direct
analysis.  One of the various mathematical techniques for
optimizing complicated systems is to decompose the problem into •
a series of subproblems whose solutions are coordinated in a
manner that produces the solution to the larger problem.  One
method applied to analysis of water quality improvements in the
Utah Lake Drainage basin of central Utah provides both a simple
and effective decomposition  (Walker, et al. 1973).  The structure
of the decomposition methodology referred to above is shown
schematically in Figure 1.  Individual levels of modeling are
delineated to define water quality cost-effectiveness analyses
at different stages of development enroute to a single repre-
sentation at the ultimate basin-wide scale.

Conceptual Salinity Control Model

     The conceptual model illustrated in Figure 1 represents an
additive approach for determining the minimal cost salinity
control strategy in a river basin.  A number of levels or
subdivisions having similar characteristics can be defined to
correspond to various levels of hydrologic or administrative
boundaries in a region.  Within each level, the alternative
measures for salinity management are characterized by cost-
effectiveness relationships.  A more detailed review of the
structure of cost-effectiveness functions and their inter-
dependence will assist the reader in understanding the appli-
cation of the conceptual model in later sections.

Description of Cost-Effectiveness Functions --

     The alternatives for managing salinty on a basin-wide
scale fall into two categories:   (1) those that reduce salinity
concentrations by dilution or minimizing the loss of pure water
from the system by evaporation; and  (2) those that improve
water quality by reducing the mass emission of salt.


                               17

-------
                                     Cost
                       Cost of achieving desired
                       salinity  control at
                       level   4
                                               LEVEL 4 SALINITY CONTROL
                                               COST-EFFECTIVENESS FUNCTION
H
oo
                    Cost
Optimal level 3
Costs from level 4
                ALTERNATIVE I, LEVEL 3
                COST-EFFCTIVENESS
                FUNCTION
                                                                              : Optimal investment in
                                                                              I alternative 2 at level 3
                                                                              ] Optimal investment in
                                                                               alternative I at level 3
                                                                    Desired salinity control
                                                                     at level 4
                                                                           Cost
                                                         /ALTERNATIVE 2,
                                                          LEVEL 3 COST-
                                                          EFFECTIVENESS
                                                          FUNCTION
                                               . I, level 2 investments

                                             alt. 2, level 2 investments
                                     Effectiveness
                                                                                                        Effectiveness
     Cost
  ALTERNATIVE 1, LEVEL 2.
  COST-EFFECTIVENESS
  FUNCTION
Cost
ALTERNATIVE 2 LEVEL2
COST-EFFECTIVENESS
FUNCTION
                '  level i
                  costs
Cost
ALTERNATIVE 3 LEVEL 2.
COST- EFFECTIVENESS,
FUNCTION
Cost
                                                                                     / level I
                                                                                       costs
ALTERNATIVE 4 LEVEL \
COST-EFFECTIVENESS
FUNCTION
                                                                                                                                   level I
   Optimal level 2
   Cost  from level 3
                  Effectiveness
                            Optimal level 2
                            Cost from level 3
                                            Effectiveness
                                            Effectiveness
                                                                                                             Effectiveness
         Figure  1.    Conceptual  decomposition  model  of  a  regional  or basin  salinity
                          control  strategy.

-------
Examples of the first category include weather modification to
enhance stream flow, evaporation suppression, and phreatophyte
control.  Many of these approaches are more costly and difficult
to apply than is justified by the salinity control achieved and
are therefore not considered in this work.  In the second cate<-
gory, such measures as saline flow collection and treatment,
reduction in agricultural return flows, and land use regulation
can be used to reduce the volume of salinity entering receiving
waters.  In this report, only saline flow collection and treat-
ment and irrigation return flow management are evaluated.
Under these assumptions, salinity control becomes a mutually
exclusive problem that allows addition of individual solutions
to derive larger solutions.  By letting the spatial scale of
the problem correspond to successive layering or additions,
the multilevel approach is congruent to the subbasin breakdown
of major hydrologic areas.

     The smallest spatial scale considered in this analysis is
that of a subbasin containing an irrigated valley or stream
segment delineated by inflow-outflow data.  In a major river
basin, a number of river systems may combine to form the basin
itself so there are actually three subdivisions in a river basin.
Thus, vertical integration of subbasins yields river subsystems
and integration of river subsystems yield the aggregate river
basin.  In this analysis the river basin, river subsystem, and
subbasin divisions have been designated as levels 4, 3, and 2,
respectively.  Level 1 will also encompass the subbasin scale
as will be described shortly,

     Associated with each, level of the model are cost-
effectiveness functions describing each alternative for
controlling salinity.  The structure of the cost^effectiveness
functions includes two parts.  The first is the function itself.
In order to compare the respective feasibility among various
salinity control measures at each level, the mathematical
description of each alternative must be in the same format.
Since this study involves evaluating the minimal cost strategy
for reducing salt loading, each salinity control measure's
feasibility for being included in the eventual strategy is based
on the relationship between the costs of improvement and the
resulting reduction in salt loading.  The second part of the
cost-effectiveness functions is what might be called a "policy
space".  To appreciate this aspect of the model it is probably
necessary to first discuss the determination of the optimal
basin-wide strategy.

Evaluating the Optimal Strategy—

     Suppose the optimal policy for controlling salinity in a
river basin had been determined with a minimum cost decision
criterion.  Such an analysis would provide two pieces of
information.  First, it would detail the cost associated with a


                               19

-------
range of reductions in salinity, and second, it would delineate
how much of these costs are to be expended in each river sub-
system.  In other words, the evaluation of the optimal strategy
at level 4 involves systematic comparisons of level 3 cost-
effectiveness functions and once the strategy had been deter-
mined, it also yields the optimal costs or expenditures in each
level 3 alternative (river subsystem) .   In a similar vein, the
level 2 costs and policies are determined from a knowledge of
the level 3 optimal as determined during the level 4 analysis,
and so on.  Thus, the cost-effectiveness function for any
alternative within a level is:

      1.  the result of optimization of respective cost-
          effectiveness functions at a lower level and
          therefore a minimum cost relationship at every
          point; and
      2.  the sum of costs from optimal investments into each
          alternative at a lower level.  The "policy space"
          is therefore a delineation of lower level cost-
          effectiveness function.

     The preceding paragraphs noted the detailing of salinity
control strategy once the optimal is known.   Determining the
basin optimal, on the other hand, begins at level 1.  A com-
parison of level .1 cost-effectiveness functions describing
each alternative at that level produces the array of level 2
functions.  Similar steps yield each succeeding level's
optimal program.  Thus, the multilevel approach described herein
involves a vertical integration up through the levels to deter-
mine the optimal policy and a backwards trace to delineate its
components .

Mathematical Salinity Control Model

     Consider a single salinity control measure within a sub-
basin such that its cost-effectiveness characteristic can be
written:

     Y  = f (*>   ........................................... (32)
in which,
         = total cost attributable to the ith control measure
           at the first level of optimization; and
         = annual salt loading decrease associated with an
           expenditure of yJ dollars on the ith salinity control
           measure
Superscripts will refer to model level whereas subscripts will
designate alternatives.  It is assumed that the relationship
between y{ and x| can be determined and that the total potential
reduction in salt loading for the ith measure at level 1 is X1
                                                             i
                              20

-------
     The optimal salinity  control  strategy  in a  subbasin is the
minimum cost array of  individual measures  (y^) which achieve
the desired degree of  salinity  control.  The  optimum may be
determined as:
              n
     y2. = min I    y^  	(33)


subject to,

     x} < X! ; i - l,2,...,n  	(34)
      j_ ___.  j_

     I   x| = x2 	(35)


where,

     x2.  =  salt load  reductions targeted for the  jth subbasin
      3     at the second  level;
     y2  =  minimum  cost of reducing  x2  tons  of  salt from the
      3     subbasin;  and              -'
     n   =  number of  individual salinity control  measures per
            subbasin.

If Eqs.  33, 34, and 35  are  solved repeatedly for  values of x2
ranging up to the maximum  value attainable  in the  subbasin,-'
xl, then a cost-effectiveness relationship  between y2 and x2,
can be determined:                                   -'      ^

     y2. =  f (x2)  	(36)
      D      D
Similar analysis for all other  subbasins yields  a  family of
second level cost-effectiveness functions.

     For each river  subsytem, the  preceding analysis is repeated
to determine a family  of cost-effectiveness curves for level 3.
Specifically,
               m
     y£ = min  E   y2 	<	,(37)


subject to,

     x2 < X2  ; j = l,2,...,m  	(38)
      D —  D

     E    x2 = X*  	(39)
     j=l   D    k

in which,
                               21

-------
     x3  =  total annual salt load reduction for the kth  river
            subsystem  (level 3);
     y3  =  total costs of reducing xj| tons of salt from  the
            subsystem; and
     m   =  number of subbasins per river subsystem.

Again, solution of the subsystem analysis for the range of
possible salt reductions, 0 <_ X]3, <_ x£, yields the relationship:

     y£ = f (x£)  	(40)

     At the final level, level 4, corresponding to the solution
of the salinity control strategy at the river basin scale,

               £
     Y=  min  I    y3  	(41)
               k=l   K

subject to,

     x^ 1 XjJ. ;  k=l,2,..., £	(42)

     £
     S   x3 = X   	(43)
     k=l  k    T
where,

     XT  =  total annual reduction in salt load expected  in  the
            basin;
     Y   =  total costs in achieving a XT reduction; and
     £   =  number of river subsystems in the basin.

By varying X™ over its possible range and obtaining the basin-
wide cost-effectiveness relationship,

     Y = f (XT)  	(44)

planners and regulatory agencies have information they can
utilize in deciding what degree of salinity control to implement,
where to implement it, and what measures to employ.
                              22

-------
                           SECTION 5

          SIMULATION OF DESALTING COST-EFFECTIVENESS
INTRODUCTION

     The development of desalination technology in the United
States has been guided by the basic objective outlined by
Congress to the U. S. Department of the Interior's Office of
Saline Water  (now combined with the Office of Water Resources
Research to form a single department entitled, "Office of
Water Research and Technology").  This objective is:

     "to provide for the development of practicable
     low-cost means for producing from sea water or
     from other saline waters (brackish and other
     mineralized or chemically charged waters), water
     of a quality suitable for agriculture, industrial,
     municipal, and other beneficial consumptive uses."

     The objective of desalination as listed above has been
given a massive research and development effort although the
application to large scale systems is only now beginning to
occur.  The traditional scope of saline water conversion
programs has been to reclaim otherwise unsuitable waters for
specific needs.  However, this scope has dealt almost exclusively
with utilization of product water directly rather than returning
it to receiving waters in order to improve the overall resource
quality.  Thus, with mounting concerns for managing salinity on
a regional or basin-wide scale,  the potential for applying
desalination within the framework of an overall salinity control
strategy is an interesting one.   In fact, the use of desalting
systems to resolve critical salinity problems is already being
planned as part of the Colorado River International Salinity
Control Project agreement between the United States and the
Republic of Mexico (U. S. Department of the Interior, 1973).

     In the context of regional salinity control, desalting
costs can be expressed in dollars per unit volume of salt
extracted in the brine discharge rather than the conventional
index of costs per unit volume of reclaimed product water.  In
this manner the respective feasibility of desalination and
other alternatives for salinity management can be systematically
compared during the processes of developing strategies for


                              23

-------
actual implemenatation of salinity controls.  A desalting  system
as used herein consists of facilities for supplying raw water
(water to be desalted) to the plant, the desalting plant itself,
and facilities to convey and dispose of the brine.  Transpor-
tation of product water beyond the confines of this system is
not considered.

     The cost simulations described in this section are intended
to represent the "reconnaissance level" sensitivity to cost
estimating input parameters and are not, therefore, inclusive
of the many factors necessary for detailed "definite plan"  level
estimates.  For example, internal design optimization, alter-
native equipment from various manufactures, and many climatic,
environmental, or topographic conditions are not included.  At
this level of sophistication, two major references have been
written from which the bulk of information necessary for
desalting cost simulation have been abstracted.  Prehn, et  al,
(1970) summarized a desalting cost calculation procedure for
several desalting methods and related facilities.  This work
was subsequently improved and expanded by the Bureau of Reclama-
tion  (U. S. Department of the Interior, 1972).  These costing
procedures were first mathematically simulated and then program-
med for a digital computer (Appendix B), and include the follow-
ing seven processing systems:

      (1)  multi-stage flash distillation (MSF);
      (2)  vertical tube evaporation - multi-stage flash
          distillation  (VTE-MSF);
      (3)  vapor compression - vertical tube evaporation -
          multi-stage flash distillation (VC-VTE-MSF);
      (4)  electrodialysis (ED);
      (5)  reverse osmosis (RO);
      (6)  vacuum freezing - vapor compression (VF-VC); and
      (7)  ion exchange  (IX).

     The computer code simulation of the desalting costs for the
seven processes is the end result of the desalination cost
analysis described in this section and is hereafter denoted as
the desalting submodel.

DESALINATION COST ANALYSIS

     In general, the costs associated with desalting systems
may be classified as either  those expended during construction
or those required annually to operate and maintain the facilities,
These costs are subject to inflational pressures and must
therefore be periodically updated.  Once costs are current,
various relationships between the costs and system performance
can be formulated.  A detailed description of the costing
models will be presented in a later section.
                               24

-------
Capital Costs

     Construction costs,capital costs, or investment costs
include all expenses associated with building the appropriate
facilities and can be subdivided into the following eight
categories:

     (1)  Construction  costs, including designs and specifi-
          cations, labor, and materials;
     (2)  Steam generation equipment if utilized in the desalt-
          ing process;
     (3)  Site development expenses for offices, shops,
          laboratories, storage rooms, etc., and for the
          improvement of the surrounding landscape such as
          parking, grading, and fencing;
     (4)  Interest during construction on funds borrowed to
          finance  construction;
     (5)  Start-up costs necessary to test the plant operation,
          train operating personnel, and establish operating
          criteria;
     (6)  Owner's general expenses for indirect costs like
          project investigation, land acquisition, contract
          negotiation and administration, and other miscel-
          laneous overhead costs;
     (7)  Land costs for the site and conveyance facilities;
          and
     (8)  Working capital to cover daily expenses involved in
          plant operation.

     The capital costs  delineated above are based on estimating
functions current during mid-1971 and therefore must be updated
to prevailing price levels.  The costs for construction, steam
supply, and general site development can be estimated in the
present time frame by employing the Engineering News Record
Construction Cost Index, ENR (Engineering News Record is
published monthly by McGraw-Hill, Inc.).  In July of 1971 the
ENR index was 952, whereas in January 1976 it had risen to
1354.  Consequently, a  early 1976 cost estimate would be 1354/
952 or 1.42 times the 1971 functional estimate.   Other capital
costs for interest during construction,  owners'  general
expense, start-up, and working capital are functions of con-
struction, steam, and site development costs and are therefore
updated automatically.  Land costs may be estimated on a current
basis by utilizing existing land prices.

     Estimates of capital costs for feedwater and brine facili-
ties require several other inflational factors.   For example,
conveyance pipeline costs are modified by the Bureau of Reclama-
tion Concrete Pipeline Cost Index, CPI (1.17 for July 1971 and
2.13 in January 1976) , and the USER Canal and Earthwork Cost
Index,  El (1.27 in July 1971 and 1.92 in January 1976).
                              25

-------
     The annualization of the construction costs is divided
according to whether or not the costs represent depreciating
capital.  Depreciating capital costs (item 1-6 above) are
multiplied by a "fixed charge factor,"  FCR, which is the
percentage of total depreciating capital cost that is en-
compassed by interest, amortization, insurance, and taxes.
Non-depreciating capital costs (7 and 8) are multiplied by the
prevailing interest rate selected for project evaluation or
incurred in borrowing.

Annual Costs

     Annual operation and maintenance costs have been divided
into six categories described as:

     (1)  Labor and materials for plant or support facility
          operation;
     (2)  Chemicals for pretreatment and process additions;
     (3)  Fuel to power steam generation equipment;
     (4)  Electricity for pumps,  filters, etc.;
     (5)  Steam generator operation (O)  and maintenance (M) ;
          and
     (6)  Replacement of process elements.

     These annual costs must also be updated for price increases
due to inflation.  Labor and materials  and steam generation
O & M are updated using the Bureau of Labor Statistics Labor
Cost Index, SIC 494-7, which was 3.76 in July 1971 and 4.93 in
January 1976.  Chemical costs are multiplied by the present
to 1971 ratio of the Bureau of Labor Statistics cost index for
chemicals and allied products (181 for  1976/104.4 for 1971).
Fuel and electricity costs are estimated using present prices
for these inputs and are therefore always estimated currently.
Replacement costs are expressed on functions of plant capacity
and are also not updated by cost indexing.

Water and Salt Costs

     After describing the individual costs associated with
desalting systems, it is generally necessary to express such
costs in either dollars per unit volume of product water
(for water supply feasibility) or dollars per unit of salt
extracted (for salinity control studies).  These cost bases
are determined in this study by dividing the total annual
costs by the annual volume of product water or brine salts.

     Depreciating capital costs for the plant itself and the
feedwater-brine disposal systems are multiplied by the fixed
charge factor.  Non-depreciating costs  are next multiplied by
the interest rate, added to the annualized depreciating costs,
and finally summed with the remaining annual cost.  Thus, using
the eight capital cost categories and six annual cost elements,

                              26

-------
                 6             8        14
            FCR  E  C'.    +1  EC'.+   EC1.
     „                i      r     i         i
      pw =      i=l	i=7	i=9     	(45)
                 C x Uf x 3.65xlO~4

                6          8        14
           FCR  EC'.+IEC'.+   EC'.
     p  =           i    r     i         i
      s        i=l        i=7       i=9     	(46)
                  _   _
                                    -4
             C,  x C,   x Uf x 3.65x10
in which,
     C    =  unit cost of product water, $/m3;
     C    =  unit cost of brine salts, $/metric ton;
      S
     C!   =  total annual cost for element i, $/year
             (feedwater + plant + brine) (C4 = construction
             cost, C'g = steam generation, C ' -, = site
                     «j                       ~J
             development, C', = interest during construction,
             C'c = start-up costs, C ' fi owner's general expense,
             C'7 = land, C'g = working capital, C'  = labor
             and materials, C ' -, „ = chemicals, C ' -, , = fuel,
             C'12 = electrical, C'-,, = steam generation 0 & M,
             and, C1,, = replacement.)
     C    =  product water volume, m3/day;
     C,   =  brine volume, m3/day;
      b
     C,   =  TDS concentration in brine, mg/£;
      bo
     FCR  =  fixed charge rate;
     I    =  interest rate; and
     U    =  use factor - fraction of total time in actual
             operation.
     The results from the desalting cost model indicate that unit
costs as described in Eqs. 45 and 46 for either water or  salt
production are highly affected by plant capacity  (scale effects) .
For example, a hypothetical reverse osmosis system desalting
feedwater at 4000 mg/£ to produce product water at 500 mg/£
would have cost characteristics as illustrated in Figure  2.
These data are based on feedwater wells approximately one kilo-
meter from the plant site and brine injection wells at the site.
Interest, fuel, and electrical costs are those used by U. S.
Department of the Interior  (1972) .
                               27

-------
  200
   50
c
o
«*

_- 100

o
o

CT
C
O
W
0)

Q
   50
     0
                   20      40       60      80      100

                      Plant Capacity, in Thousands of mVday
                                                              .90
                                                        80
                                                        .70
                                                              60
                                                                 K>

                                                                  E
                                                                 v.

                                                                 *»


                                                              50 ^

                                                                  o
                                                                 o



                                                              .40 |

                                                                  o
                                                                  OT
                                                                  0>
                                                                 O



                                                              .30
                                                        .20
                                                        .10
120
Figure 2.
      Desalting cost function  for an RO system having

      feedwater at 4000 mg/£ and product water at

      500 mg/£.
                          28

-------
PROCESS DESCRIPTION

     Saline water conversion processess involve the use of a
semi-permeable barrier, which exclude either water or salt flow.
The barrier may be a membrane which excludes salt such as RO,
one which excludes water such as ED, or one that exchanges salt
for hydrogen and hydroxide ions which unite to produce water
(IX).  The barrier may also be a "phase boundary" which excludes
the salts.  For example, vaporization of water using MSF, VTE-
MSF and VC-VTE-MSF leaves the salts in the remaining solution
as does solidification of water using VF-VC processes (Probstein,
1973).  The driving potential for each of these processes is
either heat  (distillation and freezing), pressure (RO), electri-
cal  (ED), or chemical  (IX).

     Each desalination process has specific advantages depending
on such factors as feedwater chemistry and desired product water.
A general review of these factors along with a description of
the costing model for each technology will be given in this
section.  However, much of the intrinsic detail regarding
operation characteristics or design requirements will be left
to the interested reader to determine from available technical
literature.

     In most cases, a desalting system can be divided into
feedwater, desalting, and brine disposal facilities.  These three
subsystems are integrated as shown schematically in Figure 3.
Pre-and Post-treatment are considered part of the desalting
plant facility.

Multi-stage Flash Distillation

     In 1973 about 95% of the daily desalting capacity in the
world was being accomplished by distillation (Probstein, 1973).
Basically, distillation involves vaporizing a portion of the
feedwater leaving the salts in a more concentrated environment
of the remaining water  (brine).  Then the pure water vapor is
condensed and removed as product water.  A schematic view of
this process is shown in Figure 4 for a staged system (U. S.
Department of the Interior, 1972).  In the MSF process, entering
feedwater is heated under a pressure  (>_50 psi) to a temperature
just under the boiling point and then injected into an expanded
vessel having a reduced pressure.  Part of the water then
"flashes" or rapidly evaporates into steam at the water surfaces.
Energy in the water vapor is then exchanged through a heat
exchange with incoming feedwater to raise its temperature to
the appropriate level.  This process is' repeated in succeeding
stages at successively lower pressures.  The evaporation within
each stage is a function of pressure difference between stages,
stage area, and flow rate.  The MSF process is probably best
applied to conditions where feedwaters are soft  (carbonate


                               29

-------
                         r
filtrate
 and
 gas
                     Feedwater
                    Pretreatment I
                    Desalination

                     Subsystem
         Desalting

         Processes
               feed
brine
              product
                                    Product  Post-
                                      Treatment
      :eedwater Collection

            and

         Conveyance
                    Feedwater

                   Subsystem
                                                       Brine Conveyance
                                                              and
                                                            Disposal
                                                Brine
                                              Subsystem
                                                        product water
Figure 3.  Schematic diagram of a  typical  desalination  system.

-------
                    Product
Figure 4.  Diagram of typical Multi-Stage Flash Distillation systems.

-------
hardness),  comparatively cold in temperature, and having a TDS
range of 10,000-50,000 mg/£.  Product water will be normally in
the range of 5-50 mg/£.

     The variety of waters that might be desalted by any system
includes sea water, brackish and saline groundwater, and brackish
surface waters including irrigation return flows.  Many of these
waters contain substances deleterious to desalting plant oper-
ation.  Dissolved gases and organic materials are usually con-
trolled by deaeration and ultrafiltration.  However, one of the
principle problems in desalination systems is the potential for
scaling due to high concentrations of calcium.  As a general  rule,
waters having calcium concentrations above 600 mg/£ should be
pretreated (such as the injection of a polyphosphate).  In this
study, it is assumed that sodium hexametaphosphate is utilized
in all cases and that by so doing, the allowable calcium con-
centration in the feedwater in 900 mg/£.  The total dissolved
solids  concentration  is also limited to 60,000 mg/£.  Thus,  the
ratio of brine to product is defined as (U. S. Department of the
Interior, 1973):
     BPR = max
                1-50/TDS.
                         TDS.  - 50
                   i        i
                     or  	
                900
                Cai
               -1
                         60,000-TDS.
                                                             (47)
in which,
     BPR   =  brine to product ratio;
     TDS.  =  TDS in feedwater, mg/£; and
           =  calcium concentration in feedwater, mg/£.
Cai
The volume of brine may therefore be written:
        = C  x BPR
           P
                                                       (48)
      w
        = C
     Multi-stage flash distillation processes, as well as other
distillation processes, require cooling of product (and possibly
brine) discharges.  This may be accomplished by direct exchange
with cooling water or through the use of a  cooling  tower.   The
volume of cooling water (C , m3/day) is determined from;

                          (cooling tower)  	(49)

          .  	   	,  (no cooling tower) 	(50)

The total system intake (C^, m3/day) can be written:

     C. = C  (1.2 + BPR),  (cooling towers)  	(5!\
      ip                                           • • • • • \   /
     C. = C  + Cb + Cw, (no cooling towers) 	(52)
     Cw =
        (4.2 - BPR)

        (2.5 - BPR)
                               32

-------
     A mathematical simulation of the largely graphical pro-
cedures outlined by the U. S. Department of the Interior  (1972)
is summarized for a MSF desalting plant  (including pretreatment
and post-treatment) in Table 1.  In estimating capital costs for
construction, steam, site development, and land, the functions
are based on product water capacity, C .  The same is true for
annual expenditures for labor and materials, chemicals, fuel,
steam, and electricity.  Interest during construction is deter-
mined by multiplying an estimate of construction time by one-
half of the interest rate and applying this result to the sum
of capital costs for construction, steam and site development.
Start-up costs are assumed to be equal to one month of the sum
of annual costs, whereas working capital is assumed to be twice
the start-up costs.  Costs for "owner's general expenses" are
based on the level of investment in construction, steam facili-
ties, and site development.

     It should be noted that the equations in Table 1 are
expressed in terms of English units in order to be congruent
with the procedures in the source.  Since this work is presented
in metric units, the interested users of these models should
multiply product water capacity expressed in m3/day by 2.6417 x
10  "* to convert to million gallons per day (mgd) .  In addition,
land prices in $ million/ha need to be multiplied by 0.4047 to
get $ million/acre? fuel rates in $/million joules (MJoules)
need to be multiplied by 9.4787 x 10 ~* to get $/million BTU's
(MBTU) and electrical rates in $/MJoules need to be multiplied
by 2.7778 x 1Q ~"* to get $/1000 kilowatt-hours (kwh) .

Vertical Tube Evaporation - MSF

     Another distillation process designed to maximize heat
transfer efficiencies is the vertical tube evaporator (VTE)
which has been by itself an alternative to MSF systems.  However,
hybrid VTE-MSF processes have been shown to improve thermo-
dynamic efficiency, reduce brine pumping costs, and lower
structural costs due to several common elements (U. S. Department
of the Interior, 1972).  Consequently, VTE by itself will not
be included in this costing analysis although it is helpful to
review its operation.

     Like MSF systems, VTE processes make use of the principle
that water will vaporize at a progressively lower temperature
if associated also with progressively lower pressures.  Unlike
the MSF process, vapor produced in any stage is condensed in
the succeeding stage to aid vapor formation therein (Figure 5).
In the VTE-MSF process, feedwater is pumped alternately from
MSF stages to VTE effects.  The desalting system is best applied
to the conditions noted earlier for the MSF process.
                               33

-------
     TABLE  1.   SUMMARY  OF  COST  FUNCTIONS FOR AN MSF

                   DESALTING PLANT
     Cost Description
                                          Cost  Function
                                                                        Remarks
CAPITAL COSTS,  $ MILLION



1 Construction  Costs,  C,
2 Steam Facilities, C2



3 Site Development Costs, C,



4 Interest  During Constr., C,



5 Start-up  Costs, C_



6 Owners" General Expense, C,



7 Land Costs, C?



8 Working Capital, CD
ANNUAL COSTS,  $  THOUSANDS



9 Labor Materials,  CQ
10 Chemicals, C



 1 Fuel,  CI:L



 2 Steam,  C,-
             ,Q
3 Electricity,  C..



4 Replacement,  C, .
                                  C1=(ENR/952.)xl.4R.C  -90456




                                  C1=(ENR/952.)xl.90xC  -83817




                                  C1=(ENR/952.)x2.30xC  -73444




                                  C2=(ENR/952.)x0.23xC  -8015




                                  C3=(ENR/952.)x0.10xC  '6365




                                  C,=15.5xC  '2119x
                                   4       p
                                 C,=0.119(C,+C-+C,)
                                  6        123



                                 C?=L (2.+.2168xC +.377xC




                                 C0=2.0xCr
                                 Cg=(BLS1/3.76)x47.0xC •
                                                          .7756,
                                 Cg=(BLS1/3.76)x60.0xC




                                 CQ=(BLS,/3.76)x81.0xC
                                  91            p



                                 C9=(BLS1/3.76)x95.0xC




                                 Cg=(BLS1/3.76)x95.0xC
                                                      ' 6°14
                                                      -4580
                                                      ' 3042
                                                      -1818
                                  Q= (BLS2/104 . 4 ) x7 . 3xUf xC
                                C12=(BLS1/3.76)x64.0-X '5476xUf




                                C   =(BLS,/3.76)x70.0xX "^xU,
                                12      1             p     f



                                C12=(BLS1/3.76)x78.0=.X >'44898xUf




                                C17=(BLS,/3.76)x80.0xX '
                                1^      1             p
                                c14=  o.o
                                                                     C ^50 mgd
                                                                      C ^40  mgd



                                                                      8
-------
       Feedwater
    (to previous effect)
                                                            next effect)
                                       Brine (to next  effect)
Figure  5.   Illustration of the basic vertical tube evaporation
            effect.
                                 35

-------
     Calculations of various flow rates and limitations  include:

(1) BPR;
     BPR = max
                1-(50/TDS.)     TDS. - 50
or
                900A,   - 1     80,000 - TDS.
                    Cai                     i
                                                             (53)
(2) Cb by Eq. 48;
(3) V

     C  = C  (3.2 - BPR) (no cooling towers) 	(54)

     C  by Eq.  50 (no cooling towers)

(4) Ci by;


     C^ = C  (1.15 + BPR)  (cooling towers)  	(55)

     C. by Eq.  52 (no cooling towers)

     The mathematical cost simulation for VTE-MSF process is
given in Table 2.

Vapor Compression - VTE-MSF

     An alternative to generating the necessary process heat
through steam is to employ another enthalpy principle, i.e. that
as a vapor is compressed, its pressure and temperature increase.
A vapor compressor takes the low temperature water vapor from
the VTE outlets, compresses it to increase the temperature and
then feeds it back into the next MSF stage, thereby replacing
the high temperature steam supply.

     The applicable conditions for the VC-VTE-MSF process are
the same as noted previously except this process favors rela-
tively warm feedwaters.   Hydraulic characteristics for BPR are
determined from Eq. 53.   Brine volume is then calculated using
Eq. 48, and cooling waters by:

     Cw = C  (2.2 - BPR) (cooling towers) 	(56)

     GW = C  (1.5- BPR) (no cooling towers) 	(57)


Total intake rate is computed by:

     Ci = Cp (1'1 + BPR) 	(58)

or for systems not using cooling towers, Eq. 52.

     A summary of the cost simulation is given in Table 3.


                               36

-------
TABLE 2.  SUMMARY OF COST FUNCTIONS FOR VTE-MSF
          DESALTING PLANTS
Cost Description
CAPITAL COSTS, $ MILLION
1 Construction Costs, C,
2 Steam Facilities, C2
3 Site Development, C-,
4 Interest During Constr. , C.
5 Start-up Costs, C.
6 Owners' General Expense, Cg
7 Land Costs, C-
8 Working Capital, CQ
O
ANNUAL COSTS, $ THOUSANDS
9 Labor-Materials, Cg
j
p.0 Chemicals, CIQ
11 Fuel, C1X
12 Steam, C.,

13 Electricity, C13
14 Replacement, C, .
Cost Functions

C1=(ENR/952.xl.5964xC '8287
.74537
1~ ' p
Cf (ENR/952 . ) x2 . 57279xC -64352
C2= (ENR/952. )xQ.23xC -8015
C3=(ENR/952,)x0.40xC '6365
C4=(C1+C2+C3)xlr/24.xl4.0xCp-2389
C6=0.119(C1+C2+C3)°'90
C7=Lp(2.+.2168xCp+.377xCp'7756)
C8=2.0xC5

C9=(BLS1/3.76)x51.xc -60979
C9=(BLS1/3.76)x87.xC -4476
Cg=(BLS1/3.76)xl22.xCp'25874
C9=(BLS1/3.76)xl32.xCp'08392
CIQ= (BLS2/104 . 4) x7 . 3xUf xC
Cll=Fr 445-3xXp xuf
C12=(BLS1/3.76)x64.xX '5476xUf
C12=(BLS1/3.76)x70.xXp°-5xUf
C12= (BLS.j^/3. 76) x78 . xx •44898xUf
949
C — E X3 65XC xu
c14=o.o
Remarks

C >25 mgd
9<.C <.25
C <9
p-






C >25 mgd
7iC <25
P
1.5
-------
 TABLE  3.    SUMMARY  OF  COST  FUNCTIONS FOR  VC-VTE-MSF

                DESALTING PLANTS
         Cost  Description
                                            Cost Functions
                                                                         Remarks
 CAPITAL COSTS,  $ MILLION



 1 Construction  Costs, C.
 2 Steam Facilities, C~



 3 Site Development, C3



 4 Interest During Constr.,  C.



 5 Start-up Costs, C5



 6 Owners'  General Expense,  C,



 7 Land Costs, C,



 8 Working  Capital, Cg
 ANNUAL COSTS,  S THOUSANDS



 9 Labor-Materials, C.
10 Chemicals, C
              ,Q
11 Fuel,  C
          I:L
12 Steam, C
           12
13 Electricity, C



14 Replacement, C
                13
                ,.
                                                      ' 7451
                                                      -64706
                                                      -51961
 C1=(ENR/952.)x2.71xc



 C.=(ENR/952.)x2.88xc



 Cj=(ENR/952.)x2.88xC



 c2 = o.o



 C =(ENR/952.JxQ.lxC '6535



 C4=(C,+C2)xIr/24.x(17.368+1.263XC )
                                 C6=.119(C1+C2+C3
                                                  °-9
                                  :.,=0.8xL +0.2133xL xC
                                  7      p         p p
                                                      -83077
 Cg=(BLS1/3.76)x46.xc



 Cg= (BLSj^/3.76) xSO.xc



 C9=(BLS1/3.76)xlll.xc



 C0=(BLS1/3.76)xl22.xC
  91             p


 CQ={BLSn/3.76)xl22.xC
  91             p


CIQ=(BLS2/104.4)xufx7.3x0



C,-,=F  x!51,475xc xU
 11 r         p  f


c12=o.o



c13=o.o



c14=o.o
                                                      -6713
                                                       .4797

                                                      >

                                                       .36364
                                                       -2797
C >2 mgd



130 mgd


                                                                        eic^ao
                                                                        KC  <2
                                                                         - p-
                                                                         P-
                                    38

-------
Vacuum Freezing - Vapor Compression

     A second basic desalting approach  involving a phase change
to separate salt and water is freezing.  This process operates
on the principle that saline water at the  freezing point will
simultaneously form pure water vapor and salt-free ice crystals.
The ice crystals are then collected and melted by compressing
the water vapor to a slightly higher pressure and temperature
 (U. S. Department of the Interior, 1972).

     Although the prototype VF-VC systems  are still  small and
some of the important technology remains to be completely
developed, the process has a number of  advantages over the
previously discussed distillation processes.  For instance, the
VF-VC system operates at lower temperatures which minimizes
corrosion and scaling and the heat transfer requirements are
much lower.  A schematic diagram of the VF-VC process is shown
in Figure 6.

     After a pretreatment step including deaeration  and filtra-
tion, feedwater flow is divided and passed through two heat
exchangers with brine and product water to cool the  flow to
almost the freezing point.  The flow then  enters the hydro-
converter having a low atmospheric pressure where part of the
water flashes into vapor and part is crystallized into ice.
The brine and ice mixture is then pumped to the counterwash
vessel.  Since there is a differential  in  the density of the
ice and brine, the ice aggragates at the top of the  brine where
it is washed by about 5% of the product water before being
scraped from the top of the ice surface and returned to the
hydroconverter vessel.  The final process  step in the hydro-
converter involves compression of the water vapor until it
condenses on the ice crystals.  The ice also melts in this
process and with the condensed water vapor is pumped from the
system as the product water.

     The VF-VC desalting process is most economically applied
to cold feedwater sources having TDS concentrations  of 5000-
50,000 mg/£.  Product water is usually  300-500 mg/A.  The BPR
is computed by:
            TDS. - TDS
     BPR =  	i	E_  	(59)
            60,000 - TDS±

and since no cooling water is required, the total intake rate
is:

     C. = C  + C,  	(60)
      i    p    b

where C,  is determined from Eq. 48.
     A summary of the costing model is  given in Table 4.


                              39

-------
     Secondary
   Refrigeration
      System
FEEDWATER
      Filter
  Deaerator
                         Vapor  compressor wash water
                                                         PRODUCT
                                                          WATER
Hydroconverter
    Refrigerant
       coils
                           Entrainment
                           separator
                    ^-Heat
                    (exchanger
                                     Washed
                                    ice chute

                                     Melter
                                                            Ice
                                                          crystals
    1
                                                                       Scraper
                                                  Ice pack
y  B   &  °
 &   &  *
                                       Brine
                                                     Brine- ice  slurry
              Counter-wash
             ~~" vessel


             "1
                          exchanger
                  I	.	,__	^REJECT
                                                                              BRINE
                          FEEDWATER
                 	BRINE
                                        PRODUCT  WATER
                                        WATER  VAPOR
                      Vacuum Freezing - Vapor Compression  Plant Schematic
  Figure 6.  Schematic diagram of  VF-VC desalting process,

-------
       TABLE 4.    SUMMARY  OF  COST FUNCTIONS  FOR  VF-VC
                       DESALTING  PLANTS
        Cost Description
                                               Cost Functions
                                                                                Remarks
 CAPITAL COSTS,  $  MILLION


 1  Construction  Costs, C-,


 2  Steam facilities, C2


 3  Site Development, C,


 4  Interest During Constr., C.


 5  Start-up Costs, C5


 6  Owners' General Expense, Cg


 7  Land Costs,  C?


 8  Working Capital,  C0
 ANNUAL COSTS,  $ THOUSANDS


 9  Labor-Materials, Cg





10  Chemicals, C...


11  Fuel, Cn


12  Steam, C12


 3  Electricity,  C,3
14  Replacement,  C
                , .
                                                    '852°
                                C1=(ENR/952.)xl.77xC
                                C3=(ENR/952.)x0.1xC '6535


                                C4=(C1+C3)*Ir/24.(17.368+1.263xc )



                                C5=(C9+C10+C11+C12+C13)/12'000

                                C6=.119(C1+C3)°'9


                                C7=Lp(0.8+0.32xCp)


                                Cn=2.0xCr
C9= (BLS.^/3.76) x!23. xc


Cg=(BLS1/3.76)xl32.xC
                                                     -64624
                                                     ' 5986
                               C, 3=E {10.H-.2375XT+.0084375 (TDS.-^
                               c14=o.o
                                                                  )  >.5 mgd


                                               C <0.5
                                                P-
                                      41

-------
Electrodialysis

     Electrodialysis removes salt from saline feedwaters by
passing electrical current through positive and negative ion
permeable membranes as illustrated in Figure 7.  Unlike de-
salting processes involving high temperature or low temperature
phase changes, the electrodialysis process uses energy at a
rate proportional to the quantity of salts to be removed.
Consequently, primary application of this technology is to soft,
warm waters having 1000-5000 mg/&  of total dissolved solids.
Product water is usually 300-500 mg/£.

     Feedwater entering a electrodialysis stack is divided into
a brine flow and a product flow.  Two electrodes on either side
of the system created a positive potential to which the anions
migrate and negative potential attracting cations.  The brine
and product flows are separated by an ion selective membrane
allowing either cations or anions to pass but not both.  The
membranes are arranged as shown in Figure 7 to remove salts in
the brine compartment.  Passing individual flows through
successive treatments allows production of product water at
various levels of quality.  Scaling and corrosion are major
problems in electrodialysis systems and, therefore, require
special attention, often by acidifying the brine side of the
membranes.

     The hydraulic limitations of the ED method follows about
the same format as discussed earlier.  The BPR, determined by,

            1- (TDS /IDS.)
     BPR =  	P    X    	(61)

            (900/Ca^) - 1

must be greater than or equal to 0.15 due to electrical and
chemical factors.  Brine volume is determined by Eq. 48 and
total intake rate by Eq. 60.

     The costing model for ED plants is summarized in Table 5.
As noted previously, the performance of the ED process as well
as the costs are dependent on both the feed and product water
quality.  Estimates of construction, land and electrical costs
are functions of the number of ED stages which involve first
determining a "rating factor", RF, by:

           0.575{Na. + K. + Cl.}
     RF -	—  + 0.014375 x (T-4.44) 	(62)
                   TDS.
                      x
where,
     RF   -  plant rating factor;
     Na.  =  feedwater concentration of sodium, mg/£;


                              42

-------
U)
Feedwater |~~
Positive electrode — •
Brine
1

:'•-.

•;':


.".•-.








'• •' -l.i :- -••'.••.: • :.V •'•

«4 	 :••,-.• .'.".•.:.••."•'.•'•

/
^
^
/
X
"." t",'

* X—
•


^ 	 	


.
)









0

X
w
' •

v





* * *."•" ***•".*•*»*•*."•"'
1 )

/
/

^
/




•
v
• •


• — Negative electrode
	 	 Negative ion
permeable membrane
                Product        Positive  ion
                           permeable membrane
       Figure  7.   Generalized view  of  a electrodialysis desalting process.

-------
          TABLE   5.    SUMMARY  OF  COST  FUNCTIONS  FOR  ED
                           DESALTING  PLANTS
         Cost Description
                                            Cost  Functions
                                                                                     Remarks
 CAPITAL COSTS,  S MILLION

 1  Construction Costs, C,
 2 Steam Facilities,
3.Site Development, C,

4 Interest  During Constr.,  C

5 Start-up  Costs, C_
6 Owners'  General Expense,  C

7 Land Costs, C7

8 Working  Capital, C,,
 ANNUAL COSTS,  S THOUSANDS

 9 Labor-Materials, C
10 Chemicals,  c

11 Fuel,  cn

12 Steam,  c,,
13 Electricity, C
14 Replacement, C,
                                  C1=(ENR/952.
                                  C,= (ENR/952. )x.203xA
                                  C=(ENR/952.)x0.1xC
                                                     l6535
                                  C7=Lp(.0246xAs)
                                  C9=(BLS1/3.76)x25.5xCp'+10.xC1
                                                      .4726+
                                                     3
                                                     '.4144,
                                Cg=(BLS1/3.76)x26.5xC  ' ^"-(-10. xc

                               C  =(BLS./104.4)xl8.25xOexC
                                iu     l               r  p
                                              -0-


                                      ?0,47  TDS.  i-3042
                                 C=1.6706xA
                                       T-403  1000

                                              .9766
                                                                        25
-------
     Ki  =  feedwater concentration of potassium, mg/£;

     Cl-^ =  feedwater concentration of chloride, mg/£; and

     T   =  feedwater temperature, degrees Celsius.

In general, ED stacks (or units as shown in Figure 7) are ar-
ranged in stages to achieve the desired product quality and in
parallel rows to achieve the desired plant capacity.  Thus, given
the desired product quality and the rating factor, the number of
stages (As) can be computed by first calculating the fraction of
salts remaining  after each stage, FSR:

     FSR = 0.53/RF0' 5418	(63)
     As ""
log (TDS )  - log
                  log  (FSR)
                                             C
                                    P	 + 1
                                 953.92
	(64)
which assumes an individual stack capacity of 953.92 m3/day.

Reverse Osmosis

     Another membrane process using hydraulic pressure rather
than electrical potential to separate water and salts via a semi-
permeable membrane is reverse osmosis.  Much of the character-
istics and problems noted earlier for ED processes apply to RO
as well.  For example, energy consumption is proportional to
the quantity of salts to be removed.  Consequently, the most
economic application of RO plants should be to soft, warm feed-
waters having 1000-10,000 mg/£ TDS and producing water of 100-
,500 mg/£.  The general RO plant flow network is illustrated in
Figure 8.

     Two vessels of water having different salt concentrations
and separated by a semi-permeable membrane (permeable to water
but exclusive of salts) will produce a flow of relatively pure
water from the dilute solution to the more concentrated or until
either they are both the same concentration or a buildup of
pressure in the latter will stop the process.  This phenomenon
is called osmosis.  It should also be noted that the more sub-
stantial the initial concentration differential, the greater the
pressure (osmotic pressure) necessary to stop the flow.  If a
pressure greater than the osmotic pressure is applied to the
solution of higher salinity, the flow of water can be reversed,
thus the concept of reverse osmosis as illustrated in Figure 9.

     The brine to product ratio for RO plants is computed from
Eq. 61 but must exceed 0.11 due not only to scaling or fouling,
but also because of existing membrane technology.  It might
be emphasized that this limitation will improve as new membranes
are discovered and should  therefore be  evaluated periodically.
Total intake rate and brine volume are  determined  from  Eqs.  48
and 60.
                               45

-------
    Feedwoter-
Pretreatment
                 Reverse Osmosis  Pressure Cells
  Brine
'Discharge
                                                 Brine
                                                           Product  Water
 Figure  8.   Flow diagram of  typical  RO desalting system.
        Porous Support tube
         with Replaceable
         Osmotic  Membrane
        Product
                                    Product
                                                              Brine
Figure 9.  Illustration of basic RO process
                                  46

-------
     The cost estimating relationships for the RO plants are
given in Table 6.  A temperature correction must be made to the
product water capacity since the water permeation rate through
the membranes decreases with decreasing feedwater temperatures.
The corrected design capacity  (X , m3/day) is:
     \ = Cp +           "       "    ........................ (65)
                       100

Ion Exchange

     The final desalting process included in this work is ion
exchange, a process in which natural or synthetic resins having
large quantities of exchangeable ions of a  "beneficial" nature
are used to exchange salinity  ions in solution for ions on the
resins.  In a desalination context,  the ions on the resins are
H  and OH  which when exchanged by the salts in the feedwater,
unite to form water.  Most economical applications of IX
processes are for soft, warm feedwaters with salinities less
than 2000 mg/£ and product water qualtities of 0-500 mg/£.  The
IX process is probably most applicable where a relatively small
amount of salts are to be removed and a high quality product
is required.  In addition, some advantage may be inherent in
following one of the previously described methods with IX as a
polishing step.

     The IX desalting process  generally utilizes a two stage
system as shown in Figure 10.  After pretreatment , feedwater
is pumped into the "cation exchanger" consisting of an ion
exchange resin using H+ as the exchangeable ion.  In this
process, Na+, Ca++, Mg++, and  K+ exchange with the H+ on the
resin producing a strongly acidic solution.  Flow then proceeds
to the "anion exchanger" where a resin utilizing OH~ as the
exchangeable ion replaces N03~, S04~, and Cl~.  The addition
of OH~ ions to the system neutralizes the solution leaving a
high quality product water.

     IX brine to product ratios are  computed by:

     BPR =  (TDSi - TDS )/1000  .............................. (66)


and total intake rate and brine volume by Eqs. 48 and 60,
respectively .

     The model of IX desalting costs is presented in Table 7 and
it is seen that construction costs 'are a function of feedwater
chemical characteristics.  These relationships are developed
by first expressing each anion present in terms of equivalent
                               47

-------
                   TABLE  6.   SUMMARY OP COST FUNCTIONS  FOR RO  DESALTING
                               PLANTS
          COST DESCRIPTION
                                                      COST FUNCTIONS
                                                                                             Remarks
   Capital Costs, $ Million
 1.  Construction Costs, Ci
 2.  Steam Facilities, C2
 3.  Site Development, C3
 4.  Interest During Construction,
 5.  Start-up Costs, Cs
 6.  Owners'  General Expense, Ce
 7.  Land Costs, C7
 8.  Working Capital, Ce

   An.iual Costs,  $  Thousands
 9.  Labor & Materials, C9

10.  Chemicals, C10
11.  Fuel Costs, Cii
12.  Steam,  Ci2
13   Electricity,  C13
14.  Replacement,  Cj^
-6 5 3
Ci=(ENR/952.)x.473*X -9 '
C,= (ENR/952.)x.522xXt-857
Ci = (ENR/952. ) x. 575xX -79 '
C2=0.0
C3={ENR/952 . ) xO.
d,=(Ci+C3) xl 724.x8.xC-3'37
C5=(C9+C, o+C, 3)/12,000.
C6=.119(C,+C3}-9
C7=L {.5+.298-C )
    P          P
C8=2.0xc5
C9=(BLSi/3.76)x25.5xC •" 72
C9=(BLS!/3.76)x26.5xC •"'•'''
T!0=(BLS2/104.4)x!8.25xU
Cu=0.0
C12=0.0
Ci3=E x3.65xC xu,
     c       p  f
                                                                                             ,
                                                                                             t
                  X. =C +
                    t  p
Xt<4
(100.+1.7(77.-T))
      100.
                        C  > 1.5
                        P-
                        C  < 1.5

-------
Filter
                                                           Anion  Exchanger
T
                                                           H+ +  OH- —  KO
 Figure 10.  Ion  exchange desalting process.

-------
                   TABLE  7.    SUMMARY  OF  COST  FUNCTIONS  FOR  IX

                                    DESALTING  PLANTS
         Cost Description
                                                      Cost Functions
  CAPITAL COSTS,  $ MILLION



  1 Construction  Costs, C







  2 steam Facilities, C



  3 Site Development, C-



  4 Interest During Constr., C



  5 Start-up Costs, C



  6 Owner's General Expense, C
                            o


  7 Land Costs, C_



  8 Working Capital, C
                    o




 ANNUAL COSTS. $  THOUSANDS



 9 Labor-Materials, C.
    C =(ENR/9S2.}x(.8572-.4595*BAR)((TDS.-TDS )C x
     1                                1    p  p
    c2=o.o
10 Chemicals, C
              10


11 Fuel, cu



 2 Steam, C



 3 Electricity, C
                13
                       -6515
    C^=(C,+C,)xI 724. (8. *C -3137)
     4   1   3   r         p
    C =.119(C,-K:,)0'9
     O       L  J


    C-L (.8+0.32XC )
     7  p         p
{    C9=(BLS,/3.76)x25.5xC "


                          !4] 44
    Cg=(BLS1/3.76)x26.5xC     +10.xc



   C  =(BLS,7104.4)x3.651.023-.01696 BAR!(TDS.-TDS  )xC
:    10    2                                l    p  p



i   Cll=0-°
                   QC -5 -5

  C  =£  (1.0514x0      )x.365
   1J  c         p
 4 Replacement, C
                14
BAR=.82«HCO /Y
          3  P


Y =.82«HCO +1.41«Cl+.81xNO -H.04xSO
 p       3               34
                                                                                           C  >1.5 mgd



                                                                                           C  <1.5
                                                                                           P"

-------
CaCO-j concentrations:

     Yp = 0 .82xHC03+1.41xCl +0.81xN03 +1.04xS04   	(67)

where Yp is the total anion concentration expressed as CaCO3.
Then, the bicarbonate ion ratio, BAR, is determined:

     BAR =  (0.82 x HC03. ) ' Y   	(68)
                       -L    £J

which is subsequently utilized in costing procedures as illus-
trated.

FEEDWATER AND BRINE DISPOSAL

     In a typical desalting complex, a significant fraction of
the annual  expenditures  is associated with facilities to collect
and convey  feedwater, and to convey and dispose of brines.
Feedwater facilities in  this study are limited in several re-
spects.  First, the water supply to be desalted is assumed to
be either groundwater which can be collected with well fields
or surface  flow capable  of simple diversion.   (No costs have
been attributed to surface diversions.)  After collection,
feedwater is conveyed by concrete pipeline which may require
pumping stations to satisfy both the transmission and desalting
plant head  requirements.  Pipeline capacity for cost estimating
purposes is considered to be the capacity of the desalting
complex, Cp, or if cooling water must also be carried, Cw + Cp.
The length  of the pipeline is assumed to be the weighted average
connector serving the individual wells or surface diversions.
The relatively high cost incurred by these assumptions should
insure a conservative estimate of desalting costs.

     Brine  disposal is assumed to be accomplished by either
injection wells or evaporation ponds.  Brine is also conveyed
by concrete pipeline.

     It should be noted  that cost estimates for desalting plant
facilities  discussed in  the previous section do not utilize
cooling towers.  Consequently, cooling towers have been added
as an option in the development of feedwater and brine disposal
systems.

Feedwater Wells

     The costs of groundwater wells for supplying feedwater to
desalting complexes are primarily a function of number and
capacity of wells and the well depth.  For this study, individual
well capacities are assumed to be approximately 18,900 m3/day
so that  the number of wells needed would be:

     ANFW = (C  /18,900) + 1 	(69)


                               51

-------
where,

     ANFW = number of feedwater wells.

Cooling water is assumed to be supplied to conveyance pipelines
from surface sources.

     Pumping systems  are often needed at the well  site  to  bring
the groundwater to the surface.  Costs for this equipment are
assumed to be a function of wel 1 - cargac i ty _ a nd=ax ^ - i4-u^adrgd~i n
well costs.

     A summary of the feedwater costing model along with the
other facilities for feedwater supply, cooling, and brine
disposal is given in Table 8 for capital costs and  Table 9  for
the annual operation and maintenance costs.

Pipeline & Pipeline Pumping Plants

     As noted earlier, all conveyance to and from the desalting
plant is facilitated by concrete piplines whose costs are a
function of capacity, Cp '  and length, D (D = Dif for feedwater
and D = Dib for brine disposal) .  Included in the cost of the
well field are the surface facilities to pump water from the
wells into the pipeline.  Consequently, energy to supply con-
veyance headless is assumed to be met by a pumping  plant some-
where along the pipelines.  The model, however, does not include
elevational headloss where the desalting plant and well  field
are at different levels.  The pipeline pumping plant costs  are
functions of both capacity and pumping head as illustrated  in
Tables 8 and 9.

Evaporation Ponds

     An alternative for disposing of desalting plant wastes is
to convey the brine to a large open area where they can  be
ponded in shallow areas and evaporated.  The costs  of evaporation
ponds are primarily functions of pond area.  The area of the
pond is determined by:
             365 C.
in which,

     Epa =  evaporation pond area, ha; and
     E   =  mean annual evaporation rate, m.

As can be seen, areas in which evaporation rates are low or  land
prices are high due to urbanization will probably find evapo-
ration pond costs too high.
                               52

-------
TABLE  8.    SUMMARY  OF  CAPITAL  CONSTRUCTION  COSTS  FUNCTIONS  FOR

                 FEEDWATER,  COOLING  AND  BRINE  DISPOSAL  FACILITIES,

                 IN  $  MILLION
          Cost Description
                                               Cost Functions
   1 Construction Costs, C
     b Pipelines
     c Pipeline Pumping Plants
     d Evaporation Ponds


     e Injection Wells
     f Injection Well Surface

       Facilities
     g Cooling towers


   2 Steam Facilities;  3. Site

     Development;  5. Start-up

     Costs; 6. Working  Capital,


   4 Interest During Constr., C
                        4

   6 Owners'  General Expense, C


   7 Land Costs, c


   S Working  Capital, c
                                                                   . 4225
                               C  = (ENFi/952.)>ANFW! (. 3+. 6S75xDJ *0. 41 (C /ANFW)    )
                                la                     f      P


                                  +(PMI/1.41)ANFW((1.6+.48xc )+{1.4+1.316*C ))/1000
                                                      P           P
                                                5442    -S
                               C  =(CPI/1.17)5.*C     xDxlO
                                Ib           p


                               C  -(CPI/1. 17)5,8x0'  '35°3xDxlQ~6
                                Ib            p
C =fPPI/1.26}H x5.8*C'  '   *10
 Ic         k     p
                                            C' >t mgd, C1  = C + C
                                             p -       p  p  w
                                                                            H =.07163xH'6548, H>150 feet
                                                                            k             —
                                                                            H-(D /5280. ) 147. xc1
                                                                               if          p
                                                                                                   >15 mgd
                                                                                                   "
                                            E -1.12«C ,/E
                                             pa      D
                                                                            A - 6+.3167x0X10  ,  2000«D,<6000
                                                                            k         b         - o—
                                            A =ANFK/2.0; A,-1.+.0417"C
                                                                           A,~D,'(1.5+.0063C' J/5280
                                                                            3  f         p


                                                                           A-C./2.; A,"E
                                                                            4  b     :  pa
                                                  53

-------
 TABLE  9.   SUMMARY  OF ANNUAL O &  M  COST  FUNCTIONS  FOR
               FEEDWATER.  COOLING,  AND  BRINE  DISPOSAL
               FACILITIES IN  $ THOUSANDS
          Cost Description
                                           Cost Functions
                                                                            Remarks
Labor s,  Materials,  C~

a Feedwater Well Systems




b Pipelines

c Pipeline Pumping  Plants
d Evaporation Ponds

e Injection Wells
  f Injection Well Surface Facilitiei

  g Cooling Towers

10 Chemicals, C,.,!!.  Fuel, C.,;

  12.  Steam, C12;  14.  Replacement,

  C,
   14
13 Electricity, C
                . ,
                                    C9a=(BLS1/3.76)x21.xC

                                    C9a=(BLS1/3.76)x21.xC
                                                        '869
                     .6818

Cga (BI.S1/3 . 76) x!6 .xCp'-'4982
c9b=o.o

C9c=(BI.S1/3.76)xl.68xC1 -7546

C9c=(BLS1/3.76)xl.76xCp'6557

C9c=(BLS1/3.76)xl.44xC1-5255

C9d=.0075xCld
                                   C=
                                                       <8728
                                                        '7644
                                                        '4479
                                  9e=(BLS1/3.76)x44xC^

                                 Cge=(flLS1/3.76)x50.xCb

                                 C9e= (BLSj^/3 . 76) x44 .xCb

                                 c9f=o.o

                                 C9g=10-Clg

                                 C10=Cll=C12=C14=0-°
                                 C,,=E x365.xlO"6x. 004x(H,+H.)
                                  1:5  c                 f  b
C >1 mgd
 p_

•25lCp1.5 mgd
 P ~
.25_2 mgd

.515 mgd
                                                                       ,,-.515
                                                                       -p     4--p^

                                                                     XCp"339 CP-4

                                                                     )., YV5280.+200.
                                                                Y'=147.xC
                                                                          -.77"
                                                                               Cb>_.15 mgd
                                                                Y' = 71.xCb 'blb  4<^Cb£l5

                                                                Y' = 58.xC, ~-339  c  <4
                                            54

-------
Injection Wells and Surface Facilities

     In many areas it may be possible to drill wells into deep
aquifers of saline water  (which do not interact with the surface
hydrology or groundwater supply system).  Such wells can be
utilized as a disposal alternative for desalting brines by
injecting them through the well into the deep aquifer.  Costs
for injection well systems, including surface facilities,
depend  on well depth and capacity as  shown in Tables 8 and 9.

DESALTING COST ANALYSIS

     The application of desalting technology to regional water
quality management tends to be a very site specific problem.
As a result, generalization of cost analyses is difficult.
However, it might be useful to point out the model's sensitivity
to various input parameters relative to an arbitrary "base"
so the relative importance of the variables can be viewed.
Table 10 summarizes the base values of input parameters utilized
in this section.

Desalting System Capacity

     In a previous paragraph it was mentioned that desalting
costs expressed in terms  of dollars per ton of salt removed
or dollars per cubic meter of product water exhibit substantial
economics of scale.  For  the base condition, the scale effects
for each process are illustrated in Figure 11  (ion exchange has
not been included because of the high TDS in the feedwater).  In
nearly every process, the costs at 950 m3/day are 2-4 times the
costs at 121,000 m3/day.  The VTE-MSF, VC-VTE-MSF, and RO
process costs at the lower valve are 3.5 to 3.6 times the upper
capacity indicating much  larger importance of scale than is
associated with MSF  (2.80), VF-VC  (2.78), or ED  (2.13).  Of
these specific processes, electrodialysis is more affected by
input parameters and therefore should be evaluated more closely
in the definite plan investigation.

     The scale factor in  desalination will generally preclude
small installations for  salinity control since other measures
of reducing salinity will be cheaper.  However, as the level
of implementation  increases and the desalting costs decrease,
this technology may become highly competitive with the various
other alternatives.  Consequently, a major parameter in a
salintiy control analysis that can be  expected to affect the
potential use of desalination  is this  level of implementation.

Feedwater Salinity

     Because of referencing desalting  costs  to salinity control,
the feedwater  salinity  is an  important parameter  in  the  evalu-
ation of the alternative  processes.  The distillation  and

                               55

-------
TABLE 10.  STANDARDIZED  DESALTING MODEL INPUT PARAMETERS
           FOR VARIABLE  PARAMETER SENSITIVITY ANALYSES
  C    =  1.5xl04 m3/day (4 mgd)
  TDS.  =  5000 mg/£
  TDS  =  500 mg/jj,
  ENR  =  1354
  BLSl =  4.93
  BLS2 =  181
  CPI  =  1.88
  PPI  =  1.98
  PMI  =  2.13
  El   =  1.92
  D,    =  1000 m  (3280 feet)
   b
  D    =  100 m  (328 feet)
  D.,   =  100 m  (328 feet)
  Dif  =  1000 m (3280 feet)
  E    =  1.07 m (3.5 feet)
  E    =  $7.2xl04/M Joules  ($20/1000 kwh)
  FCR  =  0.0856
  Fr   =  $1.2xl03/M Joules  ($1.14/MBTU)
  Ir   =  7%
  L    =  $4,942/ha ($2000/acre)
  T    =  15.6 C (60 F)
  Uf   =  0.90
  Na   =  1260 mg/fc
  Mg   =  123 mg/£
  Ca   =393 mg/£
  K    =8 mg/e,
  HC03 =  106 mg/£
  Cl   =  2035 mg/£
  SO,   =  1075 mg/£
                            56

-------
        200 r
       E
       "X
       4*
       (A
       3
       c
       <
         100
            o
Figure 11.
       20     40      60      80     100
       Product Water Capacity,  mVday x IO"3
Relationship of plant capacity and desalting
costs for various systems.
120
                              57

-------
freezing methods are not substantially limited by input salinity
since the same measures are necessary to desalt 1000 mg/£ feed-
water as for 10,000 mg/£.  Consequently, the higher the feed-
water salinity the lower the unit cost for these processes.
Reverse osmosis and electrodialysis,  on the other hand, use
membranes to effect a salt removal and therefore are directly
affected by feedwater salinity.  Calculations were made at the
base input condition with various levels of input salinity to
evaluate this factor.  The results are plotted in Figure 12.
It should be noted that it is assumed that individual ionic
species do not create limiting conditions.

     In all the methods simulated in  the costing model except
electrodialysis, the costs at 2000 mg/£ would be double those
at 5000 mg/£ and five times those at 13,000 mg/£.   However, the
rate of change of the salinity versus cost ratio  diminished
toward increasing salinity values. The electrodialysis process
is significantly less affected by feedwater salinity mainly
because of its module construction and the direct relationship
between power consumption and salinity.

Operation and Maintenance

     Unlike the generally predictable construction  cost items,
operation and maintenance costs are subject to year-to-year
inflational pressures which cannot always be effectively pre-
dicted.  At the base condition, the O & M costs were typically
somewhat more than 50% of the total annual cost,  as shown below.

                             Percent  of Total Annual Cost
       Process                  Attributable to O & M

      MSF                                60%
      VTE-MSF                            57
      VC-VTE-MSF                         46
      ED                                 58
      RO                                 56
      VF-VC                              56

It is interesting to evaluate the effects of interest rate on
the relative importance of operation  and maintenance costs.
For example, if the interest rate was increased from 7% at the
base to 10.5%, 0 & M costs decline from more than 50% to 39%,
or about 11% in most cases.  In terms of total costs, this
50% increase in interest rates increased unit costs by a low
of 21.5% for MSF processes to 28.6% for VC-VTE-MSF systems.

     In each case studied, the effects of scale or feedwater
salinity did not affect the percentages given above with the
exception of electrodialysis.  In the ED analysis, the effects
of plant capacity produced 0 & M percentages ranging from 58%
to 66% as the capacity increased from the base to 121,000 m3/day,


                              58

-------
           1.5
         •o
         X)
         0)

         gl.O
         OT
         O

         V)
         (A
         O
         O
         O
         CO
         o  .5
         o
         i
           0
                                                 ED
                                                 MSF, VTE-MSF,
                                                 VC-VTE-MSF, RO
VF-VC-
                               5,000              10,000
                     Salinity Concentration in Feedwater,  mg/
Figure 12.  Effects  of  feedwater salinity concentration on
            desalting costs.
                               59

-------
     Specific items in the operating expense categories are  also
of interest to water quality management planning.  For instance,
electrical and fuel costs accounted for the following percentages
of total annual costs:

 Process         Cost of Electrical Power         Costs of Fuel

MSF                       9.8%                        32.0%
VTE-MSF                   5.4%                        33.4%
VC-CTE-MSF                2.1%                        24.0%
ED                       27.5%                         0 %
RO                       20.4%                         0 %
VF-VC                    32.8%                         0 %

     Rate increases for both electricity and fuel produce
proportional increases in annual costs.  For example, in a MSF
system if electricity rates increase 50%, annual costs will
increase  (0.50)  (0.098) = 0.049, or 4.9%.  These data illus-
trate the importance of electrical costs for membrane and
freezing processes and fuel for distillation methods of de-
salination.

Land

     Because land area for desalting systems is a non-deprec-
iating capital cost and can therefore be amortized indefinitely,
land costs for the base condition ($5,000/ha)  account for only
1-8% of total annual desalting costs.   Specifically:


                         Land Costs as a Fraction of Total
     Process             	Annual Costs	
    MSF                              3.8%
    VTE-MSF                          3.9%
    VC-VTE-MSF                       4.8%
    ED                               5.8%
    RO                               7.7%
    VF-VC                            0.7%

Feedwater and Brine Facilities

     Of the factors involved in evaluating desalting feasibility,
the feedwater and brine disposal facilities may be the most
site-specific variables.  In the reference situation using
feedwater wells 100 m deep and 1000 m from the plant, and brine
injection wells 1000 m deep and 100 m from the plant, the costs
were as follows:
                               60

-------
               Percentage of Total Annual Costs Attributable to
 Process           Feedwater and Brine Disposal Facilities	

MSF                                  21%
VTE-MSF                              21%
VC-VTE-MSF                           25%
ED                                   30%
RO                                   40%
VF-VC                                12%

Differences in the values reflect different volumes of feedwater,
brine, and overall costs.

     The choice of a  feedwater or brine disposal system is very
important in evaluating these alternatives.  Feedwater wells,
for example, can account for about 15% of the costs of feedwater
and brine disposal systems.  Likewise, the choice of brine
injection wells over  evaporation ponds can be a significant
decision.  In the base example, evaporation ponds would cost
about 70% more than injection wells  for each alternative
except VF-VC in which case  they would cost approximately 7%
less.  Thus, the selection  and location of these facilities
should be considered  and optimized for each potential location,

Technological Advances

     The desalting submodel does not include compensation for
technological improvement in equipment or processes that are
almost certain to appear.   The potential users of this work
should therefore be cognizant that substantial errors can be
introduced if updating with current  information is not part
of using this desalting submodel.
                               61

-------
                           SECTION 6

      SIMULATION OF AGRICULTURAL SALINITY CONTROL COSTS
INTRODUCTION

     Improved management and structural rehabilitation are
often regarded as the most feasible treatments of an irrigation
system to improve the quality of return flow.  Indirect ap-
proaches such as limiting irrigation diversions, effluent
standards, land use regulations, and economic incentives may
also be considered although they appear more difficult to
implement.  Whenever salt pickup is the objective of salinity
control, however, the specific control measures should impact
segments of the irrigation system which contribute to the
magnitude of local groundwater flow.  This may be accomplished
by reducing seepage from various elements of the conveyance
system and minimizing deep percolation from over-irrigation.
Return flow quality may also be improved by relief and inter-
ceptor drainage to collect subsurface flows before a chemical
equilibrium is reached with the ambient soil or aquifer
materials.

     The agricultural salinity control cost model is composed
of cost-effectiveness functions for each alternative input to
the groundwater region where salt pickup is assumed to occur.
These are based on soil and aquifer chemical behavior as in-
terpreted by prerequisite analyses.  Thus, the relationship
between groundwater flow and salt loading can be developed in
such a manner that control costs can be related to reductions
in salt loading.

     The model developed in this section is divided into two
categories:  (1) analysis of the conveyance system; and  (2)
analysis of the farm level irrigation system.

WATER CONVEYANCE SYSTEM ANALYSIS

     The contribution to local or regional salinity problems
from irrigation water conveyance networks may be the result
of a number of factors.  First, unlined channels allow seepage
into underlying soils and aquifers where naturally occurring
salts might be dissolved and transported into receiving
waters.  Second, the structural and managerial condition of a
                              62

-------
system may support large areas of open water surfaces or phre-
atophytes which concentrate salinity in return flows.  Finally,
the operation of the system may preclude efficient water
utilization by the individual irrigator, especially if deliver-
ies are not made in accordance with crop demands.  The costs to
remedy these problems are generally limited to those associated
with lining and rehabilitation of the waterway.  However, so far
as improved management may be required, some costs associated
with educational programs and legal/administrative adjustments
may be incurred.

     To test the feasibility of conveyance system improvements
relative to other salinity control measures, the mathematical
model developed in the following paragraphs will include two
principal channel improvement alternatives; concrete linings
and piping.  It is assumed that these alternatives along with
supportive structures represent the generally applicable
technology in terms of both utilization and cost.  It is further
assumed that converting an unlined conveyance channel to a
buried pipe will be limited to networks having less than 0.25
m3/sec capacity since pipes available in the larger sizes re-
quire special fabrication and therefore cost much more than the
concrete lining alternative.

Concrete Lined Systems

     Seepage from canal, lateral, and ditch conveyance networks
may be reduced or eliminated by lining the perimeter with an
impervious material such as concrete, plastic, asphalt, or
compacted earth to note several of the more common methods.
Concrete is probably the most commonly employed lining material
because of the combined advantages of cost, ease of construc-
tion, availability, reduced maintenance, and low permeability.
The costs of concrete linings  (either slip-form or gunite) vary
with local economic and topographic conditions, channel geometry
and size, and requirements for miscellaneous water management,
safety, and environmental structures.  For specific locations
it is important to prepare cost estimates on a case-by-case
basis, although for planning purposes it is useful to have
generalized expressions.

     A review of concrete lining cost by Walker  (1976) indicated
that such costs could be reasonably well estimated as a function
of wetted perimeter and updated to present and future conditions
with an appropriate cost index.  A simpler methodology based
on design discharge can also be utilized, and will be the
variable in this model.

     Data presented by U. S. Department of Interior  (1963, 1975)
and Evans, et al.(1976) were evaluated by the following general
relationship:
                               63

-------
     Uc = K1 •  Q   	(71)


where,

     Uc     =  unit lining cost $/m;
     Q      =  design discharge, m3/sec; and
     K,, K» =  regression coefficients.


After transforming the data with the Bureau of Reclamation canal
and earthwork cost index to a base time of January 1976, the
Kl and K? values were 29.70 and 0.56, respectively.  It should
be noted; however, that even in the same locale these unit costs
varied substantially.  Equation 71, therefore, is intended only
as a general estimating formula.  The unit costs in Eq. 71 in-
clude only the earthwork, relocation, and lining costs and do
not include costs for fencing, diversion structures, safety
structures, etc.  The latter costs are also highly variable
depending upon the many site-specific conditions.  An exami-
nation of such costs as given by the U. S. Department of Interior
(1975) showed a range of $12/m to $50/m with a average of $22/m.
Unless otherwise specified, the average figure will be used in
this analysis.  Thus,  the per meter construction costs, Cc, may
be written in 1976 dollars as:

                0-56
     C  = 29.70    +22  	(72)
      W

In addition to the construction costs, one must consider service
facilities, engineering, investigations, and other administrative
expenses.  The Bureau of Reclamation has used factors of
approximately 35% for these costs, so Eq. 72 can be written as
a total capital cost as:

     C  = 40.1Q0'56+29.70  	(73)
      w

     In order to calculate the total costs for a given length
of canal, ditch, or lateral, Eq. 73 must be integrated over the
applicable limits.  Because water is continually being with-
drawn from a conveyance channel, both wetted perimeter and
discharge decline along the length of the channel.  Assuming a
linear decline for the decrease, the wetted perimeter at a
specific location can be determined by:

     WP = WPm(l-bL/Lt)  	(74)


in which,

     WP  = the wetted perimeter at the channel inlet, m;
       m
                              64

-------
     L   = length from inlet  to  specified point, m;
     L£  = total length of channel, m; and
     b   = empirical constant representing the  fraction of
           maximum wetted perimeter remaining at end of the
           channel.
Similarly for the design discharge:
     Q = Qm  (1-bL/L  )
                                                        (75)
where,
     Qm = inlet channel capacity in m3/sec.
Combining Eqs. 73 - 75, yields,
                   0-56
     C  = 40.1 ' 0
      c         "m
                  (l-bL/Lt)
                                0.56
               + 29.70
                            (76)
Then, the total capital costs for lining L meters of channel
Cc, are determined by integrating Eq. 76 over length as it
varies from 0 to L meters:
                   0.56
     C  = 40.1
      c
           Q.
                 m
                 1.56 • b
           l-(l-bL/Lt)1-56 + 29.7 • L.. . (77)
     Equation 77 assumes that the lining proceeds in the down-
stream direction, however, the choice of either upstream or
downstream lining direction depends on their relative cost-
effectiveness.  To determine this choice, it is first necessary
to define the salinity control effectiveness resulting from a
particular lining project.  The difference between the equi-
librium salinity in return flow and the salinity in the seepage
water represents the volume of salt pickup by the seepage losses
and thereby, the salinity control expected from the linings.
The volume of salt loading affected by a reduction in seepage
can be written:
     AS, = AS
where,

     AS.
            V
Q  - 0
 g    P
                       Q,
10
                                  -6
(78)
      reduction in salt loading due to the linings,
  x   metric tons/m annually;
AS  = difference between the equilibrium salinity
  0   concentration in the return flows and the salt
      concentrations in the seepage waters, mg/£;
 Q  = total groundwater additions, mVyear;
                              65

-------
     Qp = phreatophyte use of groundwater, mVyear;  and
     Vg = total volume of seepage, m3/m2/year , as determined  by:


     V  = N , -ASR'WP1 ..................................... (79)
      s    d

in which,

     N(j, = number of days per year seepage occurs;
     WP  = wetted perimeter of original channel, m;  and
     ASR = change in seepage rate affected by lining, m3/ra2/day.

It might be pointed out that the ASR value might also be
written as a length distributed parameter in this model if
measurements or other data are available.
     The question of lining direction can be addressed by
approximating the marginal costs at both ends and then comparing
the results.  First, let K]_, K2, and K^ be defined respectively
as :
     K-L = 40.1 • Qm  *   ...................................... (80)


                        Q  - Q
     K2 = ASc • Nd •  ASR  -2^ - 2.  • WP^  •  10   ............. (81)


     K3 = 29.7 ............................................. (82)


Then the marginal cost estimate would be found by substituting
Eq. 74 and 79 into  Eq. 78 and then dividing Eq. 76 by the
results.  After simplifying, the marginal cost is written as:


                       ^X  .............................. (83)
           K  (1-bL/L )
            £*       L-

in which,

     MC = marginal  lining cost estimates, S/ton.

At the inlet when L = 0 and the marginal cost estimate, MC . , is,

           K  + K
     MCi = — -  ........................................ (84)
whereas at the end where L = L , the marginal cost estimate,
MCe,  s
                              66

-------
                     0.56
           1^(1  -  b)     +K3

     MCe =     K2(l-b)	  	(85)


Subtracting Eq.  85 from 84  and simplifying gives:


     MCi - MCe = -TcH1--^.,,!*  ^ll-rrzrrsl	(86)


Because b is  a value  between 0 and 1,  Eq.  86  is always  negative
indicating that  the optimal direction  is  downstream.

     The cost-effectiveness functions  for concrete channel
linings in the salinity control sense,  as determined  by first
integrating the  expression,  result  from substitution  of Eqs.
74 and 79 into 78.  The results for the downstream lining can
be written:

     SI = K2L(l-bL/2Lt)  	(87)

in which,

     S^ = salt load reduction after lining L  meters of
          conveyance  channel, m tons/year.

If L is solved for in Eq. 87 and substituted  into  Eq. 77, the
cost of linings  are expressed as a function of  the expected
reduction in  salt  loading:
     _        r                    i. 5 si
     Cc = K±  1  -  (1-b) • f (S-^/I^)      +29.7'f(S1) 	(88)


where,

          K   L
     K  =  -It    	(89)
      i   1.56 •  b

and,

                                    0.5
                          K2b
                                                             (90)
Buried Plastic Pipeline

     For conveyances with discharge capacity up to  0.25 m3/sec,
an alternative'to concrete lining  is buried plastic pipeline.
Pipelines offer a number of advantages over concrete, particu-
larly with respect to ease of installation, higher  seepage loss
reductions, and less interference  with surface traffic.   In


                              67

-------
irrigation system applications, low head plastic pipe is most
often used and in fact, as will be noted later, is only
economically competitive with concrete with the low head
speci fications.

     The discharge capacity of buried plastic pipelines is a
function of the pipe diameter and the head loss per unit length.
According to the commonly employed Hazen-Williams equation,

                     / n \ 1 . 8 5 2 -4.87
     J = 4.35 x 1017 MM     D      	(91)


where,

     J = the head loss in m per 100 m;
     Q = pipe flow in m3/sec; and
     D = pipe diameter in mm.

The constant, 150, represents a generally accepted friction
coefficient for continuous lengths of plastic pipe.

     The usual design decision with respect to pipeline head
losses in irrigation systems would be to approximate the natural
land slope in the direction of the pipeline.   Equation 91 can
then be written in terms of diameter,
     D = 622.77 Q°- 38 J~ ° • 2 l  ............................... (92)

Cost data for low head PVC pipelines in western Colorado indi-
cate installation costs averaging $3.78 per meter.  When these
expenses were added to January 1976 pipe costs, it was possible
to develop a polynomial expression as a function of discharge,
                                                    •
     Cpl = 5"77 " 9-8466Q" 38J~°" 21 + 31.05Q°* 76J-°- k2 ........ (93)

in which,
         = pipeline costs (pipe & installation) $/m;
     0"  = pipeline capacity, m /sec; and
     J   = pipeline slope,  m/lOOm.

If thecosts of engineering, negotiations, etc., are included
as was part of the canal and lateral concrete lining costs  (35%),
Cpi would be,

     Cpl = 8.88 - 15.150°' 38J-°-21+47.76Q°- ^j-o.^z ........ (94)


     It is interesting to compare the respective feasibility of
plastic pipeline as opposed to concrete lined channel as


                              68

-------
determined  from earlier equations (for channels this  small,  K
is assumed  to  be zero in Eqs.  76 and 77).   A plot of  the  com-3
parison  for three possible pipeline slopes covering a fairly
representative range is given  in Figure 13.   The concrete lined
sections  exhibit substantially better economics of scale  than
do the pipelines and are generally less costly at the small
sizes.   Pipelines appear in the plot to be most attractive for
the  large slopes.

     The  salinity control cost-effectiveness of buried plastic
pipeline  can be determined by  combining a  modified form of Eq.
87 with  the integrated form of Eq.  94.   An important  assumption
might be  made  in this regard.   Conveyance  systems xvith this
comparatively  small  capacity would not be  expected to have a
decreasing  capacity  along their length as  was the case for the
major conveyance described earlier.   Generally,  these kinds of
systems  serve  as laterals,  head-ditches or tailwater  ditches
where capacity is not designed to diminish since the  full  water
supply must be available to the irrigators at the lower ends
of these  systems.  In addition, these capacities may  very  well
fall within the limits of the  smallest available size of pipe
or concrete ditch.   Under these conditions,  the reduction  in
salt loading derived from Eq.  87 would simplify to:

     s! = K2 •  L 	(95)


The  integrated form  of Eq.  94  is:

     _          L
     C ,  =  C   / dL  = C , • L 	(96)


Thus solving for L in Eq.  95 and substituting into Eq. 96  gives:

             8.88S     15.15Q0'38J-°-21S
                  C_L                     JL
          =  —	
      P±     K.2              K£


          ,  47.76Q     J-°'21S,
            	±		(97)
                   K2

ON-FARM SYSTEM ANALYSIS

     The water applied  as  irrigation  to croplands takes several
routes back  to the groundwater  and  stream  systems from which it
was diverted or  into  the  atmosphere where  it  originated.    Every
segment of this  complex system,  except  the atmospheric tran-
sition (evaporation and transpiration)  is  characterized by a
chemical constitutent derived  from  the  earth  and rock materials
contacted by the water.

                               69

-------
        30r
     OJ

     ^>

     E
     «r  20
     o
     o

     o>
     o
     c
     o

     
-------
     Salinity is primarily associated with two segments of the
field hydrology, deep percolation and on-farm conveyance seepage
The measure of effectiveness in managing deep percolation and
seepage is generally irrigation efficiency.  However, this term
is too broad for use in on-farm analyses.  Rather, a more
specific term, application efficiency (AE), provides a more
resolved indication of control on percolation and seepage losses,
Application efficiency is the percentage of irrigation waters
actually applied to the soil reservoir that is stored and then
utilized from the root zone.  Another on-farm waste, field
tailwater, is not included in this definition.  Precipitation
entering the soil profile should be included.  Thus,

           AS  + E  '                E
     AE =   Tm+ p      ' 100 =       T +   - 100  	<98>
                                d    w

where,

     ASm = change in soil moisture storage before and after an
           irrigation, cm;
     I   = infiltrated irrigation depth, cm;
     P   = precipitation during the irrigation, cm;
     ET'= evapotranspiration during the irrigation, cm;
     E   = evapotranspiration between irrigations, cm;
     P,  = field deliveries, cm; and

     T   = field tailwater, cm.
      w

Leaching is not included in this definition because of the
largely external view of salinity being applied.

     The salinity associated with farm related irrigation return
flows will be minimized when application efficiency is maximized.
Alternatives for accomplishing an increase in AE can be divided
into two basic types.  The first type is the array of non-
structural management and operational practices which provide
closer coordination between water applications and available
soil moisture storage capacity.  Many of these practices
(Irrigation timing, amounts to apply, pesticide applications,
etc.) are incorporated in one technology called irrigation
scheduling.  Unfortunately, irrigation scheduling by itself is
not a particularly effective means of controlling ditch seepage
and deep percolation because many irrigators do not have enough
physical control over the irrigation flow.  Others have limited
information on exactly how much water they have because of
severe fluctuations in the supply flow rates.  Consequently,
improved water management is not included in the analysis sepa-
rately, but is assumed to be an integral part of each structural
improvement, the second means of increasing application
efficiency.

                              71

-------
     The variety of structural improvements that might be
effective in increasing application efficiency  includes  lining
or piping head and tailwater ditches to eliminate  seepage,
conversion to alternative irrigation systems to apply water  more
uniformly and with better control of the application depth,  and
modification of existing systems  (added flow measurement,  land
leveling, automation, etc.) to improve their efficiencies.

Controlling Head and Tailwater Ditch Seepage

     Seepage from head and tailwater ditches in surface  irriga-
tion systems can be reduced or eliminated by the lining  measures
discussed previously.  However, with the head ditches, the lined
channel must be congruent with the need to divert water  at
closely spaced intervals.  Thus, the piping alternative  for
seepage reduction in head ditches usually takes the form of
gated pipes rather than the continuous sections.

     For concrete linings, the salinity cost-effectiveness
follows nearly the same argument as presented earlier for con-
crete lined canals and ditches.  As noted previously, small
channels and particularly those involved with head ditches and
tailwater ditches would not be designed with reduced capacity
along the length since these conveyance elements generally must
be capable of delivering full capacity along their entire length.
The costs for fencing, diversion structures, and safety  struc-
tures will be smaller for on-farm ditches in most cases  than
in other conveyance networks.  Equation 77 under these conditions
would simplify to:
     C  = 40.1 • Q°* 56 • L
                                            (99)
and Eq. 87 to:
     Sl -
N.
A'SR •  WP'-
    0    0
     g -  P
      Q™
10"
                                                   L  	(100)
Then solving for L in Eq. 100 and substituting the resulting
expression into Eq. 99 yields a salinity cost-effectiveness
function for on-farm ditches:
            40.1
   10
                           5 6
            AS
  N
                   d
  ASR
WP
                         Q
                                          g
                                       o-o
                                        "    "
                                             P
                                           (101)
It might be worth noting that Nd, the number of days in oper-
ation, for head and tailwater ditches must be carefully defined.
Both channels are wetted only during irrigations and even then,
not over the entire length.
                              72

-------
     An alternative  to  concrete  head  ditch  linings  is  converting
to gated pipe.  Prices  for  6,  8,  and  10  inch  aluminum  gated
pipe in 1976 were  quite similar  to  concrete linings  for the  same
purpose.  Consequently,  a further distinction is probably not
justified.  The respective  choices  would be dependent  on factors
other than salinity  control cost-effectiveness".

Irrigation System  Conversions

     The efficiency  and uniformity  of surface irrigation methods
are dependent primarily upon the  infiltration characteristics of
the soil.  Such systems when not  designed and operated in a
manner best suited to the soil properties will inherently be
inefficient, i.e., have significant deep percolation and seepage
losses.  Even well designed systems have a  comparatively high
loss rate because  of the large variability  in soil properties
within the confines  of  single  irrigated  fields.  One of the
most common methods  of  increasing irrigation  application
efficiencies is to convert  a surface  irrigated system  into one
of the pressurized varieties (sprinkler  or  drip) in which the
amounts applied to the  soil are  relatively  independent of soil
properties.  In this work,  two classes of pressurized  systems
will be included,  sprinkler and  drip  irrigation.

Sprinkler Irrigation Conversion  -~

     Sprinkler irrigation systems are recommended and  used on
practically all types of soils and  crops with a few limitations
due to topography.   Flexibility and efficient water control has
permitted irrigation of a wider range of soil conditions with
sprinklers than most surface water  application methods.  It has
thus allowed irrigation of  many thousands of  acres  (which were
previously considered only  for dryland farming or as wasteland).

     On some saline  soils such as in  the Imperial Valley of
California, sprinklers  are  recommended for  better leaching and
crop germination.  Sprinklers are especially  desirable in soils
with  high permeability and/or low  water holding capacity,
although sprinklers  can offer distinct advantages over other
irrigation methods in dense soils with low  permeabilities.
In areas where labor is  in  short  supply,  sprinklers are among
the most economical  ways to apply water.  In  other areas where
water costs are high, sprinklers  have proven  to be economical
due to reduced surface  runoff.  In  many  cases  sprinklers have
been shown to increase  yields and improve produce quality,
particularly for the fresh  vegetable  and fruit market where
color and quality  are very  important.

     Sprinklers, like most  physical systems,  do have dis-
advantages.  Damage  to  some crops has been  observed when poor
quality irrigation water has been applied to  the foliage by
sprinklers leaving undesirable deposits  or  coloring on the


                              73

-------
leaves or fruit of the crop.  Sprinklers are also capable of in-
creasing the incidence of certain crop diseases such as fire
blight in pears, fungi or foliar bacteria.  A major disadvantage
of sprinklers is the relatively high cost, especially for solid-
set systems.  Sprinklers can require large amounts of energy
when the water has to be pumped from deep underground aquifers,
or when gravity cannot supply sufficient head for operation.

     Karmeli (1977) reviewed most of the technical literature
and field data pertaining to sprinkler application uniformities
before proposing that the most simple and best statistical de-
scription of uniformity was a linear regression.  The linear
function is described as:

     Y = a + b X 	(102)

where,

     Y is a dimensionless precipitation depth equal to y/y;
     X is the fraction of the area receiving less than the
       applied depth y;
     a, b are linear regression constants;
     y is the average depth of application; and
     y is the depth of application at one fraction of the
       field area.

     The graphical view of Eq. 102 (Figure 14)  reveals several
interesting characteristics pertaining to sprinkler irrigation
efficiencies.  An irrigator intending to apply a planned depth or
irrigation to his field  (Y=l) will discover that 50% of the field
will receive less than this average while the other half will
receive more.  The minimum applied dimensionless depth, Ymin, is
the ordinate intercept a, whereas the maximum dimensionless depth,
Ymax, is equal to a+b.  Karmeli (1977)  proposed a uniformity
coefficient, UCL, based on Eq. 102 in which UCL is the average
deviation from the mean applied depth.   Examining Figure 14
indicates the average deviation from Y=l is 0.25b, thus:

     UCL = 1 - 0.25b 	(103)

     Use of the UCL as a statistical description offers many
advantages over other uniformity criteria.  Specifically, the
deficiently watered area, the average watered area, the surface
watered area, and the respective volumes of water in each of
these areas are easily calculated.  An examination of Figure 14
reveals that it can also be interpreted as the fractional amount
of required water versus the fractional area.  Utilizing this
concept, it is quite easy to compute the application efficiency.
For instance, if Y=l represents the necessary moisture to refill
the soil reservoir (the dimensionless volume actually stored
in the root zone) equals 1-(1-Ymin)2/2b and the volume actually
applied is Ymin + b/2.  Application efficiency is therefore,

                               74

-------
2.0
    I1-5
ex
0)
o



I 0.5


O
'35
c,
o>

E

5 0
                Y=a +bX
                                b-slope
                          (Application Efficiency  of  Upper

                          Line Less than  Lower Line)
                                   0.5


                         Fractional  Area  X
                                                              2.0
                                                            o
                                                            o

                                                        .5  1
                                                            a.
                                                                   o


                                                               ,.0*
                                                                   a>
                                                            a>
                                                            a:

                                                       0.5  ^
                                                            o
                                                                   u
                                                                   o
                                                       0

                                                      1.0
Figure  14.   Graphical representation of sprinkler irrigation

             uniformity analysis  (after Karmeli,  1977).
                                 75

-------
     AE _ 1-(1 - Ymin)2/2b  =  l-(l-a)2/2b  ................ (104)
            Ymin + b/2           a+b/2

It is also interesting to note that the volume of deep perco-
lation or leaching can be determined from Eq. 104 as  follows:

     D  = (l-AE)D  ........................................ (105)
      P          a
where,

     D   =  depth of applied irrigation water (average) ,
            in millimeters; and
     D   =  deep percolation in millimeters.

     Much of the previous work in evaluation and design of
sprinkler irrigation systems utilized uniformity criteria based
on statistical deviation in water distributions.  The most
commonly used approach was introduced by Christiansen  (1942) ,

                N        _
     UCC  =  1- T.  \Yj_ ~ Y  I   ............................ (106)
                   Ny

where,

     UCC  =  Christiansen's uniformity coefficient;
     y    =  measured depth;
     y    =  mean depth of application; and
     N    =  number of data.

Later, Hart and Reynolds  (1965) found that the distribution
patterns under many sprinkler systems are normally distributed
and based another uniformity coefficient on this assumption:

     UCH  =  1- °'7^8S .................................... (107)
                   T r

in  which ,

     UCH =  Hart's uniformity coefficient; and
     s   =  standard deviation.

Work by Karmeli (1977) and Hart (1961) established the following
relationships between the various uniformity coefficients:
                               76

-------
     UCC = 0.030 + 0.958 UCH  (R2=  0.888)  ......            (108)
     UCL = 0.011 + 0.985 UCC  (R2=  0.998)  ........          (109)
     b   = 3.956 - 3.940 UCC  ............................. (HO)

where,

     b = the linear  slope  in  Eq. 103  for  UCL.

     In general, designs which  have a UCC value greater than
0.70 and preferably  0.80 are  considered satisfactory balances
between the costs of increasing uniformity  (closer spacings,
higher pressure, larger piping) and water losses.  Thus, for
most sprinkler systems, the value  of  b in Karmeli's linear
analysis would be approximately 0.80,  assuming a UCC value also
of 0.80.  For this value,  Eq. 104  can be  solved for various
values of Ymin to give a relationship for application efficiency
     The owner-operator of a  sprinkler  irrigation system must
decide how much, if any, of his  field will be supplied with less
water than is needed.  The result will  be a yield decline in the
deficient areas but may not be sufficient to offset the costs of
additional pumping.  If an irrigator supplies the minimum depth
area with the desired depth,  application efficiency will be
about 71%.  Willards^n, et al.  (1977) noted that wind conditions
in many areas would tallow a Ymin value  equal to 0.9 before a
significant yield reduction  (AE  = 76%)  would occur.  Since most
irrigators would not generally allow an appreciable acreage to
be water short if water was available,  an application efficiency
of 76% should represent a typical figure for planning purposes.
It might be noted that an upper  bound on sprinkler application
efficiencies of approximately 90% has been reported (Willardson,
et al. 1977) .

     The salinity reduction achieved by a sprinkler conversion
depends on the corresponding  decrease in the volume of deep
percolation attributed to converting previously surface irrigated
lands to sprinkler systems.   Lands already sprinkler irrigated
would probably not convert to surface systems although a con-
version to drip irrigation may be considered.  In any event,
this analysis assumes that efficiencies among the various types
of sprinkler systems are approximately  the same and conversion
between types is not included.   The reduction in deep percolation
can be written from Eq. 105:

     AD  = (l-AAE)D  ............... ........................ (112)
       P           a
in which,
                              77

-------
     AD   =  reduction in deep percolation, mm; and
     AAE  =  improvement in application efficiency expressed

             as a fraction.

Then, the salinity reduction attributed to this increased
efficiency can be developed from Eq.  78 by replacing Vs by
ADD and accounting for evapotranspiration:
     AS
       AE
                       AD
            (1-AE1)
Q  - 0
12	Z
10
                                            - 5
(113)
in which,

     AS.
       j,   =  reduction in salt loading due to improved
              application efficiencies, metric tons/year/ha; and
     AE1   =  application efficiency under improved conditions
              (expressed as a fraction).

It should be noted that if sprinkler conversion results in the
elimination of field head and tailwater ditches, the correspond-
ing salinity reduction needs to be added to Eq. 113.

     In addition to permanent solid-set sprinklers, side-roll
wheel-move sprinkler and center pivot sprinklers, there are
several other commerically available sprinkler systems which
could potentially be used in an area.  These include hand-move
portable systems, traveler or "big gun", and tow-line systems.

     Hand-move portable systems were the first type of sprinkler
systems developed and still enjoy wide popularity.  They are
usable in any situation where any other types of sprinklers
can be used.  As the name implies, the systems are moved from
set to set by hand labor.  The mainline for these systems may
be either buried and permanent, or may also be portable.

     Many means have been devised to circumvent the labor
problem of hand-move portable systems, one of which is the
center pivot.  This sprinkler system rotates about a central
point  (pivot) in a large circular or ellipical pattern and most
commonly covers 55 to 61 hectares (135 to 150 acres) per system.
The water is supplied through the pivot to sprinklers variably
spaced along the pipe.   The water application rates on a center-
pivot system increases  from the center to the end of the system
due to the increase in  areal coverage.  These systems have
several disadvantages.   As one example, the corners of a square
field are not irrigated, unless by other systems.  In addition,
the water distribution  is often poorer than other systems.
                              78

-------
On some heavy soils where the application rate is higher than
the infiltration rate, erosion may result from the surface,
and traction problems can affect the machine operations.

     Traveler or "big gun"  systems are usually limited to soils
with_high infiltration rates since the sprinkler head is es-
sentially a big gun shooting a large volume of water up to
60 meters (200 feet) or more.  These sprinklers can move down a
lane in the field with a trailer arrangement pulling a long
flexible hose while irrigating, hence the name traveler.  "Big-
gun" sprinklers can also be mounted on permanent towers, which
then becomes a high volume  permanent solid-set system.

     There are several variations on the traveler design in-
cluding a traveling boom type of system which uses several
smaller sprinklers mounted  on a large boom to cover approximately
the same area.  Traveler systems have many of the same dis-
advantages of center-pivot  systems although instead of losing
land at the corners of a field, land is lost in the travel lanes
every 46 to 122 meters  (150 to 400 feet).

     Another type of sprinkler system quite similar to the side-
roll wheel-move concept is  the end-tow or tow line.  As the name
indicates, the system is mounted on skids or wheels, but is towed
from the end to the next set by a tractor or other vehicle.

     A summary of costs for various sprinkler irrigation systems
is shown in Figure 15.  Each of the cost functions have the
form:

     y = a1 + b'/x 	(114)

where,

     y     =  relative capital cost  ($1800/ha = 1.0);
     a',b" =  regression coefficients; and
     x     =  relative field size in hectares  (25 ha = 1.0) .

The cost-effectiveness of a sprinkler irrigation conversion is
then determined by dividing Eq. 114 by Eq. 113.

Trickle Irrigation Conversion —

     Trickle  (or drip) irrigation has emerged during the last
5-10 years as a highly cost-effective method of applying irri-
gation water directly to crop root zones.  The basic concept
is to deliver water to each plant or group of plants on a fre-
quent, low moisture tension basis.  Tests from all over the
world have demonstrated significant yield increases, water
savings, and reduced labor  requirements from trickle irrigation
systems.  Until now, however, the development of the system
                              79

-------
00
o
         2.0

         1.8

         1.6

         1.4
      S.  1.2
      o
      g  1.0
      o
      o
       -  0.6
      o
      OL
      at
      o
      O
         0.4
         0.2
                 _L
D Solid  Set Sprinkler
A Trickle
O Side-roll Sprinkler
• Handmove  Sprinkler
                                           y = 1.15 +0.078/X
                                           y = 0.95+9.4 x I0"4/x
                                           y= 0.25+0.13/x
                                           y= 0.14 + O.I3/X
                                                            a
                                      j_
0   0.2   0.4   0.6  0.8
                                      1.0   1.2    1.4   1.6   1.8   2.0  2.2
                                       Area  Ratio,  Area/25 ha
                                            2.4   2.6   2.8  3.0
      Figure 15.  Dimensionless cost functions for  various types  of pressurized
                   irrigation systems.

-------
hardware has been somewhat  inadequate  in meeting  the needs en-
countered in areas where  the water  contains  substantial quanti-
ties of_sediment or organic materials.  Today,  the trickle
irrigation technology  is  well developed and  tested.  The costs
of trickle_irrigation  systems are shown in Figure 15  (Geohring,
1976).  This work was  based on orchard systems  where the costs
would be substantially lower than for  agronomic or vegetable
crop applications.

     A detailed analysis  of trickle irrigation  uniformities
and efficiencies is given by Keller and Karmeli (1975) and by
Goldberg, et al.  (1976).  The standard design practice is to
provide for a 10% or less leaching  fraction.  Application
efficiencies, therefore,  would be designed at the 90% and above
level.  The existing literature as  summarized by  Smith and
Walker  (1975) indicates that this level of application is gener-
ally achieved in field situations.  Consequently, application
efficiencies can be assumed at 90%  unless otherwise indicated.
The resulting cost-effectiveness for salinity control can then
be determined as described  in the previous paragraphs.

Automation of Surface  Systems —

     Water and energy  savings are often noted as  limiting re-
sources in irrigated agriculture, but  neither has produced the
changes in the irrigation industry  that are  attributable to
labor savings.  In fact,  water and  energy savings are generally
achieved as a result of more capital intensive, automated irri-
gation systems because irrigation efficiencies  are increased.
Automation has, therefore,  become one  of the most consistent
trends in irrigation.

     A completely automatic surface irrigation  system would not
only sense the need for an  irrigation, but also route the water
from the source to the field, irrigate the field  effectively,
and turn off and reset the  system for  future operations.  Most
of the automation incorporated in irrigation systems has been
limited to control of  the volume of water applied to the field.
In surface irrigation,  the  principal use of  automation has been
associated with"cutback irrigation  in which  the field is watered
thoroughly with an initially high flow rate  to wet the field and
then the flow is reduced  to allow for  adequate  intake oppor-
tunity time without excessive tailwater.

     The impact that automation might  have on salinity which is
primarily a subsurface problem is limited to controlling the
duration of irrigations' so  that the depth of infiltration closely
approximates the soil  moisture storage capacity in the root
zone.  Thus, automation is  primarily a substitute for labor
during irrigations, in fact, up to  92% (Humphreys, 1971).
Irrigation efficiencies have been reported as high as 95% under
automated systems (Worstell, 1975)  but are generally found to


                              81

-------
be 75-85%  (Somerhalder , 1958; Fischbach and Somerhalder,  1971;
Humphreys, 1971; and Evans, 1977).  Costs have to be determined
for a variety of systems although no general estimating analyses
have been completed.  For most purposes, automation of surface
irrigation systems can be estimated to be 1.5 to 2 times  the
costs of concrete linings or gated pipe (Worstell, 1975);  Evans,
1977) .

Evaluation of Existing Efficiencies

     The increase in application efficiency achieved by either
a conversion to another method of irrigation or improvements
in the existing system depends also upon the efficiency of the
existing irrigation practices.  This difference in application
efficiency is very important to the cost-effectiveness relation-
ship for managing the quality of irrigation return flows.  For
instance, if furrow irrigation application efficiencies are
nearly those of a proposed sprinkler system, the implementation
of the conversion would mean high costs with low salinity
reductions.

     Evaluation of existing surface irrigation application
efficiencies is often a difficult task unless some proven mathe-
matical approaches are applied.  The primary element in surface
irrigation evaluations is definition of soil intake or infil-
tration rates.  Many empirical equations have been proposed, but
the most commonly employed is the relationship introduced by
Kostiakov  (1932) :

     i = atb .............................................. (115)

where,

     i   =  infiltration rate in cm/min;
     t   =  interval since infiltration began, min; and
     a,b =  empirical regression coefficients.

Integrating Eq. 115 over the irrigation interval yields:
in which,

     I = cumulative soil infiltration, cm.

Because the intake opportunity time varies in a field due to the
time required for water to reach a point, the infiltration depth
over a field's length will also vary.  A commonly employed
function expressing the relationship between the advance rate
and time is :
                              82

-------
     x - pt
                                                            (117)
where,
     x
         =  distance along  the  flow  path  in  cm;
     tx  =  time to advance  x  centimeters, min;  and
     p,r =  empirical  regression  coefficients.

Actually, the parameter r  can  be  very well approximated without
field data if the infiltration exponent, B,  is known  (Fok and
Bishop, 1965) :

     r = exp(-0.6B) ....................................... (118)

Generally, however, r  is determined by  field data enroute to
defining B.  If Eq. 117 is adequate, the value of r can be
determined by knowing  the  advance time  to any two points along
the field.  For instance,
     r = 0.69/ln T

in which,
                                                            (119)
     T =
                                                            (120
where,
     tn ,-T  =  time necessary  to advance one-half the field
               length, L; and
     t_     =  time necessary  to advance the entire field
               length .

It can be seen that with very  simple advance data, the exponent
in Eq. 117 can be determined,  thereby also dictating p when one
point is observed.  It should  be noted however, the parameter
p encompasses surface roughness and flow rate and will change
from irrigation to irrigation.

     The volume (V. ) of water  infiltrated into the wetted furrow
                  .
length at any time,
                        is determined by:
V  = ID
            "2
             x
             /
             o
Idx = ID
                              '2
       A
                                        x
                                        /
                                        o
                                             (t.- t ) clx  ...(121)
                                              £   x
Since dx =  (9x/3tx)  • dtx, the limits of integration can be
expressed in limits of time with' the aid of Eq. 117:
V0 = A-p-r-10
                  -2
  /
  0
(t--  t
                                   )B't r"1dt
                                       x
                                                            (122)
                              83

-------
Noting also that if t = tx.t£,  (0<_t£l) ,  is  substituted into
Eq . 120, a definite integral results:

                             i
     V0 = A-p-r- t0B+r-10-2- /    (l-t)Btr~1dt  ............. (123)
      *           *          0

which has the following solution
                                 ,
     V£= A-p-t£B+rf3(B+l, r+1)  -ICT2 ........................ (124)

where,

     3 = beta function.

Christiansen, et al .  (1966) showed  that the beta function  could
be closely approximated for conditions found in surface  irri-
gation by the expression:

     3(B+l,r+l) =  (b-b-r+2) /  |(b+2)(r+l)| ................ (125)
['
     To evaluate the parameters needed to utilize Eq.  124,  a
mass balance approach may be taken for a series of lengths
such that:


     V  = Vq " Vs  ........................................ (126)
             w

where,

     V   =  volume  (constant flow rate) introduced into  the
      "     furrow at time t]_, cm 3/cm;
     V   =  volume in surface storage at time t^ , cm  3/cm;
     w   =  furrow spacing (or unit width for borders) ,  cm;  and
     V.  =  value of V0 for various advance distances, x..
      1               X>                                  JL
Generally, ¥„ is measured at the field inlet leaving Vs  to be
determined.  Wilke and Smerdon (1965) proposed that the  average
cross-sectional area of flow be described by the relationship:
           N
     C = MdQ .............................................. (127)

in which,

     C   =  average cross-sectional area, cm2;
     d0  =  normal depth at field inlet, cm;
     M   =  8.59 for furrows and 1 for borders;  and
     N   =  1.67 for furrows and 1 for borders.
                               84

-------
Both M and N can be evaluated  by furrow cross-sectional
measurements.  The normal  depth  was  based on  Manning's Equation
(n = 0.047) :


     do = 0.60  lQ/so°-5]   °-"  	(128)

in which,

     Q  = furrow flow  rate or  border unit flow  rate,  £/min;  and
     SQ = field slope  in percent.

     By substituting the right-hand  side of Eq.  124  for Vj_  in
Eq. 126  (t^ becomes t^) and noting that the product  of C  in
Eq. 127 and the advance distance x.^  equals Vs,  Eq. 126 becomes
after simplifying and  correcting for units:

                     B+r    Vq  ~  xiC  "  10
     A • 3(B+l,r+l)tjLB+r  =  — - - -
                           w  •  p  •  10

A logrithmic plot of  the  right  side of  Eq.  129 against time, tj_,
will yield a straight line of slope B+r from which each of the
unknowns in the  infiltration  equation  (A,B) can be determined.

     Application efficiencies can be determined from the
preceding analysis by defining  the  average  depth of moisture
needed to refill the  crop root  zone, D,  in  cm.  Then from Eq.
116, the time necessary to infiltrate the desired depth is:


     tD =  (D/A)1/B ........................................ (130)


where tD is time in minutes water must  infiltrate at a specific
point to replace the  depth D  in the root zone.  Three cases for
the furrow irrigation regime  may  be detailed:   (1) the under-
irrigated case where  the  lower  reaches  are  not completely
refilled (Figure 16) ;  (2) the case  where the minimum irrigated
area is refilled (Figure  17) ; and (3) the general over-
irrigated case  (Figure 18) .

     The earlier discussion regarding the infiltration
evaluation covered only the advance phase of irrigation.
Actually, the analysis is valid for periods longer than this
by assuming that the  furrow extends indefinitely.  Thus, if the
total time water is applied to  the  furrow  (set time) , is again
represented by t£, t£>tL, the length of advance predicted by
Eq.  117 would be:

     £ = pt?  ............................................. (131)
           A/
                               85

-------
                   L
                   £
          =  Field Length,  m
          =  Advance Distance During Irrigation
            Interval, m
          =  Depth of  Infiltration , cm
         -  Root Zone Soil  Moisture Holding
            Capacity, cm3/cm
Figure 16.
Definition  sketch of surface  irrigation application
uniformity  in  the case where  part  of the field  is
under-irrigated.
                               86

-------
                     L
                     £
           = Field Length,  m
           = Advance Distance During Irrigation
             Interval, m
           = Depth of Infiltration,  cm
           -  Root Zone Soil Moisture Holding
             Capacity,  cm3/cm
Figure 17.
Definition sketch of surface  irrigation application
uniformity in the case of  zero  under-irrigation.
                                87

-------
                     L
                     £
             Field  Length,  m
             Advance Distance During  Irrigation
             Interval, m
             Depth of Infiltration,  cm
             Root Zone Soil Moisture  Holding
             Capacity,  cmVcm
Figure 18.
Sketch of  surface irrigation  uniformity under
conditions  of  significant over-irrigation.
                                88

-------
where £ is the total  "equivalent"  field  length, m.   The  volume
of infiltration over  the  length  £,  V0  is  determined  from Eq.
124.                                 l

     Referring to Figures 16,  17,  and  18  again, it is  seen  that
in order to compute the volume of  deep percolation and tailwater,
Eq. 123 must actually be  solved  for various  fractions  of t^.
Specifically, for any time t'  such that  0
-------
     A  _ _ root zone storage

          total  infiltrated volume



             A'  +  A'


                                 ........................... (136>
The second,  field  efficiency,  FE,  is:



        _     root  zone  storage
     C El — - ' -
          total  field deliveries



               A'  +  A'

        = ,, ^ _f  _._  -t ^  .,	  x 100 	(137)
          A* J_7\"  4-  &  4-  A *
          Al   A2    A3   A5



Note that where  the  least irrigated areas along the furrow are

refilled, A' and Al  are equal to zero.




     Values for  the  respective segments of the infiltrated and

runoff volumes along a furrow are determined using the solutions

to fiq. 132 as follows:



     A' = X_D, Xn  <  L 	(138)
      X    U     L)  —



     A£ = 10~2-A-p'tB+r.M^   - A^ 	(139)





                        M'   - A' - A',  X_ < L 	(140)
      ~J              A/    IN,-     X    £   U 	
                          JL



     A^ = 0, XD  >_  L  	(141)




     A| = L-D -  Aj_ - A^,  XD  <_ L 	(142)





     A4 = °' XD  -  L  	(143)


     ^i   irt-a -»   ...B+r fb - br + 2 ,   ,,   , ,    ,.         ,-,*^
     A^ = 10 2-A-p-t£  |  TKXoT^GTrr I ~  Ai - AJ  - A£ 	(144)




where,
-] - »' - A' - A'
     M'  = r I  (l-t)B  tr  Xdt,  R  = t /t  .................. (145)

       DO
and,
         - r  /  L   (l-t)Btr~1dt, RL = tL/tp. ................ (146)
                               90

-------
                            SECTION  7

             OPTIMIZING  DESALINATION-AGRICULTURAL
                  SALINITY  CONTROL  STRATEGIES


INTRODUCTION

     The mathematical procedure  outline  earlier describing the
selection of optimal salinity  control  strategies for four sub-
divisions within a river basin might be  more clearly illustrated
through an application to a case study.  Walker  (1976) and
Walker, et al.  (1977) presented  a similar  analysis using pre-
liminary results of this project and that  reported by Evans, et
al.  (1978a, 1978b) and Walker, et al.  (1978).  The Grand Valley
of western Colorado is the  principal focus of the work cited
above.  Its popularity as a location of  field scale research
into the Colorado River  salinity problem in recent years pro-
vides a convenient setting  for the  developement of an analysis
such as contained in this report because of a comparatively
large data base.  The report by  Walker,  et al.  (1978) contains
the results included in  the following  paragraphs and an evalu-
ation of the sensitivity of the  results  to the input data and
assumptions.  This report is intended  as a presentation of the
analytical development,  and therefore, will not consider the
various model sensitivities under Grand  Valley conditons.  The
cost-effectiveness parameters  selected for the calculations
contained in the report  have been taken  from the references
cited here with the exception  of the on-farm improvements rela-
tionships.  The results  reported by Walker, et al.  (1977) were
based on very preliminary estimates of the on-farm costs and
associated salinity reductions,  and tend to be towards the con-
servative side of the range of possible  values.  Results
presented herein will encompass  the high range and will therefore
indicated some differences  in  the optimal  practices in the
valley.

     It will become apparent to  the reader that an interesting
evolution has occurred in the  study of agricultural pollution
problems.  At the earliest  stages most of  the investigative
efforts are devoted to problem identification in small "repre-
sentative" areas in a system.  Collected data are detailed in
both spatial and time references and simualtion models are
sophisticated treatments of  the  complex  physical-chemical-
biological irrigation system.  These studies indicate the
                               91

-------
interrelationship between the natural and operational system,
thus, pointing out the factors of most impact.  Attention then
is diverted to extending the "laboratory" studies to the full
scale of the irrigated valley or subbasin.  Parameters become
lumped through averaging and time resolutions are aggregated
into weekly or monthly events.  Models become input-output
devices using mass balance as the main verification or calibra-
tion criterion, but they absolutely assume that their inherent
simplifying assumptions are congruent with the specific nature
of the real system as understood from the detailed modeling
evaluations.  And finally, the question is asked, "what should
be done to improve the quality of the return flows?"  Input
becomes "single-valued", "long-term average", and annual in
nature.  Models become management or optimizational types rather
than simulation tools, but must again conform to the essential
boundary conditions identified by the more detailed analysis.

     In this section, the application of the optimizational
modeling approach is illustrated for two levels of a four-level
problem.  And although the results do not include sensitivity
analysis due to the scope of the report, it should be noted that
the integration of the studies mentioned in the previous para-
graphs tends to mask the spatail variability inherent in the
real system.  Consequently, sensitivity analysis becomes the
only effective method of insuring that this variability is
considered.

DESCRIPTION OF THE CASE STUDY AREA

     In the mid-1960's, a concerted effort was undertaken to
identify the sources of salinity in the Colorado River Basin.
The Federal Water Pollution Control Administration, then within
the Interior Department, utilized U.S. Geological Survey stream
gaging data as well as an extensive water quality sampling pro-
gram to identify the major salt contributors in the basin (U.S.
Environmental Protection Agency, 1971).  The Grand Valley in
western Colorado was described as one of the largest agricul-
tural sources of salinity (about 18% of the total Upper Basin's
agriculturally related contribution), and it subsequently became
the site for the first studies to evaluate field-scale salinity
control measures.

     The early studies identified the Grand Valley as a major
problem area by mass balancing water and salt flows into and out
of the valley region.  Similar investigations bv lorns et al.
(1965)  and Hyatt et al. (1970) produced supportive results,
although a substantial variability in the specific nature of
the Grand Valley salinity problem emerged.  Since that time, a
great many individual calculations describing the valley salt
loading and the respective components have been made, but very
little agreement existed until early 1977 when most studies were
completed.  Although some variability still exists among the


                              92

-------
various investigative  groups,  the  differences  are  sufficiently
close that they become relatively  unimportant  in evaluating
optimal salinity control  policies  in  the  valley.

Problem Identification

     The procedures  for delineating the water-salt flow system
in an irrigated area are  collectively termed hydro-salinity
budgeting, or hydro-salinity modeling, since computers are
generally needed to  handle  the large  number of necessary cal-
culations.   In the Grand  Valley, the  composition of this system
has-been extensively investigated  at  various levels of sophisti-
cation.  As  the salinity  investigations were continued, refine-
ments in the valley's  basin-wide impact have been  made and
verified.   Interestingly, the  research evolution in the Grand
Valley case  study suggests  a fairly sound approach for other
areas as well.

     The problem of  remedying  an irrigation return flow causing
detrimental  water quality deterioration can be divided into
four logical steps.  First, the magnitude of the problem and
the downstream consequences must be identified in  relation to
the irrigated area's individual contribution to the problem.
In this way, the most  important areas can be delineated for
further consideration, thereby making the most cost-effective
use of available personnel  and funding resources.   As noted
previously,  this step  led to the exhaustive efforts in the Grand
Valley that  this case  study reports.   Next, the components of
the problem  must be  segregated. In most large  areas, the costs
of studying  the entire system  are  prohibitive, so  smaller
"sampling" studies are conducted from which projections are made
to predict the behavior of  the entire area.  The third step is
to evaluate  management alternatives on a  prototype scale in
order to assess their  cost-effectiveness  and develop a sensi-
tivity about the capability for implementing such  technologies.
And finally, if the  measures which can be applied  are effective
in reducing  salinity and  are economically feasible, the final
step is the  actual application of  the technology to solving the
water quality problem.

     The Grand Valley  was identified  as an important agricul-
tural source of salinity  in the Colorado  River Basin through a
series of analyses involving mass  balance of the valley inflows
and outflows.  lorns et al.   (1965) evaluated  stream gaging
records for  the 1914 to 1957 period,  concluding that net salt
loading (salt pickup)  from  irrigation in  the valley ranged from
about 450,000 to 800,000  metric tons  annually.  This range of
numbers has  been generated  independently  by Hyatt  et al. (1970),
Skogerboe and Walker (1972), Westesen (1975),  and  the U.S.
Geological Survey  (1976).  More recent consideration of data
by the writer and others  indicates a  long-term salt pickup rate
between 600,000 to 700,000 metric  tons/year.   This figure is now


                              93

-------
generally accepted by the various research groups and action
agencies involved with Grand Valley salinity investigations.

     The fact that the valley's salinity contribution has been
such a disputed figure over the last five years exemplifies the
importance of establishing the total valley contribution.  In
areas like the Grand Valley where the total valley impact is
only 5-8% of the river inflows or outflows, the impact of
irrigation must be established using statistical analyses of
the available data.  However, the natural variability can cause
serious errors in conclusions regarding salt pickup if not
tempered by other data.  For example, a major problem in early
investigations was deciding how much of the inflow-outflow
differences was due to natural runoff from the surrounding
watershed.  Because of the meager precipitation locally, the
writers assumed the natural salt contribution would be negligi-
ble.  This conclusion was later substantiated partially by
Elkin (1976) who estimated an upward limit for the natural
contribution of about 10% of agricultural figures.

Segregating the Irrigation Return Flow System

     In the Grand Valley, as in numerous other irrigated areas,
water is supplied to the cropland in a canal, ditch, and lateral
conveyance system.  Water is diverted from the Colorado and
Gunnison Rivers into three major canals:   (1) the Government
Highline Canal; (2) the Grand Valley Canal; and (3)  the Redlands
Power Canal.  These large canals in turn supply the smaller
canals and ditches as follows:
Government
Highline
Canal
Stub
Price
Grand Valley
Canal
G.V. Mainline
G-V. Highline
Redlands
Power
Canal
Redlands
Redlands

#1
#2
Orchard Mesa Power     Mesa County
Orchard Mesa #1        Kiefer Extension
Orchard Mesa #2	Independent Ranchmen' s	

A description of the hydraulic characteristics of these canals
and ditches is given in Table 11, based on information provided
by the Bureau of Reclamation.  From the canals and ditches,
water is diverted into the small, largely earth ditches leading
to the individual fields.  This lateral system of approximately
600 kilometers of ditch carrying from 0.06 - 1.0 m3/sec.  A
frequency distribution of the lateral lengths based on data
provided by the Bureau of Reclamation indicated that the average
length is about 400 meters, with an average capacity of about
0.10 m3/sec.
                               94

-------
TABLE 11.
HYDRAULIC CHARACTERISTICS OF THE GRAND VALLEY
       CANAL AND DITCH SYSTEM
Name
Government Highline Canal
Grand Valley Canal
Grand Valley Mainline
Grand Valley Highline
Kiefer Extension of
Grand Valley
Mesa County Ditch
Independent Ranchmen ' s
Ditch
Price Ditch
Stub Ditch
Orchard Mesa Power Canal
Orchard Mesa #1 Canal
Orchard Mesa #2 Canal
Redlands Power Canal
Redlands #1 & #2 Canals
Length
(km)
73.70
19.80
21.70
37.00

24.50
4.00

17.40
9.50
11.30
3.90
24.10
26.10
2.90
10.80
Initial
Capacity
(nr/sec)
16.99
18.41
7.08
8.50

3.96
1.13

1.98
2.83
0.85
24.07
3.12
1.98
24.07
1.70
Terminal
Capacity
(nr/sec)
0.71
14.16
0.71
3.96

0.71
0.06

0.85
0.28
0.11
24.07
0.17
0.17
24.07
0.06
Initial
Perimeter
(m)
19.19
16.67
13.86
12.62

7.25
6.67

3.17
7.27
2.94
18.20
6,46
3.58
16.88
3.95
       Nearly all farmers in the valley apply water using the
  furrow irrigation method.   The Soil Conservation Service (SCS)
  inventory of the valley's  irrigation system indicates over 9,000
  individual fields in the valley having a wide range of widths,
  slopes and lengths.   The typical field is 140 meters wide, 160
  meters long, with a  slope  (toward the south generally)  of 1.125%.
  A frequency distribution of field acreages showed the typical
  field encompassing a little more than 2 hectares.  Calculating
  the  length of unlined field head ditches based on the SCS data
  indicates a total length of 1300 kilometers.

       Irrigation water is applied to approximately 25,000
  hectares  during the  course of a normal irrigation season (Walker
  and  Skogerboe,  1971).  This acreage has been substantiated by
  the  recent SCS inventory and generally accepted by the other
  agencies.   A graphical breakdown of the acreage and miscellaneous
  land use  in the valley is  given in Figure 19.

       Based upon lysimeter  data reported by Walker et al. (1976)
  the  weighted"average consumptive use demand by the irrigated
  portion of the area  equals about 0.745 meters per season.  This
  breakdown of the individual consumptive uses in the valley is
  given in  Table 12.

       The  irrigation  return flow system in the valley may be
  divided according to whether or not the return_flows are surface
  or subsurface flows.  Surface flows occur as either field
                                95

-------



100

CO
w
o
o
80
0
O

o
U)
13 40
T3
C
O


20



0


_



-












»_




-




—




Sugar Beets
Orchards

Grain


Idle


Pasture


Corn



Alfalfa



Irrigable
Croplands
miscellaneous












Industrial
Municipal


Municipal-
Industrial


















Open Water
Surfaces


Phreatophytes


Barren
Soil



Phreatophytes
and
Open Water
Municipal -
Industrial

Phreatophytes
and
Barren Soil








Irrigable
Croplands


















-




-




„







w w


40




a>
30 2
0

O

c
20 j
in
•o
c
o
_J

10





0
Total

Barren Soil
Figure 19.  Land use in the Grand Valley.
                              96

-------
     TABLE  12.      CONSUMPTIVE USE ESTIMATED FOR THE
     	GRAND VALLEY	

                                    Volume    Depth
     Consumptive Use	in ha-m  in Meters

     Open water surface evapora-
     tion and phreatophyte use1     3,450    0.138

     Open water surface evapora-
tion and phreatophyte use
Cropland
TOTAL
8,400
18,600

30,450
0.336
0.745

1.219
      Adjacent to river
      'along canals and drains
      3 assumed area of 25,000 ha
tailwater or canal, ditch, and lateral spillage.  Subsurface
flows include canal and ditch seepage, lateral seepage, and
deep percolation from on-farm applications  (deep percolation
in this sense to include head ditch and tailwater ditch seepage).

Canal and Ditch Seepage —

     Since the early 1950's, five major seepage investigations
on the valley's major canals and ditches have been conducted
(Skogerboe and Walker, 1972 and Duke et al.  (1976).  Although
seepage rates have been noted over a wide range, some repre-
sentative rates are presented for the fourteen canal systems
in Table 13.  Substitution of the values in Table 13 into the
equations of Section 6 yields a seepage volume for each canal
and ditch (Table 13).  In the Grand Valley, the canal seepage
is estimated to be approximately 3,700 ha-m per year.

Lateral Seepage —

     Tests reported by Skogerboe and Walker  (1972) and Duke et
al. (1976) indicate seepage losses from the small ditches
comprising the lateral system probably average about 8 to 9
ha-m/km/year in the Grand Valley.  Thus, for the 600 km of small
laterals, the total seepage losses are approximately 5,300
ha-m annually.  Combined lateral and canal  seepage xs, there-
fore,  approximately 9,000 ha-m annually.


                              97

-------
 TABLE 13. SEEPAGE DATA FOR THE FOURTEEN MAJOR CANAL  SYSTEMS
           IN THE GRAND VALLEY.
Name of Canal or Ditch
Government Highline
Grand Valley
Grand Valley Mainline
Grand Valley Highline
Kiefer Extension
Mesa County
Independent Ranchmen ' s
Price
Stub
Orchard Mesa Power
Orchard Mesa *1
Orchard Mesa #2
Redlands Power
Redlands 1 & 2

Seepage
Days in Seepage Rate Volume
Operation b m3/m /day ha-m
214
214
214
214
214
214
214
214
214
365
214
214
365
214

0.80
0.17
0.69
0.29
0.60
0.64
0.31
0.65
0.44
0.001
0.72
0.62
0.001
0.67

0.091
0.045
0.061
0.061
0.061
0.061
0.061
0.061
0.061
0.076
0.076
0.076
0.065
0.137

1652.53
290.84
257.16
521.16
162.31
23.68
60.84
60.86
33.83
196.80
162.05
104.86
116.08
83.17
3726.17
 On-Farm Deep,Percolation  —

      Numerous studies  in  recent  years  have  attempted  to
 quantify deep percolation from on-farm water  use.   Skogerboe
 et  al.  (1974a,  1974b)  estimated  these  losses  (including  head
 ditch and tailwater ditch seepage)  to  be about  0.30 ha-m/ha.
 Duke  et al.  (1976) estimated  these  losses,  independent of  ditch
 seepage,  to be  0.15 ha-m/ha.  Minutes  of the  Grand Valley
 Salinity Coordination  Committee  show on-farm  ditch  seepage to
 be  0.12 ha-m/ha (Kruse, 1977).   Combining the figures given
 by  Duke,  et al.  (1976) with Kruse  (1977) gives  a"total on-farm
 subsurface loss of 0.27 ha-m/ha.  Given the large number of
 fields  tested by various  investigators, total on-farm losses
 are probably  about 7,500  ha-m/per year.

 Canal Spillage  and Field  Tailwater  —

     The  operational wastes and  field  tailwater are difficult
 to define because, first, they do not  generally create problems
 associated with salinity  degradation,  and second, data regard-
 ing these flows are sparse.  Skogerboe et al. (1976b)  listed
 fiel!d tniQ1^ter 3S 43% °f fieM  applications, whereas Duke,
etal._ (1976)  reported  estimates  of  canal  spillage or  admini-
strative wastes which were 18% and  35%, respectively.   Estimates
of spillage and tailwater by the Bureau of Reclamation were
                              98

-------
slightly smaller than the author's  estimate.  Using the  43%
figure for field tailwater and  the  18%  figure for canal  spillage
yields about 37,000 ha-m per year field tailwater and spillage.

     Aggregating the data presented previously with inflow-
outflow records in the vicinity of  Grand Valley gives a  clear
picture of how the irrigation system relates to the overall
hydrology  (Figure 20).  The flow diagram is particularly helpful
in visualizing the relative magnitude of the irrigation  return
flows from the agricultural area.

Identifying the Salinity Contribution

     The salinity contribution  of the Grand Valley hydro-
salinity system can be developed in a number of ways.  For
example, if the annual salt pickup  is divided by the volume
of groundwater return flow  (630,000 tons/8100 ha-m), the average
concentration of the return flow can be determined  (7,800 m/£).
Data reported by Skogerboe and  Walker  (1972) indicated an
average groundwater salinity of 8,000 to 10,000 mg/£  (average of
8,700 mg/£) if the irrigation water salinity is 500-1,000 mg/jl.

     The U. S. Geological Survey and others have recently
measured surface drainage return flows  at  selected areas in the
valley.  These data indicate an average salinity of about 4,000
mg/Jl.  Thus, as Duke et al.  (1976)  pointed out, if all return
flows were through the drainage channels and phreatophyte
consumptive use was not considered,  the  calculation of salt
pickup would result in an estimated valley-wide contribution of
approximately 660,000 tons.  Consequently, the two salt  loading
figures, as predicted by inflow-outflow mass balancing and cal-
culation using local data are sufficiently close to be confident
in the values.  Based on the figures pointed out in these pre-
ceding paragraphs, the salt loading due to irrigation in the
Grand Valley can be segregated  as follows:

     1.  Canal and Ditch Seepage                   23%;
     2.  Lateral Seepage                           32%;
     3.  On-farm Losses                            45%.

DEVELOPMENT OF FIRST LEVEL COST-EFFECTIVENESS FUNCTIONS

     The array of salinity control  alternatives applicable as
first level measures in the Grand Valley are considered  in four
primary classes:   (1) on-farm structural and operational
improvements;  (2) lateral lining by slip-form concrete or
plastic pipeline;  (3) concrete  canal linings; and  (4) collection
and desalination of subsurface  and  surface drainage return
flows.  This list of basic salinity control measures  is  not
intended to be exhaustive although  these include those most
                               99

-------
o
o
            Plateau Creek Inflow//
               13,800 ha-m)
         Colorado River Inflow
           ( 297,650 ha-m)
                      Cropland
                    Precipitation
                     ( 3,IOOha~m)
               Gunnison River Inflow
                 ( 178,000 ha-m)
                                                         Evaporation 8i Phreatophyte Use
                                         Canal Diversions  Adjacent to River ( 3,450 ha-m)
                                           ( 69,000 ha-m) y        ^^  Irrigation from Return Flow ( 45,100 ha-m )
                                        Canal a Lateral
                                        Seepage
                                        (9,000 ha-m
                                                   Tailwater 8
                                                SpjJIs (37,000 ha
Net Evaporation Q
Phreatophyte
Evapotranspiration
 ( 8,400ha-m)
                                                                      Deep Percolation
                                                                       (7,500 ha-m)
                                                              Cropland Evapotranspiration
                                                                  (  18,600 ha-m)
                     Colorado River
                        Outflow
                       (459,IOOha-m)
      Figure 20.   Mean annual  flow diagram of the Grand  Valley  hydrology.

-------
likely to be actually authorized by  the  state and  federal
agencies responsible for controlling water quality.

     At the first level there  is one point that needs discussion.
In the irrigation system, costs occur as either capital invest-
ments or annual operation-maintenance expenses.  It is the
feeling of the writer that O&M costs should not be factors in
the evaluation of salinity control cost-effectiveness because
the primary objective is to upgrade  the  existing system.  Thus,
the objective is to help an irrigator or conveyance company
make more efficient use of water and thereby reduce the irri-
gation return flow volume, but not to directly subsidize farm
production.  To do so would be to violate the selection of
"minimum cost" optimization criterion described in Section 4,
even though the capital improvements themselves create produc-
tion increases from the farm when better water management
implies higher yields.  The increases in yield would be very
small in comparison to the "yields"  realized by operation and
maintenance support as part of a salinity control program.  In
an "about face", operation and maintenance costs are included
in desalting facilities because they assume no broader purpose
than salinity control in this  analysis.  If product water was
sold to municipal, industrial, or agricultural users rather
than returned to receiving waters such costs may not be included.

On-Farm Improvements

     On-farm water management  improvements which improve
irrigation efficiency and thereby reduce return flows include:
(1) improved irrigation practices implemented through irrigation
scheduling; (2) structural rehabilitation; (3) conversion to
more efficient methods of irrigation; and (4) relief or inter-
ceptor drainage.

Irrigation Scheduling --

     Recent studies in Grand Valley  have indicated that irri-
gation scheduling services, even when accompanied by flow
measurement structures, generally do not significantly improve
farm and application efficiencies (Skogerboe, et al. (1974a).
A west-wide review of irrigation scheduling by Jensen (1975)
indicated that a 10% improvement (from 40 to 50%) is realisti-
cally possible without system  conversions or more energy
intensive operations.  In the  Grand  Valley, an irrigation
scheduling service which included water measurement and farmer
training would cost an estimated $30/ha and would reduce return
flow salinity by about 20,000  metric tons annually.  Since it
is not known how irrigation efficiencies may be distributed,  it
is assumed that these figures  may be linearly extrapolated
yielding a cost-effectiveness  function for irrigation scheduling
of $37.50/ton with a limit of  20,000 metric tons amenable to
this approach.


                             101

-------
     The overall impact of irrigation scheduling being only
10% of the total estimated on-farm potential improvement is
insignificant by itself when considering the sensitivity of
these type of costing estimates.  Consequently, irrigation
scheduling should be considered part of other measures rather
than considered a separate alternative salinity control measure.

Structural Rehabilitation —

     Irrigation efficiency can often be substantially improved
by rebuilding and remodeling existing systems.  The most
commonly employed irrigation method in the valley is the furrow
irrigation method.  Structural improvements in this system may
include concrete lined head ditches or gated pipe to reduce
seepage losses, land leveling for better water application
uniformity, adjusting field lengths and water application rates
to be more congruent with soil and cropping conditions, and
automation to provide better control.  Flow measurement and
scheduling services should accompany these types of improvements
in order to maximize their effectiveness.

     In the Grand Valley, head ditch requirements are generally
less than the capacity of the smallest standard ditch available
through local contractors (12 inch, 1:1 side slope, slip-form
concrete).  Consequently, lining costs can be expected to be
linearly distributed.  In Section 6, Eq. 73 was presented to
estimate concrete lining costs (for small ditches the second
term can be dropped):

     Cc = 40.10 °'56	 (147)


where,

     Cc = total lining cost, $/m; and
     Q  = channel capacity,  m3/sec.

Assuming an average head ditch capacity of 0.05 m 3/sec, Eq.
147 yields an estimated unit cost of $7.50/m.   This figure is
well within the range encountered in the last two seasons in
the valley.  As noted earlier, six-inch diameter aluminum pipe
costs approximately the same and can be arbitrarily substituted
with equal cost-effectiveness.  There are approximately 1.3
million meters of head ditches in the Grand Valley contributing
an estimated 95,000 metric tons of salt to the river annually.
If linings were assumed to be 90% effective, the cost-
effectiveness of head ditch improvements would be $113.40/ton
(1.3 million meters x $7.50/m -f 86,000 tons).

     Automatic cutback furrow irrigation systems have demon-
strated which, when combined with irrigation scheduling, may
improve application efficiencies to 75 or 80%, thereby

                             102

-------
affecting an additional  60,000  ton decrease beyond the effects
of the linings  (Evans, 1977).   In 1975,  the installed cost of
the cutback systems was  $11.50/m.  Thus,  the  salt load
reductions by lining head ditch (86,000  tons) and the additional
60,000 m ton reduction increased application  efficiency results
in cost-effectiveness is $102.40/ton.  Because of the small
nature of these ditches, linear distribution  can be assumed
without introducing significant error.   In the case of the
Grand Valley, it appears automation may  be added to surface
irrigation systems for the  additional efficiency at about the
same cost-effectiveness  as  the  simple head ditch or gated-pipe
improvements.  Where head ditch capacities are large, concrete
lining would generally be more  cost-effective than piped systems,
Whether or not automated cutback would enjoy  any advantage over
regular linings under these  conditions would require further
evaluation.

     Field lengths may be modified along with land shaping to
improve the uniformity of water applications.  This would be
particularly true in soils  having a relatively high infiltration
capacity, but not as effective  in tight  soils such as those in
the valley.  There appear to be a few studies now underway
which will yield good estimates of surface irrigation uniformity
data on a field scale.   However, at the  time  of this writing,
there does not exist a satisfactory method of evaluating
surface irrigation  uniformities under variably sloped fields.
Consequently, an analysis of the land shaping, run length
alternatives has not been made  for this  study.

System Conversion —

     In order to completely control irrigation return flows, the
method of applying irrigation water needs to  be independent of
soil properties  (sprinkler  and  trickle irrigation systems).  In
earlier sections, the application of sprinkler irrigation
systems was shown to be  approximately 80% efficient  (application
efficiency) whereas trickle systems could be  expected to
operate at the 90% level.   Applying either system to the average
field size in the Grand  Valley  (2-3 hectares) would be very
expensive, so most systems  would irrigate multiple fields.
Figure 15 indicates that portable sprinkler irrigation systems
(sideroll and handmove)  would cost about $900 per hectare for
coverages larger than 10 hectares.  Trickle irrigation systems
would cost approximately $1,800 per hectare for sizes greater
than 2 hectares.  Assuming  irrigators would consolidate
fields sufficiently to avoid the high cost applications on
small fields, and assuming  application efficiencies of 80% and
90% for sprinkler and trickle systems, respectively, the salt
loading reduction for each  system can be calculated as follows
(an existing application efficiency of 64% is determined from
the valley hydro-salinity data):
                               103

-------
     SLR= SCDS+
                                                            (148,
where ,

      SLR  =  tons of salt loading reduced per hectare;
      SCDS =  tons  per  hectare reduced assuming the pressurized
             systems eliminate head ditches;
      TOPS =  total on-farm salinity, 190,900 tons;
      TA   =  total "irrigated acreage, 25,000 ha; and
      AE   =  application efficiency expressed as a fraction.

Thus, for sprinkler systems the per hectare salt decrease is
6.84  tons and for trickle irrigation systems, 8.96 tons.  Mobile
or portable sprinkler systems would have average salinity
cost-effectiveness ratios of approximately $131.58/ton where
the respective average for trickle systems would be about
$200 . 89/tori.  Solid-set sprinklers would be at least double
these figures and are therefore not evaluated.  Center-pivot
systems would be difficult to apply in the Grand Valley because
of the small average size of land holdings.

Field Drainage —

      The low permeability of Grand Valley soils dictate rela-
tively close drain spacings (12-24 meters) .  Although field
drainage has been proven partially effective in reducing salt
pickup (Skogerboe, et al. 1974b) , the costs are so high that
drainage would not be competitive with other salinity control
measures.  Evans, et al. (1978a) report drainage cost-effectiveness
values ranging in the thousands of dollars per ton.  As a result,
field drainage would not be included in any local salinity
control policy.

Optimal On-Farm Improvement Strategies —

     The first level cost-effectiveness function representing
the on-farm salinity control alternative is developed by com-
puting the minimum cost strategy at various levels of on-farm
control.   These results for the Grand Valley case are shown in
Figure 21.

     The actually computed cost-effectiveness relationship for
on-farm improvements is the step function shown as the solid
lines.  This characteristic occurs because of the linear
assumption regarding the distribution of costs and salinity
impacts.   The broken curve represents a best fit through the
various discrete points and in itself actually creates the
cost-effectiveness distributions avoided before.  Field

                               104

-------
                50 r
           o
           Cfl

           
-------
experience would definitely support the curve over the step
function in the real situation.  Thus, the fabrication of
continuous curves from stepped results will tend to re-introduce
the actual nonlinearity  of the physical system that could not
be effectively defined in the analysis of individual on-farm
measures.  A polynomial regression approximating the curve in
Figure 21 is:

     Yf (Xf)=0.03+0.10Xf-6.82xlO~itx| +5.67xlO~6X^ 	(149)


in which,

     Y,r(X,-) = capital cost in $ million required to reduce
              on-farm salinity by Xf thousands of tons.


     Two major strategies evolved in the analysis of on-farm
improvements:  (1) improvements to the existing system creating
salinity reductions up to about 150,000 tons; and (2)  system
conversions to provide controls up to approximately 220,000
tons.  Irrigation scheduling should be incorporated with all
alternatives.  Of particular interest here is the fact that the
alternatives are mutually exclusive.  In other words,  in
implementing an on-farm salinity management plan, either one or
another is optimally chosen.  For instance, if planners selected
on-farm improvements to reduce salinity by more than 150,000
tons, the alternatives would be limited to changing to sprinkler
or drip irrigation methods.  Below the 150,000 ton figure, head
ditch lining and/or automation would be optimal.  This structure
of the cost-effectiveness is unique among the alternatives as
the reader will note in succeeding sections.  This uniqueness
is based on the fact that on-farm improvements themselves are
mutually exclusive and limited in their expected effectiveness.
For example, head ditch linings would obviously not be con-
sidered in the conversion to a sprinkler system because this
element of the irrigation network would be replaced.

Lateral Lining and Piping

     Laterals have been defined as the small capacity con-
veyance channels transmitting irriaation water from the supply
canals and ditches to the individual fields.  Most of these
laterals operate in a north-south direction and can carry the
flows in relatively small cross-sections.  Although the capac-
ities of tihe laterals may vary between 0.06 and 1.4 m3/sec,
most capacities would be within the range of 0.06 to 0.20 m3/sec.
Utilizing a median value of 0-20 m3/sec yields a concrete
lining cost of approximately $16/m.  Alternative use of PVC pipe
approximates concrete lining costs for this capacity and a
further distinction will not be made.  However, by this
                              106

-------
assumption the small seepage  losses which would  still occur
from concrete lined channels  are  neglected.

     As noted earlier, Grand  Valley laterals extend approximately
600,000 meters, less than one half the  length of field head
ditches.  Seepage under existing  conditions contributes about
202,000 metric tons, or slightly  less than the on-farm contri-
bution.  Although no attempt  is made to distribute the lateral
lining costs to account for variable capacity, the cost-
effectiveness function for Grand  Valley lateral  lining is about
$49.50 per metric ton.  Thus,  the estimated costs of lining the
total lateral system in the valley is about $10 million.

Canal and Ditch Lining

     There are fourteen major canal and ditch systems in the
Grand Valley ranging in length from 74  kilometers for the
Government Highline Canal  (I? m3/sec capacity) to 4 kilometers
for the Mesa County Ditch  (1  m3/sec capacity) .  The pertinent
parameters for each canal, along  with the seepage contribution
to salt loading, were substituted into  Eq. 58.  The resulting
functions were then minimized using the Jacobian Differential
Algorithm described in Section 4  for a  range of  salinity
reductions accomplished from  a canal lining program.  These
results are given in Figure 22 which shows the total capital
construction costs as a function  of the annual salt load reduc-
tion to be realized.  The upper curve is the minimum cost
associated with each value on the abscissa.  Underneath the
upper curve are the costs attributed to the various valley-wide
canals.  For example, if the  contribution  of canal seepage to
the salt loading problem was  to be reduced by 87,500 tons
annually through linings, the capital construction cost would
be approximately $27 million  with $13.5 million on the Govern-
ment Highline canal,  $8.7 million on the Grand Valley system,
$2.2 million on the small ditches (e.g., Price,  Stub, etc.),
$1.6 million on the Orchard Mesa  System, and the remainder on
the Redlands System.

     A regression equation for the canal lining  cost-
effectiveness function is:
        (X  )=  -0.01+0.18X  + 4. 9 2x10'" X*  +1.03x10"  X3  ....... (150)
                                                   v-
in which,

     Y  (X  ) =  canal  lining cost,  $ million,  to  reduce  salt
      c  c     loading  by X  thousands  of tons.
                           C

     The results  obtained in optimizing canal  lining policies
are interesting in the sense that they demonstrate  the need


                              107

-------
   50
   40
c
o
5  30
0.
o
O
o
   20
            10 r
Redlands  System
                                        Grand Valley
                                        Grand Valley Mainline
                                        Grand Valley Highline
                          '//fcovernmenT  Hignune  uanai
                          Y///////////////////S
    10
     40     50     60      70      80      90      100     110

         Annual  Salt Load  Reduction,  thousands of  metric tons


Figure  22.   Optimal  Grand Valley canal lining cost-
             effectiveness function.
                                108

-------
to initiate linings on more than one  segment of the conveyance
system when full scale implementation begins.  This may not be
practical from a planning or scheduling stand point.

Desalination —

     Desalting evaluations involved first determining the
most cost-effective process and, second, the most cost-effective
feedwater and brine disposal facitlities.  The base condition
used in Section 5 to compare desalting systems is a reasonable
approximation of the Grand Valley  situation.  Consequently, the
optimal desalting policy determined uitilizes a reverse osmosis
system with feedwater wells and brine injection wells.  To
express desalting cost-effectiveness  in the same format as the
agricultural alternatives, the costs  are plotted against the
mass of salts removed from the system.  For the purposes of
this report, an interest rate of 7% and a usable life of 30
years will be assumed.  For the reverse osmosis system, Figure
23 shows the resulting cost-effectiveness function.

     It might be noted that whereas agricultural salinity
control costs exhibit increasing marginal costs with scale, the
opposite is true for desalting systems.  In an optimizational
analysis, therefore, the respective feasibility of desalting
technology is maximized for large  scale applications.  For small
systems, desalting is much less cost-effective than treatment
of the agricultural system.  As these factors are considered,
a linear approximation representing the average marginal cost
would serve at least as well as the non-linear function (note
that the existing curve violates the  convexity requirements of
the Jacobian Differential Algorigthm).  Consequently, desalting
cost-effectiveness in the Grand Valley can be represented by:

     Y, (X,) = 0.320 X, 	(151)
      d  d           a

where,

     Y  (X,) = capitalized costs, $ million, needed to remove
              Xfl thousands of tons from the irrigation return
              flows.

DEVELOPMENT OF SECOND LEVEL COST-EFFECTIVENESS FUNCTIONS

     The individual cost-effectiveness functions at the first
level (desalting, canal lining, lateral lining, and on-farm
improvements) are optimally integrated to determine the minimum
cost salinity control strategy for the Grand Valley  (level 2).

     For purposes that will be discussed later, the individual
cost-effectiveness functions for the  level 1 alternatives might
be transformed into dimensionless  curves by dividing each


                               109

-------
             80  -
                               100
200
300
                      Annual  Salt Removal,  thousands of metric tons
Figure 23.   Grand Valley desalination cost-effectivenss
             function.
                               110

-------
ordinate and  abscissa point by the upper  limit  cost and salt
loading reduction,  respectively.  A plot  of  the results is shown
in Figure  24.   The  ordinate in Figure  24  is  the fraction of the
maximum costs expended for each level  1 alternative correspond-
ing to an  abscissa  value of the fraction  of  the maximum salt
load reduction.   A  polynomial regression  fit through the
various points gives the dimensionlessrelationships similar to
Eqs. 149 and  150.  The original cost-effectiveness functions
can now be rewritten in the dimensionless form.  For on-farm
improvements:


                 f           /x  \     / x  \2      /y
     Y,(X}=49.23  0.0006+0.4418f Af 1-0.67f Af  \ +1.228f  f      ....(152)
         1                                          220
 Similarly for lateral linings, canal  linings,  and desalting:

     Y£ (X£) - 0.0495 X£  	(153)


     Y  (X )=40.0 |-2.5xlO~'*+0.5(/Xc\+0.16/ Xc \  +0.34f Xc
      w  N-*
                                      V110 /      \110
                              \   /     \   I      \

            = 0.320 X, 	
where,

      Y. (X.)  = capital cost, $ million,  required to diminish
       1   1    return flow salinity  X.  thousands of tons.

      The  cost-effectiveness function  at the second level,
corresponding to the best management  practices in the Grand
Valley,  is determined by solving  the  following optimization
problem  for the expected range of
                                                              (156)
      Xf+X£+Xc+Xd  =XT  	
      220,000 - Xf >_ 0 	

      202,000 - X£ >_ 0 	

      110,000 - X  > 0 	(160)
      630,000 - X, >  0
                u. —
                                111

-------
        1.0

         .6
      o .4
      c
      o
      o .2
         0
          0          .2          4         .6         .8         1.0

                Froction of  Total  Individual  Salinity Reduction
Figure  24.   Dimensionless level  1  cost-effectiveness curves

             for the  Grand Valley.
                                112

-------
These expresions can be placed  in  appropriate use within the
optimization procedure described in  Section  4 or any other
suitable techniques.  The  results  shown  in Figure 25 are
approximated within about  13% by the equation:


     Y2 = -0.34+.0325XT+1.87xlO-5xf  +3. 72x10'* X,f, 	  (162)


DISCUSSION OF RESULTS


     In Section 4  the philosophy behind  the  multilevel optimiza-
tion approach to evaluating  salinity control strategies was
discussed from both a theoretical  and general viewpoint.   The
results presented  in this  section  might now  be examined to
illustrate earlier explanations relative to  interpreting the
results of the analysis.

     Consider three points on the  Grand Valley cost-effectiveness
curve  (Figure 25):   (1) total costs  = $15 million, salt loading
reduction = 266,000 tons?  f2)  total costs = $40 million, salt
loading reduction  = 403,000  tons;  and (3) total costs = $80
million, salt loading reduction =  530,000 tons.  For convenience,
these three points have been designated  as Cases 1, 2, and 3,
respectively.

     If the expenditure in the  Grand Valley  is to be $15 million
in 1976 value dollars  (Case  1) , the  optimal  strategy in so doing
is found from a vertical trace  at  this point on  the curve repre-
senting the valley (Figure 25).  Specifically, $10 million
should be invested in lateral linings and $5 million in on-farm
improvements.  Referring back to the paragraphs on lateral
lining, it is noted that a $10  million investment covers the
cost of lining the entire  system.  Thus, for Case 1, the first
part of the strategy is to line the  lateral  system entirely.  In
a similar backward look to Figure  21 representing the level 1
relationship for on-farm improvements, it is seen that a $5
million dollar cost corresponds to about a 64,000 ton reduction
in the on-farm salinity contribution, and is so accomplished
by head ditch linings, or  cutback  irrigation, and irrigation
scheduling.

     A $40 million dollar  salinity control investment  (Case 2)
in the Grand Valley is seen  from Figure  25 to reduce salinity
by 403,000 metric  tons by  spending $10 million lining the
lateral system, $20 million  making on-farm improvements_and $10
million lining some of the major canals.  Referring again to
Figure 21, a $20 million investment  in on-farm improvements
implies reducing the on-farm salt  contribution by 156,000 tons
by irrigating nearly all of  the irrigated land with portable or
mobile sprinkler systems.  Figure  22 shows that $10 million
dollars in canal lining would accomplish a 45,000 ton reduction


                              113

-------
     c
     o
     E

    •fa**-


     in

     v>
     o
    O
     Q.
     o
    u
     o
     o
       120
        100
80
60
40
        20
           0
                                                       fO
                ^^»***?^^'^:f:^-:>'^:/'^ Lateral  Lining "•;:'-.-''-.'.'A'.y'.-".>:V;'::x':\
          100     200     300    400     500    600

        Annual Salt Loading Reduction,  thousands of metric tons
700
Figure 25.   Grand Valley second level salinity control
              cost-effectiveness function.
                                 114

-------
in salt loading.  To do this, a small  (essentially insignificant)
amount of lining should occur in the Redlands system with the
remainder being applied to the Government Highline Canal.

     Case 3 shows that agricultural improvements should stop
at $42.6 million with any remaining salt volumes to be removed
from the system through desalination of the subsurface irriga-
tion return flows.  The $42.6 million  figure for local agri-
culture includes $10 million for lateral lining, $21 million
for on-farm improvements, and $11.6 million in canal lining.
On-farm^improvements would still involve conversion to sprinkler
irrigation.  Canal lining strategies involve somewhat enlarged
versions of the Case 2 results.

     The mathematics of this analysis  indicates the minimum
cost salinity control strategy in the  Grand Valley, but a
planner or administrator must also consider the practicality
of the solutions.  For example, in the third case, it would
probably be unrealistic to line a very small portion of the
Redlands Canal system and a decision would be made to invest
all of the funds into lining the required length of the Govern-
ment Highline Canal.  Likewise, on-farm improvements may be
limited to converting the existing system to a sprinkler
irrigated system with some measure of  control to increase
application efficiencies beyond those  assumed for this analysis.
The point to be made is that at this level of investigation,
the inherent assumptions allow a certain amount of flexibility
to account for some of the intangible  social-institutional
factors involved in an implementation  effort.

     In representing what might be called the best management
practices for the Grand Valley, it must be realized that the
four major implementation alternatives (lateral lining, on-farm
improvements, canal linings, and desalting) only represent
"structural measures."  Consequently,  nonstructural alternatives
such as land retirement, influent and  effluent standards, taxa-
tion, and miscellaneous enforcement options are not included.
Nevertheless, the value of the sort of analysis can be clearly
demonstrated.  In the Grand Valley a plan might be proposed in
which all of the canals would be lined, all of the laterals
lined, and some on-farm improvements to reduce salt loading
by 450,000 metric tons annually.  Looking at Figures 21 and 22
and the comments in the paragraph describing lateral linings
shows a total cost of such a program of $65.5 million. _Figure
25 indicates the same reduction could  be accomplished with a
$54 million investment if the on-farm  role were expanded, the
canal lining program diminished and a  limited desalting
capacity were included.  Thus, this optimization analysis
illustrates how a $11.5 million savings (21%) can be achieved.
                              115

-------
     The eventual program in the Grand Valley is dictated by
its respective feasibility in comparison to similar cost-
effectiveness studies on the other subbasins in the Upper
Colorado River Basin.  In fact, the level of investment in
the entire river system for salinity control depends on the
level of damages created by the salinity.  Since the completed
four level analysis is not available, it is interesting to
compare downstream damage with costs in the Grand Valley.  Note
that the estimates of marginal cost and downstream detriments
must be the same.  Walker (1975) reviewed much of the literature
descriptive of the California, Arizona, and Republic of Mexico
damages.  At the time, Valentine (1974) had proposed damages of
$175,000 per mg/Jl of increase at Hoover dam ($146 per ton in
Grand Valley assuming 8% interest).  Other estimates in terms
of equivalent damages attributable to Grand Valley range
upward.  A representative figure is $190/ton as proposed by the
Bureau of Reclamation (Leathers and Young, 1976).  Some as yet
unpublished figures now place these damage figures as high as
$375/ton.  If the minimum cost curve in Figure 25 is differenti-
ated to approximate marginal costs and be congruent with these
damage figures, the $146 per ton damage estimate of Valentine
(1974) falls at a 300,000 ton reduction, while the $190 per
ton and $375/ton figures occur at 355,000 tons and 538,000 tons,
respectively.  Figure 26 is a plot of the marginal Grand Valley
salinity costs as a function of salt loading reductions.  Thus,
not considering secondary benefits in the Grand Valley, or
obviously all the consequences in the lower basin, the level of
investment in the Grand Valley could range between $19 million
and $83 million.  In any event, it can be seen that the actual
policy for salinity control in a subbasin depends on decisions
made at higher levels.  Similarly,  within a subbasin the
measures implemented to control salinity change as the emphasis
on the subbasin itself changes.

EVALUATION AT THE THIRD AND FOURTH LEVELS

     In demonstrating this approach to planning salinity control
strategies on a large scale, the Grand Valley was used as a
case study because of its data base.  Since no other area in
the Upper Colorado is well enough defined to allow similar
developments, it may appear impossible to carry the analysis
to its conclusions at the fourth level.  At the same time,
without the fourth level of analysis, the optimal program in
the irrigated areas like Grand Valley cannot be effectively
established.

     It is not a difficult task to estimate the total costs
necessary for lining all canals, ditches, and laterals in an
irrigated area if some information is generally available.
Likewise, the array of on-farm improvements may also be described
in terms of an estimated total cost.  Examinations of stream
gaging records will give a reasonable estimate of the salinity


                              116

-------
      300
  o
  u>
  O
  O
    200
  o
  o
  e   100
o
c
'o»

i
                100    200     300    400    500    600


                  Annual Salt Loading Reduction, thousands of tons
                                                           700
Figure 26.  Marginal cost function of optimal  salinity

            control strategy in the Grand Valley.
                              117

-------
derived from an irrigated area and some limited analysis may
very well yield a segregation of the salt loading as to the
respective sources.  However, the estimation of salt loading
on a fine scale, say canal by canal or lateral by lateral, is
probably unrealistic.  Consequently, in areas lacking the
information necessary to establish the cost-effectiveness
relationships necessary to derive the first level functions
another approach must be taken  Figure 24 was presented for
this purpose.  If the totals for costs and salt loading are
known or can be developed as indicated above, the non-linear
distributions in Figure 24 can be assumed to compute the second
level functions.  Then, it is a simple matter to derive the
third and fourth level cost-effectiveness function.

    As more data become available in areas requiring a salinity
control strategy, the distribution in Figure 24 can be adjusted
for more refined results.  The experience in Grand Valley,
however, indicates the components of a salinity control strategy
are relatively insensitive to the degree of nonlinearity because
of the large differences in unit costs among the alternatives.
The nonlinearities would be more important for alternatives
having similar cost-effectiveness relationships.  Thus, the
use of these Grand Valley results while not introducing serious
errors will give the planner a better understanding of the
structure of the optimal salinity control policies.  In addition,
the use of these curves may be of substantial value in deciding
on data collection programs as the planning process moves from
reconnaissance to definite plan stages.
                             118

-------
                           REFERENCES

1.   Christiansen, J. E..  irrigation by Sprinkling.  California
    Agricultural Experiment Station Bulletin No. 670.
    University of California, Davis, California.  1942.

2.   Christiansen, J. E., A. A. Bishop, F. W. Kiefer, and
    Y. Fok.  Evaluation of Intake Rate Constants as Related
    to Advance of Water in Surface Irrigation.  Transactions
    of ASAE 9(1):671-674.  1966.

3.   Duke, H. R., E. G. Kruse, S. R. Olsen, D. F. Champion, and
    D. C. Kincaid.  Irrigation Return Flow Quality as Affected
    by Irrigation Water Management in the Grand Valley of
    Colorado.  Agricultural Research Service, U. S. Department
    of Agriculture, Fort Collins, Colorado.  October, 1976.

4.   Elkin, A. D.  Grand Valley Salinity Study:  Investigations
    of Sediment and Salt Yields in Diffuse Areas, Mesa County,
    Colorado.  Review draft submitted for the State Conservation
    Engineer, Soil Conservation Service, Denver, Colorado.
    1976.

5.   Evans, R. G.  Improved Semi-Automatic Gates for Cut-Back
    Surface Irrigation Systems.  Transactions ASAE 20(1):105,
    112.  January, 1977.

6.   Evans, R. G., S. W. Smith, W. R. Walker, and G. V. Skogerboe.
    Irrigation Field Days Report 1976.  Agricultural Engineering
    Department, Colorado State University, Fort Collins,
    Colorado.  August, 1976.

7.   Evans, R. G., W. R. Walker, G. V. Skogerboe, and C. W.
    Binder.  Implementation of Agricultural Salinity Control
    Technology in Grand Valley.  Environmental Protection
    Technology Series  (in preparation).  Robert S. Kerr
    Environmental Research Laboratory, Office of Research and
    Development, U. S. Environmental Protection Agency, Ada,
    Oklahoma.  1978a.

8.   Evans, R. G., W. R. Walker, G. V. Skogerboe, and S. W.
    Smith.  Evaluation of Irrigation Methods for Salinity
    Control in Grand Valley.  Environmental Protection Technol-
    ogy Series  (in preparation).  Robert S. Kerr Environmental
    Research Laboratory, Office of Research and Development,
    U. S. Environmental Protection Agency, Ada, Oklahoma.  1978b,

                              119

-------
 9.  Fischbach, P. E. and B. R. Somerhalder.  Efficiencies of
     an Automated Surface Irrigation System With and Without
     a Runoff Re-Use System.  Transactions of ASCE, 14(4):717-
     710.  April, 1971.

10.  Fok, Y. S. and A. A. Bishop.  Analysis of Water Advance in
     Surface Irrigation.  Journal of the Irrigation and Drainage
     Division, ASCE, Volume 91, No. IRl, Proc. Paper 4251, pp.
     99-116.  March, 1965.

11.  Geohring, L. D.  Optimization of Trickle Irrigation System
     Design.  Unpublished M.S. Thesis, Department of Agricultural
     Engineering, Colordo State University, Fort Collins,
     Colorado.  August, 1976.

12.  Gerards, J. L. M. H.  Predicting and Improving Furrow
     Irrigation Efficiency.  Unpublished Ph.D. Dissertation.
     Agricultural and Chemical Engineering Department, Colorado
     State University, Fort Collins, Colorado.  December, 1977.

13.  Goldberg, D., D. Gornat, and D. Rimon.  Drip Irrigation.
     Drip Irrigation Scientific Publications, Kfar Shmaryahu,
     Israel.  1976.

14.  Hall, W. A. and J. A. Dracup.  Water Resources Systems
     Engineering.  McGraw-Hill, Inc., New York, N.Y.  1970.

15.  Hart, W. E. Overhead Irrigation Pattern Parameters.
     Agricultural Engineering, pp. 354-355.  July, 1961.

16.  Hart, W. E. and W. N. Reynolds.  Analytical Design of
     Sprinkler Systems.  Transactions of ASAE, 8(l):83-85, 89.
     January-February, 1965.

17.  Humphreys, A. S.  Automatic Furrow Irrigation Systems.
     Transactions of ASAE, 14(3) :446, 470.   1971.

18.  Hyatt, M. L., J. P. Riley, M. L. McKee, and E. K. Israelsen.
     Computer Simulation of the Hydrologic Salinity Flow System
     within the Upper Colorado River Basin.  Utah Water Research
     Laboratory, Report PRWG54-1, Utah State University, Logan,
     Utah.  July, 1970.

19.  lorns, W. V., C. H. Hembree, and G. L. Oakland.  Water
     Resources of the Upper Colorado River Basin.  Geological
     Survey Professional Paper 441.  U. S.  Government Printing
     Office, Washington, D. C.  1965.

20.  Jensen, M. E.  Scientific Irrigation Scheduling for Salinity
     Control of Irrigation Return Flows.  Environmental Pro-
     tection Technology Series EPA-600/2-75-964.  1975.
                              120

-------
21.  Karmeli, D.  Water Distribution Patterns for Sprinkler and
     Surface Irrigation Systems.  In:  Proceedings of National
     Conference on Irrigation Return Flow Quality Management,
     J. P. Law and G. V. Skogerboe ed.  Department of Agricult-
     ural and Chemical Engineering, Colorado State University,
     Port Collins, Colorado.  May, 1977.

22.  Keller, J. and D. Karmeli.  Trickle Irrigation.  Rain Bird
     Sprinkler Manufacturing Corporation, Glendora, California.
     1975.

23.  Kostiakov, A. N.  On the Dynamics of the Coefficient of
     Water Percolation in Soils and on the Necessity for Study-
     ing it From a Dynamic Point of View for Purposes of
     Amelioration.  Transactions of the 6th. Com. Inter. Society
     of Soil Science, Part A.  Russian.  pp. 17-21.  1932.

24.  Kneese, A. V.  The Economics of Regional Water Quality
     Management.  The John Hopkins Press, Baltimore, Maryland.
     1964.

25.  Kruse, E. G.  Minutes of the Grand Valley Salinity Coordi-
     nating Committee, Grand Junction, Colorado.  February,
     1977.

26.  Kuhn, H. W. and A. W. Tucker.  Nonlinear Programming.
     In:  Proceedings of the Second Berkeley Symposium on
     Mathematics, Statistics, and Probability.  J. Neyman,Ed.
     University of California Press, Berkeley, California.  1951,

27.  Leathers, K. L. and R. A. Young.  Evaluating Economic
     Impacts of Programs for Control of Saline Irrigation Return
     Flows:  A Case Study of the Grand Valley, Colorado.
     Report for Project 68-01-2660, Region VIII, Environmental
     Protection Agency, Denver, Colorado.  June, 1976.

28.  Prehn, W. L., J. L. McGaugh, C. Wong, J. J. Strobel, and
     E. F. Miller.  Desalting Cost Calculating Procedures.
     Research and Development Progress Report No. 555.  Office
     of Saline Water, U. S. Department of the Interior, Wash-
     ington, D.C.  May, 1970.

29.  Probstein, R. F.  Desalination.  American Scientist.
     Volume 61, No. 3, May-June.  pp. 280-293.  1973.

30.  Skogerboe, G. V. and W. R. Walker.  Evaluation of Canal
     Lining for Salinity Control in Grand Valley.  Report
     EPA-R2-72-047, Office of Research and Monitoring, Environ-
     mental Protection Agency, Washington, D.C.  October, 1972.

31.  Skogerboe, G.V., W. R. Walker, R. S. Bennett, J. E. Ayars,
     and J. H. Taylor.  Evaluation of Drainage for Salinity

                              121

-------
     Control in Grand Valley.  Report EPA-660/2-74-052, Office
     of Research and Development, Environmental Protection
     Agency, Washington, B.C.  June, 1974a.

32.  Skogerboe, G. V., W. R. Walker, J. H. Taylor, and R. S.
     Bennett.  Evaluation of Irrigation Scheduling for Salinity
     Control in Grand Valley.  Report EPA-660/2-74-084, Office
     of Research and Development, Environmental Protection
     Agency, Washington, D.C.  August, 1974b.

33.  Smith, S. W. and W. R. Walker.  Annotated Bibliography on
     Trickle Irrigation.  Environmental Resources Center Infor-
     mation Series Report No. 16.  Colorado State University,
     Fort Collins, Colorado.  June, 1975.

34.  Somerhalder, B. R.  Comparing Efficiencies in Irrigation
     Water Application.  Agricultural Engineering 39 (3) :156-159.
     1958.

35.  Thomann, R. V.  Systems Analysis and Water Quality Manage-
     ment.  Environmental Science Services Division, Environ-
     mental Research and Applications, Inc.  New York, New York.
     1972.

36.  U. S. Department of the Interior, Bureau of Reclamation.
     Linings for Irrigation Canals.  Denver Federal Center,
     Denver, Colorado.  1963.

37.  U. S. Department of the Interior, Bureau of Reclamation
     and Office of Saline Water.   Desalting Handbook for
     Planners.  Denver, Colorado.  May, 1972.

38.  U. S. Department of the Interior, Bureau of Reclamation
     and Office of Saline Water.   Colorado River International
     Salinity Control Project,  Executive Summary.  September,
     1973.

39.  U. S. Department of the Interior, Bureau of Reclamation.
     Initial Cost Estimates for Grand Valley Canal and Lateral
     Linings.  Personal Communication with USER Personnel in
     Grand Junction, Colorado.   1975.

40.  U. S. Environmental Protection Agency.  The Mineral Quality
     Problem in the Colorado River Basin.  Summary Report and
     Appendices A, B, C, and D.  Region 8, Denver, Colorado.
     1971.

41.  U. S. Geological Survey.  Salt-Load Computations — Colorado
     River:  Cameo, Colorado to Cisco, Utah.  Parts 1 and 2.
     Open File Report.  Denver, Colorado.  1976.

42.  Valentine, V. E.  Impacts  of Colorado River Salinity.


                              122

-------
     Journal of the Irrigation and Drainage Division, American
     Society of Civil Engineers, Vol. 100, No. IR4, pp. 495-510.
     December, 1974.

43.  Walker, W. R.  A Systematic Procedure for Taxing Agricult-
     ural Pollution Sources.  Grant NK-42122, Civil and Environ-
     mental Technology Program, National Science Foundation.
     Washington, D.C.  October, 1975.

44.  Walker, W. R.  Integrating Desalination and Agricultural
     Salinity Control Technologies.  Paper presented at the
     International Conference on Managing Saline Water for
     Irrigation.  Texas Tech University, Lubbock, Texas.  August,
     -L y / o •

45.  Walker, W. R., and G. V. Skogerboe.  Agricultural Land Use
     in the Grand Valley.  Agricultural Engineering Department,
     Colorado State University, Fort Collins, Colorado.  1971.

46.  Walker, W. R. and G. V. Skogerboe.  Mathematical Modeling
     of Water Management Strategies in Urbanizing River Basins.
     Completion Report Series No. 45.  Environmental Resources
     Center, Colorado State University, Fort Collins, Colorado.
     June, 1973.

47.  Walker, W. R., G. V. Skogerboe, and R. G. Evans.  Develop-
     ment of Best Management Practices for Salinity Control in
     Grand Valley.  In:  Proceedings of National Conference
     on Irrigation Return Flow Quality Management.  J. P.  Law
     and G. V. Skogerboe, ed.  Department of Agricultural  and
     Chemical Engineering, Colorado State University, Fort
     Collins, Colorado.  May, 1977.

48.  Walker, W. R., G. V. Skogerboe, and R. G. Evans.  Best
     Management Practices for Salinity Control in Grand Valley.
     Environmental Protection Technology Series (in preparation).
     Robert S. Kerr Environmental Research Laboratory, Office
     of Research and Development, U. S. Environmental Protection
     Agency, Ada, Oklahoma.  1978.

49.  Walker, W. R., T. L. Huntzinger, and G. V. Skogerboe.
     Coordination of Agricultural and Urban Water Quality
     Management in the Utah Lake Drainage Area.  Technical
     Completion Report to the Office of Water Resources Research,
     U.  S. Department of the Interior.  Report AER72-73WRW-TLH-
     GVS27.  Environmental Resources Center, Colorado State
     University, Fort Collins, Colorado.  June, 1973.

50.  Walker, W. R., S. W. Smith, and L. D. Geohring.  Evapo-
     transpiration Potential Under Trickle Irrigation.  American
     Society of Agricultural Engineers Paper No. 76-2009.
     December, 1976.

                              123

-------
51.   Westesen,  G.  L.   Salinity Control for Western Colorado.
     Unpublished Ph.  D.  Dissertation.   Colorado State University,
     Fort Collins, Colorado.   February, 1975.

52.   Wilde,  D.  J.  and C.  S.  Beightler.  Foundations of Optimi-
     zation.   Prentice - Hall, Inc.,  Englewood Cliffs, New
     Jersey.   1967.

53.   Wilke,  0.  and E. T.  Smerdon.   A  Solution  of the Irrigation
     Advance Problem.  Journal of  the Irrigation and Drainage
     Division,  ASCE,  Vol.  91,  No.  IR3.  September, 1965.

54.   Willardson, L.  S.,  R.  J.  Hanks,  and R. D. Bliesner.   Field
     Evaluation of Sprinkler Irrigation for Management of
     Irrigation Return Flow.   Department of Agricultural  and
     Chemical Engineering,  Colorado State University, Fort
     Collins, Colorado.   May,  1977.

55.   Worstell,  R.  V.   An Experimental  Buried Multiset Irrigation
     System.   Paper No.  75-2540, presented at  Winter Meeting of
     ASAE.  Chicago,  Illinois.  December, 1975.
                              124

-------
                         APPENDIX A

            DESALTING COST ANALYSIS COMPUTER CODE
DESCRIPTION OF CODE

     In an earlier section, the costs of various desalting
systems were described.  A set of cost estimating procedures
published by the U. S. Department of Interior  (1972) were
mathematically simulated and coded in Fortran IV.

     The desalting model listed in the following pages consists
of a main program, DESALTl, and five subroutines with call
statement data transfer, DESCONT A, DESALTC A, ADJUST A, OUTPUT1
A, and WRITE A.  The composite model requires about 34,000 bytes
of central memeory storage and executes in 3-5 control processor
seconds per analysis.

     The main program DESALTl serves only as an data input
device.  Control variables are entered to manage several input
and output data destiny options as described within the listing
itself.  The definitions of each input variable are also given
in the listing.  Input data may be printed with subroutine
WRITE as illustrated in Table A-l.  After control and input data
are read in, Subroutine DESCONT is called to coordinate the
primary desalting cost analysis.  Subroutine DESCONT first calls
DESALTC which computes the capital and operation and maintenance
costs for whatever process is specified.  It then calls ADJUST
to determine feedwater and brine disposal costs.  And finally,
DESCONT directs the information to OUTPUTl for output.  The
output can be plant costs, feedwater-brine costs, or total costs,
An example of the model output for total costs is shown in Table
A-2.
                               125

-------
  TABLE A-l.    INPUT DATA  PRINTOUT FROM  EXAMPLE  ANALYSIS
      INPUT DATA

«»«• « 99 « a <•««*«»«»»»«««•««««•*•«» • <>*«•«« *»«*«•««*«»«»*«***«•*»**•**•***»***
PLANT VARIABLES
 i. C*PACITY=       MRD
 2. USr FACTOR*   .90
 3. FNR 8LDG INDEX=1354.0
 *. HLS LA80H  INOEX= 4.93
 b. RI.S CHEN INDEXs 181.0
 6. FIX CMG HATE-.08560
 7. INT RATfa  .07

WATER CHARACTFPISTICS
 1. FEED TEMP  (OE6  F)=60.00
 Z. FEED TOS (PPM)= 4000.0
 3. FEED NA (PPM)=1^60.
 4. FEED K  (PPM>=   «.
 5. FEED HC03  (PPM)= 106.
 6. FEED NOJ IPPMI=  o.
 7. FEED S0« . FtED CA |PPM)=  393.
10. PRODUCT TPS  (PPM)« 500.

MISCELLANtOUS
 1. ELEC KATE: 20.00000
        ft/1000  KMH)
 2. FUtl RA?E=   1.1*000
        (I/MBTUI
 3. LAM) P»
-------
TABLE A-2.
EXAMPLE  COST ANALYSIS  FOR  A REVERSE  OSMOSIS DESALTING
SYSTEM SUPPLIED  BY FEEDWATER WELLS AND DISPOSING OF
BRINE THROUGH INJECTION WELLS
                DESALTING PROCESS COST ANALYSIS


COST DESCRIPTION
CAPITAL CeSIS/10«6
A. CONSTRUCTION
B. STEAM FACILITIES
C. SITE BEVELOPMENT
0. INTERES*-
E. START'UP
F. GENERAL EXPENSE
6. LAND
H. WOHKING CAPITAL
SUBTOTAL
ANNUAL COSTS/10*»3
I. LABOR-MATERIALS
J. CHEMICALS
K. FUEL
L. STEAM
M. ELECTRICITY
N. REPLACEMENT
SUBTOTAL
TOTAL ANNUAL COSTS
0. ANNUAL OOSTS/10*»3
P. KATE" COST-$/1000 6
Q. SALT COSTS-S/TON
DESALTING
.25
M6D

1.73
0.00
.06
.04
.00
.21
.12
.01
2.18

42.5
7.1
0.0
0.0
21.1
8.2
79.0
263.
2.88
86.63
.58
M80

2.43
0.00
.89
.«7
.01
.29
.23
.02
3.J3

57.7
14.2
0.0
CUO
42*1
16. A
13015
39S.
2.16
64.04
1.0
MOO

3.80
0.00
.14
.12
.01
.44
.45
.03
4.99

80.4
28. S
0.0
0.0
84.0
32.8
225.7
645.
1.77
53.04
1 fj 1 &£}
2.0
MSO

6.50
V.OO
.22
.22
.02
.71
.90
.06
B.63

1*1.4
57.0
0.0
0.0
167.5
65.7
4U.6
U3t>.
1.56
46.65
•JA j-ad
PLANT CAPACITIES
4.0
M60

ti.ai
0.00
.35
.43
.04
1.20
1.80
.11
15.73

193.1
113.9
0.0
0.0
334. 3
131.4
772.7
2U90.
1.43
42.93
AHA77-
8.0
MGO

22.47
0.00
.55
.86
.08
2.12
3.59
.20
29. SI

316.0
227.8
0.0
0.0
666.8
262.8
1475.5
3973.
1.36
40.82
Q7"*m_
16.0
MGD

43.89
0.00
.67
1.77
.15
3.84
7.17
.39
58.0V

538.4
455.6
0.0
0.0
1331.6
525.6
2851.3
7706.
1.32
39.58
1Q4707.
32.0
MGD

86.29
0.00
1.37
3.67
.30
7.02
14.34
.75
113.74

925.6
911.2
0.0
0.0
2659.1
1051.2
5547.1
15048.
1.29
38.64
389413.
        SALT REMOVED (TONS)
                           3042.
                                  6085.
                                        12169.
              SALT COSTS (*/TON) «  15.7314S/(CAPACITY 
-------
MAIN PROGRAM  LISTING
                         PROGRAM DESALTi
                         1(INPUT»OUTPUT»TAPt5=JNPUT«TAPE6=OUTPUT)
                   C
                   C»««  DESCRIPTION OF PROGRAM VARIABLEb «»•
        b          C            (ENGLISH UNITb)
                   C
                   C   1. DESALTING PLANT PARAMETEHS-
                   C     A. NAME   TYPE OF PROCESS
                   C     B. OF     USE FACTOR (FRACTION OF TIME IN USE)
        10          C     C. CP     PWODU6T WATER CAPACITY (MSO)
                   C     D. CW     COOLING WATER CAPACITY (MGD)
                   C     E. C9     BWINE CAPACITY (MGD)
                   C     F. Kl     IDENTIFICATION CODE FOR PROCESSES
                   C           Kl*l - MSF
        15          C           Kl=2 - VTE-MSF
                   C           Kl»3 - VC-VTE-MSF
                   C           K1=4 - ED
                   C           Kl=b - RO
                   C           Kl*6 - VF-VC
        20          C           Kl=7 - IX
                   C     6. K      CAPACITY CODE
                   C            K = l - CP=U.2b MGO
                   C            K=2 - CP=U.50 MGO
                   C            K=3 - CP=1.00 MOD
        25          C            K=4 - CP=2.00 M6D
                   C            K=5 - CP=4.00 MGD
                   C            K»6 - CP=8.00 M60
                   C            K=7 - CP=16.00 MGD
                   C            K=B - CP=32.0U MGD
        30          C
                   C   2. FEEOWATEH PAHAMETERS-
                   C     A. IFKIC   SOURCE OF FEEDKATEH
                   C            IKWC = 1 - WELLS
                   C            IFrtC=2 - SURFACE DIVERSION
        35          C     B. TEMP   TEMPERATURE  (DEG F)
                   C     C. TDSI    SALINITY CONCENTRATION OF FEEOWATER (M6/L)
                   C     U. TOSO    SALINITY CONCENTRATION OF PRODUCT  
-------
60           C     I.  IR      INTEREST RATE FOR NON-DEPRECIATING CAPITAL
             C     J.  EC      ELECTRICITY RATES (S/1000 KWM)
             C     K.  FR      FUEL COSTS (S/MBTU)
             C     L.  LP      LAND PRICE ($MILLION/ACRE)
             C
65           c   5. MISCELLANEOUS CONTROL PARAMETERS-
             C     A.  IWRITE  INPUT DATA LISTING
             c           II»PITE=I - LISTING
             C           IWRITE=2 - NO LISTING
             C     B.  IWRITF1 FORMAT OF PROGRAM OUTPUT
70           C          IWRHE1 = 1 - OUTPUT OF TOTAL COSTS
             C          IKRITE1=2 •» OUTPUT OF FEEOWATER SUPPLY AND BRINE DISPOSAL COSTS
             C          IWRITE1 = 3 •» OUTPUT OF PLANT COSTS
             C
             C                  »»•»»
75           C
                   REAL NAI,KI.N03I,IR,LP
                   DIMENSION NAMEI7.10)
                   READ(5tlUl)  ((NAME(I.J).J»l»10)«l«1.7>
                   REA015.1001DISTB. UF.ENRI«BLS1.BLS2.FCR.IR.TEMP
80                 READ(5tlOO) NAI«KI.HC03I«N03I»S04I,TDSI»CAI»TDSO
                   READ(5»ioo> DEPTHF.PMI.CPI.OISTF.PPI.E.EI.DEPTHS
                   READtS.lOO) EC«.FR»LP.Ct-I
                   READ(5.894)  ICTC.IFWC.IBC.IWRITE.IWRITEI
                   DO  12  13=1.6
85                 Kl=I3
                   TDSI=1000.
                   DO  12  il=l»2
                   TDSI=TDSI*2000.
                           CALL  DESCONT(NAME»DISTB»UF.ENRI»BLS1»BLS2.FCR»IR«TEMP»NAI«
90                1KI.HC03I.S04I.TDSI.CAI.TDSO.OEPTMF.PMI.CPI.DISTF.PPI.E.EI.DEPTHB.
                  2EC.FH,LP.CLI.ICTC,IFWC»IBC»IWKITE.IWP.ITE1.K1.CP.K)
                10 CONTINUE
                12 CONTINUE
               100 FORMAT(8F10.1)
95             101 FOHMATI10A8)
              894  FOHMAT(H4I2)
             C
             C»»» THIS PROGRAM CODE  IS WRITTEN IN TERMS  OF ENGLISH UNITS.  TO USF.
             C    METRIC  DATA OR HAVE RESULTS IN METRIC  UNITS. USE FOLLOWING
100           C    CONVERSIONS-
             C
             C         ENGLISH         TO             METRIC         MULTIPLY BY
             C
             C         MGD                           M«»0/DAY       3785.41
105           C         FEET                          METERS              .3048
             C         SMILLION/ACRE                 SMILLION/HA       2.47097
             C         o/MBTU                        S/MJOULES      1055.
             C         S/1000 KWH                   S/MJOULES      3599.97
             C
HO           C         DEG C =  (DE6 F  -32.1/1.8
             C

             C
                   STOP
US                 END
                                     129

-------
CODE LISTING  FOR  SUBROUTINE  DESCONT



                          SUBROUTINE   DESCONT(NAME,01 STB.UF.ENRI,BLS1,BLS2»FCR.IR»TEMP,NAI»
                          lKI,HCOJI,S04l«TDSI»CAI«TDSO.D£PTHF»PMl,CPI«OISTFiPPI«EtEI,OEPTHB,
                          2EC»FH,LP,CLI»ieTC»IFWC«ifclC»l««»ITE»I*P.IT£l,IU»CP«K>
                          REAL NAI,KI,N03I»IR»LP
          5                DIMENSION Al(8}.A2(8),A3»A6(8>,A7(8>,A8(8),A9(B),
                          lA10(8),AU<8>»A12<8),Al3<8>»A14(8)»A15<8)«A16CAI,TDSO,EC,FR.LP»PMI.CPI,£I
         10                l.DEPTHF,OISTF,DEPTHB,OISTB»IFKC,I8C,E,PPI>
                          IWRITE-10
                          TDSP=TDSO
                          ICOOE=K1
                          CP=.12b
         15                00  1111 K=l,8
                          CP=2.»CP
                          CALL OESALTC(CP.UFtENRI.BLSl,8LS2tFCR.I«tTEMP.TOSI»NAI.KI«HC03I.
                          lN03I,S041iCAItTDSP,ECiFR«LP,CltC2»C3tC4»CStC6,C7iCaCU,C12
                          a,C13»C14,NAME»CB,BPR,lCOOE,CI»iCLI,CTl,CTZ,CT3,CT*,CT5,CO*(,COS.CBO.
         20                lICTC.IFd(C,OEPTHF,PMI,   CP! .DIbTF.PPI ,E»EI»IBC,OEPTHB»OISTB»TONS)
                          CALL ADJUST (ICT.C,ENRI»Ci(,lFWC.CP»DEPTHF,PMI,CPI,OISTF,PPI,E,EI»IBC
                          1,DEPTMB,LP»EC,8LS1.ClA,C2A«C3A»C»A.CbA.C6A,C7*,C8A>C9A.C10A,CllA.
                          2C12A,C13A,C14A«DISTBfCB«!R)
                          IFdWPITEl-3) t,2.2
         25               1 IF(IWftITEl-2> 3,4,4
                         3 C1=C1*C1A
                          C2=C2*C2A
                          C3=C34C3A
                          C4=C4«C4A
         30                C5=C&*C5A
                          C6=C6*C6A
                          C7=C7«C7A
                          C8=C8«C8A
                          C9=C9*C9A
         35                C10=C10»C10A
                          C11=C11»C11A
                          C12=C12*C1HA
                          C13=C13»C1JA
                          C14=C14»C14A
         40                CT5=C9»C10»C11»C12»C13*1000.«< 
-------
60               1C1*
                  COW-CT5/CP/365*
                  COS«CT5»1000./GB/1.5*3*/CBO
                2 CONTINUE
                  A1(K)«C1
65                A2(K)«C2
                  A3
-------
PLANT  CAPITAL AND OPERATION-MAINTENANCE COSTS
        10
        15
        20
        25
        30
        3b
        4b
        50
        55
                          SUBROUTINE DESALK(CP«UFtENKItBLSl.6LS2»FCHtIR«TEMPtTDSItNAI.KI•
                         1HC03I.NOJI»S04I«CAI•TDSPiEC«FH«LP«C1iC2«C3»C*«C5»C6»C7tC8»C9«C10»
                         2C11 .Cli:.J*CP«».7J4»4
                          C3=ENHIX952.«.l«CP»».6b3b
C6=.119« (C1»C2»C3)«».9
C7= LP»(^.*.2168*CP».377«CP««.
C9=47.»CP«».66b7
IF (CP.LE.40. )  C9 = 60.»CP<1».6014
IFICP.LE.H.) C9=«l.»CP«».4bB
IF(CP.LE.3.) C9 = 9b.«CP<1<>.304«;
IFICP.LE.l.) C9=9b.«CP*». 18182
C9 = C9»BLM/ j. 76
C10=
Cll= FH
-------
 60                 IFICP.LE.9) Cl-ENRI/952.*2.b72f9«CP»*.6*352
                   C2=ENP.I/9S2.«.Z3«CP««.801b
                   C3=ENRI/9bi;.«. J«CP*«.653b
                   C4=IC1»C2«C3)«1R/2*.«1*.«CP»«.2389
                   C6=.119*(C1»C2*C3)«».9
 65                 C7* LP«(2.».2168*CP».377*CP»".
                   C9=bl.«CP««.60979
                   IF(CM.LE.2b.) G9 = 87.«CP.08392
                   C10=
                   XP=.b8»CP»«1.0e6
                   Cll= FH*«4b.3«XP»».986
 75                IMXP.LE.40.) 012 = 70. «XP»*.b
                   IF(XP.LE.6.) C12=78.*XP«». 4*898
                   IF(XP.LE.l.S) C12=80.«XP««.3i>7i
                   C12=C12«8LSl/3.76
                   C13=EC"1.*6»CP
 80                C5=0.08333»(C9»C10«CH*C12*C1 31/1000.
                   C8=2.«C5
                   Cl*=0.0
                   CBR1=(1.-50./TOS1)/(900./C*I-1.)
                   CBH2=(TDSI-bU.)/ (80000. -T05I)
 85                IF (CBR1.LE.CBR2) BPR»CBR2
                   IF(CBR1.GT.CBR2) BPR=CBR1
                   C8=HPP*CP
                   CW=CP»(2.-8PR)
                   IF(ICTC.GE.l) CW=CP"<3.2-BPK)
                   GO  TO  1000
             c
             C         «««   COST  ANALYSIS  FOR  V^C-VTE-MSF  SYSTEMS   ••«
             C
 95              3 Cl=ENRI/S)b2.»at71»CP°». A*bl
                   IF (CP.LE.2. )  Cl=ENRI/9b2.««!.B8*CP".64706
                   IFICP.LF- 1.)  Cl=tNRI/952.»2.88*CP»».bl961
                   C2=0.0
                   C3=ENRI/9b2.».J*CP«*.6bJ5
100                C4=(Cl»C2)«IR/24. »(1 7.368* 1.26J«CP)
                   C6=.119»(C1*C2*C3)««,9
                   C7 = LP«.8»LPI».2133»CP
                   C9=46.*CP««. 83077
                   IF (CP.LE.30.)  C9=  80.»CP«s.6nJ
105                1FICP.LE. fe.)  C9=lll.»CP*«.*/9/
                   IF(CP.LE. 2.)  C9=122.«CPS«.3636*
                   IFICP.LE. 1.)  C9=122.0CP»».2?y'
                   C9=C9»BLSl/3.76
                   C10= HLS2/104.*«7.3»UF«CP
110                CH=FR«lbl.4?5»CP
                   C12=C13=0.
                   Cb=0.08333*(C9*C10»Cll»C12»C13!/1000.
                   C8=?.»C5
                   Cl*=0.
lib                CBRl=(l.-bU./TOSI)/(900./CAI-l.)
                   CBH2=(TDbI-50.)/(80000.-TOSI)
                   IF(CBR1.UE.CBR2)  BPR=CBH2
                   IFIC8P1.GT.CBRZ)  BPR=CBH1
                                   133

-------
120                CW=CP»U.b-BPR>
                   IF(ICTC.GE.l) CW=CP«<2.2-BPR)
                   TObP=50.
                   GO TO 1000
             C
125          C        ••»  COST ANALYSIS FOR EO SYSTEMS   •••
             C
                 4 KF=.57b«< (NAI»KI*CLI)/TDSI)«.014375»tTEMP-40.)
                   FSH=.53/KF««.5418
                   N=(ALOG10(TDSP)-ALOG10(TOSI) ) /(AL0610 (FSR) )*1
130                Nl=CP/.2b2*l
                   AS=N*M
                   TOSP=TOSI»FSR»*N
                   ClsENPI/lbii.*. Ob 194»AS»». 8*962
                   IFIAS.tE.80.) €l=ENHI/9b2.«.08i!26»AS*«. 75188
13b                IF(AS.LE.2!>.) Cl=ENHI/9S2.«.lb03»AS»«. 56391
                   IFIAS.LE.4.) Ci=ENRI/9b2.«.203*AS»».375»*
                   C14=1.6706«AS««.*766
                   C2=0.0
140                C4=(C1*C3)«IR/24.«8.»CP*«.3137
                   C6=.ny«(Cl«C2»C3)»«,9
                   C7=LP»»1.03*2)»CP«.365
                   Cb = 0.08333"(C9*C10*Cll»Cli!»C13)/1000.
150                CBs^.^CS
                   BPR=<1.-1DSP/TDSI)/(900./CAI-1.)
                   IF(BHR.LT.O.IS) WHITEI6.103)
               103 FORMAT (Ih t48HED REMOVAL EFFICIENCY  IS  TOO  HIGH-STOP ANALYSIS
                   CB=BPR«CH
155                CW=0.
                   GO TO  10UO
             C
             C        «•»  COST ANALYSIS FOR RO  SYSTEMS  »**
             C
160              5 XT = CP*(100.*(77.-TEMP)«l.n/10U.
                   IFICP.LE.8.) Cl=ENRI/9b2.«.b22»XT»«.85774
                   IFfCP.LE.4.) Cl=£NRI/9b2.*.S>rS«XT»*.791B4
                   C2=0.0
165                C3=ENRI/9b2.«.i»CP**.6b3b
                   C4=(C1*C3)»IH/24.*8.»CP»».3137
                   C6=.119«1C1*C2«C3)»«.9
                   C7=LP«< .b«.298«CP)
170                IF (CP.LE.1.5) C9»26.b«CP»».4l44
                   C9=HLS1/J. ?6» C9»10.«C1
                   C10 = BLSi?/104.4»18.2!:>«UF«CP
                   Cl l=ClCP
I 7S                Cb=0.083J3« (C9»C10«C11*C12*C1J)/1000.
                   C8=2.«C5
                                   134

-------
                   BPR=FCR»lOOO.O
                   CT3=(C7»C8)i>IH*1000.0
                   CT4=CT2*CT3
                   CTb=CTl«CT4»C14
235                COW=CT5/CP/365.
                   CBO=I(CP*CB)«TDSI-CP»TOSP)/CB
                   COS=CTb»1000./CB/1.5Z3*/CBO
                    TONS=CB«CBO«1.5234
                 11  CONTINUE
240                 RETURN
                    END
                                     135

-------
FEEDWATER  AND  BRINE  DISPOSAL  COSTS
                    SUBROUTINE ADJUST(ICTC»ENR1»CW»IFWCtCPiDEPTHF»PMI«CPItDISTF«PPItE»EItIBC»0
                   lEI«I6C.DEPTH8.UP'tCtBLSl.ClA»Ci!AtC3A»C4AtC5A.C6A.C7AtCBA»C9AtClOAi
                   2CUAfC12AtC13A*Cl4A»DISTB»CB»I>
                    REAL LPtI
   5          C
              C        COOLING TOWER CAPITAL COSTS
              C
                    C1CT=0.
                    IF(ICTC.OE.l) G1CT«ENR1/9SZ.»(.019«CW»».854>
   10          C
              C        FEEDWATER WiLL CAPITAL COSTS INCLUDING SURFACE FACILITIES
              C
                    C1FW=0.
                     ANFW=CP/5.*1.
   15                DEPTHF*DEP?HF/tOOO.
                    IFCIFWC.EQ.2) CO TO 1
                    ClFW»ANFW«ENRl/9b2.»( ( .3*.6875»D£PTHF ) ». 041« (CP/ANFW) •».*225)
                   1»PMI/1.*1»((1.6».48»CP)*(1.*«1.316»CP))/1000.*ANFW
              C
   20          C        FEEDWATER PIPELINE CAPITAL COSTS
              C
                   1 CPCW»CP«CW
                    IF(ICTC.EQ.2) CPCW=CP
                    C1PL=CPI/1.17«3.4«CPCW«».7164»OISTF/10.»»6
   25                IF(CPCW.LE.7.) C1PL=CPI/1.1r»S.0»CPCW»».b**2«OISTF/10.»»6
                    IFICPCW.LE.2.) ClPL«CPI/1.17»f>.8»CPCW«o.3503»DISTF/10.«»6
                    IF (CPCW.LE..6) ClPL«=CPI/i.l7»S.5«CPCW»«.ieOU7»DIStF/10.»»6
              C
              C        PIPELINE  PUMPING PLANT CAPITAL COSTS
   30          C
                    H = DISTF/b280.»t*7./'CPCW«.773
                    IF (CPCW.LE.15.) H=DISTF/5280.»n./CPCW»«.515
                    IFICPCW.LE.  4.) M»DISTF/5280.»S8./CPCW»».33V
                    HK*.0716J»M«*.6548
   35                IF(H.Lt.l50.) HK=.1978»H«*.*667
                    IFIH.LE. 80.) MK= ,663T«M«».17»
                    C1PPP=PPI/1.26»MK»5.8«CPCW»«.9703/1000,
              C
              C        EVAPOHATION POND CAPITAL COSTS
   40          C
                    EPA=1.12*CB/E
                    C1EP=0.
                    IFUBC.EQ.2) CtEP=EI/1.27»6.33J»EPA
              C
   45          C        BRINE INJECTION WELL AND SURFACE FACILITY  CAPITAL COSTS
              C
                    DEPTMB«DEPTHB/tOOO.
                    C1BW-0.
                    IFUBC.EQ.2) 90 TO 10
   50                AK=.32».J692*DEPTHB
                    IF(DEPTHS.LE.6.) AKs.6*.3167«DEPTHB
                    IF(DEPTHS.LE.2J) AK=.8*.236?»OtPTHB
                    ClBW=ENRl/952.«AK«.lb3»CB««.9867
                    IF (CB.LE.2.5) eiBW*ENRl/9b2.»AK«.l92«CB«.748
   &5                IF(CB.LE. .8) C1BW«ENW1/952.«AK».188»CB*».»258
                    IFICB.LE. .3) €18W«ENRl/9b C*BM»     CPI/1.17»5.8«CB«».3503»OISTB/10.»«6
                                             136

-------
 60                IFICB.LE..6)  C1BM=      CP I/ 1 . H»5.5«CB«.2007»D1STB/1 0.»»6
                   C18W=C1B*»C1HM
                   Cia«l=.2Y«Cb*PMI/1.41
                   IF(CH.l.E.b.)
                   IFICb.LK.iJ.)
 65                ClHK=Clrt
                10 CONTINUE
             c
             C         MISCELLANEOUS  CAPITAL COSTS
 70          C
                    IFIIFVnC.NE.2)  Al
                    IFUCTC.EQ.l)  Alt:=l.«.0*lT*C«
                    AJb=EPA*1000.
 BO                 A16 = UISTc)«(l.
                    C7A=(All*A12»A13»Al4«Alb«Ai6)«LP
             C
             C        COOLING  TO*EH  0 AND M
             C
 85 •                OMCT=C1CI*10.
             C
             C        PIPELINE  PUMPING PLANT  0 AND M
             C
                    OMPLPP=RLS1/3.T6*1.6B«CPC*««.7!>4<>
 90                 IF (CPCW.LE.1.5)  OMPLPP»BLS1 /3. r6»l . 76»CPCW»«.6557
                    IF (CPC*.LE..i!5)  OMPLPP=»HLSl/
             C
             C        FEEDWATER KELL 0 AND M
             C
 95                 OMFW=0.
                    IF ( IFWC.EQ.?)  SO  TO d
                    OMFW=8LSi/3.76«21.*CP««.86«
                    IFiCH.LE.l.)
100          C
             C         INJECTION WELL  0 AND M
             C
                  2  OMH«l = 0.
                    IF (IBC.tU.
-------
LISTING  OF  OUTPUT SUBROUTINE
                          SUBROUTINE  OUTPUT 1 ( Al .AZi A3. A4t A5t A6t A 7 tA8«A9»A10t *11 »A12«  A13.A14
                         l.Alb.Al6.A17»A18«NAMt«K)
                          DIMENSION HI (8) «A2<8> .A3 (8) .A4(8) »A5<8) »A6<8> t*7(8) .A8<8) «A9(8) «
                         lA10<8>»All<8>.A12<8>tA13<8)tA14(8>tA15.A16<8)tA17<8>tA18<8>f
         5                2NAMEI7.10)
                          DIMENSION H(8)«R1(8) tR2(8)
                          WRITEI6.100)  (NAME(K.J) t J=l,10>
                      100 FORMAT dMltlOAB//)
                          MRITEI6.101)
        10             101 FORMATUH t 24X. !H»t 2bX .26HDESALTIN6  PLANT  CAPACITICS.20X. 1H«I
                          WRITEC6.102)
                      102 FORMAT ( 1H »24X*1H*«75H ---------------- - --------------------- - -----
                         1 --------------- ..... ------- »              )
                          WRITE (6, 10J)
        15            103   FORMATUH »24X i 1H« .3X .3H.25.6X t 3H.50 »6Xt3Hl ,0»6X i 3M2.0 »6X t3H4. 0.
                         16Xt3H8.0ibX,4HJ6.0t5X,7H32.0   «)
                          WRITEI6.10*)
                      104 FORMAT11H t4X»i6HCOST  OESCRIPTION»4X» lH*»3X»3HMeD»6X»3HMGDt6X»
                         1 3HMGD . 6X . 3HMGD*6X , 3HMGO 1 6X » JHM6D . 6X , 3HH60 . 6X » 6HM60   * )
        20                 t«RITE(6ilOb)
                      105 FORMAT (1M .100H ---------------------------------------------------
                         I ------------------- , -------------------------- *          )
                          MRITE<6«106>
                      106 FORMATdH .25H£APITAL  COSTS/10»»6     *»nXtlH*l
        25                 WRITEI6.107)
                      107 FORMATdH »25H  A.  CONSTRUCTION        *)
                          WRITE(6.108)  (Al (I) ,1=1.8)
                      108 FORMAT(lH»«26X*F6.2«3XtF6.2>3XfF6.2t3X
                      111  FORMATdH  ,25H  D.  INTEREST- (CONSTR )    •)
                          WRITEI6.108)  (A4(I) ,1=1,8)
                          WRITE (6,11^)
        40             112  FORMATdH  ,25H  E.  START-UP             *)
                          WRITE(6,i08)  (A5III tl=j»8)
                      113 FORMATdH  »25H F. GENERAL  EXPENSE      •)
                         V.RITE (6,108)  (A6d),I = l,8)
        45                WRITE!6,114)
                      114 FORMATdH  t25H G. LAND                 •)
                         MRITE(6tl08)  (A7 (I) ,1=1,8)
                         WRITE (6,115)
                      115 FOHMATdH  t25H H. WORKING  CAPITAL      •)
        50                WRITE(6»108)  ( A8 ( 1 1 , 1 = 1 »8)
                         WRITE(6<116!
                      116 FORMATdH  .24X*lH*t7bH- ---------------- - ------- -
                        1 ---- ..... ------------------ «      )
                         X1»A1 ( 1) «A2(1)*A3(1 ) «A4(1) »A5(i> +A6I1) «A7 (1 I »»8(1)
        55                XZ=-A1 (2) •A2(2)*A3(2)*A4(2>»Ab(2)«A6(2)«A7(2)*A8<2)
                         X3-A1 (3)*A2(3) »A3(3) »A4 (3) »Ab ( J) *A6(3) «A/ (3) »A8(3)
                         X4»A1 (4)*A2(4)»A3(4)«A4(4)»A5I4)*A6(4)«A7(4)«A8(4)
                         X5*A1 (b)*A2(5)«A3(5)*A4(5)«4b(b)*A6(5)*A7(b)*A8(5)
                         X6=A1 (6)*A2(6) «A3(6)*A4(6) »A5 (6) *A6 (6) « A 7 (6) *A8(6)
                                           138

-------
 60
 65
 70
 75
 80
 85
 S*0
 95
100
105
110
U5
               117
               118

               119
               120
               121
               122
               123
               12*
               125
    XT"A1<7)*A2<7)»A3<7)*A4<7)«A*(?)«A6(7)*A7<7)«A8<7>
    X8»Al<8>*A2<8>»A3<8)*A4(8)»A5
    WRITE(6tll7)
    FORMATtlH .25H               SUBTOTAL *>
    WRITE (6, 108) Xt.X2.X3tX4tXStX6.X7tX8
    WRITE(6tU8>
    FORMATUH «2*X*lH«i71Xf 1H»)
    WPITE<6ill9)
    FORMATUH «25HANNUAL COSTS/10««3      *»71XilM*)
    WRITE<6,12e)
    FORMATUH «25H I. tABOR-MATEHIALS     •)
    *RITE(6tl38>
    WRITE<6,121)
    FORMATUH »25H
    WRITE(6»13Z) (
    WRITEI6.122)
    FORMATUH i25H
    *RITE(6»132) (
    WRITE<6«1231
    FORMATUH ,25H
    WKITE<6<132) (
    »RITE(6il24)
    FORMAT UH .25H
    MRITE(6tl32) (
                                   J,  CHEMICALS
                                   A10U) »I«lttt)
                                   K.  FUEL
                                   AU(I). !«

                                   L.  STEAM
                                   A12 ( I ) t I«
                                                          *)
                                                         •)
                                            !.«)
                                             id)
                                  M. ELECTRICITY
                                  » 13 < I > t I«l .8)
                                  N. REPLACEMENT
                                  A1»(I) ,1=1,8)
                                                          )
    FORMATUH <25H
    WRITE(6il32) I
    MRITE(6«116)
    WRITE(6,lir>
    Y1 = 49(1)»A10(1).AU (
    Y2=»9(2) »A10 (2) »A11 (2) *A12 (2) «A13 (2) *AU(2)
            *A10 (3) »A11 (3) »A12(J) »A13(3) *AU(3)
            «A10 (4) »A11 (4)*A12(4>*A13<4)»Al*(4)
    Y5=A9(S)*A10(5)»A11(5)«A1Z)»A13(5)«AU(5)
    Y6=49(6)»A10(6)«A11 (6)»A12(6)»A13(6)«AU<6)
    Y7=A9(7)*A10(7)»A11 (7 ) «A 12 ( 7) »A13 (7 ) »A1* (7 )
    Y«=A9 (81 »A10 (8)«A11 (8) *A 12 (8) *A13(8) *Al* (8)
    WRITE (6, 132) Y*,Y2,Y3,Y*tY5.Y6.Y7.Y8
132 FORMAT < 1H* ,26X.«F6t 1 i3X«F6. 1 »3X.F6. I »3XiF6.1 «3X»F6.1 .3XtF6, 1 ,3X«F6.
   ll»3XtF6.1,ZH «)
    WHITE(6,118)
    WRITE(6>118)
    WRITE(6>126)
    FORMATUH »25HTOTAL ANNUAL COSTS      ••TIX.IH*)
    URITE(6<127)
                   0. ANNUAL COST5/10*»3  »t71X»2H« )
                         ,1=1,8)
               126

               127
               128
               129
               130
                   FOHMATUH »25H
                   WRITE(6fl31)  (
                   MRITE(6il28)
                   FORMATUH t25H P. WATER COST-5/1000 6 *)
                   URITE(6«10a>  ( A16II) ,1=1 ,8)
                   WRITE<6,129)
                   FORMATUH t25H 0. SALT COSTS-S/TON    *)
                   WRITE(6tl08)  I A17(I> »I=1'«)
                   WRITE(6tll8)
                   WRITEI6.130)
                   FOHMATUH .25HSALT REMOVED  (TONS)     «)
                   MRITE(6tl31)  (A18U) «I«1,8)
               131 FORMATUH»»25X*F7.0.2X«F7.0.2X.F7.0»2XfF7.0t2X.F7.0.2X.F7.0»2X,
                  !F7.0»2XtF7.0t2H •)
                                   139

-------
                   CM17(S>
120                8=1.
                   DO 10 1=1,10
                   A=(A17(4>-C>«2i»*B
                   B=>ALOG10 / (-0.602U599913)
                10 C=A17<8)-A/32.»»B
125                MRITC(6tl33) A+B«C
               133 FORMATdH .///»10X.21HSALT COSTS  (S/TON)  *  ,F10.5. I9H/ (CAPACITY (M
                  16D) )*«.F10.7. 5H  »  .F10.5   f
                   DO 11 1=1.8
                   Rd>=A16d)/3. 78541
130                Rld)=A17/.»072
                11  R2II) =A18(II«»90T2
                   WRITE(6«134)
               13* FORMATUHO.////.25H SUMMARY IN METRIC UNITS    )
135                WHITE (6tl3b)
               13S FORMATdH ,24X» 1H« .2ZX .48HDESALTING PLANT CAPACITIES
                  1        »9X,1H»)
                   WRITE(6«136)
1*0            136 FORMATUH .2*X»1M« t3Xt3H.9b.5X f*Ml .69tbX t *H3. 79t5X t*H7.5Ti4X.5H15.
                  UA,4X,bH30.28.»X,5H60.57,3X,6H121.13.3M  *>
                   WRITE(6>118)
                   WRITE(6tl99)
               199 FORMAT (1H*«4*X»33HTHOUSANDS OF CUBIC METERS PER DAY   t!9XtlH»)
l*b                IKRITE(6,iOb)
                   MRITEI6.126)
                   MRITE(6«137)
               137 FORMATdH »2bH P. WATEH COST-»/M»*3   •)
                   NKITEI6.108)  (H(I)»I=1,8)
ISO                WPITE(6,138)
               138 FORMATdH ,25H 0. SALT COSTS-S/MTON   •)
                   HRITE(6.108)  (Rid) tl = 1.8)
                   WRITE(6tl39)
155            139 FORMATdH t25HSALT REMOVED (MTONS)    »>
                   WRITE(6tl31)  (R2(I) ,1=1,8)
                   RETURN
                   END
                                  140

-------
LISTING  INPUT  DUMP  SUBROUTINE



                         SUBROUTINE  WRITE(CP.UF.ENRI,BLS1.BLS2.FCR,IR
                         l.TEMP.TDSl»NAI*KItHC03I.N03I,SO*ItCLIfC»I.TOSO.EC»FR.LP.PMI.CPI.El
                         l.OEPTMF.DlSTF.QEPTHBiOISTB.irwC.IBC.EtPPl)
                         REAL  NAIiKl,N03I»IR.LP
        5                WRITE<6,100)
                      100 FORMATdHl.///»23HDESALTING  COST  ANALYSIS   )
                         MRITEIbtiOl)
                      101 FORMAT dH0.6X.lOHINPUT  OATA//76M»«««»«»»»««»*««««««»*«»»»«««»»«««*
                         1**«»»****«»««««**««»*«««««».*»«»*„•«.•«*»«   /(
       10                WRITE(6fl02)
                      102 FORMAT(1H .16HPLANT  VARIABLES  )
                         WRITEI6.130)
                      130 FORMATdM*.30Xi.29HFEEOWATER  AND  BRINE  VARIABLES   )
                         WRITE<6,103)  CP
       15             103 FORMATUH «1X»12H1.  CAPACITY*.1-5. 1 t*H  M80)
                         »RITE!6,131>  PMI
                      131 FORMATdH*.31X«28Hl. PRIME MOVER COST  INDEX *    .F6.2)
                         WRITEC6.104)  UP
                      104 FORMATdH .1X.*4H2.  USE FACTOR*.F5.2)
       20                *RITE<6.132>  CPI
                      132 FORMAT(lH«t31X»3UM2. CONCRETE  PIPE  COST  INDEX  =  ,F6.2)
                         WRITE(6.10b)  ENRI
                      105 FOfiMATUH t!X.18H3.  ENH BLDS INOEX = tF6.1)
                         l»RITfc(6,l33)  PPI
       25             133 FORMAT(1M*»31X»40H3. PIPELINE  PUMPINS  PLANT COST  INDEX »   tF6.2)
                         WRIT£(6tl06)  BLS1
                      106 FORMATdH .1X.19H4.  BLS LABOR  lNDEX*tF5.2>
                         toRITE(6,13*)  El
                      134 FORMAT(lH»t31X»26H4. EARTHWORK COST INDEX  *   .F6.2)
       30                WRITE<6»10M  B1.S2
                      10T FORMATdH ,!X,t8HS.  HLS CHEM INDEX = ,F6.1>
                          IF(IFWC.EQ.2) *RITE(6.135)
                      135 FORMAT(lH*»3iX»41H5. SOURCE  OF FEEDKATER-  SURFACE DIVERSION    )
                          IF (1FXC.EQ.1) t*RITE(6.136)
       35             136 FORMAT(1H««31X*2«H5. SOURCE  OF FEEDWATER-  WELLS    >
                          *RITE(6,10S)  FCR
                      108 FORMATdH «!Xil6H6.  FIX CH6  KATE = .F6.5!
                          IF(IFWC.EQ.l) WRIT£(6.13/)  OEPTHF
                      137 FORMAT (1H».31X-.24H6. AVERAGE WELL DEPTH  =   tF6.0» 3H  FT)
       40                 MRITE<6»109)  IR
                      109 FORMATdH tlX.tgHT.  INT RAT£=«F5.2>
                          IFdFhC.EQ.l) *RITE(6,l38)  OIS1F
                      138 FORMAT(lH*i31X»33H7. AVERAGE DISTANCE  FROM PLANT  «  .F6.0.3H  FT)
                          *RITE(6illO)
       45             110 FORMATdH »3*X)
                          IFdBC.NE.l)  WRITE(6»1*0)
                      140 FORMAT(1H«.31XV44H8. TYPE OF BRINE DISPOSAL-  EVAPORATION  PONDS   )
                       10 IFII8C.EQ.1)  hRITE(6»139)
                      139 FORMATdH*.31X.42H8. TYPE OF BRINE DISPOSAL-  INJECTION WELLS  )
       50                 WRITE(6.111)
                      111 FORMATdH .21HWATER  CHARACTERISTICS)
                          IFdBC.NE.l)  WRITE(6,141)  E
                      141 FORMATdH*.31X»29H9. ANNUAL EVAPORATION  HATE  " .F6.0.3H FT)
                          IF(IBC.EQ.l)  WHITEI6.142)  DEPTHS
       55             142 FORMAT(1H*.31X»24H9. AVERAGE WtLL DEPTH  «   .F6.0. 3H  FT)
                          WRITE(6,11Z)  TEMP
                      112 FORMATdH .1X.Z1H1.  FEED TEMP (PEG F)*.F5.2>
                          IF(IBC.EU.l)  WRITE(6»1*3)  OlbTB
                      143 FORMATdH*.31X»33H10. AVERAGE DISTANCE FROM PLANT « .F6.0.3H FT)
                                            141

-------
60                «RITE(6.113) TOSI
              113 FORMATdH «1X»*8H2. FEED TOS  (PPM)=tF5.0)
                  WHITE(6.114) NA!
              11* FOHMATdH .1X.J7H3. FEED NA 
                  WRITE(6.115) KI
65            115 FOHMATdH t!Xtl6H*. FEED K (PPM)=,F5.0)
                  WH1TEI6.116) HC03I
              116 FOHMATdH .1X.19H5. FEED HCOJ  
                  NHITE(b<122)
              122 FOHMATdH )
80                KHITE(6tl23)
              123 FOHMATdH 113HMISCELLANEOUSI
                  WHITE(6.12*1 EC
              124 FORMATdH .1X.J3H1. ELEC HAT£s«F9.5)
                  WHITE(6.12b)
85            125 FOHMATdH .4X.16H    (S/100U KHH) )
                  WKITE(b<126) FR
              126 FORMATdH tlXt!3H2. FUEL HATE = tF9.S)
                  MHITE(6tl2n
              127 FORMATdH .4X.17H    (f/MHTU)      )
90                WRITE(6.128) LP
              128 FOHMATdH »!Xil*H3. LAND PH|CE = t F9.6)
              129 FOHMATdH .*X. l5H($M!LLION/ACHfc) )
                  RtTUHN
                  END
                                  142

-------
                          APPENDIX B

             OPTIMIZATIONAL ANALYSIS COMPUTER CODE


DESCRIPTION OF CODE

     Although the theory encompassing this optimization tech-
nique is a very powerful one, the computer code of the method
has certain inherent limitations.  This is not a fault of the
particular program, but rather a characteristic of nearly all
programs with any degree of sophistication.  The utility of any
optimum seeking procedure in engineering applications is largely
dependent on the economy of use and its generality.  It is
primarily the latter aspect that limits the subsequent use by
an individual unfamiliar with the mechanics of the programs'
operation.  Very few large computer programs are general enough
to be used with little or no knowledge of their structure and
weak points.  The computer code developed in this section is
not among these very few, but a great deal of time and effort
has been spent in maximizing the generality of the program.

     The Jacobian Differential Algorithm consists of a main
program and routines using common and call data transfers.  A
summary of the role of each subroutine is given in Table B-l.
The entire system can be subdivided into seven groups according
to their role in the optimizing technique:

     1.  Problem definition is accomplished in subroutine
         CONTROL;
     2.  Input-Output is provided by the subroutines
         DATAOUT and ANSOUT;
     3.  The coordination of the entire program procedure
         is handled in subroutine DIFALGO;
     4.  Organization functions in the program are
         completed in REORGA and ARRAY;
     5.  Special computational subroutines include JORK,
         JACOB1, ENDCHEK, CONDER, KUNTUK, NEWTSIM, and
         GAUSS;
     6.  The principal parts of the program are encompassed
         in subroutine DECDJ, INCDJ, and INCFT which accomplish
         the step-by-step movement toward the optimum; and
     7.  The calculation of the constrained derivatives is
         done in the subroutine, KODRIV.
                              143

-------
Although each of these subroutines have certain independent
functions, it is probably only worthwhile to describe a select
few so the reader can observe the basic operation of the
program.  A flow chart of the basic organization structure en-
compassed in DIFALGO is shown Figure B-l.  Similar flow charts
for selecting state and decision variables (REORGA), solution
of system of non-linear equations by a Newton-Raphson (NEWTSIM),
and the numerical change in the decision variables (DECDJ) are
given in Figures B-2 through B-4, respectively.

     The main program contains all input data requirements and
serves only as an input-output system.  The user supplies a
problem title and subtitle, name, and a series of control
variables:

      (1)  number of original variables, free variables,
          equality constraints, inequality constraints,
          type of objective function  (linear or non-linear),
          and type of constraints (linear or non-linear);
          and
      (2)  maximum number of iterations toward the minimum,
          frequency of output of intermediate calculations
          (debugging output), and input dump controls.

     Next to be read in are convergence tolerances, the charac-
teristics of each variable (free or non-free variables), and
the array of values associated with the x-variables in the
objective function representing a feasible solution.   The program
returns a single value for the optimum which the user may output
as desired.   Usually, however, the main program should print
the values of the independent variables and the resulting
objective function.  A formal output of the final solution is
provided by subroutine ANSOUT.  A summary of the input variables
required and the definitions required to set up a problem is
given in Table B-2.  To address this subroutine, any even
numbered integer can be listed in the argument of the CALL
DIFALGO ( )  statement.

     The program requires about 56k of core storage and will
solve most problems within 10-20 central processor seconds.
The existing common statement structure will handle a problem
up to 30 variables and 30 constraints.  A complete listing of
the main program and subroutines is given in the following pages.
Code language is Fortran IV and uses no tape or disk systems.
                              144

-------
    TABLE B-l.

Subroutine

ANSOUT
ARRAY

DATAOUT

DECDJ

DIFALGO
ENDCHEK

GAUSS

INCDJ

INCFT
JACOB1

JORK



KODRIV
KUNTUK

NEWTSIM

CONTROL
DEFINITION OF SUBROUTINE FUNCTIONS

                    Function

     Output of the optimal solution
     Determination of initial variable
     partition
     Output of input data and control
     variables
     Decreases the value of a decision
     variable
     Coordination of the complete algorithm
     Checks problem to insure the search
     remains in a feasible region
     Gaussian elimination procedure for
     solving system of linear equations
     Increases the value of a decision
     variable
     Loosens a previouly active constraint
     Computation of the determinant of the
     Jacobian matrix
     Selection of the decision or slack
     variable resulting in the most
     decrease in the value of the objective
     function
     Constrained derivatives, 6£ /<5dp,
                                6si/dp<
                       6s. /6d>
                            v
     and 6y/6(j> .
     Checks Kuhn-Tucker conditions for a
     minimum
     Newton-Raphson method for solving
     systems of non-linear equations
     Computes the value of the objective
     function, constraints, objective
     function derivatives, and constraint
     derivatives.
                         145

-------
      NO ITERATIONS
        EXCEEDED?
                            COMPUTE  VALUES OF:
                             1. Objective  Function
                             2. Constroint Functions
                             COMPUTE  THE DERIVATIVE
                                  VALUES OF'
                              . Objective Function
                             S.Constroint Functions

                                 ITERATiON


LUES OF
ATRIX, J
-f\ oV-fcJ
VftS \-
PARTITION PROBLEM AS TO
STATES AND DECISIONS
i

                                                                            uJ
                               IS THIS FEASIBLE
                               POINT A MINIMUM ?
           MODIFY THE PARTICULAR
           DECISION VARIABLE GIVING
           THE LARGEST DECREASE
           IN THE OBJECTIVE FUNCTION
  REDUCTION IN  OBJECTIVE
FUNCTION TOO SMALL 9
Figure  B-l.
Illustrative  flow  chart  of the  subroutine
DIFALGO
                                          146

-------
        Common Variable
        Storage and Input
                                      NSV  = No, of State Variables

                                      NLK  = No. of Inactive Constraints

                                      Ul   = Determinant of Jacobian Matrix
                                  Identify and Relabel 1he Derivatives
                                  of the Objective function with
                                  Respect to the Partitioned State
                                  Variables. Store in New Array
                                  Select and Relabel the Derivatives
                                  of the Objective Functions with
                                  Respect to the Decision Variables.
                                  Store in  New Array
                                  Identify and Relabel the Derivatives of
                                  the Inactive Constraints with respect
                                  to Both the State and Decision
                                  Variables.  Store in New Arrays.
                                                       I
                                  Select and Relabel the Derivatives of
                                  the active Constraints with Respect
                                  to Both the State and Decision
                                  Variables. Store in New Arrays.
                                                       J
                                  Call Subroutine JACOB!  and
                                  Evaluate the Determinant of the
                                  Jacobian Matrix, IJI.
        Output the New Problem
        Partition, State, and
        Decision Variables.
                                                              Substitute Non-zero ele-
                                                              ments on to the Matrix
                                                              Diagonal. Recall JACOBI.
                                                              Select New Non-zero
                                                              Elements for Diagonal.
                                                              Recall JACOBI.
                             Stop] Reformulate
                                  Problem
Figure B-2.
Illustrative  flow  chart  of  the  subroutine REORGA
                                           147

-------

Subroutine
NEWTSlM
*

Common Variable and
Input Storage
                    Store Value of  the
                    Modified Decision Variable
                    -•4 Loop Count No. I j-
                  Compute the Derivatives of the
                  Active  Constraints
                               I
                  Compute the Values of the Active
                  Constraint Slack Variables,^.
                               1
                  Examine each Active Constraint
                  Slack Variabte,<£j.
                                              Select a New
                                              Unit Change in the
                                              Decision Variable
                                                                 Initialize Loop
                                                                 Count No. I.
                         Define Jocobian
                         Matrix, J_.
                  With J. and the Slack Variable
                  Set, call Subroutine GAUSS
                  which Calculates the Unit Changes
                  Necessary in the State Variables
                  to Satisfy Problem Constraints.
                      Modify each State
                      Variable to its new
                      Value. Store Values.
                           Loop Count
                         No. I Exceeded
                                                  Loop Count
                                                 No.2 Exceeded?
                                  Initialize all Variables
                                  to Origina I Values
Figure B-3.
Flow  chart  of  the subroutine NEWTSIM used  to
solve systems  of  non-linear  equations.
                                        148

-------
r_ 	 I
1
Compute the Constrained Derivatives
of all State Variables with Respect
to the Decision Variable, dp.


Find the Maximum Decrease in the
Value of dp which First Forces a
State Variabe to Zero. Label this
Decrease ad,.


Compute the Constrained Derivatives
of all Loose Slack Variables with
Respect to the Decision Variable, dp.


Find the Maximum Decrease in the
Values of dp which First Forces
on Inactive Constant to be Active.
Label this Decrease adj.
                                         Compore the Values of 
-------
TABLE B-2.
SUMMARY OF PARAMETERS REQUIRED AS INPUT AND
PROBLEM SET-UP
Control Variables (Input)

        NORIVA
        NFREEVA

        NKEQ
        NKINEQ
        IYOFX
        ICTYPE


        IFREE


        MAXITER

        MAXLEV

        ICON




Problem Identification

        ITITLE
        ISUBTIT
        NAME

Convergence Tolerance

        TOLCON
        TOLONS
        TOLJAC
        TOLVJ
        TOLDJ
        TOLY
        TOLKUN

Initial Feasible Solution
                                 Definition

                     no.  of original variables
                     no.  of free variables (can be
                     negative)
                     no.  of equality constraints
                     no.  of inequality constraints
                     type of objective function
                          l=linear
                          2=quadratic
                          3=non-linear
                     type of constraints
                          0=non-linear
                          l=linear
                     variable identification
                          0=variable can be < 0
                          l=variable must be >_ 0
                     maximum number of iterations
                     per  problem
                     frequency of intermediate
                     calculations output
                     input dump
                          l=yes
                          0=no

                                 Definition

                     title of problem
                     subtitle of problem
                     name of user

                                 Definition

                     Constraints
                     State variables
                     Jacobian Matrix
                     Slack variables
                     Constrained Derivatives
                     Objective Function
                     Kuhn-Tucker Conditions

                                 Definition

                     Problem independent variable
                                                   (continued)
                              150

-------
TABLE B-2.   (continued)
Set-up Parameters
(in subroutine control)
        Y
        ADYDX(I)
        ADFDX(I,J)
        AF(J)
            Definitions

Value of objection function
dy/dx
dfi/dxj (f=constraints AFD(I)
Value of constraints
                               151

-------
MAIN PROGRAM  LISTING
                       PROGRAM UASSL
                      1 (lNPUTtOUTPUT«TAPE5=INPUT.TAPEb=OUTPUT>
                       COMMON XCONT/ NORIVA.NKINEQ.NKTOT.MAXITER,IPRINT.MAXLEV.NOESIZ.
                      INSV.NDV.NTK.NKEQtNLKfIREG»IMlNiJPAR.KPAH.ICODE.IPARP.KPARP
      5                COMMON /IOL/ T9LCON.TOLONS.TOLJAC.TOLVJ.TOLOJiTOLDIP.TOLY.TOLKUN
                       COMMON /STATE/ Y.AJACOB 11DETEHM,AF(30).X(30)»  UT(30130),NC1(30) .
                      1ND130).NS<30>.KTI30).KLI30),IFKEEI30)
                       COMMON /OEHIV/ ADYDXI30) ,ADFOX(30t30) .AOYDSOO) .ADYOO(30) .AOFTOSO
                      10.30).ADFTDD<3e.30>•ADFLUS(30»30)»ADFLOO(30.30)
     10                COMMON XCOOHIV/ COOYDO(30).COOYDF(30)»COOSOO(30.30).COOSOF(30t30)t
                      ICODFLOD(30.30)»COOFLDF(30,30)
                       COMMON /MISC/  W(30),V(30)»AMA(30.30)
                       DIMENSION I TITLE(8).ISUBTIT(8)(NAME(8)
                       READ(5»10)  (ITITLE(I)f1=1.8)
     15             10 FOMMAT<8A10)
                       READI5.1U)  (ISOBTIT(I).1=1.8)
                       REAO(StlO)  (NAME)1),1=1,8)
                       HEAO(5»H)NORIVA.NFREEVA.NKEU.NKINEQ»IYOFX»ICTYPE
                    11 FORMAT(6I5)
     20                NKTOT=NKEQ«NKINEO
                       READ(5t12)(IFREE(I).Isl.NOHIVA)
                    12 FORMATUOI2)
                       HEAO(5»13)TOLCON  ,TOLONS.10LJAC.TOLVJ.TOLOJ.TOLY,TOLKUN
                    13 FORMAT18F10.6)
     25                READI5.11tMAXITEK.MAXLEV.        ICON
                       IF(ICON.LT.O)  CALL OATAOUT(ITITLE.ISUBTIT,NAME.IYOFX.ICTYPE,
                      1NFREEVA)


     30
                       Provide an initial feasible solution, X(i), here.
     35
     50

                      CALL DIFALGO(l)
                   124 WRITEI6.133)            (X(J)»J=l.NO»Y
                   133 FORMATdH  . 15F7.0 , IX ,EI 1 .3)
     55             115 CONTINUE
                      STOP
                      END
                                         152

-------
CODE  LISTING OF  CONTROL


                           SUBROUTINE CONTROL (I »J»Ktl_>
                           COMMON /CONT/ NORIVA.NKINECUNKTOT.MAXITER,IPRINT.MAXLEV.NDESIZ,
                          lNSV.NOV»NTK»NK£Q.NLK»IHE6,IMINiJPAR»KPA«.ICODE.IPAHP,KPARP
                           COMMON /TOL/  T9LCON.TOLONS»TOLJAC»TOLVJ»TOLDJ.TOLDIP»TOLY,TOLKUN
          5                COMMON /STATE/  Y»AJACOBI,OET£RM»AF(30).X(30)»  UT(30.30).NCH30).
                          1NOOO) »NS<30) tKTOO) »KL(30) .IFKEEI30)
                           COMMON /OERIV/  AOYOX(38).ADFOXOOi30).ADYDS(30),ADYDDC30)tAOfTDS<3
                          10.30),ADFTDD(3e,30),ADFLDS13D.30).ADFLDD(30,301
                           COMMON /CODRIV/ CODYOD130)»COOYDF<30>tCOOSOO(30«30).COOSOF<30,30) ,
         10               1COOFLDD
                           COMMON /MISC/ «(30i .vooi .AMAI30,301
                           NC=NC1(1)
                      c
                      c
         15           C         THIS  SUBROUTINE IS THE  USER SUPPLIED OBJECTIVE  FUNCTION.
                      C         CONSTRAINTS* AND ASSOCIATED DERIVATIVES  WITH RESPECT TO THE
                      C         INDEPENDENT VARIABLES
                      C
                      C
         20           C
                      C
                      C         DEFINITION BF THE OBJECTIVE FUNCTION
                      C
                      C
         25                 IFII .NE.l)  GO TO 1

                            List statements necessary  to define the value  of  the objective
                            function,Y,  h".re.
          30                 IFUPRINT.6T.O) 60 TO 1
                            MRITEI6.102) Y
                        102 FORMAT < 1HO. IOX»30H«»«»»»«««<>«»«»«««««»*««««««*<>  /I U,'SUBROUTINE
                           1CONTROL«/11X."VALUE OF THE FUNCTION IS ».F20.*>
                      C

                      C        DEFINITION  OF PROBLEM CONSTRAINTS—MUST  BE WRITTEN  IN
                      C        GREATtR-THAN-OR-EQUAL-TO FORMAT
                      C
                      C
          40              1  IF(J .NE.2) GO TO 2

                             List statements necessary to define  each constraint here.

                             Constraints have  the form:
          «5                     AF(1)= f(x)
          SO
          55
                             IF(IPRINT.GT.O)  SO TO 2

                         103 FORM*mio?10X.30H»	  /HX,-SUBROUTINE
                                              153

-------
60               lCONTROL»/nX»»9ALUES OF PROBLEM CONSTRAINTS»/UX»* I «.10X.» AFU)
                 2 * )
                  DO 10 M«1»NKTOT
               10 WRITE(6<10«>  M«AF
              104 FORMAT(1H t11X*I3»1OXtEll.*)
65          C
            C
            C        DEFINITION 9F OBJECTIVE FUNCTION DERIVATIVES
            C
            C
70              2 IFIK.NE.3)  60 TO 3
                  List  statements of the derivative of the objective function,
                  ADYDX,  here.   One derivative  for each variable.


75          C
            C
            C        DEFINITION OF CONSTRAINT OEHIVATIVES
            C
            C
80              3 IFfL.NE.*)  GO TO 4
                  List the derivatives  of  each constraint with respect to each
85                variable,  ADFDX,  here.   This is  a  double subscript array.
90              4 RETURN
                  END
                                       154

-------
CODE  LISTING OF  DIFALGO


                      SUBROUTINE DIFALGO(NNP)
                      COMMON /CONT/ NORIVA.NKINEQ.NKTOT.MAXITEH, IPRINT.MAXLEV.NOES1Z.
                     1NSV.NDV.NTK,NKEQ,NLK.IREG,IMIN.JPAR,KPAH.ICOD£,IPARP«KPARP
                      COMMON /IOL/ TOLCON.TOLONS.TOLJAC.TOLVJ.TOLDJ.TOLDIP.TOLY.TOLKUN
     5                COMMON /STATE/  Y.AJACOBI .OETERM.AF (30) »X (30) ,  UT (30.30) , NCI (30) .
                     1ND(30> ,NS(30) »KT(30>.KL(30) , IFHE£<30>
                      COMMON /OE«IV/  AOYDXOO) • AOFOX (30.30) .ADYDS(30> .ADYODI30) .ADFTOSO
                     10*30) .AOFTDDI39.30) .ADFLDS (30.JO) . ADFLOO (30 ,30 )
                      COMMON /CODRIVf COOYOOOO) .CODYQFOO) .COOSOO (30.30) .CODSOF (30.30) .
    10               1CODFLDD(30.30)»COOFU>F<30,30>
                      COMMON /MISC/ *M30),V ,AMA(JO,30>
                      COMMON JOBCODE
                      JOBCOOE=NNP
                      DO  4  1=1,36
    15               * U(I>*0.0
                      ID=MAXLEV
                      ICODEalO
                      APT=10000.0
                      IMIN=1
    20                ICOUNT=0
                  1000 CONTINUE
                      ICOUNT=ICOUNT*J
                      IPHINT=4
                      IF(ICOUNT.EQ.IO)  IPRINT=-1
    25                IF(ICOUNt.EQ.IO)  IO=ID»MAXLEV
                      IF(IPRINT.6T.O) 60 TO 1001
                      XRITElb.lOl)  I60UNT
                   101 FORMAT (lH1.10X*60H»««*«»»»e«**t>«*«»*««*«**»»«»««*»»***«*»e"»»*»**
                      l**««o««»««*««*   /lIX.«DEBU6QINe OUTPUT FOR  ITERATION NO. «.I3)
    30            1001 CONTINUE
                       1 = 1
     35                 CALL CONTROL=16«2
                       CALL KODKIV(I1»I2.I3.I4,I5.I6)
     55                 CALL KUNTUK
                       IF(IMIN.EQ.IO) GO TO 473
                       P1=ABS(APT>-ABS(Y)
                       IFIABS(Pl).LE.TOLY) IMIN=3
                       IFfABS(Pl).LE.TOLY) CALL ANSOUT

     60                 IF(IMIN.EO.IO) GO TO 4T3
                       APTaY
                       CALL JORK
                       IF(ICODE.EO.l) CALL DECDJ
                       IFIICOOE.EQ.2) CALL INCOJ
     65                 IF1ICOOE.EU.3) CALL INCFT
                       IF(IMIN.EO.IO) GO TO 473
                       IF(ICOUNT.LT.MAXITER) 90 TO 1000
                       IMIN«2
                       CALL ANSOUT
     70             473 CONTINUE
                       RETURN
                       END
                                              155

-------
CODE LISTING  OF REORGA
                        SUBROUTINE REORGA
                        COMMON /CONT/ NORIVA.NKINEO.NKTOT.MAXITERflPRINT.MAXLEVfNDESIZ.
                       lNSV.NDV.NTK.NKeQ»NUK»IRE6»IMIN«JPAR«KPARtICOOEoIPARP.KPARP
                        COMMON /TOL/ TOLCON.TOLlONS.TOLJAC.TOLVJ.TOUCU.TOLDIP.TOLY.TOLKUN
       5                COMMON /STATE/ Y.AJACOSI.DETERMtAF(30)»X(30).  UT(30.30).NCI(301.
                       1NDI30) .NSCJO) ,KT<30) ,KL<30> .IFKEECiO)
                        COMMON /OERIV/ ADYDXOO) .AOFDXt30.30).AOYDS(30) .ADYDD(30>•ADFTDS(3
                       10.30),ADFTDD<3e,30).ADF|_OS<30.30)»ADFLOD<30.30)
                        COMMON /CODRIV/ COOYOO(30).CODTOF(30}iCOOSOO130.30).COOSOF(30.30),
      10               1CODFLDD(30.30)»COOFLDF(30,30)
                        COMMON /MISC/ W(30).V(30),AMA(30,30)
                        KLP=0
                     41 CONTINUE
                        IF(NSV.EQ.U) GO TO 80
      15                DO 10  I*i»NSV
                        IF(I.GT.NORIVA) AOYOS(I)=0.0
                        IF(I.GT.NOMIVA) GO TO 10
                        NAUXaNS(I)
                        AOYOS(I)=ADYOX(NAUX)
      20             10 CONTINUE
                     so MBNORIVA-NSV
                        DO so  1=1,NDV
                        IFINSV.GT.NOHIVA)  ADYDO(I)=0.0
                        IF(NSV.GT.NORIVA)  GO  TO  20
      25                IF(I.GT.M)  ADYDO(I)=0.0
                        IF(I.GT.M)  80 TO 20
                        NAUX=ND(I)
                        ADYOO11)=ADYOX(NAUX)
                     20 CONTINUE
      30                IF(NSV.EQ.O) GO TO 81
                        DO 40  Ksl.NSV
                        KA»KT(K)
                        DO 30  Id.NSV
                        IF(I.GT.NORIVA»AND.I.Ea.K)  AOFTDS(K,I)=-1.0
      35                IF(I.GT.NORIVAiANO.I.EQ.K)  SO  TO 30
                        1F(I.GT.NORIVA*AND.I.NE.K)  ADFTOS(K.I)"0.0
                        IF(I.GT.NORIVA.AND.I.NE.K)  GO  TO 30
                        NA=NS(I)
                        ADFTOS(K«I )=ADF'DX(KA,NA)
      40             30 CONTINUE
                        00 35  Jsl,NDV
                        IF(J.GT.M.ANO.K.EQ.J) ADFTDU(K.J)> 1.0
                        IFU.GT.M.AND.4.EQ.K) SO TO 35
                        IF(J.GT.M.ANO.M.NE.K) ADFTDD(K.J)=0.0
      45                IF(J.GT.M.ANO.y.NE.K) GO TO 3S
                        NA=NO(J)
                        ADFTOO(K.J>=ADFDX(KA.NA)
                     35 CONTINUE
                     40 CONTINUE
      50             81 IFINLK.EQ.O) GO TO 63
                        00 60  Lsl.NLK
                        LA*KL(U
                        IF(NSV.EO.O) GO TO 82
                        DO SO  1=1.NSV
      55                IF(I.GT.NORIVAiANO.I.EQ.L)  AOFLDS(L. I)=-1.0
                        IF(I.GT.NORIVAiANO.I.EQ.L)  GO  TO 50
                        IFd.GT.NORIVAiAND.I.NE.U  ADFLOSd.. I) »0,0
                        IF(I.GT.NOMIVA.AND.I.Ne.L)  GO  10 50
                        NAaNS(I)
                                           156

-------
 60                 ADFLOS(L»l>»AOPOX(LA.NA)
                50 CONTINUE
                82 DO 55 J=1,NDV
                   IF(M.LE.O.ANO.tf.EQ.L) ADFLOO(L«J)=1.0
                   IFIM.LE.O.AND.rf.EQ.L) 60  TO 55
 65                 IFIM.LE.O.AND.b.NE.L) ADFLDOfLtJ)»0.0
                   IF(M.LE.O.ANO.d.NE.L) 60  TO 5&
                   IFU.GT.M.AND.ri.EQ.L) ADFLDOfLtJ>»1 .0
                   IF SO  TO 55
                   IF(J.GT.M.ANO.W.NE.L) ADFLDO
                55 CONTINUE
                60 CONTINUE
 75              63 IFIN5V.EQ.O) I*EG*2
                   IF(NSV.EQ.C) GO  TO 61
                   CALL JAC08I
                   IFUREG.GE.OI «0 TO 61
                   KLP=KLP*i
 80                 NP=NSV*1
                   IFIKLP.GI.NPI 60 TO 61
                   IF(KLP.EQ.l) Ni*l
                   IF(KLP.EQ.i) N8»NSV
                   IF(KLP.SI.l) NJ»KLP-1
 85                 IF).GT.TOLVJ) 60 TO 44
                   GO TO 43
                44 IF(ABSIXINAU)).GT.XTV) NA=NAU
                   IF
               102 FORMAT <1H0.10X»30H»««»	•••••••••	«»»» / 11X ,'SUBROUTINE
                  lREO«GA»//llX»»I*t5X(»NS{I)*«»     S    »»10X»»ND(I)•«*     D    •
                  1)
                   DO 104 I=1*NOR!VA
US                 IFII.6T.NSV.AND.I.6T.M) GO TO 104
                   IF(I.GT.NSV) »RITE(6*107! I
               107 FORMATUH  t8Xi!3J
                   IF(I.GT.NSV) GO  TO IU5

                   NAUX=NS(I)
120                 KRITE(6tl03) I*NAUX,X(NAUX)
               103 FORMAT<1M  ,8X,13.4X,I5»F10.J»
               105 CONTINUE
                   IF1I.6T.M) GO TO 104
                   NAU *ND(I>
125                 WRITEI6.106)   NAU ,X(NAU)
               106 FOHMAT(1M»»40X*I5.F10.3)
               104 CONTINUE
               101 RETURN
                   END
                                        157

-------
CODE LISTING  OF ARRAY
                     SUBROUTINE
                     COMMON /CONT/  NORIVAtNKINEQfNKTOTtMAXITCRtIPRINTtMAXLEV.NOESU.
                    lNSV,NDV.NTK»NKEQ»NLK«IHE6»lMINtJPAR«KPARtICODE»IP»RP«KP*RP
                     COMMON /TOL/ T8LCON.TOt.ONS»TOLJ*C»TOLVJ»TOLDJiTOLDIP«TOLY«TOLKON
    5                COMMON /STATE/ Y.AJACOBI.OtTtRMtAF(30),X(30)»   UT130.30)tNCl(30).
                    1NOI3U) ,NS(JO> «KT(30> »KL<30> . IFHEEI JO)
                     COMMON /DEHJV/ AOYDXOfl) . ADFDX (301 30) tAOYQSOO) iAOYOD(30) .AOFTDSO
                    10.30).AOFTDD(3»»30).ADFUDSIJO.JO).AOFLDO(30,30)
                     COMMON /COOK 1V/ CODYDO(30),COOYDF(30).COOSOD(30•30).COOSDF(30.30).
   10               1COOFLOD(30.30)+COOFLDF(30*30)
                     COMMON /MISC/  WOO) ,VOO) ,AMA(J0.30)
                     I=j=K=L=M»0
                     IF(NSV.EU.O) 60 TO 3
                   5 I«I«1
   IS              * KnK.l
                     IF(K.GT.NOHIVA) 60 TO 2
                     IF( IFREE(K).OT.O)  60 TO 4
                     NSIIIaK
                     IF(I.QE.NSV) 66 TO 3
   20                60 TO  5
                   2 CONTINUE
                     K«0
                   7 K"K*1
                     IF(K.6T.NOMIVA» 60 TO 6
   25                IF(IFREE(K).LT<0)  60 TO T
                     KK = K
                     IF(X(KK).LE.TOUONS) 60  TO  7
                     NS(I)xK
                     IF(I.GE.NSV) 60 TO 3
   30                I«I*1
                     GO TO  7
                   6 CONTINUE
                     K=0
                   8 K=K»1
   35                IF(K.GT.NO«IVA) 60 TO 3
                     IF(IFHEEIK) .LTiO)  60 TO 8
                     IF(X(K) .6T.O.O) 60 TO a
                     NS(D=K
                     IF(I.SE.NS^) SO TO 3
   *0                1*1*1
                     00 TO  8
                   3 CONTINUE
                     K = 0
                   9 J=J«1
   »5             10 K=K»1
                     IF(K.6T.NORIVA) 60 TO 12
                     IF(NSV.EU.O) GO TO 19
                     00 11  Ms 1,1
                     IFINS(M).EO.K)  60  TO 10
   50             11 CONTINUE
                  19 CONTINUE
                     ND(J)=K
                     IF(J.GE.NOV) 60 TO 12
                     60 TO  9
   55             12 CONTINUE
                     IF(NSV.EQ.Q) 69 TO 15
                     K»L*0
                  U L*L«1
                  13 K=K»1
                                            158

-------
60                IF(K.GT.NKTOT)  60  TO  15
                  IF(ABSUF  60 TO 17
                   KL(L)«=K
                   60 TO 16
                18 CONTINUE
                   RETURN
 75                 END
                                       159

-------
                  SUBROUTINE JAC9BI
                  COMMON /CONT/ NORIVA.NKINEQ.NKTOT.MAXITER.IPRINT.MAXLEV.NOESIZ.
                 INSV.NDV.NTK.NKEQ.NLK.IREe.IMIN.JPAR.KPAR.ICODE.IPARP.KPARP
                  COMMON /IOL/ T9LCON.TOLONS.TOLJAC.TOLVJ.TOLDJ.TOLOIP.TOLY.TOLKUN
 5                COMMON /STATE/ YtAJACOBI«D£TtRMtAF(30)»X<30>»  UT(30.30)»NC1(30)•
                 1N0130),NS(30)»KT(30).KL(30>.IFREEOO)
                  COMMON /DERIV/ AOYDXI30).AOFOX(30.30).AOYDSI30).ADYODI30)tAOFTOSO
                 10*30).ADFTOO(3«.30),ADFLDSI JO.30).ADFLDD(30130)
                  COMMON /COBRIV/ COOYOOI30).COOYDFI30).CODSOO<30i30).COOSDF(30.30).
10               1CODFLDO(30.30)*COOFLOF(30.30)
                  COMMON XMISC/ W(30).V(30)«AMA(30.30)
                  NDESIZ*NTK»NKEa
                  IREG=0
                  00 12  KBl.NSV
15                00 12  1=1.NSV
                  AMA(K.I)*AOFT09(K.I)
               12 CONTINUE
                  IF(NOEsu.eo.ir DETEKM»AMAII»I>
                  IF(NOESK.EQ.l)  60 TO 13
20                CALL GAUSS
               13 CONTINUE
                  AJACOBI»DETERM
                  IF(A8S(AJA60BD.LE.TOLJAC) IRE6>-1
                  IF(IPRINT.ST.O)  60 TO 101
25                MRITE(6.102)  AJACOBI
              102 FORMAT(1HO»10X»30H»»*«»*»»«»«»«»»«*«**»»«««»«»*» /I IX,"SUBROUTINE
                 UACOBI*/nx,*VALUE OF JACOBIAN MATRIX DETERMINANT IS«/HX.F20.3)
              101 RETURN
                  END
                                   160

-------
CODE LISTING FOR JORK
                          SUBROUTINE JORK
                          COMMON /COMT/
                         INSV.NDV.NTK.NKEQ.NLK.IREG.IMIN.JPAR.KPAR.ICOOE.IPARP.KPARP
                          COMMON /TOL/ TeLCON,TOLONS.TOI.JAC.TOt.VJ.T01.DJ.TOI.DIP.TOLY.TOLKUN
         5                 COMMON /STATE/ Y. AJACOB1 .DETtRM.AF (30) »X (30) ,  UT (30.30) .NCI (30) .
                         1NDOO) tNSOO) .KT130) .KLI30) . IFREEI30)
                          COMMON /OERIV/ ADYDXOOJ .AUFOXOO.SOI .ADYOSOO .ADYDOOOI .AOFTDSO
                         10.30) .ADFTDD(39»30) .ADFLOS ! JO. 30) .ADFLDD ( 30 t 30 )
                          COMMON /CODRW COOYDDOO.COOYOFOO.COOSOOOO.SO.COOSOFOO.SO).
        10                lCODFLDOt30.30)*COOFLOF(30.30)
                          COMMON /MISC/ *(30) ,V(30).AMA<30.30)
                          KPARNcO
                          AVP'0.0
        15                AVN«-0.0
                          AVTOTxO.O
                          M=NOHIVA-NSV
                          00 9 J=1«NOV
                          IF(J.GT.M)  D»0*0
        20                IF(J.GT.M)  60 TO 9
                          NAUX*NO(J)
                          0=X(NAUX)
                       30 CONTINUE
                          CaCODYOO(J)
        25                IF(O.ST.TOLONS.ANO.C.6T.AVP)  JPARP»J
                          IF(D.GT.TOLONS.AND.C.GT.AVP)  AVP«C
                          IF(C.LT.AVN) JPARN'J
                          IF(C.LT.AVN) A¥N=C
                        9 CONTINUE
        30                IF(NSV.EQ.NKEO) GO TO 18
                          IF(NSV.EO.Q) GO TO IB
                          KPARN=0
                          JERK=NKEQ*1
                          DO 19 K*JERK*N3V
        35                C»COOYOF(K»
                          IF(C.LE.AVN) KPARN=K
                          IF(C.LE.AVN) A»N-C
                       19 CONTINUE
                       18 CONTINUE
        40             17 AV10TeAVP«AVN
                          IF(AVTOT.GE.O.fl) GO TO 20
                          KPAR»KPANN
                          IF(KPARN.EU.O) GO TO 21
                          ICODE «=3
        45                GO TO 22
                       20 JPAR=JPAHP
                          ICODE=1
                          GO TO 22
                       21 JPAR*JPARN
        50                ICOOE=2
                       22 CONTINUE
                          IF(IPRINT.GT.O) 60 TO 101
                          WRITE<6,102) I60UE.JPAR.KPARN
                          IF(JPAR.EQ.O.ANO.KPAR.fQ.O) ICOOE»10
        EC                IF(JPAR.EQ.O.AND.KPAR.EQ.O) IMlNal  >
        "            102 FOR«ATUH0.10X*30M«— «*»' ............. .........  /UX.-SOWOOTINE
                         IJORK«/11X,«ICODE».5X.»JPAR «,S.X,»KPAR •/! IX, I5.5X, I5.5X, IS)
                      101 RETURN
                          END
                                            161

-------
CODE LISTING  FOR  DECDJ
                         SUBROUTINE OECOJ
                         COMMON /CONT/ NOR IVAiNKINEOtNKTOT.MAXITfcR.IPRINT»MAXL£V.NDESUt
                        lNSV,NOV»NTK»NKEQ»NLK»IREe»IMIN;jPAR»KPAHiICODE»IPAHP.KPARP
                         COMMON /TQL/ T6LCONtTOL'ONS«TOLJAC»TOLVJiTOLOJ«TOCOIP•TOLY•TOLKUN
        5                COMMON /STATE/ Y. AJAC081»DE TEHWtAF (30) .JU3UI f  UT(30»30).NCH30)»
                        1NDI30) »NS<30> ,KT (3C) tKL<30) iirREEOO)
                         COMMON /DE«IV/ AOYOXOO).AOFOX(30.30).ADYDS(30).AOYDDI30)>ADFTDS(3
                        10<30)fADFTOD(39.30)tAOFLDS(J0t30)»ADFLOO(30,301
                         COMMON /CODRIV/ COOYODI30)>COOYOF(30)>COOS06(30t3U).COOSDf(30.30)•
       10               lCOOFLDO(J)e>30UCOOFLDF(3U»30)
                         COMMON /MISC/ M(30)iV(30)fAMA(30>3U)
                         COMMON JOBCOOE
                         COMMON XI(30)
                         REAL MAXOSItMAXDFltMAXDD
       IS                JVP=JPAR
                         NAUX=NO(JVP)
                         VALXO'X(NAUX)
                         00 201 I^ltNORiVA
                     201 XKI)sX(I)
       20                VALYO»COUYDO(J*P)
                     101 CONTINUE
                         KL« = 0
                         KPARPs-1
                         IPARP=-1
       25                APPLE»-80000.0
                         IF(NSV.NE.O) CALL KOORIV<3.3.3i3»3»3)
                         IF (NLK.NE..U) CALL KODRIV (41 *.*•*•*»*)
                     103 ASVP*AHPLE
                         IF(NSV.EU.O) 69 TO 32
       30                DO 20 1=1.NSV
                         IF(KLW.EU.IPARP.ANO.I.EQ.IPARP)  60 TO 20
                         NAU*=NS
-------
60                 H»XDFL"AiFL
                   APT*ABb MAXDFL ) »AB5 (MAXDSI-MAXDO » »ABS (MAXDFL-MAXOD)
                   APC«3.0»10LCON
                   IFUPT.LE.APC)  MAXDD-MAXDD/2.0
                   IF(APT.LE.APC)   00 10 50
65                 IF«MAXDSI.6T.MAXDFL) "60 TO  71
                   IF (MAXOFL.6T.MAXDD) 60 TO 45
                   60 TO -30
                71 IF(MAXDSI.Gt.MAXt)D) 60 TO 41)
                   GO TO bO
TO              40 NAUXaNO(JVP)
                   X (NAUX)eX (NAUXT*MAXDSI
                   NAUXaNS(IPARP)
                   X(NAUX)«U.O
                   00 41 IsltNSV
75                 IF(I.EQ.IPARP) 60  TO 41
                   NAUX=Nb(I)
                   X(NAUX)»X(N6UX)'*M»XOiI*COUbDO(l. JVP)
                41 CONTINUE
                   CALL CONIHOL(2*2.3.4)
80                 CALL RtOHGA
                   CALL KODWIVU, 1,1, 1,1,1)
                   IF (COOYDtX JVP) »LT.O.U) 60 TO 6U
                   NAUXsNO(JVP)
 85
                   ND(JVP)=NAU
                   CALL NEMfSlHtir
                   IF (IMIN.tQ.10) GO TO  1U2
                   CALL ENOCMtKdr
 90                 GO TO 103>4>
                   CALL REOH6A
100                 CALL KODHIV11, 1,1, 1,1,1)
                   IF(COOYOOtJVP)*LT.O.O)  GO  TO  6U
                   XMAX=0.0
                   DO 4d  1=1, NDV
105                IFd.GT.NZI 60  TO  48
                   NAUX=NO(I)
                   IF(XINAUX) .LT.  XMAX)  GO  TO  48
                   XMAX=X(NAUX)
                   JCM=I
HO             48 CONTINUE
                   NSV=NSV*1
                   NTK>NTK»1
                   NS(NSV)=NO(JCHr
                   KT(NSW>=KL(KPAHP)
115                N0( JCH) =NO(NZ)
                   KL(KPAHP>=KL(NLK)
                   NLKsNLK-1
                   CALL REOH6A
                                     163

-------
                   MSNOHIVA-NSV
120                IF(JPAH.GE.M)  JPAR«M
                   IF(M.LE.O) GO TO 102
                   CALL NEMTblMCir
                   IF(lMjN.tQ.10) 60 TO 102
                   CALL ENDCHEKlir
125                GO TO 10*
                50 NAUX=ND(JVP>
                   D = ABS(S.I>»X )
                   IF (D.L-T.ABS(MAXDD) ) MAXDD = -D
                   IF(D.LT.A6S(MAXDD)> 60 TO bj
130                X(NAUX)=X(NAUX>»MAXDD
                53 CONTINUE
                   IF (NSV.EU.O) GO TO S>2
                   DO 51 IdtNSV
                   NAUX»NS(I>
135                X(NAUXI=X(NAUXr«MAXDD«COOSDD(I»JVPI
                51 CONTINUE
                52 CALL CONrROL<2»2»3«*>
                   CALL REOH6A
                   CALL KODHIV(l,i,i.l.l.l)
UO                IFICODVDDUVPMLT.O.O) GO TO 6U
                   CALL NEWISIHCU
                   IF(IMIN.tQ.lO) GO TO 102
                   CALL ENOCHEKdT
                   GO TO 10^
U5             60 CONTINUE
                   ICO"0
                   ICP=0
                   VALYN=COOYOO(JMP)
                   NAUX=NU
               10* RETURN
                   END
                                     164

-------
CODE LISTING OF  INCDJ
                           SUBROUTINE INCDJ
                           COMMON  /CONT/  NORIVA«NKINEQ,NKTOT,MAXIT£R,IPRINT,MAXLEV,NDESIZ»
                          lNSV,NDV,NTK»NKEQ»NLK»IR£6»IMINtJPAR»KPAa»ICOD£»IPARP,KPARP
                           COMMON  /TOL/ TOLCON.TOLONS.TOLJAC,TOLVJ,TOLOJ«TOLOIP.TOLY»TOLKUN
         5                 COMMON  /STATE/ Y.AJACOBI .DETERM, AF<30> «X<30> »   UT(30.30),NCI<30>.
                          1NOOO) ,NS(30> ,KT<30),KL!30> .IFKEEC30)
                           COMMON  /DEHIV/ AOYDXOO) »AOFOX(30,30) »AOroS(30l ,ADYDD<30) «ADFTDS<3
                          10,30),ADFTDO<38,30>.ADFLDS(30.30),ADFLOO<30,30>
                           COMMON  /CODRIVf COOYDOI30)fCODYOFOO),COOSOO(30»30).COOSDF(30.301 t
         10                1COOFLOD(30,30)*CODFLOF(30,30)
                           COMMON  /M1SC/  *(30),V(30),AMA(30,30)
                           COMMON  JOBCOOE
                           COMMON  XI(30)
                           REAL MINDSJ.MINDFL
         IS                 JVN=JP*R
                           NAUX=NO(JVN)
                           VALXO=X(NAUX)
                           DO ?01  I=l,NO»!VA
                       201 XKI)rX(I)
         20                 VALYO=COOYDD(JWN)
                       101 CONTINUE
                           KLW = 0
                           KPARP=-1
                           IPARP=-1
         25                 4PPLE=10000.0
                           IF(NSV.NE.O) CALL KOORIV(3,3,3,3,3,3)
                           IF(NLK.NE.O) CALL KODRIV<*,*,*,4,4,*)
                        17 AOSI=APPLE
                           IF(NSV.EQ.O) GO TO 22
         30                 00 20 !•!,NSV
                           IFIKLW.EQ.IPARP.AND.I.EQ.IPARPI  60 TO  20
                           NAUXxNS(I)
                           IFJIFREEINAUX! *LT.O)  60 TO 
-------
 60                IFIMINDFL.NE. APPLE)  GO TO 21
                   IF (MINDSI.NE. APPLE)  60 TO 21
                   NAUX»ND(JVN)
                   MINOSI»3.0*ABS(X(NAUX> 1*1.0
                Zl CONTINUE
 65                IF(MINDSI.LT.MINDFL)  60 TO 1*0
                   SO TO 160
               ISO CONTINUE
                   IF(IPARP.LE.O) 60  TO  1S>2
                   NAUX=NS(IPARP)
 70                X(NAUX>*0.0
               15Z CONTINUE
                   NAUX»ND(JVN>
                   X(NAUX>*X(NAUX) *MINDSI
                   IF(NSV.EU.O) 60  TO  153
 15                DO 41 1=1, NSV
                   IF(I.EQ.IPARP) 60  TO  *1
                   NAUXsNS(I)
                   X 
                   CALL REON6A
105                CALL KODMIV( 1 ,1 ,1,1,1 ,1)
                   IF (CODVDU ( JVN) 4GT.O.O)  GO TO  1100
                   XMAX=0.0
                   DO *6 1=1, NDV
110                IFd.GT.N2) GO TO *B
                   NAUX=NO(I)
                   IF(A8S(X(NAUX) >.LT.XMAX) 60  TO  *B
                   XMAX=X(NAUN)
                   JCH = I
115             *8 CONTINUE
                   NbV=NSV»l
                   NTK=NTK»1
                   NS
-------
                   KT(NSVI»KL
                61 CONTINUE
                   ICP»ICP»1
                   ICO=ICO*1
140                IFIICO.61.301  60  TO  10,d
                   IF(ICP.Lt.3)  XZEHO=VALXO*(VALXN-VALXO1/2.0
                   IFdCP.GT.il  X£EHOa(ABS(VALrN)*VALXO«ABS(VALVO)»VALXN)/(ABS(VALYN)
                   1«ABS(VALYO)1
                   NAUX=MD(JVN)
US                IF ! ICO.EU.i)  60  TO  906
                   XI(NAUX)-X(NAUXl
               906 X(NAUX)=XiERO
                   CALL NEWTSIM(2r
                   IF(IMJN.EQ.IO) 60  TO  102
150                CALL CONIKOL<2*2«3»4)
                   CALL REONGA
                   CALL KODMIV(1.1.1.1.1.1)
                   IFUCODE.LE.O.ANO.ICO.GT.lbl  GO  TO  102
                   IF (ABSlCOt)YDO(JVN) ) .LE.TOLVJ1  GO TO 100
155                IFlCOOYOOIJVNliGT.TOLVJ)  VALXN*XZERO
                   IF(COOYODlJVN)*Gf.TOLVJ)  VALYN*COOYOD
-------
CODE LISTING  OF  INCFT
                          SUBROUTINE INCPT
                          COMMON /CONT/ NOHIVA.NKINEQ.NKTOT»MAXITE«»IPRINT.MAXLEV,NDESIZ«
                         lNSV.NDV»NTK,NKEQ,NLK»IREG,lMlNijPAR»KPAH»ICOOEiIPARP»KPARP
                          COMMON t\OL/ TeLCON,TOUONS.TOLOACiTOLVJ.TOLDJ»TOLDIP«TOLY»TOLKUN
         5                COMMON /STATE/ Y.AJACOBl«DET£RM.AF(301,X(30)»  UT(30.30).NCI(30I.
                         1NDI30) ,Nb(30) ,KT<30) ,KL<30> . IFHEEOO)
                          COMMON /DEHIV/ AOYDXOU).ADFDX(30,30).AOYDS(30).ADYDO(30),ADFTDSt3
                         10.30),ADFTDD(3e»30>.AOFLDS(JO.30),AOFLDO<30,30)
                          COMMON /COORIVS CODYDO<30>«CODYDF(30>.CODSDD(30,30).CODSOF(30«30).
        10               1CODFLOO(39,30)*CODFLDF(30,3U)
                          COMMON /MISC/ *(30).V(30).AM*(30.30)
                          COMMON JOBCODE
                          COMMON XI(30)
                          REAL MINUFbtMINDFL
        15                JFT=KPAR
                          DO 201 I=1,NORIVA
                      201 XKI)xX(I)
                          APPLE=10000.0
                          CALL  KOUKIV(5*5.b.5.b.b)
        ZO                IF( NLK.EQ.O) SO TO 99
                          CALL KOOHIV(6«6*6f6,b,b)
                       99 CONTINUE
                          MINOFS=APPLE
                          MINDFL»APPLE
        25                KL«=0
                          IFS=-1
                          IFL=-1
                          00 100 1=1.NSV
                          IF(KLH.F.U»IFS.AND.I.EO.IFS) 60 TO 100
        30                NAUX=NS(I)
                          IF (IFREE(NAUX) «LT.O)  (30 TO 100
                          IF(COOSOF(I.JFT).OE.O.O) GO TO 100
                          ADU = -X(NAUX)/CODSOF(I,JF T)
                          IF(ADU.GE.MINDFS)  60  TO 100
        35                MINDFS»AOU
                          IFS=I
                      100 CONTINUE
                          IF(NLK.EQ.U)  GO TO 1U2
                          DO 101 I=1»NLK
        40                IF(KLM.EQ.IFL.AND.I.EQ.IFL) 60 TO 101
                          NAUX-KL(I)
                          IF(COOFLOFd.JFT) .6E.O.O)  GO TO 101
                          ADU=-AF(NAUX)/CODFLOF(I.JFT)
                          IF(AOU.GE.MINDFL)  60  TO 101
        45                MINDFL=AOU
                          IFL = I
                      101 CONTINUE
                      102 CONTINUE
                          IF(MINDFL.LE.O*0)  KLW^IFL
        50                IF(MINDFS.LE.OiO)  KLH=IFS
                          IF(KLW.EU.IFL)  60 TO  99
                          IF(KLW.EQ.IFS)  60 TO  99
                          TEMP=ABS(MINOFL)-ABS(MINDFS)
                          TEM=3.0«TOLONS
        55                IF(ABS(TEMP).LE.TEM)  MINDFL*0.*5
                          IFIMINOFL.ST.MINDFS)  60 TO i>00
                          DO 111 I=1»NSV
                          NAUX^NSd)
                      111 X(NAUX)=X(NAUXT«MINDFL*COOSOF<1.JFT)«0.fb
                                            168

-------
60                 AP»APPLE
                   N = 0
                   00 600 I'l.NSV
                   NAUXsNSU)
                   IFCABSCXCNAUXM.LE.AP) N«I
65                 IFUBSCXINAUXU-.LE.AP) AP-X(NAUX)
               600 CONTINUE
                   IFS»N
                   GO TO 601
               500 CONTINUE
70                 00 511 I-ltNSV
                   NAUXTrNS(I)
                   X (NAUXT ) «X (NAUXT ) »COOSOF (I  , JF T I »MINOFS»0 .75
               511 CONTINUE
               601 CONTINUE
75                 10=0
                   NAUXsNS(IFS)
                   00 b!2 laltNSV
                   IF (I.EU.IPb) 60 TO S12
                   IO*IO«1
80                 NS(ID)«Ni>( I)
               512 CONTINUE
                   NSV>NSV-1
                   NZ*NORIVA-NSV
                   NLK*NLK»1
85                 ID=0
                   00 513 IM.NDV
                   IFd.LT.NZI SO TO 5U
                   IF(I.Gt.NZ) 60 tO 513
                   ND(I)=NAUX
90             b!3 CONTINUE
                   KL(NLK)=KT(JFT1T
                   NTK*NTK-1
                   IFtNSV.EU.NKEQT SO TO b!5
 95                Nl=NKEQ*l
                   DO 514 I*NltNSV
                   IFd.FQ.JFT! 60 10 51*
                   IO»IO*1
                   KT (iOJ'KF (I)
100            514 CONTINUE
               518 CONTINUE
                   CALL NEWTSIMOT
                   IF(IMIN.EQ.IO) GO TO 3'
                   CALL ENDCMEKU)-
105             37 CONTINUE
                   IF(IPRINT.OT.O) 00 TO 10*
                   HHITEI6. J01)
               301 FOHMATUH  ,«I AM MERt AT SUBHOUTINE INCFT»)
               10* RETURN
110                END
                                     169

-------
CODE LISTING  OF KODRIV
                           SUBROUTINE KODBIV(II112.I3»I*.15.161
                           COMMON /CONT/  NORIVA.NKINEQfNKTOT.MAXITERtIPRJNT.MAXLEV.NOESI/•
                          INSV.NDV.NTK.NKEQ.NLK.IREStIMINiJPAR.KPAR.ICODE.IPARP.KPARP
                           COMMON /TOL/ T9LCON»TOLONS.TOI.JAC»TOLVJ» TOLDJ.TOLDIP'TOtY'TOLKUN
          5                COMMON /STATE/ Y.AJACOBI»0£tER«.AF(30),X(30)»   UT(30.30).NCl(30).
                          1NO(30)tNS(30).KTI30)iKL<30).IFKEEOO)
                           COMMON /OERIV/ AOYDX(30).AOFOX(30.30).AOYDSOO).AOYOD(30>.AOFTDSJ3
                          10.30)iAOKTDD(30»30).AOFLOS(30.30)*AOFLOO(30.30)
                           COMMON /CODRIV/ CODYDOI30)tCODYDF(30).COOSDD(30»30).COOSOF(30.30).
         10               1CODFLODIJ«.30)»CODFLDF(30i30)
                           COMMON /MISC/  M(30) CODYOO(J)=AMA(1.1)
         20                IFINOESU.EO.ir GO  TO 9
                           DO z JC=<:.NOESIZ
                           I=vJC-l
                           AMA(l.JC)zADYOSd)
                         2 CONTINUE
         25                DO 3 IR-2.NDESI2
                           K=IR-1
                           AHA(IR.11=ADFTOD(K.J)
                         3 CONTINUE
                           DO b IR=i!,NOESI/
         30                DO 4 JC*2>NDES[2
                           K=IR-1
                           I=JC-1
                           AMA ( IR» JO =ADFTDi> (K, 1 >
                         4 CONTINUE
         35              5 CONTINUE
                           CALL GAUSS
                         6 CONTINUE
                           CODYOD(J> =DETEHM/AJAC08I
                         9 CONTINUE
         *0                IF(IPRIN1.ST.Of GO  TO 301
                           WHITE
-------
 60                 IFUR.LE.Kl  IA*IR-1
                   IFUR.GT.K)  IA*IR
                   AMA
               204 FORMATUH  1 1 OX *I3. 1 OXtFiJO.*)
               203 CONTINUE
               302 IFU3.NE.3) 60  TO  303
 60                JVPejRAR
                   NDESIZ=NbV
                   DO 50  M=1,NSV
                   DO 20  Jzl.NSV
                   DO 30  K=lfNSV
 85                IF(J.EO.M) QO  TO 40
                   AMA(K.J)=AOFTDS(K«J)
                30 CONTINUE
                   GO TO  20
                40 DO 4t>  KslfNSV
 90                AMA (K, J)=AUFTOO (K. JVH)
                45 CONTINUE
                20 CONTINUE
                   IF(NDF.5I/.EQ.1T  DETERM*AMA ( I . 1 )
                   IF1<>)
                12 FORMAT (1HO*10X+30M«««»»»«*«««*»»««««»»<»*«»<'**1>"  / 11X, «SU8HOU1 INE
                  IKODRIV"/13X»»M»»!>X»»JVP«.S>X,»CODSDO(M.JVP)«)
                   KHITE(6»i!2) (M* JVP.COD50D (M« JVP) .M*1.NSV)
                22 FORMATdM  . 10X i I3.6X t I3.6X »F20.3)
105            303 IFII4.NE.4) GO  TO  304
                   JVP=JPAR
                   IF(NLK.EO.O) 60  TO  304
                   DO 24  1 = 1. NLK
                   NAUX=KL(I)
110                IF(NSV.EO.U) CODFLDO(I.JVP)=AOFDX(NAUX.JVP)
                   IF(NSV.EU.O) 68  TO  24
                   AMA(1.1)=ADFLDD(I.JVP)
                   DO 26  J=l.NSV
                   JC=J»1
US                AMA <1.JO=ADFLDS(I.J)
                26 CONTINUE
                   DO 2B  Ksl.NSV
                                      171

-------
                   AMA ( JR. 1 1 «ADFTDO (K t JVPI
120             28 CONTINUE
                   00 32 L"1»NSV
                   JC"L*1
                   00 34 M"i«NSV
                   UR=K«1
125                AMA (JR.JC) «ADFTD5(M.L)
                34 CONTINUE
                32 CONTINUE
                   NDESIZ=NSV*1
                   CALL GAUbS
130                CODrLDD ( I . JVP) *D£ TERM/A JACOB I
                2* CONTINUE
                   IF (IPRlNT.GT.Or (JO TO  304
                   *RITE<6.48)
                48 FOHMAT(1MO»10X*30M««»««««»»»»*«»»»««»»»***«»*«»» / 1 IX ."SUBHOUT INE
135               1KODRIV  */13X.«I*.5X.*C6DFLDO»)
                   •KITE (6.401)  (I.CODFLDDU . JVP) . I»1,NLKT
               401 FOHMATUM . 1 OX* I 3 , 5X .FiTO . 3 )
               30* IF(Ib.NE.b) 00 TO  30!)
                   JFT=KPAR
140                OObS N^l.NSV
                   IX=JFT»N
                   OOS2U JxltNSV
                   IF(J.EQ.JFTI  GO T052U
                   IF ( J.LT.JF1 )  JD=J
145                IF(J.GT.JFT)  JD=J-1
                   00530 Ksi.NSV
                   IF(K.EU.N)  GO  T0b30
                   IF(K.GT.N)  KD*K-1
                   IF(K.LI.N>  KD=K
150                AMA I JD.KD) "UDFTDS ( J,K )
               530 CONTINUE
               b20 CONTINUE
                   NDESIZ=NSV-1
                   IF COOSDF(N»JFT)=(DETERM/AJACOei)»(-l)»«IX
                   IFINDF.SU. LE.l) GO T0510
                   CALL GAUbS
                   CODSOF (Nt JPT) * ( OE TERM/A JACOB I ) • (-1 ) *»IX
160            510 CONTINUE
                55 CONTINUE
                   IF (IPRINT.6T.Or 60 TO  30b
               502 FORMAT (1 MO. 10X«.30H»**»«««««»»*«*»»»»«»»»»»«»*««« / 1 1 X . "SUBROUTINE
165               1KODRIV»/J1X,»  I  »,»JFT*»4X»»COUSDF(I»JFT>»>
                   DO 504  laltNSV
                   HKJTE(6»bOM I«JFT.COOSOF(I.JFT)
               50b FORMATdM  »9X . I3» 14 tbX»Fii0.3)
               b04 CONTINUE
170            30S IFU6.NE.6) GO TO  306
                   JFT=KPAR
                   IX=JFT»1
                   DO 610  K=l»NLK
                   DO 600  1=1. NSV
175                10=1
                   IF(I.EQ.JFT) ID"I»1
                   DO 600  J*ltNSV
                                     172

-------
                   IF(I.EO.NSV) 60 TO 650
                   AMAU»J>=ADFTDSUOtJ)
180                GO TO 600
               650 ID=K
                   AHA ( I ,J)«ADFLDS(IO.J)
               600 CONTINUE
                   NDESIZ*NSV
185                IFfNOESU.EQ.ir CODFLDF(K.JFT)«(AMA(lil)/AJACOBI>M-l)»»IX
                   IFINOESU.EQ.lr SO TO 610
                   CALL GAUSS
                   CODFLDF  * (DETEHM/AJACOBI ) * (-1 ) *•!*
               610 CONTINUE
190                IFIIPRIN1.GT.OT GO TO 306
               603 FOHMAT(lMOflOX»30H«»*««*««*«**»»*«»«»»»*»*«»»*** / 1 IX. 'SUBROUTINE
                   1KODRIV  »/llX.»  I  •»5X,»COOFLOF(I.KPAR)*)
                   WRITE (6. 60Z)  (I.COOFLDF (I.JKT) . I«1.NLK>
195            602 FORMATdM  t  9X. 13, 10X«Fa0.3) '
               306 RETURN
                   END
                                    173

-------
CODE LISTING  OF ENDCHEK


                          SUBROUTINE ENDCHEK (LCODE)
                          COMMON  XC06ITX NOHI VA»NKIN£U»NKTOT.MAXIT£Ht IPHINTtMAXLEV.NOESIZ.
                          INSV,NOV»NTK»NKEQ.NLK»IHE6.IMIN»JPAR,KPAH»ICOOE,IPARP.KPARP
                          COMMON  /IOL/ TeLCON,TOLONS»rOLJAC,TOLVJiTOLOJ.TOLDJP.TOLY»TOLKUN
         5                COMMON  /STATE/ Y,A JACOBI »OET£RM, AF (30) .X ( 30 ) .  UT (30t3U> «NC1 (30) t
                          1ND(30).NS(30).KT(30) »KL (30) . IFNEEOO)
                          COMMON  /OERIV/ ADYDX(30) .ADFDX ( 30,30 > ,ADYDS(30) ,AOYDO(30) ,ADFTDS<3
                          10,30) ,ADF TDD (38. 30) . ADFLDS ( JO , 30 1 • ADFLDO (30 , 30 )
                          COMMON  /COORIV/ COOYOO(JO) ,COOYDF(30) ,CODSDO ( 30.30 ) .COOSDF (30, 30 ) ,
         10                1 COOFLDD ( 30 1 30 ) .COOFLDF (30,30)
                          COMMON  /MISC/ K(30) ,V (30) ,AMA ( J0,30)
                          COMMON  JOBCODE
                      407 CONTINUE
                          IF(NLK.EU.O) 60 TO 403
         15            406 AP*TOLCON
                          N*0
                          CALL  CONTROL (2«2»2»2)
                          DO 400  I*1»NLK
                          NAUX=KL(I)
         20                IFIAF (NAUX) .GTiTOLCON) 60  TO 4UO
                          IFIAF(NAUX) ,LE0.0
                          M«NORIVA-NSV
                          DO 10 1=1, NOV
                          IF(I.GT.M) 60 TO 10
                          NAUX=NO(1)
         30                IF (X (NAUX) .GE.AP)Nl=I
                          IF (X(NAUX) .GE.AP) AP=X(NAUX)
                       10 CONTINUE
                          N5V=NSV*1
                          NTKsNTK*!
         35                NAUX=KL(N)
                          KT (MSV) =NAUX
                          KL(N)sKLINLK)
                          NLK=NLK-1
                          NAUX=ND(N1)
         40                Nb(NSV)=NAUX
                          NAUXsNO(M)
                          NO(N1)=NAUX
                          CALL  REOHGA
                          CALL  NEMISIM(LGOOE)
         45            403 CONTINUE
                          AP=TOLONb
                          Nl = 0
                          IF(NbV.EU.U)  GO TO 404
                          IF (JOBCOU6.LE.2)  60 TO 404
         SO                00 401 1=1. NSV
                          NAUX=NS(I)
                          IF(IFPEEfN*UX)lLT.O) 60 TO 401
                          IF(XINAUX) .GT.TOLONS)  GO TO 401
                          IF (XINAUX) .LE.AP) N=I
         55                IF (XINAUX) .LE.AP) AP=X(NAUX)
                      401 CONTINUE
                          IF(N.EU.U) 60 TO 404
                          AP=0.0
        60                DO 20 1=1, NDV
                          IF(I.6T.M) 60 TO 20
                          NAUX=ND(I)
                          IF(X (NAUX) .GE.AP)  Nl-I
                          IF (X(NAUX) .GE.AP)  AP=X(NAUX)
        65             20 CONTINUE
                          NAUX=NS(N)
                          NAU*NO(N1>
                          NS(N)=NAU
                          NO(N1)>NAUX
        70                CALL REOH6A
                          GO TO 40T
                      404 CONTINUE
                      406 RETURN
                          ENO


                                            174

-------
CODE LISTING OF  KUNTUK



                          SUBROUTINE KUNTUK
                          COMMON"/CONT/ NOR IVA.NKINEQ.NKTOT.MAXmR.IPRINT.MAXLEV.NOESU,
                         1NSV.NDV,NTK,NKEQ,NLK»IRE6,IMIN»JPAR,KPAR.ICOD£,IPARP,KPARP
                          COMMON /10L/ T9LCONtTOLONS.TOtJAC,TOLVJ»TOtDJ»TOLOIP«TOLY.TOLKUN
         5                COMMON /STATE/ Y.AJACOBI»OEfERMiAF(30),X(30),  UT(30,30).NCI(30)•
                         1ND<30).NSM30),KT<30),KL<30>.IFHE£<30)
                          COMMON /OERIV/ ADYDX13U).ADFDX(30,30),AOYOS{30).ADYDD(30),ADFTDS<3
                         10t30> »AOfTQD(38,30),AOFLOS(30»30).ADFLDO(30,30)
                          COMMON /CODRIV/ CODYOOI30),COOYDF(30).CODSDD(30,30).CODSDF(30,30) ,
        10               1COOFLDO(39«30)*COOFLDF(30.30)
                          COMMON /MISC/ W(30),V(30),AMA(30,30)
                          COMMON JOBCOOE
                          IMIN=1
                          Nl=NOfV
                          K1=KT(I)
                          IF(AUStAF(Kl))iGT.TOLCON)  lMIN*-2
        25               2 CONTINUE
                       28 DO  3  J=1.NOV
                          IF(J.ST.NI) GO TO 3
                          IF(CODYOO(J).LT.-TOLVJ)  IMIN=-J
                         3 CONTINUE
        30                IF(NSV.EQ.O) GO TO  21
                          DO  4  K=1,NSV
                          IF(K.LE.NKEQ) 90 TO  *
                          IF(CODYOF(K ) .L'T.-TOLVJ)  IMIN = -4
                         * CONTINUE
        35             21 DO  b  J=I,NDV
                          IFIJ.GT.Nll GO TO 5
                          NAUX=NO(J)
                          IFdFRtE(NAUX) 4LT.O) GO  TO 6
                          TERM=COOYOO(J)»X(NAUX)
        40                IFIABS(TERM) .GT.TOUKUN)  IMIN=-!>
                          GO  TO b
                         6 TERM=CODYOO(J)
                          IF(A8S(TERM).6T.TOLKUN)  IMIN—6
                         S CONTINUE
        45                IF(IMIN)8»8,9
                         9 CALt  ANSOUT
                         8 RETURN
                          END
                                             175

-------
CODE LISTING  OF NEWTSIM
                          SUBROUTINE NEWTSIM ( JCODE )
                          COMMON /CONT/ NOH I VA .NK INEQ.NK TOT ,MAXI TEH , IPRINT , MAXLEV .NOES 12 ,
                          lNSV.NOV,NTK,NKEO«NLKtIREG.IMIN»JPAR»KPAKiICOOE.IPARP«KPARP
                          COMMON /TOL/ T9LCON.TOLONS»TOLJAC»TOLVJ»TOLOJ,TOLOIPtTOLY»TOLKUN
          5                COMMON /STATE/ Y.AJACOBI.OETERM.AFOO) ,X(30) .  UT (30 ,30 ) ,NC1 (30 ) ,
                          1NOI30) .NSI30) ,KT(30) ,KL(30) , IFHEEI30)
                          COMMON /DERIV/ AOYOXI30) ,AOFOX (30.30) . AOY05 (30 ) . ADYDO ( 30 ) ,AOFTDS(3
                          10*30) .ADFTOOI30.30) . AOFLDS ( 30 ,30 ) . AOFLDD < 30, 30 >
                          COMMON /COORIV/ CODYOOOO) iCOOYDFOO) .COOSOO (30 ,30 ) .COOSDF (30 , 30 ) .
         10                1COOFLDD(30.30I»COOFLOF(30,30)
                          COMMON /MISC/ * (30) ,V(30) »AMA (30,30)
                          COMMON J08COOE
                          COMMON XI (30 )
                          ICODE*10
         15                KP*0
                          N»NSV
                          IF(N.EQ.O) 60 TO 6
                          IFUCODE.LE.2)  JVPsJPAR
                          IF (JCODE.EQ.3)  JVP»KPAR
         20            301 CONTINUE
                      205 NAUX*ND(JVP>
                          XT*X(NAUX)
                          00 100 JK=1,30
                          CALL CONTROL(2»2,2.4)
         25                K«0
                          00 200 1*1, N
                          NAUX=KT(I)
                          W(I)a.AFINAUX)
                          IFIABSUFtNAUXH.GE.TOLCONIKKl
         36           200  CONTINUE
                          IF(K.EU.O) GO TO 350
                          00 201 1=1, N
                          NAUXSKT(I)
                          00 201 J«li(N
         35                NAUXTsNS(J)
                          AMA ( I , J) =ADFOX 1NAUX .NAUXT )
                     201  CONTINUE
                          IF(N.EO.l) V(1)=W(1)/ADFOX(NAUX, NAUXT)
                          IF (N. F.O.I I GO TO 10
         40                NO£SIZ*N
                          CALL 6AUSS
                       10 CONTINUE
                          00 300 1*1. N
                          NAUXSNS(I)
         *5                X(NAUX)=X(NAUX)»V(I)
                          IFdFREE(NAUX) iGT.O.ANO.X (NAUX) .LT.0.0)  XINAUXlsO.O
                     300  CONTINUE
                     100  CONTINUE
                          KP»KP»1
         50                IFIKP.6T.tO) 60 TO 102
                          ICOOE»-10
                          IFIJCODE.EQ.3)  60 TO 102
                          00 204 1=1, N
        5S            204 X (NAUX) rXl (NAUX)
                          NAUX«NO(JVP)
                          X(NAUX)sXT*(Xl(NAUX)-XT)/2.U
                          60 TO 301
                      102 WRITE(6,10»>

        **           1"5  FORMAT (»0».23HNE«TSIM OOESNT CONVERGE)
                          IMIN»4
                          CALL ANSOUT
                      350 IF(IPPINT.ST.O)  60 TO 6
                     7    MRITE(6
        65              8 FORMAT(1M0.10X»30H»*«»«»«»»»«»«»*««»»««»»»«*«««. /UX, "SUBROUTINE
                         1NE*TSIM«//11X.»   I*,5X.»X(I)«)
                          WRITE(6>101) (ItX(I) ,I»1,NOKIVA1
                      101 FORMAT (1H , 1 OX* 1 3.F9 . 3 )
                     6    RETURN
        79                END


                                           176

-------
CODE LISTING OF  GAUSS

                           SUBROUTINE GAUSS
                           COMMON /CONT/ NORIVA.NKINEO.NKIOT.MAXITER.IPRINT.MAXLEV.NOESIZ,
                          1NSV, NOV. NTK.NKEQ.NLK. IRES, IMINijPAR.KPAR.ICODE.IPARP.KPARP
                           COMMON /TQL/ T»LCON,TOLONS,TOLJAC«TOLVJ.TOLDJ»TOLOIP«TOLY.TOUKUW
          5                COHMON /STATE/ Y.AJACOBI .DETERM, AF (30) »X (301 t  UT (38.38) .NCI (30) t
                          1ND(30) »NS<30)»KT(30) ,KU30) . IFHEEOO)
                           COMMON /OEHJV/ AOYOX (30) .AOFOX (30,30) ,AOYOS(30) .ADYOO (38) , ABFT0S(3
                          10,30), AOFTODOO. 30) .AOFIDS (30,30) .ADFLDO(3B.30)
                           COMMON /COQRIVJ COOYDO (30) .COOYOF (30) .COOSOD (30»38) .COOS8F (36.30 ) .
         1 0               1 COQFLDO (30.30) +CODFLDF (30.30)
                           COMMON /MISC/ W(30)tV(30) ,AMA(30,30)
                           DIMENSION TEMP130)
                           IX=1
                           00  1  I«1,NOESIZ
         15                TEMP(I)=0.
                           V(I)=0.0
                     1     CONTINUE
                           DO 39 K*i,NN
         20              19 AKKeAMA(K.K)
                           KK*K*l
                           DELTA=ABb(*KK)
                           IF (DELIA. GT.TOUJAC) 60 TO  18
         25                DO 20 L=1.IMAX
                           KPL=K»L
                           DELTA=APb(AMA(KPL.K> )
                           IF (DELTA. LE.TOUJAC)  60 TO 
                           W(KPL)'AUX
                           00 21  J=1.NOESU
                           TEMPI J)=AMA(K,d)
                           AMA(K,J)«AMA(KPL,J)
         35                AMA(KPLtJ)sT£MP(J>
                     21    CONTINUE
                           60 TO 17
                     ZO    CONTINUE
                           60 TO 40
         40             17 IXsIX»(-ll
                     18    DO 39 I=KK.NDESU
                           AKK=AMA(K,K)
                           AIK^AMAII.K)
         45                IFIABS(AKK) .LE.TOLJAC) AA^O.U
                           IFIABS(AKK).LEJTOLJAC) 60 TO 1J9
                           AA=>AIK/AKK
                           *(!>=« (I >-AA«RK
                        139 CONTINUE
         50                00 39 M=K.NDESIZ
                           AMA ( I .Ml *AMA (I*M)-AA'AMA (K.M)
                     39    CONTINUE
                        40 CONTINUE
                           DO 59   ICOMP=1*NOESIZ
         55                KSNDESIZ*I-ICOMP
                           SUM-O.O
                           UO 49 L=).NOESIZ
                           bUM=5UM»AMA(K,L) *V(L)
                     49    CONTINUE

         60                IF(A8S(AMA(K»K) ) .LE.TOLJAC)  VlK)xO.O
                           IF(ABS(AMA(K,K)).LE.fOLJAC)  60  TO 59
                           V(K)=(W(K)-SUMf/AMA(K.K)
                     59    CONTINUE
                           DETERM=1.0
         65                DO 60 I=1.NOESIZ
                           DETEHM=DtTERM»AMA (I.I)
                     60    CONTINUE
                           DETERM«OETERM*IX
                       70   RETURN
         70                END
                                            177

-------
CODE LISTING  OF  DATAOUT
        15
        20
        25
        30
        35
        45
        50
80

81

82

83

84

85

86
87
20

88
Zi

89
22
47
23
25

24
26
48
                     27
                     30
                     31
                     100
                     101
                      102
 SUBROUTINE DATAOUT ( JTITLE» ISUBT IT. NAME. IYOFX. ICTYPE.     NFREEVA)
 COMMON /CONT/ NORIVA.NKINEQ.NKTOT.MAXITER.IPRINT.MAXLEV.NDESU.
INSV.NDV.NTK.NKEQ.NLK.IREa.lMINijPAR.KPAR.ICODE.IPARP.KPARP
 COMMON /T(9L/ TeLCON.TOLONS.TOCJAC.TOLVJ.TOLDJ.TOLOIP.TOLY.TOLKUN
 COMMON /STATE/ Y i AJACOBI .DETERM, AF (30 ) .X (30 I .  UT (30.30 ) tNCl ( 30) .
1NDI30) »NS(30) ,KT!30) ,KL<30> . IFMEEI30)
 COMMON XOERIVX ADYDXI30) » AOFDX (30.30) lADYOSOO) .AOYOOI30) .ADFTDSI3
10,30) .AOFTDD(30»30) , AOFLOS (30 .30) . ADFLOO ( 30 . 30 )
 COMMON /CODRIV/ COOYODOOI .COOTDFOOI .CODSDOC 30.301 «coosoF<30.30) .
1CODFLDO(J0.30)«CODFLOF(30.30)
 COMMON /MISC/ WI30) .V(30)  (ISUBTIT(l) .I=l.a)
 FORMAT ( I HO, 10X«8A 10/1
 WHITE  (6. Se!) (NAME II ) > I = 1 > 8 )
 FORMAT(lX,iOX,8A10//)
 WRITE(6.83) NORIVA
 FORMATdX.lOX, 'NUMBER  OF ORIGINAL VARIABLES IS».4X.I3)
 XRITE(6.8«H NFREEVA
 FORMAT(1X,10X.»NUMBEH  OF FREE VARIABLES  IS*,8X.I3)
 XRITE(6.a5) NKEQ
 FORMAT! IX, 10X, 'NUMBER  OF EQUALITY CONSTRAINTS  IS«,2X.I3)
 WRITEI6.86) NKINtQ
 FORMAT (IX, 10X, 'NUMBER  OF INEQUALITY CONSTRAINTS I5M3/V)

 IF (IYOFX-2>87,88,a9
 WRITE(6,
 FORMAT (IX, 20X,»THE OBJECTIVE FUNCTION IS LINEAR*)
 60 TO  *7
 FOHMATIU.iJOX.'TME OBJECTIVE FUNCTION IS QUADRATIC')
 60 TO 47
 WRITE (6,
-------
60                *RITE(6t»6»  IX(N)»N«ltNORIVA>
               4* FORMATUHO»10X**INITIAL FEASIBLE SET OF VARIABLES*//5XUH(t 20 
-------
CODE LISTING  OF ANSOUT
                          SUBROUTINE ANSOUT
                          COMMON /CONT/ NORIVA iNKINEQtNKTOT, M/UITEHt IPRINTtMAXLEVtNDESU.
                         lNSV.NDV.NTK.NKEOiNLKtIR£6iIMIN»JPARtKPAR»ICODE.IPARPtKPARP
                          COMMON /TOL/ TBLCONtTOLONSt TOL JACtTOLVJt TOLD JtTOLOIP.TOLYt TOLKUN
         5                COMMON /STATE/ YtAJACOBI tDETERMtAF (301 tX<30) <  UT (30.30 ) .NCI (30 ),
                         1ND130) .NSI30) tKTOO) tKLOO) . IFHEEI30)
                          COMMON /OERIV/ AOrOXI30) . AOFDX (30. 30) tAOYDS (30 ) .ADYDDOO) . ADFTDSI3
                         10.30) .AOFTDOOe.SO) . ADFLDS (30 . JO) . ADFLDO ( 30.30 )
                          COMMON /COORIV/ CODYDDUO) .COOYDF (30 ) .CODSOD (30 . 30 > .CODSOF (30 . 30 ) t
        10               1CODFLDO(J0.30) .COOFLDF (30.30)
                          COMMON /MISC/ N(30) .V(30) .AMA(JOt30)
                          COMMON J08CODE
                          CALL CONTROLU.2.1.1)
                          IF(JOBCODE.EQ. 1) 60 TO 40
        15                IFIJOBCODE.EO. 3) 60 TO 40
                          IFUOBCOOE.EQ. 5) 60 TO 40
                          IF ( JOBCOOE.EQ. 7) 60 TO 40
                          IF (JOBCOUE.EQ. 9) 60 TO 40
                          IFIJOBCOOE.EQ.il) 60 TO 40
        20                IFIJOBCODE.EQ.13) 60 TO 40
                          CALL KODHIVU.2t2t2.2t2)
                          WRITE(b.Jt)
                        1 FORMAT (1H1»25X«.*RESULTS OF THE OPTIMIZATION WITH  THE 6EN.  DIF. AL6
                         10RITHM*)
        25                MRITEI6.2)
                        2 FORMAT (///t37X«»BV  -   (U.K. WALKER*)
                          MSNORIVA-NSV
                          WRITE(6,4)Y
                        4 FORMAT (////. 25X, "VALUE OF OBJECTIVE  FUNCTION AT  MINIMUM POINT.  Y
        30               .**.F20.4)
                        5 FORMAT!//. 25X. 'VALUES OF VARIABLES.  X.  AT  OPTIMAL POINT. *.//.38X.«
                         .STATE VARIABLES -•)
                          IF(NSV.EU.U)  WRITEI6.100)
        35            100 FORMAT ( lH0.2bX-.»PROBLEM IS UNCONSTRAINED*)
                          IF(NSV.EU.O)  60 TO 101
                          DO 50 J=1.NSV
                          NAUX*NS(J)
                          AUX=X (NAUX)
        40                WRITE(6.b) JtNAUX.AUX
                        6 FOHMAT(30X»»S(*,I2t*)  » X(«.Ii!t»)  »«tF20.4)
                          IF(IFREEINAUX) 16T.O) 60 TO SO
                          WRITE(6.7)
                        7 FORMAT(««»t70X*«(FREt>»)
        45             50 CONTINUE
                      101 CONTINUE
                          WRITE(6.0)
                        8 FORMAT!/. 30X. "DECISION VARIABLES -«)
                          DO 55 Jsl.NDV
        50                IF(J.SI.M)  60 TO 55
                          MUX-ND(J)
                          AUXaX(NAUX)
                          WRITE (6.V) J.NAUX.AUX
                        9 FORMAT(30X.«D(»tI2t«)  * X(»tI2.«)  ««.FZ0.4)
        55                IFIIFREE(NAUX) »6T.O) 60 TO 55
                          WRITE(6.7)
                       55 CONTINUE
                          WRITE(6.ie>
                       IB FORMAT (//tiiSX, 'VALUES OF CONSTRAINED DERIVATIVES. ».//.30X,*OY/00 =
                                            180

-------
 60               .*)
                   IF(M.LE.U) GO  TO  41
                   DO 60 JxltN
                   *RITE<6fil>  CODYDO(J)
                11 FORMAT (3bX.F2Uj4)
 65             60 CONTINUE
                   *HITE<6f 12)
                12 FORMAT  CODYDFIJ)
                65 CONTINUE
                   IF(NKEQ.EQ.O)  60  TO  102
                   WRIT£<6«13)
 75             13 FORMAT!//, 25Xt»VALUES OF  CONSTRAINTS. »,//»30X, 'EQUALITIES  -«>
                   DO 70 Jxl.NKEQ
                   NAUX»KT (J)
                   AUX=AF(NAUX>
                   WHITE<6.14)J»NAUX«AUX
 80             14 FORMAT(30X,«F(',I2«') a AFC.U,')  «*tF20.4)
                70 CONTINUE"
               102 CONTINUE
                   IFtNKEQ.EO.NSVr WRITE(6<92)
                   IF (NKEO.EQ.NSVr GO  TO 91
 85             93 FORMAT <1 HO .30X*»NONE OF THE  INtQUALITIEb  ARE  TI6HT»)
                15 FORMAT I//,30X»«VALUES  OF  TIGHT  CONSTRAINTS -•)
                   00 7b JsJl.NSV
 90                N»UX=KT(J)
                   AUX=AF(NAUK)
                   WHITE (6, 14 > J.NAUX.AUX
                75 CONTINUE
                91 MP"NKINEU*NKEQ
 95                IF (NSV.GE.MP) WRITE(6t93)
                   IF (NSV.Gt.MP) SO  TO  94
                93 FORMAT (1H0.30X»*NONE OF  THE  INtQUALITIES ARE LOOSE*)
                   toRIT£<6<16>
                16 FORMAT 
                   IF(IMIN.NE.l) 80  TO  30
110                MRITE(6tl8)
                18 FORMAT (/t2SX««KUHN-TUCKER CONDITIONS ARE SATISFIED")
                   GO TO 40
                30 IFIIMIN.NE.2) SO  TO  32
                   MRITE(6<19>
115             19 FORMAT t/«25X««TH£ NUMBER OF PRESCRIBED ITERATION STEPS ARE EXCEEOE
                  ,D.»)
                   GO TO 40
                32 IFUMIN.NE.3) 60  TO  34


12Q             20 ?ORMA-n/?2SX.«THE REDUCTION  IN OBJECTIVE FUNCTION IS TOO SMALL.-)
                   GO TO 40
                34 IFUMIN.NE.4) CO  TO  40

                21 FORMATUt2bX. 'FUNCTIONAL PROBLEM  IN PR08RAM, SEE POINT OF RELEASE*

125               H
                40 CONTINUE
                   JMIN«1U
                   RETURN
                   END



                                      181

-------
                                   TECHNICAL REPORT DATA
                            (Please read Instructions on the reverse before completing)
 1. REPORT NO.
  EPA-600/2-78-074
 4, TITLE ANDSUBTITLE
  INTEGRATING DESALINATION AND  AGRICULTURAL SALINITY
  CONTROL ALTERNATIVES
6. PERFORMING ORGANIZATION CODE
 7 AUTHOR(S)
                                                           8. PERFORMING ORGANIZATION REPORT NO.
  Wynn R.  Walker
                                                           3. RECIPIENT'S ACCESSION-NO.
                                                           5. REPORT DATE
                                                           April  1978
            issuinq date
 9. PERFORMING ORGANIZATION NAME AND ADDRESS
  Department of Agricultural  and  Chemical  Engineering
  Colorado State University
  Fort Collins, Colorado   80523
10. PROGRAM ELEMENT NO.
 1BB039
11. CONTRACT/GRANT NO.

R-803869
 12. SPONSORING AGENCY NAME AND ADDRESS
  Robert S. Kerr Environmental  Research Laboratory,Ada,OK
  Office of Research and  Development
  U.S. Environmental Protection Agency
  Ada, Oklahoma  74820         	
13. TYPE OF REPORT AND PERIOD COVERED
Final
14. SPONSORING AGENCY CODE


 EPA/600/15
 15. SUPPLEMENTARY NOTES
 16. ABSTRACT
       The cost-effectiveness  relationships for various agricultural  and desalination
  alternatives for controlling salinity in irrigation return  flows  are developed.
  Selection of optimal  salinity management strategies on  a  river basin scale is
  described as a problem  of integrating optimal strategies  with  individual subbasins
  and irrigated valleys.
       Desalination  systems include seven processes:  (1)  multi-stage distillation;
  (2) vertical tube  evaporation in conjunction with  (1);  (3)  a  vapor compression form
  of (2); (4) electrodialysis;  (5)  reverse osmosis;  (6)  vacuum  freezing - vapor
  compression; and (7)  ion  exchange.   Agricultural salinity control  alternatives include
  conveyance linings, irrigation  scheduling, automation,  sprinkler  irrigation systems,
  and trickle irrigation  systems.
       A case study  of  the  Grand  Valley in western Colorado is  presented to demonstrate
  the analysis developed.   Results indicate that treatments of  the  agricultural system
  are generally more cost-effective  than desalting except for high  levels of potential
  salinity  control.  Lateral linings  and on-farm improvements are the best agricultural
  alternative.
3
17. KEY WORDS AND DOCUMENT ANALYSIS
a. DESCRIPTORS
Cost-effectiveness, Desalting, Optimization
Salinity, Sprinkler Irrigation, Water
Quality
18. DISTRIBUTION STATEMENT
RELEASE TO PUBLIC
b. IDENTIFIERS/OPEN ENDED TERMS
Automation, Conveyance
Lining, Cutback Irriga-
tion, Irrigation
Efficiency, Return Flow,
Trickle Irrigation
Water Quality Control
Water Control Quality
19. SECURITY CLASS (This Report)
Unclassified
20. SECURITY CLASS (This page}
Unclassified
c. COSATI Field/Group
98C
21. NO. OF PAGES
193
22. PRICE
EPA Form 2220-1 (9-73)
                                            182
                                                     U. 3. GOVERNMENT PRINTING OFFICE; 1978-757-140/6812 Region No. 5-11

-------