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.

union

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 | jamiebull1@gmail.com

Related Posts

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 […]

Eppy is a really useful library which I’ve written about several times, since before I really had anything to offer in terms of contributing code. Over the past year or so though, I’ve started to contribute back some of the changes and additions I’ve made while using eppy on academic and commercial projects.This post is […]

1 Comment on “View EnergyPlus geometry in Python”

Leave a Reply

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