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

OpenStudio: Set UnitConversion to JtoKWH when generating idf

asked 2024-07-24 11:26:04 -0500

Moritz Vogel's avatar

updated 2024-07-24 11:26:39 -0500

Hello,

I use OpenStudio to run simulations of my BEM. When analyzing the results I use the summary generated by OpenStudio as well as the html file generated by EnergyPlus. I found how to switch to kWH for the report generated by OpenStudio, but I couldn't find how to switch the unit reportes in the EnergyPlus summary to kWh. I'm aware that one can set the Field UnitConversion inside OutputControl:Table:Style to JtoKWH when working in EnergyPlus directly to achieve this. However, I could not find how to tell OpenStudio to set this for me, when generating and idf file from the osm file. Is there an option to do that in OpenStudio? Could this be done by writing my own OpenStudio measure?

Best regards

Moritz

EnergyPlus results in GJ OpenStudio results in kWh

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2024-07-24 16:05:31 -0500

OutputControlTableStyle isn't likely mapped to the OpenStudio Application.

"Could this be done by writing my own OpenStudio measure?" Indeed, that would be the safest route. The easiest in the short term is to hack your .osm files, by copying/pasting the following:

OS:OutputControl:Table:Style,
  {9206745e-ee26-45d1-8c25-e06c38b989e7}, !- Handle
  HTML,                                   !- Column Separator
  JtoKWH;                                 !- Unit Conversion

... make sure the Handle is unique.

image description


I generated this using IRB (probably can do the same with the Python Interpreter):

require 'openstudio'
model = OpenStudio::Model::Model.new
puts model.getOutputControlTableStyle

OS:OutputControl:Table:Style,
  {9206745e-ee26-45d1-8c25-e06c38b989e7}, !- Handle                                                                  
  HTML,                                   !- Column Separator                                                        
  None;                                   !- Unit Conversion

... and changed None to JtoKWH after copying/pasting.

A very simple script could accomplish the same if you had hundreds of files to modify. Hope this helps.

edit flag offensive delete link more

Comments

Tagging onto Denis's comment here, I realized I might be able to use a similar measure in my own work and tossed a measure together.

I pulled this together pretty fast, so if you encounter a bug please let me know. But it runs for a few test cases I tried. Hopefully this helps in your workflow as well @moritz-vogel!

Configure OutputControlTableStyle measure

GFlechas's avatar GFlechas  ( 2024-08-07 11:36:21 -0500 )edit

Your Answer

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

Add Answer

Careers

Question Tools

2 followers

Stats

Asked: 2024-07-24 11:26:04 -0500

Seen: 187 times

Last updated: Aug 06