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

EnergyPlus Measure to import BSDF-idf from LBNL WINDOW

asked 2018-07-26 09:36:09 -0500

Tobias gravatar image

updated 2018-07-26 15:25:43 -0500

Hi guys

I'm trying to create a EnergyPlus measure to import the BSDF-idf input from LBNL WINDOW. Most of the functionality needed can be found in the BCL measure "inject_idf_ojbects". However the measure chages the formatting of all the matrix data (to something that cannot run) - example:

image description

(correct formatting on the left before applying the measure - wrong formatting on the right after application of the measure)

I think it comes down to that one of these functions

source_idf = OpenStudio::IdfFile::load( workspace.addObjects(source_idf.objects)

uses "," to destinguise a new line and not "\n" as it should in this case.

Does anybody have an idea of how to correctly import the BSDF-idf using a EnergyPlus measure?

Cheers Tobias

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-26 10:13:46 -0500

updated 2018-07-27 08:46:18 -0500

When you say it's "something that cannot run" do you mean EnergyPlus crashes before running, without exhibiting any error message?

I don't think the formatting of the Matrix:TwoDimension is the cause of the problem; EnergyPlus should always think a comma separates object input values, if they are on separate lines or not.

The problem I had when using the 'inject idf objects' measure with BSDF data was it created a Construction:ComplexFenestrationState object with extra empty fields at the end, which due to a bug in EnergyPlus causes a crash (see this issue). In the image below, the object on the right was from the idf created by OpenStudio after running the 'inject_idf_objects' measure, and after opening the in.idf in IDFEditor and saving-as, the trailing objects were removed (object on the left), and the file ran:

image description

Unfortunately, if the BSDF construction only has two glass layers and one gas layer, the workspace.addObjects method will always add those extra empty fields. Until the EnergyPlus bug is fixed, the only way to get a file to run is to manually edit the idf created by OpenStudio (in.idf in the /run folder, either with a text editor or by opening and saving in IDFEditor) to delete those lines (and adding the semicolon to the last input line) and running with EPLaunch.

edit flag offensive delete link more


The formatting of both of the options looks superficially OK to me, so I concur with Eric that if there's a problem, it's probably not the formatting. The form on the right is in the example file "CmplxGlz_Daylighting_SouthVB45deg.idf" (only thing I see different is the name) and it runs OK for me.

Jason DeGraw gravatar image Jason DeGraw  ( 2018-07-26 11:25:31 -0500 )edit

Thank you

Yes I should have been more elaborate on "something that cannot run": No error message, but empty output file. And simulation time was way too short.

However I can confirm your conclussion - it is the 3 extra lines in "Construction:ComplexFenestrationState" that causes the problem. I have been using a BSDF with 3 glazing layers which also add the extra lines (so not only 2 layered glazing).


Tobias gravatar image Tobias  ( 2018-07-27 05:51:59 -0500 )edit

Cool, I edited out the part about two glazing layers.

Eric Ringold gravatar image Eric Ringold  ( 2018-07-27 08:48:05 -0500 )edit

Your Answer

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

Add Answer


Question Tools



Asked: 2018-07-26 09:36:09 -0500

Seen: 247 times

Last updated: Jul 27 '18