Detailed Energy Analysis Model

Detailed Energy Analysis Model

The Autodesk.Revit.DB.Analysis namespace includes several classes to obtain and analyze the contents of a project's detailed energy analysis model. The Export to gbXML and the Heating and Cooling Loads features produce an analytical thermal model from the physical model of a building. The analytical thermal model is composed of spaces, zones and planar surfaces that represent the actual volumetric elements of the building.

The classes related to the detailed energy analysis model are:

Use the static method EnergyAnalysisDetailModel.Create() to create and populate the energy analysis model. The EnergyAnaysisDetailModel is intended to be generated and used immediately - none of the data or relationships that it contains are updated as changes are made to the corresponding Revit model. Dispose of the generated EnergyAnaysisDetailModel using the Destroy() method as soon as the needed information is extracted.

Set the appropriate options using the EnergyAnalysisDetailModelOptions. The generated model is always returned in world coordinates, but the method TransformModel() transforms all surfaces in the model according to ground plane, shared coordinates and true north.

The options available when creating the energy analysis detail model include:

The following example creates a new energy analysis detailed model from the physical model then displays the originating element for each surface of each space in the model.

Code Region: Energy Analysis Detail Model

// Collect space and surface data from the building's analytical thermal model
EnergyAnalysisDetailModelOptions options = new EnergyAnalysisDetailModelOptions();
options.Tier = EnergyAnalysisDetailModelTier.Final; // include constructions, schedules, and non-graphical data in the computation of the energy analysis model

EnergyAnalysisDetailModel eadm = EnergyAnalysisDetailModel.Create(doc, options); // Create a new energy analysis detailed model from the physical model
IList<EnergyAnalysisSpace> spaces = eadm.GetAnalyticalSpaces();
StringBuilder builder = new StringBuilder();
builder.AppendLine("Spaces: " + spaces.Count);
foreach (EnergyAnalysisSpace space in spaces)
{
    SpatialElement spatialElement = doc.GetElement(space.CADObjectUniqueId) as SpatialElement;
    ElementId spatialElementId = spatialElement == null ? ElementId.InvalidElementId : spatialElement.Id;
    builder.AppendLine("   >>> " + space.Name + " related to " + spatialElementId);
    IList<EnergyAnalysisSurface> surfaces = space.GetAnalyticalSurfaces();
    builder.AppendLine("       has " + surfaces.Count + " surfaces.");
    foreach (EnergyAnalysisSurface surface in surfaces)
    {
        builder.AppendLine("            +++ Surface from " + surface.OriginatingElementDescription);
    }
}
TaskDialog.Show("EAM", builder.ToString());

After creating the EnergyAnalysisDetailModel, the spaces, openings and surfaces associated with it can be retrieved with the GetAnalyticalOpenings(), GetAnalyticalSpaces(), GetAnalyticalShadingSurfaces() and GetAnalyticalSurfaces() methods.

Be sure to call EnergyAnalysisDetailModel.Destroy() to clean up the Revit database after finishing with the analysis results.

EnergyAnalysisSpace

From an EnergyAnalysisSpace you can retrieve the collection of EnergyAnalysisSurfaces which define an enclosed volume bounded by the center plane of walls and the top plane of roofs and floors. Alternatively, GetClosedShell() retrieves a collection of Polyloops, which are planar polygons, that define an enclosed volume measured by interior bounding surfaces. For two-dimensions, use GetBoundary() which returns a collection of Polyloops representing the 2D boundary of the space that defines an enclosed area measured by interior bounding surfaces.

The EnergyAnalysisSpace class also has a number of properties for accessing information about the analysis space, such as AnalyticalVolume, Name and Area.

EnergyAnalysisSurface

From an EnergyAnalysisSpace you can retrieve the primary analysis space associated with the surface as well as the secondary adjacent analytical space. The GetAnalyticalOpenings() method will retrieve a collection of all analytical openings in the surface. The GetPolyloop() method obtains the planar polygon describing the surface geometry as described in gbXML.

The EnergyAnalysisSpace class has numerous properties to provide more information about the analytical surface, such as Height, Width, Corner (lower-left coordinate for the analytical rectangular geometry viewed from outside), and an originating element description.

The surface type is available either as an EnergyAnalysisSurfaceType or as a gbXMLSurfaceType. The gbXML surface type attribute is determined by the source element and the number of space adjacencies. Possible types are:

Type

Source element and space adjacencies

Shade

No associated source element and no space adjacencies

Air

No associated source element and at least one space adjacency

ExteriorWall

Source element is a Wall or a Curtain Wall there is one space adjacency

InteriorWall

Source element is a Wall or a Curtain Wall and: there are two space adjacencies or the type Function parameter is set to "Interior" or "CoreShaft"

UndergroundWall

Source element is a Wall or a Curtain Wall and there is one space adjacency and if it is below grade

SlabOnGrade

Source element is a Floor and there is one space adjacency

RaisedFloor

Source element is a Floor and there is one space adjacency and it is above grade

UndergroundSlab

Source element is a Floor and there is one space adjacency and it is below grade

InteriorFloor

Source element is a Floor and: there are two space adjacencies or the type Function parameter is set to "Interior

Roof

Source element is a Roof or a Ceiling and there is one space adjacency

UndergroundCeiling

Source element is a Roof or a Ceiling and there is one space adjacency and it is below grade

Ceiling

Source element is a Roof or a Ceiling and there are two space adjacencies

EnergyAnalysisOpening

From an EnergyAnalysisOpening you can retrieve the associated parent analytical surface element. The GetPolyloop() method returns the opening geometry as a planar polygon.

A number of properties are available to obtain information about the analytical opening, such as Height, Width, Corner and Name. Similar as for analytical surfaces, the analytical opening type can be obtained as a simple EnergyAnalysisOpeningType enumeration or as a gbXMLOpeningType attribute. The type of the opening is based on the family category for the opening and in what element it is contained, as shown in the following table:

Type

Family Category or containing element

OperableWindow

Window

NonSlidingDoor

Door

FixedSkylight

Opening contained in a Roof

FixedWindow

Opening contained in a Curtain Wall Panel

Air

Opening of the category Openings