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

Revision history [back]

There are currently three measures on the BCL that might help. I would suggest running each on your model using the Apply Measure Now feature and then inspecting the changes.

Additionally, here is a snippet that will remove the HVAC systems from a model in case you need to start fresh, which can be added to the run method of an OpenStudio measure.

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

# remove plant loops, keep SHW loops
wtr_loops.each do |wl|

    if wl.name.to_s.include?("SHW")
        next
    else
        wl.remove
    end

end

# remove all air loops
air_loops.each do |al|

    al.remove

end

# remove zone equipment, keep exhaust fans
zones.each do |z|

    z.equipment.each do |ze|

        if ze.to_FanZoneExhaust.is_initialized #or (equip.to_ZoneHVACUnitHeater.is_initialized and zone.get.equipment.size == 1)
            next
        else
            ze.remove
        end

    end

end

There are currently three measures on the BCL that might help. I would suggest running each on your model using the Apply Measure Now feature and then inspecting the changes.

Additionally, here is a snippet that will remove the HVAC systems from a model in case you need to start fresh, which can be added to the run method method of an OpenStudio measure.

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

# remove plant loops, keep SHW loops
wtr_loops.each do |wl|

    if wl.name.to_s.include?("SHW")
        next
    else
        wl.remove
    end

end

# remove all air loops
air_loops.each do |al|

    al.remove

end

# remove zone equipment, keep exhaust fans
zones.each do |z|

    z.equipment.each do |ze|

        if ze.to_FanZoneExhaust.is_initialized #or (equip.to_ZoneHVACUnitHeater.is_initialized and zone.get.equipment.size == 1)
            next
        else
            ze.remove
        end

    end

end