Braun1988 PDF
Braun1988 PDF
Braun1988 PDF
by
DOCTOR OF PHILOSOPHY
(Mechanical Engineering)
at the
1988
© Copyright by James Edward Braun 1988
All Rights Reserved
Methodologies for the Design and Control of
Central Cooling Plants
This work presents general methodologies useful to engineers and plant managers
for designing, retrofitting, and controlling the equipment in large central chilled water
systems. The methodologies are in the form of: 1) mathematical models for the
individual equipment, 2) optimal control algorithms, and 3) general guidelines for
design and control.
Mathematical models of varying complexity are developed for the purpose of: 1)
component design and retrofit analyses, 2) system simulation and control optimization
studies, and 3) on-line optimal controL The models developed in this study represent
improvements over those that appear in the literature. Where possible, measurements
go
11
control variables and may be fit to measurements using linear regression techniques.
For systems with stratified thermal storage in parallel with the chillers and load, two
methodologies are also presented for optimal control. A methodology is developed for
determining the optimal control of stratified thermal storage systems using Dynamic
Programming. For systems with time-of-day utility rates, a simple strategy for near-
optimal control is also identified.
The methodologies developed for evaluating the optimal control of chilled water
systems are utilized to study the effects of alternative control strategies and system
configurations. In addition, control guidelines useful to plant engineers for improved
control practices are identified.
400
Acknowledgements
I must admit that I never had a burning desire to undertake this task. I wouldn't
have done it anywhere but at the Solar Energy Laboratory. Jack, Bill, Sandy, and
John, you tve created a tremendous working environment that stimulates independence,
creative thought, and comraderie. Thanks for all the support, ideas, and friendship.
I can't honestly say that these have been the best years of my life. However, there
have been some very special people who've made difficult times alot better. Special
thanks to Sandy for always being supportive and understanding. You're always
moving forward and doing positive things, even though you're seldom satisfied.
Chris, Joe, Jill, David, Jim, Al, and Ruth: Thanks for listening to me when I needed it
most. Most importantly, thanks Liz for being you. You've added meaning and balance
to my life.
The financial support from ASHRAE is gratefully acknowledged. The TC 4.6
Research Subcommittee provided the right amount of independence and supervision for
this project.
iv
Table of Contents
Abstract ii
List of Figures ix
Nomenclature xv
Chapter 1 Introduction 1
1.1 Background 1
1.2 Research Objectives and Approach 8
1.2.1 Model Development 9
1.2.2 Methodologies for Optimal Control 10
1.2.3 Applications 11
1.3 Description of the Dallas/Fort Worth Airport System 11
1.4 Organization 13
v
3.1.1 Detailed Analysis 56
3.1.2 Merkel Analysis 60
3.1.3 Effectiveness Model 61
3.1.4 Estimating the Water Loss 64
3.1.5 Model Comparisons 66
3.1.6 Correlating Performance Data 68
3.1.7 Potential Improvements in the Model 72
3.1.8 Sump and Fan Power Analyses 75
3.2 Condenser-Loop Pumping Requirements 77
3.3 Summary 82
vi
5.3 Comparisons 133
5.4 Summary 138
vli
Chapter 8 Conclusions and Recommendations 204
References 220
vii
List of Figures
Figure 2.9. Effect of Water Flow Rates on Chiller Performance for Fixed 42
Leaving Water Temperatures
ix
Figure 2.12. D/FW Chiller COP for Variable-Speed Control 49
Figure 3.5. Comparisons of Relative Water Loss (Dry Bulb, Wet Bulb, 68
and Water Inlet Temperatures of 70 F, 60 F, and 90 F)
x
Figure 3.9. Comparisons of Detailed Model with Effectiveness Model 75
Results for Extreme Conditions ( Ambient Dry and Wet Bulb
Temperature 80 F and 60 F)
Figure 3.11. Pump Pressure Rise and System Pressure Drop Characteristics 78
Figure 4.4. Correlation of Cooling Coil Model Results with Catalog Data 99
xi
Figure 5.6. Comparisons of Optimal System Performance for Component 138
and System-Based Methodologies
Figure 6.1. Effect of Condenser Water Flow Distribution for Two Chillers 147
in Parallel
Figure 6.2. Effect of Relative Loading for Two Identical Parallel Chillers 150
Figure 6.4. Effect of Chiller and Pump Sequencing on Optimal System 155
Performance
Figure 6.6. Power Contours for Condenser Loop Control Variables 158
Figure 6.7. Power Contours for Chilled Water and Supply Air Tempera- 160
tures
Figure 6.8.
Comparisons of Optimal-Control with "Conventional" Control 162
Strategies
Figure 6.9.
Comparison of "Free" Floating and "Fixed" Humidity Control 164
Figure 6.10.
Optimal System Performance for Variable and Fixed-Speed 166
Chillers
Figure 6.11. Comparison of One-Speed, Two-Speed, and Variable-Speed
167
Cooling Tower Fans (Four Cells)
Figure 6.12. Comparison of Variable and Fixed-Speed Pumps 168
xii
Figure 6.13. Comparison of Chiller Performance for Parallel and Series 170
Configurations
Figure 6.14.
Optimal System Performance for Series and Parallel Chillers 172
Figure 7.1.
Dynamic Programming Network 180
Figure 7.2.
Parallel Configuration for Thermal Storage 182
Figure 7.3.
Optimal Storage Charge Level for One Day with Time-of-Day 190
Electric Rates
Figure 7.4.
Optimal Chiller Loading for One Day with Time-of-Day 191
Electric Rates
Figure 7.5.
One-Hour Forecasts of March D/FW Cooling Load Data for 198
AR(4) Model
Figure 7.6.
Five-Hour Forecasts of March D/FW Cooling Load Data for 199
AR(4) Model
Figure 7.7.
Five-Hour Forecasts of March D/FW Cooling Load Data for 200
Combined Deterministic and Stochastic Model
so*
xml
List of Tables
Page
Table 4.1 Effectiveness Model Comparisons with Cooling Coil Catalog Data 97
Table 6.2 Cooling Season Results for Optimal vs. Conventional Control 163
Table 6.3 Cooling Season Results for Variable vs. Fixed-Speed 169
Equipment
Table 7.1 One-Day Operating Cost Comparisons for Systems with 193
Thermal Storage
Table 7.2 AR Model Fit to March D/FW Data (1 hour sampling) 197
xiv
Nomenclature
Chapter 2
A area
Ax - exit flow area from compressor impeller
V - refrigerant velocity
w - compressor work input per unit mass of refrigerant
Wpol - polytropic work per unit mass of refrigerant, defined as the compressor
work required for a reversible polytropic process occurring between the
actual inlet and outlet states
xv
- blade angle of compressor impeller
- dimensionless flow coefficient, defined'as the ratio of the fluid
Additional Subscripts
c - condenser conditions
e - evaporator conditions
i - inside
n - normal component
0 - outside
xvi
r - radial component
R - refrigerant
t - tangential component
Chapters3and4
A - surface area
00
xvln
M - mass flow rate
xia - mass flow rate of dry air
P - power consumption
Tw - water temperature
xvii
Additional Subscripts
e - effective
max - maximum
o0- outlet or outside conditions
p - pump conditions
s- surface conditions
T -total
-Chapter5
J - instantaneous operating cost
f - vector of uncontrolled variables
xix
u - vector of continuous control variables
x- vector of component input stream variables
Chapter 7
J - integrated operating cost
t - ime
T - storage temperature
xx
x - position of front between storage temperature zones measured from
the bottom of storage relative
At - timestep associated with stage
xxi
Chapter 1
Introduction
1.1 Background
The heating and cooling requirements of many building complexes in this country
are provided with centrally located facilities. The University of Wisconsin at Madison
has two such central plants that provide the bulk of the heating and cooling
requirements for the university. Total annual fuel costs for both plants are on the order
of ten million dollars. Even a small relative savings in the energy requirements of a
plant such as this can translate into significant reductions in operating costs. In large
buildings, a significant portion of the total energy requirements are associated with air
conditioning. The potential for reductions in operating costs associated with improved
design and control practices for central cooling systems provides the impetus for this
project.
A centralized cooling plant consists of one or more chillers, cooling towers,
pumps, and air handlers controlled so as to satisfy the cooling requirements of one or
more buildings. Figure 1.1 shows a simplified schematic of a typical centralized chilled
water system. Return air from the zones is mixed with an outside ventilation air stream
and is cooled and dehumidified through cooling coils. In a variable air volume system,
the air handler air flows are typically adjusted depending upon the supply air
temperatures to maintain fixed zone temperatures. The supply air temperatures are
controlled by modulating the water flows through each cooling coil with control valves.
Cool and relatively dry air is supplied to the zones where both the temperature and
humidity rise due to sensible and latent energy gains from people, lights, equipment,
Supply Air Fans
Air
returning to the chiller. The chilled water supply temperature is maintained by control
of the chiller refrigerant flow through modulation of the compressor and expansion
device. Cooling towers with multiple cells sharing common sumps are typically used
to reject heat from the condenser of a chiller to the environment.
costs. Many systems were designed using old technology, with little concern for
energy costs. For instance, most large cooling systems utilize pumps and cooling
tower fans that operate at fixed speeds. Modulation of flow rates in response to
vary flow rates using variable-speed equipment Recently, the cost and reliability of
variable-speed electric motors has improved to the point where their use is cost effective
economically attractive for both chilled water distribution and condenser water systems.
Centrifugal chillers are the largest consumers of energy in a central cooling system.
Significant operational savings can be realized with certain chiller retrofits. Many
applications utilize chillers that are operated at fixed speeds. Control of the chilled
water setpoint temperature is maintained by varying the position of pre-rotation inlet
vanes to the centrifuigal compressor. An alternative method, which gives significantly
load requirement. As an existing plant improves its energy management practices and
applies conservation methods to reduce the building load, the load requirement of the
chiller is reduced. As a result, the optimal refrigerant choice may change from that of
reduce operating costs (ASHRAE Bulletin [1985]). For systems with electrically
driven chillers, storage can be utilized to take advantage of time-of-day charges and
limit demand charges by shifting the load requirements. In the absence of special rate
structures, storage may also reduce costs by shifting the load to times when
In addition to design retrofits, plant operating costs can be reduced through better
control practices. A central cooling plant has many operating variables that may be
controlled in a manner that minimizes the operational costs. At any given time, it is
possible to meet the cooling needs with any number of different modes of operation and
setpoints. Optimal supervisory control of the equipment involves determination of the
control that minimizes the total operating cost. The optimal control depends upon time,
operators of central cooling plants determine control practices that yield "reasonable"
operating costs by experience gained through trial and error operation over a long
period of time. Little research has been pefformed in developing general methodologies
that would be suitable for optimal control of large centralized cooling systems. The
major independent control variables in a plant without chilled water storage are the
chilled water and supply air setpoint temperatures, number of chillers, pumps, and
cooling tower cells in operation, and cooling tower cell air flow and condenser pump
water flow rates. These variables may interact strongly and with proper control it is
Much of the literature related to cooling systems pertains to sizing of the equipment.
conditions. However, with inexpensive energy costs, there has been little incentive for
the use of detailed simulations in defing designs and control strategies that minimize
operating costs. More often than not, systems have been designed based upon
minimizing the first cost, while ensuring that the capacity of the system was sufficient
to meet the worst possible conditions. This has often resulted in systems being
years ago by the University of Wisconsin Solar Energy Laboratory for analyzing the
FORTRAN subroutines. The user can formulate or modify existing models and add
them to a library of components. The models are connected together to form a complex
system simulation model, analogous to the way pipes and wires connect the physical
pieces of equipment. The modular approach is advantageous in that it provides a format
configurations. This feature makes TRNSYS a good choice as a tool for studying the
design and control characteristics of cooling plants as compared with other existing
library does not include models for all of the equipment found in central cooling
6
systems. It also does not have the ability to determine the optimal control associated
with simulation of a system.
Simulations involving cooling systems have primarily been used for equipment
selection and building design. Most of the control studies which have been performed
have been concerned with the local-loop control of an individual component or
subsystem needed to maintain a prescribed set point, rather than the global
determination of optimum set points that minimize operating costs. Global optimum
plant control has been studied by Marcev [1980], Sud [1984], Lau [1985], Hackner
[1984,1985], Johnson [1985], and Nugent[1988].
Lau studied the effect of control strategies on the overall energy costs of a large
facility located in Charlotte, North Carolina through the use of annual simulations. The
operating costs associated with the existing control strategy were compared with those
resulting from "near-optimal" control of the condenser flow rates, the tower fan flows,
and the number of chillers operating, along with the use of storage. The reduction in
the utility bill was about 5.2 %of the total. The 50,000 gallon storage capacity was
small relative to the 6000 ton plant capacity. In addition, no time-of-day or peak
demand electric rates were in effect.
Hackner investigated optimal control strategies for a cooling system without storage
at a large office building in Atlanta, Georgia. Optimal control of the chiller plant
resulted in a reduction in the utility bill of about 8.7% when compared with the existing
control strategy. If the plant had been operated with fixed setpoints, similar to
conventional practice, the optimal control would have resulted in a cost reduction of
about 19%. Similar conclusions were reached by Arnold, Sud, and Johnson. These
studies demonstrated the potential savings through the use of optimal control in a plant
without storage.
7
The goal of these control studies was to quantify the cost savings associated with
optimal control rather than to produce general algorithms suitable for on-line optimal
plant control. Optimal control set points were identified in Hackner's study for the
specific plant through the use of performance maps. These maps were generated by
many simulations of the plant over the range of expected operating conditions. The use
of established performance maps for on-line plant control is advocated by Johnson.
This procedure lacks generality and is not useful when storage is utilized.
Very little work has been performed in developing general methodologies that
would be suitable for on-line optimal control of large cooling systems. Nizet [1984]
applied a state-space model to a building zone in order to minimize the energy
consumption with respect to a single control variable, the supply air flow rate to the
zone. This optimization was carried out over a single day with the known weather data
objective function that accounted for the cost of energy associated with the boiler,
chiller, and the supply air fans. Constant efficiencies were assumed for the boiler and
chiller. Thermal comfort constraints associated with upper and lower temperature
setpoints for the zone were considered through the introduction of penalty terms in the
cost function. Since component efficiencies were constant, the opportunity for savings
associated with optimal control of this hypothetical system resulted from operation
closer to the limits of comfort. Depending upon the comfort constraints, optimal
control of the supply air flow rate resulted in energy savings of between 12 and 30 %
when compared with the existing control. The authors concluded that there were
difficulties associated with the use of penalty functions for handing constraints. The
proper choice of the penalty coefficients is difficult and sometimes leads to a badly
conditioned problem. They also concluded that it was not practical to apply this
methodology to more complicated systems in an on-line application.
8
overall cost to be minimized included the cost of operating the power plant and the cost
associated with pumping water through the cooling system. The dynamics of both the
cooling sump and spray pond were considered. A sampling interval of 15 minutes and
change were constant. Depending upon the weather conditions, substantial cost
savings could be realized.
plant managers for designing, retrofitting, and controlling the equipment in large central
In this study, models are developed for all three of the above purposes. The models
developed in this study represent improvements over those that appear in the literature.
Where possible, measurements from the cooling system at the Dallas/Fort Worth
(DF/W) airport and from the literature are used to validate the models.
measurements. However, in this study, results of the optimization program are used to
function for the total power consumption of the cooling plant is inferred from the cost
11
functions associated with the components utilized in chilled water systems. This cost
function lends itself to rapid determination of optimal control variables and may be fit to
measurements using linear regression techniques.
Optimal control of a system with thermal storage involves minimizing the integral
of the instantaneous operating costs, while satisfying required constraints. In this
study, a methodology is developed based upon dynamic programming for detemiing
the optimal control of systems with stratified thermal storage. Optimization results are
then used to develop a "simple" near-optimal control strategy when time-of-day electric
time series model is developed for forecasting cooling loads and is evaluated using data
1.2.3 Applications
In order to make any general conclusions concerning design and control of central
configurations under optimal control. The methodologies developed for evaluating the
optimal control of chilled water systems are utilized in studying the effects of alternative
The central cooling plant at the Dallas/Fort Worth (D/FW) airport is used as the
primary test facility for this study. This particular system is of general interest because
12
of the large data acquisition system and the unique retrofits that the plant personnel have
undertaken.
The D/FW central facility provides heating and cooling for approximately 3 million
square feet of floor area for airport terminals, hotels, and office space. This system has
three centrifugal chillers originally rated at 8700 tons each. There are two sets of
cooling towers, each having four cells originally with two-speed 125 hp fans. Each
bank of tower cells shares a common sump and has two 500 hp condenser water
pumps in parallel that draw off the towers sumps. One set of cells has an additional
250 hp pump that is utilized at low load conditions. The chilled water pumping is
provided with two 500 hp pumps and one 250 hp pump. An additional unique feature
of the D/FW system is that there are several hours of thermal storage available within
the chilled water distribution system that is used to increase the overall plant cooling
capacity and improve part-load operation.
The data acquisition system records a wide range of conditions including
temperatures, pressures, flow rates, and power consumptions on magnetic tape each
minute. This information is utilized by the plant operators for the purpose of billing the
individual energy users and for energy management of the system as a whole. For this
study, this data is invaluable in developing and validating computer simulation models
of the equipment that are used in evaluating both improved control strategies and
retrofits for the plant.
Foremost among the retrofits implemented in the D/FW plant to reduce energy
consumption was the conversion of the drive for the primary centrifugal chiller. Each
of the three 8700 ton chillers as initially installed was driven with a steam turbine. As a
result of poor turbine efficiencies at low speeds, these chillers were primarily operated
at fixed compressor speeds. The capacity modulation was provided by control of inlet
pre-rotation and outlet diffuser vanes. Through goodl energy management practices, the
13
energy consumption at the D/FW airport has been reduced to the point where a single
chiller provides the necessary cooling requirements. To further reduce energy
consumption at part-load operation, the primary chiller was retrofitted with a 5000 hp
variable-speed electric motor. At the same time, the refrigerant was changed from R-22
to R-500 and the chiller capacity was derated to 5500 tons. This cooling capacity in
conjunction with the use of thermal storage is sufficient to satisfy the system demand
most of the time. Additional retrofits at the D/FW system include conversion of chilled
water distribution pumps and cooling tower fans with variable-speed motors. All of
these retrofits improve the part-load performance of the cooling plant.
1.4 Organization
The main body of the thesis is presented in Chapters 2 - 7. Both detailed and
simplified models for the individual system equipment are developed and compared in
Chapters 2,3, and 4. Results of these models are also compared with measurements.
Both the component-based and system-based optimization algorithms are developed in
Chapter 5. Results of applications of these methodologies to systems without storage
are given in Chapter 6. Included in these results are control simplifications that are
useful as guidelines for plant operators and that simplify the methodology for near-
optimal control. Typical results for the savings associated with optimal control and
comparisons between different system configurations under optimal control are also
presented in Chapter 6. In Chapter 7, dynamic programming is applied to fully-
stratified thermal storage systems in order to identify control simplifications for near-
optimal control. In addition, a model for forecasting cooling loads is developed based
upon time-series methods. Computer programs developed in this study are listed in a
Chapter 2
Models for Centrifugal Chillers
system simulation and optimal control studies. The empirical model correlates data for
both variable and fixed-speed chillers.
The models described in this chapter are compared with performance data for the
5500 ton centrifugal chiller at the Dallas/Fort Worth (D/FW) airport under both
variable-speed and fixed-speed control They are also used to study the performance
characteristics of the D/FW chiller.
control is described. The model utilizes mass, momentum, and energy balances on the
compressor, evaporator, condenser, and expansion device. Given a chilled water set
temperature and entering chilled and condenser water temperatures and flow rates, the
model determines both the required compressor speed and power consumption. In
addition, it may be used to estimate, for any given set of conditions, the chiller capacity
at a specific speed or power consumption or the compressor speed at which compressor
surge develops.
When little or no performance data are available, the mechanistic model described in
this section provides a tool for generating a complete chiller performance map. A
simpler empirical model appropriate for system simulation is then fit to the generated
data.
14-" Ph
Tchwr Qe T chws
Enthalpy
Figure 2.1. Schematic and Pressure-Enthalpy Diagram for a Single-Stage Chiller
17
Evaporator
The evaporator is assumed to be a flooded shell and tube type design. Refrigerant
boils at the outside of horizontal tubes and rises out the top. Heat transfer in the
difference. Three expressions for evaporator heat flow that result from this model and
from energy balances on the two fluid streams are
Qe = UAeLMDe (2.1.1)
= rR(hj-h4)
(2.1.2)
= IMdiCpwCrIdwr-
Tdw (2.1.3)
where,
o = rate of heat transfer to evaporator
UAe = overall evaporator conductance
Tdmw- Tchws
LMTe Td r - Te] (2.1.4)
'[T&iW, -Te]
Ae,i
UAe 1 +- 1 (2.1.5)
1 + Re
he,i+ reheo
where,
Nucleate boiling is assumed to take place from the evaporator tubes to the pool of
refrigerant. Bubbles nucleate and grow from spots on the surface in a thin layer of
superheated liquid formed adjacent to the tubes. There is much data available for
Generally, the heat transfer coefficient for a particular application may be correlated in
the form
19
where a and b are empirical constants that depend upon the properties of the refrigerant
and the nucleate characteristics of the surface and T, is the average tube outside
surface temperature. Myers (1952) gives typical results for the heat transfer coefficient
of Refrigerant 12 with finned tubes that are used in this study. An expression for the
tube surface temperature obtained by considering the heat transfer resistance between
= Tchw+Aeh
r ,
Re (2.1.7)
where T w is the average of the entering and leaving chilled water temperatures.
The chilled water flow through the evaporator tubes is assumed to be turbulent such
where kw is the thermal conductivity of water, 4 is the inside tube diameter, Ree is the
Reynolds number associated with water flow in an individual evaporator tube, and Pr is
Condenser
The condenser is also considered to be a horizontal shell and tube design.
Refrigerant condenses on the outside of the tubes and drains out the bottom.
20
Analogous to the evaporator, the three equations for heat transfer are
UACLIVM
=QC- C (2.1.9)
= MR (h 2 -h 3)
(2.1.10)
where,
and
LAM . TCW$
C
Ti- T] (2.1.12)
UAC+R 1 (2.1.13)
hCji +rchc,o R
R = the resistance to heat transfer associated with the tube material, including
determining the log-mean temperature difference for the entire condenser. Refrigerant
the heat transfer coefficient is lower and the temperatuN difference higher than during
condensation. These tradeoffs justify the use of a single condenser temperature and a
film condensation of pure vapors on plates and tubes were first developed by Nusselt.
The average heat transfer coefficient associated with a vapor condensing on N
horizontal tubes is estimated from
0.25
3 2
where,
The vapor density is usually small compared to the liquid density and may be
neglected. Analogous to the evaporator analysis, the tube surface temperature is
Ts T+Ri 0 1 + 1 (2.1.15)
condenser, he i
Compressor
One approach to modeling the performance of the compressor is to use performance
curves from the manufacturer. Davis (1974) presents a method of correlating data that
reduces the family of compressor head characteristics to a single curve of dimensionless
head versus a dimensionless flow. A limitation associatedt with this approach is that
follow concerning the compressor. Figure 2.2 shows a cross-section of the impeller of
velocities.
The impeller rotates with an angular velocity co having a tip speed equal to u,. The
refrigerant vapor exits the impeller with a relative velocity V,, and an absolute velocity
V. The components of velocity tangential and normal to the impeller wheel are
balance on the impeller gives an expression for the required work input per unit mass of
refrigerant.
where the work coefficient, gx, is defined as the ratio of the tangential component of
Vx~t
UX (2.1.17)
If the velocity of the fluid relative to the impeller, VX, exits tangential to the blade
(i.e. no slippage), then the theoretical work coefficient determined from the vector
VX~
{. Blade
Compressor Impeller
Velocity Vectors
Vx,n
Ux
UxoVxncOt(o3)
= 1- CxCO() (2.1.18)
The dimensionless flow coefficient, is the ratio of the fluid velocity normal to
the impeller to the impeller tip speed.
Vxn MrgVx
Ux Aux
(2..19
where Ax is the exit flow area of the impeller and vx is the exiting vapor specific
volume.
In reality, slippage and non-uniform velocity profiles at the impeller exit limit the
accuracy of this formulation. Wiesner [1959, 1960] has correlated the real performance
of centrifuigal compressors with vaneless diffusers. His results are presented as curves
of polytropic efficiency, rpoI, and polytropic work coefficient, , versus the
dimensionless flow coefficient, x where,
wpOl (2.1.20)
1
p1P Ww
2 (2.1.21)
The polytropic work, wpo is the quantity of work required for a reversible
polytropic process occurring between the actual inlet and outlet states. A polytropic
26
process satisfies
Pv = constant (2.1.22)
The polytropic coefficient, n, is determined by the actual initial and end states.
v2 PIP
21
V1 1-PJ (2.1.23)
P2 n P2 n (..4
Wpo I - fp vdP=Piv nf-
n - 1 PI]
1(2.1.24)
The stage work coefficient, , is determined from the polytropic coefficient and
efficiency as
g-tx = (2.1.25)
Wiesner's results for are a series of straight lines that can be represented by
efficiency versus the dimensionless flow coefficient, x, for different rotational Mach
M = __
O
ao (2.1.27)
and a. is the sonic velocity in the refrigerant at the impeller inlet conditions. The
The reference polytropic efficiency, Trf, is the peak value associated with a
reference rotational Mach Number of 1.1. It is typically in the range of 0.80 to 0.85.
The empirical constants (a, b, c, d) that provide a good match to Wiesner's data are
0.109, 58.5, -6.0, and -18.8, respectively. Wiesner also presents a correction factor
for polytropic efficiencies due to differences in Reynolds numbers associated with the
use of different refrigerants. This effect is relatively small and is negligible for the
determine the specific volume of the refrigerant at the exit of the impeller. Most of the
entropy rise associated with the compression process occurs within the diffuser. For
this reason, the entropy at the impeller exit is assumed to be equal to the entropy at the
inlet.
28
sx = S1 (2.1.29)
The additional property necessary to define the state at the impeller outlet is
determined from an energy balance on the diffuser. Assuming that the kinetic energy
exiting the diffuser is small compared to that at the diffuser inlet, the incoming enthalpy
is
h x = h 2 - -2 (2.1.30)
2
h2 = h1 + xux (2.1.31)
So,
2
hx-h+ =g , x'2
u y2
Vx
(2.1.32)
The absolute refrigerant velocity at the impeller exit, Vx, is determined from the
normal and tangential components (Figure 2.2), such that
V2 = Vn+
2 V~
2 x2(2 t2) (..3
29
2 2]
hX =thi+u x .- (2.1.34)
The thermal expansion device is assumed to modulate the refrigerant flow such that
a saturated vapor state is maintained at the compressor inlet. The entering and exiting
h4= h 3 (2.1.35)
Finally, the power input to the motor driving the compressor is calculated as
11R(h 2 - h 1)
Pch =
T1m (2.1.36)
where im is the overall efficiency associated with the motor and gearbox if present.
The model, as defined through equations (2.1.1) - (2.1.36), requires properties of
the refrigerant at various states. A computer program developed from the equations
given by Downing (1981) was used to evaluate thermodynamic properties of the
and conductivity at saturated liquid conditions for refrigerants considered in this study.
The sonic velocity associated with the vapor refrigerant exhibits very little variation
sonic velocity data. A listing of the refrigerant properties program is given by Braun
[1988].
1) Given the chilled water entering flow rate and temperature and the setpoint,
determine the evaporator refrigerant temperature, Te, by iteratively solving
equations (2.1.1) and (2.1.3)-(2.1.8). This can be accomplished with
Newton's method applied to the function.
2) The solution of the remaining set of equations can be reduced to finding the
31
zeros of three functions with three unknowns using Newton's method. The
three iteration variables are T,, u., and x,while the three functions are
F2 = ARVx
rX (2.1.39)
For given values of the iteration values, each of the terms in the above equations are
uniquely defined with equations (2.1.2), (2.1.9) - (2.1.35) and property data.
The analysis is complicated a bit further if two-stage compression is considered. In
this case, the energy and momentum balances are applied to both compression stages.
In the absence of an economizer, the outet from the first stage is the inlet the second..
between compression stages and enters a flash tank. Saturated refrigerant vapor is
removed from the flash tank, mixed with the outlet stream from the first stage and fed
to the second-stage compressor. Liquid refrigerant from the flash tank is expanded to
the evaporator pressure. In order to include an economizer in the analysis, mass and
energy balances are applied to the economizer to determine the additional states and
refrigerant flow rates.
In the solution of equations for two-stage compression, two additional iteration
variables are the intermediate pressure and the flow coefficient for the second stage.
32
Equations (2.1.39) and (2.1.40) apply to the first stage and an analogous two
additional equations are used for the second stage.
instance, it may be controlled by the maximum allowable power input to the motor or
the maximum rotational speed. Alternatively, there may be a lower limit on the
refrigerant temperature in order to avoid localized ice formation within the evaporator or
an upper limit on the condenser pressure. In any of these situations, the model can be
adapted to determine the maximum capacity and associated power input and
compressor speed. The D/FW chiller capacity is primarily limited by the power input to
the motor. In this case, the equations are solved such that power is an input and
rather than separately in this situation. Listings of computer programs for evaluating
the chiller power consumption, operating speed, and cooling capacity for single and
two-stage compression (with or without an economizer) appear in a separate document
(Braun [1988]).
parameters characterizing this design were available from the manufacturer and are
presented in Table 2.1. Additional parameters necessary for evaluating the chiller
performance were determined by regression using measurements from the D/FW
airport. The data used in the regression was randomly selected from two different time
periods to give a range of conditions.
The ratios of the outside finned tube area to the inside area for both the evaporator
and condenser were unknown. Sufficient data were available to estimate these ratios
33
Table 2.1
Known D/FW Chiller Parameters
The efficiency of the electric motor driving the compressor is approximately 95%.
Additionally, there is significant energy loss in the gearbox between the motor and the
compressor. At maximum loading of 5000 hp, the energy loss is approximately 200
hp. This gives an overall efficiency of about 91%.
There are three additional unknown parameters concerning the compressor that are
necessary in order to analyze the chiller performance: 1)the impeller blade angle, f3, 2)
the impeller exit flow area, Ax , 3) the reference polytropic efficiency, Tlrf-
Estimates of these parameters were obtained from the D/FW plant personnel and the
34
literature as follows.
From a photograph of a centrifugal compressor impeller available from the D/FW
plant personnel, the blade angle appears to be approximately 30 degrees. The impeller
width at the exit is between 2 and 3 inches. This gives an impeller exit area of between
1.2 and 1.8 square feet. Wiesner's [1960] curves of polytropic efficiency derived from
measurements of several centrifugal compressors operating with R-500, R-22, or R-12
give a relative polytropic efficiency of about 0.82.
In order to fine-tune these estimates, a regression analysis was applied to the
centrifugal compressor. Measurements included the motor electrical consumption and
the compressor suction and discharge pressures. Table 2.2 gives the parameter values
determined from the regression analysis that yield the best agreement with the data.
They are surprisingly close to the original estimates.
Figures 2.3 - 2.6 show comparisons between measurements and the overall model
predictions of refrigerant temperatures in the evaporator and condenser and the
compressor power and speed. Overall, the agreement is very good. The best
predictions are of the power consumption and the evaporator temperature. The
estimates of the condenser temperature and compressor rpm are not quite as good.
There appears to be a slight bias in the comparisons. The model tends to underestimate
power consumption and speed at low values. One possibility is that the motor and
gearbox efficiencies are lower at lower speeds and loadings. The model assumes a
fixed overall efficiency for these components at all conditions. Another possibility is
that the compressor polytropic efficiency may fall-off more significantly at low loads
than the Wiesner data exhibits.
35
Table 2.2
Compressor Parameters Determinedfrom Regression
f3 27.2 degrees
Ax 1.53 square feet
'Iref 0.814
50
45
I-
40
S.'
00:
9t 35
30
30 35 40 45 50
Measured Evaporator Temperature (F)
I 80 95 x x
x
S90"
925
• 80.-,,
.:. 75
: 70
70 75 80 85 90 95 100
Measured Condensing Temperature (F)
4000 .1,
3000
0
3-
po 2000
I-
1000
4500-
& 4000
3500
S3000
x
x
~2500'
x
2000
2000 2500 3000 3500 4000 4500
Measured Compressor Speed (rpm)
The D/FW measurements were originally recorded on magnetic tape at one minute
intervals. For the comparisons of Figures 2.3 - 2.6, the data were selected randomly.
Part of the variability in these results may be a result of unsteady conditions. As
another test of the accuracy of the model, controlled tests were performed on the chiller
and compared with model predictions for a range of conditions. The conditions for all
measurements were stabilized for at least 15 minutes. Both the chilled and condenser
water flow rates were held relatively constant for all tests. The results of the
comparisons as summarized in Table 2.3 show that the model agrees well with the data.
Once again, the estimates of power consumption are better than for compressor speed.
The root-mean-square of the differences is 84 kW for power and 140 rpm for
compressor speed. The relative error of the power consumption estimates is larger at
low loads. This may be due in part to the much larger uncertainty in the load evaluation
38
Table 2.3
Comparisons of Chiller Model with Controlled Tests
of zero slope of the compressor discharge pressure versus flow relationship. This also
corresponds to a point of zero slope of the compressor speed versus chiller loading
characteristic. Figure 2.7 shows results of the model for required compressor
3500=
3300
3100
CL
Q 2700
2500 - • • -
0 500 1000 1500 2000 2500 3000
Chiller Load (tons)
speed versus loading. The modeled surge point occurs at the minimum speed. To the
left of this point the model predicts that the compressor speed increases with decreasing
load. The minimum modeled compressor speed is 2700 rpm at a load of about 500
tons. It is difficult to predict the load associated with the development of surge. As
evident in Figure 2.7, the chiller cooling capacity is more sensitive to compressor speed
40
near the surge point. The determination of the onset of surge requires a subjective
decision and cannot be measured directly. In this work, the approach used in modeling
surge is to first determine the minimum possible compressor speed for any given set of
conditions. The point at which surge develops is then assumed to occur at 50 rpm's
greater than this minimum. At this point, Figure 2.7 indicates that there is essentially a
linear relationship between speed and chiller capacity.
The chiller model is easily adapted to determine the compressor speed at which
surge first occurs for a given set of chilled and condenser water conditions. An
optimization routine, such as golden section search, is used to calculate the minimum
compressor speed as a function of chiller loading. A program listing for determining
the surge point is given by Braun [1988].
Figure 2.8 shows a comparison of compressor speeds at which surge develops for
the model and D/FW data as a function of the temperature difference between the
leaving condenser and evaporator water flow streams. The agreement is surprisingly
good.
41
3500
Sm.
~3000
Data
0 Modeix
U)2500
2000 W ' - , -
10 20 30 40 50 60
Leaving Water Temperature Difference (F)
temperatures, the dependence on either the chilled water or condenser water flow rate is
not significant. Figure 2.9 shows the effect of chilled and condenser water flow rates
on the coefficient of performance (COP) of the D/FW variable-speed chiller determned
with the mechanistic model described in Section 2.1. In the normal operating range of
8.0
x 50% greater evaporator water flow
7.5- a 50% greater condenser water flow
m Normal water flow
7.0-
*0 6.5-
.'
6.0
5.5
5.0 -
I U U - I - U - U
this chiller, the effect of variations in either flow rate on the overall chiller performance
is relatively small (< 2%) when the results are presented in terms of leaving water
performance in terms of the load and leaving chilled water temperature. For a given
load and chilled water setpoint, a lower flow gives a higher chilled water return
temperature. Assuming that this dominates over the reduced heat transfer coefficient
43
effect, the evaporation temperature rises and the performance improves. In practice, the
7.0
6.5-
o 6.0
5.0 . , w . , . ,
Pch22
Pdcs = a0 + ajX + a 2 X 2 + a Y + a Y2
3 4 + a5 XY (2.2.1)
where X is the ratio of the chiller load to a design load, Y is the leaving water
temperature difference divided by a design value, P&c is the chiller power consumption,
and Pd, is the power consumption associated with the design conditions. The
empirical coefficients of the above equation (a0 , a1, a2, a3, a4, and a5) are determined
with linear least-squares curve-fitting applied to measured or modeled performance
data.
It is also necessary to model the limits of chiller operation associated with maximum
chiller capacity and compressor surge. The following relationships were found to
work well for estimating the maximum and minimum capacities.
where X.. and X.- are the maximum and minimum possible chilled water loads
associated with the capacity and surge limits divided by the'design load. Again, the
empirical coefficients of the above equations are determined with linear regression
applied to measurements or model generated data.
In order to estimate chiller power consumption using the above relationships, it is
necessary to know the leaving water temperatures. The chiller is controlled to give a
specified leaving chilled water temperature. The leaving condenser water temperature,
on the other hand, is not known. It depends upon the entering conditions, load, and
power consumption. An implicit relationship for the dimensionless leaving water
temperature difference results from the use of an overall energy balance on the chiller.
Equation (2.2.4) is quadratic in Y and may solved explicitly. If the design conditions
are appropriately chosen, then Y will typically vary between about 0.2 and 1. This may
be used as a criteria for selecting between the two solutions of equation (2.2.4).
If the specified chiller load falls outside of the limits imposed by equations (2.2.2)
and (2.2.3), then it is necessary to adjust the setpoint such that operation occurs at the
limit. In this case, the load is given by equations (2.1.3) and (2.2.2) or (2.2.3) and Y
is determined with (2.2.4). These equations are solved to find the load, chilled water
setpoint, and value of Y that give performance at the operation limit. Equation (2.2.1)
is then used to evaluate the chiller power consumption.
The empirical relationships for estimating chiller power consumption and the
capacity and surge limits were tested over a wide range of operating conditions using
data derived from the mechanistic model of a variable-speed chiller. In all cases, these
46
Table 2.4
Measurements of the D/FW Chiller Performance
for Variable and Fixed-Speed Control
Figure 2.11 shows a comparison between measured and correlated chiller power
consumption. Separate curve-fits were performed for the D/FW chiller operated with
both variable and fixed-speed control. The design conditions for equation (2.2.1) were
taken to be those associated with the maximum measured power consumption. The
root-mean-square of the error in the modeled power is 64 kW for the variable-speed
and 152 kW for the fixed-speed control. The larger errors for fixed-speed
4000
3000
now
no
ON"
2000
1000
0
0 1000 2000 3000 4000
Measured Chiller Power (kW)
operation may be due to a more unstable control characteristic. In examining the test
results in Table 2.4, there is more inconsistency in the results of the fixed-speed tests.
For instance, in comparing tests 7 and 8 (or 13 and 14), the only condition that changed
appreciably was the leaving condenser water temperature. However, the power
48
consumption associated with vane control did not increase as would be expected. In
this mode of operation, both the inlet and outlet vanes are adjusted in some automatic
fashion to meet the desired conditions. Therefore, it is possible to realize the same
conditions with different power consumptions. The inconsistencies in the fixed-speed
measurements and resulting errors in the empirical fit to the data may be due to
inconsistent control of the inlet and outlet compressor vanes.
temperature differences.
chiller design capacity. However, the fixed-speed performance data shown in Figure
2.13 does not exhibit such a peak. The best performance occurs at the capacity of the
chiller. The capacity of the D/FW chiller was derated when retrofit with a different
refrigerant, so that the evaporator and condenser are oversized at the current capacity
relative to the original design capacity. As a result, the performance is more sensitive to
penalties associated with part-load operation of the compressor than to heat exchange
improvements. Part of the improvement with variable-speed chiller control may result
10
30 F
8
6
0
NMI
4-
A -1 I - U - U - U
V-
10
8-
3.30F
•" 4 -
Figure 2.14 shows a direct comparison of the results of Figures 2.12 and 2.13.
The ratio of power under variable-speed control to that with vane control is plotted as a
function of load and leaving water temperature differences. At typical summer
conditions of 5500 tons and temperature differences of between 40 and 50 F, the
performance ratio is near unity. As the load decreases, the COP of the variable-speed
control ineases, while that associated with fixed-speed operation is reduced. At part-
load conditions of about 3000 tons and temperature differences between 30 and 40 F,
the variable-speed control uses about 30% less power.
51
0.8
0.7 30F
- 0.6
0C
i: 0.4-
0.3-
0.2 i
2000 3000 4000 5000 6000
Chilled Water Load (tons)
Figure 2.14. Comparison of Chiller Power Consumptions under Vane and
Variable-Speed Control
The mechanistic chiller model is useful for studying the effect of different
refrigerants on the overall chiller performance. Figure 2.15 shows COP as a function
of load for R-500, R-22, and R- 12 at a leaving water temperature difference of 30 F.
The D/FW chiller as installed was charged with R-22. Upon retrofit with a variable-
speed drive, the refrigerant was changed to R-500. Since the maximum chiller load is
generally less than about 5500 tons, Figure 2.15 indicates that this was a relatively
good choice. Overall, R-22 does well at very high loads, both R-12 and R-500 are
good at loads near 5500 tons, and R-12 is a clear choice at lower loads. It appears that
R- 12 may be a better overall choice than R-500 for the D/FW system.
52
10
a R-500
R-22
8-
6
0 2000 4000 6000 8000
2.4 Summary
estimate the power requirement. The model is also capable of estimating the
compressor speed at which surge develops or the maximum chiller cooling capacity at a
given power input or speed. Results of the model compare favorably with
measurements from the D/FW airport for both power requirement and the speed
Using results of the mechanistic model, a simpler empirical model for correlating
performance data was also identified. Chiller power consumption is correlated as a
quadratic function of only two variables, the load and temperature difference between
the leaving condenser and chilled water flows. This model fits data for both variable-
53
speed and fixed-speed with vane control chillers. Models for correlating the limits of
chiller operation associated with surge and capacity were also presented.
Results of the models were used to study the performance of the D/FW chiller.
Data for both variable-speed with wide-open vanes and fixed-speed with vane control
were correlated using the empirical model and compared over a wide range of
conditions. At design conditions, the power consumption associated with the two
controls is essentially equal. At 60% of the design load, the variable-speed operation
requires 50% to 80% of the power requirements for fixed-speed, vane control. The
magnitude of the improvement depends upon the temperature difference between the
leaving condenser and chilled water streams. The use of different refrigerants was also
investigated. The peak performance associated with using R-500 shows on the order
of 5 - 10% improvement over the original charge of R-22.
54
Chapter 3
Condenser-Side Component Models
In this chapter, models are presented for cooling towers and condenser water
pumping requirements. These are the prinary components associated with rejecting
heat from chiller condensers to the environment.
between 5% and 15% through the use of the Merkel method if "true" mass transfer
55
coefficients are used. In practice, however, the errors are not nearly as large, because
the mass transfer coefficients utilized in the Merkel method are generally determined by
matching results of the model to measurements from small-scale tests. Another
approach for modeling cooling towers was presented by Whillier [1976]. Whillier
developed a simple method for correlating performance data. However, this method is
not useful for design purposes.
In this section, an effectiveness model is developed for cooling towers by utilizing
the assumption of a linearized air saturation enthalpy. On its own, the linearization is
not a unique contribution. It was utilized for cooling coils by Threlkeld [1970] and
suggested for, but not evaluated for cooling towers by Nizet [1985]. Berman [1961]
described a log-mean enthalpy method for analyzing cooling towers that implicitly
assumes a linear saturation curve. Maclaine-Cross [1985] also developed a model for
wet surface heat exchangers that incorporated the assumption of a linearized saturation
humidity ratio. Recently, an effectiveness model for cooling towers was also presented
by Jaber and Webb [1987]. The contributions of the work described in this chapter are
primarily: 1) development of the basic equations leading to effectiveness relationships
for cooling towers analogous to those for sensible heat exchangers, 2) development of
a simple method for estimating the water loss in cooling towers, and 3) validation of the
methodologies over wide ranges of conditions. Results of the methods are compared
with both numerical solutions to the detailed heat and mass transfer modeling equations
and with measurements. In Chapter 4, a similar analysis is applied to modeling the
performance of cooling coils.
56
Water
ma; 0 a,o;ha,o mw 4 ; Tw
4
(Oa + da m + dmw
ha +dha ~ T
dV
Tt
OD a mw; Tw
I
ma; oa,i; ha rnw; TW9
Air
For negligible heat transfer from the tower walls, a steady-state energy balance on
the incremental volume, dV, gives the following relation between the water and air
enthalpies.
adh a = d(whf,w)
= MW dhf,w + h f,wdw(31)
where,
ma = mass flow rate of dry air
Relationships for the incremental water loss, dm,, and the water flow rate at any point
within the tower, m.x, are determined from steady-state mass balances on the water.
d w =adcoa (3.1.2)
where,
From equations (3.1.1), (3.1.2), and (3.1.3) and assuming a constant water
58
specific heat, the change in water temperature across the incremental control volume
dT w
[a -Cpw(Tw
dh*a
Ma
.w
(Oao'-a)]CPw
"Trf)doa
oa(314
where Tw is the local water temperature, Trf is the reference temperature for zero
enthalpy of liquid water, and Cp is the constant pressure specific heat of liquid water.
The incremental increase in enthalpy of the air stream is equal to the rate of energy
transfer from the water droplets due to both heat and mass transfer or
where,
hc = convection heat transfer coefficient
Assuming that the mass fraction of water vapor in the mixture of air and vapor is
approximately equal to the humidity ratio, the rate of mass transfer of water vapor to the
where
hD = mass transfer coefficient
Substituting equation (3.1.6) into (3.1.5) and making use of the Lewis number
definition (Le = hc/(hDCpm)) and the definitions for the enthalpy of water vapor, the
where,
CCpm i -
constant pressure specific heat of moist air = Cpa + C(aCpv
where VT is the total tower volume. Utilizing the Ntu definition, equations (3.1.6) and
(3.1.7) may be reduced to
60
do a = Ntu
dV VT (c a s (3.1.9)
For given Ntu, Le, and inlet conditions, equations (3.1.9), (3.1.10), and (3.1.4)
may be solved numerically for the exit conditions of both the air and water stream. The
solution is iterative with respect to two variables, o° and Tw.o. At each iteration,
equations (3.1.9), (3.1.10), and (3.1.4) are integrated numerically over the entire tower
volume from air inlet to outlet.
significantly, he neglected the effect of the water loss due to evaporation on the right-
hand side of equation (3.1.1). In equation (3.1.1), this eliminates the last term and
implies that the water flow rate at each point in the tower in the first term on the right-
hand side is equal to the inlet flow. The second assumption is a Lewis number of
unity. With these approximations, the equations for the cooling tower may be reduced
to
dTw ma(dha/dV)
dV thWCpw
The primary computational savings associated with the Merkel assumptions is that
the solution of equations (3.1.11) and (3.1.12) is iterative with respect to a single
variable, Tw, o, instead of two variables. However, the solution of equations (3.1.11)
and (3.1.12) gives only the exit temperature of the water stream and exit enthalpy of the
air stream. In order to obtain the exit humidity ratio, it is still necessary to numerically
integrate equation (3.1.9) after the solution of equations (3.1.11) and (3.1.12) has been
obtained.
where,
C
w(3
s - T- T .1.14 )
C5 has the units of specific heat and will be termed the saturation specific heat. If the
saturation enthalpy were linear with respect to temperature, (i.e constant C5 ), then
62
equations (3.1.11) and (3.1.13) could be solved analytically for the exit conditions.
These equations are analogous to the differential equations that result for a sensible heat
exchanger with C,, ha, and h,,w replaced by Cp7, Ta, and Tw. Figure 3.2 shows the
variation of saturation enthalpy with temperature, along with a straight line connecting
two typical water inlet and outlet states. It is apparent that the saturation enthalpy is not
linear with respect to temperature. However, by choosing an appropriate average slope
between inlet and outlet water conditions, as depicted in Figure 3.2, an effectiveness
relationship may be derived in terms of C.
100
90
80
.0 70
0
60
50
I'
40
Twj,- Tw,o
30 Water'
I-.
d
20
0n
10
0 '- - I -
- - vI
----- a I
UIa
= -f
-
=
II
=
-
UN=
I 1
40 50 60 70 80 90 100 110
Saturation Temperature (F)
Effectiveness is usually defined as the ratio of the actual to maximum possible heat
transfer. However, when C, is taken as the slope of the straight line between the water
inlet and outlet conditions, then an air-side effectiveness rather than an overall
63
Fa =
1 - exp(-Ntu(1
,-,(3.1.16)
- m))
1 - m exp(-Ntu(1 - m))
where,
M ma (3.1.17)
m=--
)mwji (CpVXS)
The exit air enthalpy and water temperature are determined from overall energy balances
on the flow streams.
Equation (3.1.19) is written in terms of the mass flow rates of water entering and
leaving the cooling tower. The simplest strategy is to completely neglect the water loss
as is done with the Merkel method. In this case, equations (3.1.15) - (3.1.19), along
with psychrometric data, are sufficient for determining the overall heat transfer and exit
conditions. The enthalpies associated with the inlet air and saturated air at the water
inlet temperature are evaluated with a psychrometric chart or using empirical
correlations as given in the ASHRAE Handbook of Fundamentals [1985]. The average
saturation specific heat, Cs, is estimated as the average slope between the inlet and
outlet water conditions.
Since C, depends upon T,, the solution of equations (3.1.15) - (3.1.20) is iterative.
However, C,5 is only weakly dependent upon the exit temperature, so that any
reasonable initial guess of Tw.0 (such as the entering air wet bulb temperature) usually
results in convergence in only 2 iterations.
considered. It is also necessary to know the water loss in order to perform mass and
65
energy balances on the cooling tower sump. From an overall mass balance, the exit
The exit air humidity ratio could be determined by numerically integrating equation
(3.1.9) over the tower volume, An alternative approach, which allows an analytic
solution, is to assume that equation (3.1.9) is approximately satisfied over the entire
tower volume with the local co, replaced with a constant appropriately averaged value.
Assuming a Lewis number of unity, integration of equation (3.1.9) gives
determined as
=h+ h adi)
"(ha,o- (3.1.23)
The effective saturation humidity ratio, cos,w,., associated with hs,we is found from
psychrometric data.
66
Figures 3.3 - 3.5 show comparisons between cooling tower results obtained with:
1) a detailed analysis defined by the numerical solution of equations (3.1.4), (3.1.9),
and (3.1.10) with a Lewis number of unity; 2) the Merkel analysis; 3) the
effectiveness model.
In Figure 3.3, cooling tower air heat transfer effectiveness is plotted versus Ntu for
different ratios of water to air flow rate for entering conditions typical of those
associated with heat rejection from the condenser of a chiller. Neglecting the water loss
effectiveness resulting from a reduced mass transfer. Errors associated with the
effectiveness method are primarily a result of the assumption of a linear saturation
enthalpy relationship. Overall, both the Merkel and effectiveness models agree closely
Figure 3.4 shows cooling tower water temperature effectiveness results for the
same conditions as for Figure 3.3. The water temperature effectiveness is defined as
the ratio of the temperature difference between the inlet and outlet water to the
maximum possible temperat difference if the leaving water were at the entering air
wet bulb temperature. As a result of the water loss, this temperature effectiveness does
not correspond to a heat transfer effectiveness. In Figure 3.4, the Merkel model
1.0
MW 2
0.8
0.8 Ma mw=1
ma
0.6
* =0.5
0.4,a
- "Detailed Analysis
0.2 + Merkel Method
n Effectiveness Model
0.0'I i iI V
0 1 2 3 4 5
Number of Transfer Units (Ntu)
1.0m
0.8 M a
0.6
V 0.4 Ma
Detailed Analysis
0.2 Merkel Method
* Effectiveness Model
0 .0* • , • , .
0 1 2 3 4 5
Number of Transfer Units (Ntu)
Figures 3.3 & 3.4. Air Heat Transfer and Water Temperature Effectiveness
Comparisons (Dry Bulb, Wet Bulb, and Water Inlet Temperatures of 70 F, 60 F, 90 F)
68
Figure 3.5 gives comparisons between tower water loss evaluated with a detailed
analysis and the loss determined using the simplified approach presented in Section
3.1.4 (The Merkel method neglects the water loss). Water loss as a percentage of the
inlet water flow rate is plotted versus Ntu for different ratios of water to air flow rates.
No significant differences are evident in these comparisons.
3'
-0.5
ma =2
=
.. " 1 ma
2 a *a M111111110000olm
-Detailed Analysis
* Effectiveness Model
0 1 2 3 45
Figure 3.5. Comparisons of Relative Water Loss (Dry Bulb, Wet Bulb, and Water
Inlet Temperatures of 70 F, 60 F, and 90 F)
General correlations for heat and mass transfer in cooling towers in terms of the
physical tower characteristics do not exist. It is usually necessary to correlate data for
specific tower designs. Mass transfer data are typically correlated with the following
n
I.
hDAVVT = c MW(3.1.24)
where c and n are empirical constants specific to a particular tower design. Multiplying
both sides of the above equation by Mw/ma.and utilizing the definition for Ntu gives
0 w1I + n
Ntu = cm- (3.1.25)
According to the above equation, data should correlate as a straight line on a log-log
plot of Ntu versus the flow rate ratio. The slope and intercept of this line are (1+n) and
log(c), respectively. Linear regression may be utilized to determine the "best" fit
straight line through the data. For given entering conditions and heat transfer rate, the
tower Ntu is estimated from equation (3.1.16) with the air-side effectiveness computed
using equation (3.1.15).
Simpson and Sherwood [1946] give data for a number of different tower designs.
The coefficients of equation (3.1.25) were fit to the measurements of Simpson and
Sherwood for four different tower designs over a range of performance conditions.
Table 3.1 gives the coefficients of the mass transfer correlation determined from the
regressions for each tower. The data include measurements of outlet states for both the
water and air flow streams. A comparison between results of model estimates for
leaving water temperature and measurements are shown in Figure 3.6. The model
matches these data quite closely over a wide range of conditions. Water loss was
computed from the measurements using a mass balance and compared with model
70
predictions as shown in Figure 3.7. The model tends to underpredict the water loss as
compared with the data. This bias may be associated with the assumption of Lewis
number of unity or may be due to errors in the measurements of the air outlet state.
Energy balances on the data close only to within 10 percent.
Table 3.1
Mass Transfer Correlation Coefficients for Data of
Simpson and Sherwood [1946]
Tower c n
110
100
a
'0 90
i
80
70 , "
70 80 90 100 110
Measured Two (F)
3,
2
0
2 1'
0 1 2 3
Measured WmwA
mW, 0 x 100
Figure 3.7. Comparisons of Relative Water Loss Measurements from Simpson and
Sherwood [1946] with Effectiveness Model Results
Results of the cooling tower model were also to fit to data from the D/FW airport
for a 3 day period in October. This tower has four cells, each with two-speed fans that
share a common sump. D/FW measurements included the entering tower water
temperature and supply water temperature to the chillers from the sump. Ambientwet
bulb temperatures were available from the National Weather Service for this time
period. The maximum tower air flow rates and coefficients of the Ntu correlation
determined from nonlinear regression analysis were 635,000 cfm, c = 3.76, and
n = -0.63. As exhibited in Figure 3.8, the model does a relatively good job of
estimating the leaving cooling tower water temperature for this data. The root-mean-
square of the error is approximately 1.4 degrees F. Since the differences between
72
entering and leaving water temperatures were inthe range of 4 to 15 degrees, not nearly
as good agreement was realized in terms of tower heat rejection rates. However, the
agreement is within the accuracy of the measurements.
80
.+
++
' 70"+ +
+ +4. +
+
'i
N 60 +
4. .D/FW Measurements
-Model Predictions
50 , • •
0 20 40 60 80 100
Time (hours)
With this definition, equations (3.1.11) and (3.1.13) may be replaced with
I
dha = Nm (27
dV "VT (ha"hsv) (3.2.27)
dh _w maaCs(dha/dV)
S = (3.1.28)
C
dVw
where,
CS = ].dT JT Tw (3.1.29)
Equations (3.1.26) - (3.1.29) may be solved analytically for outlet conditions given
inlet conditions for a linearized Cr Overall, the accuracy of this analysis is no better
and in many cases worse than the simpler effectiveness method. Neglecting the effect
of the water loss on the enthalpy change of the water stream is a conservative
assumption. On the other hand, the linearization of the saturation enthalpy between the
inlet and outlet water temperatures tends to overpredict the tower heat transfer. These
are relatively small, but compensating effects that result in a model with good accuracy.
By including the water loss, the model becomes slightly optimistic.
The accuracy of the effectiveness model presented in this chapter depends primarily
upon the temperature difference between the water stream inlet and outlet. As the inlet-
to-outlet water temperature difference increases, the accuracy associated with using a
linear relationship for the saturation enthalpy is reduced. Comparisons with both
74
detailed numerical solutions and measurements indicate that this model works well over
One approach for reducing the errors associated with the linearization involves
dividing the cooling tower into two or more increments. The effectiveness model is
then applied to each increment and the set of equations is solved for the intermediate
and outlet states. With a sufficient number of increments, this model will always yield
satisfactory results. This procedure is advocated by Jaber and Webb [1987]. Another
approach involves choosing a better linearization than a straight line between the inlet
and outlet conditions. Berman [1961] developed a correction factor to account for the
model as described in Section 3.1.3 , and the effectiveness model using the correction
of Berman [1961]. Cooling tower air effectiveness is plotted as a function of the water
inlet temperature for different water-to-air mass flow rates with constant ambient dry
and wet bulb temperatures (80 F and 60 F). The Ntu's were determined with equation
(3.1.25) using coefficients determined from the regression to the D/FW airport data.
Depending upon the flow rate ratio, the accuracy of the effectiveness model is degraded
with increasing temperature differences between water inlet and ambient wet bulb. As
the water-to-air flow rate ratio increases, the water temperature difference decreases and
the linearization is more accurate. At the low flow rate ratios, the water loss becomes
more significant and compensates for greater inaccuracies in the linearization. Overall,
the effectiveness model appears to give satisfactory results for temperature differences
up to 50 degrees F between the water inlet and ambient wet bulb. The correction of
Berman improves the results for the higher flow rate ratios, but has negative effect at
75
low flow rate ratios where the water loss becomes important. At low flow rate ratios
and large water inlet and wet bulb temperature differences, the combination of the
Berman correction and the approximate method for including water loss described
above may be justified. However, the accuracy of the simpler effectiveness model is
most likely sufficient over the practical operating range when considering the other
uncertainties in the analysis such as inaccurate input data or the assumption of a Lewis
number of unity.
1n
0.8-
0.8" =w2
1
U'
OW
II
0.4-
* Effectivness Model+
+ Effectiveness with Berman [1961] Correction
0.2 a - - 9 N I I
I w I w l "
ilIi
I "
Figure 3.9. Comparisons of Detailed Model with Effectiveness Model Results for
Extreme Conditions ( Ambient Dry and Wet Bulb Temperature 80 F and 60 F)
tower sump. Water enters a sump from each of the operating tower cells and from a
water make-up source. The level of the sump is assumed to be constant, so that the
76
flow of water make-up is equal to the total water loss from the cells. The water volume
of the sump is further assumed to be fully-mixed, so that a steady-state energy balance
yields
11
Ncell N
X
k=1
( Tw'o-Ts + tw~i-
k=1
mwSo) (Tmain-Ts) = 0 (3.1.30)
where Nn is the number of tower cells that share a common sump, Tmin is
temperature of the water make-up and T. is the fully-mixed sump temperature. This
equation is solved for the sump temperature, Ts, which is generally the supply
The cooling tower fans are assumed to obey the fan laws. Given the power
requirement at maximum fan speed, the power consumption for a cooling tower
consisting of N, 1 tower cells is calculated as
Ncell 3
Pt= Yt,kPt,k,des (3.1.31)
k=1
where Yk and Pt~kd are the relative fan speed and design power consumption at
maximum speed for the kth tower cell.
As discussed in Chapter 5, the deter ation of optimal control points that minimize
operating costs is simplified when the individual component operating costs are
expressed as quadratic functions of the continuous controls and/or outputs. In the
about the most recent iteration point. Alternatively, it is possible to accurately correlate
the power consumption of a variable-speed fan as a quadratic function of speed over its
operating range. Figure 3.10 shows a comparison of the relative fan power
consumption as determined with equation (3.1.31) for one cell and a quadratic
function. The coefficients of the quadratic function were determined analytically by
matching the power consumption determined with equation (3.1.3 1) at relative fan
speeds of one-third, two-thirds, and full speed. The quadratic function works
extremely well in correlating variable-speed fan power consumption.
u0m
Lo
0J
.2
pressure rise is produced at zero flow rate, while the maximum efficiency occurs at
what is considered to be the design flow. At the operating point of a pump, the
pressure rise developed is equal to the total pressure drop through the system. The
primary pressure losses in the condenser loop are to due to the elevation difference
between the tower inlet stream and the sump and the flows through the condenser and
tower nozzles. Figure 3.11 shows typical pump pressure rise and system pressure
drop characteristics as a function of flow rate. The operating point of the pump occurs
Al'.
f-
mcw mp,max
Figure 3.11. Pump Pressure Rise and System Pressure Drop Characteristics
For turbulent flow, the overall condenser water loop pressure drop takes the
following form.
79
APcw = AP 0 + AP cw,des 1
r 2
(3.2.1)
where AP. is the static pressure drop associated with the elevation change in the tower,
rncw is the condenser loop flow rate, and APwd. is a design pressure drop for the flow
components at a design condenser loop flow rate of Mew,&s. Considering only the
pressure losses within the chillers and cooling tower cells, the design condenser loop
2 2
AP cwdes--APc md]
A~hdSMchdesJ
+ AP ImCWtS](3.2.2)
Lmrdes
lch,d csJ [mtde 5 ]
where mCh,des and APchde are the flow rate and pressure drop through the chillers at
specified design conditions and mr, des and AP t,des are the design flow and pressure
drop for the cooling tower nozzles. The condenser loop pressure drop also depends
upon the number of chillers and cooling tower cells in operation. Cooling tower cells
operate in parallel and the total flow is generally divided equally between the cells. For
identical chillers, the condenser flow would also be divided equally between the
chillers. For parallel flow paths with identical pressure drop characteristics, the design
flow rates utilized in equation (3.2.2) are simply the design values for an individual
device multiplied by the number operating in parallel. The design pressure drop for the
parallel components is equal to the pressure drop for an individual component at its
design flow rate.
The pressure rise developed by a pump may be correlated with a simple parabolic
flow, AP pmaW and the maximum flow at zero pressure rise, mp,ma , the pump
pressure rise is
21
Ic
APp AP pmax 1 - ( j(3.2.3)
Multiple pumps operating in parallel will produce a total flow capacity equal to the
sum of the individual capacities at the same pressure rise. The combined pump
characteristic is obtained by adding together flow capacities at fixed pressure rises. For
identical parallel pumps, the maximum flow rate of equation (3.2.3) is equal to the
product of the individual maximum flow rate for an individual pump and the number of
rate depend upon the relative pump speed according to the following relationships.
2
APp,max = 7p APp,maxcdes (3.2.4)
whereyp is the pump speed relative the maximum design speed and APp,maxdes and
mp,made are the maximum pump pressure rise and flow rate associated with the
design speed.
Equating the condenser loop pressure drop to the pump pressure rise and solving
81
S= Y pmaxdcs (3.2.6)
mpPmax,des APp,max,des
For fixed-speed pumps, the relative speed in the above equation is equal to unity.
For a given mass flow rate and pressure rise, the overall pump power requirement
for the condenser water loop is determined as
thCW APCW
PP - (3.2.7)
rip Pcw
where pcw is the density of the condenser water and 1p is the overall efficiency of the
pump and motor. The overall pump efficiency is primarily a function of the flow rate
relative to the speed of the pump (White [1986])and may be correlated with
P ao+ [al]
0r
+ a2 [+ades](3.2.8) 2
functions of the controls and/or outputs. It is possible to accurately correlate the power
operating range. Figure 3.12 demonstrates that a quadratic function works extremely
well in correlating pump power consumption. The coefficients of the quadratic
function were determined analytically by matching the power consumption detenined
with equation (3.2.7) at relative speeds of one-half, three-quarters, and full speed.
3.3 Summary
An effectiveness model has been presented for cooling towers. The model utilizes
existing effectiveness relationships developed for sensible heat exchangers with
modified definitions for number of transfer units and the capacitance rate ratio. A
simple method was also developed for estimating the water loss in cooling towers.
Results of the model compare well with the results of more detailed numerical solutions
to the basic heat and mass transfer equations and with experimental data. The
simplicity and accuracy of the effectiveness model is such that it is useful for both
83
design and system simulations. This modeling approach is also appropriate for other
wet surface heat exchangers and is applied to*cooling coils in Chapter 4.
A model was also presented for determining the condenser pump flow rate and
power consumption based upon a hydraulic analysis. It was shown that the variable-
speed pump power consumption may be correlated as a simple quadratic function of the
relative pump speed. This was also found to be the case for variable-speed cooling
tower fans. The use of quadratic functions for the component operating costs
simplifies the determination of the optimal control points as described in Chapter 5.
84
Chapter 4
Evaporator-Side Component Models
In this chapter, models are presented for air handling and chilled water pumping
equipment. An air handler consists of a cooling coil, supply air fan, and valve for
modulating chilled water flow through the coil. In Section 4.1, an effectiveness model
is developed for coiling coils that is similar to the cooling tower model presented in
Chapter 3. The complete air handler analysis is presented in Section 4.2, while the
chilled water pumping power requirements are developed in Section 4.3.
[1970]. By assuming a linear relationship for saturation air enthalpy with respect to
85
both surface and water coolant temperature conditions, Threlkeld obtained an analytic
solution to the heat and mass transfer equations. Threlkeld did not compare his
methodology extensively either with more detailed analyses or experimental results.
Elmahdy [1977] compared results of this model with experimental measurements for
two different coil designs and found good agreement.
Threlkeld presented his solution for cooling coils in terms of log-mean enthalpy
differences between the entering and leaving flow streams. This form is particularly
useful for design purposes in which entering and leaving conditions are specified and
the area requirements are to be computed. For a given coil design and entering
conditions, a more convenient expression for determining the cooling capacity is based
upon the coil effectiveness.
The pr#mary difference between the analysis of cooling coils and cooling towers is
associated with the fact that the air and water streams are not in direct contact. As a
result, there is an additional heat transfer resistance associated with the material
separating the streams and there is no loss of mass associated with the water flow. The
use of multi-pass crossflow geometries also complicates the analysis of cooling coils.
However, as the number of passes increases beyond about four, the performance of a
crossflow heat exchanger approaches that of a counterflow.
In this section, the basic theory of a counterflow cooling coil is presented, leading
to the development of an effectiveness model. A simple method for analyzing the
performance of cooling coils that have both wet and dry sections is also presented. The
resulting effectiveness model is compared with results of finite-difference solutions to
the basic heat and mass transfer equations and manufacturrs' data. In addition,
result of a flow of chilled water is shown in Figure 4.1. Assuming that the local
surface temperaure is less than the dewpoint of the air, then the air is both cooled and
dehumidified.
Water Film
Surface_ ___________
Following the assumptions and development of Section 3.1.1, the equations modeling
the local heat and mass transfer from the air to the chilled water for a counterflow coil
without fins may be written
do)a Ntuo(0 )a
(4.1.1)
dA - LoAo
dlh NtUo , l
---at A (h a - hs ts) + ( co- os1)(I/ e o - l)hg
(4.1.2)
dA A0 S- ~s I
87
dTw dha
dA Cw(s do)a
r)dA
dT (4.1.3)
dA faw. pw
ma
where,
Ao = total cooling coil outside surface area
Cpw = constant pressure specific heat of liquid water
Oa = ir humidity ratio
COs s = humidity of saturated air at the coil surface temperature
In contrast to the use of mass transfer Nt's for the cooling tower analysis, heat
transfer Ntu's are utilized for the inside and outside flow streams. The Ntu's and
88
(UA)i
Ntu-i hC,A w(4.1.5)
0 maC pm(416
where,
Cpm =constant pressure specific heat of moist air
(UA)i = overall heat transfer conductance between water stream and outside
surface
h9o f= convection heat transfer coefficient for air stream
hD 0o =f mass transfer coefficient for air stream
Equations (4.1.1) - (4.1.4) may be solved numerically for the air and water exit
states. For given entering conditions, the solution is iterative with respect to the exit
water temperature, Tw~o. Fr a given value of Tw~o , the equations are numerically
integrated from air inlet to outlet. For sections of the coil where the local surface
temperature is greater than the dewpoint of the air, no condensation occurs and
equations (4.1.1) - (4.1.4) apply with cos~s = 0a*a In the following two sections,
effectiveness relations are presented for both completely dry and completely wet coils.
89
If the coil surface temperature at the air outlet is greater than the dewpoint of the
incoming air, then the coil is completely dry throughout and standard heat exchanger
1 - exp(-Ntudry(1 - C))
8 C)),(4.1.9)
dry,a --
1 - Cexp(-NtUdry(1-C
where,
C* rnaCPm (4.1.10)
mwCpw
Ntu &yNtu o
Nty = Ntu, (4.1.7)
1 + C (Ntuo/Ntui)
For finned surfaces, the air-side number of transfer units, Ntu0 , defined by equation
(4.1.6) is multiplied by an overall fin efficiency factor. For air flow over finned coil
90
surfaces, general correlations for detemining the overall heat transfer coefficient have
been developed by Elmahdy [1979] for dry heat exchangers.
The exit air humidity ratio is equal to the inlet value, while the exit air and water
temperatures are determined from energy balances on the flow streams as
, (4.1.9)
Tw,0 =Twi + C (Ta,i - Ta,o)
The coil surface temperature at the air outlet is determined by equating the rate
equation for heat transfer between the water and air streams with that between the water
and the outside surface.
•Ntu
TS 0 TWi + C N-ry(Ta'o T wo)
' (4.1.10)
If the surface temperature evaluated with the above equation is less than the inlet air
dewpoint, then at least a portion of the coil is wet and the analysis in the following
section must be applied.
Introducing the definition for the air saturation specific heat, Cs , from Chapter 3,
assuming that Cs evaluated at the local surface temperature is equal to the value at the
91
local water temperature, assuming a Lewis number of unity, and neglecting the energy
flow associated with condensate draining from the coil surface, equations (4.1.1) -
(4.1.4) may be written
dh a Ntuwet -h~)(..1
( h a" h W
dV = - A---
dhs.w maCs(dha/dA)
- a(4.1.12)
dwCpw
where the overall number of transfer units for a wet coil is defined as
Ntu Ntuo
Ntuwet Ntu, (4.1.13)
1 + m (NtuO/Ntu-)
and
, ma (4.1.14)
m=
iiw(CPgC )
CdTT
] = (4.1.15)
due to different heat transfer coefficients and fin efficiencies for finned coils. There are
no general correlations for heat transfer coefficients for wet coils, however ASHRA
[1985] presents data that show a relatively small difference between wet and dry
92
coefficients. The fin efficiency for a wet coil must account for the effects of both heat
and mass transfer. Threlkeld [1970] gives a method for computing fin efficiencies for
wet coils using the relationships available for dry coils.
For a constant C, equations (4.1.11) and (4.1.12) may be solved analytically. For
where,
1 - exp(-Ntuwet(1 - in))
ea, 1 - mexp(-Ntuwet(-m.1.17)
Analogous to the dry analysis, the exit air enthalpy and water temperature are
The exit air temperature is determined in a manner analogous to that for determining
the exit humidity ratio for the cooling tower described in Chapter 3 and as described in
the ASHRAE Equipment Guide [1983].
where, the effective surface temperature is determined from its corresponding saturation
enthalpy.
ha,o - ha i
hs,s,e = hai + 1 - exp(-N) (4.1.21)
From the rate equations, the surface temperature at the air inlet is computed as
mfa [Ntuwet1
Tsj i Tw, o + -- pa't N j (ha,i- 'hs'wo (4.1.22)
mIwC 1 tuiJ
If the surface temperatur evaluated with the above equation is greater than the inlet air
dewpoint, then a portion of the coil beginning at the air inlet is dry, while the remainder
is wet.
the air is humidified during the portion of the coil in which the dewpoint of the air is
less than the surface temperature. The latent heat transfer to the air associated with this
"artificial" mass transfer reduces the overall calculated cooling capacity as compared
with the actual situation. Since both the completely dry and wet analyses underpredict
the heat transfer, a simple approach is to utilize the results of the analysis that gives the
largest heat transfer. The error associated with this method is generally less than 5
percent.
The steps for determining the heat transfer and oudet conditions for a cooling coil
are summarized as follows:
1) Assume that the coil is completely dry and apply the analysis of Section 4.1.2.
2) If the surface temperature at the air outlet determined with the dry analysis is less
than the dewpoint of the entering air, then assume that the coil is completely wet
and apply the analysis of Section 4.1.3.
3) If the surface temperature at the air inlet determined with the wet analysis is
greater than the entering dewpoint temperature, then a portion of the coil is dry.
At this point, the analysis given in Appendix B could be used to determine the
fractions of the coil that are wet and dry, and the corresponding heat transfers
and outlet states. More simply, choose the result of steps 1) or 2) that yields the
largest heat transfer.
effectiveness model described in the previous section. Air heat transfer and
temperature effectivenesses are plotted versus the air-side transfer units, Ntu o, for
different water-to-air flow rate ratios. The air heat transfer effectiveness is the ratio of
the actual heat transfer to the heat transfer that would occur if the exit air were saturated
at temperature of the inlet water. The air temperature effectiveness is the ratio of the
actual air temperature difference across the coil to the temperature difference between
the inlet air and inlet water.
1.0
0.8 M a
ma
4C 0.6, mw
0.
. 0.4
II
Detailed Analysis
0.2 * Effectiveness: Wet and Dry
+ Effectiveness: Wet or Dry
0 .0 •1 - • 1 •
0 1 2 3 4 5
Air-Side Transfer Units (Ntuo0)
Figure 4.2. Air-Side Heat Transfer Effectiveness for Detailed and Effectiveness
Models (Ambient Dry & Wet Bulb of 95 F & 68 F, Water Inlet of 41 F, NtuO/Ntu i = 2)
As evident in Figures 4.2 and 4.3, the effectiveness model agrees very closely with
the more detailed analysis. The accuracy is better than that for cooling tower analyses
because the saturation enthalpy is more nearly linear in the temperature range associated
with cooling coil operation. Similar agreement was found over a wide range of
96
conditions and coil parameters. For situations in which there were wet and dry
portions of the coil, both the method of Appendix B and the simpler method of
assuming the coil is either all wet or dry were utilized for the effectiveness model
results. The results include conditions in which there are significant wet and dry coil
sections. The differences in both the air heat transfer and temperature effectivenesses
1.0
mw 2 Mw
0.8M Ima
E
NOE 0.4
- Detailed Analysis
0.2 -Effectiveness: Wet and Dry
I+ Effectiveness: Wet or Dry
0.0 • , • , I I ,
0 1 2 3 4 5
Air-Side Transfer Units (Ntu 0)
Figure 4.3. Air Temperature Effectiveness for Detailed and Effectiveness Models
(Ambient Dry and Wet Bulb of 95 F and 68 F, Water Inlet of 41 F, Ntuo/Ntui = 2)
Catalog data for the performance of a cooling coil were utilized in order to further
test the accuracy of the effectiveness model. The physical characteristics of the coil and
flow rates were used in order to determine heat transfer coefficients and fin efficiencies
from general relationships available in the literature. For air flow over finned coil
surfaces, correlations developed by Elmalidy [1979] for dry heat exchangers were
utilized. Fin efficiencies for wet surfaces were determined as outlined in Threlkeld
97
[1970] for straight fms. Turbulent flow was assumed for the water-side heat transfer.
Table 4.1 shows representative comparisons between the model and data for a 6
row coil with 8 fins per inch of tubing for a range of conditions. The agreement
Table 4.1
Effectiveness Model Comparisons with Cooling Coil Catalog Data
its geometry and the flow rates. In order to simulate the performance of a cooling coil
in a system simulation, it is necessary to estimate the air-side and water-side transfer
units as a function of the flows. General correlations exist for the air-side and water-
side heat transfer coefficients and overall fin efficiencies. However, it is necessary to
know specific details concerning the dimensions and configuration of the tubes and
fins, which is not always readily available. It is possible to correlate the transfer units
98
when both inlet and outlet coil conditions are provided for a range of flows. The
following forms have been found to work well.
Ntui-k, mW (4.1.023)
ma
Ntuo = k3 ,,,(4.1.24)
where k 1, k2 , k3 , and k4 are empirical constants that may be determined with nonlinear
units differ for dry and wet coils due to different heat transfer coefficients and fin
efficiencies, a single correlating function appears to work well for both cases.
regression applied to the manufacturers' data presented in Table 4.1. These data cover
a fairly wide range of inlet conditions and flow rates and include conditions for which
the coil is completely wet and almost completely dry. The assumption that the coil was
either all wet or all dry was utilized for the coil model. Figure 4.4 shows a comparison
between the data and model results for the difference between outlet temperatures (both
water and air) and inlet conditions. The agreement between the model results and the
data is excellent.
99
S20
L10
0 10 20 30 40 50
Temperature Differences from Data (F)
Figure 4.4. Correlation of Cooling Coil Model Results with Catalog Data
Local loop control of a chilled water valve modulates the flow of chilled water
through the coil in order to maintain a specified supply air temperature to the zones.
For a variable-air-volume (VAV) system, a local loop controller also adjusts the supply
air flow in order to maintain the zone temperature (and possibly humidity) at prescribed
conditions. For the purposes of this study, local loop control of the air handlers is
assumed to be ideal such that specified supply air and zone temperatures (and humidity
in some cases) are maintained exactly. These controls are handled as constraints in the
overall optimization of the system as described in Chapter 5.
There are two possibilities for modulating the air flow in a VAV system that are
considered in this study. The most efficient method involves the use of variable-speed
100
fan motors. The speed of the fan is adjusted to give the required air flow. The power
consumption for a variable-speed air handler fan is assumed to obey the fan laws and is
computed as
r3
P u = P ahu, des (4.2.1)
where rna is the supply air flow rate from the air handler and P ahudes is the air
handler fan power at a design flow of mhu,&d Analogous to the cooling tower
analysis, the air handler fan power may also be expressed as a quadratic function of the
relative flow with a second-order Taylor series expansion of equation (4.2.1) or a
correlation over its operating range.
A more common method for modulating supply air flow utilizes variable-pitch fan
blades with fixed-speed motors. In this study, the power consumption is determined
for variable-pitch fan control using a correlation from the BLAST (1981) simulation
program.
inlet enthalpy and humidity. Return air from the zones serviced by an air handler is
101
where Xamb is the fraction of the total air handler air flow that is drawn from the
ambient, hnb and cOab are the enthalpy and humidity ratio associated with ambient
conditions, and har and (oar are the enthalpy and humidity ratio of the return air from
the zones. The return air conditions are determined with overall energy and mass
balances.
h' h + gain
ha,r = ha,o + • (4.2.5)
Mahu
00gain
Cja,r = aa,o + . (4.2.6)
liahu
where Qgain and (0 gain are the total rate of energy and humidity gains to the ventilation
stream from zones serviced by the air handler. The energy and moisture gains in a
building are due to many factors that include conduction through walls, solar radiation
through windows, people, lights, and equipment. In order to model these gains in
detail, it is necessary to include the dynamics associated with walls and possibly the
furnishings. Simulation programs such as TRNSYS [1984] contain zone models that
determine energy and moisture gains in a detailed fashion. Many of the results in this
102
work are presented in terms of the gains to the ventilation stream. However, for the
purpose of performing simulations over a cooling season, the energy and moisture
gains are determined with a very simple model. The internal gains (both energy and
moisture) due to people, lights, and equipment are considered to be constants that do
not depend upon time. The overall conduction through walls is computed assuming an
overall conductance for heat gain driven by an ambient sol-air temperature. The overall
energy gains are
where (UA) z is an overall conductance, (int is the overall internal gains due to people,
lights, equipment, etc., Tz is the zone temperature, and Tso1.k is an ambient sol-air
temperatur determined as
where Tamb is the ambient dry bulb temperature, o and ho are the solar absorptivity
and convection coefficient for the outside of the walls, and I is the instantaneous
horizontal radiation.
that for the condenser loop presented in Chapter 3. The primary pressure losses in the
chilled water loop are to due to the flows through the chiller and cooling coils.
Commonly, the pressure drop between the chilled water supply to and retur from the
103
air handlers is maintained at a minimum value necessary to ensure adequate flow to all
air handlers in the system. For variable-speed pumping, the pump speed controller
responds to changes in the air handler control valves in order to maintain the specified
pressure drop. In this manner, the chilled water flow requirements of the air handlers
may be met exactly (i.e. no bypass) by the pumps. For fixed-speed pumps, a bypass
valve between the supply and return lines maintains the pressure drop. As the supply
air temperature is increased for a given chilled water supply temperature, the water flow
requirements of the air handlers are reduced and the air handler pressure drops increase.
Under these circumstances, the bypass valve would open to bypass flow and reduce the
pressure drop. However, for best system performance, the supply air temperatures
should always be chosen to minimize the bypass flow. For systems with fixed-speed
chilled water pumps, the bypass flow is considered to be zero in this study.
In the analysis of the chilled water loop, the controlled pressure drop is treated as a
static (constant) pressure loss, so that the overall loop pressure drop is
] 2
APchw = APahu + APevappdS[. chw (4.3.1)
[chw,desJ
where APahu is the static pressure drop associated with the air handlers, mchw is the
chilled water flow rate, and AP,.p,des is a design pressure drop for the chiller
evaporator at a chilled water flow rate of mchwdes.
The chilled water loop pressure drop also depends upon the number of chillers in
operation. For identical parallel chillers, the chilled water flow is divided equally
between the chillers. In this case, the design flow rate utilized in equation (4.3.1) is
simply the design value for an individual chiller multiplied by the number operating.
104
The design pressure drop for the parallel chillers is equal to the pressure drop for an
Equating the chilled water loop pressure drop to the pump pressure rise and solving
for the total flow rate gives the following relation.
[mp,max,des p,max,des
where Yp is the relative pump.speed, APp maxdcs is the maximum pump pressure
developed at zero flow, and mp,ma,des the maximum flow at zero pressure rise. For
fixed-speed pumps, the relative speed in the above equation is equal to unity.
For a given mass flow rate and pressure rise, the overall pump power requirement
for the chilled water loop is
minch w AP chw
P p =(4.3.3)
pip P chw
where phw is the density of the chilled water and 11p is the overall efficiency of the
pump and motor determined with a correlation of the form given by equation (3.2.8).
4.4 Summary
An effectiveness model analogous to that presented for cooling towers in Chapter 3
has been presented for cooling coils. A simple method was also developed for
estimating the performance of cooling coils having both wet and dry portions. The
105
effectiveness relationships given in this chapter were for counterflow operation. Most
cooling coils use multi-pass crossflow geometries. However, if the number of coil
rows is greater than about four, then the performance of a crossflow coil approaches
recommended and was utilized throughout this study. However, standard effectiveness
relationships for other geometries could also be applied using the definitions for Ntu
Models were also presented for the air handlers and chilled water pumps. Again, it
is important to note that quadratic functions work well in correlating the power
Chapter 5
Methodologies for Optimal Control
of Systems without Storage
The optimal control problem associated with a central chilled water system may be
thought of as having a two-level hierarchical structure. The first level involves local
loop control in response to prescribed setpoints. An example of a first level control
variable would be the compressor speed for a variable-speed chiller. The second level
controls are independent variables that-may be adjusted to minimize the operating costs,
while still satisfying the load requirements. In the previous example, the chilled water
supply temperature is a second level variable that may be adjusted independently.
The dynamics of the first level (local loop) controls must be considered in order to
the determination of the optimal second level control setpoints. In this study, local loop
control is not considered and the first level (local loop) control is considered to be
entirely dependent upon the second level setpoints.
Optimal control of a system involves minimizing the total power consumption of the
chillers, cooling tower fans, condenser water pumps, chilled water pumps, and the air
handling fans at each instant of time with respect to the independent continuous and
discrete control while maintaining the desired zone conditions and ensuring that the
control variables are within acceptable bounds. Discrete control variables are not
continuously adjustable, but have discrete settings, such as the number of operating
chillers, cooling tower cells, condenser water pumps, and chilled water pumps and the
relative speeds for multi-speed fans or pumps. Independent continuous control
107
variables might include the chilled water and supply air set temperatures, relative water
flow rates to the chillers (evaporators and condensers), cooling tower cells, and cooling
In this chapter, two methodologies are presented for determining optimal values of
the independent control variables that minimize the instantaneous cost of operating
Information concerning the cost of operation of individual components and the manner
in which the components are interconnected are used to perform the optimization in an
efficient manner. Each component may also have constraints associated with its
operation. The modular nature of this program is similar to that of the widely used
TRNSYS [1984] simulation program. However, TRNSYS has no capability for
performing control optimization and could not be utilized for this study.
There are three intended uses for the component-based optimization program in this
study:
complete set of equations to be solved for the entire system is dictated by the manner in
which the components are interconnected together.
fn, Mn, Un
xl
Jn
fl, M 1 , Ul
J2
Yl
X2 Y2
f 2 , M 2 , U2
The optimization problem is formally stated as the minimization of the sum of the
operating costs of each component, Ji, with respect to all discrete and continuous
controls or
Minimize
n
J(f,M,u) = XJi(xi, yi, fi, Mi, ui (5.1.1)
i=l
110
i operating cost
g = vector of equality constraints
Typical input and output stream variables for chilled water systems are temperature
and mass flow rate. The uncontrolled variables are measurable quantities that may not
be controlled, but that affect the component outputs and/or costs, such as ambient dry
111
chiller may be adequately represented as a quadratic function of the load and the
temperature difference between leaving condenser and evaporator water temperatures.
The other energy consuming components in a chilled water system are pumps and fans.
quadratic function of its control variable through either a second-order Taylor series
in a general form as a quadratic function of its continuous control and/or output stream
variables or
+ %Tyi + ri (5.1.4)
Ji= uTAiui + yiTBiYi + yiTCiui + pITui
where Ai, Bi , and Ci are coefficient matrices, pi and qi are vectors, and ri is a scalar
constant. The coefficients of this cost function may depend upon the component
operating modes (discrete controls) and uncontrolled variables.
The optimization problem is simplified if the output stream variables for each
component are linear functions of the input stream and continuous control variables or
where Oi and Oi are coefficient matrices and . is a coefficient vector that may depend
upon the discrete control and uncontrolled variables. The inputs to component i are
outputs from other components, so that the solution for all output stream variables is of
the form
113-
y(f, M, u) = ou + (5.1.6)
where the coefficient matrix 0 and vector depend upon the coefficients for the
operating costs. With individual component costs and outputs represented by equations
J(f,M,u) = u Au + b u + c (5.1.7)
where,
A= A + 0 [B+C]
b= p +0 T[2 BT +q]+CT4
= r + 1B + qj c
B1
A2 C=l C2
B =[B2
Anj Bn C
114
Pl q]
P2 1 q q2
p LI r=r
The first-order condition for a minimizng or maximing point requires that the
Jacobian of the cost function be equal to zero. The Jacobian is a vector containing the
partial derivatives of the cost function with respect to each of the control variables. For
~r ~ ~ . o.,T
=u(A + A) + b =0 (5.1.8)
u -[A + A b (5.1.9)
In general, the cost functions that arise with chilled water systems are globally
convex, so that a single global minimum exists. However, it is relatively simple to
determine convexity of a-quadratic equation. In order to determine whether u*
represents a minimum, maximum, or saddle point, it necessary to evaluate second
derivatives. The second-order condition for a minimum requires that the Hessian of
the cost function be positive semi-definite. The Hessian is a matrix containing partial
derivatives of the transpose of the Jacobian with respect to all control variables. For the
cost function of equation (5.1.7), the Hessian is simply
115
T T
u(A+A)u 0 (5.1.11)
for all u not equal to zero. Simple methods exist for determining the positive semi-
Some component outputs depend non-linearly upon controls or input variables and
some component costs are only quadratic locally, so that an iterative technique is
required to determine the optimal control values. At each iteration, an overall quadratic
for the system expressed as equation (5.1.7) is forfed from individual quadratic
relationships for each component (eq. (5.1.4)) and a linearization of the output
The Jacobian of the outputs with respect to control variables is determined numerically
However, for points that are "far away" from the minimum, this may give a point that
has a greater cost than the last iteration. A common procedure, that is utilized in this
study, is to perform a one-dimensional search between the previous iteration and the
point defined by equation (5.1.9). At the ith iteration, a new estimate of the optimal
control point is
where u' is from equation (5.1.9) and the step length, s, is determined by minimizing
J(u i ' l + s(u' - ui'l)) with respect to s.
The optimal step length is approximated with polynomial interpolation. The costs at
117
step lengths of zero, one-half, and one are used to construct a quadratic function for the
cost as a function of the step length. The optimal value of s is estimated as the
minimum of this quadratic function, constrained between zero and one. In some cases,
the polynomial may be a poor approximation to the real function and the estimated
optimal step length may result in a cost greater than that associated with a step length of
zero. Under this circumstance, the interpolation is repeated with the last computed
optimal step length becoming the new step length of unity.
It is necessary to iteratively solve for the outputs of each component at each iteration
of the optimization procedure with the most recent controls. A simple method that is
successively fed as inputs to connecting components until the values are not changing
significantly. However, this method can be extremely inefficient for solving systems
of equations, even if they are linear. The solution efficiency is important because the
equations must be solved at each iteration of the optimization procedure and a high
independent iteration variables. The Jacobian contains the partial derivatives of each of
the residual equations with respect to the independent variables and must be determined
118
numerically.
Gi = y(x i ) = xi (5.1.15)
i+1 i G
x x - a i-i (5.1.16)
(G-G )/(x =x)
5.1.3 Constraints
For constraints that are linear with respect to the control variables, the constraint
equations may be written in the form
coefficient vector.
A common method for solving optimization problems with linear constraints is the
method of Lagrange multipliers. This method involves redefining the cost function so
that at the minimum, the constraint function is automatically satisfied. The modified
cost function, termed the Lagrangian, is given as
T
J(u,,X) =-J(u) + X g(u) (5.1.18)
involves minimizing the Lagrangian with respect to both u and X. The first-order
[[ + T2!]= (5.1.19)
120
- -g(u)
0(5.1.20)
For the quadratic cost function and linear constraints of equations (5.1.7) and (5.1.17),
u= [A]+
A ] (5.1.21)
A A) 0 TII (A +A T . (5.1.22)
Nonlinear constraints are handled through linearization and the use of Lagrange
multipliers. A fist-order Taylor series expansion for the constraints about the last
[g
g(u)= g(uo) + -(U-Uo) (5.1.23)
The above equation may be written in the form of equation (5.1.17) with
at any point except the solution. More importantly, during the determination of the
optimal step length, the Lagrangian does not provide a good measure of the degree to
which the constraints are violated. To alleviate this problem, the optimal step length is
computed using a cost function that is the sum of the original cost function and a
quadratic penalty function.
T
J(u) = J(u) + g(u) g(u) (5.1.26)
At the ith iteration, a new estimate of the optimal control point is found with equation
(5.1.14), with u' determined from equations (5.1.21) and (5.1.22) and the step length,
Inequality Constraints
The only inequality constraints considered in this study are simple bounds on the
control variables. These become linear equality constraints when violated and are
handled with Lagrange multipliers. In order to determ e the optimal control points
subject to inequality constraints, the optimal control values are first determined at each
iteration assuming that no inequality constraints are violated. If some control bounds
are exceeded, then linear equality constraints representing these limits are added and the
122
optimal controls are recomputed. Additional constraints are added if violated and the
process is repeated until the number of constraints is not changing or equals the number
of control variables. The constrained control values represent the next iterates in the
overall nonlinear optimization. It is not possible to solve a problem in which the
number of constraints exceeds the number of control variables. In this situation, some
of the constraints are not satisfied.
10) Determine a constrained optimum with equations (5.1.21) and (5.1.22) and go
to step 8.
11) If the change in cost from the last iteration is greater than a specified tolerance,
then go to step 1.
The complete optimization algorithm is implemented in'a computer program that can
simulate the optimal operation of a system through time (Braun [1988]). The system is
described through input data that specifies the components, their parameters, and their
interconnections in a manner similar to that for the TRNSYS [1984] simulation
program. At each simulation timestep, data for the uncontrolled variables (e.g.,
weather, schedules) are read and the constrained nonlinear optimization of the
continuous control variables is performed for each feasible combination of discrete
controls with the combination giving the minimum being the optimal control. Not all
possible combinations of discrete controls are feasible. For instance, the operation of
more than one condenser or chilled water pump might be non-optimal under all
conditions when only one chiller is on, so that these combinations would not be worth
considering. In the implementation of the optimization algorithm for this study, the
feasible combinations of discrete modes are specified as input data. In the event that the
optimization algorithm were implemented for on-line optimal control, then a better
approach for determining the optimal discrete control modes at each time interval would
be to order the feasible combinations of modes and only allow a single change (up or
down) between combinations within the list.
The complete mathematical description of a specific optimization problem depends
upon the choice of the independent controls and the constraints imposed upon the
system. Generally the supply air temperature for each air handler is considered to be an
124
independent (adjustable) control variable. In this case, the local loop controller varies
the air and water flow through the cooling coil in order to maintain that setpoint, along
with the desired temperature in the zone. However, in terms of the optimization
algorithm, it is more straightforward to consider the relative air and water flow rates to
the cooling coil as control variables, with an equality constraint that forces the zone
temperature to be maintained. One advantage of this formulation is that the power
consumption of the air handler may be represented as a quadratic function of the speed
in a simple manner. It is also easier to handle bounds on the fan speed as compared
with the supply air setpoint, since the fan speed has a natural upper and lower bound,
while physical constraints on the setpoint vary according to the coil entering air and
water conditions and design.
the previous section could be used for on-line optimal control of chilled water systems.
However, in order to calibrate the models for a specific plant, measurements would be
required for outputs and power consumptions for each component in the system. Also,
depending upon the number of control variables, the computational requirements may
be restrictive. An alternative approach for near-optimal control described in this section
involves correlating the overall system power consumption with a single function that
allows for a rapid determination of optimal control variables and requires measurements
of only total power over a range of conditions.
individual components can be extended to the system as a whole. In the vicinity of any
125
optimal control point, the system power consumption may be approximated with a
quadratic function of the continuous control variables according to equation (5.1.7).
However, the quadratic relationship changes with changes in the operating modes (i.e.
discrete controls) and uncontrolled variables. It will be shown that a quadratic function
also correlates power consumption in terms of the uncontrolled variables over a wide
range of conditions, so that the following cost function may be applied for determining
optimal control points.
T T T f oT Tn
where A, C, and, E are coefficient matrices, b and d are coefficient vectors, and g is a
scalar. The empirical coefficients of the above cost function depend upon the operating
modes, so that it is necessary to determine these constants for feasible combinations of
discrete control modes. Once again, many mode combinations may be unfeasible or
clearly non-optimal under all conditions and therefore need not be considered. Some
advantage may also be taken of the symmetry in the quadratic terms of equation
(5.2.1). Both A and C may be expressed as symmetric matrices, so that only the upper
(or lower) triangular coefficients need be detenined.
u =k+Kf (5.2.2)
where,
1 -1%
k =--A b
K=--A E
f Tf [+ Tf + '
(5.2.3)
where,
E=KTK+EK+C
a -- 2KAk + Kb + Ek + d
I:-kT~k + kT
b k + g
and only if the Hessian of the cost function is a positive-definite matrix or in the case of
equation (5.2.1), if A is positive definite. If this condition holds and if the system
power consumption correlates with equation (5.2.1), then equation (5.2.2) dictates that
127
the optimal continuous control variables vary as a near linear function of the
(5.2.3). The costs for each combination are compared in order to identify the
minimum. Simple bounds on the continuous control variables may be handled
as
2 Nu(N 1) 2 Nf(Nf- 1)
Ncoef= N2- 2u - + N U + Nf + 2 + Nf + NfNU+ 1 (5.2.4)
techniques directly to measured total power consumption. Since the cost function is
linear with respect to the empirical coefficients, linear regression techniques may be
utilized. A set of experiments could be performed on the system over the expected
range of operating conditions. In some cases, the quadratic cost function may only be
an accurate index near the optimal control points, so that it would be necessary to repeat
the experiments in the vicinity of the control defined by equation (5.2.2). Possibly, the
(Ljung [1983]).
128
Another approach for estimating coefficients of the empirical system model would
models for the individual components, data over a limited range of conditions would be
sufficient to calibrate the coefficients of the models. The use of the component-based
optimization algorithm as a simulation tool would ensure a good fit near the optimal
control points.
Rather than fitting empirical coefficients of the system cost function of equation
(5.2.1), the coefficients of the optimal control equation (5.2.2) and the minimum cost
optimal control results. At a given set of conditions, optimal values of the continuous
The disadvantage of this approach is that there is no direct way to handle constraints on
the controls.
both the control variables for which the optimization is to be performed and the
uncontrolled variables that effect the system performance through time. Using the
ambient wet bulb temperature. Additional secondary uncontrolled variables that could
be important if varied over a wide range would be the individual zone latent to sensible
load ratios and the ratios of individual sensible zone loads to the total sensible loads for
all zones.
1) VaOpaber-Saeed Tower Fans: Opete al1 tower cells at identical fan speeds.
The only tower control variable is fan-speed which is equivalent to air flow
2) Multi-Speed Tower Fans: Increment lowest tower fans first when adding tower
directly coupled to the sequencing of chillers, to give peak pump efficiencies for
each possible combination of operating chillers. Multiple variable-speed pumps
4) Chillers: Multiple chillers should have identical chilled water set temperatures
and the evaporator and condenser water flows for multiple chillers should be
divided according to the chillers relative cooling capacities. The independent
chiller control variables are a single chilled water temperature and the number of
chillers operating.
5) Air Handlers: All parallel air handlers should have identical supply air setpoint
temperatures. As a result, only a single setpoint control variable applies to all
air handlers.
Using these general results, a reduced set of independent control variables are: 1)
supply air set temperature, 2) chilled water set temperature, 3) relative tower air flow,
4) relative condenser water flow, and 5) the number of operating chillers.
The supply air and chilled water setpoints are continuously adjustable control
variables. However, since the chilled water flow requirements are dependent upon
these controls, there may be discrete changes in power consumption associated with
varying these controls, ff there are discrete control changes in the pump operation. For
the same total flow rate, the overall pumping efficiency changes with the number of
operating pumps. However, this has a relatively small effect upon the overall power
consumption, so that the discontinuity may be neglected in fitting the overall cost
function to changes in the control variables.
For variable-speed cooling tower fans and condenser water pumps, the relative
tower air and condenser water flows are continuous control variables. Analogous to
the chilled water flow, the overall condenser pumping efficiency changes with the
number of operating pumps, so that there may be a discontinuity in the power
131
consumption associated with continuous changes in the overall relative condenser water
flow. This discontinuity may also be neglected in fitting the overall cost function to
the number of chillers operating. A chiller mode defines which of the available chillers
only four continuous control variables for each of the feasible chiller modes. The
chiller mode giving the minimum overall power consumption represents the optimum.
In order for a chiller mode to be feasible, it must be possible to operate the specified
chillers safely within their capacity and surge limits. In practice, abrupt changes in the
chiller modes should also be avoided. Large chillers should not be cycled on or off,
except when the savings in associated costs with the change is significant.
For fixed-speed cooling tower fans and condenser water pumps, there are only
discrete possibilities for the relative flows. One method of handling these variables is
multiple cooling tower cells with multiple fan speeds, the number of possible
combinations may be large. A simpler approach, that works well in this case, is to treat
the relative flows as continuous control variables and to select the discrete relative flow
that is closest to that determined with the continuous optimization. At least three
relative flows (discrete flow modes) are necessary for each chiller mode in order to fit
the quadratic cost function. The number of possible sequencing modes for fixed-speed
pumps is generally much more limited than that for cooling tower fans, with at most
two or three possibilities for each chiller mode. In fact, with many current designs,
individual pumps are physically coupled with chillers and it is impossible to operate
greater or fewer pumps than the number of chillers operating. Thus, it is generally best
132
to treat the control of fixed-speed condenser water pumps with a set of discrete control
possibilities, rather than using a continuous control approximation.
The methodology for near-optimal control of a chilled water system may be
summarized as follows.
1) Change the chiller operating mode if at the limits of chiller operation (surge or
capacity).
2) For the current set of conditions (load and wet bulb), estimate the feasible
modes of operation that would avoid limits on the chiller and condenser pump
operation.
3) For the current operating mode, determine optimal values of the continuous
controls with equation (5.2.2).
4) Determine a constrained optimum, if controls exceed their bounds.
5) Repeat steps 3 and 4 for each feasible operating mode.
6) Change the operating mode if the optimal cost associated with the new mode is
significantly less than that associated with the current mode.
7) Change the values of the continuous control variables. When treating multiple-
speed fan control with a continuous variable, use the discrete control closest to
the optimal continuous value.
If the linear optimal control equation (5.2.2) is directly fit to optimal control results,
then there is no direct way of handling the constraints. A simple solution is to constrain
the individual control variables as necessary and neglect the effects of the constraints on
the optimal values of the other controls and the minimum cost function. The variables
of primary concern with regard to constraints are the chilled water and supply air set
temperatures. These controls must be bounded for proper comfort and safe operation
133
of the equipment. On the other hand, the cooling tower fans and condenser water
pumps should be sized so that the system performs efficiently at design loads and
constraints on control of this equipment should only occur under extreme conditions.
There is a strong coupling between optimal values of the chilled water and supply
air temperature, so that decoupling these variables in evaluating constraints is generally
not justified. However, when either control is operating at a bound, optimization
results indicate that the optimal value of the other "free" control is approximately
bounded at a value that depends only upon the ambient wet bulb temperature. The
optimal value of this "free" control (either chilled water or supply air setpoint) may be
estimated at the load at which the other control reaches its limit. Coupling between
optimal values of the chilled water and condenser water loop controls is not as strong,
so that interactions between constraints on these variables may be neglected.
5.3 Comparisons
Braun [1987] correlated the power consumption of the Dallas/Fort Worth airport
chiller, condenser pumps, and cooling tower fans with the quadratic cost function given
by equation (5.2.1) and showed good agreement. Since the chilled water loop control
was not considered, the chilled water setpoint was treated as a known uncontrolled
variable. The discrete control variables associated with the four tower cells with two-
speed fans and the three condenser pumps were treated as continuous control variables.
The optimal control determined by the near optimal equation (5.2.2) also agreed well
with that determined using a non-linear optimization applied to a detailed simulation of
the system.
In order to evaluate results of the system-based methodology for a complete system
that includes the air handlers, the component-based optimization was applied to an
example system, as described in Chapter 6. Coefficients of the optimal control and
134
minimum system cost function were fit to results of the component-based optimization
over a range of conditions. Figures 5.2 - 5.5 show comparisons between the controls
loads, for a relatively low and high ambient wet bulb temperature (60 F and 80 F).
In Figures 5.2 and 5.3, optimal values of the chilled water and supply air
temperatures are compared. The near-optimal control equation provides a good fit to
the optimization results for all conditions considered. The chilled water temperature
was constrained between 38 F and 55 F, while the supply air setpoint was allowed to
float freely. Figures 5.2 and 5.3 show that for the conditions where the chilled water
temperature is constrained, the optimal supply air temperature is also nearly bounded at
60
55
High Wet Bulb (80 F)
E- 50
40 Optimal
- Near-Optimal
35, - , - , • , •
*
65
cc '~60
Low WeWetBBulb((80FF
wo" 55
- Near-Optimal
45 , ,
0.0 0.2 0.4 0.6 0.8 1.0
Relative Chilled Water Load
Optimal relative cooling tower air and condenser water flow rates are compared in
Figures 5.4 and 5.5. Although the optimal controls are not exactly linear functions of
the load, the linear control equation provides an adequate fit. The differences in these
controls result in insignificant differences in overall system power consumption, since
as shown in Chapter 6, the optimum is extremely flat with respect to these variables.
The nonlinearity of the condenser loop controls is partly due to the constraints imposed
upon the chilled water set temperature. However, this effect is not very significant.
136
Figures 5.4 and 5.5 also suggest that the optimal condenser loop control is not very
sensitive to the ambient wet bulb temperature. However, the cooling tower considered
is representative of that at D/FW airport and operates at high effectiveness. For a lower
effectiveness tower, the sensitivity of the control to ambient wet bulb is greater.
0.8- * Optimal
- Near-Optimal
0.7- B
OWN
High Wet Bulb (80
0.6
cc
0.5-
(60F)
0
0.4-
0.31 0 w 5 w 0 w 0 v I v 1.
1.0
U Optimal
- Near-Optimal
.2 U
7. 0.8
High Wet Bulb (80 F)
- 0.6
.
0.2- - , -
8
*Optimal
- Near-Optimal
7
5.4. Summary
Two methodologies have been presented for determining optimal control points of
chilled water systems. A component-based non-linear optimization algorithm was
Chapter 6
Applications to Systems without Storage
discrete control variables considered in this chapter include the number of operating
chillers, cooling tower cells, condenser water pumps, and chilled water pumps and the
141
relative speeds for multi-speed fans or pumps. The independent continuous control
variables considered include the chilled water and supply air set temperatures, relative
water flow rates to multiple chillers (both evaporators and condensers) and multiple
cooling tower cells, and the speeds for variable-speed cooling tower fans and chilled
In addition to the independent optimization control variables, there are also local
loop (dependent) controls associated with the chillers, air handlers, and chilled water
pumps. All local loop controls are assumed to be ideal, such that their dynamics are not
considered. Each chiller is considered to be controlled such that the specified chilled
water set temperature is maintained. The air handler local loop control involves control
of both the coil water flow and fan air flow in order to maintain the prescribed supply
air setpoint and zonetemperature. The total requirement for the chilled water flow to
the air handlers is dictated by the chilled water and supply air setpoints and the load.
Control of the chilled water pumps is implemented through a local loop control that
maintains a constant pressure difference between the main supply and return pipes for
the air handlers. The setpoint for this pressure difference is chosen to ensure adequate
distribution of flow to all air handlers and is not considered an optimization variable.
The optimal control variables change through time in response to uncontrolled
variables. The uncontrolled variables are measurable quantities that may not be
controlled, but that affect the component outputs and/or costs, such as the load and
ambient dry and wet bulb temperature.
The results presented in this study are primarily representative of the Dallas/Fort
Worth (DIFW) airport cooling system. However, characteristics of the systems studied
by Lau [1985] and Hackner [1985] are also utilized. Table 6.1 summarizes the
throughout are representative of the D/FW system, so that components studied by Lau
142
and Hackner are scaled for D/FW conditions. Appendix C gives the parameter values
associated with the individual component models. The ventilation air flow is taken to
be 10% of the design air flow for the air handler under all circumstances. The use of an
economizer or "free" cooling cycles were not considered in this study. These modes of
operation would occur at low ambient wet bulb temperatures, such that the cooling
loads could be met without operating the chillers.
The base system makes use of the component characteristics associated with the
first choice for each component type in Table 6.1. For the most part, this corresponds
to the current D/FW system. However, detailed data were not available for the
performance of the air handlers. As a result, the air handler performance characteristics
from manufacturers data used by Hackner [1985] were utilized in the base system.
Except where otherwise noted, all pumps and fans are considered to be operated with
variable-speed motors. Although combinations of components from Table 6.1 other
than that associated with the base system were considered, results are only presented
for the base system, except when alternative systems yield different conclusions.
Many of the results presented in this chapter are for steady-state conditions and are
given as a function of load at ambient dry and wet bulb temperatures of 80 F and 70 F.
For the purpose of performing simulations over a cooling season, optimal costs of
operation are correlated in terms of the load and ambient conditions using the form
given by equation (5.2.3). The result is integrated over time in response to time-
varying load and weather conditions. In those cases where cooling season results are
presented, weather data for May through October in Dallas, Texas and Miami Florida
were utilized. Two different constant internal gains to the zones were considered: one-
third and one-half of the maximum chiller cooling capacity. Only conditions where the
ambient wet bulb temperature was greater than 60 F were considered in the
143
Table 6.1
Summary of System Component Characteristics
simplify the optimization process, in that these independent control variables may be
reduced to dependent variables. They are also useful to plant engineers as "rules of
144
thumb" for improved control practices. In this section, both component modeling and
optimization techniques are used to identify control guidelines associated with multiple
components arranged in parallel.
temperature, which is, in turn, affected by both the condenser water and cooling tower
air flow rates. Increasing either of these flows reduces the chiller power requirement,
Braun [1987] and Nugent [1988] have shown that for variable-speed fans, the
minimum power consumption results from operating all cooling tower cells under all
conditions. The power consumption of the fans depends upon the cube of the fan
speed. Thus, for the same total air flow, operating more cells in parallel allows for
lower individual fan speeds and overall fan power consumption. An additional benefit
associated with full-cell operation is lower water pressure drops across the spray
nozzles, which results in lower pumping power requirements. However, at very low
pressure drops, inadequate spray distribution may adversely affect the thermal
performance of the cooling tower. Another economic consideration is the greater water
adjustable variable-speed fans. In this case, it is not optimal to operate all tower cells
under all conditions. The optimal number of cells operating and individual fan speeds
will depend upon the system characteristics and ambient conditions. However, simple
relationships exist for the best sequencing of cooling tower fans as capacity is added or
removed. When additional tower capacity is required, then in almost all practical cases,
145
the tower fan operating at the lowest speed (including fans that are off) should be
increased first. Similarly, for removing tower capacity, the highest fan speeds are the
first to be reduced.
These guidelines are derived from evaluating the incremental power changes
associated with fan sequencing. For two-speed fans, the incremental power increase
associated with adding a low-speed fan is less than that for increasing one to high speed
if the following condition is satisfied.
3 3
Yt,low < (1- tlow)(6.2.1)
or
where Ytlow is the relative fan speed at low speed. If the low speed is less than 79% of
the the high fan speed, then the incremental power increase is less for adding a low-
speed as opposed to a high-speed fan. In addition, if the low speed is greater than 50%
of the high speed, then the incremental increase in air flow is greater (and therefore
better thermal performance) for adding the low-speed fan. Most commonly, the low
speed of a two-speed cooling tower fan is between one-half and three-quarters of full
speed. In this case, tower cells should be brought on-line at low speed before any
operating cells are set to high speed. Similarly, the fan speeds should be reduced to
low speed before any cells are brought off-line.
For three-speed fans, the sequencing logic is not as obvious. However, for the
special case where low speed is greater than or equal to one-third of full speed and the
146
difference between the high and intermediate speeds is equal to the difference between
the intermediate and low, then the best strategy is to increment the lowest fan speeds
first when adding tower capacity and decrement the highest fan speeds when removing
capacity. Typical three-speed combinations that satisfy this criteria are 1) one-third,
two-thirds, and full speed or 2) one-half, three-quarters, and full speed.
Another issue related to control of multiple cooling tower cells having multiple-
speed fans concerns the distribution of water flow to the individual cells. Typically, the
water flow is divided equally among the operating cells. However, the overall thermal
performance of the cooling tower is best when the flow is divided such that the ratio of
water to air flow rates is identical for all cooling tower cells. In comparing equal flow
rates to equal flow rate ratios, at worst, a five percent difference between the heat
transfer effectivenesses for a combination of two tower cells, one operating a one-half
and the other at full speed was found. Depending upon the conditions, these
differences generally result in less than a one percent change in the chiller power.
These differences should also be contrasted with the lower water pressure drop across
the spray nozzles (lower pumping power) associated with equally divided flow. In
addition, the performance differences are smaller for greater than two-cell operation,
when a majority of cells are operating at the same speed. Overall, equal water flow
distribution between cooling tower cells is near-optimal.
combinations considered in this study, controlling for identical set temperatures was
additional control variables are the relative chilled and condenser water flow rates.
147
In general, the relative condenser water flows to each chiller should be controlled to
give identical leaving condenser water temperatures for all chillers. This condition
approximately corresponds to relative condenser flow rates equal to the relative loads
on the chillers. Figure 6.1 shows results for four different sets of two chillers operated
7.0
0 6.0
OWN
D
5.5
0
5.0
4.5 -15 I
Il
*
"
I
1 "
I
a
*
• I
I -
"
I
I-
-
"
-10 -5 0 5 10 15
Condenser Return Water AT (F)
in parallel. The overall chiller coefficient of performance (COP) is plotted versus the
difference between the condenser water return temperatures for equal loadings on the
chillers. For the identical D/FW variable-speed chillers, the optimal temperature
difference is almost exactly zero. This was found to be the case for all identical chillers
considered in this study. For the non-identical chillers of Figure 6.1, equal leaving
148
condenser water temperatures result in chiller performance that is close to the optimum.
Even for the D/FW variable and fixed-speed chiller combination, which have very
different performance characteristics, the penalty associated with the use of identical
condenser leaving water temperatures is insignificant. Similar results were obtained for
unequal loadings on the chillers.
For given chilled water return and supply temperatures, the relative chilled water
flow to each chiller is equal to its relative loading. Consider the problem of determining
the optimal relative loadings for Nh chillers in parallel. The relative condenser water
flows are assumed to be controlled to give identical return water temperatures. The
optimization problem is one of minimizing the total chiller power consumption or
Nch
Pch = X
i=1
Pchi (6.2.3)
Nch
fL = 1 (6.2.4)
i=l
By forming the Lagrangian and applying the first-order condition for a minimum or
maximum, it can be shown that the point of minimum or maximum overall power
occurs where the derivatives of the individual chiller power consumptions with respect
to their relative loadings are equal.
149
This condition, along with the constraint of equation (6.2.4) are sufficient to determine
the relative loadings. For identical chillers, these equations are satisfied for all chillers
loaded equally or
1
fL, for i = ltoNch (6.2.6)
N~ tNch
For chillers with different cooling capacities, but identical part-load characteristics, the
constrained optimality conditions are satisfied when each chiller is loaded according to
the ratio of its capacity to the sum total capacity of all operating chillers. For the it
chiller,
fLi Qcap,i
Nch for i = 1to Nch (6.2.7)
XQcap,
i-=1
(
at loads that are about 40 - 60% of a chillers cooling capacity. In this case, and with
loads greater than about 50% of cooling capacity, the control defined by equations
(6.2.6) and (6.2.7) results in a minimum power consumption.
Figure 6.2 shows the effect of the relative loading on chiller COP for different sets
of identical chillers loaded at approximately 70% of their overall capacities. Three of
the chillers have maximum COP's when evenly loaded, while the fourth (D/FW fixed-
speed) obtains a minimum at that point. The part-load characteristic of the D/FW fixed-
speed chiller is unusual in that the maximum COP occurs at its capacity (see Chapter 2).
This chiller was retrofit with a different refrigerant and drive motor which caused its
capacity to be derated from 8700 tons to 5500 tons. As a result, the evaporators and
condensers are oversized for its current capacity.
7.0
Q 6.0-
D/FW Fixed-Speed Chillers
Figure 6.2. Effect of Relative Loading for Two Identical Parallel Chillers
151
The effect of loading on non-identical chillers was also investigated. The minimum
power consumption was realized with near-even loading for all combinations
considered, except for those involving the D/FW fixed-speed chiller. The best strategy
for this particular fixed-speed chiller in combination with other chillers is to load it as
relatively small as compared with the optimal solution, even when the loading on the
various cooling coils differs significantly. As a result, the number of control variables
in the optimization process may be reduced by one less than the number of air handlers.
152
Figure 6.3 shows a comparison between individual and identical setpoint control
values for a system with two identical air handlers. The system coefficient of
performance (COP) associated with optimal control is plotted versus the relative loading
on one air handler. The difference between individual and identical setpoint control is
not significant over the practical range of relative loadings. This result is most easily
explained by considering the limits on the relative loadings. For the case of equal
loadings on the air handlers, the optimal control setpoints are equal for identical air
handlers. In the other extreme, where all of the load is applied to one air handler, then
the supply air temperature of the unloaded air handler has no importance, since its
power consumption is zero. Between the two extremes, the error associated with
assuming identical setpoints is relatively small. This result also extends to many air
handlers in parallel and to non-identical designs.
4.5.
4.4
m4IdenicaSupply Air Set Temperatures
4.3
4.2
4.1
4.0
S 3.9
3.9 Optimal
CL 3.8
3.7
3.6
3.5 • -
0.5 0.6 0.7 0.8 0.9
Relative Load on First Air Handler
Figure 6.3. Comparison of Optimal System Performance for Individual
Supply Air Setpoints with that for Identical Values
153
fah,i
Yahu,i fahudes, ahu (6.2.8)
where yahu is the ratio of the total required air flow to the total design air flow, fahu,i is
the ratio of air flow for the ith air handler to the total air flow for all air handlers, and
fmh,,,i is the ratio of design air flow for the idh air handler to the total design air flow
for all air handlers. If all air handlers have identical supply air and zone air temperature
setpoints, then f., is also equal to ratio the sensible loading on the zones supplied by
ith air handler to the total sensible zone loads, f In this case, the total air handler
power consumption for variable-speed fans is
3 Nahu F fs,
e
Pahu = ahu XPPahudes,i
i 1~
=
f-s,1
Lahudes,i
1(6.2.9)
where Pahu,des,i1i the power consumption for the ith air handler at it's design air flow.
As a result, all the air handlers may be combined into one air handler having the
sum total area, water flow, air flow, and loading, with the power computed according
154
condition. The optimal control for sequencing fixed-speed pumps depends upon the
load and the ambient wet bulb temperature and should not be directly coupled to the
155
chiller sequencing.
2 '"1 i i"Slm
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
Relative Chilled Water Load
Figure 6.4. Effect of Chiller and Pump Sequencing on Optimal System Performance
fixed-speed pumps. For a given set of operating chillers and tower cells (i.e. given
of operating chillers. Since the system pressure drop characteristics change when
chillers are added or removed, then the sequencing of variable-speed pumps should be
In this section, the sensitivity of the optimal system performance to the uncontrolled
For a given system in which the relative loadings on each zone are relatively
constant, the optimal control variables are primarily a function of the total sensible and
latent gains to the zones, along with the ambient dry and wet bulb temperatures. Figure
6.5 shows the effect of these uncontrolled variables on the total operating costs. For a
given load and wet bulb temperature, the effect of the ambient dry bulb temperature is
insignificant, since air enthalpies depend primarily upon wet bulb temperatures and the
differences. Typically, the zone latent gains are on the order of 15-25% of the total
zone gains. In this range, Figure 6.5 shows that the effect of changes in latent gains
has a relatively small effect upon the system performance for given total load.
Consequently, results for overall system performance and optimal control may be
correlated in terms of only the ambient wet bulb temperature and total chilled water
load. In the event that the load distribution between zones changes significantly
11
• ~Base Cs
10 Ambient Dry Bulb = 80 F
Ambient Wet Bulb = 70 F
9 . Latent-Sensible Ratio = 0.20
O 8
%.Low Ambient Wet Bulb (55 F)
n 6
, 5
4
+ High Ambient Dry Bulb (95 F)
3 x High Zone Latent-Sensible Ratio (0.25)
2 1 1 " =M I
I"M "I
and condenser pump speed. Contours of constant power consumption are plotted
158
versus fan and pump speeds. Near the optimum, power consumption is not sensitive
to either of these control variables, but increases more quickly away from the optimum.
The rate of increase in power consumption is particularly large at low condenser pump
speeds. There is a minimum pump speed necessary to overcome the static head
associated with the height of the water discharge in the cooling tower above the takeup
from the sump. As the pump speed approaches this value, the condenser flow
approaches zero and the chiller power increases dramatically. It is generally better to
have too high rather than too low a pump speed. The "flatness" near the optimum
indicates that it is not necessary for an extremely accurate determination of the optimal
control.
0.7
7Minimum
x
W 0.6
0.5
:.2
0.4
oom
C1 0.3 10% > Minimum
air set temperatures on the load and wet bulb. Both the optimal chilled water and
supply air temperatures decrease with increasing load for a fixed wet bulb temperature.
This behavior occurs because the rate of change in air handler fan power with respect to
load changes is larger than that for the chiller at the optimal control points. As the wet
bulb temperature increases for a fixed load, the optimal set temperatures also increase.
There are two pnmary reasons for this result: 1) For a given load, the chiller power
depends primarily upon the temperature difference between the leaving condenser and
chilled water temperatures. The condenser temperature and chiller power consumption
increase with increasng wet bulb temperature and the optimal chilled water temperature
increases in order to reduce the temperature difference across the chiller. 2) In the
absence of humidity control, optimal supply air and chilled water temperatures increase
with decreasing sensible zone loads for constant total chiller load. In addition, the
sensible to total load ratio decreases with increasing wet bulb temperature for constant
total load.
Figure 6.7 shows the sensitivity of the system power consumption to the chilled
water and supply air set temperatures for a given load and wet bulb temperature.
Within about 3 degrees F of the optimum, the power consumption is within 1% of the
minimum. Outside of this range, the sensitivity to the setpoints increases significantly.
The penalty associated with operation away from the optimum is greater in the direction
of smaller differences between the supply air and chilled water setpoints. As this
temperature difference is reduced, the required flow of chilled water to the coil
increases and the chilled water pumping power is larger. For a given chilled water or
characteristics of the coil. Below this limit, the required water flow and pumping
power would approach infinity if the pump output were not conswained. It is generally.
better to have too large rather than too small a temperatur difference between the
65
10% >
25% >
60
Cu
I
s
55-
sm
50
A .9U
-F.., - U - U - U -
35 40 45 50 55
Chilled Water Supply Temperature (F)
Figure 6.7. Power Contours for Chilled Water and Supply Air Temperatures
ambient wet bulb. One strategy for controlling these flow rates is to maintain constant
temperature differences between the cooling tower outlet and the ambient wet bulb
(approach) and between the cooling tower inlet and outlet (range), regardless of the
load and wet bulb. In some applications, humidity along with temperature is controlled
within the zones. In this section, the performance of some of these control strategies is
compared with that of an optimally controlled system.
7.
2 1
The overall savings over a cooling season for optimal control depends upon the
time variation of the load. If the cooling load were relatively constant, then fixed values
of temperature setpoints, approach, and range could be chosen to give near-optimal
performance. Table 6.2 summarizes cooling season operating costs for the
conventional control strategies relative to optimal control for two different load
characteristics in both Dallas and Miami. The low and high internal gains are
approximately one-third and one-half of the maximum cooling requirement of the
system. In Dallas, the maximum total operating cost difference of approximately 17%
occurs for fixed setpoints, approach, and range with low internal gains. The difference
is reduced to 7% for the high internal gains, since the system operates at a more
uniform load near the design conditions. There is approximately twice the penalty
163
associated with the use of fixed chilled water and supply air setpoints as compared with
fixed tower approach and range for low internal gains, but the penalties are equal for
the high internal gains. The results for the Miami climate are similar to those for Dallas.
Table 6.2
Cooling Season Results for Optimal vs. Conventional Control
In a variable air volume system, it is generally possible to adjust the chilled water
temperature, supply air temperature, and air flow rate in order to maintain both
temperature and humidity. In constraining the room humidity, the number of "free"
control variables in the optimization is reduced by one. For a given chilled water
temperature, there is at most one combination of the supply air temperature, air flow
rate, and water flow rate that will maintain both the room temperature and humidity.
ASHRAE [1981] defines acceptable bounds on the room temperature and humidity
for human comfort. For a zone that is being cooled, the equipment operating costs are
minimized when the zone temperature is at the upper bound of the comfort region.
However, operation at the humidity upper limit does not minimize costs. Figure 6.9
compares costs and humidities associated with fixed and free floating zone humidities
as a function of the load. Over the range of loads for this system, the free floating
humidity operates within the comfort zone at lower costs and humidities with the largest
164
differences occurring at the high loads. Operation at the upper humidity bound results
in lower latent loads, but the addition of thishumidity control constraint requires higher
supply air temperatures than that associated with free floating humidities. In turn, the
higher supply air temperature results in greater air handler power consumption. In
effect, the addition of any constraint reduces the number of free control variables by
one and results in operation at a higher cost. In the determination of optimal control
points, the humidity should be allowed to float freely, unless it fals outside the bounds
of human comfort.
6 o.o14
"fixed" humidity 0.013
-0.012
which its capacity is modulated. As noted earlier, the Dallas/Fort Worth primary chiller
was originally operated at a constant speed and the cooling capacity was modulated
with the use of pre-rotation inlet vanes and outlet diffuser vanes. The chiller was
subsequently retrofit with a variable-speed electric motor and the vane control was
disconnected.
compared with vane control. In this study, the performance of the D/FW chiller was
measured for both types of capacity modulation for nearly identical conditions as
described in Chapter 2. Figures 2.13 and 2.14 showed the performance for the
variable and fixed-speed control, while Figure 2.15 gave a direct comparison of their
performance. Figure 6.10 gives a comparison between the overall optimal system
associated with the variable-speed control is significantly better. However, the power
requirements are similar at conditions associated with the peak loads. This is expected,
since at this condition, the vanes are wide open and the speed under variable-speed
control approaches that of the fixed-speed operation.
166
7.
6
o D/FW Variable-Speed Chiller
E 5
Part of the improvement with variable-speed chiller control may result from the
unique characteristics of the D/FW chiller. The capacity of this chiller was derated, so
that the evaporator and condenser are oversized at the current capacity relative to the
original design capacity. As a result, the performance is more sensitive to penalties
associated with part-load operation of the compressor than to heat exchange
improvements that occur with lower loads.
The most common design for cooling towers utilizes multiple tower cells in parallel
that share a common sump. Each tower cell has a fan that may have one, two, or
possibly three operating speeds. Although multiple cells, having multiple fan settings
offers a wide flexibility in the control, the use of variable-speed tower fans can provide
and variable-speed tower fans as a function of load for a given wet bulb. There are
four tower cells for this system. All cells operate for the variable-speed fan results
under all conditions, while cells are isolated for discrete fan control results when their
fans are off. The discrete changes in the control of the multi-speed fans causes the
discontinuities in the slopes of the curves in Figure 6.11. The flexibility in the control
with one or two-speed fans is most limited at low loads. Below about 70% of full-load
conditions, the difference between one-speed and variable-speed fans becomes very
significant. With two-speed fans, the differences are on the order of 3 - 5% over the
entire range.
7,
Variable-Speed Fans
6
Two-Speed Fans
5"
3.
0.2 0.4 0.6 0.8 1.0
then it is oversized for part-load conditions and the system will have higher operating
168
costs than with a variable-speed pump having the same design capacity. The use of a
smaller fixed-speed pump for low load conditions improves the flexibility in control
and can reduce the overall power consumption. Figure 6.12 gives the optimal system
performance for variable-speed and fixed-speed pumps applied to both the condenser
and chilled water flow loops. The "large" fixed-speed pumps are sized for design
conditions, while the "small" pump has one-half the flow capacity of the large. Below
about 60% of full-load conditions, the use of variable-speed pumps shows a very
significant improvement over single fixed-speed pumps. With the addition of "small"
7.
6 Variable-Speed Pumps
~.) 5
S3
o,-
0.2 0.4 0.6 0.8 1.0
Relative Chilled Water Load
Figure 6.12. Comparison of Variable and Fixed-Speed Pumps
The overall savings over a cooling season associated with the use of variable-speed
equipment depends upon the time variation of the load. Table 6.3 summarizes cooling
169
season operating costs for the fixed-speed equipment relative to all variable-speed for
low and high internal gains in both Dallas and Miami. Included in this table are results
for fixed-speed air handler fans with variable-pitch blades to control the air flow. The
results do-not differ significantly between the Dallas and Miami climates. The largest
differences for all situations are seen incomparing the fixed-speed to the variable-speed
chillers (13% to 18%). The use of individual fixed-speed pumps or fans in the system
carries a penalty of about 3 - 10% depending upon the load characteristics. Overall, the
use of all fixed-speed equipment results in operating costs that are 26 - 43% higher than
for all variable-speed drives.
Table 6.3
Cooling Season Results for Variable vs. Fixed-Speed Equipment
arrangement, the chilled and condenser water flows are in parallel, in that these streams
enter the same chiller. For the series-counterflow configuration, the streams enter at
opposing chillers.
For the same total flow, multiple chillers operate more efficiently in series rather
than in parallel. Figure 6.13 gives a comparison between the chiller coefficients of
performance for parallel and series arrangements of two identical chillers as a function
of the relative loading on the first chiller for identical entering temperatures and flow
rates. Both series arrangements require significantly less power than the parallel
chillers, the best arrangement being series counterflow. For the same total flow, the
heat transfer coefficients are higher and leaving water temperature differences are lower
for the individual chillers in series orientations than for parallel.
8.5
8Series-Counterflow
8.0-
~7.5
Iowian"
=" 7.0
oParallel Chillers
6.5
Although the chillers perform more efficiently in series rather than parallel, there are
significant increases in water stream pressure drops across both the evaporators and
condensers for the series arrangement. For two identical chillers, the ratio of the
pressure drop across either the evaporator or condenser for a series arrangement as
compared with that for parallel is approximately 8-to-1 for identical flow rates. The
difference in the overall system performance for series versus parallel depends upon the
magnitude of evaporator and condenser pressure drops as compared with the other
pressure losses in the chilled and condenser water loops. Figure 6.14 compares the
optimal system performance for series and parallel chillers as a function of load for a
given wet bulb. For this system, the tradeoffs between improved chiller performance
and increased pressure drops balance such that overall system performance is similar
for both configurations. Reducing the evaporator and condenser pressure drops by
20% did not have a significant effect upon this result.
172
5.0-
4.5"Sees-CounterbowChillers
4.0
Parallel Chiller
' 3.5
3.0
2.5
2.0' - • " ,
0.4 0.5 0.6 0.7 0.8 0.9 1.0
Relative Chilled Water Load
Figure 6.14. Optimal System Performance for Series and Parallel Chillers
6.6 Summary
Optimization techniques were applied to the control of chilled water systems. The
important uncontrolled variables that effect system performance and optimal control
variable settings were identified as the total chilled water load and ambient wet bulb
temperature. Additional secondary uncontrolled variables that could be important if
varied over a wide range would be the individual zone latent to sensible load ratios and
the ratios of individual sensible zone loads to the total sensible loads for all zones.
Control guidelines that reduce the number of independent control variables and
simplify the optimization were also identified. These general results were utilized in
systems without storage. The guidelines are also useful to plant engineers for
173
2) Multi-Speed Tower Fans: Increment lowest tower fans first when adding tower
directly coupled to the sequencing of chillers, to give peak pump efficiencies for
each possible combination of operating chillers. Multiple variable-speed pumps
4) Chiller: Multiple chillers should have identical chilled water set temperatures
and the evaporator and condenser water flows for multiple chillers should be
divided according to the chillers relative cooling capacities.
5) Air Handlers: All parallel air handlers should have identical supply air setpoint
temperatures.
No general simplifications could be found for the optimal sequencing of chillers and
to determine the optimal points for adding or removing chillers. In general, it is not
optimal to sequence fixed-speed pumps with chillers.
Additional results and conclusions concerning both control and design under
1) Depending upon the load characteristics, fixed values of chilled water and
supply air setpoints and cooling tower approach and range resulted in
approximately 7 - 19% greater cooling season operating costs than that for
to float freely, unless it falls outside the bounds of human comfort. In effect,
the addition of any constraint reduces the number of free control variables by
one and results in operation at a higher cost.
3) Depending upon the load characteristics, the cooling season operating costs
were approximately 26 - 43% greater for all fixed-speed equipment as compared
with all variable-speed in Dallas and Miami. The most significant difference
was attributed to the chiller.
than parallel. However, the increase in pumping power requirements for series
chillers offsets the chiller improvements and the overall performance for the two
configurations is similar.
175
Chapter 7
Methodologies for Optimal Control of Systems with Storage
There are several advantages associated with the use of thermal storage in large
cooling systems. From a design point of view, the use of storage can increase the peak
cooling capacity of a system, thereby reducing the size and initial cost of chillers,
cooling towers, and air handlers. For existing systems, introducing storage can allow
applications of storage are for 1) shifting the load from times of high to times of low
utility electric rates and 2) limiting the peak system power consumption in the presence
of utility demand charges.
There are two types of storage that are presently being installed for chilled water
systems: water and ice. Typically, both storage types are arranged in parallel between
the chillers and the air handlers in the chilled water loop. These systems generally
operate in different modes that allow for charging (cool-down) and discharging of
storage and for direct cooling in which the storage is isolated and the chillers meet the
load directly. In an ice system, a chiller produces ice during the charging mode and a
brine solution is pumped between the storage and air handlers during discharge. A
Cold water from the chillers is fed to the bottom of storage during the charging cycle.
During discharge, this chilled water is pumped to the air handlers and warm return
water from the air handlers is added to the top of storage. The stratification of storage
is produced by the cold supply to the bottom and warm return to the top.
fully-stratified chilled water storage system. This methodology is utilized as tool for
176
Minimize
subject to
dx
-= (x, u, f) (7.1.2)
x(t) C X
u(t) C U
177
where J is the total cost of the process between the times to and tf, L is the
associated with the state and control variables. The instantaneous operating cost at any
time is the product of the total system power consumption and the cost of electricity or
continuous representation or sequences of values for the discrete case. This solution
and 7.1.2 that evolved from the calculus of variations was introduced by Pontryagin
[1962]. The minimum principle provides a set of necessary conditions which the
optimal control, u*, must satisfy if it exists. One limitation of this approach is that
constraints on the state and control variables are often difficult to handle. It is also
possible to determine a local minimum as a solution.
state and control variables in a straightforward manner. This method also guarantees a
global minimum The major limitations are associated with large memory and
computation requirements when many state variables are involved. In this study,
dynamic programming is utilized to study the optimal control of chilled water systems
with storage.
178
of the problem with respect to both time and state variables. The discrete-time
representation of the optimization problem becomes
Minimize
K
= XL(x(k), u(k), f(k),k) (7.1.4)
k=O
subject to
x(k) e X
u(k) e U
The integral cost function has been converted to a sum of individual stage costs from 0
K
Jm= XL (x(k), u (k), f(k), k)
k--m
with the initial state at stage m equal to that associated with the original optimal
control, x(m) = x *(m). Then the solution to the original optimal control problem
This fairly simple principle leads to an iterative functional equation for determining
cost for the present stage, m and the minimum cost in going to the end of the process
from the resulting state at the next stage, m+l.
Equation 7.1.6 may be used in a numerical scheme for determining optimal control.
The state variables are discretized within the constraint set establishing a network of
paths between successive stages and possible states. Figure 7.1 shows a possible
network for a single state variable with specified initial and final conditions for 5
stages. For clarity in Figure 7.1, the change in state from one stage to the next is
limited to one state increment. The problem is solved for all stages by beginning at the
end of the process and working towards the beginning. For the network of Figure 7.1,
an initial cost-to-go of zero is assumed at the final state, x(K), K = 5. At stage K-i,
180
the minimum cost-to-go for each possible state is simply the stage cost associated with
the path from that state to the final state. At any stage k, the minimum cost-to-go for
any state, according to equation 7.1.6, is associated with the path having the smallest
sum of the stage cost and cost-to-go of the next state. At the Oth stage, the minimum
cost- to-go is the cost associated with the optimal path through the network.
Xmax
x(O)
Xmm L.I
k=0 =5
Stage
There are many possible controls that will take the system from any state i to any
other state j, one stage ahead. The minimization of equation 7.1.6 dictates that the stage
cost be a minimum associated with optimal control between the two states. For any
path from i to j, this stage cost optimization problem may be formally stated as
Minimize
subject to
Depending upon the number of stages and state variables, the computational and
memory requirements associated with the use of dynamic programming may be
number stages times the number of state variable increments together raised to a power
equal to the number state variables. For a problem with 10 stages having 3 state
variables, each discretized with 10 increments, the number of network nodes would be
at each iteration in the vicinity of the last computed optimal solution. Initially, the
network is coarse and encompasses the total range of acceptable state variables. At
each iteration, an optimal path is determined through the network and the size of the
network is reduced for the next iteration. At each iteration and at each stage, the
number of state variables is constant and bounds on the network are defined equidistant
above and below the states along the last computed optimal path. In the limit, the size
Figure 7.2 shows a schematic of a chilled water storage oriented in parallel between
the chillers and air handler equipment. There are five primary modes of operation
182 •
1) Direct Cooling: The cooling load is met completely by chilled water supplied
from the chillers and there is no flow to or from storage. All independent control
2) Partial Charge: Chilled water from the chillers is provided to meet the load and
to lower the temperature of storage. In this mode, the chilled water supply
4) Partial Discharge: Chilled water is supplied from both the chillers and storage to
183
meet the load. In this mode, the return water from the load is controlled to be
constant. All other independent control variables are "free".
4) Full Charge: There is no cooling load requirement (i.e. air handlers are off) and
the chillers are operating solely to charge the storage. The chilled water supply
5) Full Discharge: The cooling load is met completely by water supplied from
storage and the chillers and condenser loop equipment is off. The return water
from the load is controlled to be a constant.
The use of constant inlet temperatures to storage during charging and discharging is
common practice. The storage capacity is proportional to the difference between the
load water return temperature for discharging and the chilled water supply temperature
for charging. However, there are practical limits on these temperatures. The limit on
the chilled water supply in order to avoid freezing problems in the evaporator is
and load water return temperature for discharging were chosen as 40 and 60 F,
respectively.
Neglecting heat gains from the environment, conduction, and mixing at the inlets,
aT =
-
aT
-(7.1.9)
at ax
where T is temperature, t is time, x is position measured from the inlet, and v is the
velocity of the fluid. The fully-stratified model represented by equation (7.1.9) has a
known analytic solution. Given an initial temperature distribution at time t, the solution
of this hyperbolic partial differential equation for the distribution at time t + At and
position x is
where Ti(r) is the inlet temperature (i.e. chiller supply or load return) at any time r. For
fluid that was within the storage at time t, equation (7.1.10) states that the distribution
at time t + At is a copy of the original distribution moved by an amount vAt. For fluid
that enters the storage during the time period, equation (7.1.11) shows that the
The use of constant inlet temperatures to the storage during charging and
discharging simplifies the storage model and the overall optimization problem. In this
case, the storage has two distinct temperature zones and the state of storage is
represented by the position of the front between cold fluid supplied from the chillers
and warm fluid returned from the load. Ifx represents the distance of this front above
the bottom of storage relative to the height of storage, then it follows from equation
('7.1.11) that a discrete state equation for storage at stage k may be expressed as
185
where v is the velocity of the fluid relative to the tank height measured in the x
direction. The relative position of the front may also be thought of as the relative
storage charge. At a value of 0, the storage is empty in terms of its ability to provide
cooling to the load. At a value of 1, the storage is fully charged. In terms of the rate at
Os
V (Tcharge _ Tdischarg) Caps (7.1.13)
where s is the energy discharge (positive) or charge (negative) rate of storage, Tchge
is the chilled water supply temperature in the charging mode (40 F), Tdishn is the
load water return temperature in the discharging mode (60 F), and Caps is the thermal
capacitance of storage. From an energy balance, the required chiller cooling rate is
is discretized between 0 and 1. Between any two states on the dynamic programming
network, it is necessary to determine the optimal stage cost. For a given mode of
operation at a given stage, the minimum power consumption of the equipment depends
primarily upon the total cooling load, ambient wet bulb temperature, and the storage
charging or discharging rate. The load and wet bulb are considered to be known
computed from equations (7.1.12) and (7.1.13) using the known states. Rather than
perform the stage optimization within the dynamic programming algorithm, minimum
power requirements from steady-state optimizations were correlated for each mode of
operation using the form of equation (5.2.3). The optimal stage cost between any two
states, for stage k is
where R is the cost of electricity and Pi* is the minimum average power consumption
between states i and j evaluated at a load, wet bulb, and storage discharge (or charge)
rate of QL, Twb, and 0,if
There are limits associated with operation of the equipment that must be considered.
If the required chiller cooling rate is greater than the capacity of the chiller, then it is not
possible to make the transition between the two states and an infinite stage cost is
assigned. There is also a minimum cooling rate required to avoid compressor surge.
However, in the full discharge mode, the chillers are off and the required chiller cooling
is zero. If storage is being discharged and the required cooling rate determ ed with
equation (7.1.14) is less than the minimum chiller cooling rate, then the chiller is
assumed to operate a portion of the time during that stage at its minimum capacity in the
partial discharge mode and is considered to be off the rest of the time with the system in
the full discharge mode. The average rate of power consumption for the stage is then
where Qch,min is the minimum chiller cooling capacity and Aton is the time period for
operation of chillers at their minimum capacity determined as
Similarly, if the system is operating in the charge (partial or full) or direct mode and the
required chiller load is less than the minimum allowable, then the chillers are considered
to operate at their minimum capacity for the time necessary to meet the total load
requirement and are off the remainder of the stage.
There are also considered to be additional limits associated with minimum and
maximum rates.of charging and discharging storage. The maximum charging or
discharging rate is limited by the maximum chilled water pump flow and the supply
temperatures to storage during charging or discharging. The minimum rates are due to
limits on the control valves that distribute the flow between storage and the air handlers
during charging and between storage and the chillers during discharging. If the
required charging or discharging rate is greater than the maximum, then it is not
possible to make the transition between the two states on the dynamic programming
network and an infinite stage cost is assigned. If the required charging or discharging
rate is less than the minimum rate, then the system is assumed to operate a period of the
time during that stage in the partial charging or discharging mode at the minimum rate
and the remainder in the direct cooling mode.
magnitude of cost savings associated with the use of optimally controlled storage in the
strategies work "well enough"? In order to study these issues, one-day (24-hour)
simulations were performed for known load distributions and ambient wet bulb
conditions. Only steady-periodic solutions were considered so that the final state
equalled the initial state. Both the load and wet bulb were varied according to a
sinusoidal function as
where f(t) is the value of the uncontrolled variable (load or wet bulb) at time t and fmin
and fmax are the minimum and maximum values that occur at 6 a.m. and 6 p.m.,
respectively. The effects of different minimum and maximum values were considered.
In some cases, the cooling system was assumed to be off at night (6 p.m. to 6 a.m.),
such that the load during this time was zero. The system considered was the base
system described in Chapter 6.
In the absence of time-of-day electric utility rates and if the peak load is less than the
capacity of the chiller, then the optimal control strategy for all 24 hour load and wet
bulb patterns considered was to operate in the direct mode for all times. In other
words, storage provided no benefit for this system. For no night-time load, thermal
storage provided at most a 5% reduction in the overall power consumption for the
system and loads considered.
One of the reasons that storage provides little or no operating cost savings when
189
there are no special time-of-day utilities rates is due to the fact that this system operates
most efficiently in the direct mode. For charging of storage, the chillers operate at a
fixed chilled water supply, while for discharging, the return temperature from the load
is constant. In the direct mode, these variables are optimized as a function of the load
and wet bulb temperature. Undoubtably, storage would provide some additional
benefit if the chilled water supply and load water return temperatures during charging
and discharging were also "free" control variables in the optimization. However, this
Figures 7.3 and 7.4 show how the optimal charge level of storage and chiller
loading vary over a day for different storage sizes with time-of-day electric rates. The
cost of electricity is assumed to be $0.15/kW-hr for the hours from 8 a.m. to 8 p.m.
and $0.05/kW-hr for the rest of the day. The ambient wet bulb varied between 65 and
75 F, while the minimum and maximum loads were 1500 and 4000 tons. The storage
charge level is defined as the fraction of the tank that is filled with chilled water at 40 F,
with the remainder of the tank at 60 F. Two different storage sizes were considered for
these results: 1500 and 2000 ton-hours/deg. F. The no storage results shown in Figure
7.4 represent the total building load and would be the load on the chiller if there were
no storage or if the system always operated in the direct cooling mode.
In the presence of time-of-day rates, Figure 7.3 shows that the optimal charge level
reaches a maximum at the time at which the rates increase and realizes a minimum when
the rates decrease. The smaller storage capacity is insufficient to meet the load during
the period of high utility rates. As a result, the storage is completely discharged when
the utility rates are lowered. Between the hours of about 8 a.m. to 1 p.m., this system
operates primarily in the direct cooling mode and the storage remains near its full
charge. Since the storage is undersized, then the chiller must operate sometime during
190
the high rate period. The optimal time to operate the chiller is during the first part of the
high rate period when the ambient wet bulb is lower and the system performs more
efficiently.
no
I-
0Oo
'U
Figu re 7.3. Optimal Storage Charge Level for One Day with
Time-of-Day Electric Rates
The system with the larger storage has excess capacity and operates in the full
discharge mode for the entire high rate period and reaches a minimum charge level
when the rates are reduced. As evident from Figure 7.4, there is no load on the chillers
(i.e. chillers off) for this system between 8 a.m. and 8 p.m. After the rates are
reduced, both the small and large storage systems operate in the direct cooling mode for
a period of time before charging the storage. During the charging period, the chillers
are loaded at a fairly constant rate until the maximum storage charge is reached at the
time when the rates increase.
191
60001
* No Storage
0O0
5000- O 1500 ton-hours/deg. F
E3 2000 ton-hours/deg. F
04000
o* 3000
0
iiIIII
2000
1000
0
I-- ~ - - ! - - - ~ - - -. - - 0509yV
Pm IMAJ4
bo I"
yPa" 60 ~-
ypra-., ri - r
1 2 3 4 5 6 7 8 9 101112131415161718192021222324
From the results of dynamic programming applied to systems with storage, some
1) Begin the period of high rates with the storage fully charged.
2) During high-rate hours, the system should operate in the full discharge mode for a
system should operate in the direct mode for the remaining time. The direct mode
on-peak operation should occur during times when the wet bulb temperature is
192
3) During low-rate hours, the chillers may operate at their capacity to charge storage
during the time when the wet bulb temperature is lowest for near-optimal
performance. For the remainder of the time, the system should operate in the
Table 7.1 compares the cost of operation associated with optimal control, the near-
optimal control strategy outlined above and a non-optimal, more conventional control
strategy. In the non-optimal strategy, the system operates in the full discharge mode
from the start of the on-peak utility rate period. If the storage is completely discharged
during this period, then the system operates in the direct mode to meet the load until the
electric rates decrease. The storage is then charged at full capacity until fully charged.
The advantage of this control strategy is that it does not require forecasting of the
cooling loads or ambient wet bulb. The disadvantage is that the chillers may operate at
high cooling loads during times when the wet bulb is higher.
Table 7.1 shows that the near-optimal control strategy results in operating costs that
are close to those for optimal control. However, depending upon the storage capacity
in relation to the load, the non-optimal strategy gives costs that can be significantly
greater. All three controls give similar results at large storage capacities, since the
system always operates in the discharge mode when rates are high and operates in the
charging mode at full capacity for a significant portion of the time when rates are low.
The conventional strategy also works well when the variation in the wet bulb
temperature is small.
193
the Dallas/Fort Worth airport are utilized to develop a time-series model for forecasting
cooling loads.
also random components in the loads resulting from the stochastic nature of the weather
and the way that the buildings and the distribution system are utilized. Therefore, a
194
The procedure for fitting a combined model to a data set is a three step process. A
purely deterministic model is defined through regression to the data. Next, a stochastic
time-series model is fit to the residual errors associated with the deterministic model. In
this step, the proper time-series model order is defined. Finally, parameters of the
combined deterministic plus stochastic model are estimated simultaneously.
For on-line optimal control of the equipment, it would be advantageous to utilize
on-line recursive parameter estimation for the forecasting model. Recursive parameter
estimation is most easily carried out with linear models (i.e. the model is linear in the
unknown parameters). For that reason, this study was restricted to linear time-series
models termed AR (auto-regressive) models. A good background to material presented
in this section is found in Pandit and Wu [1983].
n
Xt= OiXt- + et (7.2.1)
i=1
where Xt is the current (zero mean) output of the system, Xt~ is the output i steps
previous, 4)i is i parameter of the model, and et can be thought of either as a random
195
input to the system or the one-step ahead prediction error of the model. At time t-1, the
best forecast of an observation for time t is obtained by evaluating the expected value of
the right-hand side. The expected value of a random variable with a zero mean is zero,
thus the one-step ahead prediction for the model defined by equation (7.2.1) at time t-1
is
n
Xt = iXt-1(7.2.2)
i=1
From equations (7.2. 1) and (7.2.2), it should be evident that et is the error associated
with the one-step ahead forecast of the model. This is true for all time series models.
In order to estimate parameters of the model for a given set of data, the sum of the
squares of the one-step ahead prediction errors (e's) is minimized with respect to the
unknown O's using linear regression. For a given model, greater than one-step ahead
forecasts are determined with equation (7.2.2) applied recursively to known and
forecasted values.
A more general time-series model that utilizes both previous observations and errors
order to determine the coefficients of the model. Theoretically, an ARMA model can be
techniques may be utilized. This is especially important for load forecasting in the
context of on-line optimal control, when coefficients of the model are updated using
196
m m
P(t) = Yaj sin(jox) + I bj cos(jon) (7.2.3)
j=1 j=1
where o) is the frequency and the a's and b's are unknown coefficients that are fit with a
linear least squares method applied to the data.
A combined model can also be expressed in a linear form. The combined model for
a zero mean output, Yt, is the sum of the deterministic and stochastic models.
m m n
Yt = Xajsinjox) + X bjcos(jcot) + Oi Xt., + et (7.2.4)
j=1 j=1 i=l
But, by definition
= XYt"-
aj sin(joct) + X:bjcos(jot) (7.2.5)
j=1 j=1
m m n
where a 'j and b 'j are different coefficients than those appearing in equation (7.2.4).
197
All the empirical coefficients of equation (7.2.6) can be fit to data with linear least-
fitting process. Parameters of this model may also be fit using on-line recursive
Simple AR models given by equation (7.2.1) were fit with approximately three
days of cooling load data in March from the D/FW airport for a sampling interval of 1
hour. Results of this analysis are summarized in Table 7.2.
Table 7.2
AR Model Fit to March D/FW Data (1 hour sampling)
At first glance, it might appear that an AR(1) model is adequate for this data set. The
reduction in the root-mean sum of squares of the 1-step prediction errors is insignificant
when going from AR(1) to AR(2). However, the AR(4) model does show some
additional improvement. This behavior results from the large degree of randomness
198
exhibited in the data on a small time scale. A four-hour history is useful in overcoming
the short-term fluctuations and to incorporate the larger time scale variations in the data.
Comparisons of the one-step and five-step ahead predictions with the data are shown in
Figures 7.5 and 7.6. The AR(4) model does reasonably well for the one hour
prediction, but falters badly with five hour forecasts. Similar results were obtained
with an ARMA(3,2) model fit to this data.
3000
02
0
2000
I-
1000
0 ww
0 10 20 30 40 50 60 70 80
Time (hours)
o+
WI
2000 +
o
+ +
- Data
+ 5-hour Forecasts
V
0 -II
0 20 40 60 80
Time (hours)
trigonometric polynomial to the data. If a combined model is fit to the data then the
adequate model has 4 auto-regressive parameters and two periods (24 and 12 hours).
In this case, the root-mean square (rms) error of one-step ahead forecasts is 287. This
is a significantly improved model over the pure AR(4). The combined model does an
extremely good job of forecasting the cooling loads 1 hour ahead. In addition to the
improved 1-step predictions, the ability of the model to perform 5-hour forecasts is
vastly improved. Figure 7.7 shows comparisons between five-step ahead predictions
of the combined model with the March data. The rms of the errors for 5-step
predictions of the combined model is 398, as compared with 625 for the pure AR(4).
200
3000
02 4.
C+
- 2000-+
+2 44 4
10004.+4. 4. 4
+-Daa
+ 5-hour Forecasts
0I " I
0 20 40 60 80
Time (hours)
Even better long-term predictions can be realized by using a larger sampling interval
for the data. The model determined with a sampling interval of 2.5 hours gives
significantly better results for the long-term predictions (rms of 296 versus 398). The 1
hour sampling interval gives a model that utilizes only the most recent information
concerning the load. This occurs because the model is fit using the errors of the 1-step
ahead prediction and there is a large degree of randomness in the data at 1 hour
samples. The larger sampling period more appropriately captures the larger scale
variations in the data. The forecasts associated with a 5 hour sampling interval are
better still. It might be advantageous to have separate models for short and long-term
forecasting that utilize different sampling intervals.
A good test of the model determined with the March data is to compare it with
201
another data set. A comparison with October data gave good results for one-hour
forecasts, but the five-hour predictions were very poor. There is a seasonal effect that
alters the characteristics of the deterministic part of the data, The cooling requirement is
coupled closely to the ambient temperature. Generally, the peak cooling load occurs at
about the same time of the day as the maximum ambient temperature. During October,
this peak occurs later in the day than in March. In fitting a combined deterministic and
stochastic model to the October data, the adequate linear model was also found to be
AR(4) with a deterministic part having two periods. The accuracy of the forecasts was
similar to that for the model fit to the March data.
In an attempt to further improve the long-term forecasts of the model, the ambient
temperature was used as a deterministic input to the model. At the D/FW airport, the
cooling requirement is strongly coupled to the ambient conditions. However, since the
ambient temperature and cooling requirement are essentially in phase, there was little
improvement in the results with the additional information. In other words, the history
of the ambient temperature is almost completely reflected in the cooling load history.
It would be advantageous to use recursive on-line identification for this forecasting
model so that the parameters could be adjusted to account for changes that occur on a
seasonal basis, such as those discussed for the October and March data.. This can be
accomplished in two ways. First of all, the incoming measured data may be weighted
more heavily than past data (e.g. exponential weighting) such that the parameter
estimates more correctly reflect the current state of the system. Secondly, periodicities
that reflect seasonal changes in the climate may be included.
202
7.3 Summary
control of systems with stratified thermal storage. In the absence of time-varying utility
rates, thermal storage provided little or no operating cost savings as compared with no
storage for the systems considered. For systems with time-of-day utility rates, a simple
is that it provides a "true" solution to the optimization problem and can adapt to
power demands could be reduced by assigning large stage costs for "high" power
consumptions.
The near-optimal control strategy involves maximizing the operation of the system
in the full discharge mode whenever the utility rates are high and minimizing the
operation in the charge mode when the utility rates are low. If the storage capacity is
insufficient to meet the load during the high rate period, then the system operates in the
direct mode during the hours when the wet bulb is low. During the low rate period, the
storage is charged at the full capacity of the chiller during the hours of lowest wet bulb.
For the remainder of this period, the system operates in the direct mode. The advantage
of this near-optimal control strategy is that it is easily implemented and gives operating
costs similar to that for optimal control.
In order to apply either the optimal or near-optimal strategy for controlling storage,
it is necessary to forecast the total cooling requirements. Pure time-series and
combined deterministic plus time-series models were fit to cooling load data for the
DIFW airport. In all cases, the models worked well for making forecasts of one hour.
203
Chapter 8
Conclusions and Recommendations
In this study, general methodologies were developed for design and control of central
chilled water systems. These methodologies are in form of mathematical models,
optimization algorithms, and guidelines for design and control synthesized from results
of optimal control applied to chilled water systems. The computer programs developed
in this study are listed in a separate document (Braun [1988]). Specific conclusions
and recommendations concerning this work follow.
cooling capacity at a given power input or speed. Results of the model were compared
with measurements from the D/FW airport. The mechanistic model works well in
estimating both the power requirementand the speed associatedwith the onset of surge
for variable-speedcentrifugal chillers. Additional work is necessary to develop
mechanistic modelsfor analyzing the performance offixed-speed, variable-vane
controlled chillers.
Using results of the mechanistic model, a simpler empirical model for correlating
performance data was also identified. Chillerpower consumption correlatesas a
is that it provides a "true" solution to the optimization problem, including any nonlinear
constraints. Each of the components in the system is represented as a separate
subroutine with its own parameters, controls, inputs, and outputs. Models of
the components found in chilled water systems in order to solve the optimization
for on-line optimization, it is necessary to have detailed performance data for each of
the individual system components. Results of detailedoptimizations identified
simplificationsthat reduced the number of control variablesto five and uncontrolled
overall system cost function in terms of these variables. This cost function leads to a
set of linear control laws for the continuous control variables in terms the total chilled
water load and ambient wet bulb temperature. Separate control laws are required for
each feasible combination of discrete controls and the costs associated with each
applications, charts could be used to determine optimal control as a function of load and
wet bulb.
207
characteristicsof the system may change over time, so that it could be necessary to
in this study, peak power demands could be reduced by assigning large stage costs for
"high" power consumptions. Futurework should consider the best strategyfor
includingpeak demand charges in the optimization algorithm.
For systems with time-of-day utility rates, a simple strategyfor near-optimal
easily implemented and gives operating costs similar to thatfor optimal control.
Both the optimal and near-optimalstrategiesshould be adaptable to systems that
In order to apply either the optimal or near-optimal strategy for controlling storage,
combined deterministic plus time-series models were fit to cooling load data for the
208
D/FW airport. Pure time-series models work wellfor making forecasts of one hour.
simple enough so that its coefficients may befit with linear least-squaremethods.
More datais necessary to determine whether the model works well under all
In determining the optimal control of systems with storage, both the load and
ambient wet bulb temperature were assumed to be knowns. Future work should
Optimization techniques were applied to the control of chilled water systems. The
importantuncontrolledvariablesthat effect system performance and optimal control
variablesettings were identfied as the total chilled water load and ambient wet bulb
simplify the optimization were also identified. These general results were utilized to
develop near-optimal control strategies for chilled water systems with and without
storage. The guidelines are also useful to plant engineers for improved control
1) Variable-Speed Tower Fans: Operate all cooling tower cell fans at identicalfan
speeds.
Additional results and conclusions concerning both control and design under
chilled water systems. Depending upon the load characteristics, fixed values
of chilled water and supply air setpoints and cooling tower approach and range
the addition of any constraint reduces the number of free control variables by
one and results in operation at a higher cost.
characteristics, the cooling season operating costs were approximately 26- 43%
Appendix A
Refrigerant Property Data
Lgi
_" " Viseosit Correlation
Refrigerant viscosities, A, are in ibm/ft-hr and temperatures, T, are degrees
Fahrenheit.
Refrigerant a- fft/sec)
R-500 490
R-22 534
R-12 446
213
Appendix B
Method for Determining the Performance of
Partially Wet and Dry Cooling Coils
Water will begin to condense on the surface of a cooling coil at the point where
surface temperature equals the dewpoint of the entering air. The process of determining
the relative areas associated with the wet and dry portions of the coil is iterative. In
terms of the exit water temperature, the dry coil surface area and the flow stream
conditions at the point where condensation occurs are found by solving the flow stream
energy balance and rate equations for the dry section and setting the surface temperature
at the condensation point equal to the dewpoint point temperature, Tdp. The resulting
equation for the fraction of the total coil surface area that is dry is
where,
KNtUdry (1 - C) (B.2)
The effectivenesses for the wet and dry portions of the coil, eCwet and ady are
8 a~wt
- 1 - exp(- (1 - fdj,) Ntu weL( 1 - in))(B)
1 - in exp(- (1 - fdry)Ntuwet(1 - in))
214
An excellent initial estimate of the outlet temperature is the larger of the temperatures
obtained from the completely wet and dry analyses (i.e. fry = 0 and fdy = 1). As
shown in Figures 4.2 and 4.3, the all wet or dry assumption gives results that are close
to those of the partially wet and dry analysis. As a result, the above iterative process
where, the effective surface temperature in the wet coil section is the saturation
ha,o - ha,x
h ~ =hhai +1 - exp(- (1 - fdy)Ntuo) (B.8)
The air temperature and enthalpy at the point at which condensation occurs are
Appendix C
Component Data for Base System of Chapter 6
where,
X =Oe
o-des
S(T -.Thw)
ATdes
1 +n
where,
c =2.0
n = -0.63
Ntu i = klmW:::ek]
mk
a]k4
Ntuo = 3
I ma.des]
where,
k, = 2.25 k2 = -0.20
k3 = 1.70 k4 = -0.38
218
Press=urer s
2
Appmax = yAP pmaxdes
mp,max = yp mp,maxdes
219
where,
APp,maxdes = 100 psi
mp,maxdes = 10,000,000ibm/hr
PmL_ Efficiency
1p-= a 0 + a,1 -. a2 2+
where,
ao = 0.0
a1 = 2.93
a2 = -2.64
220
References
7. Braun, J.E., Mitchell, J.W., Klein, S.A., and Beckman, W.A., "Models for
Variable-Speed Centrifugal Chillers," ASHRAE Transactions, Vol.93, Part 1,
1987.
8. Braun, J.E., Mitchell, J.W., Klein, S.A., and Beckman, W.A., "Performance
and Control Characteristics of Large Central Cooling System," ASHRAE
Transactions, Vol. 93, Part 1, 1987.
10. Bullock, C.E. "Dynamic Simulation Models for Commercial Air Conditioning
and Heat Pump Systems," Proceedings of the Workshop on HVAC Controls
Modeling and Simulation, Georgia Institute of Technology, February 2-3, 1984
11. Carey, W.F. and Williamson, G.F., "Gas Cooling and Humidification: Design
of Packed Towers from Small-Scale Tests," Proceedings of the Institution of
Mechanical Engineers, Vol. 163, pp. 41-53, 1950.
14. Elmahdy, A.H. and Mitalas, G.P., "A Simple Model for Cooling and
Dehumidifying Coils for Use in Calculating the Energy Requirements of
Buildings," ASHRAE Transactions, Vol. 83, Part 2, p. 103, 1977.
15. Elmahdy, A.H. and Biggs, R.C., "Finned Tube Heat Exchanger Correlation of
Dry Surface Heat Transfer Data," ASHRAE Transactions, Vol. 85, Part 2, pp.
262-273, 1979.
16. Farris, D.R. and McDonald, T.E., "Adaptive Optimal Control - An Algorithm
for Direct Digital Control," ASHRAE Transactions, Part 1, 1980.
18. Gill, P.E., Murray W., and Wright, M.G, Practical Optimization, Academic
Press, London, 1981.
20. Hackner, R.J., Mitchell, J.W., and Beckman, W.A., "HVAC System and
Energy Use in Existing Buildings - Part I",ASHRAE Transactions, Paper KC-
84-09, 1984.
222
22. Hackner, R.J., Mitchell, J.W., and Beckman, W.A., "System Dynamics and
Energy Use," ASHRAE Journal, June, 1985.
23. Hittle, D.C., "BLAST - Building Loads Analysis and System Thermodynamics
Program, Version 3.0: User Manual, "Technical Report E-171, U.S. Army
Construction Engineering Research Laboratory, 1981.
24. Jaber, H. and Webb, R.L, "Design of Cooling Towers by the Effectiveness-
NTU Method," ASME Winter Annual Meeting, Boston, Massachusetts,
December, 1987.
26. Jakob, M., Heat Transfer. Vol.11, John Wiley & Sons, New-York, pp. 342-
345, 1957.
27. Johnson, G.A. "Optimization Techniques for a Centrifugal Chiller Plant Using
a Programmable Controller," ASHRAE Transactions, Vol. 91, Part 2, 1985.
30. Lau, A.S., Beckman, W.A., and Mitchell, J.W., "Development of Computer
Control Routines for a Large Chilled Water Plant", ASHRAE Transactions,
Vol. 91, Partl1, 1985.
32. Ljung, L. and Soderstrom, T., Theory and Practice of Recursive Identification,
MIT Press, Cambridge, MA.,1983.
33. Maclaine-cross, I.L., Banks, P.J., "A General Theory of Wet Surface Heat
Exchangers and its Application to Regenerative Cooling," ASME Journal of
Heat Transfer, Vol. 103, No. 3, pp. 579-585, 1981.
38. Myers, J.E. and Katz, "Boiling Coefficients Outside Horizontal Plain and
Finned Tubes, "Refrigeration Engineering, Vol. 60, No. 1, p. 56, January,
1952.
39. Nizet, J.L, Lecomte, J., and Litt, F.X., "Optimal Control Applied to Air
Conditioning in Buildings," ASHRAE Transactions, 1984.
42. Nugent, D.R., Klein, S.A., and Beckman, W.A., "Investigation of Control
Alternatives for a Steam Turbine Driven Chiller, ASHRAE Winter Annual
Meeting, Dallas, 1988
224
43. Pandit, S.M. and Wu, S.M., Time Series and System Analysis with
Applications. John Wiley, 1983.
46. Singh, M.G. and Titli, A., Systems: Decomposition. Optimization. and
Control, Permagon Press, 1978.
47. Stoecker, W.F. (editor), Proposed Procedures for Simulating the Performance
of Components and Systems for Energy Calculations, Second Edition, New
York, ASHRAE, 1971.
48. Sud, I., "Control Strategies for Minimum Energy Usage," ASHRAE
Transactions, Vol. 90, Part 2, 1984.
52. Treichler, W.W., "Variable Speed Pumps for Water Chillers, Water Coils, and
Other Heat Transfer Equipment," ASHRAE Transactions, Vol. 91, Part 1,
1985.
53. Webb, R.L, "A Unified Theoretical Treatment for Thermal Analysis of Cooling
Towers, Evaporative Condensers, and Fluid Coolers," ASHRAE Transactions,
Vol. 90, Part 2, 1984.
w
225
54. Wiesner, F.J. and Caswell, H.E., "How Refrigerant Properties Affect Impeller
Dimensions, "ASHRAE Journal, October, 1959.
56. Whillier A., "A Fresh Look at the Calculation of Performance of Cooling
Towers," ASHRAE Transactions, Vol. 82, Part 1, pp. 269-282, 1976.
57. White, F.M., Fluid Mechanics, McGraw-Hill, Second Edition, New York,
1986.
58. York, D.A. and Tucker, E.F., Editors, "DOE-2 Reference Manual (Version
2.1)," Los Alamos Scientific Laboratory, LA-7689-M, Los Alamos, 1980.
Programs for Modelling and
Optimizing the Performance
of Central Chilled Water Systems
1988
This document contains computer listings for algorithms that are described in the Ph.D.
thesis "Methodologies for the Design and Control of Central Cooling Plants",
by James E. Braun, University of Wisconsin - Madison, 1988
Table of Contents
-1.0-
cnlbf;tin I (Chillpr Pprf rmn~nep
C A FLASH GAS ECONOMIZER. THE INPUTS ARE FLOW STREAM CONDITIONS AND COOLING *
EXTERNAL EVAPCHILLER
DOUBLE PRECISION X(5),F(5),W(5,5),DIFF(5),TOL
COMMON /DATA/ PAR(10),XIN(7),OUT(19),ISTAGE, IECON, IREF
DATA TOL/I.E-05/,DIFF/5*0.001/,PI/3.1415/
C
PARAMETER(IREF=500, ISTAGE=2, IECON=2)
PARAMETER(CPW=I., DENS=8.3333)
PARAMETER(AEI=11300., ACI=14800., REO=3.1, RCO=3.1, DIAE=.75/12.,
DIAC=.75/12., NEPASS=3, NETUBE=3560, NCPASS=1, NCTUBE=3349,
C1=103., C2=1.1, NVERT=1, RPE=2.E-04, RPC=2.E-04, AX=1.53,
BETA=27.2, RIMP=1.1667, EFFREF=0.814, EFFMOT=0.91)
C
C PROGRAM DATA DEFINED WITHIN THE ABOVE PARAMETER STATEMENTS:
C
C IREF = REFRIGERANT TYPE (12, 22, 500, ETC)
C ISTAGE = NUMBER OF COMPRESSION STAGES (1 OR 2)
C IECON = 1 FOR NO ECONOMIZER, 2 FOR ECONOMIZER
C CPW = SPECIFIC HEAT OF WATER (BTU/LBM-F)
C DENS = DENSITY OF WATER (LBM/GAL)
C AEI = EFFECTIVE INSIDE SURFACE AREA OF EVAPORATOR TUBES (FT**2)
C ACI = EFFECTIVE INSIDE SURFACE AREA OF CONDENSOR TUBES (FT**2)
C REO = RATIO OF EFFECTIVE OUTSIDE EVAPORATOR TUBE SURFACE AREA
C INCLUDING FINS AND FIN EFFICIENCY TO INSIDE AREA
C RCO = RATIO OF EFFECTIVE OUTSIDE CONDENSER TUBE SURFACE AREA
-1.1-
ihrP~frruae
Chiller Perfnrmanep
IQ~rftin1
L~ I a a a a a%-&-& %-aa %-V
a a a a La a l%_lw_
t IV I I L
C
10 READ (10, *,END=100) QEVAPGPMCHWGPMCWTCHWSTCWR
C
C INPUT DATA IS:
C QEVAP = CHILLER EVAPORATOR LOAD (TONS)
C GPMCHW = CHILLED WATER FLOW RATE (GAL/MIN)
C GPMCW = CONDENSOR WATER FLOW RATE (GAL/MIN)
C TCHWS = CHILLED WATER SETPOINT (DEGREES F)
C TCWR =CONDENSOR WATER RETURN (DEGREES F)
- 1.2-
Section 1 Chiller Performance
C ** PRELIMINARIES **
C
C CALCULATE THE MASS FLOW RATE FROM THE GPM AND THE LOAD RETURN
C TEMPERATURE FROM THE CHILLER LOADING
C FLCHW = CHILLED WATER FLOW RATE (LBM/HR)
C
C GIVEN THE CHILLER LOAD AND WATER CONDITIONS, THE EQUATION SOLVER
C ITERATIVELY DETERMINES THE EVAPORATOR TEMPERATURE, TE, THROUGH THE
C USE OF THE SUBROUTINE EVAP. PARAMETERS, INPUTS, AND OUTPUTS ARE
C COMMUNICATED THROUGH THE COMMON BLOCK "DATA". HEI IS THE INSIDE
C EVAPORATOR HEAT TRANSFER COEFFICIENT (TURBULENT FLOW).
C
PAR(1) =AEI
PAR(2) =REO*AEI
HEI=1 .37* (NEPASS*GPMCHW/NETUBE)**0.8*DIAE**-1 .8
PAR(3) =HEI
PAR(4) =RPE
PAR (5) =CI
PAR(6)=C2
XIN (1)=FLCHW
XIN (2) =TCHWS
XIN (3) =TCHWR
XIN (4) =12000. *QEVAP
TE=TCHWS-5.
X ( 1) =TE
CALL SOLVER (I,DIFF, X,F, W,EVAP, TOL)
TE=X (1)
)
C
C ** COMPRESSOR AND CONDENSOR ANALYSIS **
C
C THE EQUATION SOLVER SOLVES THE SYSTEM OF EQUATIONS MODELING THE
- 1.3 -
3
I
Crj%19tn
l94:1|ull1N'uIta
Chillarr
i rI
r,m ....
1 IVJI Iialu
I
- 1.4 -
Cait;nn I -
C7~.LIII L
C hiller Pprfnrm
.a
A II
_nep
I
C
C COMPUTE THE CONDENSOR WATER SUPPLY TEMPERATURE (TCWS)
C
TCWS=TCWR-OUT (2) *12000 ./FLCW/CPW
WRITE(11,102) GPMCHW, GPMCW, TCHWSTCHWR, TCWSTCWR
IF(ISTAGE.EQ.1) THEN
WRITE(11,103) (OUT (I) ,1I=,16)
ELSE
WRITE (11,104) (OUT (I) ,I=l, 19)
END IF
GO TO 10
100 CONTINUE
STOP
- 1.5 -
Qao~nnI1 C~hillpr Pp rfnr .....
!.t,.tlj)ll I , a l£ l IV Illilll,
C *
C SOLVER THAT CALLS THIS ROUTINE IS SEARCHING FOR THE EVAPORATOR TEMPERATURE *
C (TE) THAT YIELDS NO DIFFERENCE BETWEEN THE CHILLER LOAD CALCULATED WITH A *
C *
AEI=PAR (1)
AEO=PAR (2)
HEI=PAR (3)
-1.6 -
.,p,-titin
.,,VUI
I-- Chiller
-hir
Perfnrminep
P .fnrminc. I
RPE=PAR (4)
C1=PAR (5)
C2=PAR (6)
TCHWS=XIN (2)
TCHWR=XIN (3)
QEVAP=XIN (4)
TE=X
C UAI IS THE CONDUCTANCE ASSOCIATED WITH THE WATER FLOW AND PIPE
C MATERIAL (PLUS FOULING FACTOR). UAE IS THE OVERALL EVAPORATOR
C CONDUCTANCE, INCLUDING THAT ASSOCIATED WITH THE REFRIGERANT BOILING
C HEAT TRANSFER COEFFICIENT (HEO). TFILM IS THE REFRIGERANT FILM
C TEMPERATURE AT THE SURFACE OF THE TUBE.
C
RETURN
END
-1.7-
C'~L!... 1 Ci~hllr ar fnr.......v
7*.ectioni pu I-p U
I i- I'J al
C c* *
C STATES ARE: *
C
C STATE 1: ENTERING COMPRESSOR FIRST STAGE
C S.TATE Xl: EXIT FROM FIRST STAGE COMPRESSOR IMPELLER
C STATE 1A: EXIT FROM FIRST STAGE COMPRESSOR DIFFUSER
C STATE 2A: ENTERING COMPRESSOR SECOND STAGE
C STATE X2: EXIT FROM SECOND. STAGE COMPRESSOR IMPELLER
C STATE 2: EXIT FROM SECOND STAGE COMPRESSOR DIFFUSER
C STATE 3: EXIT FROM CONDENSER
C STATE 3A: ENTERING ECONOMIZER AFTER EXPANSION
C STATE 3L: LIQUID STATE WITHIN ECONOMIZER
C STATE 3V: VAPOR STATE WITHIN ECONOMIZER
C STATE 4: ENTERING EVAPORATOR
C
C
REAL M0,MU1,MU2,NEXP1,NEXP2
DOUBLE PRECISION X(NEQ) ,F (NEQ)
COMMON /DATA/ PAR(10),XIN(7),OUT(19),ISTAGEIECONIREF
DATA CPW/l./,TMIN/-150./,TMAX/220./,PI/3.1415/
C
C ** PARAMETERS AND INPUTS **
C
ACI=PAR(l)
ACO=PAR (2)
HCI=PAR(3)
RPC=PAR (4)
C3=PAR (5 )
AX=PAR (6)
CBETA=PAR (7)
- 1.8 -
.qpvtinn I Chillpr Parfnrinnn"i-ja
Iowi.tli nf 1
IlIVII'LuMI x I I / -.IIUlaItII.
EFFREF=PAR (8)
EFFMOT=PAR (9)
RIMP=PAR (10)
c
FLCW=XIN(1)
TCWR=XIN (2)
QEVAP=XIN (3)
P1=XIN(4)
VI=XIN (5)
H1=XIN (6)
SI=XIN (7)
C
C ** ITERATION VARIABLES **
C
C THE THREE UNKNOWNS FOR SINGLE-STAGE COMPRESSION ARE:
C TCND = THE CONDENSING REFRIGERANT TEMPERATURE
C PHIXi = THE COMPRESSOR DIMENSIONLESS FLOW COEFFICIENT
C UX = THE IMPELLER TIP SPEED
C FOR TWO-STAGE COMPRESSION, TWO ADDITIONAL UNKNOWNS ARE:
C PHIX2 = SECOND STAGE DIMENSIONLESS FLOW COEFFICIENT
C PlA - INLET PRESSURE TO THE SECOND STAGE.
C
TCND=X (1)
PHIX1=X (2)
UX=X(3)
TCND=AMAX1 (TMIN,AMINI (TCND, TMAX))
PHIX1=AMAX1 (0.,AMIN1 (PHIXi, 1.0))
UX=AMAX1 (UX,1.)
IF(ISTAGE.EQ.2) THEN
PHIX2=X(4)
PHIX2=AMAX1 (0. , AMIN1 (PHIX2, 1. 0))
PIA=X(5)
ENDIF
C
C ** EXPANSION VALVE AND ECONOMIZER **
C
C DETERMINE PROPERTIES FOR EXPANSION VALVE(S) AND ECONOMIZER, IF
C PRESENT. ALSO DETERMINE REFRIGERANT FLOW RATES FOR EVAPORATOR (FLi)
- 1.9 -
~.qtin 1 irh illpr 1P,,...vP .......
C
C DETERMINE INLET AND OUTLET CONDITIONS OF IMPELLERS AND DIFFUSERS
C FOR BOTH STAGES.
C
CALL PROP (IREF, TCNDAOCONDVISC)
MO=UX/AO
EFFN1=(I.+0.109*(1.1-MO))*(i.-EXP(PHIX1*(58.45*PHIX1**2
-5.99*PHIXI-18.81)))
EFF1=EFFREF*EFFN1
MU1=0.69* (1. -PHIX1*CBETA) /EFF1
HX1=H1+(MU-0.5*MU1*MU-0.5*PHIX1*PHIX1) *UX*UX/32•2/778.
HX1=AMAX1 (HX1,H1)
CALL FREON(TX1,PX1,HX1,S1,XX1,VX1,UDUM, IREF, 34)
IF(ISTAGE.EQ.1) THEN
H2=HI +MUI*UX*UX/32 .2/778.
ELSE
EFFN2= (I.+0. 109"*(I. -M0) ) *(I.-EXP (PHIX2* (58.45*PHIX2**2
• -5.99*PHIX2-.18.81)) )
EFF2 =EFFREF *EFFN2
MU2=0 .69* (1.-PHIX2*CBETA) /EFF2
HIA=HI1+MUI1*UX*UX/32 .2/778.
- 1.10-
C'i_..... I C~h~ pIIlaeD-.g %......a
Necuion ii -"~
- 1.11 -
01 .:,W ('h;llpr Pprfnrrnnn,,n a
)CcntIu I
tI .- .uu i 1 ,l lla lllu "
C
C THE EQUATION SOLVER ITERATIVELY SOLVES FOR THE INDEPENDENT VARIABLES
C IN THE VECTOR X THAT YIELD ZEROS OF THE FOLLOWING FUNCTIONS.
C
F (1) =FLCW*CPW* (TCWR-TCWS) -UAC*XLMTD
F (2) =X (2) -FL1*VX1/AX/UX/3600.
IF(ISTAGE.EQ.1) THEN
F (3)=H2- (144./778. *PI*V1/EFF1/XPON1* ((P2/PI) **XPON1-. ) +H1)
ELSE
F (3)=HIA- (144./778. *P1*Vl/EFF1/XPON1* ((PlA/PI) **XPON1-. ) +HI)
F (4) =X (4) -FL2*VX2/AX/UX/3600.
F (5)=H2- (144./778. *PIA*V2A/EFF2/XPON2* ((P2/PlA) **XPON2-1. ) +H2A)
ENDIF
C
C ** OUTPUTS **
C
OUT (1)=QEVAP/12000.
OUT ( 2) =QCOND /12000 .
=
OUT ( 3) (QCOND-QEVAP) / 12000.
OUT (4) =3 .515 *OUT (3) /EFFMOT
OUT ( 6) =TCND
OUT ( 7) =T2
-1.12 -
Qa,-tinn I Chiller Performnnep
vI I,|l;~n 1 .h..l.r P '1'rIfIirn lllnc%.
C *
C *
C *
C
IF(IREF.EQ.500) THEN
A0-490.
COND=0 .053-0. 000127"T
VISC=0 .6851-3. 2943E-03*T+6. 443E-06*T*T
END IF
IF(IREF.EQ.22) THEN
AO=534.
-1.13-
Q ^ 1^61: dArib I Chillpr Pprfhrm-an,,n
3-ection b
COND=0.063-0-000159*T
VISC=0.6507-2.5943E-03*T+5.6101E-06*T*T
ENDIF
cQae4;en
aJcx.L5'JU I
I -
-I
('hillpr
"
I
C-anni,;tv
I%-" -dILI
I
C ECONOMIZER. THE INPUTS ARE FLOW STREAM CONDITIONS AND POWER REQUIREMENT,
C WHILE OUTPUTS INCLUDE COOLING CAPACITY, COMPRESSOR SPEED, ETC. THE UNITS *
C UTILIZED WITHIN THIS PROGRAM ARE TYPICAL ENGLISH UNITS THAT ARE COMMON *
C WITHIN THE HVAC INDUSTRY (BTU'S, TONS, KW). THE ANALYSIS IS DESCRIBED IN *
C *
C
EXTERNAL CHILLER
DOUBLE PRECISION X(6),F(6),W(6,6),DIFF(6),TOL
COMMON /DATA/ PAR(16),XIN(7),OUT(19),ISTAGEIECONIREF
DATA TOL/0.001/,DIFF/6*0.01/,PI/3.1415/
C
PARAMETER(CPW=1., DENS=8.3333)
PARAMETER(AEI=11300., ACI=14800., REO=3.1, RCO=3.1, DIAE=.75/12.,
DIAC=.75/12., NEPASS=3, NETUBE=3560, NCPASS=I, NCTUBE=3349,
C1=103., C2=1.1, NVERT=I, RPE=2.E-04, RPC=2.E-04, AX=1.53,
BETA=27.2, RIMP=1.1667, EFFREF=0.814, EFFMOT=0.91)
C
IREF = 500
ISTAGE = 2
IECON = 2
C
C PROGRAM DATA DEFINED ABOVE:
C
C IREF = REFRIGERANT TYPE (12, 22, 500, ETC)
C ISTAGE = NUMBER OF COMPRESSION STAGES (1 OR 2)
C IECON = 1 FOR NO ECONOMIZER, 2 FOR ECONOMIZER
C CPW = SPECIFIC HEAT OF WATER (BTU/LBM-F)
C DENS = DENSITY OF WATER (LBM/GAL)
C AEI = EFFECTIVE INSIDE SURFACE AREA OF EVAPORATOR TUBES (FT**2)
C ACI = EFFECTIVE INSIDE SURFACE AREA OF CONDENSOR TUBES (FT**2)
-1.15-
cat ' 1nn Chillpr Cnnq.v;tv
C
10 READ (10, ',END=100) POWER, GPMCHW, GPMCW, TCHWS, TCWR
c
c
C INPUT DATA IS:
C POWER = COMPRESSOR MOTOR POWER INPUT (KW)
C GPMCHW = CHILLED WATER FLOW RATE (GAL/MIN)
- 1.16-
n
CA.
Xt: -N" 1 C'hillar 1 . . :,x
,I,3e 1 i o I - '- .uu u ' . l ' , .l . ,
C
C CALCULATE THE MASS FLOW RATE FROM THE GPM
C FLCHW - CHILLED WATER FLOW RATE (LBM/HR)
C FLCW = CONDENSER WATER FLOW RATE(LBM/HR)
C
FLCHW=60. *DENS*GPMCHW
FLCW=60 . *DENS*GPMCW
C
C
C ** CHILLER ANALYSIS **
C
C THE EQUATION SOLVER SOLVES THE SYSTEM OF EQUATIONS MODELING THE
C THE CHILLER BY CALLING SUBROUTINE CHILLER. EITHER ONE OR TWO-STAGE
C COMPRESSION IS POSSIBLE. FOR SINGLE-STAGE COMPRESSION, THERE ARE FOUR
C ITERATIVE VARIABLES: THE REFRIGERANT EVAPORATOR TEMPERATURE, REFRIGERANT
C CONDENSING TEMPERATURE, THE COMPRESSOR DIMENSIONLESS FLOW COEFFICIENT,
C AND THE COMPRESSOR IMPELLER TIP SPEED. FOR TWO-STAGE COMPRESSION TWO
C ADDITIONAL UNKNOWNS ARE: THE SECOND STAGE DIMENSIONLESS FLOW COEFFI-
C CIENT AND THE SECOND STAGE IMPELLER INLET PRESSURE. PARAMETERS, INPUTS,
C AND OUTPUTS ARE COMMUNICATED THROUGH THE COMMON BLOCK "DATA".
C
C SET-UP PARAMETERS FOR ANALYSIS:
C HEI = INSIDE EVAPORATOR HEAT TRANSFER COEFFICIENT (TURBULENT FLOW)
C HCI = INSIDE CONDENSER HEAT TRANSFER COEFFICIENT (TURBULENT FLOW)
- 1.17 -
IReton 1 Chiller C nacitv
PAR (7)=ACI
PAR (8) =RCO*ACI
HCI=1.788* (NCPASS*GPMCW/NCTUBE)**0.8*DIAC**-1 .8
PAR(9) =HCI
PAR(10) =RPC
C3=0 .725* (32.2*3600. **2/NVERT/DIAC) **0.25
PAR(11) =C3
PAR(12) =AX
PAR(13) =0.
IF(ABS(BETA-90.) .GT.1.E-06) PAR(13)=1./TAN(PI*BETA/180.)
PAR (14) =EFFREF
PAR(15)=EFFMOT
PAR(16) =RIMP
c
C INPUTS AND INITIAL GUESSES FOR ITERATION VARIABLES
C
XIN(1) =FLCHW
XIN (2) =TCHWS
XIN(3) =FLCW
XIN (4)=TCWR
XIN (5)=12000. *EFFMOT*POWER/3.515
c
TE=TCHWS-5.
TCND=TCWR+ 10.
X(1) =TE
X (2) =TCND
X(3)=0.15
X(4)=400.
c
C EQUATION SOLVER: NUMBER OF VARIABLES DEPENDS UPON WHETHER SINGLE OR
C TWO-STAGE COMPRESSION.
c
IF(ISTAGE.EQ.1) THEN
CALL SOLVER(4,DIFF, X,F,W, CHILLER, TOL)
ELSE
X(5) =0.15
CALL FREON(TE,PI,HI,S1,1I.,V1,UI, IREF, 15)
CALL FREON(TCND,P2,H3,S3,0.,V3,U3, IREF, 15)
-1.18-
.... ,..., k1 rh;1lar
X(6)=(PI+P2)/2.
CALL SOLVER (6, DIFF, X,F, W,CHILLER, TOL)
ENDIF
C
c ** OUTPUT DETAILED RESULTS AND COMPARISONS TO FILE **
C
C COMPUTE THE CHILLED WATER RETURN TEMPERATURE (TCHWR) AND CONDENSOR
C WATER SUPPLY TEMPERATURE (TCWS)
C
TCHWR=TCHWS+OUT (1) *12000./FLCHW/CPW
TCWS=TCWR-OUT (2) *12000 ./FLCW/CPW
-1.19-
lqptiln I Chillpr 'n n ,.,,t.
C
C THIS SUBROUTINE IS CALLED AT EACH ITERATION OF THE EQUATION SOLVER TO
C EVALUATE THE CHILLER PERFORMANCE. THROUGHOUT THE PROGRAM T, P, V, H, AND S
REAL MOMU1,MU2,NEXP1,NEXP2
DOUBLE PRECISION X(NEQ),F(NEQ)
COMMON /DATA/ PAR(16),XIN(7),OUT(19),ISTAGE, IECON, IREF
DATA CPW/l./,TMIN/-150./,TMAX/220./,PI/3.1415/
C
AEI=PAR (1)
AEO=PAR (2)
HEI=PAR(3)
RPE=PAR(4)
Cl=PAR(5)
C2=PAR(6)
AC I=PAR (7)
ACO=PAR (8)
- 1.20 -
lpetinna 1 AL
C hillpr ("n ne~tv
4 a Is w4w
a %- Q Lt"-%., AV V
HCI=PAR(9)
RPC=PAR(10)
C3=PAR(11)
AX=PAR (12)
CBETA=PAR (2.3)
EFFREF=PAR (14)
EFFMOT=PAR (15)
RIMP=PAR(l.6)
C
FLCHW=XIN (1).
TCHWS=XIN (2)
FLCW=XIN (3)
TCWR=XIN (4)
QCOMP=XIN (5)
C
C ** ITERATION VARIABLES **
C
C THE FOUR UNKNOWNS FOR SINGLE-STAGE COMPRESSION ARE:
C TE = EVAPORATOR REFRIGERANT TEMPERATURE
C TCND = THE CONDENSING REFRIGERANT TEMPERATURE
C PHIXl = THE COMPRESSOR DIMENSIONLESS FLOW COEFFICIENT
C UX = THE IMPELLER TIP SPEED.
C FOR TWO-STAGE COMPRESSION, TWO ADDITIONAL UNKNOWNS ARE:
C PHIX2 = SECOND STAGE DIMENSIONLESS FLOW COEFFICIENT
C P2IA = INLET PRESSURE TO THE SECOND STAGE.
C
TE=X (1)
TCND=X (2)
PHIX1=X(3)
UX=X(4)
TE=AMAXl (TMIN, AMINI (TE, TMAX))
TCND=AMAXl (TMIN, AMINI (TCND, TMAX))
PHIXI=AMAX1(0.001,AMINI (PHIXi, 1.0))
IF(ISTAGE.EQ.2) THEN
PHIX2=X(5)
PHIX2=AMAXl. (0 .001I, AMINI (PHIX2, 1.0) )
P2.A=X (6)
END IF
- 1.21-
Qatdfi nn I (Nb.11 (nnar~t
6MU.LVlI .1
V. " -, - ulI
C
C DETERMINE INLET AND OUTLET CONDITIONS OF IMPELLERS AND DIFFUSERS
C FOR BOTH STAGES.
C
CALL PROP (IREFTCNDA0,COND,VISC)
MO=UX/AO
EFFN1=(. +0. 109* (1.1-MO)) * (1.-EXP (PHIX1* (58.45*PHIX1**2
• -5.99*PHIXI-18.81)) )
EFF 1=EFFREF*EFFN1
MU1=0.69* (1.-PHIX1*CBETA)/EFF1
HX1=HI+ (MUI-0.5*MU1*MUI-0.5*PHIX1*PHIX1) *UX*UX/32 .2/778.
HX1=AMAX1 (HX1, H1)
CALL FREON (TX1,PX1,HX1,S1, XX1,VX1,UDUM, IREF, 34)
IF(ISTAGE.EQ.1) THEN
H2=H1+MU1*UX*UX/32.2/778.
ELSE
EFFN2= (1.+0. 109"*(I.I-M0) ) *(I.-EXP (PHIX2* (58.45*PHIX2**2
• 5.99*PHIX2-18.81)) )
EFF 2=EFFREF * EFFN2
MU2=0 .69"*(1.- PHIX2 *CBETA) /EFF2
- 1.22 -
Ipetion 1
rmm
a Jkm,
Chillpr
v . , m',, m
'anneiltv
(4 ,.rq4
H1A=H1+MU1*UX*UX/32.2/778.
CALL FREON(TIA, PlA, HIA, SlA, XlA, VIA, UDUM, IREF, 23)
IF(IECON.EQ.2) THEN
H2A=X3A*H3V+(1.-X3A) *HIA
CALL FREON(T2AP1A,H2A, S2AX2AV2AUDUM, IREF, 23)
ELSE
T2A=TlA
H2A=HlA
S2A=S1A
V2A=VIA
ENDIF
HX2=H2A+(MU2-0.5*MU2*MU2-0.5*PHIX2*PHIX2) *UX*UX/32.2/778.
HX2=AMAXI (HX2, H2A)
CALL FREON (TX2, PX2, HX2, S2A, XX2,VX2,UDUM, IREF, 34)
H2=H2A+MU2*UX*UX/32.2/778.
ENDIF
CALL FREON(T2,P2,H2,S2,X2,V2,UDUM, IREF, 23)
C
C EVALUATE POLYTROPIC COEFFICIENTS FOR EACH STAGE
C
IF(ISTAGE.EQ.1) THEN
NEXP 1 =ALOG (P 1 / P 2) / ALOG (V2 / V1)
XPONI= (NEXP I-i.) /NEXP1
ELSE
NEXP I=ALOG (P1/P IA) / ALOG (V1A/Vl)
NEXP2=ALOG.(PIA/P2) /ALOG (V2/V2A)
XPONI= (NEXP 1-i.)/NEXP1
XPON2= (NEXP2-1.) /NEXP2
ENDIF
C
C ** EVAPORATOR ANALYSIS **
C
C UAI IS THE CONDUCTANCE ASSOCIATED WITH THE WATER FLOW AND PIPE
C MATERIAL (PLUS FOULING FACTOR). UAE IS THE OVERALL EVAPORATOR
C CONDUCTANCE, INCLUDING THAT ASSOCIATED WITH THE REFRIGERANT BOILING
C HEAT TRANSFER COEFFICIENT (HEO) . TFILM IS THE REFRIGERANT FILM
C TEMPERATURE AT THE SURFACE OF THE TUBE. ALSO DETERMINE REFRIGERANT
C FLOW RATES FOR EVAPORATOR (FLI) AND CONDENSER (FL2).
- 1.23 -
4Zpt;nn
-7 .1
1 Chiller
%., a -a-
"Cannit
gualwI
v
C
IF(ISTAGE.EQ.2 .AND. IECON.EQ.2) THEN
FL1=QCOMP/ ((HIA-HI) + (H2-H2A)/ (I.-X3A))
FL2=FL1/ (I.-X3A)
ELSE
FL1=QCOMP/ (H2-HI)
FL2=FL1
END IF
QEVAP=FL1* (HI-H4)
TCHWR=TCHWS+QEVAP /FLCHW/CPW
UAI=AEI/(1./HEI + RPE)
TW= (TCHWS+TCHWR)/2.
TFILM=TW-QEVAP/UAI
DT=AMAX1 (TFILM-TE, 0 .1)
HEO=C* (DT) **C2
UAE=I. / (1./UAI+1./HEO/AEO)
IF(TE.LT.TCHWS) THEN
XLMTDE= ( (TCHWR-TE)- (TCHWS-TE) )/ALOG ( (TCHWR-TE) / (TCHWS-TE))
ELSE
XLMTDE=TW-TE
ENDIF
C
C ** CONDENSER **
C
C QCOND = CONDENSER HEAT REJECTION
C UAI = CONDUCTANCE ASSOCIATED WITH THE WATER FLOW AND PIPE
C MATERIAL (PLUS FOULING FACTOR),
C TFILM = CONDENSING FILM TEMPERATURE AT THE TUBE SURFACES,
C UAC = OVERALL CONDUCTANCE INCLUDING THAT ASSOCIATED WITH THE
C CONDENSING HEAT TRANSFER COEFFICIENT, HCO.
C
CALL FREON (TCNDfP2,H2V, S2V, 1.,V2V, UDUM, IREF, 15)
QCOND=FL2 * (H2-H3)
TCWS=TCWR-QCOND / FLCW/CPW
UAI=AC I/ ( 1. /HC I+RPC)
TW= (TCWS +TCWR) / 2.
TF I LM=TW+QCOND /UAI
DT=AMAXl (TCND-TFILM, 0 .1 )
DH=H2V-H3
- 1.24 -
Rpetiln
I la
IJL Chiller
a 9 %W
A-
iC nq-itv
t -T
HCO=C3*(COND**3*DH/VISC/DT/V3**2)**0.25
UAC=1./ (./UAI+1./HCO/ACO)
IF(TCND.GT.TCWR) THEN
XLMTDC=( (TCND-TCWS)-(TCND-TCWR) ) /ALOG( (TCND-TCWS) / (TCND-TCWR))
ELSE
XLMTDC=TCND-TW
ENDIF
C
C ** FUNCTIONS FOR EQUATION SOLVER **
C
C THE EQUATION SOLVER ITERATIVELY SOLVES FOR THE INDEPENDENT VARIABLES
C IN THE VECTOR X THAT YIELD ZEROS OF THE FOLLOWING FUNCTIONS.
C
F (1) =FLCHW*CPW* (TCHWR-TCHWS) -UAE*XLMTDE
F (2) =FLCW*CPW* (TCWR-TCWS) -UAC*XLMTDC
F (3)-X (3)-FL1*VX1/AX/UX/3600.
IF(ISTAGE.EQ.1) THEN
F(4)=H2-(144./778.*P1*Vl/EFF1/XPON1*((P2/PI)**XPON1-1.)+H1)
ELSE
F (4)=HA-(144./778. *PI*Vl/EFF1/XPON1* ((PlA/PI) **XPON1-. ) +H1)
F (5) =X (5) -FL2*VX2/AX/UX/3600.
F (6)=H2- (144./778. *P1A*V2A/EFF2/XPON2* ((P2/PlA) **XPON2-1. ) +H2A)
ENDIF
C
C ** OUTPUTS **
C
OUT (1) =QEVAP/12000.
OUT (2)=QCOND/12000.
OUT (3)= (QCOND-QEVAP) /12000.
OUT(4)=3.515*OUT(3)/EFFMOT
OUT (5) =TE
OUT (6) =TCND
OUT (7) =T2
OUT (8) =P1
OUT ( 9 ) =P2
OUT (10) =60. *UX/RIMP/2 ./2I
- 1.25 -
IRctinn
LI
1 ~L; Chillpr rnnneitv
eIlI- 1 Jl vi t v
C *
C
C IREF = REFRIGERANT TYPE (500, 22, OR 12)
C T = REFRIGERANT TEMPERATURE (DEGREES F)
C AO = SONIC VELOCITY (FT/SEC)
C COND = THERMAL CONDUCTIVITY (BTU/HR-FT-F)
C VISC = VISCOSITY (LBM/FT-HR)
C
C
IF(IREF.EQ.500) THEN
AO=490.
COND=0.053-0. 000127*T
VISC=0 .6851-3. 2943E-03*T+6 . 443E-06*T*T
END IF
IF(IREF.EQ.22) THEN
A0=534.
COND=0 .063-0. 000159"T
VISC=0. 6507-2. 5943E-03*T+5. 6101E-06*T*T
END IF
-1.26 -
CAMI^+;IImk I ('h;llpr Canan;fv
3ectl()tj L '1,11111CI "kdLJdljtV
C *
C A FLASH GAS ECONOMIZER. THE INPUTS ARE FLOW STREAM CONDITIONS, WHILE *
C OUTPUTS INCLUDE THE COOLING LOAD, POWER CONSUMPTION, AND COMPRESSOR SPEED *
C ASSOCIATED WITH THE SURGE CONDITIONS. THE UNITS UTILIZED WITHIN THIS *
C PROGRAM ARE TYPICAL ENGLISH UNITS THAT ARE COMMON WITHIN THE HVAC INDUSTRY *
C *
C
COMMON /DATA/ PAR(10),XIN(7),OUT(20),ISTAGEIECONIREF
DATA PI/3.1415/,GOLD/.61803399/
C
PARAMETER(CPW=1., DENS=8.3333)
C
IREF = 500
ISTAGE = 2
IECON = 2
C
C PROGRAM DATA DEFINED ABOVE:
C
C IREF = REFRIGERANT TYPE (12, 22, 500, ETC)
C ISTAGE = NUMBER OF COMPRESSION STAGES (1 OR 2)
C IECON = 1 FOR NO ECONOMIZER, 2 FOR ECONOMIZER
C CPW = SPECIFIC HEAT OF WATER (BTU/LBM-F)
C DENS = DENSITY OF WATER (LBM/GAL)
C
C ** OPEN FILES FOR DATA INPUT AND OUTPUT **
C
=
OPEN (10, FILE= 'SURGE. DAT ' ,STATUS ' OLD ')
OPEN (11,FILE=' SURGE .OUT' , STATUS='NEW')
WRITE (11, 101)
C
C ** LOOP FOR VARYING INPUT DATA **
- 1.28 -
Qaritn
LJ-V~lyf
1
x."1,-0
Chillpr
tJLU
.'Riirap,
UU rA
C
10 READ(10, *,END=100) QMINQMAXGPMCHWGPMCWTCHWSTCWR
C
C INPUT DATA IS:
C QMIN = LOWER LIMIT ON CHILLER EVAPORATOR LOAD (TONS)
OUT (5)=TCHWS-5.
OUT (6)=TCWR+10.
OUT (10) =450.
OUT (12) =0.15
IF(ISTAGE.EQ.2) THEN
OUT (15)=0.15
CALL FREON(OUT(5),P1,H1,S1,I.,V1,UIIREF,15)
CALL FREON(OUT(6),P2,H3,S3,O.,V3,U3,IREF,15)
OUT (20) = (P1+P2) /2.
END IF
C
C INITIAL POINTS FOR GOLDEN SECTION SEARCH
C
STEP= (QMAX-QMIN) *GOLD
Q 1=QMAX-STEP
Q2=QMIN+STEP
QLAST=QMIN
UXm SPEED (GPMCHWGPMCW,TCHWS, TCWR,Q1, TCHWR)
UX2 = SPEED (GPMCHW,GPMCW, TCHWS, TCWR, Q2, TCHWR)
- 1.29 -
.qpctiona 1 Chiller Snrgp
h a- L-,A
S .I
- 1.30 -
Q e;,z
_ll'JEIt
1 hiilr ALIr5
Rira
C
C ** OUTPUT DETAILED RESULTS AND COMPARISONS TO FILE **
C
C COMPUTE THE CONDENSOR WATER SUPPLY FLOW AND TEMPERATURE (TCWS) AND
C COMPRESSOR RPM
C
FLCW=60. *DENS*GPMCW
TCWS=TCWR-OUT (2) *12000 ./FLCW/CPW
RIMP=PAR (10)
OUT(10)=60.*OUT(10)/RIMP/2./PI
WRITE(11, 102) GPMCHW, GPMCW, TCHWSTCHWR,TCWSTCWR
IF(ISTAGE.EQ.1) THEN
WRITE(II,103) (OUT(I), I=1,16)
ELSE
WRITE(II,104) (OUT(T),I=1,19)
ENDIF
GO TO 10
100 CONTINUE
STOP
C
101 FORMAT(///21X, '********** CHILLER MODEL **********')
-1.31-
C!4..^J.:Af.,
t I.UII
1
I
!.,--,...
Chiller ,l
,,mop
C
C ESTIMATE COMPRESSOR PERFORMANCE FOR GIVEN LOAD AND RETURN COMPRESSOR SPEED *
c*
-1.32 -
Cart; nn I C~hillpr Rima
C
C CALCULATE THE MASS FLOW RATE FROM THE GPM AND LOAD RETURN TEMPERATURE
C FLCHW = CHILLED WATER FLOW RATE (LBM/HR)
C FLCW = CONDENSER WATER FLOW RATE(LBM/HR)
C TCHWR = CHILLED WATER RETURN TEMPERATURE (DEGREES F)
C
C
FLCHW60. *DENS*GPMCHW
FLCW-60. *DENS*GPMCW
TCHWR=TCHWS+12000 . *QEVAP/FLCHW/CPW
C
C ** EVAPORATOR ANALYSIS **
C
C GIVEN THE CHILLER LOAD AND WATER CONDITIONS, THE EQUATION SOLVER
C ITERATIVELY DETERMINES THE EVAPORATOR TEMPERATURE, TE, THROUGH THE
C USE OF THE SUBROUTINE EVAP. PARAMETERS, INPUTS, AND OUTPUTS ARE
C COMMUNICATED THROUGH THE COMMON BLOCK "DATA". HEI IS THE INSIDE
C EVAPORATOR HEAT TRANSFER COEFFICIENT (TURBULENT FLOW).
C
XIN (1) =FLCHW
XIN ( 2) --TCHWS
XIN ( 3) =TCHWR
XIN (4) =12000. *QEVAP
- 1.33 -
SPction I C~hiller S,, op.
HEI=1.37*(NEPASS*GPMCHW/NETUBE) **0.8*DIAE**-].8
PAR(3) =HEI
PAR(4) =RPE
PAR(5) =C1
PAR(6) =C2
C
X (1)=OUT (5)
CALL SOLVER(IDIFF,X,F,W,EVAP,TOL)
TE=X(I)
C
C ** COMPRESSOR AND CONDENSOR ANALYSIS **
C
C THE EQUATION SOLVER SOLVES THE SYSTEM OF EQUATIONS MODELING THE
C THE COMPRESSOR AND CONDENSER BY CALLING SUBROUTINE CHILLER. EITHER
C ONE OR TWO-STAGE COMPRESSION IS POSSIBLE. FOR SINGLE-STAGE
C COMPRESSION, THERE ARE THREE ITERATIVE VARIABLES: THE REFRIGERANT
C CONDENSING TEMPERATURE, THE COMPRESSOR DIMENSIONLESS FLOW COEFFICIENT,
C AND THE COMPRESSOR IMPELLER TIP SPEED. FOR TWO-STAGE COMPRESSION TWO
C ADDITIONAL UNKNOWNS ARE: THE SECOND STAGE DIMENSIONLESS FLOW COEFFI-
C CIENT AND THE SECOND STAGE IMPELLER INLET PRESSURE. THE INLET STATE
C TO THE COMPRESSOR IS KNOWN FROM THE EVAPORATOR ANALYSIS. THE FREON
C PROPERTIES AT THIS STATE ARE EVALUATED PRIOR TO THE ITERATIVE
C SOLUTION. PARAMETERS, INPUTS, AND OUTPUTS ARE COMMUNICATED THROUGH
C THE COMMON BLOCK "DATA".
C
C SET-UP PARAMETERS FOR ANALYSIS:
C HCI = INSIDE CONDENSER HEAT TRANSFER COEFFICIENT (TURBULENT FLOW)
C C3 = CONSTANT FOR EVALUATING THE HEAT TRANSFER COEFFICIENT FOR
C CONDENSATION ON THE CONDENSER TUBES.
C
PAR(1) =ACI
PAR (2) =RCO*ACI
HCI=I. 788* (NCPASS*GPMCW/NCTUBE) **0 .8*DIAC**-I .8
PAR (3) =HCI
PAR (4) =RPC
C3=0 .725* (32.2*3600. **2/NVERT/DIAC) **0 .25
PAR (S5) =03
PAR (6) =AX
PAR (7) =0.
- 1.34-
.Q.oet;nn I -- ('h;la i!,,* ra...
eOqc4tn1 Cllau eirr
SPEED = X(3)
-1.35 -
Q,aefJ;,n I .. (Chiilpr Riirap
I IO 1J Lt I LJL.E
ul
RETURN
END
C *
AEI=PAR (1)
AEO=PAR (2)
HEI=PAR (3)
RPE=PAR (4)
C1=PAR (5)
C2=PAR (6)
TCHWS=XIN (2)
TCHWR=XIN (3)
QEVAP=XIN (4)
TE=X
C
C UAI IS THE CONDUCTANCE ASSOCIATED WITH THE WATER FLOW AND PIPE
C MATERIAL (PLUS FOULING FACTOR). UAE IS THE OVERALL EVAPORATOR
C CONDUCTANCE, INCLUDING THAT ASSOCIATED WITH THE REFRIGERANT BOILING
C HEAT TRANSFER COEFFICIENT (HEO). TFILM IS THE REFRIGERANT FILM
C TEMPERATURE AT THE SURFACE OF THE TUBE.
C
- 1.36 -
Section 1 Chiller Surge
TW= (TCHWS+TCHWR)/2.
TF ILM=TW-QEVAP/UAI
DT=AMAX1 (TFILM-TE, C . 1)
HEO=CI* (DT) **C2
UAE=1./ (./UAI+1./HEO/AEO)
IF(TE.LT.TCHWS) THEN
XLMTD= ( (TCHWR-TE) - (TCHWS-TE))/ALOG ((TCHWR-TE) / (TCHWS-TE))
ELSE
XLMTD=TW-TE
END IF
C
F=QEVAP -UAE *XLMTD
C
OUT (5) =TE
IF(ISTAGE.EQ.1) THEN
OUT (15) =UAE
ELSE
OUT (18) -UAE
ENDIF
C
RETURN
END
C
C THIS SUBROUTINE IS CALLED AT EACH ITERATION OF THE EQUATION SOLVER TO *
C STATES ARE: *
C
C STATE 1: ENTERING COMPRESSOR FIRST STAGE*
C STATE XI: EXIT FROM FIRST STAGE COMPRESSOR IMPELLER*
C STATE IA: EXIT FROM FIRST STAGE COMPRESSOR DIFFUSER*
C STATE 2A: ENTERING COMPRESSOR SECOND STAGE*
C STATE X2: EXIT FROM SECOND STAGE COMPRESSOR IMPELLER*
C STATE 2: EXIT FROM SECOND STAGE COMPRESSOR DIFFUSER*
- 1.37 -
qption 1
I C'hilpr I,,irfy
Ly 1
Y616LLL aCA.illpr u 16 I
C
REAL MOMU1,MU2,NEXP1,NEXP2
DOUBLE PRECISION X(NEQ),F(NEQ)
COMMON /DATA/ PAR(10),XIN(7),OUT(20),ISTAGEIECONIREF
DATA CPW/1./,TMIN/-150./,TMAX/220./,PI/3.1415/
C
C ** PARAMETERS AND INPUTS **
C
ACI=PAR(1)
ACO=PAR (2)
HCI=PAR(3)
RPC=PAR(4)
C3=PAR (5)
AX=PAR (6)
CBETA=PAR (7)
EFFREF=PAR (8)
EFFMOT=PAR (9)
RIMP=PAR (10)
C
FLCW=XIN (1)
TCWR=XIN (2)
QEVAP=XIN (3)
P1=XIN (4)
V1=XIN (5)
H1=XIN (6)
SI=XIN (7)
C
C ** ITERATION VARIABLES **
- 1.38 -
Rpetion
Lio Vi
I1iCh1Iai (rhillpr
-IIn li u
,, rup
u r_..
- 1.39 -
.qpetion
. , ,o V !i.r
fll
I tChillpr qitrap
.uar--
C ** COMPRESSOR STAGE(S) **
C
C DETERMINE INLET AND OUTLET CONDITIONS OF IMPELLERS AND DIFFUSERS
C FOR BOTH STAGES.
C
CALL PROP (IREFTCNDA0,CONDVISC)
MO=UX/AO
2
EFFN1(I.+0.109*(I.I-MO))*(I.-EXP(PHIX1*(58.45*PHIX1**
-5.99*PHIX1-18.81)))
END IF
CALL FREON(T2,P2,H2,S2,X2,V2,UDUM, IREF, 23)
- 1.40-
ZA,,.Pf 1 C~hiller ,,itrvr
c
C EVALUATE POLYTROPIC COEFFICIENTS FOR EACH STAGE
C
IF(ISTAGE.EQ.1) THEN
NEXP 1 =ALOG(P 1 / P 2) / ALOG (V2 / Vl)
XPON1= (NEXP1-1.) /NEXP1
ELSE
NEXP1=ALOG (PI/PIA) /ALOG (VIA/Vl)
NEXP2=ALOG (P 1A/P2) /ALOG (V2/V2A)
XPON1- (NEXP 1-1.) /NEXP1
XPON2= (NEXP2-1.) /NEXP2
ENDIF
C
C ** CONDENSER **
C
C QCOND = CONDENSER HEAT REJECTION
C UAI = CONDUCTANCE ASSOCIATED WITH THE WATER FLOW AND PIPE
C MATERIAL (PLUS FOULING FACTOR),
C TFILM = CONDENSING FILM TEMPERATURE AT THE TUBE SURFACES,
C UAC = OVERALL CONDUCTANCE INCLUDING THAT ASSOCIATED WITH THE
C CONDENSING HEAT TRANSFER COEFFICIENT, HCO.
C
CALL FREON (TCND, P2 ,H2VS2V, 1. ,V2V, UDUM, IREF, 15)
QCOND-FL2 * (H2 -H3)
TCWS=TCWR-QCOND/FLCW/CPW
UAI=ACI/ (I./HCI+RPC)
TW= (TCWS+TCWR)/2.
TFILM=TW+QCOND/UAI
DT=AMAX1 (TCND-TFILM,0.1)
DH-H2V-H3
HCO=C3* (COND**3*DH/VISC/DT/V3**2) **0.25
UAC=1. / (1./UAI+1./HCO/ACO)
IF (TCND.GT. TCWR) THEN
XLMTD= ( (TCND-TCWS) - (TCND-TCWR) ) /ALOG ( (TCND-TCWS) / (TCND-TCWR) )
ELSE
XLMTD=TCND-TW
END IF
C
C ** FUNCTIONS FOR EQUATION SOLVER **
- 1.41 -
.qpvtinn
n%,a
tAn
1
L Chillpr
Chu11
,1
'qeirap
m ir l. u, ra -
C
C THE EQUATION SOLVER ITERATIVELY SOLVES FOR THE INDEPENDENT VARIABLES
C IN THE VECTOR X THAT YIELD ZEROS OF THE FOLLOWING FUNCTIONS.
C
F (1) =FLCW*CPW* (TCWR-TCWS) -UAC*XLMTD
F (2)=X (2)-FL1*VX1/AX/UX/3600.
IF(ISTAGE.EQ.1) THEN
F (3)=H2- (144./778. *P1*Vl/EFF1/XPON1* ((P2/Pl) **XPON1-. ) +H1)
ELSE
F (3)=H1A- (144./778. *PI*VI/EFF1/XPON1* ((PIA/PI) **XPON-I. ) +HI)
F (4)=X (4)-FL2*VX2/AX/UX/3600.
F (5)=H2- (144./778. *PA*V2A/EFF2/XPON2* ((P2/PIA) **XPON2-1. ) +H2A)
END IF
C
C ** OUTPUTS **
C
OUT (1)=QEVAP/12000.
OUT (2)=QCOND/12000.
OUT (3) = (QCOND-QEVAP) / 12000.
OUT (4)=3. 515*OUT (3)/EFFMOT
OUT (6)=TCND
OUT (7)=T2
OUT (9) =P2
OUT (10) =UX
OUT (11) =EFFMOT*OUT (1) /OUT (3)
OUT (12) =PHIX1
OUT (13) =NEXP1
OUT (14) =EFF1
OUT (16) -UAC
IF(ISTAGE.EQ.2) THEN
OUT (15) =PHIX2
OUT (16) =NEXP2
OUT (17) =EFF2
OUT (19) =UAC
OUT (20) =PIA
END IF
RETURN
END
-1.42 -
Section 1- Chiller Surge
C
SUBROUTINE PROP (IREFrTAQ,CONDoVISC)
C
C IREF = REFRIGERANT TYPE (500, 22, OR 12)
C T = REFRIGERANT TEMPERATURE (DEGREES F)
IF(IREF.EQ.500) THEN
A0-490.
COND-0.053-0. 000127*T
VISC=0.6851-3.2943E-03*T+6. 443E-06*T*T
END IF
IF(IREF.EQ.22) THEN
A0=534.
•COND=0.063-0.000159*T
VISC=0.6507-2. 5943E-03*T+5. 6101E-06*T*T
ENDIF
IF(IREF.EQ.12) THEN
A0=446.
COND=0. 049-0. 000117*T
VISC=0.763-3. 8905E-03*T+9. 881E-06*T*T
ENDIF
RETURN
END
- 1.43 -
Section 2 Cooling Tower and Coil Models
- 2.0 -
dahI ;na TvvrPgprfnrvmianea ( iia .. cnn i
t:LLlull &- 'AJ.JUi, A T ,JIL A I.. Ji
' iIlLii. ',. -UlJtil I )Ul3
C *
C UNITS UTILIZED WITHIN THIS PROGRAM ARE TYPICAL ENGLISH. THE MODELS ARE *
C MADISON, 1988 *
C *
REAL NTUS(7),RAS(3),LE
COMMON /DATAS/ DATA(100,9),OUT(100,9),MODEIEXP
DATA NTUS/0.5,1.,1.5,2.,2.5,3., 4./
DATA RAS/0.5,1.,2./
C
C ** OPEN INPUT AND OUTPUT FILES **
C
=
OPEN (10, FILE= 'TOWERCOMPARE.DAT'fSTATUS 'OLD')
OPEN(11,FILE='TOWERCOMPARE.OUT',STATUS='NEW')
C
C ** LOOP TO READ INPUT DATA **
C
5 READ(10,*,END=100) TWB, TWI, TDB, LE
c
C INPUT DATA:
C
C TDB = AMBIENT DRY BULB TEMPERATURE (DEGREES C)
C TWB = AMBIENT WET BULB TEMPERATURE (DEGREES C)
C TWI = INLET TEMPERATURE OF WATER TO COOLING TOWER (DEGREES C)
C LE = LEWIS NUMBER
c
c
C ** STORE DATA FOR A RANGE OF TOWER PARAMETERS **
c
C NTUS = NUMBER OF TRANSFER UNITS
C RAS = RATIO OF WATER FLOW TO AIR FLOW RATE
-2.1-
lqpfinn2 ,(Cnnlina Tnwpr Pprf'nrm~n = ... ..
NEXP = 0
DO 10 NRA = 1,3
DO 10 NNTU - 1,7
IF(NRA .NE. 1 .OR. NNTU .LE. 5) THEN
NEXP = NEXP + 1
DATA (NEXP,1) = NTUS (NNTU)
DATA (NEXP, 2) = RAS (NRA)
DATA(NEXP,3) = TWB
DATA(NEXP, 4) = TWI
DATA(NEXP, 5) = TDB
DATA(NEXP, 6) = LE
ENDIF
10 CONTINUE
C
C ** TOWER ANALYSIS **
C
C RESULTS ARE STORED IN THE OUT ARRAY FOR ALL SETS OF COIL DATA
C
CALL TOWER (NEXP)
C
C ** OUTPUT RESULTS TO FILE **
C
WRITE(11,101) TWB, TWI, TDB, LE
WRITE (11, 102)
DO 20 IEXP - 1,NEXP
WRITE(11,103) (DATA(IEXPJ),J=1,2), (OUT(IEXPJ),J=1,9)
20 CONTINUE
GOTO 5
C
100 CONTINUE
C
101
FORAT(/1X'TWB, TWI, TDB, LE - ',4(iXFE.2))
102 FORMAT(//13X,'** FINITE DIFFERENCE ** ** MERKEL ** '
'*EFFECTIVENESS **'//
- 2.2-
Q ^dl%+ ; &'%" I t lain 'l''hw7Lr. prfnr ni ,a
13 |1tl)11 4- t-UVuulu • u VV . •t u l uull uI I mlr i[I nll
C
END
C
SUBROUTINE TOWER (NEXP)
C
C *
C *
C
EXTERNAL MODEL
DOUBLE PRECISION X(2),F(2),W(2,2),DIFF(2),TOL
COMMON /DATAS/ DATA(100,9),OUT(100,9),MODEIEXP
DATA TOL/I.E-05/,DIFF/0.001,O.0001/
C
C***************** LOOP THROUGH ALL SETS OF COIL DATA *************************
C
C NOMENCLATURE:
C
C TWB = ENTERING AMBIENT WET BULB TEMPERATURE (DEGREES C)
C TW = WATER TEMPERATURE (DEGREES C)
C TA = AIR TEMPERATURE (DEGREES C)
C TS = SURFACE TEMPERATURE (DEGREES F)
C TDP = AIR DEWPOINT TEMPERATURE (DEGREES C)
C WA = AIR HUMIDITY RATIO
C HA = AIR SPECIFIC ENTHALPY (KJ/KG)
C WW = HUMIDITY RATIO ASSOCIATED WITH SATURATED AIR AT TW
C HW = SPECIFIC ENTHALPY ASSOCIATED WITH SATURATED AIR AT TW (KJ/KG)
C EPSW = WATER STREAM TEMPERATURE EFFECTIVENESS
C EPSA = AIR STREAM HEAT TRANSFER EFFECTIVENESS
C
C THE STATES 1 AND 2 REFER TO ENTERING AND EXITING CONDITIONS
C (1=ENTERING, 2 = EXITING) .
C
DO 100 IEXP = I,NEXP
RA = DATA (IEXP,2 )
TWB = DATA(IEXP, 3)
- 2.3 -
C adf:tnI rnnlina Tnwar Parftirm4anna
~lInuII - ',. ninuuau • ivv%.n a a nun uIuill, 'uuIIpIuUIsols
TWI = DATA(IEXP,4)
TDB -=DATA(IEXP,5)
CALL PSYCH (2,1,TDB,TWB, RHTDPWA1,HA)
DATA(IEXP,7) = HAl
DATA(IEXP,8) = WAl
CALL PSYCH(2,1,TWlTWlRHTDPWW1,HW1)
C
C ** EFFECTIVENESS-NTU MODEL **
C
CALL EFFEC (TW2,EPSAWA2, HA2)
EPSW - (TWI - TW2)/ (TW1 - TWB)
OUT(IEXP,7) = EPSA
OUT(IEXP,8) - 100.*(WA2 - WAI)/RA
OUT(IEXP,9) = EPSW
C
C ** DETAILED ANALYSIS **
C
C THE DETAILED COOLING COIL ANALYSIS INVOLVES AN ITERATIVE SOLUTION IN
C TERMS OF THE EXIT WATER TEMPERATURE (TW2) AND AIR HUMIDITY RATIO (WA2).
C THE EQUATION SOLVER CALLS THE SUBROUTINE MODEL AT EACH ITERATION. THE
C RESULTS OF THE EFFECTIVENESS ANALYSIS ARE USED AS AN INITIAL GUESS FOR
C THIS SOLUTION.
C
MODE = 1
X(I) = TW2
X(2) = WA2
CALL SOLVER (2,DIFF, X,F, W,MODEL, TOL)
C
TW2 = X(1)
WA2 = X(2)
HA2 = OUT(IEXP,I)
EPSA = (HA2 - HA1)/(HWI - HAI)
EPSW = (TWI - TW2) /(TWI - TWB)
CALL PSYCH (2, 6, TA2, TWB2, RH, TDP, WA2, HA2)
OUT(IEXP, I) = EPSA
OUT(IEXP,2) = 100.*(WA2 - WAI))/RA
OUT(IEXP,3) = EPSW
-2.4-
,Rpt inn27 Coolino Tnwpr Pprforrmnn ..... ...
~cietmnn ('nnt in ~ Tnw~~r P~rfnrm~ n~ ~
C ** MERKEL METHOD **
C
C SAME AS DETAILED ANALYSIS EXCEPT THAT WATER LOSS TERMS ARE NEGLECTED.
C INVOLVES AN ITERATIVE SOLUTION IN TERMS OF THE EXIT WATER TEMPERATURE
C (TW2). THE EQUATION SOLVER CALLS THE SUBROUTINE MODEL AT EACH ITERATION.
C THE RESULTS OF THE DETAILED ANALYSIS ARE USED AS AN INITIAL GUESS FOR
C THIS SOLUTION.
MODE = 2
CALL SOLVER (1,DIFF, X,F,W,MODEL, TOL)
TW2 = X(I)
HA2 = OUT(IEXP,4)
WA2 = OUT(IEXP,5)
EPSA = (HA2 - HA1) / (HW1 - HAl)
EPSW (TWI - TW2)/(TWl - TWB)
CALL PSYCH
- - - (2.6.TA2foTWB2.RH.
1%- F - .. , - - -F . .• TDP.WA2.HA2)
- - . .. • .. .
C
C DETAILED MODEL OF A COOLING TOWER THAT SOLVES BASIC HEAT AND MASS TRANSFER *
C EQUATIONS USING FINITE-DIFFERENCES. THIS ROUTINE IS CALLED AT EACH ITERA- *
C TION OF AN EQUATION SOLVER THAT IS FINDING THE CORRECT LEAVING WATER *
C TEMPERATURE. THERE ARE POSSIBLE MODES FOR THIS ROUTINE IN MODE 1 THE WATER*
C TERMS ARE INCLUDED, WHILE IN MODE 2 THEY ARE NEGLECTED (MERKEL METHOD) *
REAL NTULE
DOUBLE PRECISION X (NEQ) ,F (NEQ)
- 2.5 -
.qpetinn 2"
I ASa
Cooling Tower Performannep Cnnn
Cn-Vmndc- TnwraPprfnrmnn2
v ,¥lI .gA v.,
; ....
c
NTU = DATA (IEXP, 1)
PA = DATA (IEXP, 2)
TWI = DATA(IEXP,4)
LE = DATA(IEXP,6)
HAl - DATA(IEXP,7)
WAl = DATA (IEXP, 8)
C
TW2 - X(I)
IF(MODE .EQ. 1) WA2 = X(2)
C
C ** INITIALIZATIONS **
C
DV = 1./NVOL
WA = WAl
HA = HAl
TW = TW2
C
C ** LOOP THROUGH TOWER SECTIONS **
C
C THE TOWER IS DIVIDED INTO NVOL SECTIONS. A SIMPLE FORWARD DIFFERENCING
C NUMERICAL INTEGRATION SCHEME IS UTILIZED. THE FIRST SECTION EVALUATED IS
C AT THE AIR INLET.
C
DO 100 I = ,NVOL
CALL PSYCH (2,1, TW, TWRH, TDP,WW, HW)
IF(MODE .EQ. 1) THEN
DWA = AMAX1(0.,NTU*(WW - WA)*DV)
CALL PSYCH (2, 6,TA, TDUM, RHTDPfWA, HA)
HGW= HGO + CPV*(TW - TREF)
DHA = LE*NTU*DV*((HW - HA) + (WW-WA)*(1./LE-I.)*RGW)
DHA = AMAXI(0.,DHA)
DTW = (DHA - CPW* (TW-TREF) *DWA) /(RA - (WA2 - WA) )/CPW
ELSE
-2.6 -
Section 2 Cooling Tower Performance Comparisons
DWA = 0.0
DHA = AMAX1(0.,NTU* (HW - HA) *DV)
DTW = AMAX1(0.,DHA/RA/CPW)
ENDIF
C
C UPDATE AIR AND WATER STATES FOR THIS SECTION
C
WA = WA + DWA
HA = HA + DHA
TW = TW + DTW
100 CONTINUE
C
C ** FUNCTION EVALUTION AND OUTPUTS **
C
C AT THE SOLUTION, THE WATER'TEMPERATURE FOR THE LAST SECTION SHOULD
C MATCH THE INLET WATER TEMPERATURE. IN MODE 2, THE HUMIDITY RATIO FOR
C THE LAST SECTION SHOULD BE EQUAL TO THE ITERATION VALUE.
C
F(1) = TWI -TW
C
IF(MODE .EQ. 1) THEN
F(2) = WA2 - WA
OUT(IEXP,I) = HA
ELSE
OUT(IEXP,4) = HA
OUT(IEXP,5) = WA
ENDIF
C
RETURN
END
C
o *
C *
C
SUBROUT INE EFFEC (TW2 , EP S, WA2 , HA2 )
- 2.7-
,Qaetinn I Coonlingr Towpr Pprformfineo inm.n-; .... I
REAL NTU,MSTAR
COMMON /DATAS/ DATA (100,9) ,OUT (100, 9) ,MODE, IEXP
DATA CPW/I./,TREF/32./
C
C ** STATEMENT FUNCTION **
C
C CORRELATION FOR SATURATION TEMPERATURE IN TERMS OF SATURATION
C ENTHALPY: CORRELATION IS IN ENGLISH UNITS
C
TSAT(HSAT) = -0.8811 + 3.340*HSAT - 4.907E-02*HSAT**2 +
4.01E-04*HSAT**3 - 1.303E-06*HSAT**4
C
C ** RETRIEVE INPUT DATA **
C
NTU = DATA( IEXP,1)
RAl = DATA (IEXP, 2)
TWB = DATA(:IEXP,3)
TWI = DATA(IEXP,4)
TAl = DATA (IEXP,5)
HA1 = DATA( IEXP,7)
WAI = DATA(I EXP,8)
C
C ** INITIALIZATIONS **
C
CALL PSYCH(2,1,TW1,TW1,RHTDPWW1,HW1)
ITER = 0
TW2 = TWB
RA2 = RAI
C
C ** ITERATIVE LOOP **
C
10 ITER = ITER + 1
CALL PSYCH ( 2, 1,TW2, TW2, RH, TDP, WW2, HW2 )
TOLD = TW2
CS = (HWI - HW2) /(TWI - TW2)
MSTAR = CS/RAI/CPW
C = EXP (-NTU* (I.-MSTAR))
EPS = (1. - C)/(i. - MSTAR*C)
- 2.8-
,Rpetinn I Cfd%];Imdv olrrwwy^se D^oetAmmem - - fN a
Vla
.a.......,u, uw u reriurmance L omarlsons
- 2.9-
C~ifn I - C nnl| invCill Iprfnrrn . P ... • ..
Ol.J,.|I~JI - ~~'JL..7U~ l :--_'uuv a ''E lIillo,.Li ,tU hIIIJ4lI-IsoI)
C *
C TWO METHODS ARE COMPARED: DETAILED SOLUTION OF BASIC HEAT AND MASS TRANS- *
C FER EQUATIONS AND AN EFFECTIVENESS MODEL. THE UNITS UTILIZED WITHIN THIS *
C *
C
REAL NTUO (6),RAS (3),LENTUR
COMMON /DATAS/ DATA(100,9),OUT(100,9),IEXP
DATA NTUO/0.5,1.,I1.5,2.,3.,4./
DATA RAS/0.5,1.,2./
C
C ** OPEN INPUT AND OUTPUT FILES **
C
OPEN(1OFILE='COILCOMPARE.DAT',STATUS='OLD')
OPEN(11,FILE='COILCOMPARE.OUT',STATUS='NEW')
C
C ** LOOP TO READ INPUT DATA **
C
5 READ(10, *,END=100) TDB, TWB, TWI, LE, NTUR
C
C INPUT DATA:
C
C TDB - AMBIENT DRY BULB TEMPERATURE (DEGREES C)
C TWB = AMBIENT WET BULB TEMPERATURE (DEGREES C)
C TWI = INLET TEMPERATURE OF WATER TO COOLING COIL (DEGREES C)
C LE = LEWIS NUMBER
C NTUR - RATIO OF NUMBER OF TRANSFER UNITS FOR WATER FLOW ON INSIDE
C SURFACE TO NUMBER OF TRANSFER UNITS FOR AIR FLOW ON OUTSIDE
C SURFACE
C
C
C ** STORE DATA FOR A RANGE OF COIL PARAMETERS **
- 2.10-
Qaef;nn
a .rr U
I.. ~'uU Cnnling Coil Performne Cnmnn rcnc
LIE3JI I
1
.2.11 -
Qenn7 r~nnlin(a l Pprfnrmna . .. :..
kjc; ,i dlu J.v4,- I
Ia I ILI5,
Iv3 .JIIU t !a
I-1uU
C *
EXTERNAL MODEL
DOUBLE PRECISION X(1),F(1),W(II),DIFF(1),TOL
COMMON /DATAS/ DATA(100,9),OUT(100,9),IEXP
DATA TOL/I.E-05/,DIFF/0.001/
C
C***************** LOOP THROUGH ALL SETS OF COIL DATA *
C
C NOMENCLATURE:
C
C TWB - ENTERING AMBIENT WET BULB TEMPERATURE (DEGREES C)
C TW = WATER TEMPERATURE (DEGREES C)
C TA = AIR TEMPERATURE (DEGREES C)
C TS = SURFACE TEMPERATURE (DEGREES F)
C TDP = AIR DEWPOINT TEMPERATURE (DEGREES C)
C WA = AIR HUMIDITY RATIO
C HA = AIR SPECIFIC ENTHALPY (KJ/KG)
C WW = HUMIDITY RATIO ASSOCIATED WITH SATURATED AIR AT TW
C HW = SPECIFIC ENTHALPY ASSOCIATED WITH SATURATED AIR AT TW (KJ/KG)
C EPST = AIR STREAM TEMPERATURE EFFECTIVENESS
C EPSA = AIR STREAM HEAT TRANSFER EFFECTIVENESS
C
C THE STATES 1 AND 2 REFER TO ENTERING AND EXITING CONDITIONS
C (1=ENTERING, 2 = EXITING) .
C
DO 100 IEXP = I,NEXP
-2.12-
3ec~.tIU
1
L
Cnnl;na rn;l
'-e IE
Parfhrrn*anrAm
V~ % I ulI I J iplue %,.
c
TWB = DATA(IEXP,3)
TWI = DATA(IEXP, 4)
TAl - DATA (IEXP ,5)
CALL PSYCH(1, ITA1,TWB, RHA1,TDPAIWAIHA1)
DATA(IEXP,8) = HAl
DATA(IEXP,9) = WAl
CALL PSYCH ( 1, 1,TW1, TW1,RHW1, TDPWI, WW1, HW1)
C
C ** EFFECTIVENESS-NTU MODEL **
C
CALL EFFEC (TW2, EPSA, TA2, HA2)
EPST = (TAl - TA2) /(TA1 - TWI)
OUT(IEXP,4) = EPSA
OUT(IEXP,5) = EPST
C
C ** DETAILED ANALYSIS **
C
C THE DETAILED COOLING COIL ANALYSIS INVOLVES AN ITERATIVE SOLUTION IN
C TERMS OF THE EXIT WATER TEMPERATURE (TW2). THE EQUATION SOLVER CALLS
C THE SUBROUTINE MODEL AT EACH ITERATION. THE RESULTS OF THE EFFECTIVENESS
C ANALYSIS ARE USED AS AN INITIAL GUESS FOR THIS SOLUTION.
C
X(1) = TW2
CALL SOLVER (IDIFF, X, F, W, MODEL, TOL)
C
TW2 = X(I)
HA2 = OUT(IEXP,I)
TA2 = OUT(IEXP,2)
EPSA = (HAl - HA2)/(HA1 - HW1)
EPST = (TAl - TA2)/(TAI - TWI)
OUT(IEXP,I) = EPSA
OUT(IEXP,2) = EPST
C
10 0 CONTINUE
C
RETURN
END
- 2.13 -
I .qpt;nfl ) Cnnl;na rni Pprfnrmnnr%,o ... ..
7%.. ,',,, l, - ,,...,,,J,,,r-, .,Xjt, t Iva '-veIllaillu " I, UIIUarIsoll
C
SUBROUTINE MODEL (NEQ,X, F)
C
*** **** *** ** ** *** * ** ** * *** ***** ** * *** ****** *** * *** *** * ** ** * ******* *** ***** * * *
C *
C DETAILED MODEL OF A COOLING COIL THAT SOLVES BASIC HEAT AND MASS TRANSFER *
C TEMPERATURE. ,
C *
C
REAL NTUO, NTUI, NTU, LE
DOUBLE PRECISION X(NEQ),F(NEQ)
COMMON /DATAS/ DATA(100,9),OUT(100,9),IEXP
DATA CPW/4.19/,HGO/2501./,CPA/1.012/,CPV/I.805/
DATA TREF/0./,NAREA/30/
C
C ** RETRIEVE INPUT DATA **
C
NTUO = DATA(IEXP,I)
RA = DATA (IEXP, 2)
TWI = DATA(IEXP,4)
TAl = DATA(IEXP,5)
LE = DATA(IEXP, 6)
NTUI = DATA (IEXP,7) *NTUO
HAl = DATA(IEXP,8)
WAl = DATA (IEXP, 9)
C
TW2 = X(1)
C
C ** INITIALIZATIONS **
C
DA = I./NAREA
WA = WAl
HA = HA1
TW = TW2
TA =TAI
NDRY = 0
- 2.14 -
C~nalinaoinl Pprformqnan /mnr; ....
a3 |IUII 1-,..,, I.I..- .,
-%JI. - i % %,,vLi Il I I Ull1,v
C
c ** LOOP THROUGH COIL SECTIONS **
C
C THE COIL IS DIVIDED INTO NAREA SECTIONS. A SIMPLE FORWARD DIFFERENCING
C NUMERICAL INTEGRATION SCHEME IS UTILIZED. THE FIRST SECTION EVALUATED IS
C AT THE AIR INLET.
C
DO 100 I = 1,NAREA
C
C ** DRY ANALYSIS **
C
C ASSUME COIL SECTION IS COMPLETELY DRY
C
CPM = CPA + WA*CPV
CSTAR = CPM/RA/CPW
NTU = NTUO/(i. + NTUO/NTUI*CSTAR)
DWA = 0.
DHA = CPM*NTU*(TW - TA) *DA
DTW = DHA/RA/CPW
TSDRY = TW + CSTAR*NTU/NTUI*(TA - TW)
IF(I .EQ. 1) TS = TSDRY
CALL PSYCH(1, 4,TA, TWBSRHSTDPS,WA, HAS)
IF(TSDRY .GT. TDPS) THEN
TS = TSDRY
NDRY I
ELSE
C
C ** WET ANALYSIS **
C
C SURFACE TEMPERATURE IS LESS THAN DEWPOINT, SO ASSUME COMPLETELY WET
C
CALL PSYCH (I, I,1TW, TW, RHW, TDPW, WW, HW)
CALL PSYCH(1,1,TS,TS,RHS,TDPSWSHS)
HGS = CPV*(TS-TREF) + HGO
DWA = NTUO/LE* (WS - WA) *DA
DHA = NTUO*DA*( (HS-HA) + (WS-WA) *(1./LE-1.) *HGS)
DTW = (DHA - DWA*CPW* (TS-TREF))/RA/CPW
TS =TW - DTW/DA/NTUI
- 2.15 -
I rnnl;na Cnil Pprfnrrnnnro
3A lUll 4'.v ti r . A•a
Us au *aa ui .. uIIIL II ns
END IF
C
C UPDATE AIR AND WATER STATES FOR THIS SECTION
C
WA = WA + DWA
HA = HA + DHA
TW = TW + DTW
CALL PSYCH (1, 6,TA, TWBA, RHA, TDPA, WA, HA)
C
100 CONTINUE
C
C ** FUNCTION EVALUTION **
C
C AT THE SOLUTION, THE WATER TEMPERATURE FOR THE LAST SECTION SHOULD
C MATCH THE INLET WATER TEMPERATURE.
C
F(1) = TWI - TW
C
C ** SET OUTPUTS **
C
OUT(IEXP,1) = HA
OUT(IEXP,2) = TA
OUT (IEXP, 3) = FLOAT (NDRY) /FLOAT (NAREA)
C
RETURN
END
C
C *
C *
C
C CORRELATION FOR SATURATION TEMPERATURE IN TERMS OF SATURATION
C ENTHALPY: CORRELATION IS IN SI UNITS
C
TSAT(HS) -- 5.75904E+00 + 6.58002E-01*HS
- 4.82511E-03*HS**2 + 2.39673E-05*HS**3
- 6.47307E-08*HS**4 + 7.08692E-11*HS**5
C
C EFFECTIVENESS RELATIONS FOR COUNTERFLOW HEAT EXCHANGERS
C
C(NTURATIO) = EXP(-NTU*(1.-RATIO))
EPS(NTU, RATIO) = (1. - C(NTU,RATIO))/(1. - RATIO*C(NTU,RATIO))
C
C ** RETRIEVE INPUT DATA **
C
NTUO = DATA(IEXP,1)
RA = DATA(IEXP,2)
TWB = DATA (IEXP,3)
TWI = DATA(IEXP,4)
TAl = DATA(IEXP,5)
NTUI = DATA(IEXP,7)*NTUO
C
C ** PROPERTIES FOR INLET CONDITIONS **
C
CALL PSYCH(1,ITAITWB, RHTDPWAIfHA1)
CALL PSYCH(I,1,TWITW1,RH1,TDP1,WW1,HW1)
C
C ** DRY ANALYSIS **
C
C INITIALLY ASSUME THAT THE COIL IS COMPLETELY DRY
C
FDRY = 1.
CPM = CPA + WA1*CPV
CSTAR = CPM/RA/CPW
NTUD - NTUJO/ (I. + NTUO/NTUI*CSTAR)
EPSD = EPS(NTUD,CSTAR)
TA2 = TAI - EPSD*(TAI - TWI)
HA2 = HA1. - CPM* (TAI - TA2)
-2.17 -
, tinnI Coolina o ilPrform~ne ... ..
a Aw
11-., v,, - %Vi
, Xu.o ., ,v,&--r ,'tL
Ua ll LII U l ISonl5
WA2 = WAl
TW2 = TWI + (HAl - HA2)/RA/CPW
TS2 = TWI + CSTAR*NTUD/NTUI*(TA2 - TWI)
IF(TS2 .LT. TDP) THEN
C
C ** WET COIL **
C
C THE SURFACE TEMPERATURE AT THE WATER INLET IS LESS THAN THE DEWPONT OF
C THE AIR. ASSUME THAT THE COIL IS COMPLETELY WET.
C
FDRY = 0.
ITER = 0
10 ITER = ITER + 1
TOLD = TW2
CALL PSYCH(1, 1,TW2,TW2,RHW2,TDPW2,WW2,HW2)
CS = (HW2 - HW1)/(TW2 - TWI)
MSTAR = CS/RA/CPW
NTUW = NTUO/(1. + NTUO/NTUI*MSTAR)
EPSW = EPS (NTUW, MSTAR)
HA2 = HAl - EPSW*(HAl - HWl)
TW2 = TWI + (HAl - HA2)/RA/CPW
IF(ABS(TW2 - TOLD) .GT. 1.E-03 .AND. ITER .LT. 20) GOTO 10
TAX = TAl
TS1 = TW2 + CSTAR/CPM*NTUW/NTUI* (HAl - HW2)
IF(TS1 .GT. TDP) THEN
C
C ** PARTIALLY WET AND DRY **
C
C THE SURFACE TEMPERATURE AT THE AIR INLET (WATER OUTLET IS GREATER THAN
C THE DEWPOINT OF THE INLET AIR, SO THE COIL IS PARTIAL WET (EXIT SECTION)
C AND PARTIALLY DRY (AIR INLET SECTION). ITERATIVELY DETERMINE THE FRACTION
C OF THE COIL THAT IS DRY.
C
TWX = TW2
FDRY = 0.
ITER = 0
20 ITER - ITER + 1
TOLD = TW2
-2.18-
t"qnnl;na n "t;I ,"Parfhrr a ^^ . .. ". .
De i !uII4-- n I inn llticzu lkI parII
l r s
- 2.19-
Section 3 Component-Based Optimization Program
- 3.0 -
Qart;nn 'A- Mnin Prnornm
C *
C
Implicit Real*8 (A-H,O-Z)
Integer OptMode
Logical Bounded
Parameter (MaxU = 10, MaxStr= 2, NUmax = 20, NYmax = 50,
0 NPmax = 50, NFmax = 10, NCmax = 10, NMVmax = 10,
0 NMmax = 20, NOmax = 50, MaxInf = 10)
Dimension mapF (NFmax), mapM(NMVmax), mapX (NYmax), Par (NPmax),
& Modes(NMVmax), Info(MaxInfMaxU), U(NUmax),
0 Y(NYmax), Outs(NOmax), RData(NFmax) , F(NFmax),
0 Uopt(NUmax), Yopt(NYmax), Oopt(NOmax)
Common /ModeDat/ NModes, NModeV, ModeV(NMVmax,NMmax)
Common /Limits/ Umin (NUmax), Umax (NUmax)
Common /Tolerance/ CostTol, DerivTol, SolnTol
C
C********* Set Tolerances for optimization and solution of equations *
C
CostTol = l.e-06
DerivTol = 1.e-06
SolnTol = 1.e-08
C
C************************** Get Input Description *****************************
C
C Descriptions of the data are given in the Input subroutine.
C
Call Input(Ntimes, *Nunits, NData, Par, mapF, mapM, mapX,
*Info, U, Y)
C
C** Total Number of Uncontrolled, Discrete Control, Continuous Control,
-3.1-
Q ^41% r1k I
91% Main Prorm 1-
IC
NFmap= Info(4, Nunits+1) - 1
NMmap = Info(5, Nunits+1) - 1
NU = Info(6, Nunits+1) - 1
NY = Info(8, Nunits+1) - 1
NO = Info(9, Nunits+1) - 1
C
*************************** Main Loop over Time ******************************
C
Do 200 itime 1,Ntimes
C
C------- Read New Data and Copy into Sequential List for Components
C
If(Ndata .gt. 0 .and. NFmap .gt. 0) Then
Call Reader(Ndata, RData)
Call CopyF(NFmap, mapF, RData, F)
Endif
C
C------------------ Costs for First Discrete Control Mode
C
OptMode = 1
C
C** Copy initial values of mode variables into sequential list for components *
C
If(NMmap .gt. 0) Then
Call Copy_Modes(OptMode, NMmap, mapM, Modes)
Endif
C
C** Determine costs associated with optimal continuous control variables **
C
Call Costs(Nunits, Par, F, Modes, mapX, Info, U, Y, Outs,
• OptCost, Penalty, Bounded)
Do 10 i = I,NU
Uopt(i) = U(i)
10 Continue
Do 20 i = 1,NO
Oopt(i) = Outs(i)
-3.2-
Codf;nn I UnI'o;n Pr,-n,-far"
~j~~.,LI~)uE .- ' &'iutii I uu~taaum I
20 Continue
If (.not. (Bounded)) Then
OptCost = l.e+30
Endif
C
If(NModes .gt. 1) Then
- 3.3-
Section 3 Main Program
200 Continue
End
3.4.
Qatt;nn
jjC%;|IVI|
I
- 0Ju
T/(") IDAllvt;nnc
\ U|I¢
C *
C
Subroutine Input(Ntimes, Nunits, NData, Par, mapF, mapM,
mapX, Info, U, Y)
Implicit Real*8 (A-H,O-Z)
Parameter (MaxU = 10, MaxStr = 2, NUmax = 20, NYmax = 50,
NPmax = 50, NFmax = 10, NCmax = 10, NMVmax = 10,
• NMmax = 20, NOmax = 50, MaxInf = 10)
Dimension Par(NPmax), mapF (NFmax), mapM(NMVmax), mapX(NYmax),
• Info(MaxInfMaxU), U(NUmax), X(NYmax), Y(NYmax)
Dimension NTF (MaxU), NTP (MaxU), NTM(MaxU), NTU(MaxU), NTC (MaxU),
0 NTS (MaxU), NTO (NOmax)
Dimension InUnit (MaxStr,MaxU), InNum(MaxStr,MaxU),
• IUOut(NOmax), IVOut(NOmax)
Common /ModeDat/ NModes, NModeV, ModeV(NMVmax,NMmax)
Common /Limits/ Umin(NUmax), Umax(NUmax)
Common /Tears/ NTears, mapT(NYmax)
Common /Print/ NPrt, NOuts(5), ListO(10,5)
C
S********************* Get information concerning Types **********************
C
C NTypes number of total types available
C NStrV - number of stream variables within a stream
C NTP number of parameters for each type
C NTF - number of forcing functions for each type
C NTM number of mode variables for each type
C NTU - number of continuous control variables for each type
C NTC - number of equality constraints for each type
C NTS - number of streams for each type
C NTO - number of component outputs for printer (not stream variables)
C
NTypes = 6
NStrV = 2
-3.5 -
qIRptinn3 T/O"Rontine,
C
C-------------------- Initial Call to Components Gets Info
C
Do 9 itype = 1,NTypes
Info(l, itype) - 0
goto (1, 2, 3, 4, 5, 6) ,itype
1. Call Typel(Info(l, itype))
goto 7
2 Call Type2(Info(l, itype))
goto 7
3 Call Type3(Info(l,itype))
goto 7
4 Call Type4(Info(l,itype))
goto 7
5 Call Type5 (Info (1,it-ype) )
goto 7
6 Call Type6(Info(litype))
7 Continue
NTP(itype) = Info(3,itype)
NTF(itype) = Info(4, itype)
NTM(itype) = Info(5,itype)
NTU(itype) = Info(6,itype)
NTC(itype) = Info(7,itype)
NTS(itype) = Info(8,itype)
NTO(itype) = Info(9,itype)
9 Continue
c
************************* Get System Descripton *
C
C---------------------------- General Simulation Data
C
C Ntimes - number simulation timesteps
C Nunits - number of total components
C NData - number of forcing function data items to be read each time
C NModeV - number of discrete control (mode) variables
C NModes - number of possible combinations of mode variables
C ModeV - two-dimensional array of mode variables for each possible
C mode
- 3.6-
I (atnIn T/l') 12,.v,,1;,.,a,
IUutlllcb
C
Read(10,*) Ntimes, Nunits, NData
Read(10,*) NModeV, NModes
If(NModeV .gt. 0 .and. NModes .gt. 0) Then
Do 11 j = 1,NModes
Read(10,*) (ModeV(ij),i=lNModeV)
11 Continue
Endif
C
C** Intialize pointers to data **
C
Do 12 i = 3,9
Info(i,i) = 1
12 Continue
C
C----------------------- Data Concerning Each Component
C
C iu - unit number
C itype - type number
C
Do 30 iunit = 1, Nunits
Read(10,*) iu, itype
Info (liunit) = iu
Info(2,iunit) = itype
C
C** Component Parameters **
C
C ipP - pointer in Par array to parameters for iunit
C
ipP = Info(3,iunit)
Info(3, iunit+l) = ipP + NTP(itype)
If(NTP(itype) .gt. 0) Then
Read(10,*) (Par(i),i=ipP,ipP+NTP(itype)-l)
Endif
C
C ipF - pointer in F array to forcing function data for iunit
C mapF - mapping between F array and data items read each time
- 3.7 -
Section 3 1/(0 Rmntinpo.
C mapF(i) gives the data item associated with the ith position
C in the F array
C
ipF = Info(4, iunit)
Info(4, iunit+1) = ipf + NTF(itype)
If(NTF(itype) .gt. 0) Then
Read(10,*) (mapF(i),i=ipf,ipf+NTF(itype)-l)
Endif
C
C** Discrete Control Mode Data **
C
C ipM - pointer in Modes array to mode data for iunit
C mapM - mapping between Modes array and list of mode variables
C mapM(i) gives the mode variable associated with the ith
C position in the Modes array
C
ipM - Info(5,iunit)
Info(5,iunit+1) = ipM + NTM(itype)
If(NTM(itype) .gt. 0) Then
Read(10,*) (mapM(i), i=ipMipM+NTM(itype)-1)
Endif
C
C** Continuous Control Data **
C
C ipU - pointer in U array to continuous control varibles for iunit
C U - initial values of continuous controls
C Umin - minimum value of continous controls
C Umax - maximum values of continous controls
C
ipU = Info(6,iunit)
Info(6,iunit+l) = ipU + NTU(itype)
If(NTU(itype) .gt. 0) Then
Do 15 i - ipU, ipU+NTU(itype)-I
Read(10,*) U(i), Umin(i), Umax(i)
15 Continue
Endif
- 3.8-
Spetion _3 T/O Rmitinpr.
C
C** Stream Data **
C
C ipX - pointer in X array to output stream variables for iunit
C InUnit - unit number providing inputs to iunit
C InNum - number of output stream providing inputs
C X - initial value of input stream variables
C
ipX = Info(8,iunit)
Info(8,iunit+l) = ipX + NStrV*NTS(itype)
Do 20 i = l,NTS(itype)
ipX = ipX + (i-1)*NStrV
Read(10,*) InUnit(i,iunit), InNum(i, iunit)
Read(10,*) (X(j), j = ipX, ipX+NStrV-1)
20 Continue
C
C************************ Pointers to Component Outputs *
C
ipO = Info(9,iunit)
Info(9,iunit+l) = ipO + NTO(itype)
C
30 Continue
C
******************************** Tear Streams *********************************
C
Read(10,*) NTears
If(NTears .gt. 0) Then
Do 40 i = l,NTears
Read(10, *) iunit, istr,ivar
mapT(i) = Info(8,iunit)+ NStrV*(istr-1) + ivar - 1
40 Continue
Endif
C
*** **********~~******** Printer Output List * ** * *** * * ********* ** ****** *** *
C
Read(10,*) NPrt
If(NPrt .gt. 0) Then
NPrt -- Min0(NPrt,5)
Do 55 iprt = l,NPrt
-3.9 -
Spetion 3 - T/O Rntitinoc
Read(10,*) NOuts(iprt)
If(NOuts(iprt) .gt. 0) Then
Read(10,*) ((IUOut(i), IVOut(i)), i = 1,NOuts(iprt))
Do 50 i =1,NOuts(iprt)
iu = IUOut(i)
num= 0
45 num = num + 1
If(iu .ne. Info(l,num) .and. num .1t. Nunits) goto 45
ipO -=Info(9,num)
ListO(i, iprt) = ipO + IVOut(i) - 1
50 Continue
Endif
55 Continue
Endif
C
C********************* Determine Pointers for Input Mapping *
C
C mapX - mapping between Y array and X array
C mapX(i) gives the position in Y associated with the ith
C position in the X array
C
Do 100 iunit = 1, Nunits
itype = Info(2,iunit)
Do 80 i 1, NTS(itype)
InU = InUnit(i,iunit)
num= 0
60 num = num + 1
If(InU .ne. Info(1,num) .and. num .1t. Nunits) goto 60
If(InU .eq. Info(1,num)) Then
ipX = Info(8,iunit) + (i-l)*NStrV
ipY = Info(8,num) + (InNum(i,iunit)-l)*NStrV
Do 70 j = 1,NStrV
mapX(ipX+j-1) = ipY + j - 1
Y(ipY+j-1) = X(ipX+j-1)
70 Continue
Endif
80 Continue
100 Continue
- 3.10-
Cae, f.; n n I - - 1i'l Dne..,m.c
63(eKtiull j__-* - IIL" LUutlllul-,
C
Return
End
C
********************** Read Data as a Function of Time ************************
C
Subroutine Reader(Ndata, RData)
Implicit Real*8 (A-H,O-Z)
Dimension RData (NData)
C
C** Read Next Set of Data Values **
C
Read(11,*) (RData(i),i=1,Ndata)
C
Return
End
C
C************* Copy Data into Sequential List for Components *
C
Subroutine Copy_F(Nmap, mapF, RData, F)
Implicit Real*8 (A-H,O-Z)
Dimension RData(1), mapF(Nmap), F(Nmap)
C
Do 10 i = 1,Nmap
ipf = mapF(i)
F(i) = RData(ipf)
10 Continue
C
Return
End
C
C************************ Mode Array for All Components ***********************
C
Subroutine CopyModes(Mode, Nmap, mapM, Modes)
Implicit Real*8 (A-H,O-Z)
Parameter (NMmax = 20, NMVmax = 10)
Dimension mapM (Nmap), Modes (Nmnap)
Common /ModeDat! NModes, NModeV, ModeV(NMVmax, NMmax)
- 3.11 -
.qpetinn I 1/0'. Ron,cn
Lrtinla3-YI/O R L411 %gn
Do 10 i = 1,Nmap
ipm = mapM (i)
Modes (i) = ModeV (ipm, Mode)
10 Continue
C
Return
End
C
********************** *** Optimization Output *****************************
C
Subroutine Printer(itime, NU, NY, Mode, U, Y, Outs, Cost, Penalty)
.Implicit Real*8 (A-H,O-Z)
Parameter (MaxU = 10, MaxStr = 2, NUmax = 20, NYmax = 50,
.. NPmax = 50, NFmax = 10, NCmax = 10, NMVmax = 10,
NMmax = 20, NOmax = 50, MaxInf = 10)
Dimension U(NUmax), Y(NYmax), Outs (NOmax), Output (NOmax)
Common /Print/ NPrt, NOuts(5), ListO(10,5)
C
C********* Print All Controls, Optimal Cost, and Constraint Penalty ***********
C
Write(12,1001) itime, Mode, (U(i) ,i=l,NU), Cost-Penalty, Penalty
C
C********************* Output User Specified Outputs *
C
If(Nprt .gt. 0) Then
Lu = 12
Do 20 iprt = 1, NPrt
Lu = Lu + 1
If(NOuts(iprt) .gt. 0) Then
Do 10 i = 1,NOuts(iprt)
ipO = ListO(iiprt)
Output(i) = Outs(ipO)
10 Continue
Write(Lu, 1002) itime, (Output(i),i1l,NOuts(iprt))
Endif
20 Continue
Erndif
- 3.12 -
'Retinn3 1/0'
~otiuln 3 I/OI R n,,tinp.
RnAVU LItInC3 I
-3.13 -
Q-lf;n qtead v-Sqta tp nti;75.1tinn
C *
C This routine determines the costs associated with the current modes of *
C *
C
Subroutine Costs(Nunits, Par, F, Modes, mapX, Info, U, Y, Outs,
Cost, Penalty, Bounded)
Implicit Real*8 (A-H,O-Z)
Parameter (MaxU = 10, MaxStr= 2, NUmax = 20, NYmax = 50,
• NPmax = 50, NFmax = 10, NCmax = 10, NMVmax 1=0,
• NMmax = 20, NOmax = 50, MaxInf = 10)
Logical Debug, Converge, First, Bounded, UFixed(NUmax)
Dimension Par(NPmax), F (NFmax), Modes (NMVmax), mapX(NYmax),
* Info-(MaxInf,MaxU), U(NUmax), X(NYmax), Y(NYmax),
* Outs(NOmax) , UO(NUmax), UM(NUmax)o, GO(NCmax),
* dGdU (NCmax,NUmax)
Common /CostDat/ AA(NUmaxNUmax), BB(NYmax,NYmax),
CC(NYmax,NUmax), p(NUmax), q(NYmax), r(MaxU)
Common /ConDat/ alpha (NCmax), Beta (NCmax,NUmax)
Common /SolDat/ YO(NYmax), dYdU(NYmax, NUmax), Ahat(NUmax, NUmax),
bhat (NUmax), chat, Ainv(NUmax,NUmax)
Common /Constr/ GC(NCmax)
Common /Limits/ Umin (NUmax), Umax (NUmax)
Common /Tolerance/ CostTol, Deriv Tol, Soln Tol
Data imax/50/, First/.True./
C
diff = DerivTol
Tol = CostTol
Debug = .False.
C
C******** Total Number of controls, constraints, and stream variables *********
C
NU = Info (6,Nunits+1) - 1
NC = Info(7,Nunits+1) - 1
NY = Info (8,Nunits+1) - 1
-3.14-
qpvwtinn
kjv -,..Vl
-3
j
Steadv-,lRt.itpOnf;m;,7-af;nn
- _ 1,
T.... JLrLULItl IIJIUil
NO = Info(9,Nunits+l) - 1
C
********* Loops for Determining Optimal Control ******
C
C-------------- Iterative loop for updating quadratic cost models
C
iter = 0
Cost = 0.0
10 Continue
iter = iter + 1
CostL = Cost
C
C--------------------------- Determine Current Costs
C
If(NU .gt. 0) Then
C
C - ** Get Initial Cost On First Call **
C
If(First) Then
Call Solve(Nunits, Par, F, Modes, mapX, Info, U, Y,
Outs, Cost, Penalty)
Do 12 i = 1,NU
UO(i) = U(i)
12 Continue
First = .False.
C
C ** Use Polynomial Interpolation In Search Direction **
C
Else
Call Solve(Nunits, Par, F, Modes, mapX, Info, U, Y,
Outs, Cost, Penalty)
iloop= 0
13 iloop = iloop + 1
Do 15 i = I,NU
UM(i) = (U(i) + UO(i))/2.
15 Continue
Costl = CostL
Call Solve(Nunits, Par, F, Modes, mapX, Info, UM, Y,
- 3.15 -
.qpetion -13 c~L~auy-~tiuLe uorlmlzaripn
j - ...... teauy-atate UDIti mlzationl
- 3.16-
'Roetinn -1 Steadv-,'tqtp ntiri7Tqtinn
C
Do 25 i = 1,NY
YO(i) = Y(i)
25 Continue
Do 30 i = 1,NC
G0(i) = GC(i)
30 Continue
Do 45 j = 1,NU
dU = Dmaxl(diff*U(i),diff)
U(j) = U(j) + dU
Call Solve(Nunits, Par, F, Modes, mapX, Info, U, Y,
Outs, Costj, Penj)
U(j) = U(j) - dU
Do 35 i = 1,NY
dYdU(ifj) = (Yfi) - YO(i))/dU
Y(i) = Y0(i)
35 Continue
If(NC .gt. 0) Then
Do 40 i - 1,NC
dGdU(i, j) = (GC(i) - GO(i))/dU
GC(i) = GO(i)
40 Continue
Endif
45 Continue
C
Do 50 i = 1,NY
Do 50 j = 1,NU
YO(i) = Y0(i) - dYdU(i, j)*UO(j)
50 Continue
C
C ** Constraint Equation: G = alpha + Beta*u **
C
If(NC .gt. 0) Then
Do 60 i- = ,NC
alpha(i) = GO(i)
Do 55 j = I,NU
alpha(i) = alpha(i) - dGdU(i,j)*U0(j)
Beta(i, j) = dGdU(i, j)
- 3.17-
C!,m^+;fn 'A
L3eL lUi -LJQ L5.5- -JL L UL IIillfLIUil
55 Continue
60 Continue
Endif
C
C--------------------- Optimal Continuous Control Variables
C
C
C ** Quadratic Cost Terms**
C
Call Coef (Nunits, Info, NU, NC, NY)
C
C ** Terms for Quadratic Penalty Function from Linearized Constraints **
C
Do 210 i -- ,NU
Do 210 j = 1,NU
Do 210 k= 1,NC
Ahat(ij) - Ahat(ij) + Beta (k,i)*Beta (k,j)
210 Continue
Do 220 i = 1,NU
Do 220 j = 1,NC
bhat(i) = bhat(i) + 2.*Beta(ji)*alpha(j)
220 Continue
Do 230 i = 1,NC
chat - chat + alpha(i)*alpha(i)
230 Continue
C
C ** Get inverse of matrix of coefficients to quadratic terms **
C
Do 310 i = 1,NU
Do 310 j = INU
Ainv(i,j) = Ahat(i,j) + Ahat(ji)
310 Continue
Call Dinvert (NUmax, NU,, Ainv, if lag)
If(iflag .ne. 0) Then
Write(*, *) 'Ahat not invertible'
Write(*,*) ' Ahat ='
Do 311 i = I,NU
Write (*, *) (Ahat (i, j) ,j=,NU)
311 Continue
- 3.18 -
Ch2' ;9%i
I 3-ectJI.L Y 5 Ya7lULta rz Lt IIlplaijJI
Stop
Endif
C
C
C--------------------- Optimization with Equality Constraints
C
Call Optimize(NC, NU, U)
C
If(Debug) Then
Write(*,*) 'Unconstrained U = ',(U(i),i=1,NU)
Endif
C
C--------------------------- Inequality Constraints
C
C ** Add to Constraints if Controls Outside Limits **
C
NFixed = NC
Do 320 i = 1,NU
UFixed(i) = .False.
320 Continue
330 Nold = NFixed
Do 340 i = 1,NU
If(.not.(UFixed(i)) .and. U(i) .lt. Umin(i)) Then
U(i) = Umin(i)
UFixed(i) = .True.
NFixed = NFixed + 1
alpha(NFixed) = -Umin(i)
Beta(NFixed,i) = 1.0
Endif
If(.not.(UFixed(i)) .and. U(i) .gt. Umax(i)) Then
U(i) - Umax(i)
UFixed(i) = .True.
NFixed = NFixed + 1
alpha(NFixed) = Umax(i)
Beta(NFixed, i) = -1.0
Endif
340 Continue
C
- 3.19-
Qad-fl*nn I -
C
If(NFixed .gt. NU) Then
Write(*,*) 'Warning: Constraints not Satisfied'
Else
C
If(NFixed .ne. Nold) Then
C
C ** Redo Constrained Optimization **
C
Call Optimize(NFixed, NU, U)
If(Debug) Then
Write(*,*) 'Constrained U = ' (U(i) i-i NU)
Endif
goto 330
Endif
C
Endif
goto 10
Endif
Endif
C
If (.not. (Converge)) Then
Write(*,*) ' Optimization Loop not Converged: Ck- ',Ck
Endif
C
C----------------------------- Check Total Cost
C
If(Debug) Then
CostCk = chat
If(NU .gt. 0) Then
Do 410 i- 1,NU
CostCk = CostCk + bhat (i) *UJ(i)
temp = 0.0
Do 400 j = I,NU
temp - temp + Ahat(i, j)*UJ(j)
400 Continue
CostCk = Cost Ck + U(i)*temp
410 Continue
- 3.20 -
I petonnI,. I,Rtpndv..Iqtqtp Ont;vn;,vn+,oyr%
Endif
Write(*,*) 'Cost Check = ',CostCk
Endif
C
* ** Check for Controls Within Bounds *
C
Bounded .True.
=
Do 420 i = 1,NU
If( U(i) .lt. (Umin(i)-Tol) .or. U(i) .gt. (Umax(i)+Tol) ) Then
Bounded = .False.
Endif
420 Continue
C
Return
End
C
************************** Constrained Optimization *
C
Subroutine Optimize(NC, NU, U)
Implicit Real*8 (A-H,O-Z)
Parameter (MaxU = 10, MaxStr = 2, NUmax = 20, NYmax = 50,
* NPmax = 50, NFmax = 10,NCmax = 10, NMVmax = 10,
* NMmax = 20, MaxInf = 10)
Real*8 U(NUmax), Y(NYmax), Lamdah(NCMax)
Common /SolDat/ YO(NYmax), dYdU(NYmax,NUmax), Ahat(NUmax, NUmax),
bhat(NUmax), chat, Ainv(NUmax,NUmax)
C
Call Lagrange(NC, NU, Lamdah, iflag)
If(iflag .eq. 0) Then
Do 10 i - 1,NU
U(i) = 0.0
Do 10 j = 1,NU
U(i) = U(i) - Ainv(i, j)*(bhat(j) - Lamdah(j))
10 Continue
Endif
Return
End
- 3.21 -
cnd,4.1*lnn I CtPI('fV..qtritp ()nf;rn;-sniP;iin
C
Subroutine Lagrange(NC, NU, Lamdah, iflag)
Implicit Real*8 (A-HO-Z) A
Parameter (MaxU = 10, MaxStr = 2, NUmax = 20, NYmax = 50,
* NPmax = 50, NFmax = 10,NCmax = 10, NMVmax = 10,
* NMmax = 20, MaxInf = 10)
Real*8 Lamdah(1), Lamda (NCmax), Linv(NCmaxNCmax)
Dimension tempm(NCmaxNUmax), tempv(NCmax)
Common /ConDat/ alpha(NCmax), Beta(NCmaxNUmax)
Common /SolDat/ YO(NYmax), dYdU(NYmax,NNUmax), Ahat(NUmaxNUmax),
bhat(NUmax), chat, Ainv(NUmax,NUmax)
C
Do 5 i = INU
Lamdah(i) = 0.0
5 Continue
If(NC .gt. 0) Then
C
C---------------------------- Lagrange Multipliers-----------------------------
C
Do 20 i = 1,NC
tempv(i) = -alpha(i)
Do 20 j = INU
tempm(i,j) = 0.0
Do 15 k = 1,NU
tempm(i,j) = tempm(i,j) + Beta(ik)*Ainv(kj)
15 Continue
tempv(i) = tempv(i) + tempm(i,j)*bhat(j)
20 Continue
Do 30 i - 1,NC
Do 30 j - INC
Linv(i,j) = 0.0
Do 30 k = 1,NUJ
BTkj - Beta(j,k)
Linv(i, j) = Linv(i,j) + tempm(i,k)*BTkj
30 Continue
Call Dinvert(NCmax, NC, Linv, if lag)
If(iflag .ne. 0) Then
- 3.22-
fin I .qtPnfiv..qfnta Ont;mv*-Ynf;nn
C *
C Routine for determining coefficients of continuous cost function. *
C *
C
Subroutine Coef(Nunits, Info, NU, NC, NY)
Implicit Real*8 (A-H, O-Z)
Parameter (MaxU = 10, MaxStr = 2, NUmax = 20, NYmax = 50,
. NPmax = 50, NFmax = 10, NCmax = 10, NMVmax = 10,
* NMmax - 20, NOmax = 50, Maxlnf = 10)
Dimension Info (Maxlnf,MaxU), tempm(NYmax, Numax), tempv(NUmax)
Common /CostDat! AA (NUmax, NUmax), BB (NYmax, NYmax),
• ~CC
(NYmax, NUmax), p (NUmax), q(NYmax) , r (MaxU)
Common /SolDat! Y0O(NYmax) , dYdU (NYmax, NUmax), Ahat (NUmax, NUmax) ,
• bhat (NUmax), chat, Amny (NUmax, NUmax)
Common /Con_Dat! alpha (NCmax) , Beta (NCmax, NUmax)
-3.23 -
Q'-arf;inn Ii
L ~ ~~ ~ ~ ~ ~ ~ ~ I
~ ~ Sqteadv.,Stntp
"'l~ m ~ fl|,V
(Ontimi7-qtinn
X-LJ
,|IL,|iV
I IIt
I ILIiV 1I I
C
*********************** Overall Quadratic Cost Function **********************
C
C** Quadratic term **
C
Do 20 i = INY
Do 20 j = 1,NU
tempm(i,j) = 0.0
Do 15 k = 1INY
tempm(i,j) = tempm(i, j) + BB (i, k) *dYdU (k,j)
15 Continue
tempm(i, j) - tempm(i,j) + CC(i, j)
20 Continue
Do 40 i = INU
Do 40 j = 1,NU
Ahat(i, j) = AA(ij)
Do 30 k = I,NY
dYdUT = dYdU(k,i)
Ahat(i,j) - Ahat(i,j) + dYdUT*tempm(k, j)
30 Continue
C If(NC .gt. 0) Then
C Do 35 k=INC
C BetaT = Beta(k,i)
C Ahat(ij) - Ahat(ij) + BetaT*Beta(k,j)
C35 Continue
C Endif
40 Continue
C
C** Linear term **
C
Do 50 i = INY
tempv(i) = 0.0
Do 45 j = 1,NY
BBTij = BB(ji)
tempv(i) - tempv(i) + BBTij*Y0O(j)
45 Continue
tempv(i) = 2.0*tempv(i) + q(i)
50 Continue
- 3.24 -
£qPhehfl
I~.7'.. ~ LI 'J**
-I 19teadv.-Statp Oi n;r;7 t ;nn
~..~IFI.tIE5IJ~.lLI~JII I
Do 70 i = 1,NU
bhat(i) = p(i)
Do 55 j = 1,NY
dYdUT = dYdU(ji)
CTij = CC(ji)
bhat(i) = bhat(i) + dYdUT*tempv(j) + CTij*Y0(j)
55 Continue
C If(NC .gt. 0) Then
C Do 60 j= INC
C bhat(i) = bhat(i) + 2.*alpha(j)*Beta(j,i)
C60 Continue
c Endif
70 Continue
c
C** Constant Term **
c
chat = 0.0
Do 80 iunit = l,Nunits
iu = Info(i,iunit)
chat = chat + r(iu)
80 Continue
Do 90 i INY
temp = 0.0
Do 85 j = 1,NY
temp = temp + Y0(j)*BB(ji)
85 Continue
chat = chat + (temp + q(i))*Y0(i)
90 Continue
C If(NC .gt. 0) Then
C Do 100 i= 1,NC
C chat = chat + alpha(i)*alpha(i)
ClO Continue
C Endif
C
Return
End
C
C******************* Initialize Coefficients of Cost Function *****************
- 3.25-
Qapf;nn 'A
omaux.:QUA -L.C 'k-Intimization
Do 20 j -1,NY
BB(ij) = 0.0
20 Continue
C
Do 30 i = INY
Do 30 j = 1,NU
CC(i,j) = 0.0
30 Continue
C
Do 40 i = 1,NU
p(i) - 0.0
40 Continue
C
Do 50 i = 1,NY
q(i) = 0.0
50 Continue
C
Do 60 iunit = l,Nunits
iu -- Info(l,iunit)
r(iu) - 0.0
60 Continue
- 3.26 -
qpeti~n - IS teadv-Stntp Ont;mi*i-Fat;nn
a
, .K.,,lra "" %0," ILWT 716.7tgiV| %./WtlII 11, aitI II
C
Do 70 i - lNCmax
Do 70 j = 1,NU
Beta(i,j) = 0.0
70 Continue
C
Do 80 i = l,NCmax
alpha(i) = 0.0
80 Continue
C
Return
End
- 3.27 -
71LJ
p,-tnnI
.
.Rvctam
-I L I.
1%4nrial
15 iIUUei
C *
C optimization algorithm. *
C *
C
Subroutine Solve(Nunits, Par, F, Modes, mapX, Info, U, Y,
Outs, Cost, Penalty)
Implicit Real*8 (A-H,O-Z)
Logical Converge
Parameter (MaxU = 10, MaxStr = 2, NUmax = 20, NYmax = 50,
* NPmax = 50, NFmax = 10, NCmax = 10, NMVmax = 10,
0 NMmax = 20, NOmax = 50, MaxInf = 10)
Dimension Par(NPmax), F (NFmax), Modes (NMVmax), mapX(NYmax),
& Info (MaxInfMaxU), U(NUmax), X(NYmax), Y(NYmax),
0 Outs(NOmax), Xold(NYmax), Xnew(NYmax), Yold(NYmax),
0 Gnew(NYmax), Gold(NYmax)
Common /Tears/ NTears, mapT(NYmax)
Common /Tolerance/ CostTol, Deriv Tol, SolnTol
Data imax/50/
C
Tol = SolnTol
NY = Info(8,Nunits+1) - 1
C
C***** Secant Method Solution to Output Stream Variables: No Interactions *****
C
C
C** Call model of system to get initial results **
C
Do 2 i - INY
Yold(i) =- Y(i)
2 Continue
Call System(Nunits, Par, F, Modes, mapX, Info, U, Y, Outs,
* Cost, Penalty)
iter = 0
- 3.28-
lqpetinn -3 .qvctam lncil
C-----------------------------Iterative Loop
5 iter = iter + 1
C
C** Define residuals for specified tear stream variables **
C
Do 10 i = 1,NTears
ipT = mapT(i)
ipx --mapX(ipT)
Xold(i) = Yold(ipx)
Xnew(i) = Y(ipx)
Gold(i) -- Y(ipx) - Yold(ipx)
10 Continue
Do 15 i = INY
Yold(i) Y(i)
15 Continue
C
C** Call Model of the System **
C
Call System(Nunits, Par, F, Modes, mapX, Info, U, Y, Outs,
Cost, Penalty)
C
C** Apply One-Dimensional Secant Method to Each Tear Variable **
c
Do 20 i = l,NTears
ipT = mapT(i)
ipx = mapX(ipT)
Gnew(i) = Y(ipx) - Yold(ipx)
If (dabs(Xnew(i) - Xold(i)) .gt. Tol) Then
dGdX = (Gnew(i) - Gold(i))/(Xnew(i) - Xold(i))
If (dabs (dGdX) .gt. Tol) Then
Y(ipx) - Y(ipx) - Gnew(i)/dGdX
Endif
Endif
20 Continue
C
C** Check Convergence **
c
Converge = .True.
-3.29 -
Section 3-- System Model
Do 50 i = 1,NY
Converge = Converge .and.
dabs(Y(i) - Yold(i))/Y(i) .lt. Tol
50 Continue
C
If(.not.(Converge) .and. iter .1t. imax) goto 5
If (.not. (Converge)) Then
Write(*,*) ' Process equations not converged'
Endif
C
Return
End
C
C *
C System Model: Components and Connections *
C *
C
Subroutine System(Nunits, Par, F, Modes, mapX, Info, U, Y,
Outs, Cost, Penalty)
Implicit Real*8 (A-H,O-Z)
Parameter (MaxU = 10, MaxStr = 2, NUmax = 20, NYmax = 50,
* NPmax = 50, NFmax = 10, NCmax = 10, NMVmax = 10,
* NMmax = 20, NOmax = 50, MaxInf = 10)
Dimension Par(NPmax), F(NFmax), Modes(NMVmax), mapX(NYmax),
* Info(MaxInfMaxU) , U(NUmax) , X(NYmax)0, Y(NYmax),
0 Outs(NOmax), Costi(MaxU)
Common /Constr/ GC(NCmax)
C
C******** Total Number of controls, constraints, and stream variables *********
C
NU-= Info(6,Nunits+l) - 1
NC-= Info(7,Nunits+l) - 1
NY = Info(8,Nunits+l) - 1
C
C----------------Initialize cost coefficients-------------
C
Call Initialize(Nunits, Info, NU, NC, NY)
- 3.30.
Setinn 3 .,yv .-- i vr_p u
C
C------------------------ Loop through all components
C
Do 250 iunit - 1,Nunits
itype = Info(2,iunit)
ipp = Info(3,iunit)
ipf = Info(4,iunit)
ipm = Info(5,iunit)
ipu = Info(6, iunit)
ipY = Info(8,iunit)
ipO = Info(9,iunit)
NYi = Info(8,iunit+l) - ipY
NUi = Info(6,iunit+l) - ipu
NOi = Info(9,iunit+l) - ipo
Do 50 i =1, NYi
ipx = mapX(ipY+i-1)
X(ipY+i-l) = Y(ipx)
50 Continue
C
C** Branch according to Type **
C
goto (110, 120, 130, 140, 150, 160) ,itype
C
110 Call Typel(Info(liunit), Par(ipp), F(ipf), Modes(ipm),
U(ipu), X(ipY), Y(ipY), Outs(ipO), Costi(iunit))
goto 200
C
120 Call Type2(Info(1, iunit), Par(ipp), F(ipf), Modes(ipm),
U(ipu), X(ipY), Y(ipY), Outs(ipO), Costi(iunit))
goto 200
C
130 Call Type3(Info(1,iunit), Par(ipp), F(ipf), Modes(ipm),
U(ipu), X(ipY), Y(ipY), Outs(ipO), Costi(iunit))
goto 200
C
140 Call Type4(Info(l, iunit), Par(ipp), F(ipf), Modes(ipm),
UJ(ipu), X(ipY), Y(ipY), Outs (ipO), Costi(iunit))
goto 200
-3.31 -
qetinn-1 ,Rvqtpm Mndpl
C
150 Call Type5(Info(l,iunit), Par(ipp), F(ipf), Modes(ipm),
U(ipu), X(ipY), Y(ipY), Outs(ipO), Costi(iunit))
goto 200
C
160 Call Type6(Info(1,iunit), Par(ipp), F(ipf), Modes(ipm),
U(ipu), X(ipY), Y(ipY), Outs(ipO), Costi(iunit))
goto 200
C
200 Continue
C
250 Continue
C
C---------------------------- Determine Total Costs
C
Cost = 0.0
Do 300 iunit = l,Nunits
Cost = Cost + Costi(iunit)
300 Continue
C
C-------Add Costs Associated with Penalty Function Applied to Constraints
C
Penalty - 0.0
Do 400 i - 1,NC
Penalty = Penalty + GC(i)*GC(i)
400 Continue
Cost = Cost + Penalty
C
Return
End
- 3.32 -
CQ. t; nI Cnmnnnavi+ MeAalo
acuti.l -Y %-VtlJiy;llt |VlIIeI
C
******* * ************************* Type 1 ************************************
C
C ** COOLING TOWER **
C
Subroutine Typel(Info, Par, F, Modes, U, X, Y, Out, Power)
Implicit Real*8 (A-H,O-Z)
Real*8 mwi, mwo, mwl, ma, mamax
Parameter (MaxU = 10, NUmax = 20, NYmax = 50, NCmax = 10)
Parameter (mamax 2.85e06, Pmax = 100.)
Dimension Info(1), F(1), Modes(1), U(1), X(1), Y(1), Out(1)
Common /CostDat/ AA(NUmax,NUmax), BB(NYmax,NYmax),
. CC(NYmax,NUmax), p(NUmax) , q(NYmax) , r(MaxU)
C
C-------------------------- Type Info on First Call---------------------------
C
If(Info(1) .eq. 0) Then
Info (3) = 0 Number of Parameters
Info(4) = 2 Number of Forcing Function Variables
Info (5) = 1 Number of Mode Variables
Info(6) = 1 Number of Continuous Control Variables
Info (7) - 0 Number of Constraints
Info(8) = 1 Number of Streams
Info (9) - 3 Number of Outputs
Return
Endif
C----------------------------------- Costs
C
C** Fan Power Model **
C
C Power = Ncells*(a0 + al*gama + a2*gama*gama)*Pmax
C
Ncells = Modes (1) Number of tower cells operating
gama = U (1) Relative tower cell air flow rate
aO = gama**3
al = -3.*gama**2
a2 = 3.*gama
-3.33 -
Setion 3
2.,a f-t
w
r-nmnnna
l
n t
"lVIIil I
Uf l'e
UCA5
!
C
iunit = Info(1)
ipu = Info(6) - 1 ! pointer to continuous controls
c
AA(ipu+l,ipu+l) = Ncells*a2*Pmax
p(ipu+l) = Ncells*al*Pmax
r(iunit) = Ncells*aO*Pmax
C
C-----------------------------------Inputs
C
Tdb SF (1) ! inlet air dry bulb temperature
Twb = F(2) ! inlet air wet bulb temperature
ma - gama*mamax ! individual tower air flow rate
Twi =X (1) ! tower inlet water temperature
mwi - X(2) ! tower (total) water flow rate
C----------------------------------- Outputs
C
Two = Y(i)
mwl = mwi/Ncells
C
C** All operating tower cells have equal water and air flow rates **
C
Call Tower(Tdb, Twb, Twi, mwl, ma, Two)
C
mwo - mwi
Y(1) - Two tower outlet water temperature
Y(2) = mwo tower outlet mass flow rate
Return
- 3.34-
2l~':lr " Am
4-%
A rn F% W%+ lk if -,,Ar,, I r,
End
C
C------------------------ Cooling Tower Outlet Conditions
C
Subroutine Tower(Tdb, Twb, Twl, Flw, Fla, Two)
Implicit Real*8 (A-H, O-Z)
Real*8 Ntu
Parameter (Cl = 2.0, C2 = 0.37, Cpw = 1.0, Tmain = 55.,
Tol = 1.e-10, imax- 50)
Data Tw2/70./
C
C** Transfer Units: Correlation to D/FW Data **
C
Ral = Flw/Fla
Ntu = Cl*RaI**C2
C
C** Secant method solution for outlet water temperature **
C
Call DPsych(2, 1, Tdb, Twb, rh, Tdp, wal, hal)
Call DPsych(2, 1, Twl, Twl, rhwl, Tdpwl, wwl, hwl)
iter = 0
Told = Tw2
Call DPsych(2, 1, Tw2, Tw2, rhw2, Tdpw2, ww2, hw2)
Call Outlet(Ral, Ntu, Cpw, hal, wal, Twl, hwl, Tw2, hw2,
wa2, GI)
Tw2 = Told - G1
-3.35-
Section 3 C-Omnnnipnt Unriale I
C
rloss = Fla*(wa2 - wal)/Flw
Two = (1. - rloss)*Tw2 + rloss*Tmain
C
Return
End
C
C-------------------------- Effectiveness Model
C
C As outlined in Chapter 3.
C
Subroutine Outlet(Ral, Ntu, Cpw, hal, wal, Twl, hwl, Tw2,
hw2, wa2, G)
Implicit Real*8 (A-H,O-Z)
Real*8 Ntu, mstar
Parameter (Tref = 32.)
C
C** Statement function for saturation temperature given enthalpy **
C
Tsat(hsat) =-0.8811 + 3.340*hsat - 4.907e-02*hsat**2 +
4.Ole-04*hsat**3 - 1.303e-06*hsat**4
C
C** Compute effectiveness for counterflow tower **
C
Cs = (hwl - hw2)/(Twl - Tw2)
mstar = Cs/Ral/Cpw
If(dabs(l. - mstar) .gt. l.e-06) Then
c = exp(-Ntu*l.-mstar))
eps = (1. - c)/(l. - mstar*c)
Else
eps = Ntu/(l. + Ntu)
Endif
C
C** Determine outlet states **
C
ha2 - hal + eps*(hwl - hal)
hw = hal + (ha2 - hal)/(I. - exp(-Ntu))
Tw = Tsat (hw)
- 3.36-
Section 3 Component Models
C
G = Tw2 - Tw2new
C
Return
End
-3.37 -
-
Qadt;nn I t[ ,w r An, m, 4 I/Ii'...4 ^ I ..,
O. L !
lVI 3 VII k tlUUI11 , I.UIo l
C
************************************ Type 2 ********************************
C
C ** CHILLER **
C
Subroutine Type2(Info, Par, F, Modes, U, X, Y, Out, Pch)
Implicit Real*8 (A-H,O-Z)
Real*8 mchws, mcws
Parameter (MaxU = 10, NUmax = 20, NYmax = 50, NCmax = 10)
Parameter (Cpw = 1.0)
Dimension Info(1), Par(1), F(1), Modes(1), U(1), X(1),
Y(1), Out(1)
Common /CostDat/ AA(NUmax,NUmax), BB(NYmax,NYmax),
CC(NYmax,NUmax), p(NUmax), q(NYmax), r(MaxU)
C
C-------------------------Type Info on First Call-----------------------------
C
If(Info(1) .eq. 0) Then
Info (3) = 2 Number of Parameters
Info (4) = 0 Number of Forcing Function Variables
Info (5) = 1 Number of Mode Variables
Info(6) = 1 Number of Continuous Control Variables
Info (7) = 0 Number of Constraints
Info (8) = 2 Number of Streams
Info (9) = 3 Number of Outputs
Return
Endif
- 3.38-
2
C
Qload = mchws*Cpw*(Tchwr - Tchws)/12000./Nch
Call Chiller(Ich, aO, al, a2, a3, a4, a5, Qcap, Qdes, DTdes,
Pdes, Qload, Tchws, Tcws, mcws/Nch, Tcwr)
C
C** Rewrite power as
C
C Power = bO + bl*Tchws + b2*Tchws**2 + b3*Tcwr +
C b4*Tcwr**2 + b5*Tchws*Tcwr
C
bO = Nch*Pdes*(aO + al*(Qload/Qdes) + a2*(Qload/Qdes)**2)
bl = -Nch*Pdes*(a3/DTdes + a5*(Qload/Qdes)/DTdes)
b2 = Nch*Pdes*a4/DTdes**2
b3 = Nch*Pdes*(a3/DTdes + a5*(Qload/Qdes)/DTdes)
b4 = Nch*Pdes*a4/DTdes**2
b5 = -2.*Nch*Pdes*a4/DTdes**2
Pch = bO + bl*Tchws + b2*Tchws**2 + b3*Tcwr +
b4*Tcwr**2 + b5*Tchws*Tcwr
C
C** Modify appropriate locations in cost coefficient arrays **
C
iunit = Info(1)
ipu = Info(6) - 1 ! pointer to continuous controls
ipy = Info(8) - 1 ! pointer to first output stream vector
r(iunit) = bO
AA (ipu+l, ipu+l) - b2
p (ipu+l) = bl
- 3.39-
2-* A"Vn nPt
r r%d%,w%^
. 74M .I - -
t'll'uuuutent ivtoaets
BB(ipy+3,ipy+3) -=b4
q(ipy+3) = b3
CC(ipy+3, ipu+l) = b5
C
C----------------------------------Outputs------------------------------------
C
Y(1) = Tchws
Y(2) = mchws
Y(3) = Tcwr
Y =(4)mcws
C
Out(1) = Tcwr
Out(2) = Nch*Qload
Out(3) = Pch
C
Return
End
C
C *
C Empirical model of a centrifugal chiller *
C *
C
Subroutine Chiller(Ich, aO, al, a2, a3, a4, a5, Qcap, Qdes, dTdes,
Pdes, Qevap, Tchws, Tcws, mcws, Tcwr)
Implicit Real*8 (A-H,O-Z)
Real*8 mcws
Dimension a0s(4), als(4), a2s(4), a3s(4), a4s(4), a5s(4),+
Qcaps(4),Qdess(4), dTdess(4), Pdess(4)
Data a0s/ 0.07336, 0.0516, 0.1107, 0.2642/
Data als/-0.32590, 1.2199, 0.3198, 0.0207/
Data a2s/ 0.57440,-0.2517, 0.4662, 0.2643/
Data a3s/-0.03888, -O.6448,-0.0956, -0.4460/
Data a4s/ 0.33210, 0.8963, 0.2152, 0.3555/
Data a5s/ O.36840,-0.3119,-0.0656, 0.5176/
Data Qcaps /5500.,5500.,1250., 550.1
Data Qdess /5421.,5421.,1250., 550.!
Data dTdess/ 46., 46., 50., 50.!
- 3.40 -
n 2~~+ rllmnA,%r%,mlft+ NAd-%Anlc-
LJiiLI I "lJuua at [viU.II
a5 = ass (Ich)
C
C** Scale design conditions according to specified capacity **
C
fdes = Qcap/Qcaps(Ich)
Qdes = fdes*Qdess(Ich)
dTdes = dTdess (Ich)
Pdes = fdes*Pdess(Ich)
C "
C----------- Determine dimensionless leaving temperature difference
C
X = Qevap/Qdes
C = Qevap + Pdes/3.515*(aO + al*X + a2*X*X) +
mcws*Cpw*(Tcws - Tchws)/12000.
B = Pdes/3.515*(a3 + a5*X) - mcws*Cpw*dTdes/12000.
A = a4*Pdes/3.515
Sqrd = B*B - 4.*A*C
If(Sqrd .gt. 0) Then
root = dsqrt (Sqrd)
Else
root = 0.0
- 3.41-
Section 3 Component Models
Endif
y = (-B - root)/2./A
If(Y .LT. 0) Y = (-B + root) /2./A
C
C-------------- Power consumption and condenser return temperature
C
Pch = Pdes*(aO + al*X + a2*X*X + a3*Y + a4*Y*Y + a5*X*Y)
Qcond= Qevap + Pch/3.515
Tcwr =Tcws + 12000.*Qcond/mcws/Cpw
C
Return
End
- 3.42-
CN I&! AMW% Al
C
~~ Type3
C
C ** CONDENSER PUMPS **
C
Subroutine Type3(Info, Par, F, Modes, U, X, Y, Out, Work)
Implicit Real*8 (A-H,O-Z)
Real*8 mwi, mwo, mmax, mpump, mchdes, mTdes, Ksys
Parameter (MaxU = 10, NUmax = 20, NYmax = 50, NCmax - 10)
-3.43-
QapC n' rnmnn",m"t X4^Anic
a %,L11, 111V!!U IIl LtIIUe IS
C
C -- Costs
C
C** Pump Power Model **
C
C dPPump = dPmax*(I - (mwo/Npumps/mmax)**2)*gama**2
C dPChiller = dPCdes*(mwo/Nch/mchdes)**2
C dPTower = dPTdes*(mwo/Ncells/mTdes)**2
C
C Work = mpump*dP*conv/rhow/effp
C
C** Fit quadratic to three points over a small range **
C
Ksys - dPCdes*( (Npumps*mmax)/(Nch*mchdes) )**2
+ dPTdes* ( (Npumps*rnmax) / (Ncells*mTdes) ) **2
dgama = 0.05
gammin = (dP0ldPmax)**0.5 + 0.005
gamal = Dmaxl (gammin, gama-dgama)
Do 50 i = 1,3
gamai = gamal + (i-l)*dgama
c = (gamai**2 - dPO/dPmax)/(I + Ksys/dPmax)
mpump = rmax*c**0.5
dP = dPO + Ksys* (mpump/nnax) **2
effpi = effmax* (3.66* (mpump/gamai/mmax) -
3.30* (mpump/gamai/mmax) **2)
W(i) = mpump*dP*conv/rhow/effpi
Do 50 j = 1,3
Ginv(i,j) = gamai**(j-1)
50 Continue
c
Call Dinvert(3, 3, Ginv, iflag)
Do 60 i - 1,3
a(i) = 0.0
Do 60 j - 1,3
a(i) = a(i) + Ginv(i,j)*W(j)
60 Continue
C
C**
Modify appropriate locations in cost coefficient arrays **
- 3,44 -
SIetinn3
2 ftAz3 Comonennt Models
rNzaanAnIt MvA
ydbI'.
C
iunit - Info (1)
ipu = Info(6) - 1 pointer to continuous controls
ipy = Info(8) - 1 pointer to output variables
C
AA(ipu+1, ipu+1) = Npumps*a(3)
p (ipu+l) = Npumps*a (2)
r (iunit) = Npumps*a(i)
C
C
C---------------------------------- Outputs------------------------------------
C
Two = Twi
c = (gama**2 - dPO/dPmax)/(1 + Ksys/dPmax)
mpump = mmax*c**0.5
mwo = Npumps*mpump
Work = Npumps* (a (1) + a (2) *gama + a (3) *gama*gama)
effp = effmax*(3.66*(mpump/gama/mmax) -
3.30* (mpump/gama/mmax)**2)
Return
End
- 3.45-
lqartinn
L.IC71-LlNJE
-3 - "
-'nm
Cnvii
nnn,)n t lMAndl-i
ai MI
C
*************************Type 4******************
C
C ** Air Handlers **
C
Subroutine Type4(Info, Par, F, Modes, U, X, Y, Out, Cost)
Implicit Real*8 (A-H,O-Z)
Real*8 mwi, mwo, ma, mamax, mamb
Logical Converge
Parameter (MaxU = 10, NUmax = 20, NYmax = 50, NCmax = 10)
Parameter (Xdes = 0.1, Tz = 75., Cpa = 0.24, Cpw = 1.0,
hfg = 1054., Penalty = 1.)
Dimension Info(1), Par(l), F(1), Modes(l), U(1), X(1),
Y(1), Out(1)
Common /CostDat/ AA(NUmax,NUmax), BB(NYmax,NYmax),
CC(NYmax,NNUmax), p(NUmax), q(NYmax), r(MaxU)
Common /Constr/ GC(NCmax)
Common /Load/ Qcoil
C
C------------------------- Type Info on First Call----------------------------
C
If(Info(1) .eq. 0) Then
Info (3) = 2 Number of Parameters
Info(4) = 4 Number of Forcing Function Variables
Info (5) = 0 Number of Mode Variables
Info(6) = 1 Number of Continuous Control Variables
Info (7) = 1 Number of Constraints
Info (8) = 1 Number of Streams
Info (9) = 4 Number of Outputs
Return
Endif
C
C- --------------------------------- Parameters
C
mamax = Par (1) ! Maximum air handler flow rate
Pmax = Par (2) ! Maximum air handler fan power
mamb = Xdes*mamax ! Ambient ventilation air flow rate
- 3.46 -
" I
^ +; A,% rnMnnnan+ IA^Amio
C'm
~J~.LIUII .2 -Vl'Ju'Ij'tIcIl £viuucts
C- -IInputs u-
C
gama - U (1) Relative fan speed
Twi Chilled water inlet temperature
mwi = X(2) Chilled water inlet flow rate
Qsens *12000. Load sensible energy requirement
wgain = F (2) *12000./hfg Load humidity gains
Tamb = F (3) Ambient dry bulb temperature
Twb = F(4) Ambient wet bulb temperature
C
Call DPsych (2, 1, Tamb, Twb, rh, Tdp, wamb, hamb)
ma = gama*mamax
Xamb = mamb/ma
C
C** Call AHU to determine outlet air handler states **
C
Ts = Tz - Qsens/ma/Cpa
Two = Twi + 1.5*Qsens/mwi/Cpw
Call DPsych(2, 2, Ts, Twbs, 0.95, Tdps, was, has)
Call AHU(ma, Xamb, hamb, wamb, Tz, wgain, Twi, mwi, Two,
Ts2, was, haz, waz, wal)
C ----------------------------------- Costs
C
C** Fan Power Model **
C
C Pfan = (aO + al*gama + a2*gama*gama)*Pmax
C
gama = U(1)
aO = gama**3
al = -3.*gama**2
a2 = 3.*gama
Pfan = (aO + al*gama + a2*gama*gama)*Pmax
C
C** Modify appropriate locations in cost coefficient arrays **
C
iunit = Info(1)
ipu = Info(6) - 1 ! pointer to continuous controls
- 3.47 -
4z,pt;nn
_3C'LI lI
I C'nm
--.-
nnnpnt I MXnic
L.v
V.l I.
1c
C
g = Penalty*(Qsens - gama*mamax*Cpa*(Tz - Ts2))/12000.
GC(ipc+l) = g
Cost = Pfan
C
C ---------------------------------- Outputs
C
Qamb = mamb*(hamb - haz)/12000.
Qzone = (Qsens + wgain*hfg)/12000.
Qcoil = Qzone + Qamb
Qlat = ma*(wal - was)*hfg/12000.
C
Two =Twi + 12000.*Qcoil/mwi/Cpw
mwo = mwi
C
Y(1) = Two
Y(2) = mwo
C
Out(1) = Ts2
Out(2) = waz
Out(3) = Pfan
Out(4) = Qlat/Qcoil
C
Return
End
-3.48-
Cnmnnltn ,ai. AI. ^U.
z5ectliln J2
i uutlen t ---
tvi weis
C *
C Model for air handler including mixing and cooling coil process *
C *
C
Subroutine AHU(ma, Xamb, hamb, wamb, Tz, wgain, Twl, mw, Tw2,
Ta2, was, haz, waz, wal)
Implicit Real*8 (A-H,O-Z)
Real*8 mw, ma
Data Tol/l.e-10/, imax/20/
C
C----------- Iterative solution air handler for exit humidity ratio
C
iter = 0
Call Mix(Tz, was, wgain, ma, Xamb, hamb, wamb, hal, wal,
haz, waz)
Call Coil(wal, hal, ma, Twl, mw, Ta2, wa2, Tw2, eps)
wold = was
G1 = wa2 - was
was = wa2
If(abs(Gl) .gt. Tol) Then
10 iter = iter + 1
Call Mix(Tz, was, wgain, ma, Xamb, hamb, wamb, hal, wal,
haz, waz)
Call Coil(wal, hal, ma, Twl, mw, Ta2, wa2, Tw2, eps)
G2 = wa2 - was
dGdw = (G2 - Gl)/(was - wold)
wold = was
GI = G2
was = wold - G2/dGdw
If(abs(G2) .gt. Tol .and. iter .lt. imax) goto 10
Endif
Return
End
- 3.49-
,Rpetinn -3 C-lflrnnn nfnl la aIc,
C *
C *
C
Subroutine Mix(Tz, wa2, wgain, ma, Xamb, hamb, wamb, hal, wal,
haz, waz)
Implicit Real*8 (A-H,O-Z)
Real*8 ma
C
waz = wa2 + wgain/ma
Call DPsych(2, 4, Tz, Twbz, rhz, Tdpz, waz, haz)
hal = (1. - Xamb)*haz + Xamb*hamb
wal = (1. - Xamb)*waz + Xamb*wamb
C
Return
End
- 3.50 -
Section 3 Component Models
C
C This routine determines the thermal performance of a cooling coil using an *
C *
C
Subroutine Coil(wal, hal, ma, Twl, mw, Ta2, wa2, Tw2, eps)
Implicit Real*8 (A-HO-Z)
Real*8 ma, mw, mades, mwdes, NTUo, NTUi, NTUd, NTUw
Logical Dry, Wet
Data Cpa/0.240/, Cpw/l.000/, Cpv/0.45/
Data mades/8.e06/,mwdes/l.e07/
Data Tol/l.e-12/, imax/20/, Twx/40.01/
C
C** Statement functions for saturation temperature at saturation
C** enthalpy and air-side effectivness
C
Tsat(hsat) = 0.1905 + 3.184*hsat - 4.091E-02*hsat*hsat +
2.258E-04*hsat*hsat*hsat
C
****** *********************** Coil Analysis *******************************
C
C** Determine NTU's **
C
Cpm = Cpa + wal*Cpv
C
C** Correlation to Carrier Cooling Coil Data **
C
NTUo = 1.70*(ma/mades)**-0.38
NTUi = 2.25* (mw/mwdes) **-0.2
Ra - mw/ma
Twsav = Tw2
- 3.51 -
e
C!^d%+2^lmk A C.Omnnnant Mnil c
I I 2 C-AT- 1nnnil .nk Nitn,I .c
- 3.52-
CA^;9%
c
Wet = (.not. Dry) .and. (Tsl .lt. Tdp)
If(Wet) Then
hsavg = hal - (hal - ha2)/(l. - exp(-NTUo))
Tsavg = Tsat(hsavg)
Ta2 = Tsavg + (Tal - Tsavg)*exp(-NTUo)
Call DPsych(2, 5, Ta2, Twb2, rh2, Tdp2, wa2, ha2)
Endif
C
If(.not.(Dry) .and. .not.(Wet)) Then
C
C** Partially Wet and Dry **
C
Tw2 = Twsav
iter = 0
Call DryWet(NTUi, NTUo, NTUd, Ra, Cpm, Cpw, Cstar, Tal, Tdp,
hal, Twl, hwl, Tw2, Twx, fdry, epsd, Gl)
Told = Tw2
Tw2 = Told -Gi
If(abs(Gl) .gt. Tol) Then
20 iter = iter + 1
Call Dry_Wet(NTUi, NTto, NTtd, Ra, Cpm, Cpw, Cstar, Tal,
• Tdp, hal, Twi, hwl, Tw2, Twx, fdry, epsd, G2)
If (dabs(Tw2 - Told) .gt. Tol) Then
dGdT = (G2 - GI)/(Tw2 - Told)
- 3.53 -
c2nA
:&%i
3-ectlull -'I rnmnnnant X4f%.rialc!
T--,IjlllLj licift Ivigursib
Told = Tw2
G1 = G2
If (dabs(dGdT) .gt. Tol) Then
Tw2 = Told - G2/dGdT
Endif
Endif
If(abs(G2) .gt. Tol .and. iter .1t. imax) goto 20
Endif
ha2 = hal - Ra*Cpw*(Tw2 - Twl)
Tax = Tal - epsd*(Tal - Twx)
hax = hal - Cpm*(Tal -Tax)
hsw = hax + (ha2 - hax)/(i. - EXP(-(l.-fdry)*NTUo))
Tsw = Tsat(hsw)
Ta2 = Tsw + (Tax - Tsw)*EXP(-(l.-fdry)*NTUo)
Call DPsych(2, 5, Ta2,. Twb2, rh2, Tdp2, wa2, ha2)
Endif
C
C** Air Effectiveness **
C
eps - (hal - ha2)/(hal - hwl)
C
Return
End
C
*************************** Wet Coil Analysis *** * *****
C
Subroutine WetCoil(Ra, NTUi, NTUo, Cpw, hal, Twl, hwl,
Tw2, Tsl, ha2, G)
Implicit Real*8 (A-H, O-Z)
Real*8 NTUo, NTUi, NTUw, mstar
C
Call DPsych(2, 1, Tw2, Tw2, rhw2, Tdpw2, ww2, hw2)
Cs = (hw2 - hwl)/(Tw2 - Twl)
mstar = Cs/Ra/Cpw
NTUw = NTUo/(l. + NTUo/NTUi*mstar)
C - exp(-NTUw*(l. - mstar))
epsw = (1. - C)/(l. - mstar*C)
Tsl = Tw2 + NTUw/NTUi*(hal - hw2)/Ra/Cpw
- 3.54.-
¢ IIUI! a lVilUUIIlIIu ivioUUeI
- 3.55-
Cml.+; ein I Comnnnent Mndplc
C
C* ********************************** Type 5 *
C
** CHILLED WATER PUMPS **
C
c ----------------------------------- Costs
3.56 -
.qpetion -I- - r1 iV.i.1 k"
Cnmnflnlldt
VV %IIIIil
U1nfiatxec
L lviucill3 i
C
C** Pump Power Model **
C
C dPPump = dPmax*(1 - (mwo/Npumps/nax)**2)*gama**2
C dPChiller = dPCdes*(mwo/Nch/mchdes)**2
C
C Work = mpump*dP*conv/rhow/effp
C
C** Fit quadratic to three points over a small range **
C
Ksys = dPCdes*( (Npumps*mmax)/(Nch*mchdes) )**2
dgama = 0.05
gammin = (dPO/dPmax)**0.5 + 0.005
gamal = Dmaxl(gammin, gama-dgama)
Do 50 i = 1,3
gamai = gamal + (i-l)*dgama
c = (gamai**2 - dPO/dPmax)/(I + Ksys/dPmax)
mpump = mmax*c**0.5
dP = dP0 + Ksys*(mpump/mmax)**2
effpi = effmax*(3.66*(mpump/gamai/mmax) -
3.30* (mpump/gamai/mmax)**2)
W(i) = mpump*dP*conv/rhow/effpi
Do 50 j = 1,3
Ginv(i,j) = gamai**(j-l)
50 Continue
C
Call Dinvert(3, 3, Ginv, iflag)
Do 60 i = 1,3
a(i) = 0.0
Do 60 j = 1,3
a(i) = a(i) + Ginv(i,j)*W(j)
60 Continue
C
C** Modify appropriate locations in cost coefficient arrays **
C
iunit = Info(1)
ipu = Info(6) - 1. ! pointer to continuous controls
ipy = Info(8) - 1. pointer to output variables
- 3.57-
Q Iaf fn A
O-S.tivli l 0 -VILLlUUmjl 'll l, oUUeIs
C---------------------------------- Outputs------------------------------------
C
c = (gama**2 - dPO/dPmax) / (1 + Ksys/dPmax)
mpump = mmax*c**0.5
mwo = Npumps*mpump
Two = Twi
- 3.58 -
.qetilnn V .. m. m V mm L'u"
S amnle
j & qmmrI
Data
GLm %P a-IFS&t "
9
- 3.59 -
;etinn 3
60 T Samnlo n1nt.
LIAAtl Vw --LoFQ L-Q I
1000. 200. 80. 70. ! each line of data gives zone sensible
1750. 350. 80. 70. ! and latent load and ambient dry bulb
2500. 500. 80. 70. ! and wet bulb temperature
3250. 650. 80. 70.
4000. 800. 80. 70.
1000. 200. 90. 80.
1750. 350. 90. 80.
2500. 500. 90. 80.
3250. 650. 90. 80.
4000. 800. 90. 80.
1000. 200. 70. 60.
1750. 350. 70. 60.
2500. 500. 70. 60.
3250. 650. 70. 60.
4000. 800. 70. 60.
- 3.60-
Section 4 Dynamic Optimization Program
This program determines the optimal cost for a cooling plant with perfectly stratified storage
using dynamic programming as outlined in Chapter 7.
- 4.0 -
4 nvnnmir Onfi*m;-Ynfi-irw%
aec;tlou+I "p' 'T I-ulll.V / lllz, LiH l
C Program for determining the optimal cost for a cooling plant with *
C iteration is terminated when the total optimal cost does not change *
C significantly. *
C
Implicit Real*8 (A-H, O-Z)
Integer Stage, StageOn
Parameter (MStages = 24, MTimes = MStages + 1)
Dimension Xopt(MTimes), DX(MTimes)
Common /Ahead/ Qloads (MStages) , Twbs (MStages), Rates (MStages)
Common /Limits/ Qchmin, Qchmax, Qsmin
Common /Stor/ Delt, Cap, Ttop, Tbot
Common /ModelCoef/ Adir(2,2), bdir(2), cdir,
- Ach(3,3), bch(3), cch,
Adch(3,3), bdch(3), cdch,
Atch(2,2), btch(2), ctch,
Atdch(2,2), btdch(2), ctdch
Data pi/3.14159/
C
C************************* Initializations ***************************
C
Nstages = 24 Number of stages in time
Nstates = 21 Number of possible states at each time
Delt = 1. Timestep associated with each stage
Cap = .1500. Capacitance of storage
Qchmin = 1000. Minimum allowable chiller load (surge)
Qchmax = 5500. Maximum allowable chiller load (capacity)
Qsmin = 100. Minimum allowable storage charge & discharge
Ttop = 60. Controlled return temperature for discharge
Tbot = 40. Controlled supply temperature for charging
C
C*** Read input data and generate load and wet bulb data ****
c Time starts at 8 a.m., onpeak rates start at 8 a.m. and go for 12
c hours, Minimum load and wet bulb are at 6 a.m.
-4.1-
.qpetnn 4 -
I flvn~mr vm;wdr,
LYV%,LIUII -T a-PaAlAalliMS,_%JL)LtllllziltlulI
C
C The form of the curve-fits are: P = f'Af + b'f + c
C where f is a vector of uncontrolled (forcing function) variables and
C A, b, and c contain coefficients of the fit. The five possible modes
C of operation are: 1) direct (no storage), 2) partial storage charging
C (cool-down) at a fixed supply, while also supply the load, 3) partial
C storage discharge (warm-up) at fixed return, while also operating the
C chillers to meet the load, 4) full charge (no load), 5) full discharge
C (chillers off).
C
Read(11,*) ((Adir(i,j),i=1,2),j=1,2), (bdir(i),i=1,2), cdir
Read(1l,*) (( Ach(i,j),i=1,3),j=1,3), ( bch(i),i=1,3), cch
Read(ll,*) (( Adch(i,j),i=l,3), j=l,3), ( bdch(i),i=l,3), cdch
Read(11,*) (( Atch(i, j),i=1,2), j=1,2), ( btch(i),i=l,2), ctch
Read(l1,*) ((Atdch(i,j),i=1,2), j=l,2), (btdch(i),i=1,2), ctdch
- 4.2 -
0 " 0
I)VnnMir Ontimr7nt;nn
C
* * ** Loop through storage sizes *
C
Cap = CapI - dstor
Do 200 istor = 1,Nstor
Cap = Cap + dstor
Write(12,999) Cap
C
**************** Initialized States and Bounds *********************
C
Xlow = 0.0
Xhigh = 1.0
Ntimes = Nstages + 1
Do 25 i = 1, Ntimes
Xopt(i) = Xinit
DX(i) = 1.0
25 Continue
C
C****************** Call Dynamic Programming Routine ******************
C
Call Opt(Nstages, Nstates, Xopt, Xlow, Xhigh, DX, Total)
C
C*********** Loop through optimal path and output results to file *****
C
Tot Dir = 0.0
Write (12,103)
Do 50 Stage = 1, Nstages
Qload - Qloads (Stage)
Twb - Twbs (Stage)
Rate = Rates (Stage)
Xi = Xopt (Stage)
Xj = Xopt(Stage+1)
Cost_Opt = Cost(Stage, Xi, Xj, Qch, Power)
Cost Dir = Cost(Stage, Xinit, Xinit, Qdir, Pdir)
If (Cost__Dir .gt. l.e+10) Then
CostDir = 0.0
Endif
Tot Dir = TotDir + CostDir
Write(12,104) Stage, Xi, Xj, Rate, Twb, Qload, Qch,
- 4.3 -
Section 4- Dynamic Optimization
End
C
C *
C Dynamic Programming routine for minimizing the sum of costs over *
C time for a single state variable: Steady-Periodic Solution *
C *
C
Subroutine Opt(Nstages, Nstates, Xopt, Xlow, Xhigh, DX, Total)
C
C Nstages = number of total stages (between times)
C Nstates = number of states at each time
C Xopt = array of optimal state values
C Xlow = minimum allowable state variable
C Xhigh = maximum allowable state variable
C DX = initial bounds on dynamic programming grid
C Total = minimum total cost
C
Implicit Real*8 (A-H, O-Z)
Parameter (M_States = 51, M_Stages = 24, M_Times = MStages + 1)
integer First, Stage, Statei, Statej, FNode(M_States, MTimes)
Dimension Xopt (Nstages+1), DX(Nstages+1), Xmin(MTimes),
Xmax (MTimes) , Togo (M_States, M_Times )
-4.4.
Section 4 Dynamic Optimizato
Data Tol/l.e-4/, imax/100/
C
************** ***** One-time Initializations ********************
C
First = 1
Xmin(l) = Xopt(1)
Xmax(1) = Xopt(1)
Xmin(Nstages+1) = Xopt(I)
Xmax(Nstages+l) = Xopt (I)
Total = 0.0 ! Initialize total cost to zero
iter- 0
C
******************** Main loop for refining grid *****************
C
5 Continue
iter = iter + 1
C
C---------------------------- Initializations
C
C Togo(i,j) = Minimum cost-to-go from state i, stage j until the end
C FNode(i,j) = pointer to state at next stage along optimal path from
C state i, stage j
C
Do 15 i = 1,Nstates
Do 15 j = 1,Nstages+l
Togo(i,j) = 1.e+20
FNode(i,j) = 0
15 Continue
Togo(FirstNstages+1) = 0.0
Do 20 i = 2,Nstages
Xmin (i) = Dmaxl (Xlow, Xopt(i) - DX(i))
Xmax(i) = Dminl (Xhigh, Xopt (i) + DX(i))
20 Continue
C
C---------------Dynamic Programming Loop
C
C Loop through all stages and state combinations within current bounds
C
Do 50 Stage = Nstages,1l,-I
- 4.5 -
'Roction 4 Dvnamie Ontimi7ntinn
L V
t &%Z _tDan-Y i LnL I ai a n
Do 40 Statei - 1,Nstates
Do 30 Statej = 1,Nstates
C
C Compute optimal stage costs between states. If at first stage, then
C only allow paths from known initial to end states
C
If(Stage .gt. 1 .or. Statei .eq. First) Then
Xi = Xmin(Stage) +
(Statei-l)* (Xmax (Stage)-Xmin (Stage)) / (Nstates-1)
Xj = Xmin(Stage+1) +
(Statej-1) * (Xmax (Stage+1) -Xmin (Stage+1)) / (Nstates-1)
SCost = Cost(Stage, Xi, Xj, Qch, Power)
Else
SCost = I.e+20
Endif
CCost = Togo(Statej,Stage+1) + SCost
If(CCost .lt. Togo(StateiStage)) Then
Togo(Statei, Stage) = CCost
FNode(StateiStage) = Statej
Endif
30 Continue
40 Continue
50 Continue
C
C---------- Refine the grid and recalculate optimum if necessary
C
If(Abs(Total - Togo(First,,1))/Togo(First,,1) .gt. Tol .and.
iter .lt. imax) Then
Total = Togo(First,l)
Statei = First
Do 100 Stage = 2,Nstages
Statei = FNode(StateiStage-1)
Xopt(Stage) = Xmin(Stage) +
• (Statei-1) * (Xmax (Stage) -Xmin (Stage) ) / (Nstates-1)
If( dabs(Xopt(Stage) - Xmax(Stage)) .gt. Tol .and.
*dabs (Xopt (Stage) - Xmin(Stage)) .gt. Tol .or.
*dabs(Xopt (Stage) - Xlow) .lt. Tol .or.
*dabs(Xopt(Stage) - Xhigh) .lt. Tol ) Then
-4.6-
n "
QArf
3.-feulVI!J -"
DvmmieOntimi-intinn
" ,"i a, '.%j IIUL ILxu .P
DX(Stage) = 0.5*DX(Stage)
Endif
100 Continue
goto 5
C
Endif
Return
End
4.7-
A a
4
C ^d:
I
Qstor - abs(Qdisch)
C
C---------------------- Direct Cooling: No Storage
C
If(Qstor .lt. l.e-06) Then
If(Qch .gt. Qchmin) Then
Call System(1, Qload, Twb, Qstor, Power)
ElseIf(Qload .1t. i.e-06) Then
Power = 0.0
Else
Cost = l.e+20
Return
Endif
C
C--------------------------- Charging Mode
C
ElseIf(Qch .gt. Qload) Then
If(Qch .gt. Qchmin .and. Qload .gt. l.e-06) Then
C
C** Partial Charge (i.e. meet the load)
C
If(Qstor .gt. Qsmin) Then
Call System(2, Qload, Twb, Qstor, Power)
C
C** Limit on Charging Rate: assume part-time in direct mode and
C part-time at minimum charging rate
C
Else
deltC = Qstor/Qsmin*delt
Call System(l, Qload, Twb, 0., Pdirect)
Call System(2, Qload, Twb, Qsmin, Pcharge)
Power = (Pcharge*deltC + Pdirect*(delt-deltC))/delt
Endif
- 4.8 -
Qcietinn
k.1LJ/,!,Li
J!
L f)vnnTnie
"-It!"
Ont;m;-7nf;nn
JLuII6 I|I II
C
C** Below Minimum Chiller Capacity
C
Else
Cost = l.e+20
Return
Endif
C
C--------------------------- Discharge Mode
C
Else
If(Qch .gt. Qchmin) Then
C
C** Partial Discharge: meet load with chillers and storage
C
If(Qstor .gt. Qsmin) Then
Call System(3, Qload, Twb, Qstor, Power)
C
C** Limit on Discharge Rate: assume part-time in direct mode and
C part-time at minimum discharge rate
C
Else
deltD = Qstor/Qsmin*delt
Call System(l, Qload, Twb, 0., Pdirect)
Call System(3, Qload, Twb, Qsmin, Pdisch)
Power = (Pdisch*deltD + Pdirect*(delt-deltD))/delt
Endif
C
C** Below Chiller Capacity: assume part-time at minimum capacity and
C part-time in full charge mode (chillers off)
C
ElseIf (Qload-Qchmin .gt. Qsmin) Then
Qson =Q load - Qchmin
Qsoff - Qload
delton - Qch/Qchmin*delt
Call System (3, Qload, Twb, Qson, Pon)
Call System(5, Qload, Twb, Qsoff, Poff)
Power = (Pon*delton + Poff*(delt-delton))/delt
- 4.9-
Catmfi'nn IA D'vnnim; ie Iti m .7ainn A
1cq t..l.Iu
ll "I' . UlllLai i ll
C
c** Chiller and storage limits exceeded
C
Else-
Cost = l.e+20
Return
c
Endif
c
Endif
C
Cost = Rates (Stage) *Power*Delt
C
Return
End
C
C *
C *
C
Subroutine System(Icntr, Qload, Twb, Qstor, Power)
Implicit Real*8 (A-H, O-Z)
Dimension f(3)
Common /ModelCoef/ Adir(2,2), bdir (2), cdir,
Ach (3, 3), bch (3), cch,
Adch (3, 3), bdch (3), cdch,
Atch(2,2), btch (2), ctch,
Atdch(2,2), btdch (2), ctdch
C
f(l) = Qload
f(2) = Twb
f(3) = Qstor
4.1O-
qetinn #1 .Dvnnmioi%kjUtImizatioll
."JaLaIlILIL; I
-4.11 -
CrapMn d Dvnrl~nt rn;m-nt nn i
Do 25 j = 1,3
temp = temp + Adch(i, j) *f (j)
25 Continue
Power = Power + (temp + bdch (i) ) *f (i)
30 Continue
goto 1000
C
C** Full Charge Mode: fixed chiller supply and return
C Compute optimal power based upon chiller load and wet bulb
C
400 Continue
f(1) = Qstor
Power = ctch
Do 40 i = 1,2
temp = 0.
Do 35 j = 1,2
temp = temp + Atch(i, j)*f(j)
35 Continue
Power = Power + (temp + btch(i))*f (i)
40 Continue
goto 1000
C
C** Full Discharge Mode: fixed chiller supply and return
C Compute optimal power based upon chiller load and wet bulb
C
500 Continue
Power = ctdch
Do 50 i = 1,2
temp =0.
Do 45 j 1,2
temp = temp + Atdch(ij)*f(j)
45 Continue
Power = Power + (temp + btdch (i) )*f (i)
50 Continue
C
1000 Continue
C
Return
End
- 4.12 -
Section 5 Utility Routines
Psychrometrics 5.7
Routine for determining properties of moist air.
- 5.0-
Qortinn ; - Non.l~inpnr Vli.;,nn, mw...
C
C*********** Double Precision version of Newtons method *******************
C
Subroutine Solver(N, Diff, Xnew, Fnew, Jinv, Func, Tol)
Implicit Real*8 (A-H,O-Z)
Real*8 Jinv(N,N)
External Func
Dimension Diff(N), Xnew(N), Fnew(N), X(50), F(50), dX(50)
Data imax/50/, jmax/5/, Nmax/50/
C
C------------------ Check for limit on number of equations
C
If (N.gt.Nmax) Then
Write(*,I) Nmax
Format(' ** Error - Only ',I2,' Equations Allowed **')
Stop
Endif
C
C----------------- Iterate using Newton's method with damping
C
iter = 0
Call Func(N, Xnew, Fnew)
C
5 iter=iter + 1
C
C** Save information from last iteration **
C
Fnorm = 0.
Do 10 i = 1,N
X(i) = Xnew(i)
F(i) = Fnew(i)
Fnorm = Fnorm + F(i)*F(i)
10 Continue
C
C** Determine numerical approximation to Jacobian using forward
C differences **
C
Do 20 j = 1,N
-5.1-
Qmpt; n n 4 Non-Linear Jmntinn ,Rnivpr
DeltX = Dabs(Diff(j)*X(j))
Xnew(j) = X(j) + DeltX
Call Func(N, Xnew, Fnew)
Do 15 i = 1,N
Jinv(i,j) - (Fnew(i) - F(i))/Deltx
15 Continue
Xnew(j) = Xnew(j) - DeltX
20 Continue
C
C** Inverse of the Jacobian **
C
Call DInvert(N, N, Jinv, Iflag)
If(Iflag .ne. 0) Then
Write(*, 26)
26 Format(' ** Error - No Solution to Equations **')
Stop
Endif
C
C** Determine maximum change in the independent variables **
C
Do 30 i = 1,N
dX(i) = 0.
Do 25 j = 1,N
dX(i) = dX(i) + Jinv(i,j)*F(j)
25 Continue
dX(i) = 2.*dX(i)
30 Continue
C
C** Determine new guess but don't accept if there is an increase in
C the residual error---> "damping" **
C
j 0
Fnlast = Fnorm
40 Continue
Do 45 i -- I,N
dX(i) = dX(i)/2.
Xnew(i) = X(i) - dX(i)
-5.2-
Q-,a',t;nn; Nonn-I,inpgqr F1ninn n1 ...
LJ1. I%,,,v
I" "- " = l,,W l Ill L)VIY"I
45 Continue
Call Func(N, Xnew, Fnew)
Fnorm = 0.
Do 50 i = 1,N
Fnorm = Fnorm + Fnew(i)*Fnew(i)
50 Continue
If(Fnorm.gt.Fnlast .and. j.lt.jmax) go to 40
70 Continue
C
C** Check for convergence: Use both absolute and relative checks **
C
rerror = 0.
aerror = 0.
Do 80 i =1N
- 5.3-
Rpetion - Ma[. * .. T,...-...o.. I
LI IVA~~lL1 IAI VI
C
* ************************************************ *************************** *
C *
C Double precision subroutine for determining the inverse of a matrix. *
C *
C
Subroutine DInvert (Nrc,N,A, if lag)
Implicit Real*8 (A-H,O-Z)
Parameter (Nmax = 50)
Dimension A(Nrc,Nrc), y(Nmax), irow(Nmax), jcol(Nmax)
Data eps/l.d-15/
C
if lag=0
C
C************************ Check for too large a matrix ************************
C
If(N .gt. Nmax) Then
iflag=1
Return
Endif
C
• ******************** Loop for elimination ***************************
C
Do 50 k =1,N
kml = k - 1
C
C ** Search for the pivot element **
C
pivot = 0.0
Do 10 i - l,N
Do 10 j = I,N
5.4-
Section 5
L.7%,%,aMti ae 11"
Matriy
M,!"1litr&iy
Tnvprcp
niVlg ,.D,
C
If(dabs(pivot) .lt. eps) Then
iflag= 2
Return
Endif
C
C ** Normalize pivot row elements **
C
irowk = irow(k)
jcolk = jcol(k)
Do 20 j = 1,N
A(irowk, j) = A(irowk, j)/pivot
20 Continue
C
C ** Determine inverse **
C
A(irowk, jcolk) = 1.0/pivot
Do 40 i = 1,N
Aijck = A(i,jcolk)
If(i .ne. irowk) Then
A(i, jcolk)= -Aijck/pivot
Do 30 j = 1,N
If(j .ne. jcolk) Then
A(i,j) = A(i, j) - Aijck*A(irowk, j)
Endif
30 Continue
- 5.5-
Section-S MatriY Tnvpr.qp
Endif
40 Continue
50 Continue
C
****************************** Unscramble inverse *****************************
C
Do 80 j - 1,N
Do 60 i = 1,N
irowi - irow(i)
jcoli = jcol(i)
y(jcoli) = A(irowi,j)
60 Continue
Do 70 i - 1,N
A(i, j)=y(i)
70 Continue
80 Continue
Do 110 i = 1,N
Do 90 j = I,N
irowj - irow(j)
jcolj - jcol(j)
y(irowj) = A(i,jcolj)
90 Continue
Do 100 j = 1,N
A(ij) = y(j)
100 Continue
110 Continue
C
Return
End
- 5.6-
Section 5 Psychrometrics
c *
C THIS ROUTINE TAKES AS INPUT A DRY BULB TEMP. AND ONE OTHER PROPERTY: WET *
C IN MODE 4), WET BULB TEMP., AND ENTHALPY (OR REL.HUMIDITY IN MODE 5). *
SUBROUTINE DPSYCH(IUNITSMODETDBI,TWBI,RHTDPI,W,H)
IMPLICIT REAL*8 (A-H,O-Z)
DATA PATM/I./
C
C***************************** UNIT CONVERSIONS *
C
TDB = TDBI
TWB = TWBI
TDP = TDP I
C
IF(IUNITS .EQ. 2) THEN
TDB = (TDB - 32.)/1.8
TWB = (TWB - 32.)/1.8
TDP = (TDP - 32.)/1.8
H = (H - 7.68)/0.43002
END IF
C
C** SATURATION PRESSURE OF WATER AT WET BULB, DRY BULB, OR DEW POINT
C TEMPERATURE. **
C
IF(MODE .EQ. 6) TDB (H - 2501.*W)/(1.005 + 1.859*W)
CALL SAT (TDB, PSATDB)
GOTO (1,2,3,2,2,2) ,MODE
CALL SAT (TWBPSAT)
GOTO 5
PSAT -=PSATDB
-5.7-
Q,,-tinn ; -- Ps vchrornptrics
L7~. ~ LI
£hPhflfl~ P~veh rnni~trie~
GOTO 5
3 CALL SAT(TDPPSAT)
5 CONTINUE
C
C************** CALCULATE HUMIDITY RATIO AND WET BULB TEMPERATURE *************
C
GO TO (10,20,30,40,50,50), MODE
C
C ------------------- MODE 1: DRY BULB AND WET BULB SUPPLIED
C
10 IF (TWB .LE. 0.) THEN
P = PSAT - 5.704E-4*(TDB-TWB)*PATM
W= .62198 * P/(PATM-P)
ELSE
WSAT = .62198 * PSAT/(PATM-PSAT)
W = WSAT - (TDB-TWB)*(0.24 + .441*WSAT)/(597.31
+ 0.441*TDB - TWB)
END IF
H = 1.005*TDB + W*(2501. + 1.859*TDB)
GO TO 100
C
C ---------------- MODE 2: DRY BULB AND RELATIVE HUMIDITY SUPPLIED
C
20 W = .62198 * PSAT*RH/(PATM-PSAT*RH)
GO TO 40
C
C --------------------- MODE 3: DRY BULB AND DEW POINT SUPPLIED
C
30 W = .62198 * PSAT/(PATM-PSAT)
C
C ------------------------ FIND ENTHALPY FOR MODES 2 - 4
C
40 H = 1.005*TDB + W*(2501. + 1.859*TDB)
C
C------------FIND WET BULB TEMPERATURE FOR MODES 2 - 6
C
50 DPRESS = ABS(I.-PATM)
IF (H .GT. 9.67 .AND. DPRESS .LT. 0.00001) THEN
-5.8 -
cPetinn
I l.tc%, Pqqvehrnm, trie q I
,I P v %,rnVml
a itLA M a
Y = DLOG(H+17.68)
TWB = 26.7453 + Y*(-43.44 + Y*(13.909 - Y*.977))
ELSE
C
C** USE LINEAR APPROXIMATION WHEN H LT 9.67 **
C
IF (MODE .EQ. 3) CALL SAT(TDBPSAT)
WSAT = .62198 * PSAT/(PATM-PSAT)
T = (H - 2501.*WSAT)/(1.005 + 1.859*WSAT)
CALL SAT(TPSAT)
WT = .62198*PSAT/(PATM-PSAT)
C
C** FIND POINT ON LINE BETWEEN (TWT) AND (TDBWSAT) WITH ENTHALPY H **
C
IF (ABS(T-TDB) .LT. 0.01) THEN
TWB = (T+TDB)*0.5
ELSE
SLOPE = (WSAT-WT)/(TDB-T)
A = 1.859*SLOPE
B = 1.005 + WSAT*1.859 + SLOPE*(2501.-I.859*TDB)
C = -H + 2501.*(WSAT - SLOPE*TDB)
IF (SLOPE .LT. I.E-7) TWB--C/B
IF (SLOPE .GT. .99E-7) TWB = (-B + SQRT(B*B-4.*A*C))/(2.*A)
ENDIF
ENDIF
C
C--------------MODE 5 CONTINUED: DRY BULB AND ENTHALPY SUPPLIED
C
IF(MODE .EQ. 5) THEN
W = (H - 1.005*TDB)/(2501. + 1.859*TDB)
ENDIF
C
C
100 CONTINUE
PV = PATM'*W/(.62198 + W)
IF (MODE .NE. 2) RH = PV/PSATDB
IF (MODE .NE. 3) THEN
Y = DLOG(1.013E05*PV)
-5.9-
in Z
d-% Pqvrh rnmptriv-€
3-ection 2 %,
1111
xi "IIcL-t- I%ap
C *
C *
C
SUBROUTINE SAT(T, PSAT)
IMPLICIT REAL*8 (A-H,O-Z)
C
C** STATEMENT FUNCTIONS FOR THE SATURATION PRESSURE OF WATER (IN ATMOSPHERES)
C AS FUNCTION OF TEMPERATURE **
C
P1(Z) = -7.90298*(Z - 1.0)
P2(Z) - 5.02808*DLOG10(Z)
P3(Z) = -1.3816E-07*(10.**(11.344*(1. - 1./Z)) -1.)
P4(Z) - 8.1328E-03*(10.**(-3.49149*(Z - 1.)) - 1.)
P5(Z) = -9.09718*(Z - 1.)
P6(Z) = -3.56654*DLOGI0(Z)
P7(Z) - 0.876793"(I. - I./Z)
P8 = -2.2199
- 5.10-
Srtion 5 - P.sveh romptrics
RETURN
END
-5.11 -
__ .tI 'l1%;
II Frpnn Prnnart;ac
,,I,,AYIuL u a V t I I IC3 I
SUBROUTINE FREON(TP,H,S,X,V,U,NREFITYPE)
C
C *
C
C T = TEMPERATURE (DEGREES F) *
C P = PRESSURE (PSI)
C H = SPECIFIC ENTHALPY (BTU/LBM)
C S = SPECIFIC ENTROPY (BTU/LBM-F)
C X = QUALITY
C V = SPECIFIC VOLUME (LBM/FT**3)
C U - SPECIFIC INTERNAL ENERGY (BTU/LBM)
C NREF REFRIGERANT TYPE (E.G., 11 FOR R12, 12 FOR R12, ETC.)
C ITYPE = TWO-DIGIT INTEGER CODE FOR IDENTIFYING THE TWO STATES THAT ARE
C SUPPLIED. THE CODE IS OF THE FORM IJ WHERE I AND J SPECIFY THE
C TWO STATES AND ARE BETWEEN 1 AND 5 (1 =T, 2 = P, 3 = H, 4 = S
C 5 = X, 6 = V, 7 = U)
C
C THE REFRIGERANTS CURRENTLY SUPPORTED BY THIS PROGRAM ARE RII, R12, R13,
C R14, R22, R114, R500, AND R502.
C
C
EXTERNAL THCON, TSCON, SVCON, XVCON, SXCON, HXCON, PSCON, PHCON
LOGICAL ERROR
D IMENS ION Q (44)
COMMON /CONST/ Q
DATA IMAX/100/,JMAX/1O/,TOL/O.O001/
C
C ** INITIALIZATIONS **
C
C FILL INITIALIZES CORRELATION CONSTANTS ACCORDING TO REFRIGERANT TYPE
C
ERROR=. FALSE.
CALL FILL(NREF)
-5.12-
Setion 5
..- tinm,, aSg.
Frenn Pronnrtips
Fr n Pi.
J=ITYPE/10
K=ITYPE-J*10
IF(J.EQ.1 .OR. K.EQ.1) THEN
T=T+Q (44)
END IF
C
C ** BRANCH ACCORDING TO INPUT STATES SUPPLIED **
C
C TX KNOWN
IF(ITYPE.EQ.51.OR.ITYPE.EQ.15)GO TO 111
C T,P KNOWN
IF(ITYPE.EQ.21.OR.ITYPE.EQ.12)GO TO 121
C T,V KNOWN
IF(ITYPE.EQ.61.OR.ITYPE.EQ.16)GO TO 131
C P,V KNOWN
IF(ITYPE.EQ.62.OR.ITYPE.EQ.26)GO TO 141
C P,X KNOWN
IF(ITYPE.EQ.52.OR.ITYPE.EQ.25)GO TO 151
C T,H GIVEN
IF(ITYPE.EQ.31.OR.ITYPE.EQ.13)GO TO 161
C T,S KNOWN
IF(ITYPE.EQ.14.OR.ITYPE.EQ.41)GO TO 171
C SV KNOWN
IF(ITYPE.EQ.64.OR.ITYPE.EQ.46)GO TO 181
C V,X KNOWN
IF(ITYPE.EQ.56.OR.ITYPE.EQ.65)GO TO 191
C S,X KNOWN
IF(ITYPE.EQ.45.OR.ITYPE.EQ.54)GO TO 201
C H,X KNOWN
IF(ITYPE.EQ.35.OR.ITYPE.EQ.53)GO TO 211
C P,S KNOWN
IF(ITYPE.EQ.24.OR.ITYPE.EQ.42)GO TO 221
C P, H KNOWN
IF (ITYPE.EQ.23 .OR.ITYPE.EQ.32)GO TO 231
C H, S KNOWN
IF (ITYPE.EQ. 34 .OR. ITYPE.EQ. 43) GO TO 241
c
C T, X KNOWN FIND LIQUID SPECIFIC VOLUME
- 5.13-
Section a
-.. t- a,
5' F'rmrn
F
Prnnert;pq
P V
L-n Xn.s aVt 2 I
11 VL=1./DLIQ(T)
P=VPR (T)
CALL SPVOL(T,P,VV)
V=VL+X* (VV-VL)
DH=DHLAT (T,VV, VL, P)
CALL ENTHAL (HVfP,VV,T)
H=HV-(1.-X) *DH
DS=DH/T
CALL ENTROP (SVAPfT,VV)
S=SVAP- (1. -X) *DS
GO TO 1000
C
C TP KNOWN FIND VAPOR PRESSURE ASSUME SUPERHEAT
C
121 CALL SPVOL(TP,V)
CALL ENTHAL (HfP,V,T)
CALL ENTROP (SfT,V)
X=1. 5E+38
GO TO 1000
C
C TV KNOWN
C
131 IF(T.GT.Q(42))GO TO 22
PV=VPR(T)
CALL SPVOL (T,PV, VV)
20 IF (V-VV)21,21,22
21 P=PV
VL=1./DLIQ (T)
X= (V-VL) / (VV-VL)
DH-DHLAT (T,W, VL, P)
DS=DH/T
CALL ENTHAL (HV,P, VV, T)
H=HV-(1.-X)*DH
S CALL ENTROP (SV,T, VV)
S=SV- (1.-X) *DS
GO TO 1000
C IF SUPERHEAT
22 X=1. 5E+38
-5.14-
lqpctonn5 Treon
FeonPrn-
- IL-~~~
Pronnrties
lo166tMI.flJ
P=PR(T,V)
23 CALL ENTHAL(H,P,V,T)
CALL ENTROP (ST,V)
GO TO 1000
C
C P,V KNOWN
C
141 IF(P.GT.Q(41))GO TO 45
CALL TSAT(PTV)
CALL SPVOL (TV, FP, VV)
IF (V-VV)44,44,45
C IF SATURATED
44 T=TV
VL-1./DLIQ (T)
X= (V-VL) / (VV-VL)
DH=DHLAT (T, VV, VL, P)
CALL ENTHAL(HV;P,VVT)
H=HV - (I.-X)*DH
DS=DH/T
CALL ENTROP (SVT,VV)
S=SV- (I.-X)*DS
GO TO 1000
C IF SUPERHEAT
45 X=1.5E+38
ITER=0
T1=Q(42)
42 XT=PR (TI, V) -P
ITER=ITER+I
DT=DPDT (TI, V)
T=TI- (XT/DT)
Z=ABS (T-TI)
T1=T
IF(ITER.GT.IMAX) THEN
ERROR=. TRUE.
GO TO 43
END IF
IF(Z-.001) 43, 43, 42
43 CONTINUE
- 5.15-
Rpetnn-
0,%,LJtnll "
Freon PrnnortipqI
a a- ,n P, %,I."1.
CALL ENTHAL(HP,V,T)
CALL ENTROP(ST,V)
GO TO 1000
C
C P,X KNOWN
C
151 CALL TSAT(PT)
VL=1./DLIQ (T)
CALL SPVOL(T,P,VV)
V=VV-(I.-X)*(VV-VL)
CALL ENTHAL(HV,P,VV,T)
DH=DHLAT (T, VV, VL, P)
H=HV - (1.-X)*DH
DS=DH/T
CALL ENTROP (SV, T,VV)
S=SV-(1.-X)*DS
GO TO 1000
C
C TH KNOWN
C
161 IF(T.GT.Q(42))GO TO 61
PV=VPR (T)
CALL SPVOL (T, PV, VV)
CALL ENTHAL (HV, PV, VV, T)
IF (H-HV) 65, 65,61
C FOR SUPERHEAT
61 X=1.5E+38
V=Q (43)
CALL SOLVE (T, H, V, THCON, TOL, IFLAG)
IF (IFLAG. EQ. 1) ERROR=. TRUE.
P=PR(T,V)
CALL ENTROP(ST,V)
GO TO 1000
C IF SATURATED
65 VL-1./DLIQ (T)
P=PV
DH=DHLAT (T,VV, VL, P)
X=I.- (HV-H) /DH
V-VV- (1
1.-X) * (VV-VL)
- 5.16-
Section
peL,7.
t,,6Lnn
5 Fripnn Prnnprt;iaQ
F
• r• % I
a49IL; IJljI.I I Ia
DS=DH/T
CALL ENTROP (SV, T,VV)
S=SV - (1.-X) *DS
GO TO 1000
C
C TS KNOWN
C
171 PV=VPR(T)
CALL SPVOL (T, PV, VV)
CALL ENTROP (SVT,VV)
IF (S-SV)75, 75, 71
C FOR SUPERHEAT
71 X=1.5E+38
V=VV
CALL SOLVE (T,S,V,TSCONTOL, IFLAG)
IF(IFLAG.EQ.1) ERROR=.TRUE.
P=PR(T,V)
CALL ENTHAL(HP,V,T)
GO TO 1000
75 VL=1./DLIQ(T)
P=PV
DH=DHLAT (T,VV,VL,P)
DS=DH/T
X=1.- (SV-S)/DS
V=VV- (1.-X) * (VV-VL)
CALL ENTHAL (HV,P, VV, T)
H=HV - (1.-X)*DH
GO TO 1000
C
C SV KNOWN
C
181 T=500.
CALL SOLVE (V, S, T, SVCON, TOL, IFLAG)
IF (IFLAG. EQ. 1) ERROR=. TRUE.
P-PR (T,V)
CALL ENTHAL (H, P,V, T)
X=1. 5E+38
GO TO 1000
- 5.17 -
'Section 5 Fre~rn )rnnprtipq
~ik onW&
- -r -- ta
nAKP uI ata ; a
c
C x, V KNOWN
C
191 T=500.
CALL SOLVE (X, V1 T, XVCON, TOL, IFLAG)
IF(IFLAG.EQ.1) ERROR=.TRUE.
P=VPR (T)
CALL SPVOL(TP,VV)
VL=1./DLIQ (T)
DH=DHLAT (T, VV, VL, P)
CALL ENTHAL(HVP,VVT)
H-HV-(1.-X)*DH
DS=DH/T
CALL ENTROP (SVT,VV)
S=SV-(1.-X) *DS
GO TO 1000
C
C SX KNOWN
C
201 T=500.
CALL SOLVE (X, S, T, SXCON, TOL, IFLAG)
IF (IFLAG.EQ. 1) ERROR=. TRUE.
P=VPR (T)
CALL SPVOL(TP,VV)
VL=1./DLIQ (T)
V=VV-(I.-X) * (VV-VL)
CALL ENTHAL(HVP,VVT)
DH=DHLAT (T, VV, VL, P)
H=HV- (1. -X) *DH
GO TO 1000
C
C HX KNOWN
C
211 T=500.
S CALL SOLVE (X, H, T, HXCON, TOL, IFLAG)
IF(IFLAG.EQ.1) ERROR=. TRUE.
P=VPR (T)
CALL SPVOL (T, P, VV)
VL- . /DLIQ (T)
- 5.18-
Section 5 Freon Prooerties
V=VV-(1.-X)*(VV-VL)
DS=DHLAT(TVVVLP)/T
CALL ENTROP (SVT,VV)
S=SV-(i.-X)*DS
GO TO 1000
C
C PS KNOWN
C
221 IF(P.GT.Q(41))GO TO 15
CALL TSAT(PTS)
CALL SPVOL(TSP,VV)
-CALL ENTROP (SVTSVV)
IF(S-SV) 18,18,15
C FOR SATURATED
18 T=TS
P=VPR (T)
VL=1./DLIQ (T)
DH=DHLAT (T, VV, VL, P)
DS=DH/T
X=1.-(SV-S)/DS
V=VL+X* (VV-VL)
CALL ENTHAL(HVP,VVT)
H=HV- (1. -X) *DH
GO TO -1000
15 X=11.5E+38
T=Q(42)
CALL SOLVE (P, S, T, PSCON, TOL, IFLAG)
IF(IFLAG.EQ.1) ERROR=.TRUE.
CALL SPVOL(T,PV)
CALL ENTHAL(HP,V,T)
GO TO 1000
C
C PH KNOWN
C
231 IF (P .GT.Q (41) )GO TO 12
CALL TSAT(P,TS)
CALL SPVOL (TS, P, VV)
CALL ENTHAL (HV, P, VV, TS)
- 5.19 -
Qpetinn -;
OVJ%LIMII 1j
Frpnn
.LqJl
Prnnart;ac
I LzfJ I LI 3 I
v
IF (H-HV) 11,11, 12
C IF SATURATED
11 T=TS
P=VPR (T)
VL=1./DLIQ (T)
DH=DHLAT (T, VV, VL, P)
DS=DH/T
X=1.-(HV-H)/DH
V=VL+X* (VV-VL)
CALL ENTROP (SVT,VV)
S=SV - (1.-X)*DS
GO TO 1000
C IF SUPERHEAT
12 X=1.5E+38
T=Q(42)
CALL SOLVE (PH, T, PHCON, TOL, IFLAG)
IF(IFLAG.EQ.1) ERROR=.TRUE.
CALL SPVOL(T,P,V)
CALL ENTROP (ST,V)
GO TO 1000
C
C HS KNOWN
C
241 T=460.
P=100.0
CALL HSCON(TP,H,S,F,G)
ENORM=F*F+G*G
ITER=0
95 ITER=ITER+1
TOLD=T
POLD=P
FOLD=F
GOLD=G
T=TOLD+AMAX1 (0.001,0. 001*TOLD)
P--POLD+AMAX1 (0 .001, 0. 001I*POLD)
- 5.20-
qpetinn
L3 CLl U aa
;- -I ' cult i IU-gi
CALL HSCON(TOLDP,H,S,F,G)
DFDP- (F-FOLD) / (P-POLD)
DGDP-(G-GOLD) / (P-POLD)
IF(ABS(DFDT*DGDP) .GT.1.E-06 .OR. ABS(DGDT*DFDP) .GT.I.E-06) THEN
DP=2. * (FOLD*DGDT-GOLD*DFDT)/ (DFDT*DGDP-DGDT*DFDP)
DT=2. * (GOLD*DFDP-FOLD*DGDP)/ (DFDT*DGDP-DGDT*DFDP)
ELSE
DP=0.
DT=0.
ENDIF
J=0
ELAST=ENORM
98 J=J+l
DP=DP/2.
DT=DT/2.
P=AMAX1 (AMINI (POLD+DPQ(41) ) , 1.E-06)
T=AMAX1 (AMINI (TOLD+DT, Q (42) ) , 1.E-06)
CALL HSCON(T,P,H,S,F,G)
ENORM=F*F+G*G
IF(ENORM.GT.ELAST .AND. J.LT.JMAX) GO TO 98
Z1=ABS (P-POLD)
Z2=ABS (T-TOLD)
IF(ITER.GT.IMAX) THEN
ERROR=. TRUE.
GO TO 96
END IF
IF (Zl-. 001) 96,96,95
96 IF (Z2-.001) 97,97, 95
97 CONTINUE
CALL SPVOL(T,P,V)
X=1. 5E+38
GO TO 1000
1000 CONTINUE
U=H-P*V* (144./778.)
T-T-Q (44)
IF(ERROR) WRITE(*,1001) ITYPE,T,P,H,S,X,V
1001 FORMAT.(' ** WARNING - SOLUTION DID NOT CONVERGE **'/4X,
- 5.21 -
q.etiAfl; urn ~'iuu ri upertues
RETURN
END
C
C SUBROUTINE FOR FINDING SPECIFIC VOLUME
C
SUBROUTINE SPVOL (TA, PA, VA)
DIMENS ION Q(44)
COMMON /CONST/ Q
DATA IMAX/50/
R=Q (14)
V1= (R*TA)/PA
ITER=0
5 X=PR(TA,Vl)-PA
ITER=ITER+1
DX=DPDV (TA, Vi)
VA=Vl- (X/DX)
Z=ABS (VA-Vl)
Vl=VA
IF(ITER.GT.IMAX) THEN
WRITE(*,1001) TAPAVAZ
RETURN
END IF
IF (Z-.0001) 10,10,5
10 CONTINUE
1001 FORMAT(' ** WARNING - SUBROUTINE SPVOL, SOLUTION DID NOT CON',
'VERGE **1/4X,'T, P, V, ABS(V-VLAST) = ',4(IX,1PE11.3))
RETURN
END
C
C SUBROUTINE FOR FINDING ENTHALPY
C
SUBROUTINE ENTHAL (H, P, V, T)
DIMENSION Q(44)
COMMON /CONST/ Q
XJ-0 .185053:
T2=T**2/2 .0
T3=T**3/3 .0
T4=T**4/4. 0
-5.22-
c.,petinn -5 Freon Prnnprt;pq I
- 5.23-
Spetonn 5- lPrpnn Prfnav-+i*,,ac
VB2=2.0"*'2
vB3=3.0*VB**3
VB4=4.0*VB**4
XKT=Q (31) *T/Q (42)
EKT=EXP (-XKT)
AV=Q(32) *V
IF(AV.EQ.0.0 .OR. ABS(AV).GT.30..OR. Q(33).EQ.0.0)GO TO 100
EAV=EXP (AV)
CLN=Q(33) *ALOG(1.0+(1.0/ (Q(33) *EAV)))
RX= (Q (29) /Q (32)) * (1.0/EAV-CLN)
IF(CLN.GT.1.E-20) THEN
RZ=(Q(30)/Q(32))*EAV-Q(30)/(Q(32)*CLN)
ELSE
RZ=0.
ENDIF
GO TO 110
100 RX=0.0
RZ=0.0
EAV=0.0
CLN-0.0
110 G=Q (18)/VB+Q (21)/VB2+Q (24)/VB3+Q (27)/VB4+RZ
SI=Q(34)*ALOG(T)+Q(35)*T+Q(36)*T2+Q(37)*T3-Q(38)/(2.0*T**2)
S2=XJ*R*ALOG (VB)
S3=-XJ* (Q (17) /VB+Q (20) /VB2+Q (23) /VB3+Q (26) /VB4+RX)
S4=( (XJ*Q (31) *EKT) /Q (42) ) *G
S=S1+S2+S3+S4+Q (40)
RETURN
END
C
C SUBROUTINE FOR FINDING SATURATION TEMP AT A PRESSURE
C
SUBROUTINE TSAT (P, TS)
EXTERNAL PCON
DATA TOL/0.0001/
TS=500.
CALL SOLVE (0. ,P,TS,PCON, TOL, IFLAG)
IF (IFLAG.EQ.1I) WRITE (*,1i001)
- 5.24 -
'Section 5 Frpnn Prnnprtipc.I
L-1 aa 5.f
tioNr FZ n VPrtt nVIVItiv
- 5.25-
,R1cinn
L1~' ~
-5 Frpnn
p U ~~JUj
Pvwfnav-*;Amc
p i I
- 5.26 -
S I ,tinn5 Freon Pronnrties
- 5.27 -
,;Pction 5 - Freon PrnnprtipQ
A a
I
RETURN
END
C
C SUBROUTINE TO INTIALIZING CORRELATION CONSTANTS FOR SPECIFIED REFRIGERANT
c
SUBROUTINE FILL (NREF)
INTEGER RTYPE (8)
DIMENSION Rll(44),,Rl2(44)fRl3(44)rRl4(44)tR22(44)
DIMENSION R114(44)rR500(44)rR502(44)rQ(44)
COMMON /CONST/ Q
DATA RTYPE/11fl2ri3fl4r22fll4r5OOr5O2/,NRTYPE/8/
DATA NCOEF/44/jLAST/0/
C
DATA Rll/34.57,57.638llf43.6322f-42.82356,36.70663fO.rO.r
0 42.147028651-4344.343807f-12.84596753f4.0083725E-03rO.O3l3605356f
0 862.0710.078ll7fO.OOl9Of-3.126759fl.318523E-03f-35.76999f
a -0.025341,4.875121E-05,1.220367,1.687277E-031-1.805062E-06t
0 O.r-2.358930E-05r2.448303E-08r-1.478379E-04fl.057504EO8f
0 -9.472103EO4rO.f4.5Or580.fO.rO.023815f2.798823E-04r-2.123734E-07f
0 5.999018E-llf-336.80703f5O.5418t-0.0918395r639.5r848.0710.028927f
0 459.67/
C
DATA R12/34.84,53.34118710.118.6913710.121.983961-3-150994I
0 39.883817271-3436.6322281-12.4715222814.73044244E-03,0.fO.f
0 0.088734fO.OO65093886r-3.40972713rl.59434848E-031-56.7627671t
0 0.0602394465r-1.87961843E-05rl.31139908f-5.4873701E-04fO.fO.rO.r
a 3.468834E-09f-2.54390678E-05tO.fO.rO.r5.47510.,O.r8.0945E-03f
0 3.32662E-04r-2.413896E-O7r6.72363E-llrO.f39.556551t
0 -0.016537936,596.9,r693.3rO.O287r459.7/
C
DATA R13/36.06996f54.39512410.18.512776,0.125.879906r9.589006t
0 25.967975t-2709.538217f-7.1723439lr2.545154E-03fO.28030109lr
.-5.28-
Section 5 Freon Pronerties
DATA R14/39.06,69.56848914.5866114,36.1716662t-8.05898610.fO.f
20.715453891-2467.505285f-4.69017025r6.4798076E-04fO.770707795F
424.rO.1219336rO.OOl5r-2.16295912.135114E-03,-18.941131I
4.404057E-03,1.282818E-05fO.539776fl.921072E-04f-3.918263E-07f
0.,-4.481049E-06r9.062318E-091-4.836678E-05f5.838823EO71
-9.263923EO410.14.1661.19999710.10.0300559282f2.3704335E-04r
-2.85660077E-08,-2.95338805E-llfO.186.102162fO.3617 2528,543.16F
409.5fO.O256f459.69/
c
DATA R22/32.76,54.634409f36.74892f-22.2925657,20.473288610.fO.r
29.35754453r-3845.193152r-7.861032212.1909390E-031
0 .445746703f 686.11 0 .124098f 0 .002, -4 .35354712 .407252E-03f
-44.066868,-0.017464,7.62789E-05,1.483763,2.310142E-031
-3.605723E-06,0.r-3.724044E-0515.355465E-081-1.845051E-04I
1.363387EO8f-1.672612EO,5fO.l4.2f548.2fO.rO.O2812836r2.255408E-04t
-6.509607E-08,0.,257.341,62.4009r-0.0453335,721.9lr664.51
0 .030525, 45 9. 6 9/
c
DATA R114/36.32f6l.146414fO.tl6.418015rO.fl7.476838rl.119828I
0 27.071306f-5113.7021f-6.308676lf6.91003E-04fO.78142lllf768.351
0 0.0627808O7fO.OO5914907t-2.3856704rl.0801207E-03r-6.5643648I
9 0.0340556871-5.3336494E-0610.163660571-3.857481E-04,0.10.1
0 1.6017659E-O6r6.2632341E-10f-1.0165314E-05,0.rO.fO.r3.fO.fO.r
0 0.0175r3.49E-04f-1.67E-07fO.fO.l25.3396621f-0.11513718f477.2f
753. 97, 0. 027531, 459. 69/
c
DATA R500/3l.Of43.562f74.709f-87.583,56.483tO.rO.fl7.780935r
-3422.69717,-3.6369lr5.0272207E-0410.462940lr695.57FO.10805r
0.0060342291-4.54988812.308415E-03,-92.90748rO.O8660634I
-3.141665E-05,2.742282,-8.726016E-04,0.tO.f-1.375958E-06F
9.149570E-09f-2.102661E-04rO.fO.fO.r5.475fO.fO.fO.026803537f
2.8373408E-04f-9.7167893E-0810.rO.r46.4734f-0.09012707564,646.3f
-5.29-
Qpetnn ; Preinn
Jl;Ut~lJU t' l" *I Wll I IJIL 1 i
* 7.0240549E-07,0.022412368,8.8368967E-06,-7.9168095E-09,
* -3.7167231E-04,-3.8257766E07,5.5816094E04,1.5378377E09,4.2,609.,
* 7.E-07,0.020419,2.996802E-04,-1.409043E-07,2.210861E-11,0.,
* 35.308,-0.07444,591.,639.56,0.028571,459.67/
c
IGO=0
DO 5 I=INRTYPE
IGO=IGO+I
IF(NREF.EQ.RTYPE(IGO)) GO TO 100
5 CONTINUE
C
WRITE (*, 11)
11 FORMAT(///' ** ERROR - NO PROPERTIES FOR THIS REFRIGERANT **')
STOP
C
100 IF(IGO.EQ.LAST) RETURN
LAST = IGO
GO TO (l10,120,130,140,150,160,170,180) ,IGO
C
110 DO 115 I-1,NCOEF
Q(I)=R1I (I)
115 CONTINUE
GO TO 500
c
120 DO 125 I-1,NCOEF
Q (I)=R12 (I)
125 CONTINUE
GO TO 500
c
130 DO 135 I=1,NCOEF
Q(I)=R13 (I)
135 CONTINUE
GO TO 500
C
140 DO 145 I-I,NCOEF
Q (I) =R14 (I)
145 CONT INUE
GO TO 500
- 5.30 -
Ca^+; nn C - reon Pronerties
3.,mL IUI !-7C - Freon. ..oner....
C
150 DO 155 I=1,NCOEF
Q(I)=R22 (I)
155 CONTINUE
GO TO 500
C
160 DO 165 I=1,NCOEF
Q(I)=R14 (I)
165 CONTINUE
GO TO 500
C
170 DO 175 I=1,NCOEF
Q(I)=R500(I)
175 CONTINUE
GO TO 500
C
180 DO 185 I=1,NCOEF
Q(I)=R502 (I)
185 CONTINUE
C
500 CONTINUE
RETURN
END
C
C
SUBROUTINE SOLVE (Y1, Y2, XNEW, FUNC, TOL, IFLAG)
EXTERNAL FUNC
DATA IMAX/100/,JMAX/10/
C
IFLAG0
C
C
C Iterate using Newton's method with damping
C
ITER=0
CALL FUNC (Y1, Y2, XNEW, FNEW)
C
5 ITER-ITER+I
- 5.31 -
Setionn5 Freon Prnnortipq
C
C Determine numerical approximation to derivative
C
X=XNEW
F=FNEW
C
XNEW=X+AMAX1 (TOL, X*TOL)
CALL FUNC (Y1, Y2, XNEW, FNEW)
DFDX-(FNEW-F) / (XNEW-X)
DX=2. *F/DFDX
C
C Determine new guess but don't accept if there is an increase in
C the residual error---> "damping"
C
J=0
40 CONTINUE
J=J+1
DX=DX/2.
XNEW=X-DX
CALL FUNC (Y1, Y2, XNEW, FNEW)
IF(ABS(FNEW).GT.ABS(F) .AND. J.LT.JMAX) GO TO 40
70 CONTINUE
C
C Check for convergence
C
ERROR=ABS (DX/XNEW)
IF(ERROR.GT.TOL .AND. ABS(DX) .GT.l.E-06
.AND. ITER.LT.IMAX) GO TO 5
C
IF (ITER. EQ. IMAX) IFLAG=1
RETURN
END
RETURN
END
-5.32-
.,petiAnn-5 - Frpnn Prfnar-+;,nv
LJJL.-. ... 'uVa
'-.-A F I UUJI tIt!s
c
SUBROUTINE TSCON (T, S, V, F)
CALL ENTROP (SNEWT,V)
F=SNEW-S
RETURN
END
C
SUBROUTINE SVCON (V, S, T, F)
CALL ENTROP (SNEW,T, V)
F=SNEW-S
RETURN
END
C
SUBROUTINE XVCON(X, V,T,F)
P=VPR(T)
CALL SPVOL(TP,VV)
VL=1./DLIQ (T)
F=VV-(I.-X)*(VV-VL)-V
RETURN
END
C
SUBROUTINE SXCON (X, S, T, F)
P=VPR (T)
CALL SPVOL (TfP,VV)
VL=1./DLIQ (T)
CALL ENTROP (SVAPfT,VV)
DS=DHLAT (T,VV,VL, P) /T
F=SVAP- (1 . -X) *DS-S
RETURN
END
C
SUBROUTINE HXCON (X, H, T, F)
P=VPR (T)
CALL SPVOL(TP,VV)
VL=1. /DLIQ (T)
CALL ENTHAL (HV, P, VV, T)
F=HV- ( 1.-X) *DHLAT (T, VV, VL, P) -H
RETURN
-5.33 -
Qartinn -;- p triNn Prnnart;ac
]Freon
J- Prn-L- iw I
urp LIU")
END
C
SUBROUTINE PSCON(P,S,T,F)
CALL SPVOL(TP,V)
CALL ENTROP (SNEW, T,V)
F=SNEW-S
RETURN
END
C
SUBROUTINE PHCON(PH,T,F)
CALL SPVOL(TP,V)
CALL ENTHAL (HNEW, P, V, T)
F=HNEW-H
RETURN
END
C
SUBROUTINE PCON (DUM,P, T, F)
F=VPR (T)-P
RETURN
END
c
SUBROUTINE HSCON(TP,H,S,F,G)
CALL SPVOL(TP,V)
CALL ENTROP (SGUESST,V)
CALL ENTHAL (HGUESS, P, V, T)
F=SGUESS-S
G=HGUESS-H
RETURN
END
-5.34-