4

OpenStudio: Editing and Removing HVAC

Is there a script, a measure, or a trick to quickly removing HVAC equipment from a model? I tried removing it through text editing the OSM but it caused an error in OS.

I'm working on a mulitfamily building with 161 dwelling units and about 100 dwelling unit thermal zones. For my baseline I've added the PTHP directly to Zone Equipment rather than using an air loop. To delete all of them I went through and clicked each and hit the X button to delete it, but that was very time consuming as there was about a 2 second pause between each click while the PC worked on it. Any tips on a quicker way to do this in the future?

Is there a way to copy the PTHP (or other equipment) in the library? I'd like to create some of my own equipment templates.

cnutt's avatar
131
cnutt
asked 2017-03-10 17:11:11 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-08-05 07:41:59 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

4

I'm not aware of a measure on the BCL that does this. There is a method called removeEquipment in the OSlib_HVAC.rb module that's included in the /resources folder of some BCL measures, e.g. the AEDG measures.

If you're using the API outside of formal measures the code below will remove all HVAC systems. If you'd like a formal measure to do this, I've created a one and committed it to the UnmetHours OpenStudio Measures GitHub repository.

# get model objects
air_loops = model.getAirLoopHVACs
plant_loops = model.getPlantLoops
zones = model.getThermalZones

# do stuff
plant_loops.each do |plant_loop|
  plant_loop.remove
end

air_loops.each do |air_loop|
  air_loop.remove
end

zones.each do |zone|

  zone.equipment.each do |zone_equipment|
    zone_equipment.remove
  end

end
MatthewSteen's avatar
10.1k
MatthewSteen
answered 2017-03-13 08:29:01 -0500
edit flag offensive 0 remove flag delete link

Comments

As a follow-up to this question, has anyone come up with a way of removing HVAC that is not attached to a thermal zone (and any dependents such as plant loops that also then don't have dependents)?

I see a lot of remove all/replace HVAC measures on the BCL; is that the preferred/easier way?

Liam's avatar Liam (2017-08-13 08:41:25 -0500) edit
add a comment see more comments