1

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

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.

Kunyu's avatar
57
Kunyu
asked 2023-06-13 20:41:14 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2023-06-14 11:57:56 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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)
mattkoch's avatar
1.1k
mattkoch
answered 2024-05-24 07:14:47 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments