Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question

changing building geometry in idf file

asked 2017-08-10 08:23:33 -0500

EddieB gravatar image

updated 2017-08-15 21:04:40 -0500

I would like to try to automatically generate some idf files for different building heights, widths etc and I'm wondering if anyone has any experience with this or suggestions?

I have a bunch of polygons corresponding to building footprints and heights, and would like to assign each an idf file and then modify the idf file so it represented the building's volume. Ideally, I'd use python to manipulate the idf file, possibly using the eppy package, but I want to avoid using a 3d cad program to create specific idf file for each building footprint (i.e. drawing a box for each building and then using a plugin to create an idf file for it, like archsim in Rhino for example).

Is there any recommended documentation describing how to go from building geometry to an idf file? I was thinking of just adopting a similar zoning structure for each modeled floor, with say 4 outer zones and one inner zone based on some simple rules.

edit retag flag offensive close merge delete



@EddieB, you mentioned eppy, are you aware of GeomEppy?

Jeremy gravatar image Jeremy  ( 2017-08-17 12:08:10 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2018-01-14 13:59:00 -0500

updated 2018-01-14 14:02:42 -0500

This is actually very easy using geomeppy (thanks, @Jeremy). It's pretty much the use case that drove me to create it in the first place.

From the readme:

IDF.add_block(...) # automatically adds a building block to the IDF

This method requires some explanation. The parameters required are:

name : str
    A name for the block.
coordinates : list
    A list of (x, y) tuples representing the building outline.
height : float
    The height of the block roof above ground level.
num_stories : int, optional
    The total number of stories including basement stories. Default : 1.
below_ground_stories : int, optional
    The number of stories below ground. Default : 0.
below_ground_storey_height : float, optional
    The height of each basement storey. Default : 2.5.
zoning : str, optional
    The rules to use in creating zones. Currently the only option is `by_storey` which sets each storey in the block as a Zone.

The block generated will have boundary conditions set correctly and any intersections with adjacent blocks will be handled automatically. The surface type will be set to wall, floor, ceiling or roof for each surface. Constructions are not set automatically so these will need to be added afterwards in the normal way for Eppy.

edit flag offensive delete link more


when I tried the boundary conditions between story1's ceiling and story2' floor, they do not match. They are just set outdoors. How can I solve that?

Lantonshen gravatar image Lantonshen  ( 2020-09-16 13:11:50 -0500 )edit

answered 2017-08-11 09:16:14 -0500

Stuart Dols gravatar image

Likely the OS gurus will have suggestions, but depending on your requirements for building geometry you could use the following public domain tools/methods.

  • Use CONTAM to create scaled, rectilinear shaped buildings (this is the main limitation on geometry). Drawing/defining multilevel buildings with ContamW is very simple.
  • Use the Contam3DExport tool to extrude them to IDF files. Allows you to create IDF using pre-defined IDFs that contain building constructions/materials to be assigned based on surface type, e.g., exterior walls, interior walls, floors, etc. Can even create AirLoopHVAC for multiple systems if desired.
  • Use eppy to modify IDF files as desired.

Let me know if you need more info.


edit flag offensive delete link more

answered 2017-08-11 11:09:31 -0500

updated 2017-08-11 11:16:59 -0500

As @Stuart Dols mentioned, there is an OpenStudio Method to do this.

space = OpenStudio::Model::Space::fromFloorPrint(point3dVector, hight_m, model)

point3DVector is your polygon. You could use an OSM file format as your starting point and then convert to IDF when you want to do model manipulation outside of OpenStudio. You can also write an EnergyPlus measures, that takes in and passes out an IDF file, but under the hood makes a temp OSM file to create the envelope, and then converts it to IDF with the measure. You can see this in context in the Bar Aspect Ratio Study measure.

Here is the API documentation for the method

You could loop through multiple polygons (for core and perimeter zoning) and then run surface matching, and add windows and overhangs if you want. Could also make multi-story.

As another options, if your building footprints happen to be in geo-json format, there are methods available to import those into OpenStudio. This un-supported measure I posed as an example does the opposite, but I thought the code in it maybe useful. It converts footprint of OSM to geo-json text. I was using it to place OSM's into an urban environment

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer


Question Tools



Asked: 2017-08-09 17:30:31 -0500

Seen: 696 times

Last updated: Jan 14 '18