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

Revision history [back]

Thanks a lot for the answer. I have now tried to write my own measure. During this struggle I was inspired by an existing EnergyPlus measure from the BCL-web (AEDG K12 - SlabAndBasement) which includes "a call" to a short idf-file to include new objects. So I wrote a measure with the following code in the measure run section:

 dummyIdfPath  = OpenStudio::Path.new("#{File.dirname(__FILE__)}/resources/dummy.idf")
 dummyIdf = OpenStudio::Workspace::load(dummyIdfPath).get
 workspace.addObjects(dummyIdf.objects)

Then I can use the e+ IDFEditor to create dummy-files containing whatever objects not covered by OpenStudio and put them in a folder named resources in the measure folder. Preliminary tests indicates that it works. The test objects anyway turns up in the ...run\4-EnergyPlusPreProcess-0-folder.

Thanks a lot for the answer. I have now tried to write my own measure. During this struggle I was inspired by an existing EnergyPlus measure from the BCL-web (AEDG K12 - SlabAndBasement) which includes "a call" to a short idf-file to include new objects. So I wrote a measure with the following code in the measure run section:

 dummyIdfPath  = OpenStudio::Path.new("#{File.dirname(__FILE__)}/resources/dummy.idf")
 dummyIdf = OpenStudio::Workspace::load(dummyIdfPath).get
 workspace.addObjects(dummyIdf.objects)

Then I can use the e+ IDFEditor to create dummy-files containing whatever objects not covered by OpenStudio and put them in a folder named resources in the measure folder. Preliminary tests indicates that it works. The test objects anyway turns up in the ...run\4-EnergyPlusPreProcess-0-folder.

Amendment: Later I have concluded that the method above is a useful method to add things to the idf before e+ receives it. However does OpenStudio run the ExpandObjects before running the Measure and it is during the ExpandObjects run that the Basement related objects must be present in the idf to have desired impact. My final, slightly simplified, solution to my problem is as follows:

  • Write a short idf-file using IDF-Editor only containing the necessary Basement objects in the Detailed Ground Heat Transfer group
  • Modify this file by removing "GroundHeatTranfer:Basement:" from all component names
  • Run the file in Basement using EP-Launch-Utilities
  • Take the temperature results from the Basement run - Calculate one representative temperature per month that, applied on both underground walls and basement floor, should result in the same heat transmission (considering areas and temperature differences)
  • Insert these temperatures in a short idf file only containing the Site:GroundTemperature:BuildingSurface object
  • Add this file to the main model using the method in my previous answer

Now I can continue work in the OpenStudio model and run simulations without bothering to much about the basement heat transfer as long as I do not modify parameters related to it. I realise that this could have been done more elegant, but this is good enough for my purposes anyway.