Skip to content

ControllerWaterCoil not connected to CoilCoolingWater within CoilSystemCoolingWaterHeatExchangerAssisted if coil added to plant loop before coil system added to air loop #4895

@eringold

Description

@eringold

Issue overview

If I make a CoilSystemCoolingWaterHeatExchangerAssisted, and add the coil to a PlantLoop before the CoilSystem is added to an Air Loop, the coil's controller is not connected.

Current Behavior

model = Model.new
ahu = AirLoopHVAC.new(model)
plant = PlantLoop.new(model)
hx = HeatExchangerAirToAirSensibleAndLatent.new(model)
coilsys = CoilSystemCoolingWaterHeatExchangerAssisted.new(model, hx)
coil = coilsys.coolingCoil
# 1. connect coil to plant
plant.addDemandBranchForComponent(coil)
# 2. connect coilsys to air loop
coilsys.addToNode(ahu.supplyOutletNode)

puts coil
model.getControllerWaterCoils.each{|c| puts c}  #<- 'Water Coil' name is blank

ft = OpenStudio::EnergyPlus::ForwardTranslator.new()
ws = ft.translateModel(model)

ws.getObjectsByType("Controller_WaterCoil".to_IddObjectType).each{|c| puts c} # nothing here

Flip the order of connections, and it works:

model = Model.new
ahu = AirLoopHVAC.new(model)
plant = PlantLoop.new(model)
hx = HeatExchangerAirToAirSensibleAndLatent.new(model)
coilsys = CoilSystemCoolingWaterHeatExchangerAssisted.new(model, hx)
coil = coilsys.coolingCoil
# 1. connect coilsys to air loop
coilsys.addToNode(ahu.supplyOutletNode)
# 2. connect coil to plant
plant.addDemandBranchForComponent(coil)

puts coil
model.getControllerWaterCoils.each{|c| puts c}  #<- 'Water Coil' name is correct

ft = OpenStudio::EnergyPlus::ForwardTranslator.new()
ws = ft.translateModel(model)

ws.getObjectsByType("Controller_WaterCoil".to_IddObjectType).each{|c| puts c} # there it is

Expected Behavior

It would be great if the coil controller would work without coil connections being order dependent.

Environment

Some additional details about your environment for this issue (if relevant):

  • Platform (Operating system, version): Windows 11
  • Version of OpenStudio (if using an intermediate build, include SHA): 3.6.0

Context

My system for creating air loops defines components with (in the case of water coils) the plant loop name, so when the component is created it is first attached to the plant loop, then attached to the air loop. This works fine for standalone water coils, but the order-dependency of connection of a water coil within this CoilSystem messes that up.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions