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

How to add a controller to a hot water loop

asked 2017-02-16 14:16:10 -0500

dalin_si gravatar image

updated 2017-08-21 08:43:21 -0500

From the SDK documentation, if use addDemandBranchForComponent method, it will create a new ControllerWaterCoil if hvacComponent is a CoilCoolingWater or a CoilHeatingWater.

So from OpenStudio, should be like this:

image description

however, when I add heating water coils to loop by this ruby script:

coils = model.getCoilHeatingWaters
plant = model.getPlantLoopByName('Hot Water Loop')
coils.each do |coil|
   plant.addDemandBranchForComponent(coil)
end

there is no controller in OpenStudio: image description

So any suggestions?

edit retag flag offensive close merge delete

Comments

one more interesting finding is that for the osm file shown in first picture, no any controller objects in its idf file. and when I locate the controller in ruby binding, there is no actuatorNode and sensorNode for them:

  • coil = model.getCoilHeatingWaters[0].controllerWaterCoil.get

  • coil.sensorNode.get

  • RuntimeError: Optional not initialized

dalin_si gravatar imagedalin_si ( 2017-02-16 14:55:50 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2017-02-17 08:37:30 -0500

A Controller:WaterCoil is only necessary for water coils that are connected to an AirLoopHVAC directly. Coils inside of reheat terminals or unitary equipment objects do not need them, because in these situations the coils are controlled by the object that contains them.

Based on your screenshots, it doesn't look like these coils are connected to an AirLoopHVAC directly. If they were, there would be little circles on the coil icon.

In the screenshot below, the top coil is connected to an AirLoopHVAC directly, while the bottom coil is inside of an AirTerminal:SingleZone:Reheat. The top coil has a Controller:WaterCoil but the bottom coil doesn't.

image description

edit flag offensive delete link more
2

answered 2017-02-17 07:57:08 -0500

updated 2017-02-18 05:11:16 -0500

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

Edit: I stand corrected

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

See CoilHeatingWater.cpp#L95

edit flag offensive delete link more

Comments

@Kyle Benne might want to check out the documentation

aparker gravatar imageaparker ( 2017-02-17 08:38:33 -0500 )edit

@Julien Marrec Hi, the model shown in first pic is built by you, so would you please tell me how do you add these coils to plant loop with controllers?

dalin_si gravatar imagedalin_si ( 2017-02-17 09:15:42 -0500 )edit

(please stop tagging me directly and constantly) The real question is, do you need a controller to begin with? And these controllers might have been added automatically by openstudio in an earlier version.

Julien Marrec gravatar imageJulien Marrec ( 2017-02-17 14:33:10 -0500 )edit

Sorry for that, because I got heating and cooling consumption which have huge difference, so I just wonder why. Lack of controller was one of my consideration, but now I don't think that is the reason. sorry for that again.

dalin_si gravatar imagedalin_si ( 2017-02-17 14:41:30 -0500 )edit

It seems that plant_loop.addDemandBranch for Component does create a Controller:WaterCoil see edit.

Julien Marrec gravatar imageJulien Marrec ( 2017-02-18 05:07:03 -0500 )edit

Your Answer

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

Add Answer

 



Question Tools

1 follower

Stats

Asked: 2017-02-16 14:16:10 -0500

Seen: 193 times

Last updated: Feb 18 '17