Python for Energy Modelers – Part 2 – Simple Pre-processing

After a great introduction by Clayton Miller, let’s dig in and see how easy and powerful it is to mix a little Python into your simulation workflow!

Computers are fantastic at performing repetitive tasks, let them handle the boring stuff so you can focus on creating better models and reports. Now think about your simulation tool as an engineer; many simulation tools have one main input file which is executed by the tool, and out come a bunch of results files. We can think of this like a black box model, where we are not so concerned about the inner details. In fact, this model can be generalized to many simulation tools important for energy analysis and building performance design. From personal experience I use this “ASCII text file input – text file output” black box model for EnergyPlus, TRNSYS, and Radiance. Wouldn’t it be nice if we had a general way to modify input files and process our output files automatically? This is the subject of this blog series! Continue reading

Python for Energy Modelers – Part 1

After reading the title for this post – I know what you may be thinking – “Hey, whoa, wait a second. I’m an engineer. The learning curve for programming is too steep. There’s no way I can become proficient without a huge time investment.”

I used to be the same way; fighting my way through excel spreadsheets and even dabbling in a few visual basic macros to help process the data going into and coming out of energy simulation programs. The reality is that there is a better way. Through discussions with a few prominent energy modelers at the Building Simulation 2011 conference in Sydney in November, I decided there just isn’t a ‘nudge’ out there to push more engineers and energy analysts towards basic proficiency in high level programming languages such as Python and Ruby. This post will be the first in a series which will help the average engineer get started with scripting languages, build a few practical skills which are directly applicable to pre and post processing of data for modeling purposes, and go through a couple of these scenarios from start to finish. I have engaged the assistance of energy modeling extraordinaire Marcus Jones to help out with future posts on the simulation scenarios which this stuff can be useful for. Continue reading