ABSTRACT 

HVACSIM+ User’s Guide Update 

Cheol Park 

Building Environment Division 

Building and Fire Research Laboratory 

National Institute of Standards and Technology 

Gaithersburg, MD 20899-8631 

The first version of HVACSIM+

, which stands for “HVAC SIMulation PLUS other systems”, as 

introduced by National Institute of Standards and Technology (NIST) in 1985 as a computer 

simulation tool to simulate entire building systems [1]. Since then, the HVACSIM+ computer 

program package and manuals have been distributed to researchers, students, and consultants in 

more than 40 countries around the world. Since the first distribution of the program to public, a 

number of modifications have been made. 

 

Because some of statements in the Fortran 77 computer code of the HVACSIM+

 used more than 

20 years have become obsolete in the context of today’s Fortran 90/95 standards, an upgrade to 

Fortran 90/95 standards was deemed necessary. This conversion task was recently completed by 

NIST. During the conversion, the logic flows were maintained as close to the original as possible. 

This update manual is a condensed guide to running the programs in the HVACSIM+ package. 

Much of the substance of this manual is extracted directly from the previous manuals. This 

manual is intended to update and supplement the previous manuals, not to replace them. To 

confirm correct operation of the new code and illustrate its use, some of examples of system and 

building shell simulations were chosen from the previous documents. Simulation runs were made 

in the command line interface of a popular operating system in step-by-step manner. The input 

and output information of those runs is listed in this manual. 

Key words: building simulation; building system modeling; computer simulation program; 

HVAC system simulations; HVACSIM+

 
2 

DISCLAIMER 

This program is furnished by the government 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. 
3 

TABLES OF CONTENTS 

ABSTRACT.................................................................................................................................... 1 

DISCLAIMER ................................................................................................................................ 2 

LIST OF FIGURES......................................................................................................................... 4 

LIST OF TABLES .......................................................................................................................... 4 

1. INTRODUCTION ........................................................................................................................ 5 

2. OVERALL STRUCTURE OF HVACSIM+.................................................................................... 5 

2.1 MODSIM .............................................................................................................................. 7 

2.2 HVACGEN......................................................................................................................... 11 

2.3 SLIMCON........................................................................................................................... 13 

2.4 UPD_INFO ......................................................................................................................... 14 

2.5 RDWDF .............................................................................................................................. 14 

2.6 CRWDTA ........................................................................................................................... 14 

2.7 CTFGEN............................................................................................................................. 14 

2.8 SORTSB ............................................................................................................................. 14 

3. GETTING STARTED..................................................................................................................... 15 

3.1 System Requirements.......................................................................................................... 15 

3.2 Installing HVACSIM+ ........................................................................................................ 15 

4. CASE 1: RUNNING PROGRAMS FOR SYSTEM SIMULATION.......................................................... 15 

4.1 Configuration of Simulation Scope .................................................................................... 16 

4.2 Creating Input Data Files................................................................................................... 16 

4.2.1 Simulation work file (hvacsim.sim) ...........................................................................................................16

4.2.2 Model definition file (hvacsim.dfn) ...........................................................................................................26

4.2.3 Boundary data file (hvacsim.bnd) .............................................................................................................29

4.3 Creating a Model Information File ..................................................................................... 30 

4.4 System Simulation using MODSIM ................................................................................... 33 

4.5 Sorting the Simulation Output Data File ............................................................................ 45 

5. CASE 2: RUNNING PROGRAMS FOR A BUILDING SHELL SIMULATION......................................... 51 

5.1 Creating Input Data Files for the Building Shell Simulation............................................. 52 

5.1.1 Conduction transfer function file (hvacsim.ctf).........................................................................................52

5.1.2 Weather data file (hvacsim.met)................................................................................................................58

5.1.3 Simulation work file (onezone.sim) ...........................................................................................................64

5.1.4 Model definition file (onezone.dfn) ...........................................................................................................64

5.1.5 Boundary data file (onezone.bnd) .............................................................................................................64

5.1.6 Model information file (onezone.model) ...................................................................................................64

5.2 Building Shell Simulation using MODSIM........................................................................ 75 

6. USEFUL INFORMATION............................................................................................................... 89 

3⁄4 State variable freezing and block inactivation .................................................................. 89 

3⁄4 Convergence of the equation solver.................................................................................. 89 

3⁄4 Selection of maximum and minimum time step ............................................................... 89 

3⁄4 Error tolerances and integration time interval .................................................................. 89 

3⁄4 Selection of iostat ............................................................................................................. 90 
4 

3⁄4 Selection of options for superblocks................................................................................. 90 

3⁄4 Size of simulation ............................................................................................................. 91 

3⁄4 Blocking superblocks and blocks...................................................................................... 91 

3⁄4 Dealing with differential equations – two different approaches....................................... 91 

3⁄4 Modification of simulation work file using a text editor ................................................. 91 

3⁄4 Editing superblocks........................................................................................................... 92 

3⁄4 Work involved in modification of a component model.................................................... 92 

3⁄4 Real time application ........................................................................................................ 92 

3⁄4 Mixed language................................................................................................................. 93 

3⁄4 Location of state variable array elements........................................................................ 93 

3⁄4 Some equations of the component models of an air-handling unit................................... 93 

7. REFERENCES .............................................................................................................................. 93 

8. APPENDIX: LIST OF SOURCE CODE FILES IN THE HVACSIM+ PROGRAM PACKAGE................ 94 

LIST OF FIGURES 

Figure 1. Flow diagram of programs and data files comprising HVACSIM+. ...................... 6 

Figure 2. Flow diagram of front-end programs and data files for shell modeling...................... 7 

Figure 3. The structure of MODSIM. ......................................................................................... 8 

Figure 4. Hierarchical simulation setup...................................................................................... 9 

Figure 5. Summary of commands used in HVACGEN............................................................ 13 

Figure 6. System schematic diagram of Example 1.................................................................. 15 

Figure 7. Information flow diagram of Example 1................................................................... 16 

Figure 8. The water mass flow rate with respect to actuator and valve stem positions of 

Example 1. ................................................................................................................................ 50 

Figure 9. The inlet and outlet temperatures of water pipe of Example 1.................................. 50 

Figure 10. The single-zone model. ........................................................................................... 51 

Figure 11. Information flow diagram of the single-zone model............................................... 52 

Figure 12. Inner surface temperatures of the single-zone model.............................................. 84 

Figure 13. Outdoor air, zone air, and mean radiant temperatures of the single-zone model.... 84 

Figure 14. Artificially generated solar radiation influxes......................................................... 85 

LIST OF TABLES 

Table 1. Categories of varibles in HVACSIM+. .................................................................. 10 

Table 2. Sturcture of the simulation work file ..................................................................... 12 

 
5 

1. Introduction 

The first version of HVACSIM+, which stands for “HVAC SIMulation PLUS other systems”, 

was introduced by National Institute of Standards and Technology (NIST) in 1985 as a computer 

simulation tool to simulate entire building systems [1]. Since then, the HVACSIM+ computer 

program package and manuals [2-4] have been distributed to researchers, students, and 

consultants in more than 40 countries around the world. Since the first distribution of the 

program to the public, a number of modifications have been made including the addition of the 

component models developed for the American Society of Heating, Refrigerating and AirConditioning Engineers (ASHRAE) 825 project by Norford and Haves [5]. Until now, however, 

no updates have been made to the user’s manual for HVACSIM+

. 

Because some of statements in the Fortran 77 computer code of the HVACSIM+ used more than 

20 years have become obsolete in the context of today’s Fortran 90/95 standards, an upgrade to 

Fortran 90/95 standards was deemed necessary. This conversion task was recently completed by 

NIST by converting all the routines written in Fortran 77 code into Fortran 90. During the 

conversion, the logic flows were maintained as close to the original as possible. One of the frontend programs, HVAGEN, was converted using the program TO_F90 written by Alan Miller [6] 

and then further modifications were performed, while other programs were converted manually. 

This update manual is a condensed guide to running the programs in the HVACSIM+

 Version 

20.0 package. Much of the substance of this manual is extracted directly from the previous 

manuals. This manual is intended to update and supplement the previous manuals, not to replace 

them. Detailed information regarding HVACSIM+ can be found in previous manuals. The names 

of specific programs or procedures are denoted in upper case characters, while the names of files 

and the terms specifically related to HVACSIM+ have been italicized. There are some changes in 

output formats in this version, but the input formats are retained as closely as possible to the 

Fortran 77 version. 

 

To confirm correct operation of the new code and illustrate its use, some of examples of system 

and building shell simulations were chosen from the previous documents. Simulation runs were 

made in the command line interface of a popular operating system in step-by-step manner for a 

user to follow. The input and output information of those runs is listed in this manual. 

 

Note that programs in the HVACSIM+

 package are text-oriented. Any PC or equivalent 

computer systems may be utilized in performing simulations. The HVACSIM+ package is 

distributed containing all the source code files as well as sample input data files. The 

HVACSIM+

 program may be expanded by adding user-developed component models. It is 

highly recommended that users develop their own component models for particular applications. 

2. Overall Structure of HVACSIM+

HVACSIM+

 is a collection of programs in three categories: preprocessing, simulation, and postprocessing. Figure 1 shows a flow diagram of programs and data files comprising HVACSIM+

. 

During the pre-processing stage, a simulation work file (hvacsim.sim) is created by the 
6 

interactive front-end program, HVACGEN, employing a data file containing component model 

information. The simulation work file can be edited interactively by the HVACGEN. This 

simulation work file (hvacsim.sim) is then converted into the model definition file (hvacsim.dfn) 

by the SLIMCON program. The model definition file has the format required by the main 

simulation program, MODSIM. 

The main simulation program, MODSIM, needs the model definition file (hvacsim.dfn), and the 

boundary data file (hvacsim.bnd). The boundary data file contains the time-dependent state

variable data that is not computed but given externally. The state variables associated with the 

boundary data file are assigned when HVACGEN generates the simulation work file 

(hvacsim.sim). 

During the execution of MODSIM, simulation control input data can be entered interactively or 

by redirecting the simulation control data file. After a successful simulation run, the summary 

data file (hvacsim.sum), the raw output data file (hvacsim.out), and the final state variable data 

file (hvacsim.fin) are generated. Post-processing is necessary if a graphical display of the raw 

output data is desired. The program SORTSB sorts the raw output data file (hvacsim.out) into a 

form suitable for graphical presentation. 

Figure 1. Flow diagram of programs and data files comprising HVACSIM+

. 
7 

When a building shell is used in a simulation, two additional input data files are required: (1) the 

weather condition data file (hvacsim.met), and (2) the conduction transfer function data file 

(hvacsim.ctf) for multilayered constructs. As shown in Figure 2, the RDWDF program reads the 

selected portion of data from a designated whole year weather data file. The program CRWDTA 

transforms the selected weather data into the proper format compatible with the MODSIM 

program. If weather data is not available or information from a whole year weather data file is 

missing, the CRWDTA program produces a design day weather data file. The conduction 

transfer functions of multilayered constructs are generated by the program CTFGEN. This 

program requires a file of building material thermal property data. 

Figure 2. Flow diagram of front-end programs and data files for shell modeling.

2.1 MODSIM 

The MODSIM program consists of a main drive program and many subprograms for 

input/output operation, block and state variable status control, integrating differential equations, 

solving a system of simultaneous non-linear algebraic equations, component models (HVAC, 

controls, building shell, etc.), and supporting utilities. See Figure 3. 

Selected Weather

Data File

Weather Data File

Thermal Property

Data File

Whole Year Weather

Data File

Conduction Transfer

Functions File
8 

Figure 3. The structure of MODSIM. 

A hierarchical approach is employed in simulation model setup. The simulation work file 

(hvacsim.sim) is constructed in the hierarchical structure, comprising super blocks, blocks, and 

units. As illustrated in Figure 4, a number of units (or a single unit) form a block, a number of 

blocks (or a single block) form a superblock, and a number of superblocks (or a single 

superblock) make up a simulation setup. The figure shows a setup with 8 units, 4 blocks, and 2 

superblocks. Depending upon the status of the state variables in a block or superblock, a system 

of equations in a block or superblock are solved simultaneously by using the non-linear equation 

solver routine, SNSQ (see pp. 14-17 of Reference 4). Superblocks are weakly coupled through 

the state variables. 

In the simulation setup a unit represents a component model of HVAC systems, controls, or 

building shells. Each component model is programmed as the subroutine TYPEn, where “n” 

represents the index number assigned to the specific component. More than one unit can call the 

same subroutine TYPEn as long as the unit numbers are different. The arguments of a TYPEn 

component subroutine are inputs, outputs, parameters, and a working vector for saving 

intermediate results. The component model configuration file (typar.dat), which is an input data 

file to the HVACGEN program, contains the numbers of elements in saved workspace vectors, 

Input and Output

Block and State Variable Status control

Integration of Ordinary Differential Equations

Solver of Simultaneous Nonlinear Algebraic Equations

Component Models of HVAC Systems and Controls

Component Models of Building Shell

Supporting Utility and Fluid Properties
9 

differential equations, inputs, outputs, and parameters. Listing 1 shows a sample in the typar.dat

file. 

Figure 4. Hierarchical simulation setup. 

Listing 1. A portion of Typar.dat file. 

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

 4 'Flow merge ' 

 0 0 5 4 1 ! numbers of saved, diff. eq., xin, out, par 

 2 'inlet mass flow rate 1 ' 

 2 'inlet mass flow rate 2 ' 

 1 'outlet pressure ' 

 3 'inlet temperature 1 ' 

 3 'inlet temperature 2 ' 

# 

 2 'outlet mass flow rate ' 

 1 'inlet pressure 1 ' 

 1 'inlet pressure 2 ' 

 3 'outlet temperature ' 

# 

 1 'flow resistance [1000/(kg m)] ' 

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

 5 'Damper or valve ' 

 0 0 3 1 4 ! numbers of saved, diff. eq., xin, out, par 

 2 'fluid mass flow rate ' 

 1 'outlet pressure ' 

 4 'control: relative position of damper or valve ' 

# 

 1 'inlet pressure ' 

# 

 1 'flow resistance, damper or valve open [1000/(kg m)] ' 

Superblock 1

Block1 Block 2 Block 3 Block 4

Unit 1 Unit 2 Unit 3 Unit 4 Unit 5 Unit 6 Unit 7 Unit 8

Superblock 2
10 

 2 'leakage parameter (dimensionless) ' 

 3 'characteristic: 0=>exp., 1=>lin., intermediate=>intermed. ' 

 4 'mode: 0=>closed when control=0; 1=>closed when control=1 ' 

The category numbers of inputs and outputs, and the descriptions of inputs, outputs, and 

parameters are also included in the file. In HVACSIM+, eight categories of variables are used: 

pressure, flow rate, temperature, control, other, energy, power, and humidity. Assigned category 

numbers, abbreviations, variable names, and measurement units are given in Table 1. Each 

variable is identified in the simulation by the category and the index number of the variable (e.g., 

T1, p2, h5, etc.). The complete set of variables in the simulation is designated as “state vector”. 

At any time during a simulation, the state vector completely describes the state of the system. 

The state vector has to be initialized at the beginning of each simulation run. The initial value 

vector can be generated by HVACGEN or by using the final state vector. The initial values 

should be as close as possible to the state at which the simulation should start. It is quite 

important to provide proper initial values to obtain a good simulation. 

 Table 1. Categories of variables in HVACSIM+

. 

This hierarchical, modular approach provides great flexibility in setting up a simulation model. 

The actual breakdown of a building system into blocks and superblocks is left to the user and 

depends upon the nature of the system and the type of interactions among its various components. 

Proper ‘blocking’ produces good simulation results. A schematic drawing of the system to be 

simulated is a convenient way to visualize what parts make up the entire system (see pp.2-9 of 

Reference 2). 

A state variable that is external to the system is designated as a “boundary variable” when the 

simulation work file (hvacsim.sim) is generated by HVACGEN. The boundary variable is an 

input to at least one unit in the simulation but not an output of any unit. Boundary variables can 

be constant or time-dependent. Whether used or not, the boundary data file (hvacsim.bnd) must 

be present as an input file for a simulation run. The time intervals in the boundary data file do 

 

 Categories of Variables 

 

Category 

# Name Abbreviation 

Short 

Abbreviation Unit 

1 Pressure pres p kPa 

2 Mass flow rate flow w or m kg 

3 Temperature temp T °C

4 Control ctrl c dimensionless 

5 Other othr o as required 

6 Energy engr e kJ 

7 Power powr q kW 

8 Humidity ahum or humt h kg/kg 
11 

not have to be equal. For cases when a step change occurs, two different values should be given 

at the same time. 

There are two methods available in MODSIM for integrating ordinary differential equations. 

One of the methods employs Gear’s algorithm to solve a stiff ordinary differential equation (see 

pp. 17-23 of Reference 4). The other employs the exact method using the subroutine DIFF. 

 

 2.2 HVACGEN 

The HVACGEN program has three types of operations: the creation, viewing, and editing of the 

simulation work file (hvacsim.sim) interactively on a computer terminal. The component model 

configuration file (typar.dat) must be present in the same folder/directory where the executable 

code of HVACGEN resides. 

Using the create command (see Reference 3), title, error tolerances, type numbers, indices of 

inputs and outputs of units, parameter values of units, initial values of state variables, categories 

and indices of boundary and reported variables are entered to make a simulation work file. 

Table 2 shows a skeleton of the simulation work file in which relative error tolerance, absolute 

error tolerance, error tolerance used by the equation solver, SNSQ, and the time interval for 

integrating differential equations are denoted as “rtolx”, “atolx”, “xtolx”, and “ttime,” 

respectively. The numbers of superblocks, blocks, units, boundary variables, reported variables, 

variables in each category, as well as the state variables in the whole simulation are created 

automatically. 

The work file can be viewed by using the view command. The structure of the unit, the block, or 

the simulation setup can be displayed. The resulting view all of the whole simulation setup can 

be stored in a user specified file or in the default file (viewsave.txt). 

The simulation work file can be edited using the edit command. The title, structure, initial values, 

boundary values, reported variables, error tolerances, input scan option, and freeze option can be 

changed. A unit or block can be inserted or deleted. A unit can also be replaced. However, 

deleting or inserting a superblock is not possible using HVACGEN. 

In entering a command, the first two characters are sufficient. Aborting operation in create, view, 

or edit can be done by using the abort command. Be aware that the currently updated 

information is usually not saved after aborting. The continue command brings the operation to 

the previous level. See Figure 5 for the summary of commands used in HVACGEN. Detail 

information concerning the commands can be found in Reference 3. 

Instead of using this text oriented HVACGEN, a visual front-end program developed by the 

Oklahoma University [7], which is not included in the HVACSIM+

 package, may be used to 

create a simulation work file (hvacsim.sim). 
12 

Table 2. Structure of the simulation work file.

Structure of Simulation Work File 

 Title 

 Number of Superblocks 

 rtox, atolx, xtol, ttime 

 --------------- Superblock level -----------------------------| 

 | 

 Number of Blocks | 

 --------------- Block level -------------------------| | 

 Number of Units | | 

 --------------- Unit level ---------------| | | 

 of Unit, ID of Type | | | 

 Indices of Input Variables | | | 

 Indices of Output Variables | | | 

 Parameter Values | | | 

 -------------------------------------| | | 

 -----------------------------------------------------| | 

 --------------------------------------------------------------| 

 Initial Values of State Variables 

 Number of Boundary Variables 

 Locations of Boundary Variables 

 Number of Reported Variables and Time interval in the 1st Superblock 

 Location of Reported Variables 

 Indices of Category of Reported Variables 

 Indices of Reported Variables 

 Number of Reported Variables and Time interval in the 2nd Superblock 

 Location of Reported Variables 

 Indices of Category of Reported Variables 

 Indices of Reported Variables 

 Freezing options in Superblocks 

 Input Scan options in Superblocks 

**************** SUMMARY OF WORK FILE **************** 

 Number of Superblocks, No. of Blocks, No. of Units in the simulation 

 Number of Blocks in Superblocks 

 Number of Variables in PRES, FLOW, TEMP, CTRL, OTHR, ENRG, POWR, HUMT 

 Number of State Variables in the simulation 

 Number of Reported Variables in Superblocks 
13 

Figure 5. Summary of commands used in HVACGEN. 

2.3 SLIMCON 

The simulation work file, which is the output of HVACGEN, must be analyzed and transformed 

into a file that has the format required by MODSIM. This process is achieved by the SLIMCON 

program. The SLIMCON program not only creates the model definition file (hvacsim.dfn) but 

also checks any errors in configuration of the simulation setup. A table is displayed to show the 

information on actual array sizes of variables along with maximum allowable sizes. For each unit, 

the program also displays the unit number, the type number, the number of saved variables, the 

number of differential equations which use Gear’s algorithm, the number of inputs, the number 

of outputs, and the number of parameters. An option is provided to allow algebraic variables to 

be inputs and outputs of the same units. 

Create Edit View End Help

Simulation

Block

Unit

Title

Stucture

Variable

Boundary

Error

Reported

Delete

Insert

Save

Continue

All

Reported

Boundary

Error

Variable

Structure

Continue

Simulation Simulation

Unit

Block

Unit
14 

2.4 UPD_INFO

In general, when the command view all is used, the output file (viewsave.txt) of HVACGEN 

sufficiently enables the user see the simulation setup, if a small number of component models are 

involved. Sometimes supplemental information is needed to distinguish the roles of components 

when the same type component is called by a number of different units. The program 

UPD_INFO calls viewsave.txt and adds the supplemental information from the supplemental unit 

information file (hvacsim.inf) on it to make an updated model information file (hvacsim.model). 

The file, hvacsim.inf, contains the unit numbers and supplemental information for the 

corresponding, particular units. Note that this program has never been documented previously. 

2.5 RDWDF 

When a simulation involves building thermal loads, weather data are required. From a whole 

year weather data file, the program RDWDF reads the type of weather data format, the weather 

station identification number, and the beginning and ending dates of the period of interest. The 

selected weather data is then written on the output file (wtpout.dat). The output file comprises 

the time of day, dry-bulb outside air temperature, humidity ratio, barometric pressure, wind 

speed, direct normal solar beam radiation, sky diffuse radiation, and total horizontal solar 

radiation. 

 

RDWDF is capable of reading five data formats: ‘NOAA SOLMET,’ ‘NOAA Typical 

Meteorological Year (TMY),’ ‘NOAA Test Reference Year (TRY),’ ‘Weather Year for Energy 

Calculation (WYEC),’ and ‘Weather Year for Energy Calculation2 (WYEC2).’ [8]. 

 

2.6 CRWDTA

The CRWDTA program reads the output of RDWDF (wtpout.dat), and rewrites the data into the 

format requested by MODSIM. If weather data is not available, a weather data file can be 

generated by CRWDTA. CRWDTA generates smooth design day solar radiation and 

temperature data for a clear or cloudy sky design day for given latitude, longitude, and time zone. 

For details, see pp. 65-72 of Reference 4. 

2.7 CTFGEN

Using the program CTFGEN, the thermal property data file (therm2.dat) from Reference 9 can 

be displayed and more data can be added. Thermal properties of building materials (thickness, 

thermal conductivity, density, specific heat, and thermal resistance) are listed in that data file. 

The main function of CTFGEN is to compute conduction transfer functions of multilayered 

constructs such as walls, floors, ceilings, and windows of a building shell. Heat fluxes are also 

computed. For details, see pp. 53-63 of Reference 4. 

2.8 SORTSB 

When more than one superblock are involved, it is necessary to sort the output file of MODSIM 

(hvacsim.out) superblock by superblock for plotting. The SORTSB handles up to 10 superblocks. 
15 

3. Getting Started 

3.1 System Requirements

• PC system computer or compatible computer 

• 254 megabytes of memory 

• 100 megabytes of hard disk space 

• Fortran 90/95 compiler for development of source code 

• PDF file reader for reading manuals 

All executable programs in this distribution were created by using a Fortran 90/95 compiler. 

HVACSIM+

 has not been tested with a Linux operating system. 

 

3.2 Installing HVACSIM+ 

1. Create a folder/directory (e.g., HVACSIM20) on a hard drive. 

2. Copy all files on the CD into the folder. 

3. Make a working subfolder (e.g., WORK) in the folder. 

4. Copy the files in the folders, BIN and DATA, into the working folder for an initial run. 

5. The folder DOC contains manuals in PDF format, and the folder SAMPLE contains the 

inputs for sample runs. 

4. Case 1: Running Programs for System Simulation 

Example 1 in the folder SAMPLE is selected for the purpose of illustration. Note that default file 

names are not used in most cases of this example run. See pp. 52-89 of Reference 3. 

Figure 6. System schematic diagram of Example 1. 

p1 p2 p3

T2

m1

c1

c2

c3

Unit 2

Type 9

Linear valve

Unit 1

Type 3

Inlet pipe

T3 = ambient

T1
16 

Figure 7. Information flow diagram of Example 1. 

4.1 Configuration of Simulation Scope

Make a block diagram of the building system to be simulated, and then assign index numbers to 

each node and draw lines, if possible, to make connections based on the information on 

inputs/outputs of component models provided in the component model configuration file 

(typar.dat). See Figures 6 and 7. 

4.2 Creating Input Data Files

4.2.1 Simulation work file (hvacsim.sim) 

Open a command line interface of an operating system, and then execute HVACGEN 

interactively. 

Listing 2 shows the interactive HVACGEN session in which the simulation work file was 

generated. During an interactive session, simply hitting the return key on a terminal key board 

selects the default response, which in most case is “yes” in response to a “yes or no” question. 

Making errors in entering data is quite common. In that situation, it is better to keep going into 

the next entry rather than aborting. After creating a simulation work file, those errors can be 

corrected by rerunning HVACGEN and using the edit command. 

Listing 3 shows the simulation work file, which comprises the title, superblock number, error 

tolerances, time interval, block number, number of units, unit number, type number, input indices, 

p1

p2

T1

T3

T2

p3

m1

c1

c2

T2

m1

c2

c3

p2

Pi

Po

Ti

Tamb

To

To

m

m

Po

C

Ca

Pi

Cra

dCa

dt

Unit 1

Type 3

Unit 2

Type 9

Inlet pipe Linear valve
17 

output indices, parameter values, initial values, number of boundary variables, indices of 

boundary variables, number of reported variables, reporting time interval, indices of reported

variables, state variables, locations of reported variables, categories of reported variables, 

variable freezing option, variable input scan option, and summary information. 

The summary information has the total number of superblocks in the simulation, the total 

number of blocks, the total number of units, the numbers of blocks in each superblock, the 

numbers of variables in each category, the total number of state variables in the simulation, and 

the numbers of reported variables in each superblock. See Table 2. 

Listing 2. Interactive session to create the simulation work file.

C:\HVACSIM20\WORK>hvacgen

HVACGEN - Simulation GENeration Program 

Version 5.0 March 9, 2007 

Choose from the list below: 

CReate (SImulation, BLock, UNit) 

EDit (SImulation, UNit) 

VIew (SImulation, BLock, UNit) 

HElp 

ENd 

----------------------------------------------------------------------- 

Selection ? 

=> cr 

Create a: 

SImulation 

BLock 

UNit 

----------------------------------------------------------------------- 

=> si 

 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 
18 

======================================================================= 

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 

----------------------------------------------------------------------- 

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 
19 

======================================================================= 

PARAMETER 4 volume (m3) 

----------------------------------------------------------------------- 

ENTER THE VALUE 

=> 0.015 

======================================================================= 

PARAMETER 5 flow resistance [1000/(kg m)] 

----------------------------------------------------------------------- 

ENTER THE VALUE 

=> 13.5 

======================================================================= 

PARAMETER 6 height of outlet above inlet (m) 

----------------------------------------------------------------------- 

ENTER THE VALUE 

=> 0.0 

======================================================================= 

PARAMETER 7 mode: 2=water, 1=air, neg.=detailed, pos.=simple dynamics 

----------------------------------------------------------------------- 

ENTER THE VALUE 

=> 2 

 Maximum number of UNits per BLock= 40 

Number of available UNits= 39 

----------------------------------------------------------------------- 

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 

=> 1 

======================================================================= 

index for control variable from controller 

----------------------------------------------------------------------- 

CONTROL 

=> 1 

======================================================================= 

index for actuator relative position (same as first output) 

----------------------------------------------------------------------- 

CONTROL 

=> 2 
20 

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 [1000/(kg m)] 

----------------------------------------------------------------------- 

ENTER THE VALUE 

=> 1.5 

======================================================================= 

PARAMETER 2 actuator time constant (sec) 

----------------------------------------------------------------------- 

ENTER THE VALUE 

=> 5.0 

======================================================================= 

PARAMETER 3 leakage parameter (dimensionless) 

----------------------------------------------------------------------- 

ENTER THE VALUE 

=> 0.316e-2 

======================================================================= 

PARAMETER 4 hysteresis parameter (dimensionless) 

----------------------------------------------------------------------- 

ENTER THE VALUE 

=> 0.2 

 Maximum number of UNits per BLock= 40 

Number of available UNits= 38 

----------------------------------------------------------------------- 

Do you wish to continue entering UNits, Y/N 

=> n 

 Maximum number of BLocks per SUperblock= 20 

Number of available BLocks=19 

----------------------------------------------------------------------- 

Do you wish to continue entering BLocks, Y/N 

=> n 

 Maximum number of SUperblocks per SImulation= 40 

Number of available SUperblocks= 39 

----------------------------------------------------------------------- 

Do you wish to continue entering SUperblocks, Y/N 

=> n 

------------------------------------------------------------------------ 

Enter the title for this SImulation 

=> Example1: Inlet pipe and (nominally) linear valve 

 The default values for the error tolerances are as follows: 
21 

RTOLX= 0.100000E-03 ATOLX= 0.100000E-04 

XTOL= 0.200000E-03 TTIME= 0.100000E+01 

----------------------------------------------------------------------- 

Use these default values, Y/N 

=> n 

------------------------------------------------------------------------ 

Enter RTOLX 

=> 0.005 

------------------------------------------------------------------------ 

Enter ATOLX 

=> 0.1e-4 

------------------------------------------------------------------------ 

Enter XTOL 

=> 0.001 

------------------------------------------------------------------------ 

Enter TTIME 

=> 10.0 

 PRES= 3 FLOW= 1 TEMP= 3 CNTR= 3 OTHR= 0 ENRG= 0 POWR= 0 AHUM= 0 

Entering Variable Initial values: 

ENTER PRESSURE 1 (kPa) 

----------------------------------------------------------------------- 

=> 33.75 

ENTER PRESSURE 2 (kPa) 

----------------------------------------------------------------------- 

=> 3.0 

ENTER PRESSURE 3 (kPa) 

----------------------------------------------------------------------- 

=> 0.0 

ENTER FLOWRATE 1 (kg/s) 

----------------------------------------------------------------------- 

=> 2.0 

ENTER TEMPERATURE 1 (C) 

----------------------------------------------------------------------- 

=> 80.0 

ENTER TEMPERATURE 2 (C) 

----------------------------------------------------------------------- 

=> 80.0 

ENTER TEMPERATURE 3 (C) 

----------------------------------------------------------------------- 

=> 20.0 

ENTER CONTROL 1 (-) 

----------------------------------------------------------------------- 
22 

=> 1.0 

ENTER CONTROL 2 (-) 

----------------------------------------------------------------------- 

=> 1.0 

ENTER CONTROL 3 (-) 

----------------------------------------------------------------------- 

=> 1.0 

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

------------------------------------------------------------------------ 

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 

=> 

------------------------------------------------------------------------ 
23 

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

=> Example1 

 Saving to work file.... 

HVACGEN - Simulation GENeration Program 

Version 5.0 March 9, 2007 

Choose from the list below: 

CReate (SImulation, BLock, UNit) 

EDit (SImulation, UNit) 

VIew (SImulation, BLock, UNit) 

HElp 

ENd 

----------------------------------------------------------------------- 

Selection ? 

=> vi 

 View a: 

SImulation 

BLock 

UNit 

----------------------------------------------------------------------- 

Enter Selection 

=> si 

------------------------------------------------------------------------ 

Enter the filename (Maximum of 46 characters) 

=> example1 

 Reading from work file.... 

 What part of the simulation would you like to view: 

ALl the simulation information (for documentation) 

STructure (superblock,block, and unit Information) 

VAriable initial values 
24 

ERror tolerances, variable scan and freeze options 

BOundary variables 

REported variables 

COntinue with the previous menu 

----------------------------------------------------------------------- 

=> al 

 Save the model setup? (y/n) 

y 

use the default file name (viewsave.txt) (y/n)? 

y 

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

-------------------------------------------------- 

UNIT 1 TYPE 3 

Inlet conduit (duct or pipe) 

1 INPUTS: 

 PRESSURE 1 - inlet fluid pressure 

 PRESSURE 2 - outlet fluid pressure 

 TEMPERATURE 1 - inlet fluid temperature 

 TEMPERATURE 3 - ambient air temperature 

 TEMPERATURE 2 - outlet fluid temperature (same as first output) 

2 OUTPUTS: 

 TEMPERATURE 2 - outlet fluid temperature (same as fifth input) 

 FLOW 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.150000E-01 volume (m3) 

 13.5000 flow resistance [1000/(kg m)] 

 0.00000 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 3 - outlet water pressure 

 FLOW 1 - water mass flow rate 

 CONTROL 1 - control variable from controller 

 CONTROL 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 
25 

3 PARAMETERS: 

 1.50000 flow resistance [1000/(kg m)] 

 5.00000 actuator time constant (sec) 

 0.316000E-02 leakage parameter (dimensionless) 

 0.200000 hysteresis parameter (dimensionless) 

---------------------------------------------------- 

Initial Variable Values: 

PRESSURE 1 -> 33.7500 (kPa) 

PRESSURE 2 -> 3.00000 (kPa) 

PRESSURE 3 -> 0.00000 (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 (-) 

CONTROL 2 -> 1.00000 (-) 

CONTROL 3 -> 1.00000 (-) 

---------------------------------------------------- 

Simulation Error Tolerances: 

1 RTOLX= 0.500000E-02 ATOLX= 0.100000E-04 

 XTOL= 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 5.0 March 9, 2007 

Choose from the list below: 

CReate (SImulation, BLock, UNit) 

EDit (SImulation, UNit) 

VIew (SImulation, BLock, UNit) 

HElp 
26 

ENd 

----------------------------------------------------------------------- 

Selection ? 

=> en 

Program Completed 

Listing 3. The simulation work file of Example 1 (example1.sim).

Example1: Inlet pipe and (nominally) linear valve 

 1 (Superblocks in simulation) 

 0.500000E-02 0.100000E-04 0.100000E-02 0.100000E+02 (Error Tol.) 

 1 (Blocks in SB# 1) 

 2 (Units in BLK# 1) 

 1 3 ----------------------------------------(Unit #,Type #)---------- 

 1 2 1 3 2 

 2 1 

 0.164000E+02 0.170000E+00 0.252000E+02 0.150000E-01 0.135000E+02 

 0.000000E+00 0.200000E+01 

 2 9 ----------------------------------------(Unit #,Type #)---------- 

 3 1 1 2 

 2 2 3 

 0.150000E+01 0.500000E+01 0.316000E-02 0.200000E+00 

 0.337500E+02 0.300000E+01 0.000000E+00 0.200000E+01 0.800000E+02 

 0.800000E+02 0.200000E+02 0.100000E+01 0.100000E+01 0.100000E+01 

 2 (Boundary Variables in simulation) 

 5 8 

 7 0.100000E+02 (Reported Var. & Interval in SB# 1) 

 2 4 5 6 8 9 10 

 1 2 3 3 4 4 4 

 2 1 1 2 1 2 3 

 0 

 0 

**************** SUMMARY OF WORK FILE *************** 

 1 1 2 (Superblocks, Blocks, Units) 

 1 

 3 1 3 3 0 0 0 0 (Variables per category) 

 10 (State Variables) 

 7 

4.2.2 Model definition file (hvacsim.dfn) 

Execute SLIMCON to create the model definition file with the simulation work file 

(hvacsim.sim) and typar.dat. In this example run, select the default option (“no”) in response to 

the question of whether to allow algebraic variables as inputs and outputs of the same units. 

Listing 4 is the display on the monitor screen of the SLIMCON run. The model definition file of 

Example 1 is shown in Listing 5. 
27 

Listing 4. SLIMCON run to create the model definition file.

C:\HVACSIM20\WORK>slimcon 

 ---------------------------------------------------------- 

 * * 

 * SLIMCON * 

 * * 

 * Converts simulation work file to model definition file * 

 * Version 6.0 ( April 10, 2007) * 

 * * 

 ---------------------------------------------------------- 

 Enter the simulation file name (up to 46 characters) 

 without any extension, or carriage return to end. 

=> example1 

 Do you want to allow algebraic variables to be inputs 

 and outputs of the same unit? (y/n) (default= no) 

=> 

---------------------------------------- 

 iu itype nsaved iude nnin nnout nnpar 

---------------------------------------- 

 1 3 11 1 5 2 7 

 2 9 5 1 4 3 4 

 ========= SLIMCON SUMMARY ========== 

 1 Superblocks in the simulation .......... maxsbk = 40 ( 2.5%) 

 1 Blocks in the simulation ............... maxblk = 50 ( 2.0%) 

 1 Differential equations in the simulation maxdeq = 90 ( 1.1%) 

 16 Saved variables in the simulation ...... maxsav =9000 ( 0.2%) 

 2 Units in the simulation ................ maxunt = 400 ( 0.5%) 

 2 Units in a single block ................ muntib = 40 ( 5.0%) 

 1 Differential equations in one unit ..... mdeqiu = 10 ( 10.0%) 

 5 Inputs or outputs in a single unit ..... minoiu = 50 ( 10.0%) 

 7 Parameters in a single unit ............ mpariu = 30 ( 23.3%) 

 1 Blocks in the largest superblock ....... mblkis = 20 ( 5.0%) 

 1 Differential equations in one superblock mdeqis = 50 ( 2.0%) 

 10 State variables in the simulation ...... maxstv =3000 ( 0.3%) 

 9 Inputs or outputs in a single block .... minoib = 200 ( 4.5%) 

 11 Unit parameters in the simulation ...... maxpar =5000 ( 0.2%) 

 3 Simultaneous equations in a single block mseqib = 75 ( 4.0%) 

 0 Simultaneous equations in one superblock mseqis = 20 ( 0.0%) 

 2 Time dependent boundary variables ...... maxbnd = 50 ( 4.0%) 

 2 Boundary conditions in one superblock .. mbndis = 50 ( 4.0%) 

 7 Reported variables in one superblock ... mrptis = 60 ( 11.7%) 

Model definition file completed 

Program Completed 
28 

Listing 5. The model definition file of Example 1 (example1.dfn).

title: simulation title 

 Example1: Inlet pipe and (nominally) linear valve 

 nstate,nsblok: # of state variables, # of SBS 

 10 1 

 nsuper(s): # of blocks in each SB 

 1 

 state(i): vector of state variable initial values 

 0.337500E+02 0.300000E+01 0.000000E+00 0.200000E+01 0.800000E+02 

 0.800000E+02 0.200000E+02 0.100000E+01 0.100000E+01 0.100000E+01 

 ndent(i): state variable identification vector 

 0 3 4 7 -1 -1 -1 -1 

 nunits(b): # of units in each block B 

 2 

 njsslv(s): # of simultaneous eqs in each SB 

 0 

 njsolv(b): # of simultaneqou eqs in each block 

 3 

 isuper(s,i): array of block numbers in each SB 

 1 

 iblock(b,i): array of unit numbers in each block 

 1 2 

 iunits(u): array of type #s for each unit 

 3 9 

 nin(u): number of inputs to unit u 

 5 4 

 in(u,i): array of input connections for unit U 

 1 2 5 7 6 

 3 4 8 9 

 nout(u): number of outputs from unit U 

 2 3 

 iout(u,i): array of output connections for unit U 

 6 4 

 9 2 10 

 jssolv(s,i): array of variables solved 

 simultaneously within each sb (between blocks) 

 0 

 jsolve(b,i): array of variables solved 

 simultaneously within each block 

 9 2 4 

 nde(u): # of differential eqs in unit U 

 0 1 

 inde(u,i): de index for the ith de in unit U 

 0 

 1 

 idevar(d): variable index for de #d 

 9 

 isaved(u): index of first saved var. for unit U 

 1 12 

 jpar(u): index of first parameter for unit U 

 1 8 

 npar,nsaved: # of parameters & saved variables 

 11 16 

 par(i): array of parameters for all units 

 0.164000E+02 0.170000E+00 0.252000E+02 0.150000E-01 0.135000E+02 
29 

 0.000000E+00 0.200000E+01 0.150000E+01 0.500000E+01 0.316000E-02 

 0.200000E+00 

 nbound: # of time-dependent boundary variables 

 2 

 ibound(i) state variable indices of boundary variables. 

 5 8 

 nreprt(s): # of reported variables in each SB 

 7 

 treprt(s): reporting interval for each SB 

 0.100000E+02 

 ireprt(i): indices of reported variables 

 ident1: category # of reported variables 

 ident2: position in category of reported variables 

 2 4 5 6 8 9 10 

 1 2 3 3 4 4 4 

 2 1 1 2 1 2 3 

 rtolx,atolx, xtol,ttime: error tolerances 

 0.500000E-02 0.100000E-04 0.100000E-02 0.100000E+02 

 ifzopt(s): sb variable unfreezing option vector 

 0 

 insopt(s): sb input scan option vector 

 0 

4.2.3 Boundary data file (hvacsim.bnd) 

A text editor can be used to create the boundary data file. The first column must be time in 

seconds, and the other columns are the values of boundary variables. These were previously 

defined as boundary variables in the simulation work file by HVACGEN. Since a third order 

Lagrangian interpolation method is used, the time intervals need not be equal. To produce a step 

change in boundary variables, two different values must be provided at the same time. This 

signals resetting the simulation time step to a minimum value. At least three regular records have 

to be given between reset record pairs. Because a simulation begins at time zero, the time of the 

first record of the boundary data file must be zero. Even if no boundary data is required in a 

simulation, the data file with null values must be provided. Whether used or not, a boundary data 

file must be available to MODSIM. Listing 6 shows the boundary data file of Example 1. The 

first, the second, and the third columns are time, T1, and c1, respectively. 

Listing 6. The boundary data file of Example 1 (example1.bnd).

 0., 80., 1.00 

 20., 80., 1.00 

 27., 80., 1.00 

 30., 80., 1.00 

 30., 80. 0.85 

 35., 80., 0.85 

 40., 80., 0.70 

 45., 80., 0.55 

 50., 80., 0.40 

 55., 80., 0.25 

 55., 80. 0.1 
30 

 60., 80., 0.10 

 80., 80., 0.10 

100., 80., 0.10 

120., 80., 0.10 

150., 80., 0.10 

150., 80., 0.25 

155., 80., 0.25 

160., 80., 0.40 

165., 80., 0.55 

170., 80., 0.70 

175., 80., 0.85 

180., 80., 0.85 

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 

600., 80., 1.0 

4.3 Creating a Model Information File

Although it is not required to create a model information file (hvacsim.model) in a simulation run, 

the model information file is a quite helpful document file, when a large number of component 

models are involved, especially if different units use the same type of component model. The 

UPD_INFO program uses two input data files to produce the model information file. One of 

them is the HVACGEN output file (viewsave.txt) that is created when the view all command is 

used. The other is the supplemental unit information file (hvacsim.inf) which is generated by the 

user using a text editor entering unit numbers and supplemental information of the units. 

Listings 7 and 8 show viewsave.txt and hvacsim.inf. Listings 9 and 10 show the interactive 

session of running UPD_INFO and the model information file, respectively. 

Listing 7. The HVACGEN output file (viewsave.txt) created by using the command, view all 

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

 UNIT 1 TYPE 3 

 Inlet conduit (duct or pipe) 

 1 INPUTS: 

 PRESSURE 1 - inlet fluid pressure 

 PRESSURE 2 - outlet fluid pressure 

 TEMPERATURE 1 - inlet fluid temperature 

 TEMPERATURE 3 - ambient air temperature 
31 

 TEMPERATURE 2 - outlet fluid temperature (same as first output) 

 2 OUTPUTS: 

 TEMPERATURE 2 - outlet fluid temperature (same as fifth input) 

 FLOW 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.150000E-01 volume (m3) 

 13.5000 flow resistance [1000/(kg m)] 

 0.00000 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 3 - outlet water pressure 

 FLOW 1 - water mass flow rate 

 CONTROL 1 - control variable from controller 

 CONTROL 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 [1000/(kg m)] 

 5.00000 actuator time constant (sec) 

 0.316000E-02 leakage parameter (dimensionless) 

 0.200000 hysteresis parameter (dimensionless) 

 Initial Variable Values: 

 PRESSURE 1 -> 33.7500 (kPa) 

 PRESSURE 2 -> 3.00000 (kPa) 

 PRESSURE 3 -> 0.00000 (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 (-) 

 CONTROL 2 -> 1.00000 (-) 

 CONTROL 3 -> 1.00000 (-) 

 Simulation Error Tolerances: 

 1 RTOLX= 0.500000E-02 ATOLX= 0.100000E-04 

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

 SUPERBLOCK 1 REPORTING INTERVAL 10.0000 

 PRESSURE 2 

 FLOW 1 

 TEMPERATURE 1 

 TEMPERATURE 2 

 CONTROL 1 

 CONTROL 2 

 CONTROL 3 
32 

Listing 8. Supplemental unit information file (example1.inf) 

1 Water inlet pipe 

2 Water valve 

Listing 9. Interactive session of running UPD_INFO 

C:\HVACSIM20\WORK>upd_info

 Enter the name of view output file of HVACGEN (viewsave.txt) 

=> viewsave.txt 

 Enter the supplemental unit information file (hvacsim.inf) 

=> example1.inf 

 Enter the name of model information file (hvacsim.model) 

=> example1.model 

 Line No. 9 

----- matched data ---- 

Line No. 32 

----- matched data ---- 

End of file

Listing 10. The model information file (example1.model) 

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

 UNIT 1 TYPE 3 ----- Water inlet pipe 

 Inlet conduit (duct or pipe) 

 1 INPUTS: 

 PRESSURE 1 - inlet fluid pressure 

 PRESSURE 2 - outlet fluid pressure 

 TEMPERATURE 1 - inlet fluid temperature 

 TEMPERATURE 3 - ambient air temperature 

 TEMPERATURE 2 - outlet fluid temperature (same as first output) 

 

 2 OUTPUTS: 

 TEMPERATURE 2 - outlet fluid temperature (same as fifth input) 

 FLOW 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.150000E-01 volume (m3) 

 13.5000 flow resistance [1000/(kg m)] 

 0.00000 height of outlet above inlet (m) 

 2.00000 mode: 2=water, 1=air, neg.=detailed, pos.=simple dynami 

 

 UNIT 2 TYPE 9 ----- Water valve 

 Linear valve with pneumatic actuator 

 1 INPUTS: 
33 

 PRESSURE 3 - outlet water pressure 

 FLOW 1 - water mass flow rate 

 CONTROL 1 - control variable from controller 

 CONTROL 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 [1000/(kg m)] 

 5.00000 actuator time constant (sec) 

 0.316000E-02 leakage parameter (dimensionless) 

 0.200000 hysteresis parameter (dimensionless) 

 Initial Variable Values: 

 

 PRESSURE 1 -> 33.7500 (kPa) 

 PRESSURE 2 -> 3.00000 (kPa) 

 PRESSURE 3 -> 0.00000 (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 (-) 

 CONTROL 2 -> 1.00000 (-) 

 CONTROL 3 -> 1.00000 (-) 

 Simulation Error Tolerances: 

 

 1 RTOLX= 0.500000E-02 ATOLX= 0.100000E-04 

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

 SUPERBLOCK 1 REPORTING INTERVAL 10.0000 

 PRESSURE 2 

 FLOW 1 

 TEMPERATURE 1 

 TEMPERATURE 2 

 CONTROL 1 

 CONTROL 2 

 CONTROL 3 

4.4 System Simulation using MODSIM 

Execution of MODSIM can be done using either the interactive approach or a batch job using a 

redirecting method. A minimum time step, a maximum time step, and a stopping time for the 

simulation must be entered. In running Example 1, the default can be chosen for most of the 

questions. Viewing diagnostic information or monitoring the progress of simulation on a 

computer terminal screen may not be practical due to fast scrolling rates of recent high speed 

computers. Listings 11, 12, 13, and 14 show the interactive session of MODSIM, the final state

variable file (hvacsim.fin), the simulation summary file (hvacsim.sum), and the simulation output 
34 

file (hvacsim.out), respectively. Note that ‘example1’ is used in place of ‘hvacsim’ for the body 

of file name in listings. 

Batch processing can be done by redirecting the simulation control input data file (example1.inp), 

which is shown in Listing 15.

modsim < example1.inp 

When a simulation stops after reaching the stopping time, the simulation can be continued by 

using the final state variable file (hvacsim.fin), which stores the state variable vector at the end of 

simulation time. Before proceeding with such a continuation, the file hvacsim.fin should be 

renamed as hvacsim.ini, which becomes the initialization file. 

One shortcoming of using the initialization file is that the starting time of simulation is zero. 

Thus the beginning time of a boundary variable file should be zero. If possible, refrain from 

using the continuation method, as accuracy may suffer. 

Listing 11. Interactive session of MODSIM 

C:\HVACSIM20\WORK>modsim 

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

 * * 

 * MODSIM : A MODular SIMulation program * 

 * Main program of HVACSIM+ package * 

 * * 

 * version 20.0 * 

 * * 

 * National Institute of Standards & Technology * 

 * Gaithersburg, Maryland 20899-8631 U.S.A. * 

 * * 

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

 Enter minimum time step, maximum time step, and simulation stopping time: 

=> 0.1 60.0 300.0 

 Is the building shell model used? <n> 

=> n 

 Will the initialization file be called? <n> 

=> n 

 Use same file names for all files? (y/n) <y> 

=> y 

 Enter the name for all files to open or 

hit carriage return for default filename <hvacsim> 

=> example1 

 File name : example1.dfn 

 File name : example1.bnd 

 File name : example1.fin 

 File name : example1.out 

 File name : example1.sum 

 -- The outputs can be written to the output file 
35 

 -- based on either simulation time or reported time. 

 Do you want to use reported time for outputs <n>? 

=> n 

 Do you wish to disable freezing variable feature <n>? 

=> n 

 Do you want diagnostic information to be written <n>? 

=> n 

 Would you like to monitor simulation on screen? <n> 

=> n 

 ------- simulation begins --------- 

time= 10.00 

time= 20.00 

time= 30.00 

time= 40.00 

time= 50.00 

time= 60.00 

time= 70.00 

time= 80.00 

time= 90.00 

time= 100.00 

time= 110.00 

time= 120.00 

time= 130.00 

time= 140.00 

time= 150.00 

time= 160.00 

time= 170.00 

time= 180.00 

time= 190.00 

time= 200.00 

time= 210.00 

time= 220.00 

time= 230.00 

time= 240.00 

time= 250.00 

time= 260.00 

time= 270.00 

time= 280.00 

time= 290.00 

time= 300.00 

 --Final state file has been written ----- 

 ------------End of simulation --------- 

Program Completed 

Listing 12. The final state file (example1.fin).

 0.10 60.00 300.00 300.00 10 16 

 33.7500 3.38531 0.00000 1.49917 80.0000 

 78.4110 20.0000 1.00000 0.997666 0.997915 

 1 -1 1 1 1 1 1 1 -1 1 

 78.4030 0.00000 0.00000 0.00000 0.00000 

 0.00000 78.4110 1.94967 300.000 78.4030 

 78.4110 0.798332 0.798332 300.000 0.997666 

 0.00000 
36 

Listing 13. The simulation summary file (example1.sum). 

 ***** Program MODSIM ***** 

 A MODular SIMulation program 

 Example1: 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.7500 3.00000 0.00000 

 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.17000 25.200 1.50000E-02 13.500 

 0.0000 2.0000 

 unit 2 type 9 

 4 inputs: 

 pres 3 flow 1 ctrl 1 ctrl 2 

 3 outputs: 

 ctrl 2 pres 2 ctrl 3 

 parameters: 
37 

 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 

 ********** SUPERBLOCK 1 ********** 

 time= 30.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.38 1.50 80.0 78.4 1.00 1.00 1.00 

 ********** SUPERBLOCK 1 ********** 

 time= 40.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.38 1.50 80.0 78.4 0.700 0.825 1.00 

 ********** SUPERBLOCK 1 ********** 

 time= 50.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 6.64 1.42 80.0 78.4 0.400 0.547 0.683 

 ********** SUPERBLOCK 1 ********** 

 time= 60.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 20.6 0.985 80.0 78.4 0.100 0.211 0.264 

 ********** SUPERBLOCK 1 ********** 

 time= 70.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 28.3 0.636 80.0 78.3 0.100 0.115 0.144 

 ********** SUPERBLOCK 1 ********** 

 time= 80.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 29.3 0.575 80.0 78.1 0.100 0.102 0.127 

 ********** SUPERBLOCK 1 ********** 

 time= 90.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 29.4 0.569 80.0 77.6 0.100 0.101 0.126 

 ********** SUPERBLOCK 1 ********** 

 time= 100.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 29.4 0.567 80.0 76.8 0.100 0.100 0.125 

 ********** SUPERBLOCK 1 ********** 

 time= 110.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 29.4 0.567 80.0 76.3 0.100 0.100 0.125 

 ********** SUPERBLOCK 1 ********** 

 time= 120.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 29.4 0.567 80.0 76.1 0.100 0.100 0.125 

 ********** SUPERBLOCK 1 ********** 

 time= 130.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 29.4 0.567 80.0 76.0 0.100 0.100 0.125 
38 

 ********** SUPERBLOCK 1 ********** 

 time= 140.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 29.4 0.567 80.0 75.9 0.100 0.100 0.125 

 ********** SUPERBLOCK 1 ********** 

 time= 150.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 29.4 0.567 80.0 75.9 0.100 0.100 0.125 

 ********** SUPERBLOCK 1 ********** 

 time= 160.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 29.1 0.582 80.0 75.9 0.399 0.277 0.130 

 ********** SUPERBLOCK 1 ********** 

 time= 170.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 12.3 1.26 80.0 75.9 0.703 0.555 0.444 

 ********** SUPERBLOCK 1 ********** 

 time= 180.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 5.48 1.45 80.0 77.4 0.850 0.805 0.756 

 ********** SUPERBLOCK 1 ********** 

 time= 190.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.58 1.49 80.0 78.3 1.00 0.974 0.967 

 ********** SUPERBLOCK 1 ********** 

 time= 200.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.41 1.50 80.0 78.4 1.00 0.995 0.994 

 ********** SUPERBLOCK 1 ********** 

 time= 210.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 80.0 78.4 1.00 0.998 0.998 

 ********** SUPERBLOCK 1 ********** 

 time= 220.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 75.0 77.1 1.00 0.998 0.998 

 ********** SUPERBLOCK 1 ********** 

 time= 230.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 75.0 74.6 1.00 0.998 0.998 

 ********** SUPERBLOCK 1 ********** 

 time= 240.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 75.0 73.5 1.00 0.998 0.998 

 ********** SUPERBLOCK 1 ********** 

 time= 250.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 75.0 73.5 1.00 0.998 0.998 

 ********** SUPERBLOCK 1 ********** 

 time= 260.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 80.0 73.5 1.00 0.998 0.998 

 ********** SUPERBLOCK 1 ********** 

 time= 270.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 80.0 76.4 1.00 0.998 0.998 
39 

 ********** SUPERBLOCK 1 ********** 

 time= 280.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 80.0 78.3 1.00 0.998 0.998 

 ********** SUPERBLOCK 1 ********** 

 time= 290.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 80.0 78.4 1.00 0.998 0.998 

 ********** SUPERBLOCK 1 ********** 

 time= 300.00 

 pres 2 flow 1 temp 1 temp 2 ctrl 1 ctrl 2 ctrl 3 

 3.39 1.50 80.0 78.4 1.00 0.998 0.998 

Listing 14. The simulation output file (example1.out). 

SUPERBLOCK 1 0.10 

 3.37500 1.50000 80.0000 79.9606 1.00000 

 1.00000 1.00000 

SUPERBLOCK 1 0.30 

 3.37500 1.50000 80.0000 79.9606 1.00000 

 1.00000 1.00000 

SUPERBLOCK 1 0.70 

 3.37500 1.50000 80.0000 79.9366 1.00000 

 1.00000 1.00000 

SUPERBLOCK 1 1.50 

 3.37500 1.50000 80.0000 79.9524 1.00000 

 1.00000 1.00000 

SUPERBLOCK 1 3.10 

 3.37500 1.50000 80.0000 79.9768 1.00000 

 1.00000 1.00000 

SUPERBLOCK 1 6.30 

 3.37500 1.50000 80.0000 79.9692 1.00000 

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

 0.997107 1.00000 

SUPERBLOCK 1 30.20 

 3.37500 1.50000 80.0000 78.4139 0.854762 

 0.996802 1.00000 

SUPERBLOCK 1 30.30 

 3.37500 1.50000 80.0000 78.4139 0.856965 

 0.994060 1.00000 

SUPERBLOCK 1 30.40 

 3.37500 1.50000 80.0000 78.4139 0.859053 

 0.991413 1.00000 

SUPERBLOCK 1 30.50 

 3.37500 1.50000 80.0000 78.4139 0.861025 

 0.988857 1.00000 

SUPERBLOCK 1 31.10 

 3.37500 1.50000 80.0000 78.4139 0.870506 

 0.975023 1.00000 

SUPERBLOCK 1 31.60 

 3.37500 1.50000 80.0000 78.4139 0.875459 

 0.965248 1.00000 

SUPERBLOCK 1 32.40 

 3.37500 1.50000 80.0000 78.4139 0.878205 
40 

 0.951982 1.00000 

SUPERBLOCK 1 33.10 

 3.37500 1.50000 80.0000 78.4139 0.875798 

 0.941972 1.00000 

SUPERBLOCK 1 34.30 

 3.37500 1.50000 80.0000 78.4139 0.862461 

 0.926426 1.00000 

SUPERBLOCK 1 36.00 

 3.37500 1.50000 80.0000 78.4139 0.827200 

 0.903328 1.00000 

SUPERBLOCK 1 38.30 

 3.37500 1.50000 80.0000 78.4139 0.758517 

 0.863247 1.00000 

SUPERBLOCK 1 40.00 

 3.37500 1.50000 80.0000 78.4139 0.700000 

 0.825018 1.00000 

SUPERBLOCK 1 41.50 

 3.48732 1.50000 80.0000 78.4119 0.655000 

 0.786971 0.983713 

SUPERBLOCK 1 43.60 

 3.97193 1.48519 80.0000 78.4116 0.592000 

 0.729936 0.912420 

SUPERBLOCK 1 45.50 

 4.53352 1.47112 80.0000 78.4116 0.535000 

 0.676573 0.845716 

SUPERBLOCK 1 47.80 

 5.39437 1.44928 80.0000 78.4116 0.466000 

 0.610792 0.763490 

SUPERBLOCK 1 52.30 

 7.94552 1.38255 80.0000 78.4099 0.331000 

 0.479555 0.599444 

SUPERBLOCK 1 55.00 

 10.3591 1.31630 80.0000 78.4022 0.250000 

 0.399444 0.499305 

SUPERBLOCK 1 55.10 

 10.5716 1.31031 80.0000 78.4019 0.100000 

 0.393572 0.491965 

SUPERBLOCK 1 55.20 

 10.7853 1.30426 80.0000 78.4016 0.100000 

 0.387816 0.484770 

SUPERBLOCK 1 55.30 

 11.0002 1.29814 80.0000 78.4012 0.100000 

 0.382173 0.477716 

SUPERBLOCK 1 55.80 

 12.0949 1.26653 80.0000 78.3991 0.100000 

 0.355415 0.444269 

SUPERBLOCK 1 56.10 

 12.7612 1.24689 80.0000 78.3972 0.100000 

 0.340540 0.425675 

SUPERBLOCK 1 56.70 

 14.0993 1.20650 80.0000 78.3938 0.100000 

 0.313284 0.391605 

SUPERBLOCK 1 57.40 

 15.6423 1.15818 80.0000 78.3899 0.100000 

 0.285292 0.356616 

SUPERBLOCK 1 58.40 

 17.7391 1.08903 80.0000 78.3850 0.100000 

 0.251611 0.314514 

SUPERBLOCK 1 59.40 

 19.6454 1.02214 80.0000 78.3797 0.100000 

 0.224133 0.280167 

SUPERBLOCK 1 60.90 

 22.0698 0.930142 80.0000 78.3706 0.100000 

 0.192075 0.240094 

SUPERBLOCK 1 62.30 

 23.8568 0.856041 80.0000 78.3593 0.100000 

 0.169732 0.212165 

SUPERBLOCK 1 63.50 

 25.0635 0.802146 80.0000 78.3501 0.100000 

 0.154951 0.193689 

SUPERBLOCK 1 65.20 
41 

 26.3568 0.740024 80.0000 78.3355 0.100000 

 0.139146 0.173933 

SUPERBLOCK 1 67.30 

 27.4476 0.683256 80.0000 78.3165 0.100000 

 0.125652 0.157065 

SUPERBLOCK 1 69.70 

 28.2296 0.639470 80.0000 78.2981 0.100000 

 0.115763 0.144704 

SUPERBLOCK 1 71.80 

 28.6536 0.614458 80.0000 78.2802 0.100000 

 0.110289 0.137861 

SUPERBLOCK 1 73.90 

 28.9249 0.597853 80.0000 78.2557 0.100000 

 0.106725 0.133406 

SUPERBLOCK 1 76.40 

 29.1259 0.585263 80.0000 78.2130 0.100000 

 0.104055 0.130069 

SUPERBLOCK 1 79.60 

 29.2717 0.575958 80.0000 78.1315 0.100000 

 0.102099 0.127624 

SUPERBLOCK 1 83.40 

 29.3595 0.570281 80.0000 77.9810 0.100000 

 0.100913 0.126141 

SUPERBLOCK 1 87.40 

 29.3595 0.570281 80.0000 77.7481 0.100000 

 0.100967 0.126141 

SUPERBLOCK 1 88.50 

 29.3595 0.570281 80.0000 77.6728 0.100000 

 0.100793 0.126141 

SUPERBLOCK 1 89.10 

 29.3746 0.569299 80.0000 77.6294 0.100000 

 0.100708 0.126141 

SUPERBLOCK 1 90.30 

 29.3847 0.568641 80.0000 77.5385 0.100000 

 0.100571 0.125714 

SUPERBLOCK 1 92.10 

 29.3971 0.567835 80.0000 77.3956 0.100000 

 0.100403 0.125714 

SUPERBLOCK 1 95.70 

 29.4130 0.566800 80.0000 77.1037 0.100000 

 0.100188 0.125235 

SUPERBLOCK 1 102.90 

 29.4130 0.566800 80.0000 76.5920 0.100000 

 0.100188 0.125235 

SUPERBLOCK 1 117.30 

 29.4130 0.566800 80.0000 76.0812 0.100000 

 0.100188 0.125235 

SUPERBLOCK 1 146.10 

 29.4130 0.566800 80.0000 75.8878 0.100000 

 0.100188 0.125235 

SUPERBLOCK 1 150.00 

 29.4130 0.566800 80.0000 75.8878 0.100000 

 0.100188 0.125235 

SUPERBLOCK 1 150.10 

 29.4130 0.566800 80.0000 75.8878 0.247560 

 0.101935 0.125235 

SUPERBLOCK 1 150.20 

 29.4130 0.566800 80.0000 75.8878 0.245238 

 0.102242 0.125235 

SUPERBLOCK 1 150.30 

 29.4130 0.566800 80.0000 75.8878 0.243035 

 0.105002 0.125235 

SUPERBLOCK 1 150.40 

 29.4130 0.566800 80.0000 75.8878 0.240947 

 0.107668 0.125235 

SUPERBLOCK 1 150.50 

 29.4130 0.566800 80.0000 75.8878 0.238975 

 0.110243 0.125235 

SUPERBLOCK 1 150.60 

 29.4130 0.566800 80.0000 75.8878 0.237117 

 0.112730 0.125235 
42 

SUPERBLOCK 1 150.70 

 29.4130 0.566800 80.0000 75.8878 0.235371 

 0.115135 0.125235 

SUPERBLOCK 1 150.80 

 29.4130 0.566800 80.0000 75.8878 0.233738 

 0.117461 0.125235 

SUPERBLOCK 1 150.90 

 29.4130 0.566800 80.0000 75.8878 0.232214 

 0.119711 0.125235 

SUPERBLOCK 1 151.00 

 29.4130 0.566800 80.0000 75.8878 0.230800 

 0.121889 0.125235 

SUPERBLOCK 1 151.10 

 29.4130 0.566800 80.0000 75.8878 0.229494 

 0.123999 0.125235 

SUPERBLOCK 1 151.20 

 29.4130 0.566800 80.0000 75.8878 0.228294 

 0.126044 0.125235 

SUPERBLOCK 1 151.30 

 29.4130 0.566800 80.0000 75.8878 0.227201 

 0.128027 0.125235 

SUPERBLOCK 1 151.40 

 29.4130 0.566800 80.0000 75.8878 0.226211 

 0.129952 0.125235 

SUPERBLOCK 1 151.50 

 29.4130 0.566800 80.0000 75.8878 0.225325 

 0.131822 0.125235 

SUPERBLOCK 1 151.60 

 29.4130 0.566800 80.0000 75.8878 0.224541 

 0.133640 0.125235 

SUPERBLOCK 1 151.70 

 29.4130 0.566800 80.0000 75.8878 0.223857 

 0.135409 0.125235 

SUPERBLOCK 1 151.80 

 29.4130 0.566800 80.0000 75.8878 0.223274 

 0.137132 0.125235 

SUPERBLOCK 1 151.90 

 29.4130 0.566800 80.0000 75.8878 0.222788 

 0.138812 0.125235 

SUPERBLOCK 1 152.00 

 29.4130 0.566800 80.0000 75.8878 0.222400 

 0.140451 0.125235 

SUPERBLOCK 1 152.20 

 29.4130 0.566800 80.0000 75.8878 0.221910 

 0.143640 0.125235 

SUPERBLOCK 1 152.30 

 29.4130 0.566800 80.0000 75.8878 0.221807 

 0.145188 0.125235 

SUPERBLOCK 1 152.60 

 29.4130 0.566800 80.0000 75.8878 0.222045 

 0.149660 0.125235 

SUPERBLOCK 1 153.10 

 29.4130 0.566800 80.0000 75.8878 0.224202 

 0.156682 0.125235 

SUPERBLOCK 1 153.60 

 29.4130 0.566800 80.0000 75.8878 0.228429 

 0.163323 0.125235 

SUPERBLOCK 1 154.10 

 29.4130 0.566800 80.0000 75.8878 0.234576 

 0.169805 0.125235 

SUPERBLOCK 1 154.80 

 29.4130 0.566800 80.0000 75.8878 0.246122 

 0.178987 0.125235 

SUPERBLOCK 1 155.90 

 29.4130 0.566800 80.0000 75.8878 0.270284 

 0.194543 0.125235 

SUPERBLOCK 1 156.90 

 29.4130 0.566800 80.0000 75.8878 0.297458 

 0.210672 0.125235 

SUPERBLOCK 1 158.10 

 29.4130 0.566800 80.0000 75.8878 0.334872 
43 

 0.233219 0.125235 

SUPERBLOCK 1 159.80 

 29.4130 0.566800 80.0000 75.8878 0.393002 

 0.271329 0.125235 

SUPERBLOCK 1 163.20 

 24.5194 0.826888 80.0000 75.8878 0.496000 

 0.361601 0.202001 

SUPERBLOCK 1 163.60 

 23.6369 0.865517 80.0000 75.8970 0.508000 

 0.372445 0.215556 

SUPERBLOCK 1 163.80 

 23.1975 0.884113 80.0000 75.8900 0.514000 

 0.377889 0.222362 

SUPERBLOCK 1 164.80 

 21.0255 0.970845 80.0000 75.8729 0.544000 

 0.405575 0.256968 

SUPERBLOCK 1 165.90 

 18.7768 1.05314 80.0000 75.8809 0.577000 

 0.436349 0.295437 

SUPERBLOCK 1 166.30 

 18.0042 1.07997 80.0000 75.8849 0.589000 

 0.447634 0.309542 

SUPERBLOCK 1 167.10 

 16.5391 1.12911 80.0000 75.8916 0.613000 

 0.470355 0.337944 

SUPERBLOCK 1 168.70 

 13.9426 1.21128 80.0000 75.8926 0.661000 

 0.516312 0.395391 

SUPERBLOCK 1 171.90 

 9.92581 1.32844 80.0000 75.9006 0.765128 

 0.611913 0.514891 

SUPERBLOCK 1 175.10 

 7.31415 1.39936 80.0000 76.2934 0.851970 

 0.706042 0.632553 

SUPERBLOCK 1 177.20 

 6.24037 1.42750 80.0000 76.7936 0.877350 

 0.759133 0.698917 

SUPERBLOCK 1 178.50 

 5.79402 1.43903 80.0000 77.0921 0.874675 

 0.785076 0.731345 

SUPERBLOCK 1 180.00 

 5.48100 1.44707 80.0000 77.4197 0.850000 

 0.804995 0.756244 

SUPERBLOCK 1 180.10 

 5.42364 1.44853 80.0000 77.4377 1.00000 

 0.808819 0.761023 

SUPERBLOCK 1 180.20 

 5.35774 1.44853 80.0000 77.4552 1.00000 

 0.812567 0.765709 

SUPERBLOCK 1 180.30 

 5.29428 1.44853 80.0000 77.4724 1.00000 

 0.816242 0.770303 

SUPERBLOCK 1 181.20 

 4.90151 1.46182 80.0000 77.6115 1.00000 

 0.846456 0.808071 

SUPERBLOCK 1 182.10 

 4.58799 1.46974 80.0000 77.7280 1.00000 

 0.871900 0.839875 

SUPERBLOCK 1 183.40 

 4.25661 1.47807 80.0000 77.8679 1.00000 

 0.901627 0.877034 

SUPERBLOCK 1 184.70 

 4.02341 1.48390 80.0000 77.9840 1.00000 

 0.924605 0.905756 

SUPERBLOCK 1 187.10 

 3.75471 1.49059 80.0000 78.1438 1.00000 

 0.953568 0.941960 

SUPERBLOCK 1 190.00 

 3.58432 1.49482 80.0000 78.2528 1.00000 

 0.973526 0.966908 

SUPERBLOCK 1 193.90 
44 

 3.46619 1.49482 80.0000 78.3333 1.00000 

 0.986639 0.983299 

SUPERBLOCK 1 197.30 

 3.43432 1.49853 80.0000 78.3710 1.00000 

 0.992261 0.990327 

SUPERBLOCK 1 200.80 

 3.40871 1.49917 80.0000 78.3914 1.00000 

 0.995579 0.994473 

SUPERBLOCK 1 205.60 

 3.38531 1.49917 80.0000 78.4041 1.00000 

 0.998332 0.997915 

SUPERBLOCK 1 210.00 

 3.38531 1.49917 80.0000 78.4081 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 210.10 

 3.38531 1.49917 75.0000 78.4083 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 210.30 

 3.38531 1.49917 75.0000 78.3602 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 210.70 

 3.38531 1.49917 75.0000 78.3370 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 211.50 

 3.38531 1.49917 75.0000 78.4111 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 213.10 

 3.38531 1.49917 75.0000 78.4509 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 216.30 

 3.38531 1.49917 75.0000 78.4639 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 222.70 

 3.38531 1.49917 75.0000 76.0268 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 235.50 

 3.38531 1.49917 75.0000 73.5515 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 255.00 

 3.38531 1.49917 75.0000 73.5435 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 255.10 

 3.38531 1.49917 80.0000 73.5435 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 255.30 

 3.38531 1.49917 80.0000 73.5919 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 255.70 

 3.38531 1.49917 80.0000 73.6156 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 256.50 

 3.38531 1.49917 80.0000 73.5418 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 258.10 

 3.38531 1.49917 80.0000 73.5019 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 261.30 

 3.38531 1.49917 80.0000 73.4904 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 267.70 

 3.38531 1.49917 80.0000 75.9276 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 280.50 

 3.38531 1.49917 80.0000 78.4030 1.00000 

 0.997666 0.997915 

SUPERBLOCK 1 300.00 

 3.38531 1.49917 80.0000 78.4110 1.00000 

 0.997666 0.997915 
45 

Listing 15. The simulation control input data file (example1.inp). 

0.1, 60.0, 300. (tmin, tmax, tstop) 

n (building shell use) 

n (initialization file use) 

n (default file use) 

example1.dfn (hvacsim.dfn) 

example1.bnd (hvacsim.bnd) 

example1.fin (hvacsim.fin) 

example1.out (hvacsim.out) 

example1.sum (hvacsim.sum) 

n (reporting time for output) 

n (disabling freezing variable feature) 

n (diagnostic information) 

n (monitoring on screen) 

4.5 Sorting the Simulation Output Data File

The format of the simulation output data file (hvacsim.out) is not suitable for plotting. SORTSB 

sorts the file superblock by superblock. According to the preference of the user, the time unit that 

is second can be scaled to minute, hour, or day. The output data of SORTSB can also be 

recorded in a fixed interval by skipping a number of records. Listing 16 shows the interactive 

session of running SORTSB and Listing 17 shows the output of SORTSB. Figure 8 is the plot 

of the water mass flow rate with respect to actuator and valve stem positions. The inlet and outlet 

temperatures of the water pipe are plotted in terms of time in Figure 9. 

Listing 16. Interactive session of running SORTSB. 

C:\HVACSIM20\WORK>sortsb 

 Enter input file name 

=> example1.out 

 Enter output file name 

=> example1.sb1 

 Superblock # ? 

=> 1 

 Number of output lines to be skipped = 

=> 0 

 SUPERBLOCK 1 0.10 

 3.37500 1.50000 80.0000 79.9606 1.00000 

 1.00000 1.00000 

SUPERBLOCK 1 0.30 

 3.37500 1.50000 80.0000 79.9606 1.00000 

 1.00000 1.00000 

SUPERBLOCK 1 0.70 

 3.37500 1.50000 80.0000 79.9366 1.00000 

 Number of seconds per unit time? 

=> 1 

 Extract another superblock? <n> 

=> n 

---- End of sortsb ----- 
46 

Listing 17. The output of SORTSB. 

 134 8 

 0.100000 3.37500 1.50000 80.0000 79.9606 1.00000 1.00000 

1.00000 

 0.300000 3.37500 1.50000 80.0000 79.9606 1.00000 1.00000 

1.00000 

 0.700000 3.37500 1.50000 80.0000 79.9366 1.00000 1.00000 

1.00000 

 1.50000 3.37500 1.50000 80.0000 79.9524 1.00000 1.00000 

1.00000 

 3.10000 3.37500 1.50000 80.0000 79.9768 1.00000 1.00000 

1.00000 

 6.30000 3.37500 1.50000 80.0000 79.9692 1.00000 1.00000 

1.00000 

 12.7000 3.37500 1.50000 80.0000 79.2213 1.00000 1.00000 

1.00000 

 25.5000 3.37500 1.50000 80.0000 78.4139 1.00000 1.00000 

1.00000 

 30.0000 3.37500 1.50000 80.0000 78.4139 1.00000 1.00000 

1.00000 

 30.1000 3.37500 1.50000 80.0000 78.4139 0.852440 0.997107 

1.00000 

 30.2000 3.37500 1.50000 80.0000 78.4139 0.854762 0.996802 

1.00000 

 30.3000 3.37500 1.50000 80.0000 78.4139 0.856965 0.994060 

1.00000 

 30.4000 3.37500 1.50000 80.0000 78.4139 0.859053 0.991413 

1.00000 

 30.5000 3.37500 1.50000 80.0000 78.4139 0.861025 0.988857 

1.00000 

 31.1000 3.37500 1.50000 80.0000 78.4139 0.870506 0.975023 

1.00000 

 31.6000 3.37500 1.50000 80.0000 78.4139 0.875459 0.965248 

1.00000 

 32.4000 3.37500 1.50000 80.0000 78.4139 0.878205 0.951982 

1.00000 

 33.1000 3.37500 1.50000 80.0000 78.4139 0.875798 0.941972 

1.00000 

 34.3000 3.37500 1.50000 80.0000 78.4139 0.862461 0.926426 

1.00000 

 36.0000 3.37500 1.50000 80.0000 78.4139 0.827200 0.903328 

1.00000 

 38.3000 3.37500 1.50000 80.0000 78.4139 0.758517 0.863247 

1.00000 

 40.0000 3.37500 1.50000 80.0000 78.4139 0.700000 0.825018 

1.00000 

 41.5000 3.48732 1.50000 80.0000 78.4119 0.655000 0.786971 

0.983713 

 43.6000 3.97193 1.48519 80.0000 78.4116 0.592000 0.729936 

0.912420 

 45.5000 4.53352 1.47112 80.0000 78.4116 0.535000 0.676573 

0.845716 

 47.8000 5.39437 1.44928 80.0000 78.4116 0.466000 0.610792 

0.763490 

 52.3000 7.94552 1.38255 80.0000 78.4099 0.331000 0.479555 

0.599444 

 55.0000 10.3591 1.31630 80.0000 78.4022 0.250000 0.399444 

0.499305 

 55.1000 10.5716 1.31031 80.0000 78.4019 0.100000 0.393572 

0.491965 

 55.2000 10.7853 1.30426 80.0000 78.4016 0.100000 0.387816 

0.484770 

 55.3000 11.0002 1.29814 80.0000 78.4012 0.100000 0.382173 

0.477716 

 55.8000 12.0949 1.26653 80.0000 78.3991 0.100000 0.355415 

0.444269 

 56.1000 12.7612 1.24689 80.0000 78.3972 0.100000 0.340540 

0.425675 
47 

 56.7000 14.0993 1.20650 80.0000 78.3938 0.100000 0.313284 

0.391605 

 57.4000 15.6423 1.15818 80.0000 78.3899 0.100000 0.285292 

0.356616 

 58.4000 17.7391 1.08903 80.0000 78.3850 0.100000 0.251611 

0.314514 

 59.4000 19.6454 1.02214 80.0000 78.3797 0.100000 0.224133 

0.280167 

 60.9000 22.0698 0.930142 80.0000 78.3706 0.100000 0.192075 

0.240094 

 62.3000 23.8568 0.856041 80.0000 78.3593 0.100000 0.169732 

0.212165 

 63.5000 25.0635 0.802146 80.0000 78.3501 0.100000 0.154951 

0.193689 

 65.2000 26.3568 0.740024 80.0000 78.3355 0.100000 0.139146 

0.173933 

 67.3000 27.4476 0.683256 80.0000 78.3165 0.100000 0.125652 

0.157065 

 69.7000 28.2296 0.639470 80.0000 78.2981 0.100000 0.115763 

0.144704 

 71.8000 28.6536 0.614458 80.0000 78.2802 0.100000 0.110289 

0.137861 

 73.9000 28.9249 0.597853 80.0000 78.2557 0.100000 0.106725 

0.133406 

 76.4000 29.1259 0.585263 80.0000 78.2130 0.100000 0.104055 

0.130069 

 79.6000 29.2717 0.575958 80.0000 78.1315 0.100000 0.102099 

0.127624 

 83.4000 29.3595 0.570281 80.0000 77.9810 0.100000 0.100913 

0.126141 

 87.4000 29.3595 0.570281 80.0000 77.7481 0.100000 0.100967 

0.126141 

 88.5000 29.3595 0.570281 80.0000 77.6728 0.100000 0.100793 

0.126141 

 89.1000 29.3746 0.569299 80.0000 77.6294 0.100000 0.100708 

0.126141 

 90.3000 29.3847 0.568641 80.0000 77.5385 0.100000 0.100571 

0.125714 

 92.1000 29.3971 0.567835 80.0000 77.3956 0.100000 0.100403 

0.125714 

 95.7000 29.4130 0.566800 80.0000 77.1037 0.100000 0.100188 

0.125235 

 102.900 29.4130 0.566800 80.0000 76.5920 0.100000 0.100188 

0.125235 

 117.300 29.4130 0.566800 80.0000 76.0812 0.100000 0.100188 

0.125235 

 146.100 29.4130 0.566800 80.0000 75.8878 0.100000 0.100188 

0.125235 

 150.000 29.4130 0.566800 80.0000 75.8878 0.100000 0.100188 

0.125235 

 150.100 29.4130 0.566800 80.0000 75.8878 0.247560 0.101935 

0.125235 

 150.200 29.4130 0.566800 80.0000 75.8878 0.245238 0.102242 

0.125235 

 150.300 29.4130 0.566800 80.0000 75.8878 0.243035 0.105002 

0.125235 

 150.400 29.4130 0.566800 80.0000 75.8878 0.240947 0.107668 

0.125235 

 150.500 29.4130 0.566800 80.0000 75.8878 0.238975 0.110243 

0.125235 

 150.600 29.4130 0.566800 80.0000 75.8878 0.237117 0.112730 

0.125235 

 150.700 29.4130 0.566800 80.0000 75.8878 0.235371 0.115135 

0.125235 

 150.800 29.4130 0.566800 80.0000 75.8878 0.233738 0.117461 

0.125235 

 150.900 29.4130 0.566800 80.0000 75.8878 0.232214 0.119711 

0.125235 

 151.000 29.4130 0.566800 80.0000 75.8878 0.230800 0.121889 

0.125235 
48 

 151.100 29.4130 0.566800 80.0000 75.8878 0.229494 0.123999 

0.125235 

 151.200 29.4130 0.566800 80.0000 75.8878 0.228294 0.126044 

0.125235 

 151.300 29.4130 0.566800 80.0000 75.8878 0.227201 0.128027 

0.125235 

 151.400 29.4130 0.566800 80.0000 75.8878 0.226211 0.129952 

0.125235 

 151.500 29.4130 0.566800 80.0000 75.8878 0.225325 0.131822 

0.125235 

 151.600 29.4130 0.566800 80.0000 75.8878 0.224541 0.133640 

0.125235 

 151.700 29.4130 0.566800 80.0000 75.8878 0.223857 0.135409 

0.125235 

 151.800 29.4130 0.566800 80.0000 75.8878 0.223274 0.137132 

0.125235 

 151.900 29.4130 0.566800 80.0000 75.8878 0.222788 0.138812 

0.125235 

 152.000 29.4130 0.566800 80.0000 75.8878 0.222400 0.140451 

0.125235 

 152.200 29.4130 0.566800 80.0000 75.8878 0.221910 0.143640 

0.125235 

 152.300 29.4130 0.566800 80.0000 75.8878 0.221807 0.145188 

0.125235 

 152.600 29.4130 0.566800 80.0000 75.8878 0.222045 0.149660 

0.125235 

 153.100 29.4130 0.566800 80.0000 75.8878 0.224202 0.156682 

0.125235 

 153.600 29.4130 0.566800 80.0000 75.8878 0.228429 0.163323 

0.125235 

 154.100 29.4130 0.566800 80.0000 75.8878 0.234576 0.169805 

0.125235 

 154.800 29.4130 0.566800 80.0000 75.8878 0.246122 0.178987 

0.125235 

 155.900 29.4130 0.566800 80.0000 75.8878 0.270284 0.194543 

0.125235 

 156.900 29.4130 0.566800 80.0000 75.8878 0.297458 0.210672 

0.125235 

 158.100 29.4130 0.566800 80.0000 75.8878 0.334872 0.233219 

0.125235 

 159.800 29.4130 0.566800 80.0000 75.8878 0.393002 0.271329 

0.125235 

 163.200 24.5194 0.826888 80.0000 75.8878 0.496000 0.361601 

0.202001 

 163.600 23.6369 0.865517 80.0000 75.8970 0.508000 0.372445 

0.215556 

 163.800 23.1975 0.884113 80.0000 75.8900 0.514000 0.377889 

0.222362 

 164.800 21.0255 0.970845 80.0000 75.8729 0.544000 0.405575 

0.256968 

 165.900 18.7768 1.05314 80.0000 75.8809 0.577000 0.436349 

0.295437 

 166.300 18.0042 1.07997 80.0000 75.8849 0.589000 0.447634 

0.309542 

 167.100 16.5391 1.12911 80.0000 75.8916 0.613000 0.470355 

0.337944 

 168.700 13.9426 1.21128 80.0000 75.8926 0.661000 0.516312 

0.395391 

 171.900 9.92581 1.32844 80.0000 75.9006 0.765128 0.611913 

0.514891 

 175.100 7.31415 1.39936 80.0000 76.2934 0.851970 0.706042 

0.632553 

 177.200 6.24037 1.42750 80.0000 76.7936 0.877350 0.759133 

0.698917 

 178.500 5.79402 1.43903 80.0000 77.0921 0.874675 0.785076 

0.731345 

 180.000 5.48100 1.44707 80.0000 77.4197 0.850000 0.804995 

0.756244 

 180.100 5.42364 1.44853 80.0000 77.4377 1.00000 0.808819 

0.761023 
49 

 180.200 5.35774 1.44853 80.0000 77.4552 1.00000 0.812567 

0.765709 

 180.300 5.29428 1.44853 80.0000 77.4724 1.00000 0.816242 

0.770303 

 181.200 4.90151 1.46182 80.0000 77.6115 1.00000 0.846456 

0.808071 

 182.100 4.58799 1.46974 80.0000 77.7280 1.00000 0.871900 

0.839875 

 183.400 4.25661 1.47807 80.0000 77.8679 1.00000 0.901627 

0.877034 

 184.700 4.02341 1.48390 80.0000 77.9840 1.00000 0.924605 

0.905756 

 187.100 3.75471 1.49059 80.0000 78.1438 1.00000 0.953568 

0.941960 

 190.000 3.58432 1.49482 80.0000 78.2528 1.00000 0.973526 

0.966908 

 193.900 3.46619 1.49482 80.0000 78.3333 1.00000 0.986639 

0.983299 

 197.300 3.43432 1.49853 80.0000 78.3710 1.00000 0.992261 

0.990327 

 200.800 3.40871 1.49917 80.0000 78.3914 1.00000 0.995579 

0.994473 

 205.600 3.38531 1.49917 80.0000 78.4041 1.00000 0.998332 

0.997915 

 210.000 3.38531 1.49917 80.0000 78.4081 1.00000 0.997666 

0.997915 

 210.100 3.38531 1.49917 75.0000 78.4083 1.00000 0.997666 

0.997915 

 210.300 3.38531 1.49917 75.0000 78.3602 1.00000 0.997666 

0.997915 

 210.700 3.38531 1.49917 75.0000 78.3370 1.00000 0.997666 

0.997915 

 211.500 3.38531 1.49917 75.0000 78.4111 1.00000 0.997666 

0.997915 

 213.100 3.38531 1.49917 75.0000 78.4509 1.00000 0.997666 

0.997915 

 216.300 3.38531 1.49917 75.0000 78.4639 1.00000 0.997666 

0.997915 

 222.700 3.38531 1.49917 75.0000 76.0268 1.00000 0.997666 

0.997915 

 235.500 3.38531 1.49917 75.0000 73.5515 1.00000 0.997666 

0.997915 

 255.000 3.38531 1.49917 75.0000 73.5435 1.00000 0.997666 

0.997915 

 255.100 3.38531 1.49917 80.0000 73.5435 1.00000 0.997666 

0.997915 

 255.300 3.38531 1.49917 80.0000 73.5919 1.00000 0.997666 

0.997915 

 255.700 3.38531 1.49917 80.0000 73.6156 1.00000 0.997666 

0.997915 

 256.500 3.38531 1.49917 80.0000 73.5418 1.00000 0.997666 

0.997915 

 258.100 3.38531 1.49917 80.0000 73.5019 1.00000 0.997666 

0.997915 

 261.300 3.38531 1.49917 80.0000 73.4904 1.00000 0.997666 

0.997915 

 267.700 3.38531 1.49917 80.0000 75.9276 1.00000 0.997666 

0.997915 

 280.500 3.38531 1.49917 80.0000 78.4030 1.00000 0.997666 

0.997915 

 300.000 3.38531 1.49917 80.0000 78.4110 1.00000 0.997666 

0.997915 
50 

Control signals

0.2 0.4 0.6 0.8 1.0

Mass flow rate (kg/s)

0.6

0.8

1.0

1.2

1.4

1.6

C2: Actuator position 

C3: Valve stem position 

Figure 8. The water mass flow rate with respect to actuator and valve stem positions of Example 

1. 

Time (s)

0 50 100 150 200 250 300

Temperature (oC)

72

74

76

78

80

82

T1: Inlet temperature

T2: Outlet temperature

Figure 9. The inlet and outlet temperatures of water pipe of Example 1. 
51 

5. Case 2: Running Programs for a Building Shell Simulation 

To illustrate a building shell simulation, a single zone model is selected as shown in Figures 10 

and 11. See pp. 99-149 of Reference 4. In this case, ‘onezone’ is used in place of ‘hvacsim’. 

Figure 10. The single-zone model. 

2

3

6.1

6.1

4

Window Exposed

Wall

Interior ceiling

Interior

Wall

W E

N

S

Not To Scale

6.1 6.1

4 4

T9

T9

T9

T9

T9

T9

T9 T7

T6

T8

T3

T4

T5

T3

T4

T2

Ceiling

East wall South wall

South window

West wall North wall

Floor

Unit: meter

View from the south View from the east
52 

Figure 11. Information flow diagram of the single-zone model. 

5.1 Creating Input Data Files for the Building Shell Simulation

5.1.1 Conduction transfer function file (hvacsim.ctf)

Execute the CTFGEN program to view the contents of the thermal property data file 

(therm2.dat). If required thermal property data of interest are missing, add them to the file. The 

following information must be provided interactively as inputs: the time step for building shell 

computation, the numbers of layers of multilayer construct, and the identification numbers of 

material in the thermal property data file. As for the order of the identification numbers, the 

outside layer comes first, then the next layer, and so on. The innermost layer should be last. 

When a construct has very low thermal capacitance, specify thermal resistance. Listing 18 shows 

the interactive session for creating the conduction transfer function file. Listing 19 is the 

resulting conduction transfer function file (hvacsim.ctf). 

Unit 2 Type 51

Ceiling

Unit 3 Type 51

Floor

Unit 4 Type 51

West wall

Unit 5 Type 51

East wall

Unit 6 Type 51

North wall

Unit 8 Type 51

South window

Unit 1 Type 50

Zone envelope

Unit 10 Type 52

Zone model

Unit 7 Type 51

South wall

T9

T9

T9

T9

T9

T9

T9

T10 T1

T1, T10

T1, T10

T1, T10

T1, T10

T1, T10

T1, T10

T1, T10

T4

T3

T2

T5

T7

T6

T8

q1, q2

q3

Unit 9

Type 53

Weather

input

T12

h3

p3

q6

q7

q8
53 

Listing 18. Interactive session to create conduction transfer functions. 

C:\HVACSIM20\WORK>ctfgen 

 Enter the name of the thermal property data file, 

 or carriage return for default name: therm2.dat 

=> 

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

 select your choice: 

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

Enter A, C, D, or E 

A : Add thermal property data to the construction 

 materials database 

C : Create a ctf data file 

D : Display the contents of the database file 

E : End 

=> c 

 Enter the name of the ctf definition file, 

 or carriage return for default name: ctfinput.dat 

=> 

 Enter the name of the ctf output file, 

 or carriage return for default name: hvacsim.ctf 

=> 

 What kind units are used for material properties? 

Enter 1 for metric units 

 2 for standard(English)units 

=> 1 

 What kind of output do you want? 

 0 : for a very simple output, 

 1 : for a less simple output, 

 2 : for detailed output or 

 3 : for root search 

=> 0 

 What is the time interval for ctf calculation in s ? 

=> 900 

 This construct id number (istr) is 1 

How many layers in this construct? (max. = 10 ) 

=> 4 

 Enter the layer id numbers with most outer layer first 

=> 47 46 36 53 

 istr: 1 

nctf: 6 nord: 4 

uval: 0.968215525 

ctfx: 5.77757454 -13.3066082 10.6433306 -3.46747708 0.402874321 -1.01672607E-02 -

2.20753591E-05 

ctfy: 1.29634060E-07 5.59825916E-04 9.70261917E-03 1.98281351E-02 8.42879154E-03 

9.43974766E-04 4.09526147E-05 

ctfz: 14.5398598 -34.2151947 27.8764000 -9.31735039 1.20246959 -4.65699472E-02 -

1.10163681E-04 

ctfq: 1.68333852 -0.867561460 0.150875375 -7.45377177E-03 

Do you want to continue? <y/n> 

=> y 

 This construct id number (istr) is 2 

How many layers in this construct? (max. = 10 ) 

=> 4 

 Enter the layer id numbers with most outer layer first 

=> 53 36 46 47 

 istr: 2 

nctf: 6 nord: 4 

uval: 0.968215525 
54 

ctfx: 14.5398598 -34.2151947 27.8764000 -9.31735039 1.20246959 -4.65699472E-02 -

1.10163681E-04 

ctfy: 1.29634060E-07 5.59825916E-04 9.70261917E-03 1.98281351E-02 8.42879154E-03 

9.43974766E-04 4.09526147E-05 

ctfz: 5.77757454 -13.3066082 10.6433306 -3.46747708 0.402874321 -1.01672607E-02 -

2.20753591E-05 

ctfq: 1.68333852 -0.867561460 0.150875375 -7.45377177E-03 

Do you want to continue? <y/n> 

=> y 

 This construct id number (istr) is 3 

How many layers in this construct? (max. = 10 ) 

=> 3 

 Enter the layer id numbers with most outer layer first 

=> 43 8 43 

 istr: 3 

nctf: 3 nord: 1 

uval: 4.71099043 

ctfx: 29.3481579 -25.1638699 0.354720056 2.57876702E-03 

ctfy: 1.78437543 2.59330821 0.161323264 2.57876702E-03 

ctfz: 29.3481579 -25.1638699 0.354720056 2.57876702E-03 

ctfq: 3.59595045E-02 

Do you want to continue? <y/n> 

=> y 

 This construct id number (istr) is 4 

How many layers in this construct? (max. = 10 ) 

=> 4 

 Enter the layer id numbers with most outer layer first 

=> 2 10 8 43 

 istr: 4 

nctf: 5 nord: 4 

uval: 0.691656530 

ctfx: 59.4346199 -106.359474 54.9494362 -8.31945229 0.364596575 -4.13608598E-03 

ctfy: 1.20150007E-05 5.33784321E-03 3.22867334E-02 2.44872365E-02 3.36399884E-03 

1.03239363E-04 

ctfz: 28.0523319 -60.2245445 39.8903046 -7.92132902 0.270762205 -1.93616585E-03 

ctfq: 1.20370615 -0.316528589 1.82767957E-02 -2.86226335E-04 

Do you want to continue? <y/n> 

=> y 

 This construct id number (istr) is 5 

How many layers in this construct? (max. = 10 ) 

=> 3 

 Enter the layer id numbers with most outer layer first 

=> 52 8 52 

 istr: 5 

nctf: 1 nord: 1 

uval: 5.17124224 

ctfx: 12.8699331 -7.69869089 

ctfy: 4.48962641 0.681615591 

ctfz: 12.8699331 -7.69869089 

ctfq: 2.17744880E-08 

Do you want to continue? <y/n> 

=> n 

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

 select your choice: 

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

Enter A, C, D, or E 

A : Add thermal property data to the construction 

 materials database 

C : Create a ctf data file 

D : Display the contents of the database file 

E : End 

=> d 
55 

================================================================================ 

 Therm2.dat Thermal Properties of Building Wall and Roof 

 Revised: 9/8/1999 

 Ref: ASHRAE Handbook 1997 Fundamentals p.28.19 

=============================================================================== 

ID Description Thickness k Density Sp.Ht 

 (m) (W/m-K) (kg/m3) (kJ/kg-K) 

=============================================================================== 

 1 Stucco 25.4 mm(1") 0.0254 0.692 1858. 0.840 0.036 

47.2 A1 

 2 Face brick 101.6 mm(4") 0.1016 1.298 2082. 0.924 0.078 

211.4 A2 

 3 Steel siding 0.0015 44.990 7689. 0.420 0.000 

11.7 A3 

 4 Slag membrane 12.7 mm(0.5") 0.0127 1.143 881. 1.680 0.011 

11.2 A4 

 5 Felt 9.5 mm(0.375") 0.0095 0.190 1121. 1.680 0.050 

10.6 A5 

 6 Finish 0.0127 0.415 1249. 1.092 0.031 

15.9 A6 

 7 Face brick 101.6 mm(4") 0.1016 1.332 2002. 0.924 0.076 

203.1 A7 

 8 Air space resistance 0.0000 0.000 0. 0.000 0.160 

0.0 B1 

 9 Insulation 25.4 mm(1") 0.0254 0.043 32. 0.840 0.585 

0.8 B2 

10 Insulation 50.8 mm(2") 0.0508 0.043 32. 0.840 1.176 

1.6 B3 

11 Insulation 76.2 mm(3") 0.0762 0.043 32. 0.840 1.766 

2.4 B4 

12 Insulation 25.4 mm(1") 0.0254 0.043 91. 0.840 0.586 

2.3 B5 

13 Insulation 50.8 mm(2") 0.0508 0.043 91. 0.840 1.176 

4.6 B6 

14 Wood 25.4 mm(1") 0.0254 0.116 592. 2.520 0.209 

15.0 B7 

15 Wood 63.5 mm(2.5") 0.0635 0.116 592. 2.520 0.525 

37.6 B8 

16 Wood 101.6 mm(4") 0.1016 0.116 592. 2.520 0.838 

60.0 B9 

17 Wood 50.8 mm(2") 0.0508 0.116 592. 2.520 0.421 

30.2 B10 

18 Wood 76.2 mm(3") 0.0762 0.116 592. 2.520 0.631 

45.2 B11 

19 Insulation 76.2 mm(3") 0.0762 0.043 91. 0.840 1.761 

6.9 B12 

20 Insulation 101.6 mm(4") 0.1016 0.043 91. 0.840 2.346 

9.3 B13 

21 Insulation 127.0 mm(5") 0.1270 0.043 91. 0.840 2.934 

11.6 B14 

22 Insulation 152.4 mm(6") 0.1524 0.043 91. 0.840 3.520 

13.9 B15 

23 Clay tile 101.6 mm(4") 0.1016 0.571 1121. 0.840 0.178 

113.7 C1 

24 Concrete block l.w. 101.6 mm(4") 0.1016 0.381 608. 0.840 0.266 

62.0 C2 

25 Concrete block h.w. 101.6 mm(4") 0.1016 0.813 977. 0.840 0.125 

99.1 C3 
56 

26 Common brick 101.6 mm(4") 0.1016 0.727 1922. 0.840 0.139 

195.3 C4 

27 Concrete l.w. 101.6 mm(4") 0.1016 1.730 2242. 0.840 0.059 

227.5 C5 

28 Clay tile 203.2 mm(8") 0.2032 0.571 1121. 0.840 0.356 

227.9 C6 

29 Concrete block l.w. 203.2 mm(8") 0.2032 0.571 608. 0.840 0.356 

124.0 C7 

30 Concrete block h.w. 203.2 mm(8") 0.2032 1.038 977. 0.840 0.195 

198.7 C8 

31 Common brick 203.2 mm(8") 0.2032 0.727 1922. 0.840 0.280 

390.6 C9 

32 Concrete h.w. 203.2 mm(8") 0.2032 1.730 2242. 0.840 0.117 

455.9 C10 

33 Concrete h.w. 304.8 mm(12") 0.3048 1.730 2242. 0.840 0.176 

683.5 C11 

34 Concrete h.w. 50.8 mm(2") 0.0508 1.730 2242. 0.840 0.029 

114.2 C12 

35 Concrete h.w. 152.4 mm(6") 0.1524 1.730 2242. 0.840 0.088 

341.7 C13 

36 Concrete l.w. 101.6 mm(4") 0.1016 0.173 640. 0.840 0.586 

64.9 C14 

37 Concrete l.w. 152.4 mm(6") 0.1524 0.173 640. 0.840 0.088 

97.6 C15 

38 Concrete l.w. 203.2 mm(8") 0.2032 0.173 640. 0.840 1.174 

130.3 C16 

39 Concrete block(filled) l.w. 203.2 mm(8") 0.2032 0.138 288. 0.840 1.584 

58.6 C17 

40 Concrete block(filled) l.w. 203.2 mm(8") 0.2032 0.588 849. 0.840 0.348 

172.8 C18 

41 Concrete block(filled) l.w. 304.8 mm(12") 0.3048 0.138 304. 0.840 2.376 

92.8 C19 

42 Concrete block (filled)l.w. 304.8 mm(12") 0.3048 0.675 897. 0.840 0.456 

273.4 C20 

43 Plaster/gypsum 19.0 mm(0.75") 0.0190 0.727 1601. 0.840 0.026 

30.5 E1 

44 Slag or stone 12.7 mm(0.5") 0.0127 1.436 881. 1.680 0.009 

11.2 E2 

45 Felt & membrane 9.5 mm(0.375") 0.0095 0.190 1121. 1.680 0.050 

10.7 E3 

46 Ceiling air space 0.0000 0.000 0. 0.000 0.176 

0.0 E4 

47 Acoustic tile 0.0159 0.061 480. 0.840 0.315 

9.2 E5 

48 Face brick wall 10-1/2" 0.2667 1.332 2002. 0.924 0.000 

533.9 XXX 

49 Insulation 1-5/8" 0.0413 0.043 32. 0.840 0.000 

1.3 XXX 

50 Concrete h.w. 8-1/2" 0.2159 1.730 2242. 0.840 0.000 

484.0 XXX 

51 Insulation 1/2" 0.0127 0.043 32. 0.840 0.000 

0.4 XXX 

52 Glass window 1/2" 0.0127 0.761 707. 0.840 0.000 

9.0 XXX 

53 Vinyl tile 3/32" 0.0024 0.270 1552. 1.004 0.000 

3.7 XXX 

54 Concrete h.w. 10" 0.2540 1.730 2242. 0.840 0.000 

569.5 XXX 

55 Insulation 2-1/2" 0.0635 0.043 32. 0.840 0.000 

2.0 XXX 

56 Plywood 6.4 mm (0.25") 0.0064 0.120 540. 1.210 0.053 

3.5 
57 

57 Glass window 3.2 mm (0.125") 0.0032 0.761 707. 0.840 0.000 

2.3 

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

 select your choice: 

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

Enter A, C, D, or E 

A : Add thermal property data to the construction 

 materials database 

C : Create a ctf data file 

D : Display the contents of the database file 

E : End 

=> e 

 ********** End of ctf run ********** 

Listing 19. The conduction transfer function file (hvacsim.ctf).

 900.000 

 1 6 4 0.968216 

 5.77757 -13.3066 10.6433 -3.46748 0.402874 

 -0.101673E-01 -0.220754E-04 

 0.129634E-06 0.559826E-03 0.970262E-02 0.198281E-01 0.842879E-02 

 0.943975E-03 0.409526E-04 

 14.5399 -34.2152 27.8764 -9.31735 1.20247 

 -0.465699E-01 -0.110164E-03 

 1.68334 -0.867561 0.150875 -0.745377E-02 

 2 6 4 0.968216 

 14.5399 -34.2152 27.8764 -9.31735 1.20247 

 -0.465699E-01 -0.110164E-03 

 0.129634E-06 0.559826E-03 0.970262E-02 0.198281E-01 0.842879E-02 

 0.943975E-03 0.409526E-04 

 5.77757 -13.3066 10.6433 -3.46748 0.402874 

 -0.101673E-01 -0.220754E-04 

 1.68334 -0.867561 0.150875 -0.745377E-02 

 3 3 1 4.71099 

 29.3482 -25.1639 0.354720 0.257877E-02 

 1.78438 2.59331 0.161323 0.257877E-02 

 29.3482 -25.1639 0.354720 0.257877E-02 

 0.359595E-01 

 4 5 4 0.691657 

 59.4346 -106.359 54.9494 -8.31945 0.364597 

 -0.413609E-02 

 0.120150E-04 0.533784E-02 0.322867E-01 0.244872E-01 0.336400E-02 

 0.103239E-03 

 28.0523 -60.2245 39.8903 -7.92133 0.270762 

 -0.193617E-02 

 1.20371 -0.316529 0.182768E-01 -0.286226E-03 

 5 1 1 5.17124 

 12.8699 -7.69869 

 4.48963 0.681616 

 12.8699 -7.69869 

 0.217745E-07 
58 

5.1.2 Weather data file (hvacsim.met) 

Execute the RDWDF program interactively to read weather data from a whole year weather data 

file and create the data file (wtpout.dat). Taking this file as input file, the program CRWDTA 

then creates the needed weather data file (hvacsim.met). 

Listing 20 shows the interactive session to generate the weather data file. Listings 21 and 22

show the output file of RDWDF and the resulting weather data file, respectively. 

If no weather data is available, the CRWDTA program can be used to make a weather data file 

artificially. For a given period of time, barometric pressure, wind speed, relative humidity, 

maximum dry-bulb outside air temperature, minimum dry-bulb air temperature, visibility, and 

geographic correction factor are to be provided. Listings 23 and 24 show the interactive session 

and the artificially generated weather data file. 

Listing 20. Interactive session to generate weather data file.

C:\HVACSIM20\WORK>rdwdf 

 Enter input file name up to 12 characters --- 

=> vasterlw.wy2 

 What is the type of weather data format? 

 Enter 1 for (TRY), 2 (TMY), 3 (SOLMET), 4 (WYEC), 

 5 (WYEC2) 

=> 5 

 Where is the weather station? 

 Enter station ID number 

=> 93734 

 Enter the year (4 digits) 

=> 1961 

 Type the start date: Month,Day 

=> 7, 7 

 Type the stop date: Month,Day 

=> 7, 9 

 ---- The first day of the weather data ---- 

 sttn= 93734 wyr= 59 wmo= 1 wdy= 1 

------- The start day ------- 

 sttn= 93734 wyr= 61 wmo= 7 wdy= 7 

 ------- The stop day ------- 

 sttn= 93734 wyr= 61 wmo= 7 wdy= 9 

 3 Days written on the output file 

--------- Normal end of job ------ 

C:\HVACSIM20\WORK>crwdta 

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

 * * 

 * Creating a weather data file * 

 * * 

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

 Enter latitude, longitude, and time zone: 

=> 38.85 77.03 5 

 Enter one of the following: 

 1 - to process the weather data in file wtpout.dat 

 (previously read from weather file by program rdwdf) 

 2 - to generate clear sky design data 

 3 - to generate cloudy sky design data 
59 

=> 1 

 Enter output file name (up to 40 characters) 

 or carriage return for default name: hvacsim.met 

=> 

 End of input data file 

---- End of creating weather file ------ 

Listing 21. The output file of RDWDF (wtpout.dat).

sttn yr mo day hr db dp p ws cc izero ibeam 

isky ithorz 

 (c) (c) (kpa) (m/s) (w/m**2) (w/m**2) 

(w/m**2) (w/m**2) 

 93734 61 7 7 1 20.00 18.3 101.3 15.0 0 0.00 0.00 

0.00 0.00 

 93734 61 7 7 2 19.40 18.3 101.3 0.0 0 0.00 0.00 

0.00 0.00 

 93734 61 7 7 3 19.40 18.3 101.2 0.0 8 0.00 0.00 

0.00 0.00 

 93734 61 7 7 4 19.40 18.3 101.2 0.0 4 0.00 0.00 

0.00 0.00 

 93734 61 7 7 5 19.40 18.3 101.2 20.0 10 1.39 0.00 

0.00 0.00 

 93734 61 7 7 6 19.40 18.3 101.2 20.0 8 138.89 0.00 

4.44 4.44 

 93734 61 7 7 7 20.60 19.4 101.3 20.0 10 383.89 0.00 

54.44 54.44 

 93734 61 7 7 8 22.20 19.4 101.3 0.0 9 626.11 13.61 

160.00 166.39 

 93734 61 7 7 9 23.30 18.9 101.3 20.0 9 847.78 105.56 

286.94 354.72 

 93734 61 7 7 10 22.80 19.4 101.3 30.0 10 1033.61 111.11 

392.78 479.72 

 93734 61 7 7 11 24.40 20.0 101.2 25.0 10 1170.56 116.67 

480.28 583.61 

 93734 61 7 7 12 24.40 19.4 101.2 25.0 10 1249.72 179.44 

461.11 630.83 

 93734 61 7 7 13 25.60 19.4 101.1 30.0 7 1265.56 436.39 

426.11 844.17 

 93734 61 7 7 14 26.70 20.0 101.1 41.0 5 1216.67 99.17 

392.22 483.61 

 93734 61 7 7 15 27.20 20.6 101.0 30.0 6 1106.94 184.44 

386.94 541.39 

 93734 61 7 7 16 26.70 19.4 101.0 36.0 8 943.33 376.94 

291.67 560.83 

 93734 61 7 7 17 26.70 19.4 100.9 30.0 8 737.22 618.61 

116.94 461.94 

 93734 61 7 7 18 26.10 19.4 100.9 41.0 9 502.78 474.44 

107.78 288.33 

 93734 61 7 7 19 25.00 19.4 100.9 30.0 9 256.39 72.78 

69.72 83.89 

 93734 61 7 7 20 23.30 20.0 100.9 30.0 7 40.00 0.00 

1.94 1.94 

 93734 61 7 7 21 22.80 20.0 100.9 30.0 8 0.00 0.00 

0.00 0.00 

 93734 61 7 7 22 22.80 20.0 100.9 30.0 7 0.00 0.00 

0.00 0.00 

 93734 61 7 7 23 22.20 20.6 100.9 25.0 7 0.00 0.00 

0.00 0.00 

 93734 61 7 7 24 21.70 20.6 100.8 25.0 6 0.00 0.00 

0.00 0.00 

 93734 61 7 8 1 21.10 20.0 100.8 20.0 8 0.00 0.00 

0.00 0.00 

 93734 61 7 8 2 20.60 19.4 100.8 25.0 5 0.00 0.00 

0.00 0.00 
60 

 93734 61 7 8 3 20.00 18.9 100.7 20.0 3 0.00 0.00 

0.00 0.00 

 93734 61 7 8 4 19.40 18.9 100.7 20.0 4 0.00 0.00 

0.00 0.00 

 93734 61 7 8 5 19.40 18.3 100.8 20.0 4 1.39 0.00 

0.00 0.00 

 93734 61 7 8 6 18.90 18.3 100.8 25.0 10 136.67 0.00 

18.89 18.89 

 93734 61 7 8 7 20.00 18.9 100.8 25.0 4 381.94 128.06 

108.33 145.28 

 93734 61 7 8 8 21.70 19.4 100.9 25.0 6 624.44 383.06 

165.28 346.11 

 93734 61 7 8 9 22.80 20.0 100.9 30.0 3 846.11 570.00 

174.17 539.17 

 93734 61 7 8 10 24.40 20.0 100.9 25.0 3 1032.22 634.72 

203.89 699.72 

 93734 61 7 8 11 25.60 20.0 100.8 0.0 3 1169.72 685.28 

219.17 825.83 

 93734 61 7 8 12 27.20 16.7 100.8 41.0 2 1248.89 682.78 

255.83 901.11 

 93734 61 7 8 13 27.20 11.7 100.8 56.0 2 1264.72 655.28 

286.94 914.17 

 93734 61 7 8 14 27.20 12.8 100.8 51.0 2 1216.11 559.72 

330.83 846.11 

 93734 61 7 8 15 26.70 15.0 100.8 51.0 5 1106.39 480.56 

320.83 723.33 

 93734 61 7 8 16 26.10 13.3 100.8 56.0 7 942.78 142.78 

348.89 450.56 

 93734 61 7 8 17 25.60 12.8 100.8 56.0 7 736.67 447.78 

200.56 450.28 

 93734 61 7 8 18 25.60 12.8 100.8 61.0 7 501.94 591.67 

106.94 331.67 

 93734 61 7 8 19 23.30 12.8 100.9 61.0 7 255.56 321.11 

64.44 126.67 

 93734 61 7 8 20 21.10 11.1 100.9 61.0 7 39.44 0.00 

3.33 3.33 

 93734 61 7 8 21 20.00 11.1 101.0 36.0 8 0.00 0.00 

0.00 0.00 

 93734 61 7 8 22 19.40 11.1 101.1 41.0 4 0.00 0.00 

0.00 0.00 

 93734 61 7 8 23 18.90 11.7 101.1 46.0 3 0.00 0.00 

0.00 0.00 

 93734 61 7 8 24 18.30 11.7 101.1 36.0 3 0.00 0.00 

0.00 0.00 

 93734 61 7 9 1 17.80 11.7 101.1 25.0 2 0.00 0.00 

0.00 0.00 

 93734 61 7 9 2 17.20 11.7 101.0 30.0 0 0.00 0.00 

0.00 0.00 

 93734 61 7 9 3 15.00 12.2 101.0 41.0 0 0.00 0.00 

0.00 0.00 

 93734 61 7 9 4 15.00 12.2 101.1 36.0 0 0.00 0.00 

0.00 0.00 

 93734 61 7 9 5 15.00 12.2 101.1 30.0 0 0.83 0.00 

0.00 0.00 

 93734 61 7 9 6 16.10 12.8 101.2 30.0 0 134.44 1.67 

32.22 32.50 

 93734 61 7 9 7 18.90 13.3 101.2 46.0 0 379.72 327.22 

98.06 192.22 

 93734 61 7 9 8 19.40 13.9 101.2 41.0 0 622.50 546.39 

124.17 381.67 

 93734 61 7 9 9 21.10 13.9 101.2 41.0 0 844.72 626.67 

160.00 560.56 

 93734 61 7 9 10 22.20 14.4 101.3 36.0 1 1030.83 703.33 

184.17 732.78 

 93734 61 7 9 11 23.90 15.0 101.3 30.0 3 1168.61 779.17 

175.56 864.72 

 93734 61 7 9 12 25.00 14.4 101.2 41.0 6 1248.06 796.94 

191.39 944.17 

 93734 61 7 9 13 25.00 13.9 101.2 61.0 8 1264.17 751.67 

251.39 970.56 
61 

 93734 61 7 9 14 25.60 13.3 101.2 46.0 6 1215.56 496.39 

365.56 822.22 

 93734 61 7 9 15 26.70 13.9 101.1 36.0 7 1105.83 393.89 

350.28 680.00 

 93734 61 7 9 16 25.00 13.3 101.1 46.0 7 942.22 346.39 

309.72 556.67 

 93734 61 7 9 17 25.60 12.8 101.1 46.0 5 736.11 30.83 

229.72 246.94 

 93734 61 7 9 18 25.00 10.0 101.2 41.0 4 501.39 177.78 

156.94 224.44 

 93734 61 7 9 19 23.90 11.7 101.2 41.0 6 254.44 183.33 

69.44 104.72 

 93734 61 7 9 20 21.70 11.1 101.3 36.0 8 38.61 0.00 

2.78 2.78 

 93734 61 7 9 21 20.60 11.1 101.3 20.0 6 0.00 0.00 

0.00 0.00 

 93734 61 7 9 22 21.10 12.2 101.4 61.0 3 0.00 0.00 

0.00 0.00 

 93734 61 7 9 23 18.90 10.6 101.4 51.0 3 0.00 0.00 

0.00 0.00 

 93734 61 7 9 24 19.40 10.6 101.4 0.0 7 0.00 0.00 

0.00 0.00 

Listing 22. The weather data file (hvacsim.met).

 7 7 38.85 77.03 5.00 1 

 7 7 0.0 20.0000 0.0131 101.3000 15.0000 0.0000 0.0000 0.0000 

 7 7 1.0 20.0000 0.0131 101.3000 15.0000 0.0000 0.0000 0.0000 

 7 7 2.0 19.4000 0.0131 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 7 3.0 19.4000 0.0131 101.2000 0.0000 0.0000 0.0000 0.0000 

 7 7 4.0 19.4000 0.0131 101.2000 0.0000 0.0000 0.0000 0.0000 

 7 7 5.0 19.4000 0.0131 101.2000 20.0000 0.0000 0.0000 0.0000 

 7 7 6.0 19.4000 0.0131 101.2000 20.0000 0.0000 4.4400 4.4400 

 7 7 7.0 20.6000 0.0141 101.3000 20.0000 0.0000 54.4400 54.4400 

 7 7 8.0 22.2000 0.0141 101.3000 0.0000 13.6100 160.0000 166.3900 

 7 7 9.0 23.3000 0.0136 101.3000 20.0000 105.5600 286.9400 354.7200 

 7 7 10.0 22.8000 0.0141 101.3000 30.0000 111.1100 392.7800 479.7200 

 7 7 11.0 24.4000 0.0146 101.2000 25.0000 116.6700 480.2800 583.6100 

 7 7 12.0 24.4000 0.0141 101.2000 25.0000 179.4400 461.1100 630.8300 

 7 7 13.0 25.6000 0.0141 101.1000 30.0000 436.3900 426.1100 844.1700 

 7 7 14.0 26.7000 0.0147 101.1000 41.0000 99.1700 392.2200 483.6100 

 7 7 15.0 27.2000 0.0152 101.0000 30.0000 184.4400 386.9400 541.3900 

 7 7 16.0 26.7000 0.0141 101.0000 36.0000 376.9400 291.6700 560.8300 

 7 7 17.0 26.7000 0.0141 100.9000 30.0000 618.6100 116.9400 461.9400 

 7 7 18.0 26.1000 0.0141 100.9000 41.0000 474.4400 107.7800 288.3300 

 7 7 19.0 25.0000 0.0141 100.9000 30.0000 72.7800 69.7200 83.8900 

 7 7 20.0 23.3000 0.0147 100.9000 30.0000 0.0000 1.9400 1.9400 

 7 7 21.0 22.8000 0.0147 100.9000 30.0000 0.0000 0.0000 0.0000 

 7 7 22.0 22.8000 0.0147 100.9000 30.0000 0.0000 0.0000 0.0000 

 7 7 23.0 22.2000 0.0153 100.9000 25.0000 0.0000 0.0000 0.0000 

 7 7 24.0 21.7000 0.0153 100.8000 25.0000 0.0000 0.0000 0.0000 

 7 8 1.0 21.1000 0.0147 100.8000 20.0000 0.0000 0.0000 0.0000 

 7 8 2.0 20.6000 0.0142 100.8000 25.0000 0.0000 0.0000 0.0000 

 7 8 3.0 20.0000 0.0137 100.7000 20.0000 0.0000 0.0000 0.0000 

 7 8 4.0 19.4000 0.0137 100.7000 20.0000 0.0000 0.0000 0.0000 

 7 8 5.0 19.4000 0.0132 100.8000 20.0000 0.0000 0.0000 0.0000 

 7 8 6.0 18.9000 0.0132 100.8000 25.0000 0.0000 18.8900 18.8900 

 7 8 7.0 20.0000 0.0137 100.8000 25.0000 128.0600 108.3300 145.2800 

 7 8 8.0 21.7000 0.0141 100.9000 25.0000 383.0600 165.2800 346.1100 

 7 8 9.0 22.8000 0.0147 100.9000 30.0000 570.0000 174.1700 539.1700 

 7 8 10.0 24.4000 0.0147 100.9000 25.0000 634.7200 203.8900 699.7200 

 7 8 11.0 25.6000 0.0147 100.8000 0.0000 685.2800 219.1700 825.8300 

 7 8 12.0 27.2000 0.0119 100.8000 41.0000 682.7800 255.8300 901.1100 

 7 8 13.0 27.2000 0.0086 100.8000 56.0000 655.2800 286.9400 914.1700 

 7 8 14.0 27.2000 0.0092 100.8000 51.0000 559.7200 330.8300 846.1100 

 7 8 15.0 26.7000 0.0107 100.8000 51.0000 480.5600 320.8300 723.3300 
62 

 7 8 16.0 26.1000 0.0095 100.8000 56.0000 142.7800 348.8900 450.5600 

 7 8 17.0 25.6000 0.0092 100.8000 56.0000 447.7800 200.5600 450.2800 

 7 8 18.0 25.6000 0.0092 100.8000 61.0000 591.6700 106.9400 331.6700 

 7 8 19.0 23.3000 0.0092 100.9000 61.0000 321.1100 64.4400 126.6700 

 7 8 20.0 21.1000 0.0082 100.9000 61.0000 0.0000 3.3300 3.3300 

 7 8 21.0 20.0000 0.0082 101.0000 36.0000 0.0000 0.0000 0.0000 

 7 8 22.0 19.4000 0.0082 101.1000 41.0000 0.0000 0.0000 0.0000 

 7 8 23.0 18.9000 0.0085 101.1000 46.0000 0.0000 0.0000 0.0000 

 7 8 24.0 18.3000 0.0085 101.1000 36.0000 0.0000 0.0000 0.0000 

 7 9 1.0 17.8000 0.0085 101.1000 25.0000 0.0000 0.0000 0.0000 

 7 9 2.0 17.2000 0.0085 101.0000 30.0000 0.0000 0.0000 0.0000 

 7 9 3.0 15.0000 0.0088 101.0000 41.0000 0.0000 0.0000 0.0000 

 7 9 4.0 15.0000 0.0088 101.1000 36.0000 0.0000 0.0000 0.0000 

 7 9 5.0 15.0000 0.0088 101.1000 30.0000 0.0000 0.0000 0.0000 

 7 9 6.0 16.1000 0.0092 101.2000 30.0000 1.6700 32.2200 32.5000 

 7 9 7.0 18.9000 0.0095 101.2000 46.0000 327.2200 98.0600 192.2200 

 7 9 8.0 19.4000 0.0099 101.2000 41.0000 546.3900 124.1700 381.6700 

 7 9 9.0 21.1000 0.0099 101.2000 41.0000 626.6700 160.0000 560.5600 

 7 9 10.0 22.2000 0.0102 101.3000 36.0000 703.3300 184.1700 732.7800 

 7 9 11.0 23.9000 0.0106 101.3000 30.0000 779.1700 175.5600 864.7200 

 7 9 12.0 25.0000 0.0102 101.2000 41.0000 796.9400 191.3900 944.1700 

 7 9 13.0 25.0000 0.0099 101.2000 61.0000 751.6700 251.3900 970.5600 

 7 9 14.0 25.6000 0.0095 101.2000 46.0000 496.3900 365.5600 822.2200 

 7 9 15.0 26.7000 0.0099 101.1000 36.0000 393.8900 350.2800 680.0000 

 7 9 16.0 25.0000 0.0095 101.1000 46.0000 346.3900 309.7200 556.6700 

 7 9 17.0 25.6000 0.0092 101.1000 46.0000 30.8300 229.7200 246.9400 

 7 9 18.0 25.0000 0.0076 101.2000 41.0000 177.7800 156.9400 224.4400 

 7 9 19.0 23.9000 0.0085 101.2000 41.0000 183.3300 69.4400 104.7200 

 7 9 20.0 21.7000 0.0082 101.3000 36.0000 0.0000 2.7800 2.7800 

 7 9 21.0 20.6000 0.0082 101.3000 20.0000 0.0000 0.0000 0.0000 

 7 9 22.0 21.1000 0.0088 101.4000 61.0000 0.0000 0.0000 0.0000 

 7 9 23.0 18.9000 0.0079 101.4000 51.0000 0.0000 0.0000 0.0000 

 7 9 24.0 19.4000 0.0079 101.4000 0.0000 0.0000 0.0000 0.0000 

Listing 23. Interactive session to generate a weather data file artificially.

C:\HVACSIM20\WORK>crwdta 

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

 * * 

 * Creating a weather data file * 

 * * 

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

 Enter latitude, longitude, and time zone: 

=> 38.85, 77.03, 5 

 Enter one of the following: 

 1 - to process the weather data in file wtpout.dat 

 (previously read from weather file by program rdwdf) 

 2 - to generate clear sky design data 

 3 - to generate cloudy sky design data 

=> 2 

 Enter output file name (up to 40 characters) 

 or carriage return for default name: hvacsim.met 

=> onezone.met 

 Enter initial day and month, and number of days 

 for which weather calculations will be made 

=> 7, 7, 2 

 Enter pressure (kpa), wind speed (m/s), and 

 relative humidity (%) 

=> 101.3, 0.0, 80.0 

 Enter minimum and maximum temperatures (C): 

=> 20.0, 30.0 

 Enter visibility (km); if value unknown, use 0: 
63 

=> 0 

 Enter geographic correction factor 

 [ASHRAE Fund. 1981, p.27.8]; if value unknown, use 1: 

=> 1 

---- End of creating weather file ------ 

Listing 24. The artificially generated weather data file (onezone.met)

 7 7 38.85 77.03 5.00 2 

 7 7 0.0 21.3000 0.0128 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 7 1.0 21.3000 0.0128 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 7 2.0 20.8000 0.0124 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 7 3.0 20.4000 0.0121 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 7 4.0 20.1000 0.0119 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 7 5.0 20.0000 0.0118 101.3000 0.0000 170.1502 23.4807 40.4957 

 7 7 6.0 20.2000 0.0120 101.3000 0.0000 194.7813 26.8798 47.8847 

 7 7 7.0 20.7000 0.0124 101.3000 0.0000 582.1419 80.3356 252.2150 

 7 7 8.0 21.6000 0.0131 101.3000 0.0000 741.2581 102.2936 457.3346 

 7 7 9.0 22.9000 0.0142 101.3000 0.0000 819.7220 113.1216 643.0477 

 7 7 10.0 24.4000 0.0156 101.3000 0.0000 862.7645 119.0615 797.4857 

 7 7 11.0 26.1000 0.0173 101.3000 0.0000 886.6649 122.3597 910.6406 

 7 7 12.0 27.7000 0.0190 101.3000 0.0000 898.1992 123.9515 975.0670 

 7 7 13.0 28.9000 0.0205 101.3000 0.0000 900.1130 124.2156 986.4938 

 7 7 14.0 29.7000 0.0215 101.3000 0.0000 892.8299 123.2105 944.1614 

 7 7 15.0 30.0000 0.0218 101.3000 0.0000 874.6891 120.7071 850.8807 

 7 7 16.0 29.7000 0.0215 101.3000 0.0000 840.9759 116.0547 712.8135 

 7 7 17.0 29.0000 0.0206 101.3000 0.0000 780.5695 107.7186 538.9755 

 7 7 18.0 27.9000 0.0193 101.3000 0.0000 664.8447 91.7486 340.4997 

 7 7 19.0 26.6000 0.0178 101.3000 0.0000 403.6763 55.7073 131.0875 

 7 7 20.0 25.3000 0.0165 101.3000 0.0000 170.1502 23.4807 40.4957 

 7 7 21.0 24.2000 0.0154 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 7 22.0 23.2000 0.0145 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 7 23.0 22.4000 0.0138 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 7 24.0 21.8000 0.0133 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 8 1.0 21.3000 0.0128 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 8 2.0 20.8000 0.0124 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 8 3.0 20.4000 0.0121 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 8 4.0 20.1000 0.0119 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 8 5.0 20.0000 0.0118 101.3000 0.0000 170.1502 23.4807 40.4957 

 7 8 6.0 20.2000 0.0120 101.3000 0.0000 189.4346 26.1420 46.2459 

 7 8 7.0 20.7000 0.0124 101.3000 0.0000 580.1869 80.0658 250.4581 

 7 8 8.0 21.6000 0.0131 101.3000 0.0000 740.4184 102.1777 455.7845 

 7 8 9.0 22.9000 0.0142 101.3000 0.0000 819.2831 113.0611 641.7191 

 7 8 10.0 24.4000 0.0156 101.3000 0.0000 862.5037 119.0255 796.3788 

 7 8 11.0 26.1000 0.0173 101.3000 0.0000 886.4948 122.3363 909.7438 

 7 8 12.0 27.7000 0.0190 101.3000 0.0000 898.0789 123.9349 974.3557 

 7 8 13.0 28.9000 0.0205 101.3000 0.0000 900.0196 124.2027 985.9312 

 7 8 14.0 29.7000 0.0215 101.3000 0.0000 892.7477 123.1992 943.7010 

 7 8 15.0 30.0000 0.0218 101.3000 0.0000 874.6019 120.6951 850.4693 

 7 8 16.0 29.7000 0.0215 101.3000 0.0000 840.8578 116.0384 712.3941 

 7 8 17.0 29.0000 0.0206 101.3000 0.0000 780.3615 107.6899 538.4907 

 7 8 18.0 27.9000 0.0193 101.3000 0.0000 664.3658 91.6825 339.8946 

 7 8 19.0 26.6000 0.0178 101.3000 0.0000 402.1967 55.5031 130.3312 

 7 8 20.0 25.3000 0.0165 101.3000 0.0000 170.1502 23.4807 40.4957 

 7 8 21.0 24.2000 0.0154 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 8 22.0 23.2000 0.0145 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 8 23.0 22.4000 0.0138 101.3000 0.0000 0.0000 0.0000 0.0000 

 7 8 24.0 21.8000 0.0133 101.3000 0.0000 0.0000 0.0000 0.0000 
64 

5.1.3 Simulation work file (onezone.sim) 

Listing 25. is the simulation work file generated by using HVACGEN. No interactive session is 

shown here. 

5.1.4 Model definition file (onezone.dfn) 

Listings 26 and 27 show the interactive session of running SLIMCON to create the model 

definition file and the resulting model definition file, respectively. 

5.1.5 Boundary data file (onezone.bnd) 

No boundary variable is used, but the boundary data file must exist in a simulation. Null value is 

used as seen in Listing 28.

5.1.6 Model information file (onezone.model) 

Listing 29 shows the supplemental unit information file and Listing 30 is the model information 

file obtained by executing UPD_INFO. 

Listing 25. The simulation work file (onezone.sim).

ONE ZONE MODEL 

 2 (Superblocks in simulation) 

 0.100000E-03 0.100000E-04 0.200000E-03 0.100000E+01 (Error Tol.) 

 2 (Blocks in SB# 1) 

 8 (Units in BLK# 1) 

 1 50 ----------------------------------------(Unit #,Type #)---------- 

 1 1 2 2 3 4 5 6 7 8 8 8 8 

 10 3 

 0.100000E+01 0.700000E+01 

 2 51 ----------------------------------------(Unit #,Type #)---------- 

 1 10 9 5 

 4 0 

 0.100000E+01 0.100000E+01 0.100000E+01 0.100000E+01 0.372100E+02 

 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 

 0.600000E+00 0.900000E+00 0.000000E+00 0.000000E+00 

 3 51 ----------------------------------------(Unit #,Type #)---------- 

 1 10 9 5 

 3 0 

 0.100000E+01 0.200000E+01 0.100000E+01 0.200000E+01 0.372100E+02 

 0.000000E+00 0.180000E+03 0.000000E+00 0.000000E+00 0.000000E+00 

 0.600000E+00 0.900000E+00 0.000000E+00 0.000000E+00 

 4 51 ----------------------------------------(Unit #,Type #)---------- 

 1 10 9 5 

 2 0 

 0.100000E+01 0.300000E+01 0.100000E+01 0.300000E+01 0.244000E+02 

 0.900000E+02 0.900000E+02 0.000000E+00 0.000000E+00 0.000000E+00 

 0.600000E+00 0.900000E+00 0.000000E+00 0.000000E+00 
65 

 5 51 ----------------------------------------(Unit #,Type #)---------- 

 1 10 9 5 

 5 0 

 0.100000E+01 0.400000E+01 0.100000E+01 0.300000E+01 0.244000E+02 

 0.270000E+03 0.900000E+02 0.000000E+00 0.000000E+00 0.000000E+00 

 0.600000E+00 0.900000E+00 0.000000E+00 0.000000E+00 

 6 51 ----------------------------------------(Unit #,Type #)---------- 

 1 10 9 5 

 7 0 

 0.100000E+01 0.500000E+01 0.100000E+01 0.300000E+01 0.244000E+02 

 0.180000E+03 0.900000E+02 0.000000E+00 0.000000E+00 0.000000E+00 

 0.600000E+00 0.900000E+00 0.000000E+00 0.000000E+00 

 7 51 ----------------------------------------(Unit #,Type #)---------- 

 1 10 6 4 

 6 5 

 0.100000E+01 0.600000E+01 0.200000E+01 0.400000E+01 0.184000E+02 

 0.000000E+00 0.900000E+02 0.200000E+00 0.200000E+01 0.600000E+00 

 0.600000E+00 0.900000E+00 0.000000E+00 0.000000E+00 

 8 51 ----------------------------------------(Unit #,Type #)---------- 

 1 10 8 4 

 8 4 

 0.100000E+01 0.700000E+01 0.200000E+01 0.500000E+01 0.600000E+01 

 0.000000E+00 0.900000E+02 0.200000E+00 0.600000E+01 0.000000E+00 

 0.000000E+00 0.000000E+00 0.950000E+00 0.850000E+00 

 1 (Units in BLK# 2) 

 9 53 ----------------------------------------(Unit #,Type #)---------- 

 12 3 3 6 7 8 

 0.120000E+02 0.300000E+01 0.300000E+01 0.600000E+01 0.700000E+01 

 0.800000E+01 

 1 (Blocks in SB# 2) 

 1 (Units in BLK# 3) 

 10 52 ----------------------------------------(Unit #,Type #)---------- 

 1 1 1 2 1 11 2 3 1 2 3 

 1 1 1 2 

 0.100000E+01 0.200000E+03 0.400000E+01 0.148840E+03 0.100000E+01 

 0.717600E-01 0.454000E-01 0.200000E+00 0.100000E+01 0.150000E+00 

 0.200000E-01 0.300000E+00 

 0.000000E+00 0.000000E+00 0.101300E+03 0.000000E+00 0.200000E+02 

 0.200000E+02 0.200000E+02 0.200000E+02 0.200000E+02 0.200000E+02 

 0.200000E+02 0.200000E+02 0.200000E+02 0.200000E+02 0.200000E+02 

 0.200000E+02 0.100000E+01 0.100000E+01 0.100000E+01 0.000000E+00 

 0.100000E+01 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 

 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.740000E-02 

 0.740000E-02 0.740000E-02 

 0 (Boundary Variables in simulation) 

 13 0.900000E+03 (Reported Var. & Interval in SB# 1) 

 6 7 8 9 10 11 12 14 16 24 27 28 29 

 3 3 3 3 3 3 3 3 3 7 7 7 7 

 2 3 4 5 6 7 8 10 12 3 6 7 8 

 2 0.900000E+03 (Reported Var. & Interval in SB# 2) 

 5 30 

 3 8 

 1 1 

 0 0 

 0 0 
66 

**************** SUMMARY OF WORK FILE *************** 

 2 3 10 (Superblocks, Blocks, Units) 

 2 1 

 3 1 12 5 0 0 8 3 (Variables per category) 

 32 (State Variables) 

 13 2 

Listing 26. SLIMCON run to create the model definition file.

C:\HVACSIM20\WORK>slimcon 

 ---------------------------------------------------------- 

 * * 

 * SLIMCON * 

 * * 

 * Converts simulation work file to model definition file * 

 * Version 6.0 ( April 10, 2007) * 

 * * 

 ---------------------------------------------------------- 

 Enter the simulation file name (up to 46 characters) 

 without any extension, or carriage return to end. 

=> onezone 

 Do you want to allow algebraic variables to be inputs 

 and outputs of the same unit? (y/n) (default= no) 

=> 

---------------------------------------- 

 iu itype nsaved iude nnin nnout nnpar 

---------------------------------------- 

 1 50 0 0 13 2 2 

 2 51 57 0 4 2 14 

 3 51 57 0 4 2 14 

 4 51 57 0 4 2 14 

 5 51 57 0 4 2 14 

 6 51 57 0 4 2 14 

 7 51 57 0 4 2 14 

 8 51 57 0 4 2 14 

 9 53 0 0 6 0 6 

 10 52 0 2 11 4 12 

 ========= SLIMCON SUMMARY ========== 

 2 Superblocks in the simulation .......... maxsbk = 40 ( 5.0%) 

 3 Blocks in the simulation ............... maxblk = 50 ( 6.0%) 

 2 Differential equations in the simulation maxdeq = 90 ( 2.2%) 

 399 Saved variables in the simulation ...... maxsav =9000 ( 4.4%) 

 10 Units in the simulation ................ maxunt = 400 ( 2.5%) 

 8 Units in a single block ................ muntib = 40 ( 20.0%) 

 2 Differential equations in one unit ..... mdeqiu = 10 ( 20.0%) 

 13 Inputs or outputs in a single unit ..... minoiu = 50 ( 26.0%) 

 14 Parameters in a single unit ............ mpariu = 30 ( 46.7%) 

 2 Blocks in the largest superblock ....... mblkis = 20 ( 10.0%) 

 2 Differential equations in one superblock mdeqis = 50 ( 4.0%) 

 32 State variables in the simulation ...... maxstv =3000 ( 1.1%) 

 14 Inputs or outputs in a single block .... minoib = 200 ( 7.0%) 

 118 Unit parameters in the simulation ...... maxpar =5000 ( 2.4%) 

 8 Simultaneous equations in a single block mseqib = 75 ( 10.7%) 

 0 Simultaneous equations in one superblock mseqis = 20 ( 0.0%) 

 0 Time dependent boundary variables ...... maxbnd = 50 ( 0.0%) 
67 

 0 Boundary conditions in one superblock .. mbndis = 50 ( 0.0%) 

 13 Reported variables in one superblock ... mrptis = 60 ( 21.7%) 

Model definition file completed 

Program Completed 

Listing 27. The model definition file (onezone.dfn).

title: simulation title 

 ONE ZONE MODEL 

 nstate,nsblok: # of state variables, # of SBS 

 32 2 

 nsuper(s): # of blocks in each SB 

 2 1 

 state(i): vector of state variable initial values 

 0.000000E+00 0.000000E+00 0.101300E+03 0.000000E+00 0.200000E+02 

 0.200000E+02 0.200000E+02 0.200000E+02 0.200000E+02 0.200000E+02 

 0.200000E+02 0.200000E+02 0.200000E+02 0.200000E+02 0.200000E+02 

 0.200000E+02 0.100000E+01 0.100000E+01 0.100000E+01 0.000000E+00 

 0.100000E+01 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 

 0.000000E+00 0.000000E+00 0.000000E+00 0.000000E+00 0.740000E-02 

 0.740000E-02 0.740000E-02 

 ndent(i): state variable identification vector 

 0 3 4 16 -1 -1 21 29 

 nunits(b): # of units in each block B 

 8 1 1 

 njsslv(s): # of simultaneous eqs in each SB 

 0 0 

 njsolv(b): # of simultaneqou eqs in each block 

 8 0 2 

 isuper(s,i): array of block numbers in each SB 

 1 2 

 3 

 iblock(b,i): array of unit numbers in each block 

 1 2 3 4 5 6 7 8 

 9 

 10 

 iunits(u): array of type #s for each unit 

 50 51 51 51 51 51 51 51 53 52 

 nin(u): number of inputs to unit u 

 13 4 4 4 4 4 4 4 6 11 

 in(u,i): array of input connections for unit U 

 5 22 23 6 7 8 9 10 11 12 12 12 12 

 5 14 13 21 

 5 14 13 21 

 5 14 13 21 

 5 14 13 21 

 5 14 13 21 

 5 14 10 20 

 5 14 12 20 

 16 32 3 27 28 29 

 1 5 30 2 4 15 31 24 17 18 19 

 nout(u): number of outputs from unit U 

 2 2 2 2 2 2 2 2 0 4 

 iout(u,i): array of output connections for unit U 
68 

 14 24 

 8 0 

 7 0 

 6 0 

 9 0 

 11 0 

 10 26 

 12 25 

 5 30 22 23 

 jssolv(s,i): array of variables solved 

 simultaneously within each sb (between blocks) 

 0 

 0 

 jsolve(b,i): array of variables solved 

 simultaneously within each block 

 8 7 6 9 11 10 12 14 

 0 

 5 30 

 nde(u): # of differential eqs in unit U 

 0 0 0 0 0 0 0 0 0 2 

 inde(u,i): de index for the ith de in unit U 

 0 

 0 

 0 

 0 

 0 

 0 

 0 

 0 

 0 

 1 2 

 idevar(d): variable index for de #d 

 5 30 

 isaved(u): index of first saved var. for unit U 

 1 1 58 115 172 229 286 343 400 400 

 jpar(u): index of first parameter for unit U 

 1 3 17 31 45 59 73 87 101 107 

 npar,nsaved: # of parameters & saved variables 

 118 399 

 par(i): array of parameters for all units 

 0.100000E+01 0.700000E+01 0.100000E+01 0.100000E+01 0.100000E+01 

 0.100000E+01 0.372100E+02 0.000000E+00 0.000000E+00 0.000000E+00 

 0.000000E+00 0.000000E+00 0.600000E+00 0.900000E+00 0.000000E+00 

 0.000000E+00 0.100000E+01 0.200000E+01 0.100000E+01 0.200000E+01 

 0.372100E+02 0.000000E+00 0.180000E+03 0.000000E+00 0.000000E+00 

 0.000000E+00 0.600000E+00 0.900000E+00 0.000000E+00 0.000000E+00 

 0.100000E+01 0.300000E+01 0.100000E+01 0.300000E+01 0.244000E+02 

 0.900000E+02 0.900000E+02 0.000000E+00 0.000000E+00 0.000000E+00 

 0.600000E+00 0.900000E+00 0.000000E+00 0.000000E+00 0.100000E+01 

 0.400000E+01 0.100000E+01 0.300000E+01 0.244000E+02 0.270000E+03 

 0.900000E+02 0.000000E+00 0.000000E+00 0.000000E+00 0.600000E+00 

 0.900000E+00 0.000000E+00 0.000000E+00 0.100000E+01 0.500000E+01 

 0.100000E+01 0.300000E+01 0.244000E+02 0.180000E+03 0.900000E+02 

 0.000000E+00 0.000000E+00 0.000000E+00 0.600000E+00 0.900000E+00 

 0.000000E+00 0.000000E+00 0.100000E+01 0.600000E+01 0.200000E+01 

 0.400000E+01 0.184000E+02 0.000000E+00 0.900000E+02 0.200000E+00 
69 

 0.200000E+01 0.600000E+00 0.600000E+00 0.900000E+00 0.000000E+00 

 0.000000E+00 0.100000E+01 0.700000E+01 0.200000E+01 0.500000E+01 

 0.600000E+01 0.000000E+00 0.900000E+02 0.200000E+00 0.600000E+01 

 0.000000E+00 0.000000E+00 0.000000E+00 0.950000E+00 0.850000E+00 

 0.120000E+02 0.300000E+01 0.300000E+01 0.600000E+01 0.700000E+01 

 0.800000E+01 0.100000E+01 0.200000E+03 0.400000E+01 0.148840E+03 

 0.100000E+01 0.717600E-01 0.454000E-01 0.200000E+00 0.100000E+01 

 0.150000E+00 0.200000E-01 0.300000E+00 

 nbound: # of time-dependent boundary variables 

 0 

 ibound(i) state variable indices of boundary variables. 

 nreprt(s): # of reported variables in each SB 

 13 2 

 treprt(s): reporting interval for each SB 

 0.900000E+03 0.900000E+03 

 ireprt(i): indices of reported variables 

 ident1: category # of reported variables 

 ident2: position in category of reported variables 

 6 7 8 9 10 11 12 14 16 24 27 28 29 

 3 3 3 3 3 3 3 3 3 7 7 7 7 

 2 3 4 5 6 7 8 10 12 3 6 7 8 

 5 30 

 3 8 

 1 1 

 rtolx,atolx, xtol,ttime: error tolerances 

 0.100000E-03 0.100000E-04 0.200000E-03 0.100000E+01 

 ifzopt(s): sb variable unfreezing option vector 

 0 0 

 insopt(s): sb input scan option vector 

 0 0 

Listing 28. The boundary data file (onezone.bnd).

0.0 

Listing 29. The supplemental unit information file (onezone.inf).

 1 One zone envelope 

 2 Ceiling 

 3 Floor 

 4 West wall 

 5 East wall 

 6 North wall 

 7 South wall 

 8 South window 

 9 Weather 

 10 Zone 
70 

Listing 30. The model information file (onezone.model).

ONE ZONE MODEL 

 

 SUPERBLOCK 1 

 BLOCK 1 

 UNIT 1 TYPE 50 - Zone envelope 

 UNIT 2 TYPE 51 - Building surface 

 UNIT 3 TYPE 51 - Building surface 

 UNIT 4 TYPE 51 - Building surface 

 UNIT 5 TYPE 51 - Building surface 

 UNIT 6 TYPE 51 - Building surface 

 UNIT 7 TYPE 51 - Building surface 

 UNIT 8 TYPE 51 - Building surface 

 BLOCK 2 

 UNIT 9 TYPE 53 - Weather input 

 

 SUPERBLOCK 2 

 BLOCK 3 

 UNIT 10 TYPE 52 - Zone model 

 UNIT 1 TYPE 50 ----- One zone envelope 

 Zone envelope 

 1 INPUTS: 

 TEMPERATURE 1 - tia: zone air dry-bulb temperature 

 POWER 1 - qisw: internal (short wave) radiant gain 

 POWER 2 - qilw: internal (long wave) radiant gain 

 TEMPERATURE 2 - tis(1): inner surface temperature 

 TEMPERATURE 3 - tis(2): inner surface temperature 

 TEMPERATURE 4 - tis(3): inner surface temperature 

 TEMPERATURE 5 - tis(4): inner surface temperature 

 TEMPERATURE 6 - tis(5): inner surface temperature 

 TEMPERATURE 7 - tis(6): inner surface temperature 

 TEMPERATURE 8 - tis(7): inner surface temperature 

 TEMPERATURE 8 - tis(8): inner surface temperature 

 TEMPERATURE 8 - tis(9): inner surface temperature 

 TEMPERATURE 8 - tis(10):inner surface temperature 

 

 2 OUTPUTS: 

 TEMPERATURE 10 - tmr: mean radiant temperature 

 POWER 3 - qwall: convective heat gain from surfaces 

 3 PARAMETERS: 

 1.00000 izn: identification number of zone 

 7.00000 ns: number of surfaces of zone 

 UNIT 2 TYPE 51 ----- Ceiling 

 Building surface 

 1 INPUTS: 

 TEMPERATURE 1 - tia: indoor air dry-bulb temperature 

 TEMPERATURE 10 - tmr: mean radiant temperature 

 TEMPERATURE 9 - tosinf: outer surface temp. of unexposed wall 

 CONTROL 5 - fshadw: shaded fraction of exposed surface 

 

 2 OUTPUTS: 

 TEMPERATURE 4 - tis: inner surface temperature 

 POWER 0 - solint: integrated solar influx on surface 

 3 PARAMETERS: 

 1.00000 izn: identification number of zone 

 1.00000 id: identification number of surface 

 1.00000 iexpos: 0=w/in zone, 1=betw.zones, 2=exposed to sun 

 1.00000 istr: identification number of the construct 

 37.2100 as: surface area (m2) 

 0.00000 orient: azimuth angle of normal to surface & south 

 0.00000 tilt: tilt angle: flat roof=0, floor=180 (degree) 

 0.00000 grf: ground reflectivity (-) 

 0.00000 irofs: outer surface roughness index: 1=stucco,... 
71 

 0.00000 absos: solar absorptance of outer surface (-) 

 0.600000 absis: short wave absorptance of inner surface(-) 

 0.900000 emitis: emissivity of the inner surface (-) 

 0.00000 transm: transmittance of the glass window (-) 

 0.00000 sc: shading coeff. of the glass window (-) 

 

 UNIT 3 TYPE 51 ----- Floor 

 Building surface 

 1 INPUTS: 

 TEMPERATURE 1 - tia: indoor air dry-bulb temperature 

 TEMPERATURE 10 - tmr: mean radiant temperature 

 TEMPERATURE 9 - tosinf: outer surface temp. of unexposed wall 

 CONTROL 5 - fshadw: shaded fraction of exposed surface 

 

 2 OUTPUTS: 

 TEMPERATURE 3 - tis: inner surface temperature 

 POWER 0 - solint: integrated solar influx on surface 

 3 PARAMETERS: 

 1.00000 izn: identification number of zone 

 2.00000 id: identification number of surface 

 1.00000 iexpos: 0=w/in zone, 1=betw.zones, 2=exposed to sun 

 2.00000 istr: identification number of the construct 

 37.2100 as: surface area (m2) 

 0.00000 orient: azimuth angle of normal to surface & south 

 180.000 tilt: tilt angle: flat roof=0, floor=180 (degree) 

 0.00000 grf: ground reflectivity (-) 

 0.00000 irofs: outer surface roughness index: 1=stucco,... 

 0.00000 absos: solar absorptance of outer surface (-) 

 0.600000 absis: short wave absorptance of inner surface(-) 

 0.900000 emitis: emissivity of the inner surface (-) 

 0.00000 transm: transmittance of the glass window (-) 

 0.00000 sc: shading coeff. of the glass window (-) 

 

 UNIT 4 TYPE 51 ----- West wall 

 Building surface 

 1 INPUTS: 

 TEMPERATURE 1 - tia: indoor air dry-bulb temperature 

 TEMPERATURE 10 - tmr: mean radiant temperature 

 TEMPERATURE 9 - tosinf: outer surface temp. of unexposed wall 

 CONTROL 5 - fshadw: shaded fraction of exposed surface 

 

 2 OUTPUTS: 

 TEMPERATURE 2 - tis: inner surface temperature 

 POWER 0 - solint: integrated solar influx on surface 

 3 PARAMETERS: 

 1.00000 izn: identification number of zone 

 3.00000 id: identification number of surface 

 1.00000 iexpos: 0=w/in zone, 1=betw.zones, 2=exposed to sun 

 3.00000 istr: identification number of the construct 

 24.4000 as: surface area (m2) 

 90.0000 orient: azimuth angle of normal to surface & south 

 90.0000 tilt: tilt angle: flat roof=0, floor=180 (degree) 

 0.00000 grf: ground reflectivity (-) 

 0.00000 irofs: outer surface roughness index: 1=stucco,... 

 0.00000 absos: solar absorptance of outer surface (-) 

 0.600000 absis: short wave absorptance of inner surface(-) 

 0.900000 emitis: emissivity of the inner surface (-) 

 0.00000 transm: transmittance of the glass window (-) 

 0.00000 sc: shading coeff. of the glass window (-) 

 

 UNIT 5 TYPE 51 ----- East wall 

 Building surface 

 1 INPUTS: 

 TEMPERATURE 1 - tia: indoor air dry-bulb temperature 

 TEMPERATURE 10 - tmr: mean radiant temperature 

 TEMPERATURE 9 - tosinf: outer surface temp. of unexposed wall 
72 

 CONTROL 5 - fshadw: shaded fraction of exposed surface 

 

 2 OUTPUTS: 

 TEMPERATURE 5 - tis: inner surface temperature 

 POWER 0 - solint: integrated solar influx on surface 

 3 PARAMETERS: 

 1.00000 izn: identification number of zone 

 4.00000 id: identification number of surface 

 1.00000 iexpos: 0=w/in zone, 1=betw.zones, 2=exposed to sun 

 3.00000 istr: identification number of the construct 

 24.4000 as: surface area (m2) 

 270.000 orient: azimuth angle of normal to surface & south 

 90.0000 tilt: tilt angle: flat roof=0, floor=180 (degree) 

 0.00000 grf: ground reflectivity (-) 

 0.00000 irofs: outer surface roughness index: 1=stucco,... 

 0.00000 absos: solar absorptance of outer surface (-) 

 0.600000 absis: short wave absorptance of inner surface(-) 

 0.900000 emitis: emissivity of the inner surface (-) 

 0.00000 transm: transmittance of the glass window (-) 

 0.00000 sc: shading coeff. of the glass window (-) 

 

 UNIT 6 TYPE 51 ----- North wall 

 Building surface 

 1 INPUTS: 

 TEMPERATURE 1 - tia: indoor air dry-bulb temperature 

 TEMPERATURE 10 - tmr: mean radiant temperature 

 TEMPERATURE 9 - tosinf: outer surface temp. of unexposed wall 

 CONTROL 5 - fshadw: shaded fraction of exposed surface 

 

 2 OUTPUTS: 

 TEMPERATURE 7 - tis: inner surface temperature 

 POWER 0 - solint: integrated solar influx on surface 

 3 PARAMETERS: 

 1.00000 izn: identification number of zone 

 5.00000 id: identification number of surface 

 1.00000 iexpos: 0=w/in zone, 1=betw.zones, 2=exposed to sun 

 3.00000 istr: identification number of the construct 

 24.4000 as: surface area (m2) 

 180.000 orient: azimuth angle of normal to surface & south 

 90.0000 tilt: tilt angle: flat roof=0, floor=180 (degree) 

 0.00000 grf: ground reflectivity (-) 

 0.00000 irofs: outer surface roughness index: 1=stucco,... 

 0.00000 absos: solar absorptance of outer surface (-) 

 0.600000 absis: short wave absorptance of inner surface(-) 

 0.900000 emitis: emissivity of the inner surface (-) 

 0.00000 transm: transmittance of the glass window (-) 

 0.00000 sc: shading coeff. of the glass window (-) 

 

 UNIT 7 TYPE 51 ----- South wall 

 Building surface 

 1 INPUTS: 

 TEMPERATURE 1 - tia: indoor air dry-bulb temperature 

 TEMPERATURE 10 - tmr: mean radiant temperature 

 TEMPERATURE 6 - tosinf: outer surface temp. of unexposed wall 

 CONTROL 4 - fshadw: shaded fraction of exposed surface 

 

 2 OUTPUTS: 

 TEMPERATURE 6 - tis: inner surface temperature 

 POWER 5 - solint: integrated solar influx on surface 

 3 PARAMETERS: 

 1.00000 izn: identification number of zone 

 6.00000 id: identification number of surface 

 2.00000 iexpos: 0=w/in zone, 1=betw.zones, 2=exposed to sun 

 4.00000 istr: identification number of the construct 

 18.4000 as: surface area (m2) 

 0.00000 orient: azimuth angle of normal to surface & south 
73 

 90.0000 tilt: tilt angle: flat roof=0, floor=180 (degree) 

 0.200000 grf: ground reflectivity (-) 

 2.00000 irofs: outer surface roughness index: 1=stucco,... 

 0.600000 absos: solar absorptance of outer surface (-) 

 0.600000 absis: short wave absorptance of inner surface(-) 

 0.900000 emitis: emissivity of the inner surface (-) 

 0.00000 transm: transmittance of the glass window (-) 

 0.00000 sc: shading coeff. of the glass window (-) 

 

 UNIT 8 TYPE 51 ----- South window 

 Building surface 

 1 INPUTS: 

 TEMPERATURE 1 - tia: indoor air dry-bulb temperature 

 TEMPERATURE 10 - tmr: mean radiant temperature 

 TEMPERATURE 8 - tosinf: outer surface temp. of unexposed wall 

 CONTROL 4 - fshadw: shaded fraction of exposed surface 

 

 2 OUTPUTS: 

 TEMPERATURE 8 - tis: inner surface temperature 

 POWER 4 - solint: integrated solar influx on surface 

 3 PARAMETERS: 

 1.00000 izn: identification number of zone 

 7.00000 id: identification number of surface 

 2.00000 iexpos: 0=w/in zone, 1=betw.zones, 2=exposed to sun 

 5.00000 istr: identification number of the construct 

 6.00000 as: surface area (m2) 

 0.00000 orient: azimuth angle of normal to surface & south 

 90.0000 tilt: tilt angle: flat roof=0, floor=180 (degree) 

 0.200000 grf: ground reflectivity (-) 

 6.00000 irofs: outer surface roughness index: 1=stucco,... 

 0.00000 absos: solar absorptance of outer surface (-) 

 0.00000 absis: short wave absorptance of inner surface(-) 

 0.00000 emitis: emissivity of the inner surface (-) 

 0.950000 transm: transmittance of the glass window (-) 

 0.850000 sc: shading coeff. of the glass window (-) 

 

 UNIT 9 TYPE 53 ----- Weather 

 Weather input 

 1 INPUTS: 

 TEMPERATURE 12 - tamb: ambient (outdoor) air temperature (C) 

 HUMIDITY 3 - humrat: outdoor air humidity ratio (-) 

 PRESSURE 3 - pbar: barometric pressure (kPa) 

 POWER 6 - idn: direct normal solar radiation (W/m2) 

 POWER 7 - isky: diffuse (sky) solar radiation (W/m2) 

 POWER 8 - ihor: total horizontal solar radiation (W/m2) 

 

 2 OUTPUTS: 

 3 PARAMETERS: 

 12.0000 index for ambient temperature (e.g. 5 if tamb=t5) 

 3.00000 index for outdoor air humidity ratio 

 3.00000 index for barometric pressure 

 6.00000 index for direct normal solar radiation 

 7.00000 index for diffuse (sky) solar radiation 

 8.00000 index for total horizontal solar radiation 

 

 UNIT 10 TYPE 52 ----- Zone 

 Zone model 

 1 INPUTS: 

 PRESSURE 1 - piag: gauge pressure of zone air 

 TEMPERATURE 1 - tia: zone air dry-bulb temperature 

 HUMIDITY 1 - wia: humidiy ratio of zone air 

 PRESSURE 2 - psag: gauge pressure of supply air 

 FLOW 1 - msa: mass flow rate of supply air 

 TEMPERATURE 11 - tsa: supply air dry-bulb temperature 

 HUMIDITY 2 - wsa: humidity ratio of supply air 

 POWER 3 - qwall: convective heat gain from surfaces 
74 

 CONTROL 1 - numpep: number of people (occupant in the zone) 

 CONTROL 2 - utceqp: equipment utilization coefficient 

 CONTROL 3 - utclit: lighting utilization coefficient 

 

 2 OUTPUTS: 

 TEMPERATURE 1 - tia: zone air dry-bulb temp. [diff. eq.] 

 HUMIDITY 1 - wia: humidity ratio of zone air [diff. eq.] 

 POWER 1 - qisw: internal (short wave) radiant gain 

 POWER 2 - qilw: internal (long wave) radiant gain 

 

 3 PARAMETERS: 

 1.00000 izn: identification number of zone 

 200.000 cfur: effective capacitance of furnishings (kJ/K) 

 4.00000 effmia: multiplier for zone moisture capacitance (-) 

 148.840 volume: volume of zone air (interior space ) (m3) 

 1.00000 sairex: standard air exchange rate (1/h) 

 0.717600E-01 wpeps: sensible heat gain from a person (kW) 

 0.454000E-01 wpepl: latent heat gain from a person (kW) 

 0.200000 wlit: heat gain due to lighting in the zone (kW) 

 1.00000 light: 1 = fluorescent, 2 = incandescent (-) 

 0.150000 weqps: sensible heat gain due to equipment (kW) 

 0.200000E-01 weqpl: latent heat gain due to equipment (kW) 

 0.300000 reqp: radiative to sensible heat from equipment (-) 

 Initial Variable Values: 

 

 PRESSURE 1 -> 0.00000 (kPa) 

 PRESSURE 2 -> 0.00000 (kPa) 

 PRESSURE 3 -> 101.300 (kPa) 

 FLOW 1 -> 0.00000 (kg/s) 

 TEMPERATURE 1 -> 20.0000 (C) 

 TEMPERATURE 2 -> 20.0000 (C) 

 TEMPERATURE 3 -> 20.0000 (C) 

 TEMPERATURE 4 -> 20.0000 (C) 

 TEMPERATURE 5 -> 20.0000 (C) 

 TEMPERATURE 6 -> 20.0000 (C) 

 TEMPERATURE 7 -> 20.0000 (C) 

 TEMPERATURE 8 -> 20.0000 (C) 

 TEMPERATURE 9 -> 20.0000 (C) 

 TEMPERATURE 10 -> 20.0000 (C) 

 TEMPERATURE 11 -> 20.0000 (C) 

 TEMPERATURE 12 -> 20.0000 (C) 

 CONTROL 1 -> 1.00000 (-) 

 CONTROL 2 -> 1.00000 (-) 

 CONTROL 3 -> 1.00000 (-) 

 CONTROL 4 -> 0.00000 (-) 

 CONTROL 5 -> 1.00000 (-) 

 POWER 1 -> 0.00000 (kW) 

 POWER 2 -> 0.00000 (kW) 

 POWER 3 -> 0.00000 (kW) 

 POWER 4 -> 0.00000 (kW) 

 POWER 5 -> 0.00000 (kW) 

 POWER 6 -> 0.00000 (kW) 

 POWER 7 -> 0.00000 (kW) 

 POWER 8 -> 0.00000 (kW) 

 HUMIDITY 1 -> 0.740000E-02 (kg/kg) 

 HUMIDITY 2 -> 0.740000E-02 (kg/kg) 

 HUMIDITY 3 -> 0.740000E-02 (kg/kg) 

 Simulation Error Tolerances: 

 

 1 RTOLX= 0.100000E-03 ATOLX= 0.100000E-04 

 XTOL= 0.200000E-03 TTIME= 1.00000 

 SUPERBLOCK 1 

 2 FREEZE OPTION 0 SCAN OPTION 0 

 SUPERBLOCK 2 

 3 FREEZE OPTION 0 SCAN OPTION 0 

 The following are Boundary Variables in the simulation: 

 SUPERBLOCK 1 REPORTING INTERVAL 900.000 
75 

 TEMPERATURE 2 

 TEMPERATURE 3 

 TEMPERATURE 4 

 TEMPERATURE 5 

 TEMPERATURE 6 

 TEMPERATURE 7 

 TEMPERATURE 8 

 TEMPERATURE 10 

 TEMPERATURE 12 

 POWER 3 

 POWER 6 

 POWER 7 

 POWER 8 

 

 SUPERBLOCK 2 REPORTING INTERVAL 900.000 

 TEMPERATURE 1 

 HUMIDITY 1 

 

5.2 Building Shell Simulation using MODSIM

A building shell simulation requires two simulation runs. A 24-hour time history of heat flux 

transfer functions of shell surfaces is determined in the first simulation and saved in the final 

state variable file (hvacsim.fin) to be used as initialization of a main simulation. In this first 

simulation, the maximum time step of simulation is the time step for building shell computation. 

The stopping time of simulation is 86400 s (one day). 

After renaming or copying the final state variable file (hvacsim.fin) into the initialization file 

(hvacsim.ini), execute MODSIM again to perform the main simulation. The maximum time step 

can be much smaller than the shell time step, and the stopping time can be many days or weeks. 

The interactive sessions of these two simulations are shown in Listing 31. The simulation 

summary and output files are shown in Listings 32 and 33. After sorting the simulation output 

file superblock by superblock, the simulation results are plotted as shown in Figures 12-14. 

Note that there are some discrepancies between the current results and the old results reported in 

Reference 4. Revisions in the thermal property data result in changes to the values of conduction 

transfer functions and heat fluxes. Consequently slightly different outputs were obtained. With 

the simulation control input data files as given in Listings 34 and 35, MODSIM can be executed 

using the redirecting method. Two steps for the building shell simulation using the redirecting 

method are shown in Listing 36. 

Listing 31. Interactive session of running MODSIM in two steps for building shell simulation.

C:\HVACSIM20\WORK>copy hvacsim.ctf onezone.ctf 

 1 file(s) copied. 

C:\HVACSIM20\WORK>modsim 

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

 * * 

 * MODSIM : A MODular SIMulation program * 

 * Main program of HVACSIM+ package * 

 * * 

 * version 20.0 * 

 * * 
76 

 * National Institute of Standards & Technology * 

 * Gaithersburg, Maryland 20899-8631 U.S.A. * 

 * * 

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

 Enter minimum time step, maximum time step, and simulation stopping time: 

=> 0.1 900.0 86400.0 

 Is the building shell model used? <n> 

=> y 

 Will the initialization file be called? <n> 

=> n 

 Simulate building shell only? <n> 

=> y 

 Only the superblock containing the building model will be called. 

 What is the index number of the superblock for the building shell? 

=> 1 

 isshel = 1 

 Enter the time of day (in hours after midnight) 

 at which the simulation is to begin : 

=> 0.0 

 Use same file names for all files? (y/n) <y> 

=> y 

 Enter the name for all files to open or 

hit carriage return for default filename <hvacsim> 

=> onezone 

 File name : onezone.dfn 

 File name : onezone.bnd 

 File name : onezone.fin 

 File name : onezone.out 

 File name : onezone.sum 

 File name : onezone.ctf 

 File name : onezone.met 

 -- The outputs can be written to the output file 

 -- based on either simulation time or reported time. 

 Do you want to use reported time for outputs <n>? 

=> y 

 Do you wish to disable freezing variable feature <n>? 

=> n 

 Do you want diagnostic information to be written <n>? 

=> n 

 Would you like to monitor simulation on screen? <n> 

=> n 

 ------- simulation begins --------- 

-- first weather data set has been read 

time= 900.00 

time= 1800.00 

time= 2700.00 

time= 3600.00 

--------------------- ( Many lines are deleted. ) ------------------------- 
77 

time= 84600.00 

time= 85500.00 

time= 86400.00 

 --Final state file has been written ----- 

 ------------End of simulation --------- 

Program Completed 

Press Enter to Continue. 

C:\HVACSIM20\WORK>copy onezone.fin onezone.ini

Overwrite onezone.ini? (Yes/No/All): y 

 1 file(s) copied. 

C:\HVACSIM20\WORK>modsim

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

 * * 

 * MODSIM : A MODular SIMulation program * 

 * Main program of HVACSIM+ package * 

 * * 

 * version 20.0 * 

 * * 

 * National Institute of Standards & Technology * 

 * Gaithersburg, Maryland 20899-8631 U.S.A. * 

 * * 

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

 Enter minimum time step, maximum time step, and simulation stopping time: 

=> 0.1 900.0 172800.0 

 Is the building shell model used? <n> 

=> y 

 Will the initialization file be called? <n> 

=> y 

 What is the index number of the superblock for the building shell? 

=> 1 

 isshel = 1 

 Enter the time of day (in hours after midnight) 

 at which the simulation is to begin : 

=> 0.0 

 Use same file names for all files? (y/n) <y> 

=> y 

 Enter the name for all files to open or 

hit carriage return for default filename <hvacsim> 

=> onezone 

 File name : onezone.dfn 

 File name : onezone.bnd 

 File name : onezone.ini 

 File name : onezone.fin 

 File name : onezone.out 

 File name : onezone.sum 

 File name : onezone.ctf 
78 

 File name : onezone.met 

 -- The outputs can be written to the output file 

 -- based on either simulation time or reported time. 

 Do you want to use reported time for outputs <n>? 

=> y 

 Do you wish to disable freezing variable feature <n>? 

=> n 

 Do you want diagnostic information to be written <n>? 

=> n 

 Would you like to monitor simulation on screen? <n> 

=> n 

 ------- simulation begins --------- 

-- first weather data set has been read 

time = 900.0 snsq - iteration not making good progress.iblk= 1 

time= 900.00 

time= 1800.00 

time= 2700.00 

time= 3600.00 

--------------------- ( Many lines are deleted. ) ------------------------- 

time= 170100.00 

time= 171000.00 

time= 171900.00 

time= 172800.00 

 --Final state file has been written ----- 

 ------------End of simulation --------- 

Program Completed 

Listing 32. The simulation summary file (onezone.sum). 

 ***** Program MODSIM ***** 

 A MODular SIMulation program 

 ONE ZONE MODEL 

 2 superblocks 3 blocks 10 units 

 32 state variables: 

 3 pres 1 flow 12 temp 5 ctrl 8 powr 3 humt 

 initial state vector: 

 pres: 

 0.00000 0.00000 101.300 

 flow: 

 0.00000 

 temp: 

 20.0001 20.5646 20.9086 20.9108 20.5734 

 22.0071 20.5731 21.1417 20.0000 21.0353 

 20.0000 21.6693 

 ctrl: 

 1.00000 1.00000 1.00000 0.00000 1.00000 

 powr: 

 4.000000E-02 0.135232 0.177709 0.00000 0.00000 

 0.00000 0.00000 0.00000 
79 

 humt: 

 7.400014E-03 7.400000E-03 1.318133E-02 

 0 time dependent boundary variables: 

 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 

 13 reported variables: 

 temp 2 temp 3 temp 4 temp 5 temp 6 temp 7 temp 8 temp 10 

 temp 12 powr 3 powr 6 powr 7 powr 8 

 0 simultaneous equations; variables: 

 ***** block 1 ***** 

 8 simultaneous equations; variables: 

 temp 4 temp 3 temp 2 temp 5 temp 7 temp 6 temp 8 temp 10 

 unit 1 type 50 

 13 inputs: 

 temp 1 powr 1 powr 2 temp 2 temp 3 temp 4 temp 5 temp 6 

 temp 7 temp 8 temp 8 temp 8 temp 8 

 2 outputs: 

 temp 10 powr 3 

 parameters: 

 1.0000 7.0000 

 unit 2 type 51 

 4 inputs: 

 temp 1 temp 10 temp 9 ctrl 5 

 2 outputs: 

 temp 4 null 0 

 parameters: 

 1.0000 1.0000 1.0000 1.0000 37.210 

 0.0000 0.0000 0.0000 0.0000 0.0000 

 0.60000 0.90000 0.0000 0.0000 

 unit 3 type 51 

 4 inputs: 

 temp 1 temp 10 temp 9 ctrl 5 

 2 outputs: 

 temp 3 null 0 

 parameters: 

 1.0000 2.0000 1.0000 2.0000 37.210 

 0.0000 180.00 0.0000 0.0000 0.0000 

 0.60000 0.90000 0.0000 0.0000 

 unit 4 type 51 

 4 inputs: 

 temp 1 temp 10 temp 9 ctrl 5 

 2 outputs: 

 temp 2 null 0 

 parameters: 
80 

 1.0000 3.0000 1.0000 3.0000 24.400 

 90.000 90.000 0.0000 0.0000 0.0000 

 0.60000 0.90000 0.0000 0.0000 

 unit 5 type 51 

 4 inputs: 

 temp 1 temp 10 temp 9 ctrl 5 

 2 outputs: 

 temp 5 null 0 

 parameters: 

 1.0000 4.0000 1.0000 3.0000 24.400 

 270.00 90.000 0.0000 0.0000 0.0000 

 0.60000 0.90000 0.0000 0.0000 

 unit 6 type 51 

 4 inputs: 

 temp 1 temp 10 temp 9 ctrl 5 

 2 outputs: 

 temp 7 null 0 

 parameters: 

 1.0000 5.0000 1.0000 3.0000 24.400 

 180.00 90.000 0.0000 0.0000 0.0000 

 0.60000 0.90000 0.0000 0.0000 

 unit 7 type 51 

 4 inputs: 

 temp 1 temp 10 temp 6 ctrl 4 

 2 outputs: 

 temp 6 powr 5 

 parameters: 

 1.0000 6.0000 2.0000 4.0000 18.400 

 0.0000 90.000 0.20000 2.0000 0.60000 

 0.60000 0.90000 0.0000 0.0000 

 unit 8 type 51 

 4 inputs: 

 temp 1 temp 10 temp 8 ctrl 4 

 2 outputs: 

 temp 8 powr 4 

 parameters: 

 1.0000 7.0000 2.0000 5.0000 6.0000 

 0.0000 90.000 0.20000 6.0000 0.0000 

 0.0000 0.0000 0.95000 0.85000 

 ***** block 2 ***** 

 0 simultaneous equations; variables: 

 unit 9 type 53 

 6 inputs: 

 temp 12 humt 3 pres 3 powr 6 powr 7 powr 8 

 0 outputs: 

 parameters: 

 12.000 3.0000 3.0000 6.0000 7.0000 

 8.0000 
81 

 ***** superblock 2 ***** 

 superblock simultaneous equation unfreezing option, ifzopt = 0 

 superblock input scan option, insopt = 0 

 2 reported variables: 

 temp 1 humt 1 

 0 simultaneous equations; variables: 

 ***** block 3 ***** 

 2 simultaneous equations; variables: 

 temp 1 humt 1 

 unit 10 type 52 

 11 inputs: 

 pres 1 temp 1 humt 1 pres 2 flow 1 temp 11 humt 2 powr 3 

 ctrl 1 ctrl 2 ctrl 3 

 4 outputs: 

 temp 1 humt 1 powr 1 powr 2 

 parameters: 

 1.0000 200.00 4.0000 148.84 1.0000 

 7.17600E-02 4.54000E-02 0.20000 1.0000 0.15000 

 2.00000E-02 0.30000 

 ----------------------------------------------------------- 

 tmin = 0.100 tmax = 900.000 tstop = 172800.000 

 ----------------------------------------------------------- 

 Building shell model in superblock 1: 

 constant time step tshell = 900.00 

 weather data: latitude = 38.850 longitude = 77.030 

 starting date: 7 Jul. 

 source: clear sky design day method 

 ********** SUPERBLOCK 1 ********** 

 time= 900.00 

 temp 2 temp 3 temp 4 temp 5 temp 6 temp 7 temp 8 temp 10 

 22.8 27.6 24.8 22.7 24.3 22.7 25.3 21.0 

 temp 12 powr 3 powr 6 powr 7 powr 8 

 21.7 0.187 0.00 0.00 0.00 

 ********** SUPERBLOCK 2 ********** 

 time= 900.00 

 temp 1 humt 1 

 20.9 7.516E-03 

 ********** SUPERBLOCK 2 ********** 

 time= 1800.00 

 temp 1 humt 1 

 22.8 7.629E-03 

 ********** SUPERBLOCK 1 ********** 

 time= 1800.00 

 temp 2 temp 3 temp 4 temp 5 temp 6 temp 7 temp 8 temp 10 

 22.4 23.8 23.2 22.4 24.1 22.4 23.6 23.2 

 temp 12 powr 3 powr 6 powr 7 powr 8 

 21.6 0.574 0.00 0.00 0.00 

 ********** SUPERBLOCK 2 ********** 

 time= 2700.00 

 temp 1 humt 1 

 23.7 7.742E-03 

 ********** SUPERBLOCK 1 ********** 
82 

 time= 2700.00 

 temp 2 temp 3 temp 4 temp 5 temp 6 temp 7 temp 8 temp 10 

 22.2 22.9 22.8 22.1 23.9 22.1 23.0 22.8 

 temp 12 powr 3 powr 6 powr 7 powr 8 

 21.4 -1.678E-02 0.00 0.00 0.00 

 ********** SUPERBLOCK 2 ********** 

 time= 3600.00 

 temp 1 humt 1 

 24.0 7.854E-03 

 ********** SUPERBLOCK 1 ********** 

 time= 3600.00 

 temp 2 temp 3 temp 4 temp 5 temp 6 temp 7 temp 8 temp 10 

 22.0 22.7 22.6 22.0 23.8 22.0 22.6 22.6 

 temp 12 powr 3 powr 6 powr 7 powr 8 

 21.3 -0.271 0.00 0.00 0.00 

 

Listing 33. The simulation output file (onezone.out). 

SUPERBLOCK 1 900.00 

 22.7689 27.5906 24.8002 22.7290 24.3389 

 22.7287 25.2990 21.0368 21.7440 0.186918 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 900.00 

 20.8761 7.519144E-03 

SUPERBLOCK 2 1800.00 

 22.7966 7.631347E-03 

SUPERBLOCK 1 1800.00 

 22.1512 22.9318 22.7652 22.1494 23.9234 

 22.1494 22.9529 22.8063 21.4415 -1.671911E-02 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 2700.00 

 23.7598 7.744590E-03 

SUPERBLOCK 1 2700.00 

 22.0239 22.7012 22.5775 22.0331 23.8129 

 22.0330 22.6222 22.6455 21.3000 -0.270597 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 3600.00 

 23.9931 7.856909E-03 

SUPERBLOCK 1 3600.00 

 21.9378 22.6198 22.4793 21.9547 23.7174 

 21.9544 22.4457 22.5566 21.1652 -0.374308 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 4500.00 

 23.8194 7.966517E-03 

SUPERBLOCK 1 4500.00 

 21.8566 22.5247 22.3980 21.8784 23.6149 

 21.8779 22.2938 22.4683 21.0369 -0.346931 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 5400.00 

 23.5564 8.072672E-03 

SUPERBLOCK 1 5400.00 

 21.7736 22.4148 22.3189 21.7980 23.5027 

 21.7974 22.1367 22.3740 20.9152 -0.292846 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 6300.00 

 23.3787 8.173795E-03 

SUPERBLOCK 1 6300.00 

 21.6953 22.3177 22.2470 21.7211 23.3884 

 21.7203 21.9906 22.2856 20.8001 -0.264776 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 7200.00 

 23.2674 8.271983E-03 

SUPERBLOCK 1 7200.00 
83 

 21.6250 22.2377 22.1836 21.6516 23.2769 

 21.6507 21.8722 22.2072 20.6914 -0.255266 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 8100.00 

 23.1777 8.367425E-03 

SUPERBLOCK 1 8100.00 

 21.5625 22.1688 22.1268 21.5895 23.1699 

 21.5886 21.7696 22.1369 20.5889 -0.249601 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 9000.00 

 23.1005 8.460276E-03 

SUPERBLOCK 1 9000.00 

 21.5070 22.1079 22.0751 21.5341 23.0681 

 21.5331 21.6920 22.0738 20.4919 -0.246865 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 9900.00 

 23.0287 8.550673E-03 

SUPERBLOCK 1 9900.00 

 21.4572 22.0523 22.0274 21.4843 22.9715 

 21.4833 21.6237 22.0160 20.4001 -0.243560 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 10800.00 

 22.9637 8.638764E-03 

SUPERBLOCK 1 10800.00 

 21.4123 22.0013 21.9828 21.4393 22.8801 

 21.4383 21.5611 21.9630 20.3133 -0.240724 

 0.00000 0.00000 0.00000 

--------------------( Many lines are deleted. ) ------------------------------------------ 

SUPERBLOCK 2 169200.00 

 23.9381 1.827490E-02 

SUPERBLOCK 1 169200.00 

 21.9976 22.8677 23.0474 22.0428 24.3781 

 22.0409 22.9062 22.8295 22.2383 -0.263689 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 170100.00 

 23.8469 1.824120E-02 

SUPERBLOCK 1 170100.00 

 21.9391 22.7900 22.9650 21.9831 24.2464 

 21.9813 22.7904 22.7514 22.0846 -0.260572 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 171000.00 

 23.7609 1.820589E-02 

SUPERBLOCK 1 171000.00 

 21.8841 22.7163 22.8863 21.9270 24.1207 

 21.9252 22.6812 22.6774 21.9402 -0.257703 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 171900.00 

 23.6797 1.816908E-02 

SUPERBLOCK 1 171900.00 

 21.8324 22.6464 22.8110 21.8741 24.0006 

 21.8724 22.5776 22.6072 21.8029 -0.255051 

 0.00000 0.00000 0.00000 

SUPERBLOCK 1 172800.00 

 21.7890 22.5948 22.7448 21.8299 23.8903 

 21.8282 22.4920 22.5483 21.8000 -0.272467 

 0.00000 0.00000 0.00000 

SUPERBLOCK 2 172800.00 

 23.5657 1.813192E-02 
84 

Time (h)

0 10 20 30 40 50

Inner surface temperature (oC)

20

21

22

23

24

25

26

27

28

T4: Ceiling

T6: South wall

T7: North wall

Figure 12. Inner surface temperatures of the single-zone model.

 

Time (h)

0 10 20 30 40 50

Temperature (oC)

20

22

24

26

28

30

T10: Mean radiant

T12: Outdoor air

T1: Zone air

Figure 13. The outdoor air, zone air, and mean radiant temperatures of the single-zone model. 
85 

 

Time (h)

0 10 20 30 40 50

Solar radiation (W/m2)

0

200

400

600

800

1000

q6: Direct

q7: Diffuse 

q8: Horizontal

 

Figure 14. Artificially generated solar radiation influxes. 

Listing 34. The simulation control input data in path 1. 

0.1 900. 86400. ( tmin, tmax, tstop ) 

y ( building shell use ) 

n ( initialization file use ) 

y ( shell only ) 

1 ( superblock number for shell ) 

0.0 ( beginning time of day ) 

n ( default file use ) 

onezone.dfn 

onezone.bnd 

onezone.fin 

onezone.out 

onezone.sum 

ctfdata.dat 

onezone.met 

y ( reporting time for output ) 

n ( disabling freezing variable feature ) 

n ( diagnostic information ) 

n ( monitoring on screen ) 
86 

Listing 35. The simulation control input data in path 2. 

0.1 900. 172800. ( tmin, tmax, tstop ) 

y ( building shell use ) 

y ( initialization file use ) 

1 ( superblock number for shell ) 

0.0 ( beginning time of day ) 

n ( default file use ) 

onezone.dfn 

onezone.bnd 

onezone.ini 

onezone.fin 

onezone.out 

onezone.sum 

ctfdata.dat 

onezone.met 

y ( reporting time for output ) 

n ( disabling freezing variable feature ) 

n ( diagnostic information ) 

n ( monitoring on screen ) 

Listing 36. Batch job of running MODSIM with the simulation control input data files. 

C:\HVACSIM20\work1>modsim < path_1_onezone.inp

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

 * * 

 * MODSIM : A MODular SIMulation program * 

 * Main program of HVACSIM+ package * 

 * * 

 * version 20.0 * 

 * * 

 * National Institute of Standards & Technology * 

 * Gaithersburg, Maryland 20899-8631 U.S.A. * 

 * * 

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

 Enter minimum time step, maximum time step, and simulation stopping time: 

=> Is the building shell model used? <n> 

=> Will the initialization file be called? <n> 

=> Simulate building shell only? <n> 

=> Only the superblock containing the building model will be called. 

 What is the index number of the superblock for the building shell? 

=> isshel = 1 

 Enter the time of day (in hours after midnight) 

 at which the simulation is to begin : 

=> Use same file names for all files? (y/n) <y> 

=> Enter the name of the model definition file, 

or carriage return for default name: hvacsim.dfn 

=> Enter the name of the boundary variable file, 

or carriage return for default name: hvacsim.bnd 

=> Enter the name of the final state file, 

or carriage return for default name: hvacsim.fin 
87 

=> Enter the name of the output data file, 

or carriage return for default name: hvacsim.out 

=> Enter the name of the simulation summary file, 

or carriage return for default name: hvacsim.sum 

=> Enter the name of the ctf file, 

or carriage return for default name: hvacsim.ctf 

=> Enter the name of the weather data file, 

or carriage return for default name: hvacsim.met 

=> -- The outputs can be written to the output file 

 -- based on either simulation time or reported time. 

 Do you want to use reported time for outputs <n>? 

=> 

 Do you wish to disable freezing variable feature <n>? 

=> 

 Do you want diagnostic information to be written <n>? 

=> Would you like to monitor simulation on screen? <n> 

=> ------- simulation begins --------- 

-- first weather data set has been read 

time= 900.00 

time= 1800.00 

time= 2700.00 

time= 3600.00 

time= 4500.00 

time= 5400.00 

time= 6300.00 

time= 7200.00 

time= 8100.00 

time= 9000.00 

-------------------- (Many lines are deleted.)------------------------------- 

time= 83700.00 

time= 84600.00 

time= 85500.00 

time= 86400.00 

 --Final state file has been written ----- 

 ------------End of simulation --------- 

Program Completed 

Press Enter to Continue. 

C:\HVACSIM20\work1>copy onezone.fin onezone.ini 

 1 file(s) copied. 

C:\HVACSIM20\work1>modsim < path_2_onezone.inp

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

 * * 

 * MODSIM : A MODular SIMulation program * 

 * Main program of HVACSIM+ package * 

 * * 

 * version 20.0 * 

 * * 

 * National Institute of Standards & Technology * 

 * Gaithersburg, Maryland 20899-8631 U.S.A. * 

 * * 

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

 Enter minimum time step, maximum time step, and simulation stopping time: 

=> Is the building shell model used? <n> 

=> Will the initialization file be called? <n> 

=> 
88 

 What is the index number of the superblock for the building shell? 

=> isshel = 1 

 Enter the time of day (in hours after midnight) 

 at which the simulation is to begin : 

=> Use same file names for all files? (y/n) <y> 

=> Enter the name of the model definition file, 

or carriage return for default name: hvacsim.dfn 

=> Enter the name of the boundary variable file, 

or carriage return for default name: hvacsim.bnd 

=> Enter the name of the initial state file, 

or carriage return for default name: hvacsim.ini 

=> Enter the name of the final state file, 

or carriage return for default name: hvacsim.fin 

=> Enter the name of the output data file, 

or carriage return for default name: hvacsim.out 

=> Enter the name of the simulation summary file, 

or carriage return for default name: hvacsim.sum 

=> Enter the name of the ctf file, 

or carriage return for default name: hvacsim.ctf 

=> Enter the name of the weather data file, 

or carriage return for default name: hvacsim.met 

=> -- The outputs can be written to the output file 

 -- based on either simulation time or reported time. 

 Do you want to use reported time for outputs <n>? 

=> 

 Do you wish to disable freezing variable feature <n>? 

=> 

 Do you want diagnostic information to be written <n>? 

=> Would you like to monitor simulation on screen? <n> 

=> ------- simulation begins --------- 

-- first weather data set has been read 

time = 900.0 snsq - iteration not making good progress.iblk= 1 

time= 900.00 

time= 1800.00 

time= 2700.00 

time= 3600.00 

time= 4500.00 

time= 5400.00 

time= 6300.00 

time= 7200.00 

time= 8100.00 

time= 9000.00 

-------------------- (Many lines are deleted.)------------------------------- 

time= 169200.00 

time= 170100.00 

time= 171000.00 

time= 171900.00 

time= 172800.00 

 --Final state file has been written ----- 

 ------------End of simulation --------- 

Program Completed 

Press Enter to Continue. 
89 

6. Useful Information 

3⁄4 State variable freezing and block inactivation 

During a simulation, a state variable may reach steady state, i.e. cease to vary with time. If 

such a state variable is to be solved simultaneously, computation time may be wasted. 

Removing the variable at steady state from the set of simultaneous equations to save 

computation time is referred to as freezing the variable. After a variable is frozen, it can be 

returned to the set of simultaneous equations at a later time for calculation. This returning is 

referred to as unfreezing. The unfrozen variable varies with respect to time. 

If all of the simultaneous equations in a block are frozen and all of its block inputs are frozen, 

the block is inactive. A block is marked active as soon as one of block inputs becomes 

unfrozen. See p. 4 of Reference 2. 

3⁄4 Convergence of the equation solver

When a set of equations are solved simultaneous using the nonlinear equation solver, SNSQ, 

convergence is a problem particularly at the beginning of a simulation, since the initial 

conditions are arbitrarily chosen by a user. The Gauss-Newton’s method which is 

implemented in SNSQ fails to converge if the initial estimate is too far from the final value. 

Choosing the appropriate error tolerance, xtol, for the equation solver as well as properly 

estimating the initial values of state variables are important factors in achieving a good 

convergence. As a rule of thumb, the error tolerance may be equal to or greater than the sum 

of relative error, rtolx, and absolute error, atolx. See p. 5 of Reference 2 and p. 16 of 

Reference 4. 

3⁄4 Selection of maximum and minimum time step

The use of a variable time step and the variable order integration technique in solving 

ordinary differential equations can reduce computation time. Under certain conditions, a 

variable time step that is too large can result in erratic values. Reducing the variable time step 

can eliminate this problem. A user must determine a minimum time step and a maximum 

time step. The choice of minimum and maximum time steps influence the accuracy and 

stability of the simulation and computation time. A simulation that contains no differential 

equation will always proceed at the maximum time step. See p. 6 of Reference 2 and pp. 17-

23 of Reference 4. 

3⁄4 Error tolerances and integration time interval

The relative error tolerance, rtolx, and the absolute error tolerance, atolx, are used in 

integrating differential equations and choosing the time step size. They are also used in 

determining when to freeze or unfreeze state variables. Default values are provided in 

HVACGEN. Since these default values are chosen arbitrarily, a user may select other values 

for a particular simulation by trial and error. 
90 

The integration time interval, ttime, is the time interval between the initial and final time 

considered in the integration using the backward differential formula. The default value is 

provided in HVACGEN, but other value may be selected. See pp. 7-8 of Reference 2 and p. 

23 of Reference 4. 

3⁄4 Selection of iostat

Iostat is an input and output status vector given in TYPEn component model. 

On entry of a TYPEn subroutine, this vector contains the status of the input variables. On exit, 

the vector flags whether the output variable is to be frozen or unfrozen. Iostat for output 

variables should always be set to either 0 to enable freezing or 1 to disable freezing. Set the 

iostat vector size as the same as the number of elements of the output variable vector. See p. 

14 of Reference 2. 

 

Possible values of iostat are as follows: 

-4 time independent boundary condition 

-3 time independent boundary condition 

-2 frozen output (not solved simultaneously) 

-1 output (not solved simultaneously) 

0 solved simultaneously, may not be frozen 

1 solved simultaneously, may be frozen 

2 frozen 

3 unfrozen 

3⁄4 Selection of options for superblocks 

Superblocks are assumed to be only weakly coupled. No simultaneous equations are solved 

between superblocks. Superblocks are allowed to evolve independently in time. 

When the input scan option, insopt, is set to be equal to 1, all superblock inputs are scanned 

after each time step. This selection increases both the accuracy and the computational 

requirement of a simulation. When insopt is set to 0, each superblock is called at times 

determined by the time step control algorithm, regardless of any changes in its inputs at 

intermediate times. The value of insopt influences the coupling between superblocks, and has 

no effect on a simulation with only a single superblock. See pp. 5-6 of Referece 2. 

The superblock variable freezing option, ifzopt, determines which superblock equations are 

recalculated when a superblock equation unfreezes. The freezing option influences the 

strength of coupling between superblocks, and has no effect on simulations with a single 

superblock. Possible values of ifzopt are 0, 1, or 2. 

If ifzopt = 0, a state variable which is unfrozen in a superblock equation is not put back into 

the equation set until the next time step. 

If ifzopt = 1, any unfrozen variables are put back into the superblock equation set and the 

calculation is repeated. 
91 

If ifzopt = 2, all superblock equations are put back into the equation set and the calculation is 

done again. 

The higher the option value is, the greater the computation time. Accuracy increases as the 

option value increases. In some case, depending upon the structure of block/superblock, the 

errors introduced when ifzopt is 0 or 1 are acceptable. But in other cases, this selection 

results in serious errors. Choosing the high option value of 3 may be required for satisfactory 

accuracy. See p. 6 of Reference 2 and p. 22 of Reference 3. 

3⁄4 Size of simulation

The size of simulation is mainly limited by the array sizes of variables in MODSIM. 

The array sizes can be changed in the modules, HVACSIM_PAR and MODSIM_HEAD. 

Great care should be given to ensure that a variable has the same array size in both files. 

Selecting only component models which are needed in a simulation can also reduce the size 

of the simulation. This selection can be done by modifying the subroutine SELECT. During 

SLIMCON run, actual array sizes and maximum allocated array sizes are displayed. See pp. 

6-7 of Reference 2 and p. 37 of Reference 3. 

3⁄4 Blocking superblocks and blocks 

In setting up a simulation work file, it is very important to achieve proper blocking. A system 

of equations in a block is solved simultaneously. In order to obtain a good simulation, 

closely related component models should be put together in a block. The variables that are 

not solved simultaneously in a block can be solved in a superblock. The connection between 

superblocks is not tight. Superblocks are allowed to evolve independently in time. See p. 5 of 

Reference 2 and p.10 of Reference 4. All blocks and units related to the building shell 

components (subroutines TYPE50, TYPE51, TYPE52, and TYPE53) should be placed in one 

superblock. During simulations, the building shell superblock is called at the same time step 

as the time interval for calculating the conduction transfer functions. See pp. 11-12 of 

Reference 4. 

3⁄4 Dealing with differential equations – two different approaches

Originally, the variable time step and variable order integration techniques were introduced 

in solving sets of ordinary differential equations in MODSIM. See pp. 17-23 of Reference 4. 

Later another exact integration method using a fixed time step was introduced using the DIFF 

routine. The fixed time step must be small enough for good simulations. The component 

models developed for ASHRAE 825 project [5] utilized the exact integration method, and the 

numbers of differential equations that appeared in the component model configuration file, 

typar.dat, are set to be zero. 

3⁄4 Modification of simulation work file using a text editor

Sometimes it is much easier to use a text editor instead of using HVACGEN for editing the 

simulation work file, hvacsim.sim. When editing is performed, the numbers shown in 
92 

summary of work file must be matched with the changes made in the main body. Otherwise 

HVACGEN or SLIMCON can not access the edited file. 

 

3⁄4 Editing superblocks 

In the current version of HVACGEN, superblocks can be created, but they cannot be deleted 

or inserted once a simulation work file has been created. This kind of editing can be done by 

using a text editor. Make sure that the numbers shown in summary of work file of the 

simulation work file agree with the numbers in the main body of the file. 

3⁄4 Work involved in modification of a component model

When an existing component model, TYPEn, is to be modified, the following steps may be 

needed. 

(1) Make changes in the code of TYPEn as needed using an editor. Make sure that the 

numbers of inputs, outputs, parameters, saved variables, and differential equations are 

correct. If changes on outputs are made, the values of the iostat vector should be 

checked.

(2) Make sure that the TYPEn subroutine is called by the SELECT subroutine. 

(3) Check whether the array sizes of variables in the modules, HVACSIM_PAR and 

MODSIM_HEAD reflect the changes made in TYPEn. 

(4) Check whether the numbers of saved variables, differential equations, inputs, and 

outputs in the component model configuration file, typar.dat, agree with the those 

numbers presented in the TYPEn. The index numbers of inputs and outputs, and the 

parameter numbers in typar.dat should be checked. The descriptions of inputs, 

outputs, and parameters in typar.dat must be enclosed by single quotation marks. 

(5) Compile and link the source code to generate the executable code of MODSIM. If the 

HVACSIM_PAR module is updated, recompile and link HVACGEN and SLIMCON. 

(6) Update hvacsim.sim by using HVACGEN. 

(7) Create hvacsim.dfn by using SLIMCON. 

(8) If desired, make the updated hvacsim.model for documentation. Check the 

information in hvacsim.inf for correctness. 

A similar approach could be used when one or more component models are created. 

 

3⁄4 Real time application 

The MODSIM program can be used in a real time application. In such a case, it is very 

important that simulations must be performed within the specified time interval. If the 

computation time takes longer than the time interval, the program run stops without giving 

any error message. The maximum time step of MODSIM can be the same as the given time 

interval. It may be helpful to use a computer with a fast processor and reduced input and 

output (I/O) operations. Reducing the number of variables that are solved simultaneously can 

also shorten the computation time. 
93 

3⁄4 Mixed language

Other programming language such as C++ or BASIC can call MODSIM after converting the 

main program of MODSIM into a subroutine. Necessary items should be passed through an 

argument. The MODSIM subroutine along with associated Fortran subroutines and functions 

need to be linked as a DLL file. 

3⁄4 Location of state variable array elements 

Sometimes it is useful to find the location of elements of the state variable array when 

categories and index numbers are known. For instance, it is quite a difficult task to add one 

or more reported variables in a large simulation work file by using HVACGEN. Instead, a 

user can edit the simulation work file by using a text editor and adding the state variable 

location, category number, and index number of the reported variable in that particular 

category. See Table 2. The STATE_LOCATION program reads an input data file as 

NAMELIST input format and produces a tabled file. 

 

3⁄4 Some equations of the component models of an air-handling unit 

Reference 10 also shows some equations of the component models used in modeling an airhandling unit referring to Reference 5. 

7. References 

1. Park, C., D.R. Clark, and G.E. Kelly, An Overview of HVACSIM+

, A Dynamic 

Building/HVAC/Control Systems Simulation Program , Proceedings of the 1st Annual 

Building Energy Simulation Conf., Seattle, WA, August 21-22, 1985. 

2. Clark, D.R., HVACSIM+ Building Systems and Equipment Simulation Program 

Reference Manual, NBSIR 84-2996, NIST, Jan. 1985. 

3. Clark, D.R., and W.B. May, HVACSIM+ Building Systems and Equipment Simulation 

Program Users Guide, NBSIR 85-3243, NIST, Sept.1985. 

4. Park, C., D.R. Clark, and G.E. Kelly, HVACSIM+

 Building Systems and Equipment 

Simulation Program Building Loads Calculation, NBSIR 86-3331, NIST, Feb.1986. 

5. Norford, L.K. and P. Haves, A Standard Simulation Testbed for the Evaluation of 

Control Algorithms and Strategies, ASHRAE Report 825-RP, ASHRAE, 1997. 

6. Miller, A.J., Software from Alan J. Miller, http://users.bigpond.net.au/amiller, updated 

Feb. 4, 2004. 

7. Varanasi, A., Development of a Visual Tool for HVACSIM+

, Master thesis, Oklahoma 

State University, Dec. 2002. 

8. WYEC2 User’s Manual and Toolkit, ASHRAE contract 728-TRP, Augustyn+ 

Company, 1997. 

9. ASHRAE Handbook 1997 Fundamentals, p. 28.19, 1997. 

 10. Park, C., P.A. Reneke, M.A. Galler, S.T. Bushby, and W.D. Davis, Enhancement of 

 the Virtual Cybernetic Building Testbed to Include a Zone Fire Model with HVAC 

 Components, NISTIR 7414, NIST, April 2007. 
94 

8. Appendix: List of Source Code Files in the HVACSIM+

 Program Package 

File Name Program 

Name 

Description 

Modsim.f90 MODSIM Main program of MODSIM 

Modsim_head.f90 PRECISION1 Precision module 

MODSIM_HEAD Module for global variables and array sizing 

Modino.f90 BOUNDS Read time-dependent boundary variables 

INDATA Enter input data for a simulation 

OPNFIL Open input and output files 

RCONF Read the model definition and initialization files 

REPORT Generate the report file 

SUMARY Write the summary of configuration of simulation 

VLAB Return labels and numbers 

Modblk.f90 ASEMBL Assemble block inputs and outputs 

BACTIV Control block activity 

FRZVAR Freeze variables 

INPUTS Assign state variables to inputs of unit

INSCAN Scan inputs of superblocks

INTLIZ Initialize simulation 

OUTPUT Store outputs from unit

RESTAT Reset outputs of block

UNFREZ Check frozen variables 

Modbdf.f90 BAKDIF Calculate derivative 

CALN Compute the minimum time step 

ECNTRL Calculate truncation errors, time step, and 

integration order 

IPERM Permutated vectors 

NORDER Increase or decrease the order of integration 

PREDIK Calculate predicted values for the next time step 

RESET Reset the differential equation integrator 

SAVECO Save and replace coefficients 

UPDATE Update coefficients for BACDIF and PRDIK 

Modeqt.f90 BLOCK Calculate a new state vector by calling a block

FNC Calculate the residual function for block

SUPERB Calculate a new state vector by calling a 

superblock

SUPFNC Calculate the residual function for superblock

Select.f90 SELECT Call TYPEn subroutines 

Snsqa.f90 SNSQ Find a zero of a system of nonlinear functions 

SNSQ1 The same as SNSQ but called by BLOCK 

subroutine 

SNSQ2 The abbreviated version of SNSQ 

Snsqb.f90 DOGLEG Determine the convex combination x of the 
95 

Gauss-Newton and scaled gradient directions 

ENORM Calculate the Euclidean norm of x 

QFORM Accumulate orthogonal matrix Q from the 

computed QR 

QRFAC QR factorize of matrix using Householder 

transformations 

R1MPYQ Compute A*Q for a given matrix A 

R1UPDT Determine an orthogonal matrix Q 

Snsqc.f90 FDJAC1 Forward difference approximation to the Jacobian 

matrix. Called by SNSQ 

FDJAC2 The same as FDJAC1 except argument. Called by 

SNSQ1 and SNSQ2. 

R1MACH Machine-dependent constants for local computer 

environment 

Rdenv.f90 RDENV Read weather data and conduction transfer 

functions. Interpolate hourly data using the spline 

interpolation 

SPLINE Second derivatives for the spline interpolation 

SPEVAL Interpolation using the cubic spline method 

Datetime.f90 DATETIME Read system clock and return time as integers 

Hvacgen1.f90 HVACGEN Main program of HVACGEN 

DATAIN Verify input information 

COPMOD Input data processor 

CHECK Check whether the parsed word is a number 

REWORD Check whether the input is reserved word 

REMAIN Control transfer to the requested module 

HOLDIT Produce a pause for acknowledgment of error 

display 

SCROLL Make a screen display paused when the screen is 

full 

OKAY Check whether an existing value is acceptable 

RITE Display console message and menu 

PROMPTD Provide index labels corresponding to category 

numbers 

Hvacgen2.f90 CREATE Control transfer to the proper routine for create 

mode 

CRUNIT Create a unit

CRBLK Create a block

CRSUP Create a superblock

CRSIM Call CRSIM1, CRSIM2, CRSIM3 and CRSIM4 

CRSIM1 Enter simulation title, and error tolerances 

CRSIM2 Enter initial values of state variables 

CRSIM3 Enter boundary information 

CRSIM4 Enter reported variable information 

RECRT Call a proper module according to the entry of 

reserved words 

TYPES List TYPEn available in typar.dat file 
96 

Hvacgen3.f90 FSAVE Call the routine for saving the created file 

READIN Select the module for reading a file 

OPNFIL Enter the file name and opening the file 

RDUNT Read the file of unit with the extension unt

RDBLK Read the file of block with the extension blk

RDSIM Read the file of simulation work with the 

extension sim

SAVUNT Write information to the unit file 

SAVBLK Write information to the block file 

SAVSIM Write information to the simulation work file 

TYPEIN Create a direct access file for typar.dat and read 

information from the direct access file 

Hvacgen4.f90 VIEW Control transfer to the proper routine for view 

mode 

VEWUNT View inputs, outputs, and parameters of the unit

VEWBLK View the information of the block

VEWSIM Provide the menu for different view options 

STRUCT View the structure of the simulation setup 

VARVAL View the initial values of state variables 

BOUND View the boundary information 

RPTVAR View the reported variables 

ERRORS View the error tolerances, and the freezing and 

scan options 

REVIEW Direct either help or abort mode 

VEWALL View all the information of simulation work file 

Hvacgen5.f90 EDIT Control transfer to the proper routine for edit 

mode 

EDUNT Edit information in the unit

EDSIM Edit information in the simulation 

EDTITL Edit the title 

EDSTR Call the routine for editing the structure 

EDVAL Edit the initial values of state variables 

EDBND Edit the boundary information 

INSERT Enter the index of a boundary variable 

DELETE Delete the index of a boundary variable 

EDREP Edit the reported variable information 

PRCHNG Edit the reported interval

RPINRT Enter the index of a reported variable 

RPDELT Delete the index of a reported variable

EDERR Edit the error tolerance and the freezing and scan

options 

REEDT Call the help routine 

Hvacgen6.f90 INSSIM Call the routine for inserting or replacing unit or 

block

INSUNT Insert a unit 

INSCHK Give the number of units in the block

INSBLK Insert a block
97 

INSCK2 Give the information of superblock and unit to 

INSBLK 

RECALC Recalculate the new position of the variable in 

state vector after an insertion 

TYPINF Get the information of input and output categories 

from the typar.dat file 

REBND Calculate the new position in the state vector of 

the boundary variables 

REREPT Calculate the new position in the state vector of 

the reported variables 

DELSIM Call the routine for deleting a unit or block from a 

simulation 

DELUNT Delete a unit from the simulation setup 

DELBLK Delete a block from the simulation setup 

DELCHK Check the unit number to be deleted 

DELCK2 Check the block number to be deleted 

REPSIM Call the routine for replacing a unit in the 

simulation 

REPUNT Replace a unit in the simulation 

HELP Describe available commands in the HVACGEN 

program 

EXTBLK Save the information in the block of the simulation 

file in a block file 

Hvaccomm.f90 HVACSIM_PAR Array sizing of global variables 

HVACCOMM Global variable module 

Hvacgen.inc Include portion to HVACGEN 

Slimcon.f90 SLIMCON Main program of the SLIMCON program to 

generate a model definition file using a simulation 

work file with the extension sim

FILEOP Open the input and output files 

TYPAR Get information from the typar.dat file 

REPORT Display the configuration parameters along with 

the maximum values assigned 

VARCHK Check whether any of the time-dependent 

boundary variables are solved simultaneously 

OUTCHK Check if two or more outputs are assigned to a 

single state variable 

TDBVIS Find the largest number of time-dependent 

boundary variables in any one superblock

Slimcomm.f90 SLIM Global variable module 

Upd_info.f90 UPD_INFO Add supplemental information to the viewsave.txt

file 

Rdwdf.f90 RDWDF Main program to read a whole year weather data 

file 

RDWDF_HEAD Global variable module 

RDWTP Position and check weather data file 

RDSOLM Read the NOAA SOLMET format data 
98 

RDTMY Read the NOAA Typical Meteorological Year (TMY) 

format data 

RDTRY Read the NOAA Test Reference Year (TRY) format 

data 

RDWYEC Read the ASHRAE Weather Year for Energy 

Calculations (WYEC) format data 

RDWYEC2 Read the ASHRAE Weather Year for Energy 

Calculations 2 (WYEC2) format data 

WRTFIL Write output data 

JDS Evaluate Julian date 

Crwdta.f90 CRWDTA Main program to create the weather data file 

CRWDTA_COMM Global variable module 

WTPINP Read the output file of the RDWDF program 

WF Compute humidity ratio in terms of dew point 

temperature and pressure 

SOLAR Generate artificial weather data of solar radiation 

DB Generate design day outdoor dry-bulb 

temperature for summer 

HUMIDITY Calculate humidity ratio assuming constant 

relative humidity 

COPYFL Write outputs on the weather data file 

Ctfgen.f90 CTF Main program to create the conduction transfer 

function (CTF) data file 

PRECISION1 Precision module 

CTF_COMM Global variable module 

MAKE_CTF Create a CTF data file for MODSIM 

THERMP Add new data of thermal properties of building 

materials in the thermal property data file 

BANKTP Make a temporary direct access file of the thermal 

property data 

DER Calculate the total construct and total derivative 

matrices, and determining residue elements for a 

non-zero root 

DUMPRF Print description of conductive layers, values of 

roots, conduction transfer functions, and heat flux 

transfer functions 

ERRORX Print error messages 

ILLINI Calculate roots in the interval using modified false 

position method 

INITRF Call subroutines related to calculation of 

conduction transfer functions 

MARIX Evaluate the conduction matrix for a multilayered 

slab 

RFCOMP Compute conduction transfer and heat flux 

transfer functions for multilayered constructs 

SEARCH Determine the upper and lower bounds within 

which a root must exist 

ZERORE Calculate zero residue of elements 
99 

Sortsb.f90 SORTSB Program to sort the raw output data file 

superblock by superblock

Airpr.f90 CPCVA Specific heat of air at constant pressure and 

volume 

HA Enthalpy of air vs. temperature 

PHIA Entropy of air vs. temperature 

TPHIA Temperature of air vs. entropy 

VISCA Dynamic viscosity of air vs. temperature 

AKA Thermal conductivity of air vs. temperature 

Water.f90 TSATS Saturation temperature of steam vs. pressure 

PSATS Saturation pressure of steam vs. temperature 

VSATS Saturation specific volume of steam vs. 

temperature and pressure 

VSATW Saturation specific volume of water vs. saturation 

temperature 

HSATW Saturation enthalpy of liquid water vs. saturation 

temperature 

HFG Latent heat of vaporization of water vs. saturation 

temperature 

HSATS Enthalpy of saturated steam vs. saturation 

temperature 

SSATW Saturation entropy of liquid water vs. saturation 

temperature 

SSATS Entropy of saturated steam vs. saturation 

temperature 

VS Specific volume of superheated steam vs. 

pressure and temperature 

HS Enthalpy of superheated steam vs. pressure and 

temperature 

SS Entropy of superheated steam vs. pressure and 

temperature 

TPSS Temperature of steam vs. pressure and entropy 

CPS Specific heat of steam at constant pressure vs. 

temperature 

CVS Specific heat of steam at constant volume vs. 

specific volume and temperature 

VISSV Dynamic viscosity of saturated vapor vs. pressure 

VISSPH Dynamic viscosity of superheated steam vs. 

temperature 

STEAMK Thermal conductivity of superheated steam vs. 

temperature 

WRHO Density of water vs. temperature 

WMU Viscosity of water vs. temperature 

WK Thermal conductivity vs. temperature 

WCP Specific heat of water vs. temperature 

Refrigpr.f90 REFRIG_HEAD Global variables module 
100 

PSAT Saturation pressure of refrigerant vs. temperature

TSAT Saturation temperature of refrigerant vs. 

saturation pressure

TVSAT Saturation temperature of refrigerant vs. 

saturation specific volume

PGAS Pressure of refrigerant vs. specific volume and 

pressure 

VGAS Specific volume of refrigerant vs. pressure and 

temperature 

HGAS Enthalpy of refrigerant vs. pressure, specific 

volume, and temperature 

SGAS Entropy of refrigerant vs. specific volume and 

temperature 

HPS Enthalpy of refrigerant vs. pressure and entropy 

TPH Temperature of refrigerant vs. pressure and 

enthalpy 

TVH Temperature of refrigerant vs. specific volume 

and enthalpy 

DHLAT Latent heat of vaporization of refrigerant vs. 

pressure, specific volume, and temperature 

RHOLIQ Density of refrigerant vs. temperature 

CV Specific heat of refrigerant at constant volume vs. 

specific volume and temperature 

CPCV Specific heat of refrigerant at constant volume 

and pressure vs. specific volume and temperature 

Types.f90 TYPE1 Fan and pump 

TYPE2 Conduit (duct or pipe) 

TYPE3 Inlet conduit (duct or pipe) 

TYPE4 Flow merge 

TYPE5 Damper or valve 

TYPE6 Flow split 

TYPE7 Temperature sensor 

TYPE8 Proportional-Integral controller 

TYPE9 Linear valve with pneumatic actuator 

TYPE10 Hot water coil 

TYPE11 Hot water to air heating coil 

TYPE12 Cooling or dehumidifying coil 

TYPE13 Three-way valve 

TYPE14 Evaporative humidifier 

TYPE15 Room model with constant zone loads 

TYPE16 Sticky proportional controller 

TYPE17 Mixing damper and merge 

TYPE18 Plenum 

TYPE19 Flow balance control 

TYPE20 High/low limit controller 

TYPE21 Clamped split 

TYPE22 Steam spray humidifier 
101 

TYPE23 Steam nozzle 

TYPE24 Ideal gas nozzle 

TYPE25 Steam to air heating coil 

TYPE26 Control signal inverter 

TYPE27 Moist air flow merge 

TYPE28 Constant flow resistance 

TYPE29 Inlet constant flow resistance 

Utility.f90 HYSTER Hysteresis of actuators 

DELAY Transport delay in ducting component 

SUFED Coefficients for the polynomial of the efficiency of 

heat exchanger fin 

BESI Modified Bessel function I(x) 

BESK Modified Bessel function K(x) 

POLFIT Polynomial fitting 

Typesa.f90 TYPE30 Cooling coil duty from inlet conditions 

TYPE33 Moist air mixing dampers and merger 

TYPE34 Multiplier 

TYPE35 Mean values of temperatures and humidity ratios 

TYPE36 Reset schedule 

TYPE39 Time-of-day control with zone demand reset 

Typesb.f90 TYPE50 Zone envelope (building shell) 

TYPE51 Building surface (building shell) 

TYPE52 Zone model (building shell) 

TYPE53 Weather input (building shell) 

Utilityb.f90 CP Specific heat of moist air 

DENSIT Density of moist air 

PWF Vapor pressure of moist air 

AIREX Air exchange rate 

WSATF Humidity ratio at saturation state 

HISCF Convective heat transfer coefficient of the inner 

surface 

HOSF Convective plus radiant heat transfer coefficient of 

the 

outer surface 

HISRF Radiant heat transfer coefficient of the inner 

surface 

VIEW View factors using the mean radiant temperature 

network method 

Blc_head.f90 BLC_HEAD Global variable module 

Blc.f90 TYPE62 Fossil fuel-fired hot water boiler with a domestic 

hot water heating coil 

TYPE63 Hot water coil with constant wall temperature 

TYPE64 Boiler burner and circulating pump controls 
102 

Utility_blc.f90 CPF Combustion product specific heat 

GEF Gas emissivity 

GS Gas/Sink exchange area 

HCOVF Convective heat transfer coefficient 

PRDPP Combustion products 

PRDPR Viscosity and conductivity of combustion product 

TAFF Adiabatic flame temperature 

TAB1 Determine Y(x1) value from tabulated y vs. x 

values 

Plant.f90 TYPE122 Static boiler 

TYPE124 Chiller 

TYPE143 Cooling tower 

TYPE144 Chiller sump 

TYPE145 Cooling tower 

TYPE146 Chiller sump temperature 

TYPE179 Cooling tower controller 

TYPE200 Mixing of water flows 

TYPE201 Adding electric powers 

TYPE202 Integrator of thermal power for energy 

TYPE203 Relative humidity and wet-bulb temperature 

ASH_sensor.f90 TYPE301 Temperature sensor 

TYPE302 Humidity sensor 

TYPE303 Flow rate sensor 

TYPE304 Total pressure sensor 

TYPE305 Static pressure sensor 

ASH_element.f90 TYPE321 Motor-driven actuator 

TYPE322 Damper 

TYPE323 Damper - calculates flow rate 

TYPE324 Mixing box (implicit flow) 

TYPE325 Mixing box 

TYPE326 Mixing box with minimum OA damper (implicit 

flow) 

TYPE327 Mixing box with minimum outside air damper 

TYPE328 Two port control valve 

TYPE329 Two port control valve 

TYPE330 Three port mixing valve 

TYPE333 Variable speed drive 

ASH_fluid.f90 TYPE341 Fluid resistance 

TYPE342 Fluid resistance - calculates flow rate 

TYPE345 Flow split 

TYPE346 Asymmetric flow split 

TYPE348 Flow merge 

TYPE349 Room air mass balance 
103 

TYPE350 Fan or pump 

TYPE351 Fan or pump (implicit flow) 

TYPE352 Fan or pump - temperature rise 

TYPE353 Fan or pump (implicit flow) - temperature rise 

ASH_heatmass.f90 TYPE362 Dynamic or steady state heating and cooling coil 

TYPE366 Ideal heating of fluid stream 

TYPE367 Mixing of two moist air streams 

TYPE368 Mixing of six moist air streams 

TYPE369 Supply and return air flow rates 

ASH_building.f90 TYPE401 Two time constant room model (no plenum) 

TYPE402 Room with plenum return 

TYPE403 Room with plenum and ducted return (analytical 

integration) 

TYPE404 Room with plenum and ducted return (numerical 

integration) 

TYPE411 Room (no plenum, no interzone flows) 

TYPE412 Room with plenum return (no interzone flows) 

TYPE413 Room with plenum and ducted return (analytical 

integration) 

TYPE414 Room with plenum and ducted return (numerical 

integration) 

ASH_performance.f90 TYPE461 Fanger PMV and PPD 

TYPE462 Heat Meter 

TYPE463 Energy Meter 

ASH_control.f90 TYPE441 PID controller 

TYPE481 Supply fan control 

TYPE482 Return fan volume matching control 

TYPE483 Return fan reset control 

TYPE484 Minimum outside air damper control 

TYPE485 Modulated mixed air damper control 

TYPE486 Supply air temperature control 

TYPE487 Economizer control 

TYPE488 Low temperature override control 

TYPE489 Supply air temperature reset 

TYPE490 VAV room temperature control with reheat 

ASH_composite.f90 TYPE521 Dynamic or steady state coil and two port valve 

 - calculates water-side inlet pressure from flow 

rate 

TYPE522 Dynamic or steady state coil and two port valve 

 - calculates water-side flow rate from inlet 

pressure 

TYPE523 Dynamic or steady state coil and three port valve 

TYPE524 Dynamic or steady state coil and three port valve 

TYPE525 Motorized pressure-independent VAV box 

TYPE526 Pressure-independent VAV box - calculates flow 

TYPE527 Pressure-independent VAV box (implicit flow) 

TYPE528 Flow split and pressure-independent VAV box 
104 

Utility_ashrae.f90 DIFFEQ Analytical integration 

LICOILAB Dynamic heating and cooling coil 

LICOILDY Dynamic heating and cooling coil 

LICOILSS Steady state Liege heating and cooling coil 

EFFECTIV Calculate the effectiveness of different heat 

exchanger 

configurations 

AIRCOEFF Calculate the convective heat transfer coefficient 

on the 

air side 

AIRFINRES Calculate the heat exchange resistance on the air 

side of a fin-tube heat exchanger 

VISCWAT Calculate the dynamic viscosity of water as a 

function of temperature 

WATERRES Calculate water-side heat transfer coefficient and 

thermal resistance 

BYPASFAC Calculate the by-pass factor on the air side 

CAPRATIO Capacity rate ratio and the minimum capacity rate 

from the capacity rates on the air and water side 

LIMITHR Check that the humidity ratio at the outlet of a 

coil 

does not exceed saturation value and recalculate 

outlet 

conditions if necessary 

WETOUTCO Calculate the condition of the outlet air from a wet 

coil, limiting the outlet humidity ratio to the 

saturation value while conserving enthalpy 

DRYOUTCO Calculate the outlet air condition for a dry coil 

TSHOBF Calculate the effective surface temperature, outlet 

enthalpy and bypass factor for a wet coil from the 

inlet 

conditions and the duty 

QEFFNTU Calculate duty for air-water heat exchangers 

QAIRSIDE Calculate the air-side resistance, by-pass factor 

and 

heat transfer 

QWATSIDE Calculate the water-side resistance from the total 

resistance and the air-side resistance and 

calculate 

the water-side heat transfer 

COILCAP Calculate the heat capacity of the fins, tubes and 

water 

in a fin-tube heat exchanger 

ABSVALUE Absolute value 

SQROOT Square root 

SUM Sum first and second arguments 

DIFF Subtract second argument from first argument 

PRODUCT Product of first and second arguments 

QUOTIENT Quotient of first and second arguments 

AVERAGE Average of first n elements of a vector 
105 

SUMARRAY Sum of first n elements of a vector 

SMALLEST Minimum of first n elements of a vector 

BIGGEST Maximum of first n elements of a vector 

LOGICNOT Logical compliment 

LOGICAND Logical AND of first and second arguments 

LOGICOR Logical OR of first and second arguments 

LOGICXOR Exclusive OR of first and second arguments (XOR) 

RETOLOG Convert a real to a Boolean 

LOGTORE Convert a Boolean to a real 

ENTHALPY Calculate the specific enthalpy of moist air at 

standard pressure 

WETBULB Calculate the wet bulb temperature of moist air at 

standard pressure 

DEWPOINT Calculate the dew point temperature of moist air 

at standard pressure 

CLIP Limit the first argument to the range defined by 

the second and third arguments 

SWITCH Select the second argument if the first argument 

is true, else select the third argument 

SPAN Rescale 

DEADBAND Determine the effective setpoint in the presence 

of a deadband 

COMPARE Compare two real numbers 

COMPHYS Compare two real numbers using a deadband 

PIDCONT Discrete-time Proportional plus Integral plus 

Derivative controller 

MOISTMIX Calculate the temperature and humidity ratio 

produced by mixing up to six moist air streams 

DPQUDLIN Calculate pressure drop from flow rate and 

quadratic 

resistance- use linear flow relationship at low flow 

DPLIN Calculate pressure drop from flow rate and 

quadratic 

resistance at low flow - use linear flow 

relationship 

DPQUD Calculate pressure drop from flow rate and 

quadratic 

resistance 

WQUDLIN Calculate flow rate from pressure drop and 

turbulent 

resistance 

WLIN Calculate flow rate from pressure drop and 

turbulent 

resistance at low flow - use laminar flow 

relationship 

WQUD Calculate flow rate from pressure drop and 

turbulent 

resistance 

RLINPORT Calculate hydraulic resistance of a linear port in a 

control valve 

REQPPORT Calculate hydraulic resistance of an equal 
106 

percentage 

port in a control valve 

RDAMPER Calculate resistance of damper using Legg's 

correlation 

INTERPAR Determine coefficients of interpolation function 

YQUAD Evaluate quadratic function ax2

 +bx + c 

FLOWMERG Calculate the outlet flow rate and the inlet 

pressures 

for a flow merge, given the outlet pressure and 

the inlet flow rates 

FLOWSPLT Calculate the outlet flow rates and the inlet 

pressure for a flow split, given the outlet 

pressures and the inlet flow rate 

SPEDLIM Apply upper and lower limits to actuator speed 

HYSTRSIS Hysteresis of actuators 

FPWS Saturation pressure over liquid water for the 

temperature range of 0 deg C to 200 deg C 

FTDEW Dew point temperature or saturation temperature 

as a function of the humidity ratio 

FPWW Partial pressure of water vapor as a function of 

the humidity ratio and of the barometric pressure 

FWPW Humidity ratio as a function of the vapor pressure 

and the barometric pressure 

FWPHI Humidity ratio as a function of the air dry bulb 

temperature and the relative humidity 

FWTWB Humidity ratio as a function of the air dry bulb 

temperature and of the air wet bulb temperature 

FWHA Humidity ratio as a function of the air dry bulb 

temperature and of the air enthalpy 

FTDB Air dry bulb temperature as a function of the 

humidity ratio and of the air enthalpy 

FPHI Relative humidity as a function of the dry air 

temperature and the humidity ratio 

FHAIR Enthalpy of moist air 

FHSAT Air saturation enthalpy as function of saturation 

temperature 

FTSAT Saturation temperature as a function of the air 

saturation enthalpy 

FTWB Air wet bulb temperatures as a function of the air 

dry bulb temperature, the humidity ratio and the 

barometric pressure 

FTAIR Temperature of moist air 

ELAPSED Calculate elapsed time from current and initial 

second and millisecond values 

TCORRECT Correct time expressed in integer second and 

millisecond subtracting a real time interval 

RFILE Read values of simulation variables from a file 

ahu_wbe.f90 TYPE107 Holder for data storage allocation 

TYPE108 Holder for data storage allocation for the 6-zone 

model of VCBT controllers 
107 

TYPE365 Mixing of three moist air streams 

TYPE371 Mixing box 

TYPE428 Room (analytical integration) 

TYPE471 Supply fan control 

TYPE480 Return fan volume matching control 

TYPE492 Supply air temperature control 

TYPE493 Supply air temperature reset 

TYPE496 VAV room temperature control with reheat 

TYPE497 Modulated mixed air damper control 

TYPE499 Air damper control 

TYPE504 Read inputs from a file 

TYPE530 Dynamic or steady state coil and three port valve 

utility_wbe.f90 PID PID controller module 

RSCLFR Rescale 

RSCLTO Rescale 

XLIMAT Limit 

ADD Add 

ICOMP Compare 

IHYST Cooling tower fan limiting 

ITIMER Timer