Upload
dangthien
View
217
Download
2
Embed Size (px)
Citation preview
Session 11
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Class Description
The visual programming interface of Dynamo is enabling structural
engineers with the tools to build optimized structures with minimal energy,
and subsequently make their own design tools. Based on the Revit
Platform, we can use our creativity to develop optimized structural
systems using computational logic in an advanced building information
modeling environment. This presentation will teach participants how to
create and iterate computational space frames with native Revit Framing
elements and Adaptive Components, and how these can be used in
structural analysis.
About the Speaker
Håvard Vasshaug is a structural Engineer (M.Sc.), architect and BIM
Manager at Dark Architects; one of Norway's fastest growing architectural
studios. He has vast experience providing Revit training, solutions, and
seminars for architects and engineers over the past 9 years, and now uses
this background to share knowledge of digital building design solutions.
He regularly speaks about technical workflows, digital innovation and
human development at various national and international conferences
and seminars, and receive wide acclaim for his talks and classes. He writes
about BIM and visual scripting solutions on vasshaug.net, and administers
the national Norwegian Revit forum.
Håvard has a passion for making technology work in human minds and on
computers and have three means to do so: Building project
development, technology research, and knowledge sharing. When he
can do all that, he is a very happy camper.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 2 of 44
Introduction
Dynamo is a visual programming interface that connects computational
design to building information modeling (BIM). With Dynamo, users can
create scripts that build, changes and moves building information in
whatever way the user wants. It is free and open source.
Computational design with BIM through Dynamo creates some interesting
opportunities for the building design industry.
First, Dynamo allows us to design organic and optimized buildings and
structures faster than with traditional modeling tools, using computational
methods. This is because we can create, associate and analyze multiple
building parameters, and have them revise our designs automatically. We
can iterate and evaluate multiple building design options with ease, and
build structures based on natural and mathematical principles.
Second, visual programming in BIM offers us a way of expanding the
boundaries of what actually can be accomplished in a BIM tool. We can
access and edit building parameters more effectively than traditional
hard coded tools allow. We can establish relationships between building
element parameters, and modify these using almost any external data.
We can move any information about a building or its surroundings through
our BIM effortlessly, something that is normally reserved for those who are
software savvy.
This opens the first door to a vision of building designers taking ownership
of, and designing, their own design tools. Ever since the Personal
Computer became mainstream, almost all building designers have been
subject to what software developers have created for them. This is an
opportunity for the building design industry to start getting actively
involved in how its software works. We can create, and obtain a deep
understanding of, our own design tools.
When I was introduced to the building industry as a young engineer more
than a decade ago, my design tasks included drawing, copying and
offsetting lines, while trying to make sense of complex 2D blueprints. It was
not only mind numbing, but also time consuming and inefficient. I now
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 3 of 44
focus all my energy on teaching young architects and engineers about
the exceptional building design tools they can use. I try to help them to
avoid the same experience, and show them how to create their own
software.
Computation is going to be a big part of the future building design
workflow for architects and engineers. Dynamo, right now, manifests that
vision.
Note
All information in this class handout is based on the following software
versions: Revit 2015 Build: 20140905_0730(x64) Update Release 4 and
Dynamo 0.7.2.2114.
If any of my examples deviate from your experience, please run a check
on the versions you are using.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 4 of 44
Table of Contents
Table of Contents .................................................................................................... 4
Dynamo .................................................................................................................... 5
Modeling a Space Frame .................................................................................. 5
Building a Computational Attractor Grid ....................................................... 5
Integration with Revit Elements ....................................................................... 13
Analytical Model and Structural Analysis ...................................................... 37
Material for Further Research and Development ........................................... 43
Optimized form finding ..................................................................................... 43
Working with Adaptive Components and Structural Framing .................. 44
Working with Load Data inside Dynamo ...................................................... 44
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 5 of 44
Dynamo
Modeling a Space Frame
Using computational logic in structural design with the visual programming
interface of Dynamo opens up a new way of interacting with a building
information modeling database. Within Dynamo we can interact with,
and automate processes in Revit, and build complex and logic structures
with minimal energy. All it takes is a new way of thinking.
Let’s first see how we can get up and running with a basic computational
attractor grid.
Building a Computational Attractor Grid
In this section we will build a computational 3-dimensional attractor grid
system that we will use later.
Dynamo automatically associates itself with the Revit document that is
open when open a definition or start a new one. A dynamo definition can
run on top of a Revit project or family file, but what you can do with
Dynamo depends on where you are. We’ll touch on that later.
We can build a basic computational grid system in Dynamo using any
type of Revit document, but if we want to generate actual Revit Structural
Framing elements we need to be in a Revit project file.
We start by double clicking in the grey Dynamo drawing canvas to
produce a Code Block. In the Code Block we enter the number 8
followed by a semi colon (;). This will output the number 8.
Repeat this sequence for second Code Block, only this time enter the
string
0..1..#n;
Wire the 8 output to the n input, and wire a Watch node to the second
Code Block output. Press Run (or F5) to execute the script. Voilà: We have
produced a list of numbers.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 6 of 44
Bring in a Point.ByCoordinates node to create a list of points from our list of
numbers. Make sure we have Background 3D Preview turned on.
Right Click on the Point.ByCoordinates node and change the Lacing
parameter to Cross Product. This will combine all the numbers in our list
into points.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 7 of 44
(For more information on how Lacing works I suggest the Dynamo
Learning video tutorials on dynamobim.org/learn.)
Turn on Run Automatically.
Change the input value to 10 and 12, and visually confirm that our grid
changes accordingly. (Ctrl+G or press Geom to navigate the preview
background.) Change back to 8.
We now have a square grid system of 8 * 8 = 16 points. Note that these
points are Dynamo arbitrary geometry, and has nothing to do with Revit
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 8 of 44
yet. Also note that making a grid this way makes a list of lists of points, with
each value of X in each sublist. This will help us when working out a set of
lines.
We can now add another Point.ByCoordinates node and two Double
Slider nodes, to add a new point in our preview background canvas. We
can use this point as the attractor in our 3D grid.
Note: You can copy nodes by using default Windows Ctrl+C & Ctrl+V.
Change the Max values of our Double Slider nodes to 1, and change the
Point.ByCoordinates X and Y input dynamically by dragging the sliders.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 9 of 44
Now we can add a Geometry.DistanceTo node to calculate the
distances between each point in the grid and the single point.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 10 of 44
We continue by adding a Code Block with
pt.X;
pt.Y;
pt.Z;
to isolate out the point X, Y and Z coordinates. We will use this to
manipulate the Z values with some computation. We also add two Double
Sliders and another Code Block. The Double Sliders will control different
aspects of the offset and amplitude of our 3D grid.
The Code Block node does the actual calculations, and in this field we
write the syntax
offset-(lengths/amp);
This will let us control the vertical offset with one Double Slider and the
amplitude (or scale) with the other.
Connect the Geometry.DistanceTo output to the “lengths” input of our
last Code Block, and the Double Sliders into “offset” and “amp”.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 11 of 44
Now we can connect everything again by introducing another
Point.ByCoordinates node and wiring it to the X and Y output of the pt
Code Block and to the length calculations output.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 12 of 44
We can add lines between the points in the grid now by adding a
PolyCurve.ByPoints node.
We can add transversal lines by transposing the lists of points produced by
the last Point.ByCoordinates node, and wiring the transposed lists to a new
PolyCurve.ByPoints node.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 13 of 44
The PolyCurve.ByPoints nodes generate linear line segments between
each point in a list. We can use continuous splines if we wish by using the
NurbsCurve nodes similarly.
Now we can change the different Number input values using the sliders,
and see our model update accordingly.
Now let’s see what we can make of this in Revit.
Integration with Revit Elements
One major experienced difference between dealing with Dynamo
geometry and Revit Elements is that viewing, changing and interacting
with Dynamo geometry is superfast. The same cannot always be said
about Revit geometry. Still, one of the great advantages with Dynamo is
that it actually can interact with Revit Elements. Let’s have a look at how
that works.
Surfaces
When talking about Revit, Dynamo and surfaces it’s important to
differentiate between modeling a Revit Surface with Dynamo and using a
Revit surface in Dynamo.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 14 of 44
Creating a Revit Surface within Dynamo limits us to only work in the
Conceptual Modeling Environment, as that’s the only place a Revit
Surface can be modeled and edited.
Using an already modeled surface with Dynamo on the other hand,
creates many possibilities. In fact, selecting Revit surfaces in Dynamo
includes every surface in Revit, not only Masses created in the CME. We
can use Walls, Floors and Roofs, anything that has a face really.
In the Revit project we used in the previous section, model (in-place) or
load a Mass surface.
We can pull this surface into our Dynamo definition by adding the Select
Face node, click Select Instance and click on the surface in Revit.
Now we can divide this face in a similar grid system like we used in the
previous section. In order to do so we have to generate a UV grid, and
convert it to points in space.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 15 of 44
First delete the two first Double Sliders and Point.ByCoordinates we used.
Second, add one UV.ByCoordinates node, a UV.U, a UV.V and a
Surface.PointAtParameter node. Wire them like below, and remember to
change Lacing on the Surface.PointAtParameter node to Cross Product.
Using the line grids from the previous section, we can wire the surface
point coordinate list into the PolyCurve.ByPoints nodes.
Now can be a good time to hide the surface from the background
preview. Right click on the Select Face node and deselect Preview.
PS We do not want to delete the distance and formula nodes used
previously, as they will come in handy later.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 16 of 44
We can further develop this grid by finding the center points of each
panel and offsetting these normally to the surface. To do this we need
two nodes. First we need to use the Plane.ByBestFitThroughPoints node.
This will find the midpoint between a set of XYZ coordinates. Second we
need a custom node called LunchBox Quad Grid by Face by Nathan
Miller. This will, with the help of a little Python programming, get the
quadrant points, polygons and faces of each panel as lists of lists. We
need this to get the origins and normals per quad, in addition to the
corner points. These quad points can also be obtained manually without
the help of custom nodes and Python programming, but that requires
much more list manipulation, and we will not cover that here.
Note: Nate uses a different understanding of UV than the
Surface.PointAtParameter node does. The LunchBox node counts the
number of divisions, not points. Hence we need to subtract a value of 1
from the initial input. Do this by adding another line in the second Code
Block with the following syntax
n-1;
Then wire accordingly.
Turn off Preview for both the LunchBox and Plane.ByBestFitThroughPoints
nodes.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 17 of 44
Finishing this section we can offset the center points by using the Origins
and Normals output from the Plane.ByBestFitThroughPoints node. This
output is a list of points that represent the normalized vectors for the axis of
the best fit plane. Segment this output be producing a Code Block with
the syntax
pt.Origin;
pt.Normal.AsPoint();
We can transform the normal vector by adding a Geometry.Scale node.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 18 of 44
This produces a unitized set of point vectors. We can notice that not all
normals point in the same direction. We can work around this by adding a
test, and since our surface is more or less horizontal (more so than vertical
at least), our test can be z>0.
Use the Code Block from the previous example (the one we are not using
any longer), and change its syntax to
pt.Z;
pt.Z>0;
Insert the Geometry.Scale output, and our resulting list is a set of booleans
that indicate if a normal points up or down.
Add a Code Block with syntax
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 19 of 44
-1;
a Geometry.Scale node, and a Formula node with syntax
if(z>0,a,b)
Wire like below, and observe that we now only have positive normals. And
There Was Much Rejoicing.
Next we wire the Code Block formula used as in the previous example as
the amount input in the Geometry.Scale node, and the rest as follows.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 20 of 44
The Geometry.Scale node now generates vectorized offset points for
each quadrant, but we still lack the math associated to each panel’s
distance to an attractor point.
Move the Code Block and its associated Double Sliders and
Geometry.DistanceTo nodes above our current definition. Copy the
Surface.PointAtParameter node, and wire it to a new Code Block with
syntax
0.5;
Wire the rest accordingly:
Our definition is now scaling each panel point’s normal offset distance to
the product of each panel’s distance to a point in the center of our base
surface. Incredibly simple.
Next we transform the vector points to actual Dynamo vectors by adding
a Point.AsVector node, wired to the last scale output.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 21 of 44
Next we add a CoordinateSystem.Identify and a
CoordinateSystem.Translate node.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 22 of 44
Finally we add a Geometry.Transform node, and wire its geometry input to
the origin output of our best fit planes and its cs (coordinate system) input
to the CoordinateSystem.Translate output.
This produces a flat list of point coordinates. In order to use this effectively
with curve creation lets manually divide the list for each set of line
segments.
Add a List.Chop node. Wire it to the last transformed geometry. The
number of points in each needed sublist equals the number of each u
and v divisions, minus one. Hence, pan to the left and pull out a wire from
the n-1 output of our second Code Block.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 23 of 44
Wire this output to the amount input of our new List.Chop node.
Produce a List.Transpose node, two PolyCurve.ByPoints nodes, and wire
them accordingly:
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 24 of 44
In order to connect the top and bottom grids to get the transversal frame
layout, we add a List.Transpose and Flatten to the LunchBox Quad Grid by
Face Panel Pts output. This will order each 0-, 1-, 2- and 3-point of each
panel nicely aligned with each top grid point.
Next we duplicate the top grid points 4 times (equal the number of panel
points) by introducing a List.Cycle node, connected with the
Geometry.Transform output and a Code Block with output 4.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 25 of 44
We generate the line segments by adding a Line.ByStartPointEndPoint
node, and connecting it to the transposed list of quad points and the
cycled list of top grid points.
Last in this section on creating Dynamo points and lines from list
manipulation and math, we can combine 4 quad points with its
corresponding top grid point.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 26 of 44
Add a List.AddItemToFront and a List.Transpose node. Wire the
Geometry.Transform to item and the transposed quad points to list.
List.Transpose from the added list will produce a list of lists of 5 points for
each panel.
This provides a nice platform to start modeling Revit Elements, and first off
are Adaptive Components.
Adaptive Components
There are a couple of different Adaptive Component nodes in Dynamo,
but the most commonly used is the AdaptiveComponent.ByPoints node.
This node requires a list of point coordinates that define the location of the
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 27 of 44
Adaptive Points in the family. The number of points must equal the number
of Adaptive Points.
We need to keep in mind the number sequence of the Dynamo points
when building our Adaptive Component. Dynamo always counts from 0,
while Adaptive Components start at 1; hence 0 correspond to 1, 1 to 2,
and so on.
Let’s introduce the AdaptiveComponent.ByPoints and the Family Types
nodes, and wire the nodes.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 28 of 44
This offers many possibilities when it comes to complex, organic and
effective modeling, and also lets us evaluate many different options with
minimal energy. For instance, we can turn on Run Automatically in
Dynamo and change the Revit Surface. The entire component layout
updates instantly.
One thing we cannot do with Adaptive Components is use them for
structural analysis purposes. These Revit families have no corresponding
Analytical model, cannot host loads or Boundary Conditions, and can’t
be exported to analytical software. (This is actually only partly true, as
we’ll discuss later.)
One Revit element that can do all these things is Structural Framing, and
guess what; there is a Structural Framing node in dynamo!
Structural Framing
The Structural Framing node in Dynamo populates a Revit project
document with beams that we can use for analytical purposes. The node
requires 5 inputs; curve, level, upVector, structuralType and
structuralFamilySymbol. structuralFamilySymbol is the equivalent with Revit
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 29 of 44
Family Type, and need at least one loaded Structural Framing family in the
active project.
Add the StructuralFraming.ByCurveLevelUpVectorAndType, Levels,
Vector.ZAxis, StructuralType.Beam and Structural Framing Types nodes,
and wire like below.
Without having too much detailed knowledge of why, it is a general
impression that the Structural Framing families work best with Dynamo if
they are defined without the automatic cutback feature of Revit. This
feature has a tendency to over-scale the cutback, and although this does
not (normally) effect the Analytical Beams, our models look much better.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 30 of 44
The curves input require a list of Dynamo lines or curves. Normally
Line.ByStartPointEndPoint, PolyCurve.Curves or a Nurbs.Curve node does
the trick, depending on what our beams look like (is it a spline or linear
line?) and what list data we have.
Delete the Adaptive Component nodes from the last section, and add a
List.Create and a PolyCurve.Curves node. Wire all our 4
PolyCurve.ByPoints outputs to the list creation node.
Then add another List.Create and a Flatten node to combine all curves
with the transversal lines.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 31 of 44
We should now have a flat list of 392 curves and lines, and wiring these
without hesitation to the
StructuralFraming.ByCurveLevelUpVectorAndType node, we only need to
save, Run and grab coffee.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 32 of 44
Returning from the coffee machine, our eyes should now gaze with
satisfaction upon our desired outcome; a complete set of Structural
Framing elements in Revit.
And There Was Much Rejoicing.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 33 of 44
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 34 of 44
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 35 of 44
Again, we can turn on Run Automatically in Dynamo and make
geometrical changes to the Mass Surface, change the UV count, or
computation offset or amplitude.
We should remember to de-wire the Structural Framing node before
executing the definition now, because updating will be much slower
when Revit beams are generated or updated. Mess around with the
different parameters and then wire the Structural Framing node back
when the Background Preview looks like something you’re not
embarrassed to show someone.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 36 of 44
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 37 of 44
Analytical Model and Structural Analysis
With the introduction of Structural Framing and subsequent Analytical
Beams we can start to explore the possibilities of structural analysis.
First, we can start adding vertical Hosted Line Loads for Live Load. If the
Steel Sections we have used in Dynamo are somewhere what we want to
design we can use them for Dead Load. Otherwise we provide dead load
too as Hosted Line Loads. There is no way to use Area Loads sadly, as that
require planar Structural Floor elements, something we do not have here.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 38 of 44
It’s interesting to note that the Hosted Line Loads will update with the
Analytical Beams when we change certain parameters in Dynamo. Of
course adding new beams will require manually modeling new loads, but
most updates that either move or deletes load will update.
Boundary Conditions can also be added quick and easy.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 39 of 44
When all this is in place we have some options to proceed.
First, we can use Autodesk 360 Structural Analysis to perform simple
calculations and analyze and visualize the results in Revit.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 40 of 44
We can even bring in and visualize deformation in a Revit View.
We can also use Revit Extensions to get quick and easy Load data at
supports and different members.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 41 of 44
The Revit Extensions can also save reaction loads back to Revit as native
Revit Internal Point Loads at supports.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 42 of 44
We can export our analytical model to Robot Structural Analysis
Professional and perform detailed and complete automated load
combinations, calculations and steel section dimensioning. After
optimizing the steel sections in Robot, the updated members can be
brought back to Revit.
Last we can export node and line data directly from Dynamo to Excel or
CSV, and bring this into whatever analysis software we use. We can easily
differentiate between different sets of points and lines in a dynamo
definition, and extracting that information.
Many structural analysis programs can import analytical data from Revit,
but in case that for some reason fails, nothing can go wrong with
numerical Excel data.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 43 of 44
Material for Further Research and Development
Optimized form finding
In the sample library of Dynamo 0.6.3 there was an exercise called
Dynamic Relaxation. This definition created a Particle System from any
given points and curves, in addition to a host of numerical data (including
gravity), and looped this data in a set of iterations that “froze” in a position
where all members had ideal stress.
In our example, we should be able to apply this concept on our double-
curved surface, and generate a pressure-optimized space frame in
Dynamo, rather than the one we made from guessing and analyzing.
However, in the latest version of Dynamo these nodes have been
excluded. I also did not manage to make them work properly in previous
versions. Here are 4 screen shots from one iteration, which was done in
version 0.6.3 seconds before it crashed:
When these nodes are brought back, and start working properly, I see a
lot of potential for great use when working with structural optimization.
Computational Logic in Structural Design
Håvard Vasshaug, Dark Architects
Page 44 of 44
Working with Adaptive Components and Structural Framing
As engineers, a very likely scenario on AEC projects is us receiving an
already modeled structural system from an architect, using Adaptive
Components or other generic building elements, rather than Structural
Framing. As we discussed earlier, this is great for modeling flexibility, but
provides no analytical data.
Instead of modeling a structure over again, or modifying an architectural
definition, we could extract point and line data from the Adaptive
Components using Dynamo, and use these to work with structural analysis.
Whether passing them on directly to analytical software or generating
Revit Analytical Elements, this provides us with the opportunity to work fast
with correct data. The time saved on not remodeling could be used on
analyzing multiple design options instead.
This would also work with updated models, say, if we receive a new set of
Adaptive Components from the architectural design team.
Working with Load Data inside Dynamo
One problem described earlier, and a major workflow issue is the fact that
we have to model loads manually and separately, either in Revit as Line
Loads or in Robot using Cladding and Area Loads. This presents us with
ineffective labor and design change problems, for instance when
changing the UV Grid. Working only with Line Loads in Revit, as opposed
to Area Loads, is also fairly time consuming, as it presents conversion
operations when all available load data is described by areas, and lots of
clicking.
A solution for this could either be some kind of Load nodes or Load input
for Structural Framing that lets us apply load data to elements, or maybe
even areal load data to surfaces.