Intro

This 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 .idf file, without creating geometry in SketchUp, and without any other such hassles. Just some nice simple python.

In outline, you will:

1. create a virtual environment and install geomeppy

2. install EnergyPlus (if you haven’t already)

3. create a simple test building

4. add some windows

5. set the constructions and boundary conditions

6. view the model in 3D

7. run a simulation in EnergyPlus

Installation

First we need to set up a virtual environment to keep this Python environment separate from any other installations on your machine. This tutorial assumes you’re using Python 3 so make sure you have that installed.

Now we activate the virtual environment.

And install geomeppy.

This will take a while to install the geomeppy package and its dependencies. While it’s installing, we can move on to installing EnergyPlus if you don’t already have it installed.

The EnergyPlus installers can be found on the energyplus.net site. Choose the correct package for your platform and install it.

Creating a geomeppy model

Next we want to create our basic model, so we’ll open a python interpreter.

From now on, we’re working with geomeppy in the python interpreter.

Be aware that this tutorial is written for the Mac and for EnergyPlus 8.8.0. If you are on Windows or Linux machine or have a different version of EnergyPlus installed, you’ll need to replace the path to the EnergyPlus installation folder with the appropriate path.

For example, on Windows, this is usually C:/EnergyPlusV8-8-0, and on Linux, /usr/local/EnergyPlus-8-8-0.

Now we have imported an EnergyPlus IDF file which contains the bare minimum required to be able to run successfully. We need to add a weather file to our IDF object first though.

Now we have assigned an EPW format weather file to the IDF. This will tell EnergyPlus about the weather conditions to simulate.

So far, this is the same as using eppy, but now we are getting to the geomeppy part where we can generate and manipulate the IDF geometry. First off, let’s add a simple square block.

Next we can set some default constructions for the IDF surfaces.

Now we need to tell geomeppy to match up our surfaces with the correct outside conditions. In this case, it will just set the outside boundary conditions for all the walls and roof to “outside”, and that of the floor to “ground”.

Last step, let’s add some nice big windows. A window to wall ratio (WWR) of 0.6.

What have we done?

So what have we built? We can export the IDF geometry as an OBJ file, a format that can be imported into a 3D geometry viewer.

Try dragging the ‘boring_hut.obj’ file and ‘boring_hut.mtl’ file to 3D Viewer to see your “Boring hut” in glorious interactive 3D.

boring_hut.obj file
Glorious 3D!

And now, the moment you’ve been working towards all this time…

You should see an output something like the following:

This indicates that EnergyPlus has run successfully.

It’s not very exciting, since we haven’t added any heating or cooling systems, or output variables. Geomeppy is a geometry package after all.  Ok, ok… next time we’ll get to showing some results. But for now…

Find out more

You can find more documentation for geomeppy at the project Read the Docs page, check out the code and contribute to the project’s development on the github page, and keep following here for more tutorials and how-to guides.

Jamie Bull | mail@oco-carbon.com

Related Posts

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

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

Leave a Reply

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