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

Energy Plus EPPY Scripting - Design Day Problem

asked 2019-04-17 01:34:10 -0600

shashank236's avatar

Hello all, I am working on a python script to simulate a model for multiple orientations and locations simultaneously. (initially focusing on ideal air loads) My approach: 1.) Model the building in sketchup 2.)Import to openstudio 3.)Add the weather file and ddy for the first location and normal building orientation 4.)Run the simulation

Now I have the idf file. Using EPPY and my script I run simulations for various orientations and locations.

Problem: Although EPPY lets me select a weather file while running EP, I don't see an option to specify design day. All my locations end up having the same design data, the one I specified in openstudio. Is there an easy way to modify the dd for each location?

I imagine we could use python to copy design day data for a location from their ddy file to SizingPeriod:DesignDay section of the idf file but this seems very tedious. Any thoughts? Much appreciated.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
6

answered 2019-04-22 13:28:45 -0600

santoshphilip's avatar

eppy can read a "weather.ddy" file. (The design days are in the *.ddy file). You can do:

# assuming you have already opened an E+ file called `idf`
ddyidf = IDF("weather.ddy")
designdays = ddyidf.idfobjects["SizingPeriod:DesignDay".upper()]
designday = designdays[0]
print designday # check to see if it happened

# copy a design day into your idf file
idf.copyidfobject(designday)
idf.printidf() # check if it actually copied it in.

Using this, every time you switch the weather file, you can write some code that will insert the Design Days from the corresponding ddy file

edit flag offensive delete link more

Comments

Thank you. This works like a charm! Reduced my script length by 20%. bdw thanks for your work on eppy. Great resource. Much appreciated. .

shashank236's avatar shashank236  ( 2019-04-22 18:23:44 -0600 )edit

@shashank236, glad to know that eppy has been useful. Encourages us to keep improving it. Also, if you write any code using eppy, that may be useful to others, you can contribute it at witheppy

santoshphilip's avatar santoshphilip  ( 2019-04-23 09:48:45 -0600 )edit
2

answered 2019-04-22 12:29:40 -0600

I think the eppy solution would be a script that populates the SizingPeriod:DesignDay objects based on the data from the DDY files. Another possible solution using Python is to append the appropriate DDY file that has the same name as the epw file. See:

https://stackoverflow.com/questions/1...

edit flag offensive delete link more

Comments

1

The solution @santoshphilip gave is great. That is probably the best way to go.

JasonGlazer's avatar JasonGlazer  ( 2019-04-22 13:32:21 -0600 )edit

Hi Jason, Thanks for your reply. That was my solution initially. Copying the design day data information from ddy file to idf file after every iteration. Moreover, I had to rename all the ddy files to .txt before copying anything. Although it worked, but the eppy solution seems more elegant and less time consuming.

shashank236's avatar shashank236  ( 2019-04-22 18:28:42 -0600 )edit
1

answered 2019-04-22 01:54:25 -0600

updated 2019-04-22 16:43:08 -0600

See Santosh's answer as that seems like the best way of doing this using EPPY.

This can also be done easily using Modelkit. I just published a demo video on this exact problem.

You would just need to modify your IDF file so that it has no Design Day objects. Then your root file would be just a couple lines, inserting your IDF file and the location parameter. Check out the video, and the subsequent video on rakefiles, and let me know if you have any questions.

edit flag offensive delete link more

Comments

1

Hi Eric, Thanks for your reply. Checking out your series on youtube soon.

shashank236's avatar shashank236  ( 2019-04-22 18:30:16 -0600 )edit

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2019-04-17 01:34:10 -0600

Seen: 752 times

Last updated: Apr 22 '19