1

OpenStudio SDK: how can you list the branches on the supply side?

I'm trying to list the branches on the supply side of a plant loop. How can I do that?

Julien Marrec's avatar
29.7k
Julien Marrec
asked 2016-05-26 09:44:32 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-09-29 13:46:27 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2
require 'openstudio'

m = OpenStudio::Model::Model.new
plant = OpenStudio::Model::PlantLoop.new m

splitter = plant.supplySplitter
mixer = plant.supplyMixer

branchInletNodes = splitter.outletModelObjects

branchInletNodes.each do |node|
  # get the components between the branch inlet and the mixer
  branchComponents = plant.supplyComponents(node.to_Node.get,mixer)
  # the last component is going to be the mixer so pop it off
  puts branchComponents
end
Kyle Benne's avatar
6k
Kyle Benne
answered 2016-05-26 09:45:09 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments