Revision history  [back]

OpenStudio clean up routine after changing system type for several zones

I wrote a measure to switch selected zones from central systems to single-zone system. The central system can have water coils, both cooling and heating, and therefore could be attached to a chiller and/or boiler loop. The chiller loop can be connected to a condenser water loop.

Basically, before doing anything, I'm storing the pre-existing airloops. Then, after switching the selected zones to another system type, those zones are no longer on the pre-existing airloops.

What I'd like to do is to clean up any unused Loops after that. My idea is:

  • loop on Pre-existing AirLoops, delete all those don't have any zones anymore but before deletion check if connected to boiler and/or chiller loops and store those associated chiller and boiler loops.
  • Loop on associated chiller loops and if demand components are linked to no air loop, delete chiller loop, but before deletion check if chiller is connected to a condenser water loop and store it
  • Loop on associated condenser water loops and if not linked to any other demand component, delete it
  • Do something similar to associated hot water loops.

I'm in the middle of writing this cleanup routine, and it's proving pretty time consuming.

Considering this seems like a legitimate and, I think, quite often useful routine, I think there are good chances somebody better at Ruby/OS Measures has already written it, but I haven't found it yet.

Does anybody know if that's already been done, so I don't have to reinvent the wheel?

OpenStudio clean up routine after changing system type for several zones

I wrote a measure to switch selected zones from central systems to single-zone system. The central system can have water coils, both cooling and heating, and therefore could be attached to a chiller and/or boiler loop. The chiller loop can be connected to a condenser water loop.

Basically, before doing anything, I'm storing the pre-existing airloops. Then, after switching the selected zones zone to another system type, system, those zones are no longer on the pre-existing airloops.

and their previous system. What I'd like to do is to clean up any unused Loops after that. My idea is:

  • is: - loop on Pre-existing AirLoops, delete all those don't have any zones anymore but before deletion that check if connected to boiler and/or chiller loops and store those associated chiller and boiler loops.
  • those - Loop on associated chiller loops and if demand components are linked to no air loop, delete chiller loop, but before deletion check if chiller is connected to a condenser water loop and store it
  • it - Loop on associated condenser water loops and if not linked to any other demand component, delete it
  • it - Do something similar to associated hot water loops.

I'm in the middle of writing this cleanup routine, and it's proving pretty time consuming.

Considering this seems like a legitimate and, I think, quite often useful routine, I think there are good chances somebody better at Ruby/OS Measures has already written it, but I haven't found it yet.

Does anybody know if that's already been done, so I don't have to reinvent the wheel?