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

Revision history [back]

click to hide/show revision 1
initial version

how to get PlantLoop associated with airLoop component OpenStudio

Hi there-

I'm working with C# bindings of OpenStudio 1.4.x, via IronPython, and what I want to do is to be able to modify plant loop components, given a user working on an airLoop.

Here's an example. I call the hot water coil associated with an air handler. Now what I want to do,is find the plant loop associated with this coil, and ultimately find the boiler and other components associated with the coil. I guess conceptually, this could be a way to tear up the guts of a plant loop upstream, starting with knowledge of only the airside system.

I've gone down a few dead ends...here is what I have tried:

I tried calling the heating coil object itself. x = airloop.supplyComponents(ops.IddObjectType("OS:Coil:Heating:Water")) hc = model.getCoilHeatingWater(x[0].handle()).get()

The problem with this is, the type returned by getCoilHeatingWater does not appear to in any way closer to the upstream parent boiler.

I tried calling the parent of the heating coil: x = airloop.supplyComponents(ops.IddObjectType("OS:Coil:Heating:Water")) b = x[0].parent() The problem here is, I get an OptionalParentObject, which is usually a dead end. I don't know of any way to do anything with this object.

I tried calling all the relationships, which looks promising, x = airloop.supplyComponents(ops.IddObjectType("OS:Coil:Heating:Water")) rels = x[0].relationships() for rel in rels: print rel This seems promising, but the relationships all seem pretty generic strings that I can't access.

Anyways, this is pretty new territory for me since I have just now gotten to the plant side of things in OpenStudio. I'm curious if anyone has some pseudo code or a basic gist that can help me out.

how to get PlantLoop associated with airLoop component OpenStudio

Hi there-

I'm working with C# bindings of OpenStudio 1.4.x, via IronPython, and what I want to do is to be able to modify plant loop components, given a user working on an airLoop.

Here's an example. I call the hot water coil associated with an air handler. Now what I want to do,is find the plant loop associated with this coil, and ultimately find the boiler and other components associated with the coil. I guess conceptually, this could be a way to tear up the guts of a plant loop upstream, starting with knowledge of only the airside system.

I've gone down a few dead ends...here is what I have tried:

I tried calling the heating coil object itself. x = airloop.supplyComponents(ops.IddObjectType("OS:Coil:Heating:Water")) hc = model.getCoilHeatingWater(x[0].handle()).get()

The problem with this is, the type returned by getCoilHeatingWater does not appear to in any way closer to the upstream parent boiler.

I tried calling the parent of the heating coil: x = airloop.supplyComponents(ops.IddObjectType("OS:Coil:Heating:Water")) b = x[0].parent() The problem here is, I get an OptionalParentObject, which is usually a dead end. I don't know of any way to do anything with this object.

I tried calling all the relationships, which looks promising, x = airloop.supplyComponents(ops.IddObjectType("OS:Coil:Heating:Water")) rels = x[0].relationships() for rel in rels: print rel This seems promising, but the relationships all seem pretty generic strings that I can't access.

Anyways, this is pretty new territory for me since I have just now gotten to the plant side of things in OpenStudio. I'm curious if anyone has some pseudo code or a basic gist that can help me out.