NIST Technical Note 1912 

CONTAM Results Export Tool 

Brian Polidoro 

Lisa C. Ng 

W. Stuart Dols

This publication is available free of charge from: 

http://dx.doi.org/10.6028/NIST.TN.1912
NIST Technical Note 1912 

CONTAM Results Export Tool 

Brian Polidoro 

Lisa C. Ng 

W. Stuart Dols

Energy and Environment Division 

Engineering Laboratory 

This publication is available free of charge from: 

http://dx.doi.org/10.6028/NIST.TN.1912

U.S. Department of Commerce 

Penny Pritzker, Secretary

National Institute of Standards and Technology 

Willie E. May, Under Secretary of Commerce for Standards and Technology and Director

March 2016
Certain commercial entities, equipment, or materials may be identified in this 

 document in order to describe an experimental procedure or concept adequately. 

Such identification is not intended to imply recommendation or endorsement by the 

National Institute of Standards and Technology, nor is it intended to imply that the 

entities, materials, or equipment are necessarily the best available for the purpose. 

National Institute of Standards and Technology Technical Note 1912 

Natl. Inst. Stand. Technol. Tech. Note 1912, 33 pages (March 2016) 

CODEN: NTNOEF

This publication is available free of charge from: 

http://dx.doi.org/10.6028/NIST.TN.1912
ii

Abstract 

CONTAM is a multizone indoor air quality and ventilation analysis program developed by the 

National Institute of Standards and Technology (NIST) (Dols and Polidoro 2015). CONTAM 

generates a wide range of different simulation outputs in the form of binary and text-based files. 

CONTAM provides the ability to view a limited set of these results via the CONTAM graphical 

user interface, but many users require access to a much broader range of results. The CONTAM 

Results Export Tool (subsequently referred to as “Export Tool”) was created to provide access to 

all of the results that can be generated by a CONTAM simulation. It does so by reading the 

binary result files and converting them to tab-delimited text files that can be read using a 

spreadsheet program. The results that can be exported include contaminant concentrations; zone 

temperatures; weather conditions; airflows through individual paths, ducts and duct leakages; 

temporal and spatial averages of zone concentrations; and exposure results. The Export Tool also 

includes the ability to export infiltration rates for use in simulations performed with the 

EnergyPlus whole-building energy simulation program. This document describes five features of 

the Export Tool: (1) general conversion of binary results to text, (2) computing temporal and 

spatial averages of zone contaminant concentrations, (3) exporting occupant exposure results, 

(4) exporting whole-building air change rates from a CONTAM simulation for use in

EnergyPlus, and (5) exporting zone-specific air change rates from a CONTAM simulation for

use in EnergyPlus. The Export Tool is available, along with CONTAM and other NISTdeveloped software, on the NIST Multizone Modeling Website

http://www.bfrl.nist.gov/IAQanalysis.

Keywords 

airflow, CONTAM, contaminants, occupant exposure, simulation 
iii

Table of Contents 

Abstract .......................................................................................................................................... ii

Keywords ....................................................................................................................................... ii

Table of Contents .......................................................................................................................... iii

1. Introduction ............................................................................................................................. 1

2. Features .................................................................................................................................... 2

3. Feature: Export .sim files to text file ....................................................................................... 3

3.1. Step-by-step instructions for the “Export .sim files to text file” feature .......................... 4

4. Feature: Compute temporal/spatial averages of concentrations .............................................. 9

4.1. Step-by-step instructions for the “Compute temporal/spatial averages of concentrations” 

feature ....................................................................................................................................... 10

5. Feature: Process exposure results .......................................................................................... 11

5.1. Step-by-step instructions for the “Process exposure results” feature ............................. 12

6. Feature: Export infiltration to EnergyPlus: whole-building air change rates ........................ 13

6.1. Background: Modeling infiltration in EnergyPlus ......................................................... 13

6.2. Limitations and Other Considerations............................................................................ 14

6.3. What’s created by the feature ......................................................................................... 15

6.4. Using the feature ............................................................................................................ 17

6.5. Step-by-step instructions for the “Export infiltration to EnergyPlus: whole-building air 

change rates” feature ................................................................................................................. 18

6.6. What to do with the .csv and partial .idf files ................................................................ 19

7. Feature: Export infiltration to EnergyPlus: zone-specific air change rates ........................... 25

7.1. Background .................................................................................................................... 25

7.2. Limitations ..................................................................................................................... 25

7.3. What’s created by the feature ......................................................................................... 25

7.4. Using the feature ............................................................................................................ 27

7.5. Step-by-step instructions for the “Export infiltration to EnergyPlus: zone-specific air 

change rates” feature ................................................................................................................. 28

7.6. What to do with the .csv and partial .idf files ................................................................ 29

8. Conclusion ............................................................................................................................. 33

9. References ............................................................................................................................. 33
1

1. Introduction

CONTAM is a multizone indoor air quality and ventilation analysis program developed by the

National Institute of Standards and Technology (NIST) (Dols and Polidoro 2015). CONTAM

generates a wide range of different simulation outputs in the form of binary and text-based files.

CONTAM provides the ability to view a limited set of these results via the CONTAM graphical

user interface, but many users require access to a much broader range of results. The CONTAM

Results Export Tool (subsequently referred to as “Export Tool”) was created to provide access to

all of the results that can be generated by a CONTAM simulation. It does so by reading the

binary result files and converting them to tab-delimited text files that can be read using a

spreadsheet program. The results that can be exported include contaminant concentrations; zone

temperatures; weather conditions; airflows through individual paths, ducts and duct leakages;

temporal and spatial averages of zone concentrations; and exposure results. The Export Tool also

includes the ability to export infiltration rates for use in simulations performed with the

EnergyPlus whole-building energy simulation program. This document describes five features of

the Export Tool: (1) general conversion of binary results to text, (2) computing temporal and

spatial averages of zone contaminant concentrations, (3) exporting occupant exposure results,

(4) exporting whole-building air change rates from a CONTAM simulation for use in

EnergyPlus, and (5) exporting zone-specific air change rates from a CONTAM simulation for

use in EnergyPlus. The Export Tool is available, along with CONTAM and other NISTdeveloped software, on the NIST Multizone Modeling Website

http://www.bfrl.nist.gov/IAQanalysis. The user interface (or “Home Screen”) is shown in

Figure 1. 

Figure 1. CONTAM Results Export Tool user interface (or “Home Screen”)
2

2. Features

The CONTAM Results Export Tool has five export options. Below is a short description of each, 

color-coded to match the organization of the document. Click on the feature name to go directly 

to the location in the document where it is described in more detail.

1. Export .sim file to text files: Use this option to export building conditions (temperature, 

pressure differences, air density), ambient conditions (temperature, atmospheric pressure 

differences, wind speed, and wind direction), and contaminant concentrations (indoor, 

outdoor) to tab-delimited text files. 

2. Compute temporal/spatial averages of concentrations: Use this option to export 

concentration results that are averaged temporally (over a user-defined period of time) or 

spatially (over a user-specified set of zones).

3. Process exposure results: Use this option to export exposure results organized by 

occupants or by contaminants.

4. Export infiltration to EnergyPlus: whole-building air change rates: Use this option to 

export whole-building infiltration rates for use in EnergyPlus.

5. Feature: Export infiltration to EnergyPlus: zone-specific air change rates: Use this 

option to export zone-specific infiltration rates for use in EnergyPlus.
3

3. Feature: Export .sim files to text file

Use this option to export indoor environmental conditions (zone temperature, zone gauge 

pressure, pressure differences across leakage paths, and air density), ambient environmental 

conditions (temperature, atmospheric pressure, wind speed, and wind direction), and contaminant 

concentrations (indoor, outdoor) to tab-delimited text files. Figure 2 presents a flow diagram of 

the steps involved in exercising this feature. The numbered/colored boxes refer to figure numbers

throughout the step-by-step instructions that follow and that show screen shots of the Export 

Tool.

Figure 2. Flow diagram of the “Export .sim file to text files” feature
4

3.1. Step-by-step instructions for the “Export .sim files to text file” feature

1. On the CONTAM Results Export Tool Home Screen (Figure 1), select the “Export .sim files 

to text files” radio button then click the “Next” button. 

2. Select both a CONTAM project (.prj) and simulation results (.sim) file (Figure 3). 

3. Choose from three types of results to output: Output Contaminant Concentration Results, 

Output Ambient and Zone Results, and Output Airflow Results (Figure 4).

Figure 3. Selecting CONTAM project (.prj) and simulation results (.sim) files

Figure 4. Three types of results within the “Export .sim file to text files” feature

Note: If the .sim file selected contains contaminant results (i.e., if contaminants were 

simulated), a green check mark will appear and a checkbox will be available to indicate 

that those results are available for exporting. If contaminants were not simulated, a red “x” 

will appear and the checkbox will be unavailable to indicate that those results are 

unavailable for exporting. In general, the second two options (“ambient and zone” and 

“airflow”) are always available.

Output 1: Output Contaminant Concentration Results:

4. Select the zones, duct junctions and/or duct terminals for which to output contaminant 

concentrations. You must select at least one item (Figure 5).

5. Select the options related to exporting contaminant concentrations (Figure 6):

a. Select which contaminants to output. You can select multiple contaminants using the 

Ctrl key.
5

b. Select whether to output the ambient concentrations.

c. Select the output units of the contaminant concentrations from the dropdown menus. 

Different sets of units are provided for gaseous and particle contaminants.

d. Select how to organize the output. The first option, “Contaminants by Row/Zones, 

Junctions and Terminals by Column”, means each row of the output file is for each 

contaminant and the columns contain the selected zones, ducts, and/or terminals. The 

second option is the opposite, where each row of the output file is for each selected 

zone, duct, and/or terminal, and the columns contain the selected contaminants.

6. Select the timeframe for which results are to be output (start date, start time, end date, end 

time). By default, the entire simulation period is selected (Figure 7). 

7. Once you have clicked the “Finish” button, a link will be provided to a compressed zip file 

(Figure 8) that contains the “Node Contaminant Results” (.ncr) file, which contains the 

selected contaminant results. The name of the .ncr file defaults to the name of the project file 

(.prj) selected. Right-click on the link to either download the zip file to your computer, or to 

open the zip file and copy the extracted file(s) to your computer.

Figure 5. Output contaminant results (zone, junction, and/or terminal selection)

Figure 6. Output contaminant results (contaminants, units, and organization)
6

Figure 7. Output contaminant results (timeframe)

Figure 8. Output contaminant results (link containing zip files)

Output 2: Output Ambient and Zone Results:

8. Select the zones, duct junctions and/or duct terminals for which ambient and/or zone results 

will be exported. You must select at least one item (Figure 5).

9. Select the options related to exporting ambient and/or zone conditions (Figure 9):

a. Select the building conditions (temperature, zone gauge pressure, density) to output 

for each of the zones, duct junctions and/or terminals.

b. If desired, select the ambient conditions to output (temperature, atmospheric pressure, 

wind speed, wind direction).

c. Select the units desired for each output. Units of wind direction are degrees. 

d. Select how to organize the output. The first option, “Conditions by Row/Zones, 

Junctions and Terminals by Column”, means each row of the output file is for each 

selected ambient/zone condition and the columns contain the selected zones, ducts, 

and/or terminals. The second option is the opposite, where each row of the output file 

is for each selected zone, duct, and/or terminal, and the columns contain the selected 

ambient/zone conditions. 

10. Select the timeframe for which results are to be output (start date, start time, end date, end 

time). By default, the entire simulation period is selected (Figure 7).

11. Once you have clicked the “Finish” button, a link will be provided to a compressed zip file 

(Figure 8) that contains the Node Flow Results” (.nfr) file, which contains the selected 

ambient/zone conditions. The name of the .nfr file defaults to the name of the project file 

(.prj) selected. Right-click on the link to either download the zip file to your computer, or to 

open the zip file and copy the extracted file(s) to your computer.
7

Figure 9. Output ambient and zone results

Output 3: Output Airflow Results:

12. Select the paths, duct segments, duct leakages and/or duct terminals to output airflow results 

for. “Paths” are airflow elements such as doors, windows, and wall leakages. You must select 

at least one item (Figure 10).

13. Select the options related to exporting airflow results (Figure 11): 

a. Select the properties for each path, duct segment, duct leakage, and/or duct terminal

to output, i.e., pressure difference and flow (“Flow 1” and/or “Flow 2”) across the 

airflow path, duct segment, duct leakage or duct terminal. There will only be a value 

for “Flow 2” for airflow paths that utilize two-way flow elements (Dols and Polidoro 

2015). The signs of the pressure differences and flow values depend on the direction 

chosen as positive in the CONTAM model for each path, duct terminal and/or duct

segment. Duct leakage does not have assigned positive directions. 

b. Select the units desired for each output. 

c. Select how to organize the output. The first option, “Airflow Properties by Row/

Airflow Properties by Column”, means each row of the output file is for the selected 

airflow properties and the columns contain the selected airflow paths chosen. The 

second option is the opposite, where each row of the output file is for each selected 

airflow path, and the columns contain the selected airflow properties.

14. Select the timeframe for which results are to be output (start date, start time, end date, end 

time). By default, the entire simulation period is selected (Figure 7).
8

15. Once you have clicked the “Finish” button, a link will be provided to a compressed zip file 

(Figure 8) that contains the “Link Flow Results” (.lfr) file, which contains the selected 

airflow results. The name of the .lfr file defaults to the name of the project selected. Rightclick on the link to either download the zip file to your computer, or to open the zip file and 

copy the extracted file(s) to your computer.

Figure 10. Output airflow results (path, duct segments, duct leakages, and/or duct terminal

selection)

Figure 11. Output airflow results (airflow properties, units, and organization)
9

4. Feature: Compute temporal/spatial averages of concentrations

Use this option to export contaminant concentrations directly, averaged over a user-selected 

period of time, or averaged over a user-selected set of zones. Averages can also be computed for 

duct junctions and/or duct terminals. Zone-averaged concentrations will be volume-weighted. 

Figure 12 presents a flow diagram of the steps involved in exercising this feature. The 

numbered/colored boxes refer to figure numbers throughout the step-by-step instructions that 

follow and that show screen shots of the Export Tool. The orange boxes refer to figures 

presented in the previous section “Feature: Export .sim files to text file”. The green boxes refer 

to figures in this section.

Figure 12. Flow diagram of the “Compute temporal/spatial averages of concentrations” feature
10

4.1. Step-by-step instructions for the “Compute temporal/spatial averages of 

concentrations” feature

1. On the CONTAM Results Export Tool Home Screen (Figure 1), select the “Compute 

temporal/spatial averages of concentrations” radio button then click the “Next” button.

2. Select both a CONTAM project (.prj) file and simulation results (.sim) file (Figure 3).

3. Select averaging option(s) to perform – temporal, spatial, or both (Figure 13).

4. Select the zones, duct junctions and/or duct terminals for which averages are desired. This 

selection will be done twice if both temporal and spatial averages are selected in the previous 

step. You must select at least one item (Figure 5). 

5. Select the contaminants to average, whether to output the ambient concentrations, the output 

units of the contaminant concentrations, and how to organize the output

(Figure 6).

6. Select the total timeframe for which to output temporal and/or spatial average concentrations

(Figure 14). By default, the whole simulation period will be selected. Next, select the 

averaging sub-interval over which the temporal averages are to be calculated. This is done by 

selecting the number of time steps to average. The minimum number is two. There is no 

maximum, however, if the number of time steps selected is greater than the number of time 

steps in the simulation, then the temporal average is calculated using the number of time 

steps in the simulation.

7. Once you have clicked the “Finish” button, a link will be provided to a compressed zip file 

which contains the selected contaminant results (Figure 8). Spatially averaged result files will 

have a .savg file extension, and time-averaged result files will have a .tavg file extension.

The names of the .savg and .tavg files default to the name of the project selected. Right-click 

on the link to either download the zip file to your computer, or open the zip file and copy the 

extracted file(s) to your computer.

Figure 13. Compute temporal/spatial averages of concentrations (averaging options)

Figure 14. Compute temporal/spatial averages of concentrations (timeframe)
11

5. Feature: Process exposure results

This feature will only be available if the option to export an occupant exposure file (.ebw) was 

set via the ContamW simulation output parameters. The .ebw file contains the results for each 

occupant and contaminant simulated in the .prj file (Dols and Polidoro 2015). This feature will 

create a separate file for each occupant or for each contaminant simulated. The results can be 

exported for a subset of the simulation time period. Figure 15 presents a flow diagram of the 

steps involved in exercising this feature. The numbered/colored boxes refer to figure numbers 

throughout the step-by-step instructions that follow and that show screen shots of the Export 

Tool. The orange box refers to a figure presented in the previous section “Feature: Export .sim 

files to text file”. The blue boxes refer to figures in this section.

Figure 15. Flow diagram of the “Process exposure results” feature
12

5.1. Step-by-step instructions for the “Process exposure results” feature

1. On the CONTAM Results Export Tool Home Screen (Figure 1), select the “Process exposure 

results” radio button then click the “Next” button.

2. Select both a CONTAM project (.prj) file and an exposure box-whisker (.ebw) file

(Figure 16).

3. Select the options related to exporting exposure results (Figure 17): 

a. Select the output format, either one file for each occupant (and its exposure to each 

contaminant), or one file for each contaminant (and exposure of all occupants to it). 

b. Select the output units of the exposure concentrations from the dropdown menus. 

Different sets of units are provided for gaseous and particle contaminants.

c. Select the time period to output (start date, start time, end date, end time). By default,

the whole simulation period will be selected.

4. Once you have clicked the “Finish” button, a link will be provided to a compressed zip file 

(Figure 8) that contains the “Personal Exposure File” (.pxf) file, which contains the selected 

exposure results. The names of the .pxf files default to the name of the project selected 

followed by an underscore and either the occupant exposure object number or the 

contaminant name. Right-click on the link to either download the zip file to your computer, 

or to open the zip file and copy extracted the file(s) to your computer.

Figure 16. Selecting CONTAM project (.prj) and exposure box-whisker file (.ebw) files

Figure 17. Processing exposure results (organization, units, and timeframe)
13

6. Feature: Export infiltration to EnergyPlus: whole-building air 

change rates 

6.1. Background: Modeling infiltration in EnergyPlus

EnergyPlus is a building energy simulation software developed by the U. S. Department of 

Energy (DOE). It has several infiltration models, including ZoneInfiltration:DesignFlowRate

(DOE 2013). This model uses the following empirical equation to calculate infiltration:

Infiltration = Idesign•Fschedule [A + B|ΔT| + C•Ws + D•Ws

2

] (1)

where:

Idesign is defined by EnergyPlus as the "maximum amount of infiltration expected at 

design conditions". According to the documentation, EnergyPlus provides several options 

to input this design flow rate (h-1, m3/s•m2, m3/s), which is ultimately converted to mass 

flow using the outdoor air density at each time step. 

Fschedule is a factor between 0.0 and 1.0 that can be scheduled, typically to account for the 

impacts of the heating, ventilating, and air conditioning (HVAC) system operation on 

infiltration. 

|ΔT| is the absolute indoor-outdoor temperature difference in °C.

Ws is the wind speed in m/s. 

A, B, C, and D are constants, for which values are suggested in the EnergyPlus user 

manual (DOE 2013). However, those values are based on studies in low-rise residential 

buildings and do not generally apply to taller buildings and mechanically ventilated 

buildings. See Ng et al. (2014) for an alternative approach to generating A, B, C, and D

for improved infiltration modeling using this equation. Given the challenges in 

determining valid coefficients for a given building, a common strategy used in 

EnergyPlus for incorporating infiltration is to assume fixed infiltration rates, sometimes 

using a different constant value depending on whether the HVAC system is on or off. 

However, this strategy does not reflect known dependencies of infiltration on outdoor 

weather and the complexities of HVAC system operation. 

Multizone airflow modeling is the accepted approach to calculate infiltration based on the 

fundamental airflow physics (Walton 1989). The AIRFLOW NETWORK model in EnergyPlus 

is based on an early version of CONTAM with restrictions on the type of analyses that it can 

perform, including only being able to include the effects of a single heating, ventilating, and air 

conditioning (HVAC) system on infiltration (DOE 2013). The full CONTAM model is not 

restricted this way, so in order to incorporate more physically-reasonable and wholebuilding/system infiltration calculations into EnergyPlus simulations, the CONTAM Results 

Export Tool provides users two ways to incorporate CONTAM infiltration rates into an 

EnergyPlus model. One feature exports whole building air change rates, and the other exports 
14

zone-specific air change rates. Users of these features need to be familiar with how to perform 

CONTAM simulations (Dols and Polidoro 2015) and how to modify EnergyPlus IDF (input data 

format) files using either the EnergyPlus IDF Editor program or a text editor.

The feature that exports whole-building air change rates for use in EnergyPlus creates a schedule 

of Idesign values that will be used by EnergyPlus to calculate infiltration rates based on 

Equation (1), with A=1 and B=C=D=0. Using the whole building’s infiltration rates calculated by 

CONTAM, this feature normalizes the infiltration rates by the building’s exterior above-grade 

surface area using the following equation:

Idesign (for “whole-building” feature) = N•V / (3600 As) (2)

where:

N is the whole building air change rate (h-1) due only to exterior flow paths calculated by 

CONTAM.

V is the building volume (m3) calculated by CONTAM.

As is the building exterior surface area (m2), i.e., the gross surface areas of the abovegrade walls and the roof, entered by the user. 

For this feature, the same Idesign (m3/s•m2) will be applied to each zone with exterior surfaces (or 

“exterior zones”) in the EnergyPlus model, thereby distributing the infiltration uniformly over 

the entire building envelope. Since Idesign is normalized by exterior surface area, zones with more 

exterior surfaces (wall, roof) will have more infiltration than other zones, and interior zones will 

receive no infiltration air in the EnergyPlus model. 

6.2. Limitations and Other Considerations

This feature assumes that envelope leakage is uniformly distributed around the building 

envelope. It neglects the effects of wind direction on infiltration and its distribution among 

zones. If a user requires a more detailed information on infiltration, then the zone-specific feature 

described in the next section is available. The following constraints are also placed on the 

CONTAM simulation:

a. Both the CONTAM and EnergyPlus simulations start on January 1, 00:00:00 and end 

on December 31, 24:00:00.

b. The number of time steps in the CONTAM simulation must be at least 8760. The 

smallest time step allowed in EnergyPlus is one minute. Ideally, the time step in the 

CONTAM and EnergyPlus simulations should match.

c. Do not simulate Daylight Savings in CONTAM or in the EnergyPlus simulation.

d. The HVAC system configuration and operating schedules in the CONTAM model 

should match the configuration in the EnergyPlus model. This is important so that the 

infiltration calculated by CONTAM, which is then input into EnergyPlus, will 

account for the HVAC system effects on infiltration. If the HVAC configurations 

between CONTAM and EnergyPlus do not match, such as when variable volume air 
15

(VAV) systems or economizers are modeled, EnergyPlus simulations can still be 

performed using the output files from this tool.

e. If there are intake fans in the building envelope that are modeled in CONTAM as

flow paths, then the airflow through those fans will be included in the infiltration rate 

by this tool. To prevent this from happening, model intake fans using a duct instead 

of a flow path.

It should be noted that this feature was developed for use with EnergyPlus v8.2. For earlier 

versions of EnergyPlus, see the EnergyPlus documentation for the format of the 

ScheduleTypeLimits, Schedule:File, and ZoneInfiltration:DesignFlowRate objects created by 

this tool that may require editing before running an EnergyPlus simulation.

6.3. What’s created by the feature

This feature will only be available if the option to export detailed building air change rates (.ach)

was set via the ContamW simulation output parameters. The .ach file contains the wholebuilding air change rates simulated in the .prj file (Dols and Polidoro 2015). This feature will 

create a partial input data file (partial .idf) file and a comma-separated values (.csv) file.

The partial .idf file contains the following EnergyPlus objects (Figure 18):

 ScheduleTypeLimits – This is a generic limits object that is required by the Schedule:File 

object. It assigns the values in the Schedule:File object as dimensionless. 

 Schedule:File – This object calls the .csv file (described below) that is created by this 

feature and contains the Idesign values. 

 ZoneInfiltration:DesignFlowRate – This object calls the Schedule:File object for the 

values of Idesign calculated using CONTAM infiltration rates. This object applies the Idesign

values to any or all of the zones in the EnergyPlus file. The user can apply Idesign values to 

multiple zones by copying and pasting a separate ZoneInfiltration:DesignFlowRate object 

for each zone and entering a unique Zone Name for the “Zone or ZoneList Name” field 

for each ZoneInfiltration:DesignFlowRate object. The user can also apply Idesign values to 

a group of zones by creating a ZoneList and entering the name of the ZoneList object for 

the “Zone or ZoneList Name” field of the ZoneInfiltration:DesignFlowRate object

(recommended since it reduces error in transferring parameter values from the partial .idf 

file to the EnergyPlus project file). It may also be beneficial to the user to create the 

ZoneList containing only the exterior zones, though if it contains the names of interior 

zones, the ZoneInfiltration:DesignFlowRate object created by this feature will only 

calculate infiltration for zones with above-grade exterior surfaces (walls and roof).
16

Figure 18. Partial .idf file created by “Export infiltration to EnergyPlus: 

whole-building air change rates” feature

The .csv file is a schedule of Idesign values calculated using the CONTAM infiltration rates

(Figure 19). These values are called during the EnergyPlus simulation by the Schedule:File

object. The .csv file needs to be located in the same directory as the EnergyPlus project file.

Step-by-step instructions on how to use these files in an EnergyPlus project will be given next.
17

Figure 19. .csv file created by “Export infiltration to EnergyPlus: whole-building 

air change rates” feature

6.4. Using the feature

Figure 20 presents a flow diagram of the steps involved in exercising this feature. The 

numbered/colored boxes refer to figure numbers throughout the step-by-step instructions that 

follow and that show screen shots of the Export Tool.

Figure 20. Flow diagram of the “Export infiltration to EnergyPlus: whole-building air 

change rates” feature
18

6.5. Step-by-step instructions for the “Export infiltration to EnergyPlus: 

whole-building air change rates” feature

1. On the CONTAM Results Export Tool Home Screen (Figure 1), select the “Export 

infiltration to EnergyPlus: whole-building air change rates” radio button then click the 

“Next” button.

2. Complete the options related to exporting whole-building air change rates (Figure 21): 

a. Select a CONTAM air changes per hour (.ach) file. 

b. If you do not want the filenames given to the partial .idf and .csv files created by the 

tool to be the same as that of the .ach file chosen, change it here. Commas are not 

allowed in the filename.

c. Enter the total above-grade gross areas of exterior walls and the roof area of the 

building modeled. The user can obtain this value from the results of an EnergyPlus 

simulation under the InputVerificationandResultsSummary section of 

Output:Table:SummaryReports.

d. The defaults units are m2, which is required by the EnergyPlus simulation. If you 

would like the air change rates to be in another unit, select from the dropdown menu. 

3. Once you have clicked the “OK” button, a link will be provided to a compressed zip file 

(Figure 22) that contains the partial .idf and .csv files, which contains the whole-building air 

change rates normalized by above-grade gross exterior area and EnergyPlus input objects.

The use of these files in an EnergyPlus simulation will be described next. Right-click on the 

link to either download the zip file to your computer, or to open the zip file and copy 

extracted the file(s) to your computer.

Figure 21. Options for the “Export infiltration to EnergyPlus: whole-building air change 

rates” feature

Figure 22. Exporting whole-building air change rates (link containing zip files)
19

6.6. What to do with the .csv and partial .idf files

Figure 23 presents a flow diagram of the steps to utilize the files generated by the feature in an 

EnergyPlus simulation. The numbered/colored boxes refer to figure numbers throughout the 

step-by-step instructions that follow and that show screen shots of the text editor and EnergyPlus 

IDF Editor program.

Figure 23. Flow diagram of what to do with the files generated by the “Export infiltration 

to EnergyPlus: whole-building air change rates” feature
20

1. Open the EnergyPlus project file, into which you want to import CONTAM infiltration rates, 

with either a text editor or the EnergyPlus IDF Editor program (Figure 24).

2. If using a text editor:

a. Use the Find function (Ctrl+F) to locate any existing ZoneInfiltration objects. Delete 

any existing ZoneInfiltration objects or make them comment lines by adding an 

exclamation point (!) at the beginning of each line.

b. Copy and paste the entire contents of the partial .idf created by this feature into the 

EnergyPlus simulation file. It does not matter where, however do not break-up any 

existing EnergyPlus objects by pasting the text from the partial .idf file below an 

input that ends in a semicolon (Figure 25). If you would like similar objects to be 

grouped together, you can open up the updated EnergyPlus simulation file in the 

EnergyPlus IDF Editor program. When you use the “Save as” function, the objects in 

the EnergyPlus simulation file will re-order the objects and group similar objects 

together.

c. The feature creates one ZoneInfiltration:DesignFlowRate object that applies to the 

Zone or ZoneList Name “ZoneList” (Figure 18). Thus, you need to create a Zone List 

object in the EnergyPlus project file that contains the names of all the zones in the 

EnergyPlus project. An example is shown in Figure 26. You can find a list of all the 

zones in the EnergyPlus project file in the Zone object. 

Since the ZoneInfiltration:DesignFlowRate object created by this feature specifies 

that only zones with above-grade exterior surface areas will receive infiltration, the 

ZoneList can contain the names of interior zones. If there are existing ZoneList 

objects in EnergyPlus project file, be sure that none are named “ZoneList”. If any are,

change the name of the new ZoneList object to anything you choose. Be sure to also 

copy this name to the ZoneInfiltration:DesignFlowRate object under Zone or 

ZoneList Name.

(a) (b)

Figure 24. Open (a) text editor or (b) EnergyPlus IDF Editor program
21

Figure 25. Where to insert the contents of the partial .idf file in EnergyPlus project file

Figure 26. Example of ZoneList object inputs

3. If using the EnergyPlus IDF Editor program:

a. Scroll or use the Find function (Ctrl+F) to go to the ScheduleTypeLimits object

(Figure 27). Press the “New Obj” button. In the new ScheduleTypeLimits object, 

input the following (the inputs are also in the partial .idf file):

i. Name: Any Number

ii. Unit Type: Dimensionless

b. Scroll or use the Find function (Ctrl+F) to go to the Schedule:File object 

(Figure 27). Press the “New Obj” button. In the new Schedule:File object, input the 

following (the inputs are also in the partial .idf file):

i. Name: bldg_infil_sched

ii. Schedule Type Limits Name: Any Number

iii. File Name: copy the name of the .csv file created by this feature. For example, 

Figure 18 shows that filename is “example1.csv”.

INSERT HERE

(can be any blank line)

DO NOT INSERT HERE
22

iv. Column Number: 2

v. Rows to Skip at Top: 1

vi. Number of Hours of Data: 8760

vii. Column Separator: Comma

viii. Interpolate to Timestep: No

ix. Minutes per Item: 60

c. Scroll or use the Find function (Ctrl+F) to go to the ZoneInfiltration:DesignFlowRate 

object (Figure 28). Delete any existing ZoneInfiltration:DesignFlowRate objects. 

Press the “New Obj” button. In the new ZoneInfiltration:DesignFlowRate object, 

input the following (the inputs are also in the partial .idf file):

i. Name: Zone_Infil 

ii. Zone or ZoneList Name: ZoneList 

iii. Schedule Name: bldg_infil_sched

iv. Design Flow Rate Calculation Method: Flow/ExteriorArea 

v. Design Flow Rate {m3/s}: leave blank 

vi. Flow per Zone Floor Area {m3/s-m2}: leave blank 

vii. Flow per Exterior Surface Area {m3/s-m2}: 1 

viii. Air Changes per Hour {1/hr}: leave blank 

ix. Constant Term Coefficient: 1 

x. Temperature Term Coefficient: 0

xi. Velocity Term Coefficient: 0

xii. Velocity Squared Term Coefficient: 0

d. The feature creates one ZoneInfiltration object that applies to the Zone or ZoneList 

Name “ZoneList”. Thus, you need to create a ZoneList object in the EnergyPlus 

project file that contains the names of all the zones in the EnergyPlus project. Scroll 

or use the Find function (Ctrl+F) to go to the ZoneList object (Figure 29). Press the

“New Obj” button. In the new ZoneList object, input the following:

i. Name: ZoneList

ii. Zone 1 Name: enter the name of the first zone. You can find a list of all the 

zones in the EnergyPlus project file in the Zone object, which is right above the 

ZoneList object. Repeat this for every zone. In the example in Figure 29, there 

are a total of 5 zones.

If there are existing ZoneList objects in EnergyPlus project file, be sure that 

none are named “ZoneList”. If any are, change the name of the new ZoneList 

object to anything you choose. Be sure to also copy this name to the 

ZoneInfiltration:DesignFlowRate object under Zone or ZoneList Name.

Since the ZoneInfiltration object created by this feature specifies that only zones 

with above-grade exterior surface areas will receive infiltration, the ZoneList 

can contain the names of interior zones. If there are existing ZoneList objects in 

EnergyPlus project file, be sure that its name is not “ZoneList”. If it is, change 

the name of the new ZoneList object. Change it also in the 

ZoneInfiltration:DesignFlowRate object under Zone/ZoneList Name.
23

Figure 27. Creating new ScheduleTypeLimits object in EnergyPlus project file

Figure 28. Creating new ZoneInfiltration:DesignFlowRate object in EnergyPlus project file
24

Figure 29. Creating new ZoneList object in EnergyPlus project file
25

7. Feature: Export infiltration to EnergyPlus: zone-specific air 

change rates

7.1. Background 

The background on modeling infiltration in EnergyPlus is the same as in the previous section, 

Feature: Export infiltration to EnergyPlus: whole-building air change rates. However, the way 

this feature exports air change rates (zone-specific, as opposed to whole-building in the previous 

section) for use in EnergyPlus is different.

The feature that exports zone-building air change rates for use in EnergyPlus creates a schedule 

of Idesign values that will be used by EnergyPlus to calculate infiltration rates based on 

Equation (1), with A=1 and B=C=D=0. CONTAM infiltration rates are calculated for each zone 

and exported as flow values (m3/s) using the following equation:

Idesign (for “zone-specific” feature) = N•V / (3600) (3)

where:

N is the whole building air change rate (h-1) due only to exterior flow paths calculated by 

CONTAM.

V is the building volume (m3) calculated by CONTAM.

7.2. Limitations

The limitations of this feature are the same as those in the previous section, Feature: Export 

infiltration to EnergyPlus: whole-building air change rates.

7.3. What’s created by the feature

This feature will only be available if the option to export detailed building air change rates (.ach)

was set via the ContamW simulation output parameters. The .ach file contains the wholebuilding air change rates simulated in the .prj file (Dols and Polidoro 2015). This feature will 

create a partial input data file (partial .idf) file and a comma-separated values (.csv) file.

The partial .idf file contains the following EnergyPlus objects (Figure 30):

 ScheduleTypeLimits – This is a generic limits object that is required by the Schedule:File 

object. It assigns the values in the Schedule:File object as dimensionless. 

 Schedule:File – Each object, there will be one for each exterior zone, calls the column in 

the .csv file (described below) that is created by this feature and contains the Idesign values

associated with a particular zone. 

 ZoneInfiltration:DesignFlowRate – Each object, there will be one for each exterior zone, 

calls the Schedule:File object that is associated with the same zone. For instance, in 

Figure 30, the ZoneInfiltration:DesignFlowRate object named “1_Stock_infil” calls the 

Schedule:File object named “1_Stock_infilt_sched”, which then calls the second column 

of the “example1.csv” file that was created by this feature.
26

The .csv file is created using the CONTAM infiltration rates. The columns in the .csv file are: 

timestamps, and alternating columns of infiltration and exfiltration values for each exterior zone 

(Figure 31). Even though the exfiltration is exported using this feature, EnergyPlus only calls the 

infiltration rates during the simulation. The .csv file needs to be located in the same directory as 

the EnergyPlus project file. Step-by-step instructions on how to use these files in an EnergyPlus 

project will be given next.

Figure 30. Partial .idf file created by “Export infiltration to EnergyPlus: 

zone-specific air change rates” feature
27

Figure 31. CSV file created by “Export infiltration to EnergyPlus: 

zone-specific air change rates” feature

7.4. Using the feature

Figure 32 presents a flow diagram of the steps involved in exercising this feature. The 

numbered/colored boxes refer to figure numbers throughout the step-by-step instructions that 

follow and that show screen shots of the Export Tool.

Figure 32. Flow diagram of the “Export infiltration to EnergyPlus: whole-building air 

change rates” feature
28

7.5. Step-by-step instructions for the “Export infiltration to EnergyPlus: zonespecific air change rates” feature

1. On the CONTAM Results Export Tool Home Screen (Figure 1), select the “Export 

infiltration to EnergyPlus: zone-specific air change rates” radio button then click the “Next” 

button.

2. Select both a CONTAM project (.prj) and simulation results (.sim) file (Figure 33). 

3. A progress screen may appear, depending on the size of the .sim file (Figure 34). 

4. Once the export is complete, a link will be provided to a compressed zip file (Figure 35) that 

contains the partial .idf and .csv files, which contains the zone-specific air change rates and 

EnergyPlus input objects. The use of these files in an EnergyPlus simulation will be 

described next. Right-click on the link to either download the zip file to your computer, or to 

open the zip file and copy extracted the file(s) to your computer.

Figure 33. Selecting CONTAM project (.prj) and simulation results (.sim) files

Figure 34. Progress of exporting zone-specific air change rates

Figure 35. Exporting zone-specific air change rates (link containing zip files)
29

7.6. What to do with the .csv and partial .idf files

Figure 36 presents a flow diagram of the steps to utilize the files generated by the feature in an 

EnergyPlus simulation. The numbered/colored boxes refer to figure numbers throughout the 

step-by-step instructions that follow and that show screen shots of the text editor and EnergyPlus 

IDF Editor program.

Figure 36. Flow diagram of what to do with the files generated by the “Export infiltration 

to EnergyPlus: zone-specific air change rates” feature
30

1. Open the EnergyPlus project file, into which you want to import CONTAM infiltration rates, 

with either a text editor or the EnergyPlus IDF Editor program (Figure 24).

2. If using a text editor:

a. Use the Find function (Ctrl+F) to locate any existing ZoneInfiltration objects. Delete 

any existing ZoneInfiltration objects or make them comment lines by adding an 

exclamation point (!) at the beginning of each line.

b. Copy and paste the entire contents of the partial .idf created by this feature into the 

EnergyPlus simulation file. It does not matter where, however do not break-up any 

existing EnergyPlus objects by pasting the text from the partial .idf file below an 

input that ends in a semicolon (Figure 25). If you would like similar objects to be 

grouped together, you can open up the updated EnergyPlus simulation file in the 

EnergyPlus IDF Editor program. When you use the “Save as” function, the objects in 

the EnergyPlus simulation file will re-order the objects and group similar objects 

together.

c. The feature creates one ZoneInfiltration:DesignFlowRate object for each exterior 

zone (Figure 30). The Name of each ZoneInfiltration:DesignFlowRate object follows 

the naming convention “CONTAM level number”_”CONTAM zone name”_infil.

The associated Zone or ZoneList Name follows the naming convention “CONTAM 

level number”_”CONTAM zone name”. Thus, you need to ensure that the Zone or 

ZoneList Names match the zone names in the EnergyPlus project file. You can find a 

list of all the zones in the EnergyPlus project file.

If the CONTAM model has more exterior zones than in the EnergyPlus model, 

multiple ZoneInfiltration:DesignFlowRate objects can be applied to the same zone in 

EnergyPlus. It is up to the user to decide which EnergyPlus zones will be assigned 

multiple ZoneInfiltration:DesignFlowRate objects, if needed.

3. If using the EnergyPlus IDF Editor program:

a. Scroll or use the Find function (Ctrl+F) to go to the ScheduleTypeLimits object 

(Figure 27). Press the “New Obj” button. In the new ScheduleTypeLimits object, 

input the following (the inputs are also in the partial .idf file):

i. Name: Any Number

ii. Unit Type: Dimensionless

b. Scroll or use the Find function (Ctrl+F) to go to the Schedule:File object 

(Figure 27). Press the “New Obj” button. In the new Schedule:File object, input the 

following (the inputs are also in the partial .idf file):

i. Name: copy the name of the first Schedule:File object in the partial .idf file. For 

example, Figure 30 shows that first Schedule:File object name to be 

“1_Stock_infil_sched”.

ii. Schedule Type Limits Name: Any Number

iii. File Name: copy the name of the .csv file created by this feature. It is also in 

partial .idf file. For example, Figure 30 shows that filename is “example1.csv”.

iv. Column Number: copy the column number associated with the Schedule:File 

object. Continuing the example, Figure 30 shows this to be “2”.
31

v. Rows to Skip at Top: 1

vi. Number of Hours of Data: 8760

vii. Column Separator: Comma

viii. Interpolate to Timestep: No

ix. Minutes per Item: 60

Repeat this for every Schedule:File object in the partial .idf file created by this

feature.

c. Scroll or use the Find function (Ctrl+F) to go to the ZoneInfiltration:DesignFlowRate

object (Figure 37). Delete any existing ZoneInfiltration:DesignFlowRate objects.

Press the “New Obj” button. In the new ZoneInfiltration:DesignFlowRate object,

input the following (the inputs are also in the partial .idf file):

i. Name: copy the name of the first ZoneInfiltration:DesignFlowRate object in the

partial .idf file. For example, Figure 30 shows that first

ZoneInfiltration:DesignFlowRate object name to be “1_Stock_infil”.

ii. Zone or ZoneList Name: copy the Zone or ZoneList Name associated with the

ZoneInfiltration:DesignFlowRate object. Continuing the example, Figure 30

shows this to be “1_Stock”.

iii. Schedule Name: copy the Schedule Name associated with the

ZoneInfiltration:DesignFlowRate object. Continuing the example,

Figure 30 shows this to be “1_Stock_infil_sched”.

iv. Design Flow Rate Calculation Method: Flow/Zone

v. Design Flow Rate {m3/s}: 1

vi. Flow per Zone Floor Area {m3/s-m2}: leave blank

vii. Flow per Exterior Surface Area {m3/s-m2}: leave blank

viii. Air Changes per Hour {1/hr}: leave blank

ix. Constant Term Coefficient: 1

x. Temperature Term Coefficient: 0

xi. Velocity Term Coefficient: 0

xii. Velocity Squared Term Coefficient: 0

Repeat this for every ZoneInfiltration:DesignFlowRate object in the partial .idf

file created by this feature.

The feature creates one ZoneInfiltration:DesignFlowRate object for each

exterior zone (Figure 30). Thus, you need to ensure that the Zone or ZoneList

Names match the zone names in the EnergyPlus project file. You can find a list

of all the zones in the EnergyPlus project file.

If the CONTAM model has more exterior zones than in the EnergyPlus model,

multiple ZoneInfiltration:DesignFlowRate objects can be applied to the same

zone in EnergyPlus. It is up to the user to decide which EnergyPlus zones will

be assigned multiple ZoneInfiltration:DesignFlowRate objects, if needed.
32

Figure 37. Creating new ZoneInfiltration:DesignFlowRate object(s) in EnergyPlus project 

file 
33

8. Conclusion

The CONTAM Results Export Tool provides a flexible means to extract result from the wide

range of data that is generated by CONTAM simulations. The results that can be exported

include contaminant concentrations, zone temperatures, weather conditions, airflow from paths

and duct leakages, temporal and spatial averages of concentration, occupant exposure, and

exporting CONTAM infiltration results for use in EnergyPlus simulations.

9. References

DOE (2013). EnergyPlus 8.2. Washington, D. C., U. S. Department of Energy.

Dols, W. S. and B. Polidoro (2015). CONTAM User Guide and Program Documentation. 

Technical Note 1887. Gaithersburg, MD: National Institute of Standards and Technology. 

Ng, L. C., S. J. Emmerich and A. K. Persily (2014). An Improved Method of Modeling 

Infiltration in Commercial Building Energy Models. Technical Note 1829. Gaithersburg, 

MD: National Institute of Standards and Technology. 

Walton, G. N. (1989). AIRNET - A Computer Program for Building Airflow Network Modeling. 

NISTIR 89-4072. Gaithersburg, MD: National Institute of Standards and Technology.