A1UD2 a^sa

NBSIR 85-3243

HVACSIM + Building Systems and

Equipment Simulation Program - Users Guide

Daniel R. Clark

William B. May, Jr.

U.S. DEPARTMENT OF COMMERCE

National Bureau of Standards

National Engineering Laboratory

Center for Building Technology

Building Equipment Division

Gaithersburg, MD 20899

September 1985

uc100

Ubb

8b-5243

198b

C. 2

censor.

ion

ed by:

onal Bureau of Standards

. Navy Civil Engineering Laboratory

. Department of Energy

national bureau

of STANDARDS

LIBRARY

NBSIR 85-3243

HVACSIM+ BUILDING SYSTEMS AND

EQUIPMENT SIMULATION PROGRAM - USERS GUIDE

Daniel R. Clark

William B. May, Jr.

U S. DEPARTMENT OF COMMERCE

National Bureau of Standards

National Engineering Laboratory

Center for Building Technology

Building Equipment Division

Gaithersburg, MD 20899

September 1985

Sponsored by:

National Bureau of Standards

U S. Navy Civil Engineering Laboratory

U S. Department of Energy

U.S. DEPARTMENT OF COMMERCE, Malcolm Baldrige. Secretary

NATIONAL BUREAU OF STANDARDS, Ernest Ambler, Director

ABSIMCX

HVACSIM+ is a modular, non-proprietary computer simulation package developed

at the National Bureau of Standards. The package consists of a generalpurpose modular simulation program called MODSIM, a library of component

models specific to building systems, and a simulation editor called HVACGEN.

The latter is used to facilitate the creation and modification of simulation

descriptions. HVACSIM+ is designed to allow detailed simulation of entire

building systems or portions of such systems. This includes the heating,

ventilating, and air conditioning (HVAC) system, the equipment control system,

the conditioned zones within a building, the building shell, and the dynamic

interactions among these subsystems.

This document describes the procedures for installing HVACSIM+ on a particular

computer, for setting up a simulation description using HVACGEN, and for

running a simulation using MODSIM. A number of example simulations are included to illustrate the procedures and to serve as a tutorial in the use of

HVACSIM+. A Reference Manual, published separately, describes the main simulation program and the library of component models in more detail. A third

document, also published separately, describes the building model supplied

with HVACSIM+

.

KEY WORDS: building dynamics; building simulation; building system modeling;

computer simulation programs; control dynamics; dynamic modeling of building

systems; dynamic performance of building systems; dynamic simulations; HVAC

system simulations; HVACSIM

iii

TABLE OF CONTENTS

Page

ABSTRACT iii

LIST OF TABLES viii

LIST OF FIGURES viii

ACKNOWLEDGMENTS ix

DISCLAIMER ix

1. INTRODUCTION 1

2. DEVELOPMENT OF A SIMULATION 3

2.1 Structure of an HVACSIM Simulation 3

2.2 TYPES Component Library 4

2.3 The System Diagram 5

2.4 Unit Interconnections 5

2.3 Grouping Units Into Blocks and Superblocks 6

2.6 Boundary Conditions

2.7 Reported Variables 8

2.8 Work Files and the Model Definition File 8

2.9 Developing Complex Simulations 9

2.10 Summary of Model Development Procedure 10

3. HVACGEN - THE HVACSIM MODEL CONFIGURATION PROGRAM 11

3.1 Basic Commands: CREATE, VIEW, and EDIT 11

3.2 Control of the Program 11

3.3 Command/Menu Syntax 12

3.4 Basic Program Operations 13

3.4.1 Save Sequence 13

3.4.2 Edit Sequence 14

3.5 The Main Menu 15

3.6 The Create Command 15

3.6.1 CReate UNit 17

3.6.2 CReate BLock 17

3.6.3 CReate Simulation 19

3. 6. 3(1) structure information 19

3. 6. 3(2) simulation control information 20

v
3 . 7 The V iew Command 22

3.7.1 View UNit <£ilename> 23

3.7.2 View BLock <filename> 23

3.7.3 View Simulation <filename> 24

3. 7. 3(1) View Simulation <filename> ALl 24

3. 7. 3(2) View Simulation <filename> STructure 24

3. 7. 3(3) View Simulation <filename> VAriable initial values.. 24

3. 7. 3(4) View Simulation <filename> ERror tolerances 24

3. 7.

3

(5) View Simulation <filename> Boundary variables 25

3. 7. 3(6) View Simulation <filename> REported variables 25

3.8 The Edit Command 25

3.8.1 EDit UNit <filename> 25

3.8.2 EDit Simulation <filename> 26

3. 8. 2(1) EDit Simulation <filename> Title 26

3. 8. 2(2) EDit Simulation <filename> STructure 27

3. 8. 2(3) EDit Simulation <filename> VAriable initial values.. 27

3. 8. 2(4) EDit Simulation <filename> ERror tolerances 27

3. 8. 2(5) EDit Simulation <filename> Boundary variables 29

3. 8. 2(6) EDit Simulation <filename> REported variables 30

3. 8. 2(7) EDit Simulation <filename> INsert or replace 31

3.8.2(7A) insert unit 31

3.8.2(7B) insert block 32

3.8.2(7C) replace unit 34

3. 8. 2(8) EDit Simulation <filename> DElete 34

3.8.2(8A) delete unit 35

3.8.2(8B) delete block 35

3. 8. 2(9) EDit Simulation <filename> SAve block 36

3.9 The Help Command 36

3.10 Producing a Model Definition File 36

4. PREPARING AND RUNNING SIMULATIONS USING HVACSIM+ 39

4.1 Pre-Processing 39

4.1.1 The Model Definition File 39

4.1.2 The Boundary Variable File 39

4.1.3 The Initialization File 40

4.1.4 The Conduction Transfer Function File 40

4.1.5 The Weather Data File 40

4.2 Execution 41

4.3 Post-Processing 41

5. INSTALLATION OF THE HVACSIM PROGRAMS 43

5.1 HVACSIM Distribution Files 43

5.2 Installation Process , 44

5.2.1 HVACSIM Source Code Compilation and Linkage 44

vi
5.2.2 SLIMCON Source Code Compilation and Linkage 45

5.2.3 HVACGEN Source Code Compilation and Linkage 45

5.3 Description of HVACGEN Subroutines 46

5.3.1 HVACGENl - main module 46

5.3.2 HVACGEN2 - create module 47

5.3.3 HVACGEN3 - file control module 48

5.3.4 HVACGEN4 - view module 49

5.3.5 HVACGEN5 - edit (changes) module 49

5.3.6 HVACGEN6 - edit ( insert/delete/save) module 50

5.4 Description of SLIMCON Subroutines 51

5.5 Increasing or Decreasing the Simulation Size Capacity 51

6. EXAMPLES OF MODEL DEVELOPMENT, CONFIGURATION, AND EXECUTION 52

6.1 Example 1: Pipe and Valve 52

6.1.1 Designing a Simulation 52

6.1.2 Creating a Simulation 54

6.1.3 Creating the Model Definition File 55

6.1.4 Preparing the Boundary Value File 55

6.1.5 Running a Simulation 56

6.1.6 Discussion of Simulation Results 56

Listing 6.1-1 Interactive HVACGEN session to create EXAMPLEl 59

Listing 6.1-2 EXAMPLEl .SIM: Simulation Work File 67

Listing 6.1-3 SLIMCON Tabular Output 68

Listing 6.1-4 EXAMPLE1.DAT: Model Definition File 69

Listing 6.1-5 BOUNDARY.DAT: Boundary Variable File 70

Listing 6.1-6 Starting a Simulation Using HVACSIM 71

Listing 6.1-7 INITOUT.DAT: Final State Output File 75

Listing 6.1-8 MODSUM.DAT: Simulation Summary Output File 75

Listing 6.1-9 M0D0UT.DAT: Simulation Data Output File 80

6.2 Example 2: Heating Coil Control Loop, Variable Inlet Water Temp. 90

6.2.1 Configuration 90

6.2.2 Execution 91

6.2.3 Interpretation 91

Listing 6.2-1 Summary of EXAMPLE2 Simulation Configuration 94

Listing 6.2-2 EXAMPLE2 .SIM: Simulation Work File 100

Listing 6.2-3 Boundary Variable File for Example 2 101

Listing 6.2-4 Initialization File for Example 2 102

Listing 6.2-5 A Portion of the Simulation Output File M0D0UT.DAT . 102

6.3 Example 3: Cooling Coil Control Loop, Variable Water Flow Rate . 107

Listing 6.3-1 Boundary Variable File for Example 3 109

Listing 6.3-2 Simulation Configuration Summary from MODSUM.DAT ... 109

Listing 6.3-3 Partial Simulation Results from MODSUM.DAT 113

vii
6.4

Example 4: Air Handling Unit Without Heat Exchangers 118

Listing 6.4-1 Boundary File 119

Listing 6.4-2 MODSUM.DAT: Simulation Configuration and Results .. 119

6.5 Example 5: Air Handler With Flow-Controlled Cooling Coil 127

Listing 6.5-1 MODSUM.DAT: Simulation Summary and Output 130

6.6 Example 6: Single Zone Air Handler With Cooling Coil 140

Listing 6.6-1 Simulation Configuration 142

Listing 6.6-2 Boundary Variable File 155

7. REFERENCES 159

8. APPENDIX 160

TABLES

Table 2-1. Categories of Variables 4

Table 3-1. Transparent Commands 13

FIGURES

Figure 3-1. Schematic Diagram of Major Commands of HVACGEN 16

Figure 3~2. Menu Flow Path for Editing Boundary Variables 28

Figure 3-3. Menu Flow Path for Editing Reported Variables 29

Figure 6.1-1. Example 1: System Schematic Diagram 58

Figure 6.1-2. Example 1: Information Flow Diagram 58

Figure 6.1-3. Example 1: Control Valve Response 88

Figure 6.1-4. Example 1: Temperature Response 89

Figure 6.2-1. Constant Flow, Variable Temperature Control System 93

Figure 6.2-2. System Schematic for Heating Coil Control Loop 93

Figure 6.2-3. Controlled Variable (Air Temperature) Response to

Controller Set Point Step Changes 106

Figure 6.3-1. System Schematic for Cooling Coil Control Loop 108

Figure 6.3-2, Controlled Variable (Air Temperature) Response to Inlet

Air Temperature Step Changes: No Oscillations 115

Figure 6.3-3. Controlled Variable (Air Temperature) Response to Inlet

Air Temperature Step Changes: Damped Oscillations .... 116

Figure 6.3-4. Controlled Variable (Air Temperature) Response to Inlet

Air Temperature Step Changes: Undamped Oscillations .. 117

Figure 6.4-1. Air Handling Unit Without Heat Exchangers: Schematic ... 119

Figure 6.5-1. Air Handling Unit With Cooling Coil Control Loop 129

Figure 6.5~2. Example 5: Simulation Startup Transient 139

Figure 6.6-1. Single-Zone Air Handler With Cooling Coil 141

Figure 6.6-2. Example 6: Time Dependent Simulation Inputs 156

Figure 6.6-3. Example 6: Temperature Response 157

Figure 6.6-4. Example 6: Control Signal Response 158

viii
ACKNOWLEDGMENTS

A number of people have been involved in the development of the HVACSIM+ package. Dr. C. Ray Hill conceived and implemented the original main

simulation program, MODSIM, during a year spent at the National Bureau of

Standards (NBS) as a research associate. He also developed an initial library

of component models and a simple precursor to what is now HVACGEN for

configuring simulations.

MODSIM was subsequently revised and improved by Dr. Cheol Park and Daniel R. Clark of NBS and renamed HVACSIM. The original component model library was

improved and expanded by Daniel R. Clark and contributions to the component

models were made by Scott Hildebrand, David Harris, Chris Rasmussen, and Juan

Lopez, who were visiting workers at NBS.

The HVACGEN front end program was designed by William B. May of NBS and David

Harris, based on the original simple front end program developed by Dr. Hill.

David Harris did all of the original program development.

The entire HVACSIM+ development project was directed by Dr. George E. Kelly of

NBS. Financial support for the project from NBS, the U.S. Naval Civil Engineering Laboratory, and the U.S. Department of Energy is gratefully acknowledged.

DISCLAIMER

The program described in this report is furnished by the government and is

accepted and used by any recipient with the express understanding that the

United States Government makes no warranty, expressed or implied, concerning

the accuracy, completeness, reliability, usability, or suitability for any

particular purpose of the information and data contained in this program or furnished in connection therewith, and the United States shall be under no liability whatsoever to any person by reason of any use made thereof. This

program belongs to the government. Therefore, the recipient further agrees

not to assert any proprietary rights therein or to represent this program to

anyone as other than a government program.

IX

1. INTRODUCTION

HVACS IM + is a non- pr opr ietary building systems simulation computer program

developed at the National Bureau of Standards (NBS). This program is intended

to simulate the heating, ventilating, and air conditioning (HVAC) system, the

equipment control system, the building shell, the building spaces, and the

dynamic interaction among these systems. The name is derived from the phrase

HVAC SIMulation plus (+) other systems. The program employs advanced equation

solving techniques and a hierarchical, modular approach to simulate the dynamic performance of the entire building/HVAC/control system.

This document is intended to serve as a guide for the installation and use of

the HVACSIM+ program. The users guide and one other document [1] contain

information to install the HVACSIM+ package on a computer, set up simulations,

run simulations, interpret the simulation results and expand the library of

component models. The building shell model included in the HVACSIM package

is the subject of a third document [2].

The HVACSIM"1" package consists primarily of two large programs and one small

one. The central program is the main simulation program which takes information from several input files and produces output files containing simulation

results. The second program is a "front end program which is used to configure a simulation to be run by the main simulation program. The small

program is used to translate information generated by the configuration program to a form which can be directly used by the main simulation program.

Three additional small, independent programs are provided as pr e- pro ce s sor s for use in conjunction with the building model. These programs are described

in reference [2].

The main simulation program is based on a core program called MODSIM, which in

turn is built around a non-linear equation solving package called SNSQ. In

principle, MODSIM can be used to simulate any system which can be represented

by a set of discrete components, each of which can be described by a set of

non-linear ordinary differential and algebraic equations. The MODSIM program

is linked with a library of routines for specific system components. A component routine contains the differential and algebraic equations that describe a component such as a piece of equipment or a length of pipe. MODSIM has been

made applicable to the solution of building systems by the inculsion of a library of models of building system components such as fans, ducts, rooms,

and heat exchangers. MODSIM plus the building component library is then

called HVACSIM. HVACSIM, as distributed, can simulate systems of up to 600

variables and 50 simultaneous differential equations. These limits can be

increased, with a concurrent increase in program size. Current limitations on

the size of simulations are given in section 3.10, page 37. The procedure for

changing these limitations is summarized in section 5.6, page 51.

The simulation configuration program, called HVACGEN, for HVAC simulation

GENeration, is also specific to building systems because the names of the

categories of variables in simulations (temperature, pressure, humidity, etc.) are used explicitly. HVACGEN allows the user to specify the component models

to be included in the simulation. The component models available are listed

and described in a file of information about the HVACSIM component library

1
which may be expanded or modified. The configuration information for a simulation is stored in a file called a work file. HVACSIM accepts information

from a file called the model definition file. A small program translates the

information in the work file to the form of the model definition file. This

program is named SLIMCON.

This manual contains five chapters in addition to this introduction and the

references. Chapter two provides basic information about the structure of an HVACSIM simulation and describes the preliminary procedures that are required

before the HVACGEN and HVACSIM programs can be used.

Chapter three explains the use of the HVACGEN program. It describes the com- mands and procedures to create new simulations and edit existing simulations

whose descriptions are stored in work files. Also described is the creation

of a model definition file from a work file.

Chapter four summarizes the procedure for running the HVACSIM simulation

program using a model definition file and other input files.

Chapter five is for the person responsible for installing the HVACSIM+ package

on a particular computer, diagnosing problems encountered with the package,

and making changes to the programs. Guidelines are given for some specific

machines as to computer memory and disc requirements and specific customization requirements.

Chapter six is a very important part of this manual because it provides a number of examples of the complete procedures for developing and running

simulations with the HVACSIM+ package. The examples range in complexity from

a simple system involving a pipe and a valve to a simulation of an air handling unit connected to a building zone. As well as providing instruction in

the use of the HVACSIM+ package, the examples provide benchmarks for determining if the programs are correctly installed on a particular computer. The

results generated on a computer where HVACSIM has been newly installed can be

compared with the results in the examples, and if the results are within the

machine precision of the target computer, it can be assumed that the package

is correctly installed.

2
2. DEVELOPMENT OF A SIMULATION

Developing a simulation which can be run by the HVACSIM* package requires some preparation before the computer programs are run. The information that is to

be entered into the computer needs to be organized and a diagram of the system

to be simulated should be made. This chapter describes these procedures. In

addition, this chapter provides basic definitions and information that is

required for an understanding of the HVACSIM programs.

2.1 Structure of an HVACSIM Simulation

The simulation of a building system using HVACSIM requires that the user be

familiar with the equipment and connections between pieces of equipment for

the system to be simulated. A schematic drawing of the system is a convenient

aid to visualizing what parts make up the entire system. Simulation of this

system requires that a model be conceptualized which approximates the characteristics of the real system. The model of the system must be subdivided into

component parts much as a real system is divided into component pieces of

equipment. The basic component of the system model is called the "unit.* A

system model will consist of a number of units connected together. Each unit

may be thought of as a model of a corresponding piece of equipment such as a pump, fan, pipe, or heat exchanger.

Each unit in a simulation is designated as being of a certain "type." A type

designation indicates that a general model of a specific component is to be

used for a unit. A unit might be assigned, for example, to be of a type

called "HOT WATER TO AIR HEATING COIL*’ which is designated as type 11. Within

the program, the unit would then be represented by a subroutine called TYPEll

which contains the algebraic and differential equations describing the behavior of a heat exchanger to heat air with hot water.

To allow a unit which has been designated as being of a certain general type

to represent a specific piece of equipment, each unit has parameters which

must be given numerical values. Each type will have different numbers and

names for parameters. For example, a unit of type 11, "HOT WATER TO AIR

HEATING COIL might have parameters to specify the air side and water side

heat transfer coefficients, the air and water flow resistances, the volume of

the coil, and the thermal mass of the coil. Two units in a simulation might

be of the same type but have different parameters.

Just as real system components are grouped into sub-systems, units may be

grouped into sub-systems called "blocks." Groups of blocks may in turn be

grouped into "superblocks." A superblock would be used to model a relatively

complex building subsystem such as the building shell or an entire air handling system. The criteria by which units are grouped into blocks and superblocks are discussed in section 2.5.

The type of a unit determines what differential and algebraic equations are to

be used to model the unit. The parameters determine what the coefficients of

the equations will be. The variables in the equations are the simulation

variables. The independent variables in the equations will be the inputs to

3
the unit and the dependent variables will be the outputs. Each unit will have

several -variables* some of them input variables and some of them output variables. The number of variables and their names will depend on the type assigned to the unit.

Variables are identified in the simulation by an index number and by the

category of the variable. Variable categories correspond to different physical quantities such as temperature, pressure, and flow rate. Table 2-1 lists

the variable categories that are available in the HVACSIM program. All variables of a particular category in the simulation will be numbered from one

upward. Several variables may have the same index number but be distinguished

by category. For example, there may be a pressure 1 and a temperature 1.

Table 2-1 Categories of Variables

No. Abbreviation Name Units

1 PRES or P Fluid Pressure kilopascals

2 FLOW or W Fluid Mass Flow Rate kilograms/ second

3 TEMP or T Temperature degrees Celcius

4 CTRL or C Control Signal dimensionless

3 RVPS or R Rotational Speed revolutions /second

6 ENGR or E Energy kiloj oules

7 POWR or Q Power kilowatts

8 AHUM or H Absolute Humidity kilograms water/kilogram dry air

Each type of component has a fixed number of inputs, outputs, and parameters,

and each input and output is in one of the eight categories listed above. A

component is included in a simulation by specifying its type number. Each of

its inputs and outputs must then be identified by assigning it an index

number

.

The complete set of variables in the simulation may be referred to by the term

"state vector.” At any time during a simulation, the state vector completely

describes the state of the system. When the simulation is started, all variables must have a starting or initial value. This value can be specified in

one of two ways. One way is to use the initial values which must be entered

when a simulation is created using HVACGEN. The initial values should be as close as possible to the state at which the simulation should start. Alternatively, the initial state can be defined by the final state of a previous run

of the same simulation. In this case the initial state supplied to HVACGEN is

simply ignored.

2.2 Types Component Library

After the system to be simulated has been decided upon, the decomposition of

the system into parts that can be modeled by units is required. Before this

can be done, the user must know what unit types are available. A library of

approximately 30 types is supplied with HVACSIM+

. These component models are

4
summarized in the Appendix. A separate document [1] describes the available

types in more detail, and also describes how to build a custom type and add it

to the library.

HVACGEN recognizes and accept alphanumeric names for types, provided that they

are entered exactly as shown in the Appendix to this document. However, it is

generally quicker and easier to identify each type by number. The appendix

gives the number and name of each type, and brief definitions of the inputs,

outputs, and parameters. With this information, the user can model the components of the system to be simulated by using the unit types available. If an

exact match for a component in the system to be simulated is not available,

the user can either use another type as an approximation or build a custom

type.

2.3 The System Diagram

Once the types to be used in a simulation have been identified, it is suggested that a system diagram be constructed. This is simply a schematic diagram

of the system, broken down into units, blocks, and superblocks, with state

variables labeled on the diagram. Chapter 6 contains such diagrams for each

example simulation. These diagrams make it much easier to visualize the

physical significance of each variable in the simulation.

It may also be helpful to prepare an ’information flow diagram" such as the

one in the first example of Chapter 6. In this diagram, units are shown as

icons or boxes representing actual system components. Lines between the units

show the connection of one unit to another. Each unit is given a type number.

As the information for the simulation is entered into the computer, additional

notes on this drawing will ease the process of constructing a complex simulation.

2.4 Unit Interconnections

The connection of units is accomplished by the proper selection of the index

numbers for the input and output variables of the units. If two units are

connected, some item of information is passed from one unit to the other.

Often this means that some fluid, most commonly air or water, is flowing

through one unit and into the other. Alternatively, a control signal or a flow of thermal energy could pass from one unit to another. To indicate a connection, a variable associated with the output from the first unit would

have the same index number and category name as the variable associated with

the input to the second unit.

A connection between two units may actually involve a number of variables

since (for example) a fluid stream has properties of at least temperature,

pressure, and flow rate. The connection of units is also complicated by the

fact that certain variables which might be regarded intuitively as outputs to

a unit are actually inputs. The outlet pressure for a fan, for example, might

normally be regarded as an output, but the FAN OR PUMP type requires the

outlet pressure to be an input to the unit.

5
In general, no variable in a simulation should be an output of more than one

unit. If two units produce the same variable as output, it usually means that

the set of equations implied by the input/output connections is overdetermined. In such cases, either the two outputs should be given different indices, even though they represent the same physical quantity, or one of the

output variables should be given an index of zero, which effectively removes

the output from the simulation. Otherwise problems may occur when the type

equations are solved by HVACSIM. The program SLIMCON issues a warning message

if two or more outputs in a simulation have been given the same index number

in the same category.

All variable indices in each category can be pre-selected and noted on the

system diagram after study of the types library. The notation can be a letter

representing the variable category followed by the index number, and can be

placed on the diagram between two units that are connected. An alternative is

to note the indices on the diagram as the information is being entered into

the computer with the HVACGEN program. It may also be helpful to make copies

of the pages in the appendix and use these as worksheets for recording unit

numbers, input and output index numbers, and parameter values.

2.5 Grouping Units into Blocks and Superblocks

In addition to selecting types and connecting units together, decisions are required for the grouping of units into blocks and the grouping of blocks into

superblocks. There are no highly specific rules for the division of superblocks and blocks. The decisions involved must be based on knowlddge of how

the real system behaves and an understanding of how blocks and superblocks are handled within the simulation program. The example chapter of this document

provides some working examples of grouping of units into blocks. The following paragraphs will briefly explain the concepts of blocks and superblocks.

The general reason why a simulation is divided into blocks and superblocks is

to reduce the time required to solve large sets of equations simultaneously.

Each state variable which is both an input and an output can be thought of as representing an equation. If a simulation contains forty such variables,

there are forty equations in need of simultaneous solution. The time required

to solve a set of equations is roughly proportional to the square of the

number of equations. Thus a set of forty equations takes at least twice as long to solve as two sets of twenty equations. The division of a simulation

into blocks and superblocks is a way of partitioning the matrix of equations

into a larger number of smaller sets of equations.

The set of input/output connections within a block define a set of ’block

equations.” All equations for the units in a block are solved simultaneously.

A block can then be thought of as equivalent to an unusually large unit,

having input/output connections coupling it to other blocks in the simulation.

The set of input/output connections between the blocks in a superblock define

a set of "superblock equations.” All superblock equations are also solved

simultaneously, but in a manner involving preliminary solution of the block

equations

.

6
At the highest level, the equations defined by input/output connections between superblocks are not solved simultaneously. Rather, they are solved

sequentially, superblock by superblock, assuming that superblocks are essentially independent of each other. This allows superblocks to run with different time steps. It also implies that superblocks must represent subsystems

that are loosely coupled. For example, an air handling unit and a zone are

often only coupled through the air entering the zone from the air handling

unit, and the response time of the zone is often much longer than the response

time of the air handler. Even so, passing a flow stream or a control signal

from one superblock to another inherently involves a tradeoff between speed

and accuracy. Two special-purpose components (types 16 and 19) have been

developed to alleviate the problems of passing information between weakly

coupled superblocks.

As a rule of thumb, it is advantageous (though not essential, and not always

possible) to keep tightly coupled sub-systems such as local closed loop control systems or closed loop flow streams within a single block. Blocks should

be thought of as discrete components, differing from units only in size and

complexity. In simulations of moderate size, it may be desirable to use only

a single superblock, thus avoiding the assumption that subsystems in different

superblocks are nearly independent. In large simulations involving subsystems with widely differing response times, the division into superblocks

should separate fast systems from slow systems, to take advantage of the

independence of superblock time steps.

Other constraints on the division into blocks and superblocks are the maximum

limits of 20 units per block, 30 simultaneous equations per block, 10 blocks

per superblock, 20 simultaneous equations per superblock, and 20 differential

equations per superblock. These limits are not fundamental, and can be increased if necessary (see section 5.6).

It is recommended that once the division of the simulation into blocks and

superblocks has been chosen, the boundaries of blocks and superblocks should

be shown on the system diagram. The visualization of blocks and superblocks

on the diagram is also helpful since there should be a minimum of connections

between units which pass though superblock or block boundaries. Once the

diagram has been completed with unit, block, and superblock designations it can serve as a useful guide when entering the simulation information into the

computer.

2.6 Boundary Conditions

In the context of HVACSIM, a boundary condition is defined as a state variable

which is an input to at least one unit in a simulation but is not an output of

any unit. Boundary conditions are divided into two categories: constant or time-independent boundary conditions, and time-dependent boundary variables.

The latter are sometimes referred to simply as boundary variables.

A simulation description provides a model of a real system. Time-dependent

boundary variables represent the environment to which the system responds. In

7
a building system the environment might include external driving forces such

as outdoor temperature and solar radiation, internal driving forces such as building occupancy and equipment utilization, and controlling forces such as scheduled equipment setpoint changes.

The HVACGEN program allows any variables in the simulation to be designated

time-dependent boundary variables. Note that only boundary conditions should

be so designated. The program SLIMCON issues a non-fatal error message if any

simultaneously solved variables are declared as boundary variables.

The simulation program expects to find time-varying values for each of the

specified boundary variables in a file. The structure of the boundary condition file is described in chapter 4. Constant boundary conditions, defined as boundary conditions which have not been declared time dependent, simply retain

their initial values throughout a simulation.

2.7 Reported Variables

Running a simulation produces files containing a record of the values of

certain simulation variables at certain time intervals. The HVACSIM+ programs

allow any variable in the simulation to be designated as a reported variable.

The time interval at which reported variable values are recorded in the output

file can also be chosen. Different reporting intervals and reported variables

may be used for each superblock. For example, a building zone superblock

might have information reported at ten minute intervals (of simulated time)

while an air handling unit might have its crucial variables reported every

minute.

2.8 Work Files and Model Definition File

The information describing a simulation is stored in a computer file called a work file. There are three types of work files. A simulation work file con- tains all of the information required to describe a complete simulation. A

second type of work file describes only the information for a block of units.

Finally, the least complex work file is a unit work file which contains

information on a single unit. The reason that block and unit work files are allowed is that it is possible using the HVACGEN program to insert new blocks

and units into a simulation. This is done by taking the information in a block or unit work file and merging it into the information in a simulation

work file to create a larger simulation.

The use of previously created blocks and units allows a large simulation to be

developed from pieces which might have been previously used and tested in

another simulation. Less effort is required to define the details of the

blocks in a simulation. In addition it is possible to build up a large number

of standarized units and blocks with the characteristics of specific real

pieces of equipment from specific manufacturers. The parameters for the

equipment need only be entered once, and then the user can create simulations

in terms of these pieces of equipment rather than at a very basic level.

8
The HVACSIM simulation program cannot use the simulation work file directly to run a simulation. The HVACSIM program reads the simulation description from a file called the ’model definition file.** This file contains preprocessed

information derived from the simulation work file. To convert a simulation

work file to a model definition file, a separate utility program called

’’SLIMCON” is used. This conversion need not be done during the model development process. When the simulation is ready to be run the model definition

file can be created.

2.9 Developing Complex Simulations

A complex simulation can be built using the HVACGEN program. It is possible

to insert blocks and units into a simulation, to delete blocks and units from

a simulation, and to replace units with units of a different type. It is also

possible to save blocks from a simulation for later insertion into the same

simulation or other simulations. With the current version of HVACGEN, however, it is not possible to insert a superblock into a simulation or delete a superblock from a simulation. Therefore a special technique is required to

build multi-superblock simulations from blocks and units previously created or saved.

If a simulation is to be built with one superblock, the first step is to

create a framework for the final simulation by creating a simulation which has

a single superblock with one block and one unit in the block. This is the

minimum simulation that can be built with one superblock. The insert block

and insert unit functions of HVACGEN can then be used to build up the simulation. If an additional superblock is to be added to this simulation, it

cannot be done with the current version of HVACGEN.

If a mul ti- superblock simulation is to be built, the number of superblocks

must be known before the framework simulation can be created. It is better to

have an extra superblock which is not needed and which contains a unit not

connected to any other unit, to allow for future expansion, than to be unable

to add another superblock to a simulation.

When units or blocks are inserted into or deleted from an existing simulation

or framework simulation, some potential confusion may arise with regard to

the connections of the new units to the existing units and the numbering of

units and blocks. Units and blocks in a simulation are assigned numbers as

they are added to a simulation. These numbers are not fixed, and may change

if a unit or block is deleted from the simulation. For example, consider the case where there are five blocks in a superblock, numbered from one to five.

If block two is deleted, block one will still be named block one, but block

three will become block two, block four will become block three and block five

will become block four. After the deletion there will be no block five. As

blocks or units are added, the numbers they are given will be the next number

in series in the simulation and will have no correspondence to the block or superblock into which they are placed.

If a unit is inserted into a simulation, the input and output variable indices

that were stored in the unit work file will not correspond to any indices

9
currently in the simulation. The indices should be immediately edited to

connect the unit to other units in the simulation. The initial values should

also be entered for any new variables created by the insertion. A unit will

typically be inserted between two existing units which are connected to each

other. In this case, the variable indices of at least one of the adjoining

units must also be edited to properly connect the new unit.

When a block is inserted into a simulation, the input and output variable

indices are probably incorrect. Although the units within the block will be

properly connected to each other, the variable index numbers within the block

work file may also exist somewhere else in the simulation. HVACGEN has the

capability to partially alleviate this problem by optionally renumbering the

index numbers within a block being inserted into a simulation. This option

can greatly reduce the amount of variable index editing required.

2.10 Summary of Model Development Procedure

A summary of the suggested steps in developing and running a simulation is

given in the table below. If mistakes are made, some steps will have to be

repeated before moving on to the next step.

1. Determine system and components

2. Determine types available and select types

3. Diagram types and connections

4. Select parameters for types

5. Group units into blocks

6. Group blocks into superblocks

7. Select Boundary variables

8. Select Reported variables

9. Determine initial values

10. Run HVACGEN to create simulation work file

11. Run SLIMCON to create model definition file

12. Set up boundary value file

13. Run HVACSIM

14. Interpret results

The order of the first ten steps may be varied to some extent. For example,

in some some situations it might be more convenient to create a simulation

with arbitrary parameter values and subsequently edit the simulation to enter

realistic parameter values.

10
3. HVACGEN - TEE HVACSIM MODEL CONFIGURATION PROGRAM

This chapter provides the reference material for operating the HVACGEN program

used to configure simulations which are to be run using the HVACSIM simulation

program. Sections 3.1 through 3.4 discuss general information about the program and its use. The sections following 3.4 describe the commands available

when running HVACGEN.

3.1 Basic Commands: CREATE, VIEW, and EDIT

There are three basic types of operations that the HVACGEN program performs.

All operations are oriented around the concept of the work file. The work

file contains all information describing a complete simulation, a simulation

block, or a simulation unit. The basic operations are used to modify the

information in these work files.

The first basic operation is CREATE. This operation is used to produce a new

work file with information entered from the keyboard. No previous work file

is required to use the create operation.

The second basic operation is VIEW. For this operation a work file must have

been previously created. VIEW allows the information in the work file to be

examined in a simple manner and displayed on the computer terminal. The original work file is left unaffected by the VIEW operation.

The third basic operation is EDIT. This is a powerful operation which allows

the information contained in a work file to be changed, added to, or reduced.

A work file must have been previously created. The information in the existing work file is manipulated using the computer terminal and the edited information is written into a new file or back to the original file.

3.2 Control of the Program

In any computer program used for interactive operations with the program user,

there are a number of ways for the user to control the program using a keyboard. At one extreme is the program which simply presents a prompt and

expects the user to enter commands consisting of one or more characters to

direct the program. This is a command driven system. At the other extreme is

the program which gives the user a "menu” of choices at every decision point.

This is a menu-driven system.

Another distinction between program control methods is how many of the total

set of commands or menu choices available in the entire program can be used at

any time. Usually a menu-driven system has a hierarchy of menus which allows

only a small subset of the total menu items from all menus in the program to

be used. A choice on the first menu (or main menu) produces a secondary menu. A choice on the secondary menu produces a tertiary menu and this process

continues depending on the complexity of the program. Once on the tertiary

menu, however, a choice from the main menu cannot be entered. An extreme

command driven system may allow any of the program commands to be entered at

11
any time. Command driven systems may also have a hierarchy in which only

certain sub-commands may be entered after a particular command has been en- tered.

The HVACGEN program is a combination of a menu and command driven system, and

there is a hierarchy to the commands. However, there are also some commands

which may be entered at any time. The HVACGEN program has a main menu which

displays the main program commands. These may be entered as shown on the menu

and, like a menu driven system, a secondary menu will be displayed asking for

a subcommand. However, for the user who is familiar with the program, the

levels of menu after the main menu may be bypassed by typing all of the subcommands for a main menu command on the same line. For example, a user might

enter "EDIT SIMULATION HVAC3 STRUCTURE." The program would go directly to the

portion of the program which allowed editing the structure of a simulation

with the name HVAC3. If only "EDIT" were entered, other menus would prompt

for what type of work file to edit, the name of the work file, and what part

of the work file to edit.

The lower levels of the program hierarchy are more of a completely menu driven

system. A number of choices are displayed on a menu and only choices from

that menu may be selected. Choices from the next menu may not be stacked onto

the first choice. The transition from command/menu system to pure menu system

is indicated by the change of menu choice entry from alphanumeric commands to

menu-choice index numbers.

As mentioned, there are some commands which may be entered at any time, even

if the program is asking for numerical input. This type of command, which may

be referred to as "transparent," is used for purposes such as aborting the

current operation, getting help, examining information on available types, or editing the information for a unit which has been already entered during the

creation of a simulation or block work file.

The ABORT command may be typed at any time. This command causes an unconditional return to the main menu. If a work file is being edited, all changes

will be discarded and the file will be left in its original state. If a file

is being created, all information entered will be lost. To avoid accidental

loss of data, the program prompts for verification of the ABORT command.

The HELP command may also be typed at any time, except when the program is

expecting a filename entry. General information on the program will be displayed. Following the help information, the program returns to where it was

when the help command was entered.

EDIT and VIEW commands may be used to edit and view units in a simulation or block work file which is currently being created. Any unit for which inputs,

outputs, and parameters have been previously entered can be edited or viewed

without terminating the process of creating the simulation or block. Table 3-

1 shows the transparent commands and when they may be used.

3.3 Command/Menu Syntax

When commands in the upper levels of the program are shown on menus with the

12
Table 3-1 Transparent Commands

commands-> ABORT HELP EDIT-UNIT VIEW-UNIT

used during: |

1

1 Create Sim. I yes yes yes yes

Create Blk. | yes yes yes yes

Create Unit I

I yes yes no no

1 View Sim. I yes yes no no View Unit |

| yes yes no no

1 Edit Sim. | yes yes no no

Edit Unit |

I yes yes no no

1 Filename entry

|

yes no no no

first two letters capitalized, the command may be entered by shortening the

command to the capitalized letters. For example, to enter the CReate command,

the user can enter “CREATE**, **CRE”, or **CR*’. This applies to the stacking of

commands on one line. Therefore “EDIT SIMULATION HVAC3 STRUCTURE** may be

entered as **ED SI HVAC3 ST*‘.

In some cases the program will display a value and ask if it is acceptable.

The proper answer is yes or no. Yes can be abbreviated to the letter Y or y. In most cases yes can also be entered by a simple carriage return. No can be

entered using the letter N or n. Either upper case or lower case responses

may be used.

When a number is requested which is a real number (such as a unit parameter),

it is not necessary to enter a decimal point for whole numbers. The program

does not allow numbers which are unreasonable to be entered. An error message

is given if the number is out of range, and the user is asked to re-enter the

number.

3.4 Basic Program Operations

There are two sequences of basic program steps which are so commonly encoun- tered that they are described in one place and referred to by a shortened

name. These are the "save sequence,** used to save information in files, and

the edit sequence, used to change a list of previously assigned values.

3.4.1 Save Sequence

The program operations are performed on the information in work files which

are for blocks, units, or simulations. The work files are referred to while

in the program by a filename. This filename can have a maximum of eight

13
characters consisting of only numbers and letters. The actual operating

system filename used for the work file may not be exactly the same as the

eight character name used while running the program, but incorporates the

eight character name in the operating system filename along with a way to

identify the file as a unit, block, or simulation work file. To refer to this

file from the program, however, only the original 8 character file name as entered here need be used. For example, on many computers, a system file name

consists of an eight character filename with a three character extension such

as "FILENAME. EXT*’. For a simulation work file saved under the name "BLDG25",

the system filename would be "BLDG25.SIM" .

The "save sequence" is used by the program to save information in work files.

If a change is made to any simulation data, the program attempts to save the

changes in the work file. The save sequence begins when the program asks for

a filename for saving information. If any filename has been previously used

(to read in work file information) the filename last used is displayed and the

program asks if it is acceptable to save under this file name. A carriage

return or "Yes" answer will then save the changed information under the file

name last used. This is convenient when editing data in a work file and

saving the changed data in the same file. If a different filename should be

used, a "No" answer should be given to the question. The program then prompts

for a new filename and saves the simulation information under that name. If no filename has been previously used (such as in the case where the program is

started and one of the create commands is used and a filename is needed to save the entered information) the program simply requests a filename. The

"save sequence" is encountered often and provides a maximum of safety in

avoiding loss of editing changes.

If an illegal filename is entered during the save sequence, the program prints

an error message and ask for the filename again. If a filename is entered

that is longer than eight characters, the name is truncated to eight. The

ABORT command can be used when a filename is requested, which prevents the

saving of any information in a file. For this reason filenames starting with

the characters "ab” cannot be used.

Depending on the exact implementation of the HVACGEN program, backup files may

or may not be available. If backup files are used, then whenever a work file

is edited, a copy of the file is saved as it was before changes were made. If

additional changes are made, the original backup is replaced with the next

most recent version of the work file. The backup file is created at the time

that the filename to edit is entered. If the editing is aborted, the backup

file will then contain a copy of the work file as it was when the most recent

EDIT command was given.

3.4.2 Edit Sequence

The "edit sequence" consists of displaying a list of values one at a time, and

requiring the user either to approve or to reject and modify each value before

the next value is displayed. The edit sequence is encountered only in the

EDIT section of HVACGEN, and begins when certain categories of information

have been selected for editing. For example, a request to edit the parameter

14
values of a particular unit invokes the edit sequence.

The program begins the sequence by displaying the first value in the selected

category and asking if the displayed value is correct. If the answer is yes

or carriage return, the value is left unchanged and the program displays the

next value in the category, again asking if the current value is correct.

If the current value is not acceptable and the answer given is no, the program

prompts for a new value of the item. After a new value is entered, the

program displays the new value and again asks if this value is correct. This

procedure is repeated as many times an necessary until all items in the category have been approved. Note that once approved, a value cannot be changed

again until the entire list of values in the category has been completed.

3.5 The Main Menu

When the HVACGEN program is started, a menu of the basic commands is presented

on the computer console. This menu allows a choice of the commands CREATE,

EDIT, VIEW, and HELP plus the command END which ends the program. Also shown

is the version number of the program and the date last changed. The create,

edit, or view commands may be entered in the single word form as shown on the

menu, and the program then asks for additional information as necessary.

Alternatively, the commands may be entered in the multiple word forms shown as the titles of the subsections under the CREATE, EDIT, and VIEW command descriptions on the following pages. Descriptions of all commands will be found

in the remaining sections of this chapter. Figure 3-1 is a diagram showing

the major commands, subcommands, and the menus which are presented.

3.6 The Create Command

The command CREATE is entered to begin creating a new simulation, block, or unit. This command is used after a simulation or part of a simulation has

been conceptualized and a diagram of the system to be simulated has been

produced (as described in chapter 2). Entering CREATE takes the user to a portion of the program where information is entered in a highly prompted

manner to produce an initial specification for a simulation, block, or unit.

The CREATE command can be entered alone or along with the type of construction

to be created, either UNit, BLock, or Simulation on the same line (e.g. CReate

UNit). If the CREATE command is used alone, a menu prompts for the choice of

what to create.

While in the CREATE section of the program, the user may use the EDIT UNIT and

the VIEW UNIT commands at any time when not actually entering information for

a unit that is to be viewed or edited. Also while in CREATE, the HELP command

may be used at any time.

At any time while in create, the powerful command ABORT may be used to end the

current creation of a unit, block, or simulation. However, if ABORT is used

before the entry of a file name to save the created information, all information will be lost. The ABORT command returns the program to the main menu.

15
Figure 3-1. Schematic diagram of major commands of HVACGEN

16
3.6.1 CReate UNit

If UNIT creation is selected, the number designating the type of the unit to

be created must next be entered. If the number of the type is not known, a list of all types in the library can be obtained on the screen by entering the

command TYPES at the prompt for the unit number.

When a valid type descriptor has been entered, the program prompts for the

index numbers of the input variables. The index number may be any integer

between 0 and 100. If a number outside this range is entered the program

gives an error message and asks for the index again. Within this range, and

at this point in creation, there is no restriction on the index number used.

In prompting for index numbers, the program identifies each variable by category (see table 2-1) and description.

After all input variable indices have been entered, the program prompts for

output variable indices. Note that all outputs in a simulation should be

distinct. For example, if two units calculate flow rates which must be identical due to conservation of mass, the two outputs should not be given the

same index number. One of the outputs may be given an index of zero (0),

which causes the value of that output to be ignored, or different indices may

be used for the two physically identical variables. The program SLIMCON (but

not HVACGEN) issues a warning message if two or more output variables in the same category share the same nonzero index number.

As each index for a variable is entered into the program, the user should

ensure that the index number is recorded on the diagram being used as a guide

to create the simulation. The index numbers define the structure of the

system model, in that they determine the flow of information from one component to another.

After all input and output indices have been entered, the program prompts for

type parameters. These numbers indicate physical properties or coefficients

for determining the behavior of a particular type. Each type has a fixed set

of parameters. The prompt for the type parameters includes the alphanumeric

description of the parameter and the engineering units in which the parameter

is to be entered. Parameters need not be entered with a decimal point if the

number does not have a fractional part.

After all parameters have been entered, the program prompts for a file name

and executes a ’’save sequence. No default filename will be presented. The

unit description is stored in a unit work file and the program returns to the

main menu. At this point, there is no difference between having entered the

program for the first time and having just created a unit. There is no intermediate storage for the unit description. Any editing or viewing of this unit

description must be done using the file just saved.

3.6.2 CReate BLock

When a block is created, it is assigned a block number by the program. This

block number is reported after the create block command is entered, but has

17
little meaning. Block numbers are only significant when a simulation with

multiple blocks is created or edited.

Creating a block consists of creating a series of units. The creation of each

unit in a block is the same as creating a single unit (SEE CREATE UNIT). The

user is prompted for the type of the first unit in the block, then for the

indices of the input variables, the indices of the output variables, and the

values of the type parameters. If an incorrect or unknown type designation is

entered, the program repeats the prompt for the name or number of the type. A

list of the available types can be obtained by entering the command TYPES.

After all information for the first unit has been entered, a message reports

the maximum number of units allowed per block and the number of units that can still be entered in the current block. The user is then asked if he would

like to continue entering units. The answer to this question determines how

many units will be placed in the block. If a single unit is to be placed in

the block, the question is answered with a no. If more than one unit is to be

included in the block, the question is answered yes. After the information

for the last unit in the block is entered, the question is answered no. The

M •• • « t* MM MM •• • • M M •» •• •• •• answer yes or no can be YES , yes , Y, y, NO, no, N,or n.

In response to a yes answer, the program prompts for type number or name,

variable indices, and parameter values for the next unit in the block. After

each unit is entered, the number of available slots for entry of units in the

block is given and the question on continuation of unit entry is repeated. If

the maximum number of units has been entered, the program automatically ends

the entering of units.

If the question on continuation is answered no, or if the maximum number of

units has been entered, the block is then finished and the program goes

through a "save sequence.” The program then returns to the main menu, ready to

allow the selection of a new function.

If £ mistake is made while entering information for a unit (except for the

type number, see below) the user can correct the error after the rest of the

information for this unit has been entered. When the program asks if the user wishes to continue entering units, there is an EDIT UNIT command which allows

editing of the information for units which have already been entered. The

EDIT UNIT command can be used during the process of creating a block. The use

of this command is described below, in the section on the EDIT command (section 3.8.1).

If the wrong type identification is entered, there is no way to immediately

correct this mistake. The user may either use the ABort command, which discards all information in the block and returns control to the main menu, or he

may supply arbitrary input, output, and parameter information (e.g. zeros) to

get to the next prompt for information on a new unit, and then proceed with

the correct information.

The current version of HVACGEN has EDIT commands for modifying unit and simulation work files, but not block work files. After a block work file has been

created, a rather indirect approach is required to correct errors or other18
wise modify the information it contains. The EDIT SIMULATION commands can be

used to insert the block into an existing simulation, edit the information,

and write the modified block to a block work file again. These procedures are explained in section 3.8.2.

3.6.3 CReate Simulation

Since a simulation consists of superblocks which are made up of blocks which

in turn are made up of units, the program must keep an accounting of the current superblock number, block number, and unit number. When the CREATE SIMULATION section of the program is invoked, the program assigns the number 1 to

the first superblock to be created, the first block in this superblock, and

the first unit in this block. As each additional unit, block, or superblock

is added, the appropriate number is incremented.

The creation of a simulation requires the entry of two types of information.

First is the information on the units, including their assignment to particular blocks and superblocks. This category constitutes the structure of the

simulation. Second, simulation creation requires the entry of information

which controls the operation of the simulation. This includes designation of

boundary variables, initial conditions, variables to be reported, reporting

intervals, and error tolerances.

3. 6 .3(1) structure information

The entry of information on the units is exactly the same as for the CREATE

UNIT and CREATE BLOCK commands. The program prompts for unit type, input and

output variable indices, and type parameters. After the entry of this information, the program displays the number of additional units that may be placed

in this block and asks whether additional units are to be added to the current

block. If the answer is yes, the program prompts for the information on the

next unit in the current block. If the answer is no, the current block is

closed. The program then lists the the number of additional blocks that can

be placed in the current superblock and asks whether additional blocks are to

be added to this superblock. If this question is answered with a yes, the

program increments the block number and asks for information on the units to

be placed in the new block.

When no additional blocks are requested, the current superblock is closed.

The program then displays the number of additional superblocks that may be

placed in a simulation and ask if additional superblocks are to be added. If an affirmative answer is entered, the superblock and block counters are incremented and information on the first unit in the first block of the next

superblock is requested. Note that units and blocks are numbered for the

entire simulation and do not start at one in each new superblock. Each time a new superblock or block is begun, the user should note the assigned block

number on the planning diagram.

if. a m istake is. m ade while entering inf ormat ion for a unit (except for the

type number, see below) and the carrage return key has already been pressed,

the user should not attempt to correct the error until the rest of the infor19
mation for this unit has been entered. When the program asks if the user

wishes to continue entering units, there is an EDIT UNIT command which allows

editing of the information for units which have already been entered. The EDIT

UNIT command can be used during the process of creating a simulation. The use

of this command is described below, in the section on the EDIT command (section 3.8.1). If, however, the wrong type identification has been entered,

there is no way to immediately correct this mistake. Although the EDIT command

allows deletion or replacement of units (which is the only recourse if the

type number is wrong), this cannot be done while executing the CREATE SIMULATION command. If an incorrect type number is entered, the user should then

supply arbitrary input, output, and parameter information (e.g. zeros) to get

to the next prompt for information on a new unit, and then proceed with the

correct information for the unit. After the creation of the simulation is

complete, the erroneous unit can be easily deleted or replaced using EDIT

commands

.

To end the entry of unit information for the simulation when all units have

been described, all questions about continuing to enter units, blocks, or superblocks should be answered with a no. After the program receives the

information that no more superblocks are to be entered, it asks for the

additional information required run the simulation.

3.6. 3(2) simulation control information

After all the unit description information is entered, the title of the simulation is requested. The title can be up to 80 characters in length and may

contain any alphanumeric characters. The title is used to give a brief description of the system being simulated.

After the title of the simulation is entered, a decision must be made about

what values to use for the simulation program error tolerances. There are four different error tolerances, and a default value is available for each

one. The default tolerances are somewhat arbitrary, but generally produce

satisfactory results. The significance and effect of these error tolerances

is described in reference [1]. Briefly, RTOLX and ATOLX are relative and

absolute error tolerances, used primarily to decide when a variable has

reached steady state and may be "frozen," that is, removed from the set of

equations being solved, and when a frozen variable has begun to change significantly and should be "unfrozen," or reinserted into the equation set. ATOLX

is often much less than RTOLX; its purpose is to prevent division by zero when

a variable has a value of zero and the relative error is undefined. XTOL is an error tolerance used exclusively by the simultaneous equation solving

portion of the simulation program. The recommended value of XTOL is the

square root of the machine precision, which varies from computer to computer.

TTIME is defined as the time interval over which the integral of a differential equation must be within error tolerances. Increasing TTIME results in a larger number of shorter time steps during the course of a simulation. Limited experience suggests that values between 1 and 100 are reasonable, with 3 or 10 being fairly typical.

In most cases the user may simply answer "yes" and use the default values, but

experimentation is encouraged.

20
The program then proceeds to calculate, from the previously entered information, the total number of variables and the number of variables in each

category such as pressure, flow, temperature, and so on. A report of the

totals is written to the terminal. In order to run a simulation, the program

must be given initial values for all of these variables to use as a starting

point. The program prompts for initial values to be entered one at a time.

The prompt includes the category of the variable (such as pressure) and the

variable index. This is the same index that was entered during the unit

specifications, which the user should have written down on the model specification diagram.

The prompt for initial values begins with variable index one and proceed in

increments of one up to the maximum number of variables in that category. It

is quite possible that variable index one or any other index might not have

been used when entering the unit specifications. The initial values are

stored in a list or array of numbers which must have space for all variable

values up to the maximum index for each category. This list is called the

"state vector." The state vector must have all values filled in even though a particular index was not used. If an index is not used the number entered for

the initial value is unimportant. The use of zero is a good practice, since

carriage returns are treated as zeros. If a variable index was used in entering the unit specifications, the number entered for the initial value should

be significant.

When all initial values for a particular category have been entered, the

program begins prompting for the initial values of variables in the next category.

After all initial values have been entered, the program prompts for the designation of time dependent boundary variables. As discussed in section 2.6, any

unit input variables which are not outputs of any unit in a simulation are

considered boundary conditions. If not designated as time dependent, these

variables will retain their initial values throughout a simulation. Typical

examples of time dependent boundary variables are setpoints, outside air

temperature and humidity, and fan speeds. Any of the variables in a simulation may be declared time dependent boundary variables. The HVACSIM simulation program expects to find values for the time dependent boundary variables,

and the corresponding values of time, in an external file when the simulation

is run.

For each category of variable, HVACGEN prompts for the index numbers of any

variables in that category which should be boundary variables. If there are

no boundary variables in a particular category, or if all boundary variables

in a category have been entered, a carriage return causes the program to move

on to the next variable category.

When a simulation is run, the output consists of the values of certain of the

simulation variables at each time step and at some fixed time interval different from the time step. The HVACSIM program allows any of the variables to be

reported. Since superblocks may have different time steps, it is possible to

report variables in different superblocks at different frequencies. For ex21
ample, variables in one superblock may be reported every five seconds while

variables in another superblock may be reported only every sixty seconds.

After all boundary variables have been designated, the program prompts for

reported variables. These are grouped by superblock.

The program begins prompting for reported variables by requesting a reporting

interval for the variables in superblock one. All variables in superblock one designated as reported variables will be reported at this interval. For each

category of variable, the program asks for indices of variables to be reported. The entry of values is identical to the entry of boundary variable designations. If no variables in a category are to be reported, or all reported

variables in a category have been entered, a carriage return causes the program to move on to the next category of variables for that superblock.

After all reported variables for a superblock have been designated, the program prompts for values of the

' Variable freezing option** and the input scan option ." Possible values for the variable freezing option are 0, 1, or 2.

Possible values for the variable input scan option are 0 or 1. The significance of these options is discussed in reference [1], pages 5, 6, and 8.

Briefly, the freezing option influences the strength of coupling among the

blocks within a superblock, and has no effect on simulations consisting of a single block. The input scan option influences the strength of coupling

between superblocks, and has no effect on simulations consisting of a single

superblock. In both cases, the choice involves a tradeoff between speed and

accuracy. The zero options reduce the amount of computation required, at the

cost of reduced accuracy. The recommended procedure is to begin with the high

values, experimenting with the low options only after a simulation has been

run successfully.

After all information for the first superblock has been entered and if there

is more than one superblock in the simulation, the program requests a reporting interval for the next superblock in the simulation. This reporting interval may be different from the reporting interval of the other superblocks. As

with the first superblock, the reported variables are designated by entering

the variable indices for each category of variable. A variable freezing

option and an input scan option are also requested for each superblock.

Entry of all reported variables and options completes the specifications for

CREATing a SIMULATION. At this point the program prompts for a file name

under which to store the simulation. This name, like the block and unit

filenames, is an eight character name which uniquely identifies the simulation

work file. After the file name is entered and the work file is stored, the

program returns to the main menu.

3.7 The View Command

The view command allows a unit, block, or simulation work file to be examined

for purposes of documentation or review. The command may be suffixed with

UNit, BLock, or Simulation to select the type of work file to be examined. If

the command suffix is not entered, the program prompts for the type of work

file to be viewed.

22
When the view command is invoked from the main menu, the item to be viewed

must be an existing unit, block, or simulation work file, and therefore a filename is required before the file can be viewed. The file name may be

entered along with the VIEW command and the work file type suffix. If this is

not done, the program prompts for the filename. Each of the following section

headings represents the full form a view command as it may be entered when

prompting is not desired.

Under certain conditions, the View UNit command can be used without ever

entering a filename. This use of the command is discussed in the next section.

3.7.1 View UNit <filename>

The View UNit command displays the unit number, the type of the unit by name

and number, the category, index number, and definition of each input and

output variable, and a list of all parameters with names and values. The

program pauses after one page of information has been displayed. A carriage

return may be entered to continue the display.

When entered from the main menu, the VIEW UNIT command is used to examine the

contents of a unit work file. After all of the information on the unit has

been shown, the program returns to the main menu.

The VIEW UNIT command can also be entered at any time during a CREATE BLOCK or CREATE SIMULATION operation. In this case the command is used to review units

in the work file currently being created, and so no filename is required.

Using this command, any unit (for which all the inputs, outputs, and parameters have already been entered) can be viewed at any time without terminating

the CREATE BLOCK or CREATE SIMULATION operation. After VIEW UNIT is invoked,

the program re-prompts for the information that was requested when the view

command was entered.

3.7.2 View BLock <filename>

The VIEW BLOCK command displays information about the units within a block

work file. If the filename is not specified with the VIEW BLOCK command, it

is requested by the program. The program lists the units in the block with

their type numbers and names. It then allows any of the units within the

block to be viewed in greater detail, displaying the category, index number,

and definition of all inputs and outputs, and the values and definitions of

all parameters. This display is exactly the same as the one produced by the

VIEW UNIT command. After the information is displayed, the program prompts

for another unit to be viewed. A carriage return may be entered when a unit

number is requested in order to return to the main menu.

To get detailed displays of all of the units within a block, the user must

type in the unit numbers for each of the units in the block one at a time.

This is currently the best way to document the contents of a particular block

23
work file.

The VIEW BLOCK command is file oriented and cannot be invoked from any point

except the main menu.

3.73 View Simulation <filename>

The VIEW SIMULATION command displays information contained in a simulation

work file. The name of the work file to be viewed may be typed on the same

line as the view simulation command. If the filename is not specified* the

program prompts for the filename. After the program receives the view simulation command* a menu is presented which allows any part of the simulation

information to be displayed. The choices for viewing simulation information

are as follows: STRUCTURE, which gives information on the units in the simulation and how they are arranged in the blocks and superblocks; variable initial

values; error tolerances; boundary variables; reported variables; ALL, which

is intended for simulation documentation and provides a complete simulation

description; or CONTINUE, which returns the program to the main menu. The

view simulation sub-command may also be typed on the line with the view

simulation command as in the sub-section headings below.

3.7.3(1) View Simulation <filename> ALL

In response to this command, the information available from the other view

commands is sent in sequence to the terminal without any pauses for each page.

This results in a complete description of the simulation being output with a single command. This command is intended to allow this description to be

saved in a file or printed. Specific computers will have different methods of

redirecting or capturing console output to a printer or a disc file.

3.73(2) View Simulation <filename> STructure

This produces on the terminal a listing of the superblocks by number, with the

blocks in each superblock shown under the superblock heading and the units in

each block shown under the block headings. The program prompts for a unit

number to allow the details of a particular unit to be examined. After the

unit information is viewed, the program asks for another unit number for

viewing. A carriage return can be used to return to the VIEW SIMULATION menu.

3.73(3) View Simulation <filename> VAriable initial values

This lists all variables by category and index number, giving the initial

values and system of units. The listing pauses each time the screen is

filled. After the initial values are viewed the program does not return to

the main menu, but to the VIEW SIMULATION menu, allowing another part of the

simulation information to be viewed.

3.7 3(4) View Simulation <filename> ERror tolerances and options

This command displays the four error tolerances for the simulation, and the

variable scan option and freeze option values for each superblock in the simu24
lation. The significance of these tolerances and options is discussed briefly

in section 3.6. 3(2). After displaying the values, the program returns to the

VIEW SIMULATION menu.

3.7 ,3( 5) View Simulation <filename> Boundary variables

In response to this command, all of the boundary variables in the simulation

are listed. After the display the program returns to the VIEW SIMULATION

menu.

3.7 .3(6) View Simulation <filename> REported variables

This command displays the reporting interval and the reported variables for

each superblock. After the display the program returns to the VIEW simulation

menu.

3.8 The Edit Command

The CREATE and VIEW commands allow the creation or viewing of simulations,

blocks, and units. The EDIT command, however, can only be used to EDIT units

and simulations, not blocks. Any errors made in creating a block work file

can only be corrected after the block has been inserted into a simulation.

3.8.1 EDit UNit <filename>

The EDIT UNIT command can be used to change any of the information describing

a particular unit, with the exception of the unit type. The EDIT UNIT command

has slightly different capabilities depending on where it is used. If the

command is invoked from the main menu, it can only be used to edit a previously created unit work file, and a file name is required. If the command is

used while in the CREATE BLOCK or CREATE SIMULATION part of the program, its

function is to edit any of the units that have been previously entered as part

of the block or simulation work file being created. In this case no file name

is required. Once the entry of a simulation using CReate Simulation is complete and the information has been saved in a work file, then EDit Simulation

must be used to change any of the units. '

The EDIT UNIT command can be used to produce a unit work file which is a modification of a previously existing unit work file. This is done by editing

the original unit work file, making changes to the unit information, and then

using a new filename to save the unit information. However, to create a new

unit file of a different type, the CREATE UNIT command must be used.

If the EDIT UNIT command is entered from the main menu, a filename will be

requested. This is an eight character name identifying a currently existing

unit work file. Alternatively the command may be entered in the form EDIT

UNIT <filename>, in which case the filename will not have to be requested.

The EDIT UNIT command first causes a display of the unit information, in a manner much like the VIEW UNIT command. The display is divided into three

numbered parts. Part one is the unit input variables, part two i6 the unit

25
output variables* and part three is the unit parameters. These parts are the

smallest portion of the unit information that can be selected for editing. The

number of the part is used to select the part for editing when the program

prompts for the "line number” to be edited. Note that the type of the unit

cannot be selected for editing because the numbers of inputs* outputs* and

parameters varies from type to type.

The "edit sequence” is used to change unit input or output indices or parameter values. For example, if inputs are selected for editing, the program

displays the category and index for the first input and ask if the current

value is acceptable (yes or no). A negative response (N) causes the program

to ask for the correct index. The corrected value is echoed and acceptance or rejection is again required. When the value is correct, a carrage return (or

Y) causes the next input to be displayed for approval. The edit sequence ends

when all items have been approved.

After the complete group of inputs, outputs, or parameters has been produced

and approved, the program again asks for a line number to edit. It is always

true when editing units that one is inputs, two is outputs and three is

parameters. If no additional editing of the unit is desired, a carriage

return ends the editing and the information is saved in a work file with a "save sequence."

3.8.2 EDit Simulation <filename>

EDIT SIMULATION is used to change the information in an existing simulation

work file. The name of the simulation file may be specified on the same line

as the command such as EDIT SIMULATION <filename>. The program prompts for

any information not given on the command line.

After the EDIT SIMULATION part of the program has been entered, the EDIT

SIMULATION menu is displayed to allow any part of the simulation information

to be edited. The choices are editing the title, editing initial values,

editing boundary variables, editing reported variables, editing error toler- ances and options, editing the simulation structure, and the most powerful of

the choices, inserting and deleting (or replacing) units and blocks, and

saving blocks. A final choice is to CONTINUE which returns the program to the

main menu.

3.8.2(1) EDit Simulation <filename> Title

This option allows the title of the simulation to be changed. The title may

be used to record version numbers and dates, as well as a brief description of

the simulation. In response to this command, the program displays the current

title and asks if it is correct. If a No answer is given, the prograjn prompts

for a new title. After the new title is entered, it is redisplayed and the

program again asks if the current title is correct. A Yes answer or a carriage return is entered if the title is acceptable. The program executes the save sequence if the title was changed, and then returns to the EDIT SIMULATION menu.

26
3.8. 2(2) EDit Simulation <filename> STructure

After the command is entered to edit the simulation structure, the program

1 i s 1 8 all of the units in the simulation, grouped in outline form. The blocks

in each superblock are listed after the superblock headings and the units in

each block are listed after the block heading. After the units are displayed,

the program asks which unit is to be edited. This command allows any of the

unit information to be changed except for the unit type. Changing a unit type

must be done with the replace command. The operations to edit the unit are

identical to those for the EDIT UNIT command. After editing is complete, the

program asks for the number of another unit to edit. Another unit may be

edited by entering its number. If a carriage return is entered, the program

assumes that no more units are to be edited and goes through the save sequence

if changes have been made to any unit. The program then returns to the EDIT

SIMULATION menu.

3 .8.2(3) EDit Simulation <filename> VAriable initial values

This command is used to change the initial value of any of the simulation

variables. When this command is used, the program produces another menu con- taining all of the categories of variables (see table 2-1). If any of these

categories is selected, the "edit sequence" is used to cycle through all of

the current initial values for one variable category and allow any or all of

them to be changed. After the variables in the selected category have been

approved, the program returns to the Variable initial values menu and allows

another category of variables to be selected for editing. To end editing of

initial values and return to the EDIT SIMULATION menu, a carrage return may be

entered when a new selection of variable category is requested. Before re- turning to the EDIT SIMULATION menu, the program goes through the "save se- quence" if any initial values have been changed.

3.8. 2(4) EDit Simulation <filename> Boundary variables

This command is used to change the variables designated as time dependent

boundary variables in the simulation. The list of boundary variables is

stored by variable category (pressure, temperature, and so forth). The boundary variable editing section of the program uses two functions to edit the

boundary variable list: insert new boundary variables, or delete existing

boundary variables. When the edit boundary variables command is selected, the

current boundary variables are listed and a submenu displays the two choices.

Figure 32 shows the possible paths that can be taken after entry of one of the

menu choices.

The first option on the edit boundary variables sub-menu is insert boundary

variables . This choice first causes a display of the variable categories and one of these must be chosen by entering the appropriate number. The program

then prompts for a variable index number. The program echoes the number re- ceived and asks if the value is acceptable. If not, the index may be reentered. The program will not accept an index higher than any which exist in

27
V A

Figure 3-2. Menu flow path for editing boundary variables

the simulation. However, it will allow the same index to be entered more than once into the list. This dual entry causes the HVACSIM simulation program to

expect two sets of boundary value inputs for the same variable. Care should

be taken to ensure that all boundary variable indices are meaningful. After a

s ingle index has been inserted, a revised list of all boundary variables is

displayed with the new index included. The program then returns to the edit

boundary variables sub-menu. Insertion of several boundary variables requires

several iterations of the entire procedure: selecting the insert function,

selecting the category, entering the index, and verifying the entry.

The second option of the edit boundary variable sub-menu is delete existing

boundary variables . The procedure is the same as that for inserting boundary

variables. The program displays the possible variable categories and asks for

a choice of variable category by number. Once the category is chosen, the

program prompts for a variable index number. Once the index has been entered,

the program displays the index that was entered and asks for confirmation that

this is the correct index to be deleted. If not correct a value may be reentered. Note that the program will accept any variable index for deletion,

whether it is currently a boundary variable or not. In this case there is no

effect on the boundary variable list. After confirmation, a revised list of

all boundary variables is displayed. The program then returns to the edit

boundary variables sub-menu. Deletion of several boundary variables requires

repetition of this procedure.

To exit the edit boundary variables command, a carriage return at the edit

boundary variable sub-menu causes the program to return to the EDIT SIMULATION

menu. A "save sequence" is performed before returning.

28
3.8. 2(5) EDit Simulation <filename> REported variables

The simulation program, HVACSIM, produces two output files of reported variables. One reports values at each time step actually taken by each superblock

in the simulation. The other reports interpolated values at equal time intervals. The constant time interval may be different for each superblock. This

command is used to change either the reporting interval or the list of reported variables.

When the EDit REported variables command is entered, the program displays the

reporting interval and the list of reported variables for each superblock.

Next it displays a sub-menu with three numbered commands: change the reporting

interval, insert new reported variables, and delete existing reported variables. Figure 3~3 illustrates the flow of the program when any of the three

choices is taken.

Figure 3-3. Menu flow path for editing reported variables

The change existing reporting interval sub-command is used to change the con- stant interval at which reported variables are written from the simulation for

any or all of the simulation superblocks. Choosing this command invokes an edit sequence for all of the superblock reporting intervals. When the reporting interval for each superblock has been approved, the program again displays

the reporting interval and list of reported variables for each superblock, and

returns to the change/add/delete reported variable sub-menu.

The second and third options on the edit reported variables sub-menu are

insert reported variables and delete existing reported variables . Selecting

either of these options results in the following sequence:

29
1. If the simulation contains more than one superblock, the program requests

the number of the superblock associated with the variable to be inserted

or deleted.

2. The program displays the available categories of variables, as given in

Table 2-1, and requests a category number.

3. The program prompts for the index number of the variable to insert or delete.

4. The program echoes the index number entered by the user and requires

approval (yes or carriage return) of this number.

5. The program displays an updated list of reporting intervals and reported

variables for all superblocks, and returns to the EDit REported variables

sub-menu.

This procedure can be very tedious when a long list of reported variables is

to be replaced with a different list. The procedure may be modified in future

versions of the program.

To exit the edit reported variables command, a carriage return at the edit

reported variable sub-menu causes the program to return to the EDIT SIMULATION

menu. Before returning to this menu, however, the program goes through the

"save sequence" to save any changes in the simulation work file.

3.8.2(6) EDit Simulation <filename> ERror tolerances and variable scan and

freeze options

This command is used to change certain parameters which affect the operation

of the main simulation program. The explanation of these parameters may be

found in Section 3. 6.3(2). If the choice is made to execute this command, a menu is first displayed which shows three options. These are: to edit error

tolerances, to edit the variable scan and freeze options, and to return to the

EDIT SIMULATION menu.

If the error tolerances are selected for editing, an "edit sequence" is exe- cuted which allows any or all of the four error tolerances to be changed.

After the sequence, the program returns to the edit error tolerances and scan and freeze options sub-menu.

If the variable scan and freeze options are selected for editing, an "edit

sequence is performed allowing the two options to be changed for each superblock in the simulation. After the sequence, the program returns to the edit error tolerances and scan and freeze options sub-menu.

To return to the EDIT SIMULATION menu, a carriage return is entered at the

edit error tolerances and scan and freeze options sub-menu. This causes a "save sequence" and then the EDIT SIMULATION menu is redisplayed.

30
3.8. 2(7) EDit Simulation <filename> INsert or replace

There are two operations that change the units making up a simulation. An

insert operation can place a new unit into the simulation at a selected

location within an existing superblock and block. This unit may then be con- nected to other units by manipulation of the variable indices assigned to that

unit. An insert operation can also place an entire new block into a simulation within an existing superblock. The replace operation, defined only for

units, allows any existing unit to be replaced with another.

When the INsert command is chosen from the EDIT SIMULATION menu, a small submenu then allows the user to select the insertion of a unit, the insertion of

a block or the replacement of a unit.

3.8.2(7A) insert unit

Before a unit can be inserted into a simulation, the block into which the unit

is to be inserted must be specified. The program prompts for a block number,

echoes the number entered, and asks for confirmation that the number is cor- rect. A yes (carriage return) or no answer is required. If a block number

which is not in the simulation is entered and verified, the program prints a message that the block is not in the simulation and asks for another block

number.

Next the program asks for the source of the information about the unit that is

to be inserted into the block. This unit information can come from one of two

sources. One source is to enter all unit information directly from the keyboard. This is called creating, and is the same as creating a unit under the

CREATE UNIT command. The other source of unit information is an existing unit

work file previously created with the CREATE UNIT or EDIT UNIT commands. When

the unit is entered, the new unit is given the next unit number in sequence in

the simulation, regardless of the unit numbers of the other units in the block

where the insertion is made.

To enter a. unit from the keyboard , select option 2 when the source of the

inserted unit is requested. The entry of unit information is the same as for

the CREATE UNIT command (see section 3.6.1). The program calls for the entry

of the unit type, input and output variable indices, and parameter values.

After the last parameter is entered a warning message reminds the user to

check the inputs and outputs carefully. Each input or output variable index

that is entered is used to connect the unit to other units in the simulation.

The program also prints a reminder that the initial values, reported variables, and boundary variables may need to be viewed/edited after the insertion

of this unit since new variables may have been added with the unit. Editing

of the newly inserted unit or the initial values can be easily performed by

returning to the EDIT SIMULATION menu and editing the appropriate items.

After the unit has been completely entered, the program executes a "save

sequence** and returns to the INsert or replace sub-menu. This allows several

units or blocks to be added in succession without returning to the EDIT

31
SIMULATION menu.

To read unit fro m a. unit w ork file , select option 1 when the source of the

inserted unit is requested. The program then prompts for a filename. This

name must be the eight character name which represents an existing unit work

file. Note that the inputs, outputs, and parameters for the unit being inserted will be the same as they were when the unit work file was created. The

parameters are likely to be correct since the unit may be constructed to

represent a specific piece of equipment, but the inputs and outputs are probably incorrect at this point. Before reading the work file, the program asks

if all variable indices are to be set to zero. Answering yes to this question

effectively inserts the unit as a completely disconnected unit with no connections to any other unit. The EDIT SIMULATION STructure command must be used

to modify these values to correctly connect the unit to the other units in the

simulation (see section 3. 8. 2(2)). If the indices are not set to zero, they

are set to the values stored in the unit work file. In either case, a warning

message is written to remind the user to edit the unit inputs and outputs, and

to view or edit the initial values, and possibly the boundary and reported

variables

.

After the unit work file is read, the program goes through a "save sequence"

to save the enlarged simulation in a simulation work file, and returns to the

INsert or replace sub-menu. A carriage return brings the program back up to

the EDIT SIMULATION menu.

3.8.2(7B) insert block

Before a block can be inserted into a simulation, the superblock into which

the block is to be inserted must be specified. The program prompts for a superblock number, echoes the number entered, and asks for confirmation that

the number is correct. A yes (or carriage return) or no answer is required.

If a superblock number which is not in the simulation is entered and verified,

the program prints a message that the superblock is not in the simulation and

asks for another superblock number.

Note that blocks can only be inserted into existing superblocks. It is not

possible with the current version of the program to increase the number of

superblocks in an existing simulation. To expand the number of superblocks in

a simulation, CREATE SIMULATION can be used to create a simulation with the

correct number of superblocks and with only one dummy block, containing one dummy unit, in each superblock. The TYPE 26 component is convenient for this

purpose, since it has only one input, one output, and no parameters. The

blocks to make up the simulation can then be read from block work files. It

is strongly suggested that a complex simulation be built from block work files

for maximum flexibility. Block work files can be prepared using either the

CReate BLock command (section 3.6.2) or the SAve command described below in

section 3. 8. 2(9).

Once the superblock into which insertion is to take place is identified, the

program asks for the source of the information about the block. This block

information can come from one of two sources. One source is to enter all

3 2
information directly in from the keyboard. This is called creating, and is

similar to creating a block under the CREATE BLOCK command. The other source

of block information is an existing block work file. When the new block is

entered, all of the blocks in the simulation are renumbered according to their

location in superblocks. The inserted block is given a number one greater

than any of the other blocks in the superblock into which it was inserted.

Blocks in superblocks with numbers higher than the superblock where the block

was inserted will have their block numbers incremented by one. Blocks in

superblocks with numbers lower than the superblock where the block was inserted will have unchanged block numbers. Thus, unlike unit numbers, block numbers are always sequential with the lowest block numbers in superblock one and

the highest block numbers in the highest-numbered superblock.

To enter £ block fro m the keyboard , select option 2 when the source of the

inserted block is requested. The entry of block information is very similar

to the entry of information when creating a block (see section 3.6.2). The

difference between inserting a block from the keyboard and CREATE BLOCK is

that the number of units to be included in a block inserted from the keyboard

must be specified first. The program then prompts for information on this

number of unifs. The program calls for the entry of the unit type, input and

output variable indices, and unit parameters. After the last parameter is

entered a warning message reminds the user to check the inputs and outputs

carefully. Each input or output variable index that is entered is used to

connect the unit to other units in the simulation. The program also prints a reminder that the initial values, reported variables, and boundary variables

may need to be edited after the insertion of this block since new variables

may have been added with the block. Editing the newly inserted block or the

initial values can be easily performed by returning to the EDIT SIMULATION

menu and editing the appropriate items. After the block has been completely

entered, the program executes a "save sequence" and returns to the INsert or replace sub-menu.

To read 3. block from 3. block work file , select option 1 when the source of the

inserted block is requested. The program then prompts for a file name. This

name must be the eight character name which represents an existing block work

file. If an illegal or nonexistent file name is entered, the program identifies the error to the best of its ability and repeats the request for a file

name

.

Before reading the work file, the program asks if automatic renumbering of

variable indices desired. Answering yes to this question effectively makes

all of the variable indices in the inserted block unique in the simulation by

adding an offset to each variable index. The offset for each category of

variables is equal to the highest current index for variables of the same

category. For example, if there were 17 pressure variables in the simulation,

and a block were being inserted which had pressures 2, 3, and 4 within it,

after renumbering and insertion, this block would contain pressures 19, 20,

and 21. The renumbering leaves the block unconnected to the rest of the

simulation but leaves the internal structure of the block intact. The HVACGEN

program does not determine whether there are variable indices that are not

used below the maximum index in any category. Block indices are always renumbered above the highest index in the simulation.

33
If the automatic renumbering option is not selected, input and output indices

are taken directly from the block work file without modification. In either

case, parameter values are read from the block work file without modification.

After the block information is read from the file, a warning message is

written to remind the user to edit the unit inputs and outputs, and, in

addition, to edit the initial values, and possibly the boundary and reported

variables. Then the program goes through a save sequence to save the en- larged simulation in the simulation work file, and returns to the INsert or replace sub-menu. A carriage return brings the program back up to the EDIT

SIMULATION menu.

Generally, after a block has been inserted, the EDit Simulation STructure

command must be used to modify input and output variable indices in the

inserted block to correctly connect the units in the block to the other units

in the simulation (see section 3.8. 2(2)). The EDit Simulation VAriable initial values command (section 3.8.2(3)) should also be used, to provide initial

values for newly defined variable indices. Often it is also desirable to

modify the list of reported variables.

3.8.2(70) replace unit

To replace a unit, the replace unit operation

INsert command from the EDit Simulation menu,

the unit to be replaced. The unit number to be

from the diagram worksheet of the simulation or STructure or EDit Simulation STructure commands.

is chosen after invoking the

The program then prompts for

entered here may be obtained

by using the View Simulation

After the unit number to be replaced is entered, the replace unit operation is

identical to the insert unit except that after the replacement is finished the

program returns to the EDit Simulation menu rather than the INsert sub-menu.

The source of the unit information can be the keyboard or a previously created

unit work file (see INSERT UNIT command, section 3.8.2(7A)). The net effect

of the replace unit command is to change the component type number associated

with a specified unit number.

3.8. 2(8) EDit Simulation <filename> DElete

The DELETE command is used to completely remove a unit or a block from a simulation. When the DELETE command is selected, the program displays a small

sub-menu which gives a choice of deleting a unit or deleting a block.

When a block or unit is deleted, all variables that were uniquely in that

block or unit are removed from the simulation. For a block, all internal

block variables, or all those variables not connecting the block to other

blocks, will be removed from the simulation work file after the block is

deleted. The removal of variables applies to the initial values, boundary

variables, and reported variables. All references to variables in the deleted

block are automatically deleted.

34
3.8.2(8A) delete unit

If the unit option of DELETE is selected, the program prompts for the number

of the unit to be deleted, echoes the unit number entered by the user, and

asks for confirmation that this unit is to be deleted. It is not possible to

delete a unit if it is the only unit in a block. However, the last unit in a block can effectively be removed by deleting the block in which the unit is

found. If the unit number does not exist in the simulation, or if the unit

cannot be deleted, the program writes an error message and repeats the request

for the unit number to be deleted.

After deleting the unit, the program immediately decrements the unit numbers

of all units greater than the deleted unit. For example, in a simulation with

ten units where unit five is deleted, the old unit six will afterwards have

the identification number five, the old unit ten will have the unit identification number nine, and there will be no unit numbered ten. Units originally

numbered one through four will have the same numbers. This is done because

the main simulation program does not allow any gaps in the sequence of unit

numbers. The highest unit number in the simulation is always equal to the

total number of units.

After the unit is deleted and the remaining units are renumbered, the program

executes a save sequence,’ and returns to the DElete sub-menu.

WARNING: since units are renumbered immediately after each delete operation,

deleting multiple units can be hazardous. To avoid confusion, always delete

the highest-numbered unit first and the lowest-numbered unit last when more

than one unit is to be deleted. If a unit is deleted by mistake, the ABort

command may be entered when the filename confirmation is requested, and the

most recent deletion will effectively be restored. Alternatively, the file

with the accidental deletion can be saved under a different name, allowing

recovery of the original file. When in doubt, the EDit (or View) Simulation

STructure command can be used to review unit and type numbers.

3.8.2(8B) delete block

If the block option of DELETE is selected, the program prompts for the number

of the block to be deleted. Any block number up to the total number of blocks

in the simulation may be entered. The user must be careful to select the

correct block for deletion. If the number is uncertain, the EDit (or View)

Simulation STructure command can be used to pinpoint the correct block. The

program echoes the block number that was entered and asks for verification

that this block is to be deleted. Entry of an incorrect block number causes

an error message to be displayed. If the block chosen is the only block in a superblock, the program informs the user that there is only one block in the

superblock and it may not be deleted. The current version of the program does

not allow a superblock to be r emoved. from a simulation by deletion. An existing simulation can only be cut down to one block in each original superblock.

and the blocks can only be cut down to one unit.

3 5
When a block is deleted, the block numbers of the other blocks in the simulation may be changed. In addition, unit numbers of all units in the simulation

may be changed. If a block is deleted, blocks with identification numbers

higher than the deleted block will have their identification numbers decreased

by one. Blocks with numbers lower than the deleted block will have the same

numbers as before the deletion. When a block is deleted, obviously all of the

units in the block are also deleted. For each unit in the deleted blocks, all

units in the entire simulation which had unit identification numbers higher

than the removed units will have their numbers decreased by one. Units with

numbers lower than any of the units in the deleted block will have the same

numbers after the deletion. For example, consider a simulation having two

blocks with the first block containing units 2, 4, and 6, and the second block

containing units 1, 3, and 3. If the first block were deleted, block 2 would

be numbered as block 1. Units 1, 3, and 5, would then have numbers 1, 2, and

3.

3.8. 2(9) EDit Simulation <filename> SAve

The SAve command is used to produce a block work file which contains the block

description information for a block which currently exists within a simulation. The block work file produced by the SAve command is the same as a block

work file produced by the CReate BLock command. The saved block work file may

be inserted in the existing simulation in a different place or inserted into

another simulation.

If the save command is entered, the program prompts for the number of the

block to be saved. This must be a block within the current simulation being

edited. An edit sequence allows the block number to be checked and changed if

necessary. Once the block to be saved is selected, the program prompts for

the name of a file into which to save the block information. The default

filename is the same as the simulation work file name, but this can be changed

to any other name. After the save is complete, the program returns to the EDit

Simulation menu.

3.9 The Help Command

The Help command gives several pages of summary information. It may be invoked from anywhere in the program, at any prompt for input.

3.10 Producing a Model Definition File

HVACGEN is used to create and edit files containing enough information to

configure a simulation. These files are called work files and are not directly usable by the HVACSIM simulation program. HVACSIM must have as input a model definition file which contains the information in the work file in a modified form. A separate utility program called SLIMCON must be used to

convert simulation work files into model definition files. SLIMCON also has

several error- checking functions, such as examining the values stored in the

work file to ensure that the simulation model does not exceed the currently

36
configured capabilities of the HVACSIM simulation program in terms of number

of units, number of variables, and other similar measurements.

The operation of the SLIMCON program is very simple. When the program is run,

it prompts the user for the name of a simulation work file. The name is

compatible with the naming conventions for work files used within HVACGEN. If no name is entered (a carriage return), then the program ends. If a simulation work file is found with the specified name, then the program reads the

work file, analyzes the information in the work file, and creates the model

definition file. As distributed, SLIMCON gives the model definition file the same name as the simulation work file but with the extension .DAT in place of

the extension .SIM

Dur ing

of the

3 superblocks in the simulation

4 blocks in the simulation

9 differential equations in the simulation

34 saved variables in the simulation

6

units in the simulation

2 units in a single block

3 differential equations in one unit

9 inputs or outputs in a single unit

18 parameters in a single unit

2 blocks in the largest superblock

6 differential equations in one superblock

31 state variables in the simulation

10 inputs or outputs in a single block .... 40 unit parameters in the simulation

6 simultaneous equations in a single block

2 simultaneous equations in one superblock

7 time dependent boundary variables

4 boundary conditions in one superblock .. 8 reported variables in one superblock ...

in which gives a descrip'

is given below

:

MAXIMUM - 10 ( 30.0%)

MAXIMUM - 30 ( 8.0%)

MAXIMUM = 50 ( 18.0%)

MAXIMUM = 6000 ( 0.6%)

MAXIMUM - 200 ( 3.0%)

MAXIMUM = 20 ( 10.0%)

MAXIMUM = 10 ( 30.0%)

MAXIMUM = 20 ( 45.0%)

MAXIMUM = 30 ( 60.0%)

MAXIMUM = 10 ( 20 . 0%

)

MAXIMUM = 20 ( 30.0%)

MAXIMUM = 600 ( 5.2%)

MAXIMUM = 50 ( 20.0%)

MAXIMUM = 1000 ( 4.0%)

MAXIMUM - 30 ( 20.0%)

MAXIMUM = 20 ( 10.0%)

MAXIMUM - 30 ( 23.3%)

MAXIMUM = 20 ( 20.0%)

MAXIMUM = 30 ( 26.7%)

The program HVACSIM and the program HVACGEN are configured to have certain

maximum sizes for the quantities listed in the table above. These maximum

sizes are determined by array dimensions which are specified by PARAMETER

statements in the source code of each program. HVACGEN performs only a limited amount of checking of these quantities to see if they exceed the maximums

and therefore it is possible to configure a simulation which may not run or which may yield incorrect results. SLIMCON performs a check on the quantities

listed above and lists the number computed from the simulation work file and

the currently configured maximum together with a percentage of the maximum

that the current simulation has reached. If any maximum is exceeded, an error message is written. If a maximum is approached closely, a warning message is

written.

If an error message is observed the user has two choices. The first choice is

3 7
to edit the model to lower the size of the offending parameter. In the case

of reported variables, for example, this is not difficult. The other choice

is to reconfigure the HVACGEN and HVACSIM programs to a larger size (see

installation guidelines in chapter 5). If this choice is made, the corresponding PARAMETER values in the SLIMCON source code should also be changed.

38
4. PREPARING AND RUNNING SIMULATIONS USING HVACSIM+

General ly

processin

necessary

, a computer simulation using HVACSIM+ involves three steps: preg, execution, and post-processing. This chapter summarizes the

procedures in each of these three areas.

4.1 Pre-Processing

When HVACSIM is run, it reads data from one or more files which must be prepared in advance. Most of the input files are optional, and need not be

present for all simulations. The various required and optional input files

are described in this section.

4.1.1 The Model Definition File

The primary input to HVACSIM is the model definition file. This file is the

output of the program SLIMCON, which takes as input a simulation work file

prepared by the simulation editor program, HVACGEN. The procedures for generating the simulation work file and the model definition file are discussed

extensively in chapter 3. A model definition file is always required to run a

s imula t ion

.

4.1.2

The Boundary Variable File

Boundary variables which have been declared

simulation must be assigned values which are As the simulation progresses, data are read

change the appropriate state variables.

time-dependent in configuring a stored in a boundary value file,

from this file and are used to

The first column of the boundary variable data file must contain values of

time. Time intervals need not be equal. The remaining columns contain values

of the boundary variables at the specified times. HVACSIM begins all simulations at time zero regardless of the time on the first entry in the boundary

value file. To avoid confusion it is recommended that boundary data files

always begin with time zero.

To produce discontinous changes in boundary variable values, a special reset

convention is used in the boundary value file. When two sequential records

have the same value of time but different values of a boundary variable, the

program will correctly generate a step change in the boundary variable. The

second record contains the value to which the variable is to step. At least

three regular records must occur between reset record pairs.

The reset convention can also be used to mark a discontinuous change in the

slope of a boundary variable, such as the beginning of a ramp input. In

either case the reset convention serves to notify HVACSIM that the simulation

time step should be reduced to its minimum value when the specified time is

reached. Both of these uses of the reset convention are demonstrated in the

first example in Chapter 6.
The simulation program always opens the boundary file, but does not attempt to

read from this file if no variables have been declared time dependent.

4.1.3

The Initialization File

Each time HVACSIM is run, a complete discription of the final state of the

simulation is written to a file. An initialization option has been included

which allows the final state of one simulation to be used as the initial state

of another. This means that a series of simulations of a given system can be run from the same initial steady state, without having to repeat a computationally expensive startup transient for each run. Also, long simulations can

be run in several parts, with each part beginning precisely where the previous

part ended. Since MODSIM begins all simulations at time zero, if a long

simulation is to be run in several parts it will be necessary to prepare a separate boundary value file starting at time zero for each part.

The initial state

be used the first

the initial state

file is not required, and the initialization option cannot

time a newly prepared simulation is run. The contents of

file are discussed in section 6.2.

4.1.4 The Conduction Transfer Funtion File

The conduction transfer function (CTF) file is required only when the TYPE 51

component is used in a simulation. The TYPE 50, TYPE 51, and TYPE 52 components together constitute the "building shell model." The characteristics and

use of these components are the subject of a separate document [2]. The CTF

file is produced by the program CTFGEN, and contains transfer functions defining the thermal properties of building constructs such as walls, windows,

roofs, and floors or ceilings.

4.1.5 The Weather Data File

The weather data file is used only by simulations containing the building

shell model consisting of TYPE 50, TYPE 51, and TYPE 52 component models.

This file is generated by the program CRWDTA, which may be used alone or in

conjunction with the program RDTAPE. RDTAPE is designed to read any of several readily available weather data tapes and to write a portion of the tape to

a file in a fixed format and system of units. CRWDTA allows several options.

It can read the output of RDTAPE and rewrite the information in the format

required by HVACSIM, dividing total horizontal solar radiation values into

beam and diffuse components if necessary. Alternatively, it can generate

smooth design day solar radiation and temperature data by any of several

methods. These programs are described more extensively in reference [2],

When the building shell model is used, the weather data file supplies the

simulation program with outdoor conditions of temperature, humidity, barometric pressure, wind speed, and solar radiation. Other time dependent boundary

conditions such as occupancy schedules and equipment setpoints are supplied

separately through the boundary variable file.

40
When the building shell model is not used, all time dependent boundary conditions, including any weather data, must be supplied by the boundary variable

file.

4.2 Execution

When the simulation program is run, it prompts the user for a minimum time

step, a maximum time step, and a stopping time. The choice of minimum and

maximum time steps influences the accuracy and stability of the simulation, as well as the amount of computation required. Typical values are 1 second for

the minimum time step and 3600 seconds (one hour) for the maximum time step.

The program also prompts the user for some additional information. The questions listed below are from Version 4.7 of the simulation program. The precise order and content of the questions may be slightly different in later

versions of the program.

1) Will the Initialization File be called?

A Yes answer causes the initial state of the system to be read from the

initialization file. Otherwise, the initial state vector in the model definition file defines the initial state of the system.

2) Use default file names for all files?

If an answer of "No” is entered, the user is prompted to enter a name for each

input and output file, or a carriage return if the default name is to be used

for that file.

3) Do you want diagnostic information to be written?

If Yes is entered, the user is given several choices as to what information

should be written (including "No diagnostics’). The choices all relate to the

freezing and unfreezing of state variables and the progress of the equation

solver. Starting and stopping times for diagnostic output are also requested.

The selected category of information is written to the ’Simulation Summary

File with the default name MODSUM.DAT . This feature can be useful for

debugging, but may produce large quantities of output. Normally diagnostics

are not required, and only final values at each reporting time are written.

4) Would you like to monitor the Simulation Time?

A Yes answer causes information relating to the simulation time and time

step size to be written to the console or other output device as the simulation progresses.

4.3 Post-Processing

Two kinds of reports are generated by HVACSIM: a data file (default name

41
MODOUT.DAT) containing raw data at each time step taken by each superblock

during the simulation, and a summary file (default name MODSUM.DAT) containing a summary of the simulation configuration, any diagnostics generated

during the computation, and an interpolated listing of the reported variables

at equal time intervals. In addition, an output file containing the final

state of the simulation (default name INITOUT.DAT) is produced. This last

file can be renamed and used as the initial state file (default name

INITIN.DAT) for subsequent simulation runs.

In the summary file, variables are reported to three significant digits and

each reported variable is identified by a label. This file is intended to be

easy for the user to read. The data file reports each variable to six significant digits, without labels, and is more suitable for further processing by

a computer.

Reports are generated for each superblock in the simulation individually as the simulation progresses. For simulations with more than one superblock,

reports for the various superblocks are intermingled in an unpredictable

order. To facilitate further processing of the output, a simple program

called SORTSB is provided. This program reads the file MODOUT.DAT and writes

a new file containing the times and variables reported by any or all superblocks, separated by superblock number. For example, all the times and variables reported by superblock 3 could be extracted, followed by all the times

and variables reported by superblock 2. Simulation times can also be converted from seconds to another time unit such as minutes or hours. The resulting

file is more readily used as input to user- suppl ied post-processing software

such as a data plotting program. No graphics software is supplied with

HVACS IM

+

.
5. INSTALLATION OF THE HVACSIM PROGRAMS

The HVACSIM programs are distributed as source code files, usually on magnetic

tape. All programs are written in the FORTRAN computer language. An effort

has been made to conform as much as possible to ANSI X3. 9-1978 FORTRAN

(FORTRAN 77). The installation of the programs includes the following activities: modification of the source code to reflect differences in host computers, compilation of programs, linkage to produce executable programs, and

creation of procedures for executing the programs.

5.1 HVACSIM distribution files

The HVACSIM source code as distributed consists of 33 files. When the files

are read from a magnetic tape, they should be given the names shown below (or

equivalent names if the form of the names is incorrect for the target computer ) .

1 . HVACSIM. DOC 12. SELECT5 .FTN 23. CRWDTA. FTN

2. MODSIM5.DOC 13. TYPES. FTN 24. RDTAPE. FTN

3. SNSQ .DOC 14. UTILITY. FTN 25. SORTSB. FTN

4. M0DSIM5 . FTN 15. WATPR.FTN 26. SLIMCON. FTN

5. MO DIN 05 .FTN 16. AIRPR. FTN 27. TYPAR.DAT

6. M0DBLK5 . FTN 17. REFRIG PR. FTN 28. HVACGENl . FTN

7. M0DBDF5.FTN 18. TYPE SB. FTN 29. HVACGEN2 .FTN

8. M0DEQT5 . FTN 19. UTILITYB. FTN 30. HVACGEN3 .FTN

9. SNSQ A. FTN 20. RDENV.FTN 31. HVACGEN4.FTN

10. SNSQB.FTN 21. THERM.DAT 32. HVACGEN5 . FTN

11

.

SNSQC.FTN 22. CTFGEN. FTN 33. HVACGEN6 . FTN

The first file contains some documentation for the HVACSIM package, and is a subset of the information in this chapter with minor exceptions. The file on

the tape contains the version numbers and date last modified for the source

code files on the tape, and provides some information about support of the

programs. The second and third files provide some documentation for the main

simulation program (MODSIM) and the non-linear equation solver (SNSQ) called

by MODSIM.

Files 4 through 20 make up the components of the main simulation program,

HVACSIM. The name MODSIM refers to files 4 through 12, which make up a general-purpose modular simulation program. Files 13 through 20 contain the

models used in simulating heating and cooling systems. Files 13 through 17 are the component models and utilities described in reference [1], and files

18 through 20 constitute the building loads model described in reference [2],

File 21 is a data file read by the program in file 22. Files 22 through 26

are utility programs. Files 21 through 24 are used in conjunction with the

building model (see sections 4.1.4 and 4.1.5). File 25 is the simple postprocessing program mentioned in section 4.3. File 26 is the source code of

the utility program SLIMCON, which reads simulation work files and compiles

the information into model definition files.

43
File 27 is the types description file. This is an ASCII file which is used by

HVACGEN and SLIMCON during execution. It contains the information these

programs require about the TYPE subroutines. When user- suppl ied component

models (TYPE subroutines) are added to the component library, the information

in this file must be updated. Files 28-33 make up the components of the

HVACGEN program, used to prepare model description work files.

The total number of lines or records (including comment lines) contained in

the above 32 files is approximately 1000 for the document files, 11,000 for

the HVACSIM simulation program, 1000 for the SLIMCON program, 3000 for the

other utility programs, and 8000 for the HVACGEN program, for a total of

approximately 24,000 lines of source code. The HVACSIM source code alone

occupies approximately 340 kilobytes (ASCII characters) when records are not

padded to 80 bytes with nulls or spaces. The HVACGEN source code occupies

approximately 370 kilobytes.

On the computer used to develop the programs, the executable code produced

from the source code of HVACSIM as distributed requires approximately 300

kilobytes of memory plus a portion of a 100 kilobyte memory resident FORTRAN

library. HVACGEN also requires approximately 300 kilobytes of memory plus a portion of the library. SLIMCON requires approximately 100 kilobytes of

memory plus a portion of the library. Note that these programs do not need to

occupy memory simultaneously.

5.2 Installation Process

The first step in the HVACSIM installation process is to make any source code

modifications necessary for the HVACSIM programs to run on specific computers.

Each of the programs in the package must be successfully compiled and the

resulting object or binary files must be linked with a FORTRAN library to

produce executable programs. The following three sections describe areas in

the source code of the three major programs in the package (HVACSIM, SLIMCON,

and HVACGEN) which may require modification.

5.2.1 HVACSIM source code compilation and linkage

The source code for the main HVACSIM simulation program should be system

independent and should compile on most computers without modification, with

three exceptions. These are:

1. The logical unit assignments may have to be changed for a specific system.

The assignments are found in a BLOCK DATA subprogram which is the first

subprogram in the source code file M0DIN05.FTN. Common Block FILES con- tains the logical unit numbers. On some systems, reading and writing to

the console may require the use of an asterisk for the logical unit number

in read or write statements. In this case, all console read and write

statements must be edited to change the logical unit variable to an asterisk. Print statements used for console output may have to be changed for some systems.

44
2. The file names used in the file OPEN statements may be illegal under some

operating systems and may have to be changed before compilation. The file

names and OPEN statements are located in subroutine OPNFIL, the second

subprogram unit in the source code file M0DIN05.FTN.

3. A function named RlMACH located in file SNSQC.FTN must be customized for

the particular type of computer on which the program is being run. This

function is used to set machine constants. The function can return any of

five values, but only two are used by HVACSIM: RlMACH(2) returns the

largest positive real number the computer can represent, andRlMACH(4)

returns the machine precision. Values for a number of computers are

included in the function as distributed and if the target computer is in

this set, the customization involves commenting out all lines except those

for the target computer. If the target computer is not in the supplied

group, the installer will have to determine the parameters for the target

comput er

.

Files 4-20 as listed in section 5.1 should be compiled with a FORTRAN 77 com- piler to produce object files. To link the HVACSIM program, object files

MODS I M5 , M0DIN05, M0DBLK5, M0DBDF5, M0DEQT5 , SNSQA, SNSQB, SNSQC, SELECT5 , and

RDENV (files 4-12 and file 20) should be completely included in the link. The

object files TYPES, UTILITY, WATPR, AIRPR, REFRIGPR, TYPESB, and UTILITYB

(files 13-19) should be searched as library files to only bring in the subroutines needed.

All calls to TYPE subroutines are located in the subroutine SELECT, which is

the only subroutine in the file SELECT5. If necessary, the size of the

executable program can be reduced by commenting out calls to any TYPE subroutines that are not needed by the user. Removing references to TYPE subroutines may also eliminate references to many of the functions and subroutines

in files 14-17 and 19, which are used only by the TYPE subroutines.

5.2.2 SLIMCON source code compilation and linkage

SLIMCON.FTN should be compiled with a FORTRAN 77 compiler and only linked with

a FORTRAN library. The logical unit assignments may have to be changed for

specific computers. The file name coding assumes the existence of a file name

extension to indicate the type of file. Parameter statements are included in

the program to customize the file naming conventions for specific computer

operating systems.

5.2.3 HVACGEN source code compilation and linkage

Files 28-33 as listed in section 5.1 should be compiled with a FORTRAN 77

compiler. There are a few system dependent sections of the program which may

have to be changed for specific computer systems. These are (all specific

line numbers listed below are for HVACGEN version 1.8 and may be approximate

for other versions or updates):
1. The logical unit assignments are contained in variables in the common block

LOGUNT. The specific assignments are made in the main program, located in

the file HVACGENl.FTN on lines 119 - 123 of the file. For some computer

systems, an asterisk may be required for the logical unit number of all

read or write statements. In this case all occurences of the variable LUC

in all source code files in read and write statements will need to be

changed to an asterisk.

2. The subroutine SCROLL in HVACGENl.FTN (lines 715-736) is used to cause a pause after a certain number of lines have been written to the computer

terminal. The default number of lines is 18 which is correct for a 24 line

terminal. The number of lines is located in a PARAMETER statement.

3. The naming, opening and closing of work files is performed in the subroutine OPNFIL in HVACGEN3.FTN (lines 108-329). There are four parameters

which must be set in PARAMETER statements to allow the program to successfully open and encode work file types into file names. Three of the parameters are concerned with file naming conventions and one of the parameters

enables or disables a backup file system. Comments in the subroutine explain the selection of parameters. In addition, any variations in file OPEN

statements for specific systems should be corrected here. All OPEN statements are FORTRAN standard with the exception of line 319 which is used in

the backup file system. The backup file system is optional and the code for

it may be commented out of the source code.

4. All access to the types data file (TYPAR.DAT) is through the subroutine

TYPEIN in HVACGEN3.FTN (lines 1070-1223). The name of the types data file

is specified in a PARAMETER statement, and may require modification for

some operating systems.

5.3 Description of HVACGEN subroutines

The HVACGEN source code is subdivided into sections which will be referred to

as modules. The division into modules reflects the the commands displayed at

the main menu when running the program. There are CREATE, VIEW, EDIT, and

HELP modules as well as a FILES module. The following descriptions will give

details ofthe purpose of each subprogram within the modules.

5.3.1 HVACGEN1 - main module

The first source code module is the main module. This module includes a block

data subroutine (INFORM) with data statements for all common blocks in the

program. Also in the main module are the routines for the main menu display

and command processing. The assignment of specific logical unit numbers for

reading and writing to the console and files is found in this module.

The DATAIN subroutine contains the command processor and console input routines. This routine allows a single logical procedure call to get a command

or number from the program user. DATAIN allows printing of prompt messages,

verification that the information obtained is the type of information request46
t-d, limit checking for numerical input, and entry of commands and sub-commands

on a single line. After calling DATAIN, ITEM is the first piece or word from

the string that was entered by the user, ANUMBR is the real number equivalent

o: ITEM, if it was a number, and INTNUM is the integer equivalent. Other input arguments specify what the calling routine requires from the user (eg. a word, a number with certain limits, etc.).

DATAIN calls COPMOD (command process module) which contains the only console

read statement in HVACGEN. This module reads the line typed by the user into

a character variable (LINE). The line is parsed into words (groups of characters separated by spaces or commas) and each time the routine is called, the

next word in the line is stored in a character variable (ITEM).

Subroutine CHECK is used to determine whether the parsed word stored in ITEM

is a number. A word in ITEM consisting of all numbers, plus signs, minus

signs, and similar characters with certain constraints is judged to be a number. Otherwise it is assumed to be a command or name.

Subroutine REWORD is called by DATAIN and is used to determine if the item en- tered was a reserved word (command). If it was, the usual check to see if the

item entered is the same type of information as what was requested is bypassed. This allows a user to enter some commands such as ABORT, at any time.

REMAIN is the subroutine that determines which module will be executed in

response to a command from the console. It is called by MAIN after a command

is read. Every major program unit such as CREATE, VIEW, etc., includes a subroutine of this type. The subroutines can be identified by the name which

begins with the letters *RE,~ followed by the module name. After a command

has been executed, the control is returned to the MAIN module.

The main module contains a number of utility routines used throughout HVACGEN.

The subroutine HOLDIT is used to produce a pause for acknowledgement after an error message is displayed before clearing the screen. SCROLL is called by

routines displaying tables of information on the screen and causes the program

to pause for acknowledgement after a fixed number of lines has been displayed

on the console. OKAY is used to determine the answer to a yes or no question

as to whether an existing value is acceptable and, if the value is unacceptable, allows the value to be changed. The subroutine RITE allows the display

of console messages and menus, line by line, and allows the text of a message

to be easily edited or examined in the source code. PROMPT is called to

determine the alphanumeric name corresponding to a variable category number.

53.2 HVACGEN2 - create module

The first subroutine in this section is CREATE, which is the pathway to the

creation of unit, block, or simulation work files. CREATE is called by MAIN

if the command CREATE is entered. CREATE calls DATAIN to get the subcommands

to CREATE. RECRT is called immediately after receiving a subcommand to determine if the item entered was a special reserved word for help, editing, or viewing. Note: If a RExxx subroutine is not called after DATAIN is called, no alternative commands may be entered.

47
CRUNT is the module for creating a unit. It contains all the queries and re- sponses for selecting the inputs and outputs and parameters for a unit. CRBLK

is used to create blocks. CRBLK calls CRUNT to get information for each unit

in the block. CRSUP is used to create superblocks. It, in turn, calls CRBLK.

CRSIM is used to create entire simulations. It calls CRSUP and a number of

other routines to define a simulation. CRSIM contains the code to determine

the total number of various categories of simulation variables. It checks for

the highest index value used for any of the variable category arrays. This

subroutine also gets the boundary values, initial values, and reported variables. The routine is broken into five parts named CRSIM, CRSIMl, CRSIM2,

CRSIM3, and CRSIM4. RECRT is used for detecting the entry of reserved words

if the help, view, edit, types , or abort commands are entered.

The subroutine TYPES is used to display the numbers and names of the types in

the types information file. It is called when the TYPES command is used in

response to a request for a type number.

5.3.3 HVACGEN3 - file control module

The file control module is used to read and save information in work files and

to access the data in the types information file. The FSAVE subroutine is

called by the create and edit modules whenever the current unit, block, or simulation information is to be saved in a work file. The FSAVE routine calls

the OPNFIL subroutine which opens the work file. The integer flags CRTFLG and

EDFLG determine what file extension or identifier will be used to identify the

file as a unit, block, or superblock work file. This extension or identifier

is set by the subroutine OPNFIL. The value of the extension or identifier is

then used to determine which specific saving routine will be used for saving

the information. The READIN module is the counterpart of the FSAVE module for

reading in previously saved unit, block, or simulation information. READIN

also calls OPNFIL and is used to read in unit, block, or simulation work files

for editing or for insertion or replacement operations.

The OPNFIL module controls all work file opening procedures. This includes

obtaining filenames, checking for illegal filenames, determining filename

modifiers or extensions to identify the three types of work files, and the

creation of backup files. The IRDFLG variable is equal to one if a work file

is to be read, and is not equal to one if a work file is to be written. This

subroutine will probably require customizing for specific computers. Parameter statements have been included to ease customization.

RDUNT, RDBLK, and RDSIM are called by the READIN module and read in the unit,

block and simulation information, respectively. There is no read superblock

module. SAVUNT, SAVBLK, and SAVSIM are called by the FSAVE module to save

unit, block, and simulation information in work files. SAVBLK is also called

by the e d i t ( in se r t /de 1 e t e/ sav e ) module (HVACGEN6) to save block information

from simulations. The subroutine SAVSUP is not currently used but is intended

to allow the saving of superblock information. The TYPEIN subroutine is used

throughout HVACGEN to access the information about types in the TYPES data

file on logical unit LUTYPR. This routine allows the choice of direct or sequential file access to the data file.

48
5.3.4 HVACGEN4 - view module

The view module contains subroutines to display the contents of work files.

The VIEW subroutine provides the view command menu to VIEW units, blocks, and

simulations. Depending on the choice, this routine then calls VEWUNT, VEWBLK,

or VEWSIM to view the particular information requested. VEWUNT gives the inputs, outputs and parameters for a unit. VEWBLK calls VEWUNT repeatedly to

give information on the units in a block. VEWSIM calls several routines to

show the information on the simulation. STRUCT is called by VEWSIM to show

the structure of the simulation. STRUCT gives an overall view and calls

VEWUNT to shown the information on selected specific units in the simulation.

VARVAL is called by VEWSIM to display information on the initial values of the

simulation variables. BOUND is called by VEWSIM to display information on the

boundary variables. RPTVAR is called by VEWSIM to display information on re- ported variables. ERROR is called by VEWSIM to show the error tolerances and

the variable scan and freeze options. REVEW is used to determine if reserved

words have been typed in at any time. Reserved words allowed are ABort and

HElp. Subroutine VEWALL is called to produce a complete description of a simulation work file. VEWALL calls most of the other routines in the view

module

.

5.3.5 HVACGEN5 - edit (changes) module

The edit (changes) module contains subroutines to edit the information in work

files for cases where units and blocks are not inserted, deleted, replaced or saved. The EDIT subroutine displays the EDIT command menu and allows the

selection of unit or simulation editing. Block and superblock editing are not

supported. EDIT calls either EDUNT to edit a unit or EDSIM to edit a simulation. EDUNT allows the editing of unit inputs, outputs, and parameters.

EDSIM is the simulation work file information editing routine. It calls a number of secondary routines to edit parts of the simulation information. A

menu is displayed and the choice is evaluated to determine which of the

editing routines to call. EDTITL is called by EDSIM to allow editing of the

title of the subroutine. EDSTR is called by EDSIM to allow editing of any of

any of the units in the simulation. EDSTR calls STRUCT from the view modules

and then EDUNT. EDVAL is called by EDSIM to allow editing of the initial

variable values. EDBND is called by EDSIM to allow editing of simulation

boundary variables. EDBND calls either INSERT or DELETE. INSERT allows

adding new boundary variables. DELETE allows the removal of boundary variables and is very similar to INSERT. EDREP is called by EDSIM and allows the

reported variables to be edited. Like EDBND, EDREP calls subroutines for

changing reporting intervals or for inserting or deleting reported variables:

RPCHNG, RPINRT, and RPDELT. RPCHNG allows the changing or a reporting interval. RPINRT allows the insertion of new reported variables and is similar to

INSERT. RPDELT allows the deletion of reported variables and is similar to

DELETE. EDERR is called by EDSIM to edit the error tolerances and variable

scan and freeze options.

REEDT is the reserved word module for the edit module and allows help or abort
commands to be entered at any time during editing.

5.3.6 HVACGEN 6 - edit (insert/delete/save) and help module

This module contains subroutines used to perform the insertions, deletions,

replacement, or saving of blocks and/or units. A help subroutine is also

located in this module.

The Subroutine INSSIM is called by EDSIM (HVACGEN5) and allows the insertion

of a unit or block into a simulation. This routine uses a menu to determine

what insertion action is to be taken and calls the appropriate subroutine,

INSUNT, INSBLK, or REPSIM. INSUNT is called by INSSIM to insert a unit. A

block number is requested and the option to read from a file or create from

the console is determined. If the insertion is from a file, RDUNT (files

module) is called. All unit number arrays and variable index arrays are shifted over starting at a spot which depends on the block number. The resulting hole is filled by the new unit information. If the insertion is from

the console, the create unit routine (CRUNIT)is called. The highest unit

number is determined and the number after this is assigned to the new unit.

Subroutine INSCHK is called by INSSIM to find the superblock number and the

last unit number in the block selected for unit insertion.

INSBLK is called from INSSIM to insert a block into the simulation from a file

or the console. The number of units in the block must be known and the arrays

in the simulation are shifted by this many spaces. The new unit information

for all the units in the block is then inserted. INCK2 is called from INSBLK

to determine superblock and unit information.

Subroutine RECALC is called whenever a unit or block is inserted. If any

units have been added this routine checks to see if there are any new indicies

that are higher than existing indices and shifts the state vector (initial

value array) over the appropriate amount so that there are locations for the new variables. Subroutine TYPINF is a support routine for RECALC which calls

TYPEIN to determine the numbers of variables for specific types.

Subroutine REBND recalculates the position of boundary variables in the state

vector after insertion or deletion of a unit. REREPT provides the same function for the reported variables.

DELS1M is called from EDSIM to delete parts of a simulation. It is set up

very much like INSSIM. Subroutine DELUNT is called to delete a unit. Subroutine DELBLK is used to delete a block. To delete a unit or block, the arrays

in the program are shifted over and maximum counters are recalculated. DELCHK

and DELCK2 are used by DELSIM and DELBLK just as INSCHK and INSCK2 are used by

INSSIM and INSBLK.

REPSIM is called by INSSIM and is used for replace operations. REPUNT is used

to replace a unit. The information for an existing unit is overwritten by

this routine.

Subroutine EXTBLK is called from EDSIM (HVACGEN4) whenever the SAVE command is

50
used to allow block information to be saved in a block work file. EXTBLK

calls SAVSIM (HVACGEN3) to write information into a file.

Use of the HELP command causes the HELP subroutine to be called. HELP is cur- rently a simple subroutine which generates a primitive listing of program

inf ormation.

5.4 Description of SLIMCON subroutines

The SLIMCON program consists of a main program and six subroutines. The main

program is large and contains most of the FORTRAN code. The program basically

acts as a 'filter,' reading in the work file, making calculations and writing

to the model definition file. Subroutine FILEOP gets the work file name from

the user and opens the work file and the model definition file. The TYPAR

subroutine is used to access the types information file. As information is

read or calculations are made, reports on configuration parameters are sent to

the console using subroutine REPORT. REPORT determines if the parameters are close or exceeding the maximum values and issues warnings or error messages.

Subroutines VARCHK and OUTCHK are also used for error checking. VARCHK is

used to determine if any of the variables declared as time-dependent boundary

conditions are also solved for simultaneously. If this is true a warning is

issued. OUTCHK issues a warning if any simulation variable is an output of

two or more components. Subroutine TDBVIS finds the largest number of timedependent boundary variables in any one superblock.

5.5 Increasing or decreasing the simulation size capability

The maximum size of the system that HVACSIM can simulate is determined by the

dimensions of arrays and by parameters in the source code of the HVACSIM

package programs. It is possible to increase the size of the system that can

be simulated to allow more complex simulations, or to decrease the size of the

system that can be simulated in order to decrease the size of the programs.

This is not a trivial change, but is relatively straightforward since all

changes that must be made to change the simulation size capability are in

FORTRAN parameter statements. There are approximately 21 parameters that

determine the maximum size capability. The PARAMETER statements that contain

these parameters are grouped together but are duplicated in every subroutine

in the three HVACSIM programs which uses any of the parameter values. This

means that to change one parameter, all instances of the PARAMETER statement

for the parameter to be changed must be altered in all the source code in the

HVACGEN package. This can be easily accomplished using an editor with a search and replace capability. The parameters available and the maximum

values as the package is distributed are listed section 3.10.

51
6. EXAMPLES OF MODEL DEVELOPMENT, CONFIGURATION, AND EXECUTION

This chapter presents a number of examples of system simulations using

HVACSIM+. The examples are arranged in order of increasing complexity, using

the editing features of HVACGEN to combine simple systems into more complicated ones.

The examples are intended to serve several purposes: to illustrate some of the

features of HVACGEN and the use of HVACSIM, to allow verification that

HVACSIM+ is operating correctly after installation on a new system or after

any modifications, and to serve as a tutorial in the design, creation, execution, and (to a limited extent) debugging of system simulations using

HVACSIM+

. The prospective user is encouraged to familiarize himself with the

examples before proceeding to develop his own simulations.

The TYPES mentioned in this chapter are summarized in the Appendix. More

complete descriptions of the component models can be found in the HVACSIM+ reference manual [1]. The use of the building loads model involves some

special considerations, and is not covered in these examples. For an example

of the building model, the reader is referred to reference [2].

6.1 Example 1: Pipe and Valve

6.1.1 Designing a Simulation

This example consists of two UNITS: the TYPE 3 inlet pipe and the TYPE 9 valve. The system is represented schematically in Figure 6.1-1. Ten state

variables are identified in the figure: three pressures, one flow rate, three

temperatures, and three control signals. Parameter values are indicated

beneath the sketch of the system. Definitions of the parameters, and identification of the state variables as inputs and outputs, can be found in the

appendix or in reference [1].

Determining appropriate parameter values for the components of a simulation

can be a difficult and time-consuming task. An understanding of factors influencing the design of a system is helpful at this stage.

Referring to the HVACSIM+ Reference Manual [1], Section 4.0, the authority of

a valve can be expressed as the flow resistance of the open valve divided by

the total flow resistance across the system. Using the flow resistance parameter values shown in Figure 6.1-1, the valve authority in this simulation is

given by

a Kvalve

K -i + valve Kpipe

1 .5 13.3 + 1.5

= 0.10

or 10%. The desired maximum flow rate, when the valve is open, determines the

difference between the inlet and outlet pressures, Pi and P3:

P1 - P3 = (Kvalve + ) W

2 = 15W2

52
where W is the mass flow rate. Thus if a maximum flow rate of 1.5 kg/ s is desired, Pi and P3 should be assigned values such that Pi minus P3 equals 33.75.

The minimum (leakage) flow rate, when the valve is closed, can be expressed as

a function of the leakage parameter, L, and the valve authority, a. To a good

approximation, the relative leakage rate is given by

Vn = L a-0.5

wmax

The value of L in this simulation was chosen to yield a leakage flow ratio of

0.01, or a turn-down ratio of 100.

The transport delay in the pipe, T

x , is given by

Tx

= D Vol / Wx where D is the density of the fluid. At a flow rate of 1.5 kg/s, the transport delay is ten seconds.

Figure 6.1-2 is an "Information Flow Diagram" showing the manner in which the

two components are linked together. The components are represented by boxes

with inputs, outputs, and parameters. Connections between components are

formed by giving an input of one component the same state variable index

number as the output of another component. For example, pressure P2 is an

output of Unit 2 and an input of Unit 1.

Any state variable which is the dependent variable in a differential equation

or which is an output of one unit and also an input to one or more other units

will be solved simultaneously by the main simulation program. This statement

involves a subtle and somewhat confusing distinction: in cases where an output

of a unit is also an input to the same unit, the status of the variable cannot

be determined at a glance. Two examples of variables which fit this description are the control variable C2 and the temperature T2. The control variable C2 is solved simultaneously because of its involvement in a differential

equation. If the actuator time constant (parameter 2 of TYPE 9) were changed

to one second or less, however, C2 would be determined within the TYPE 9 subroutine and would cease to be a simultaneously solved variable. On the

other hand, the temperature T2 is solved within the TYPE 3 subroutine in this

simulation and is not considered a simultaneous variable. If the seventh

parameter of the pipe model, MODE, were made negative, the differential equation involving T2 would be solved by the equation solver and T2 would become a simultaneous variable. Thus the number of simultaneous equations and the

number of differential equations in a simulation may depend on parameter

values. In this simulation there are three simultaneously solved variables:

P2 , Wl , and C2.

State variable C3 is an output but not an input, so it is not solved simultaneously. Its sole purpose is to provide the user with information about the

state of the system. T2 is also considered an informative output in this

sy stem.

53
The remaining variables are inputs but not outputs, and serve as boundary

conditions. Boundary variables may be either constant (time independent) or time dependent. In this example, the inlet and outlet pressures Pi and P3 and

the ambient temperature T3 will be constant boundary conditions, retaining

their initial values throughout the simulation. When HVACGEN is run to set up

the simulation, the requested valve position Cl and the inlet temperature Tl

will be declared time dependent, meaning that their values as functions of

time are to be read from a file during the course of the simulation. Details

of this procedure will be discussed below.

6.1.2 Creating a Simulation

Listing 6.1-1 is a record of the interactive HVACGEN session in which the

simulation description was created. First HVACGEN is requested to create a simulation. Note that the command CReate Simulation could have been entered on a single line. Next HVACGEN is told to include a TYPE 3 component in the

simulation. HVACGEN then prompts the user for state variable index numbers

for each input and output. At this stage a system schematic such as Figure

6.1-1 is indispensable. An information flow diagram such as Figure 6.1-2 may

also be helpful. Parameter values are then entered, completing the description of the first UNIT in the simulation. The same procedure is repeated for

the TYPE 9 component, which becomes the second UNIT.

Next HVACGEN asks for a title for the simulation, and then allows the user to

approve or modify the default error tolerances. The default values are somewhat arbitrary, and experimentation is encouraged. Briefly, RTOLX and ATOLX

are relative and absolute error tolerances, respectively, used primarily to

decide when variables should be frozen or unfrozen. In this example RTOLX has

been changed to 0.005, meaning that relative errors of half a percent are

acceptable. XTOL is an error tolerance used only by the equation solver. The

recommended value is the square root of the machine precision, although a smaller value may sometimes be necessary for satisfactory accuracy. TTIME is

a time interval associated with the integration of differential equations. A

large value of TTIME results in greater accuracy and shorter time steps. The

default value of one second yields satisfactory results in simple simulations,

but larger values are likely to be necessary in more complicated simulations.

A value of ten seconds has been chosen for this example.

HVACGEN then summarizes the number of variables in each category, and asks for an initial value of each var iabl e. It is important to recognize that variables which are constant boundary conditions will retain their initial values

throughout the simulation, and variables which are solved simultaneously will

not necessarily retain their initial values. For example, in this simulation

flow is driven by the difference between the inlet and outlet pressures. Pi

and P3. As discussed above, this pressure difference (together with the flow

resistance parameters) determines the maximum flow rate through the system.

The initial value of the flow rate w^ provides a starting point for the

equation solver, but ultimately has no effect on the calculated flow rate.

Next HVACGEN prompts the user to identify boundary variables which are time

dependent. In this example the inlet temperature Tl and the requested valve

position Cl have been identified as time dependent boundary variables. Note

54
that HVACGEN will allow any variable in the simulation to be declared a time

dependent boundary variable, even if the variable should actually be solved

simultaneously. However, SLIMCON issues a warning message if anything other

than a boundary variable has been declared time dependent.

A reporting interval and a list of reported variables are then entered. In

large simulations containing more than one superblock, reporting intervals and

reported variables may be different for each superblock. Finally, a variable

freezing option and an input scan option must be selected. These options are discussed in section 3.6J(2). Briefly, the low-numbered choices are fastest

and the high-numbered modes are most accurate. The variable freezing option

has no effect on simulations with only one block, and the input scan option

has no effect on simulations with only one superblock. Thus in this example

both options are irrelevant, and the simplest modes have been selected.

This completes the creation of the simulation description. HVACGEN requests a file name, writes the information defining the system to this file, and returns to the main menu. In the present example, the HVACGEN output "work

file" is named EXAMPLEl , to which HVACGEN has added the extension ".SIM" to

indicate that the file contains a simulation description.

Finally, the VIEW ALL command has been used to produce a summary of the

simulation configuration at the end of Listing 6.1-1.

6.1.3 Creating the Model Definition File

Listing 6.1-2 is the simulation work file, EXAMPLEl .SIM, written by HVACGEN.

As discussed in Section 3.10, this file serves as input to the utility program

SLIMCON. Listing 6.1-3 is the tabular output of SLIMCON summarizing the size

of the simulation. The primary purpose of this output is to warn the user if

any category of information exceeds the array dimensions in HVACSIM. Listing

6.1-4 is the model definition file, in this case EXAMPLE1.DAT, which is written by SLIMCON and serves as input to HVACSIM.

6 .1 .4 Preparing the Boundary Value File

Listing 6.1-5 is the boundary variable file prepared for use with this example. The first column contains values of time, beginning at zero. The remaining columns contain values of the boundary variables. Column 2 contains

values of the first boundary variable identified to HVACGEN, in this case temperature Tl. Column 3 contains values of the second boundary variable identified to HVACGEN, in this case control signal Cl. These simulation inputs

represent a thirty-second ramp change in the valve position from time 30 to

time 60 seconds, and again from 150 to 180 seconds, followed by five degree

step changes in the water inlet temperature at times 210 and 255 seconds.

Note the use of the "reset convention": repeated values of time at 30, 60,

150, 180, 210, and 255 seconds. When the simulation is run, it will integrate

up to these reset times, and then reduce the time step and the order of

integration to their minimum values before proceeding. The boundary values

are interpolated as necessary (using third order Lagrangian interpolation) up
to the reset time, and then a new set of values are read in before proceeding,

so that interpolation across a step change or around the corner of a discontinuous change in slope is avoided. The resets also improve the accuracy of

the simulation by keeping the time step from overshooting abrupt changes in

the boundary file.

6.1.5 Running a Simulation

Listing 6.1-6 is a record of the procedure for starting a simulation using

HVACSIM. The program begins by asking for minimum and maximum time step sizes

and the simulation stopping time. Next it asks if an Initial State file is to

be read. This option has not been selected here, but will be used and discussed in later examples. Then the program asks whether the "Building Shell

Model" (consisting of types 50, 51, and 52) is used in this simulation. The

default answer, no, is chosen in all examples in this chapter. Use of the

building shell model is discussed in reference [2].

As stated in Section 5.2.1, SUBROUTINE OPNFIL defines default names for all

input and output files used by HVACSIM, and associates each file with a logical unit number assigned in the BLOCK DATA routine. When HVACSIM is run,

the user is given the choice of using the default names for all files or entering alternative names for any or all files. In this example default

names have been used for all files except the model definition file, for which

the name EXAMPLE1.DAT has been specified.

HVACSIM includes several options for writing diagnostic information to the

output file with the default name MODSUM.DAT. This information pertains to

the freezing and unfreezing of variables and to the progress of SNSQ, the

simultaneous equa tion- solving portion of the main program. The option has not

been used in this example, though information on the available choices has

been elicited. When mode 1, 2, 3, or 4 is selected, HVACSIM prompts the user

for starting and stopping times for the diagnostics.

HVACSIM also allows the progress of the simulation to be followed on the

user's console (or other output device). This option has been selected, and

the resulting output is included in Listing 6.1-6. Here TIME is the current

simulation time in seconds, NTIME is the number of time steps taken, TSTEP is

the interval since the previous simulation time, and PSTEP is a preliminary

estimate of the interval until the next simulation time. It is also possible

to have the values of up to five variables reported to the console as the

simulation progresses. This option has not been selected here.

6.1.6 Discussion of Simulation Results

The time step algorithm is quite sensitive to such factors as machine precision. The precise times and step sizes shown in Listing 6.1-6 are unlikely to

be duplicated exactly when the program is run on a different computer.

HVACSIM produces three files on output. INITOUT.DAT is a file of numbers

defining the state of the system at the simulation stopping time, and may be

used as the initial state of subsequent simulation runs. This file is reproduced in Listing 6.1-7 for the sake of completeness. MODSUM.DAT, shown in

56
Listing 6.1-8, contains a description of the simulation configuration, and

interpolated values of the reported variables at equal time intervals.

MODOUT.DAT, shown in Listing 6.1-9, contains values of the same reported

variables at the actual simulation times. This file is suitable for any

turther processing of the simulation results which may be required.

Two graphs of results from this example are presented after the listings, to

point out certain features of HVACSIM. Note, however, that the software used

to generate the graphs is not included in the HVACSIM package.

The solid lines in figure 6.1-3 show the mass flow rate through the valve as a function of the actual valve position, C3. Although the TYPE 9 valve is

nominally linear, the actual characteristic depends on the authority of the

valve over the system in which it is installed, just as a real valve's

installed characteristic differs from its nominal characteristic. Two solid

lines are graphed: one as the valve closes, and one as it opens. The

difference between these lines is due to numerical error in the computation.

The dashed lines in figure 6.1-3 are the mass flow rate through the valve as a function of the actuator position, C2, which differs from C3 due to the valve

hysteresis parameter of 0.2 specified in this simulation. The hysteresis

effect illustrated here represents mechanical slack in the linkage between the

actuator and the valve.

The inlet and outlet temperatures Tl and T2 are plotted in Figure 6.1-4. During the first 25 seconds of the simulation, the outlet temperature changes

from its somewhat arbitrary initial value of 80 C to its steady state value of

78.4 C. The first valley in the curve is the response to the changes in flow

rate. The response time is slower when the flow rate is decreased than when

it is increased because the time constant used in the pipe model is inversely

proportional to the flow rate and because the transport time is longer. The

second valley is the response to inlet temperature step changes, shown as a dotted line. The transport delay is clearly visible here, as is the effect of

the pipe's thermal capacitance.

57
1. System Schematic

(T3 = ambient)

Unit 1 Type 3

?! Inlet pipe

Parameters

1. H j A =16.4

2. h c A = 0.17

3. Cm =25.2

4. Vol = 0.015

5. K =13.5

6. H = 0

7. Mode - 2

Figure 6.1-1. Example 1:

Unit 2

Type 9

Linear valve

Parameters

1. K = 1.5

2. T = 5 sec

3. L = 0.00316

4. Hys = 0.2

System schematic diagram

2.

Information Flow Diagram

Parameters

1. h| A =16.4

2. h 0 A = 0. 1

7

3. C m = 25.2

4. Vol = 0.0 15

5. K = 13.5

6. H = 0

7. Mode = 2

] P3 W1

1 1

c,

_L

c j

_L

Po w c c.

Unit 2

Type 9

dCa

dt Pi Cra

~Tc 2

\

P 2

i C 3

Parameters

1. K =1.5

2. T = 5

3. L = 0.00316

4. Hys = 0.2

Figure 6.1-2. Example 1: Information flow diagram

58
Listing 6.1-1. Interactive HVACGEN session to create simulation EXAMPLEl

.

Note: user responses are preceded by the following prompt: >

HVACGEN - Simulation GENeration Program

Version 1 .7 (04-02 1985)

Choose from the list below:

CReate (Simulation, BLock,UNit)

EDit ( Simulation, UNit

)

View (Simulation, BLock, UNit)

HElp

ENd

Selection ? >CREATE

Create a:

Simulation

BLock

UNit

>SIM

Superblock number= 1 BLock number= 1 Enter the type number (or TYPES for list of types)

>3

Initializing Types Information...

INLET CONDUIT (DUCT OR PIPE)

INPUTS

index for INLET FLUID PRESSURE

PRESSURE

>1

index for OUTLET FLUID PRESSURE

PRESSURE

>2

index for INLET FLUID TEMPERATURE

TEMPERATURE

>1

index for AMBIENT AIR TEMPERATURE

59
TEMPERATURE

>3

index for OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

TEMPERATURE

>2

OUTPUTS

index for OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

TEMPERATURE

>2

index for FLUID MASS FLOW RATE

FLOW

>1

parameter 1 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

ENTER THE VALUE

>16 .4

parameter 2 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

ENTER THE VALUE

>0.17

parameter 3 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

ENTER THE VALUE

>25.2

parameter 4 VOLUME (M3)

ENTER THE VALUE

>0.015

parameter 5 FLOW RESISTANCE [0.001/(KG M)

]

ENTER THE VALUE

>13.5

parameter 6 HEIGHT OF OUTLET ABOVE INLET (M)

ENTER THE VALUE

>0 . parameter 7 MODE: 2=WATER, 1=AIR, NEG . ^DETAILED, POS.=SIMPLE DYNAMICS

ENTER THE VALUE

>2

Maximum number of UNits per BLock= 20

Number of available UNits= 19

Do you wish to continue entering UNits, Y/N

>Y

Enter the type number (or TYPES for list of types)

>9

LINEAR VALVE WITH PNEUMATIC ACTUATOR

INPUTS

index for OUTLET WATER PRESSURE

PRESSURE

>3

index for WATER MASS FLOW RATE

FLOW

6 0
>1

index for CONTROL VARIABLE FROM CONTROLLER

CONTROL

>1

index for ACTUATOR RELATIVE POSITION (SAME AS FIRST OUTPUT)

CONTROL

>2

OUTPUTS

index for ACTUATOR RELATIVE POSITION

CONTROL

>2

index for INLET WATER PRESSURE

PRESSURE

>2

index for VALVE STEM RELATIVE POSITION

CONTROL

>3

parameter 1 FLOW RESISTANCE [0.001/(KG M>]

ENTER THE VALUE

>1 .5 parameter 2 ACTUATOR TIME CONSTANT (SEC)

ENTER THE VALUE

>5

parameter 3 LEAKAGE PARAMETER (DIMENSIONLESS)

ENTER THE VALUE

>.00316

parameter 4 HYSTERESIS PARAMETER (DIMENSIONLESS)

ENTER THE VALUE

>.2

Maximum number of UNits per BLock= 20

Number of available UNits= 18

Do you wish to continue entering UNits, Y/N

>N

Maximum number of BLocks per SUperblock= 10

Number of available BLocks= 9 Do you wish to continue entering BLocks, Y/N

>N

Maximum number of SUperblocks per SImulation= 10

Number of available SUperblocks= 9 Do you wish to continue entering SUperblocks, Y/N

>N

Enter the title for this Simulation

>EXAMPLE 1: INLET PIPE AND (NOMINALLY) LINEAR VALVE

The default values for the error tolerances are as follows:

RT0LX= 0.100000E-03 AT0LX= 0.100000E-04

XT0L= 0.200000E-03 TTIME= 0.100000E+01

Use these default values, Y/N

>N

6 1
Enter RTOLX

>.005

Enter ATOLX

> . 1 E-4

Enter XTOL

>.001

Enter TTIME

> 10 . PRES = 3 FLOW= 1 TEMP= 3 CNTR= 3 RVPS= 0 ENRG= 0 POWR=

Entering Variable Initial values:

ENTER PRESSURE l(KPa)

>33 .75

ENTER PRESSURE 2(KPa)

>3

ENTER PRESSURE 3(KPa)

>0

ENTER FLOWRATE l(Kg/s)

>2 .

ENTER TEMPERATURE 1(0

>80

ENTER TEMPERATURE 2(C)

>80

ENTER TEMPERATURE 3(C)

>20

ENTER CONTROL 1 ( DIMENSIONLESS

)

>1

ENTER CONTROL 2 ( DIMENSIONLESS

)

>1

ENTER CONTROL 3 ( DIMENSIONLESS)

0 AHUM= 0
>1

Entering Boundary Variables:

Enter a PRESSURE boundary variable or CR to move on

> Enter a FLOW boundary variable or CR to move on

>Enter a TEMPERATURE boundary variable or CR to move on

>1

Enter a TEMPERATURE boundary variable or CR to move on

>Enter a CONTROL boundary variable or CR to move on

>1

Enter a CONTROL boundary variable or CR to move on

>

Entering Reported Variables for Superblock 1

Enter the reporting interval for this SUperblock in seconds

>10

Enter a PRESSURE reported variable or CR to move on

>2

Enter a PRESSURE reported variable or CR to move on

> Enter a FLOW reported variable or CR to move on

>1

Enter a TEMPERATURE reported variable or CR to move on

>1

Enter a TEMPERATURE reported variable or CR to move on

>2

Enter a TEMPERATURE reported variable or CR to move on

> Enter a CONTROL reported variable or CR to move on

>1

Enter a CONTROL reported variable or CR to move on

>2

Enter a CONTROL reported variable or CR to move on

>3

Enter the variable freezing option for this SUperblock: 0,1, or 2 >0

Enter the variable input scan option for this SUperblock: 0 or 1 >0

Enter the filename (Maximum of 8 characters)

>EXAMPLEl

saving to work file....

63
HVACGEN - Simulation GENeration Program

Version 1 .7 (04-02 1985)

Choose from the list below:

CReate ( Simulation, BLock, UNit

)

EDit ( Simulation, UNit

)

View ( Simulation, BLock, UNit

)

HElp

ENd

Selection ? >VIEW SIM

Enter the filename (Maximum of 8 characters)

>EXAMPLE1

reading from work file....

What part of the simulation would you like to view:

AL1 the simulation information (for documentation)

STructure ( superblock, block, and unit Information)

VAriable initial values

ERror tolerances, variable scan and freeze options

Boundary variables

REported variables

Continue with the previous menu

>ALL

EXAMPLE 1: INLET PIPE AND (NOMINALLY) LINEAR VALVE

SUPERBLOCK 1 BLOCK 1 UNIT 1 TYPE 3 - INLET CONDUIT (DUCT OR PIPE)

UNIT 2 TYPE 9 - LINEAR VALVE WITH PNEUMATIC ACTUATOR

64
UNIT 1 TYPE 3

INLET CONDUIT (DUCT OR PIPE)

1 INPUTS:

PRESSURE

PRESSURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

1 - INLET FLUID PRESSURE

2 - OUTLET FLUID PRESSURE

1 - INLET FLUID TEMPERATURE

3 - AMBIENT AIR TEMPERATURE

2 - OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

2 OUTPUTS

:

TEMPERATURE

FLOW

2 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

1 - FLUID MASS FLOW RATE

3 PARAMETERS:

16.4000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.170000 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

25.2000 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

0 .1 50000E-01 VOLUME (M3)

13.5000 FLOW RESISTANCE [0.001/(KG M) ] 0.000000 HEIGHT OF OUTLET ABOVE INLET (M)

2.00000 MODE: 2=WATER, 1=AIR, NEG.=DETAILED, POS.=SIMPLE DYNAMI

UNIT 2 TYPE 9

LINEAR VALVE WITH PNEUMATIC ACTUATOR

1 INPUTS:

PRESSURE

FLOW

CONTROL

CONTROL

3 - OUTLET WATER PRESSURE

1 - WATER MASS FLOW RATE

1 - CONTROL VARIABLE FROM CONTROLLER

2 - ACTUATOR RELATIVE POSITION (SAME AS FIRST OUTPUT)

2 OUTPUTS:

CONTROL 2 - ACTUATOR RELATIVE POSITION

PRESSURE 2 - INLET WATER PRESSURE

CONTROL 3 - VALVE STEM RELATIVE POSITION

3 PARAMETERS:

1.50000 FLOW RESISTANCE [0.001/(KG M)]

5.00000 ACTUATOR TIME CONSTANT (SEC)

0 .3 16000E-02 LEAKAGE PARAMETER (DIMENSIONLESS)

0.200000 HYSTERESIS PARAMETER (DIMENSIONLESS)

Initial Variable Values:

PRESSURE 1 -> 33 .7 500 (KPa)

PRESSURE 2 -> 3.00000 (KPa)

PRESSURE 3 -> 0.000000 (KPa)

FLOW 1 -> 2.00000 (Kg/s)

TEMPERATURE 1 -> 80 .0000 (c)

TEMPERATURE 2 -> 80 .0000 (c)
TEMPERATURE 3 -> 20.0000 (c)

CONTROL 1 -> 1 .00000 (DIMENSIONLESS)

CONTROL 2 -> 1 .00000 (DIMENSIONLESS)

CONTROL 3 -> 1.00000 (DIMENSIONLESS)

Simulation Error Tolerances:

1 RT0LX= 0.500000E-02 ATOLX= 0 .100000E-04

XT0L= 0.100000E-02 TTIME= 10.0000

SUPERBLOCK 1 2 FREEZE OPTION 0 SCAN OPTION 0

The following are Boundary Variables in the simulation:

TEMPERATURE 1 CONTROL 1

The following are the reported variables:

SUPERBLOCK 1 REPORTING INTERVAL 10.0000

PRESSURE 2 FLOW 1 TEMPERATURE 1 TEMPERATURE 2 CONTROL 1 CONTROL 2 CONTROL 3 Push the Carriage Return to continue

HVACGEN - Simulation GENeration Program

Version 1.7 (04-02 1983)

Choose from the list below:

CReate ( Simulation, BLock, UNit

)

EDit ( Simulation, UNit)

View ( Simulation, BLock, UNit)

HElp

ENd

Selection ? >END

STOP

66
Li sting6 .1-2. EXAMPLEl .SIM: Simulation Work File, Output of HVACGEN, Input

to SLIMCON

EXAMPLE 1: INLET PIPE AND (NOMINALLY) LINEAR VALVE

10.300000E-02

1

0 .1 00000E-04 0.100000E-02 0 .100000E+02

L

1 3 12 13

2 1

2

0.164000E+02 0 .17 0000E+00 0.252000E+02 0 .1 50000E-01 0 .13 5000E+02

0.000000E+00

2 9

3 112 2 2 3

0.200000E+01

0 . 1 50000E+01 0.500000E+01 0 .3 16 000E-02 0 .200000E+00

0 .337 500E+02 0.300000E+01 O.OOOOOOE+OO 0 . 200000E+01 0.800000E+02

0.800000E+02 0.200000E+02 0.100000E+01 0.100000E+01 0.100000E+01

2

5 8

7 0 . 1 00000E+02

2 4 5 6 8 9 10

1 2 3 3 4 4 4

2 112 12 3

0

0

****************OLD WORK** **FILE ENDS lSrliri!r,S;HERE ** *************

1 1 2

13 1 3 3 0 0 0 0

10

7

7

7

6 7
Listing 6.1-3. SLIMCON Tabular Output

Simulation Work File to Model Definition File Converter

Version 2.1 (November 13, 1984)

Enter the simulation filename (Up to 8 characters) or carriage return to

EXAMPLEl

1

superblocks in the simulation MAXIMUM = 10 ( 1 blocks in the simulation MAXIMUM = 50 ( 1 differential equations in the simulation MAXIMUM = 50 ( 16 saved variables in the simulation MAXIMUM = 6000 ( 2 units in the simulation MAXIMUM = 200 ( 2 units in a single block MAXIMUM = 20 ( 1 differential equations in one unit MAXIMUM = 10 ( 5 inputs or outputs in a single unit MAXIMUM = 20 ( 7 parameters in a single unit MAXIMUM = 30 (

1 blocks in the largest superblock MAXIMUM = 10 (

1 differential equations in one superblock MAXIMUM = 20 ( 10 state variables in the simulation MAXIMUM = 600 ( 9 inputs or outputs in a single block .... MAXIMUM = 50 ( 11 unit parameters in the simulation MAXIMUM = 1000 ( 3 simultaneous equations in a single block MAXIMUM = 30 ( 0 simultaneous equations in one superblock MAXIMUM = 20 ( 2 time dependent boundary variables MAXIMUM = 30 ( 2 boundary conditions in one superblock . . MAXIMUM = 20 ( 7 reported variables in one superblock ... MAXIMUM = 30 ( Model Definition File Complete

end.

10.0%

2 . 0%

2 . 0%

0.3%

1 . 0%

10.0%

10.0%

25.0%

23.3%

10.0%

5.0%

1 .7%

18.0%

1 . 1 %

10 . 0%

0 . 0%

6.7%

10.0%

23 .3%

68
Listing 6.1-4. EXAMPLE1.DAT: Model Definition File, Output of SLIMCON, Input

to HVACSIM

EXAMPLE 1: INLET PIPE AND (NOMINALLY) LINEAR VALVE

10 1

10.337 500E+02

0.800000E+02

0 3 4 7 20

3

1

1 2 3 9

5 4 12 5 7 3 4 8 9

2 3 6 4

9 2 10

0

9 2 4

0 1 0

19

1 12

1 8

11 16

0.164000E+02

0 .OOOOOOE+OO

0.200000E+00

2

5 8

70 . 1 00000E+02

2 4 5 6 12 3 3

2 112

0.500000E-02

0

0

0 .3 00000E+01

0 . 200000E+02

-1 -1 -1 -1

6

0 .17 0000E+00

0 . 200000E+01

8 9 10

4 4 4

1 2 3 0.100000E-04

0. 000000E+00

0 . 100000E+01

0.252000E+02

0 .1 50000E+01

0 .1 00000E-02

0.200000E+01

0 . 100000E+01

0 .1 50000E-01

0 . 500000E+01

0 .1 00000E+02

0.800000E+02

0.100000E+01

0 .13 5000E+02

0.316000E-02

6 9
Listing 6.1-5. BOUNDARY.DAT: Boundary Variable File, Input to HVACSIM

0.

,

80.

,

1 .00

20. , 80. , 1 .00

27 . , 80. , 1 .00

30. , 80. , 1 .00

30.

,

80. , 1 .00

35. , 80. , 0.85

40.

,

80. , 0.70

45. , 80. , 0.55

50.

,

80. , 0.40

55. , 80. , 0.25

60. , 80. , 0.10

60. , 80. , 0.10

80.

,

80. , 0.10

100. , 80. , 0.10

120. , 80. , 0.10

150. , 80 . , 0.10

150.

,

80. , 0.10

155.

,

80. , 0.25

160.

,

80. , 0.40

165. , 80 . , 0.55

170.

,

80. , 0 .70

175.

,

80 . , 0.85

180.

,

80. , 1 .00

180 .

,

80. , 1 .00

190.

,

80. , 1 .0

200. , 80. , 1 .0 210. , 80. , 1 .0

210. , 75.

,

1 .0 220. , 75. , 1 .0

230. , 75. , 1 .0 255 .

,

75. , 1 .0

255 . , 80. , 1 .0 270.

,

80. , 1 .0

300. , 80 . , 1 .0

450.

,

80. , 1 .0

6 00. , 80. , 1 .0

7 0
Listing 6.1-6. Starting a Simulation Using HVACSIM

* MODSIM5 Version 5.0 *

Enter MINIMUM TIME STEP, MAXIMUM TIME STEP, and SIMULATION STOPPING TIME:

0.1 ,60. ,300.

Is the Building Shell Model used? <N>

Will the Initialization File be called? <N>

Use default file names for all files? (Y/N) <Y>

N Enter the name of the Model Definition File,

or Carriage Return for default name: MODELDEF.DAT

EXAMPLE1 .DAT

Enter the name of the Boundary Variable File,

or Carriage Return for default name: BOUNDARY.DAT

EXAMPLEl . BND

Enter the name of the Final State File,

or Carriage Return for default name: INITOUT.DAT

EX1 IN IT. DAT

Enter the name of the Output Data File,

or Carriage Return for default name: MODOUT.DAT

Enter the name of the Simulation Summary File,

or Carriage Return for default name: MODSUM.DAT

Do you want Diagnostic Information to be written <N>?

Y

Five Levels of detail are available:

0: No Diagnostics

1 : Trace which state variables are solved simultaneously

2: Trace simultaneously solved state variables and their initial

and final values on each call to the equation solver

3: Trace simultaneously solved state variables and their estimated

values on every iteration within the equation solver

4: Perform the previous trace and dump Jacobian matrices

Enter 0 , 1 , 2,3, or 4

:

0

Would you like to monitor the Simulation on Screen? <N>

Y

Enter the INDEX NUMBER of the SUPERBLOCK to monitor

or zero (0) to monitor all superblocks.
0

--During the simulation, up to five State Variables can be viewed

Enter the NUMBER of STATE VARIABLES to be viewed.

SIMULATION BEGINS

SB 1 TIME =0.1 NTIME =1 TSTEP =0.1 PSTEP=0 .

2

SB 1 TIME =0.3 NTIME =2 TSTEP =0.2 PSTEP=0 .4

SB 1 TIME =0.7 NTIME =3 TSTEP =0.4 PSTEP=0 .

8

SB 1 TIME =1.5 NTIME =4 TSTEP =0.8 PSTEP=1 .6

SB 1 TIME =3.1 NTIME =5 TSTEP =1 .6 PSTEP=3 .2

SB 1 TIME =6.3 NTIME =6 TSTEP =3 .2 PSTEP=6 .4

SB 1 TIME =12.7 NTIME =7 TSTEP =6.4 PSTEP=12 .8

SB 1 TIME =25.3 NTIME =8 TSTEP =12.8 PSTEP=25 .6 SB 1 TIME =30.0 NTIME =9 TSTEP =4.5 PSTEP=9 .0

SB 1 TIME =30.1 NTIME =10 TSTEP =0.1 PSTEP=0 .2

SB 1 TIME =30.3 NTIME =11 TSTEP =0.2 PSTEP=0. 11129

SB 1 TIME =30.4 NTIME =12 TSTEP =0.1 PSTEP=0 .

2

SB 1 TIME =30.6 NTIME =13 TSTEP =0.2 PSTEP=0. 282843

SB 1 TIME =30.8 NTIME =14 TSTEP =0.2 PS TEP=0. 159459

SB 1 TIME =30.9 NTIME =15 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =31.0 NTIME =16 TSTEP =0.1 PSTEP=0 .1 SB 1 TIME =31 .1 NTIME =17 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =31.2 NTIME =18 TSTEP =0.1 PS TEP=0. 110184

SB 1 TIME =31 .3 NTIME =19 TSTEP =0.1 PSTEP=0. 128661

SB 1 TIME =31.4 NTIME =20 TSTEP =0.1 PSTEP=0. 21079

SB 1 TIME =31 .6 NTIME =21 TSTEP =0.2 PSTEP=0. 236964

SB 1 TIME =31.8 NTIME =22 TSTEP =0.2 PS TEP=0. 992983

SB 1 TIME =32.7 NTIME =23 TSTEP =0.9 PSTEP=1 .25661

SB 1 TIME =33.9 NTIME =24 TSTEP =1.2 PSTEP=1 .47 51

SB 1 TIME =35.3 NTIME =25 TSTEP =1 .4 PSTEP=1 .65509

SB 1 TIME =36.9 NTIME =26 TSTEP =1.6 PSTEP=2. 98625

SB 1 TIME =39 .8 NTIME =27 TSTEP =2.9 PSTEP=3 .30778

SB 1 TIME =43.1 NTIME =28 TSTEP =3.3 PSTEP=4. 34214

SB 1 TIME =47.4 NTIME =29 TSTEP =4.3 PSTEP=3 .73796

SB 1 TIME =51.1 NTIME =30 TSTEP =3.7 PSTEP=3. 66933

SB 1 TIME =54.7 NTIME =31 TSTEP =3.6 PS TEP=4 .84569

SB 1 TIME =59.5 NTIME =32 TSTEP =4.8 PS TEP=7 .79888

SB 1 TIME =60.0 NTIME =33 TSTEP =0.5 PSTEP=1 .0

SB 1 TIME =60.1 NTIME =34 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =60.2 NTIME =35 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =60.3 NTIME =36 TSTEP =0.1 PSTEP=0. 582516

SB 1 TIME =60.8 NTIME =37 TSTEP =0.5 PS TEP=0. 413735

SB 1 TIME =61.2 NTIME =38 TSTEP =0.4 PSTEP=0 .8

SB 1 TIME =62.0 NTIME =39 TSTEP =0.8 PS TEP=0. 743616

SB 1 TIME =62.7 NTIME =40 TSTEP =0.7 PSTEP=1 .4

SB 1 TIME =64.1 NTIME =41 TSTEP =1 .4 PSTEP=1 .85043

SB 1 TIME =65.9 NTIME =42 TSTEP =1 .8 PS TEP=2. 56032

SUPERBLOCK 1: TIME STEP REJECTED: PSTEP = 0.6

SUPERBLOCK 1: TIME STEP REJECTED: PSTEP = 0.1

SB 1 : TIME =66.0 NTIME =43 TSTEP =0.1 PSTEP=0 .

1

SB 1 : TIME =66.1 NTIME =44 TSTEP =0.1 PSTEP=0 .

1

SB 1 : TIME =66.2 NTIME =45 TSTEP =0.1 PSTEP=0. 780492

7 2
SB 1 TIME =66.9 NTIME =46 TSTEP =0.7 PSTEP=0. 696695

SB 1 TIME =67.3 NTIME =47 TSTEP =0.6 PSTEP=1 .2

SB 1 TIME =68.4 NTIME =48 TSTEP =0.9 PS TEP=1 .01328

SB 1 TIME =69.4 NTIME =49 TSTEP =1.0 PSTEP=2 .0

SB 1 TIME =71 .3 NTIME =50 TSTEP =1 .9 PSTEP=2 .0959

SB 1 TIME =73.3 NTIME =51 TSTEP =2.0 PSTEP=3. 15911

SB 1 TIME =76.4 NTIME =52 TSTEP =3.1 PS TEP=2. 45875

SB 1 TIME =78.8 NTIME =53 TSTEP =2.4 PSTEP=2 .27 548

SB 1 TIME =81 .0 NTIME =54 TSTEP =2.2 PSTEP=3 .46794

SB I TIME =84.4 NTIME =55 TSTEP =3.4 PS TEP=3. 99716

SB 1 TIME =88.3 NTIME =56 TSTEP =3.9 PS TEP=4. 54725

SB 1 TIME =92.8 NTIME =57 TSTEP =4.5 PS TEP=5. 35143

SUPERBLOCK 1: TIME STEP REJECTED: PSTEP = 1 .3

SB 1 TIME =94.1 NTIME =58 TSTEP =1.3 PSTEP=0. 687171

SB 1 TIME =94.7 NTIME =59 TSTEP =0.6 PSTEP=1 .2

SB 1 TIME =95.9 NTIME =60 TSTEP =1.2 PSTEP=2 .4

SB 1 TIME =98.1 NTIME =61 TSTEP =2.2 PSTEP=4 .4

SB 1 TIME =102.4 NTIME =62 TSTEP =4.3 PSTEP=8.6

SB 1 TIME =110.9 NTIME =63 TSTEP =8.5 PSTEP=17 .0

SB 1 TIME =127.9 NTIME =64 TSTEP =17.0 PSTEP=34 .0

SB 1 TIME =150.0 NTIME =65 TSTEP =22.1 PSTEP=44 .

2

SB 1 TIME =150.1 NTIME =66 TSTEP =0.1 PSTEP=0 .1 SB 1 TIME =150.2 NTIME =67 TSTEP =0.1 PSTEP=0 .

2

SUPERBLOCK 1: TIME STEP REJECTED: PSTEP = 0.1

SB 1 TIME =150.3 NTIME =68 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =150.4 NTIME =69 TSTEP =0.1 PSTEP=0 .1 SB 1 TIME =150.5 NTIME =70 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =150.6 NTIME =71 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =150.7 NTIME =72 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =150.8 NTIME =73 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =150.9 NTIME =74 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =151.0 NTIME =75 TSTEP =0.1 PSTEP=0 .1 SB 1 TIME =151 .1 NTIME =76 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =151 .2 NTIME =77 TSTEP =0.1 PSTEP=0.1

SB 1 TIME =151 .3 NTIME =78 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =151 .4 NTIME =79 TSTEP =0.1 PSTEP=0 .1 SB 1 TIME =151 .5 NTIME =80 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =151 .6 NTIME =81 TSTEP =0.1 PSTEP=0 .1 SB 1 TIME =151 .7 NTIME =82 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =151 .8 NTIME =83 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =151 .9 NTIME =84 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =152.0 NTIME =85 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =152.1 NTIME =86 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =152.2 NTIME =87 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =152.3 NTIME =88 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =152.4 NTIME =89 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =152.5 NTIME =90 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =152.6 NTIME =91 TSTEP =0.1 PSTEP=0 .

1

SB 1 TIME =152.7 NTIME =92 TSTEP =0.1 PSTEP=0 .484044

SB 1 TIME =153.1 NTIME =93 TSTEP =0.4 PSTEP=0. 341512

SB 1 TIME =153.4 NTIME =94 TSTEP =0.3 PSTEP=0 .6

SB 1 TIME =154.0 NTIME =95 TSTEP =0.6 PSTEP=0. 86853

73
SB 1 TIME =154.8 NTIME =96 TSTEP =0.8 PSTEP=1 .19103

SB 1 TIME =155.9 NTIME =97 TSTEP =1.1 PSTEP=1. 37362

SB 1 TIME =157.2 NTIME =98 TSTEP =1.3 PS TEP=2. 53488

SB 1 TIME =159.7 NTIME =99 TSTEP =2.5 PSTEP=2. 52343

SB 1 TIME =162.2 NTIME =100 TSTEP =2.5 PS TEP=2. 51742

SB 1 TIME =164.7 NTIME =101 TSTEP =2.5 PSTEP=3 .55802

SB 1 TIME =168.2 NTIME =102 TSTEP =3.5 PSTEP=4. 51 533

SB 1 TIME =172.7 NTIME =103 TSTEP =4.5 PS TEP=6. 11189

SB 1 TIME =178.8 NTIME =104 TSTEP =6.1 PSTEP=6 . 5506

SB 1 TIME =180.0 NTIME =105 TSTEP =1.2 PSTEP=2 .4

SB 1 TIME =180.1 NTIME =106 TSTEP =0.1 PSTEP=0 .1 SB 1 TIME =180.2 NTIME =107 TSTEP =0.1 PSTEP=0. 148664

SB 1 TIME =180.3 NTIME =108 TSTEP =0.1 PSTEP=1 .06764

SB 1 TIME =181 .3 NTIME =109 TSTEP =1.0 PSTEP=1. 11363

SB 1 TIME =182.4 NTIME =110 TSTEP =1.1 PSTEP=1 .49553

SB 1 TIME =183.8 NTIME =111 TSTEP =1.4 PS TEP=1 .51099

SB 1 TIME =185.3 NTIME =112 TSTEP =1 .5 PS TEP=2. 97439

SB 1 TIME =188.2 NTIME =113 TSTEP =2.9 PSTEP=3. 32518

SB 1 TIME =191 .5 NTIME =114 TSTEP =3.3 PS TEP=4. 26337

SB 1 TIME =195.7 NTIME =115 TSTEP =4.2 PS TEP=3. 91301

SB 1 TIME =199.6 NTIME =116 TSTEP =3.9 PS TEP=4. 21677

SB 1 TIME =203.8 NTIME =117 TSTEP =4.2 PS TEP=6. 69777

SB 1 TIME =210.0 NTIME =118 TSTEP =6.2 PSTEP=12 .4

SB 1 TIME =210.1 NTIME =119 TSTEP =0.1 PSTEP=0 .2

SB 1 TIME =210.3 NTIME =120 TSTEP =0.2 PSTEP=0 .

4

SB 1 TIME =210.7 NTIME =121 TSTEP =0.4 PSTEP=0 .8 SB 1 TIME =211.5 NTIME =122 TSTEP =0.8 PSTEP=1 .6 SB 1 TIME =213.1 NTIME =123 TSTEP =1.6 PSTEP=3 .2

SB 1 TIME =216.3 NTIME =124 TSTEP =3.2 PSTEP=6 .4

SB 1 TIME =222.7 NTIME =125 TSTEP =6.4 PSTEP=12.8

SB 1 TIME =235.5 NTIME =126 TSTEP =12.8 PSTEP=25 .6 SB 1 TIME =255.0 NTIME =127 TSTEP =19.5 PSTEP=39 .0

SB 1 TIME =255.1 NTIME =128 TSTEP =0.1 PSTEP=0 .

2

SB 1 TIME =255.3 NTIME =129 TSTEP =0.2 PSTEP=0 .4

SB 1 TIME =255.7 NTIME =130 TSTEP =0.4 PSTEP=0 .

8

SB 1 TIME =256.5 NTIME =131 TSTEP =0.8 PSTEP=1 .6

SB 1 TIME =258.1 NTIME =132 TSTEP =1.6 PSTEP=3 .2

SB 1 TIME =261.3 NTIME =133 TSTEP =3.2 PSTEP=6 .4

SB I TIME =267.7 NTIME =134 TSTEP =6.4 PSTEP=1 2 .

8

SB 1 TIME =280.5 NTIME =135 TSTEP =12.8 PSTEP=25 .6 SB 1 TIME =300.0 NTIME =136 TSTEP =19.5 PSTEP=39 .

0

INITIALIZATION FILE HAS BEEN WRITTEN

STOP END OF SIMULATION
Listing 6.1-7 INITOUT.DAT: Final State Output File

0.10 60.00 300.00 300.00 10 16

33.7300 3.36798 0.000000 1.49707 80.0000

78.4114 20.0000 1.00000 0.999268 0.996991 1-111 111111

78.4035 0.000000 0.000000 0.000000 0.000000

0.000000 78.4114 1 .95023 300.000 78.4035

78.4114 0.799268 0.799268 300.000 0.999268

0.000000

Listing 6.1-8 MODSUM.DAT: Simulation Summary Output File

***** PROGRAM MODSIM *****

a MODular SIMulation program

EXAMPLE 1: INLET PIPE AND (NOMINALLY) LINEAR VALVE

1 SUPERBLOCKS 1 BLOCKS 2 UNITS

10 STATE VARIABLES:

3 PRES 1 FLOW 3 TEMP 3 CTRL

INITIAL STATE VECTOR:

PRES :33.7300 3.00000 0.000000

FLOW:

2.00000

TEMP:

80.0000 80.0000 20.0000

CTRL:

1.00000 1.00000 1.00000

2 TIME DEPENDENT BOUNDARY VARIABLES:

TEMP 1 CTRL 1

ERROR TOLERANCES: RTOLX, ATOLX, XTOL, TTIME:

5.00000E-03 1.00000E-05 1.00000E-03 10.000

***** SUPERBLOCK 1 *****
SUPERBLOCK SIMULTANEOUS EQUATION UNFREEZING OPTION, IFZOPT = 0

SUPERBLOCK INPUT SCAN OPTION, INSOPT = 0

7 REPORTED VARIABLES:

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

0 SIMULTANEOUS EQUATIONS; VARIABLES:

***** BLOCK 1 *****

3 SIMULTANEOUS EQUATIONS; VARIABLES:

CTRL 2 PRES 2 FLOW 1

UNIT 1 TYPE 3

5 INPUTS:

PRES 1 PRES 2 TEMP 1 TEMP 3 TEMP 2

2 OUTPUTS:

TEMP 2 FLOW 1

PARAMETERS:

16.400

0.00000

0.17000 25.200

2.0000

UNIT 2 TYPE 9

4 INPUTS:

PRES 3 FLOW CTRL 1 CTRL 2

3 OUTPUTS:

CTRL 2 PRES 2 CTRL 3

1.50000E-02 13.500

PARAMETERS:

1 .5000 5.0000 3 .16000E-03 0.20000

TMIN = 0.100 TMAX = 60.000 TSTOP = 300.000

********** SUPERBLOCK 1 **********

TIME= 10.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .38 1.50 80.0 79.5 1 .00 1 .00 1 .00 ********** SUPERBLOCK 1 **********

TIME= 20.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .38 1.50 80.0 78 .8 1 .00 1 .00 1 .00

7 6
********** SUPERBLOCK 1 **********

TIME= 30.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2

3 .38 1 .50 80.0 78 .4 1 .00 1 .00

********** SUPERBLOCK 1 **********

TIME= 40.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2

3.40 1.50 80.0 78 .4 0.700 0.830

********** SUPERBLOCK 1 **********

T1ME= 50.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2

6.57 1.42 80.0 78 .4 0.400 0.546 ********** SUPERBLOCK 1 **********

T1 ME= 60.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 17.9 1 .08 80.0 78 .4 0.100 0.249 ********** SUPERBLOCK 1 **********

TIME= 70.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2

27 .9 0 .660 80.0 78 .3 0.100 0.120 ********** SUPERBLOCK 1 **********

TIME= 80.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 29.2 0.580 80 .0 78 .1 0.100 0.103 ********** SUPERBLOCK 1 **********

TIME= 90.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 29 .4 0.568 80.0 77 .6 0.100 0.101 ********** SUPERBLOCK 1 **********

TIME= 100.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2

29 .4 0.568 80 .0 76.9 0.100 0.100 ********** SUPERBLOCK 1 **********

TIME= 110.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 29.4 0.568 80.0 76 .3 0.100 0.100 ********** SUPERBLOCK 1 **********

TIME= 120.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 29.4 0.568 80.0 76.1 0.100 0.100 ********** SUPERBLOCK 1 **********

TIME= 130.00

CTRL 3

1.00

CTRL 3

0.996

CTRL 3

0.6 83

CTRL 3 0.312

CTRL 3 0.151

CTRL 3

0.129

CTRL 3

0.126

CTRL 3

0.126

CTRL 3 0.126

CTRL 3

0.126

77
PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

29.4 0.568 80.0 76.0 0.100 0.100 0.126

TIME= 140.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3 29.4 0.568 80.0 76.0 0.100 0.100 0.126

********** SUPERBLOCK 1 **********

TIME= 150.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

29 .4 0.568 80.0 76.0 0.100 0.100 0.126

********** SUPERBLOCK 1 **********

TIME= 160.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

29 .1 0.584 80.0 76.0 0.400 0.271 0.130

********** SUPERBLOCK 1 **********

TIME- 170.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

12.6 1 .25 80.0 75.9 0.700 0.553 0.441

********** SUPERBLOCK 1 **********

TIME- 180.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

4.86 1 .46 80.0 77.9 1 .00 0.850 0.812 ********** SUPERBLOCK 1 **********

T IME= 190.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3.54 1.50 80.0 78.3 1 .00 0.979 0.973 ********** SUPERBLOCK 1 **********

TIME= 200.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3 3.40 1.50 80.0 78.4 1 .00 0.996 0.995 ********** SUPERBLOCK 1 **********

TIME= 210.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .37 1.50 80.0 78.4 1 .00 0.999 0.997

********** SUPERBLOCK 1 **********

TIME- 220.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .37 1.50 75.0 77.1 1 .00 0.999 0.997

********** SUPERBLOCK 1 **********

TIMEr 230.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .37 1.50 75.0 74.6 1 .00 0.999 0.997 ********** SUPERBLOCK 1 **********
TIME= 240.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .37 1.30 75.0 73 .6 1.00 0.999 0.997

TIME= 250.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3.37 1.50 75.0 73.5 1 .00 0.999 0.997 ********** SUPERBLOCK 1 **********

TIME= 260.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .37 1 .50 80.0 73.5 1.00 0.999 0.997 ********** SUPERBLOCK 1 **********

TIME= 270.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .37 1.50 80.0 76.4 1.00 0.999 0.997

TIME= 280.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .37 1 .50 80.0 78.3 1.00 0.999 0.997 ********** SUPERBLOCK 1 **********

T I ME= 290.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .37 1.50 80.0 78.4 1 .00 0.999 0.997

TIME= 300.00

PRES 2 FLOW 1 TEMP 1 TEMP 2 CTRL 1 CTRL 2 CTRL 3

3 .37 1 .50 80.0 78.4 1.00 0.999 0.997
Listing 6.1-9 MODOUT.DAT: Simulation Data Output File

SUPERBLOCK 1 0.10

3.37500 1.50000 79.9999 79.9605 0.999999

1 .00000 1 .00000

SUPERBLOCK 1 0.30

3.37500 1.50000 80.0000 79.9605 1.00000

1 .00000 1 .00000

SUPERBLOCK 1 0.70

3.37500 1 .50000 80.0000 79.9365 1.00000

1 .00000 1 .00000

SUPERBLOCK 1 1.50

3.37500 1.50000 80.0000 79.9523 1.00000

1.00000 1 .00000

SUPERBLOCK 1 3.10

3 .37500 1.50000 80.0001 79.9767 1.00000

1 .00000 1 .00000

SUPERBLOCK 1 6.30

3.37500 1.50000 79.9999 79.9691 0.999999

1 .00000 1 .00000

SUPERBLOCK 1 12.70

3 .37500 1 .50000 80.0000 79.2213 1.00000

1 .00000 1 .00000

SUPERBLOCK 1 25.50

3 .37500 1.50000 80.0000 78.4139 1 .00000

1 .00000 1 .00000

SUPERBLOCK 1 30.00

3.37500 1.50000 80.0000 78.4139 1 .00000

1 .00000 1 .00000

SUPERBLOCK 1 30.10

3 .37500 1.50000 80.0000 78.4139 0.997000

1 .00000 1 .00000

SUPERBLOCK 1 30.30

3.37500 1.50000 80.0000 78.4139 0.991000

0.999640 1 .00000

SUPERBLOCK 1 30.40

3 .37500 1.50000 80.0000 78.4139 0.988000

0.999615 1 .00000

SUPERBLOCK 1 30.60

3 .37500 1 .50000 80.0000 78.4139 0.982000

0.999508 1 .00000

SUPERBLOCK 1 30.80

3.37500 1.50000 80.0000 78.4139 0.976000

0.998892 1 .00000

SUPERBLOCK 1 30.90

3 .37500 1 .50000 80.0000 78.4139 0.973000

0.9981 57 1 .00000

SUPERBLOCK 1 31 .00

3 .37500 1.50000 80.0000 78.4139 0.970000

0.997313 1 .00000

80
SUPERBLOCK 1 31 .10

3.37500 1.50000 80.0000 78.4139 0.967000

0.996534 1 .00000

SUPERBLOCK 1 31.20

3.37500 1 .50000 80.0000 78.4139 0.964001

0.995844 1 .00000

SUPERBLOCK 1 31.30

3.37500 1.50000 80.0000 78.4139 0.961000

0.995174 1 .00000

SUPERBLOCK 1 31.40

3.37500 1.50000 80.0000 78.4139 0.958000

0.994476 1 .00000

SUPERBLOCK 1 31.60

3 .37500 1.50000 80.0000 78.4139 0.952000

0.992947 1 .00000

SUPERBLOCK 1 31.80

3 .37500 1.50000 80.0000 78.4139 0.946000

0.991234 1 .00000

SUPERBLOCK 1 32.70

3.37500 1 .50000 80.0000 78.4139 0.919001

0.981570 1 .00000

SUPERBLOCK 1 33.90

3.37500 1.50000 80.0000 78.4139 0.883000

0 . 964446 1 .00000

SUPERBLOCK 1 35.30

3 .37500 1 .50000 80.0000 78.4139 0.841000

0.939523 1 .00000

SUPERBLOCK 1 36.90

3.37500 1 .50000 80.0000 78.4139 0.793000

0.906027 1 .00000

SUPERBLOCK 1 39.80

3 .37500 1 .50000 80.0000 78.4139 0.706 000

0.835452 1 .00000

SUPERBLOCK 1 43.10

3 .82271 1.48890 80.0000 78.4117 0.607000

0.745964 0.932454

SUPERBLOCK 1 47.40

5.22577 1 .45358 80.0000 78.4115 0.478001

0 .622457 0 .778071

SUPERBLOCK 1 51 .10

7 .14338 1 .40388 80.0000 78.4092 0.367001

0.513745 0.642182

SUPERBLOCK 1 54.70

10.0897 1 .32387 80.0000 78.3994 0.259001

0.407117 0.508896

SUPERBLOCK 1 59.50

16.9213 1.11650 80.0000 78.3733 0.115000

0.264244 0.330305

SUPERBLOCK 1 60.00

17 .8919 1 .08384 80.0000 78.3791 9.999996E-02

0.249316 0.311646

SUPERBLOCK 1 60.10

81
18.0881 78.3786 9 . 999996 E-02

0.246389

SUPERBLOCK 1 18.2827

0.243518

SUPERBLOCK 1 18.4753

0.240704

SUPERBLOCK 1 19.4129

0.227362

SUPERBLOCK 1 20.1259

0.217566

SUPERBLOCK 1 21.4438

0.200118

SUPERBLOCK 1 22.4740

0.186960

SUPERBLOCK 1 24.1882

0.165659

SUPERBLOCK 1 25.8064

0.145884

SUPERBLOCK 1 25.8799

0.144984

SUPERBLOCK 1 25.9521

0.144102

SUPERBLOCK 1 26.0228

0.143237

SUPERBLOCK 1 26 .4826

0.137605

SUPERBLOCK 1 26.8285

0.133342

SUPERBLOCK 1 27 .2745

0.127816

SUPERBLOCK 1 27 .681 5 0.122721

SUPERBLOCK 1 28.2498

0.115503

SUPERBLOCK 1 28.6431

1 .07710

0.307986

60.20

1 .07039

0.304398

60.30

1.06370

0.300880

60.80

1.03055

0.284202

61.20

1 .00460

0.271958

62.00

0.954763

0.250148

62.70

0.913977

0.233700

64.10

0.841588

0.207074

65.90

0.767069

0.182355

66.00

0.763523

0.181230

66.10

0.760015

0.180127

66.20

0.756 562

0.179046

66.90

0.733730

0.172006

67.50

0.716043

0.166678

68.40

0.692609

0.159769

69.40

0.670485

0.153401

71.30

0.638295

0.144378

73.30

0.615103

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

80.0000

78.3779 9 . 999996 E-02

78.3770 9 . 999996 E-02

78.3716 9 . 999996 E-02

78.3659 9 . 999996 E-02

78.3550 9 . 999996 E-02

78.3462 9 . 999996 E-02

78.3348 9 . 999996 E-02

78.3229 9 . 999996 E-02

78.3225 9 . 999996 E-02

78.3226 9 . 999996 E-02

78.3227 9 . 999996 E-02

78.3204 9 . 999996 E-02

78.3154 9 . 999996 E -02

78.3057 9 . 999996 E -02

78.2925 9 . 999996 E -02

78.2645 9 . 999996 E-02

78.2308 9 . 999996 E -02

82
0.110429 0.138036

SUPERBLOCK 1 76.40

28.9975 0.593323 80.0000 78.1716 9.999996E-02

0.105762 0.132203

SUPERBLOCK 1 78.80

29.1 536 0.583511 80.0000 78.1125 9.999996E-02

0.103686 0.129607

SUPERBLOCK 1 81 .00

29.2462 0.577597 80.0000 78.0479 9.999996E-02

0.102443 0.128053

SUPERBLOCK 1 84.40

29.3354 0.571845 80.0000 77.9225 9.999996E-02

0.101239 0.126549

SUPERBLOCK 1 88.30

29.3895 0.568330 80.0000 77 .7289 9.999996E-02

0.100506 0.125633

SUPERBLOCK 1 92.80

29.3895 0.568332 80.0000 77.4340 9.999996E-02

0.100805 0.125633

SUPERBLOCK 1 94.10

29.3897 0.568332 80.0000 77.3390 9.999996E-02

0.100639 0.125633

SUPERBLOCK 1 94.70

29.3897 0.568332 80.0000 77.2934 9.999996E-02

0.100570 0.125633

SUPERBLOCK 1 95.90

29.3897 0.568332 80.0000 77.2003 9.999996E-02

0.100460 0.125633

SUPERBLOCK 1 98.10

29.3897 0.568332 80.0000 77.0291 9.999996E-02

0.100 460 0.125633

SUPERBLOCK 1 102.40

29.3897 0.568332 80.0000 76.7190 9 . 999996E-02

0.100460 0.125633

SUPERBLOCK 1 110.90

29.3897 0.568332 80.0000 76.2880 9.999996E-02

0.100460 0.125633

SUPERBLOCK 1 127.90

29.3897 0.568332 80.0000 75.9746 9.999996E-02

0.100460 0.125633

SUPERBLOCK 1 150.00

29.3897 0.568332 80.0000 75.9746 9.999996E-02

0.100460 0.125633

SUPERBLOCK 1 150.10

29.3897 0.568332 80.0000 75.9746 0.103000

0.100416 0.125633

SUPERBLOCK 1 150.20

29.3897 0.568332 80.0000 75.9746 0.105999

0.100428 0.125633

SUPERBLOCK 1 150.30

29.3897 0.568332 80.0000 75.9746 0.108998

0.100596 0.125633

83
SUPERBLOCK 1 150.40

29.3897 0.568332 80.0000 75.9746 0.111998

0.100820 0.125633

SUPERBLOCK 1 150.50

29.3897 0.568332 80.0000 75.9746 0.114998

0.101098 0.125633

SUPERBLOCK 1 150.60

29.3897 0.568332 80.0000 75.9746 0.117998

0.101429 0.125633

SUPERBLOCK 1 150.70

29.3897 0.568332 80.0000 75.9746 0.120999

0.101813 0.125633

SUPERBLOCK 1 150.80

29.3897 0.568332 80.0000 75.9746 0.123998

0.102248 0.125633

SUPERBLOCK 1 150.90

29.3897 0.568332 80.0000 75.9746 0.126998

0.102733 0.125633

SUPERBLOCK 1 151 .00

29.3897 0.568332 80.0000 75.9746 0.129998

0.103268 0.125633

SUPERBLOCK 1 151.10

29.3897 0.568332 80.0000 75.9746 0.132998

0.103831 0.125633

SUPERBLOCK 1 151.20

29.3897 0.568332 80.0000 75.9746 0.135998

0.104481 0.125633

SUPERBLOCK 1 151 .30

29.3897 0.568332 80.0000 75.9746 0.138998

0.105158 0.125633

SUPERBLOCK 1 151.40

29.3897 0.568332 80.0000 75.9746 0.141998

0.105880 0.125633

SUPERBLOCK 1 151.50

29.3897 0.568332 80.0000 75.9746 0.144998

0.106647 0.125633

SUPERBLOCK 1 151 .60

29.3897 0.568332 80.0000 75.9746 0.147998

0.107458 0.125633

SUPERBLOCK 1 151 .70

29.3897 0.568332 80.0000 75.9746 0.150999

0.108312 0.125633

SUPERBLOCK 1 151 .80

29.3897 0.568332 80.0000 75.9746 0.153998

0.109208 0.125633

SUPERBLOCK 1 151 .90

29.3897 0.568332 80 .0000 75.9746 0.156998

0.110145 0.125633

SUPERBLOCK 1 152.00

29.3897 0.568332 80.0000 75.9746 0.159998

0.111122 0.125633

SUPERBLOCK 1 152.10

84
29.3897 0.568332 80.0000 75.9746 0.162998

0.112139 0.125633

SUPERBLOCK 1 152.20

29.3897 0.568332 80.0000 75.9746 0.165999

0.113195 0.125633

SUPERBLOCK 1 152.30

29.3897 0.568332 80.0000 75.9746 0.168998

0.114290 0.125633

SUPERBLOCK 1 152.40

29.3897 0.568332 80.0000 75.9746 0.171998

0.11 5421 0.125633

SUPERBLOCK 1 152.50

29.3897 0.568332 80.0000 75.9746 0.174998

0.116589 0.125633

SUPERBLOCK 1 152.60

29.3897 0.568332 80.0000 75.9746 0.177998

0.117794 0.125633

SUPERBLOCK 1 152.70

29.3897 0.568332 80.0000 75.9746 0.180999

0.119033 0.125633

SUPERBLOCK 1 153.10

29.3897 0.568332 80.0000 75.9746 0.192998

0.124290 0.125633

SUPERBLOCK 1 153.40

29.3897 0.568332 80.0000 75.9746 0.201998

0.128557 0.125633

SUPERBLOCK 1 154.00

29.3897 0.568332 80.0000 75.9746 0.219998

0.137883 0.125633

SUPERBLOCK 1 154.80

29.3897 0.568332 80.0000 75.9746 0.243998

0.151793 0.125633

SUPERBLOCK 1 155.90

29.3897 0.568332 80.0000 75.9746 0.276998

0.173341 0.125633

SUPERBLOCK 1 157 .20

29.3897 0.568332 80.0000 75.9746 0.315999

0.201738 0.125633

SUPERBLOCK 1 159.70

29.3897 0.568332 80.0000 75.9746 0.390998

0.262821 0 .125633

SUPERBLOCK 1 162.20

27 .1418 0.699634 80.0000 75.9010 0.465998

0.329470 0.161838

SUPERBLOCK 1 164.70

21.4995 0.952597 80.0000 75.9043 0.540998

0.399396 0.249246

SUPERBLOCK 1 168.20

14.7971 1.18486 80.0000 75.9078 0.645998

0.500222 0.375278

SUPERBLOCK 1 172.70

9.26176 1 .34683 80.0000 75.8956 0.780998

85
0.632450 0.540562

SUPERBLOCK 1 178.80

5.34785 1.45047 80.0000 77.2652 0.963998

0.813958 0.767448

SUPERBLOCK 1 180.00

4.85705 1.46295 80.0000 77.9301 1.00000

0.849922 0.812403

SUPERBLOCK 1 180.10

4.81975 1.46389 80.0000 77.9334 1.00000

0.852865 0.816081

SUPERBLOCK 1 180.20

4.77761 1.46389 80.0000 77.9369 1.00000

0.855750 0.819687

SUPERBLOCK 1 180.30

4.73681 1 .46389 80.0000 77.9404 1.00000

0.858578 0.823223

SUPERBLOCK 1 181.30

4.44679 1 .47330 80.0000 77.9763 1.00000

0.884180 0.855225

SUPERBLOCK 1 182.40

4.19778 1 .47954 80.0000 78.0163 1.00000

0.907251 0.884064

SUPERBLOCK 1 183 .80

3.96843 1.48528 80.0000 78.0663 1.00000

0.930302 0.912878

SUPERBLOCK 1 185.30

3 .79680 1 .48955 80.0000 78.1202 1.00000

0.948838 0.936047

SUPERBLOCK 1 188.20

3 .60080 1 .49441 80.0000 78.2244 1 .00000

0.971536 0.964421

SUPERBLOCK 1 191.50

3.49352 1 .49707 80.0000 78.3118 1.00000

0.984729 0.980912

SUPERBLOCK 1 195.70

3 .42751 1 .49707 80.0000 78.3677 1 .00000

0.992274 0.990343

SUPERBLOCK 1 199.60

3 .39912 1 .49707 80.0000 78.3911 1.00000

0.995586 0.994483

SUPERBLOCK 1 203 .80

3.38209 1 .49707 80.0000 78.4025 1 .00000

0.997593 0.996991

SUPERBLOCK 1 210.00

3 .36798 1 .49707 80.0000 78.4092 1 .00000

0.999268 0.996991

SUPERBLOCK 1 210.10

3.36798 1 .49707 75.0000 78.4104 1 .00000

0.999268 0.996991

SUPERBLOCK 1 210.30

3.36798 1 .49707 75.0000 78.3619 1 .00000

0.999268 0.996991

86
SUPERBLOCK 1 210.70

3.36798 1 .49707 75.0000 78.3384 1.00000

0.999268 0.996991

SUPERBLOCK 1 211.50

3 .36798 1 .49707 75.0000 78.4123 1.00000

0.999268 0.996991

SUPERBLOCK 1 213.10

3.36798 1 .49707 75.0000 78.4522 1.00000

0.999268 0.996991

SUPERBLOCK 1 216.30

3 .36798 1.49707 75.0000 78.4643 1.00000

0.999268 0.996991

SUPERBLOCK 1 222.70

3.36798 1 .49707 75.0000 76.0248 1.00000

0.999268 0.996991

SUPERBLOCK 1 235.50

3.36798 1 .49707 75.0000 73.5519 1.00000

0.999268 0 .996991

SUPERBLOCK 1 255.00

3.36798 1 .49707 75.0000 73.5439 1.00000

0.999268 0.996991

SUPERBLOCK 1 255.10

3.36798 1.49707 80.0000 73.5439 1 .00000

0.999268 0.996991

SUPERBLOCK 1 255.30

3.36798 1 .49707 80.0000 73.5924 1.00000

0.999268 0.996991

SUPERBLOCK 1 255.70

3 .36798 1 .49707 80.0000 73.6160 1.00000

0.999268 0.996991

SUPERBLOCK 1 256.50

3.36798 1 .49707 80.0000 73.5421 1.00000

0.999268 0.996991

SUPERBLOCK 1 258.10

3.36798 1 .49707 80.0000 73.5024 1.00000

0.999268 0.996991

SUPERBLOCK 1 261 .30

3.36798 1 .49707 80 .0000 73.4906 1.00000

0.999268 0.996991

SUPERBLOCK 1 267.70

3 .36798 1 .49707 80.0000 75.9304 1 .00000

0.999268 0.996991

SUPERBLOCK 1 280.50

3.36798 1 .49707 80.0000 78.4035 1 .00000

0.999268 0.996991

SUPERBLOCK 1 300.00

3.36798 1 .49707 80.0000 78.4114 1 .00000

0.999268 0.996991

87
( s / 3>i ) g l u y m 0 n j s $ y w

88

Dashed

lines:

Flow

rate

vs.

actuator

position
toa

z

a

UJ

to

UJz

9 h

t— H

catX

U'

<3

I

D o m ID o LD O D O m O in

1

J

cn 00 to N_ <o 00 to Lh *• s* cr* to 5 r- Is- r- c- r- t- r- r- t" r-* (3) 3HniUH3dW31

89

Dashed

line:

Inlet

temperature.

Solid

line:

Outlet

temperature.
6.2 Example 2: Heating Coil Control Loop, Variable Inlet Water Temperature

This example represents a system in which the hot water flow rate through a heat exchanger is kept nearly constant, and control is achieved by varying the

temperature of the hot water entering the coil. The piping arrangement for

such a system is shown schematically in Figure 6.2-1. When the control port

of the control valve is fully open, hot supply water from the boiler is fed

directly to the heating coil and the system operates at full capacity. When

the control port is fully closed, hot supply water circulates in the left-hand

loop and unheated water circulates through the coil and the shunt port of the

valve. At intermediate valve positions, hot supply water entering the control

port mixes with recirculating water entering the shunt port to determine the

temperature of the water entering the coil. In such systems the control valve

is placed close to the coil to minimize the transport time around the recirculation loop, and a non-linear valve is often selected to help compensate for

the inherent non-linearity of the system [3].

6.2.1 Configuration

To simplify the example, the portion of the flow circuit to the left of the

dotted line in Figure 6.2-1 has been omitted. The resulting system is shown

schematically in Figure 6.2-2, with unit numbers, type numbers, and state

variables identified. The simulation configuration is also summarized in

Listing 6.2-1. The net effect of the omitted portion of the circuit is

approximated by the constant difference between pressures Pi and P8. These

two pressures are not outputs of any components, and therefore are time independent boundary conditions. The initial values assigned to these variables

will remain fixed throughout the simulation. A temperature sensor and a controller have also been added to the system.

In designing a simulation, particularly one which involves multiple flow

streams, care must be exercised to ensure that the set of equations defining

pressures and flow rates throughout the system is neither underdetermined nor overdetermined. In general, at least one pressure should be a boundary condition to provide a base from which pressure differences can be computed.

Often, as in this case, two pressures will be boundary conditions, providing a fixed pressure difference to drive fluid flow. In addition, each flow rate

which is not a boundary condition should be an output of exactly one component. In this example two UNITS of the TYPE 3 inlet pipe model (UNITS 1 and

3) have been selected to calculate the flow rates Wl and W2. Flow rate W3 is

calculated in the TYPE 13 valve model, UNIT 2, as the sum of flows Wl and W2.

On the air side of the Unit 6, Type 11 heating coil, pressure P10 and flow W4

are boundary conditions which determine pressure P9.

The UNIT 3, TYPE 3 pipe is used only to calculate flow rate W2 in this simulation. Thermal losses, thermal capacitance effects, and the transport delay

have been turned off by setting the first four parameters of the UNIT to zero. In addition, the pipe's outlet temperature has been removed from the set of

simultaneous equations by assigning it an index number of zero. The pipe's

inlet temperature, T4 , is also the inlet temperature for the next component

downstream, which is the UNIT 2, TYPE 13 valve. HVACSIM allows any number of

90
inputs and outputs to be "zeroed out" of a simulation.

The procedure for using HVACGEN to create a simulation has been presented in

detail in the previous example, and will not be repeated here. Listing 6.2-1

was generated by HVACGEN in response to the command VIEW SIM EXAMPLE2 ALL.

The information in this listing may be used to recreate the simulation. Alternatively, the simulation work file given in Listing 6.2-2 may be used

directly as input to either HVACGEN or SLIMCON.

6.2.2 Execution

This example represents a well-tuned control system. Tuning of the system was

accomplished by trial and error, as outlined in the following paragraphs.

When the simulation was originally created, somewhat arbitrary values were

entered for the TYPE 8 controller proportional and integral gains, Kp and K^.

These values were intentionally too low, roughly an order of magnitude below

the final values, to ensure a stable response. The simulation was then run

for 3600 seconds, using a boundary file containing a constant value of the

controller setpoint C4 (as in the first six lines of Listing 6.2-3) to allow

the system to reach steady state. The final state file, INITOUT.DAT, was then

renamed INITIN.DAT for use as an initial state file.

Using the initialization option, and the boundary file shown in Listing 6.2-3,

a series of runs was made from the same initial steady state. Before each

run, HVACGEN was used to modify the controller gains. This procedure was

repeated until a satisfactory response was obtained.

To emphasize the value of the initialization feature, the simulation was run again without the initialization option, using the final controller gains and

a constant controller setpoint for 3600 seconds. This simulation ran at the

minimum time step of 0.1 second for the first 88 steps, reached or exceeded a simulation time of 60 seconds on the 129th step, and ended at 3600 seconds on

the 167th step. (Somewhat different results might be obtained when the program is run on a different computer, since the time step size does depend to

some extent on machine precision.) The final state of this run second initialization, shown in Listing 6.2-4, was used to initialize one last run. Listing 6.2-5 shows the beginning of the output file from this last simulation, the results of which are plotted in Figure 6.2-3.

6.2.3 Interpretation

If this example is used to verify that a newly installed version of HVACSIM+ is operating correctly, the following steps are recommended.

1. Run HVACGEN and enter the information in listing 6.2-1 to create the

simulation work file. The output of HVACGEN should be identical to listing 6.2-2.

2. Run SLIMCON to create the model definition file (not shown).

91
3. Create a boundary variable file (default name BOUNDARY.DAT) consisting

only of the first six lines of listing 6.2-3.

4. Run HVACSIM with a minimum time step of 0.1 second, a maximum time step of

1800 seconds, and a stopping time of 3600 seconds. Do not read an initialization file.

5. Compare the final state file (default name INITOUT.DAT) with listing 6.2-

4. Lines 2-8 of this file give the final values of the 33 state variables, in the same order as the list of variable initial values in listing

6.2-1. These numbers should all agree within the relative error tolerance

of half a percent. Lines 9 and 10 consist of 33 integers: -1 if the final

value of a variable is less than its next to last value, and +1 otherwise.

In other words, these integers represent the sign of the derivative of

each variable, whether or not the variable is involved in a differential

equation. Differences here are unlikely but probably not important. The

remaining lines of the file contain values stored in the SAVED workspace

vector, and are not easily interpreted. Some of the numbers (such as the

eighth one) are proportional to the length of the last time step of the

simulation, and may be expected to vary from one computer to another.

Differences in this set of numbers need not concern the user.

6. Copy or rename the final state file for use as an initial state file

(default name INITIN.DAT), and prepare a boundary file identical to listing 6.2-3. Run the simulation as before, except with a stopping time of

1800 seconds and with the initialization option. The results should be

within half a percent of the values in listing 6.2-5, though a direct

comparison may be difficult if the time steps differ. It may be helpful

to compare a graph of the coil outlet air temperature with figure 6.2-3 if

graphics software (or graph paper) is available to the user.

92
TYPICAL PIPING ARRANGEMENT FOR CONSTANT FLOW,

VARIABLE TEMPERATURE CONTROL LOOKS LIKE THIS:

Boiler

Control

port

Control

valve

Heat

exchanger

igure 6.2-1. Constant flow, variable temperature control system

HEATING COIL CONTROL LOOP, CONSTANT FLOW, VARIABLE

TEMPERATURE CONTROL

System Schematic

! cB*1

i * -c

•Cgl

U9.T8 —Ct

PI Controller ~c3-

-C4 = setpoint

U8.T7

Temperature

sensor

Figure 6.2-2. System schematic for heating coil control loop

93
Listing 6.2-1. Summary of EXAMPLE2 Simulation Configuration

Heating Coil (TYPE 11) Control Loop, Variable Temperature Control

SUPERBLOCK 1 BLOCK 1 UNIT 1 TYPE 3 - UNIT 2 TYPE 13 - UNIT 3 TYPE 3 - UNIT 4 TYPE 2 - UNIT 5 TYPE 2 - UNIT 6 TYPE 11 - UNIT 7 TYPE 1 - UNIT 8 TYPE 7 - UNIT 9 TYPE 8 -

INLET CONDUIT (DUCT OR PIPE)

THREE-WAY VALVE MODEL

INLET CONDUIT (DUCT OR PIPE)

CONDUIT (DUCT OR PIPE)

CONDUIT (DUCT OR PIPE)

HOT WATER TO AIR HEATING COIL

FAN OR PUMP

TEMPERATURE SENSOR

PROPORTIONAL-INTEGRAL CONTROLLER

UNIT 1 TYPE 3

INLET CONDUIT (DUCT OR PIPE)

1

2

INPUTS:

PRESSURE 1 - PRESSURE 2 - TEMPERATURE 1 - TEMPERATURE 11 - TEMPERATURE 2 -

INLET FLUID PRESSURE

OUTLET FLUID PRESSURE

INLET FLUID TEMPERATURE

AMBIENT AIR TEMPERATURE

OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

OUTPUTS

:

TEMPERATURE

FLOW

2 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

1 - FLUID MASS FLOW RATE

3 PARAMETERS:

3.80000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0 . 440000 E-02 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

3 .22000 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

0 .3 55000E-02 VOLUME (M3)

3.00000 FLOW RESISTANCE [0.001/(KG M)

]

0.000000 HEIGHT OF OUTLET ABOVE INLET (M)

2.00000 MODE: 2=WATER, 1=AIR, NEG .=DETAILED, POS.=SIMPLE DYNAMI

UNIT 2 TYPE 13

THREE--WAY VALVE MODEL

1 INPUTS : FLOW 1 - INLET MASS FLOW RATE, PORT 1 (OPEN WHEN CONTROL = 1 FLOW 2 - INLET MASS FLOW RATE, PORT 2 (OPEN WHEN CONTROL = 0

PRESSURE 3 - OUTLET PRESSURE

TEMPERATURE 2 - INLET TEMPERATURE, PORT 1 TEMPERATURE 4

- INLET TEMPERATURE, PORT 2

94
CONTROL

CONTROL

1 - CONTROL VARIABLE FROM CONTROLLER

2 - ACTUATOR RELATIVE POSITION (SAME AS OUTPUT 1)

2 OUTPUTS:

CONTROL

FLOW

PRESSURE

PRESSURE

TEMPERATURE

CONTROL

2 - ACTUATOR RELATIVE POSITION

3 - OUTLET MASS FLOWRATE

2 - INLET PRESS., PORT 1 (OPEN => CONTROL VARIABLE = 1)

4 - INLET PRESS., PORT 2 (OPEN => CONTROL VARIABLE = 0)

3 - OUTLET TEMPERATURE

6 - VALVE STEM RELATIVE POSITION

3 PARAMETERS:

0.300000 PORT 1 FLOW RESISTANCE, PORT 1 OPEN ( CTRL=1 ) [ 0 .001/ (KG

1.30000 PORT 2 FLOW RESISTANCE, PORT 2 OPEN ( CTRL=0) [ 0 . 001/ (KG

0.400000E-02 LEAKAGE PARAMETER (DIMENSIONLESS)

10.0000 ACTUATOR TIME CONSTANT (SEC)

0.100000 HYSTERESIS PARAMETER (DIMENSIONLESS)

1.00000 PORTS 1,2 MODE: 0=>LIN/LIN, 1=>EXP/LIN, ELSE=>EXP/EXP

UNIT 3 TYPE 3

INLET CONDUIT (DUCT OR PIPE)

1

2

INPUTS : PRESSURE

PRESSURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

8 - INLET FLUID PRESSURE

4 - OUTLET FLUID PRESSURE

4 - INLET FLUID TEMPERATURE

11 - AMBIENT AIR TEMPERATURE

4 - OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

OUTPUTS:

TEMPERATURE

FLOW

0 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

2 - FLUID MASS FLOW RATE

3 PARAMETERS:

0.000000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.000000 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.000000 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

0.000000 VOLUME (M3)

14.8000 FLOW RESISTANCE [0.001/(KG M) ] 0.558800 HEIGHT OF OUTLET ABOVE INLET (M)

2.00000

MODE: 2=WATER, 1=AIR, NEG . =DETAILED , POS.=SIMPLE DYNAMI

UNIT 4 TYPE 2 CONDUIT (DUCT OR PIPE)

1 INPUTS:

FLOW

PRESSURE

TEMPERATURE

TEMPERATURE

FLUID MASS FLOW RATE

OUTLET PRESSURE

FLUID INLET TEMPERATURE

AMBIENT TEMPERATURE

3 -

5 -

3 -

11 -
TEMPERATURE 5 - OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

2

OUTPUTS

:

TEMPERATURE 5 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

PRESSURE 3 - INLET PRESSURE

3 PARAMETERS:

2.97000

0 .310000E-02

2.27700

0.251000E-02

14.3600

-0.558800

2.00000

INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

VOLUME (M3)

FLOW RESISTANCE [0.001/ (KG M) ] HEIGHT OF OUTLET ABOVE INLET (M)

MODE: 2=WATER, 1=AIR, NEG . =DETAILED , POS.= SIMPLE DYNAMI

UNIT 5 TYPE 2

CONDUIT (DUCT OR PIPE)

1 INPUTS:

FLOW

PRESSURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

3 - FLUID MASS FLOW RATE

8 - OUTLET PRESSURE

7

- FLUID INLET TEMPERATURE

11 - AMBIENT TEMPERATURE

4 - OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

2 OUTPUTS

:

TEMPERATURE 4 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

PRESSURE 7 - INLET PRESSURE

3 PARAMETERS:

2.7 0000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0 . 281 000E-02 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

2.07000 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

0 . 227 800E-02 VOLUME (M3)

11 .9000 FLOW RESISTANCE [0.001/ (KG M)]

0.000000 HEIGHT OF OUTLET ABOVE INLET (M)

2.00000 MODE: 2=WATER , 1=AIR, NEG.=DETAILED, POS.=SIMPLE DYNAMI

UNIT 6 TYPE 11

HOT WATER TO AIR HEATING COIL

1 INPUTS : PRESSURE

FLOW

TEMPERATURE

TEMPERATURE

PRESSURE

FLOW

TEMPERATURE

TEMPERATURE

10 - OUTLET AIR PRESSURE

4 - AIR MASS FLOW RATE

8 - INLET AIR TEMPERATURE

9 - OUTLET AIR TEMPERATURE (SAME AS FIRST OUTPUT)

6 - OUTLET WATER PRESSURE

3 - WATER MASS FLOW RATE

5 - INLET WATER TEMPERATURE

6 - OUTLET WATER TEMPERATURE (SAME AS SECOND OUTPUT)

96
TEMPERATURE 10 - DUMMY TEMPERATURE (SAME AS THIRD OUTPUT)

2 OUTPUTS:

TEMPERATURE

TEMPERATURE

TEMPERATURE

PRESSURE

PRESSURE

9 - OUTLET AIR TEMPERATURE

6 - OUTLET WATER TEMPERATURE

10 - DUMMY TEMP. (USED INTERNALLY FOR AIR TEMP. DYNAMICS

9 - INLET AIR PRESSURE

5 - INLET WATER PRESSURE

3 PARAMETERS

:

1.73610 COEFFICIENT FOR AIR SIDE HEAT TRANSFER CORRELATION ( - 0.448735 EXPONENT FOR AIR SIDE HEAT TRANSFER CORRELATION ( - ) 14.1111 COEFFICIENT FOR WATER SIDE HEAT TRANSFER CORRELATION ( 1.13024 EXPONENT FOR WATER SIDE HEAT TRANSFER CORRELATION ( - ) 0.120000 AIR FLOW RESISTANCE PARAMETER [0.001/ (KG M) ] 7 .00000 WATER FLOW RESISTANCE PARAMETER [0.001/ (KG M) ] 0 .7 30000E-02 WATER SIDE VOLUME OF COIL (M3)

26.2000 CAPACITANCE (MASS X SPECIFIC HEAT) OF COIL MATERIAL (KJ

UNIT 7 TYPE 1 FAN OR PUMP

1 INPUTS:

FLOW 3 -MASS FLOW RATE OF FLUID

PRESSURE 7 - OUTLET PRESSURE

RVPS 1 - FAN OR PUMP ROTATIONAL SPEED

TEMPERATURE 6 - INLET FLUID TEMPERATURE

2 OUTPUTS : PRESSURE 6 - INLET PRESSURE

TEMPERATURE 7 - OUTLET FLUID TEMPERATURE

POWER 1 - POWER CONSUMPTION

3 PARAMETERS :

1 .65000 1ST PRESSURE COEFFICIENT

-70.0000 2ND PRESSURE COEFFICIENT

5.00000 3RD PRESSURE COEFFICIENT

0 .000000 4TH PRESSURE COEFFICIENT

30.0000 5TH PRESSURE COEFFICIENT

0.950000 1ST EFFICIENCY COEFFICIENT

0.000000 2ND EFFICIENCY COEFFICIENT

0.000000 3RD EFFICIENCY COEFFICIENT

0.000000 4TH EFFICIENCY COEFFICIENT

0.000000 5TH EFFICIENCY COEFFICIENT

0.127 000 DIAMETER (M)

2.00000 MODE: AIR=1 , WATER=2

UNIT 8 TYPE 7 TEMPERATURE SENSOR

97
1 INPUTS:

TEMPERATURE 9 - INPUT TEMPERATURE

CONTROL 3 - SENSOR OUTPUT (MODIFIED BY GAIN AND OFFSET)

2

OUTPUTS

:

CONTROL 3 - SENSOR OUTPUT (MODIFIED BY GAIN AND OFFSET)

3

PARAMETERS

:

20.0000 SENSOR TIME CONSTANT (SEC)

0.000000 TEMPERATURE OFFSET (C)

100.000 TEMPERATURE GAIN (C)

UNIT 9 TYPE 8

PROPORTIONAL- INTEGRAL CONTROLLER

1

2

INPUTS

:

CONTROL 3 - CONTROLLED VARIABLE

CONTROL 4 - SET POINT FOR CONTROLLED VARIABLE

CONTROL 3 - INTEGRAL PORTION OF CTRL SIGNAL (SAME

CONTROL 1 - OUTPUT CONTROL SIGNAL (SAME AS SECOND

OUTPUTS : CONTROL 5 - INTEGRAL PORTION OF CONTROL SIGNAL

CONTROL 1 - OUTPUT CONTROL SIGNAL

AS 1ST OUTPUT

OUTPUT)

3 PARAMETERS:

2.00000 PROPORTIONAL GAIN (DIMENSIONLESS)

0.200000E-01 INTEGRAL GAIN (DIMENSIONLESS)

2.00000 CONTROLLER TIME CONSTANT (SEC)

Initial Variable Values:

PRESSURE 1 -> 15.0000 (KPa)

PRESSURE 2 -> 10.0000 (KPa)

PRESSURE 3 -> -15.0000 (KPa)

PRESSURE 4 -> -15.0000 (KPa)

PRESSURE 5 -> -32.0000 (KPa)

PRESSURE 6 -> -40.0000 (KPa)

PRESSURE 7 -> 15.0000 (KPa)

PRESSURE 8 -> 0.000000 (KPa)

PRESSURE 9 -> 0.700000 (KPa)

PRESSURE 10 -> 0.000000 (KPa)

FLOW 1 -> 0.400000E--01(Kg/s)

FLOW 2 -> 1.00000 (Kg/s)

FLOW 3 -> 1 .04000 (Kg/s)

FLOW 4 -> 2.3 5000 (Kg/s)

TEMPERATURE 1 -> 70.0000 (c)

TEMPERATURE 2 -> 70.0000 (c)

TEMPERATURE 3 -> 26 .5000 (C)

TEMPERATURE 4 -> 24.0000 (c)

TEMPERATURE 3 -> 26 .5000 (c)

98
TEMPERATURE 6 -> 24.0000 (c)

TEMPERATURE 7 -> 24.0000 (c)

TEMPERATURE 8 -> 0.000000 (c)

TEMPERATURE 9 -> 18.0000 (c)

TEMPERATURE 10 -> 20.0000 (c)

TEMPERATURE 11 -> 35.0000 (c)

CONTROL 1 -> 0.400000 (DIMENSIONLESS)

CONTROL 2 -> 0.400000 (DIMENSIONLESS)

CONTROL 3 -> 0.180000 (DIMENSIONLESS)

CONTROL 4 -> 0.200000 (DIMENSIONLESS)

CONTROL 5 -> 0.000000 (DIMENSIONLESS)

CONTROL 6 -> 0.000000 (DIMENSIONLESS)

RVPS 1 -> 57 .5000 ( Rev/ S

)

POWER 1 -> 0.100000 (kW)

Simulation Error Tolerances:

1 RTOLX= 0.500000E-02 ATOLX= 0.100000E-05

XTOL= 0 . 500000E-03 TTIME= 10.0000

SUPERBLOCK 1 2 FREEZE OPTION 0 SCAN OPTION 0

The following are Boundary Variables in the simulation:

CONTROL 4

The following are the reported variables:

SUPERBLOCK 1 REPORTING INTERVAL 60.0000

FLOW 3

FLOW 1 TEMPERATURE 9

CONTROL 3

CONTROL 1 CONTROL 5 CONTROL 2 CONTROL 4

99
Listing 6.2-2. EXAMPLE2 . SIM: Simulation Work File

Heating Coil (TYPE 11) Control Loop, Variable Temperature Control

10.500000E-02

19

1 3

1 2 1 11

2 1 0.380000E+01

0.000000E+00

2 13

1 2 3

2 3 2 0 .3 00000E+00

0 .100000E+01

3 3 8 4 4 11

0 2 0.000000E+00

0 . 558800E+00

4 2

3 5 3 11

5 3 0 .297 000E+01

-0 . 558800E+00

3 2

3 8 7 11

4 7 0 .27 0000E+01

0 . 000000E+00

6 11

10 4 8 9

9 6 10 9 0.17 36 1 0E+01

0 .700000E+01

7 1 3 7 16

6 7 1 0.16 5000E+01

0.950000E+00

0 . 1 27 000E+00

8 7 9 3

30.200000E+02

9 8

3 4 3 1 5 1

0.100000E-05

2

0.440000E-02

0.200000E+01

2 4 12

4 3 6

0 .1 50000E+01

4

0.000000E+00

0.200000E+01

5

0 .3 10000E-02

0 . 200000 E+01

4

0.281000E-02

0.200000E+01

6 3 5

5 0.448735E+00

0.730000E-02

-0 .7 00000E+02

0.000000E+00

0.200000E+01

0.000000E+00

0.500000E-03

0 .3 22000E+01

0.400000E-02

0.000000E+00

0 .227 7 00E+01

0 .207 000E+01

10

0.141111E+02

0 . 26 2000E+02

0.500000E+01

0.000000E+00

0 .1 00000E+03

0.100000E+02

0 .3 55000E-02

0.100000E+02

0.000000E+00

0.251000E-02

0.227 800E-02

0 .1 13024E+01

0.000000E+00

0.000000E+00

0.500000E+01

0.100000E+00

0 .1 48000E+02

0.143600E+02

0.119000E+02

0 .1 20000E+00

0.300000E+02

0.000000E+00

100
0.200000E+01

0.150000E+02

-0.400000E+02

0.400000E-01

0.700000E+02

0.240000E+02

0.400000E+00

O.OOOOOOE+OO

1 29

8

13

2

3

0

0

0.200000E-01

0 . 100000E+02

0 .1 50000E+02

0 . 100000E+01

0.263000E+02

O.OOOOOOE+OO

0.400000E+00

0 . 57 5000E+02

0.600000E+02

11 23 28 26

4

28

30

4

5

27

4

2

0.200000E+01

-0.150000E+02

O.OOOOOOE+OO

0 . 104000E+01

0.240000E+02

0.180000E+02

0.180000E+00

0 . 100000E+00

29

4

4

-0 .1 50000E+02

0.700000E+00

0.235000E+01

0.265000E+02

0 . 200000E+02

0.200000E+00

-0.320000E+02

O.OOOOOOE+OO

0.700000E+02

0.240000E+02

0 .3 50000E+02

O.OOOOOOE+OO

******** ********OLD*"**"*rWOR.K'*"*"*'*'FILE')*r,*"*'*'ENDS'*'*"*"*HERE'****"**********

11 10

33

8

1 9

4 11 0

Listing 6.2-3. Boundary Variable File for Example 2.

0., 0.20

o o 0.20

200. , 0.20

300.

,

0.20

400.

,

0.20

500., 0.20

600. , 0.20

600., 0.25

800. , 0.25

1000., 0.25

1200.

,

0.25

1200.

,

0.15

1400.

,

0.15

1600.

,

0.15

1800. , 0.15

2400., 0.15

2800.

,

0.15

3200.

,

0.15

3600. , 0.15

101
Listing 6.2-4. Initialization File for Example 2

0.10 1800.00 3600.00 3600.00 33 66

15.0000 14.6331 -18.0875 -15.7241 -30.0729

-38.5866 14.4734 0.000000 0.662700 0.000000

0.270869 0.831967 1.10284 2.35000 70.0000

69.8644 38.4244 28.1883 38.4221 28.1796

28.1842 0.000000 20.0922 20.7563 35.0000

0.399629

0.338561

0.399629

57.5000

0.200922

6 .146531 E--02

0.200000 0.401473

1 1 1

1 -1 1 1111-11 -1111 1-111 1 1 -1 -1 -1 -1 -1 1 -i -:

69.8644 0.000000 0.000000 0.000000 0.000000

0.000000 69 .8644 25.6067 3600.00 69.8644

69.8644 0.304705 0.304705 3600.00 0.399629

0.000000 28.1883 0.000000 0.000000 0.000000

0.000000 0.000000 28.1883 2.00000 3600.00

28.1883 28.1883 38.4221 0.000000 0.000000

0.000000 0.000000 0.000000 38.4221 147.455

3600.00 38.4221 38.4221 28.1883 0.000000

0.000000 0.000000 0.000000 0.000000 28.1883

162.472 3600.00 28.1883 28.1883 28.1796

0.000000 0.000000 0.000000 0.000000 0.000000

28.1796 50.7002 3600.00 38.4221 38.4221

0.000000

0 .382859

0.000000 0.000000 3600.00 0.382859

Listing 6.2-5. A Portion of the Simulation Output File, MODOUT.DAT

SUPERBLOCK 1 0.10

1.10284 0.270869 20.0922 0.200922 0.399629

0.401473 0.399629 0.200000

SUPERBLOCK 1 0.30

1.10284 0.270869 20.0922 0.200922 0.399629

0.401473 0.399629 0.200000

SUPERBLOCK 1 0.70

1.10284 0.270869 20.0922 0.200922 0.399629

0.401473 0 .399629 0.200000

SUPERBLOCK 1 1.50

1.10284 0.270869 20.0922 0.200922 0.399629

0.401473 0.399629 0.200000

SUPERBLOCK 1 3.10

1.10284 0.270869 20.0922 0.200922 0.399629

0.401473 0.399629 0.200000

SUPERBLOCK 1 6.30

1 .10284 0.270869 20.0922 0 .200922 0.399629

0.401473 0.399629 0.200000

102
SUPERBLOCK 1 12.70

1 .10284 0.270869 20.0922 0.200922 0.399629

0.401473 0.399629 0.200000

SUPERBLOCK 1 25.50

1 .10284 0.270869 20.0921 0.200922 0.399629

0.401473 0.399629 0.200000

SUPERBLOCK 1 51.10

1 .10284 0.270869 20.0921 0.200922 0.399630

0.401473 0.399630 0.200000

SUPERBLOCK 1 102.30

1.10284 0.270869 20.0921 0.200922 0.399630

0.401473 0.399630 0.200000

SUPERBLOCK 1 204.70

1 .10284 0.270869 20.0921 0.200922 0.399630

0.401473 0.399630 0.200000

SUPERBLOCK 1 409.50

1.10284 0.270869 20.0921 0.200922 0.399630

0.401473 0 .399630 0.200000

SUPERBLOCK 1 600.00

1.10284 0.270869 20.0921 0.200922 0.399630

0.401473 0.399630 0.200000

SUPERBLOCK 1 600.10

1 .10284 0.270869 20.0921 0.200922 0.404396

0.401571 0.399677 0.250000

SUPERBLOCK 1 600.20

1.10284 0.270869 20.0921 0.200922 0.408941

0.401669 0.399769 0.250000

SUPERBLOCK 1 600.30

1 .10284 0.270869 20.0921 0.200922 0.413273

0.401767 0.399902 0.250000

SUPERBLOCK 1 600.40

1.10284 0.270869 20.0921 0.200922 0.417404

0.401866 0.400076 0.250000

SUPERBLOCK 1 600.50

1 .10284 0.270869 20.0921 0.200922 0.421343

0.401964 0.400286 0.250000

SUPERBLOCK 1 600.60

1.10284 0.270869 20.0921 0.200922 0.425099

0.402062 0.400532 0.250000

SUPERBLOCK 1 600.70

1 .10284 0.270869 20.0921 0.200922 0.428681

0.402160 0.400811 0.250000

SUPERBLOCK 1 600.80

1.10284 0.270869 20.0921 0.200922 0.432097

0.402258 0.401120 0.250000

SUPERBLOCK 1 600.90

1.10284 0 .270869 20.0921 0.200922 0.435355

0.402357 0.401459 0.250000

SUPERBLOCK 1 601 .00

1 .10284 0.270869 20.0921 0.200922 0.438462

0.402455 0.401826 0.250000

103
SUPERBLOCK 1 601.10

1 .10284 0.270869 20.0921 0.200922 0.441426

0.402553 0.402218 0.250000

SUPERBLOCK 1 601 .20

1.10284 0.270869 20.0921 0.200922 0.444254

0.402651 0.402634 0.250000

SUPERBLOCK 1 601.30

1.10284 0.270869 20.0921 0.200922 0.446952

0.402749 0.403073 0.250000

SUPERBLOCK 1 601.60

1.10284 0.270869 20.0921 0.200922 0.454429

0.403044 0.404493 0.250000

SUPERBLOCK 1 601 .80

1 .10307 0.272121 20.0921 0.200922 0.458890

0.403240 0.405526 0.250000

SUPERBLOCK 1 602.40

1.10405 0.277399 20.0918 0.200922 0.470092

0.403829 0.408950 0.250000

SUPERBLOCK 1 602.90

1.10496 0.282310 20.0913 0.200921 0.477331

0.4043 20 0.412085 0.250000

SUPERBLOCK 1 603.80

1.10674 0.291979 20.0901 0.200921 0.486688

0.405203 0.418118 0.250000

SUPERBLOCK 1 604.90

1.10906 0.304551 20.0908 0.200920 0.493879

0.406283 0.425706 0.250000

SUPERBLOCK 1 606.30

1.11203 0.320768 20.1067 0.200924 0.499292

0.407657 0.435095 0.250000

SUPERBLOCK 1 607 .40

1 .11429 0.333154 20.1442 0.200942 0.502094

0.408737 0.441996 0.250000

SUPERBLOCK 1 608.50

1.11645 0.345027 20.2108 0.200987 0.504228

0.409815 0.448405 0.250000

SUPERBLOCK 1 609.80

1 .11885 0.358309 20.3266 0.201097 0.506236

0.411088 0.455356 0.250000

SUPERBLOCK 1 611.80

1 .12222 0.377102 20.5704 0.201427 0.508469

0.413037 0.464827 0.250000

SUPERBLOCK 1 614.10

1 .12560 0.396129 20.9591 0.202119 0.510071

0.415253 0.474024 0.250000

SUPERBLOCK 1 616.00

1.1 2800 0.409695 21 .3225 0.202968 0.510734

0.417053 0.480363 0.250000

SUPERBLOCK 1 617.40

1 .1 2953 0.418431 21.5953 0.203754 0.510867

0.418358 0.484353 0.250000

104
SUPERBLOCK 1 618.90

1.13096 0.426632 21.8777 0.204737 0.510695

0.419731 0.488039 0.250000

SUPERBLOCK 1 620.90

1.13255 0.43 57 82 22.23 21 0.206245 0.509989

0.421512 0.492085 0.250000

SUPERBLOCK 1 623 .20

1.13396 0.443899 22.6437 0.208222 0.508555

0.423481 0.495617 0.250000

SUPERBLOCK 1 625.40

1 .13490 0.449391 23.0461 0.210335 0.506611

0.425274 0.497978 0.250000

SUPERBLOCK 1 627 .40

1.13546 0.452618 23 .3938 0.212413 0.504405

0.426818 0.499355 0.250000

SUPERBLOCK 1 630.70

1 .13546 0.454850 23.9221 0.216082 0.499985

0.429176 0.500186 0.250000

SUPERBLOCK 1 633.50

1.13546 0.454850 24.3167 0.219347 0.495614

0.430981 0.499636 0.250000

SUPERBLOCK 1 636.60

1.13546 0.454850 24.6884 0.223017 0.490311

0.432767 0.497887 0.250000

SUPERBLOCK 1 641.50

1 .13546 0.454850 25.1423 0.228728 0.481378

0.435131 0.493135 0.250000

SUPERBLOCK 1 646.40

1.13546 0.454850 25.4643 0.234061 0.47 2406

0.436956 0.486695 0.250000

SUPERBLOCK 1 654.40

1.13546 0.454850 25.8194 0.241593 0.458813

0.438893 0.474434 0.250000

SUPERBLOCK 1 668.70

1.13546 0.454850 26.1914 0.251424 0.439169

0.439789 0.452516 0.250000

SUPERBLOCK 1 680.50 .

1 .13546 0.454850 26.3548 0.256622 0.427235

0.438771 0.437651 0.250000

SUPERBLOCK 1 698.40

1.13546 0.454850 26.4294 0.261274 0.414233

0.43 5672 0.421290 0.250000

SUPERBLOCK 1 721.60

1.13546 0.454850 26.4245 0.263788 0.403222

0.430133 0.407418 0.250000

SUPERBLOCK 1 758.00

1.13377 0.442817 26.2428 0.263768 0.393371

0.420616 0.395148 0.250000

SUPERBLOCK 1 811.10

1.13103 0.427015 25.8132 0.260242 0 .388128

0.408619 0.388210 0.250000

105
SUPERBLOCK 1 895.30

1 .12996 0.420867 25.5483 0.256396 0.385126

0.397847 0.385453 0.250000

SUPERBLOCK 1 1063.60

1.12843 0.412160 25.2710 0.253101 0.381252

0.387409 0.381488 0.250000

SUPERBLOCK 1 1200.00

1.12775 0.408268 25.1440 0.251653 0.379570

0.382850 0.379701 0.250000

Figure 6.2-3. Controlled variable (air temperature) response to controller

set point step changes.

106
6.3 Example 3: Cooling Coil Control Loop With Variable Water Flow Rate

The previous example represents a control loop in which the flow rate through

a heat exchanger remains nearly constant while the inlet water temperature is

controlled. The present example models the more typical case where the inlet

water temperature remains constant while the flow rate is controlled. The

system is shown schematically in Figure 6.3—1. Unlike Example 2, this simulation does not include a pump. Flow is driven by the constant difference between pressures Pi and P6.

The parameters for the cooling coil model were determined for a specific piece

of equipment, and the CReate UNit command was used to store these values.

Creation of the simulation then required two steps. First, a simulation was

created with no heat exchanger. Second, after this simulation was saved, it

was edited to insert the previously saved cooling coil unit and to make the

necessary input/output connections between the cooling coil and the balance of

the simulation.

The TYPE 8 controller model assumes that increasing its control output (C6 in

this case) will cause the input controlled variable (C3 in this case) to

increase. To make this assumption valid, it was necessary to place a TYPE 26

reversing relay or control signal inverter between the controller and the

control valve. If the TYPE 12 cooling coil were replaced by a heating coil,

the TYPE 26 component would have to be eliminated.

Proportional and integral gains for the controller were determined by trial

and error, as described in Example 2. The boundary variable file used with

this example is shown in Listing 6.3-1. This time the boundary variables are the air inlet temperature and humidity ratio, T4 and HI. The boundary file

specifies step changes in both variables simultaneously at times 1800 and 3600

seconds. The second temperature step change is twice the magnitude of the

first one. A constant setpoint corresponding to 15 C is maintained throughout

the simulation.

Listing 6.3-2 is the simulation summary portion of the output file MODSUM.DAT.

This listing contains all the information needed to re-create the simulation

description. Listing 6.3-3 is part of the report from the same file, showing

the response to the first step change in the boundary file. Figure 6.3-2 is

a graph of control variable C3, the cooling coil outlet air temperature as measured by the temperature sensor and communicated to the controller. Again,

the controller proportional and integral gains, Kp and K^, have been carefully

chosen to produce a rapid and essentially oscillation-free response.

In Figure 6.3~3, both Kp and have been increased by 50%, from 6 and 0.08 to

9 and 0.12. The system response is more rapid, as seen by the relative

narrowness of the first peak, but damped oscillations appear in response to

the second, larger step change. The greater degree of activity and faster

rates of change in this simulation cause HVACSIM to take shorter time steps,

increasing both the number of time steps taken and the execution time by about

7 5%.

Figure 6.3~4 shows the consequences of further increasing the proportional

107
gain to 12. This time the second step change input leads to undamped oscillations, with a period of about 92 seconds. The failure of the oscillations to

damp out can be attributed to the hysteresis in the control valve, which

allows errors to accumulate while the actuator crosses its dead band.

In its effort to track these fast oscillations, HVACSIM decreases the simulation time step dramatically, spending most of its time at the minimum time

step and never allowing the step size to exceed six seconds once the oscillations begin. The average time step between simulation times 3600 and 5400 in

this example is well under a second. Relative to the simulation of Figure

6.3-2, the number of time steps is increased by a factor of 17.5 and the

execution time is increased by a factor of more than 20. Users should be

aware that modeling a system which oscillates relatively rapidly can be ex- tremely expensive computationally. There are nearly as many seconds in a day

as there are hours in ten years.

COOLING COIL CONTROL LOOP

Constant temperature, variable flow control

System Schematic

Figure 6.3-1. System schematic for cooling coil control loop

108
Listing 6.3-1. Boundary Variable File

0. . •

CN iTl 0.016

450.. 25.. 0.016

900.

,

25., 0.016

1350.

.

25.. 0.016

1800.

.

25., 0.016

1800.

,

30.

.

0.022

2250.

,

30.

,

0.022

2700.

,

30., 0.022

3150.

,

30.

.

0.022

3600., 30., 0.022

3600.

.

20.

,

0.010

4050. , 20., 0.010

4500.

.

20.

,

0.010

4950., 20.

,

0.010

5400.

,

20. , 0.010

Listing 6.3-2. Simulation Configuration Summary from MODSUM.DAT

***** PROGRAM MODSIM *****

a MODular SIMulation program

COOLING COIL CONTROL LOOP, VARIABLE FLOW, CONSTANT TEMPERATURE

1 SUPERBLOCKS 1 BLOCKS 9 UNITS

31 STATE VARIABLES:

6 PRES 4 FLOW 10 TEMP 7 CTRL 2 POWR 2 AHUM

INITIAL STATE VECTOR:

PRES:

250.000 227.754

-250.000

212.307 222.467 210.571

FLOW:

1.13930 1 .49359 2.63289 2.35000

TEMP:

5.00000 5.01300

16.8056 5.00093

16.8008

10.1090

25.0000

25.0000

15.0079

10.1684

CTRL:

0.424409 0.424409

0.575589 1.00000

0.150079 0.150000 0.576066

POWR:

56.2285 23.8925

109
AHUM:

1.600000E-02 1.062623E-02

2 TIME DEPENDENT BOUNDARY VARIABLES:

TEMP 4 AHUM 1

ERROR TOLERANCES: RTOLX, ATOLX, XTOL, TTIME

:

5.00000E-03 1.00000E-06 5.00000E-04 10.000

***** SUPERBLOCK 1 *****

SUPERBLOCK SIMULTANEOUS EQUATION UNFREEZING OPTION, IFZOPT = 0

SUPERBLOCK INPUT SCAN OPTION, INSOPT = 0

10 REPORTED VARIABLES:

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6 CTRL 7 AHUM 2 AHUM 1

0 SIMULTANEOUS EQUATIONS; VARIABLES:

***** BLOCK 1 *****

19 SIMULTANEOUS EQUATIONS; VARIABLES:

CTRL 2 CTRL 3 CTRL 5 CTRL 6 TEMP 3 TEMP 5 AHUM 2 PRES 2 PRES 4 FLOW 1 PRES 3 TEMP 7 FLOW 2 TEMP 6 PRES 5 CTRL 1 FLOW 3 TEMP 8 TEMP 2

UNIT 1 TYPE 3

5 INPUTS

PRES 1 PRES 2 TEMP 1 TEMP 9 TEMP 2

2 OUTPUTS:

TEMP 2 FLOW 1

PARAMETERS:

2.9700

-0.33880

3.10000E-03

2.0000

2.2770 2.51000E-03 21.360

UNIT TYPE

5 INPUTS:

PRES 1 PRES 4 TEMP 1 TEMP 9 TEMP 7

2 OUTPUTS:

TEMP 7 FLOW 2

PARAMETERS

:

0.27600

-0.55880

2.90000E-04

2.0000

0.21160 2.30000E-04 14.800

110
UNIT 3 TYPE 2

5 INPUTS:

FLOW 1 PRES 3 TEMP 3 TEMP 9

2 OUTPUTS:

TEMP 6 PRES 2

PARAMETERS

:

2.7000 2.81 000E-03 2 0.00000 2.0000

UNIT 4 TYPE 13

TEMP 6

0700 2.27 800E-03 11.900

7 INPUTS:

FLOW 1 FLOW 2 PRES 5 TEMP 6 TEMP 7 CTRL 1 CTRL 2

6 OUTPUTS:

CTRL 2 FLOW 3 PRES 3 PRES 4 TEMP 8 NULL 0

PARAMETERS

:

0.30000

0.00000

1.5000 4.00000E-03 10.000 0.10000

UNIT 3 TYPE 2

5 INPUTS:

FLOW 3 PRES TEMP 8 TEMP 9 TEMPI

0

2 OUTPUTS:

TEMPI 0 PRES 5

PARAMETERS

:

38.000 4.40000E-02

0.00000 2.0000

UNIT 6 TYPE 7

32.200 3.55000E-02 66.440

2 INPUTS:

TEMP 5 CTRL 3

1 OUTPUTS:

CTRL 3

PARAMETERS:

20.000 0.00000 100.00

UNIT 7 TYPE 8

4 INPUTS:

CTRL 3 CTRL 4 CTRL 5 CTRL 6

1 1 1
2 OUTPUTS:

CTRL 5 CTRL 6

PARAMETERS

:

6.0000 8.00000E-02 2.0000

UNIT 8 TYPE 12

8 INPUTS:

FLOW 1 TEMP 2 FLOW 4 TEMP 4 AHUM 1 TEMP 3 TEMP 5 AHUM 2

6 OUTPUTS:

TEMP 3 TEMP 5 AHUM 2 POWR 1 POWR 2 CTRL 7

PARAMETERS

:

0.00000 6.2381 101.71 6.2000 0.41600

0.20400 0.72260 5.5118 16.000 6.0000

1 .58800E-02

0.50800

1 .44500E0.1651002 1.50000E-04

0.38600

34.669 2.59000E-02

UNIT 9 TYPE 26

1 INPUTS:

CTRL 6

1 OUTPUTS:

CTRL 1

PARAMETERS:

NONE

TMIN = 0.100 TMAX = 900.000 TSTOP = 5400.000

1 1 2
Listing 6.3-3. Partial Results of Simulation, from Output File MODSUM.DAT

********** SUPERBLOCK 1 **********

TIME= 1800.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6

1.14 0.424 0.424 0.150 0.150 0.576 0.576

AHUM 2 AHUM 1

1 .063E-02 1 .604E-02

********** SUPERBLOCK 1 **********

TIME= 1860.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6

1.25 0.737 0.701 0.184 0.150 0.462 0.263

AHUM 2 AHUM 1 1.331E-02 2.200E-02

********** SUPERBLOCK 1 **********

TIME= 1920.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6

1.45 0.849 0.834 0.177 0.150 0.311 0.151

AHUM 2 AHUM 1

1 .251E-02 2.200E-02

********** SUPERBLOCK 1 **********

TIME= 1980.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6

1.65 0.906 0.898 0.169 0.150 0.204 9.377E-02

AHUM 2 AHUM 1

1 .185E-02 2.200E-02

********** SUPERBLOCK 1 **********

T1ME= 2040.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6

1 .81 0.938 0.935 0.161 0.150 0.130 6.181E-02

AHUM 2 AHUM 1

1 .139E-02 2.200E-02

********** SUPERBLOCK 1 **********

TIME= 2100.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6

1.91 0.956 0.953 0.157 0.150 8.587E-02 4.433E-02

AHUM 2 AHUM 1

1 .113E-02 2.200E-02

********** SUPERBLOCK 1 **********

TIME= 2160.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6

1.97 0.966 0.964 0.154 0.150 5.955E-02 3.400E-02

AHUM 2 AHUM 1

1 .097E-02 2.200E-02

CTRL 7

1 .00

CTRL 7 1.00

CTRL 7

1 .00

CTRL 7 1.00

CTRL 7

1 .00

CTRL 7

1 .00

CTRL 7

1 .00

113
********** SUPERBLOCK 1 **********

TIME= 2220.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6 CTRL 7 2.02 0.972 0.971 0.153 0.150 4.411E-02 2.812E-02 1.00

AHUM 2 AHUM 1

1 .087E-02 2.200E-02

********** SUPERBLOCK 1 **********

TIME= 2280.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6 CTRL 7 2.04 0.976 0.975 0.152 0.150 3.411E-02 2.441E-02 1.00

AHUM 2 AHUM 1

1 .081E-02 2.200E-02

TIME= 2340.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6 CTRL 7 2.06 0.978 0.977 0.151 0.150 2.866E-02 2.235E-02 1.00

AHUM 2 AHUM 1

1 .078E-02 2.200E-02

SUPERBLOCK 1 **********

TIME= 2400.00

FLOW 1 CTRL 1 CTRL 2 CTRL 3 CTRL 4 CTRL 5 CTRL 6 CTRL 7 2.06 0.978 0.978 0.151 0.150 2.635E-02 2.173E-02 1.00

AHUM 2 AHUM 1

1 .077E-02 2.200E-02

114
C0N7K0LLER

GRINS

KP

=6

KI

:

=

0.08

0 0 I / d H 3 L ) £ 3 1 0 y 1 N 0 0

115

Figure

6.3-2.

Controlled

variable

(air

temperature)

response

to

inlet

air

temperature

step

changes:

no

oscillations
C0N7P0LLER

GRINS

KP

a8

inaa

inaa

**anaa NaaMaa - in

cnazsu

UJ

<n

UJzH

116

Figure

6.3-3.

Controlled

variable

(air

temperature)

response

to

inlet

air

temperature

step

changes:

damped

oscillations
C0NT

ttBLLER

GRINS

( Q01 / dW3L ) £3 "1 0 y 1 N 0 3

117

Figure

6.3-4.

Controlled

variable

(air

temperature)

response

to

inlet

air

temperature

step

changes:

undamped

oscillations
6.4 Example 4: Air Handling Unit Without Heat Exchangers

The primary purpose of this example is to check the pressure and flow relationships in an air handler model. Since heat transfer effects will not be

considered, dampers have been substituted for heating and cooling coils to

represent the flow resistance of the heat exchangers, and a duct model has

been used to represent the load. The air handler model will be combined with

a heat exchanger and controller subsystem and a more realistic conditioned

zone model in subsequent examples.

The air handler model is shown schematically in Figure 6.4-1. The ambient

supply air flow rate is labeled W2 in the figure. The Unit 8, Type 3 Inlet

Duct serves to calculate this flow rate and also to make the outdoor air

pressure, labeled P6, a boundary condition to the simulation. The presence of

the inlet duct model between the Unit 7, Type 5 inlet damper and the outside

world is somewhat artificial, but it can be thought of as representing the

combined effects of entrance losses and the flow resistance of any ductwork

between the Unit 7 damper and the Unit 6, Type 4 Flow Merge.

The return air exhaust flow rate is calculated by the Unit 3, Type 6 Flow

Split component. Mass conservation requires that this flow rate be equal to

the ambient supply air flow rate, W2, which is already calculated by the inlet

duct. The flow rate calculated by Unit 3 is therefore redundant and has been

removed from the calculation by assigning it an index of zero. The value of

W2 determined by the inlet duct is used as an input to the Unit 4, Type 5 outlet air damper. Alternatively, the exhaust air flow rate calculated by

Unit 3 could have been assigned a new index number, such as W4. The difference between W2 and W4, theoretically zero, could then be used as a check on the accuracy of the simulation. Note, however, that the ambient supply and

exhaust flow rates calculated by Units 8 and 3 should not both be assigned the

same label, since this would make the set of pressure and flow equations

overdetermined and could cause convergence problems.

An important feature of this simulation is that it contains no differential

equations. Normally, the simulation time step is determined by the differential equations. When only algebraic equations are present, the simulation

always takes the maximum time step, with two exceptions: the first time step

of the simulation is always the minimum time step, and the last time step is

chosen to exactly reach the simulation stopping time. In the absence of

differential equations, there is no start-up transient, making initialization

unnecessary, and changes in the simulation are driven purely by the time

dependent boundary variables.

In this case the only time dependent boundary variable is Cl, which controls

the position of three dampers: Units 4, 5, and 7. When Cl is zero. Units 4

and 7 are closed and Unit 5 is open, supplying a minimum of fresh outdoor air

to the load. When Cl is one. Units 4 and 7 are open and Unit 5 is closed,

supplying a maximum of fresh outdoor air to the load. The boundary file is

shown in Listing 6.4-1. Listing 6.4-2 provides the simulation configuration

and the simulation results. By interpolation, one can determine the damper

position to produce a given percentage of outdoor air in the mixed supply air.

For example, the mixed supply air is roughly 23% ambient air when Cl is 0.32 .

118
AHU1:

AIR

HANDLING

UNIT

(without

heat

exchangers)

co

CM

OJc

+!c

0 — (0 ^ <D ®

0-9

r " ~

CM

IO

O)

E

« to —

O © O — (0

0) k_ >

» © — I O) O) > o

" a ® ® c c o c

qE11111=1 ^-8“

05 LO 0) DH c a> ^

£

©"E — c

E "gw _ © p 0 ©

(DM- Q C

(0 D t- ^ = (0 Q-— © © **“ 2:

k 10 ^ 1-

00 CO

D h*

119

Figure

6.4-1.

Air

handling

unit

without

heat

exchangers:

schematic
Listing 6.4-1. Boundary Variable File Values of Time and Control Signal Cl

0 . 0.00

1 . 0.00

2. 0.05

3. 0.10

4. 0.15

6. 0.25

11. 0.50

16. 0.75

18. 0.85

19. 0.90

20. 0.95

21

.

1.00

Listing 6.4-2. MODSUM.DAT: Simulation Configuration and Results

***** PROGRAM MODSIM *****

a MODular SIMulation program

AHU1 : Air Handling Unit (without heat exchangers)

1 SUPERBLOCKS 1 BLOCKS 13 UNITS

28 STATE VARIABLES:

14 PRES 3 FLOW 5 TEMP 2 CTRL 2 RVPS 2 POWR

INITIAL STATE VECTOR:

PRES:

-1.75000

0.000000

-7.999998E0.250000

0.150000

02 -0.120000

0.200000

0.150000

-0.250000

0.190000

-4.000000E-02

1.75000

0.160000

-1 .000000E-06

FLOW:

2.00000 1 .000000E-02 1 .90000

TEMP:

25.0000 25.0000 30.0000 26.0000 26.0000

CTRL:

0.000000 1.00000

RVPS

:

60.0000 60.0000

POWR:

0.000000 0.000000

120
1 TIME DEPENDENT BOUNDARY VARIABLES:

CTRL 1

ERROR TOLERANCES: RTOLX, ATOLX, XTOL, TTIME

:

1.00000E-04 1.00000E-05 2.00000E-04 1.0000

***** SUPERBLOCK 1 *****

SUPERBLOCK SIMULTANEOUS EQUATION UNFREEZING OPTION, IFZOPT = 0

SUPERBLOCK INPUT SCAN OPTION, INSOPT = 0

5 REPORTED VARIABLES:

PR ESI 4 FLOW 1 FLOW 2 TEMP 4 CTRL 1

0 SIMULTANEOUS EQUATIONS; VARIABLES:

***** BLOCK 1 *****

19 SIMULTANEOUS EQUATIONS; VARIABLES:

PRES 2 PRES 7 PRES14FLOW 1 PRES 9 PRES 1TEMP 2 PRES 8

TEMP 5

PRES 3

PRES10

PRES 4

PRES11

PRES 5 PRES12FLOW 2 PRES13

UNIT 1 TYPE 1

4 INPUTS:

FLOW 1 PRES 2 RVPS 1 TEMP 1

3 OUTPUTS:

PRES 1 TEMP 2 POWR 1

PARAMETERS

:

3.6400

0.00000

0.33650

UNIT 2

0.80100

0.56400

1.0000

TYPE 2

-0.19000

-8.62000E-02

•4.45000E-03

0.00000

5 INPUTS:

FLOW 1 PRES 3 TEMP 2 TEMP 2 TEMP 2

2 OUTPUTS:

NULL 0 PRES 2

PARAMETERS:

0.00000

0.00000

UNIT 3

3 INPUTS:

0.00000

1 .0000

TYPE 6

0.00000 0.00000

FLOW 3 TEMP 4

00000

00000

00000E-02

121
FLOW 1 PRES 4 PRES 5

3 OUTPUTS:

NULL 0 FLOW 3 PRES 3

PARAMETERS

:

1.10000E-02

UNIT 4 TYPE 5

3 INPUTS:

FLOW 2 PRES 6 CTRL 1

1 OUTPUTS:

PRES 4

PARAMETERS:

1.00000E-03 1.20000E-02 0.87000

UNIT 5 TYPE 5

3 INPUTS:

FLOW 3 PRES 7 CTRL 1

1 OUTPUTS:

PRES 5

PARAMETERS:

1.00000E-03 1.20000E-02 0.87000

UNIT 6 TYPE 4

5 INPUTS:

FLOW 3 FLOW 2 PRES 9 TEMP 2 TEMP 3

4 OUTPUTS:

FLOW 1 PRES 7 PRES 8 TEMP 4

PARAMETERS

:

1.10000E-02

UNIT 7 TYPE 5

3 INPUTS:

FLOW 2 PRES 8 CTRL 1

1 OUTPUTS:

PRES10

PARAMETERS:

1.00000E-03 1.20000E-02 0.87000

0.00000

1.0000

0.00000

122
UNIT 8 TYPE 3

3 INPUTS:

PRES 6 PRES10

2 OUTPUTS:

NULL 0 FLOW 2

TEMP 3 TEMP 3 TEMP 3

PARAMETERS:

0.00000

0.00000

0.00000 0.00000 0.00000 1.00000E-03

1 .0000

UNIT 9 TYPE 5

3 INPUTS:

FLOW 1 PRES 11

1 OUTPUTS:

PRES 9

CTRL 2

PARAMETERS:

4.00000E-02 4.00000E-05 1.0000 0.00000

UNIT 10 TYPE 3

3 INPUTS:

FLOW 1 PR ESI 2

1 OUTPUTS:

PRES 1

1

CTRL 2

PARAMETERS:

1 .20000E-02 1.20000E-05 1.0000 0.00000

UNIT 11 TYPE 5

3 INPUTS:

FLOW 1 PR ESI 3

1 OUTPUTS:

PRES12

CTRL 2

PARAMETERS:

4.00000E-02 4.00000E-05 1.0000 0.00000

UNIT 12 TYPE 1

4 INPUTS:

FLOW 1 PRES14 RVPS 2 TEMP 4

3 OUTPUTS:

PRES13 TEMP 3 POWR 2
PARAMETERS

:

3.6400

0.00000

0.33650

0.80100

0.56400

1 .0000

-0.19000

-8.62000E-02

-4.45000E-03

0.00000

0.00000

0.00000

UNIT 13 TYPE 2

5 INPUTS:

FLOW 1 PRES 1 TEMP 5 TEMP 5 TEMP 5

2 OUTPUTS:

NULL 0 PRES14

PARAMETERS

:

0.00000

0.00000

0.00000

1.0000

0.00000 500.00 0.87500

TMIN = 1 .000 TMAX = 1.000 TSTOP = 21 .000

********** SUPERBLOCK 1 **********

T IME = 1.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4 CTRL 1

1 .60 2.01 5.734E-02 28.0 0.000

SUPERBLOCK 1 **********

TIME= 2.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4 CTRL 1

1 .60 2.01 0.160 28.1 5.000E-02

SUPERBLOCK 1 **********

TIME = 3.00

PRES14 FLOW 1 FLOW 2 TEMP 4 CTRL 1

1 .60 2.01 0.211 28.1 0.100

********** SUPERBLOCK 1 **********

T IME= 4.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4 CTRL 1

1 .60 2.01 0.263 28.2 0.150

********** SUPERBLOCK 1 **********

TIME= 5.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4 CTRL 1

1 .60 2.01 0.323 28.2 0.200

********** SUPERBLOCK 1 **********

TIME11 6.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4 CTRL 1

1 .60 2.01 0.391 28.3 0.250

1 2 4
**********

TIME = PRES14

1 .60

SUPERBLOCK 1 **********

7.00

FLOW 1 FLOW 2 TEMP 4

2.01 0.470 28.4

**********

TIME=

PR ESI 4

1 .61

SUPERBLOCK 1 **********

8.00

FLOW 1 FLOW 2 TEMP 4

2.01 0.559 28.5 **********

TIME=

PR ESI 4

1 .61

SUPERBLOCK 1 **********

9.00

FLOW 1 FLOW 2 TEMP 4

2.01

0.660 28.6

********** SUPERBLOCK 1 **********

TIME= 10.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4

1 .61 2.01 0.770 28.7

********** SUPERBLOCK 1 **********

TIME= 11.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4

1.61 2.01 0.888 28.8

********** SUPERBLOCK 1 **********

TIME= 12.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4

1.61 2.01 1.01 29.0

********** SUPERBLOCK 1 **********

TIME= 13.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4

1 .61 2.01 1 .13 29.1

********** SUPERBLOCK 1 **********

TIME= 14.00

PRES 14 FLOW 1 FLOW 2 TEMP 4

1.60 2.01 1.25 29.2

********** SUPERBLOCK 1 **********

TIME= 15.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4

1 .60 2.01 1 .36 29 .3

********** SUPERBLOCK 1 **********

TIME= 16.00

PR ESI 4 FLOW 1 FLOW 2 TEMP 4

1.60 2.01 1.46 29.4

********** SUPERBLOCK 1 **********

CTRL 1 0.300

CTRL 1 0.350

CTRL 1 0.400

CTRL 1 0.450

CTRL 1 0.500

CTRL 1 0.550

CTRL 1 0.600

CTRL 1 0.650

CTRL 1 0.700

CTRL 1 0.750

125
TIME= 17.00

PRES 14 FLOW 1 FLOW 2 TEMP 4 CTRL 1 1.60 2.01 1.55 29.5 0.800

********** SUPERBLOCK 1 **********

TIME= 18.00

PRES 14 FLOW 1 FLOW 2 TEMP 4 CTRL 1

1 .60 2.01 1 .63 29 .6 0.850

********** SUPERBLOCK 1 **********

TIME= 19.00

PRES 14 FLOW 1 FLOW 2 TEMP 4 CTRL 1 1.60 2.01 1.70 29.7 0.900

***** END of file encountered on boundary condition file at time

********** SUPERBLOCK 1 **********

T IME = 20.00

PRESl

4

FLOW 1 FLOW 2 TEMP 4 CTRL 1

1 .60 2.01 1 .77 29.8 0.950

********** SUPERBLOCK 1 **********

TIME= 21 .00

PRES14 FLOW 1 FLOW 2 TEMP 4 CTRL 1

1 .60 2.01 1.92 29.9 1.00
6.5 Example 5: Air Handler With Flow-Controlled Cooling Coil

In this example, the cooling coil control loop of Example 3 and the air

handling unit of Example 4 are combined into a single simulation consisting of

two blocks, as shown in Figure 6.5—1. The two blocks in this figure are

coupled through their common use of three state variables: T4, T5, and W4, the

air temperatures entering and leaving the cooling coil and the air flow rate

through the coil. The damper model representing a pressure drop across the

coil has been retained, since the cooling coil model does not calculate a pressure drop itself. Thus Unit 8 in Block 1 represents the thermal effects

of the coil, and Unit 20 in Block 2 represents the flow resistance of the

coil. The procedure for combining blocks from different simulations, using

the editing features of HVACGEN, is described below.

First, the SAve command from the EDit menu is used to extract a block (in the

present example, the only block) from one of the existing simulation work

files and write it to a block file. In this case the following commands are entered, either sequentially or on a single line:

EDIT SIMULATION EXAMPLE4 SAVE

In response to prompts from HVACGEN, Block 1 is identified as the block to be

saved and the file name EXAMPLE4 is given approval. The file EXAMPLE4.SIM

remains unaltered, and a new file named EXAMPLE4.BLK is created. HVACGEN

returns to the EDit menu, and control is returned to the main menu by entering

the Continue command.

Next, the following command sequence is entered:

EDIT SIMULATION EXAMPLE3 INSERT

In response to prompts, HVACGEN is told to insert a block into Superblock 1 of

EXAMPLE3, to read the block from the file EXAMPLE4, to automatically renumber

the state variable indices in the inserted block, and to save the results in a new file named EXAMPLE5.

At this point a file named EXAMPLE5.SIM has been created and contains two

blocks which are completely independent of each other, having no variables in common. For example, since Block 1 contains temperatures Tl through T10, an offset of 10 has been added to all temperatures in Block 2, which are now

numbered Til through Tl 5. Similarly, the three flow rates in Block 2 are now numbered W5, W6, and W7, since Block 1 contains four flow rates. Before the

simulation can be used, the Units in Block 2 must be edited one by one,

changing variable indices as necessary to make the simulation description

correspond to Figure 6.5-1. (A 'substitute command, which would (for example) automatically find all occurrences of W5 and change them all to W4, could

be very helpful here, but had not been implemented at the time this was

written.

)

Actually, more changes were made here than is strictly necessary. For example, changing flow W5 to W4 was necessary, but changing W6 to W5 and W7 to W6 was not. If W6 and W7 had been left unchanged, W5 would be an unused variable

127
name, increasing the size of the state vector slightly but doing no real harm.

Alternatively, the gap could have been filled by changing W7 to W5, leaving W6

alone

.

A block file does not contain initial values of variables. When a block is

inserted, the new state variables it contains are all assigned initial values

of zero by HVACGEN. This is true whether the block is read from a file or created interactively, and it also applies to the insertion of units within a block. Whenever a simulation is edited and new variable names are generated,

the EDit VAriables command should be used to provide initial values for the

new variables. Again, in this example more changes were made than is strictly

necessary: many of the initial values of variables in Block 1 were also

modif ied

.

The simulation title, boundary variables, reported variables, reporting interval, and error tolerances are still the same as in EXAMPLE3, from which

EXAMPLE5 is derived. It is usually desirable to edit these categories of

information as well. A summary of the final simulation configuration and a sample of the simulation output are contained in Listing 6.5—1 . Notice that

all time dependent boundary conditions have been removed from this example.

The system works its way from the initial conditions to steady state, and will

stay there indefinitely. Figure 6.5-2 is a graph of the controlled temperature leaving the cooling coil, T5, and the temperature leaving the load.

Til, during this simulation startup transient.

1 28
AIR HANDLING UNIT WITH COOLING COIL

Block 1

Block 2

U13 U12 U11 U10

T5 T6 T2 T 1 P12

#

£Pio

£(W5 /Wo)

P9

•Tl2

•

CM

-CO

rQ.1— RPS1

Q3

• P?

Tii W4 11

“ “ “ T

1

1

1 i-••

•

1•

pn.we

//////

P*1 *T 3 12

U14

T5

r ___C9 -

i —1

t

. _ —

|

l U22!

T2 1

1

j

1

1

1

1

1

1

T13

ambient

Pi 2 w5 £ .T'3 P1 5 / P1 7 / T4 S

t

5 RPS2 T,4 1

Ti*3 Pie * Pi 4 T4 2 pi*8 * Pl9 Q4 P20

1

1 U 1

7

T3

U 1

6

T5

U15

T4

U18

T5

U19

T5

U20

T5

U21

T 1

Figure 6.5-1. Air handling unit with cooling coil control loop

129
Listing 6.5-1. MODSUM.DAT: Simulation Summary and Output

***** PROGRAM MODSIM *****

a MODular SIMulation program

AIR HANDLER WITH FLOW- CONTROLLED COOLING COIL

1 SUPERBLOCKS 2 BLOCKS 22 UNITS

58 STATE VARIABLES:

20 PRES 6 FLOW 14 TEMP

INITIAL STATE VECTOR:

PRES:

10 CTRL 2 RVPS 4 POWR 2 AHUM

250.000

-250.000

4.492998E-03

-2.544001E-04

227.600

-1.94000

0.000000

-0.201500

212.100

7.975000E-02

-4.747 000E-03

-0.250000

222.600

3.926000E-02

-1.585000E-02

-0.412000

210.400

1 . 560000E-02

-3.952000E-02

1.60500

FLOW:

1.14200

1.50000

1.49100 2.63300 2.00000 0.500000

TEMP:

5.00000

16.8000

27 .0000

5.01300

5.00000

28.0000

16.7900

10.1200

35.0000

32.0000

25.0000

22.0000

20.0000

10.1800

CTRL:

0.428000

0.572000

0.428000

1.00000

0.220000

0.320000

0.180000

1.00000

0.572000

0.000000

RVPS:

30.0000 30.0000

POWR:

56.3000 24.0000 9.20000 9.20000

AHUM:

1 .500000E-02 4.999999E-03

0 TIME DEPENDENT BOUNDARY VARIABLES:

ERROR TOLERANCES:

5.00000E-03

RTOLX, ATOLX,

1 .00000E-06

XTOL, TTIME:

5.00000E-04 10.000

***** SUPERBLOCK 1 *****

130
SUPERBLOCK SIMULTANEOUS EQUATION UNFREEZING OPTION, IFZOPT = 2 SUPERBLOCK INPUT SCAN OPTION, INS OPT = 0

10 REPORTED VARIABLES:

FLOW 1 FLOW 4 FLOW 5 TEMP 4 TEMP 5 TEMP11 TEMP14 CTRL 7 CTRL10 CTRL 1

1 SIMULTANEOUS EQUATIONS; VARIABLES:

TEMP 4

**

BLOCK 1 *****

19 SIMULTANEOUS EQUATIONS; VARIABLES:

CTRL 2 CTRL 3 CTRL 5 CTRL 6 TEMP 3 TEMP 5 AHUM 2 PRES 2

PRES 4 FLOW 1 PRES 3 TEMP 7 FLOW 2 TEMP 6 PRES 5 CTRL 1 FLOW 3 TEMP 8 TEMP 2

UNIT 1 TYPE 3

5 INPUTS • PRES 1 PRES 2 TEMP 1 TEMP 9 TEMP 2

2 OUTPUTS:

TEMP 2 FLOW 1

PARAMETERS

:

2.9700 3.10000E-03 2.2770 2.51000E-03 21.360

-0.55880 2.0000

UNIT 2 TYPE 3

5 INPUTS:

PRES 1 PRES 4 TEMP 1 TEMP 9 TEMP 7

2 OUTPUTS:

TEMP 7 FLOW 2

PARAMETERS

:

0.27600 2.90000E-04 0.21160 2.30000E-04 14.800

-0.55880 2.0000

UNIT 3 TYPE 2

5 INPUTS:

FLOW 1 PRES 3 TEMP 3 TEMP 9 TEMP 6

2 OUTPUTS:

TEMP 6 PRES 2

PARAMETERS

:

2.7000

0.00000

2.81000E-03 2.0700 2.27800E-03 11.900

2.0000

131
UNIT 4 TYPE 13

7 INPUTS:

FLOW 1 FLOW 2 PRES 5 TEMP 6 TEMP 7 CTRL 1 CTRL 2

6 OUTPUTS:

CTRL 2 FLOW 3 PRES 3 PRES 4 TEMP 8 CTRL10

PARAMETERS

:

0.30000

0.00000

1.5000 4.00000E-03 10.000 0.10000

UNIT 5 TYPE 2

5 INPUTS:

FLOW 3 PRES 6 TEMP 8 TEMP 9 TEMPI

0

2 OUTPUTS:

TEMPI 0 PRES 5

PARAMETERS

:

38.000 4.40000E-02 32.200 3.55000E-02 66.440

0.00000 2.0000

UNIT 6 TYPE 7

2 INPUTS:

TEMP 5 CTRL 3

1 OUTPUTS:

CTRL 3

PARAMETERS:

20.000 0.00000 100.00

UNIT 7 TYPE 8

4 INPUTS:

CTRL 3 CTRL 4 CTRL 5 CTRL 6

2 OUTPUTS:

CTRL 5 CTRL 6

PARAMETERS

:

6.0000 8.00000E-02 2.0000

UNIT 8 TYPE 12

8 INPUTS:

FLOW 1 TEMP 2 FLOW 4 TEMP 4 AHUM 1 TEMP 3 TEMP 5 AHUM 2

132
6 OUTPUTS:

TEMP 3 TEMP 5 AHUM 2 POWR 1 POWR 2 CTRL 7

PARAMETERS

:

0.00000 6.2381 101.71 6.2000 0.41600

0.20400 0.72260 5.5118 16.000 6.0000

1.58800E-02

0.50800

1.44500E-02 1.50000E-04

0.16510 0.38600

34.669 2.59000E-02

UNIT 9 TYPE 26

1 INPUTS:

CTRL 6

1 OUTPUTS:

CTRL 1

PARAMETERS:

NONE

***** BLOCK 2

***

19 SIMULTANEOUS EQUATIONS; VARIABLES:

PRES 8 FLOW 4 TEMPI 1 TEMP12 PRES 9 PRES10 PRES11 FLOW 5 FLOW 6 PRES13 PRES15 PRES14 PRES16 PRES17 PRES18 PRESl

9

PRES20 PRES 7 TEMP14

UNIT 10 TYPE 1

4 INPUTS:

FLOW 4 PRES 8 RVPS 1 TEMPI

1

3 OUTPUTS:

PRES 7 TEMPI 2 POWR 3

PARAMETERS

:

NONE

UNIT 11 TYPE 2

5 INPUTS:

FLOW 4 PRES 9 TEMPI 2 TEMPI 2 TEMPI

2

2 OUTPUTS:

NULL 0 PRES 8

PARAMETERS

:

0.00000 0.00000

0.00000 1.0000

0.00000 0.00000

UNIT 12 TYPE 6

1 .00000E-02

133
3 INPUTS:

FLOW 4 PRESI 0 PRES 11

3 OUTPUTS:

NULL 0 FLOW 6 PRES 9

PARAMETERS

:

1.10000E-02

UNIT 13 TYPE 5

3 INPUTS:

FLOW 5 PRES 12 CTRL 8

1 OUTPUTS:

PRES 10

PARAMETERS:

1.00000E-03 1.20000E-02 0.87000

UNIT 14 TYPE 5

3 INPUTS:

FLOW 6 PRES13 CTRL 8

1 OUTPUTS:

PRES11

PARAMETERS:

1.00000E-03 1.20000E-02 0.87000

UNIT 15 TYPE 4

5 INPUTS:

FLOW 6 FLOW 5 PR ESI 5 TEMPI 2 TEMP13

4 OUTPUTS:

FLOW 4 PRES 13 PRES 14 TEMP 4

PARAMETERS

:

1.10000E-02

UNIT 16 TYPE 5

3 INPUTS:

FLOW 5 PRES 14 CTRL 8

1 OUTPUTS:

PRES 16

PARAMETERS

:

1.00000E-03 1.20000E-02 0.87000

0.00000

1.0000

0.00000

134
UNIT 17 TYPE 3

5 INPUTS:

PRES12 PRES16

2 OUTPUTS:

NULL 0 FLOW 5

TEMP13 TEMP13 TEMP13

PARAMETERS

:

0.00000

0.00000

0.00000 0.00000 0.00000 1.00000E-03

1.0000

UNIT 18 TYPE 5

3 INPUTS:

FLOW 4 PRES 17

1 OUTPUTS:

PRES15

CTRL 9

PARAMETERS:

4.00000E-02 4.00000E-05 1.0000 0.00000

UNIT 19 TYPE 5

3 INPUTS:

FLOW 4 PRES 18

1 OUTPUTS:

PRES17

CTRL 9

PARAMETERS:

1.20000E-02 1.20000E-05 1.0000 0.00000

UNIT 20 TYPE 5

3 INPUTS:

FLOW 4 PRES19

1 OUTPUTS:

PRES18

CTRL 9

PARAMETERS:

1.20000E-02 1.20000E-05 1.0000 0.00000

UNIT 21 TYPE 1

4 INPUTS:

FLOW 4 PRES20

3 OUTPUTS:

RVPS 2 TEMP 5

135
PRES 19 TEMP 14 POWR 4

PARAMETERS

:

3.6400

0.00000

0.31920

0.80100

0.56400

1.0000

-0.19000

-8.62000E-02

-4.45000E-03

0.00000

0.00000

0.00000

UNIT 22 TYPE 2

5 INPUTS:

FLOW 4 PRES 7 TEMP14 TEMP13 TEMPI

1

2 OUTPUTS:

TEMPI 1 PRES20

PARAMETERS

:

2.0000

0.00000

2.0000

1.0000

240.00 50.000 0.11880

TMIN = 0.100 TMAX = 300.000 TSTOP = 600.000

********** SUPERBLOCK 1 **********

TIME= 30.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

1 .14 2.15 0.538 24.1

CTRLl

0

CTRL 1 0.472 0.346 ********** SUPERBLOCK 1 **********

TIME= 60.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

1.06 2.15 0.538 24.7

CTRLl

0

CTRL 1 0.243 0.167

********** SUPERBLOCK 1 **********

TIME= 90.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

0.938 2.15 0.538 24.9

CTRLl

0

CTRL 1 0.117 7.724E-02

********** SUPERBLOCK 1 **********

TIME= 120.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

0.715 2.15 0.538 25.2

CTRLl

0

CTRL 1 5.771E-02 4.334E-02

TEMP 5 13.7

TEMPI

1

20.3

TEMPI

4

13.9

CTRL 7 1.00

TEMP 5 14.1TEMPI

1

21.1

TEMP14

14.2

CTRL 7 1.00

TEMP 5 14.7

TEMPI

1

21.4

TEMP 14

14.7

CTRL 7 0.990

TEMP 5 15.9

TEMPI

1

21.8

TEMP14

15.4

CTRL 7 0.87 9

136
*****

SUPERBLOCK 1 **********

TIME= 150.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

0.670 2.15 0.538 25.5

CTRL1 0 CTRL 1 5.049E-02 4.859E-02

****** SUPERBLOCK 1 **********

TIME= 180.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

0.611 2.15 0.538 25.8

CTRLl 0 CTRL 1 4.290E-02 3.355E-02 ******* SUPERBLOCK 1 **********

TIME= 210.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

0.565 2.15 0.538 26.1

CTRLl 0 CTRL 1 3.766E-02 3.857E-02

*****

SUPERBLOCK 1 **********

TIME= 240.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

0.565 2.15 0.538 26.4

CTRLl 0 CTRL 1 3.766E-02 4.034E-02

**•***** SUPERBLOCK 1 **********

TIME= 270.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

0.565 2.15 0.538 26.6

CTRLl 0 CTRL 1 3.766E-02 3.697E-02

•******* SUPERBLOCK 1 **********

TIME= 300.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

0.561 2.15 0.538 26.8

CTRLl 0 CTRL 1 3 .723E-02 3 .358E-02

**•****** SUPERBLOCK 1 **********

TIME= 330.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

0.550 2.15 0.538 26.9

CTRLl 0 CTRL 1 3.611E-02 3.208E-02

********** SUPERBLOCK 1 **********

TIME= 360.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4

TEMP 5 16.6

TEMP11

22.2

TEMPI

4

16.8

CTRL 7 0.835

TEMP 5 16.9

TEMP11

22.6

TEMP14

16.9

CTRL 7 0.781

TEMP 5

17.5

TEMPI

1

23.0

TEMP14

17.6

CTRL 7 0.734

TEMP 5

17.6

TEMP11

23.4

TEMP14

17.7

CTRL 7 0.718

TEMP 5 17.6TEMP11

23.7

TEMP14

17.7

CTRL 7 0.708

TEMP 5 17.7TEMPI

1

23.9

TEMP14

17.8

CTRL 7 0.698

TEMP 5 17.8

TEMP 11

24.1

TEMP14

17.9

CTRL 7 0.678

TEMP 5 TEMPll TEMP 14 CTRL 7

137
0.546 2.15

CTRL10 CTRL 1 3.569E-02 3.230E-02

0.538 27.0 17.9 24.1 18.0

********** SUPERBLOCK 1 **********

TIME= 390.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4 TEMP 5 TEMPI

1

TEMP 14

0.546 2.15

CTRLl 0 CTRL 1 3.569E-02 3.273E-02

0.538 27.1 17.9 24.3 18.0

TIME= 420.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4 TEMP 5 TEMPI

1

TEMPI

4

0.546 2.15

CTRLl 0 CTRL 1 3.569E-02 3.369E-02

0.538 27.1 17.9 24.3 18.0

********** SUPERBLOCK 1 **********

TIME= 450.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4 TEMP 5 TEMPI

1

TEMP14

0.546 2.15

CTRLl 0 CTRL 1 3 . 569E-02 3.403E-02

0.538 27.1 17.9 24.3 18.0

TIME= 480.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4 TEMP 5 TEMP11 TEMPI

4

0.546 2.15

CTRLl 0 CTRL 1 3.569E-02 3.436E-02

0.538 27.1 17.9 24.3 18.1

********** SUPERBLOCK 1 **********

TIME= 510.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4 TEMP 5 TEMPI

1

TEMP 14

0.546 2.15

CTRLl 0 CTRL 1 3.569E-02 3.443E-02

0.538 27.1 17.9 24.4 18.1

TIME= 540.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4 TEMP 5 TEMPI

1

TEMP14

0.546 2.15

CTRLl 0 CTRL 1 3.569E-02 3.429E-02

0.538 27.1 17.9 24.4 18.1

********** SUPERBLOCK 1 **********

TIME= 570.00

FLOW 1 FLOW 4 FLOW 5 TEMP 4 TEMP 5 TEMP 11 TEMP 14

0.546 2.15

CTRLl 0 CTRL 1 3.569E-02 3.415E-02

0.538 27.1 17.9 24.4 18.1

138

0.676

CTRL 7 0.673

CTRL 7 0.669

CTRL 7 0.669

CTRL 7 0.669

CTRL 7 0.669

CTRL 7 0.669

CTRL 7 0.669
EXAMPLE

5

SIMULRTI0N

STARTUP

TRANSIENT

"H I— T T T T

'—

T

»—i—i—

r

in

CM CSJ Csl CM N

0) M —

<

01a

z

a

in

(3) 3^ni«y3dW31

00c

139

Figure

6.5*2.

Simulation

startup

transient.

Upper

curve:

Til,

temperature

leaving

load
6.6 Example 6: Single Zone Air Handler With Cooling Coil

This example was generated by deleting the Unit 22, Type 2 component from

Block 2 of Example 5, and adding a third block consisting of a supply duct, a conditioned zone, and a return duct. The three blocks are shown schematically

in Figure 6.6-1.

After adding the third block, the initial value of the outdoor air temperature, T13, was changed to 25 C, and the new temperature variables T15 through

T21 were all assigned initial values of 20 C. The fifth power variable,

representing the heat flux through the zone walls, was set to 3 kW. The

reporting interval and list of reported variables were also changed.

The resulting simulation is an unmitigated disaster, failing to converge well

on the first time step and terminating in a FORTRAN error (floating point

overflow) shortly thereafter. The reported flow rate W4 is less than zero at

the first time step, suggesting that perhaps the equation solver (SNSQ) is

unable to find a solution to the set of equations representing air flow rates

and pressures. This set of equations is now divided between blocks 2 and 3,

making it more difficult to solve. Otherwise it is essentially the same set

of equations as in Example 5, with only one additional pressure (P21).

On this assumption. Example 5 was run again for a few time steps and the first

three significant digits of the final values of pressures P7 through P20 and

flows W4 through W6 were entered as initial values in Example 6. Thus modified, the example ran smoothly. The configuration of this simulation is shown

in Listing 6.6-1.

The point to emphasize here is that dividing a tightly coupled set of equations into separate blocks (or superblocks) can sometimes cause problems. In

this instance all that was required was a better set of initial guesses for

the variables in question. In some cases it may be necessary to modify the

block structure of a simulation to overcome similar problems. The Type 19

component, designed for passing flow streams between superblocks, can be

useful in this regard.

The example was run for 86400 seconds (24 hours), and the final state of this

run was used as the initial state of all subsequent runs. The outdoor air

temperature, T13, and the heat flux through the zone wall, Q5, were then

declared time dependent boundary conditions, and the boundary variable file

shown in Listing 6.6-2 and graphed in Figure 6.6-2 was prepared. Time zero,

when the ambient temperature is lowest, corresponds to 5 A.M. Some results

from a 24-hour simulation using these initial conditions and boundary conditions are presented in Figures 6.6-3 and 6.6-4.

140
Figure

Example 6: AIR HANDLING UNIT WITH COOLING COIL AND

CONDITIONED ZONE

Block 1

Block 2

r12

Vs

U13 U12

T5 T6

U11

T2

U10

T

1

P,

J ^

P10

flWs/Wo)

•r9

T12

P8

T12

RPS1

Q3

i C8 —

W5 ;

P*6 ?

P Wft 'll* 6

//////

P13.'Jl2

• T11 W4

U14

T5

(T13= ambient)

i ^9

1 I I I 1

Ti3

• p*14

^15 *

/ P17 ^ T4

±

/

U17

T3

U16

T5

U15

T4

t; ,

.

U18 U19 U20

T5 T5 T5

p13 '/

T5 RPS2

Pl3 Q4

I Ti 4

20

U21

T

1

Block 3

6.6-1. System schematic: single zone air handler with cooling coil.

141
Listing 6.6-1. Simulation Configuration

AIR HANDLER WITH COOLING COIL AND CONDITIONED ZONE

SUPERBLOCK 1 BLOCK 1 UNIT 1 TYPE 3

UNIT 2 TYPE 3

UNIT 3 TYPE 2

UNIT 4 TYPE 13

UNIT 5 TYPE 2 UNIT 6 TYPE 7 UNIT 7 TYPE 8

UNIT 8 TYPE 12

UNIT 9 TYPE 26

BLOCK 2 UNIT 10 TYPE 1 UNIT 11 TYPE 2

UNIT 12 TYPE 6

UNIT 13 TYPE 5 UNIT 14 TYPE 5 UNIT 13 TYPE 4

UNIT 16 TYPE 5 UNIT 17 TYPE 3

UNIT 18 TYPE 5 UNIT 19 TYPE 5 UNIT 20 TYPE 5 UNIT 21 TYPE 1 BLOCK 3 UNIT 22 TYPE 2 UNIT 23 TYPE 15

UNIT 24 TYPE 2

INLET CONDUIT (DUCT OR PIPE)

INLET CONDUIT (DUCT OR PIPE)

CONDUIT (DUCT OR PIPE)

THREE-WAY VALVE MODEL

CONDUIT (DUCT OR PIPE)

TEMPERATURE SENSOR

PROPORTIONAL- INTEGRAL CONTROLLER

COOLING OR DEHUMIDIFYING COIL

CONTROL SIGNAL INVERTER

FAN OR PUMP

CONDUIT (DUCT OR PIPE)

FLOW SPLIT

DAMPER OR VALVE

DAMPER OR VALVE

FLOW MERGE

DAMPER OR VALVE

INLET CONDUIT (DUCT OR PIPE)

DAMPER OR VALVE

DAMPER OR VALVE

DAMPER OR VALVE

FAN OR PUMP

CONDUIT (DUCT OR PIPE)

ROOM MODEL

CONDUIT (DUCT OR PIPE)

UNIT 1 TYPE 3

INLET CONDUIT (DUCT OR PIPE)

1

2

3

INPUTS:

PRESSURE 1 - PRESSURE 2

- TEMPERATURE 1 - TEMPERATURE 9

- TEMPERATURE 2

-

INLET FLUID PRESSURE

OUTLET FLUID PRESSURE

INLET FLUID TEMPERATURE

AMBIENT AIR TEMPERATURE

OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

OUTPUTS:

TEMPERATURE

FLOW

2 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

1 - FLUID MASS FLOW RATE

PARAMETERS:

2.97000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

142
0.310000E-02 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

2.27700 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

0.251000E-02 VOLUME (M3)

21.3600 FLOW RESISTANCE [0.001/ (KG M)]

-0.558800 HEIGHT OF OUTLET ABOVE INLET (M)

2.00000 MODE: 2=WATER, 1=AIR, NEG. =DETAILED, POS.=SIMPLE DYNAMI

UNIT 2 TYPE 3

INLET CONDUIT (DUCT OR PIPE)

1 INPUTS:

PRESSURE

PRESSURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

1

- INLET FLUID PRESSURE

4 - OUTLET FLUID PRESSURE

1 - INLET FLUID TEMPERATURE

9 - AMBIENT AIR TEMPERATURE

7 - OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

2 OUTPUTS

:

TEMPERATURE

FLOW

7 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

2 - FLUID MASS FLOW RATE

3 PARAMETERS:

0.276000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.290000E-03 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.211600 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

0.230000E-03 VOLUME (M3)

14.8000 FLOW RESISTANCE [0.001/(KG M)]

-0.558800 HEIGHT OF OUTLET ABOVE INLET (M)

2.00000 MODE: 2 =WATER t 1=AIR, NEG.=DETAILED, POS.=SIMPLE DYNAMI

UNIT 3 TYPE 2

CONDUIT (DUCT OR PIPE)

1 INPUTS:

FLOW

PRESSURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

1 - FLUID MASS FLOW RATE

3 - OUTLET PRESSURE

3 - FLUID INLET TEMPERATURE

9 - AMBIENT TEMPERATURE

6 - OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

2

OUTPUTS

:

TEMPERATURE 6 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

PRESSURE 2 - INLET PRESSURE

3

PARAMETERS:

2.70000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.281000E-02 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

2.07000 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

0 .227 800E-02 VOLUME (M3)

11.9000 FLOW RESISTANCE [0.001/(KG M)]

143
0.000000

2.00000

HEIGHT OF OUTLET ABOVE INLET (M)

MODE! 2=WATER, 1=AIR, NEG. = DETAILED* POS.=SIMPLE DYNAMI

UNIT 4 TYPE 13

THREE-WAY VALVE MODEL

1 INPUTS:

FLOW

FLOW

PRESSURE

TEMPERATURE

TEMPERATURE

CONTROL

CONTROL

1 - INLET MASS FLOW RATE, PORT 1 (OPEN WHEN CONTROL = 1 2 - INLET MASS FLOW RATE, PORT 2 (OPEN WHEN CONTROL = 0

5 - OUTLET PRESSURE

6 - INLET TEMPERATURE, PORT 1 7 - INLET TEMPERATURE, PORT 2

1 - CONTROL VARIABLE FROM CONTROLLER

2 - ACTUATOR RELATIVE POSITION (SAME AS OUTPUT 1)

2 OUTPUTS

:

CONTROL

FLOW

PRESSURE

PRESSURE

TEMPERATURE

CONTROL

2 - ACTUATOR RELATIVE POSITION

3 - OUTLET MASS FLOWRATE

3 - INLET PRESS., PORT 1 (OPEN => CONTROL VARIABLE = 1)

4 - INLET PRESS., PORT 2 (OPEN => CONTROL VARIABLE = 0)

8 - OUTLET TEMPERATURE

10 - VALVE STEM RELATIVE POSITION

3 PARAMETERS

:

0.300000 PORT 1 FLOW RESISTANCE, PORT 1 OPEN (CTRL=1 )[0.001/(KG

1.50000 PORT 2 FLOW RESISTANCE, PORT 2 OPEN ( CTRL=0) [0 . 001/ (KG

0.400000E-02 LEAKAGE PARAMETER (DIMENSIONLESS)

10.0000 ACTUATOR TIME CONSTANT (SEC)

0.100000 HYSTERESIS PARAMETER (DIMENSIONLESS)

0.000000 PORTS 1,2 MODE: 0=>LIN/LIN, 1=>EXP/LIN, ELSE=>EXP/EXP

UNIT 5 TYPE 2 CONDUIT (DUCT OR PIPE)

1 INPUTS

:

FLOW 3

- PRESSURE 6

- TEMPERATURE 8

- TEMPERATURE 9 - TEMPERATURE 10 -

FLUID MASS FLOW RATE

OUTLET PRESSURE

FLUID INLET TEMPERATURE

AMBIENT TEMPERATURE

OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

2 OUTPUTS:

TEMPERATURE 10 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

PRESSURE 5 - INLET PRESSURE

3 PARAMETERS:

38.0000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.440000E-01 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

32.2000 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

0.355000E-01 VOLUME (M3)

144
66 .4400

0.000000

2.00000

FLOW RESISTANCE [0.001/ (KG M)]

HEIGHT OF OUTLET ABOVE INLET (M)

MODE: 2=WATER, 1=AIR, NEG. =DETAILED, POS.=SIMPLE DYNAMI

UNIT 6 TYPE

TEMPERATURE SENSOR

7

1 INPUTS:

TEMPERATURE

CONTROL

5 - INPUT TEMPERATURE

3 - SENSOR OUTPUT (MODIFIED BY GAIN AND OFFSET)

2 OUTPUTS:

CONTROL 3 - SENSOR OUTPUT (MODIFIED BY GAIN AND OFFSET)

3 PARAMETERS

:

20.0000

0.000000

100.000

SENSOR TIME CONSTANT (SEC)

TEMPERATURE OFFSET (C)

TEMPERATURE GAIN (C)

UNIT 7 TYPE 8

PROPORTIONAL- INTEGRAL CONTROLLER

1 INPUTS:

CONTROL

CONTROL

CONTROL

CONTROL

3 - CONTROLLED VARIABLE

4 - SET POINT FOR CONTROLLED VARIABLE

5 - INTEGRAL PORTION OF CTRL SIGNAL (SAME AS 1ST OUTPUT

6 - OUTPUT CONTROL SIGNAL (SAME AS SECOND OUTPUT)

2 OUTPUTS:

CONTROL

CONTROL

5 - INTEGRAL PORTION OF CONTROL SIGNAL

6 - OUTPUT CONTROL SIGNAL

3 PARAMETERS:

6.00000

0 . 800000E2.00000

PROPORTIONAL GAIN (DIMENSIONLESS)

01 INTEGRAL GAIN (DIMENSIONLESS)

CONTROLLER TIME CONSTANT (SEC)

UNIT 8 TYPE 12

COOLING OR DEHUMIDIFYING COIL

1 INPUTS:

FLOW

TEMPERATURE

FLOW

TEMPERATURE

ABS. HUMIDITY

TEMPERATURE

TEMPERATURE

ABS. HUMIDITY

1 - WATER MASS FLOW RATE

2 - INLET WATER TEMPERATURE

4 - DRY AIR MASS FLOW RATE

4 - INLET DRY BULB AIR TEMPERATURE

1 - INLET AIR HUMIDITY RATIO

3 - OUTLET WATER TEMPERATURE (SAME AS FIRST OUTPUT)

5 - OUTLET AIR TEMPERATURE (SAME AS SECOND OUTPUT)

2 - OUTLET AIR HUMIDITY RATIO (SAME AS THIRD OUTPUT)

145
2 OUTPUTS

:

TEMPERATURE 3 - OUTLET WATER TEMPERATURE

TEMPERATURE 5 - OUTLET AIR DRY BULB TEMPERATURE

ABS. HUMIDITY 2 - OUTLET AIR HUMIDITY RATIO

POWER 1 - TOTAL COOLING LOAD

POWER 2 - SENSIBLE COOLING LOAD

CONTROL 7 - WET FRACTION OF COIL SURFACE AREA

PARAMETERS:

0.000000 COIL TYPE: 0=FLAT CONTINUOUS FINS, 1=CIRCULAR FINS

6.23810 PRIMARY (TUBE EXTERIOR) SURFACE AREA (M2)

101.715 SECONDARY (FIN) SURFACE AREA (M2)

6.20000 INTERNAL SURFACE AREA (M2)

0.416000 RATIO OF MINIMUM AIR FLOW AREA TO FACE AREA ( - ) 0.204000 FIN MATERIAL THERMAL CONDUCTIVITY [KW/(M K)]

0.722600 COIL FACE AREA (M2)

5.51180 NUMBER OF FINS PER CENTIMETER

16.0000 NUMBER OF TUBES PER ROW

6.00000 NUMBER OF ROWS

0.158800E-01 OUTSIDE TUBE DIAMETER (M)

0.144500E-01 INSIDE TUBE DIAMETER (M)

0.150000E-03 FIN THICKNESS (M)

34.6690 THERMAL CAPACITANCE (MASS X SPECIFIC HEAT) OF COIL (KJ/

0.259000E-01 TUBE ROW SPACING IN AIR FLOW DIRECTION (M)

0.508000 FIN DIAMETER [IF PAR(1)=1] OR LENGTH [IF PAR(1)=0] (M)

0.165100 COIL DEPTH IN AIR FLOW DIRECTION (M)

0.386000 TUBE THERMAL CONDUCTIVITY [KW/(M K)]

UNIT 9 TYPE 26

CONTROL SIGNAL INVERTER

1 INPUTS:

CONTROL 6 - INPUT CONTROL SIGNAL

2 OUTPUTS

:

CONTROL 1 - OUTPUT CONTROL SIGNAL

3 PARAMETERS

:

UNIT 10 TYPE 1 FAN OR PUMP

1 INPUTS:

FLOW 4 -MASS FLOW RATE OF FLUID

PRESSURE 8 - OUTLET PRESSURE

RVPS 1 - FAN OR PUMP ROTATIONAL SPEED

TEMPERATURE 11 - INLET FLUID TEMPERATURE

2 OUTPUTS:

146
PRESSURE 7 TEMPERATURE 12

POWER 3

3 PARAMETERS:

3.64000 1ST

0.801000 2ND

-0.190000 3RD

-0.445000E-02 4TH

0.000000 5TH

0.000000 1ST

0.564000 2ND

-0.862000E-01 3RD

0.000000 4TH

0.000000 5TH

0.319200 DIA]

1.00000 mod:

- INLET PRESSURE

- OUTLET FLUID TEMPERATURE

- POWER CONSUMPTION

PRESSURE COEFFICIENT

PRESSURE COEFFICIENT

PRESSURE COEFFICIENT

PRESSURE COEFFICIENT

PRESSURE COEFFICIENT

EFFICIENCY COEFFICIENT

EFFICIENCY COEFFICIENT

EFFICIENCY COEFFICIENT

EFFICIENCY COEFFICIENT

EFFICIENCY COEFFICIENT

IE TER (M)

I: AIR=1, WATER=2

UNIT 11 TYPE 2

CONDUIT (DUCT OR PIPE)

1

2

INPUTS:

FLOW

PRESSURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

4 - FLUID MASS FLOW RATE

9 - OUTLET PRESSURE

12 - FLUID INLET TEMPERATURE

12 - AMBIENT TEMPERATURE

12 - OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

OUTPUTS

:

TEMPERATURE 0 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

PRESSURE 8 - INLET PRESSURE

3 PARAMETERS:

0.000000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.000000 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.000000 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

0.000000 VOLUME (M3)

0.100000E-01 FLOW RESISTANCE [0.001/ (KG M)]

0.000000 HEIGHT OF OUTLET ABOVE INLET (M)

1.00000 MODE: 2=WATER* 1=AIR, NEG. =DETAILED, POS.=SIMPLE DYNAMI

UNIT 1 2 TYPE 6

FLOW SPLIT

1 INPUTS:

FLOW 4

- INLET MASS FLOW RATE

PRESSURE 10 - OUTLET PRESSURE 1 PRESSURE 11 - OUTLET PRESSURE 2

2 OUTPUTS:

147
FLOW 0

- OUTLET MASS FLOW RATE 1 FLOW 6

- OUTLET MASS FLOW RATE 2

PRESSURE 9

- INLET PRESSURE

3 PARAMETERS:

0.110000E-01 FLOW :RESISTANCE [0.001/(KG M)]

UNIT 13 TYPE 5 DAMPER OR VALVE

1 INPUTS:

FLOW 5

- FLUID MASS FLOW RATE

PRESSURE 12 - OUTLET PRESSURE

CONTROL 8

- CONTROL: RELATIVE POSITION OF DAMPER OR VALVE ( -

2 OUTPUTS:

PRESSURE 10 - INLET PRESSURE

3 PARAMETERS

:

0.100000E-02 FLOW RESISTANCE, DAMPER OR VALVE OPEN [0.001/ (KG M)]

0.120000E-01 LEAKAGE PARAMETER (DIMENSIONLESS)

0.870000 CHARACTERISTIC: 0=>EXP., 1=>LIN., INTERMEDIATE=>INTERME

0.000000 MODE: 0=>CLOSED WHEN CONTROL=0; 1=>CL0SED WHEN CONTROL=

UNIT 14 TYPE 5 DAMPER OR VALVE

1 INPUTS:

FLOW 6

- FLUID MASS FLOW RATE

PRESSURE 13 - OUTLET PRESSURE

CONTROL 8

- CONTROL: RELATIVE POSITION OF DAMPER OR VALVE ( -

2 OUTPUTS:

PRESSURE 11 - INLET PRESSURE

3 PARAMETERS

:

0.100000E-02 FLOW RESISTANCE, DAMPER OR VALVE OPEN [0.001/ (KG M)

]

0.120000E-01 LEAKAGE PARAMETER (DIMENSIONLESS)

0.870000 CHARACTERISTIC: 0=>EXP. , 1=>LIN., INTERMEDIATE=>INTERME

1 .00000 MODE: 0 = >CLOSED WHEN CONTROLS; 1=>CL0SED WHEN CONTROL=

UNIT 15 TYPE 4

FLOW MERGE

1 INPUTS:

FLOW 6

- INLET MASS FLOW RATE 1 FLOW 5

- INLET MASS FLOW RATE 2 PRESSURE 15 - OUTLET PRESSURE

TEMPERATURE 12 - INLET TEMPERATURE 1

- )

- )

148
TEMPERATURE 13 - INLET TEMPERATURE 2

2 OUTPUTS:

FLOW

PRESSURE

PRESSURE

TEMPERATURE

3 PARAMETERS:

0.110000E-01 FLOW RESISTANCE [0.001/(KG M)]

4 - OUTLET MASS FLOW RATE

13 - INLET PRESSURE 1 14 - INLET PRESSURE 2

4 - OUTLET TEMPERATURE

UNIT 16 TYPE 5 DAMPER OR VALVE

1

2

3

INPUTS:

FLOW 5 - FLUID MASS FLOW RATE

PRESSURE 14 - OUTLET PRESSURE

CONTROL 8 - CONTROL: RELATIVE POSITION OF DAMPER OR VALVE ( - )

OUTPUTS:

PRESSURE 16 - INLET PRESSURE

PARAMETERS

:

0.100000E-02 FLOW RESISTANCE, DAMPER OR VALVE OPEN [0.001/ (KG M)

]

0.120000E-01 LEAKAGE PARAMETER (DIMENSIONLESS)

0.870000 CHARACTERISTIC: 0=>EXP., 1 = >LIN., INTERMEDIATED INTERME

0.000000 MODE: 0=>CLOSED WHEN CONTROL=0; 1=>CL0SED WHEN CONTROL^

UNIT 17 TYPE 3

INLET CONDUIT (DUCT OR PIPE)

1 INPUTS:

PRESSURE 12 - PRESSURE 16 - TEMPERATURE 13 - TEMPERATURE 13 - TEMPERATURE 13 -INLET FLUID PRESSURE

OUTLET FLUID PRESSURE

INLET FLUID TEMPERATURE

AMBIENT AIR TEMPERATURE

OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

2 OUTPUTS

:

TEMPERATURE

FLOW

0 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

5 - FLUID MASS FLOW RATE

3

0

PARAMETERS:

0.000000

0.000000

0.000000

0.000000

0.100000E-02

0.000000

1 .00000

INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

VOLUME (M3)

FLOW RESISTANCE [0.001/ (KG M)]

HEIGHT OF OUTLET ABOVE INLET (M)

MODE: 2=WATER, 1=AIR, NEG . = DETAILED , POS.= SIMPLE DYNAMI

149
UNIT 18 TYPE 5 DAMPER OR VALVE

1 INPUTS:

FLOW

PRESSURE

CONTROL

4 - FLUID MASS FLOW RATE

17 - OUTLET PRESSURE

9 - CONTROL: RELATIVE POSITION OF DAMPER OR VALVE ( -

2 OUTPUTS:

PRESSURE 15 - INLET PRESSURE

3 PARAMETERS

:

0.400000E-01 FLOW RESISTANCE, DAMPER OR VALVE OPEN [0.001/ (KG M)

]

0.400000E-04 LEAKAGE PARAMETER (DIMENSIONLESS)

1 .00000 CHARACTERISTIC: 0=>EXP., 1=>LIN., INTERMEDIATE11 >INTERME

0.000000 MODE: 0=>CLOSED WHEN CONTROL=0; 1=>CL0SED WHEN CONTROL=

UNIT 19 TYPE 5 DAMPER OR VALVE

1 INPUTS

:

FLOW

PRESSURE

CONTROL

4 - FLUID MASS FLOW RATE

18 - OUTLET PRESSURE

9 - CONTROL: RELATIVE POSITION OF DAMPER OR VALVE ( -

2 OUTPUTS:

PRESSURE 17 - INLET PRESSURE

3 PARAMETERS

:

0 .1 20000E-01 FLOW RESISTANCE, DAMPER OR VALVE OPEN [0.001/(KG M)]

0.120000E-04 LEAKAGE PARAMETER (DIMENSIONLESS)

1.00000 CHARACTERISTIC: 0=>EXP., 1=>LIN., INTERMEDIATE=>INTERME

0.000000 MODE: 0 = >CL0SED WHEN CONTROLS; 1=>CL0SED WHEN CONTROL=

UNIT 20 TYPE 5 DAMPER OR VALVE

1 INPUTS

:

FLOW

PRESSURE

CONTROL

4 - FLUID MASS FLOW RATE

19 - OUTLET PRESSURE

9 - CONTROL: RELATIVE POSITION OF DAMPER OR VALVE ( -

2 OUTPUTS

:

PRESSURE 18 - INLET PRESSURE

3 PARAMETERS

:

0 .1 20000E-01 FLOW RESISTANCE, DAMPER OR VALVE OPEN [0.001/(KG M) ] 0.120000E-04 LEAKAGE PARAMETER (DIMENSIONLESS)
1.00000

0.000000

CHARACTERISTIC: 0=>EXP. . 1=>LIN. , INTERMEDIATE=>INTERME

MODE: 0=>CLOSED WHEN CONTROL=0; 1=>CL0SED WHEN CONTROL=

UNIT 21 TYPE 1 FAN OR PUMP

1 INPUTS

:

FLOW 4 -MASS FLOW RATE OF FLUID

PRESSURE 20 - OUTLET PRESSURE

RVPS 2 - FAN OR PUMP ROTATIONAL SPEED

TEMPERATURE 5 - INLET FLUID TEMPERATURE

2 OUTPUTS:

PRESSURE 19 - INLET PRESSURE

TEMPERATURE 14 - OUTLET FLUID TEMPERATURE

POWER 4 - POWER CONSUMPTION

3 PARAMETERS

:

3.64000 1ST PRESSURE COEFFICIENT

0.801000 2ND PRESSURE COEFFICIENT

-0.190000 3RD PRESSURE COEFFICIENT

-0.445000E-•02 4TH PRESSURE COEFFICIENT

0.000000 5TH PRESSURE COEFFICIENT

0.000000 1ST EFFICIENCY COEFFICIENT

0.564000 2ND EFFICIENCY COEFFICIENT

-0.862000E-01 3RD EFFICIENCY COEFFICIENT

0.000000 4TH EFFICIENCY COEFFICIENT

0.000000 5TH EFFICIENCY COEFFICIENT

0.319200 DIAMETER (M)

1.00000 MODE: AIR=1, WATER=2

UNIT 22 TYPE 2 CONDUIT (DUCT OR PIPE)

1 INPUTS:

FLOW 4

- FLUID MASS FLOW RATE

PRESSURE 21 - OUTLET PRESSURE

TEMPERATURE 14 - FLUID INLET TEMPERATURE

TEMPERATURE 9

- AMBIENT TEMPERATURE

TEMPERATURE 15 - OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

2 OUTPUTS

:

TEMPERATURE 15 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

PRESSURE 20 - INLET PRESSURE

3 PARAMETERS:

1.00000

0.250000

220.000

7.75000

INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

VOLUME (M3)

151
0 .600000E-01 FLOW RESISTANCE [0.001/(KG M)]

0.000000 HEIGHT OF OUTLET ABOVE INLET (M)

1.00000 MODE: 2=WATER, i=AIR, NEG.=DETAILED, POS.=SIMPLE DYNAMI

UNIT 23 TYPE 15

ROOM MODEL

1 INPUTS

:

FLOW

TEMPERATURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

POWER

POWER

4 - MASS FLOW RATE OF VENTILATION AIR

15 - VENTILATION AIR INLET TEMPERATURE

16 - TEMP., FULLY MIXED PART OF AIR MASS [SAME AS OUT(l)

17 - WALL MASS TEMPERATURE (SAME AS SECOND OUTPUT)

18 - INTERIOR MASS TEMPERATURE (SAME AS THIRD OUTPUT)

19 - SPATIAL AVG. TEMP., PISTON FLOW AIR MASS (OUTPUT 4)

5 - CONDUCTION HEAT FLOW INTO WALL MASS

6 - HEAT FLOW DUE TO INTERNAL GAINS

2 OUTPUTS

:

TEMPERATURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

16 - TEMPERATURE OF FULLY MIXED PORTION OF AIR MASS

17 - WALL MASS TEMPERATURE

18 - INTERIOR MASS TEMPERATURE

19 - SPATIAL AVG. TEMP., PISTON FLOW PORTION OF AIR MASS

20 - AVERAGE ROOM AIR TEMPERATURE

21 - EXHAUST AIR TEMPERATURE

3 PARAMETERS:

1440.00 VOLUME OF ROOM AIR MASS (M3)

40000.0 THERMAL CAPACITANCE OF WALLS (KJ/C)

4000.00 THERMAL CAPACITANCE OF INTERIOR MASS (KJ/C)

1.00000 HEAT TRANSFER COEFF. TIMES AREA FOR WALL MASS (KW/C)

0.200000 HEAT TRANSFER COEFF. TIMES AREA FOR INTERIOR MASS (KW/C

0.900000 FRACTION OF AIR MASS WHICH IS FULLY MIXED

UNIT 24 TYPE 2 CONDUIT (DUCT OR PIPE)

1 INPUTS

:

FLOW

PRESSURE

TEMPERATURE

TEMPERATURE

TEMPERATURE

4 - FLUID MASS FLOW RATE

7 - OUTLET PRESSURE

21 - FLUID INLET TEMPERATURE

9 - AMBIENT TEMPERATURE

11 - OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT)

2 OUTPUTS

:

TEMPERATURE 11 - OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT)

PRESSURE 21 - INLET PRESSURE

3 PARAMETERS:

1.00000 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

0.250000 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

152
220.000 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

7.75000 VOLUME (M3)

0.600000E-01 FLOW RESISTANCE [0.001/ (KG M)]

0.000000 HEIGHT OF OUTLET ABOVE INLET (M)

1.00000 MODE: 2=WATER, 1=AIR, NEG.=DETAILED, POS. = SIMPLE DYNAMI

Initial Variable Values:

PRESSURE 1 -> PRESSURE 2 -> PRESSURE 3 -> PRESSURE 4 -> PRESSURE 5 -> PRESSURE 6 -> PRESSURE 7 -> PRESSURE 8 -> PRESSURE 9 -> PRESSURE 10 -> PRESSURE 11 -> PRESSURE 12 -> PRESSURE 13 -> PRESSURE 14 -> PRESSURE 15 -> PRESSURE 16 -> PRESSURE 17 -> PRESSURE 18 -> PRESSURE 19 -> PRESSURE 20 -> PRESSURE 21 -> FLOW 1 -> FLOW 2 -> FLOW 3 -> FLOW 4 -> FLOW 5 -> FLOW 6 -> TEMPERATURE 1 -> TEMPERATURE 2 -> TEMPERATURE 3 -> TEMPERATURE 4 -> TEMPERATURE 5 -> TEMPERATURE 6 -> TEMPERATURE 7 -> TEMPERATURE 8 -> TEMPERATURE 9 -> TEMPERATURE 10 -> TEMPERATURE 11 -> TEMPERATURE 12 -> TEMPERATURE 13 -> TEMPERATURE 14 -> TEMPERATURE 15 -> TEMPERATURE 16 -> TEMPERATURE 17 ->

250.000 (KPa)

227.600 (KPa)

212.100 (KPa)

222.600 (KPa)

210.400 (KPa)

-250.000 (KPa)

0.399000 (KPa)

0.902000E-01(KPa)

0 .444000E-01 (KPa)

0.176000E-01(KPa)

0.508000E-02(KPa)

0.000000 (KPa)

-0.537000E-02(KPa)

-0.179000E-01(KPa)

-0 .447000E-01 (KPa)

-0.288000E-03(KPa)

-0.228000 (KPa)

-0.283000 (KPa)

-0.338000 (KPa)

0.151000 (KPa)

-0.124000 (KPa)

1.14200 (Kg/s)

1.49100 (Kg/s)

2.63300 (Kg/s)

2.14000 (Kg/s)

0.536000 (Kg/s)

1.60000 (Kg/s)

5.00000 (c)

5.01300 (C)

16.7900 (c)

32.0000 (C)

20.0000 (c)

16.8000 (c)

5.00000 (c)

10.1200 (c)

25.0000 (c)

10.1800 (c)

27.0000 (c)

28.0000 (c)

25.0000 (c)

22.0000 (C)

20.0000 (c)

20.0000 (c)

20.0000 (C)

153
TEMPERATURE 18 -> 20.0000 (C)

TEMPERATURE 19 -> 20.0000 (C)

TEMPERATURE 20 -> 20.0000 (c)

TEMPERATURE 21 -> 20.0000 (c)

CONTROL 1 -> 0.428000 (DIMENSIONLESS)

CONTROL 2 -> 0.428000 (DIMENSIONLESS)

CONTROL 3 -> 0.220000 (DIMENSIONLESS)

CONTROL 4 -> 0.180000 (DIMENSIONLESS)

CONTROL 5 -> 0.572000 (DIMENSIONLESS)

CONTROL 6 -> 0.572000 (DIMENSIONLESS)

CONTROL 7 -> 1.00000 (DIMENSIONLESS)

CONTROL 8 -> 0.3 20000 (DIMENSIONLESS)

CONTROL 9 -> 1.00000 (DIMENSIONLESS)

CONTROL 10 -> 0.000000 (DIMENSIONLESS)

RVPS 1 -> 30.0000 (Rev/S)

RVPS 2 -> 30.0000 (Rev/S)

POWER 1 -> 56.3000 (kW)

POWER 2 -> 24.0000 (kW)

POWER 3 -> 9.20000 (kW)

POWER 4 -> 9.20000 (kW)

POWER 5 -> 3.00000 (kW)

POWER 6 -> 0.000000 (kW)

ABS. HUMIDITY 1 -> 0 ,150000E-01(Kg(water)/Kg(a

ABS. HUMIDITY 2 -> 0 .500000E-02(Kg(water)/Kg(a

Simulation Error Tolerances:

1 RTOLX= 0.500000E-02 ATOLX= 0.100000E-05

XTOL= 0.500000E-03 TTIME= 10.0000

SUPERBLOCK 1 2 FREEZE OPTION 2 SCAN OPTION 0

The following are Boundary Variables in the simulation:

The following are the reported variables:

SUPERBLOCK 1 REPORTING INTERVAL 900.000

PRESSURE 16

FLOW 1 FLOW 4

TEMPERATURE 4

TEMPERATURE 5 TEMPERATURE 17

TEMPERATURE 20

TEMPERATURE 21

CONTROL 1

0

CONTROL 1 CONTROL 3

CONTROL 7 ABS. HUMIDITY 2
Listing 6.6-2. Boundary Variable File: time, T13, and Q5

0 25.00 3.00

3600 25.20 3.30

7200 25.70 4.05

10800 26.60 5.40

14400 27.90 7 .35

18000 29.40 9.60

21600 31.10 12.15

25200 32.70 14.55

28800 33.90 16.35

32400 34.70 17.55

33120 34.77 17 .66

33840 34.84 17.77

34560 34.90 17.85

35280 34.93 17.90

36000 35.00 18.00

39600 34.70 17.55

41400 34.45 17.17

41760 34.38 17.07

42120 34.30 16.95

43200 34.00 16.50

46800 32.90 14.85

50400 31.60 12.90

54000 30.30 10.95

57600 29.20 9.30

61200 28.20 7.80

64800 27.40 6.60

68400 26.80 5.70

72000 26.30 4.95

75600 25.80 4.20

79200 25.40 3.60

82800 25.10 3.15

86400 25.00 3.00

90000 25.20 3.30

93600 25.70 4.05

97200 26.60 5.40

155
0UNDRRY

VARIABLES T13

AND

156
EXRM

PLE

<r H

O

CM H H 8

a

a

a

a

ina

R

P

a

a

a

ta

an

Q

>3 c u

a

in LU

tn

*—4 —

a

a

a

r*1 _

Qa t—9 a

>n

a

a

c

! M

n

a

a

a

01m

a co m

0)

CM (0 id in ct on pj -* N N N 0-1 CM CM CM CM

3 y n 1 y y ] d w ] 1

a

<SI O' CO

OD

157

Figure

6.6-3.

Example

6:

Temperature

response
EXAM

PLE

ID

a

a CD a

to Z

q

a

u

n u

a

U1 U

cn a

a

a

§

!

a

<n i—

a

a

<N

a

a

a

a

a <D U3 rp <\J O caa

iD

a

’Va

01a

(3) 3yniyy3dW3i

OJ

158

Figure

6.6-4.

Example

6:

Control

signal

respons
7. REFERENCES

1. Clark, Daniel R. HVACSIM* Building Systems and Equipment Simulation

Program Reference Manual. National Bureau of Standards, NBSIR 84-2996,

January 1985 (110 pages).

2. Park, Cheol; Clark, Daniel R.; Kelly, George E. HVACSIM* Building Systems

£Hd Equipment Simulation Program; Building Loads Cfl.l .CuJ-a.t; j-fln* National

Bureau of Standards, NBSIR, 1985.

3. Clark, Daniel R.; Borresen, Bent A. ’’Dynamics of a Heating Coil Control

Loop.* Proceedings, Symposium on the Performance of HVAC Systems and

Controls in Buildings. Building Research Establishment, Garston, England,

1984.

1 59
APPENDIX

The following pages provide a summary of the component models supplied with

HVACSIM. Brief definitions of each input, output, and parameter are given.

The user may need to refer to references [1] and [2] for more detailed descriptions and mathematical definitions.

In the process of setting up simulations, it may be helpful to copy these

pages and use them as worksheets. For this reason, only one TYPE component is

described on each page, and space has been allowed for filling in unit numbers, input and output index numbers, and parameter values.

The component models summarized in this Appendix are as follows:

TYPE 1 FAN OR PUMP

TYPE 2 CONDUIT (DUCT OR PIPE)

TYPE 3 INLET CONDUIT (DUCT OR PIPE)

TYPE 4 FLOW MERGE

TYPE 5 DAMPER OR VALVE

TYPE 6 FLOW SPLIT

TYPE 7 TEMPERATURE SENSOR

TYPE 8 PROPORTIONAL- INTEGRAL CONTROLLER

TYPE 9 LINEAR VALVE WITH PNEUMATIC ACTUATOR

TYPE 10 HOT WATER COIL MODEL

TYPE 11 HOT WATER TO AIR HEATING COIL

TYPE 12 COOLING OR DEHUMIDIFYING COIL

TYPE 13 THREE-WAY VALVE MODEL

TYPE 14 EVAPORATIVE HUMIDIFIER

TYPE 15 ROOM MODEL

TYPE 16 STICKY PROPORTIONAL CONTROLLER (FOR USE BETWEEN SUPERBLOCKS)

TYPE 17 MIXING DAMPERS AND MERGE

TYPE 18 PLENUM

TYPE 19 FLOW BALANCE CONTROL

TYPE 20 HIGH/LOW LIMIT CONTROLLER

TYPE 21 CLAMPED SPLIT

TYPE 22 STEAM SPRAY HUMIDIFIER

TYPE 23 STEAM NOZZLE

TYPE 24 IDEAL GAS NOZZLE

TYPE 25 STEAM TO AIR HEATING COIL

TYPE 26 CONTROL SIGNAL INVERTER

Types 1-26 are described more fully in reference [1]. Types 27-29 are late

additions to the program, described only in this appendix. Types 50-53 are

discussed in reference [2].

160
***************'**•*'********•*'*'*

TYPE 1 FAN OR PUMP UNIT =

INPUTS:

MASS FLOW RATE OF FLUID (KG/S) M

OUTLET PRESSURE (KPA) P

FAN OR PUMP ROTATIONAL SPEED (REV/S) N

INLET FLUID TEMPERATURE (C) T

OUTPUTS:

INLET PRESSURE (KPA)

OUTLET FLUID TEMPERATURE (C)

POWER CONSUMPTION (KW)

PARAMETERS

:

1 1ST PRESSURE COEFFICIENT —

2 2ND PRESSURE COEFFICIENT

3 3RD PRESSURE COEFFICIENT

4 4TH PRESSURE COEFFICIENT

5 5TH PRESSURE COEFFICIENT

6 1ST EFFICIENCY COEFFICIENT7 2ND EFFICIENCY COEFFICIENT—

8 3RD EFFICIENCY COEFFICIENT-'

9 4TH EFFICIENCY COEFFICIENT—

10 5TH EFFICIENCY COEFFICIENT

11 DIAMETER (M)

12 MODE: AIR=1 , WATER=2

161

P-i H

W
*************************************************************

TYPE 2 CONDUIT (DUCT OR PIPE) UNIT=

INPUTS:

FLUID MASS FLOW RATE (KG/S) — M

OUTLET PRESSURE (KPA) P

FLUID INLET TEMPERATURE (C) — T

AMBIENT TEMPERATURE (C) T

OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT) (C) -T

OUTPUTS

:

OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT) (C)

INLET PRESSURE (KPA)

PARAMETRS:

1 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)--

2 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)-

3 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C) —

4 VOLUME (M3)

5 FLOW RESISTANCE [0.001/ (KG M)]

6 HEIGHT OF OUTLET ABOVE INLET (M) —

7 MODE: 2=WATER, 1=AIR, NEG . =DETAILED , POS.= SIMPLE DYNAMICS

162

H

PM
TYPE 3 INLET CONDUIT (DUCT OR PIPE) UNIT=

INPUTS:

INLET FLUID PRESSURE (KPA) P

OUTLET FLUID PRESSURE (KPA) - - P

INLET FLUID TEMPERATURE (C) — T

AMBIENT AIR TEMPERATURE (C) T

OUTLET FLUID TEMPERATURE (SAME AS FIRST OUTPUT) (C) T

OUTPUTS:

OUTLET FLUID TEMPERATURE (SAME AS FIFTH INPUT) (C) T

FLUID MASS FLOW RATE (KG/S) - -M

PARAMETERS:

1 INSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C)

2 OUTSIDE HEAT TRANSFER COEFFICIENT X AREA (KW/C) —

3 THERMAL CAPACITANCE OF CONDUIT MATERIAL (KJ/C)

4 VOLUME (M3) - - —

5 FLOW RESISTANCE [0.001/ (KG M)]

6 HEIGHT OF OUTLET ABOVE INLET (M)--

7 MODE: 2=WATER, 1=AIR, NEG.=DETAILED, POS.=SIMPLE DYNAMICS --

163
a**

TYPE 4 FLOW MERGE UNIT=

INPUTS

:

INLET MASS FLOW RATE 1 (KG/S) M

INLET MASS FLOW RATE 2 (KG/S) M

OUTLET PRESSURE (KPA) - P

INLET TEMPERATURE 1 (C) T

INLET TEMPERATURE 2 (C) T

OUTPUTS

:

OUTLET MASS FLOW RATE (KG/S) M

INLET PRESSURE 1 (KPA) P

INLET PRESSURE 2 (KPA) — P OUTLET TEMPERATURE (C) T

PARAMETERS:

1 FLOW RESISTANCE [0.001/ (KG M)

]

164
TYPE 5 DAMPER OR VALVE UNIT=

INPUTS:

FLUID MASS FLOW RATE (KG/S)

OUTLET PRESSURE (KPA) —

CONTROL: RELATIVE POSITION OF DAMPER OR VALVE (-)

OUTPUTS

:

INLET PRESSURE (KPA) — P

PARAMETERS

:

1 FLOW RESISTANCE, DAMPER OR VALVE OPEN [0.001/ (KG M)]

2 LEAKAGE PARAMETER (DIMENSIONLESS)

3 CHARACTERISTIC: 0=>EXP., 1=>LIN., INTERMEDIATE=>INTERMED.

4 MODE: 0 = >CLOSED WHEN CONTROL=0; 1=>CL0SED WHEN CONTROLS —

165

o

^s
TYPE 6 FLOW SPLIT UNITINPUTS:

INLET MASS FLOW RATE (KG/S) —

OUTLET PRESSURE 1 (KPA)

OUTLET PRESSURE 2 (KPA)

OUTPUTS

:

OUTLET MASS FLOW RATE 1 (KG/S)

OUTLET MASS FLOW RATE 2 (KG/S)

INLET PRESSURE (KPA) P

PARAMETERS

:

1 FLOW RESISTANCE [0.001/ (KG M)]

166

S

K

^

hdK
*************************************************************

TYPE 7 TEMPERATURE SENSOR UNIT=

INPUTS:

INPUT TEMPERATURE (C)

SENSOR OUTPUT (MODIFIED BY GAIN AND OFFSET) (-)

OUTPUTS:

SENSOR OUTPUT (MODIFIED BY GAIN AND OFFSET) (-) C

PARAMETERS

:

1 SENSOR TIME CONSTANT (SEC)

2 TEMPERATURE OFFSET (C)

3 TEMPERATURE GAIN (C)

167

O

H
a************************************************************

TYPE 8 PROPORTIONAL- INTEGRAL CONTROLLER UNIT=

INPUTS

:

CONTROLLED VARIABLE (-)

SET POINT FOR CONTROLLED VARIABLE (-)

INTEGRAL PORTION OF CTRL SIGNAL (SAME AS 1ST OUTPUT) (-)

OUTPUT CONTROL SIGNAL (SAME AS SECOND OUTPUT) (-)

OUTPUTS

:

INTEGRAL PORTION OF CONTROL SIGNAL (DIMENSIONLESS)

OUTPUT CONTROL SIGNAL (DIMENSIONLESS)

PARAMETERS:

1 PROPORTIONAL GAIN (DIMENSIONLESS)

2 INTEGRAL GAIN (DIMENSIONLESS)

3 CONTROLLER TIME CONSTANT (SEC)

168

on

o

o

o

o
********************************************************

TYPE 9 LINEAR VALVE WITH PNEUMATIC ACTUATOR UNIT=

INPUTS:

OUTLET WATER PRESSURE (KPA)

WATER MASS FLOW RATE (KG/S)

CONTROL VARIABLE FROM CONTROLLER (DIMENSIONLESS) C

ACTUATOR RELATIVE POSITION (SAME AS FIRST OUTPUT) (-) —

C

OUTPUTS:

ACTUATOR RELATIVE POSITION (DIMENSIONLESS) C

INLET WATER PRESSURE (KPA) P

VALVE STEM RELATIVE POSITION (DIMENSIONLESS) C

PARAMETERS

:

1 FLOW RESISTANCE [0.001/ (KG M) ] 2 ACTUATOR TIME CONSTANT (SEC)

3 LEAKAGE PARAMETER (DIMENSIONLESS)

4 HYSTERESIS PARAMETER (DIMENSIONLESS)

169

PM X
a***********************************************************

TYPE 10 HOT WATER COIL MODEL UNIT=

INPUTS:

OUTLET AIR PRESSURE (KPA) P

AIR MASS FLOW RATE (KG/S) M

INLET AIR TEMPERATURE (C) - - -T

OUTLET AIR TEMPERATURE (SAME AS FIRST OUTPUT) (C) T

OUTLET WATER PRESSURE (KPA) P

WATER MASS FLOW RATE (KG/S) - M

INLET WATER TEMPERATURE (C) —

T

OUTLET WATER TEMPERATURE (SAME AS SECOND OUTPUT) (C) T

OUTPUTS:

OUTLET AIR TEMPERATURE (C) T

OUTLET WATER TEMPERATURE (C) T

INLET AIR PRESSURE (KPA) — P

INLET WATER PRESSURE (KPA) P

PARAMETERS:

1 OVERALL HEAT TRANSFER COEFFICIENT TIMES AREA (KW/C)

2 FLOW RESISTANCE PARAMETER, AIR SIDE [0.001/ (KG M)]

3 FLOW RESISTANCE PARAMETER, WATER SIDE [0.001/ (KG M)]

4 WATER SIDE VOLUME OF COIL (M3) — —

5 CAPACITIVE TERM OF COIL TIME CONSTANT (SEC)

170
TYPE 11 HOT WATER TO AIR HEATING COIL UNIT=

INPUTS:

OUTLET AIR PRESSURE (KPA) P

AIR MASS FLOW RATE (KG/S) —M

INLET AIR TEMPERATURE (C) T

OUTLET AIR TEMPERATURE (SAME AS FIRST OUTPUT) (C) T

OUTLET WATER PRESSURE (KPA) — P

WATER MASS FLOW RATE (KG/S) M

INLET WATER TEMPERATURE (C) — T

OUTLET WATER TEMPERATURE (SAME AS SECOND OUTPUT) (C) T

DUMMY TEMPERATURE (SAME AS THIRD OUTPUT) (C) T

OUTPUTS:

OUTLET AIR TEMPERATURE (C) T

OUTLET WATER TEMPERATURE (C) — T

DUMMY TEMP. (USED INTERNALLY FOR AIR TEMP. DYNAMICS) (C) T

INLET AIR PRESSURE (KPA) P

INLET WATER PRESSURE (KPA) P

PARAMETERS

:

1 COEFFICIENT FOR AIR SIDE HEAT TRANSFER CORRELATION (-)

2 EXPONENT FOR AIR SIDE HEAT TRANSFER CORRELATION (-)

3 COEFFICIENT FOR WATER SIDE HEAT TRANSFER CORRELATION (-)

4 EXPONENT FOR WATER SIDE HEAT TRANSFER CORRELATION (-)

5 AIR FLOW RESISTANCE PARAMETER [0.001/ (KG M) ] 6 WATER FLOW RESISTANCE PARAMETER [0.001/ (KG M)]

7 WATER SIDE VOLUME OF COIL (M3)

8 CAPACITANCE (MASS X SPECIFIC HEAT) OF COIL MATERIAL (KJ/C)-

17 1
a**********************************************************

TYPE 12 COOLING OR DEHUMIDIFYING COIL UNIT=

INPUTS

:

WATER HASS FLOW RATE (KG/S) M

INLET WATER TEMPERATURE (C) - —

T

DRY AIR MASS FLOW RATE (KG/S) - M

INLET DRY BULB AIR TEMPERATURE (C) T

INLET AIR HUMIDITY RATIO (DIMENSIONLESS) —

H

OUTLET WATER TEMPERATURE (SAME AS FIRST OUTPUT) (C) T

OUTLET AIR TEMPERATURE (SAME AS SECOND OUTPUT) (C) T

OUTLET AIR HUMIDITY RATIO (SAME AS THIRD OUTPUT) (-) —

H

OUTPUTS:

OUTLET WATER TEMPERATURE (C) ---T

OUTLET AIR DRY BULB TEMPERATURE (C) T

OUTLET AIR HUMIDITY RATIO (DIMENSIONLESS) H

TOTAL COOLING LOAD (KW) E

SENSIBLE COOLING LOAD (KW) E

WET FRACTION OF COIL SURFACE AREA (DIMENSIONLESS) —

C

PARAMETERS:

1 COIL TYPE: 0=FLAT CONTINUOUS FINS, 1 CIRCULAR FINS—

2 PRIMARY (TUBE EXTERIOR) SURFACE AREA (M2)

3 SECONDARY (FIN) SURFACE AREA (M2)

4 INTERNAL SURFACE AREA (M2) -

5 RATIO OF MINIMUM AIR FLOW AREA TO FACE AREA (-)

6 FIN MATERIAL THERMAL CONDUCTIVITY [KW/(M K)]

7 COIL FACE AREA (M2) - - -

8 NUMBER OF FINS PER CENTIMETER- - —

9 NUMBER OF TUBES PER ROW

10 NUMBER OF ROWS —

11 OUTSIDE TUBE DIAMETER (M)

12 INSIDE TUBE DIAMETER (M)

13 FIN THICKNESS (M)

14 THERMAL CAPACITANCE (MASS X SPECIFIC HEAT) OF COIL (KJ/K)-

15 TUBE ROW SPACING IN AIR FLOW DIRECTION (M)

16 FIN DIAMETER [IF PAR(1)=1] OR LENGTH [IF PAR(1)=0] (M)

17 COIL DEPTH IN AIR FLOW DIRECTION (M)

18 TUBE THERMAL CONDUCTIVITY [KW/(M K)]

172
it*****

TYPE 13 THREE-WAY VALVE MODEL UNIT=

INPUTS:

INLET MASS FLOW RATE, PORT 1 (OPEN WHEN CONTROL = 1) (KG/S) -M

INLET MASS FLOW RATE, PORT 2 (OPEN WHEN CONTROL = 0) (KG/S) -M

OUTLET PRESSURE (KPA) — - - P

INLET TEMPERATURE, PORT 1 (C) — T

INLET TEMPERATURE, PORT 2 (C) - —

T

CONTROL VARIABLE FROM CONTROLLER (-) - C

ACTUATOR RELATIVE POSITION (SAME AS OUTPUT 1) (-) C

OUTPUTS:

ACTUATOR RELATIVE POSITION (-) - C

OUTLET MASS FLOWRATE (KG/S) — - M

INLET PRESS., PORT 1 (OPEN => CONTROL VARIABLE = 1) (KPA) P

INLET PRESS., PORT 2 (OPEN => CONTROL VARIABLE = 0) (KPA) P

OUTLET TEMPERATURE (C) T

VALVE STEM RELATIVE POSITION (-) —

C

PARAMETERS

:

1 PORT 1 FLOW RESISTANCE, PORT 1 OPEN (CTRL=1 ) [0.001/ (KG M)] - 2 PORT 2 FLOW RESISTANCE, PORT 2 OPEN (CTRL=0)[0.001/(KG M)] -

3 LEAKAGE PARAMETER (DIMENSIONLESS)

4 ACTUATOR TIME CONSTANT (SEC)

5 HYSTERESIS PARAMETER (DIMENSIONLESS)

6 PORTS 1,2 MODE: 0=>LIN/LIN, 1=>EXP/LIN, ELSE=>EXP/EXP

173
I

i

TYPE 14 EVAPORATIVE HUMIDIFIER UNIT=

INPUTS

:

INLET AIR TEMPERATURE (C)

INLET AIR HUMIDITY RATIO (DIMENSIONLESS) —

INLET MOIST AIR MASS FLOW RATE (KG/S)

OUTPUTS:

OUTLET AIR HUMIDITY RATIO (DIMENSIONLESS) - OUTLET AIR TEMPERATURE (C)

OUTLET MOIST AIR MASS FLOW RATE (KG/S)

PARAMETERS

:

1 WATER TO AIR HEAT TRANSFER COEFFICIENT TIMES AREA (C)

174

H

W

S

WHS
TYPE 15 ROOM MODEL UNIT=

INPUTS:

MASS FLOW RATE OF VENTILATION AIR (KG/S) M

VENTILATION AIR INLET TEMPERATURE (C) T

TEMP., FULLY MIXED PART OF AIR MASS [SAME AS OUT(l)] (C) T

WALL MASS TEMPERATURE (SAME AS SECOND OUTPUT) (C) T

INTERIOR MASS TEMPERATURE (SAME AS THIRD OUTPUT) (C) T

SPATIAL AVG. TEMP., PISTON FLOW AIR MASS (OUTPUT 4) (C) T

CONDUCTION HEAT FLOW INTO WALL MASS (KW)~ E

HEAT FLOW DUE TO INTERNAL GAINS (KW)--- E

OUTPUTS

:

TEMPERATURE OF FULLY MIXED PORTION OF AIR MASS (C) T

WALL MASS TEMPERATURE (C) T

INTERIOR MASS TEMPERATURE (C) T

SPATIAL AVG. TEMP., PISTON FLOW PORTION OF AIR MASS (C) T

AVERAGE ROOM AIR TEMPERATURE (C) T

EXHAUST AIR TEMPERATURE (C) T

PARAMETERS:

1 VOLUME OF ROOM AIR MASS (M3)

2 THERMAL CAPACITANCE OF WALLS (KJ/C)

3 THERMAL CAPACITANCE OF INTERIOR MASS (KJ/C)

4 HEAT TRANSFER COEFF. TIMES AREA FOR WALL MASS (KW/C)

5 HEAT TRANSFER COEFF. TIMES AREA FOR INTERIOR MASS (KW/C)- —

6 FRACTION OF AIR MASS WHICH IS FULLY MIXED

175
*************************************************************

TYPE 16 STICKY PROPORTIONAL CONTROLLER UNIT=

(FOR USE BETWEEN SUPERBLOCKS)

INPUTS

:

MEASURED CONTROLLED VARIABLE (DIMENSIONLESS) - C

CONTROLLED VARIABLE SETPOINT (DIMENSIONLESS) C

OUTPUTS:

CONTROLLER OUTPUT SIGNAL (DIMENSIONLESS) C

PARAMETERS

:

1 PROPORTIONAL GAIN (DIMENSIONLESS)

2 ERROR BAND (DIMENSIONLESS)

3 OFFSET (DIMENSIONLESS)

176
TYPE 17 MIXING DAMPERS AND MERGE UNIT=

INPUTS:

PRESSURE, INLET 1 (CTRL = 0 => DAMPER CLOSED) (KPA)

PRESSURE, INLET 2 (CTRL = 0 => DAMPER OPEN) (KPA)

OUTLET PRESSURE (KPA)

TEMPERATURE AT INLET 1 (CTRL = 0 => DAMPER CLOSED) (C)

TEMPERATURE AT INLET 2 (CTRL = 0 => DAMPER OPEN) (C) - INPUT CONTROL SIGNAL: RELATIVE DAMPER POSITION (-)

OUTPUTS:

MASS FLOW RATE, INLET 1 (CTRL = 0 => DAMPER CLOSED) (KG/S)---M

MASS FLOW RATE, INLET 2 (CTRL = 0 => DAMPER OPEN) (KG/S) M

OUTLET MASS FLOW RATE (KG/S) —-

M

OUTLET TEMPERATURE (C) —

T

PARAMETERS:

1 FLOW RESISTANCE WHEN DAMPER IS OPEN [0.001/ (KG M)]

2 LEAKAGE PARAMETER (DIMENSIONLESS)

3 CHARACTERISTIC: 0=>EXP., 1=>LIN., INTERMEDIATE=>INTERMED. --

177

O

H

H

hd

hd

d
TYPE 18 PLENUM UNIT=

INPUTS

:

INLET MASS FLOW RATE 1 (KG/S) M

INLET MASS FLOW RATE 2 (KG/S) - M

INLET MASS FLOW RATE 3 (KG/S) - M

INLET MASS FLOW RATE 4 (KG/S) M

INLET MASS FLOW RATE 5 (KG/S) M

INLET MASS FLOW RATE 6 (KG/S) M

INLET MASS FLOW RATE 7 (KG/S) M

INLET MASS FLOW RATE 8 (KG/S) M

INLET MASS FLOW RATE 9 (KG/S) M

INLET MASS FLOW RATE 10 (KG/S) M

OUTPUTS:

OUTLET MASS FLOWRATE (KG/S) M

PARAMETERS

:

1 NUMBER OF FLOW STREAMS MERGING (DIMENSIONLESS)

178
*************************************************************

TYPE 19 FLOW BALANCE CONTROL UNIT=

INPUTS:

MASS FLOW RATE DETERMINED IN THIS SUPERBLOCK (KG/S) —

PRESSURE WHERE FLOW ENTERS THIS SUPERBLOCK (KPA)

MASS FLOW RATE DETERMINED IN ANOTHER SUPERBLOCK (KG/S)

OUTPUTS:

PRESSURE WHERE FLOW EXITS THIS SUPERBLOCK (KPA) P

PARAMETERS

:

1 INITIAL FLOW RESISTANCE PARAM. AT TIME = 0 [0.001/ (KG M)] —

179

s

cms
*************************************************************

TYPE 20 HIGH/LOW LIMIT CONTROLLER UNIT=

INPUTS : MEASURED TEMPERATURE INPUT CONTROL SIGNAL (-) C

CONTROLLER OUTPUT (SAME AS OUTPUT 1) (-) C

OUTPUTS

:

CONTROLLER OUTPUT (-) ---C

PARAMETERS : 1 PROPORTIONAL GAIN

2 SETPOINT TIMES I. WHERE 1=1 (HIGH LIM.) OR I=-l (LOW L IM . )

180
TTTItTTTITTTTTTTTTTTTTX T ITTT*-**-* ITTTTT*TT XXX XXXXXXXXXX XXX XX XX

TYPE 21 CLAMPED SPLIT UNIT=

INPUTS

:

PRESSURE AT OUTLET 1 (KPA) — ?

PRESSURE AT OUTLET 2 (KPA) - ?

OUTPUTS:

INLET PRESSURE (KPA) - P MASS FLOW RATE, INLET (KG/S) M

MASS FLOW RATE, OUTLET 1 (KG/S)

MASS FLOW RATI, OUTLET 2 (KG/S)

PARAMETERS:

1 PRESSURE AT CENTER NODE OF SPLIT (KPA) —

2 FLOW RESISTANCE PARAMETER C0.001/(IG M)]

181

:<

:<
*************************************************************

TYPE 22 STEAM SPRAY HUMIDIFIER UNIT=

INPUTS

:

STEAM TEMPERATURE (C) - T

INLET AIR TEMPERATURE (C) T

INLET AIR HUMIDITY RATIO (-) H

INLET MOIST AIR FLOW RATE (KG/S) M

STEAM FLOW RATE (KG/S) M

OUTPUTS

:

OUTLET AIR TEMPERATURE (C)

OUTLET MOIST AIR FLOW RATE (KG/S)

OUTLET AIR HUMIDITY RATIO (-)

PARAMETERS

:

1 SATURATION EFFICIENCY (-)

182

H

E

w
TYPE 23 STEAM NOZZLE UNIT=

INPUTS:

ENTERING STEAM TEMPERATURE (C)

STEAM STAGNATION PRESSURE AT ENTRANCE (KPA)

EXIT PRESSURE (KPA)

OUTPUTS:

OUTLET STEAM TEMPERATURE (C) T

MASS FLOW RATE OF STEAM (KG/S) M

PARAMETERS:

1 NOZZLE EXIT CROSS SECTIONAL AREA (M2)

183

H

PM

PL.
*************************************************************

TYPE 24 IDEAL GAS NOZZLE UNIT=

INPUTS:

UPSTREAM STAGNATION PRESSURE (KPA, GAGE)

EXIT PRESSURE (KPA, GAGE)

UPSTREAM TEMPERATURE (C)

OUTPUTS

:

MASS FLOW RATE OF GAS (KG/S) M

EXIT TEMPERATURE (C)- - T

PARAMETERS

:

1 NOZZLE EXIT CROSS SECTIONAL AREA (M2)

2 ABS. PRESSURE CORRESPONDING TO ZERO GAGE PRESSURE (KPA)

3 RATIO OF SPECIFIC HEATS (DIMENSIONLESS)

4 GAS CONSTANT [J/(KG K)]

184

H

T)

H
*************************************************************

TYPE 25 STEAM TO AIR HEATING COIL UNIT=

INPUTS:

STEAM PRESSURE (KPA) — P

INLET STEAM TEMPERATURE (C) - T

INLET AIR TEMPERATURE (C)- —

T

OUTLET AIR TEMPERATURE (FROM OUTPUT 1) (C) - —

T

MASS FLOW RATE OF AIR (KG/S) - M

OUTPUTS:

OUTLET AIR TEMPERATURE (C) T

STEAM OR WATER OUTLET TEMPERATURE (C) T

STEAM AND CONDENSATE MASS FLOW RATE (KG/S) M

RATE OF HEAT TRANSFER TO AIR (KW)--- E

PARAMETERS:

1 DEGREES OF SUB COOLING OF CONDENSATE (C)

2 MINIMUM AIR FLOW AREA (M2) - -

3 TUBE INSIDE SURFACE AREA FOR HEAT TRANSFER (M2)

4 TUBE OUTSIDE SURFACE AREA FOR HEAT TRANSFER (M2)- —

5 FIN SURFACE AREA FOR HEAT TRANSFER (M2)

6 TUBE INSIDE DIAMETER (M)

7 TUBE OUTSIDE DIAMETER (M)

8 TUBE THERMAL CONDUCTIVITY [W/(M K)]

9 FIN DIAMETER (M)

10 FIN MATERIAL THERMAL CONDUCTIVITY [W/(M K)] —

11 FIN THICKNESS (M)

12 NUMBER OF FINS PER METER

13 TOTAL THERMAL CAPACITANCE OF FINS AND TUBES (KJ/C)

185
*************************************************************

TYPE 26 CONTROL SIGNAL INVERTER UNIT=

INPUTS:

INPUT CONTROL SIGNAL (-) C

OUTPUTS:

OUTPUT CONTROL SIGNAL (-) -- - - C

PARAMETERS : NONE

186
** it *****-kick -kick -kick* -k -kick-kit irk -kirk-kit -kick-kick-kickirk irk-kirk -kick irk -kick -kick* -k-k TYPE 27 MOIST AIR FLOW MERGE UNIT=

INPUTS:

INLET MASS FLOW RATE 1 (KG/S) M

INLET MASS FLOW RATE 2 (KG/S) M

OUTLET PRESSURE (KPA) P

INLET TEMPERATURE 1 (C) - T

INLET TEMPERATURE 2 (C) —-T

INLET HUMIDITY RATIO 1 (-) H

INLET HUMIDITY RATIO 2 (-) H

OUTPUTS:

OUTLET MASS FLOW RATE (KG/S) M

INLET PRESSURE 1 (KPA) — P

INLET PRESSURE 2 (KPA) P

OUTLET TEMPERATURE (C) T

OUTLET HUMIDITY RATIO (-) H

PARAMETERS : 1 FLOW RESISTANCE [0.001/ (KG M) ]

187
*************************************************************

TYPE 28 CONSTANT FLOW RESISTANCE UNIT=

INPUTS : FLUID MASS FLOW RATE (KG/S)

OUTLET PRESSURE (KPA)

OUTPUTS : INLET PRESSURE (KPA) P

PARAMETERS

:

1 FLOW RESISTANCE [0.001/ (KG M) ]

188

S
in

i/i

TTT TT XT XXX- XX TXT T X tTTXXTTTTTtXTX-TTTXTXTTTXXTT T TX TXT X 3"! IT :c

5

STAST r_ > 115 IS IAS CE HI7

3FIT'S :

‘-.-A L: i

w 1 - > • _ » 1 ^ _c ‘

- 17 iwt-

: nw ’7 ~iV IS w
*************************************************************

TYPE 50 ZONE ENVELOPE UNIT=

INPUTS:

TIA: Zone air dry-bulb temperature (C) T

QISW: Internal (short wave) radiant gain from lights (kW)--Q

QILW: Internal (longwave) radiant gain (kW) Q

TIS(l): Inner surface temperature (C) T

TIS( 2) : Inner surface temperature (C) T

TIS(3): Inner surface temperature (C)

T

TIS ( 4) : Inner surface temperature (C) T

TIS( 5 ) : Inner surface temperature (C) T

TIS ( 6) : Inner surface temperature (C) T

TIS( 7 ) : Inner surface temperature (C) T

TIS ( 8) : Inner surface temperature (C) T

TIS( 9) : Inner surface temperature (C) T

TIS( 10) tinner surface temperature (C) T

OUTPUTS:

TMR : Mean radiant temperature (C) T

QWALL: Convective heat gain from building surfaces (kW) Q

PARAMETERS:

1 IZN: Identification number of zone

2 NS: Number of surfaces of zone

NOTE: when the number of surfaces is less than 10. an index

of zero may be used for the remaining temperature inputs.

190
a*************************************************

TYPE 51 SURFACE CONSTRUCT UNIT=

INPUTS

:

TIA: Indoor air dry-bulb temperature (C)

TMR : Mean radiant temperature (C)

TOSINF: Outer surface temp, of unexposed wall (C) -- FSHADW: Shaded fraction of exposed outer surface (-)

OUTPUTS:

TIS: Inner surface temperature (C) T

SOLINT: Integrated solar flux incident on surface (W/m2) Q

PARAMETERS:

1 IZN: Identification number of zone

2 ID: Identification number of surface

3 IEXPOS: 0=W/in zone, 1 =betw. zones, 2=exposed to sun (-)

4 ISTR: Identification number of the construct

5 AS: Surface area (m**2)

6 ORIENT: Azimuth angle between normal to surface & south

7 TILT: Slope of surface: flat roof=0» floor=180 (degree)--

8 GRF: Ground reflectivity (-)

9 IROFS: Outer surface roughness index [1,6] (-)

10 ABSOS: Solar absorptance of the outer surface (-)

11 ABSIS: Short wave absorptance of the inner surface (-) --

12 EMITIS: Emissivity of the inner surface (-)

13 TRANSM: Transmittance of the glass window (-)

14 SC: Shading coefficient of the glass window (-)

NOTES: If outer surface is exposed to outside air (IEXP0S=2),

TOSINF may be given an index of zero.

The orientation angle of a west facing surface is 90

degrees, while an east facing surface is 270 degrees.

The surface roughness index, IROFS, is defined as follows

IR0FS=1 = > Stucco

IROFS =2 = > Brick, rough plaster

IROFS =3 = > Concrete

IROFS =4 = > Clear pine

IR0FS=5 = > Smooth plaster

IROFS =6 => Glass, paint on pine

191

O

H

H

H
it****************************************

TYPE 52 ZONE MODEL UNIT=

INPUTS:

PIAG: Gage pressure of zone air (kPa) P

TIA: Zone air dry-bulb temperature (C) T

WIA: Humidity ratio of zone air (-) H

PSAG: Gage pressure of supply air (kPa) P MSA: Mass flow rate of supply air (kg/s) M

TSA: Supply air dry-bulb temperature (C) T

WSA: Humidity ratio of supply air (-) H

QWALL: Convective heat gain from building surfaces (kW) Q

NUMPEP: Number of people (occupant in the zone) C

UTCEQP: Equipment utilization coefficient (-) C

UTCLIT: Lighting utilization coefficient (-) C

OUTPUTS

:

TIA: Zone air dry bulb temperature [diff.eq.] (C) T

WIA: Humidity ratio of zone air (-) [diff.eq.] (-) H

QISW: Internal (short wave) radiant gain from lights (kW)--Q

QILW: Internal (long wave) radiant gain (kW) Q

PARAMETERS:

1 IZN: Identification number of zone

2 CFUR: Effective thermal capacitance of furnishings (kJ/K)-

3 EFFMIA: Air mass multiplier for zone moisture capacitance

4 VOLUME: Volume of zone air (interior space of zone) (m**3)--

5 SAIREX: Infiltration Coef. ( .5=tight,l .=std,l ,5=leaky ) 6 WPEPS: Sensible heat gain from a person (kW)

7 WPEPL: Latent heat gain from a person (kW)

8 WLIT: Heat gain due to lighting in the zone (kW)

9 LIGHT: 1 = Fluorescent, 2 = Incandescent (-)

10 WEQPS: Sensible heat gain due to equipment (kW)

11 WEQPL: Latent heat gain due to equipment (kW)

12 REQP: Radiative to sensible heat from equipment (-)
TYPE 53 WEATHER INPUT UNIT=

INPUTS:

TAMB: Ambient (outdoor) air temperature (C)

HUMRAT : Outdoor air humidity ratio (-)

PBAR: Barometric pressure (kPa)

IDN : Direct normal solar radiation (W/m*m)

ISKY: Diffuse (sky) solar radiation (W/m*m)

IHOR: Total horizontal solar radiation (W/m*m)

OUTPUTS: NONE

PARAMETERS

:

1 Index for ambient temperature (e.g. 5 if TAMB = T5)

2 Index for outdoor air humidity ratio

3 Index for barometric pressure

4 Index for direct normal solar radiation

5 Index for diffuse (sky) solar radiation

6 Index for total horizontal solar radiation

193

H

33

P*

O'

O'

O'
HBS-I14A (rev. 5-80

U.S. DEPT. OF COMM. 1. PUBLICATION OR 2. Performing Organ. Report No. 3. Publication Date BIBLIOGRAPHIC DATA

REPORT NO.

SHEET (See instructions) NBSIR 85-3243 SEPTEMBER 1985

4. TITLE AND SUBTITLE

HVACSIM+ BUILDING SYSTEMS AND EQUIPMENT SIMULATION PROGRAM «r USERS GUIDE

5. AUTHOR(S)

Daniel R. Clark and William B. May, Jr,

6. PERFORMING ORGANIZATION (If joint or other than NBS, see instructions)

NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE

WASHINGTON, D.C. 20234

7. Contract/Grant No.

8 . Type of Report & Period Covered

9. SPONSORING ORGANIZATION NAME AND COMPLETE ADDRESS (Street. City. State. ZIP)

Office of Buildings & Community Systems U.S, Naval Civil Engineering Laboratory

U.S. Department of Energy U.S. Department of Defense

1000 Independence Ave., NW Port Hueneme , CA 93043

Washington, DC 20585

10. SUPPLEMENTARY NOTES

2 Document describes a computer program; SF-185, FIPS Software Summary, is attached.

11. ABSTRACT (A 200-word or less factual summary of most significant information. If document includes a significant

bibliography or literature survey, mention it here) HVACSIM+ is a modular, non-proprietary computer simulation package developed at th

National Bureau of Standards. The package consists of a general-purpose modular simulation program called MODSIM, a library of component models specific to building systems,

and a simulation editor called HVACGEN. The latter is used to facilitate the creation

and modification of simulation descriptions. HVACSIM+ is designed to allow detailed

simulation of entire building systems or portions of such systems. This includes the

heating, ventilating, and air conditioning (HVAC) system, the equipment control system,

the conditioned zones within a building, the building shell, and the dynamic interactions among these subsystems.

This document describes the procedures for installing HVACSIM+ on a particular

computer, for setting up a simulation description using HVACGEN, and for running a simulation using MODSIM. A number of example simulations are included to illustrate

the procedures and to serve as a tutorial in the use of HVACSIM+. A Reference Manual,

published separately, describes the main simulation program and the library of component

models in more detail. A third document, also published separately, describes the

building model supplied with HVACSIM+.

12. KEY WORDS (Six to twelve entries; alphabetical order; capitalize only proper names; and separate key words by semicolon s) building dynamics; building simulation; building system modeling; computer simulation

programs; control dynamics; dynamic modeling of building systems; dynamic performance of

building systems; dynamic simulations; HVAC system simulations: HVACSIM'

13. AVAILABILITY

(22 Unlimited

| | For Official Distribution. Do Not Release to NTIS

1 Order From Superintendent of Documents, U.S. Government Printing Office, Washington, D.C.

20402.

[X~1 Order From National Technical Information Service (NTIS), Springfield, VA. 22161

14. NO. OF

PRINTED PAGES

202

15. Price

USCOMM-DC 8043-P80