4

Accessing OpenStudio Model Objects from EnergyPlus Measure

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 << "
      HVACTemplate:System:DualDuct,
        #{building_story},                !- zone name
        FanAvailSched,           !- System Availability Schedule Name
        DualFanConstantVolume,   !- System Configuration Type
        !!!!!!! CUT short for brevity
        InletVaneDampers;        !- Return Fan Part-Load Power Coefficients
        "
end

#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)
end

Well, the above snippets failed.

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

Ery Djunaedy's avatar
355
Ery Djunaedy
asked 2015-02-07 02:53:28 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-08-05 13:25:32 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

3

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.

macumber's avatar
12k
macumber
answered 2015-02-07 23:16:56 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
2

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.

aparker's avatar
8.2k
aparker
answered 2015-02-07 09:42:09 -0500
edit flag offensive 0 remove flag delete link

Comments

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's avatar Ery Djunaedy (2015-02-10 16:44:45 -0500) edit
add a comment see more comments