Modelo de Torres de Refrigeración

June 2, 2016 | Author: hellwigtobi2320 | Category: N/A
Share Embed Donate


Short Description

Download Modelo de Torres de Refrigeración...

Description

Methodologies for the Design and Control of Central Cooling Plants

by

James Edward Braun

A thesis submitted in partial fulfillment of the requirements for the degree of

DOCTOR OF PHILOSOPHY (Mechanical Engineering)

at the

UNIVERSITY OF WISCONSIN - MADISON

1988

© Copyright by James Edward Braun 1988 All Rights Reserved

Methodologies for the Design and Control of Central Cooling Plants James Edward Braun Under the supervision of Professors Sanford A. Klein, John W. Mitchell, and William-A. Beckman

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 are used to validate the models. Two methodologies are presented for determining optimal control of systems without thermal storage. A component-based algorithm is developed for non-linear optimization applied to system simulations. Results of a program implementation of this optimization algorithm are used to develop a "simple" near-optimal control methodology. This near-optimal methodology relies on an empirical model for the total power consumption of the system that lends itself to rapid determination of optimal

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 nearoptimal 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.

Sanford-A. Klein

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

List of Tables

xiv

Nomenclature

xv

Chapter 1 Introduction

1

1.1 Background 1.2 Research Objectives and Approach 1.2.1 Model Development 1.2.2 Methodologies for Optimal Control 1.2.3 Applications 1.3 Description of the Dallas/Fort Worth Airport System 1.4 Organization Chapter 2 Models for Centrifugal Chillers 2.1 A Mechanistic Model for Variable-Speed Chillers 2.1.1 Model Formulation 2.1.2 Solution of the Equations 2.1.3 Parameter Estimation and Comparison with Measurements 2.1.4 Surge Predictions 2.2 A Model for Correlating Performance Data 2.3 Performance Characteristics of the D/FW Chiller 2.4 Summary Chapter 3 Condenser-Side Component Models 3.1 Effectiveness Models for Cooling Towers

v

1 8 9 10 11 11 13 14 14 15 30 32 38 41 48 52 54 54

3.1.1 Detailed Analysis 3.1.2 Merkel Analysis 3.1.3 Effectiveness Model 3.1.4 Estimating the Water Loss 3.1.5 Model Comparisons 3.1.6 Correlating Performance Data 3.1.7 Potential Improvements in the Model 3.1.8 Sump and Fan Power Analyses 3.2 Condenser-Loop Pumping Requirements 3.3 Summary Chapter 4 Evaporator-Side Component Models 4.1 Development of an Effectiveness Model for Cooling Coils 4.1.1 Detailed Analysis 4.1.2 Dry Coil Effectiveness 4.1.3 Wet Coil Effectiveness 4.1.4 Combined Wet and Dry Analysis 4.1.5 Model Comparisons 4.1.6 Correlating Performance Data 4.2 Air Handler Analysis 4.3 Chilled Water Loop Pumping Requirements 4.4 Summary Chapter 5 Methodologies for Optimal Control of Systems without Storage 5.1 A Component-Based Optimization Algorithm 5.1.1 Quadratic Costs and Linear Outputs 5.1.2 Nonlinear Optimization 5.1.3 Constraints 5.1.4 Algorithm Summary and Program Implementation 5.2 A System-Based Algorithm for Near-Optimal Control 5.2.1 System Cost Function 5.2.2 Near-Optimal Control Algorithm 5.2.3 Parameter Estimation 5.2.4 Application to Chilled Water Systems vi

56 60 61 64 66 68 72 75 77 82 84 84 86 89 90 93 94 97 99 102 104 106 108 111 115 119 122 124 124 125 127 128

5.3 Comparisons 5.4 Summary

133 138

Chapter 6 Applications to Systems without Storage 6.1 System Description 6.2 Control Guidelines for Multiple Components in Parallel 6.2.1 Multiple Cooling Tower Cells 6.2.2 Multiple Chillers 6.2.3 Multiple Air Handlers 6.2.4 Multiple Pumps 6.3 Sensitivity Analyses and Control Characteristics of Subsystems 6.3.1 Effects of Load and Ambient Conditions 6.3.2 Condenser Water Loop 6.3.3 Chilled Water Loop 6.4 Optimal versus "Alternative" Control Strategies 6.4.1 Conventional Control Strategies 6.4.2 Humidity Control 6.5 Comparisons of Alternative System Configurations under Optimal Control 6.5.1 Variable versus Fixed-Speed Equipment 6.5.2 Series versus Parallel Chillers 6.7 Summary Chapter 7 Methodologies for Optimal Control of Systems with Storage 7.2 Optimization of Systems with Storage 7.1.1 Dynamic Programming 7.1.2 Application Systems with Fully-Stratified Storage 7.1.3 Results for Fully-Stratified Storage 7.1 Models for Forecasting Building Cooling Requirements 7.1.1 Time-Series Models 7.1.2 Application to Forecasting Cooling Loads 7.3 Summary

vli

140 140 143 144 146 151 154 156 156 157 159 160 161 163 165 165 169 172 175 176 178 181 187 193 194 197 202

Chapter 8 Conclusions and Recommendations 8.1 Mathematical Models 8.2 Optimal Control Methodologies 8.3 Guidelines for Design and Control

204 204 205 208

Appendix A Refrigerant Property Data

212

Appendix B Method for Determining the Performance of Partially Wet and Dry Cooling Coils

213

Appendix C Component Parameters for Optimization Studies

216

References

220

vii

List of Figures

2

Figure 1.1.

Schematic of a Typical Chilled Water System

Figure 2.1.

Schematic and Pressure-Enthalpy Diagram for a Single-Stage Chiler

16

Figure 2.2.

Velocity Components for Refrigerant Exiting a Compressor

24

Impeller Figure 2.3.

Comparison of Modeled Evaporating Temperatures with D/FW Data

35

Figure 2.4.

Comparison of Modeled Condensing Temperatures with D/FW Data

36

Figure 2.5.

Comparison of Modeled Chiller Power with D/FW Data

36

Figure 2.6.

Comparison of Modeled Compressor Speeds with D/FW Data

37

Figure 2.7.

Modeled Compressor Speed Versus Load Requirement

39

Figure 2.8.

Comparison of Modeled Surge Speed with D/FW Data

41

Figure 2.9.

Effect of Water Flow Rates on Chiller Performance for Fixed Leaving Water Temperatures

42

Figure 2.10.

Dependence of Chiller Performance on Leaving Water Temperatures for Fixed Temperature Differences

43

Figure 2.11.

Comparison of Measured and Correlated Chiller Power

47

ix

Figure 2.12.

D/FW Chiller COP for Variable-Speed Control

49

Figure 2.13.

D/FW Chiller COP for Vane Control

50

Figure 2.14.

Comparison of Chiller Power Consumptions under Vane and Variable-Speed Control

51

Figure 2.15.

Effect of Refrigerant Type on Chiller Performance

52

Figure 3.1.

Schematic of a Counterflow Cooling Tower

56

Figure 3.2.

Saturation Air Enthalpy versus Temperature

62

Figure 3.3

Air Heat Transfer Effectiveness Comparisons (Dry Bulb, Wet Bulb, and Water Inlet Temperatures of 70 F, 60 F, 90 F)

67

Figure 3.4

Water Temperature Effectiveness Comparisons (Dry Bulb, Wet Bulb, and Water Inlet Temperatures of 70 F, 60 F, 90 F)

Figure 3.5.

Comparisons of Relative Water Loss (Dry Bulb, Wet Bulb, and Water Inlet Temperatures of 70 F, 60 F, and 90 F)

68

Figure 3.6.

Comparisons of Leaving Water Temperature Measurements from Simpson and Sherwood [1946] with Effectiveness Model Results

70

Figure 3.7.

Comparisons of Relative Water Loss Measurements from Simpson and Sherwood [1946] with Effectiveness Model Results

71

Figure 3.8.

Comparisons of Leaving Water Temperature Measurements from D/FW Airport with Effectiveness Model Results

72

x

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)

75

Figure 3.10.

Quadratic Fit to Variable-Speed Fan Power Consumption

77

I

Figure 3.11.

Pump Pressure Rise and System Pressure Drop Characteristics

78

Figure 3.12.

Quadratic Fit to Variable-Speed Pump Power Consumption

82

Figure 4.1.

Schematic of a Counterflow Cooling Coil

86

Figure 4.2.

Air-Side Heat Transfer 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)

95

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)

96

Figure 4.4.

Correlation of Cooling Coil Model Results with Catalog Data

99

Figure 5.1.

Schematic of the Modular Optimization Problem

109

Figure 5.2.

Comparisons of Optimal Chilled Water Temperature for Component and System-Based Methodologies

134

Figure 5.3.

Comparisons of Optimal Supply Air Temperature for Component and System-Based Methodologies

135

Figure 5.4.

Comparisons of Optimal Tower Control for Component and System-Based Methodologies

136

Figure 5.5.

Comparisons of Optimal Condenser Pump Control for Component and System-Based Methodologies

137

xi

Figure 5.6.

Comparisons of Optimal System Performance for Component and System-Based Methodologies

138

Figure 6.1.

Effect of Condenser Water Flow Distribution for Two Chillers in Parallel

147

Figure 6.2.

Effect of Relative Loading for Two Identical Parallel Chillers

150

Figure 6.3.

Comparison of Optimal System Performance for Individual Supply Air Setpoints with that for Identical Values

152

Figure 6.4.

Effect of Chiller and Pump Sequencing on Optimal System Performance

155

Figure 6.5.

Effect of Uncontrolled Variables on Optimal System

157

Performance Figure 6.6.

Power Contours for Condenser Loop Control Variables

158

Figure 6.7.

Power Contours for Chilled Water and Supply Air Temperatures

160

Comparisons of Optimal-Control with "Conventional" Control

162

Figure 6.8.

Strategies Figure 6.9. Figure 6.10.

Figure 6.11.

Comparison of "Free" Floating and "Fixed" Humidity Control

164

Optimal System Performance for Variable and Fixed-Speed Chillers

166

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

xii

168

Figure 6.13.

Figure 6.14. Figure 7.1. Figure 7.2. Figure 7.3.

Figure 7.4.

Figure 7.5.

Figure 7.6.

Figure 7.7.

Comparison of Chiller Performance for Parallel and Series Configurations

170

Optimal System Performance for Series and Parallel Chillers

172

Dynamic Programming Network

180

Parallel Configuration for Thermal Storage

182

Optimal Storage Charge Level for One Day with Time-of-Day Electric Rates

190

Optimal Chiller Loading for One Day with Time-of-Day Electric Rates

191

One-Hour Forecasts of March D/FW Cooling Load Data for AR(4) Model

198

Five-Hour Forecasts of March D/FW Cooling Load Data for AR(4) Model

199

Five-Hour Forecasts of March D/FW Cooling Load Data for Combined Deterministic and Stochastic Model

200

so* xml

List of Tables Page

Table 2.1

Known D/FW Chiller Parameters

33

Table 2.2

Compressor Parameters Determined from Regression

35

Table 2.3

Comparisons of Chiller Model with Controlled Tests

38

Table 2.4

Measurements of the D/FW Chiller Performance for Variable and Fixed-Speed Control

46

Table 3.1

Mass Transfer Correlation Coefficients for Data of Simpson

70

and Sherwood [1946] 97

Table 4.1

Effectiveness Model Comparisons with Cooling Coil Catalog Data

Table 6.1

Summary of System Component Characteristics

143

Table 6.2

Cooling Season Results for Optimal vs. Conventional Control

163

Table 6.3

Cooling Season Results for Variable vs. Fixed-Speed Equipment

169

Table 7.1

One-Day Operating Cost Comparisons for Systems with Thermal Storage

193

Table 7.2

AR Model Fit to March D/FW Data (1 hour sampling)

197

xiv

Nomenclature Chapter 2 area

A Ax

-

exit flow area from compressor impeller

Cpw

specific heat of water

h

specific enthalpy of refrigerant or heat transfer coefficient

LMM

-

log-mean temperature difference

m

-

mass flow rate

P

-

refrigerant pressure

Pch

-

power consumption of compressor drive motor

0

-

rate of heattransfer

r

-

ratio of outside (finned) tube area to inside area or impeller radius

R

-

heat transfer resistance of tube, including fouling factor

T

-

temperature

UA

-

overall heat transfer conductance

ux

-

velocity of tip of impeller

V

-

refrigerant specific volume

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

velocity normal to the impeller to the impeller tip speed - work coefficient, defined as the ratio of the tangential component of the fluid velocity to the impeller tip speed Ppol

- work coefficient for a polytropic process

Ipol

- polytropic efficiency, defined as the ratio of the polytropic work to the actual compressor work required

Tim

- overall efficiency associated with the motor and gearbox peak compres

Tiref 0)

-

polytropic efficiency

angular velocity of impeller

Additional Subscripts c

- condenser conditions

chw

- chilled water conditions

cw

- condenser water conditions

chwr

-

chiller water return from the load chilled water supply to the load

chws

leaving water temperature from the condenser

cwr

-

cws

-

e

-

evaporator conditions

i

-

inside

n

-

normal component

0

-

outside

supply water to the condenser

xvi

r

-

radial component

R

-

refrigerant

t

-

tangential component

-

conditions at tip of compressor impeller

-

refrigerant state at exit of evaporator

-

refrigerant state at exit of compressor

-

refrigerant state at exit of condenser

-

refrigerant state at inlet to evaporator

1 2 3 4

Chapters3and4 A

-

Av

- surface area of water droplets per volume of cooling tower

Cpa

-

constant pressure specific heat of dry air

Cpm

-

constant pressure specific heat of moist air

Cpv

-

constant pressure specific heat of water vapor

Caw

- constant pressure specific heat of liquid water

Cs

- derivative of saturation air enthalpy with respect to temperature

C*

-

ha

- enthalpy of moist air per mass of dry air

hc

-

hD

- mass transfer coefficient

hf

-

hg

- enthalpy of water vapor

hs

- enthalpy of saturated air

surface area

ratio of air to water capacitance rate for dry analysis

convection heat transfer coefficient

enthalpy of liquid water

00 xvln

mass flow rate

M

-

xia

- mass flow rate of dry air

m-

ratio of air to water effective capacitance rate for wet analysis

Le

-

Lewis number

Ntu

-

overall number of transfer units

P

-

power consumption

Q

-

overall heat transfer rate

Ta

-

air temperatur

Td,

-

ambient air dewpoint temperature

Tref

-

Ts

-

Tw

- water temperature

Twb

-

UA

- overall heat transfer conductance

V

-

volume

AP

-

pressure drop or rise

APO

-

static pressure drop.

ea

-

air-side heat transfer effectiveness

7

-

pump speed relative to maximum design speed

Co a

-

air humidity ratio

CO S

-

humidity of saturated air

reference temperatue for zero enthalpy of liquid water surface temperature

ambient air wet bulb temperature

xvii

Additional Subscripts

a

- air stream conditions

ahu

- air handler

cw

-

condenser water loop

chw

-

chilled water loop

des

-

design conditions

dry

-

dry surface

e

-

effective

i

-

inlet or inside conditions

max

-

maximum

o0p

outlet or outside conditions -

s-

pump conditions surface conditions

T

-total

w

-

water stream conditions

wet

-

wet surface

-

instantaneous operating cost

f

-

vector of uncontrolled variables

g

-

vector of equality constraints

h

-

vector of inequality constraints

M

-

vector of discrete control variables

-Chapter5 J

xix

u

-

vector of continuous control variables

x-

vector of component input stream variables

y

vector of component output stream variables

Chapter 7

J

-

L

- instantaneous or stage operating cost

P

-

R

integrated operating cost

system power consumption cost of electricity

t

-

ime

T

-

storage temperature

Twb

- ambient wet bulb temperature

Qch

- rate of cooling provided by the chillers

QL

-

rate of cooling provided by the cooling coils to meet the load

Qs

-

rate of energy transfer from storage to meet the load (positive) or to storage as supplied by the chillers (negative)

v

-

velocity in the x direction

x

-

position measured from the storage inlet

Xt

- output of a pure time-series model at time t

Yt

-

output of a combined deterministic and time-series model at time t

f

-

vector of uncontrolled variables

u

-

vector of continuous control variables

x

-

vector of state variables

-

velocity relative to tank height measured in the x direction

v

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

Ventilation Air

Figure 1.1 Schematic of a Typical Chilled Water System

Exhaust Air

solar radiation through windows, infiltration, and conduction through the envelope. The heat extracted from the air streams across the cooling coils warms the water 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. Design retrofits to existing systems may provide significant savings in operating 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 changing load conditions is limited to the on/off cycling of individual equipment operated in parallel or series. A more efficient method of operation is to continuously 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 in many applications. Treichler [1985] concluded that variable-speed pumping is 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 higher efficiencies at part-load conditions, utilizes variable-speed control of the compressor. Another possibility for improving the overall chiller performance is through a change in refrigerant. The refrigerant that gives the best performance depends upon the

4 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 the original design. The addition of chilled water storage, if properly controlled, can significantly 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 environmental conditions result in improved chiller performance. 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, through changing cooling requirements and ambient conditions. Currently, the 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 possible to significantly reduce operating costs.

5 Much of the literature related to cooling systems pertains to sizing of the equipment. The ASHRAE Handbook of Fundamentals [1981] gives background necessary for individual equipment sizing. In order to properly evaluate the economics associated with design retrofits or improved control practices, it is necessary to perform annual simulations of the complete system using long-term average weather data and load 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 oversized and operating inefficiently. A transient system simulation program, TRNSYS [1984] was developed over 10 years ago by the University of Wisconsin Solar Energy Laboratory for analyzing the performance of solar energy systems. TRNSYS is a modular program in which models of system components (e.g. pipes, heat exchangers, storage) are written as 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 in which a number of individuals can work independently and it minimizes the programming required to investigate alternative component models and plant 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 simulation programs (DOE-2 [ 1980], BLAST [1981], TRACE). However, since TRNSYS has been used primarily for solar energy systems, its standard component 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 utzed for forecasts. The conjugate gradient method-was applied to an integral 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 Gunewardana [1979] applied dynamic programming techniques for minimizing the costs associated with a cooling system for power plants. The cooling System consisted of a cooling tower and spray pond that could be operated in series or parallel through eight possible modes in order to reject heat from the condenser of the power plant. The 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 an optimization period of 2 hours were found to be adequate for this problem. Forecasts of the ambient conditions and load were made by assuming that their rates of change were constant. Depending upon the weather conditions, substantial cost savings could be realized.

1.2

Research Objectives and Approach The goal of this work is to develop general methodologies useful to engineers and

plant managers for designing, retrofitting, and controlling the equipment in large central chilled water systems. The methodologies would be in the form of:

1) mathematical models for the individual equipment 2) optimal control algorithms 3) general guidelines for design and control

The methodologies developed are of a general nature so as to be applicable to a wide variety of systems.

9

1.2.1

Model Development

Appropriate model development and selection depends strongly upon the desired goals. There are three distinct uses for models in this study that result in three different levels of mathematical representation.

1) ComZt

sie and Analysis: Detailed mechanistic models are necessary in

order to evaluate design retrofits of individual equipment. They are also useful in identifying the important variables that affect a components' overall performance and provide a basis for the development of simpler models. When little or no performance data are available, mechanistic models are a means of generating a complete performance map for a particular component.

2) System Simulation: It is possible to correlate the performance of individual components with simple mathematical relationships. In this manner, the time required to perform a simulation of a complete system for studying the effects of different control strategies and system configurations on overall performance is significantly reduced.

3) On-Line Optimal Control: In order to practically apply on-line optimal control to cooling systems, it is advantageous to have a simple model of the overall power consumption of the plant in terms of a minimum of inputs and with which optimal control setpoints can be readily determined. If the characteristics of the system or measuring equipment is changing with time, it may necessary to update parameters of the model using recursive identification techniques. This is most easily carried out for models that are linear with respect to the

10 empirical coefficients. For systems with thermal storage, it is necessary to forecast cooling requirements and ambient conditions in order to perform optimal control.

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.

1.2.2 Methodologies for Optimal Control Methodologies for determining the minimum of a given cost function are well established. For systems without significant thermal storage, the dynamics of the cooling equipment can be neglected (Hackner [19851) and the plant optimization involves minimizing the total instantaneous energy consumption of the chillers, cooling tower fans, pumps, and cooling coil fans in terms of the current load and ambient conditions. In this study, two methodologies are presented for determining optimal control. First of all, a component-based algorithm is developed for non-linear optimization applied to system simulation. In this study, this methodology is used primarily as a simulation tool for analyzing the design and control characteristics of chilled water systems under optimal control. Theoretically, the algorithm could be used for on-line optimization of the simulation of an operating system using "simple" component models. The simulation would proceed in parallel with the actual system with the possibility of updating parameters of the component models using on-line measurements. However, in this study, results of the optimization program are used to develop a "simple" near-optimal control methodology. An overall empirical cost 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 utility rates are present. For systems with storage, it is necessary to forecast cooling requirements and ambient conditions in order to perform optimal control. A combined deterministic and time series model is developed for forecasting cooling loads and is evaluated using data from the D/FW airporL

1.2.3

Applications

In order to make any general conclusions concerning design and control of central cooling plants, it is necessary to simulate the performance of a variety of system configurations under optimal control. The methodologies developed for evaluating the optimal control of chilled water systems are utilized in studying the effects of alternative control strategies and system configurations. In addition, control guidelines useful to plant engineers for improved control practices are identified.

1.3

Description of the D/FW Airport System 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 nearoptimal 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 fullystratified thermal storage systems in order to identify control simplifications for nearoptimal 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 separate document (Braun [19881).

14

Chapter 2 Models for Centrifugal Chillers In this chapter, mathematical models are developed for centrifugal chillers. A mechanistic model is presented for chillers operated with variable-speed control. Results of this model are used to identify a simpler empirical model more suitable for 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.

2.1

A Mechanistic Model for Variable-Speed Chillers A common method for modeling the performance of chillers for use in the

simulation of central cooling plants is to fit empirical relationships to manufacturers' data. Stoecker [1971] and Bullock [1984] give examples of functional forms that are adequate for this purpose. One limitation of this approach is that the model can only be trusted within the range of conditions for which it was fit. Often the available data are too limited to provide a complete performance map. In addition, empirical models are not useful for investigating design retrofits associated with the chiller, such as changes in refrigerant type or conversion from fixed-speed with vane control to variable-speed capacity modulation. Such models are also limited in studying the importance of certain control variables, such as chilled and condenser water flow rates. Although manufactutrers' have developed mechanistic models of centrifugal chillers, their

15 descriptions are not available in the open literature. In this section, a mechanistic model of a centrifugal chiller with variable-speed 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.

2.1.1

Model Formulation

Figure 2.1 shows a schematic and associated pressure-enthalpy diagram of a centrifugal chiller with single-stage compression. The refrigerant entering the compressor at state 1 is assumed to be a saturated vapor. Both the enthalpy and pressure rise as the refrigerant passes through the compressor to a superheated state 2. In the condenser, the refrigerant is cooled and condensed at a relatively constant pressure and is assumed to exit at state 3 as a saturated liquid. It is then expanded at constant enthalpy to the evaporator pressure (state 4). In the development that follows,

the chilled water supply and return temperatures, Tchws and TChw, refer to supply and return to the load (i.e. from and to the evaporator), while the condenser water supply and return, Tcw and To modeled as follows.

r

are to and from the condenser. Each of the components are

16

14-" Ph

Tchwr

Qe

T chws

2

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 evaporator is modeled using an overall conductance and log-mean temperature difference. Three expressions for evaporator heat flow that result from this model and from energy balances on the two fluid streams are

Qe = UAeLMDe =

rR(hj-h4)

= IMdiCpwCrIdwrTdw

where,

o UAe LMD

thR h, h4

Cpw

= rate of heat transfer to evaporator = e =

=

overall evaporator conductance evaporator log-mean temperature difference refrigerant mass flow rate

= specific enthalpy of refrigerant exiting evaporator =

specific enthalpy of refrigerant entering evaporator

=

chilled water flow rate

-

specific heat of water

The log-mean temperature difference and overall conductance are determined as

(2.1.1) (2.1.2) (2.1.3)

18

LMTe

Tdmw- Tchws

Td r - Te]

(2.1.4)

'[T&iW, -Te]

Ae,i 1 +- 1 1 + Re he,i+ reheo

UAe

(2.1.5)

where, Te

=

refrigerant evaporation temperature

Aei

=

total inside surface area of evaporator tubes

heJ

=

heat transfer coefficient for water flow through evaporator tubes

he,o

=

boiling refrigerant heat transfer coefficient

re

=

ratio of effective outside evaporator tube area (product of overall fin efficiency and total surface area) to inside area

Re

=

the resistance to heat transfer associated with the tube material, including the fouling factor.

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 boiling heat transfer coefficients, but there is no universally accepted correlation. Generally, the heat transfer coefficient for a particular application may be correlated in the form

19 he,o = a (Tes'T ) b

(2.1.6)

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 the water and the outside tube surface is

=

where T

w

r

Tchw+Aeh

,

(2.1.7)

Re

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 that the heat transfer coefficient is given as (ASHRAE [1985]) 0 8 he, i == 0.023 rkdwRe he., eP

0.4

where kw is the thermal conductivity of water,

(2.1.8)

4 is the inside tube diameter,

Ree is the

Reynolds number associated with water flow in an individual evaporator tube, and Pr is the Prantl number for water.

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=

(2.1.9)

C

MR (h 2 -h 3)

(2.1.10)

= rCwCpw (Tcw- Tw)

(2.1.11)

where, h2

=

specific enthalpy of refrigerant entering condenser

h3

= specific enthalpy of refrigerant exiting condenser

cw= condenser water flow rate

and

LAM

C

UAC+R

.

TCW$

Ti- T]

(2.1.12)

1

(2.1.13)

hCji +rchc,o

R

Tc

=

refrigerant condensing temperature

AC~

=

total inside surface area of condenser tubes

hci = heat transfer coefficient for water flow through condenser tubes hco = condensing refrigerant heat transfer coefficient rc = ratio of effective outside condenser tube area (product of overall fin efficiency and total surface area) to inside area

21 R

=

the resistance to heat transfer associated with the tube material, including the fouling factor.

It is not strictly correct to use the refrigerant condensing temperature, Tc, in determining the log-mean temperature difference for the entire condenser. Refrigerant entering the condenser is superheated and is cooled sensibly to the saturation temperature at a relatively constant pressure prior to condensation. During this process, 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 single condensing heat transfer coefficient in the model. Theoretical expressions for determining the heat transfer coefficients for laminar 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

3

he9

=0.725

2

0.25

kf(pf-pv) ghfg N dcLf (Tc - Tcs)

where, kf

=

conductivity of the liquid refrigerant

hfg = heat of vaporization of the refrigerant g

=

gravitational acceleration

pf

=

density of saturated liquid refrigerant

Pv= density of saturated vapor refrigerant =

condenser tube diameter

(2.1.14)

22

viscosity of saturated liquid refrigerant

TCOs = average tube outside surface temperaure

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)

where TC, is the average condenser water temperature. The correlation for turbulent flow in tubes, equation (2.1.8), is applicable to a condenser tube and is used for evaluating the water side heat transfer coefficient for the

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

complete performance data is not always readily available or it is presented in such a way as to be specific to the refrigerant employed. The model developed in this study relies on relationships that are commonly used in the design of centrifugal compressors. It employs fundamental mass, momentum, and

energy balances and empirical correlations that are representative of well-designed centrifugal compressors.

23 Ferguson [1963] provides a good background for much of the presentation to follow concerning the compressor. Figure 2.2 shows a cross-section of the impeller of a centrifugal compressor showing a single blade with pertinent dimensions and 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 denoted as Vx t and Vx, n. Neglecting the angular momentum of the incoming refrigerant, a momentum balance on the impeller gives an expression for the required work input per unit mass of refrigerant. w =COVXtr = uXVX 9 =

XU 2

(2.1.16)

where the work coefficient, gx, is defined as the ratio of the tangential component of the fluid velocity to the impeller tip speed. 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 diagram of Figure 2.2 is

24

VX~

{.

Blade

Compressor Impeller

Velocity Vectors

Vx,n

Ux

Figure 2.2. Velocity Components for Refrigerant Exiting

a Compressor Impeller

25

UxoVxncOt(o3)

=

(2.1.18)

1- CxCO()

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, dimensionless flow coefficient,

, versus the

x where,

wpOl 1

p1P

(2.1.20)

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

= constant

Pv

(2.1.22)

The polytropic coefficient, n, is determined by the actual initial and end states.

v2 V1

PIP 21

1-PJ

(2.1.23)

Since there is an increase of entropy in the actual irreversible compressor, there must be a reversible heat input to the reversible compressor for the end states to be the same. The polytropic work is given by

n

P2

Wpo I -

fp

vdP=Piv

P2

nfn - 1 PI]

The stage work coefficient,

,

n

(..4

1(2.1.24)

is determined from the polytropic coefficient and

efficiency as

g-tx =

Wiesner's results for

9

(2.1.25)

are a series of straight lines that can be represented by

= 0.69 (1- 4xcot([3)) = 0.69

(2.1.26)

27

The polytropic efficiency results of Wiesner are presented as curves of relative efficiency versus the dimensionless flow coefficient, x, for different rotational Mach Numbers, M., where

M

O

=

__

(2.1.27)

ao

and a. is the sonic velocity in the refrigerant at the impeller inlet conditions. The following equation provides a good fit to the graphical data of Wiesner.

ip! = [1 +a(1.1.Mo)] 1 -exp( x(b

x

+ cox + d))(2.1.28)

1

Tref

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 refrigerants considered in this study (R-500, R-22, and R-12). In order to evaluate the flow coefficient using equation (2.1.19), it is necessary to 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

(2.1.29)

sx = S1

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 2

(2.1.30)

h x = h 2 - -2

From an energy balance on the impeller and equation (2.1.16)

h2 = h1 +

2

xux

(2.1.31)

So,

2

hx-h+

u =g , x'2

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

2 2 V2 = Vn+ V~

x2(2

t2)

(..3

29

Thus the exit impeller enthalpy is

2]

2

x

hX =thi+u

.-

(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 enthalpy of the expansion device are assumed to be equal.

(2.1.35)

h4= h 3

Finally, the power input to the motor driving the compressor is calculated as

11R(h Pch =

2

- h 1)

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 refrigerants at any state. Additionally, curve-fits were developed for viscosity and conductivity at saturated liquid conditions for refrigerants considered in this study. The sonic velocity associated with the vapor refrigerant exhibits very little variation

over a wide range of temperatures. It was assumed to be constant evaluated at 50 degrees Fahrenheit. Appendix A gives the viscosity and conductivity curve-fits and

30 sonic velocity data. A listing of the refrigerant properties program is given by Braun [1988].

2.1.2

Solution of the Equations

For a given chiller design, there are five independent input variables that define the chiller performance through the equations presented in the previous section. It is possible to solve these equations in different ways depending upon the desired inputs and outputs. Most commonly, the independent variables controlling the compressor performance would be the entering chilled and condenser water temperatures and flow rates and the chilled water setpoint. In this case, the primary outputs would be the compressor power requirement and speed. Alternatively, it is possible to specify the compressor speed as an input, in which case the leaving chilled water temperature and power requirement are outputs. Other possibilities include specifying the leaving in place of entering condenser water temperature or the power consumption. In any case, the solution of the equations is not as complicated as it might first appear. For a single-stage compressor with a specified chilled water setpoint and entering or leaving condenser water temperature, the equations are solved in two separate steps.

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. F(Te) = UAeLMT4"De

-

mehwCpw(T e hwr ' Thws)

(2.1.37)

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

F1 = UAcLMIDc - rncwCp(T,- -Tcw)

F2 =

(2.1.39)

ARVx rX

F 3 = (h2 - h1)

-

(2.1.38)

wPOI 1

(2.1.40)

lpol

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.. Most multi-stage centrifugal chillers utilize an economizer. For a two-stage compressor, refrigerant exiting the condenser is expanded to the intermediate pressure 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. The maximum cooling capacity of a chiller is limited by several factors. For 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 cooling capacity is output. Equations (2.1.37) - (2.1.40) are solved concurrently, 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]).

2.1.3

Parameter Estimation and Comparison with Measurements

The D/FW chiller has two-stage compression with an economizer. Many of the 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 from a regression analysis. The saturation temperatures were estimated from

compressor suction and discharge pressure measurements using refrigerant property data for R-500. Good agreement between the model and the saturation temperatures is obtained for values of r. and r, of 3.1 and 3.2. Table 2.1 Known D/FW Chiller Parameters Value

Units

Effective evaporator internal tube surface area Number of evaporator tubes Number evaporator tube passes Evaporator tube length

11,300

sq. ft.

3560 3 22

feet

Tube inside diameter (evaporator and condenser)

0.75

inches

14,800 3349 1 30 2.33

sq. ft.

Description

Effective condenser internal tube Number of condenser tubes Number of condenser tube passes Condenser tube length Diameter of compressor impellers

feet feet

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 Parameter

Value

f3

27.2 1.53

Ax 'Iref

Units degrees square feet

0.814

50

45 I-

40

S.'

00: 9t

35

30 30

35 40 45 Measured Evaporator Temperature (F)

50

Figure 2.3. Comparison of Modeled Evaporating Temperatures with D/FW Data

36

I

x

95

80

x

x

S90"

925

• 80.-,, .:. 75 :

70 70

75

80

85

90

95

100

Measured Condensing Temperature (F) Figure 2.4. Comparison of Modeled Condensing Temperatums with D/FW Data 4000 .1,

3000

0 po 3-

I-

2000

1000

0

0

1000

2000

3000

4000

Measured Chiller Power (kW) Figure 2.5. Comparison of Modeled Chiller Power with D/FW Data

37 • 4500-

&

4000

3500 S3000 x

~2500'

x

x

2000 2000

2500

3000

3500

4000

4500

Measured Compressor Speed (rpm) Figure 2.6. Comparison of Modeled Compressor Speeds with D/FW Data 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 at this condition. Errors in measurements of chilled water temperature differences used to determine the chiller load, have a much more significant effect when the differences are small.

Table 2.3 Comparisons of Chiller Model with Controlled Tests Load(tons)

1375 2475 2800 2750 2710 1355 5420 5460 5420 2690 2750 2730 4065 4065 2.1.4

Tchws(F)

Tcwr(F)*

40 41 40 40 40 50 40 40 40 50 50 50 50 50

57 64 69 79 64 57 69 76 86 62 69 82 64 75

Power (kW) Data Model 364 650 1010 1411 805 126 2416 2736 3580 415 610 1299 940 1316

302 755 1082 1421 867 134 2248 2774 3519 461 689 1154 864 1391

Speed (rpm)

Data

Model

2350 2600 3100 3400 1400 1400

2177 2695 2992 3258 1563 1562 3572 3755 3971 2498 2497 2955 2624 3004

3600 3700 3900 2700 2700 3200 2650 3000

Surge Predictions

The operating temperature and pressure of the refrigerant in the evaporator are uniquely determined by the chilled water load, the water flow rate, and the chilled water setpoint. Similarly, the condensing pressure depends upon the total heat rejection and the condenser water stream conditions. A surge condition occurs when the compressor is unable to develop a discharge pressure sufficient to satisfy the condenser heat rejection requirements. This results in an unstable mode of operation in which the total

39 flow in the compressor oscillates. A mathematical characteristic of the surge condition is that it first develops at a point 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

Required Speed

2900

Q

2700

2500

500

-





-

0

1000

1500

2000

2500

3000

Chiller Load (tons) Figure 2.7. Modeled Compressor Speed Versus Load Requirement

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

Modeix

0

Data

U)2500

-

W '

2000 10

20

30

, 40

50

60

Leaving Water Temperature Difference (F) Figure 2.8. Comparison of Modeled Surge Speed with D/FW Data

2.2 A Model for Correlating Performance Data The mechanistic model described in the previous section is useful for investigating the performance of variable-speed chillers in detail. However, it requires too much computation to be used in system simulation or optimization studies. In this section, a simpler empirical model for correlating the performance of variable or fixed-speed chillers is presented. There are five independent input variables that uniquely define the performance of a chiller. One possible set of independent variables is 1) chilled water load, 2) chilled water supply temperature, 3) chilled water flow rate, 4) leaving condenser water temperature, 5) condenser water flow rate. Alternatively, entering chilled water and condenser water temperatures could be utilized in place of leaving conditions. By correlating chiller performance in terms of leaving rather than entering

42

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 a 50% greater condenser water flow m Normal water flow

7.57.0*0 .'

6.56.0 5.5 5.0

-

1000

I

2000

U

3000

U

4000

-

I

5000

-

U

6000

-

U

7000

Chilled Water Load (tons) Figure 2.9. Effect of Water Flow Rates on Chiller Performance for Fixed Leaving Water Temperatures

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 temperatures. It is interesting to note that reducing the evaporator flow shows an improvement in the performance. This results from the characterization of the 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

chilled water return temperature is constrained by comfort considerations at the distribution points to the load.

The number of independent variables effecting the chiller performance is reduced to three, when utilizing leaving evaporator and condenser water temperatures and

neglecting the effect of variations in flow rate. Correlating chiller performance may be further simplified by utilizing the difference between the leaving condenser and evaporator water temperaturs as an independent variable rather than the individual temperatures. Figure 2.10 shows a comparison between modeled chiller COP as a function load for a leaving water temperature difference of 40 F for different chilled water supply and leaving condensing water temperatures. The performance is

7.0

6.5-

o

6.0

5-5--

-Tcw

s

= 40 F,Tewr = 80 F

x Tchws = 50 F, Towr= 90 F 5.0

1000

.

,

2000

w

.

,

3000 4000 5000 Chilled Water Load

.

,

6000

7000

Figure 2.10. Dependence of Chiller Performance on Leaving Water Temperatures for Fixed Temperature Differences

44

nearly independent of the individual leaving evaporator and condenser water temperatures, depending primarily upon their difference. Similar results were obtained for a range of other conditions. Results of the mechanistic chiller model indicate that chiller power consumption is primarily a function of only two variables, the load and the temperature difference between the leaving condenser and chilled water flows. The following functional form correlates the chiller power in terms of these variables. Pch22

Pdcs = a0 + ajX + a 2 X 2 + a Y + a Y2 + a5 XY 3 4

(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. Xmx = bo + blY

Xmin = cO +

clY + c 2y 2

(2.2.2)

(2.2.3)

45 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. e

+

lPe(a0+alX +a 2 X2+a =

micwCPW[Y(Tcwr" Tchw)des

3Y

-

+ a4 Y2+

a5 XY)

(Tcws Tchws)]

(2.2.4)

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 models provided an excellent fit to the generated data. The model for power consumption was also fit to measurements from the D/FW airport system for both variable and fixed-speed control. Tests were performed for both types of control at nearly identical conditions. Table 2.4 summarizes the results of these tests. The test conditions are given in sets of two. The first of each set is for the variable-speed measurements, the second for fixed-speed control. The chilled and condenser water flow rates were held constant for these tests. The compressor speed for the fixed-speed, vane control tests was also held constant at 4000 rpm and the inlet pre-rotation and outlet diffuser vanes were operated using the automatic control implemented by the manufacturer. Table 2.4 Measurements of the D/FW Chiller Performance for Variable and Fixed-Speed Control Test

Load(tons)

Tchws(F)

Tcwr(F)

Power Consumption (kW)

Variable-Speed Fixed-Speed 1 2 3 4 5 6 7 8 9

1375, 2475, 2800, 2750, 2710, 1355, 5420, 5460, 5420,

1355 2625 2710 2670 2710 1625 5420 5420 5420

40, 41, 40, 40, 40, 50, 40, 40, 40,

40 40 40 40 40 49 40 40 40

57, 64, 69, 79, 64, 57, 69, 76, 86,

58 62 69 80 64 57 70 76 86

364 650 1010 1411 805 126 2416 2736 3580

860 1410 1800 1930 1410 1036 2780 2736 3627

10 11 12 13 14

2690, 2750, 2730, 4065, 4065,

2710 2750 2730 4065 4065

50, 50, 50, 50, 50,

50 50 50 50 50

62, 62 69, 69 82, 82 64, 64 75, 75

415 610 1299 940 1316

1560 1326 1830 2446 2480

47

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)

Figure 2.11. Comparison of Measured and Correlated Chiller Power

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.

2.3 Performance Characteristics of the D/FW Chiller The performance of the D/FW chiller operated with both variable and fixed-speed control may be compared directly through the test results of Table 2.4. At all part-load conditions, the performance associated with the variable-speed control is superior. However, the power requirements come together at loads approaching the capacity of the chiller. 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. In order to see the differences between variable and fixed-speed operation more clearly, their performance was correlated using the form of equation (2.2.1). Figures 2.12 and 2.13 show chiller performance for both controls in terms of COP as a function of load for different condenser to evaporator leaving water temperature differences. For the variable-speed control, the COP reaches a maximum at part-load conditions. This peak occurs as a result of tradeoffs between increasing heat transfer efficiencies due to decreased water to refrigerant temperature differences in the evaporator and condenser and the decreased polytropic efficiencies of the compressor that occur at low refrigerant flow rates. The peak COP moves to lower loads at lower temperature differences. It is typical for centrifugal chillers with either variable or fixed-speed control to exhibit a peak in perfonnance at part-load conditions of between 40% to 70% of the

49 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 from the unique characteristics of the D/FW chiller.

10

30 F

8

0 NMI

6

4-

A -1 V-

1000

I

2000

-

U

3000

-

U

-

4000

U

5000

6000

Chilled Water Load (tons) Figure 2.12. D/FW Chiller COP for Variable-Speed Control

50 10

83.30F

•"

4 -

2 01

V

1000

I

W

2000

i

3000

"

I

'

''

4000

I

"

"

5000

6000

Chilled Water Load (tons) Figure 2.13. D/FW Chiller COP for Vane Control

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 partload 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 30F

0.7 -

0.6

0C

i:

0.40.30.2 2000

i

5000 4000 3000 Chilled Water Load (tons)

6000

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 variablespeed 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-

7

6 0

2000

4000

6000

8000

Chilled Water Load (tons) Figure 2.15. Effect of Refrigerant Type on Chiller Performance

2.4

Summary A detailed mechanistic model for variable-speed centrifugal chillers was developed.

The model requires only design parameters and the operating conditions in order to 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 associated with the onset of surge. 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.

3.1

Effectiveness Models for Cooling Towers This section presents a simple, yet mechanistic method for modeling the

performance of cooling towers. Through the introduction of an air saturation specific heat, effectiveness relationships are developed. The advantages of this approach are its simplicity, accuracy, and consistency With the methods for analyzing sensible heat exchangers. The accuracy of the effectiveness model is as good or better than that associated with standard methods presented in the literature and has significantly less computational requirements. The first practical theory of cooling tower operation was developed by Merkel [1925]. Merkel's method has been the basis of most cooling tower analyses (Nottage [1941], Lichtenstein[1943], Mickley [1949], Carey [1950], Webb [1984]) and is outlined in the ASHRAE Equipment Guide [1983]. In the Merkel analysis, the water loss due to evaporation is neglected and a Lewis number of unity is assumed. The determination of outlet states requires an iterative numerical integration of two differential equations. A more rigorous analysis of a cooling tower that did not utilize the assumptions of Merkel was performed by Sutherland [1983]. He found that counterfiow cooling towers can be undersized 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

3.1.1

Detailed Analysis

The assumptions and basic equations employed here closely follow those of Sutherland [1983]. A schematic of a counterflow cooling tower showing pertinent states and dimensions is given in Figure 3.1.

Water ma;

0 a,o;ha,o

mw 4 ; Tw

4

(Oa + da ha +dha

m

+ dmw

~ T

dV

OD a

ma; oa,i; ha

mw; Tw

Tt

I

rnw; TW9

Air Figure 3.1. Schematic of a Counterflow Cooling Tower

57

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

= enthalpy of moist air per mass of dry air

ha

m, = mass flow rate of water hfow = enthalpy of liquid water

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

w= Mw,i - ma(cOao- coa)

where, wa

= local air humidity ratio

w~i = inlet water flow rate 0a,o = outlet air humidity ratio

From equations (3.1.1), (3.1.2), and (3.1.3) and assuming a constant water

(3.1.2) (3.1.3)

58 specific heat, the change in water temperature across the incremental control volume (water inlet minus outlet) is

dT w

[

dh*a a -Cpw(Tw

"Trf)doa

oa(314

(Oao'-a)]CPw .w

Ma

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

madha= hcAvdV(Tw-Ta) + hgw Iadcoa

(3.1.5)

where, hc

= convection heat transfer coefficient

Av

= surface area of water droplets per unit volume of cooling tower

hgVw

= enthalpy of water vapor at the local water temperature.

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 air stream may be expressed as

rnadoa = hDAvdV(COs,w- Co)a)

(3.1.6)

59

where hD

= mass transfer coefficient

osl w = saturated air humidity ratio at the local water temperature.

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

result may be written as

xlaha-hDAVdVLeCPm(rw-Ta)+

(cos,w-

oa)hgw]

= LehDAvdF(hs,w " ha) + (osw" .cia)(1/Le

- 1)hg,w]

(3.1.7)

where, CCpm i

constant pressure specific heat of moist air

Cpa

constant pressure specific heat of dry air

CpV=

constant pressure specific heat of water vapor

-

hg o

-

=

Cpa + C(aCpv

enthalpy of water vapor at 0 degree reference level

The overall number of transfer units for mass transfer is defined as

Ntu

hDAVVT Ma

(3.1.8)

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 dV

=

dh

= -L Ntu

Ntu VT (c a

VT

-

(3.1.9)

s

(h

- h0) + (Oa -CO

)(1/Le "-1)hg,

(3.1.10)

~

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.

3.1.2 Merkel Analysis In order to simplify the analysis, Merkel [1925] made two assumptions. Most significantly, he neglected the effect of the water loss due to evaporation on the righthand 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 righthand 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 Ntu(ha

dha dV

-

VT

-

(3.1.11

61

ma(dha/dV)

dTw

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.

3.1.3

Effectiveness Model

Equation (3.1.12) may be rewritten in terms of only air enthalpies by introducing the derivative of the saturated air enthalpy with respect to temperature evaluated at the water temperature.

dhS,W dV

(3.1.13)

-aCs(dha/dV flMCpw

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 I-.

d 0n

Twj,- Tw,o

Water'

30 20 10 0

'40

50

I ----- - vI

60

a

= UIa I

70

-f -

= II

80

= -

UN= I

90

1

100

110

Saturation Temperature (F) Figure 3.2. Saturation Air Enthalpy versus Temperature

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

effectiveness relationship should be used. The air-side effectiveness is defimed as the ratio of the actual heat transfer to the maximum possible air-side heat transfer that would occur if the exiting air stream were saturated at the temperature of the incoming water (i.e. ha,o = hs,'wj). The actual heat transfer is then given in terms of this effectiveness as

ea

a a(hs w,i -ha, )

(3.1.15)

where, analogous to a dry counterflow heat exchanger, the effectiveness is evaluated as

Fa =

- m)) 1 - exp(-Ntu(1 ,-,(3.1.16) 1 - m exp(-Ntu(1 - m))

where,

M

m=-)mwji

ma (CpVXS)

(3.1.17)

The exit air enthalpy and water temperature are determined from overall energy balances on the flow streams.

ha,o

ha,i+

mnw,i(Tw Tw~~o --

a(hs,wi

i

-

(3.1.18)

-'hai)

Tref)Cpw

-

rhw,o pw

mna(hao

-

ha,)

(31.9 (..9

64

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. Cs= Twj- Twp

(3.1.20)

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.

3.1.4

Estimating the Water Loss

Due to water loss, the water flow rate exiting the cooling tower is on the order of 1%to 4% less than the entering flow rate. Neglecting this loss may result in up to a 2 degree Celcius error in the exit water temperature. This error can effect the calculated performance of other system equipment such as a chiller. The computation of the exit water temperature given by equation (3.1.19) is improved if the water loss is 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

water flow rate is

w9= m ,-

ra( a,o"

(3.1.21)

a)

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

coa,o = o's,w,e + ( oai-oswe)exp(-Ntu)

By integrating equation (3.1.11) for constant l

(3.1.22)

an effective saturation enthalpy is

determined as

=h+ hsw'

h adi) "(ha,o-

(3.1.23)

ha'i +1 - exp(-Ntu)

The effective saturation humidity ratio, cos,w,., associated with hs,we is found from psychrometric data.

66 3.1.5

Model Comparisons

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 in the Merkel approach causes a slight underprediction in the cooling tower 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 with the detailed analysis for these conditions. 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 somewhat overestimates the water temperatue effectiveness due to the assumption of no water loss. The effectiveness model gives results that are closer to the more exact analysis.

67 1.0 MW

0.8

0.8

2 mw=1

Ma

ma

0.6 *

=0.5

0.4,a -

Merkel Method Effectiveness Model

+ n

0.2 0.0'I

Analysis

"Detailed

V

iI

i

5

4 3 2 1 Number of Transfer Units (Ntu)

0

1.0m 0.8

M

a

0.6 V

0.4

Ma

Detailed Analysis Merkel Method

0.2

0 .0* 0

* •

,

1



Effectiveness Model

,

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

=2

ma

..

"

ma

1 2

a

M111111110000olm

*a

Analysis

-Detailed

* 0

1

2

=

Effectiveness Model 3

45

Number of Transfer Units (Ntu) Figure 3.5. Comparisons of Relative Water Loss (Dry Bulb, Wet Bulb, and Water Inlet Temperatures of 70 F, 60 F, and 90 F)

3.1.6

Correlating Performance Data

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 form (ASHRAE [1983]).

69

I.

n

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 R-1 R-2 M-1 M-2

c

n

1.684 1.405 0.984 1.130

-0.391 -0.727 -0.852 -0.617

110

100 a

'0 i

90

80

70 70

, 80

" 90

100

110

Measured Two (F) Figure 3.6. Comparisons of Leaving Water Temperature Measurements from Simpson and Sherwood [1946] with Effectiveness Model Results

71

3,

2

0

2

2

1'

0

1

Measured

2

3

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-meansquare 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

60

N

+ 4. -Model

50

,

0

20

.D/FW Measurements Predictions •



60 40 Time (hours)

80

100

Figure 3.8. Comparisons of Leaving Water Temperature Measurements from D/FW Airport with Effectiveness Model Results 3.1.8

Potential Improvements in the Model

Theoretically, it is possible to improve the effectiveness model by accounting for the effect of water loss on the change in the water stream enthalpy in an approximate manner. Rather than totally neglecting the water loss due to evaporation in the last term of equation (3.1.1), a slightly better assumption is a constant specific enthalpy of this evaporation term throughout the tower. A corrected enthalpy is then defined as

h'= h

-

WCpw (Twi- Tref)

(3.1.26)

73

With this definition, equations (3.1.11) and (3.1.13) may be replaced with I

(27

dha = Nm

"VT (ha"hsv)

dV dh

_w

S

dVw

=

(3.2.27)

maaCs(dha/dV) C

(3.1.28)

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 inletto-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 a wide range of typical conditions. However, for more extreme conditions, it is possible to improve the accuracy of the model. 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 curvature of the saturated air enthalpy versus temperature relationship. Figure 3.9 shows a comparison between the detailed analysis, the effectiveness 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-

=w2

0.8"

1 U' OW II

0.4-

* +

0.2

a

60

- - 9

Effectivness Model+ Effectiveness with Berman [1961] Correction N

70

I

I

I

w

80

I

90

w

ilIi

l

"

100

I

110

"

120

Water Inlet Temperature (F) 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)

3.1.8

Sump and Fan Power Analyses

In analyzing the performance of a system, it is necessary to include effects of a 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

N

Ncell

X

k=1

(

Tw'o-Ts

+

11

mwSo)

tw~i-

(Tmain-Ts)

=

0

(3.1.30)

k=1

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 temperature to the condenser of a centrifugal chiller in a central chilled water facility. 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 optimization process, the power consumption given by equation (3.1.31I) may be approximated with a quadratic function using a second-order Taylor series expansion

77 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

0.0

"

0.0

I

0.2

I

"

l

0.6 0.4 Relative Fan Speed

"

0.8

1.0

Figure 3.10. Quadratic Fit to Variable-Speed Fan Power Consumption

3.2

Condenser-Loop Pumping Requirements The performance of a centrifugal pump is characterized by a rating curve that gives

pressure rise developed by the pump and efficiency versus pump flow. The maximum

78 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 where the two curves intersect.

APpm

Pump Characteristic

0 I.i

Al'. f-

mcw

mp,max

Mass Flow Rate 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

r

APcw = AP 0 + AP cw,des 1

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 pressure drop may be expressed as

AP cwdes--APc

where

mCh,des and

md] A~hdSMchdesJ lch,d csJ

2

+

AP

2 ImCWtS](3.2.2)

Lmrdes [mtde 5 ]

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 relationship (White [1986]). In tenns of the maximum pressure developed at zero

.80

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 pumps operating in parallel. For a variable-speed pump, the pump characteristic changes with the pump speed. From similarity rules for centrifugal pumps, the maximum pressure rise and mass flow rate depend upon the relative pump speed according to the following relationships.

2 APp,max = 7p APp,maxcdes

(3.2.4)

mp,max = Yp mp,max,des

(3.2.5)

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 for the total flow rate gives the following relation.

S=

Y

(3.2.6)

pmaxdcs

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

PP -

thCW APCW

(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

0r P

ao+

[al]

[+ades](3.2.8) 2

+ a2

The determination of optimal control points that minimize operating costs is simplified when the individual component operating costs are expressed as quadratic functions of the controls and/or outputs. It is possible to accurately correlate the power consumption of a variable-speed pump as a quadratic function of pump speed over its

82 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.

0

0.5

0.6

0.7

0.8

0.9

1.0

Relative Pump Speed Figure 3.12. Quadratic Fit to Variable-Speed Pump Power Consumption

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 variablespeed 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.

4.1 Development of an Effectiveness Model for Cooling Coils A cooling coil is similar to a cooling tower in that energy is transferred between air and water streams due to both sensible and latent effects. The ASHRAE Equipment Guide [1983] presents a method for the design and analysis of cooling coils in which the overall heat transfer is evaluated by using log-mean temperature differences between the coolant and the surface and log-mean enthalpy differences between the surface conditions and the air stream. The use of log-mean enthalpy differences requires the assumption that the enthalpy associated with the saturated air at the surface interface is a linear function of temperature. For a given coil and entering conditions, the solution is iterative with respect to the leaving condition. For system simulation purposes, Stoecker [1975] presents an empirical model for cooling coils. This model is not useful for design and requires the determination of fifteen empirical constants from performance data. A simple, yet fundamental model for cooling coils was proposed by Threlkeld [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, functional forms for correlating performance data are presented.

86 Detailed Analysis

4.1.1

A schematic representation of a counterflow cooling coil in which air is cooled as a 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.

Air

all..]

hc

&ha +dh

0 a+ do)a

Water Film Surface_

___________

Tw4

-IV

A

4-

Tw + dTw Water dA

Figure 4.1. Schematic of a Counterflow Cooling Coil 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 dA

dlh ---at dA

Ntuo(0 )a -

(4.1.1)

LoAo

NtUo , A

A0

(h a - hs ts) + (

co- os1)(I/ e o - l)hg S-

~s

l I

(4.1.2)

87 dha dA

dTw dT

Cw(s

dA

do)a r)dA

(4.1.3)

faw. pw ma

=Ntui (Tw-

Ts)

(4.1.4)

where, Ao

= total cooling coil outside surface area

Cpw

= constant pressure specific heat of liquid water

ha

= enthalpy of moist air pernmass of dry air

hg,s

= enthalpy of water vapor at the coil. surface temperature

hS's

= enthalpy of saturated air at the surface temperature

Mna

= mass flow rate of dry air

MW

=

Leo Ntu o Ntu i

= Lewis number for air stream

Tref

=

reference temperature for zero enthalpy of liquid water

TS

=

coil surface temperature

Tw

=

water temperature

Oa

=

ir humidity ratio

COs

s

mass flow rate of water

= overall air-side number of heat transfer units = overall water-side number of heat transfer units

=

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 Lewis number are defined as (UA)i hC,A w(4.1.5)

Ntu-i

0

Leo0-

maC pm(416

hDC

0

(4.1.7)

where, Cpm (UA)i

=constant pressure specific heat of moist air = overall heat transfer conductance between water stream and outside surface

h9o hD 0o

f= convection heat transfer coefficient for air stream =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

4.1.2

Dry Coil Effectiveness

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 effectiveness relationships apply. In terms of the air-side heat transfer effectiveness, the dry coil heat transfer is

Qdry = Edry,araCpm (Tai

Twj)

(4.1.8)

where, analogous to a dry counterflow heat exchanger, the effectiveness is evaluated as

1 8

dry,a --

1

-

-

exp(-Ntudry(1 - C)) C)),(4.1.9)

Cexp(-NtUdry(1-C

where,

C*

rnaCPm

(4.1.10)

mwCpw

The overall number of transfer units for the dry coil is Ntu &yNtu o Ntu, Nty = 1 + C (Ntuo/Ntui)

(4.1.7)

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.8)

Tw)

Ta,o =Ta,i" -Sdrya(Tai"

(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.

TS 0

TWi + C

•Ntu

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.

4.1.3

Wet Coil Effectiveness

If the coil surface temperature at the air inlet is less than the dewpoint of the incoming air, then the coil is completely wet and dehumidification occurs throughout. 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 dV = - A---

dhs.w

-

( h a"

-h~)(..1 h W

maCs(dha/dA) a(4.1.12) dwCpw

where the overall number of transfer units for a wet coil is defined as

Ntu Ntuwet

Ntuo Ntu,

1 + m (NtuO/Ntu-)

(4.1.13)

and ,

m=

ma

(4.1.14)

iiw(CPgC )

CdTT = ]

(4.1.15)

For finned surfaces, Ntuo as defined by equation (4.1.6)-should be multiplied by an overall fin efficiency. The air-side transfer units, Ntu, will differ for wet and dry coils 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 a completely wet coil, the heat transfer is

Owet = ewetaa(hai

-

(4.1.16)

hs wi)

where,

ea,

1 - exp(-Ntuwet(1 - in)) 1 - mexp(-Ntuwet(-m.1.17)

Analogous to the dry analysis, the exit air enthalpy and water temperature are hao = ha.i - ewet~a(hai

W = Tw.+

a

-

hs,w, )

(4.1.18)

a,o)

(4.1.19)

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].

Ta, o = Ts,e + (Ta,i - Ts, e ) exp(-Ntuo)

(4.1.20)

93

where, the effective surface temperature is determined from its corresponding saturation enthalpy. ha,o - ha

hs,s,e = hai + 1

-

exp(-N)

i

(4.1.21)

From the rate equations, the surface temperature at the air inlet is computed as [Ntuwet1

mfa Tsj i

Tw, o +

--

pa't

mIwC

N

j

1 tuiJ

(ha,i- 'hs'wo

(4.1.22)

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.

4.1.4

Combined Wet and Dry Analysis

Depending upon the entering conditions and flow rates, only part of the coil may be wet. A detailed analysis would involve determining the point in the coil at which the surface temperature equals the dewpoint of the entering air. A method for determining the heat transfer and outlet states in this manner for a coil with dry and wet sections is given in Appendix B. A simpler approach is to assume that the coil is either completely wet or dry. Either assumed condition will tend to underpredict the actual heat transfer. With the completely dry assumption, the latent heat transfer is neglected and the predicted heat transfer is low. With the assumption of a completely wet coil, the model predicts that

94 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. 4.1.5

Model Comparisons

Figures 4.2 and 4.3 show typical comparisons between results of the numerical

solutions of equations (4.1.1) - (4.1.4) with a Lewis number of unity and those of the

95 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 4C

M

a

ma

0.6,

mw 0.

0.4

. II

0.2

* +

•1

0 .0

0

-

Detailed Analysis Effectiveness: Wet and Dry Effectiveness: Wet or Dry •

1



4 3 2 1 Air-Side Transfer Units (Ntuo0)

5

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 between the two methods are at most 5 percent. 1.0 mw 2

Mw

0.8M

Ima

0.6

0.6 "Ma

E NOE

MW

0.4 Detailed Analysis Wet and Dry I+ Effectiveness: Wet or Dry I , I , -

0.2 -Effectiveness: 0.0

• 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 between the model and the manufacturers' data is excellent.

Table 4.1 Effectiveness Model Comparisons with Cooling Coil Catalog Data

4.1.6

Tai

Twb

Twji

(F)

(F)

(F)

75 75 75 80 80 80 90 90 100 100

60 60 60 64 64

40 44 46 40 44 40 40 46 40 40

72

72 72 80 80

Velocity

Tw,0 (F) Model Data Water (fps) Air (fpm)

4 4 2 4 2 4 4 6 6 8

500 700 400 500 600 500 500 600 500 700

47.9 52.0 55.3 49.7 59.0 53.8 53.7 55.4 53.7 53.1

47.8 51.9 55.0 49.7 58.4 54.1 54.0 55.6 54.0 53.7

Ta,i (F) Data Model

48.4 52.7 52.4 50.5 56.6 54.3 55.1 58.6 57.2 60.4

48.9 53.0 53.1 50.8 56.6 53.8 55.1 58.6 56.5 59.3

Correlating Performance Data

The heat and mass transfer characteristics of a cooling coil depend primarily upon 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 waterside 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 regression applied to differences between measurements and cooling coil model predictions of the water and air outlet temperatures. Although, the air-side transfer 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. Coefficients of the transfer unit equations were determined with nonlinear 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

m Water Temperature Difference

x Air Temperature Difference

40 0

S20 L10

0 0

10

20

30

40

50

Temperature Differences from Data (F) Figure 4.4. Correlation of Cooling Coil Model Results with Catalog Data

4.2

Air Handler Analysis 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

=

where rna

(4.2.1)

P ahu, des

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.

Imahu.sJ)

- 0.784mahu s + 1.26 1'ahud-1 Pahu - Pah.,de. 0.517 5 s l' ~aiiu Pahudes\h

(4.2.2)

At part-load conditions, the power consumption is always greater for fixed-speed, variable-pitch than for variable-speed control. In order to analyze the performance of the cooling coil, it is necessary to know the inlet enthalpy and humidity. Return air from the zones serviced by an air handler is

101

mixed with ambient air so that h a,i = Xambharab + (1

oa, i = X amtO~amb + (1

Xamb)har

-

-

Xamb)a,r

(4.2.3)

(4.2.4)

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 +

Cja,r =

aa,o +



(4.2.5)

Mahu

00gain .

liahu

(4.2.6)

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

Ogain= (UA)z(Tsol-air-" Tz) + Oint

(4.2.7)

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

Tsol'air -=Tamb+ ho I1(4.2.8)

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.

4.3

Chilled Water Pumping Requirements The analysis of the pumping requirements for the chilled water loop is similar to

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 [chw,desJ

(4.3.1)

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 individual component at its design flow rate. Equating the chilled water loop pressure drop to the pump pressure rise and solving for the total flow rate gives the following relation.

mchw

=

mchw,des

A

[mp,max,des

m.c(4.3.2)

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 that of a counterflow device. The counterflow effectiveness relationship is recommended and was utilized throughout this study. However, standard effectiveness relationships for other geometries could also be applied using the definitions for Ntu and m* given in this chapter. 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 consumptions of these auxiliary devices.

106

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 maintain prescribed setpoints in an efficient manner. However, for systems without significant thermal storage, the system dynamics may be neglected (Hackner [1985]) in 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 coils, and the speeds for variable-speed fans or pumps. In this chapter, two methodologies are presented for determining optimal values of the independent control variables that minimize the instantaneous cost of operating chilled water systems. In section 5.1, a modular component-based optimization algorithm is presented. The algorithm is implemented in a computer program that simulates the operation of a system through time, while minimizing the cost at each time increment in response to the uncontrolled (e.g. weather) variables. Each hardware component is represented as a separate subroutine in the simulation of a system. 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:

1) Analysis of control and design options: The program may be used as a

simulation tool for comparing conventional and optimal control strategies. Conventional control strategies, such as fixed temperature setpoints, are implemented through the imposition of constraint equations. Design

comparisons, such as variable versus fixed-speed equipment, may be performed for systems that are optimally controlled.

108

2) On4-line control optimization: The algorithm may be used for on-line optimization of the simulation of an operating system using "simple" component models. The simulation could proceed in parallel with the actual system operation with the possibility of updating parameters of the component models using on-fine measurements.

3) Nkar-otimal control algoithms: Results of the optimization program are useful for developing "simple" near-optimal control algorithms.

In Chapter 6, the component-based algorithm is applied to typical systems to study both design and control issues. Existing optimization packages proved to be extremely inefficient for these systems and had difficulties handling the nonlinear equality constraints that arose. In section 5.2, a "simple" methodology is presented for near-optimal control. An overall empirical cost function for the total power consumption of the cooling plant is inferred from the cost 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. In section 5.3, results of the system-based and component based algorithms are compared.

5.1

A Component-Based Optimization Algorithm

Figure 5.1 depicts the general nature of the modular optimization problem. Each component in a system is represented as a separate set of mathematical relationships organized into a computer model. Its output variables and operating cost are functions of parameter, input, output, uncontrolled, and controlled variables. The structure of the

109 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

Y2

X2

f 2 , M 2 , U2

Figure 5.1. Schematic of the Modular Optimization Problem

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 i=l

(5.1.1)

110

with respect to M and u, subject to equality constraints of the form

gl(fi, M1 , ui, X1 , Yl)1 g(f, M, u) =

g 2 (fbM2,u , x 2, Y2)

=

0

(5.1.2)

gn(fn, Mn, Un, xn, Yn)

and inequality constraints of the form

h(f, M,u) =

h1 (f 1 , M1 , ui, xi, Y)1 h2 (f 2 ,M 2 , u2 x 2 ,y 2 ) j

0

(5.1.3)

h(fn, Mn, u n,X asY )

where, for any component i, x= y

vector of input stream variables =

vector of output stream variables

f.1 = vector of uncontrolled variables M. = vector of discrete control variables u . = vector of continuous control variables i g

operating cost = vector of equality constraints

hi = vector of inequality 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

bulb and wet bulb temperature. Both equality and inequality constraints arise in the optimization of chilled water systems. One example of an equality constraint that arises when two or more chillers are in operation is that the sum of their relative loadings must be one. The simplest type of inequality constraints to handle are bounds on control variables. For example, lower and upper limits are necessary for the chilled water set temperature, in order to avoid freezing in the evaporator and to provide adequate dehumidification for the zones. Any equality constraint may be rewritten in the form of equation (5.1.2) such that when it is satisfied, the constraint equation is equal to zero. Similarly, inequality constraints may be expressed as equation (5.1.3), so that the constraint equation is greater than or equal to zero to avoid violation. The mathematics associated with the optimization algorithm utilized in this study are well known. Special advantage is taken of the characteristic that the operating costs associated with each component in a chilled water system may be modeled with quadratic functions. A background for the development that follows is presented by Gill [1981]. In the next section, an algorithm is presented for determining optimal values of the continuous control variables for the special case where all component costs are quadratic functions and output stream variables are linear functions of the controls. This algorithm is the basis for the more general nonlinear method presented in section 5.1.2. The procedure for handling constraints is given in section 5.1.3 and the complete algorithm including the determination of the optimal discrete controls and implementation in a computer program is summarized in section 5.1.4. 5.1.1

Quadratic Costs and Linear Outputs

A simple function for which an optimum exists and may be determined analytically

112 is a quadratic function. In Chapter 2, it was shown that the power consumption of a 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. As shown in Chapters 3 and 4, the power requirement of a continuously adjustable pump or fan (variable-speed or variable-pitch) may be accurately represented with a quadratic function of its control variable through either a second-order Taylor series approximation or a single quadratic correlating function. As a result, the cost of operating any of these components (chillers or auxiliary equipment) may be expressed in a general form as a quadratic function of its continuous control and/or output stream variables or

Ji= uTAiui + yiTBiYi + yiTCiui + pITui

+

%Tyi + ri

(5.1.4)

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

Yi

where

=i

0iui +- i

Oi and Oi are

+-+4i

(5.1.5)

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

individual components and the interconnections between components. The total cost of operation at any time is the sum of the individual component operating costs. With individual component costs and outputs represented by equations (5.1.4) and (5.1.5), the total cost may be reduced to

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

c

+ 1B + qj

B1

A2

B Anj

C=l

=[B2

Bn

C2

C

114

q]

Pl

P2 1

q

q2

LI

p

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 the cost function of equation (5.1.7) ~r

~ ~ . o.,T =u(A + A) + b =0

(5.1.8)

where u* represents the optimal control vector. Solving for u* gives

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

Ouu

=(A + A)

(5.1.10)

au DU Positive semi-defmiteness of the above Hessian implies that

T

T

u(A+A)u

0

(5.1.11)

for all u not equal to zero. Simple methods exist for determining the positive semidefimiteness of symmetric Hessian matrices such as that given by equation (5.1.10).

5.1.2

Nonlinear Optimization

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 variables (eq. (5.1.6)). All output variables are linearized with respect to the continuous controls using a first-order Taylor series expansion about the last iteration point, U0 .

116

y(u)

=y(u0) +

r](u - Uo)

(5.1.11)

This equation may be written in the form of equation (5.1.6) with

0

Y(Uo)

-

[ --uO

(5.1.12)

The Jacobian of the outputs with respect to control variables is determined numerically using forward differences. A simple estimate of the minimum point may be determined from equation (5.1.9). 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

-i

u '1 + s(u' - u1)

(5.1.14)

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 employed in the TRNSYS [1984] program is successive substitution. Outputs are 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

degree of accuracy is required for determining good numerical derivatives. A better approach is to utilize the Newton-Raphson method applied to a set of equations that measure the residual error for the independent variables. These residual equations could be defined as differences between input values and output values that feed those inputs for one component in each recyclic loop of components. At each iteration of the Newton-Raphson procedure, new estimates of the independent variables are determined by assuming that the residual equations are globally linear using coefficients determined with a local linearization. As a result, this method converges in. one iteration for linear equations. However, it is necessary at each iteration to solve a system of linear equations involving a Jacobian of residuals with respect to the 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.

In the program developed in this study, an alternative method is employed that is a compromise between the methods of successive substitution and Newton-Raphson. As with Newton-Raphson, a set of residual equations are defined such that at the solution, they are identically zero. However, these equations are solved using a series of onedimensional applications of the secant method. Consider a series of components organized in a recyclic loop. Denoting the input to one component in the loop as x and the output that feeds that input as y(x), then a residual function at the ith iteration may be defined as

Gi = y(x i ) = xi

(5.1.15)

A new estimate of x is determined by approximating the function with a straight line connected between the last two function values or

x

i+1

i

x -

a

G

i-i

(5.1.16)

(G-G )/(x =x)

Initial values of x, y, and G are determined through successive substitution. The advantage of this method is that it is not necessary to compute a Jacobian, so that the computation associated with updating the independent variables is much less than that for Newton-Raphson. However, since the residual equations are not coupled, convergence is slower than for Newton-Raphson. For the chilled water systems considered in this study, the coupling between recyclic loops is relatively small and the solution algorithm works well.

119

5.1.3

Constraints

Linear Eaualitv Constraints For constraints that are linear with respect to the control variables, the constraint equations may be written in the form

g(u) = a + Ou=0

(5.1.17)

where g is a vector of constraint equations, 3is a coefficient matrix, and a is a 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)

where Xis a vector of Lagrange multipliers. The modified optimization problem involves minimizing the Lagrangian with respect to both u and X. The first-order conditions for a minimum require that

[[

+

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), these conditions yield

u=

A [A]+

]

A A)

0 TII

(5.1.21)

(A +A

T

.

(5.1.22)

Nonlinear Equality Constraints Nonlinear constraints are handled through linearization and the use of Lagrange multipliers. A fist-order Taylor series expansion for the constraints about the last iteration point, u0 , gives

[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

a g(u9)

13= )-f]u.

-

.1uuo

(5.1.24)

(5.1.25)

121

The Jacobian of the constraints with respect to control variables is determined numerically using forward differences coincidently with the computation of the Jacobian for the output stream variables with respect to controls. With linearization applied to nonlinear constraints, the first-order condition applied to the Lagrangian cost function does not guarantee that the constraints will be satisfied 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

(5.1.26)

J(u) = J(u) + g(u) g(u)

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,

s, determined by minimizing J(u i1 + s(u' - u

with respect to s.

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.

5.1.4 Algorithm Summary and Program Implementation The steps associated with the constrained optimization of the continuous controls are summarized below.

1) Solve for component outputs with current controls. 2) Linearize outputs with respect to controls to get equation (5.1.6). 3) Determine the coefficients of the quadratic equation (5.1.7) from the component quadratic equations (5.1.4) and the linearized output equation (5.1.6). 4) Determine the control point associated with a step length of unity with equations (5.1.21) and (5.1.22). 5) Estimate optimal step length with polynomial interpolation applied to minimizing J(u i 1 + s(u' - U') with respect to s, where the augmented cost function is defined by equation (5.1.26). 6) Determine next estimate of control point, ui,with equation (5.1.14). 7) If J(u5> J(u'-) then set u' - ui and go to step 5. 8) If no controls exceed their bounds or the number of constraints equals the

number of controls then go to step 11. 9) Add eqtuality constraints for any controls that exceed bounds unless the number of constraints equals the number controls.

123

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.

A System-Based Algorithm for Near-Optimal Control

5.2

The methodology for determining optimal values of control variables described in 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.

5.2.1

System Cost Function

The concept of utilizing quadratic functions for the power consumptions of 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

J(f,M,u) =uAu +b

T f

+fT+f

oT

Tn

+df + fEu + g

(5.2.1)

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.

5.2.2

Near-Optimal Control Algorithm

One advantage of the cost function of equation (5.2.1) is that a solution for the optimal control vector that minimizes the cost may be determined analytically by applying the first-order condition for a minimum. Equating the Jacobian of equation (5.2.1) with respect to the control vector to zero and solving for the optimal control, (with symmetric A), gives

126

=k+Kf

u

(5.2.2)

where, 1 -1% k =--A b

K=--A

E

The cost associated with the unconstrained control of equation (5.2.2) is f Tf [+

Tf + '

(5.2.3)

where,

E=KTK+EK+C a -- 2KAk + Kb + Ek + d b k + g I:-kT~k + kT

The control defined by equation (5.2.2) results in a minimum power consumption if

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 uncontrolled variables. However, a different linear relationship applies to each feasible combination of discrete control modes. In the implementation of the algorithm, the minimum cost associated with each mode combination is computed from equation (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 outlined in section 5.1.3.

5.2.3

Parameter Estimation

The total number of empirical coefficients in equation (5.2.1) that need to be determined for each feasible set of modes is

2

Ncoef= N2-

Nu(N

2u -

1)

2

+ N U + Nf +

Nf(Nf- 1)

2

+ Nf + NfNU+ 1 (5.2.4)

where Nu is the number of continuous control variables and Nf is the number uncontrolled variables. One approach for determining these constants would be to apply regression 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 regression could be performd on-line using least-squares recursive parameter updating (Ljung [1983]).

128 Another approach for estimating coefficients of the empirical system model would involve regression to results of a simulation of the system. By using mechanistic 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 function of equation (5.2.3) could be determined directly with regression applied to optimal control results. At a given set of conditions, optimal values of the continuous control variables could be estimated through trial-and-error variations in the system or with the component-based optimization algorithm. Only (Nf + 1) independent conditions would be necessary to determine coefficients of the linear control law given by equation (5.2.2). The coefficients of minimum cost function could then be determined from system measurements with the linear control law in effect. The total number of coefficients to determine with this approach is less than that for direct regression to power measurements.

Nof

=

Nu(Nf+ 1) + N2 Nf

Nf(Nf- 1)

2

+ Nf + 1

(5.2.5)

The disadvantage of this approach is that there is no direct way to handle constraints on the controls.

5.2.4

Application to Chilled-Water Systems

In order to apply the system-based optimization technique, it is necessary to identify

129 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 component-based optimization algorithm described in this chapter, it is shown in Chapter 6 that the important uncontrolled variables are 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. Chapter 6 also identifies control simplifications that reduce the number of independent control variables and simplify the optimization. These simplifications and their implications are summarized as follows.

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 relative to the maximum possible flow.

2) Multi-Speed Tower Fans: Increment lowest tower fans first when adding tower capacity. Reverse for removing capacity. With this sequencing, a single independent tower control variable is the relative tower air flow.

3) Variable-Speed Pumps: The sequencing of variable-speed pumps should be directly coupled to the sequencing of chillers, to give peak pump efficiencies for each possible combination of operating chillers. Multiple variable-speed pumps should be controlled to operate at equal fractions of their maximum speed. With this sequencing arrangement, a single independent control variable for the condenser pump is the flow relative to the maximum possible flow.

130

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 changes in this control variable. With variable-speed pumps and fans, the only significant discrete control variable is the number of chillers operating. A chiller mode defines which of the available chillers are to be on-line. The optimization problem involves determining optimal values of 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 to consider each of the discrete combinations as separate modes. However, for 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 multiplespeed 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 twospeed 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 as determined with the component-based and system-based methods for a range of 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 a value that depends upon the ambient wet bulb.

60

55

High Wet Bulb (80 F)

50

E5

Low Wet Bulb (60 F)

Optimal

40

Near-Optimal

-

35, 0.0

-

,

0.2

-

,

0.4



,

* •

0.6

0.8

1.0

Relative Chilled Water Load

Figure 5.2. Comparisons of Optimal Chilled Water Temperature

135

65

cc

'~60

Low WeWetBBulb((80FF

wo" 55 Low Wet Bulb (60 F) 50 -

45

0.0

Near-Optimal ,

,

0.2

0.4

0.6

0.8

1.0

Relative Chilled Water Load Figure 5.3. Comparisons of Optimal Supply Air Temperature

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.7OWN

B

High Wet Bulb (80

0.6 cc

0.5(60F) 0 0.4-

0.31 0 0.1

w

w

5

0.2

0

0.4

w

0

v

0.6

I

0.8

Relative Chilled Water Load

Figure 5.4. Comparisons of Optimal Tower Control

v

1.

1.0

137

1.0 U -

Optimal Near-Optimal

.2

U

7.

0.8

-

0.6

High Wet Bulb (80 F)

.

Low Wet Bulb (60 F) 1

0.4

0.0

,

-

0.2-

0.2

0.4

0.6

-

0.8

1.0

Relative Chilled Water Load Figure 5.5. Comparisons of Optimal Condenser Pump Control

In order to determine the optimal discrete mode of operation, it is necessary to have a reasonably accurate model of the minimum cost of operation for each mode. Figure 5.6 shows a comparison between the optimal system coefficient of performance (COP) determined with the component-based optimization algorithm and the near-optimal quadratic cost function of equation (5.2.3). The differences between the results are very small over a wide range of chilled water loads and ambient wet bulbs. This model works well, even though it does not explicitly consider the constraints on the chilled water temperature that are exhibited at low and high loads in Figure 5.2.

138

8 *Optimal -

Near-Optimal

7 Low Wet Bulb (60 F) now E 6

High Wet Bulb (80 F) 3

0.0

0.2

0.4

0.6

0.8

1.0

Relative Chilled Water Load Figure 5.6. Comparisons of Optimal System Performance

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 developed as a simulation tool for investigating optimal system performance. Results of this algorithm implemented in a computer program, led to the development of a simpler system-based methodology for near-optimal control. The advantage of the component-based algorithm over the system-based approach olution 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

139 components may be either mechanistic or empirical in nature, so that the methodology is useful for evaluating both system design or control characteristics. In Chapter 6, this methodology is applied to typical chilled water systems to study both design and control issues. The component-based algorithm takes advantage of the quadratic cost behavior of the components found in chilled water systems in order to solve the optimization problem in an efficient manner. However, in order to utilize this methodology as a tool for on-line optimization, it is necessary to have detailed performance data for each of the individual system components. The system-based near-optimal control methodology presented in this chapter utilizes an overall system cost function in terms of the total chilled water load and ambient wet bulb temperature. This cost function leads to a set of linear control laws for the continuous control variables in terms of these uncontrolled variables. Separate control laws are required for each feasible combination of discrete controls and the costs associated with each combination are compared to identify the optimum. The overall procedure is simple enough so as to be implementable either manually or on-line using microcomputers. For manual control applications, charts such as those that appear in Figures 5.2 - 5.6 could be used to determine optimal control as a function of load and wet bulb.

140

Chapter 6 Applications to Systems without Storage In this chapter, the modeling and optimization techniques described in previous chapters are applied to chilled water systems without storage. The results that are presented arise from both specified controls applied to individual component and subsystem modeling and optimal control results determined with the component-based algorithm described in Chapter 5.

6.1

System Description Figure 1.1 showed a general schematic of the variable air volume (VAV) system

considered in this study. The central cooling facility, which consists of multiple centrifugal chillers, cooling towers, and pumps, provides chilled water to a number of air handling units in order to cool air that is supplied to building zones. General descriptions of the components and modeling assumptions were given in Chapters 2, 3, and 4. All energy consuming components in the system are assumed to be electrically driven. At any given time, it is possible to meet the cooling needs with any number of different modes of operation and 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 variables. Chapter 5 describes a method for determining optimal values of these control variables. The 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 and condenser water pumps. 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 different component characteristics considered in this study. The loads employed 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 timevarying 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: onethird 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

determination of plant operating costs. Table 6.1 Summary of System Component Characteristics

Component Characteristics

Component

6.2

Chillers

1) 2) 3) 4)

D/FW variable-speed chiller D/FW fixed-speed chiller Lau (1985) chiller scaled to D/FW loads Hackner (1985) chiller scaled to D/FW loads

Cooling Towers

1) D/FW tower characeristics 2) Lau (1985) tower scaled to D/FW loads 3) Hackner (1985) tower scaled to D/FW loads

Pumping

1) D/FW system and pump characteristics 2) 20% greater system and pumping head at design conditions than 1) 3) 20% lower system and pumping head at design conditions than 1)

Air Handlers

1) Hackner (1985) scaled to D/FW loads 2) 20% greater fan power requirements at design conditions than 1) 3) 20% lower fan power requirements at design conditions than 1)

Loads

1) 20% of zone loads are latent 2) 15% of zone loads are latent 3) 25% of zone loads are latent

Control Guidelines for Multiple Components in Parallel For some of the independent control variables, it is possible to determine control

guidelines that when implemented yield near-optimal performance. These guidelines 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.

6.2.1

Multiple Cooling Tower Cells

The power consumption of a chiller is sensitive to the condensing water 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, but at the expense of an increase in the pump or fan power consumption. 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 loss associated with full-cell operation. Most current cooling tower designs utilize multiple-speed, rather than continuously 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

Yt,low < (1-

3

tlow)(6.2.1)

or

yt,low < 0.79

(6.2.2)

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 lowspeed 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 multiplespeed 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.

6.2.2

Multiple Chillers

Multiple chillers are normally configured in a parallel manner and typically controlled to give identical chilled water supply temperatures. For the parallel chiller combinations considered in this study, controlling for identical set temperatures was found to be either optimal or near-optimal. Besides the chilled water setpoint, additional control variables are the relative chilled and condenser water flow rates.

147 Simple guidelines may be established for distributing these flows. 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 D/FW Variable-Speed & Hackneres

6.5

6.0

0 OWN

D

5.5 0 5.0

4.5 -15

I Il

*

"

-10

I 1

-5

"

I a

*



0

I

I

5

-

"

I

I-

-

"

10

15

Condenser Return Water AT (F)

Figure 6.1. Effect of Condenser Water Flow Distribution for Two Chillers in Parallel

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)

with respect to the relative loadings, fji with the constraint

Nch i=l

fL

=

1

(6.2.4)

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

for all i, j

= afLoi

(6.2.5)

fLj

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,

N~

for i = ltoNch tNch

(6.2.6)

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

XQcap,

(6.2.7) (

i-=1

where Qap, is the cooling capacity of the ith chiller. The relative loadings determined with equations (6.2.6) or (6.2.7) could result in either minimum or maximum power consumptions. With the second-order necessary condition for a minimizing point, it is possible to show that these points represent a minimum when the derivative of the COP with respect to relative loading is less than zero. In other words, the chillers are operating at loads greater than the point at which the maximum COP occurs. Typically, but not necessarily, the maximum COP occurs

150

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 fixedspeed) obtains a minimum at that point. The part-load characteristic of the D/FW fixedspeed 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 D/RW Variable-Speed Chiles

6.5

Q

6.0D/FW Fixed-Speed Chillers Hawlner's Chiers

.5"

0

Lau's Chillers

5.0

0.3

0.4

0.5

0.6

0.7

Relative Load on First Chiller 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 heavily as possible, since its performance is best at ful load.

One of the important issues concerning control of multiple chillers is chiller sequencing. Sequencing involves determining the conditions at which specific chillers are brought on-line or off-line. The optimal sequencing of chillers depends primarily upon their part-load characteristics. Chillers should be brought on-line at conditions where the total power of operating with the additional chiller would be less than without it. Optimization results indicate that the optimal sequencing of chillers may not be decoupled from the optimization of the rest of the system. The characteristics of the system change when a chiller is brought on-line or off-line due to changes in the system pressure drops and overall part-load performance. The optimal point for switching chiller operation may differ significantly from switch points determined if only c1iller performance were considered at the conditions before the switch takes place.

6.2.3

Multiple Air Handlers

In a large system, a central chilled water facility may provide cooling to several buildings, each of which may have a number of air handling units in parallel. If the supply air setpoints of each of the air handlers were considered to be a unique control variable, the optimization problem would become quite complicated. However, the error associated with using identical supply air temperatures for all air handlers is 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 CL

3.9

Optimal

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

Although the number of control variables is reduced by considering only a single supply air set temperature, the overall operating cost still depends upon the performance and loadings on the individual air handlers. However, for the purpose of determining optimal control, air handlers may be combined into a single effective air handler under the conditions that all zones are maintained at the same air temperature and the heat transfer characteristics of the coils are similar. The required air flow as a fraction of the design air flow for the ith air handler in parallel, #y , may be expressed in terms of an overall air flow ratio as fah,i

Yahu,i

ahu

fahudes,

(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 F fs, e

3 Nahu

Pahu

=

ahu

XPPahudes,i f-s,1 1(6.2.9) i 1~ Lahudes,i =

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

to equation (6.2.9). For the near-optimal control algorithm described in Chapter 5, it is necessary to include the relative zone sensible loads (fs,,) as uncontrolled variables in the empirical system cost function, if they change significantly.

6.2.4

Multiple Pumps

A common control strategy for sequencing both condenser and chilled water pumps is to bring pumps on-line or off-line with chilers. In this case, there is a condenser and chilled water pump associated with each chiller. For fixed-speed pumps, this strategy is not optimal. At the point at which a chiller is brought on-line in parallel and assuming that the pump control does not change, there is a reduction in the pressure drop and subsequent increase in flow rate for both the condenser and chilled water loops. The increased flow rates tend to improve the overall chiller performance. However, if the pumps are operating near their peak efficiency before the additional chiller is brought on-line, then there is a drop in the pump efficiency when adding the additional chiller while holding the pump control constant. Most often, the improvements in chiller performance offset the degradation in pump performance, so that there is no need for an additional pump at the chiller switch point. Figure 6.4 shows the optimal system performance for different combinations of chillers and fixed-speed pumps in parallel as a function of load for a given wet bulb. The optimal switch point for a second pump occurs at a much higher load (-40.62) than the switch point for adding or removing a chiller (~0.38). If the second pump were sequenced with the second chiller, then the optimal switch would occur at the maximum chiller capacity and approximately a 10% penalty in performance would result at this 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.

6 One Chiller, One Pump

064

Optimal Chiller Switch Point

5

Two Chillers, One Pump

rj

4 Two Chillers,

ego 0

Two Pumps

Optimal Pump Switch Point

3

2 '"1 0.1

i 0.2

0.3

0.4

0.5

i"Slm 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 The sequencing of variable-speed pumps is more straightforward than that for fixed-speed pumps. For a given set of operating chillers and tower cells (i.e. given system pressure drop characteristics), variable-speed pumps have relatively constant efficiencies over their range of operation. As a result, the best sequencing strategy is to select pumps so as to operate near their peak efficiencies for each possible combination 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 directly coupled to the sequencing of chillers. For identical variable-speed pumps oriented in parallel, the best overall efficiency is obtained if they operate at identical speeds. For non-identical pumps, near-optimal efficiency is realized if they operate at equal fractions of their maximum speed.

156

Sensitivity Analyses and Control Characteristics of Subsystems

6.3

In this section, the sensitivity of the optimal system performance to the uncontrolled and controlled variables is studied.

6.3.1

Effects of Load and Ambient Conditions

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 performance of wet surface heat exchangers are driven primarily by enthalpy 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 through time, then this must also be included as a correlating variable.

157 11

~Base Cs



Ambient Dry Bulb

10

O

9 8

=

80 F

= 70 F Ambient Wet Bulb Latent-Sensible Ratio = 0.20

.

%.Low Ambient Wet Bulb (55 F)

n

6

,

5 4

+ High Ambient Dry Bulb (95 F) x High Zone Latent-Sensible Ratio (0.25)

3 2

1

0.0

=M

"

1

0.4

0.2

0.6

"I I I"M

0.8

1.0

Relative Chilled Water Load Figure 6.5. Effect of Uncontrolled Variables on Optimal System Performance

6.3.2

Condenser Water Loop

The primary controllable variables associated with heat rejection to the environment are the condenser water and tower air flow rates. Figures 5.4 and 5.5 showed how optimal values of these flow rates vary with both total chiller load and ambient wet bulb temperature. Both optimal air and water flows increase with load and wet bulb temperature. Higher condensing temperatures and reduced chiller performance result

from either increasing loads or wet bulb temperatures for a given control. Increasing the air and water flow under these circumstances reduces the chiller power consumption at a faster rate than the increases in fan and pump power. Figures 6.6 shows the sensitivity of the total power consumption to the tower fan 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.

1.0

5% > Minimum

J

0.9 . 0.8-

1%> Minimum

0.7

7Minimum

W

x

0.6 0.5

:.2

0.4

oom C1

0.3

10% > Minimum

0.2

25% > Minimum



0.11

0.5

-

0.6

,

0.7

-

,

0.8

-

-

0.9

1.0

Relative Condenser Pump Speed Figure 6.6. Power Contours for Condenser Loop Control Variables

159

6.3.2

Chilled Water Loop

Figures 5.2 and 5.3 showed the dependence of'the optimal chilled water and supply 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 supply air temperature,the temperature difference is limited by the heat transfer

160 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 supply air and chilled water setpoints.

65 10% > 25% >

60 Cu

I s

55-

sm

50

A

-F.., .9U

35

-

U

40

-

U

-

45

U

50

-

55

Chilled Water Supply Temperature (F) Figure 6.7. Power Contours for Chilled Water and Supply Air Temperatures

6.4 Optimal versus "Alternative" Control Strategies There is no general strategy that has been established for controlling chilled water systems. Most commonly, the chilled water and supply air set temperatures are constants that do not vary with time. In some applications, these setpoints vary according to the ambient dry bulb temperature. Generally, there is an attempt to control the cooling tower and condenser water flow in response to changes in the load and

161 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.

6.4.1

Conventional Control Strategies

Fixed values of chilled water and supply air setpoints and tower approach and range that are optimal or near-optimal over a wide range of conditions do not exist. In addition, it is not obvious how to choose values that work best overall. One simple, yet reasonable approach is to determine fixed values that result in near-optimal performance at design conditions. Figure 6.8 shows a comparison between the performance associated with optimal control and 1) fixed chilled water and supply air temperature setpoints (40 and 52 F) with optimal condenser loop control, 2) fixed tower approach and range (5 and 12 F) with optimal chilled water loop control, and 3) fixed setpoints, approach, and range. The results are given as a function of load for a fixed wet bulb temperature. Since the fixed values were chosen to be appropriate at design conditions, the differences in performance as compared with optimal control are minimal at high loads. However, at part-load conditions, Figure 6.8 shows that the savings associated with the use of optimal control become very significant. Optimal control of the chilled water loop results in greater savings than that for the condenser loop for part-load ratios less than about 50%.

162 7.

Optimal

6

Fixed Approach and Range Fixed Chilled Water and

E

Supply Air Setpoints

5

Setpoints, Approach, and Range

0Fixed

3 2

1

0.2

0.4

0.6

0.8

1.0

Relative Chilled Water Load Figure 6.8. Comparisons of Optimal Control with "Conventional" Control Strategies

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

Control Description fixed temperauresetpoints fixed approach and range fixed setpoints, approach, range

6.4.2

Cost Relative to Optimal Control Low Internal Gains High Internal Gains Dallas Miami Dallas Miami 1.09 1.05 1.17

1.10 1.06 1.19

1.03 1.03 1.07

1.03 1.03 1.07

Humidity 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.

o.o14

6

0.013

"fixed" humidity

-0.012

flaig humidity

,5"firee"

-0.011

CIO-0.010 0.009

S 4

l

0.008 0.007

1*06 o 3

0.006

COP for "free" ~~floating humidity

humidity .. COP 2 for "fixed" ,... I' -

0.5

N

0.004 0.005

. , -

0.003 0.0

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

Relative Chilled Water Load Figure 6.9. Comparison of "Free" Floating and "Fixed" Humidity Control

165 Comparisons of Alternative System Configurations under Optimal Control

6.5

In order to compare the operating costs associated with different system designs, it is most appropriate that each be optimally controlled. In this section, alternative system configurations are compared in terms of their optimal system performance.

6.5.1

Variable versus Fixed-Speed Equipment

The part-load performance of a centrifugal chiller depends upon the method by 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. In general, the part-load performance of a chiller is better for variable-speed as 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 performance for both types of control. At part-load conditions, the performance 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 E

D/FW Variable-Speed Chiller

5

D/RF ixd-Speed Chiller

3

0.2

0.4

0.6

0.8

1.0

Relative Chilled Water Load Figure 6.10. Optimal System Performance for Variable and Fixed-Speed Chillers 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 additional improvements in the overall system performance. Figure 6.11 compares optimal system performance for single-speed, two-speed,

167

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

Relative Chilled Water Load Figure 6.11. Comparison of One-Speed, Two-Speed, and Variable-Speed Cooling Tower Fans (Four Cells)

If a fixed-speed pump is sized to give proper flow to a chiller at design conditions, 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" fixed-speed pumps, the improvements with variable-speed become significant at about 40% of the maximum load.

7. Variable-Speed Pumps

6 ~.) 5

No

Large Fixed-Speed Pump

4

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

Configuration fixed-speed chiller fixed-speed tower fans fixed-speed pumps fixed-speed air handler fans all fixed-speed equipment

6.5.2

Cost Relative to All Variable-Speed Equipment High Internal Gains Low Internal Gains Dallas

Miami

Dallas

Miami

1.16 1.06 1.10 1.07 1.42

1.18 1.06 1.09 1.07 1.43

1.14 1.05 1.05 1.04 1.29

1.13 1.05 1.04 1.04 1.26

Series versus Parallel Chillers

Multiple chillers are typically arranged in parallel and the chilled and condenser water flows are divided between the chillers according to their loading. Alternatively, it is possible to arrange chillers in series, so that the total chilled and condenser water flows pass through each evaporator and condenser. Two possible arrangements for series chillers are series-parallel and series-counterflow. In the series-parallel

170

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

0.3

0.4

0.5

0.6

Relative Load on First Chiller Figure 6.13. Comparison of Chiller Performance for Parallel and Series Configurations

0.7

171

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.04.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 Chapter 5 to develop a "simple" methodology for near-optimal control of chilled water systems without storage. The guidelines are also useful to plant engineers for

173

improved control practices and are summarized as follows.

1) Variable-Sed Toweran: Operate all tower cells at identical fan speeds.

2) Multi-Speed Tower Fans: Increment lowest tower fans first when adding tower capacity. Reverse for removing capacity.

3) Variable-Speed Pumps: The sequencing of variable-speed pumps should be directly coupled to the sequencing of chillers, to give peak pump efficiencies for each possible combination of operating chillers. Multiple variable-speed pumps should be controlled to operate at equal fractions of their maximum speed.

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 fixed-speed pumps. It is necessary to evaluate the overall system performance in order 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 optimal control of chilled water systems are summarized as follows.

174

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 optimal control in Dallas and Miami.

2) In the determination of optimal control points, the humidity should be allowed 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.

4) The performance of multiple chillers is enhanced by orientation in series rather 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 operation at more favorable part-load conditions. However, the most important 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 water storage system relies on stratification in order to achieve good performance. 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. In this chapter, a methodology is outlined for determining the optimal control of a fully-stratified chilled water storage system. This methodology is utilized as tool for

176

analyzing the control of these systems. A simpler near-optimal control strategy is developed from the results of the detailed analysis. In order to implement either the optimal or near-optimal control, it is necessary to forecast the cooling load requirements. Time-series techniques are applied to the development of a model for forecasting the cooling requirements of buildings.

7.1

Optimization of Systems with Storage Optimal control of a system with thermal storage involves minimizing the integral of

the operating costs, while satisfying required constraints. There are capacity limits associated with each piece of equipment in the plant. If sensible energy storage is utilized, then there are upper and lower limits on the temperature of storage in order to provide proper comfort and avoid freezing. The general form of the optimization problem is

Minimize J -fL(x(t), u(t), f(t),t)dt

(7.1.1)

to

subject to dx -=

(x, u, f)

x(t)

C

X

u(t)

C

U

(7.1.2)

177 where J is the total cost of the process between the times to and tf, L is the instantaneous cost at time t, x is a vector of state variables, u is the vector of control variables, f is a vector of uncontrolled variables, and X and U are constraint sets 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

L(x(t), u(t), f(t), t) = R(t) P(x(t), u(t), f(t))

(7.1.3)

where P is power consumption and R is the cost of electricity. The solution of the optimal control problem gives a vector of control functions for a continuous representation or sequences of values for the discrete case. This solution can either be expressed as a function of time, u*(t), in open-loop control, or alternatively as a function of the state variables, u*(x), for closed-loop control. One approach for solving the optimal control problem expressed by equations 7.1.1 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. Alternatively, the optimization problem may be solved in a discrete manner using dynamic programming (Bellman [1957]). This method handles constraints on both 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

Dynamic Programming

7.1.1

Dynamic programming may be applied as a numerical technique for determining global solutions to dynamic optimization problems. The method involves discretization 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) =

(x(k-1), u(k-1), f(k-1))

(7.1.5)

x(k) e X u(k) e U

The integral cost function has been converted to a sum of individual stage costs from 0 to K, while the state equations are represented in difference form. The heart of dynamic programming is Bellman's principle of optimality. The principle can be stated as follows:

Suppose the sequence of optimal controls, u*(k), k = 0, 1,..., K, optimizes J(u). Define a subproblem:

179

Jm=

K

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 from stage m to K, u*(k), k = m, m+l,..., K also optimizes Jm(u).

This fairly simple principle leads to an iterative functional equation for determining optimal control termed the dynamic programming equation.

I(x(m), m) = min{L(x(m), u(m), f(m)) + I(x(m+l), m+1)}

(7.1.6)

I(x(m), m) is defined as the minimum cost-to-go from state x at stage m to K. The

dynamic proamming equation is related to the principle of optimality in that the minimum cost-to-go from any state x(m) is found by minimizig the sum of the stage

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

=5

k=0 Stage

Figure 7.1. Dynamic Programming Network

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

Jij(k) = L(x(k), u(k), f(k), k)

(7.1.7)

181

subject to

xj(k+l) = 4(xi(k), u(k), f(k))

(7.1.8)

Depending upon the number of stages and state variables, the computational and memory requirements associated with the use of dynamic programming may be excessive. The number of nodes in a dynamic programming network is equal to the 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 10,000. Morin (1979) provides a review of improvements in the the dynamic programming procedures that address this problem. One such improvement, utilized in this study, involves application of dynamic programming in an iterative scheme in which bounds on the state variables are reduced

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 of the network approaches zero along the optimal control path.

7.1.2

Application to Systems with Fully-Stratified Water Storage

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 • associated with control of storage that are considered in this study: Return to Chillers

Return from Load

Supply from Chillers

Supply to Load

Figure 7.2. Parallel Configuration for Thermal Storage

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 variables are "free" in the control optimization.

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 temperature is controlled to be a constant. All other independent control variables are "free" in the control optimization.

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 temperature is controlled to be constant and all other independent control variables are "free".

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 approximately 40 F. A load water return temperature of 60 F during discharge is approximately the upper limit necessary to insure proper dehumidification at the cooling coils for the load. The constant values of chilled water supply temperature for charging 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, the energy equation for charging or discharging storage is

184

aT =

-

at

aT -(7.1.9)

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

T(t + At, x) = T(t, x - vAt)

for x > vAt

(7.1.10)

T(t + At, x) = Ti(t + At - x/v)

for x < vAt

(7.1.11)

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 temperature distribution downstream of the inlet is a history of the inlet conditions. 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 x (k+1) = x (k) + v At

(7.1.12)

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 which energy is removed from storage, the relative fluid velocity is

Os V

where

(Tcharge _ Tdischarg) Caps

(7.1.13)

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

Qeh

Q0L-

Qs

(7.1.14)

where QLis the total building cooling load rate. In the dynamic programming algorithm, the state variable (i.e. relative charge level) 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 (forecasted) uncontrolled variables. The required storage charge or discharge rate is

186 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

Ji4k) = R(k) Pi.j(QL(k), Twb(k), Qsijk))j At

(7.1.15)

*

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

P*

=P (Q L, Twb, Q L- Qch,min)

At~ At

+

p*(

T

r

At 0~

(.116

At]J(..

187 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

Aton= -

L"s

i-j Och,min

At

(7.1.17)

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. 7.1.3

Results for Fully-Stratified Storage

The methodology described in the previous section was applied to a fully-stratified chilled water storage system in order to answer two questions: 1) What is the

188

magnitude of cost savings associated with the use of optimally controlled storage in the absence of time-of-day or peak demand utility rates? and 2) Is it necessary to perform "true" optimal control for systems having time-of-day rates or do simpler control 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

f(t)-

fmax + fmin 2

+

fmax- fmin mx

msi

2

2

(t - 12)

(7.1.18)

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 complicates the dynamic optimal control problem considerably by introducing many state variables and would be difficult to implement in practice. 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

I0Oo 'U

8 a.m.

12

4

8 p.m.

12

4

8 a.m.

Time of Day

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 0O0

5000-

*

No Storage

O

1500 ton-hours/deg. F

E3 2000 ton-hours/deg. F 04000 o*

3000

0

2000 1000

iiIIII

0

I--

~

-

-

!

-

-

1 2 3 4 5 6

-

~

-

-

-.

-

-

Pm 0509yV

I" bo yPa" 60 IMAJ4

~-

ypra-.,

ri

-

r

7 8 9 101112131415161718192021222324

Hour of Day (from 8 a.m.) Figure 7.4. Optimal Chiller Loading for One Day with Time-of-Day Electric Rates

From the results of dynamic programming applied to systems with storage, some simple guidelines may be established for "near-optimal" control when time-of-day utility rates are in place.

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 period of time necessary for the storage to completely discharge, if possible. If the storage capacity is not sufficient to meet the load when rates are high, then the 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 lowest, generally during the morning and early afternoon hours.

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 direct cooling mode.

Table 7.1 compares the cost of operation associated with optimal control, the nearoptimal 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 Table 7.1 One-Day Operating Cost Comparisons for Systems with Thermal Storage

System Description

Daily Operating Costs ($) Conventional Near-Optimal Optimal

24 hour load ran. and max loads: 1500, 4000 tons storage capacity: 1500 ton-hours/deg. F

2686

2727

3095

24 hour load min. and max. loads: 1500, 4000 tons storage capacity: 2000 ton-hours/deg. F

2489

2497

2564

12 hour load min. and max loads: 1000, 5000 tons storage capacity: 1500 ton-hours/deg. F

2167

2301

2625

12 hour load min. and max loads: 1000, 5000 tons storage capacity: 2000 ton-hours/deg. F

1943

2066

2095

7.3

Models for Forecasting Building Cooling Requirements In order to implement optimal or near-optimal control of thermal storage, it is

necessary to forecast cooling load requirements. In this section, measurements from the Dallas/Fort Worth airport are utilized to develop a time-series model for forecasting cooling loads. Building cooling loads are functions of many variables such as ambient temperature, solar radiation, occupancy of people, lighting, computers, etc. All of these heat gains are periodic functions having a dominant period of 24 hours. There are 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 combined deterministic plus stochastic model is appropriate for load forecasting.

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].

7.2.1

Time-Series Models

A time series is a sequence of observed data ordered in time. The statistical methodology dealing with the analysis of such a data sequence is termed time-series analysis. A time-series model expresses the dependence of the present observation as a sum of two independent parts: one dependent upon preceding observations and the other an independent random sequence. The simple auto-regressive model of order n (AR(n)) is given by

n

Xt=

i=1

OiXt-

+ et

(7.2.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

iXt-1(7.2.2)

Xt = 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 is termed an auto-regressive moving average model (ARMA). Pandit and Wu [1983] have defined a rational method for determining the order of an ARMA model that provides an adequate fit to the data. However, a nonlinear regression is required in order to determine the coefficients of the model. Theoretically, an ARMA model can be represented by an AR model of infinite order. However, in practice, only a finite AR model is necessary. The advantage of using AR models is that linear regression 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 recursive parameter estimation techniques. Periodic trends in the data may be removed by the use of a trigonometric polynomial of order m, having the form

m

m

P(t) = Yaj sin(jox) + I j=1

bj cos(jon)

(7.2.3)

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)

i=l

j=1

j=1

But, by definition

XYt"aj sin(joct) + X:bjcos(jot)

=

(7.2.5)

j=1

j=1

Substituting equation (7.2.5) into (7.2.4) gives m

aa'j sin(jct)

Yt= j=1

m

n

+ X

b 'jcos(jcot) + X

j=l

4)i Yt- 1

+

et

(7.2.6)

i=1

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 leastsquares methods. For one-time parameter estimation from a batch of measurements, the data is typically averaged and the average is subtracted from the data before the fitting process. Parameters of this model may also be fit using on-line recursive parameter estimation as outlined by Ljung [1983].

7.2.2

Application to Forecasting Cooling Loads

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) Parameter

AR(1)

AR(2)

AR(3)

AR(4)

AR(5)

01

0.881

0.870

0.886

0.8496

0.8140

0.009

0.060 -0.059

0.0748 0.1390

0.0930

-0.2290

-0.1010

02 03 04

-0.1500

05 rms(tons)

0.1510

334

334

334

329

327

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) Figure 7.5. One-Hour Forecasts of March D/FW Cooling Load Data for AR(4) Model

199

WI

o+ 2000

+

o

+

+

+

Data 5-hour Forecasts V

0 -II

0

20

40

60

80

Time (hours)

Figure 7.6. Five-Hour Forecasts of March D/FW Cooling Load Data for AR(4) Model An improved model results if some of the determinism is removed by fitting a 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 4.

02

C+

-

2000-+ 44

+2

4

10004.+4.

4

4.

+-Daa 5-hour Forecasts

+ 0I

"

0

20

I

40

60

80

Time (hours) Figure 7.7. Five-Hour Forecasts of March D/FW Cooling Load Data for Combined Deterministic and Stochastic Model

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 Dynamic Programming was applied as a numerical tool for determining optimal

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 strategy for near-optimal control was identified. The advantage of the Dynamic Programming methodology over the simpler strategy is that it provides a "true" solution to the optimization problem and can adapt to changing circumstances. The algorithm is simple enough so as to be implementable on a microcomputer. Although demand charges were not considered in this study, peak 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 In order to make longer term predictions, it was necessary to include deterministic components in the model. The results of 5-hour predictions with the combined model were good. The resulting model is simple enough to be fit with linear least-square methods.

204

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.

8.1 Mathematical Models In Chapter 2, a detailed mechanistic model for variable-speed centrifugal chillers was developed. The model requires only design parameters and the operating conditions in order to 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 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 quadraticfunction of only two variables:the load and temperaturedifference between the leaving condenser and chilled waterflows. The empirically-basedmodelfits data

205 for both variable-speedandftxed-speed with vane control chillers. Models for correlating the limits of chiller operation associated with surge and capacity were also presented. In Chapters 3 and 4, effectiveness models were developed for cooling towers and cooling coils. These models utilize existing effectiveness relationships for sensible heat exchangers with modified definitions for number of transfer units and the capacitance rate ratio. Simple methods were also developed for estimating the water loss in cooling towers and the performance of cooling coils having both wet and dry portions. Results of the effectiveness modelsfor cooling towers and cooling coils compare well with the results of more detailed numericalsolutions to the basic heat and mass transfer equations and with experimental data. The advantages of this approachare its simplicity, accuracy, and consistency with the methodsfor analyzing sensible heat exchangers. Futurework should involve applicationof this modeling approach to other wet surface heat exchangers. Models were also presented for the power requirements of cooling tower and air handler fans and condenser water and chilled water pumps. It was shown that quadraticfunctions work well in correlatingthe power consumptions of the auxiliary devices in central chilled waterfacilities. The use of quadratic functions for the chiller and auxiliary equipment was an important result in the development of an efficient method for determining optimal control.

8.2

Optimal Control Methodologies Two methodologies were presented for determining optimal control points for

chilled water systems without storage. A component-based non-linear optimization algorithm was developed as a simulation tool for investigating optimal system performance. Results of this algorithm implemented in a computer program, led to the

206

development of a simpler system-based methodology for near-optimal control. The advantage of the component-based algorithm over the system-based approach 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 components may be either mechanistic or empirical in nature, so that the componentbased methodology is useful for evaluating both system design or control characteristics. The component-based algorithm takes advantage of the quadratic cost behavior of the components found in chilled water systems in order to solve the optimization problem in an efficient manner. However, in order to utilize this methodology as a tool 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 variables to two. The system-based near-optimal control methodology utilizes an 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 combination are compared to identify the optimum. Results of the system-based optimization methodology agree well with those of a more detailed non-linear optimization analysis. The system-basedprocedure is simple enough so as to be implementable either manually or on-line using microcomputers. For manual control applications, charts could be used to determine optimal control as a function of load and wet bulb.

207 Additional work is necessary in orderto apply either the component-based or system-basedmethodologiy to on-line optimal control. In particular,methodsfor determiningparametersof the models need to be investigated. The performance characteristicsof the system may change over time, so that it could be necessary to update the model parameters. It is also important to iden)fy an appropriatetime intervalfor making controldecisions. There may be inefficiencies associatedwith changing controls toofrequently in response to small changes in the uncontrolled variables. The next step is to test these methodologies as partof an energy managementsystem for controlling an actual system. A methodology was presentedfor determining the optimal control of stratified thermal storagesystems using Dynamic Programmingthat is simple enough so as to be implementable on a microcomputer. Although demand charges were not considered 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 control was identified. The advantage of this near-optimalcontrol strategy is that it is easily implemented and gives operating costs similar to thatfor optimal control. Both the optimal and near-optimalstrategiesshould be adaptable to systems that incorporateice storage, however these concepts need to be tested. Systems that incorporatestorage in-line with the chilled water distributionsystem, ratherthan in parallelshould also be considered. It is also necessary to develop strategiesfor nearoptimal control of systems that utilize more than one day of storage. 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

208 D/FW airport. Pure time-series models work wellfor making forecasts of one hour. In order to make longer term predictions, it was necessary to include deterministic components in theforecastingmodel. The results of 5-hour predictions with the combined model were good. The resulting deterministicand time-series model is simple enough so that its coefficients may befit with linear least-squaremethods. More datais necessary to determine whether the model works well under all circumstances. Methods for recursiveparameterestimation should also be testedfor this forecastingmodel. 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 address the effect of inaccuraciesinforecasts on the accuracy of the optimal control solution.

8.3

Guidelines for Design and Control 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 temperature. Additional secondary uncontrolledvariablesthat could be importantif variedover a wide range would be the individual zone latent to sensible load ratiosand the ratios of individual sensible zone loads to the total sensible loadsfor all zones. Control guidelines that reduce the number of independent control variables and 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 practices and are summarized as follows.

209

1) Variable-Speed Tower Fans: Operate all cooling tower cell fans at identicalfan speeds.

2) Multi-Speed Tower Fans: Increment lowest cooling towerfansfirst when adding tower capacity. Reverse for removing capacity.

3) Variable-Speed Pum:The sequencing of variable-speedpunps should be directly coupled to the sequencing of chillers, to give peak pwnp efficiencies for each possible combination of operating chillers. Multiple variable-speed pumps should be controlled to operate at equalfractions of their maximum speed.

4)

hill: Multiple chillers should have identicalchilled water set temperatures and the evaporatorand condenser waterflows for multiple chillersshould be divided accordingto the chillers relative cooling capacities.

5) Air Handlers: All parallelairhandlers should have identicalsupply airsetpoint tenperatures.

6) Straified Thermal Storage: A near-optimalcontrol strategy involves maximizing operationof the system in thefull discharge mode whenever the utility rates are high and minimizing operation in the charge mode when the utility rates are low. Otherwise, the system should operate in the direct mode, if necessary, during times of lowest wet bulb temperature. This control strategy should also be tested for systems with ice storage.

210

No generalsimplifications could be foundfor the optimalsequencing of chillers and fixed-speed pumps. It is necessary to evaluate the overall system performance in order to determine the optimal pointsfor adding or removing chillers. In general, it is not optimal to sequencefixed-speed pumps with chillers. Additional results and conclusions concerning both control and design under optimal control of chilled water systems are summarized as follows.

1) There is a strong incentivefor the use of optimal or near-optimalcontrol of chilled water systems. 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 optimal control in Dallas and Miami.

2) In the determinationof optimal control points, the humidty should be allowed tofloatfreely, unless itfalls 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) There are significantoperationalcost savings associated with the use of variable-speedequipmentfor chilled water systems. 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.

4) The currentpracticeof orienting multiple chillers in parallelis near-optimaland

211 should be continued. The performance of multiple chillers is enhanced by orientation in series rather 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.

5) The choice of chiller refrigerantcan have a significanteffect upon operating costs. For the D/FW chiller, the peak performance associated with the use of R-500 shows on the order of 5 - 10% improvement over the orginal charge of R-22. This particular chiller was derated from its original capacity due to changes in the load requirements.

6) In the absence of time-varying utility rates, thermalstorageprovided little or no operatingcost savings as compared with no storagefor the systems considered. Part of the reason for this is due to the assumption of a constant chilled water supply temperature during charging of storage and a constant load return water temperature during discharge. Future work should be performed to compare the performance of optimally controlled storage systems with the charging anddischargingtemperaturesas 'free" variables in the optimization. Analysis of systems with poorerpart-loadcharacteristicscould also change this conclusion. In addition, systems that incorporateice storageshould be compared with water storage systems both with and without time-of-day electic rates.

212

Appendix A Refrigerant Property Data

Liquid Refrigerant Thermal Conductivity Correlations The following correlations require temperature, T, in degrees Fahrenheit and give thermal conductivity, kf, in Btu/hr-ft-F.

R-500:

kf = 0.05300 - 0.000127 T

R-22:

kf = 0.06298 - 0.000159 T

R-12:

kf-

_" Lgi

"

0.04902 - 0.000117 T

Viseosit Correlation

Refrigerant viscosities, A, are in ibm/ft-hr and temperatures, T, are degrees Fahrenheit.

R-500: R-22: R-12:

lf = 0.6851

f

-

3.2943e-03 T + 6.4430e-06 T2

0.6517 - 2.5943e-03 T + 5.610le-06T

2 If = 0.7630 - 3.8905e-03 T + 9.88lOe-06 T

Refrigerant Sonic Velocity Data at 50 degrees Fahrenheit

Refrigerant R-500 R-22 R-12

a- fft/sec) 490 534 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

+ C (Ta,-Tdp (Tdp- Tw,) (1 - K/Ntuo)(Ta,i -'Tdp)

1 dry = ""K

(B. 1)

where, *

KNtUdry (1 - C)

The effectivenesses for the wet and dry portions of the coil, eCwet and ady are

8 a~wt -

1 1

-

exp(- (1 - fdj,) Ntu weL( 1 - in))(B) in exp(- (1 - fdry)Ntuwet(1 - in))

-

(B.2)

214

8dry

=

1 - exp(-fdy NmrY(1 - C))

(B.4)

1 - C exp(-f&YNtu &Y(1- C

The water temperature at the point where condensation begins is

Twwxe

Tw i + CCwet,a(hai- hs,w,,i)/Cpm - C

wetaedy,aTa,i

tadrya a i(B.5)

(1 - C ewetaedrya)

and a new estimate of the exit water temp

Tw,0 = C eyaTa,i + (1-

is

C ecirya)Tw,x

(B.6)

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 converges very quickly, typically within two iterations. The outlet air state from the coil is determined from

Tao

Ts~e + (Tax- Tse)exp(- (1 - fdr)Ntuo)

where, the effective surface temperature in the wet coil section is the saturation temperature corresponding to an effective enthalpy condition determined as

(B.7)

215 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

Twx)

(B.9)

ha,i-dryaCpm(Ta, i-wx)

(B.10)

Ta,x = Ta,i

ha,x

=

c-dry,a(T a,i-

216

Appendix C Component Data for Base System of Chapter 6

I. Chiller Power Consumption (see Chapter 2)

Pch =a

+ aX + a2 X2+

0

Pdes

a 3 Y + a4Y2+

a5 XY

where,

X

=Oe o-des

S(T

-.Thw) ATdes

Parameter

Variable-Speed.

Fixed-Speed

Lau

Hackner

ao

0.07336

0.0516

0.1107

0.2642

a,

-0.3259

1.2199

0.3198

0.0207

a2

0.5744

-0.2517

0.4662

0.2643

a3

-0.03888

-0.6448

-0.0956

-0.4460

a4

0.3321

0.8963

0.2152

0.3555

a5

0.3684

-0.3119

-0.0656

0.5176

5421.

5421.

1250.

550.

46.

46.

50.

50.

3580.

3627.

961.

453.

Qdes

AT des Pdes

217

I.

Cooling Tower Cells (see Chapter 3) 1 +n

where, c =2.0 n = -0.63

Design Air Flow: 635,000 cfm Design Fan Power. 100 kW Sump Make-Up Water Temperature: 50 F

I.

Cooling Coil Data (see Chapter 4)

Ntu

i

Ntuo

= klmW:::ek]

=

3

mk a]k4

I ma.des]

where, k, = 2.25

k2 = -0.20

k3 = 1.70

k4 = -0.38

218

Total Design Air Flow: 1,800,000 cfm Total Design Fan Power. 1000 kW

IV. Pump Analysis (see Chapters 3 and 4)

Press=urer

s

Desin .AP (psi)

Component

Desien Flow (epm)

Chiller Condenser

10,000

10

Chiller Evaporator

10,000

25

5,000

5

Cooling Tower Nozzle Condenser Water Loop Static

30

Chilled Water Loop Static

20

Pump Pressure Rise

2

APp

APPpmx1 -(mcw P pmax

2 Appmax = yAP pmaxdes

mp,max = yp mp,maxdes

219

where, 100 psi

APp,maxdes =

mp,maxdes

=

10,000,000ibm/hr

PmL_ Efficiency

1p-= a 0 + a,1 -.

'p

where,

ao = 0.0 a1 = 2.93 a2 = -2.64

a2 p.maxdes

2+

p

pmaxdes

220

References 1.

Arnold, LA., et al., "Supervisory Control and System Optimization of Chiller -

Cooling Tower Combinations Via Simulation Using Primary Equipment Models -Part II Simulation and Optimization," Proceedings of the Workshop on HVAC Controls and Modeling and Simulation, Georgia Institute of Technology, February 2-3, 1984. 2.

ASHRAEHandbook of Fundamentals, American Society of Heating, Refrigerating, and Air Conditioning Engineers, Atlanta, pp. 3.1-3.16, 1981.

3.

ASHRAE Eui .bntGuide, American Society of Heating, Refrigerating, and Air Conditioning Engineers, Atlanta, Chapter 3, 1983.

4.

ASHRAE Technical Data Bulletin, 'hermal Storage," A collection of papers presented during the ASHRAE Winter Meeting, ASHRAE, Inc., Atlanta, Georgia, January 1985.

5.

Bellman, R., Dynamic Programming, Princeton University Press, Princeton, N.J., 1957.

6.

Berman, L.D., Evaporative Cooling of Circulating Water, 2nd edition, translated from Russian by R.Hardbottle and edited by Henryck Sawistowski, Pergamon Press, New York, 1961.

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.

9.

Braun, J.E., "Programs for Modelling and Optimizing the Performance of Central Chilled Water Systems," Solar Energy Laboratory, University of Wisconsin-Madison, 1988.

221 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. 12. Davis, F.T. and Corripio, A.B., "Dynamic Simulation of Variable-Speed Centrifugal Compressors, "Instrumentation in the Chemical and Petroleum Industries, Vol. 10, ISA, Pittsburgh, Pa., Feb. 1974. 13. Downing, R.C.,"Refrigerant Equations," Dupont Company" 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. 17. Ferguson, The CentrifugalCm essor Stag, Butterworth and Company, London, 1963. 18. Gill, P.E., Murray W., and Wright, M.G, Practical Optimization, Academic Press, London, 1981. 19. Gunewardana, D.R., Tomizuka, M., Auslander, D.M., "Application of Optimal Preview Control to Power Plant Cooling Systems," ASME Journal of Dynamic Systems, Measurement and Control, Vol. 101, June 1979. 20. Hackner, R.J., Mitchell, J.W., and Beckman, W.A., "HVAC System and

Energy Use in Existing Buildings - Part I",ASHRAE Transactions, Paper KC84-09, 1984.

222 2 1. Hackner, R.J., Mitchell, J.W., and Beckman, W.A., "HVAC System Dynamics and Energy Use in Buildings - Part H," ASHRAE Transactions, Vol.91, Part 1, 1985. 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 EffectivenessNTU Method," ASME Winter Annual Meeting, Boston, Massachusetts, December, 1987. 25. Jacobson, D.H. and Mayne, D.O., Differential Dynamic Programming, Elsevier, New York, 1970. 26. Jakob, M., Heat Transfer. Vol.11, John Wiley & Sons, New-York, pp. 342345, 1957. 27. Johnson, G.A. "Optimization Techniques for a Centrifugal Chiller Plant Using a Programmable Controller," ASHRAE Transactions, Vol. 91, Part 2, 1985. 28. Klein, S.A., et al., TRNSYS" - A Transient System Simulation Program," University of Wisconsin - Madison, Engineering Experiment Station Report 38-12, Version 12.1, 1984. 29. Larson, R.E., State Increment Dynamic Programming, American Elsevier, 1967. 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. 31. Lichtenstein, J., "Pefformance. and Selection of Mechanical-Draft Cooling Towers," ASME Transactions, Vol. 65, No. 7, pp. 779-787, 1943.

223 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. 34. Marcev, C.L., "Steady-State Modeling and Simulation as Applied to Energy Optimization of a Large Office Building Integrated HVAC System," M.S. Thesis, University of Tennessee, 1980. 35. Merkel, F., "Verdunstungskuhlung," VDI Forschungsarbeiten, No. 275, Berlin, 1925. 36. Mickley, H.S., "Design of Forced Draft Air Conditioning Equipment," Chemical Engineering Progress, Vol. 45, No. 12, pp. 739-745, 1949.

37. Morin, T.L., "Computational Advances in Dynamic Programming," p. 53, Dynamic Programming and Its Applications, Edited by Martin L. Puterman, Academic Press, 1979. 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. 40. Nizet, J.L, "Development of Cooling Tower Models," Internal Report, Laboratoire de Physique du Batiment, University of Liege, Belgium, 1985. 41. Nottage, H.B., "Merkel's Cooling Diagram as a Performance Correlation for Air-Water Evaporative Cooling Systems, "ASHRAE Transactions, Vol. 47, pp. 429-448, 1941.

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. 44. Pontryagin, L.S., Boltyanskii, V.G., Gamkrelidze, R.V., and Mishchenko, E.F., The Mathematical Theory of Optimal Process, Wiley - Interscience, New York, 1962. 45. Simpson, W.M. and Sherwood, T.K., "Performance of Small Mechanical Draft Cooling Towers," Refrigerating Engineering, Vol. 52, No. 6, pp. 535543, 574-576, 1946. 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. 49. Sutherland, J.W., "Analysis of Mechanical Draught Counterflow Air/Water Cooling Towers", Journal of Heat Transfer, Vol. 105, pp. 576-583, 1983. 50. Threlkeld J.L., Thermal Environmental Engineering, Prentice-Hall, New York, Second Edition, 1970. 51. "TRACE Documentation Manual," TRANE Company, LaCrosse, WI54601. 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. 55. Wiesner, F.J., "Practical Stage Correlations for Centrifugal Compressors", ASME Transactions, Gas Turbine Power and Hydraulic Conference, Houston, Texas, March 6-9, 1960, Paper No. 60-HYD- 17. 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

James Edward Braun

Solar Energy Laboratory University of Wisconsin-Madison 1500 Johnson Drive

Madison, WI 53706-1687 USA

Programs for Modelling and Optimizing the Performance of Central Chilled Water Systems

James Edward Braun Solar Energy Laboratory UNIVERSITY OF WISCONSIN- MADISON 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

Section 1 Chiller Models

1.0

Section 2 Cooling Tower and Coil Models

2.0

Section 3 Component-Based Optimization Program

3.0

Section 4 Dynamic Optimization Program

4.0

Section 5 Utility Routines

5.0

Section 1 Chiller Models

Chiller Performance This program computes the performance (e.g., motor power consumption and compressor speed) of variable-speed centrifugal chillers given the flow stream conditions and cooling load requirement as outlined in Chapter 2. In addition to the routines listed in this section, this program utilizes two utility subroutines (SOLVER and FREON) that are listed in Section 5.

1.1

Chiller Capacity This program computes the cooling capacity based upon the compressor power input for variable-speed centrifugal chillers as outlined in Chapter 2. In addition to the routines listed in this section, this program utilizes two utility subroutines (SOLVER and FREON) that are listed in Section 5.

1.15

Chiller Surge Point This program estimates the minimum speed and cooling load associated with the onset of surge for variable-speed centrifugal chillers as outlined in Chapter 2 In addition to the routines listed in this section, this program utilizes two utility subroutines (SOLVER and FREON) that are listed in Section 5.

1.28

-1.0-

cnlbf;tin

(Chillpr Pprf rmn~nep

I

C

PROGRAM FOR CALCULATING THE PERFORMANCE OF A SINGLE OR DOUBLE-STAGE

C

CENTRIFUGAL CHILLER. FOR A TWO-STAGE MACHINE, THERE IS ALSO AN OPTION FOR

C

A FLASH GAS ECONOMIZER.

C

LOAD REQUI.REMENTS,

C

SPEED, ETC.

C

UNITS THAT ARE COMMON WITHIN THE HVAC INDUSTRY

C

ANALYSIS IS DESCRIBED IN CHAPTER 2 OF "METHODOLOGIES FOR DESIGN AND CONTROL*

C

OF CENTRAL COOLING PLANTS",

C C

WISCONSIN

-

THE INPUTS ARE FLOW STREAM CONDITIONS AND COOLING

WHILE OUTPUTS INCLUDE POWER CONSUMPTION,

THE UNITS UTILIZED WITHIN THIS PROGRAM ARE TYPICAL ENGLISH

BRAUN,

J.E.

(BTU'S, TONS, KW).

PH.D THESIS,

THE

UNIVERSITY OF

MADISON, 1988

*

EXTERNAL EVAPCHILLER DOUBLE PRECISION X(5),F(5),W(5,5),DIFF(5),TOL /DATA/

PAR(10),XIN(7),OUT(19),ISTAGE, IECON, IREF

DATA TOL/I.E-05/,DIFF/5*0.001/,PI/3.1415/ C

PARAMETER(CPW=I.,

DENS=8.3333)

PARAMETER(AEI=11300., DIAC=.75/12., C1=103.,

IECON=2)

ISTAGE=2,

PARAMETER(IREF=500,

ACI=14800.,

REO=3.1,

RCO=3.1,

DIAE=.75/12.,

NEPASS=3, NETUBE=3560, NCPASS=1, NCTUBE=3349,

C2=1.1, NVERT=1,

BETA=27.2, RIMP=1.1667,

RPE=2.E-04, RPC=2.E-04, AX=1.53,

EFFREF=0.814, EFFMOT=0.91)

C C

PROGRAM DATA DEFINED WITHIN THE ABOVE PARAMETER STATEMENTS:

C REFRIGERANT TYPE (12,

22,

500, ETC)

C

IREF

=

C

ISTAGE

= NUMBER OF COMPRESSION STAGES

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

=

C

ACI

=

EFFECTIVE INSIDE SURFACE AREA OF EVAPORATOR TUBES (FT**2) EFFECTIVE INSIDE SURFACE AREA OF CONDENSOR TUBES (FT**2)

C

REO

=

RATIO OF EFFECTIVE OUTSIDE EVAPORATOR TUBE SURFACE AREA

RCO

=

RATIO OF EFFECTIVE OUTSIDE CONDENSER TUBE SURFACE AREA

(1 OR 2)

INCLUDING FINS AND FIN EFFICIENCY TO INSIDE AREA

C

C

*

COMPRESSOR

C

COMMON

*

-1.1-

L~ IQ~rftin1 t IV

I I

I

ihrP~frruae Chiller Perfnrmanep

a a a a a%-&-& %-aa %-V a a a a La a l%_lw_

L

INCLUDING FINS AND FIN EFFICIENCY TO INSIDE AREA (FEET)

C

DIAE

= EVAPORATOR TUBE DIAMETER

C

DIAC

= CONDENSER TUBE DIAMETER

C

NETUBE

= NUMBER OF EVAPORATOR TUBES

C

NEPASS

= NUMBER OF EVAPORATOR TUBE PASSES

C

NCTUBE

= NUMBER OF CONDENSER TUBES

C

NCPASS

= NUMBER OF CONDENSER TUBE PASSES

C

CIC2

= EMPIRICAL CONSTANTS FOR BOILING HEAT TRANSFER

(FEET)

COEFFICIENT

C C

NVERT

= NUMBER CONDENSER TUBES IN A VERTICAL LINE

C

RPERPC

= EVAPORATOR AND CONDENSER TUBE WALL RESISTANCE (FT**2-F/BTU)

C

(FT**2)

C

AX

= EXIT AREA OF COMPRESSOR IMPELLER

C

BETA

=

C

RIMP

= COMPRESSOR IMPELLER RADIUS

C

EFFREF

= REFERENCE POLYTROPIC EFFICIENCY

C

EFFMOT

= COMPRESSOR DRIVE MOTOR EFFICIENCY

IMPELLER BLADE ANGLE

(DEGREES) (FEET)

C C

THE VALUES DEFINED ABOVE ARE REPRESENTATIVE OF THE PRIMARY CHILLER AT

C

THE DALLAS/FORT WORTH AIRPORT.

C **

C

OPEN FILES FOR DATA INPUT AND OUTPUT **

C OPEN (10, FILE='CHILLER.DAT' , STATUS='OLD') OPEN(11,FILE='CHILLER.OUT' , STATUS='NEW') WRITE (11, 101) C C

**

LOOP FOR VARYING INPUT DATA

**

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

C

TCHWS

=

CHILLED WATER SETPOINT

(DEGREES

F)

C

TCWR

=CONDENSOR WATER RETURN

(DEGREES

F)

C

-

1.2-

(GAL/MIN)

Chiller Performance

Section 1 **

C

PRELIMINARIES

**

C C

CALCULATE THE MASS FLOW RATE FROM THE GPM AND THE LOAD RETURN

C

TEMPERATURE FROM THE CHILLER LOADING (LBM/HR)

C

FLCHW

= CHILLED WATER FLOW RATE

C

FLCW

= CONDENSER WATER FLOW RATE(LBM/HR)

C

TCHWR

= CHILLED WATER RETURN TEMPERATURE

(DEGREES F)

C FLCHW=60. *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.

C

COMMUNICATED THROUGH THE COMMON BLOCK "DATA".

C

EVAPORATOR HEAT TRANSFER COEFFICIENT

PARAMETERS, INPUTS, AND OUTPUTS ARE HEI IS THE INSIDE

(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

Chillarr i rI

I Crj%19tn

l94:1|ull1N'uIta

r,m ....

1 IVJI Iialu

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:

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,

C

THE COMMON BLOCK "DATA".

INPUTS,

THE REFRIGERANT

AND OUTPUTS ARE COMMUNICATED THROUGH

C C

SET-UP PARAMETERS FOR ANALYSIS: IS A CONSTANT FOR EVALUATING THE HEAT TRANSFER COEFFICIENT FOR

C

C3

C

CONDENSATION ON THE CONDENSER TUBES.

C PAR(1) =ACI PAR (2) =RCO*ACI HCI=1.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(5) =C3 PAR (6)=AX PAR(7) =0. IF(ABS(BETA-90.).GT.1.E-06) PAR(7)=./TAN(PI*BETA/180.) PAR (8) =EFFREF PAR(9) =EFFMOT PAR(10)=RIMP C C

EVALUATE PROPERTIES AT COMPRESSOR INLET FROM RESULTS OF EVAPORATOR

C

ANALYSIS

C CALL FREON(TE,PI,HS1,1I.,V1,UIREF,15) OUT ( 8) =P 1 C C

INPUTS AND INITIAL GUESSES FOR ITERATION VARIABLES

C

-

1.4

-

I

Cait;nn

I

-

C7~.LIII

C hiller Pprfnrm _nep A II .a I

L

XIN (1) =FLCW XIN (2)=TCWR XIN (3)=12000. *QEVAP XIN(4) =P1 XIN(5) =VI XIN(6)=HI XIN(7)=Sl C X (1) =TCWR+10. X(2) =0.25 X(3)=350. C NUMBER OF VARIABLES DEPENDS UPON WHETHER SINGLE OR

C

EQUATION SOLVER:

C

TWO-STAGE COMPRESSION.

C IF(ISTAGE.EQ.1) THEN CALL SOLVER(3,DIFF, X,F,W, CHILLER, TOL) ELSE OUT (18) =OUT (15) X(4)=0.25 CALL FREON(TCWR+10.,P2,H3,S3,0.,V3,U3,

IREF, 15)

X(5)=(PI+P2) /2. CALL SOLVER (5, DIFF, X, F, W, CHILLER, TOL) ENDIF C C

**

OUTPUT DETAILED RESULTS AND COMPARISONS TO FILE

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) WRITE(11,103)

THEN (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 .....

I

!.t,.tlj)ll

,

a



l IV Illilll,

C

CHILLER MODEL

101

FORMAT(///10X,'**********

102

FORMAT(//2X, '****************************** INPUT DATA '*************************',//2X,'FLCHW, FLCW =' 2(1XF8.2)/2X,'TCHWS,

103

TCHWR, TCWS,

**********')

TCWR = '4(1XF6.2))

FORMAT(//2X,'** ENERGY QUANTITIES **',//2X,'QEVAP 'QCOND *

=

//2X,'**

',F8.2/2X, 'ELEC

'F8.2/2X,'QCOMP-=

*****'

=

',F8.2/2X,

- 'F8.2

DETAILED RESULTS **'l,//2X,

'TE, TC, T2, P1, P2,

RPM

=

',6(IX,F7.2)/2X,

'COP, PHIX, NPOL, EFF = ',4(IX,F6.3)/2X, 'UAE, UAC = 104

',2(IX,1PE11.3))

FORMAT(//2X,'** ENERGY QUANTITIES

**',//2X,'QEVAP

'QCOND = ',F8.2/2X,'QCOMP - 'F8.2/2X, 'ELEC .

//2X,'**

',F8.2/2X,

',F8.2

DETAILED RESULTS **',//2X,

'TE, TC, T2, P1, P2, UX 'COP, PHIXI, NPOL1, EFF1 'PHIX2, NPOL2, 'UAE, UAC

=

=

=

EFF2

',6(IXF7.2)/2X,

= =

',4(IXF6.3)/2X,

-- '3(1XF6.3)/2X,

',2(1X,1PE11.3))

END C SUBROUTINE EVAP (NEQ,X, F) C

C

*

C

THIS SUBROUTINE MODELS THE PERFORMANCE OF AN EVAPORATOR. THE EQUATION

*

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

UA-LOG MEAN TEMPERATURE DIFFERENCE AND THE ENTHALPY DIFFERENCE OF THE

*

C

CHILLED WATER STREAM.

*

C

*

DOUBLE PRECISION X,F COMMON /DATA/ PAR(10),XIN(7),OUT(19),ISTAGE, IECON, IREF

AEI=PAR (1) AEO=PAR (2) HEI=PAR (3)

-1.6

-

.,p,-titin .,,VUI

Chiller Perfnrminep I -hir P .fnrminc.

I-RPE=PAR (4) C1=PAR (5) C2=PAR (6)

TCHWS=XIN (2) TCHWR=XIN (3) QEVAP=XIN (4)

TE=X

UAI IS THE CONDUCTANCE ASSOCIATED WITH THE WATER FLOW AND PIPE

C C

MATERIAL

C

CONDUCTANCE,

C

HEAT TRANSFER COEFFICIENT

C

TEMPERATURE AT THE SURFACE OF THE TUBE.

(PLUS FOULING FACTOR).

UAE IS THE OVERALL EVAPORATOR

INCLUDING THAT ASSOCIATED WITH THE REFRIGERANT BOILING (HEO). TFILM IS THE REFRIGERANT FILM

C UAI=AEI/ (1. /HEI+RPE) TW= (TCHWS+TCHWR) /2. TFILM=TW-QEVAP/UAI DT=AMAXl (TFILM-TE, 0 .1) HEO=C*

(DT) **C2

UAE=1./ (1./UAI+1./HEO/AEO) IF(TE.LT.TCHWS) THEN XLMTD= ( (TCHWR-TE) - (TCHWS-TE)) /ALOG ( (TCHWR-TE) / (TCHWS-TE)) ELSE XLMTD=TW-TE ENDIF C

C

** FUNCTION FOR EQUATION SOLVER **

C F=QEVAP -UAE *XLMTD

C C

** OUTPUTS

**

C OUT (5) =TE OUT (15) =UAE

RETURN END

-1.7-

Ci~hllr ar

1

C'~L!...

7*.ectioni

pu

I-p

U I i-

fnr.......v I'J

al

SUBROUTINE CHILLER (NEQ, X, F) C *

c*

C

C

THIS SUBROUTINE IS CALLED AT EACH ITERATION OF THE EQUATION SOLVER TO EVALUATE THE COMPRESSOR AND CONDENSER PERFORMANCE. THROUGHOUT THE PROGRAM

C

T, P,

C

VOLUME,

C

STATES ARE:

C

V, H, AND S REFER TO REFRIGERANT TEMPERATURE, PRESSURE, SPECIFIC, SPECIFIC ENTHALPY, AND SPECIFIC ENTROPY FOR A GIVEN STATE.

* * * *

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:

C

STATE 3V: VAPOR STATE WITHIN ECONOMIZER

C

STATE 4:

LIQUID STATE WITHIN ECONOMIZER

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 -

**

I .qpvtinn IlIVII'LuMI nf 1 x

Chillpr Parfnrinnn"i-ja I I / -.IIUlaItII.

Iowi.tli

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

=

C

UX

= THE IMPELLER TIP SPEED

C

THE COMPRESSOR DIMENSIONLESS FLOW COEFFICIENT

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

C

PRESENT.

ALSO DETERMINE

VALVE(S)

REFRIGERANT

-

AND

FLOW RATES

1.9

-

ECONOMIZER,

IF

FOR EVAPORATOR

(FLi)

~.qtin 1 C

irh illpr 1P,,...vP .......

AND CONDENSER

(FL2).

C CALL FREON(TCNDP2,H3,S3,O.,V3,U3,IREF,15) IF(ISTAGE.EQ.2

.AND. IECON.EQ.2) THEN

H3A=H3 CALL FREON(T3A, P1A, H3A, S3A, X3A, V3A, UDUM, IREF, 23) CALL FREON(T3A,1PIA, H3L, S3L,0.,V3L, UDUM, IREF, 25) CALL FREON(T3AP1A,H3V, S3V, 1.,V3VtUDUM, IREF, 25) H4=H3L FL1=QEVAP/ (HI-H4) FL2=FL1/(1.-X3A) ELSE H4=H3 FL1=QEVAP/ (HI-H4) FL2=FL1 ENDIF C

C

**

COMPRESSOR STAGE(S)

**

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_.....

Necuion ii

C~h~

I

-"~

CALL FREON(T1A, P1A, HIA, SIA, X1A,V1A, UDUM, IREF, 23) IF(IECON.EQ.2) THEN H2A=X3A*H3V+(1.-X3A) *H1A CALL FREON (T2A, PlA, H2A, S2A, X2A, V2A, UDUM, IREF, 23) ELSE T2A=TlA H2A=HIA S2A=SlA V2A=V1A ENDIF HX2=H2A+(MU2-0.5*MU2*MU2-0.5*PHIX2*PHIX2) *UX*UX/32.2/778. HX2=AMAX1 (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 NEXP1=ALOG (P1/P2) /ALOG (V2/VI) XPON1= (NEXPi-1.) /NEXP1 ELSE NEXP1=ALOG (P1/PlA) /ALOG (VIA/V1)

NEXP2=ALOG (PIA/P2) /ALOG (V2/V2A) XPON1= (NEXPI-1.) /NEXP1 XPON2= (NEXP2-1.) /NEXP2 END IF C **

C

CONDENSER **

C C

QCOND

=

CONDENSER HEAT REJECTION

C

UAI

=

CONDUCTANCE ASSOCIATED WITH THE WATER FLOW AND PIPE MATERIAL

C

(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

-

1.11

-

pIIlaeD-.g %......a

01 )CcntIu

.:,W

('h;llpr Pprfnrrnnn,,n a

tI I

.-

.uu

i

1 ,l

CALL FREON(TCNDP2,H2V, S2V, 1.,V2V,UDUM, IREF, 15) QCOND=FL2 * (H2-H3) TCWS=TCWR-QCOND / FLCW/CPW UAI=ACI/ (I./HCI+RPC) TW= (TCWS+TCWR)/2. TF I LM=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./ (I./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

**

C INDEPENDENT VARIABLES

C

THE EQUATION SOLVER ITERATIVELY SOLVES FOR THE

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 -

lla

lllu

"

Chiller Performnnep

Qa,-tinn I vI

I,|l;~n 1

.h..l.r

P '1'rIfIirn lllnc%.

OUT (9) =P2 OUT (10) =60. *UX/RIMP/2./Pi 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 ENDIF RETURN END C SUBROUTINE PROP (IREF,T,A0,COND,VISC) C *

C C

THIS SUBROUTINE DETERMINES PHYSICAL PROPERTIES FOR REFRIGERANTS R500,

C

OR R12.

R22,

* *

THE ARGUMENTS ARE:

*

C C

IREF

= REFRIGERANT TYPE

C

T

= REFRIGERANT

C

AO

=

C

COND

= THERMAL CONDUCTIVITY

C

VISC

= VISCOSITY

TEMPERATURE

SONIC VELOCITY

OR 12)

*

(DEGREES F)

*

(500, 22,

*

(FT/SEC) (BTU/HR-FT-F)

* *

(LBM/FT-HR)

*

C C IF(IREF.EQ.500) A0-490. COND=0 .053-0.

VISC=0

.6851-3.

THEN 000127"T

2943E-03*T+6. 443E-06*T*T

END IF IF(IREF.EQ.22)

THEN

AO=534.

-1.13-

Q

^ 1^61: dArib

3-ection

Chillpr Pprfhrm-an,,n

I

COND=0.063-0-000159*T

VISC=0.6507-2.5943E-03*T+5.6101E-06*T*T ENDIF

b

cQae4;en aJcx.L5'JU

I

I

C-anni,;tv ('hillpr "

-I

I

I%-"

-dILI

C

C

A PROGRAM FOR CALCULATING THE COOLING CAPACITY BASED UPON A SPECFIED

*

C

POWER INPUT REQUIREMENT FOR A SINGLE OR DOUBLE-STAGE CENTRIFUGAL CHILLER.

*

C

FOR A TWO-STAGE MACHINE, THERE IS ALSO AN OPTION FOR A FLASH GAS

*

C

ECONOMIZER.

C

WHILE OUTPUTS INCLUDE COOLING CAPACITY, COMPRESSOR SPEED, ETC.

C

UTILIZED WITHIN THIS PROGRAM ARE TYPICAL ENGLISH UNITS THAT ARE COMMON

C

WITHIN THE HVAC INDUSTRY (BTU'S, TONS,

C

CHAPTER 2 OF "METHODOLOGIES FOR DESIGN AND CONTROL OF CENTRAL COOLING

C

PLANTS", J.E.

THE INPUTS ARE FLOW STREAM CONDITIONS AND POWER REQUIREMENT,

KW).

THE UNITS

THE ANALYSIS IS DESCRIBED IN

BRAUN, PH.D THESIS, UNIVERSITY OF WISCONSIN -

MADISON, 1988

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., DIAC=.75/12.,

ACI=14800., REO=3.1, RCO=3.1, DIAE=.75/12.,

NEPASS=3,

C1=103., C2=1.1,

NETUBE=3560, NCPASS=I, NCTUBE=3349,

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 PROGRAM DATA DEFINED ABOVE:

C 22,

500,

C

IREF

= REFRIGERANT TYPE (12,

C

ISTAGE

= NUMBER OF COMPRESSION STAGES

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

C

* * * *

*

C

C

*

ACI

=

ETC) (1 OR 2)

EFFECTIVE INSIDE SURFACE AREA OF CONDENSOR TUBES

-1.15-

(FT**2) (FT**2)

I

cat

C

'

1nn

Chillpr Cnnq.v;tv

REO

=

INCLUDING FINS AND FIN EFFICIENCY TO INSIDE AREA

C C

RATIO OF EFFECTIVE OUTSIDE EVAPORATOR TUBE SURFACE AREA

= RATIO OF EFFECTIVE OUTSIDE CONDENSER TUBE SURFACE AREA

RCO

INCLUDING FINS AND FIN EFFICIENCY TO INSIDE AREA

c

(FEET)

C

DIAE

= EVAPORATOR TUBE DIAMETER

C

DIAC

= CONDENSER TUBE DIAMETER

C

NETUBE

= NUMBER OF EVAPORATOR TUBES

C

NEPASS

= NUMBER OF EVAPORATOR TUBE PASSES

C

NCTUBE

= NUMBER OF CONDENSER TUBES

C

NCPASS

= NUMBER OF CONDENSER TUBE PASSES

C

CIC2

= EMPIRICAL CONSTANTS FOR BOILING HEAT TRANSFER

(FEET)

COEFFICIENT

C C

NVERT

= NUMBER CONDENSER TUBES IN A VERTICAL LINE

C

RPE,RPC

= EVAPORATOR AND CONDENSER TUBE WALL RESISTANCE (FT**2-F/BTU)

C C C

AX BETA

= EXIT AREA OF COMPRESSOR IMPELLER (FT**2) - IMPELLER BLADE ANGLE (DEGREES)

C

RIMP

= COMPRESSOR IMPELLER RADIUS

C

EFFREF

= REFERENCE POLYTROPIC EFFICIENCY

C

EFFMOT

= COMPRESSOR DRIVE MOTOR EFFICIENCY

(FEET)

C C

THE VALUES DEFINED ABOVE ARE REPRESENTATIVE OF THE PRIMARY CHILLER AT

C

THE DALLAS/FORT WORTH AIRPORT.

C **

C

OPEN FILES FOR DATA INPUT AND OUTPUT **

C OPEN (10, FILE= 'CAPACITY. DAT', STATUS= 'OLD') OPEN(11,FILE='CAPACITY.OUT',STATUS='=NEW') WRITE(11,101) C C C 10

**

READ (10,

',END=100)

LOOP FOR VARYING

INPUT DATA **

POWER, GPMCHW, GPMCW, TCHWS, TCWR

c c C INPUT DATA

IS:

C

POWER

=

C

GPMCHW

=

COMPRESSOR MOTOR POWER INPUT (KW) CHILLED WATER FLOW RATE (GAL/MIN)

- 1.16-

Xt: -N" CA. ,I,3e 1 i o

C'hillar 1

1 I

-

'-

-TER FLOW RATE

.uu u ' . l ' ,

n

.

. :,x

.l

.

(GAL/MIN)

C

GPMCW

= CONDENSC

C

TCHWS

= CHILLED

:-ER SETPOINT

(DEGREES F)

C

TCWR

= CONDENSOR WATER RETURN

(DEGREES F)

C **

C

**

PRELIMINARIES

C C

CALCULATE THE MASS FLOW RATE FROM THE GPM

C

FLCHW

C

FLCW

- CHILLED WATER FLOW RATE

(LBM/HR)

= 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:

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.

C

AND OUTPUTS ARE COMMUNICATED THROUGH THE COMMON BLOCK "DATA".

THE REFRIGERANT EVAPORATOR TEMPERATURE, REFRIGERANT

PARAMETERS, INPUTS,

C C

SET-UP PARAMETERS FOR ANALYSIS: (TURBULENT FLOW)

C

HEI

= INSIDE EVAPORATOR HEAT TRANSFER COEFFICIENT

C

HCI

= INSIDE CONDENSER HEAT TRANSFER COEFFICIENT

C

C3

= CONSTANT FOR EVALUATING THE HEAT TRANSFER COEFFICIENT FOR

C

CONDENSATION ON THE CONDENSER TUBES.

C PAR(1) =AEI PAR(2) =REO*AEI

HEI=. *37* (NEPASS*GPMCHW/NETUBE)

**Q0.8*DIAE**-I. . 8

PAR (3) =HEI PAR (4) =RPE PAR (5 ) =CI. PAR( 6 )=C2

-

1.17

-

(TURBULENT FLOW)

,

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 NUMBER OF VARIABLES DEPENDS UPON WHETHER SINGLE OR

C

EQUATION SOLVER:

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,

-1.18-

IREF, 15)

rh;1lar

.... ,..., k1

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

C

WATER SUPPLY TEMPERATURE

(TCHWR) AND CONDENSOR

(TCWS)

C TCHWR=TCHWS+OUT (1) *12000./FLCHW/CPW TCWS=TCWR-OUT (2) *12000

./FLCW/CPW

GPMCHW, GPMCW, TCHWS, TCHWR, TCWS, TCWR

WRITE (11, 102)

THEN

IF(ISTAGE.EQ.1) WRITE(11,103)

(OUT(I),I=l,16)

ELSE WRITE(II,104)

(OUT(I),I=1,19)

ENDIF GO TO 10 100

CONTINUE STOP

C CHILLER MODEL

**********')

101

FORMAT(///21X,'**********

102

FORMAT(//2X, '******************************

INPUT DATA

•*************************I//2Xf'FLCHW, FLCW 2(1xF8.2)/2X,'TCHWS,

TCHWR, TCWS,

FORMAT(//2X,'** ENERGY QUANTITIES

103

'QCOND =

'TE,

e

',4(IXF6.2))

**I,//2X,'QEVAP=

'fF8.2/2X,'ELEC

'F8.2/2X,'QCOMP-=

1I/2X,'**

TCWR =

*****'

=

=

',F8.2/2X,

',F8.2

DETAILED RESULTS **',/12X, T2,

TC,

P1,

RPM

P2,

',6(1XF7.2)/2X,

=

'COP, PHIX, NPOL, EFF = ',4(IXF6.3)/2X, UAC

'UAE, 104

=

'2(1X,1PE11.3))

FORMAT(//2X,'** ENERGY QUANTITIES **I//2X,'QEVAP

* 'QCOND

',F8.2/2X,'QCOMP

=

* 'TE,

TC,

* 'COP, 'PHIX2,

* 'UAE,

',F8.2/2X,'ELEC

DETAILED RESULTS **',//2X,

//2X, '**

*

=

NPOL1,

PHIXI, NPOL2,

UAC

=

RPM

=

',6(IX, F7.2)/2X,

EFFI

=

',4(IX, F6.3)/2X,

P1, P2,

T2,

EFF2

=

',3(1XF6.3)/2X,

',2(IXIPEII 3))

END

-1.19-

=

=

',F8.2/2Xf

',F8.2

lqptiln

Chillpr

I

'n n

,.,,t.

SUBROUTINE CHILLER (NEQ, X, F) C

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

C

REFER TO REFRIGERANT TEMPERATURE, PRESSURE,

C

ENTHALPY, AND SPECIFIC ENTROPY FOR A GIVEN STATE.

SPECIFIC, VOLUME, SPECIFIC STATES ARE:

C C

STATE 1:

ENTERING COMPRESSOR FIRST STAGE

C

STATE 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

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

-

S

lpetinna 1

C hillpr ("n ne~tv

AL

4 a Is

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: EVAPORATOR REFRIGERANT

TEMPERATURE

C

TE

=

C

TCND

= THE CONDENSING REFRIGERANT

C

PHIXl = THE COMPRESSOR DIMENSIONLESS FLOW COEFFICIENT

C

UX

= THE

TEMPERATURE

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) PHIX2=X(5)

THEN

PHIX2=AMAXl. (0 .001I, AMINI (PHIX2, 1.0) ) P2.A=X (6) END IF

-

1.21-

w4w a

%-

Q

Lt"-%.,

AV V

Qatdfi

nn

6MU.LVlI

I

.1 V.

(Nb.11

"

-,

**

C

EXPANSION VALVE AND ECONOMIZER **

C C

DETERMINE PROPERTIES FOR EXPANSION VALVE(S) AND ECONOMIZER, IF

C

PRESENT.

C CALL FREON(TE,P1,H1,S1,I.,V1,UlfIREF, 15) CALL FREON(TCNDP2,H3,S3,0.,V3,U3,IREF, 15) IF(ISTAGE.EQ•2

.AND. IECON.EQ.2)

THEN

H3A=H3 CALL FREON(T3AP1A,H3A, S3AX3AV3AUDUM, IREF,23) CALL FREON(T3AP1A,H3LS3LO.,V3LUDUMIREF,25) CALL FREON (T3A, PIA, H3V, S3V, 1. ,V3V,UDUM,

IREF, 25)

H4=H3L ELSE H4=H3 ENDIF C

C

**

COMPRESSOR STAGE(S)

**

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

-

(nnar~t

-

ulI

Ipetion 1 rmm a

Chillpr

Jkm,

v . ,

m',, m

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 C

MATERIAL (PLUS FOULING FACTOR). UAE IS THE OVERALL EVAPORATOR CONDUCTANCE, INCLUDING THAT ASSOCIATED WITH THE REFRIGERANT BOILING

C

HEAT TRANSFER COEFFICIENT

C

TEMPERATURE AT THE SURFACE OF THE TUBE. ALSO DETERMINE REFRIGERANT

C

FLOW RATES FOR EVAPORATOR

(HEO) .

(FLI)

TFILM IS

THE REFRIGERANT FILM

AND CONDENSER

-

1.23

-

(FL2).

'anneiltv (4 ,.rq4

4Zpt;nn -7

.1

1

Chiller %., a -a-

C .AND. IECON.EQ.2)

IF(ISTAGE.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 MATERIAL

C

(PLUS FOULING FACTOR),

C

TFILM = CONDENSING FILM TEMPERATURE AT THE TUBE SURFACES,

C

UAC

C

= OVERALL CONDUCTANCE INCLUDING THAT ASSOCIATED WITH THE 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

-

v "Cannit gualwI

iC nq-itv Chiller a 9 %W At -T

Rpetiln IJL I la

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

OUT (11) =EFFMOT*OUT (1) /OUT (3) OUT (12) =PHIXl

-

1.25

-

IRctinn

1

LI

Chillpr rnnneitv

~L;

eIlI-

1

Jl

vi

t

v

OUT (13) =NEXP 1 OUT (14) =EFF1 OUT (15) =UAE OUT (16) =UAC IF(ISTAGE.EQ.2) THEN OUT (15) =PHIX2 OUT (16) =NEXP2 OUT (17) =EFF2 OUT (18) =UAE OUT (19) =UAC END IF RETURN END C SUBROUTINE PROP (IREF,T,A0,CONDVISC) C ***********

******************

*********************************************

C

*

C

THIS SUBROUTINE DETERMINES PHYSICAL PROPERTIES FOR REFRIGERANTS R500, R22,

C

OR R12.

THE ARGUMENTS ARE:

*

C C

IREF

= REFRIGERANT TYPE

C

T

= REFRIGERANT TEMPERATURE

C

AO

=

SONIC VELOCITY (FT/SEC)

C

COND

=

THERMAL CONDUCTIVITY

C

VISC

=

VISCOSITY

(500, 22,

OR 12)

(DEGREES F)

(BTU/HR-FT-F)

(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

3ectl()tj

('h;llpr Canan;fv

I

L

'1,11111CI

IF (IREF. EQ. 12)

THEN

AO=446. COND=0.049-0.000117*T VISC=0.763-3.8905E-03*T+9.881E-06*T*T ENDIF RETURN END IF (IREF. EQ. 12)

THEN

AO=446. COND=0.049-0.000117*T VISC=0.763-3.8905E-03*T+9.881E-06*T*T ENDIF RETURN END

"kdLJdljtV

q,,tinn I

C'hillpr S,,rop

*

C C

PROGRAM FOR ESTIMATING THE SURGE POINT FOR A SINGLE OR DOUBLE-STAGE

*

C

CENTRIFUGAL CHILLER. FOR A TWO-STAGE MACHINE, THERE IS ALSO AN OPTION FOR

*

C

A FLASH GAS ECONOMIZER.

C

OUTPUTS INCLUDE THE COOLING LOAD,

C

ASSOCIATED WITH THE SURGE CONDITIONS.

C

PROGRAM ARE TYPICAL ENGLISH UNITS THAT ARE COMMON WITHIN THE HVAC INDUSTRY

C

(BTU'S, TONS,

C

"METHODOLOGIES FOR DESIGN AND CONTROL OF CENTRAL COOLING PLANTS", J.E.

*

C

BRAUN, PH.D THESIS, UNIVERSITY OF WISCONSIN - MADISON, 1988

*

THE INPUTS ARE FLOW STREAM CONDITIONS, WHILE POWER CONSUMPTION, AND COMPRESSOR SPEED THE UNITS UTILIZED WITHIN THIS

THE ANALYSIS IS DESCRIBED IN CHAPTER 2 OF

KW).

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

=

IECON

= 2

2

C PROGRAM DATA DEFINED ABOVE:

C C

IREF

= REFRIGERANT TYPE (12, 22, 500, ETC)

C

ISTAGE

=

NUMBER OF COMPRESSION STAGES

C

IECON

=

1 FOR NO ECONOMIZER, 2 FOR ECONOMIZER

C

CPW

= SPECIFIC HEAT OF WATER

C

DENS

=

DENSITY OF WATER

(1 OR 2)

(BTU/LBM-F)

(LBM/GAL)

C

C

**

OPEN FILES FOR DATA INPUT AND OUTPUT

C =

' OLD ')

OPEN (10, FILE= 'SURGE. DAT ' ,STATUS

OPEN (11,FILE=' SURGE .OUT'

,

STATUS='NEW')

WRITE (11, 101) C

C

* * * *

*

C

C

*

**

LOOP FOR VARYING INPUT DATA

-

1.28

-

**

**

Qaritn

LJ-V~lyf

1

.'Riirap, Chillpr tJLU UU rA

x."1,-0

C 10

READ(10, *,END=100)

QMINQMAXGPMCHWGPMCWTCHWSTCWR

C C INPUT DATA IS: C

QMIN

= LOWER LIMIT ON CHILLER EVAPORATOR LOAD

(TONS)

C

QMAX

= UPPER LIMIT ON CHILLER EVAPORATOR LOAD

(TONS)

C

GPMCHW

= CHILLED WATER FLOW RATE

C

GPMCW

= CONDENSOR WATER FLOW RATE (GAL/MIN)

C

TCHWS

= CHILLED WATER SETPOINT

C

TCWR

= CONDENSOR WATER RETURN (DEGREES F)

(GAL/MIN)

(DEGREES F)

** DETERMINE MINIMUM COMPRESSOR SPEED **

THE MINIMUM COMPRESSOR SPEED IS DETERMINED USING AN OPTIMIZATION SCHEME CALLED GOLDEN SECTION SEARCH.

STORE INITIAL GUESSES FOR ITERATION VARIABLES

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

-

Chiller Snrgp

.qpctiona 1 C

h

LOOP TO FIND MINUMUM SPEED BY VARYING CHILLER COOLING LOAD

C 20

EPS-AMAX1(.05,QLAST*0.001) GOTO 50

IF(STEP.LT.EPS)

STEP=STEP*GOLD IF(UX1.GT.UX2)

THEN

TEMP=Q1

QI=Q2 UX1=UX2 Q2=TEMP+STEP UX2 = SPEED (GPMCHW,GPMCW, TCHWS, TCWR, Q2, TCHWR) QLAST=Q2 ELSE TEMP=Q2

Q2=QI UX2=UX1 Q1=TEMP-STEP UX1

=

SPEED (GPMCHW,GPMCW, TCHWS, TCWR, QI, TCHWR)

QLAST=Q1 ENDIF GO TO 20 50

CONTINUE

C C

INCREASE SPEED BY 50 RPM

C UX1=OUT (10) RIMP=PAR (10) RPM=60.*UX1/RIMP/2./PI + 50. UX=2. *P I *RIMP*RPM/60. Q1=OUT (1)

Q2=1.5*QI ITER=0 60

ITER=ITER+I UX2 = SPEED (GPMCHW, GPMCW, TCHWS, TCWR, Q2, TCHWR) DUX= (UX2-UJXl) I (Q2-Q1) QI=Q2 UX1=UX2

Q2=Q2 + (UX-UX2)/IDUx IF(ABS(UX-UX2).GT.0.1

.AND.

ITER.LT.10)

-

1.30

-

GO TO 60

a-

L-,A S .I

hiilr ALIr5 Rira

1

Q e;,z _ll'JEIt

C **

C

OUTPUT DETAILED RESULTS AND COMPARISONS TO FILE

**

C C

COMPUTE THE CONDENSOR WATER SUPPLY FLOW AND TEMPERATURE

C

COMPRESSOR RPM

(TCWS) AND

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 CHILLER MODEL

**********')

101

FORMAT(///21X, '**********

102

INPUT DATA FORMAT(//2X, '****************************** '*************************I//2X,'FLCHW, FLCW =' 0

TCHWR, TCWS,

TCWR =

',4(1X,F6.2))

FORMAT(//2X,'** ENERGY QUANTITIES **I,//2X,'QEVAP=

103

104

2(1X,F8.2)/2X,'TCHWS,

0

'QCOND = ',F8.2/2X,'QCOMP

0

//2X,'**

a

'TE, TC,

0

'COP, PHIX, NPOL, EFF

0

'UAE, UAC

- ',F8.2/2X,'ELEC

DETAILED RESULTS **',//2X, RPM= ',6(1X,F7.2)/2X,

T2, P1, P2,

=

=

',4(1X,F6.3)/2X,

'2(1X,IPE11.3))

',F8.2/2X,'ELEC 'QCOND = ',F8.2/2X,'QCOMP//2X, '** DETAILED RESULTS **',//2X,

*

* 'TE, TC, T2, P1, P2, RPM

=

',6(IX, F7.2)/2X,

* 'COP, PHIXl, NPOL1, EFFI

=

:',4(IX, FE.3)/2X,

'PHIX2, NPOL2, EFF2

*

* 'UA.E, UAC

',F8.2/2X,

- ',F8.2

FORMAT(//2X,'** ENERGY QUANTITIES **',//2X,'QEVAP0

*

=

=

',3(IX, F6.3)/2X,

',2(IXIPE1I.3))

END

-1.31-

=

',F8.2/2X, ',F8.2

C!4..^J.:Af., t

Chiller

1

I.UII

!.,--,... I

,l

,,mop

FUNCTION SPEED (GPMCHW, GPMCW, TCHWS, TCWR, QEVAP, TCHWR) C

C C ESTIMATE COMPRESSOR PERFORMANCE FOR GIVEN LOAD AND RETURN COMPRESSOR SPEED c*

C EXTERNAL EVAP, CHILLER DOUBLE PRECISION X(5),F(5),W(5,5),DIFF(5),TOL COMMON /DATA/ PAR(10),XIN(7),OUT(20),ISTAGEIECONIREF DATA TOL/O.OO1/,DIFF/5*O.O1/,PI/3.1415/ C PARAMETER(CPW=I.,

DENS-8.3333)

PARAMETER(AEI=11300., DIAC=.75/12.,

ACI=14800., REO=3.1, RCO=3.1, DIAE=.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 C

PROGRAM DATA DEFINED WITHIN THE ABOVE PARAMETER STATEMENTS:

C 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

C

ACI

= EFFECTIVE INSIDE SURFACE AREA OF CONDENSOR TUBES

C

REO

= RATIO OF EFFECTIVE OUTSIDE EVAPORATOR TUBE SURFACE AREA

RCO

= RATIO OF EFFECTIVE OUTSIDE CONDENSER TUBE SURFACE AREA INCLUDING FINS AND FIN EFFICIENCY TO INSIDE AREA

C

(FEET)

C

DIAE

= EVAPORATOR TUBE DIAMETER

C

DIAC

= CONDENSER TUBE DIAMETER

C

NETUBE

=

NUMBER OF EVAPORATOR TUBES

C

NEPASS

=

NUMBER OF EVAPORATOR TUBE PASSES

C

NCTUBE

=

NUMBER OF CONDENSER TUBES

C

NCPASS

=

C

C1,C2

=

NUMBER OF CONDENSER TUBE PASSES EMPIRICAL CONSTANTS FOR BOILING HEAT TRANSFER

(FEET)

COEFFICIENT

C

C

(FT**2)

INCLUDING FINS AND FIN EFFICIENCY TO INSIDE AREA

C C

(FT**2)

NVERT

=

NUMBER CONDENSER TUBES IN A VERTICAL LINE

-1.32

-

*

C~hillpr

Cart; nn I

C

RPERPC

=

EVAPORATOR AND CONDENSER TUBE WALL RESISTANCE (FT**2-F/BTU)

C

(FT**2)

C

AX

= EXIT AREA OF COMPRESSOR IMPELLER

C

BETA

=

IMPELLER BLADE ANGLE

C

RIMP

=

COMPRESSOR IMPELLER RADIUS

C

EFFREF

=

REFERENCE POLYTROPIC EFFICIENCY

C

EFFMOT

=

COMPRESSOR DRIVE MOTOR EFFICIENCY

(DEGREES) (FEET)

C C

THE VALUES DEFINED ABOVE ARE REPRESENTATIVE OF THE PRIMARY CHILLER AT

C

THE DALLAS/FORT WORTH AIRPORT.

C **

C

**

PRELIMINARIES

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.

C

COMMUNICATED THROUGH THE COMMON BLOCK "DATA".

C

EVAPORATOR HEAT TRANSFER COEFFICIENT

PARAMETERS,

INPUTS, AND OUTPUTS ARE HEI IS THE INSIDE

(TURBULENT FLOW).

C XIN (1) =FLCHW XIN ( 2) --TCHWS XIN ( 3) =TCHWR XIN (4) =12000. *QEVAP

PAR (1) =AEI PAR (2) =REO*AEI

- 1.33

-

Rima

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:

C

CONDENSING TEMPERATURE, THE COMPRESSOR DIMENSIONLESS FLOW COEFFICIENT,

C

AND THE COMPRESSOR IMPELLER TIP SPEED. FOR TWO-STAGE COMPRESSION TWO

C

ADDITIONAL UNKNOWNS ARE:

C

CIENT AND THE SECOND STAGE IMPELLER INLET PRESSURE. THE INLET STATE

C

TO THE COMPRESSOR IS KNOWN FROM THE EVAPORATOR ANALYSIS.

C

PROPERTIES AT THIS STATE ARE EVALUATED PRIOR TO THE ITERATIVE

C

SOLUTION. PARAMETERS,

C

THE COMMON BLOCK "DATA".

THE REFRIGERANT

THE SECOND STAGE DIMENSIONLESS FLOW COEFFI-

THE FREON

INPUTS, AND OUTPUTS ARE COMMUNICATED THROUGH

C C

SET-UP PARAMETERS FOR ANALYSIS:

C

HCI

= INSIDE CONDENSER HEAT TRANSFER COEFFICIENT

C

C3

=

C

(TURBULENT FLOW)

CONSTANT FOR EVALUATING THE HEAT TRANSFER COEFFICIENT FOR 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-

I -.Q.oet;nn eOqc4tn1

('h;la i!,,*

Cllau

IF(ABS(BETA-90.)

.GT.l.E-06)

PAR(7)=1./TAN(PI*BETA/180.)

PAR (8) =EFFREF PAR (9) =EFFMOT PAR(10) =RIMP C C

EVALUATE PROPERTIES AT COMPRESSOR INLET FROM RESULTS OF EVAPORATOR

C

ANALYSIS

C CALL FREON(TE,Pl,H,S,

1.,V1,Ul, IREF, 15)

OUT (8) =P1 C C

INPUTS AND INITIAL GUESSES FOR ITERATION VARIABLES

C XIN(1)=FLCW XIN(2) =TCWR XIN (3) =12000. *QEVAP XIN(4)=P1 XIN (5) =Vl XIN(6)=HI XIN(7)=S1 C X (1)=OUT (6) X(2) =OUT (12) X(3)=OUT (10) C NUMBER OF VARIABLES DEPENDS UPON WHETHER SINGLE OR

C

EQUATION SOLVER:

C

TWO-STAGE COMPRESSION.

C IF(ISTAGE.EQ.1) THEN CALL SOLVER(3,DIFF,X,F,W, CHILLER, TOL) ELSE X(4)=OUT (15) X(5) =OUT (20) CALL SOLVER(5,DIFF,X,F,W,CHILLER,TOL) END IF

SPEED

=

X(3)

-1.35

-

ra... eirr

Q,aefJ;,n I ..

I

IO

(Chiilpr Riirap

1J Lt

I

ul LJL.E

RETURN END

SUBROUTINE EVAP (NEQ,X, F) C

*

C C C

THIS SUBROUTINE MODELS THE PERFORMANCE OF AN EVAPORATOR. THE EQUATION

C

(TE) THAT YIELDS NO DIFFERENCE BETWEEN THE CHILLER LOAD CALCULATED WITH A

C

UA-LOG MEAN TEMPERATURE DIFFERENCE AND THE

C

CHILLED WATER STREAM.

SOLVER THAT CALLS THIS ROUTINE IS SEARCHING FOR THE EVAPORATOR TEMPERATURE

ENTHALPY DIFFERENCE OF THE

DOUBLE PRECISION X,F COMMON /DATA/ PAR(10),XIN(7),OUT(20),ISTAGEIECONIREF

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).

C

CONDUCTANCE, INCLUDING THAT ASSOCIATED WITH THE REFRIGERANT BOILING

C

HEAT TRANSFER COEFFICIENT

C

TEMPERATURE AT THE SURFACE OF THE TUBE.

UAE IS THE OVERALL EVAPORATOR

(HEO). TFILM IS THE REFRIGERANT FILM

C UAI=AEI/ (1. /HEI+RPE)

-

1.36

-

Chiller Surge

Section 1 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

((TCHWR-TE) / (TCHWS-TE))

XLMTD= ( (TCHWR-TE) - (TCHWS-TE))/ALOG 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

SUBROUTINE CHILLER (NEQX,F) C

C SUBROUTINE IS

CALLED AT EACH ITERATION OF THE EQUATION SOLVER TO

*

C

THIS

C

EVALUATE THE COMPRESSOR AND CONDENSER PERFORMANCE. THROUGHOUT THE PROGRAM

C

T,

C

VOLUME, SPECIFIC ENTHALPY, AND SPECIFIC ENTROPY FOR A GIVEN STATE.

*

C C

STATES ARE:

*

P,

V,

H,

AND S REFER TO REFRIGERANT TEMPERATURE,

PRESSURE,

ENTERING COMPRESSOR FIRST STAGE*

C

STATE 1:

C

STATE XI: EXIT FROM FIRST STAGE COMPRESSOR IMPELLER*

C

STATE IA: EXIT FROM FIRST STAGE COMPRESSOR DIFFUSER*

C

STATE 2A:

C

STATE X2: EXIT FROM SECOND STAGE COMPRESSOR IMPELLER*

C

STATE 2:

ENTERING COMPRESSOR SECOND STAGE* EXIT FROM SECOND STAGE COMPRESSOR DIFFUSER*

-

1.37

-

SPECIFIC,

* *

qption 1

C'hilpr I,,irfy u

I

16

Ly Y616LLL aCA.illpr 1

C

STATE 3:

C

STATE 3A: ENTERING ECONOMIZER AFTER EXPANSION

C

STATE 3L:

C

STATE 3V: VAPOR STATE WITHIN ECONOMIZER

C

STATE 4:

EXIT FROM CONDENSER

LIQUID STATE WITHIN ECONOMIZER

ENTERING EVAPORATOR

C

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

**

C C

C

THE THREE UNKNOWNS FOR SINGLE-STAGE COMPRESSION ARE:

TCND

=

THE CONDENSING REFRIGERANT TEMPERATURE

-

1.38

-

I

Rpetion I1iCh1Iai Lio Vi

(rhillpr -IIn li

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, AMIN1 (TCND, TMAX)) PHIX1=AMAX1(0.,AMIN1(PHIX1, 1.0)) UX-AMAX1 (UX, 1.) THEN

IF(ISTAGE.EQ.2) 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.

C

AND CONDENSER

ALSO DETERMINE REFRIGERANT FLOW RATES FOR EVAPORATOR (FL2).

C CALL FREON(TCND, P2,H3,S3,0.,V3,U3, IREF, 15) IF(ISTAGE.EQ.2

.AND.

IECON.EQ.2) THEN

H3A=H3 CALL FREON (T3AP1A,H3A,S3A, X3AV3AtUDUM, IREF, 23) CALL FREON (T3A, P1A, H3L, S3L,0. ,V3L, UDUM, IREF, 25) CALL FREON (T3A, P1A, H3V, S3V, 1. ,V3V, UDUM, IREF, 25) H4=H3L FL1=QEVAP/ (H1-H4) FL2=FLI/ (1.-X3A) ELSE H4=H3 FL1-QEVAP / (H1-H4) FL2-FL1 END IF

-

1.39

-

(FL1)

u

,, rup u

r_..

I .qpetion . , ,o V !i.r fll

tChillpr qitrap .uar--

C

**

COMPRESSOR STAGE(S)

**

C INLET AND OUTLET CONDITIONS OF IMPELLERS AND DIFFUSERS

C

DETERMINE

C

FOR BOTH STAGES.

C CALL PROP (IREFTCNDA0,CONDVISC) MO=UX/AO EFFN1(I.+0.109*(I.I-MO))*(I.-EXP(PHIX1*(58.45*PHIX1** -5.99*PHIX1-18.81)))

2

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, Hi) CALL FREON(TX1,PX1,HXI,S1,XXIVX1,UDUM, IREF, 34) IF(ISTAGE.EQ.1) THEN H2=HI +MU1*UX*UX/32.2/778. ELSE EFFN2=(I.+0.109*(1.1-MO))*(l.-EXP(PHIX2*(58.45*PHIX2**2 -5.99*PHIX2-18.81))) EFF2 =EFFREF *EFFN2 MU2=0.69* (1.-PHIX2*CBETA)/EFF2 HlA=H+MU1*UX*UX/32.2/778. CALL FREON(TA,PlA, HA, SlA, XlA,VlA,UDUM, IREF, 23) IF(IECON.EQ.2) THEN H2A=X3A*H3V+ (1 . -X3A) *HlA CALL FREON (T2A, PlA, H2A, S2A, X2A, V2A, UDUM, IREF, 23) ELSE T2A=TlA H2A=H1A S2A=SlA V2A=VlA 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,5S2A, XX2, VX2, UDUM, IREF, 34 ) H2 =H2A+MU2 *UX*UX/32 .2 /77?8. END IF CALL

FREON(T2,P2,H2,S2,X2,V2,UDUM, IREF, 23)

- 1.40-

ZA,,.Pf

C~hiller

1

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 MATERIAL

C

(PLUS FOULING FACTOR),

C

TFILM

=

CONDENSING FILM TEMPERATURE AT THE TUBE SURFACES,

C

UAC

=

OVERALL CONDUCTANCE INCLUDING THAT ASSOCIATED WITH THE CONDENSING HEAT TRANSFER COEFFICIENT, HCO.

C 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

-

**

,,itrvr

.qpvtinn

'qeirap Chillpr Chu11 ,1 m ir l. u, ra -

1

tAn n%,a

L

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 -

Chiller Surge

Section 1C SUBROUTINE PROP (IREFrTAQ,CONDoVISC)

C C

THIS SUBROUTINE DETERMINES PHYSICAL PROPERTIES FOR REFRIGERANTS R500,

C

OR R12.

THE ARGUMENTS ARE.

C

IREF

= REFRIGERANT TYPE

C

T

= REFRIGERANT TEMPERATURE

C

A0

= SONIC VELOCITY

C

COND

= THERMAL CONDUCTIVITY

C

VISC

= VISCOSITY

(500, 22, OR 12) (DEGREES

F)

(FT/SEC) (BTU/HR-FT-F)

(LBM/FT-HR)

C C 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)

* *

C

IF(IREF.EQ.500)

R22,

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

Cooling Tower Performance Comparisons 2.1 This program compares three different methods for modeling the performance of cooling towers as outlined in Chapter 3: 1) finite difference solution to the basic heat and mass transfer equations, 2).Merkel method, and 3) the effectiveness method. In addition to the routines listed in this section, this program utilizes two utility subroutines (SOLVER and PSYCH) that are listed in Section 5.

Cooling Coil Performance Comparisons 2.10 This program compares two methods for modeling the performance of cooling coils as as outlined in Chapter 4: 1) finite difference solution to the basic heat and mass transfer equations and 2) the effectiveness method. In addition to the routines listed in this section, this program utilizes two utility subroutines (SOLVER and PSYCH) that are listed in Section 5.

-

2.0

-

dahI t:LLlull

&-

;na

'AJ.JUi,

TvvrPgprfnrvmianea A

T

,JIL

A

I..

Ji ' iIlLii.

',.

(

iia

-UlJtil

..

cnn I )Ul3

i

*

C

C

PROGRAM FOR CALCULATING THE PERFORMANCE OF A COUNTERFLOW COOLING TOWER.

C

THREE METHODS ARE COMPARED:

C

TRANSFER EQUATIONS,

THE MERKEL METHOD, AND AN EFFECTIVENESS MODEL. THE

*

C

UNITS UTILIZED WITHIN THIS PROGRAM ARE TYPICAL ENGLISH. THE MODELS ARE

*

C

DESCRIBED IN CHAPTER 3 OF "METHODOLOGIES FOR DESIGN AND CONTROL OF CENTRAL

*

C

COOLING PLANTS", J.E. BRAUN, PH.D THESIS,

C

MADISON, 1988

DETAILED SOLUTION OF BASIC HEAT AND MASS

UNIVERSITY OF WISCONSIN

*

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 READ(10,*,END=100)

TWB,

TWI,

TDB, LE

c C

* *

C

5

-

*

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

C

LE

=

LEWIS NUMBER

(DEGREES C)

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)

=

DATA(NEXP, 6)

= LE

TDB

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) 20

(DATA(IEXPJ),J=1,2), (OUT(IEXPJ),J=1,9)

CONTINUE GOTO 5

C 100

CONTINUE

C

101 FORAT(/1X'TWB, TWI, TDB, LE - ',4(iXFE.2)) 102

FORMAT(//13X,'** FINITE DIFFERENCE '*EFFECTIVENESS 'NTU 'EPSW

103

FLCW/FLA EPSA

FORMAT (T2, F3.,T9, F3.,'5,

EPSA LOSS

**

**

MERKEL

**

'

**'//

LOSS

EPSW

EPSW' ) 3 (IX,3(IX,F5.3) ))

-

2.2-

EPSA

LOSS

',

=

...

..

Q

^dl%+ ; &'%"

13

t lain t-UVuulu

I

|1tl)11 4-

'l''hw7Lr. • u VV .

•t

prfnr u l

ni ,a uull

uI I mlr

i[I

nll

C END C SUBROUTINE TOWER (NEXP) C

*

C C

ROUTINE FOR CALCULATING COOLING TOWER PERFORMANCE.

*

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 (DEGREES C)

C

TWB

= ENTERING AMBIENT WET BULB TEMPERATURE

C

TW

= WATER TEMPERATURE

C

TA

= AIR TEMPERATURE

C

TS

= SURFACE TEMPERATURE

C

TDP

= AIR DEWPOINT TEMPERATURE

C

WA

=

C

HA

= AIR SPECIFIC ENTHALPY

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

(DEGREES C)

(DEGREES C) (DEGREES F) (DEGREES C)

AIR HUMIDITY RATIO (KJ/KG)

C C

THE STATES 1 AND 2 REFER TO ENTERING AND EXITING CONDITIONS

C C

(1=ENTERING,

2 = EXITING) .

DO 100 IEXP

=

I,NEXP

RA

=

DATA (IEXP,2 )

TWB

=

DATA(IEXP, 3)

-

2.3 -

rnnlina Tnwar Parftirm4anna

C adf:tnI

~lInuII

-

',.

TWI

= DATA(IEXP,4)

TDB

-=DATA(IEXP,5)

ninuuau •

ivv%.n

a

a

nun uIuill,

'uuIIpIuUIsols

CALL PSYCH (2,1,TDB,TWB, RHTDPWA1,HA) DATA(IEXP,7)

=

DATA(IEXP,8)

= WAl

HAl

CALL PSYCH(2,1,TWlTWlRHTDPWW1,HW1) C

C

**

EFFECTIVENESS-NTU MODEL **

C CALL EFFEC (TW2,EPSAWA2, HA2) -

TW2)/ (TW1

OUT(IEXP,7)

=

EPSA

OUT(IEXP,8)

- 100.*(WA2

OUT(IEXP,9)

=

EPSW -

(TWI

-

TWB)

-

WAI)/RA

EPSW

C

C

**

DETAILED ANALYSIS **

C C

THE DETAILED COOLING COIL ANALYSIS INVOLVES AN ITERATIVE SOLUTION IN

C

TERMS OF THE EXIT WATER TEMPERATURE

C

THE EQUATION SOLVER CALLS THE SUBROUTINE MODEL AT EACH ITERATION.

C

RESULTS OF THE EFFECTIVENESS ANALYSIS ARE USED AS AN INITIAL GUESS FOR

C

THIS SOLUTION.

(TW2)

AND AIR HUMIDITY RATIO

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 EPSW

= =

-

(HA2

(TWI

-

HA1)/(HWI -

TW2) /(TWI

-

HAI)

TWB)

CALL PSYCH (2, 6, TA2, TWB2, RH, TDP, WA2, HA2)

OUT(IEXP, I)

=

EPSA

OUT(IEXP,2)

=

100.*(WA2

OUT(IEXP,3)

=

EPSW

-

WAI))/RA

-2.4-

(WA2). THE

,Rpt inn27 ~cietmnn

Coolino Tnwpr Pprforrmnn

('nnt in ~ Tnw~~r P~rfnrm~

n~

.....

...

~

** MERKEL METHOD **

C

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

=

EPSW

(HA2 (TWI

-

HA1) / (HW1 - HAl) TW2)/(TWl

- TWB)

CALL PSYCH (2.6.TA2foTWB2.RH. - - 1%- F .. , - -F . .• TDP.WA2.HA2) - . .. • .. . OUT (I EXP,4) = EPSA OUT (I EXP,5)

=

OUT(IEXP,6)

=

Q100.*(WA2

-

WAl) IRA

EPSW

C 100

CONTINUE

C RETURN END C SUBROUTINE MODEL (NEQ, X, F)

C

C

DETAILED MODEL OF A COOLING TOWER THAT SOLVES BASIC HEAT AND MASS TRANSFER *

C

EQUATIONS USING FINITE-DIFFERENCES.

C

TION OF AN EQUATION SOLVER THAT IS FINDING THE CORRECT LEAVING WATER

C

TEMPERATURE.

C

TERMS ARE INCLUDED, WHILE IN MODE 2 THEY ARE NEGLECTED

THIS ROUTINE IS CALLED AT EACH ITERA- * *

THERE ARE POSSIBLE MODES FOR THIS ROUTINE IN MODE 1 THE WATER*

C REAL NTULE DOUBLE PRECISION X (NEQ) ,F (NEQ)

-

2.5

-

(MERKEL METHOD)

*

.qpetinn 2" I

Cooling Tower Performannep Cnnn Cn-Vmndc- TnwraPprfnrmnn2 v ,¥lI

ASa

.gA

v.,

; ....

DATA(100,9),OUT(100,9),MODEIEXP

COMMON /DATAS/

DATA CPW/1.0/,NVOL/30/,HGO/1075.1/,CPV/0.45/,TREF/32./ C C

RETRIEVE

**

INPUT DATA

**

c NTU

= DATA (IEXP, 1)

PA

=

DATA (IEXP, 2)

TWI

=

DATA(IEXP,4)

LE

= DATA(IEXP,6) DATA(IEXP,7)

HAl

-

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.

C

NUMERICAL INTEGRATION SCHEME IS UTILIZED.

C

AT THE AIR INLET.

A SIMPLE FORWARD DIFFERENCING THE FIRST SECTION EVALUATED IS

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 -

DHA

=

LE*NTU*DV*((HW

DHA

=

AMAXI(0.,DHA)

DTW

=

(DHA

-

TREF) -

HA)

+ (WW-WA)*(1./LE-I.)*RGW)

CPW* (TW-TREF) *DWA) /(RA

ELSE

-2.6

-

-

(WA2

-

WA) )/CPW

Cooling Tower Performance Comparisons

Section 2 DWA = 0.0 DHA = AMAX1(0.,NTU* (HW DTW

=

-

HA) *DV)

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.

C

THE LAST SECTION SHOULD BE EQUAL TO THE ITERATION VALUE.

IN MODE 2, THE HUMIDITY RATIO FOR

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

EFFECTIVENESS MODEL FOR A COOLING TOWER.

*

*

C C SUBROUT INE EFFEC (TW2 , EP S, WA2 , HA2 )

-

2.7-

,Qaetinn I

Coonlingr Towpr Pprformfineo inm.n-;

REAL NTU,MSTAR DATA (100,9) ,OUT (100, 9) ,MODE,

COMMON /DATAS/

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)

=

+ 3.340*HSAT

-0.8811

4.01E-04*HSAT**3

-

-

4.907E-02*HSAT**2

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

=

CS

=

(HWI

MSTAR

=

CS/RAI/CPW

C EPS

=

EXP (-NTU* (I.-MSTAR)) (1. - C)/(i. - MSTAR*C)

=

TW2 -

HW2) /(TWI

-

TW2)

-

2.8-

+

....

I

,Rpetinn I

Cfd%];Imdv

Vla .a.......,u, HA2

=

HW

= HA. + (HA2 -

TW

= TSAT (HW)

olrrwwy^se

D^oetAmmem

-

HAl + EPS*(HW1 - HAl) HA1)/(l.

- EXP(-NTU))

CALL PSYCH (2, 1, TW, TW, RH, TDP, WW, HW) WA2

= WW +

RA2

= RAl -

TW2

= TREF + (RA1*CPW*(TW1-TREF) -

IF(ABS(TW2 -

(WAI (WA2

TOLD)

WW)*EXP(-NTU)

-

WAl)

.AND.

.GT. 1.E-03

c RETURN END c

-

2.9-

(HA2 -

ITER

-

fN

a

uw u reriurmance L omarlsons

.LT.

HA1))/RA2/CPW 20)

GOTO 10

C~ifn

I -

C nnl| invCill Iprfnrrn

~~'JL..7U~

-

Ol.J,.|I~JI

l

:--_'uuv

a

''E

.

lIillo,.Li

P ,tU

...

• ..

hIIIJ4lI-IsoI)

C

*

C

PROGRAM FOR CALCULATING THE PERFORMANCE OF A COUNTERFLOW COOLING COIL.

*

C

TWO METHODS ARE COMPARED:

*

C

FER EQUATIONS AND AN EFFECTIVENESS MODEL. THE UNITS UTILIZED WITHIN THIS

*

C

PROGRAM ARE MODIFIED SI. THE MODELS ARE DESCRIBED IN CHAPTER 4 OF

*

C

"METHODOLOGIES FOR DESIGN AND CONTROL OF CENTRAL COOLING PLANTS",

*

C

J.E. BRAUN, PH.D THESIS, UNIVERSITY OF WISCONSIN - MADISON, 1988

*

DETAILED SOLUTION OF BASIC HEAT AND MASS TRANS-

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

C

LE

=

LEWIS NUMBER

C C

NTUR

-

RATIO OF NUMBER OF TRANSFER UNITS FOR WATER FLOW ON INSIDE SURFACE TO NUMBER OF TRANSFER UNITS FOR AIR FLOW ON OUTSIDE

C

(DEGREES C)

SURFACE

C C

C

**

STORE DATA FOR A RANGE OF COIL PARAMETERS

C

- 2.10-

**

I.. Qaef;nn a .rr U

~'uU

Cnnling Coil Performne

Cnmnn rcnc LIE3JI 1

C

NTUO = NUMBER OF TRANSFER UNITS FOR AIR FLOW ON OUTSIDE SURFACE

C

RAS

=

RATIO OF WATER FLOW TO AIR FLOW RATE

C NEXP = 0 DO 10 NRA

1,3

=

DO 10 NNTU

1,6

=

IF(NRA .NE. 1 .OR. NNTU .NE. 6) THEN NEXP

=

NEXP + 1 NTUO (NNTU)

DATA (NEXP, 1)

=

DATA(NEXP, 2)

= RAS (NRA)

DATA(NEXP,3)

=

TWB

DATA(NEXP,4)

=

TWI

DATA(NEXP,5) = TDB DATA(NEXP,6)

=

LE

DATA(NEXP,7) = NTUR ENDIF 10

CONTINUE

C

C

**

COIL ANALYSIS **

C C

RESULTS ARE STORED IN THE OUT ARRAY FOR ALL SETS OF COIL DATA

C CALL COIL (NEXP) C

C

**

OUTPUT RESULTS TO FILE **

C WRITE(II,101)

TDB,

TWB,

TWI,

LE,

NTUR

WRITE (11, 102) DO 20 IEXP

=

1,NEXP

WRITE(11,103) 20

(DATA(IEXPJ),J=1,2),

(OUT(IEXPJ),J=I,6)

CONTINUE GOTO 5

C 100 C

101

CONTINUE

FORMAT(///IX,'TDB, TWB, TWI, LE, NTUI/NTUO 102 FOMA(/1X' ** FINITE DIFFERENCE ** '** EFFECTIVENESS

**'//

.2.11 -

=f

',5(IX, F6.2)/)

I

r~nnlin(a

Qenn7 kjc;

,i

5X,'NTU

103

l Pprfnrmna

J.v4,-

dlu

FLCW/FLA

Ia I

EPSA

EPST

FDRY',

EPSA

EPST

FDRY'/)

I

Iv3 ILI5,

. .JIIU

.. :..

I-1uU t !a

FORMAT (8 (3X,F6.3))

C END C SUBROUTINE COIL (NEXP) C

C C

*

ROUTINE FOR CALCULATING COOLING COIL PERFORMANCE.

*

C

*

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 WET BULB TEMPERATURE

- ENTERING AMBIENT

(DEGREES C)

C

TWB

C

TW

= WATER TEMPERATURE

C

TA

=

C

TS

= SURFACE TEMPERATURE

C

TDP

= AIR DEWPOINT

C

WA

= AIR HUMIDITY RATIO

C

HA

= AIR SPECIFIC ENTHALPY

C

WW

=

C

HW

= SPECIFIC ENTHALPY ASSOCIATED WITH SATURATED

C

EPST = AIR STREAM TEMPERATURE EFFECTIVENESS

C C

EPSA = AIR STREAM HEAT TRANSFER EFFECTIVENESS

AIR TEMPERATURE

(DEGREES C)

(DEGREES C) (DEGREES

TEMPERATURE

F)

(DEGREES C)

(KJ/KG)

HUMIDITY RATIO ASSOCIATED WITH SATURATED AIR AT TW AIR AT TW

C

THE STATES 1 AND 2 REFER TO ENTERING AND EXITING CONDITIONS

C

(1=ENTERING,

2

=

EXITING) .

DO 100 IEXP

=

I,NEXP

C

-2.12-

(KJ/KG)

3ec~.tIU

Parfhrrn*anrAm rn;l Cnnl;na V~ % '-e IE I ulI I J iplue %,.

1

L

c TWB

= DATA(IEXP,3)

TWI

= DATA(IEXP, 4)

TAl

- DATA (IEXP ,5)

CALL PSYCH(1, ITA1,TWB, RHA1,TDPAIWAIHA1) = HAl

DATA(IEXP,8)

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) -

TA2) /(TA1

OUT(IEXP,4)

=

EPSA

OUT(IEXP,5)

=

EPST

(TAl

EPST =

-

TWI)

C

C

**

DETAILED ANALYSIS

**

C C

THE DETAILED COOLING COIL ANALYSIS INVOLVES AN ITERATIVE SOLUTION IN

C

TERMS OF THE EXIT WATER TEMPERATURE

C

THE SUBROUTINE MODEL AT EACH ITERATION.

C

ANALYSIS ARE USED AS AN INITIAL GUESS FOR THIS SOLUTION.

(TW2).

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

-

EPST

=

(TAl

-

TA2)/(TAI

- TWI)

HW1)

OUT(IEXP,I) = EPSA OUT(IEXP,2) C 10 0

= EPST

CONTINUE

C RETURN END

- 2.13 -

THE EQUATION SOLVER CALLS

THE RESULTS OF THE EFFECTIVENESS

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

EQUATIONS USING FINITE-DIFFERENCES.

*

C

TION OF AN EQUATION SOLVER THAT IS FINDING THE CORRECT LEAVING WATER

*

C

TEMPERATURE.

,

THIS ROUTINE

C

IS CALLED AT EACH ITERA-

*

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

-

**

a3

C~nalinaoinl Pprformqnan /mnr; |IUII

1-,..,,

I.I..-

-%JI. .,

-

i

%

%,,vLi

.... Il I

C **

c

LOOP THROUGH COIL SECTIONS **

C A SIMPLE FORWARD DIFFERENCING

C

THE COIL IS DIVIDED INTO NAREA SECTIONS.

C

NUMERICAL INTEGRATION SCHEME IS UTILIZED.

C

AT THE AIR INLET.

THE FIRST SECTION EVALUATED IS

C

I

DO 100

=

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 IF(I

=

TW + CSTAR*NTU/NTUI*(TA -

TW)

.EQ. 1) TS = TSDRY

CALL PSYCH(1, 4,TA, TWBSRHSTDPS,WA, HAS) IF(TSDRY .GT. TDPS) THEN TS = TSDRY I

NDRY ELSE C

WET ANALYSIS **

**

C 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)

DTW

=

(DHA

TS

=TW

-

-

-

+ (WS-WA) *(1./LE-1.) *HGS)

DWA*CPW* (TS-TREF))/RA/CPW

DTW/DA/NTUI

- 2.15 -

I

Ull1,v

Cnil Pprfnrrnnnro rnnl;na ti r . A•a au *aa ui

I 3A

lUll

4'.v

Us

.. 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

EFFECTIVENESS MODEL FOR A COOLING COIL.

*

*

C

SUBROUTINE EFFEC (TW2, EPSA, TA2, HA2) REAL NTUO, NTUI, NTU, NTUD, NTUW, MSTAR COMMON /DATAS/

DATA(100,9),OUT(100,9),IEXP

DATA CPW/4.19/,CPA/1.012/,CPV/1.805/ C ** STATEMENT FUNCTIONS **

Cnnlina ox.va i Pprformn~nep rtmnq.-;: ....U .,% -e ,m , ,a-. , i.%ll flI

C,,,,t;nnI L, rvt.lvll .IL A

C C

CORRELATION FOR SATURATION TEMPERATURE IN TERMS OF SATURATION

C

ENTHALPY:

CORRELATION IS IN SI UNITS

C --

TSAT(HS)

+ 6.58002E-01*HS

5.75904E+00 -

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 = EXP(-NTU*(1.-RATIO))

C(NTURATIO)

EPS(NTU, RATIO) =

(1.

C(NTU,RATIO))/(1.

-

-

RATIO*C(NTU,RATIO))

C

C

**

RETRIEVE INPUT DATA

**

C DATA(IEXP,1)

NTUO

=

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 C

INITIALLY ASSUME THAT THE COIL IS COMPLETELY DRY

FDRY

=

CPM

=

1. CPA + WA1*CPV

CSTAR

=

CPM/RA/CPW

NTUD

- NTUJO/ (I.

EPSD

=

EPS(NTUD,CSTAR)

TA2

=

TAI

-

EPSD*(TAI

HA2

=

HA1.

-

CPM* (TAI

+ NTUO/NTUI*CSTAR)

-

TWI) TA2)

-2.17

-

**

I

,

Coolina o

tinnI a

Aw 11-.,

v,,

WA2

= WAl

TW2

=

TS2

= TWI + CSTAR*NTUD/NTUI*(TA2

IF(TS2

.,

,v,&--r ,'tL Ua ll

... LII

.. U

l ISonl5

- HA2)/RA/CPW

TWI + (HAl

.LT. TDP)

ilPrform~ne

- %Vi , Xu.o

TWI)

-

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

TW2

= TWI + (HAl -

IF(ABS(TW2 TAX

=

- EPSW*(HAl - HWl)

- TOLD)

HA2)/RA/CPW

.GT. 1.E-03

.AND. ITER .LT. 20)

TAl

TS1 = TW2 + CSTAR/CPM*NTUW/NTUI* (HAl IF(TS1

GOTO 10

.GT.

TDP)

-

HW2)

THEN

C

C

**

PARTIALLY WET AND DRY **

C (WATER OUTLET IS GREATER THAN

C

THE SURFACE TEMPERATURE AT THE AIR INLET

C

THE DEWPOINT OF THE INLET AIR, SO THE COIL IS PARTIAL WET

C

AND PARTIALLY DRY (AIR INLET SECTION).

C C

OF THE COIL THAT IS DRY.

20

TWX

=

TW2

FDRY

=

0.

ITER

=

0

ITER - ITER + 1 TOLD

=

TW2

-2.18-

(EXIT SECTION)

ITERATIVELY DETERMINE THE FRACTION

t"qnnl;na n "t;I De i !uII4--

n

EXPK =

,"Parfhrr a ^^ inn llticzu

lkI

+ CSTAR*(TA1-TDP))/

((TDP-TW2)

-

(1. - NTUD*(1. EXPK

I

CSTAR)/NTUO)/(TAI-TW2)

AMAX1(1.E-06,EXPK)

=

FDRY = -1./NTUD/(1. -

CSTAR)*ALOG(EXPK)

FDRY = AMAX1(0.,AMIN1(1.,FDRY)) EPSD = EPS(FDRY*NTUD,CSTAR) CALL PSYCH (I 1,TWX,TWXRRHWXTDPWX, WWX, HWX) CS

(HWX - HW1)/(TWX - TWI)

-

MSTAR

=

CS/RA/CPW

NTUW = NTUO/(1. + NTUO/NTUI*MSTAR) EPSW = EPS((1.-FDRY)*NTUW,MSTAR) TWX

(TWI + CSTAR/CPM*EPSW*(HA1 -EPSD*CPM*TA1

=

-

HW1))/

(1. - CSTAR*EPSW*EPSD) TW2

=

CSTAR*EPSD*TAI + (1. - CSTAR*EPSD)*TWX

IF(ABS(TW2-TOLD) HA2 = HAl

.GT. 1.E-03

- RA*CPW* (TW2

TAX = TAl -

EPSD*(TAI -

-

.AND.

ITER .LT. 20) GOTO 20

TWI)

TWX)

END IF C

C

**

DETERMINE EXIT AIR CONDITIONS **

C HAX

=

HAl -

CPM* (TAI -TAX)

HSW = HAX + (HA2 -

HAX)/(I. - EXP(-(l.-FDRY)*NTUO))

TSW = TSAT(HSW) TA2 = TSW + (TAX -

TSW)*EXP(-(I.-FDRY)*NTUO)

ENDIF C

C

SET OUTPUTS **

**

C EPSA = (HAl

-

HA2)/(HAl

OUT(IEXP,6)

=

FDRY

-

HWl)

C C RETURN END

- 2.19-

.

.. ".

parII l r s

.

Section 3 Component-Based Optimization Program

3.1 Main Program Primarily calls other routines for reading input system description and time dependent data, minimizing costs, and outputting results. Loops through time and at each time evaluates every mode of operation for minimum cost.

I/O Routines Routines for inputting and outputting data and results.

3.5

Steady-State Optimization Routines for determining the values of continuous control variables that minimize the instantaneous cost of operation for specified modes and uncontrolled variables.

3.14

System Model Routines for solving the equations that model the system that is specified.

3.28

Component Models Routines for modeling the individual component performance for chillers, air handlers, pumps, etc.

3.33

3.59 Sample Data uncontrolled Sample data for a system input description and time-dependent variables.

-

3.0 -

Mnin Prnornm

Qart;nn 'A-

C

C

*

C Program for determining the optimal steady-state values of controls that C minimize instantaneous operating costs of chiller plants through time as C described in Chapter 6 of "Methodologies for the Design and Control of

* * *

C Central Cooling systems", Jim Braun, PhD Thesis, UW-Madison, 1988. C

*

C Implicit Real*8

(A-H,O-Z)

Integer OptMode Logical Bounded Parameter

= 10, MaxStr= 2,

(MaxU

50,

NFmax

0

NPmax

=

0

NMmax

= 20, NOmax

=

NUmax

10, NCmax

= 50,

=

20, NYmax

= 10, NMVmax

= 50, =

10,

MaxInf = 10)

Dimension mapF (NFmax), mapM(NMVmax), mapX (NYmax), Par (NPmax), Modes(NMVmax), Info(MaxInfMaxU), U(NUmax), & RData(NFmax) , F(NFmax),

Outs(NOmax),

0

Y(NYmax),

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************************** C C

Get Input Description *****************************

Descriptions of the data are given in

the Input subroutine.

C Call Input(Ntimes, *Nunits, NData, *Info,

Par,

mapF,

mapM,

mapX,

U, Y)

C C** Total Number of Uncontrolled,

Discrete Control,

-3.1-

Continuous Control,

Q

^41%

C IC

Main Prorm

r1k I 91%

Stream Output, and Printed Output Variables NFmap= Info(4, Nunits+1)

-

1

Nunits+1)

-

1

Info(6, Nunits+1)

-

1

NMmap = Info(5, NU

=

NY

= Info(8,

Nunits+1)

-

1

NO

=

Info(9,

Nunits+1)

-

1

1-

**

C ***************************

Main Loop over Time ******************************

C 1,Ntimes

Do 200 itime

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 Costs for First Discrete Control Mode

C-----------------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

=

Uopt(i) 10

I,NU =

U(i)

Continue Do 20 i

=

Oopt(i)

1,NO =

Outs(i)

-3.2-

**

*

Codf;nn

~j~~.,LI~)uE

20

UnI'o;n Pr,-n,-far" &'iutii I uu~taaum

I .- '

Continue If (.not. (Bounded)) OptCost

=

Then

l.e+30

Endif C If(NModes

.gt. 1) Then

C-------------------------

Evaluate All Mode Possibilities

C Do 100 Mode = 2,NModes

Call CopyModes(Mode, NMmap, mapM, Modes) Call Costs(Nunits, Par, F, Modes, mapX, Info, U, Y, Outs, Bounded)

Pen,

Cost,

C C** Store controls associated with minimum cost

**

C If (Cost

.lt.

OptCost

OptMode

=

Mode

Do 40 i

=

1,NU

Uopt(i)

=

.and. Bounded) Then

U(i)

Continue

40

Do 50 i

=

Yopt(i)

1,NY Y(i)

=

Continue

50

Do 60 i - 1,NO Oopt(i)

=

Outs(i)

Continue

60

OptCost = Cost Penalty = Pen

Endif 100

Continue

C Endif C C-------------------------------

Print Output----------------------------------

C Call Printer(itime,

NU,

NY,

OptMode,

OptCost, Penalty) C

-

3.3-

Uopt,

Y, Oopt,

I

Section 3 200

Main Program

Continue End

3.4.

T/(") IDAllvt;nnc \ U|I¢

I Qatt;nn jjC%;|IVI| - 0Ju

C

C

C

*

*

Routine for reading input data for describing a system.

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 50, NFmax = 10, NCmax

NPmax

=

NMmax

= 20, NOmax

=

=

20, NYmax

=

50,

=

10, NMVmax

=

10,

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), NTS (MaxU), NTO (NOmax) 0 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 number of total types available

C

NTypes

C

NStrV

C

NTP

C

NTF

C

NTM

C

NTU

-

C

NTC

-

number of continuous control variables for each type 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)

number of stream variables within a stream

-

number of parameters for each type number of forcing functions for each type

-

number of mode variables for each type

C

NTypes

=

6

NStrV

=

2

-3.5

-

T/O"Rontine,

qIRptinn3

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 Call Typel(Info(l, itype))

1.

goto 7 Call Type2(Info(l, itype))

2

goto 7 Call Type3(Info(l,itype))

3

goto 7 Call Type4(Info(l,itype))

4

goto 7 Call Type5 (Info (1,it-ype) )

5

goto 7 Call Type6(Info(litype))

6

Continue

7

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 C

Ntimes - number simulation timesteps 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-

T/l') 12,.v,,1;,.,a,

(atnIn

I

IUutlllcb

C Read(10,*)

Ntimes,

Nunits,

Read(10,*)

NModeV,

NModes

If(NModeV .gt.

NData

0 .and. NModes

.gt. 0) Then

Do 11 j = 1,NModes (ModeV(ij),i=lNModeV)

Read(10,*) 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,

Info (liunit)

itype = 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) Read(10,*)

.gt.

0)

Then

(Par(i),i=ipP,ipP+NTP(itype)-l)

Endif C** Forcing Function Data

**

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)

If(NTF(itype) Read(10,*)

=

ipf + NTF(itype)

.gt. 0) Then (mapF(i),i=ipf,ipf+NTF(itype)-l)

Endif C C** Discrete Control Mode Data

**

C - pointer in Modes array to mode data for iunit

C

ipM

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

C

U

- pointer in U array to continuous control varibles for iunit - 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,*) 15

U(i),

Umin(i),

Umax(i)

Continue Endif Info(7, iunit+1)

=

Info(7,iunit)

-

+ NTC(itype)

3.8-

Spetion _3

T/O Rmitinpr.

C Stream Data **

C**

C - pointer in X array to output stream variables for iunit

C

ipX

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

20

Read(10,*)

InUnit(i,iunit),

Read(10,*)

(X(j),

j

=

ipX,

InNum(i, iunit) ipX+NStrV-1)

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) 40

Info(8,iunit)+ NStrV*(istr-1)

=

+ ivar

-

1

Continue Endif

C ***

**********~~********

Printer Output List

C Read(10,*) If(NPrt NPrt

NPrt

.gt.

0) Then

-- Min0(NPrt,5)

Do 55 iprt

=

l,NPrt

-3.9 -

* ** * *** * * ********* ** ******

*** *

Spetion 3 -

T/O Rntitinoc

Read(10,*)

NOuts(iprt)

If(NOuts(iprt) Read(10,*)

.gt.

0)

Then IVOut(i)),

((IUOut(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)

50

=

ipO + IVOut(i)

-

1

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)

+

ipY = Info(8,num)

+ (InNum(i,iunit)-l)*NStrV

(i-l)*NStrV

Do 70 j = 1,NStrV mapX(ipX+j-1) = ipY + 70

Y(ipY+j-1) Continue

=

j

-

1

X(ipX+j-1)

Endif 80 100

Continue Continue

- 3.10-

1i'l

Cae, f.; n n I - 63(eKtiull j__-* -

IIL"

Dne..,m.c

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 mapF,

Subroutine Copy_F(Nmap, Implicit Real*8

RData,

F)

(A-H,O-Z) F(Nmap)

mapF(Nmap),

Dimension RData(1), 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,

Dimension mapM (Nmap), Common /ModeDat!

NMVmax

=

10)

Modes (Nmnap)

NModes,

NModeV,

ModeV(NMVmax, NMmax)

- 3.11 -

1/0'. Ron,cn

I .qpetinn Lrtinla3-YI/O

R

Do 10 i

=

L411 %gn

1,Nmap

ipm = mapM (i)

Modes (i)

10

ModeV (ipm, Mode)

=

Continue

C Return

End C Optimization Output *****************************

***

**********************

C Subroutine Printer(itime, NU, NY, Mode, U, Y, Outs, Cost, Penalty) (A-H,O-Z)

.Implicit Real*8 Parameter

= 10, MaxStr

=

NPmax

= 50, NFmax

= 10, NCmax

= 10, NMVmax

NMmax

= 20,

= 50, MaxInf

=

(MaxU

..

NPrt,

NUmax

=

20, NYmax

=

50,

=

10,

10)

Outs (NOmax), Output (NOmax)

Y(NYmax),

Dimension U(NUmax), Common /Print/

NOmax

2,

NOuts(5),

ListO(10,5)

C C********* Print All Controls, Optimal Cost, and Constraint Penalty ***********

C (U(i) ,i=l,NU),

Mode,

itime,

Write(12,1001)

Cost-Penalty,

C C********************* Output User Specified Outputs * C If(Nprt Lu

=

.gt. 0) Then 12

Do 20 iprt = 1, NPrt Lu = Lu + 1

.gt.

If(NOuts(iprt) Do 10 i ipO

=

=

Then

1,NOuts(iprt)

ListO(iiprt)

Output(i)

= Outs(ipO)

Continue Write(Lu, 1002)

10

0)

itime, (Output(i),i1l,NOuts(iprt))

Endif 20

Continue Erndif

- 3.12 -

Penalty

'Retinn3 ~otiuln 3

1/0' n,,tinp. LItInC3 I RnAVU I/OI R

1001

Format (lx,14,1lx,12,10 (lx,Ipell.3))

1002

Format(lx,14,10(lx,lpell.3))

1003

Format (lx,14, 5 (10 (lx,pell.3)/))

C End

-3.13 -

qtead v-Sqta tp

Q-lf;n

nti;75.1tinn

C

C

*

C This routine determines the costs associated with the current modes of C operation at optimal values of the continous control variables.

*

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,

= 50,

NYmax

NUmax

=

20,

NCmax

=

10, NMVmax

=

10)



NPmax

= 50, NFmax

= 10,



NMmax

= 20, NOmax

= 50, MaxInf

1=0,

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

=

.False.

Debug

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

Steadv-,lRt.itpOnf;m;,7-af;nn _ 1, T.... JLrLULItl IIJIUil

-3 j

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, Do 12 i

=

Cost,

Penalty)

1,NU

UO(i) = U(i) 12

Continue First

=

.False.

C C

**

Use Polynomial Interpolation In Search Direction

**

C Else Par,

Call Solve(Nunits, Outs,

Cost,

F, Modes,

mapX,

Info,

U, Y,

Penalty)

iloop= 0 13

iloop = iloop + 1

Do 15 i UM(i) 15

=

I,NU

=

(U(i)

+ UO(i))/2.

Continue Costl

=

CostL

Call Solve(Nunits,

Par,

F,

Modes,

- 3.15 -

mapX,

Info,

UM,

Y,

.qpetion

-13

j

c~L~auy-~tiuLe uorlmlzaripn

teauy-atate UDIti mlzationl

......

-

Outs, Cost2, Pen2) Cost3 = Cost

aO = Costi al = -3.*Costl + 4.*Cost2 - Cost3 a2 = 2.*(Costl -

step

Dminl(l.d0,Dmaxl(0.d0,-0.5d0*al/a2))

=

Do 20 i

U(i) 20

2.*Cost2 + Cost3)

=

INU

- UO(i)

+ step*(U(i)

-

U0(i))

Continue Call Solve(Nunits, Par, F, Modes, mapX, Info, U, Y, Outs, Cost, Penalty) If(Cost Do 22 i

.gt. CostL .and. iloop .1t. 3) goto 13 =

1,NU

UO(i) = U(i) 22

Continue Endif

C C

Output Results

**

to Screen if Debugging **

C If(Debug) Then Write(*,*) 'U

', (U(i),i=1,NU)

=

Write(*,*)

'GC

Write(*,*)

'CostCostL = ',Cost.CostL

Write(*,*)

'Y

=

=

Write(*,*) 'Outs

',(GC(i),i=1,NC) ',(Y(i),i=1,NY) = ',

(Outs(i),i=1,NO)

Endif C C

**

Convergence Check **

C If(abs(Cost) Ck

-

.gt.

0) Then

abs(Cost-CostL)/Cost

Else Ck = abs (Cost-CostL)

Endif Converge

=

Ck .lt.

If(.not. (Converge) C C

**

Tol .and.

iter .lt.

Determine linearization

imax)

Then

for Outputs and Constraints

- 3.16-

**

Steadv-,'tqtp

'Roetinn -1

C

25

Do 25 i

= 1,NY

YO(i)

= Y(i)

Continue Do 30 i = 1,NC

G0(i) 30

= GC(i)

Continue Do 45 j

1,NU

=

dU = Dmaxl(diff*U(i),diff) U(j)

+ dU

U(j)

=

Call Solve(Nunits, Par, F, Outs, Costj, U(j)

-

U(j)

=

Do 35 i

Modes, mapX, Info, U, Y,

Penj)

dU

1,NY

=

= (Yfi)

dYdU(ifj)

- YO(i))/dU

Y(i) = Y0(i)

35

Continue If(NC .gt. 0) Then Do 40 i - 1,NC dGdU(i, j) GC(i)

40

(GC(i)

=

GO(i))/dU

-

GO(i)

=

Continue Endif

45

Continue

C Do 50 i

=

1,NY

Do 50 j = 1,NU YO(i) 50

- dYdU(i, j)*UO(j)

Y0(i)

=

Continue

C C

Constraint Equation: G

**

=

alpha + Beta*u

C If(NC

.gt.

Do 60 i-

0) Then ,NC

=

alpha(i) Do 55

j

= =

alpha(i) Beta(i, j)

GO(i) I,NU alpha(i)

= =

-

dGdU(i,j)*U0(j)

dGdU(i, j)

- 3.17-

**

ntiri7Tqtinn

C!,m^+;fn 'A L3eL

lUi

-LJQ L5.5-

-JL

L

UL IIillfLIUil

Continue

55

Continue

60

Endif C Optimal Continuous Control Variables

C--------------------C C

** Quadratic Cost Terms**

C C

Call Coef (Nunits, Info, NU, NC, NY) C C C

**

Terms for Quadratic Penalty Function from Linearized Constraints Do 210 i -- ,NU Do 210 j = 1,NU Do 210 k= 1,NC - Ahat(ij) + Beta (k,i)*Beta (k,j)

Ahat(ij) Continue Do 220 i

210

=

Do 220 j

1,NU 1,NC

=

bhat(i)

bhat(i) + 2.*Beta(ji)*alpha(j)

=

Continue

220

Do 230 i

=

1,NC

chat - chat + alpha(i)*alpha(i) Continue

230 C C

**

Get inverse of matrix of coefficients to quadratic terms

C Do 310 i Do 310

=

1,NU

j

=

INU

Ainv(i,j) 310

=

Ahat(i,j) + Ahat(ji)

Continue Call Dinvert (NUmax, NU,, Ainv, if lag) If(iflag .ne. 0) Then Write(*, *)

'Ahat

Write(*,*)

'

Do 311 i

I,NU

=

Write (*, *) 311

Ahat

not invertible' ='

(Ahat (i, j) ,j=,NU)

Continue

- 3.18 -

**

**

Ch2' ;9%i

I

3-ectJI.L

5

Y

Ya7lULta rz

Stop Endif C C C---------------------

Optimization with Equality Constraints

C Call Optimize(NC, NU, U) C If(Debug) Then 'Unconstrained

Write(*,*)

U

=

',(U(i),i=1,NU)

Endif C Inequality Constraints

C--------------------------C C

**

Add to Constraints if Controls Outside Limits

C NFixed

=

NC

Do 320 i = 1,NU UFixed(i)

=

320

Continue

330

Nold = NFixed Do 340 i

=

.False.

1,NU

If(.not.(UFixed(i)) U(i)

=

.and.

U(i)

.lt.

Umin(i))

Then

.gt. Umax(i))

Then

Umin(i)

UFixed(i)

=

.True.

NFixed = NFixed + 1 alpha(NFixed)

=

-Umin(i)

Beta(NFixed,i)

=

1.0

Endif If(.not.(UFixed(i)) U(i)

.and.

U(i)

- Umax(i)

UFixed(i) NFixed

=

=

.True.

NFixed + 1

alpha(NFixed)

= Umax(i)

Beta(NFixed, i)

=

-1.0

Endif 340

Continue

C

- 3.19-

**

Lt

IIlplaijJI

Qad-fl*nn

I

-

C

Can't have more constraints than controls

**

**

C If(NFixed .gt. NU) Then Write(*,*)

'Warning:

Constraints not Satisfied'

Else C If(NFixed .ne. Nold) Then C C

Redo Constrained Optimization **

**

C NU,

Call Optimize(NFixed,

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)) Write(*,*)

Then

Optimization Loop not Converged: Ck-

'

Endif C C-----------------------------

Check Total Cost

C If(Debug) Then CostCk = chat

If(NU .gt. 0) Then Do 410 i-

CostCk temp

=

=

1,NU CostCk + bhat (i) *UJ(i)

0.0

Do 400 j

=

I,NU

temp - temp + Ahat(i, j)*UJ(j) 400

Continue CostCk

410

=

Cost Ck + U(i)*temp

Continue

-

3.20

-

',Ck

I petonnI,.

Ont;vn;,vn+,oyr%

I,Rtpndv..Iqtqtp

Endif Write(*,*) 'Cost Check

=

',CostCk

Endif C *

**

Check for Controls Within Bounds *

C

.True. Do 420 i = 1,NU Bounded

=

If( U(i)

.lt.

Bounded

=

(Umin(i)-Tol) .or. U(i)

.gt. (Umax(i)+Tol) ) Then

.False.

Endif 420

Continue

C Return End C

**************************

Constrained Optimization *

C Subroutine Optimize(NC, NU, U) Implicit Real*8

(A-H,O-Z) = 10, MaxStr = 2, NUmax

= 20, NYmax

NPmax

= 50, NFmax

= 10, NMVmax = 10,

NMmax

=

Parameter (MaxU

* *

= 10,NCmax

20, MaxInf = 10)

Real*8 U(NUmax), Y(NYmax), Common /SolDat/ YO(NYmax),

Lamdah(NCMax) 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 U(i) 10

j = 1,NU =

U(i)

-

= 50,

Ainv(i, j)*(bhat(j)

Continue Endif Return End

- 3.21 -

-

Lamdah(j))

I

cnd,4.1*lnn

()nf;rn;-sniP;iin

CtPI('fV..qtritp

Determine Pointers for Input Mapping

*******************

C Subroutine Lagrange(NC, NU, Lamdah, iflag) Implicit Real*8 (A-HO-Z) A (MaxU

Parameter

10, MaxStr = 2, NUmax

=

*

NPmax

= 50, NFmax

*

NMmax

=

20,

= 10,NCmax

= 20,

NYmax

=

50,

= 10, NMVmax = 10,

MaxInf = 10)

Lamdah(1), Lamda (NCmax), Linv(NCmaxNCmax)

Real*8

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)

5

0.0

=

Continue If(NC

Then

0)

.gt.

C C----------------------------

Lagrange Multipliers-----------------------------

C Do 20 i

=

1,NC

tempv(i) Do 20

j

-alpha(i)

=

INU

=

tempm(i,j) Do 15 k

0.0

=

1,NU

=

tempm(i,j) 15

Continue tempv(i)

20

+ Beta(ik)*Ainv(kj)

tempm(i,j)

=

tempv(i)

=

+ tempm(i,j)*bhat(j)

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) 30

=

Linv(i,j) + tempm(i,k)*BTkj

Continue Call Dinvert(NCmax, If(iflag .ne.

NC,

if lag)

Linv,

0) Then

-

3.22-

fin I

Ont;mv*-Ynf;nn

.qtPnfiv..qfnta

Write(*,*)

Linv not invertible'

'

Return Endif Do 40 i

=

1,NC - 0.0

Lamda(i) Do 40 j

=

1,NC - Lamda(i)

Lamda(i)

+ Linv(i, j)*tempv(j)

Continue

40 C

Modified Lagrange Multipliers---------------

C-----------------------C Do 50 i

=

1,NU

Do 50 j = 1,NC BhTij

=

Beta(j,i)

Lamdah(i)

Lamdah(i) + BhTij*Lamda(j)

=

Continue

50 C

Endif C Return End C * ***

*******

***

**

*****

**

***

*****

***

**

**

**

**

* ***

***

**

**

* ***

* ******

* ***

*

C C

***

**

* *

*

Routine for determining coefficients of continuous cost function.

C

*

*

C Subroutine Coef(Nunits, Implicit Real*8 Parameter (MaxU . *

NPmax NMmax

Dimension Common

Info,

• Common /SolDat! •

Common /Con_Dat!

NC,

NY)

(A-H, O-Z) = 10, MaxStr = 2, =

= 20, NYmax

tempm(NYmax, Numax),

AA (NUmax, NUmax),

~CC (NYmax,

NUmax

NUmax),

Y0O(NYmax) ,

= 50,

= 10, NCmax = 10, NMVmax = 10, = 50, Maxlnf = 10)

50, NFmax NOmax

- 20,

Info (Maxlnf,MaxU),

/CostDat!

NU,

BB (NYmax, NYmax), p (NUmax),

dYdU (NYmax, NUmax),

bhat (NUmax),

alpha (NCmax) ,

chat,

tempv(NUmax)

q(NYmax) ,

Ahat (NUmax, NUmax) ,

Amny (NUmax, NUmax)

Beta (NCmax, NUmax)

-3.23

-

r (MaxU)

Q'-arf;inn

Ii

~ ~~ ~

L

~

~

~

~

~

I

~

~ Sqteadv.,Stntp ~ ~ "'l

m

fl|,V

(Ontimi7-qtinn LJ ,|IL,|iV I IIt I ILIiV 1I I

X-

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) 15

tempm(i, j)

+ BB (i, k) *dYdU (k,j)

Continue - tempm(i,j)

tempm(i, j)

20

=

+ CC(i, j)

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) 30 C C

Continue If(NC .gt. 0) Then Do 35 k=INC Beta(k,i)

C

BetaT

C

Ahat(ij)

C35 C 40

+ dYdUT*tempm(k, j)

=

+ BetaT*Beta(k,j)

- Ahat(ij)

Continue Endif Continue

C C** Linear term

**

C Do 50 i

=

INY

tempv(i)

Do 45 j BBTij

=

=

1,NY

=

BB(ji) - tempv(i)

tempv(i) 45

+ BBTij*Y0O(j)

Continue tempv(i)

50

0.0

=

2.0*tempv(i)

+ q(i)

Continue

-

3.24

-

£qPhehfl I~.7'.. ~ LI 'J**

19teadv.-Statp

-I

Do 70 i

Oi n;r;7 t ;nn ~..~IFI.tIE5IJ~.lLI~JII

1,NU

=

bhat(i)

=

p(i)

Do 55 j

=

1,NY

dYdUT = dYdU(ji) CTij

CC(ji)

=

bhat(i) 55 C C

c 70

bhat(i)

+ dYdUT*tempv(j)

+ CTij*Y0(j)

Continue If(NC .gt.

0) Then

Do 60 j= INC

C C60

=

bhat(i)

=

bhat(i) + 2.*alpha(j)*Beta(j,i)

Continue Endif Continue

c C** Constant Term ** c chat = 0.0 Do 80 iunit

=

l,Nunits

iu = Info(i,iunit) chat = chat + r(iu)

80

Continue INY

Do 90 i temp

0.0

=

j

Do 85

=

= temp + Y0(j)*BB(ji)

temp

85

Continue chat

90 C C C

ClO C

1,NY

=

chat + (temp + q(i))*Y0(i)

Continue If(NC .gt. 0) Then Do 100 i=

1,NC

chat = chat + alpha(i)*alpha(i)

Continue Endif

C Return End C C*******************

Initialize Coefficients of Cost Function

C

-

3.25-

*****************

I

Qapf;nn 'A

omaux.:QUA -L.C

NU,

Initialize(Nunits, Info,

Subroutine

Implicit Real*8 Parameter

=

10, MaxStr = 2,

NPmax

=

50, NFmax

NMmax

= 20, NOmax

= 10,

Common /ConDat/ alpha(NCmax),

AA(ij)

0.0

=

Continue

C = 1,NY

Do 20 j

-1,NY

BB(ij)

0.0

=

Continue

C Do 30 j

INY =

CC(i,j)

30

1,NU 0.0

=

Continue

C Do 40 i p(i)

40

=

1,NU

- 0.0

Continue

C Do 50 i q(i)

50

= =

1,NY 0.0

Continue

C Do 60 iunit iu 60

=

l,Nunits

-- Info(l,iunit)

r(iu)

= 10,

NMVmax

=

q(NYmax),

Beta(NCmax,NUmax)

Do 10 j = 1,NU

=

NCmax

phi(NYmax,NYmax),

INU

=

Do 30 i

= 50,

p(NUmax),

C

20

NYmax

10,

BB(NYmax,NYmax),

Common /StrDat/ theta(NYmax,NUmax),

Do 20 i

= 20,

Info(MaxInfMaxU)

CC(NYmaxNUmax),

10

NUmax

= 50, MaxInf = 10)

Common /CostDat/ AA(NUmax,NUmax),

Do 10 i

NY)

(A-H,O-Z)

(MaxU

Dimension

NC,

'k-Intimization

- 0.0

Continue

-

3.26

-

r(MaxU) psi(NYmax)

qpeti~n

a ,

.K.,,lra

IS teadv-Stntp Ont;mi*i-Fat;nn

-

""

C Do 70

i - lNCmax

Do 70

j = 1,NU

Beta(i,j)

70

=

0.0

Continue

C Do 80 i

=

alpha(i)

80

l,NCmax =

0.0

Continue

C Return End

-

3.27

-

%0," ILWT 716.7tgiV|

%./WtlII

11, aitI

II

p,-tnnI

71LJ

1%4nrial .Rvctam -I L I. 15 iIUUei

.

C

C

*

C Routine for solving component stream outputs at a given iteration of the

*

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, NFmax

*

NPmax

= 50,

0

NMmax

= 20, NOmax

NUmax

= 20,

NYmax

=

50,

= 10, NCmax

= 10,

NMVmax =

10,

50, MaxInf

=

=

10)

Dimension Par(NPmax), F (NFmax), Modes (NMVmax), mapX(NYmax), Y(NYmax),

Info (MaxInfMaxU),

0

Outs(NOmax),

Xold(NYmax), Xnew(NYmax), Yold(NYmax),

0

Gnew(NYmax),

Gold(NYmax)

Common /Tears/

NTears,

U(NUmax),

X(NYmax),

&

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) 2

=-

Y(i)

Continue Call System(Nunits, Cost,

* iter

=

Par,

F,

Modes,

mapX,

Penalty)

0

-

3.28-

Info,

U, Y, Outs,

*****

lqpetinn -3

.qvctam

C-----------------------------Iterative 5

Loop

+ 1

iter = iter

C C**

Define residuals for specified tear stream variables

**

C Do 10 i ipT

=

1,NTears

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 Y(i)

Yold(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)

If (dabs(Xnew(i) =

dGdX

- Xold(i))

(Gnew(i)

If (dabs (dGdX) Y(ipx)

- Yold(ipx)

.gt.

- Y(ipx)

.gt.

Tol)

Tol) -

Then

Gnew(i)/dGdX

Endif Endif 20

Continue

C C** Check Convergence c Converge =

Then

- Gold(i))/(Xnew(i)

**

.True.

-3.29

-

-

Xold(i))

**

lncil

Section 3--

System Model

Do 50 i

=

Converge

1,NY =

Converge .and. - Yold(i))/Y(i)

dabs(Y(i)

.lt.

Tol

Continue

50 C

If(.not.(Converge)

.and. iter .1t. imax) goto 5

If (.not. (Converge)) Write(*,*)

'

Then

Process equations not converged'

Endif C Return End C

C

*

C System Model: Components and Connections

*

C

*

C Subroutine System(Nunits, Outs, Implicit Real*8 Parameter

* *

Par, Cost,

F, Modes,

mapX,

Info,

U, Y,

Penalty)

(A-H,O-Z)

(MaxU

= 10, MaxStr = 2,

NUmax

NPmax NMmax

= 50, NFmax = 20, NOmax

= 10, NMVmax MaxInf = 10)

= 20, NYmax

10, NCmax

=

= 50,

= 50, =

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

-

1

=

Info(8,Nunits+l)

C

C----------------Initialize

cost coefficients-------------

C Call Initialize(Nunits,

Info,

NU,

-

NC,

3.30.

NY)

*********

Setinn 3

.,yv .-- i vr_p u

C C------------------------

Loop through all components

C Do 250 iunit =

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 ipx

=1, =

C C**

NYi

mapX(ipY+i-1)

X(ipY+i-l)

50

- 1,Nunits

itype

=

Y(ipx)

Continue Branch according to Type

**

C goto (110, 120, C 110

130,

140,

150,

160)

,itype

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), UJ(ipu),

X(ipY),

Par(ipp),

F(ipf),

Y(ipY),

Outs (ipO),

goto 200

-3.31 -

Modes(ipm), Costi(iunit))

qetinn-1

,Rvqtpm Mndpl

C Par(ipp), F(ipf), Modes(ipm),

Call Type5(Info(l,iunit),

150

U(ipu),

Y(ipY),

Outs(ipO),

Par(ipp),

F(ipf),

Y(ipY),

Outs(ipO),

X(ipY),

Costi(iunit))

goto 200 C Call Type6(Info(1,iunit),

160

U(ipu),

X(ipY),

Modes(ipm), Costi(iunit))

goto 200 C Continue

200 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 400

=

Penalty + GC(i)*GC(i)

Continue Cost = Cost + Penalty

C Return End

-

3.32

-

CQ. acuti.l

t;

Cnmnnnavi+ MeAalo %-VtlJiy;llt |VlIIeI

nI -Y

C ******* * *************************

Type

1

************************************

C C

**

COOLING TOWER **

C Par,

Subroutine Typel(Info,

F, Modes,

U, X, Y, Out,

Power)

(A-H,O-Z)

Implicit Real*8

Real*8 mwi, mwo, mwl, ma, mamax Parameter

(MaxU

=

10,

NUmax

= 20,

NYmax

Parameter (mamax

2.85e06, Pmax = 100.)

Dimension Info(1),

F(1),

Modes(1),

U(1),

=

50, NCmax

X(1),

Y(1),

=

10)

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 .eq.

If(Info(1)

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

Info(8)

=

1

Number of Streams

Info (9)

- 3

Number of Outputs

Number of Constraints

Return Endif C----------------------------------C C** Fan Power Model C C

Costs

**

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

r-nmnnna

f-t w

l

Power = Ncells*(aO + al*gama + a2*gama*gama)*Pmax C C** Modify appropriate locations in cost coefficient arrays

**

C iunit = Info(1) = Info(6)

ipu

-

1

=

Ncells*a2*Pmax

! pointer to continuous controls

c AA(ipu+l,ipu+l) p(ipu+l)

=

Ncells*al*Pmax

r(iunit) = Ncells*aO*Pmax C C-----------------------------------Inputs C (1)

! inlet air dry bulb temperature

Twb

= F(2)

! inlet air wet bulb temperature

ma

-

Tdb

SF

gama*mamax

! individual tower air flow rate

Twi =X (1) mwi - X(2)

! tower inlet water temperature ! tower

C-----------------------------------

(total) water flow rate 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

epsw

=

(Twi -

Two) / (Twi

-

outlet mass flow rate

Twb)

tower water effectiveness

Out (1) = Two Out (2)

= Power

Out (3)

= epsw

Return

-

3.34-

n t "lVIIil

**

Uf I

l'e UCA5 !

2l~':lr

+ lk if -,,Ar,, I r, W% 4-% " Am A rn F%

End C C------------------------ Cooling Tower Outlet Conditions C Twl,

Flw,

0.37,

Cpw

Twb,

Subroutine Tower(Tdb,

Fla,

Two)

(A-H, O-Z)

Implicit Real*8 Real*8 Ntu (Cl

Parameter

2.0, C2

=

Tol

=

1.e-10,

=

imax-

=

1.0,

Tmain

=

55.,

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 Twb,

rh,

Tdp,

Call DPsych(2,

1, Tdb,

Call DPsych(2,

1, Twl, Twl, rhwl,

wal,

hal)

Tdpwl, wwl,

hwl)

ww2,

hw2)

iter = 0 Told

=

Tw2

Call DPsych(2,

1, Tw2, Tw2,

rhw2,

Tdpw2,

Call Outlet(Ral, Ntu, Cpw, hal, wal, Twl, hwl, Tw2, hw2, wa2, GI) = Told - G1

Tw2

.gt.

If(abs(Gl)

10

Tol)

Then

iter = iter + 1 Call DPsych(2,

1, Tw2,

Call Outlet(Ral, hw2, =

Told

=

G1

= G2

Tw2

=

Ntu, Cpw, hal, wal, Twl,

hw2)

hwl, Tw2,

wa2, G2)

Gl)/(Tw2 -

(G2 -

dGdT

Tw2, rhw2, Tdpw2, ww2,

Told)

Tw2 Told

If(abs(G2)

.gt.

-

G2/dGdT Tol

.and.

iter

.lt.

Endif C

C** Steady-State Sump Analysis

**

-3.35-

imax)

goto

10

Section 3

C-Omnnnipnt Unriale

C rloss = Fla*(wa2 Two

-

wal)/Flw

(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 Real*8 Ntu, Parameter

(A-H,O-Z)

mstar (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

hw

=

hal + (ha2

Tw

=

Tsat (hw)

-

-

hal)

hal)/(I.

exp(-Ntu))

-

-

3.36-

**

+

**

I

Component Models

Section 3 Call DPsych(2,

1, Tw,

wa2

= ww + (wal

Ra2

- Ral -

(wa2

Tw,

rhw,

ww,

Tdpw,

hw)

ww)*exp(-Ntu)

-

wal) -

Tw2new = Tref + (Ral*Cpw*(Twl-Tref)

(ha2 -

C C**

Define residual for secant method solution

C G = Tw2 -

Tw2new

C Return End

-3.37

-

**

hal))/Ra2/Cpw

Qadt;nn

O.

t[

I

L ! lVI

3

VII

,w

k

r An,

tlUUI11

m, 4

-

,

I/Ii'...4 ^ I ..,

I.UIo

l

C Type 2 ********************************

************************************

C C

CHILLER

**

**

C Subroutine Type2(Info, Implicit Real*8

Par,

F, Modes,

U, X, Y, Out,

Pch)

(A-H,O-Z)

Real*8 mchws, mcws Parameter

(MaxU

Parameter

(Cpw

=

10, NUmax

20,

=

NYmax

=

50,

NCmax

U(1),

X(1),

=

10)

1.0)

=

Dimension Info(1),

Par(1),

F(1),

Modes(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

Info (4)

= 0

Info (5)

=

1

Number of Mode Variables

Info(6)

=

1

Info (7)

=

0

Number of Continuous Control Variables Number of Constraints

Info (8)

= 2

Number of Streams

Info (9)

= 3

Number of Outputs

Number of Parameters Number of Forcing Function Variables

Return Endif C------------------------------------

Costs

--------------------

C C** Chiller Power Model

**

C C

Power = Nch*Pdes*(aO + al*(Qload/Qdes)

+ a2*(Qload/Qdes)**2

C

+ a3*(Tcwr-Tchws)/DTDES + a4*((Tcwr-Tchws) /DTDES)**2

C

+ a5* (Qload/Qdes) * (Tcwr-Tchws) /DTDES

C Ich

=

Par (1)

Chiller choice (1 to 4)

Qcap

=

Par (2)

Design chiller capacity

-

3.38-

2

Nch

= Modes (1)

! Number of chillers in

parallel

Tchws

=

! Chilled water supply setpoint

C U(1)

C ! Chilled water return temperature

Tchwr = X(l) mchws

=

X(2)

! Chilled water flow rate

Tcws

=

X(3)

! Condenser water supply temperature

mcws

= X(4)

! Condenser water flow rate

C C** Determine individual chiller performance (loaded evenly)

**

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

=

+ b5*Tchws*Tcwr

b4*Tcwr**2

C

+ b3*Tcwr +

+ b2*Tchws**2

bO + bl*Tchws

C bO = Nch*Pdes*(aO

+ al*(Qload/Qdes)

+ a2*(Qload/Qdes)**2)

+ a5*(Qload/Qdes)/DTdes)

bl = -Nch*Pdes*(a3/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 +

+ b5*Tchws*Tcwr

b4*Tcwr**2 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

r(iunit)

=

bO

AA (ipu+l, ipu+l)

- b2

p (ipu+l)

=

bl

-

3.39-

output stream vector

A"Vn

2-*

nPt r

r%d%,w%^ . 74M

t'll'uuuutent

BB(ipy+3,ipy+3)

-=b4

q(ipy+3)

= b3

CC(ipy+3, ipu+l)

=

.I

-

-

ivtoaets

b5

C C----------------------------------Outputs-----------------------------------C Y(1)

= Tchws

Y(2) = mchws Tcwr

Y(3)

=

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), Qcaps(4),Qdess(4),

a2s(4), a3s(4), a4s(4),

dTdess(4),

Pdess(4)

0.07336,

0.0516,

0.1107,

0.2642/

Data als/-0.32590,

1.2199,

0.3198,

0.0207/

Data a0s/

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/

/5500.,5500.,1250.,

550.1

Data Qdess /5421.,5421.,1250.,

550.!

Data Qcaps

Data dTdess/

46.,

46.,

50.,

50.!

-

3.40 -

a5s(4),+

n

LJiiLI

2~~+

I

rllmnA,%r%,mlft+ NAd-%Anlcat [viU.II

"lJuua

Data Pdess /3580.,3627.,

961.,

453./

/1.0/

Data Cpw

C c------------------------- Chiller Parameters C C Ich chooses the chiller C C

Ich = 1 for the D/FW variable-speed chiller

C

Ich = 2 for the D/FW vane controlled chiller

C

Ich

C

3 for the chiller from Lau's study Ich = 4 for the chiller from Hackner's study =

C

aO

=

a0s(Ich)

al = als(Ich) a2 = a2s(Ich) a3 = a3s(Ich) a4 = a4s(Ich)

-

a5 = ass (Ich) C C** Scale design conditions according to specified capacity

**

C fdes

= Qcap/Qcaps(Ich)

Qdes

= fdes*Qdess(Ich)

dTdes = dTdess (Ich) = fdes*Pdess(Ich)

Pdes 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. root

0)

Then

=

dsqrt (Sqrd)

=

0.0

Else root

- 3.41-

Component Models

Section 3 Endif y = If(Y

(-B -

.LT.

C C--------------

root)/2./A 0)

Y

=

(-B + root) /2./A

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

W% I&! AM

Al

iectloll ,

%fliUnlti

voUUels

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 10, NUmax

=

Parameter

(MaxU

Parameter

(mmax = 1.e07, mchdes dP0

=

- 30.,

dPTdes

=

20, NYmax =

5.,

rhow = 62.4, effmax-

Dimension Info(1), Dimension a(3),

F(1),

W(3),

dPCdes

=

cony

- 2.5e06,

U(1),

dPmax = 100.,

10., =

X(1),

- 10)

NCmax

5.eO6, mTdes

0.80,

Modes(1),

= 50,

144*3.765e-07)

Y(1),

Out(1)

Ginv(3,3)

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 .eq. 0) Then

If(Info(1)

Info(3) = 0 Info(4) = 0 Info(5) = 3

Number of Parameters Number of Forcing Function Variables Number of Mode Variables Number of Continuous Control Variables

Info(6)

- 1

Info(7)

=

0

Info(8)

=

1

Number of Constraints Number of Streams

Info(9)

=

3

Number of Outputs

Return Endif C C------------------------------------ Inputs-----------------Npumps = Modes (1) Nch

=

Modes (2)

NCells = Modes (3)

Number of pumps operating in parallel Number of chillers operating in parallel Number of tower cells operating in parallel

gama

=

u(1)

Relative pump speed

Twi

=

X(1)

Pump water inlet temperature

mwi

=

x(2)

Pump water inlet flow rate

-3.43-

n'

QapC a

rnmnn",m"t

%,L11,

111V!!U IIl

C Costs

--

C

C C** Pump Power Model

**

C C

dPPump

=

dPmax*(I -

C

dPChiller

=

dPCdes*(mwo/Nch/mchdes)**2

C

dPTower

=

dPTdes*(mwo/Ncells/mTdes)**2

(mwo/Npumps/mmax)**2)*gama**2

C C C

Work

mpump*dP*conv/rhow/effp

=

C** Fit quadratic to three points over a small range

**

C -

Ksys

dPCdes*( (Npumps*mmax)/(Nch*mchdes) )**2 + dPTdes* ( (Npumps*rnmax) / (Ncells*mTdes) ) **2 = 0.05

dgama

gammin = (dP0ldPmax)**0.5

= Dmaxl (gammin,

gamal

+ 0.005

gama-dgama)

Do 50 i = 1,3 gamai c

=

gamal +

=

(i-l)*dgama

(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)

50

=

gamai**(j-1)

Continue

c Call Dinvert(3, 3, Ginv, iflag) Do 60 i - 1,3 a(i)

=

0.0

Do 60 j a(i)

60

- 1,3 =

a(i) + Ginv(i,j)*W(j)

Continue

C C**

Modify appropriate locations in cost coefficient arrays **

-

3,44

-

X4^Anic LtIIUe

IS

Models ydbI'. rNzaanAnIt MvA Comonennt

SIetinn3

2 ftAz3

C Info (1)

iunit

-

ipu

= Info(6)

-

ipy

= Info(8)

-

1 1

pointer to continuous controls 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---------------------------------C Two

= Twi

c

=

Outputs------------------------------------

(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) Y(1)

= Two

Y(2)

=

mwo

Out (1)

= mwo

Out (2)

= Work

Out (3)

=

Outlet temperature Outlet flow rate

effp

Return End

-

3.45-

-3 lqartinn L.IC71-LlNJE

-'nm

Cnvii

"

nnn,)n t lMAndl-i ai

MI

C 4******************

*************************Type

C C

**

Air Handlers

**

C Subroutine Type4(Info,

Par,

F,

U, X, Y, Out,

Modes,

Cost)

Implicit Real*8 (A-H,O-Z) mwo,

Real*8 mwi,

ma,

mamax,

mamb

Logical Converge Parameter

(MaxU = 10, NUmax

Parameter

(Xdes = 0.1, Tz hfg

75.,

1054., Penalty

=

Dimension Info(1), Par(l), Y(1), Out(1) Common /CostDat/ Common /Constr/

=

20, NYmax

=

Cpa =

F(1),

=

=

50,

0.24,

Cpw

NCmax =

=

10)

1.0,

1.)

Modes(l),

U(1),

X(1),

AA(NUmax,NUmax),

BB(NYmax,NYmax),

CC(NYmax,NNUmax),

p(NUmax), q(NYmax), r(MaxU)

GC(NCmax)

Common /Load/ Qcoil C C-------------------------

Type Info on First Call----------------------------

C If(Info(1)

.eq.

0)

Then

Info (3)

= 2

Info(4)

=

Info (5)

= 0

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

4

Number of Parameters Number of Forcing Function Variables Number of Mode Variables

Return Endif C C-

---------------------------------

Parameters

C mamax = Par (1) Pmax = Par (2)

! Maximum air handler flow rate

mamb

! Ambient ventilation air flow rate

=

Xdes*mamax

! Maximum air handler fan power

-

3.46

-

" I ^ +; A,%

C-

rnMnnnan+

~J~.LIUII .2

C'm

-Vl'Ju'Ij'tIcIl

-IInputs

u-

C gama Twi

- U (1)

mwi

=

X(2)

Chilled water inlet flow rate Load sensible energy requirement

wgain

=

*12000. F (2) *12000./hfg

Tamb

=

F (3)

Ambient dry bulb temperature

Twb

=

F(4)

Ambient wet bulb temperature

Relative fan speed Chilled water inlet temperature

Qsens

Load humidity gains

C 1,

Call DPsych (2, ma

=

gama*mamax

Xamb

=

mamb/ma

Tamb,

rh, Tdp,

Twb,

wamb,

hamb)

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, hamb,

Xamb,

Call AHU(ma,

0.95, Tdps, was, has) Tz,

wamb,

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

=

aO =

U(1)

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) = Info(6) ipu

-

1

! pointer to continuous controls

-

3.47

-

**

IA^Amio

£viuucts

4z,pt;nn _3C'LI

lI

C'nm nnnpnt I MXnic 1c --.L.v V.l I.

I

ipc

Info(7)

=

! pointer to equality constraint

-

1

=

a2*Pmax

C

AA(ipu+l,ipu+l) p(ipu+l)

= al*Pmax

r(iunit)

= aO*Pmax

C C** Penalty for not maintaining zone temperature

**

C g = Penalty*(Qsens -

gama*mamax*Cpa*(Tz

GC(ipc+l) = g Cost

Pfan

=

C C

----------------------------------

Outputs

C = mamb*(hamb - haz)/12000.

Qamb

(Qsens + wgain*hfg)/12000.

Qzone =

Qcoil = Qzone + Qamb = ma*(wal -

Qlat

was)*hfg/12000.

C Two

=Twi

mwo

= mwi

+ 12000.*Qcoil/mwi/Cpw

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-

- Ts2))/12000.

Cnmnnltn

z5ectliln J2

i

,ai.

AI.

^U.

uutlen t --tvi weis

C 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 Iterative solution air handler for exit humidity ratio

C----------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)

10

.gt.

Tol)

Then

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

*

Determine mixed air return to air handler

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

-

Component Models

Section 3 C C C

This routine determines the thermal performance of a cooling coil using an

*

C

effectiveness model as described in Chapter 4.

*

C

*

C Subroutine Coil(wal, hal, ma, Twl, mw, Ta2, wa2, Tw2,

eps)

(A-HO-Z)

Implicit Real*8

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 1.70*(ma/mades)**-0.38 2.25* (mw/mwdes) **-0.2

NTUo NTUi

=

Ra

- mw/ma

=

Call DPsych(2,

6,

Call DPsych(2,

1, Twl,

Twsav

=

Tal,

Twbl, Twi,

rh, rhwl,

Tdp,

wal,

Tdpwl,

Tw2

- 3.51 -

hal)

wwl,

hwl)

e C!^d%+2^lmk

I

c C.Omnnnant Mnil C-AT- 1nnnil .nk Nitn,I .c

A

I 2

C

C**

Dry analysis **

C

C

Determines the air effectiveness (epsd) and outlet water temperature (Tw2) assuming the coil is dry If the surface temperature at the outlet is greater than the air entering dewpoint then coil is completely dry, otherwise do the wet

C

analysis

C C

C Cstar = Cpm/Ra/Cpw NTUo/(l. + NTUo/NTUi*Cstar)

NTUd

=

C

= exp(-NTUd*(l.

epsd

=

Tw2

- Twl + epsd*Cstar*(Tal - Twl)

.Ta2

=

Tal - epsd*(Tal - Twl)

Ts2

=

Twl + Cstar*NTUd/NTUi*(Ta2 -

ha2

=

hal -

wa2

- wal

Dry

=

-

Cstar))

- Cstar*C)

(1. - C) / (.

Cpm*(Tal -

Twl)

Ta2)

C .gt. Tdp

Ts2

If(.not. Dry) Then C C** Wet Coil **

C C C C C C C

Determines the air effectiveness (epsw) and outlet water temperature (Tw2) assuming the coil is wet The average saturation specific (Cs) heat depends upon the outlet conditions: Therefore an iterative solution If surface temperature at water outlet is less than the dewpoint of the entering air then the coil is completely wet iter = 0 Tw2

= Twsav

Call WetCoil(Ra, NTUi, NTUo, Cpw, hal, Twl, hwl, Tw2, Tsl, ha2, GI) • Told

=

Tw2

Tw2

=

Told

If (dabs(Gl) 10

iter

=

-

Gi Tol)

.gt.

Then

iter + 1

Call wetCoil(Ra,

NTUi,

NTUo,

-

3.52-

Cpw,

hal,

Twl,

hwl,

CA^;9%

If(dabs(Tw2 dGdT =

(G2

.gt. Tol) Then

Told)

-

G2)

ha2,

Tsl,

Tw2,

GI)/(Tw2 - Told)

-

Told = Tw2 G1

= G2

If (dabs(dGdT) Tw2

.gt.

- Told

Tol)

Then

G2/dGdT

-

Endif Endif If(dabs(G2)

.gt. Tol

.and. iter

.lt. imax) goto 10

Endif

Endif C C

**

Determine if all Wet

**

c Wet

=

(.not.

If(Wet)

Dry)

.and.

(Tsl .lt.

Tdp)

Then

hsavg = hal -

(hal - ha2)/(l.

- exp(-NTUo))

Tsavg = Tsat(hsavg) = Tsavg + (Tal - Tsavg)*exp(-NTUo)

Ta2

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, hal,

Twl,

hwl,

Tw2,

Twx,

fdry,

epsd,

Tdp,

Gl)

Told = Tw2

Tw2

=

Told -Gi

If(abs(Gl)

20

iter

=

.gt.

Tol)

Then

iter + 1

Call Dry_Wet(NTUi, •

Tdp,

If (dabs(Tw2 dGdT

=

(G2

NTto, hal,

Told)

-

NTtd,

Twi,

.gt.

GI)/(Tw2

Ra,

hwl,

Tol)

-

3.53

Tw2,

Then

Told)

-

-

Cpm,

Cpw,

Twx,

Cstar, fdry,

Tal,

epsd,

G2)

:&%i c2nA 3-ectlull -'I

rnmnnnant X4f%.rialc!

T--,IjlllLj licift Ivigursib

Told = Tw2

= G2

G1 Tw2

Then

Tol)

.gt.

If (dabs(dGdT)

Told - G2/dGdT

=

Endif Endif iter .1t.

Tol .and.

.gt.

If(abs(G2)

imax)

goto 20

Endif Ra*Cpw*(Tw2 - Twl)

ha2 = hal -

Tax = Tal - epsd*(Tal - Twx) hax

=

hal - Cpm*(Tal -Tax)

hsw

=

hax + (ha2 - hax)/(i.

EXP(-(l.-fdry)*NTUo))

-

Tsw = Tsat(hsw) (Tax -

Ta2 = Tsw +

Tsw)*EXP(-(l.-fdry)*NTUo)

5, Ta2,. Twb2,

Call DPsych(2,

rh2,

ha2)

Tdp2, wa2,

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, Cs

=

(hw2 -

rhw2,

1, Tw2, Tw2, hwl)/(Tw2 -

Tdpw2, ww2,

Twl)

mstar = Cs/Ra/Cpw

NTUo/(l. + NTUo/NTUi*mstar)

NTUw

=

C

- exp(-NTUw*(l.

epsw

=

(1.

Tsl

=

Tw2 + NTUw/NTUi*(hal

-

C)/(l.

-

mstar)) mstar*C) -

hw2)/Ra/Cpw

-

3.54.-

hw2)

*****

¢ IIUI!

ha2

= hal

G

=

a

lVilUUIIlIIu ivioUUeI

- epsw*(hal - hwl) (Twl + (hal - ha2)/Ra/Cpw)

Tw2 -

Return End C Dry & Wet Coil Analysis

*

**

*

C Subroutine DryWet(NTUi, NTUo, NTUd, Ra, Tdp, hal, Twl, hwl, Implicit Real*8

Cpm, Cpw, Cstar, Tal,

Tw2, Twx,

fdry, epsd, G)

(A-H,O-Z)

Real*8 NTUo, NTUi, NTUd, NTUw, mstar C EXPK

-

((Tdp

=

+ Cstar* (Tal

Tw2)

- Tdp))/

- Cstar)/NTUo) /(Tal

(1. - NTUd*(1.

-

Tw2)

EXPK = Dmaxl(1.d-06,EXPK) fdry = -1./NTUd/ (1. - Cstar) *Dlog(EXPK) -

fdry = Dmaxl(l.d-06,Dminl(l.dO C

= exp(-fdry*NTUd*(l.

epsd

=

(1. -

C)/(1.

- Cstar))

- Cstar*C)

Call DPsych(2, 1, Twx, Twx, =

Cs

(hwx -

l.d-06,fdry))

hwl)/(Twx -

rhwx, Tdpwx, wwx, hwx) Twl)

mstar = Cs/Ra/Cpw NTUw = NTUo/(l. + NTUo/NTUi*mstar) C

=

epsw = (1. Twx

=

C)/(1.

-

-

mstar*C)

(Twl + Cstar/Cpm*epsw*(hal -epsd*Cpm*Tal -

(1. G

- mstar))

exp(-(l.-fdry)*NTUw*(l.

= Tw2-

-

hwl))/

Cstar*epsw*epsd) (Cstar*epsd*Tal + (1. -

C Return End

-

3.55-

Cstar*epsd)*Twx)

Comnnnent Mndplc

Cml.+; ein I

C C* **********************************

5

Type

*

C CHILLED WATER PUMPS

**

C

Par,

Subroutine Type5(Info,

Modes,

F,

**

U, X, Y, Out,

Work)

Implicit Real*8 (A-H,O-Z) mchdes,

mpump,

mmax,

mwo,

Real*8 mwi,

Ksys

Parameter

(MaxU = 10, NUmax

Parameter

(mmax = l.e07, mchdes = 5.e06, dPO - 100.,

dPmax cony

=

Dimension Info(1), Dimension a(3),

=

rhow

20, NYmax

62.4,

=

=

NCmax

50, =

effmax

20.,

=

10)

dPCdes

=

25.,

- 0.80,

144*3.765e-07)

F(1),

W(3),

Modes(1),

U(1),

X(1),

Y(l),

Out(1)

Ginv(3,3)

Common /CostDat/ AA(NUmaxNUmax), BB(NYmax,NYmax), CC(NYmax,NUmax), p(NUmax), q(NYmax) , r(MaxU) C C-------------------------- Type Info on First Call -------------C .eq.

If(Info(1)

0)

0

Then

Info (3)

=

Info (4)

= 0

Number of Parameters Number of Forcing Function Variables

Info (5)

= 2

Number of Mode Variables

Info(6)

=

1 - 0 = 1 = 3

Number of Continuous Control Variables

Info (7) Info (8) Info (9)

Number of Constraints Number of Streams Number of Outputs

Return Endif C c Npumps = Modes(1) Nch

= Modes(2)

gama

= U(1)

SNumber of pumps operating in parallel ! Number of chillers operating in parallel ! Relative pump speed

Twi = X(1)

! Pump inlet temperature

mwi = X(2)

! Pump inlet flow rate

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

Costs

3.56 -

.qpetion -I-

-

r1

iV.i.1

Cnmnflnlldt

k"

VV

C C** Pump Power Model

**

C C

dPPump

= dPmax*(1 -

C

dPChiller

= dPCdes*(mwo/Nch/mchdes)**2

(mwo/Npumps/nax)**2)*gama**2

C C

Work = mpump*dP*conv/rhow/effp

C C** Fit quadratic to three points over a small range **

C dPCdes*(

Ksys

=

dgama

= 0.05

gammin

=

gamal

=

(Npumps*mmax)/(Nch*mchdes)

)**2

(dPO/dPmax)**0.5 + 0.005 Dmaxl(gammin,

gama-dgama)

Do 50 i = 1,3 gamai = gamal + c =

(gamai**2 -

(i-l)*dgama 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) = mpump*dP*conv/rhow/effpi

W(i)

Do 50 j = 1,3 Ginv(i,j) 50

=

gamai**(j-l)

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)

60

+ Ginv(i,j)*W(j)

Continue

C C** Modify appropriate locations in cost coefficient arrays C iunit

=

Info(1)

ipu

=

Info(6)

-

1.

ipy

=

Info(8)

-

1.

! pointer to continuous controls pointer to output variables

-

3.57-

**

%IIIIil

U1nfiatxec

L lviucill3

i

Q

Iaf fn

O-S.tivli l

A

0

-VILLlUUmjl

'll

AA (ipu+ 1, ipu+1)

= Npumps*a(3)

p (ipu+l)

= Npumps*a (2)

r (iunit)

= Npumps*a(I)

C---------------------------------C c

=

(gama**2

Outputs------------------------------------

- dPO/dPmax) / (1 + Ksys/dPmax)

mpump = mmax*c**0.5 = Npumps*mpump

mwo Two

Twi

=

Y ()

=

Two

Pump outlet temperature

Y(2)

=

mwo

Pump outlet flow rate

Work

=

Npumps*(a(1) + a(2)*gama + a(3)*gama*gama)

effp

=

effmax* (3.66* (mpump/gama/mmax) 3.30* (mpump/gama/mmax)**2)

C

C Out (1)

= mwo

Out (2)

= Work

Out (3)

= effp

l,

C Return End

-

3.58

-

oUUeIs

.qetilnn

V

m.

Data S amnle qmmrI GLm %P a-IFS&t "

m V mm 9

L'u" j &

Timesteps: Units: Data Values

4

5,

15,

..

4

1

4 Mode Variables:

1

141

Mode 1 Values:

1 Discrete Control Mode

1, 4

Unit 1 Type 4 AHU

8.e06, 1000. 1 2 3 4

maximum air flow and power

0.1,

0.452, 3,

Four Forcing Functions 2.0

1

Relative Fan Speed

40.

Inputs from Unit 3 Stream 1 Initial Input Values

1.e07

2,

5

Unit 2 Type 5 Chilled Water Pumps

i,

2

First and Second Mode Variables

0.52, i,

0.50,

2.0

Relative Pump Speed Inputs from Unit 1 Stream 1

1 1.e07

40.

Initial Input Values

3, 2

Unit 3 Type 2 Chiller

1 5500.

D/FW Chiller, 5500 Tons

2

Second Mode Variable: Number of Chillers 38.

55.

Chilled Water Set Temperature

55.

Inputs from Unit 2 Stream 1

2, 1

Initial Input Values

l.e07

50.

Inputs from Unit 5 Stream 1

5, 1 70.

Initial Input Values

l.e07

4, 1

Unit 4 Type 1 Cooling Tower

3

Forcing Functions: Dry and wet Bulb Temp.

4

3

Mode Variable for'number of cells

0.428 0.2 2.

Fan Control

3,

Inputs from Unit 3 Stream 2

2

85. 5, 4

1.e07 3 2

Unit 5 Type 3 Pump Three Mode Variables

3

0.673,

0.57,

2.0

Relative Pump Speed Inputs from Unit 4 Stream 1

4, 1 70.

Initial Input Values

1.e07

Initial Input Values

-

3.59

-

Samnlo n1nt. LIAAtl Vw --LoFQ L-Q

;etinn 3

60

T

1

Only 1 Tear Variable

411

Unit 4 Stream 1 Variable 1

3

3 Printers

5

Power Consumptions

1,3 2,2 3,3 4,2 5,2 Cooling Tower and Pump Outputs

5 4,1 4,3 3,1 5,1 5,3 6

Chiller, Pump, and AHU Outputs

3,2 2,1 2,3 , 1 I, 2 1,4

1000.

200.

80.

70.

! each line of data gives zone sensible

1750.

350.

80.

70.

! and latent load and ambient dry bulb

2500.

500.

70.

! and wet bulb temperature

3250.

650.

80. 80.

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.

70.

-

3.60-

I

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

-

nvnnmir Onfi*m;-Ynfi-irw%

4

aec;tlou+I "p'

'T

I-ulll.V

/

lllz,

C Program for determining the optimal cost for a cooling plant with Intially, a course grid is C storage using dynamic programming. The Each successive iteration produces a refined grid. C utilized.

*

C iteration is terminated when the total optimal cost does not change

*

C significantly.

*

* *

C (A-H, O-Z)

Implicit Real*8

Integer Stage, StageOn Parameter (MStages = 24, MTimes = MStages + 1) Dimension Xopt(MTimes), DX(MTimes) Qloads (MStages) , Twbs (MStages),

Common /Ahead/

Rates (MStages)

Common /Limits/ Qchmin, Qchmax, Qsmin Common /Stor/ Delt, Cap, Ttop, Tbot Common /ModelCoef/ -

Adir(2,2),

bdir(2),

cdir,

Ach(3,3), Adch(3,3),

bch(3), bdch(3),

cch, 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 Timestep associated with each stage

Delt

=

1.

Cap

=

.1500.

Capacitance of storage

Qchmin

=

1000.

Minimum allowable chiller load (surge)

Qchmax

=

5500.

Qsmin

=

100.

Maximum allowable chiller load (capacity) Minimum allowable storage charge & discharge

Ttop

=

60.

Tbot

=

40.

Controlled return temperature for discharge Controlled supply temperature for charging

C c

Read input data and generate load and wet bulb data **** 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.

C***

-4.1-

LiH

l

.qpetnn 4 -

I LYV%,LIUII

vm;wdr, flvn~mr a-PaAlAalliMS,_%JL)LtllllziltlulI

-T

Read(10,*)

Nstor,

CapI,

Read(lO,*) Qld avg,

dstor,

Q Range,

Xinit

Icntr,

Qadd

Read(10,*) Twbavg, TRange Read(10,*)

RateOn,

RateOff

Do 10 i = 1, Nstages = sin(pi/12*(i - 4))

Vary

If(Icntr .eq. 1 .or. i .le. 10

.or. i .ge. 22) Then

Qloads(i) = Qld_avg + QRange*Vary If(i .eq. 22) Qloads(i)

=

Then Qloads(i) + Qadd

Endif Else Qloads(Stage)

=

0.0

Endif Twbs(i)

=

Twbavg + TRange*Vary

If(i .le. 12) Rates(i)

Then

= RateOn

Else Rates(i) = Rate Off Endif 10

Continue

C C***** Read Curve-Fit Coefficients for Minimum Power Consumptions

*****

C P

f'Af + b'f + c

C

The form of the curve-fits are:

C

where f is a vector of uncontrolled (forcing function) variables and

C

A, b, and c contain coefficients of the fit.

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

C

(chillers off).

=

The five possible modes

(no load),

5) full discharge

C Read(11,*) Read(1l,*)

((Adir(i,j),i=1,2),j=1,2), (( Ach(i,j),i=1,3),j=1,3),

(bdir(i),i=1,2), ( bch(i),i=1,3),

cdir 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),

(btdch(i),i=1,2),

ctdch

j=l,2),

-

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)

25

1.0

=

Continue

C Call Dynamic Programming Routine

C******************

******************

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)

= Xopt(Stage+1) Xj 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 Power,

CostOpt,

CostDir

Continue

50

Write(12,105) Total, Tot Dir C 200

Continue

C 101

Format (A20)

102

Format(10(1x, F6.1))

103

Format(//2x,'Stage, XI, 'Cost (Opt),

XF, Rate, Twb, Qload, Qch, Power, Cost(Dir)

,

1/)

104

Format (2x, 12,3 (2x,F4.2), 2x,F5.1,5 (lx,F8.2))

105

Format(/2x,'Optimal Cost = ',F8.2f /2x, ' Direct Cost = ',F8.2)

999

Format(//2x,'**** Storage Capacity

',F8.2,'

=

****')

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

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 C

DX Total

= initial bounds on dynamic programming grid = minimum total cost

(between times)

C Implicit Real*8 (A-H, O-Z) Parameter (M_States = 51, M_Stages integer First,

Stage,

Statei,

Dimension Xopt (Nstages+1), Xmax (MTimes) ,

=

Statej,

24, M_Times

MStages + 1)

FNode(M_States,

DX(Nstages+1),

MTimes)

Xmin(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

0

iter-

C ********************

Main loop for refining grid

*****************

C 5

Continue iter = iter + 1

C C---------------------------C C C

Initializations

= Minimum cost-to-go from state i, stage j until the end FNode(i,j) = pointer to state at next stage along optimal path from Togo(i,j)

C

state i, stage j

C Do 15

i = 1,Nstates

Do 15 j

15

=

1,Nstages+l

Togo(i,j)

=

1.e+20

FNode(i,j)

=

0

Continue Togo(FirstNstages+1)

=

0.0

Do 20 i = 2,Nstages

Xmin (i) 20

Xmax(i) Continue

= Dmaxl (Xlow, =

Dminl (Xhigh,

Xopt(i)

-

Xopt (i)

+ DX(i))

DX(i))

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 -

Dvnamie

'Roction 4 L

V t

&%Z

_tDan-Y

Do 40 Statei

-

Do 30 Statej

i

Ontimi7ntinn LnL

1,Nstates =

1,Nstates

C If at first stage, then

C

Compute optimal stage costs between states.

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 40 50

Continue Continue Continue

C C---------- Refine the grid and recalculate optimum if necessary C If(Abs(Total - Togo(First,,1))/Togo(First,,1) iter Total Statei

=

.lt.

imax)

.gt. Tol .and.

Then

Togo(First,l) =

First

Do 100 Stage = 2,Nstages

Statei = FNode(StateiStage-1) Xopt(Stage) = Xmin(Stage) + • If(

(Statei-1) * (Xmax (Stage) -Xmin (Stage) ) / (Nstates-1) .gt. Tol .and. dabs(Xopt(Stage) - Xmax(Stage))

*dabs *dabs(Xopt

(Xopt (Stage)

-

Xmin(Stage))

.gt.

Tol .or.

(Stage)

-

Xlow)

.lt.

Tol .or.

-

Xhigh)

.lt.

Tol ) Then

*dabs(Xopt(Stage)

-4.6-

I

ai a

n

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

C

Function for determining minimum costs between states *

Xi,

Function Cost(Stage, Implicit Real*8

Xj,

Qch,

Power)

(A-H, O-Z)

Integer Stage Parameter (MStages

24)

-

Common /Ahead/ Qloads(MStages), Twbs(MStages), Rates(MStages) Common /Limits/ Qchmin, Qchmax, Qsmin Common /Stor/ Delt, Cap, Ttop, Tbot Qload

= Qloads (Stage)

Twb

= Twbs (Stage)

Qdisch = Cap*(Xi - Xj)*(Ttop - Tbot)/Delt Qch

=

Qload - Qdisch Chiller Capacity Check **********************

C If(Qch .gt. Qchmax .or. Qch .1t. 0.0) Then Cost = l.e+20

Return Endif C C****************** Branch According to Mode of Operation C

4.7-

*

4 C ^d:

a

A

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 C** Full Charge with N'~oLoad ElseIf(Qch .gt. Qchmin) Then Call System(4, Qload, Twb, Qstor, Power)

-

4.8 -

Qcietinn

f)vnnTnie

L

k.1LJ/,!,Li J!

"-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 - Qload

Qsoff

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 1cq

t..l.Iu ll

D'vnnim;

"I'

.

ie

m

Iti

C c** Chiller and storage limits exceeded C ElseCost

=

l.e+20

Return c Endif c Endif C Cost = Rates (Stage) *Power*Delt C Return End C *

C C

Routine for determining minimum power consumption for equipment

* *

C C Subroutine System(Icntr,

Qload,

Twb,

Qstor,

Power)

Implicit Real*8 (A-H, O-Z) Dimension f(3) Common /ModelCoef/

Ach (3, 3),

bch (3),

cdir, cch,

Adch (3, 3),

bdch (3),

cdch,

Atch(2,2),

btch (2),

ctch,

Adir(2,2),

Atdch(2,2),

C********************

bdir (2),

btdch (2),

Set-Up Uncontrolled Variables

C f(l) = Qload f(2)

ctdch

= Twb

f(3) = Qstor Goto (100, 200, 300,

400, 500)

,Icntr

4.1O-

*****

.7ainn A

UlllLai i

ll

.Dvnnmioi%kjUtImizatioll ."JaLaIlILIL;

qetinn #1

C**

Direct Mode:

C

Compute optimal power based upon chiller load and wet bulb

All control variables are free!

C 100

Continue Power = cdir Do 10 i

1,2

=

temp = 0. Do 5 j

1,2

=

temp = temp + Adir(i, j) *f(j) 5

Continue Power = Power + (temp + bdir (i))*f(i)

10

Continue goto 1000 Partial Charge Mode:

C C

fixed chiller supply!

Compute optimal power based upon chiller load, wet bulb, and storage charging rate

C 200

Continue Power

cch

=

1,3

Do 20 itemp

0.

=

j

Do 15 temp 15

1,3

=

temp + Ach (ij)

=

*f (j)

Continue Power = Power + (temp + bch(i))*f(i)

20 Continue goto 1000 C C C**

Partial Discharge Mode:

C

Compute optimal power based upon chiller load, wet bulb, and

C C

storage discharging rate

300

fixed AHU water return! **

Continue Power = cdch Do 30 i temp

1,3

= =

0.

-4.11 -

**

I

CrapMn

Dvnrl~nt

d

Do 25 j

1,3

=

temp

temp + Adch(i, j) *f (j)

=

Continue

25

Power

Power + (temp + bdch (i) ) *f (i)

=

Continue

30

goto 1000 C C**

Full Charge Mode:

C

Compute optimal power based upon chiller load and wet bulb

fixed chiller supply and return

C 400

Continue f(1)

Qstor

=

Power

=

Do 40 i temp

ctch

1,2

=

0.

=

Do 35 j temp

1,2

= =

temp + Atch(i, j)*f(j)

Continue

35

Power

Power +

=

(temp + btch(i))*f (i)

Continue

40

goto 1000 C

C**

Full Discharge Mode:

C

Compute optimal power based upon chiller load and wet bulb

fixed chiller supply and return

C 500

Continue Power

ctdch

=

Do 50 i temp

1,2

= =0.

Do 45 j temp

1,2 =

temp + Atdch(ij)*f(j)

Continue Power = Power + (temp + btdch (i) )*f (i)

45

Continue

50 C 1000

Continue

C Return End

- 4.12 -

rn;m-nt nn

i

Section 5 Utility Routines

NonLinear Equation Solver This routine solves N non-linear equations in N unknowns using a damped Newton's method.

5.1

Matrix Inverse This routine determines the inverse of a NxN matrix.

5.4

Psychrometrics Routine for determining properties of moist air.

5.7

Freon Properties Routine for determining properties of various refrigerants.

-

5.0-

5.12

Non.l~inpnr Vli.;,nn,

Qortinn ; -

mw...

C Double Precision version of Newtons method *******************

C***********

C Subroutine Solver(N,

Diff,

Fnew,

Xnew,

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-

Non-Linear

Qmpt; n n 4

DeltX

Jmntinn

Dabs(Diff(j)*X(j))

=

Xnew(j)

X(j) + DeltX

=

Call Func(N, Xnew, Fnew) Do 15 i

1,N

=

Jinv(i,j)

-

-

F(i))/Deltx

Continue

15

Xnew(j)

20

(Fnew(i)

Xnew(j)

=

-

DeltX

Continue

C C**

Inverse of the Jacobian

**

C Call DInvert(N,

N, Jinv,

Iflag)

If(Iflag .ne. 0) Then Write(*, 26) **

Format('

26

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 + Jinv(i,j)*F(j)

dX(i) = dX(i) Continue

25

dX(i)

30

=

2.*dX(i)

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 40

Fnorm

=

Continue Do 45 i dX(i) Xnew(i)

-- I,N =

dX(i)/2. =

X(i)

-

dX(i)

-5.2-

,Rnivpr

Q-,a',t;nn; LJ1.

45

Nonn-I,inpgqr F1ninn

I%,,,v I"

"-

"

=

l,,W

Continue Call Func(N, Xnew, Fnew) Fnorm = 0.

50

Do 50 i

=

1,N

Fnorm

=

Fnorm + Fnew(i)*Fnew(i)

Continue If(Fnorm.gt.Fnlast

70

.and. j.lt.jmax) go to 40

Continue

C C** Check for convergence: Use both absolute and relative checks

**

C rerror = 0. aerror

0.

=

Do 80 i

=1N

rerror aerror 80

Dabs(dX(i) /Xnew(i)))

Dmaxl(rerror, =

Dmaxl(aerror, Dabs(dX(i)))

Continue

C If(rerror.gt.Tol .and. aerror.gt.l.e-06 .and. iter.lt.imax) go to 5 If(iter

.eq.

imax) Then

Write(*,101)

(Xnew(i),i=l,N)

Write(*,102)

(Fnew(i),i=l,N)

Endif C 101

Format('

**

Warning - Lack of Convergence in Equation Solver *

/4x,'Last Values of X

=

',5(lx,lpell.3)/

9(23x,5(1x,lpell.3))) 102

Format(4x,'Last Values of F

=

',5(Ix,lpell.3)/

9(23x,5(lx,lpell.3))) Return End

-

5.3-

l

Ill

n1 ...

L)VIY"I

Rpetion

Ma[. * ..

-

LI

IVA~~lL1

IAI

T,...-...o..

I

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) (Nmax = 50)

Parameter

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 C** Look for invalid pivot subscripts

**

C

If(k .ne. 1) Then Do 5 iscan = 1,kml Do 5 jscan = 1,kml

5.4-

Section 5 L.7%,%,aMti

Matriy Tnvprcp M,!"1litr&iy niVlg ,.D,

ae 11"

If(i .eq. irow(iscan)) go to 10 If(j

.eq.

go to 10

jcol(jscan))

Continue

5

Endif .gt.

If (dabs(A(ij)) pivot

dabs (pivot))

Then

A(i,j)

=

irow(k) = i jcol(k) = j

Endif 10

Continue

C C

**

Check for too small a pivot

**

C If(dabs(pivot)

.lt. eps) Then

iflag= 2

Return Endif C C

**

Normalize pivot row elements **

C irowk = irow(k) jcol(k)

jcolk

=

Do 20

j = 1,N

A(irowk, j) 20

=

A(irowk, j)/pivot

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 If(j

j

=

.ne.

A(i,j)

1,N jcolk) Then =

A(i, j)

-

Aijck*A(irowk, j)

Endif 30

Continue

-

5.5-

Section-S

MatriY Tnvpr.qp Endif

40 50

Continue Continue

C ******************************

Unscramble inverse *****************************

C Do 80

j - 1,N

Do 60 i = 1,N irowi

irow(i)

-

jcoli = jcol(i) y(jcoli)

60

A(irowi,j)

=

Continue Do 70 i - 1,N

A(i, j)=y(i) 70 80

Continue Continue Do 110 i

1,N

=

Do 90 j

=

irowj

- irow(j)

jcolj

- jcol(j)

y(irowj)

90

I,N

=

A(i,jcolj)

Continue Do 100 j = 1,N A(ij)

100 110

=

y(j)

Continue Continue

C Return End

-

5.6-

Psychrometrics

Section 5 c c

*

C

THIS ROUTINE TAKES AS INPUT A DRY BULB TEMP. AND ONE OTHER PROPERTY: WET

C

BULB TEMP.,

C

ENTHALPY, DEPENDING ON MODE.

C

IN MODE 4),

C

TEMPERATURES ARE IN CELSIUS

C

IS

REL.HUMIDITY(FRACTION),

WET BULB TEMP.,

IN KJ/KG

DEW PT.TEMP.,

HUMIDITY RATIO, OR

OUTPUTS ARE HUMIDITY RATIO

(OR REL.HUMIDITY

AND ENTHALPY (OR REL.HUMIDITY IN MODE 5). (IUNITS=1) OR FAHRENHEIT

(IUNITS=2).

(IUNITS=1) OR BTU/LBM (IUNITS=2).

* * * * *

C

*

C

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 -

32.)/1.8

TWB =

(TWB -

32.)/1.8

TDP

=

(TDP -

32.)/1.8

H

=

(H -

TDB

7.68)/0.43002

END IF C C** SATURATION PRESSURE OF WATER AT WET BULB, DRY BULB, OR DEW POINT C

ENTHALPY

*

TEMPERATURE.

**

C IF(MODE

.EQ.

(H - 2501.*W)/(1.005 + 1.859*W)

6) TDB

CALL SAT (TDB, PSATDB) GOTO

(1,2,3,2,2,2)

CALL SAT

,MODE

(TWBPSAT)

GOTO 5 PSAT -=PSATDB

-5.7-

Q,,-tinn ; L7~. ~ LI

--

Ps vchrornptrics

P~veh rnni~trie~

£hPhflfl~

GOTO 5 CALL SAT(TDPPSAT)

3 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 W

=

=

.62198 * PSAT/(PATM-PSAT)

WSAT

-

(TDB-TWB)*(0.24

+ 0.441*TDB -

+ .441*WSAT)/(597.31

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 C

50

DPRESS IF

(H

=

.GT.

ABS(I.-PATM) 9.67

.AND.

DPRESS

.LT.

0.00001)

-5.8 -

THEN

-

6

cPetinn I l.tc%,

Pqqvehrnm, trie q I P

,I

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 (MODE .EQ. 3) CALL SAT(TDBPSAT)

IF

WSAT T

.62198 * PSAT/(PATM-PSAT)

=

2501.*WSAT)/(1.005 + 1.859*WSAT)

(H -

=

CALL SAT(TPSAT) WT

.62198*PSAT/(PATM-PSAT)

=

C C** FIND POINT ON LINE BETWEEN

(TWT)

AND

(TDBWSAT)

WITH ENTHALPY H

**

C THEN

(ABS(T-TDB) .LT. 0.01)

IF

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 .LT.

-

I.E-7)

IF

(SLOPE

IF

(SLOPE .GT. .99E-7)

SLOPE*TDB) TWB--C/B 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********************* CONVERT OUTPUTS TO APPROPRIATE UNITS C 100

CONTINUE

PV

=

PATM'*W/(.62198 + W)

IF (MODE

.NE.

2)

RH

IF (MODE

.NE.

3)

THEN

Y

=

=

PV/PSATDB

DLOG(1.013E05*PV)

-5.9-

*******************

Pqvrh rnmptriv-€

in Z d-% 3-ection 2

%, 1111 xi "IIcL-t- I%ap

TDP = -35.957 -

1.8726*Y + 1.1689*Y*Y

IF(TDP .LT. 0.)

TDP

=

-60.45 + 7.0322*Y + 0.3700*Y*Y

ENDIF

H

THEN

2)

.EQ.

IF(IUNITS

= H*0.43002+7.68

TDB = 1.8*TDB + 32. TWB = 1.8*TWB + 32. TDP = 1.8*TDP + 32. ENDIF C IF (MODE

.EQ.

6) TDBI = TDB

IF (MODE

.NE.

2) TWBI = TWB

IF (MODE

.NE.

3)

=

TDP

* **

* **

TDP I

C RETURN END C **

* **

**

****

* * ***

* **** **

**

**

**** * **

**

* *****

**

* **** **

* ***

* ***

***

***

* *

****

*

C C

SUBROUTINE FOR FINDING SATURATION PRESSURE OF WATER AT A GIVEN TEMPERATURE

*

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)

=

P2(Z)

-

P3(Z)

=

P4(Z)

-

P5(Z) P6(Z)

=

P7(Z)

-

P8

=

=

-7.90298*(Z

-

1.0)

5.02808*DLOG10(Z) -1.3816E-07*(10.**(11.344*(1.

8.1328E-03*(10.**(-3.49149*(Z -9.09718*(Z - 1.) -3.56654*DLOGI0(Z)

0.876793"(I.

-

I./Z)

-2.2199

- 5.10-

-1.)

1./Z))

-

1.))

-

1.)

Srtion

5 -

P.sveh romptrics

CURVE-FITS FOR SATURATION PRESSURE ***************** C (T

IF z

.LE.

0.0)

THEN

= 273.16/(T + 273.16)

PSAT=

10.**(P5(Z)

+ P6(Z)

+ P7(Z)

+ P8)

ELSE Z

= 373.16/(T + 273.16)

PSAT = 10.**(PI(Z) + P2(Z) + P3(Z) + P4(Z)) END IF

RETURN END

-5.11 -

__

Prnnart;ac Frpnn ,,I,,AYIuL u a V t I I IC3

.tI 'l1%; II

SUBROUTINE

FREON(TP,H,S,X,V,U,NREFITYPE)

C *

C

C

SUBROUTINE FOR DETERMINING THERMODYNAMIC PROPERTIES OF REFRIGERANTS. THIS

*

C

ROUTINE IS DEVELOPED FROM EQUATIONS GIVEN IN "REFRIGERANT EQUATIONS",

*

C

R.C. DOWNING, DUPONT COMPANY.

*

THE ARGUMENTS IN A CALL TO FREON ARE:

C *

(DEGREES F)

C

T

=

TEMPERATURE

C

P

=

PRESSURE

C

H

=

SPECIFIC ENTHALPY

C

S

=

SPECIFIC ENTROPY

C

X

=

QUALITY

C

V

=

SPECIFIC VOLUME

C

U

-

SPECIFIC INTERNAL ENERGY

C

NREF

C

ITYPE

(PSI)

REFRIGERANT

TYPE

(BTU/LBM) (BTU/LBM-F)

(LBM/FT**3)

(E.G.,

(BTU/LBM) 11 FOR R12,

12 FOR R12,

ETC.)

C

TWO-DIGIT INTEGER CODE FOR IDENTIFYING THE TWO STATES THAT ARE SUPPLIED. THE CODE IS OF THE FORM IJ WHERE I AND J SPECIFY THE

C

TWO STATES AND ARE BETWEEN 1 AND 5 (1

C

5 = X, 6 = V,

=

=T,

2 = P,

3 = H,

4

R12,

R13,

7 = U)

C C

THE REFRIGERANTS CURRENTLY SUPPORTED BY THIS PROGRAM ARE RII,

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-

= S

I

Setion 5 ..-

tinm,,

Frenn Pronnrtips Fr

aSg.

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 TX KNOWN

C

IF(ITYPE.EQ.51.OR.ITYPE.EQ.15)GO TO 111 T,P KNOWN

C

IF(ITYPE.EQ.21.OR.ITYPE.EQ.12)GO TO 121 T,V KNOWN

C

IF(ITYPE.EQ.61.OR.ITYPE.EQ.16)GO TO 131 P,V KNOWN

C

IF(ITYPE.EQ.62.OR.ITYPE.EQ.26)GO TO 141 P,X KNOWN

C

IF(ITYPE.EQ.52.OR.ITYPE.EQ.25)GO TO 151 T,H GIVEN

C

IF(ITYPE.EQ.31.OR.ITYPE.EQ.13)GO TO 161 T,S KNOWN

C

IF(ITYPE.EQ.14.OR.ITYPE.EQ.41)GO TO 171 SV KNOWN

C

IF(ITYPE.EQ.64.OR.ITYPE.EQ.46)GO TO 181 V,X KNOWN

C

IF(ITYPE.EQ.56.OR.ITYPE.EQ.65)GO TO 191 S,X KNOWN

C

IF(ITYPE.EQ.45.OR.ITYPE.EQ.54)GO TO 201 H,X KNOWN

C

IF(ITYPE.EQ.35.OR.ITYPE.EQ.53)GO TO 211 P,S KNOWN

C

IF(ITYPE.EQ.24.OR.ITYPE.EQ.42)GO TO 221 C

P, H KNOWN IF (ITYPE.EQ.23 .OR.ITYPE.EQ.32)GO

C

H, S

TO 231

KNOWN

IF (ITYPE.EQ.

34 .OR.

ITYPE.EQ. 43) GO TO 241

c C

T, X KNOWN

FIND

LIQUID

SPECIFIC

VOLUME

- 5.13-

n

Pi.

5' Section -.. t- a, a

F'rmrn Prnnert;pq F L-n Xn.s P V aVt 2 I

C VL=1./DLIQ(T)

11

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 IF SUPERHEAT

C 22

X=1. 5E+38

-5.14-

Treon Pronnrties - IL-~~~ FeonPrn-

lqpctonn5 lo166tMI.flJ

P=PR(T,V) 23

CALL ENTHAL(H,P,V,T) CALL ENTROP (ST,V) GO TO 1000

C P,V KNOWN

C C 141

IF(P.GT.Q(41))GO TO 45 CALL TSAT(PTV) CALL SPVOL (TV, FP, VV) IF (V-VV)44,44,45 IF SATURATED

C 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 IF SUPERHEAT

C 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-

Freon PrnnortipqI

Rpetnn0,%,LJtnll

"

a

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 TH KNOWN

C 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 FOR SUPERHEAT

C 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 65

IF SATURATED VL-1./DLIQ (T) P=PV DH=DHLAT (T,VV, VL, P) X=I.- (HV-H) /DH 1.-X) V-VV- (1

*

(VV-VL)

- 5.16-

a-

,n

P,

%,I."1.

5 Section peL,7. t,,6Lnn

Fripnn Prnnprt;iaQ I

F

• r• % I a49IL;

DS=DH/T CALL ENTROP (SV, T,VV) S=SV - (1.-X) *DS GO TO 1000 C TS KNOWN

C 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 SV KNOWN

C 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 -

IJljI.

I Ia

5 'Section ~ik onW& - -r --

Fre~rn

c x, V KNOWN

C 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 SX KNOWN

C 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-

)rnnprtipq

nAK ta P

.

/DLIQ (T)

- 5.18-

uI ata ; a

Freon Prooerties

Section 5 V=VV-(1.-X)*(VV-VL) DS=DHLAT(TVVVLP)/T CALL ENTROP (SVT,VV) S=SV-(i.-X)*DS GO TO 1000 C PS KNOWN

C 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 FOR SATURATED

C 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

Prnnart;ac Frpnn .LqJl I LzfJ I LI 3 I v

IF (H-HV) 11,11, 12 IF SATURATED

C 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 HS KNOWN

C 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) CALL HSCON (T, POLD, H,S, F,G)

/ DGDT= (G-GOLD) / DFDT= (F-FOLD)

CT-TOLD) CT-TOLD)

-

5.20-

;qpetinn L3 CLl U aa

' cult

-I

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)

1001

FORMAT.(' *'ITYPE *3

WRITE(*,1001) **

WARNING =

-

',I2, '

ITYPE,T,P,H,S,X,V

SOLUTION DID NOT CONVERGE T, 2, H, 5, X, V -',

(IX,IPEII. 3)/33X,3 (1X,IPEII. 3) )

- 5.21 -

**'/4X,

i IU-gi

urn ~'iuu ri upertues

q.etiAfl;

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

'VERGE **1/4X,'T,

P,

V,

SPVOL,

ABS(V-VLAST)

RETURN END C C

SUBROUTINE

FOR FINDING ENTHALPY

C SUBROUTINE ENTHAL (H, P, V, T) DIMENSION Q(44) COMMON

SOLUTION DID NOT CON',

/CONST/ Q

XJ-0 .185053: T2=T**2/2 .0 T3=T**3/3 .0

T4=T**4/4. 0

-5.22-

=

',4(IX,1PE11.3))

c.,petinn

-5

Freon Prnnprt;pq I

VB=AMAX1 (AMINI (V-Q (15)

,

1 .E+05)

1.E-05)

,

VB2=VB**2*2.0 VB3=VB**3*3.0 VB4=VB**4* 4.0 XKT=Q(31) *T/Q(42) EKT=EXP (-XKT)

AV=Q(32) *V AVOID DIVIDING BY ZERO

C

IF(AV.EQ.0.0

.OR. ABS(AV).GT.30.) GO TO 105

EAV=EXP (AV)

IF(Q(33) .EQ.0.0)GO TO 100 CLN=Q(33) *(ALOG(1.0+(1.0/

(Q(33) *EAV))))

GO TO 110 100

CLN=0.0 GO TO 115

105

EAV=0.0 RX=0.0 RZ=0.0 CLN=0.0 GO TO 115

110

RX=(Q(28)/Q(32))*(1.0/EAV-CLN)

RZ=Q(30) / (Q(32) *EAV) -Q(30) *CLN/Q(32) 115

HI=Q(34)*T+Q(35)*T2+Q(36)*T3+Q(37)*T4-Q(38)/(4.0*T2)+XJ*P*V H2=XJ* (Q(16)/VB+Q(19)/VB2+Q(22)/VB3+Q(25)/VB4+RX) H3=XJ* (Q(18)/VB+Q(21)/VB2+Q (24)/VB3+Q(27)/VB4+RZ) * (1.0+XKT) *EKT H=H1+H2+H3+Q (39) RETURN END

C C

SUBROUTINE FOR FINDING ENTROPY

C SUBROUTINE ENTROP (S, T, V) DIMENSION Q(44) COMMON /CONST/

Q

xJ-0 .185053 R=Q (14) T2=T**2/2 .0 T3=T**3/3.0

VB=AMAXl (AMINI (V-Q (15)

,

1 .E+05)

1I.E-05)

,

-

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 L-1

Frpnn Prnnprtipc.I FZ n VPrtt nVIVItiv

tioNr aa 5.f

1001

FORMAT('

**

WARNING -

SUBROUTINE TSAT,

NOT CONVERGE **'/4X, 'P,

SOLUTION DID

'

T =',2(1X,IPE11.3))

RETURN END C C C

FUNCTION FOR FINDING LIQUID DENSITY AT A TEMPERATURE

C FUNCTION DLIQ(T) DIMENSION Q(44) COMMON/CONST/Q TTC=AMAX1(1.-T/Q(42),0.) DLIQ=Q(1)+Q(2)*TTC**(I./3.)+Q(3)*TTC**(2./3.)+Q(4)*TTC @

+Q(5) *TTC** (4./3.)

+Q (6) *TTC**0.5+Q (7) *TTC**2.

RETURN END C FUNCTION FOR FINDING VAPOR PRESSURE

C C

FUNCTION VPR(T) DIMENSION Q(44) COMMON/CONST/Q IF (Q (13) -T) 701,701,702 701

PL=Q (8) +Q(9)/T+Q (10) *LOG10(T) +Q (11) *T GO TO 703

702

PL=Q (8) +Q (9)/T+Q (10) *LOG10 (T) +Q (11) *T+Q (12)*((Q(13) -T)/T) @*LOG10 (Q (13) -T)

703

VPR=10**PL RETURN END

C C

FUNCTION FOR FINDING LATENT HEAT OF VAPORIZATION

C FUNCTION DHLAT(TVG, VFP) DIMENSION Q(44) COMMON/CONST/Q XJ=0 .185053 XLN1O0-2 . 302585093 XLOGE=0 . 4342944819

-

5.25-

-5 ,R1cinn L1~' ~

Pvwfnav-*;Amc Frpnn p U ~~JUj p i

IF (Q (13) -T) 711,711, 712 711

E=Q (12) * (XLOGE/T) GO TO 713

712

E=Q (12) * (XLOGE/T+Q (13) *LOG10 (Q (13)-T)/T**2)

713

DHLAT=XJ*T*(VG-VF)*(P*XLNI0*(-Q(9)/T**2+Q(10)/(T*XLNI0)+Q(11)-E)) RETURN END

C C

FUNCTION FINDING PRESSURE

C FUNCTION PR(TV) DIMENSION Q(44) COMMON/CONST/Q RI=Q (14) EKT=EXP (-Q (31) *T/Q (42)) VB=AMAX1 (AMINI (V-Q (15), 1.E+05), 1.E-05) AV=Q(32) *V IF(AV.EQ.0..OR. ABS(AV).GT.30.)

THEN

P5=0. ELSE EAV=EXP (AV) P5=(Q (28) +Q (29) *T+Q (30) *EKT) / (EAV* (1.+Q (33)*EAV)) ENDIF P1= (RI*T) /VB+ (Q (16) +Q (17) *T+Q (18) *EKT) /VB**2 P2= (Q (19) +Q (20) *T+Q (21) *EKT) /VB**3 P3= (Q (22) +Q (23) *T+Q (24) *EKT)/VB**4 P4= (Q (25) +Q (26) *T+Q (27) *EKT) /VB**5 PR=PI+P2+P3+P4+P5 RETURN END C C

FUNCTION FOR FINDING DP/DV AT CONST T

C FUNCTION DPDV(TV) D IMENS ION Q (44 ) COMMON/CONST/Q R=Q (14) EKT=EXP (-Q (31) *T/Q (42))

-

5.26

-

I

S I ,tinn5

Freon Pronnrties

VB=AMAX1 (AMINI (V-Q (15), 1.E+05), 1.E-05)

AV=Q(32)

*V

THEN

IF(AV.EQ.0..OR. ABS(AV).GT.25.) RR=0. ELSE EAV=EXP (AV) EAV2=EXP (2. 0*AV)

RR=- (Q (32) *EAV+2.0Q*Q (32) *Q (33) *EAV2) / (EAV+Q (33) *EAV2) **2 ENDIF DX1=-R*T/VB**2-2.0* (Q(16)+Q(17) *T+Q (18) *EKT)/VB**3 DX2=-3 .0* (Q (19) +Q (20) *T+Q (21) *EKT) /VB**4 DX3=-4. 0* (Q (22) +Q (23) *T+Q (24) *EKT) /VB**5 DX4--5 .0* (Q (25) +Q (26) *T+Q (27) *EKT) /VB**6 DX5=(Q(28)+Q(29) *T+Q(30) *EKT) *RR DPDV=DX1 +DX2 +DX3 +DX4+DX5 RETURN END

C C

FUNCTION FINDING DP/DT AT CONST V

C FUNCTION DPDT(T,V) DIMENSION Q(44) COMMON/CONST/Q

R=Q (14) EKT=EXP (-Q (31) *T/Q (42)) VB=AMAX1 (AMINi (V-Q(15), 1.E+05), 1 .E-05)

AV=Q(32)

*V

IF(AV.EQ.0..OR.

ABS(AV).GT.30.)

THEN

TERM=0. ELSE EAV=EXP (AV) TERM-(Q(29)-TTC*Q(30)) / (EAV* (1.+Q(33) *EAV)) END IF TTC-=(Q (31) *EKT) /Q (42) DTI=R/VB+ (Q (17)-TTC*Q (18) )/VB**2 DT2-(Q(20)-TTC*Q(21) ) /VB**3 DT3= (0(22)-TTC*Q (24) )/VB**4 DT4= (Q (26) -TTC*Q (27) )/VB**5+TERM DPDT=DT 1+DT2 +DT3+DT 4

-

5.27

-

,;Pction 5 -

Freon PrnnprtipQ A

a

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-

I

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 ;

Jl;Ut~lJU

Preinn l" *I Wll

t'

* 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)) 5

GO TO 100

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)

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

135

CONTINUE

Q(I)=R13 (I) GO TO 500 C 140

DO 145 I-I,NCOEF Q (I)

145

=R14 (I)

CONT INUE GO TO 500

-

5.30

-

,IGO

**')

I

IJIL

1

i

reon Pronerties

Ca^+; nn C 3.,mL IUI !-7C

Freon.

-

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 -

..oner....

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 C

Determine new guess but don't accept if there is an increase in 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) 70

.AND.

J.LT.JMAX) GO TO 40

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 SUBROUTINE THCON (T, H,V, F) P=PR(T, V) CALL ENTHAL ( HNEW, 2, V, T) F=HNEW-H RETURN END

-5.32-

.,petiAnn-5 LJJL.-. ...

-

Prfnar-+;,nv Frpnn '-.-A 'uVa 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 -;-

]Freon triNn Prnnart;ac Prn-L- iw I

p

J-

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-

urp

LIU")

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF