NIST Technical Note 1873

CONTAM TO ENERGYPLUS 

INFILTRATION FEATURES OF THE 

CONTAM RESULTS EXPORT TOOL

Brian Polidoro

Lisa C. Ng

W. Stuart Dols

Steven J. Emmerich

This publication is available free of charge from:

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

CONTAM TO ENERGYPLUS 

INFILTRATION FEATURES OF THE 

CONTAM RESULTS EXPORT TOOL

Brian Polidoro

Lisa C. Ng

W. Stuart Dols

Steven J. Emmerich

Energy and Environment Division

Engineering Laboratory

This publication is available free of charge from:

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

March 2015

U.S. Department of Commerce 

Penny Pritzker, Secretary

National Institute of Standards and Technology 

Willie E. May, Acting Under Secretary of Commerce for Standards and Technology and Acting Director 
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 1873

Natl. Inst. Stand. Technol. Tech. Note 1873, 20 pages (March 2015)

This publication is available free of charge from:

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

CODEN: NTNOEF
iii

Abstract

As HVAC (heating, ventilation, and air conditioning) equipment efficiencies continue to be 

improved to reduce building energy use, greater emphasis has also been placed on improving 

building envelope performance. Although the energy impacts of unintended infiltration through 

the building envelope on a energy use can be significant, current energy simulations and building 

designs generally do not accurately account for envelope infiltration and the benefits of 

improved airtightness. Infiltration has long been recognized as a key component of heating and 

cooling loads, and various methods exist to account for infiltration in load calculations and more 

detailed energy analysis. However, the inputs for these methods are not readily available. 

Multizone building airflow models exist that can accurately calculate infiltration rates as a 

function of building configuration, airtightness, weather conditions and system operation. 

However, current such tools are not well-integrated with energy analysis tools. Thus, methods 

have been developed to incorporate infiltration rates from the multizone airflow model, 

CONTAM, into a building simulation model, EnergyPlus. This document describes how to use 

the two CONTAM to EnergyPlus infiltration export features of the CONTAM Results Export 

Tool available at http://www.bfrl.nist.gov/IAQanalysis/webapps/contam_results_exporter/. One 

feature exports whole building infiltration rates, and the other exports zone-specific infiltration 

rates.

Keywords

airflow, CONTAM, energy, EnergyPlus, infiltration, simulation
iv

Table of Contents

Abstract..........................................................................................................................................iii

Keywords.......................................................................................................................................iii

Current strategy for modeling of infiltration in EnergyPlus........................................................... 1

Exporting Whole Building Air Change Rates ................................................................................ 2

Exporting Zone-Specific Air Change Rates ................................................................................... 2

User Interface, Inputs and Outputs ................................................................................................. 3

Exporting Whole Building Air Change Rates ............................................................................ 3

Exporting Zone-Specific Building Air Change Rates ................................................................ 5

Implementing in EnergyPlus........................................................................................................... 7

Other Considerations .................................................................................................................... 12

Examples....................................................................................................................................... 12

Conclusion .................................................................................................................................... 15

References..................................................................................................................................... 15
1

Current strategy for modeling of 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 fan 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 apply very well 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 that exports whole building air change rates and the other that 

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

perform CONTAM simulations (Walton and Dols 2013) and how to modify EnergyPlus IDF

(input data format) files using either the EnergyPlus IDF Editor program or a text editor.
2

Exporting Whole Building Air Change Rates

The feature of the CONTAM Results Export Tool that exports whole building air change rates 

uses the infiltration rates from a CONTAM simulation to create 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 calculates the 

design infiltration rates normalized by the building’s exterior above-grade surface area, Idesign in 

Equation (1). The equation used is:

Idesign = N•V / (3600 As) (2)

where:

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

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. 

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 to 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 in the EnergyPlus model.

There are limitations to this approach. First, exporting whole building air change rates assumes 

that envelope leakage is uniformly distributed around the building envelope. It also neglects the 

effects of weather, especially wind direction, on building orientation and how infiltration is thus 

distributed. If a user requires a more detailed distribution of infiltration, then the zone-specific 

feature is available and is described in the next section.

Exporting Zone-Specific Air Change Rates

The feature of the CONTAM Results Export Tool that exports zone-specific building air change 

rates uses the airflow rates of leakage paths from a CONTAM simulation to create 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 airflow results calculated by CONTAM, this method calculates the air flow between 

each zone and the outdoors, taking into account that there may be multiple leakage paths 

modeled between a zone and the outdoors and that there may be both infiltration and exfiltration 

between each zone and outdoors. Since there are no leakage paths modeled between interior 

zones and the outdoors in CONTAM, interior zones will receive no infiltration in the EnergyPlus 
3

model. The infiltration for each zone is used to create a schedule of unique Idesign (m3/s) values 

for each exterior zone (i.e., any zone in the CONTAM model that has a connection with the 

ambient zone) to be input into the EnergyPlus model. Special consideration by the user is needed 

to ensure that the infiltration exported by the tool for a zone matches with the corresponding 

zone in the EnergyPlus model. Though the exfiltration is exported using this feature, EnergyPlus 

only uses the infiltration for energy calculation purposes when using the 

ZoneInfiltration:DesignFlowRate object. The exfiltration rates may be used with the 

ZoneAirflow object but that process will not be covered in this document.

User Interface, Inputs and Outputs

The user interface, user inputs, and outputs will be described in this section. The web-based 

CONTAM Results Export Tool can be found at 

http://www.bfrl.nist.gov/IAQanalysis/webapps/contam_results_exporter/ and is shown in Figure 

1. The other features of this tool (Export .sim file to text files, Compute temporal/spatial 

averages of concentrations, and Process exposure results) can be found in Polidoro et al. (2015).

Figure 1. CONTAM Results Export Tool user interface (infiltration features highlighted)

Exporting Whole Building Air Change Rates

On the CONTAM Results Export Tool interface, select the “Export infiltration to EnergyPlus: 

whole building air change rates” radio button. Then click “Next”, and the user interface for 

exporting whole building air change rates (Figure 2) will appear. The inputs are:

1. CONTAM .ach File: Before performing a CONTAM simulation, enable the option to 

export a detailed whole building air change rate file (.ach file). This file contains the 

whole-building air change rate for each time step calculated using the amount of outdoor 

air coming into a building through flow paths (i.e., leakage) and mechanical systems. It 
4

should be noted that only the flow through the flow paths is used by this tool (also 

referred to as “infiltration” in this document).

In order to utilize the schedule of infiltration rates in an EnergyPlus simulation, the 

following constraints are 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.

Click the Browse button to select a CONTAM .ach file.

2. Enter a name for the output files: This name will be given to the partial IDF and 

comma separated values (CSV) schedule files created by the tool. The filename defaults 

to the name of the .ach file chosen, with an .idf extension. The user may change the name 

of the partial .idf file by changing the name in this text box. There should be no commas 

in the filename.

3. Building Surface Area: This is the exterior surface area of the building being modeled. 

It includes the above-grade gross areas of exterior walls and the roof area. This surface 

area can be input in m2, ft2and other units by opening the drop down box to the right of 

the text box. The user can also obtain this value from the results of an EnergyPlus 

simulation under the InputVerificationandResultsSummary section of 

Output:Table:SummaryReports.

Figure 2. User interface for exporting whole building air change rates

When exporting whole building air change rates, the outputs are:

1. Partial .idf File: A partial EnergyPlus .idf file is created, which contains only the 

following EnergyPlus objects:
5

 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 

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. It may be beneficial to the user to create 

a ZoneList containing all of the exterior zones only. The user only needs to create 

one new ZoneInfiltration:DesignFlowRate object (the one created by this tool), 

which reduces error in transferring parameter values from the partial .idf file to 

the EnergyPlus project file.

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.

2. CSV File: A schedule of Idesign values is calculated using the CONTAM infiltration rates. 

These values are written to a CSV file that is called during the EnergyPlus simulation by 

the Schedule:File object. The .csv file needs to be located in the same directory as the 

EnergyPlus simulation file.

Exporting Zone-Specific Building Air Change Rates

On the CONTAM Results Export Tool interface, select the “Export infiltration to EnergyPlus: 

zone-specific air change rates” radio button. Then click “Next”, and the user interface for 

exporting zone-specific air change rates (Figure 3a) will appear. The inputs are:

1. CONTAM .prj File: Browse to the location of the CONTAM project (.prj) file.

2. CONTAM .sim File: Browse to the location of the CONTAM simulation (.sim) file, 

which is generated at the completion of a simulation.

After the .prj and .sim files are selected, a progress screen (Figure 3b) may appear that shows the 

timesteps being processed by the tool. When this is complete, a link will be provided to the .zip 

file containing the results/outputs (Figure 3c).
6

(a)

(b)

(c)

Figure 3. User interfaces for exporting zone-specific air change rates

When exporting zone-specific building air change rates, the outputs are:

1. Partial .idf File: The tool creates a partial EnergyPlus .idf file, similar to the file when 

exporting whole building air changes, except for the differences mentioned below: 

 ScheduleTypeLimits – This object remains the same.

 Schedule:File – There was only one Schedule:File object created when using the 

feature that exports whole building air change rates. In contrast, when using the 

feature that exports zone-specific air change rates, multiple Schedule:File objects, 

one for each exterior zone, will be created. The entry for the “Name” of each 

Schedule:File follows the naming convention “Level”_”CONTAM zone 

name”_infil_sched.

 ZoneInfiltration:DesignFlowRate – There was only one 

ZoneInfiltration:DesignFlowRate object created when using the feature that 

exports whole building air change rates. In contrast, when using the feature that 

exports zone-specific air change rates, multiple ZoneInfiltration:DesignFlowRate 

objects, one for each exterior zone, will be created. The entry for the “Name” of 

each ZoneInfiltration:DesignFlowRate follows the naming convention 

“CONTAM level”_”CONTAM zone name”_infil.

2. CSV File: The format of the CSV file created when using the feature that exports whole 

building air change rates was a column of time stamps and a column of Idesign values. In 
7

contrast, the CSV file created when using the feature that exports zone-specific air 

change rates has the following columns: time stamp, zone 1 infiltration, zone 1 

exfiltration, zone 2 infiltration, zone 2 exfiltration ...zone n infiltration, zone n

exfiltration. Where n is the number of exterior zones. An example is given at the end of 

this document. As mentioned above, even though the exfiltration is exported using this 

feature, EnergyPlus only uses the infiltration for energy calculation purposes. The .csv 

file needs to be located in the same directory as the EnergyPlus simulation file.

Implementing in EnergyPlus

To enable EnergyPlus to use CONTAM infiltration rates in energy simulations, the user can use 

a text editor or the EnergyPlus IDF Editor program. The process is similar, whether 

implementing whole building or zone-specific infiltration rates in EnergyPlus. Any differences 

will be noted.

Using a text editor

Using a text editor, open the EnergyPlus project file and the partial .idf file created by the 

Infiltration Tool as shown in Figure 4. Copy and paste the ScheduleTypeLimits and 

Schedule:File objects from the partial .idf file into the EnergyPlus project file. If implementing 

whole building infiltration rates, there will be one ScheduleTypeLimits and one Schedule:File

object. If implementing zone-specific infiltration rates, there will be multiple Schedule:File

objects, one for each exterior zone. 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.

The objects can be located anywhere in the EnergyPlus project file, though using the “Save as” 

function in IDF Editor will re-order the objects in the EnergyPlus project file and group similar 

objects together. 

In the EnergyPlus project file, use the Find function to find any existing ZoneInfiltration objects. 

Delete the existing ZoneInfiltration objects or make them comment lines by adding an 

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

(a)
9

(b)

Figure 4. (a) EnergyPlus project file (b) Partial .idf file

Once existing ZoneInfiltration objects have been removed or disabled, copy and paste the 

ZoneInfiltration:DesignFlowRate object from the partial .idf file into the EnergyPlus project file. 

If implementing whole building infiltration rates, a single ZoneInfiltration:DesignFlowRate 

object is created by the tool and should be applied to every exterior zone. However, even if the 

ZoneInfiltration:DesignFlowRate object is applied to an interior zone, infiltration will not be 

modeled for that zone. The user should replace the default entry in the field “Zone or ZoneList 

Name” with the name of the ZoneList object, or Zone Names (which requires a separate 

ZoneInfiltration:DesignFlowRate object for each zone), in the EnergyPlus project file (Figure 5).

If implementing zone-specific infiltration rates, the tool creates a separate 

ZoneInfiltration:DesignFlow Rate object for each exterior zone. The default entries in the fields 

“Zone or ZoneList Name” are the zone names and levels number in the CONTAM model. If 

these zone names do not correspond to the names in the EnergyPlus model, the user should 

change them to match the names in the EnergyPlus model.
10

Figure 5. Partial .idf file showing default entry in the “Zone or ZoneList Name” field.

Using EnergyPlus IDF Editor program

Open the EnergyPlus project file in the EnergyPlus IDF Editor program and the partial.idf file in 

a text editor (Figure 6). In the IDF Editor, scroll to the “Schedules” under Class List and insert a 

New Obj under Schedule:TypeLimits. The field “Name” should be “Any Number”, and the field 

“Unit Type” should be “Dimensionless”, as is indicated in the partial .idf file (Figure 6b). Repeat 

this for the Schedule:File and ZoneInfiltration:DesignFlowRate objects by copying the text in the 

partial .idf file into the appropriate fields in the IDF Editor. Use Del Obj to remove existing 

ZoneInfiltration:DesignFlowRate objects. 

As was the case when using a text editor, when implementing whole building infiltration rates,

the ZoneInfiltration:DesignFlowRate should be applied to every exterior zone. The user should 

replace the default entry in the field “Zone or ZoneList Name” with the name of the ZoneList 

object, or Zone Names (which requires a separate ZoneInfiltration:DesignFlowRate object for 

each zone), in the EnergyPlus project file. When implementing zone-specific infiltration rates,

the fields for each ZoneInfiltration:DesignFlowRate object should be entered for each

corresponding zone. 
11

(a)

(b)

Figure 6. (a) EnergyPlus project file opened in IDF Editor (b) Partial .idf file
12

Other Considerations

System on or off: The HVAC system configuration and operating schedules in the CONTAM 

model should match the configuration in the EnergyPlus model. This is so 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, EnergyPlus simulations can still be performed using the output files from this tool.

Fans on the building envelope: 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.

Examples

Figure 7 is an example of the partial .idf file created by this tool for the feature that exports 

whole building air change rates. 

Figure 7. Example of Partial .idf file – exporting whole building air change rates

When using the feature that exports zone-specific air change rates, there will be as many 

ZoneInfiltration:DesignFlowRate objects as there are exterior zones. Figure 8 is an example of 

the partial .idf file created by this tool for a building with multiple zones. The first Schedule:File 

object (6_Plenum_infil_sched) is for the zone on the sixth level called “Plenum” in the 

CONTAM model. 
13

Figure 8. Example of Partial .idf file – exporting zone-specific air change rates
14

Figure 9 is an example of the CSV file for the feature that exports whole building air change 

rates.

Figure 9. Example of .csv file – exporting whole building air change rates
15

Here is a partial CSV file for the feature that exports zone-specific air change rates. There will be 

columns of infiltration and exfiltration values, one set for each exterior zone in units of m3/s.

Figure 10. Example of .csv file – exporting zone-specific air change rates

Conclusion

This document describes two features of the CONTAM Results Export Tool that can be used to 

incorporate infiltration rates from the multizone airflow model, CONTAM, into an EnergyPlus

building simulation model. This enables users of EnergyPlus to incorporate more physicallyreasonable and building specific infiltration calculations into energy simulations. Users of this 

tool need to be familiar with how to perform CONTAM simulation and how to modify 

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

References

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

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

Infiltration in Commercial Building Energy Models. Gaithersburg, MD: National 

Institute of Standards and Technology. http://dx.doi.org/10.6028/NIST.TN.1829. 

Technical Note 1829.

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

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

Walton, G. N. and W. S. Dols (2013). CONTAM User Guide and Program Documentation. 

Gaithersburg, MD: National Institute of Standards and Technology. NISTIR 7251.