-
Notifications
You must be signed in to change notification settings - Fork 222
Closed
Description
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.