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?
add a comment
First time here? Check out the Help page!
I'm trying to list the branches on the supply side of a plant loop. How can I do that?
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
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2016-05-26 09:44:32 -0600
Seen: 175 times
Last updated: May 26 '16