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

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

asked 2016-05-26 09:44:32 -0500

updated 2017-09-29 13:46:27 -0500

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-05-26 09:45:09 -0500

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
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2016-05-26 09:44:32 -0500

Seen: 134 times

Last updated: May 26 '16