1

OpenStudio: Set UnitConversion to JtoKWH when generating idf

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

Moritz Vogel's avatar
35
Moritz Vogel
asked 2024-07-24 11:26:04 -0500, updated 2024-07-24 11:26:39 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

3

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.

Denis Bourgeois's avatar
2.8k
Denis Bourgeois
answered 2024-07-24 16:05:31 -0500
edit flag offensive 0 remove flag delete link

Comments

1

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
add a comment see more comments