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

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, after switching the selected zone to another system, those zones are no longer and their previous system. What I'd like to do is to clean up unused Loops after that. My idea is: - loop on AirLoops, delete all those don't have any zones anymore but before that check if connected to boiler and/or chiller loops and store 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 - 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 zone zones to another system, system type, those zones are no longer and their previous system. on the pre-existing airloops.

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 that deletion check if connected to boiler and/or chiller loops and store those - 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 - 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?