This post fixes a need to be able to see what I’m doing when generating EnergyPlus geometry files, without needing to fire up SketchUp.

The approach is pretty simple, combining eppy with the mplot3d library for matplotlib. This is a much more lightweight solution than using something like mayavi.

The goal here was to see whether my code had correctly intersected a pair of zones and set the adjoining surfaces as internal walls (done using Shapely, which may be the topic of a future post).

First the required imports (this is taken from a Jupyter notebook which you can download at the bottom of the post).

Now a few useful functions…

Next we’ll add windows to just the external walls so we can see that the internal walls have been created correctly. If it has worked, the internal walls won’t have any windows.

And now we’re ready to show the chart. If you have this in a Jupyter notebook the chart will show up inline and will be interactive. You will be able to zoom in and out, as well as rotate the canvas.

And here’s the result.


So we can see that there is no window on the internal wall joining the two spaces, meaning that the generated IDF has the surface set as an internal wall. Perfect!

Download the Jupyter notebook and IDF to try this out for yourself.

Jamie Bull |

Related Posts

IntroThis tutorial is intended as a walk-through for complete beginners to geomeppy. geomeppy is a python project built on top of eppy, and as the name implies, it adds much more geometry editing capabilities.At the end of the tutorial, you will have created and run an EnergyPlus model without once having to manually edit an […]

WiGLE is a popular platform which can be used for finding the location of a device using the names of WiFi networks in its vicinity. I’ve written about this before, and wrote some Python code to interact with their API. This API has since been retired and replaced with a new one, as of December […]

Just a quick post to point out a couple of really useful tools.The first is a web-based tool for finding weather files for a location of interest. It’s similar to the Excel EPW finder tool we created a few years back, but much more modern looking. It is however missing a few of the useful […]

1 Comment on “View EnergyPlus geometry in Python”

Leave a Reply

Your email address will not be published. Required fields are marked *