First time here? Check out the Help page!
1 | initial version |
I think the SDK documentation is outdated. The PlantLoop.hpp#L209 does mention:
/** Adds a new demand branch for component and returns a bool indicating success.
* This method will create a new ControllerWaterCoil if hvacComponent is a
* CoilCoolingWater or a CoilHeatingWater.
*/
but looking at the PlantLoop.cpp# I cannot see anywhere the creation of a Controller:WaterCoil
automatically.
A Controller:WaterCoil
(doc) is not needed to make a Heating/Cooling Water Coil function. It is only needed if you want to control a coil at one node based on the condition at another node.
As the reader probably noted when reading the descriptions of the coil syntax shown earlier in this section, there were no controls attached directly to a particular component. This is because the input can be simplified somewhat by entering node names to be controlled. This avoids having to search through multiple lists of component types for the sake of simply controlling components. The
Controller:WaterCoil
shown below is a way of controlling variables at one node based on conditions at another node
2 | No.2 Revision |
I think the SDK documentation is outdated. The PlantLoop.hpp#L209 does mention:
/** Adds a new demand branch for component and returns a bool indicating success.
* This method will create a new ControllerWaterCoil if hvacComponent is a
* CoilCoolingWater or a CoilHeatingWater.
*/
but looking at the PlantLoop.cpp# I cannot see anywhere the creation of a Controller:WaterCoil
automatically.
A Controller:WaterCoil
(doc) is not needed to make a Heating/Cooling Water Coil function. It is only needed if you want to control a coil at one node based on the condition at another node.
As the reader probably noted when reading the descriptions of the coil syntax shown earlier in this section, there were no controls attached directly to a particular component. This is because the input can be simplified somewhat by entering node names to be controlled. This avoids having to search through multiple lists of component types for the sake of simply controlling components. The
Controller:WaterCoil
shown below is a way of controlling variables at one node based on conditions at another node
I tested the behavior using the following:
In [1]:
model = OpenStudio::Model::Model.new
coil = OpenStudio::Model::CoilHeatingWater.new(model)
plant_loop = OpenStudio::Model::PlantLoop.new(model)
In [2]: coil.controllerWaterCoil.empty?
Out[2]: => true
In [2]: plant_loop.addDemandBranchForComponent(coil)
coil.controllerWaterCoil.empty?
Out[2]: => false
Upon further investigation in the source code, this is done in the CoilHeatingWater::addToNode
that's being called when using PlantLoop::addDemandBranchForComponent