2

openstudio get the plenum object for thermal zones

Hi is there a way to get the plenum object for a specific thermal zone under a air loop system in a measure? For example, if I look at this zone in the screenshot below, how do I get the return air plenum object? There is only "removeReturnPlenum", or "setReturnPlenum" under the ThermalZone member list here, https://openstudio-sdk-documentation....

image description

xchen's avatar
929
xchen
asked 2021-02-17 20:03:13 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2021-07-09 17:48:06 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

If you have an AirLoopHVAC object, you can get the AirLoopHVACReturnPlenum and its associated ThermalZone by doing something like this:

air_loop_hvac.demandComponents.each do |component|
  if component.to_AirLoopHVACReturnPlenum.is_initialized
    return_plenum = component.to_AirLoopHVACReturnPlenum.get
    if return_plenum.thermalZone.is_initialized
      zone = return_plenum.thermalZone.get
      puts "Return plenum thermal zone is #{zone.name}"
    end
  end
end
shorowit's avatar
11.8k
shorowit
answered 2021-02-18 09:52:08 -0500
edit flag offensive 0 remove flag delete link

Comments

Thanks, looks like this approach outputs all the plenum in this air_loop_hvac. Is there a way to get the pair? For example, zone1 and its return plenum, zone2 and its return plenum.

xchen's avatar xchen (2021-02-19 17:17:17 -0500) edit
add a comment see more comments