Class Handout BES463803
Class Handout BES463803
Dynamo
+ Revit Systems Analysis
True BIM for HVAC
Sean Fruin
Sigma AEC Solutions
Majd Makhlouf
Building Information Researchers and Developers
Learning Objectives
Description
There is a fair amount of work and settings that need to be addressed in order to use Revit
Systems Analysis effectively and correctly. Customizing the workflows requires an
understanding of all the moving parts as well as some coding. This class will help you navigate
Revit Systems Analysis features and show the potential for MEP's powerful computational
workflows.
Speaker(s)
Sean Fruin is a Mechanical Engineer (EIT), design technologist, and innovator,
who has an intense fascination with automation and the exploration of computational
design solutions for the AEC industry. He has had the opportunity to learn many
aspects of the design industry, having worked in manufacturing, MEP designing,
and General Contracting. Sean started Sigma AEC Solutions to live his dream,
having the opportunity to explore and implement the latest technologies to improve
efficiency and increase quality in the AEC industry.
Majd Makhlouf is a Mechanical Engineer and Design Technologist, with a Master
of Science in Mechanical Engineering. He is an Autodesk® Revit Certified
Professional and a member of the Autodesk® Developer Network. In January
2020, he founded Building Information Researchers and Developers OÜ, a
software development company based in Estonia and providing services for the
AEC sector worldwide. He specializes in BIM Management, Autodesk® Revit, and
AutoCAD Add-in development, both public and custom-developed, Forge web
and cloud-based apps, Dynamo Zero Touch Node Packs, and mobile VR/AR
applications.
Page 1
Contents
Building Information Researchers and Developers ............................................................................ 1
Learning Objectives ................................................................................................................................ 1
Description............................................................................................................................................... 1
Speaker(s) ................................................................................................................................................ 1
Intro .............................................................................................................................................. 3
Revit MEP Building Block .......................................................................................................... 4
BIM ................................................................................................................................................................................................ 4
Revit .............................................................................................................................................................................................. 5
Shared Parameters ....................................................................................................................................................................... 5
Revit MEP Families ....................................................................................................................................................................... 6
Revit MEP Systems ...................................................................................................................................................................... 6
Revit Drafting Views ...................................................................................................................................................................... 6
Rooms ........................................................................................................................................................................................... 7
Space ............................................................................................................................................................................................ 7
HVAC Zones ................................................................................................................................................................................. 8
Revit Energy Analysis ................................................................................................................................................................... 8
Analytical Spaces .......................................................................................................................................................................... 9
Analytical Surfaces...................................................................................................................................................................... 10
Analytical Systems ...................................................................................................................................................................... 10
System Zones ............................................................................................................................................................................. 11
Revit Systems Analysis ............................................................................................................................................................... 11
gbXML ......................................................................................................................................................................................... 12
Open Studio ................................................................................................................................................................................ 12
Energy Plus ................................................................................................................................................................................. 12
Dynamo ....................................................................................................................................................................................... 13
Revit API ..................................................................................................................................................................................... 13
Customization and Data Connections .................................................................................... 14
Keys - Connecting Several Categories ........................................................................................ Error! Bookmark not defined.
Adding Customized Workflows ................................................................................................................................................... 15
Customized Workflows - Getting more data back to Revit ........................................................... Error! Bookmark not defined.
Connecting Revit Parameters to Inputs Simulations .................................................................... Error! Bookmark not defined.
Automation ................................................................................................................................ 33
Data Exploration.......................................................................................................................................................................... 20
Placing Revit Element .................................................................................................................. Error! Bookmark not defined.
Room, Space and Analytical Space Coordination ...................................................................................................................... 34
System Configurator ................................................................................................................................................................... 35
Systems Builder .......................................................................................................................................................................... 39
Pressure Drop Analysis ............................................................................................................... Error! Bookmark not defined.
Integrated Workflow ................................................................................................................. 41
Project Template ......................................................................................................................................................................... 41
Project Set Up ............................................................................................................................................................................. 43
System ......................................................................................................................................... Error! Bookmark not defined.
Outro .......................................................................................................................................... 46
Page 2
Intro
Due to the continued exponential improvement in computing power and other
advancements, data-driven computer science has reshaped almost every industry.
Fueled by frustration with the status quo and enabled by the ease of entry into coding
using graphical programming languages, the AEC industry has only just begun to
experience a shift.
Autodesk® loves showcasing Design Automation, Generative Design, and Machine
Learning. These popular topics and their associated buzz words continuously show up
on social media, conferences, and graduate papers. As early adopters start to
incorporate data-driven workflows into their processes, the proof of concept is affirmed.
However, implementing these workflows at scale is complicated, leaving firms confused
about how best to automate their teams.
The AEC industry has seen the emergence of
companies working hard to monetize design
automation with simple, intuitive tools. Yet,
these solutions are doomed to fall short of
being a one-stop-shop for fully automating
large portions of the design process. It is
incredibly challenging to code all the
necessary detail to ensure compliance with
countless building codes that govern the
industry. As algorithms get more specialized,
think building types, geographical location, and governing bodies, the tool's market gets
smaller, and the program gets more complicated. For instance, the algorithms used to
design an HVAC system for a San Francisco high-rise will fail at meeting the
requirements for a school in New York. With an estimated 1,300 different building codes
governing the US' design logic alone, firms will be doing themselves a disservice waiting
for a third-party solution that is a perfect fit for their design problems.
That brings us to the love-hate relationship with Autodesk’s suite of AEC software – it is
the go-to tool for the AEC industry, allowing for complete design and documentation
workflows across a construction project’s lifecycle, interoperability between all required
software, and access to cutting edge generative design capabilities. Having a monopoly
on the market, however, allows it to continuously increase the costs of its subscription
services.
Revit, BIM software from Autodesk®, is a wonderful tool but has limitations, including an
exceptionally tedious user interface. For example, new features are still designed and
executed with the “point-and-click” mentality of its predecessor, AutoCAD. Virtually all
training videos and documentation are demonstrated using manual clicks and dragging
workflows. Second, the out-of-the-box program will only do basic workflows.
Interoperability between tools falls short, and the supplied example content is rubbish,
having only a few simple generative design workflows and basic families. Third, as more
and more features are added, Revit is becoming progressively more fragmented,
scattered, and mysterious. All of this is leaving designers confused and frustrated and
Page 3
inevitably defaulting back to old habits resulting in industry-wide standards where data
is entered manually. PDF sheets are the project’s database, and the starting point is
virtually a blank canvas.
The solution to this problem is to get under the hood of the program. With some
programming proficiencies, the mysteries to Revit’s promising workflows are unlocked,
and Autodesk's plan is exposed – their business model is not to provide its customers
with an easy button but rather to provide them with frameworks that allow them to
indeed “make anything.” This class will use Dynamo and Revit's new Systems Analysis
Framework to investigate and integrate into various automated workflows. We will learn
how to connect data from different frameworks and get under Revit's hood to explore
different HVAC System configurations, run energy models, and document the design.
To start the journey with some context - covering the frameworks used and how they
will be used.
BIM
The first key concept in the integrated workflow is Building Information Modeling or BIM.
The idea behind BIM is to combine a database with a scaled 3D model of building
components. The database stores attribute (parameters) about each modeled building
component (elements) and populate the documentation (schedules, sheets). The idea
behind a true MEP Building Information Modeling workflow is an endlessly evolving
process aimed to cut down on the production time of designing and documenting the
model. The model's data can drive engineering calculations and turn design logic into
algorithms, thereby automating tasks one by one until no tasks are left. This end goal is
a stretch but is the northern light. To achieve this goal, several different frameworks in
Revit, all with unique data structures, exclusive functions, and tools, need to come
together. The data required and produced from the array of tools needs to be connected
like a gigantic puzzle. First, all the different puzzle pieces need to be identified. Second,
the data needs to be stored in a coherent structure; this is where Revit shines.
Key Notes
• The only “I” in BIM refers to the information for which we must establish a need.
• A true BIM process is a team effort where access to the team's data is critical.
Page 4
Revit
Revit is numerous BIM tools wrapped into a software package, but at its core, Revit is a
database. The information in the database populates documentation like views,
schedules, and sheets. As 3D Building elements like walls, floors, and HVAC equipment
get placed in a model, parameters are applied that incorporate information about the
building components. Also, when a new element is placed, a unique ID is applied to a
parameter. This data structure is essentially a relational database. A relational database
is a set of tables containing data in predefined categories, e.g., walls, doors, pipes,
mechanical equipment. Each table includes one or more data parameters in columns,
e.g., fire rating, size, flow rate, manufacturer. Each row contains a unique instance of
data for the categories defined by the columns. Relationships between items of different
tables can be established using Primary and Foreign Keys. A Foreign Key is a field in a
relational table that links back to another table's Primary Key column. The key to getting
all data from the elements from different Revit MEP frameworks is establishing
relationships between elements using the element IDs as Primary and Foreign Keys.
Shared Parameters are added to the model to create the data table and establish
connections.
Key Notes
• A unique Element Id is automatically assigned to any element placed in the Revit model.
• Some Elements and Revit tools are natively connected, while many are not.
Shared Parameters
Shared parameters are customized vessels for storing
information in the Revit Projects database and differ
from other parameters. They can be used across
several documents as project and family parameters
and can thus report their values across these
documents; hence the term shared. A master list of
shared parameters is created and stored in a text file
separate from a Revit project. These data containers
have data types used to constrain their purpose and will
be used in unit-specific calculations. Critical
components to standardizing shared parameters are
utilizing a clear naming structure and assigning the
correct data types. Once a Shared Parameter is
created, it can be added to most categories in a Revit project or Revit families. Project
documentation relies on Shared Parameters since these values can be reported in a
Tag and Schedule in the document the family is loaded in.
Key Notes
• There are other types of parameters, but Shared Parameters provided the best flexibility.
• We cheat sometimes and make the parameters unitless, so the input is not constrained.
Page 5
Revit MEP Families
Families are a combination of geometry, parameters, and formulas used
to embody parametric building components. They represent the
standard components, both geometrically and parametrically.
Moreover, Families are the building block of the database and facilitate
data storing, sorting, and informative Schedule and Tag to display
information. These graphical representations of building components
are organized hierarchically to create the different data tables within the
Revit project's database. The Family is made in the Revit Family environment and is
saved as a separate file. After a Family is created or edited, it gets loaded into Revit
projects. MEP Families provide a critical foundation for creating MEP Systems. Me
connectors added to the geometry, which develops connections to other elements to
form mechanical systems.
Key Notes
• Default Revit Families are not adequate if you want to get the most out of Revit.
• Family location points, connectors, and parameters need to be coordinated with design
automation algorithms.
Key Notes
• Connectors cannot be hidden or set parametrically on a Family
• No physical connection between elements needs to be made to make a system.
Page 6
diagrams, details, and customized schedules. Drafting views are usually a dumb
collection of geometric elements, containing no information. However, with the correct
use of Dynamo/API, even these dumb details can report information and relate or
control correspondent model elements.
Key Notes
• Parameters can be added to Generic Annotations.
• Generic Annotations can be used like AutoCAD Blocks in Drafting Views.
Rooms
Rooms are used to store information about the
subdivision of areas within a building model to identify
usage and occupancy. When a Room is placed at a point,
the area covered is automatically constrained by room-
bounding elements like walls, floors, roofs, and ceilings.
Rooms can be automatically created for enclosed regions
and be divided by using room separation lines. For
Systems Analysis simulation, Rooms are rather useless.
However, they add the ability to store data that
completely aligns with an Architecture model.
Key Notes
• Architects typically create Rooms.
• Room Bounding is a parameter found in the Elements and/or Link model.
• Rooms are not affected by space separation lines.
Space
Spaces are like Rooms but are used to store data for
HVAC energy analysis. Designers have complete control
over the volume of the Spaces. Like Rooms, Space’s
boundaries stop at room-bounding components such as
walls, floors, ceilings, and roofs. Multiple Spaces can be
added to one Room by using Space separation lines.
Additionally, the "Limit Offset" parameter can be used to
control the vertical extent of the volume.
Spaces are intelligent enough to know what Room it resides in. If there is no Room
assigned to a Space, Space is set to "Unoccupied." If the Space is assigned to a room,
Spaces automatically records the Room Name and Number and is set to "Occupied."
Page 7
As of Revit 2021, it is no longer necessary to place Spaces in all the interior opening of
a model like chases. When the energy model is created, an analytical Space will be
made in all voids. It is still best practice to place Spaces in all openings of a floor plan
view, such as shafts and chases, even if a Room is not present so that the Space Type
can be assigned to identify the Space unoccupied.
The Space Type for new Spaces defaults to Building Type. In my opinion, all Spaces
should be assigned a Space Type. The Building/Space Type Settings menu controls
heating and cooling load parameters like ventilation, occupancy, operation schedules,
and internal heat gains and can significantly impact the energy model.
Key Notes
• New Set Point Parameters have been added to the Space Type in Revit 2021
• New Parameter values cannot be added to the Space Type as of Revit 2021
• Building Types work the same way as Space Types and is set by default to new
Spaces
• Many built-in parameters do not have any impact on the Energy Model
HVAC Zones
Zones were used for heating and cooling load calculations. Spaces needed to be
assigned to Zones; spaces designated to the Default zone would not be included in the
heating and cooling loads calculations. As of Revit, 2021-this is no longer the case with
Revit Systems Analysis; Zones are irrelevant and can be ignored.
Key Notes
• Not relevant in Systems Analysis in Revit 2021
Page 8
Energy Settings offer designers various options to automatically create a complete and
accurate energy model that meets the design intent and the control to dial in the voxel
resolutions for the best results. Additionally, the designer can specify additional
information such as thermal properties for the Analytical Surface and Spaces.
Climate data information is collected by assigning a
geographic location to the building. The Location tool
allows the site to be set using the nearest major city's
street address or the latitude and longitude. The
Weather tab offers a way to verify the Cooling and
Heating Design Temperatures and the Clearness
Number for the project location. These settings can
also be overwritten in this tab.
Analytical Spaces
Analytical Spaces are volumes that experience heat transfer through building
components and specified internal heat gains. Revit generates Analytical Spaces within
enclosed volumes in the model and automatically populates data from Building Type,
Rooms, or Spaces. In the Energy settings, Spaces or Rooms can be specified. Spaces
are a better choice since they contain Energy Analysis parameters for better flexibility in
calculating energy usage. By default, Analytical Spaces uses the Energy Analysis
settings from the assigned Building Type. If a Space location point resides in the
Analytical Space's enclosed volumes, the Analytical Space parameters inherit the
Space Energy Analysis parameter data.
Key Notes
• Analytical Spaces are automatically generated when an Energy model is created.
• Analytical Spaces reports an intersecting Space in the “Room Name”
Parameters.
Page 9
Analytical Surfaces
Analytical Surfaces are automatically created from walls, floors, roofs, and other
building components from either a native or a linked model when the Energy model is
created. The surfaces get categorized according to location and function. Thermal
properties for these surfaces can be assigned in a variety of ways. Conceptual Types
and Schematic Types offer a valid approximation applied quickly to the entire building or
surface-bound individual Analytical Spaces. It is possible to model specific surfaces or
assemblies' thermal properties and assign materials to the elements. Analysis of
Detailed Elements does not require that all elements or materials in the model contain
Thermal Properties. Revit gives Conceptual or Schematic Types to elements without detailed
thermal information, allowing users to mix and match elements with known Thermal Properties
and schematic elements.
Key Notes
• Analytical Surface automatically generates when an Energy model is created.
• Analytical Surface thermal properties can be specified to come from an element
or be assigned by the user with the energy settings.
Analytical Systems
Analytical Systems were added to Revit
2020.1 and are used to add HVAC Systems
to the Energy Models gbXML to inform load
calculations, equipment sizing, and system
simulation. Analytical Systems get applied to
different building regions and are configured
from Zone Equipment, Air Systems, and
Water Loops that get added to the model.
Use the tools in the System Browser.
Zone Equipment, Air Systems, and Water Loops are added to the project by clicking
their respective icons in the Systems Browser. The System Browser also displays the
hierarchical relationships of the analytical system components and identifies if an
element is not adequately defined with a warning icon.
All the different system components first get assigned a Type and Name in the
Properties palette. Depending on the type selected, additional options appear in the
Page 10
Properties palette to specify more equipment specific characteristics. This Analytical
Systems workflow provides the ability to define countless different system
configurations.
Key Notes
• Equipment is assigned default performance parameters.
System Zones
System Zones are graphic elements (line, enclosed shapes,
3D forms) used to assign Analytical Spaces to the Analytical
Systems. The tool allows designers to quickly define regions
of a modeled building, at any detail level, to thermal zones.
Analytical Space that intersects the System Zone geometry
is automatically assigned to that System Zone when an
Energy Model is created. The System Zones then get
manually set to Zone Equipment in the Properties Palette.
Key Notes
• Systems Zones do not get added or updated in the gbXML until an energy model
is created.
Page 11
gbXML
gbXML is an industry-standard XML schema language format for building energy
modeling interoperability. It allows disparate 3D building information models (BIM) and
architectural/engineering analysis software to share information.
Key Notes
• OpenStudio is the only credited gbxml.
• The gbxml is simply a long-structured text file.
Open Studio
OpenStudio® is an open-source platform used to create and
manage EnergyPlus™ models and serves as the bridge
between Revit and EnergyPlus™. The conversions process
includes two main components – Measures and Workflows.
OpenStudio® Workflows are configuration files that describe
what to run, run it, and find the dependent files. Measures are sets of commands that
efficiently renovate the energy model. There are three types of measures – model
measures, energy plus measures, reporting measures.
When we run a Revit's Systems Analysis workflow, OpenStudio® will automatically run
the background's Energy Model simulation. First, the Revit project's assigned weather
file, OpenStudio® workflow file, OpenStudio® Measures, and project’s gbXML are
automatically gathered and bundled into an EnergyPlus™ file. Next, EnergyPlus™ runs
the simulation, followed by OpenStudio® running the reporting Measures. The output is
an HTML report and populated Analytical Space Parameters.
Key Notes
• The OpenStudio® are Ruby programming language files and saved outside of Revit.
Energy Plus
EnergyPlus™ is a powerful open-source, cross-platform whole
building energy simulation program with a broad array of features
and capabilities for building performance and energy analysis. The
program is Ashrea 140 compliant and works under the hood of other
trusted Building Energy Modeling software like Trane® Trace 3D Plus. The program
reads an input text file known as IDF and writes outputs to text files. Designers do not
typically interact with these files. Instead, OpenStudio® is used to manipulate the inputs
and outputs to create different workflows.
Key Notes
• “EnergyPlus is a beast of a program” Noah Pflaum
• Designers typically do not interface with EnergyPlus.
Page 12
Revit API
Revit API, or Revit’s application programming interface, is a
collection of operations with a simple description of what users
can use to communicate with the software. This allows software
developers a way to interact with Revit and build external
applications and customize workflows. Most of the Revit API is universal and applies to
all Revit products. However, Revit MEP has some specific features and is continuously
being updated and new functionality being added. Learning the Revit API is exceedingly
challenging if you do not have experience in writing code.
Key Notes
• A good starting point to learn how to develop tools with Revit’s API is to build macros.
Dynamo
Dynamo is a Visual Programming language that connects to Autodesk® Revit. Dynamo
is built on top of the Revit API to make Revit API development easier and accessible to
the non-developer end user. It has the power to access
internal/external data and model geometry. In some
cases, there is not a native Dynamo node for a particular
function. Python or C# can be used to build customized
nodes. All this data can be connected to define
relationships, analyze geometrical
relationships, and execute a
sequence of actions that create
algorithms. Algorithms can be
used for a wide array of
applications, from processing data
to set Revit Parameters to placing
Revit Families throughout the model and
executing Revit commands.
Key Notes
• Dynamo has a relatively easy entry compared to other programming languages.
• Dynamo is open source, and therefore not a black box (i.e., all the source code is
exposed).
Page 13
Generative Design for Revit
Generative Design for Revit enables designers
to create, test, and to evaluate design options
rapidly. Generative Design studies require
Dynamo scripts that define inputs, outputs,
and executes algorithms multiple times with
unique input combinations. Designs create
parametric mathematical systems the encompass their design logic with Dynamo. The
computer then rapidly generates design options and can search for optimization using
genetic algorithms. Inputs are either constants or variables and can be various data
types like cost, flow rates, angles, aspect ratio, and area, to name a few. The feature
can be accessed directly in Revit 2021 via the AEC Collection, or a version can also be
accessed directly from Dynamo.
Key Notes
• Project Fractal > Project Refinery > Generative Design for Revit
• Generative Design has some tricks to run Dynamo scripts faster.
One of Sigma AEC’s goals is to automate the HVAC system design process. It is our
view that HVAC design automation software should take a building model, along with a
few user inputs, to produce a range of HVAC systems configurations for energy
modeling. We believe this can now be achieved by using all the different frameworks
and tools available in the Autodesk® AEC collection. The examples outlined in the next
two sections outline concepts needed to start automating energy modeling. The
integrated workflow section outlines a highly automated and integrated workflow that
brings these concepts together to streamline the process of designing an HVAC system,
proving Revit can be much more than a documentation tool. The underlying idea is to
establish a smooth and efficient workflow where the designer is guided by the program
to quickly get a project off the ground and eliminate wasteful tasks. The first step is to
build a project template and algorithms that work together.
Page 14
Database Keys
Out of the box, there is often no way to connect and exchange data between different
elements in the BIM model. For example, Generic Annotations used to create diagrams
in Revit drafting views cannot be connected to a corresponding element of the 3D
model. Automation can bridge this gap if key pairs are established in different elements.
Once connections are established with parameters, values can be exchanged. To set
this up, a Shared Parameter is added to Categories to store the Unique i.d. of an
Element in a different table. The example below shows this set up where the parameter
called KEY_Annotation has been added to the Air Systems and Mechanical Equipment
categories to connect to a Generic Annotation.
Key Notes
• Information exchange needs to be automated using a Dynamo script, add-in, or Marco.
• The Id does not need to be an element Id; any unique number or string will work as an
equipment Id
Page 15
Customize OpenStudio Workflows
The OpenStudio Workflow file are executed through the
Systems Analysis dialog box. When Revit 2021 is
installed, the Annual Building Energy Simulation and
HVAC Systems Loads and Sizing Systems Analysis
Workflows are included by default and located at the file
path below.
C:\Program Files\NREL\OpenStudio CLI For Revit 2021\workflows
In simple terms, the workflow orchestrates what measures are executed and when.
Customizing workflow involves adding and removing Measures from the file with a text
editor. The list of Measures' for the Workflow can be found in the “steps” section of the
code. Once a customized Workflow is ready, it needs to be added to Revit by loading
the new file through the Options bottom in the file applications menu.
Key Notes
• OpenStudio Workflows are the JSON file that describes a simulation workflow.
• Execution order: 1st Model Measures > 2nd EnergyPlus Measures > 3rd Reporting
Measures.
Page 16
definitions for the energy simulations. Out of the box, these measures are designed to
have a minimal amount of user inputs. Therefore assumptions have been applied for
variables like leaving air temperatures, COP, and head pressure. These assumptions
can be changed by editing the measure. All the HVAC equipment measures are
installed in the file path below when Revit 2021 is installed.
C:\Program Files\NREL\OpenStudio CLI For Revit 2021\measures\gbxml_hvac_import\resources
A quick and straightforward way to change most of the default assumption is to open
the measure and directly change the values. The fixed assumption can be found right
after the attributes section or in the Equipment definition. The orange text is the default
value.
In some cases, the default value might not be exposed to the measure. In these
situations, the method needs to be added to the equipment definition. The OpenStudio
API documentation is a critical resource for getting familiar with all the different objects
and processes. The link to the documentation can be found here.
The cooling coil for a PTAC unit has been run with and without the COP being set in the
measure in the example below. Both ways are given a result in the results table
(Nominal Efficiency), with the not Specified COP being set to a default value of 3.00.
Page 17
OpenStudio uses metric units, so converting is necessary for my other stubborn
Americans and me. The method below converts values from the first unit to the second
unit, as specified by two strings. The table shows other standard unit conversions.
With a few more steps, OpenStudio Measures can be connected to Shard Parameter added to
Zone Equipment, Air Systems, and Water Loops categories. The gbXML automatically detects
and records the Parameters name and value for these three categories when an Energy
Model is created. The OpenStudio Measures need to be edited using a text editor or an
IDE integrated Development Environment to recognize and assign the value to an
OpenStudio object.
First, an attribute needs to be added for the parameter in the text file's attributes section.
Second, the static constructor needs to have a few lines added to read the added data
present in the gbXML.
Third, the Equipment definitions need to be adjusted to read and set the new parameter.
cooling_coil.setRatedCOP(self.cooling_coil_cop) if self.cooling_coil_cop
Key Notes
• OpenStudio Measures use metric units.
• OpenStudio API has many methods for creating, altering, and managing EnergyPlus
models using Measures.
Page 18
Customized Measure Example - Fan Static to EnergyPlus
This example demonstrates
setting the Fan Static for the
EnergyPlus simulation from
within Revit. The first step is
to add Shared Parameters
to the Air Systems category
called FAN_STATIC. This
data then gets added to the
gbXML.
Next, the Air System Measure is edited using Notepad++. At the top of the file, an
attribute called fan_static is added to the end of the list.
Second, the static constructor needs to be edited to read the Fan Static (yellow)
parameter from the gbXML can convert the units from in water to pascals(blue). An if
statement is added to set a default value if the FAN_STATIC is null or empty (green).
This stops the simulation from failing if Revit's Parameter is empty or does not exist and
uses a default value.
Third, the add_supply_fan method to translate the data from the Air System object to an
OpenStudio fan object. Where the fan_static value is set to the fan.setPressureRise
function(blue).
Page 19
Automation Toolbox
Complex automated workflows are merely a combination of API
functions, general algorithms, and data. Gathering a reusable
building block is vital to producing advanced and efficient workflows.
Also, while building up the toolbox, it is essential to understand when
and where to use different techniques. This chapter introduces an
incredibly useful Dynamo function, possibilities for customized
functions, and elegant algorithmic methods that can be used to solve
everyday challenges that arise in the design process. First, one must
know what data is available and how to access it to fuel the algorithms.
Data Exploration
A simple way to start exploring the Revit API and the data stored in a project’s database
is Dynamo. All the different API classes within the project can be obtained using the
Document.ElementTypes node from the Clockwork package. This is a powerful
approach that offers a way to access more elements than gathering elements with the
All Elements of Categories node. For example, Projects Information cannot be
accessed with the Categories node but can with the Document.ElementTypes node.
Once elements are retrieved, all the parameters can be accessed with the
ElementParamters node. The parameters can then be investigated using various nodes
to determine their storage type, if it is read-only, and the parameter values.
In the example above, the ZoneEquipment elements are retrieved, and the parameters
are inspected. Two interesting findings can be seen. First, the Air System's storage type
is an ElementId, meaning an element is used to set this parameter.
Second, the EquipmentType Parameter has a storage type as an Integer yet reports a
string in parameter.Value node. Quite a few of the Built-In parameters are stored as
Page 20
Integers yet displayed in the Revit UI as strings. This is known as an Enum. In computer
programming, an Enum type is a special data type that enables a variable to be a set of
predefined constants. The variable must be equal to one of the values that have been
predefined for it. We have found that the Revit API is fraught with inconsistencies in
naming things like this. To set Enum parameters accurately, the names need to be
mapped out by poking around and creating a table like the one below.
Revit GUI Value Database Values
Parallel Fan Powered Box 5
Variable Air Volume Box 6
Unit Heater 12
Page 21
Points come together to make lines, lines come together to create surfaces, and
surfaces can form solids.
In this exercise, we start with points and construct a solid. We begin by making two
points and connecting them with a line using the line.ByStartPointEndPoint node. A
vector is then created to make a
new line by moving the original
line with the Geometry.Translation
node. These two curves are then
used to make a surface using the
surface.ByLoft node. This surface
is then thickened with the
surface.Thicken node. Note this
is just one of many ways to go
from points to solids.
Like we went from prints to
solids, we can go in the
reverse order-- solids to
points. In this next
exercise, we will
deconstruct the solid cube
from example 1. To start,
all the surfaces that make up the solid are obtained using the PolySurface.BySolid
node. Then, the curves that make up each surface are derived using the
surface.PerimterCurves node. Finally, we identify the starting points of each curve using
the Autodesk.Curve.StartPoint node.
A critical property to understand about curve or surface is its “parameter.” The parameter
describes a location on a line or surface. Lines can be deconstructed to a list of points using
this concept. Points are retrieved at specified locations using parameter values. The starting
point of the line is at a parameter value of zero, and the endpoint is at a parameter value of
1. A value between 0 and 1 can be used to get points along a line. Multiple points can be
retrieved using a series of numbers between 0 and 1. In the example below, 10 points are
identified along a line.
Page 22
Surfaces can also be evaluated at a parameter. Still, we will need
two variables since surfaces are functions of two variables, u and
v. Like x and y, u and v inputs represent the direction for the
coordinate system pertaining to a surface. If the input to both u and v
is equal to zero, then the point would be in the lower left corner. If
they are both equal to one, then the point would be in the upper right
corner. In general terms, I think of the parameter as a percent of the
total length.
Some fundamental geometric properties need to be understood to solve geometric problems.
Curves and surfaces are frequently used as the base for consequent geometry. Extracting
properties such as position and orientation requires in-depth knowledge of different
mathematical subjects like combinatorics, topology, algebra, and differential geometry. With
Dynamo, this complicated math has been done for us in the form of nodes.
Once a location is established on a line, the orientation properties can evaluate at that point.
Here we will look at tangents and normal in geometry. Curves have tangent vectors and
normal planes, whereas surfaces have normal vectors and tangent planes.
The illustration below shows some of the nodes used to calculate critical properties for both
curves and surfaces.
Page 23
There are also nodes called geometry modifiers that can be used to drive our algorithms.
These nodes can be broken into three categories-- measurements, manipulation, and
collision detection.
Page 24
This example demonstrates
using geometry created with
Dynamo to draw a line in a
drafting view. First, a line is
created using two points,
followed by drawing that line in
a Revit Drafting view using the
DetailCurve.ByCurve node.
In this example, we construct a grid of points by feeding a sequence into the point's x
and y components.ByCoordinates node. The series is formed using design script inside
the Code Block. Note that the Point.ByCoordinates node is set to “cross lacing.” The
selected family is then placed at these points using the FamilyIntance.ByPoint node.
In this example, Revit elements are placed along a circle and then rotated to face the
circle's center. To do this, we first form a circle using the circle.ByCenterPointRadius
Page 25
node. Next, we use the curve.PointAtParameter node to retrieve points along the circle
at the list of parameters from the Code Block. We then compute the tangent at the same
parameters using the curve.TangentAtParameter node. After the families are placed at
the parameter points, we can rotate them using the FamilyInstance.SetRotation node.
The tangent vector is used with the Vector.Angle.AboutAxis node to find the needed
rotation.
Page 26
Dynamo Custom Nodes
Dynamo custom node significantly expands the power of Dynamo. Custom can be used
to package groups of nodes into a single node that can be saved and deployed to other.
Custom nodes can also be created with Python and C#. This allows access to the Revit
API, functions from other libraries, and handles many situations (iterative algorithms,
large data sets) better than Dynamo. The custom node can be grouped into packages
and published to the package manager for distribution to the Dynamo community.
Dynamo Package Manager contains packages that satisfy so many needs. Without the
passionate community and the package manager, Dynamo would not be what it is
today. Below are examples of custom nodes that are required for later tasks.
Placing Generic Annotations into Drafting Views requires a custom node call
FamilyInstance.ByPointinView was found in the Clockwork package. The exercise
below creates a parametric bar graph inside a Revit drafting view demonstrating the
robust potentials of placing Generic Annotation and Detail lines with Dynamo
algorithms.
Page 27
Even creating a customized node of other Dynamo has many benefits. For instance,
offering a way to package chunks of logic into one node eliminates inevitable error
from propagating through a script, reduces calculation time for geometric functions,
and helps organize scripts.
The dictionary_Space node in the example below gets all the needed data (parameter
values, geometry), cleans the data, and arranges the data into dictionaries. A
dictionary is a collection of data that is linked to a key value. Dictionary makes
retrieving data in workflows much more straightforward. Values can be lookup with
words. Thus, the index value is not required where the list structure needs to be
maintained during a workflow. In the example below, a custom node called
“dictionary_Spaces” has been created for Spaces, and the Space elements and solid
geometry is retrieved using the Dictionary. Value
key node.
When we start to make customized nodes for the Systems Analysis framework, the
API documentation had not been completed yet. A Revit add-in called Revit Lookup
was used to find the information needed to create nodes. Below are the nodes used to
create Water Loops, Air Systems, Zone Systems elements and extract the line
geometry from Generic Zone.
Page 28
Dynamo UIs
Workflows can be significantly simplified by presenting an end-user interface for inputs
rather than giving written instructions to navigate tabs, icons, and input fields. The Data-
Shapes package has transformed the way scripts can interact
with end-users. User forms can be created with numerous
input types and use any project data to drive the inputs. The
central aspect that sets Data-Shapes UI over Dynamo Play is
that multiple UI can be used in a single script. With this ability,
information from one UI can
determine what inputs pop up
on a subsequent UI.
To keep the chain of UIs going,
we created Custom to open
Revit windows that required
user interaction, like setting the
project location.
Page 29
Other custom nodes were created to remove interfaces that could be filled in with
Dynamo. For example, the UI for activating a Systems Analysis simulation. While
building this node, we discovered that more flexibility could be offered, like specifying
an output folder and offering an option to overwrite the existing report.
Utility Algorithms
Countless general-purpose algorithms can be applied to engineering design problems.
Often these algorithms are independent of design problems but provide approaches to
solve pieces of the whole puzzle. This section is a gentle high-level introduction to
standard algorithms to give enough background to use them effectively in design
problems. These algorithms can also be packaged into a custom node to incorporate
them into more complex algorithms easily.
A relatively common data analysis task requires grouping a set of objects
into subsets such that the elements get grouped with similar elements. For
instance, Rooms within a building need to be grouped based on locations,
thermal set points, and identical load profiles for thermal zoning. A class of
algorithms called clustering has many useful tools for exploring data and has
solved these types of problems. The most straightforward clustering
algorithm is a single if statement that splits a set of data into two subsets with one
conditional statement. A decision tree is merely multiple if statements linked together to
Page 30
conditionally control data. This algorithm can group data into an endless subset using
classification rules, forming a hierarchical clustering.
Well-known and understood algorithms from many different fields often get
used in clustering techniques. For example, linear regression developed in
statistics provides a straightforward approach to clustering data and
geometry based on mathematical averages.
Page 31
fittings and edges represent the pipes. Graphs can take many different forms, and
different traversal algorithms are used to solve the varying structures.
Sorest path algorithms find the shortest path from a source node to the
destination node in the most optimal way. There are countless methods
for performing these types of calculations. The method selected
depends on the structure of the graph. For example, a tree will always be a
graph, but not all graphs will be trees. A particular set of rules defines trees: one root node may
or may not connect to others, but ultimately, all connections stem from one specific place.
Page 32
Geometry systems are produced by
adding Variables to manipulate the
geometric constraints to form a
parametric model. For example, the
circle has five variables to control the
pie pieces. The center points have
two variables, the polar coordinates (r, θ) inside the circle. The line starts the parametric
focal point and ends at a point on the circle at a specified angle forming the other three
variables. Different variable combinations can then be cycled through to developing
grouping configurations.
Genetic Algorithms
The foundation of a genetic algorithm is a geometry system
that combines variable and constant inputs, executes several
operations, and outputs several various solutions. A genetic
algorithm is a calculated trial and error search inspired by
Charles Darwin’s natural selection theory. The fittest
individuals (inputs variable) are selected for reproduction to
produce offspring of the next generation of inputs. The
process optimizes designs quickly by adding a feedback loop. At the end of each
generation, the design is scored or given a “fit score.” Characteristics or attributes from
designs with high fitness are then used to create a new set of inputs for the design
problem. This process is called “cross over.” Like biology, the method also introduces
mutation or random tweaks to the new set of inputs after each generation provides
diversity to each generation. This guarantees the algorithms will not converge on false
optimal solutions. The process repeats, creating a new and improved generation until it
finds the best combination of inputs.
This chapter's function and algorithms are the building blocks for more complex algorithms that
can be reused, adding powerful tools to the algorithmic toolbox. Knowing how to creates
these tools is less important than knowing where to apply them.
Page 33
Room, Space, and Analytical Space Coordination***
Rooms, Space, and Analytical Spaces all represent areas within a building and have a
critical purpose for different Revit workflows. One of the essential requirements for an
HVAC designer is to provide an air balance table in the construction documents. The air
balance table tabulates design criteria that ensure ventilation requirements are meet for
the occupied areas. The table includes temperature, airflow rates, ventilation
requirements, and thermostat setpoints, among other things. This leaves the question;
what Revit category should this table be documented with? How should data be the
exchange between the different area representations?
Out of the box, Revit reports the Room that Space is contained, and a Space can never
exceed the boundaries of a Room. Whereas an Analytical Space reports one
intersecting Space but can intersect multiple Spaces and Rooms. Rooms provide a one-
to-one relationship to the architecture model, ensuring the air balance table matches the
architecture model's rooms. Spaces have the most flexibility. Multiple Spaces can be
added to Rooms with Space separation lines to subdivide large or irregular shaped
Rooms. The height of a Space can be set to control the volume of the Spaces for
ventilation calculations.
With some computational design, these coordination issues can be eliminated. The
script below shows a one-to-many relationship; one element in a table can be
associated with one or more elements in another table. For instance, if Spaces are used
to subdivide Rooms, each Room can have many Spaces. This relationship allows the
Page 34
returns of a sub-list of Spaces in each Room. Their “Room Number” parameter groups
blow Spaces, and the CFM from all the Spaces within each Room is summed up and
used to set the. The CFM for the Spaces in a Room is added together and used to
populate the Rooms SA CFM shared parameter.
To ensure a one to one relationship between Analytical Spaces walls can be added to
the mechanical model.
System Configurator***
This section describes methods for using geometry systems to grouping Analytical
Spaces into a thermal zone for equipment designations. A geometry systems system
is a puzzle of available data, algorithms, and the designer’s knowledge. This process
Page 35
relies on the designer’s ability to lateral thinking about and deconstruct a design
problem. All and often ambiguous steps needed to solve issues need to be defined, and
paired mathematical strategies for solving each step. Then connect all different
operations to complete that puzzle.
Secondary Zone Equipment like Radiator Panels can be assigned to Spaces based on
data in the model. For example, suppose Space requires 3500 BUT/hr of heating and
includes a VAV Box that only supplies 1000 BUT/hr of heating. In that case, it has a
radiator panel assigned to the Space to cover the remaining 2500 BUT/hr using a
straightforward if statement.
An algorithm can then be built to place Radiator panels in the 3D model. The algorithm
needs to be made with the Revit family in mind. This Radiator family was created to
make the algorithms simple by having the placement point be the bottom and center of
the object. First, Analytical window openings get paired with Spaces that need the
radiator panels. The second step shifts the center point of the analytical surface into the
Space by one foot, and the ray bounce node is used to find the ceiling above the point.
Thrid step finds the edge of the ceiling and gets the closest point to the Room's point.
The Radiator family is then placed at this location.
K means can be used to place Exhaust fans in the model. on the roof at the X and Y
centroid of exhausted Spaces clusters. The desired number of Exhaust fans designates
the number of centroids.
Page 36
Page 37
With mechanical equipment placed and Systems assigned, duct routing can start.
Revit has built-in tools for finding auto-routing but is rather elementary at best. This
example aims to see if we can make a better layout tool using Dynamo and Project
Refinery. A better tool would find the best solution. For duct design, the measurement
of success can be measured by lowering the resistance in the duct run. The static
pressure calculates this in the system. Static pressure is a complex calculation that
involves duct fitting lookup tables and crazy fluid dynamic formulas. Running all these
calculations would lead to a slow algorithm. Therefore, the fitness function will be
simplified to looking at the total length of the duct run and the number of turns.
Page 38
Topologic is an open-source software modeling library enabling hierarchical and
topological representations of architectural spaces, buildings, and artifacts through
non-manifold topology (NMT) Cardiff University and University College London
Once a system is selected, this information can then be recorded to the Analytical
System's shared parameters to run a full energy simulation.
These systems' inputs could range from model geometry, model parameters,
manufacture performance information, and designer preferences.
Systems Builder***
The last section investigates the selected HVAC system into the project by placing the
Revit families, creating MEP systems from the families, and setting up 2D system
diagrams.
Page 39
Page 40
Integrated Systems
All of these advancement opens the
doors for new ways to streamline
workflow. Once standards are
established, you have the freedom to
integrate automated methods with
straightforward user interfaces.
Different combinations of designer
inputs, generative design workflows,
and documentation techniques get
blended in user-friendly workflows. These automation systems can achieve better
results with less human intervention than previous generations of workflow tools. This
final chapter looks at a few of these integrated systems for simultaneously setting up a
Revit project and conducting thermal loads, instantaneously establishing analytical 2D
and 3D HVAC systems, and connecting 2D diagrams to the 3D analytical models.
Project Template
Integrated workflows start before a project
gets off the ground. The idea here is to
put significant time and care up front to
save considerable time on all future
projects. This involves clearly mapping out
the process from start to finish! Project
requirements (sheets, diagrams, and
schedule), needed inputs, and steps
required to get to the deliverables need to
be identified. Next, establishing a well-organized set of standardized Revit content. The content
includes Revit families, Revit MEP settings, Revit View Template, OpenStudio Measures,
OpenStudio Workflows, and, most importantly, Shared Parameters. In short, the idea is to
ensure everything is in its place. Then and only then can the algorithms be created that
eliminate manual tasks for the end-users.
Page 41
Creating all the content was an overwhelming and challenging task at first and is still a work in
progress. To smoothly integrate Revit Systems Analysis into our workflows required us to step
back and think about our Revit content. An Excel spreadsheet was set up to help map out all the
requirements and connections between all the Revit content for Air Systems, Water Loops,
Zone Equipment, Annotations, and MEP families. After a lot of consideration, the equipment
from Air Systems, Water Loops, Zone Equipment became the guide to making the other
content. First, every possible variation of the Zone Equipment and equipment that make up the
Air Systems and Water Loops was recorded in column A of the Excel sheet below. The second
step recorded all the parameter values that needed to be set to produce each variation. The
third step documented each Revit families that would correspond to the Zone Equipment in the
3D model. That information included Family Names, Type Names, required MEP connectors,
Equipment designations, and required parameters. The fourth step involved the same process
for the corresponding Generic Annotations for the 2D diagrams.
Page 42
Another critical component of the template was set up the Spaces Types. In the example below,
Occupancy Categories from ASHRAE 62.1 were converted into Revit Space Types.
The customization and connected OpenStuido Workflows and Measures can be created to a
company the Revit template. Like workflow to perform ASHRAE 90.1 baseline model
automatically form the proposed model.
Project Set Up
well-crafted Architectural model, a few inputs from a designer,
Aside from saving a lot of time, the results are that jump-starts projects like never
before.
3-5.5 Vestibules.
Vestibules must be heated to 50°F (10°C) to melt tracked-in snow in
locations where conditions warrant. Otherwise, vestibules must not Page 43
be heated or air conditioned.
HVAC System Selection
knowledge of the Revit API, and creative algorithmic approaches.For example, HVAC
systems can be rapidly configured and evaluated with EnergyPlus for comparisons. The
Workflows can be set up where end-users react to UIs, helping to guide designers.
Page 44
The selection of the appropriate HVAC system for a given building is complex and
influenced by climate, available utilities, owner’s efficiency, cost considerations, and
geometric constraints. Multiple comprehensive energy simulations are needed to
conclude the right system truly. Geometry systems, UIs, and the custom Systems
Analysis nodes can rapidly generate configurations and send them to EnergyPlus.
Page 45
Another critical and often required HVAC schematic is the psychrometric chart. This chart is
used for all operations handling humid air. It quickly relates to the specific heat of air, the
absolute humidity, relative humidity, and temperature. It is used to calculate heat loads for air
handling systems, for example, and give a nice visual of the changes in air properties. The
image to the right shows this process being plotted on the chart. In this next example, we look at
how this process can be automated using the ideas we learned. The result is a Revit embed
Parametric calculator that is automatically generated and connected to system elements in the
3D model.
Python 3 support we will add to Python workflows starting from Dynamo 2.7.x releases.
Outro
Like several workflows in the AEC Collection, the Revit Systems Analysis framework
requires considerable setup and takes a fair amount of knowledge to master. Manually
navigating all the different Revit tabs to set the variety of inputs necessary is daunting,
Page 46
convoluted, and time-consuming. Moreover, the data generated is detached from other
aspects of the model. These frustrations can be eliminated for end-users by setting up a
standard process, eliminating tasks using computational design, and guiding the
process by automatically displaying UIs to the designer. Of course, setting up these
automated workflows is tricky. It takes multiple skills, good team dynamics, and above
all, enthusiasm to break from the status quo.
For individuals, I highly recommend investing time in learning these new and inevitably
essential skills. Wading through document pages and watching hours of YouTube
videos is good, but the only way to learn is practice. Whether using nodes or writing
code, one must start with the easy tasks like creating views, exchanging Revit and
Excel data, and placing elements in a project. This essential first step will familiarize you
with the data giving you insight into how you might manipulate it. Next, focus on
connecting different data sources. Interoperability is vital in constructing complex
algorithms. Finally, start identifying time-consuming tasks and tackle the low-hanging
fruit like project setup. This 3-step process will help you learn to map out a strategy,
break the problem into small puzzle pieces, and build multi-step algorithms. Before you
know it, your brain will be flooded with new ideas, and you will never look back.
Companies need to boost computer programming skills, embrace lateral thinking, and
cut stubborn dead weight within their organizations to get the most out of their costly
software. Winning companies will start treating their project data and processes as an
asset and eliminating rogue and manual processes. With standardized methods in
place, models become large, valuable datasets that reflect different markets' unique
project requirements worldwide. The dataset would contain information such as the
market’s unique manufacturing costs, insights into production times, utility costs and
availability, code and other legal requirements, and more. These multiple, robust,
comprehensive datasets will inevitably fuel machine learning leading to lucrative
improvements and market advantage in perpetuity.
The future of the AEC is not in traditional off-the-shelf software but instead lies in
customized workflows that use robust APIs. Autodesk has invested in and continues to
improve its APIs to fulfill its promise of building more with less. Automation will
ultimately replace most design functions now performed by people. Now it is up to the
industry to embrace new approaches to solving design challenges. So, get to
programming, embrace change in your organizations, and ultimately set yourself up for
future success.
Page 47
This class has been possible thanks to many contributors from all over the globe. Thanks to
Helpful likes for more detailed explanations of concepts used.
https://www.sigma-aec.com/post/algorithms-for-mep-design
https://www.autodesk.com/autodesk-university/class/Revit-Systems-Analysis-Features-and-
Framework-Creating-Custom-Workflows-2019
https://www.autodesk.com/autodesk-university/class/Revit-Systems-Analysis-Features-and-
Framework-Introduction-2019
https://www.autodesk.com/autodesk-university/class/Getting-Flow-Generative-Design-MEP-
2019
https://www.autodesk.com/autodesk-university/class/Geometry-Systems-AEC-Generative-
Design-Codify-Design-Intents-Machine-2019
https://www.generativedesign.org/
http://aectechy.com/k-means-clustering-algorithm/
https://data-shapes.io/2016/12/13/ui-multipleinputform/
Page 48