lib/to_openstudio/hvac/template.rb in honeybee-openstudio-2.7.5 vs lib/to_openstudio/hvac/template.rb in honeybee-openstudio-2.8.3

- old
+ new

@@ -31,17 +31,19 @@ require 'honeybee/hvac/template' require 'to_openstudio/model_object' -require 'openstudio-standards' -require_relative 'Model.hvac' - module Honeybee class TemplateHVAC def to_openstudio(openstudio_model, room_ids) + + # only load openstudio-standards when needed + require 'openstudio-standards' + require_relative 'Model.hvac' + # get the defaults for the specific system type hvac_defaults = defaults(@hash[:type]) # make the standard applier if @hash[:vintage] @@ -80,18 +82,10 @@ os_air_loop.setName(@hash[:display_name] + ' - ' + loop_name.get) end end end - # TODO: consider adding the ability to decentralize the plant by changing loop names - #os_hvac.each do |hvac_loop| - # loop_name = hvac_loop.name - # unless loop_name.empty? - # hvac_loop.setName(@hash[:identifier] + ' - ' + loop_name.get) - # end - #end - # assign the economizer type if there's an air loop and the economizer is specified if @hash[:economizer_type] && @hash[:economizer_type] != 'Inferred' && os_air_loop oasys = os_air_loop.airLoopHVACOutdoorAirSystem unless oasys.empty? os_oasys = oasys.get @@ -124,11 +118,19 @@ erv.setLatentEffectivenessat100HeatingAirFlow(eff_at_max) erv.setLatentEffectivenessat75CoolingAirFlow(@hash[:latent_heat_recovery]) erv.setLatentEffectivenessat75HeatingAirFlow(@hash[:latent_heat_recovery]) end + # set all plants to non-coincident sizing to avoid simualtion control on design days + openstudio_model.getPlantLoops.each do |loop| + sizing = loop.sizingPlant + sizing.setSizingOption('NonCoincident') + end + os_hvac end + + private def get_existing_erv(os_air_loop) # get an existing heat ecovery unit from an air loop; will be nil if there is none os_air_loop.oaComponents.each do |supply_component| if not supply_component.to_HeatExchangerAirToAirSensibleAndLatent.empty?