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

Accessing OpenStudio Model Objects from EnergyPlus Measure

asked 2015-02-07 02:53:28 -0500

Ery Djunaedy gravatar image

updated 2017-08-05 13:25:32 -0500

I attempt to answer my own question. As usual it leads to more problem. In a nutshell, I am trying to define a dual-duct HVAC system in OpenStudio. As one answer suggested, it can be done as EnergyPlus Measure.

So I went down this road. My plan of attack is:

  1. Create a model in OpenStudio without any HVAC system
  2. Execute an EnergyPlus Measure to add HVACTemplate objects for dual-duct system

I managed to get all the zones attached to the HVACTemplate:Zone:DualDuct objects. But the problem is: I cannot create the system objects. Ideally, I want to have one AHU per floor.

So the question is: can I get to the OpenStudio "model" objects in EnergyPlus measure? What I imagine is to create one dual-duct system per building story, and then attach zones in that building story to the system. This requires access to "model" objects.

What I have tried is something like this:

# GET the building story
model.getBuildingStorys.sort.each do |building_story|

  #IDF object text for Dual Duct
  string_objects << "
        #{building_story},                !- zone name
        FanAvailSched,           !- System Availability Schedule Name
        DualFanConstantVolume,   !- System Configuration Type
        !!!!!!! CUT short for brevity
        InletVaneDampers;        !- Return Fan Part-Load Power Coefficients

#add all of the strings to workspace to create IDF objects
string_objects.each do |string_object|
  idfObject = OpenStudio::IdfObject::load(string_object)
  object = idfObject.get
  wsObject = workspace.addObject(object)

Well, the above snippets failed.

So, how can I access "model" objects from an EnergyPlus measure?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-02-07 23:16:56 -0500

It would be possible to write another OpenStudio Model Measure that would add some string containing the story name to each thermal zone's name, then your IDF measure would be able to search for these strings in the translated IDF.

edit flag offensive delete link more

answered 2015-02-07 09:42:09 -0500

You can't currently (in 1.6.0) access the OpenStudio Model from an EnergyPlus Measure (there is currently a feature request filed for this). Also, the EnergyPlus Measures run AFTER the EnergyPlus ExpandObject routine (which is the thing that expands the HVACTemplates into full IDF). What this means is that you'll have to build up the entire dual-duct system in raw IDF, then get pretty clever about finding the zones to attach it to. The difficulty of this task illustrates the purpose of OpenStudio.

edit flag offensive delete link more


The solution for me is probably a lot easier: I have to make it work for just this one particular model, with a certain setup of zones and equipments. So I can easily use the HVACTemplate in EnergyPlus, and the inject the expanded version into this OSM using the EnergyPlus measure. I hope that will work. Presuming that it works, the most important question is: will I be able to use PAT, i.e. change some of the values in those IDF objects injected by the EnergyPlus measure? If so, how?

Ery Djunaedy gravatar image Ery Djunaedy  ( 2015-02-10 16:44:45 -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

1 follower


Asked: 2015-02-07 02:53:28 -0500

Seen: 460 times

Last updated: Feb 07 '15