First time here? Check out the Help page!

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

How to add a setpoint manager after cooling coil in an airloop through openstudio sdk python

asked 1 year ago

Kunyu's avatar

updated 1 year ago

I would like to add a setpoint manager to control the humidity ratio after the cooling coil in an air loop, and I'm doing this through openstudio sdk python.

image description

The python code for this is like: object.addToNode(node)

My question is that how to get the oulet node object of the cooling coil instead of supply outlet node of the air loop?

Thanks.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered May 24

mattkoch's avatar

The cooling coil appears to be a CoilCoolingWater. As such, it is a WaterToAirComponent. And as such, it inherits the airInletModelObject(), airOutletModelObject(), waterInletModelObject() and waterOutletModelObject() methods. I do not kow whether these always return a node, but here is a Pyhton snippet to see what gives.

import openstudio
cooling_coil_name = "CHWC-1"
cooling_coil = model.getCoilCoolingWaterByName(cooling_coil_name)
if cooling_coil.is_initialized():
  cooling_coil = cooling_coil.get()
  cooling_coil_node = cooling_coil.airOutletModelObject()
  if cooling_coil_node.is_initialized():
    cooling_coil_node = cooling_coil_node.get()
    if isinstance(cooling_coil_node,openstudio.openstudiomodelhvac.Node):
      print("Congratulations, this is a Node: ",cooling_coil_node)
    else:
      cooling_coil_node = cooling_coil_node.to_Node()
      if cooling_coil_node.is_initialized():
        cooling_coil_node = cooling_coil_node.get()
        print("Congratulations perhaps, this may be a Node: ",cooling_coil_node)
Preview: (hide)
link

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 1 year ago

Seen: 125 times

Last updated: May 24 '24