From 2dd908da13d7e7670cc9035511c6ccbd668f6e97 Mon Sep 17 00:00:00 2001 From: Andrew Parker Date: Thu, 12 Jan 2023 10:16:29 -0700 Subject: [PATCH 1/7] Removes autosizing and hardsizing methods that have been in OS C++ API since OS 2.4.1 --- ...z.AirConditionerVariableRefrigerantFlow.rb | 81 ----- .../hvac_sizing/Siz.AirLoopHVAC.rb | 91 +---- ...iz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb | 27 -- .../Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb | 69 ---- ...opHVACUnitaryHeatPumpAirToAirMultiSpeed.rb | 178 ---------- .../Siz.AirLoopHVACUnitarySystem.rb | 27 -- .../Siz.AirTermSnglDuctConstVolCooledBeam.rb | 27 -- ...irTermSnglDuctConstVolFourPipeInduction.rb | 27 -- .../Siz.AirTermSnglDuctConstVolReheat.rb | 27 -- .../Siz.AirTermSnglDuctParallelPIUReheat.rb | 67 ---- .../Siz.AirTermSnglDuctSeriesPIUReheat.rb | 27 -- .../Siz.AirTermSnglDuctUncontrolled.rb | 30 -- ...z.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb | 27 -- ...Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb | 27 -- .../Siz.AirTermSnglDuctVAVNoReheat.rb | 68 ---- .../Siz.AirTermSnglDuctVAVReheat.rb | 68 ---- .../hvac_sizing/Siz.BoilerHotWater.rb | 42 --- .../hvac_sizing/Siz.BoilerSteam.rb | 27 -- .../hvac_sizing/Siz.ChillerElectricEIR.rb | 58 ---- .../Siz.CoilCoolingDXMultiSpeed.rb | 171 ---------- .../Siz.CoilCoolingDXSingleSpeed.rb | 56 ---- .../hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb | 89 ----- ...iz.CoilCoolingDXVariableRefrigerantFlow.rb | 50 --- .../hvac_sizing/Siz.CoilCoolingWater.rb | 102 +----- ...oilCoolingWaterToAirHeatPumpEquationFit.rb | 69 ---- .../Siz.CoilHeatingDXMultiSpeed.rb | 120 ------- .../Siz.CoilHeatingDXSingleSpeed.rb | 56 ---- ...iz.CoilHeatingDXVariableRefrigerantFlow.rb | 41 --- .../Siz.CoilHeatingDesuperheater.rb | 27 -- .../hvac_sizing/Siz.CoilHeatingElectric.rb | 30 -- .../hvac_sizing/Siz.CoilHeatingGas.rb | 30 -- .../Siz.CoilHeatingGasMultiStage.rb | 68 ---- .../hvac_sizing/Siz.CoilHeatingWater.rb | 61 ---- ...oilHeatingWaterToAirHeatPumpEquationFit.rb | 57 ---- .../Siz.CoilWaterHeatingDesuperheater.rb | 27 -- .../hvac_sizing/Siz.ControllerOutdoorAir.rb | 59 ---- .../hvac_sizing/Siz.ControllerWaterCoil.rb | 49 --- .../Siz.CoolingTowerSingleSpeed.rb | 90 ----- .../hvac_sizing/Siz.CoolingTowerTwoSpeed.rb | 83 ----- .../Siz.CoolingTowerVariableSpeed.rb | 57 ---- .../hvac_sizing/Siz.DistrictCooling.rb | 27 -- .../hvac_sizing/Siz.DistrictHeating.rb | 27 -- ....EvaporativeCoolerDirectResearchSpecial.rb | 27 -- ...vaporativeCoolerIndirectResearchSpecial.rb | 27 -- .../Siz.EvaporativeFluidCoolerSingleSpeed.rb | 27 -- .../hvac_sizing/Siz.FanConstantVolume.rb | 29 -- .../hvac_sizing/Siz.FanOnOff.rb | 27 -- .../hvac_sizing/Siz.FanVariableVolume.rb | 29 -- .../Siz.HeaderedPumpsConstantSpeed.rb | 55 --- .../Siz.HeaderedPumpsVariableSpeed.rb | 55 --- ....HeatExchangerAirToAirSensibleAndLatent.rb | 38 --- .../Siz.HeatExchangerFluidToFluid.rb | 27 -- .../Siz.HumidifierSteamElectric.rb | 27 -- .../hvac_sizing/Siz.Model.rb | 313 +----------------- .../hvac_sizing/Siz.PlantLoop.rb | 42 --- .../hvac_sizing/Siz.PumpConstantSpeed.rb | 59 ---- .../hvac_sizing/Siz.PumpVariableSpeed.rb | 59 ---- .../hvac_sizing/Siz.SizingSystem.rb | 48 --- .../hvac_sizing/Siz.ThermalZone.rb | 168 ++++------ .../hvac_sizing/Siz.WaterHeaterMixed.rb | 16 - ...Siz.ZoneHVACBaseboardConvectiveElectric.rb | 27 -- .../Siz.ZoneHVACBaseboardConvectiveWater.rb | 27 -- .../Siz.ZoneHVACFourPipeFanCoil.rb | 27 -- .../Siz.ZoneHVACHighTemperatureRadiant.rb | 27 -- .../Siz.ZoneHVACIdealLoadsAirSystem.rb | 27 -- .../Siz.ZoneHVACLowTempRadiantConstFlow.rb | 27 -- .../Siz.ZoneHVACLowTempRadiantVarFlow.rb | 27 -- ...z.ZoneHVACLowTemperatureRadiantElectric.rb | 27 -- ....ZoneHVACPackagedTerminalAirConditioner.rb | 88 ----- .../Siz.ZoneHVACPackagedTerminalHeatPump.rb | 88 ----- ...HVACTerminalUnitVariableRefrigerantFlow.rb | 104 ------ .../hvac_sizing/Siz.ZoneHVACUnitHeater.rb | 27 -- .../Siz.ZoneHVACWaterToAirHeatPump.rb | 27 -- 73 files changed, 88 insertions(+), 3976 deletions(-) delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb delete mode 100644 lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb deleted file mode 100644 index 4cf82e3825..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirConditionerVariableRefrigerantFlow.rb +++ /dev/null @@ -1,81 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirConditionerVariableRefrigerantFlow - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeRatedTotalCoolingCapacity - self.autosizeRatedTotalHeatingCapacity - self.autosizeResistiveDefrostHeaterCapacity - self.autosizeWaterCondenserVolumeFlowRate - self.autosizeEvaporativeCondenserAirFlowRate - self.autosizeEvaporativeCondenserPumpRatedPowerConsumption - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - # Rated Total Cooling Capacity (gross) - rated_cool_cap = self.autosizedRatedTotalCoolingCapacity - if rated_cool_cap.is_initialized - self.setRatedTotalCoolingCapacity(rated_cool_cap.get) - end - - # Rated Total Heating Capacity - rated_heat_cap = self.autosizedRatedTotalHeatingCapacity - if rated_heat_cap.is_initialized - self.setRatedTotalHeatingCapacity(rated_heat_cap.get) - end - - # Resistive Defrost Heater Capacity - defrost_heat_cap = self.autosizedResistiveDefrostHeaterCapacity - if defrost_heat_cap.is_initialized - self.setResistiveDefrostHeaterCapacity(defrost_heat_cap.get) - end - - # Evaporative Condenser Air Flow Rate - evap_cnd_airflow_rate = self.autosizedEvaporativeCondenserAirFlowRate - if evap_cnd_airflow_rate.is_initialized - self.setEvaporativeCondenserAirFlowRate(evap_cnd_airflow_rate.get) - end - - # Evaporative Condenser Pump Rated Power Consumption - evap_cnd_pump_power = self.autosizedEvaporativeCondenserPumpRatedPowerConsumption - if evap_cnd_pump_power.is_initialized - self.setEvaporativeCondenserPumpRatedPowerConsumption(evap_cnd_pump_power.get) - end - - # @todo autosizeWaterCondenserVolumeFlowRate - #self.setWaterCondenserVolumeFlowRate - - end - - - # Rated Total Cooling Capacity (gross) - def autosizedRatedTotalCoolingCapacity - return self.model.getAutosizedValue(self, 'Design Size Rated Total Cooling Capacity (gross)', 'W') - end - - # Rated Total Heating Capacity - def autosizedRatedTotalHeatingCapacity - return self.model.getAutosizedValue(self, 'Design Size Rated Total Heating Capacity', 'W') - end - - # Resistive Defrost Heater Capacity (unit is empty as of right now in 8.4...) - def autosizedResistiveDefrostHeaterCapacity - return self.model.getAutosizedValue(self, 'Design Size Resistive Defrost Heater Capacity', '') - end - - # Evaporative Condenser Air Flow Rate - def autosizedEvaporativeCondenserAirFlowRate - return self.model.getAutosizedValue(self, 'Design Size Evaporative Condenser Air Flow Rate', 'm3/s') - end - - # Evaporative Condenser Pump Rated Power Consumption - def autosizedEvaporativeCondenserPumpRatedPowerConsumption - return self.model.getAutosizedValue(self, 'Design Size Evaporative Condenser Pump Rated Power Consumption', 'W') - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb index eb4e456e05..f2151f0a9c 100644 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb +++ b/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVAC.rb @@ -2,41 +2,17 @@ # Reopen the OpenStudio class to add methods to apply standards to this object class OpenStudio::Model::AirLoopHVAC - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeDesignSupplyAirFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - design_supply_air_flow_rate = self.autosizedDesignSupplyAirFlowRate - if design_supply_air_flow_rate.is_initialized - self.setDesignSupplyAirFlowRate(design_supply_air_flow_rate.get) - end - - end - - # returns the autosized design supply air flow rate as an optional double - def autosizedDesignSupplyAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - end - # Retrieves an airloop sum of air terminal minimum heating flow rates: sum(Vpz_min) def autosizeSumMinimumHeatingAirFlowRates result = OpenStudio::OptionalDouble.new name = self.name.get.upcase sql = self.model.sqlFile if sql.is_initialized - sql = sql.get - query = "SELECT Value + sql = sql.get + query = "SELECT Value FROM tabulardatawithstrings - WHERE ReportName='ComponentSizingSummary' - AND ReportForString='Entire Facility' + WHERE ReportName='ComponentSizingSummary' + AND ReportForString='Entire Facility' AND TableName='AirLoopHVAC' AND ColumnName='Sum of Air Terminal Minimum Heating Flow Rates' AND RowName='#{name}' @@ -53,68 +29,17 @@ def autosizeSumMinimumHeatingAirFlowRates end - # Retrieve an airloop's design outdoor air intake (Vot) - # Ideally, this would only be used to retrieve Vot when - # calculated by EnergyPlus' built-in design VRP calculations - def autosize621OutdoorAirIntakeFlow - flow_types = ['Heating', 'Cooling'] - flow_rates = [] - flow_types.each do |flow_type| - result = OpenStudio::OptionalDouble.new - name = self.name.get.upcase - sql = self.model.sqlFile - if sql.is_initialized - sql = sql.get - query = "SELECT Value - FROM tabulardatawithstrings - WHERE ReportName='Standard62.1Summary' - AND ReportForString='Entire Facility' - AND TableName='System Ventilation Requirements for #{flow_type}' - AND ColumnName='Outdoor Air Intake Flow Vot' - AND RowName='#{name}' - AND Units='m3/s'" - val = sql.execAndReturnFirstDouble(query) - if val.is_initialized - result = OpenStudio::OptionalDouble.new(val.get) - end - # Inconsistency in column name in EnergyPlus 9.0: - # "Outdoor Air Intake Flow - Vot" vs "Outdoor Air Intake Flow Vot" - # The following could be deleted if the inconsistency was ever fixed - if result.to_f == 0.0 - query = "SELECT Value - FROM tabulardatawithstrings - WHERE ReportName='Standard62.1Summary' - AND ReportForString='Entire Facility' - AND TableName='System Ventilation Requirements for #{flow_type}' - AND ColumnName='Outdoor Air Intake Flow - Vot' - AND RowName='#{name}' - AND Units='m3/s'" - val = sql.execAndReturnFirstDouble(query) - if val.is_initialized - result = OpenStudio::OptionalDouble.new(val.get) - end - end - else - OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', 'Model has no sql file containing results, cannot lookup data.') - end - flow_rates << result.to_f - end - - return flow_rates.max - - end - # Retrieve an airloop's sum of air terminal maximum flow rates: sum(Vpz) def autosizeSumAirTerminalMaxAirFlowRate result = OpenStudio::OptionalDouble.new name = self.name.get.upcase sql = self.model.sqlFile if sql.is_initialized - sql = sql.get - query = "SELECT Value + sql = sql.get + query = "SELECT Value FROM tabulardatawithstrings - WHERE ReportName='ComponentSizingSummary' - AND ReportForString='Entire Facility' + WHERE ReportName='ComponentSizingSummary' + AND ReportForString='Entire Facility' AND TableName='AirLoopHVAC' AND ColumnName='Sum of Air Terminal Maximum Flow Rates' AND RowName='#{name}' diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb deleted file mode 100644 index 30da5e37ae..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatCoolVAVChngByp.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirLoopHVACUnitaryHeatCoolVAVChangeoverBypass", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb deleted file mode 100644 index 755a7ca7a0..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAir.rb +++ /dev/null @@ -1,69 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirLoopHVACUnitaryHeatPumpAirToAir - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeSupplyAirFlowRateDuringCoolingOperation - self.autosizeSupplyAirFlowRateDuringHeatingOperation - self.autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - self.autosizeMaximumSupplyAirTemperaturefromSupplementalHeater - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - sup_air_flow_cooling = self.autosizedSupplyAirFlowRateDuringCoolingOperation - if sup_air_flow_cooling.is_initialized - self.setSupplyAirFlowRateDuringCoolingOperation(sup_air_flow_cooling.get) - end - - sup_air_flow_heating = self.autosizedsSupplyAirFlowRateDuringHeatingOperation - if sup_air_flow_heating.is_initialized - self.setSupplyAirFlowRateDuringHeatingOperation(sup_air_flow_heating.get) - end - - sup_air_flow_no_htg_clg = self.autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - if sup_air_flow_no_htg_clg.is_initialized - self.setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(sup_air_flow_no_htg_clg.get) - end - - max_sup_htg_temp = self.autosizedMaximumSupplyAirTemperaturefromSupplementalHeater - if max_sup_htg_temp.is_initialized - self.setMaximumSupplyAirTemperaturefromSupplementalHeater(max_sup_htg_temp.get) - end - - end - - # returns the autosized supply air flow rate during cooling operation as an optional double - def autosizedSupplyAirFlowRateDuringCoolingOperation - - return self.model.getAutosizedValue(self, 'Supply Air Flow Rate During Heating Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate during heating operation as an optional double - def autosizedsSupplyAirFlowRateDuringHeatingOperation - - return self.model.getAutosizedValue(self, 'Supply Air Flow Rate During Cooling Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate when no heating or cooling is needed as an optional double - def autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - - return self.model.getAutosizedValue(self, 'Supply Air Flow Rate', 'm3/s') - - end - - # returns the autosized maximum supply air temperature from supplemental heater as an optional double - def autosizedMaximumSupplyAirTemperaturefromSupplementalHeater - - return self.model.getAutosizedValue(self, 'Maximum Supply Air Temperature from Supplemental Heater', 'C') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb deleted file mode 100644 index af582b475f..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb +++ /dev/null @@ -1,178 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirLoopHVACUnitaryHeatPumpAirToAir - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeSupplyAirFlowRateDuringCoolingOperation - self.autosizeSupplyAirFlowRateDuringHeatingOperation - self.autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - self.autosizeSpeed1SupplyAirFlowRateDuringCoolingOperation - self.autosizeSpeed1SupplyAirFlowRateDuringHeatingOperation - self.autosizeSpeed2SupplyAirFlowRateDuringCoolingOperation - self.autosizeSpeed2SupplyAirFlowRateDuringHeatingOperation - self.autosizeSpeed3SupplyAirFlowRateDuringCoolingOperation - self.autosizeSpeed3SupplyAirFlowRateDuringHeatingOperation - self.autosizeSpeed4SupplyAirFlowRateDuringCoolingOperation - self.autosizeSpeed4SupplyAirFlowRateDuringHeatingOperation - self.autosizeMaximumSupplyAirTemperaturefromSupplementalHeater - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - sup_air_flow_cooling = self.autosizedSupplyAirFlowRateDuringCoolingOperation - if sup_air_flow_cooling.is_initialized - self.setSupplyAirFlowRateDuringCoolingOperation(sup_air_flow_cooling.get) - end - - sup_air_flow_heating = self.autosizedsSupplyAirFlowRateDuringHeatingOperation - if sup_air_flow_heating.is_initialized - self.setSupplyAirFlowRateDuringHeatingOperation(sup_air_flow_heating.get) - end - - sup_air_flow_no_htg_clg = self.autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - if sup_air_flow_no_htg_clg.is_initialized - self.setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(sup_air_flow_no_htg_clg.get) - end - - speed1_sup_air_flow_cooling = self.autosizedSpeed1SupplyAirFlowRateDuringCoolingOperation - if speed1_sup_air_flow_cooling.is_initialized - self.setSpeed1SupplyAirFlowRateDuringCoolingOperation(speed1_sup_air_flow_cooling.get) - end - - speed1_sup_air_flow_heating = self.autosizedsSpeed1SupplyAirFlowRateDuringHeatingOperation - if speed1_sup_air_flow_heating.is_initialized - self.setSpeed1SupplyAirFlowRateDuringHeatingOperation(speed1_sup_air_flow_heating.get) - end - - speed2_sup_air_flow_cooling = self.autosizedSpeed2SupplyAirFlowRateDuringCoolingOperation - if speed2_sup_air_flow_cooling.is_initialized - self.setSpeed2SupplyAirFlowRateDuringCoolingOperation(speed2_sup_air_flow_cooling.get) - end - - speed2_sup_air_flow_heating = self.autosizedsSpeed2SupplyAirFlowRateDuringHeatingOperation - if speed2_sup_air_flow_heating.is_initialized - self.setSpeed2SupplyAirFlowRateDuringHeatingOperation(speed2_sup_air_flow_heating.get) - end - - speed3_sup_air_flow_cooling = self.autosizedSpeed3SupplyAirFlowRateDuringCoolingOperation - if speed1_sup_air_flow_cooling.is_initialized - self.setSpeed3SupplyAirFlowRateDuringCoolingOperation(speed3_sup_air_flow_cooling.get) - end - - speed3_sup_air_flow_heating = self.autosizedsSpeed3SupplyAirFlowRateDuringHeatingOperation - if speed3_sup_air_flow_heating.is_initialized - self.setSpeed3SupplyAirFlowRateDuringHeatingOperation(speed3_sup_air_flow_heating.get) - end - - speed3_sup_air_flow_no_htg_clg = self.autosizedSpeed3SupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - if speed3_sup_air_flow_no_htg_clg.is_initialized - self.setSpeed3SupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(speed3_sup_air_flow_no_htg_clg.get) - end - - speed4_sup_air_flow_cooling = self.autosizedSpeed4SupplyAirFlowRateDuringCoolingOperation - if speed4_sup_air_flow_cooling.is_initialized - self.setSpeed4SupplyAirFlowRateDuringCoolingOperation(speed4_sup_air_flow_cooling.get) - end - - speed4_sup_air_flow_heating = self.autosizedsSpeed4SupplyAirFlowRateDuringHeatingOperation - if speed4_sup_air_flow_heating.is_initialized - self.setSpeed4SupplyAirFlowRateDuringHeatingOperation(speed4_sup_air_flow_heating.get) - end - - max_sup_htg_temp = self.autosizedMaximumSupplyAirTemperaturefromSupplementalHeater - if max_sup_htg_temp.is_initialized - self.setMaximumSupplyAirTemperaturefromSupplementalHeater(max_sup_htg_temp.get) - end - - end - - # returns the autosized supply air flow rate during cooling operation as an optional double - def autosizedSupplyAirFlowRateDuringCoolingOperation - - return self.model.getAutosizedValue(self, 'Supply Air Flow Rate During Heating Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate during heating operation as an optional double - def autosizedSupplyAirFlowRateDuringHeatingOperation - - return self.model.getAutosizedValue(self, 'Supply Air Flow Rate During Cooling Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate when no heating or cooling is needed as an optional double - def autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - - return self.model.getAutosizedValue(self, 'Supply Air Flow Rate', 'm3/s') - - end - - # returns the autosized supply air flow rate during cooling operation as an optional double - def autosizedSpeed1SupplyAirFlowRateDuringCoolingOperation - - return self.model.getAutosizedValue(self, 'Speed 1 Supply Air Flow Rate During Heating Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate during heating operation as an optional double - def autosizedSpeed1SupplyAirFlowRateDuringHeatingOperation - - return self.model.getAutosizedValue(self, 'Speed 1 Supply Air Flow Rate During Cooling Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate during cooling operation as an optional double - def autosizedSpeed2SupplyAirFlowRateDuringCoolingOperation - - return self.model.getAutosizedValue(self, 'Speed 2 Supply Air Flow Rate During Heating Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate during heating operation as an optional double - def autosizedSpeed2SupplyAirFlowRateDuringHeatingOperation - - return self.model.getAutosizedValue(self, 'Speed 2 Supply Air Flow Rate During Cooling Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate during cooling operation as an optional double - def autosizedSpeed3SupplyAirFlowRateDuringCoolingOperation - - return self.model.getAutosizedValue(self, 'Speed 3 Supply Air Flow Rate During Heating Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate during heating operation as an optional double - def autosizedSpeed3SupplyAirFlowRateDuringHeatingOperation - - return self.model.getAutosizedValue(self, 'Speed 3 Supply Air Flow Rate During Cooling Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate during cooling operation as an optional double - def autosizedSpeed4SupplyAirFlowRateDuringCoolingOperation - - return self.model.getAutosizedValue(self, 'Speed 4 Supply Air Flow Rate During Heating Operation', 'm3/s') - - end - - # returns the autosized supply air flow rate during heating operation as an optional double - def autosizedSpeed4SupplyAirFlowRateDuringHeatingOperation - - return self.model.getAutosizedValue(self, 'Speed 4 Supply Air Flow Rate During Cooling Operation', 'm3/s') - - end - - # returns the autosized maximum supply air temperature from supplemental heater as an optional double - def autosizedMaximumSupplyAirTemperaturefromSupplementalHeater - - return self.model.getAutosizedValue(self, 'Maximum Supply Air Temperature from Supplemental Heater', 'C') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb deleted file mode 100644 index 430e4ed29b..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitarySystem.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirLoopHVACUnitarySystem - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirLoopHVACUnitarySystem", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirLoopHVACUnitarySystem", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb deleted file mode 100644 index 8138dfda6e..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolCooledBeam.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctSeriesPIUReheat - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctSeriesPIUReheat", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctSeriesPIUReheat", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb deleted file mode 100644 index 2dbac101f3..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolFourPipeInduction.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctConstantVolumeFourPipeInduction - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctConstantVolumeFourPipeInduction", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctConstantVolumeFourPipeInduction", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb deleted file mode 100644 index ec3ba728a6..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctConstVolReheat.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctConstantVolumeReheat - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctConstantVolumeReheat", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctConstantVolumeReheat", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb deleted file mode 100644 index f1edc5aadf..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctParallelPIUReheat.rb +++ /dev/null @@ -1,67 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctParallelPIUReheat - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctParallelPIUReheat", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - maximum_primary_air_flow_rate = self.autosizedMaximumPrimaryAirFlowRate - if maximum_primary_air_flow_rate.is_initialized - self.setMaximumPrimaryAirFlowRate(maximum_primary_air_flow_rate.get) - end - - maximum_secondary_air_flow_rate = self.autosizedMaximumSecondaryAirFlowRate - if maximum_secondary_air_flow_rate.is_initialized - self.setMaximumSecondaryAirFlowRate(maximum_secondary_air_flow_rate.get) - end - - minimum_primary_air_flow_fraction = self.autosizedMinimumPrimaryAirFlowFraction - if minimum_primary_air_flow_fraction.is_initialized - self.setMinimumPrimaryAirFlowFraction(minimum_primary_air_flow_fraction.get) - end - - fan_on_flow_fraction = self.autosizedFanOnFlowFraction - if fan_on_flow_fraction.is_initialized - self.setFanOnFlowFraction(fan_on_flow_fraction.get) - end - - - end - - # returns the autosized maximum primary air flow rate as an optional double - def autosizedMaximumPrimaryAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Primary Air Flow Rate', 'm3/s') - - end - - # returns the autosized maximum secondary air flow rate as an optional double - def autosizedMaximumSecondaryAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Secondary Air Flow Rate', 'm3/s') - - end - - # returns the autosized minimum primary air flow fraction as an optional double - def autosizedMinimumPrimaryAirFlowFraction - - return self.model.getAutosizedValue(self, 'Design Size Minimum Primary Air Flow Fraction', '') - - end - - # returns the autosized fan on flow fraction as an optional double - def autosizedFanOnFlowFraction - - return self.model.getAutosizedValue(self, 'Design Size Fan On Flow Fraction', '') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb deleted file mode 100644 index ec3ba728a6..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctSeriesPIUReheat.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctConstantVolumeReheat - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctConstantVolumeReheat", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctConstantVolumeReheat", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb deleted file mode 100644 index 13fe2e9d45..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctUncontrolled.rb +++ /dev/null @@ -1,30 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctUncontrolled - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeMaximumAirFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - maximum_air_flow_rate = self.autosizedMaximumAirFlowRate - if maximum_air_flow_rate.is_initialized - self.setMaximumAirFlowRate(maximum_air_flow_rate.get) - end - - end - - # returns the autosized maximum air flow rate as optional double - def autosizedMaximumAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Air Flow Rate', 'm3/s') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb deleted file mode 100644 index 9dbe8be28e..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolNoReheat.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctVAVHeatAndCoolNoReheat - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctVAVHeatAndCoolNoReheat", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctVAVHeatAndCoolNoReheat", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb deleted file mode 100644 index 5e68137f91..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVHeatAndCoolReheat.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctVAVHeatAndCoolReheat - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctVAVHeatAndCoolReheat", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctVAVHeatAndCoolReheat", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb deleted file mode 100644 index cb9d145ced..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVNoReheat.rb +++ /dev/null @@ -1,68 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctVAVReheat - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctVAVReheat", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_flow_rate = self.autosizedMaximumAirFlowRate - if rated_flow_rate.is_initialized - self.setMaximumAirFlowRate(rated_flow_rate.get) - end - - maximum_hot_water_or_steam_flow_rate = self.autosizedMaximumHotWaterOrSteamFlowRate - if maximum_hot_water_or_steam_flow_rate.is_initialized - self.setMaximumHotWaterOrSteamFlowRate(maximum_hot_water_or_steam_flow_rate.get) - end - - maximum_flow_per_zone_floor_area_during_reheat = self.autosizedMaximumFlowPerZoneFloorAreaDuringReheat - if maximum_flow_per_zone_floor_area_during_reheat.is_initialized - self.setMaximumFlowPerZoneFloorAreaDuringReheat(maximum_flow_per_zone_floor_area_during_reheat.get) - end - - maximum_flow_fraction_during_reheat = self.autosizedMaximumFlowFractionDuringReheat - if maximum_flow_fraction_during_reheat.is_initialized - self.setMaximumFlowFractionDuringReheat(maximum_flow_fraction_during_reheat.get) - end - - end - - # returns the autosized maximum air flow rate as an optional double - def autosizedMaximumAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated power consumption as an optional double - def autosizedMaximumHotWaterOrSteamFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Reheat Water Flow Rate', 'm3/s') - - end - - # returns the autosized maximum flow per zone floor area during reheat as an optional double - def autosizedMaximumFlowPerZoneFloorAreaDuringReheat - - return self.model.getAutosizedValue(self, 'Design Size Maximum Flow per Zone Floor Area during Reheat', 'm3/s-m2') - - end - - # returns the autosized maximum flow fraction during reheat as an optional double - def autosizedMaximumFlowFractionDuringReheat - - return self.model.getAutosizedValue(self, 'Design Size Maximum Flow Fraction during Reheat', '') - - end - - - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb b/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb deleted file mode 100644 index cb9d145ced..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.AirTermSnglDuctVAVReheat.rb +++ /dev/null @@ -1,68 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::AirTerminalSingleDuctVAVReheat - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.AirTerminalSingleDuctVAVReheat", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_flow_rate = self.autosizedMaximumAirFlowRate - if rated_flow_rate.is_initialized - self.setMaximumAirFlowRate(rated_flow_rate.get) - end - - maximum_hot_water_or_steam_flow_rate = self.autosizedMaximumHotWaterOrSteamFlowRate - if maximum_hot_water_or_steam_flow_rate.is_initialized - self.setMaximumHotWaterOrSteamFlowRate(maximum_hot_water_or_steam_flow_rate.get) - end - - maximum_flow_per_zone_floor_area_during_reheat = self.autosizedMaximumFlowPerZoneFloorAreaDuringReheat - if maximum_flow_per_zone_floor_area_during_reheat.is_initialized - self.setMaximumFlowPerZoneFloorAreaDuringReheat(maximum_flow_per_zone_floor_area_during_reheat.get) - end - - maximum_flow_fraction_during_reheat = self.autosizedMaximumFlowFractionDuringReheat - if maximum_flow_fraction_during_reheat.is_initialized - self.setMaximumFlowFractionDuringReheat(maximum_flow_fraction_during_reheat.get) - end - - end - - # returns the autosized maximum air flow rate as an optional double - def autosizedMaximumAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated power consumption as an optional double - def autosizedMaximumHotWaterOrSteamFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Reheat Water Flow Rate', 'm3/s') - - end - - # returns the autosized maximum flow per zone floor area during reheat as an optional double - def autosizedMaximumFlowPerZoneFloorAreaDuringReheat - - return self.model.getAutosizedValue(self, 'Design Size Maximum Flow per Zone Floor Area during Reheat', 'm3/s-m2') - - end - - # returns the autosized maximum flow fraction during reheat as an optional double - def autosizedMaximumFlowFractionDuringReheat - - return self.model.getAutosizedValue(self, 'Design Size Maximum Flow Fraction during Reheat', '') - - end - - - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb b/lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb deleted file mode 100644 index 3ce712ce37..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.BoilerHotWater.rb +++ /dev/null @@ -1,42 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::BoilerHotWater - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.BoilerHotWater", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - nominal_capacity = self.autosizedNominalCapacity - if nominal_capacity.is_initialized - self.setNominalCapacity(nominal_capacity.get) - end - - design_water_flow_rate = self.autosizedDesignWaterFlowRate - if design_water_flow_rate.is_initialized - self.setDesignWaterFlowRate(design_water_flow_rate.get) - end - - end - - # returns the autosized nominal capacity as an optional double - def autosizedNominalCapacity - - return self.model.getAutosizedValue(self, 'Design Size Nominal Capacity', 'W') - - end - - # returns the autosized design water flow rate as an optional double - def autosizedDesignWaterFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Design Water Flow Rate', 'm3/s') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb b/lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb deleted file mode 100644 index af65a34050..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.BoilerSteam.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::BoilerSteam - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.BoilerSteam", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.BoilerSteam", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb b/lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb deleted file mode 100644 index 70d0618283..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ChillerElectricEIR.rb +++ /dev/null @@ -1,58 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ChillerElectricEIR - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ChillerElectricEIR", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - reference_chilled_water_flow_rate = self.autosizedReferenceChilledWaterFlowRate - if reference_chilled_water_flow_rate.is_initialized - self.setReferenceChilledWaterFlowRate(reference_chilled_water_flow_rate.get) - end - - reference_capacity = self.autosizedReferenceCapacity - if reference_capacity.is_initialized - self.setReferenceCapacity(reference_capacity.get) - end - - # Only try to find the condenser water flow rate if this chiller - # is a water cooled chiller connected to a condenser loop. - if self.secondaryPlantLoop.is_initialized - reference_condenser_fluid_flow_rate = self.autosizedReferenceCondenserFluidFlowRate - if reference_condenser_fluid_flow_rate.is_initialized - self.setReferenceCondenserFluidFlowRate(reference_condenser_fluid_flow_rate.get) - end - end - - end - - # returns the autosized chilled water flow rate as an optional double - def autosizedReferenceChilledWaterFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Reference Chilled Water Flow Rate', 'm3/s') - - end - - # returns the autosized reference capacity as an optional double - def autosizedReferenceCapacity - - return self.model.getAutosizedValue(self, 'Design Size Reference Capacity', 'W') - - end - - # returns the autosized reference condenser fluid flow rate as an optional double - def autosizedReferenceCondenserFluidFlowRate - - return self.model.getAutosizedValue(self, 'User-Specified Reference Condenser Water Flow Rate', 'm3/s') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb deleted file mode 100644 index 57fde385b0..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +++ /dev/null @@ -1,171 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilCoolingDXMultiSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - autosizeSpeed1GrossRatedTotalCoolingCapacity - autosizeSpeed2GrossRatedTotalCoolingCapacity - autosizeSpeed3GrossRatedTotalCoolingCapacity - autosizeSpeed4GrossRatedTotalCoolingCapacity - autosizeSpeed1GrossRatedSensibleHeatRatio - autosizeSpeed2GrossRatedSensibleHeatRatio - autosizeSpeed3GrossRatedSensibleHeatRatio - autosizeSpeed4GrossRatedSensibleHeatRatio - autosizeSpeed1RatedAirFlowRate - autosizeSpeed2RatedAirFlowRate - autosizeSpeed3RatedAirFlowRate - autosizeSpeed4RatedAirFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_speed1_rated_total_cooling_capacity = self.autosizedSpeed1GrossRatedTotalCoolingCapacity - if rated_speed1_rated_total_cooling_capacity.is_initialized - self.setSpeed1GrossRatedTotalCoolingCapacity(rated_speed1_rated_total_cooling_capacity.get) - end - - rated_speed2_rated_total_cooling_capacity = self.autosizedSpeed2GrossRatedTotalCoolingCapacity - if rated_speed2_rated_total_cooling_capacity.is_initialized - self.setSpeed2GrossRatedTotalCoolingCapacity(rated_speed2_rated_total_cooling_capacity.get) - end - - rated_speed3_rated_total_cooling_capacity = self.autosizedSpeed3GrossRatedTotalCoolingCapacity - if rated_speed3_rated_total_cooling_capacity.is_initialized - self.setSpeed3GrossRatedTotalCoolingCapacity(rated_speed3_rated_total_cooling_capacity.get) - end - - rated_speed4_rated_total_cooling_capacity = self.autosizedSpeed4GrossRatedTotalCoolingCapacity - if rated_speed4_rated_total_cooling_capacity.is_initialized - self.setSpeed4GrossRatedTotalCoolingCapacity(rated_speed4_rated_total_cooling_capacity.get) - end - - rated_speed1_rated_sensible_heat_ratio = self.autosizedSpeed1RatedSensibleHeatRatio - if rated_speed1_rated_sensible_heat_ratio.is_initialized - self.setSpeed1RatedSensibleHeatRatio(rated_speed1_rated_sensible_heat_ratio.get) - end - - rated_speed2_rated_sensible_heat_ratio = self.autosizedSpeed2RatedSensibleHeatRatio - if rated_speed2_rated_sensible_heat_ratio.is_initialized - self.setSpeed2RatedSensibleHeatRatio(rated_speed2_rated_sensible_heat_ratio.get) - end - - rated_speed3_rated_sensible_heat_ratio = self.autosizedSpeed3RatedSensibleHeatRatio - if rated_speed3_rated_sensible_heat_ratio.is_initialized - self.setSpeed3RatedSensibleHeatRatio(rated_speed3_rated_sensible_heat_ratio.get) - end - - rated_speed4_rated_sensible_heat_ratio = self.autosizedSpeed4RatedSensibleHeatRatio - if rated_speed4_rated_sensible_heat_ratio.is_initialized - self.setSpeed4RatedSensibleHeatRatio(rated_speed4_rated_sensible_heat_ratio.get) - end - - rated_speed1_rated_air_flow_rate = self.autosizedSpeed1RatedAirFlowRate - if rated_speed1_rated_air_flow_rate.is_initialized - self.setSpeed1RatedAirFlowRate(rated_speed1_rated_air_flow_rate.get) - end - - rated_speed2_rated_air_flow_rate = self.autosizedSpeed2RatedAirFlowRate - if rated_speed2_rated_air_flow_rate.is_initialized - self.setSpeed2RatedAirFlowRate(rated_speed2_rated_air_flow_rate.get) - end - - rated_speed3_rated_air_flow_rate = self.autosizedSpeed3RatedAirFlowRate - if rated_speed3_rated_air_flow_rate.is_initialized - self.setSpeed3RatedAirFlowRate(rated_speed3_rated_air_flow_rate.get) - end - - rated_speed4_rated_air_flow_rate = self.autosizedSpeed4RatedAirFlowRate - if rated_speed4_rated_air_flow_rate.is_initialized - self.setSpeed4RatedAirFlowRate(rated_speed4_rated_air_flow_rate.get) - end - - end - - # returns the autosized rated total cooling capacity for stage 1 as an optional double - def autosizedSpeed1GrossRatedTotalCoolingCapacity - - return self.model.getAutosizedValue(self,'Design Size Speed 1 Gross Rated Total Cooling Capacity', 'W') - - end - - # returns the autosized rated total cooling capacity for stage 2 as an optional double - def autosizedSpeed2GrossRatedTotalCoolingCapacity - - return self.model.getAutosizedValue(self,'Design Size Speed 2 Gross Rated Total Cooling Capacity', 'W') - - end - - # returns the autosized rated total cooling capacity for stage 3 as an optional double - def autosizedSpeed3GrossRatedTotalCoolingCapacity - - return self.model.getAutosizedValue(self,'Design Size Speed 3 Gross Rated Total Cooling Capacity', 'W') - - end - - # returns the autosized rated total cooling capacity for stage 4 as an optional double - def autosizedSpeed4GrossRatedTotalCoolingCapacity - - return self.model.getAutosizedValue(self,'Design Size Speed 4 Gross Rated Total Cooling Capacity', 'W') - - end - - # returns the autosized rated sensible heat ratio for stage 1 as an optional double - def autosizedSpeed1RatedSensibleHeatRatio - - return self.model.getAutosizedValue(self,'Design Size Speed 1 Rated Sensible Heat Ratio', '') - - end - - # returns the autosized rated sensible heat ratio for stage 2 as an optional double - def autosizedSpeed2RatedSensibleHeatRatio - - return self.model.getAutosizedValue(self,'Design Size Speed 2 Rated Sensible Heat Ratio', '') - - end - - # returns the autosized rated sensible heat ratio for stage 3 as an optional double - def autosizedSpeed3RatedSensibleHeatRatio - - return self.model.getAutosizedValue(self,'Design Size Speed 3 Rated Sensible Heat Ratio', '') - - end - - # returns the autosized rated sensible heat ratio for stage 4 as an optional double - def autosizedSpeed4RatedSensibleHeatRatio - - return self.model.getAutosizedValue(self,'Design Size Speed 4 Rated Sensible Heat Ratio', '') - - end - - # returns the autosized rated air flow rate for stage 1 as an optional double - def autosizedSpeed1RatedAirFlowRate - - return self.model.getAutosizedValue(self,'Design Size Speed 1 Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated air flow rate for stage 2 as an optional double - def autosizedSpeed2RatedAirFlowRate - - return self.model.getAutosizedValue(self,'Design Size Speed 2 Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated air flow rate for stage 3 as an optional double - def autosizedSpeed3RatedAirFlowRate - - return self.model.getAutosizedValue(self,'Design Size Speed 3 Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated air flow rate for stage 4 as an optional double - def autosizedSpeed4RatedAirFlowRate - - return self.model.getAutosizedValue(self,'Design Size Speed 4 Rated Air Flow Rate', 'm3/s') - - end -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb deleted file mode 100644 index 4388b437e2..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXSingleSpeed.rb +++ /dev/null @@ -1,56 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilCoolingDXSingleSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeRatedTotalCoolingCapacity - self.autosizeRatedSensibleHeatRatio - self.autosizeRatedAirFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_air_flow_rate = self.autosizedRatedAirFlowRate - if rated_air_flow_rate.is_initialized - self.setRatedAirFlowRate(rated_air_flow_rate.get) - end - - rated_total_cooling_capacity = self.autosizedRatedTotalCoolingCapacity - if rated_total_cooling_capacity.is_initialized - self.setRatedTotalCoolingCapacity(rated_total_cooling_capacity.get) - end - - rated_sensible_heat_ratio = self.autosizedRatedSensibleHeatRatio - if rated_sensible_heat_ratio.is_initialized - self.setRatedSensibleHeatRatio(rated_sensible_heat_ratio.get) - end - - end - - # returns the autosized rated air flow rate as an optional double - def autosizedRatedAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated total cooling capacity as an optional double - def autosizedRatedTotalCoolingCapacity - - return self.model.getAutosizedValue(self, 'Design Size Gross Rated Total Cooling Capacity', 'W') - - end - - # returns the autosized rated sensible heat ratio as an optional double - def autosizedRatedSensibleHeatRatio - - return self.model.getAutosizedValue(self, 'Design Size Gross Rated Sensible Heat Ratio', '') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb deleted file mode 100644 index c1dd116c02..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXTwoSpeed.rb +++ /dev/null @@ -1,89 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilCoolingDXTwoSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoilCoolingDXTwoSpeed", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_high_speed_air_flow_rate = self.autosizedRatedHighSpeedAirFlowRate - if rated_high_speed_air_flow_rate.is_initialized - self.setRatedHighSpeedAirFlowRate(rated_high_speed_air_flow_rate) - end - - rated_high_speed_total_cooling_capacity = self.autosizedRatedHighSpeedTotalCoolingCapacity - if rated_high_speed_total_cooling_capacity.is_initialized - self.setRatedHighSpeedTotalCoolingCapacity(rated_high_speed_total_cooling_capacity) - end - - rated_high_speed_sensible_heat_ratio = self.autosizedRatedHighSpeedSensibleHeatRatio - if rated_high_speed_sensible_heat_ratio.is_initialized - self.setRatedHighSpeedSensibleHeatRatio(rated_high_speed_sensible_heat_ratio) - end - - rated_low_speed_air_flow_rate = self.autosizedRatedLowSpeedAirFlowRate - if rated_low_speed_air_flow_rate.is_initialized - self.setRatedLowSpeedAirFlowRate(rated_low_speed_air_flow_rate) - end - - rated_low_speed_total_cooling_capacity = self.autosizedRatedLowSpeedTotalCoolingCapacity - if rated_low_speed_total_cooling_capacity.is_initialized - self.setRatedLowSpeedTotalCoolingCapacity(rated_low_speed_total_cooling_capacity) - end - - rated_low_speed_sensible_heat_ratio = self.autosizedRatedLowSpeedSensibleHeatRatio - if rated_low_speed_sensible_heat_ratio.is_initialized - self.setRatedLowSpeedSensibleHeatRatio(rated_low_speed_sensible_heat_ratio) - end - - end - - # returns the autosized rated high speed air flow rate as an optional double - def autosizedRatedHighSpeedAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size High Speed Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated high speed total cooling capacity as an optional double - def autosizedRatedHighSpeedTotalCoolingCapacity - - return self.model.getAutosizedValue(self, 'Design Size High Speed Gross Rated Total Cooling Capacity', 'W') - - end - - # returns the autosized rated high speed sensible heat ratio as an optional double - def autosizedRatedHighSpeedSensibleHeatRatio - - return self.model.getAutosizedValue(self, 'Design Size High Speed Rated Sensible Heat Ratio', '') - - end - - # returns the autosized rated low speed air flow rate as an optional double - def autosizedRatedLowSpeedAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Low Speed Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated low speed total cooling capacity as an optional double - def autosizedRatedLowSpeedTotalCoolingCapacity - - return self.model.getAutosizedValue(self, 'Design Size Low Speed Gross Rated Total Cooling Capacity', 'W') - - end - - # returns the autosized rated low speed sensible heat ratio as an optional double - def autosizedRatedLowSpeedSensibleHeatRatio - - return self.model.getAutosizedValue(self, 'Design Size Low Speed Gross Rated Sensible Heat Ratio', '') - - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb deleted file mode 100644 index fb1207e09c..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXVariableRefrigerantFlow.rb +++ /dev/null @@ -1,50 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilCoolingDXVariableRefrigerantFlow - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizedRatedTotalCoolingCapacity - self.autosizeRatedAirFlowRate - self.autosizeRatedSensibleHeatRatio - end - - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_air_flow_rate = self.autosizedRatedAirFlowRate - if rated_air_flow_rate.is_initialized - self.setRatedAirFlowRate(rated_air_flow_rate.get) - end - - rated_total_cooling_capacity = self.autosizedRatedTotalCoolingCapacity - if rated_total_cooling_capacity.is_initialized - self.setRatedTotalCoolingCapacity(rated_total_cooling_capacity.get) - end - - rated_sensible_heat_ratio = self.autosizedRatedSensibleHeatRatio - if rated_sensible_heat_ratio.is_initialized - self.setRatedSensibleHeatRatio(rated_sensible_heat_ratio.get) - end - - end - - # Design Size Rated Air Flow Rate as an optional double - def autosizedRatedTotalCoolingCapacity - return self.model.getAutosizedValue(self, 'Design Size Rated Air Flow Rate', 'm3/s') - end - - # Design Size Gross Rated Total Cooling Capacity as an optional double - def autosizedRatedAirFlowRate - return self.model.getAutosizedValue(self, 'Design Size Gross Rated Total Cooling Capacity', 'W') - end - - # Design Size Gross Rated Sensible Heat Ratio as an optional double - def autosizedRatedSensibleHeatRatio - return self.model.getAutosizedValue(self, 'Design Size Gross Rated Sensible Heat Ratio', '') - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb index c0d48264a4..e83cfa7691 100644 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb +++ b/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWater.rb @@ -2,108 +2,12 @@ # open the class to add methods to return sizing values class OpenStudio::Model::CoilCoolingWater - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoilCoolingWater", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - design_water_flow_rate = self.autosizedDesignWaterFlowRate - if design_water_flow_rate.is_initialized - self.setDesignWaterFlowRate(design_water_flow_rate.get) - end - - design_air_flow_rate = self.autosizedDesignAirFlowRate - if design_air_flow_rate.is_initialized - self.setDesignAirFlowRate(design_air_flow_rate.get) - end - - design_inlet_water_temperature = self.autosizedDesignInletWaterTemperature - if design_inlet_water_temperature.is_initialized - self.setDesignInletWaterTemperature(design_inlet_water_temperature.get) - end - - design_inlet_air_temperature = self.autosizedDesignInletAirTemperature - if design_inlet_air_temperature.is_initialized - self.setDesignInletAirTemperature(design_inlet_air_temperature.get) - end - - design_outlet_air_temperature = self.autosizedDesignOutletAirTemperature - if design_outlet_air_temperature.is_initialized - self.setDesignOutletAirTemperature(design_outlet_air_temperature.get) - end - - design_inlet_air_humidity_ratio = self.autosizedDesignInletAirHumidityRatio - if design_inlet_air_humidity_ratio.is_initialized - self.setDesignInletAirHumidityRatio(design_inlet_air_humidity_ratio.get) - end - - design_outlet_air_humidity_ratio = self.autosizedDesignOutletAirHumidityRatio - if design_outlet_air_humidity_ratio.is_initialized - self.setDesignOutletAirHumidityRatio(design_outlet_air_humidity_ratio.get) - end - - end - - # returns the autosized design water flow rate as an optional double - def autosizedDesignWaterFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Design Water Flow Rate', 'm3/s') - - end - - # returns the autosized design air flow rate as an optional double - def autosizedDesignAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Design Air Flow Rate', 'm3/s') - - end - - # returns the autosized design inlet water temperature as an optional double - def autosizedDesignInletWaterTemperature - - return self.model.getAutosizedValue(self, 'Design Size Design Inlet Water Temperature', 'C') - - end - - # returns the autosized design inlet air temperatureas an optional double - def autosizedDesignInletAirTemperature - - return self.model.getAutosizedValue(self, 'Design Size Design Inlet Air Temperature', 'C') - - end - - # returns the autosized design outlet air temperature as an optional double - def autosizedDesignOutletAirTemperature - - return self.model.getAutosizedValue(self, 'Design Size Design Outlet Air Temperature', 'C') - - end - - # returns the autosized inlet air humidity ratio as an optional double - def autosizedDesignInletAirHumidityRatio - - return self.model.getAutosizedValue(self, 'Design Size Design Inlet Air Humidity Ratio', '') - - end + # returns the autosized design coil load + def autosizedDesignCoilLoad - # returns the autosized outlet air humidity ratio as an optional double - def autosizedDesignOutletAirHumidityRatio + return self.getAutosizedValue('Design Size Design Coil Load', 'W') - return self.model.getAutosizedValue(self, 'Design Size Design Outlet Air Humidity Ratio', '') - end - # returns the autosized design coil load - def autosizedDesignCoilLoad - - return self.model.getAutosizedValue(self, 'Design Size Design Coil Load', 'W') - - end - end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb deleted file mode 100644 index 1de9b8c5f3..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingWaterToAirHeatPumpEquationFit.rb +++ /dev/null @@ -1,69 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilCoolingWaterToAirHeatPumpEquationFit - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeRatedAirFlowRate - self.autosizeRatedTotalCoolingCapacity - self.autosizeRatedSensibleCoolingCapacity - self.autosizeRatedWaterFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_air_flow_rate = self.autosizedRatedAirFlowRate - if rated_air_flow_rate.is_initialized - self.setRatedAirFlowRate(rated_air_flow_rate.get) - end - - rated_total_cooling_capacity = self.autosizedRatedTotalCoolingCapacity - if rated_total_cooling_capacity.is_initialized - self.setRatedTotalCoolingCapacity(rated_total_cooling_capacity.get) - end - - rated_sensible_cooling_capacity = self.autosizedRatedSensibleCoolingCapacity - if rated_sensible_cooling_capacity.is_initialized - self.setRatedSensibleCoolingCapacity(rated_sensible_cooling_capacity.get) - end - - rated_water_flow_rate = self.autosizedRatedWaterFlowRate - if rated_water_flow_rate.is_initialized - self.setRatedWaterFlowRate(rated_water_flow_rate.get) - end - - end - - # returns the autosized rated air flow rate as an optional double - def autosizedRatedAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated total cooling capacity as an optional double - def autosizedRatedTotalCoolingCapacity - - return self.model.getAutosizedValue(self, 'Design Size Rated Total Cooling Capacity', 'W') - - end - - # returns the autosized rated sensible cooling capacity as an optional double - def autosizedRatedSensibleCoolingCapacity - - return self.model.getAutosizedValue(self, 'Design Size Rated Sensible Cooling Capacity', 'W') - - end - - # returns the autosized rated water flow rate as an optional double - def autosizedRatedWaterFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Rated Water Flow Rate', 'm3/s') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb deleted file mode 100644 index 01a7bfb9af..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXMultiSpeed.rb +++ /dev/null @@ -1,120 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilHeatingDXMultiSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - autosizeSpeed1GrossRatedHeatingCapacity - autosizeSpeed2GrossRatedHeatingCapacity - autosizeSpeed3GrossRatedHeatingCapacity - autosizeSpeed4GrossRatedHeatingCapacity - autosizeSpeed1RatedAirFlowRate - autosizeSpeed2RatedAirFlowRate - autosizeSpeed3RatedAirFlowRate - autosizeSpeed4RatedAirFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - speed1_rated_heating_capacity = self.autosizedSpeed1GrossRatedHeatingCapacity - if speed1_rated_heating_capacity.is_initialized - self.setSpeed1GrossRatedHeatingCapacity(speed1_rated_heating_capacity.get) - end - - speed2_rated_total_cooling_capacity = self.autosizedSpeed2GrossRatedHeatingCapacity - if speed2_rated_total_cooling_capacity.is_initialized - self.setSpeed2GrossRatedTotalCoolingCapacity(speed2_rated_total_cooling_capacity.get) - end - - speed3_rated_total_heating_capacity = self.autosizedSpeed3GrossRatedHeatingCapacity - if speed3_rated_total_heating_capacity.is_initialized - self.setSpeed3GrossRatedTotalCoolingCapacity(speed3_rated_total_heating_capacity.get) - end - - speed4_rated_total_heating_capacity = self.autosizedSpeed4GrossRatedHeatingCapacity - if speed4_rated_total_heating_capacity.is_initialized - self.setSpeed4GrossRatedTotalCoolingCapacity(speed4_rated_total_heating_capacity.get) - end - - speed1_rated_air_flow_rate = self.autosizedSpeed1RatedAirFlowRate - if speed1_rated_air_flow_rate.is_initialized - self.setSpeed1RatedAirFlowRate(speed1_rated_air_flow_rate.get) - end - - speed2_rated_air_flow_rate = self.autosizedSpeed2RatedAirFlowRate - if speed2_rated_air_flow_rate.is_initialized - self.setSpeed2RatedAirFlowRate(speed2_rated_air_flow_rate.get) - end - - speed3_rated_air_flow_rate = self.autosizedSpeed3RatedAirFlowRate - if speed3_rated_air_flow_rate.is_initialized - self.setSpeed3RatedAirFlowRate(speed3_rated_air_flow_rate.get) - end - - speed4_rated_air_flow_rate = self.autosizedSpeed4RatedAirFlowRate - if speed4_rated_air_flow_rate.is_initialized - self.setSpeed4RatedAirFlowRate(speed4_rated_air_flow_rate.get) - end - - end - - # returns the autosized rated total cooling capacity for stage 1 as an optional double - def autosizedSpeed1GrossRatedHeatingCapacity - - return self.model.getAutosizedValue(self,'Speed 1 Design Size Rated Total Heating Capacity', 'W') - - end - - # returns the autosized rated total cooling capacity for stage 2 as an optional double - def autosizedSpeed2GrossRatedHeatingCapacity - - return self.model.getAutosizedValue(self,'Speed 2 Design Size Rated Total Heating Capacity', 'W') - - end - - # returns the autosized rated total cooling capacity for stage 3 as an optional double - def autosizedSpeed3GrossRatedHeatingCapacity - - return self.model.getAutosizedValue(self,'Speed 3 Design Size Rated Total Heating Capacity', 'W') - - end - - # returns the autosized rated total cooling capacity for stage 4 as an optional double - def autosizedSpeed4GrossRatedHeatingCapacity - - return self.model.getAutosizedValue(self,'Speed 4 Design Size Rated Total Heating Capacity', 'W') - - end - - # returns the autosized rated air flow rate for stage 1 as an optional double - def autosizedSpeed1RatedAirFlowRate - - return self.model.getAutosizedValue(self,'Speed 1 Design Size Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated air flow rate for stage 2 as an optional double - def autosizedSpeed2RatedAirFlowRate - - return self.model.getAutosizedValue(self,'Speed 2 Design Size Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated air flow rate for stage 3 as an optional double - def autosizedSpeed3RatedAirFlowRate - - return self.model.getAutosizedValue(self,'Speed 3 Design Size Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated air flow rate for stage 4 as an optional double - def autosizedSpeed4RatedAirFlowRate - - return self.model.getAutosizedValue(self,'Speed 4 Design Size Rated Air Flow Rate', 'm3/s') - - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb deleted file mode 100644 index 3d8810ed2d..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXSingleSpeed.rb +++ /dev/null @@ -1,56 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilHeatingDXSingleSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeRatedTotalHeatingCapacity - self.autosizeRatedAirFlowRate - self.autosizeResistiveDefrostHeaterCapacity - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_air_flow_rate = self.autosizedRatedAirFlowRate - if rated_air_flow_rate.is_initialized - self.setRatedAirFlowRate(rated_air_flow_rate.get) - end - - rated_total_heating_capacity = self.autosizedRatedTotalHeatingCapacity - if rated_total_heating_capacity.is_initialized - self.setRatedTotalHeatingCapacity(rated_total_heating_capacity.get) - end - - rated_resistive_defrost_heater_capacity = self.autosizedResistiveDefrostHeaterCapacity - if rated_resistive_defrost_heater_capacity.is_initialized - self.setResistiveDefrostHeaterCapacity(rated_resistive_defrost_heater_capacity.get) - end - - end - - # returns the autosized rated air flow rate as an optional double - def autosizedRatedAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated total cooling capacity as an optional double - def autosizedRatedTotalHeatingCapacity - - return self.model.getAutosizedValue(self, 'Design Size Gross Rated Heating Capacity', 'W') - - end - - # returns the autosized rated sensible heat ratio as an optional double - def autosizedResistiveDefrostHeaterCapacity - - return self.model.getAutosizedValue(self, 'Design Size Resistive Defrost Heater Capacity', 'W') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb deleted file mode 100644 index 8809cd3c72..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDXVariableRefrigerantFlow.rb +++ /dev/null @@ -1,41 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilHeatingDXVariableRefrigerantFlow - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeRatedTotalHeatingCapacity - self.autosizeRatedAirFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_air_flow_rate = self.autosizedRatedAirFlowRate - if rated_air_flow_rate.is_initialized - self.setRatedAirFlowRate(rated_air_flow_rate.get) - end - - rated_total_heating_capacity = self.autosizedRatedTotalHeatingCapacity - if rated_total_heating_capacity.is_initialized - self.setRatedTotalHeatingCapacity(rated_total_heating_capacity.get) - end - - - end - - # Design Size Rated Air Flow Rate as an optional double - def autosizedRatedAirFlowRate - return self.model.getAutosizedValue(self, 'Design Size Rated Air Flow Rate', 'm3/s') - end - - # Design Size Gross Rated Total Heating Capacity as an optional double - def autosizedRatedTotalHeatingCapacity - return self.model.getAutosizedValue(self, 'Design Size Gross Rated Heating Capacity', 'W') - end - - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb deleted file mode 100644 index 89368069d7..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingDesuperheater.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilHeatingDesuperheater - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoilHeatingDesuperheater", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoilHeatingDesuperheater", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb deleted file mode 100644 index 617c188c3d..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingElectric.rb +++ /dev/null @@ -1,30 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilHeatingElectric - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoilHeatingElectric", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - nominal_capacity = self.autosizedNominalCapacity - if nominal_capacity.is_initialized - self.setNominalCapacity(nominal_capacity.get) - end - - end - - # returns the autosized rated capacity as an optional double - def autosizedNominalCapacity - - return self.model.getAutosizedValue(self, 'Design Size Nominal Capacity', 'W') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb deleted file mode 100644 index 66aab1f861..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGas.rb +++ /dev/null @@ -1,30 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilHeatingGas - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeNominalCapacity - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - nominal_capacity = self.autosizedNominalCapacity - if nominal_capacity.is_initialized - self.setNominalCapacity(nominal_capacity.get) - end - - end - - # returns the autosized rated capacity as an optional double - def autosizedNominalCapacity - - return self.model.getAutosizedValue(self, 'Design Size Nominal Capacity', 'W') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb deleted file mode 100644 index 649433532c..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingGasMultiStage.rb +++ /dev/null @@ -1,68 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilHeatingGasMultiStage - - # Sets all auto-sizeable fields to autosize - def autosize - autosizeStage1NominalCapacity - autosizeStage2NominalCapacity - autosizeStage3NominalCapacity - autosizeStage4NominalCapacity - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - design_size_stage1_nominal_capacity = self.autosizedStage1NominalCapacity - if design_size_stage1_nominal_capacity.is_initialized - self.setStage1NominalCapacity(design_size_stage1_nominal_capacity.get) - end - - design_size_stage2_nominal_capacity = self.autosizedStage2NominalCapacity - if design_size_stage2_nominal_capacity.is_initialized - self.setStage2NominalCapacity(design_size_stage2_nominal_capacity.get) - end - - design_size_stage3_nominal_capacity = self.autosizedStage3NominalCapacity - if design_size_stage3_nominal_capacity.is_initialized - self.setStage3NominalCapacity(design_size_stage3_nominal_capacity.get) - end - - design_size_stage4_nominal_capacity = self.autosizedStage4NominalCapacity - if design_size_stage4_nominal_capacity.is_initialized - self.setStage4NominalCapacity(design_size_stage4_nominal_capacity.get) - end - - end - - # returns the autosized design stage 1 capacity - def autosizedStage1NominalCapacity - - return self.model.getAutosizedValue(self,'Design Size Stage 1 Nominal Capacity', 'W') - - end - - # returns the autosized design stage 2 capacity - def autosizedStage2NominalCapacity - - return self.model.getAutosizedValue(self,'Design Size Stage 2 Nominal Capacity', 'W') - - end - - # returns the autosized design stage 3 capacity - def autosizedStage3NominalCapacity - - return self.model.getAutosizedValue(self,'Design Size Stage 3 Nominal Capacity', 'W') - - end - - # returns the autosized design stage 4 capacity - def autosizedStage4NominalCapacity - - return self.model.getAutosizedValue(self,'Design Size Stage 4 Nominal Capacity', 'W') - - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb deleted file mode 100644 index a78c62c312..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWater.rb +++ /dev/null @@ -1,61 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilHeatingWater - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoilHeatingWater", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - maximum_water_flow_rate = self.autosizedMaximumWaterFlowRate - if maximum_water_flow_rate.is_initialized - self.setMaximumWaterFlowRate(maximum_water_flow_rate.get) - end - - u_factor_times_area_value = self.autosizedUFactorTimesAreaValue - if u_factor_times_area_value.is_initialized - self.setUFactorTimesAreaValue(u_factor_times_area_value.get) - end - - rated_capacity = self.autosizedRatedCapacity - if rated_capacity.is_initialized - self.setRatedCapacity(rated_capacity.get) - end - - end - - # returns the autosized maximum water flow rate as an optional double - def autosizedMaximumWaterFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Water Flow Rate', 'm3/s') - - end - - # returns the autosized u-factor times area value as an optional double - def autosizedUFactorTimesAreaValue - - return self.model.getAutosizedValue(self, 'Design Size U-Factor Times Area Value', 'W/K') - - end - - # returns the autosized rated capacity as an optional double - def autosizedRatedCapacity - - # In E+ 8.8, (OS 2.2.2 onward) the field name changed - if self.model.version < OpenStudio::VersionString.new('2.2.2') - field = 'Design Size Design Coil Load' - else - field = 'Design Size Rated Capacity' - end - - return self.model.getAutosizedValue(self, field, 'W') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb deleted file mode 100644 index 2dfefc2ab7..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilHeatingWaterToAirHeatPumpEquationFit.rb +++ /dev/null @@ -1,57 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilHeatingWaterToAirHeatPumpEquationFit - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeRatedAirFlowRate - self.autosizeRatedHeatingCapacity - self.autosizeRatedWaterFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_air_flow_rate = self.autosizedRatedAirFlowRate - if rated_air_flow_rate.is_initialized - self.setRatedAirFlowRate(rated_air_flow_rate.get) - end - - rated_total_heating_capacity = self.autosizedRatedHeatingCapacity - if rated_total_heating_capacity.is_initialized - self.setRatedHeatingCapacity(rated_total_heating_capacity.get) - end - - rated_water_flow_rate = self.autosizedRatedWaterFlowRate - if rated_water_flow_rate.is_initialized - self.setRatedWaterFlowRate(rated_water_flow_rate.get) - end - - end - - # returns the autosized rated air flow rate as an optional double - def autosizedRatedAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Rated Air Flow Rate', 'm3/s') - - end - - # returns the autosized rated total Heating capacity as an optional double - def autosizedRatedHeatingCapacity - - return self.model.getAutosizedValue(self, 'Design Size Rated Heating Capacity', 'W') - - end - - # returns the autosized rated water flow rate as an optional double - def autosizedRatedWaterFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Rated Water Flow Rate', 'm3/s') - - end - - -end - diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb deleted file mode 100644 index 5761d57188..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoilWaterHeatingDesuperheater.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoilWaterHeatingDesuperheater - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoilWaterHeatingDesuperheater", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoilWaterHeatingDesuperheater", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb b/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb deleted file mode 100644 index 6b6a7f7520..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ControllerOutdoorAir.rb +++ /dev/null @@ -1,59 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ControllerOutdoorAir - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeMaximumOutdoorAirFlowRate - self.autosizeMinimumOutdoorAirFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - maximum_outdoor_air_flow_rate = self.autosizedMaximumOutdoorAirFlowRate - if maximum_outdoor_air_flow_rate.is_initialized - self.setMaximumOutdoorAirFlowRate(maximum_outdoor_air_flow_rate.get) - end - - minimum_outdoor_air_flow_rate = self.autosizedMinimumOutdoorAirFlowRate - if minimum_outdoor_air_flow_rate.is_initialized - self.setMinimumOutdoorAirFlowRate(minimum_outdoor_air_flow_rate.get) - end - - end - - # returns the autosized maximum outdoor air flow rate as an optional double - def autosizedMaximumOutdoorAirFlowRate - - return self.model.getAutosizedValue(self, 'Maximum Outdoor Air Flow Rate', 'm3/s') - - end - - # returns the autosized minimum outdoor air flow rate as an optional double - # EnergyPlus has a "bug" where if the system is a multizone system, - # the Minimum Outdoor Air Flow Rate reported in the Component Sizing - # summary does not include zone multipliers. - # @todo determine what to do when the airloop has multiple zones - # with different multipliers - def autosizedMinimumOutdoorAirFlowRate - - oa = self.model.getAutosizedValue(self, 'Minimum Outdoor Air Flow Rate', 'm3/s') - - # Get the airloop connected to this controller - if airLoopHVACOutdoorAirSystem.empty? - OpenStudio.logFree(OpenStudio::Warn, 'openstudio.Siz.ControllerOutdoorAir', "#{name} is not connected to an airLoopHVACOutdoorAirSystem, cannot determine autosizedMinimumOutdoorAirFlowRate accurately.") - return oa - end - oa_sys = airLoopHVACOutdoorAirSystem.get - if oa_sys.airLoop.empty? - OpenStudio.logFree(OpenStudio::Warn, 'openstudio.Siz.ControllerOutdoorAir', "#{name}'s airLoopHVACOutdoorAirSystem is not assigned to an AirLoop, cannot determine autosizedMinimumOutdoorAirFlowRate accurately.") - return oa - end - air_loop = oa_sys.airLoop.get - - return oa - end -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb b/lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb deleted file mode 100644 index ac207a8a69..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ControllerWaterCoil.rb +++ /dev/null @@ -1,49 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ControllerWaterCoil - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ControllerWaterCoil", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - # Only attempt to retrieve sizes for water coil controllers - # that have their sensor nodes set. Water coils without sensor - # nodes aren't controlling anything. - if self.sensorNode.is_initialized - - maximum_actuated_flow = self.autosizedMaximumActuatedFlow - if maximum_actuated_flow.is_initialized - self.setMaximumActuatedFlow(maximum_actuated_flow.get) - end - - controller_convergence_tolerance = self.autosizedControllerConvergenceTolerance - if controller_convergence_tolerance.is_initialized - self.setControllerConvergenceTolerance(controller_convergence_tolerance.get) - end - - end - - end - - # returns the autosized maximum actuated flow rate as an optional double - def autosizedMaximumActuatedFlow - - return self.model.getAutosizedValue(self, 'Maximum Actuated Flow', 'm3/s') - - end - - # returns the autosized controller convergence tolerance as an optional double - def autosizedControllerConvergenceTolerance - - return self.model.getAutosizedValue(self, 'Controller Convergence Tolerance', '') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb deleted file mode 100644 index 83e7428a1c..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerSingleSpeed.rb +++ /dev/null @@ -1,90 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoolingTowerSingleSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoolingTowerSingleSpeed", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - design_water_flow_rate = self.autosizedDesignWaterFlowRate - if design_water_flow_rate.is_initialized - self.setDesignWaterFlowRate(design_water_flow_rate.get) - end - - fan_power_at_design_air_flow_rate = self.autosizedFanPoweratDesignAirFlowRate - if fan_power_at_design_air_flow_rate.is_initialized - self.setFanPoweratDesignAirFlowRate(fan_power_at_design_air_flow_rate.get) - end - - design_air_flow_rate = self.autosizedDesignAirFlowRate - if design_air_flow_rate.is_initialized - self.setDesignAirFlowRate(design_air_flow_rate.get) - end - - u_factor_times_area_value_at_design_air_flow_rate = self.autosizedUFactorTimesAreaValueatDesignAirFlowRate - if u_factor_times_area_value_at_design_air_flow_rate.is_initialized - self.setUFactorTimesAreaValueatDesignAirFlowRate(u_factor_times_area_value_at_design_air_flow_rate.get) - end - - air_flow_rate_in_free_convection_regime = self.autosizedAirFlowRateinFreeConvectionRegime - if air_flow_rate_in_free_convection_regime.is_initialized - self.setAirFlowRateinFreeConvectionRegime(air_flow_rate_in_free_convection_regime.get) - end - - u_factor_times_area_value_at_free_convection_air_flow_rate = self.autosizedUFactorTimesAreaValueatFreeConvectionAirFlowRate - if u_factor_times_area_value_at_free_convection_air_flow_rate.is_initialized - self.setUFactorTimesAreaValueatFreeConvectionAirFlowRate(u_factor_times_area_value_at_free_convection_air_flow_rate.get) - end - - end - - # returns the autosized design water flow rate as an optional double - def autosizedDesignWaterFlowRate - - return self.model.getAutosizedValue(self, 'Design Water Flow Rate', 'm3/s') - - end - - # returns the autosized fan power at design air flow rate as an optional double - def autosizedFanPoweratDesignAirFlowRate - - return self.model.getAutosizedValue(self, 'Fan Power at Design Air Flow Rate', 'W') - - end - - # returns the autosized reference design air flow rate as an optional double - def autosizedDesignAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Air Flow Rate', 'm3/s') - - end - - # returns the autosized u-factor times area value at design air flow rate as an optional double - def autosizedUFactorTimesAreaValueatDesignAirFlowRate - - return self.model.getAutosizedValue(self, 'U-Factor Times Area Value at Design Air Flow Rate', 'W/C') - - end - - # returns the autosized air flow rate in free convection regime as an optional double - def autosizedAirFlowRateinFreeConvectionRegime - - return self.model.getAutosizedValue(self, 'Free Convection Regime Air Flow Rate', 'm3/s') - - end - - # returns the autosized u-factor times area value in free convection as an optional double - def autosizedUFactorTimesAreaValueatFreeConvectionAirFlowRate - - return self.model.getAutosizedValue(self, 'Free Convection U-Factor Times Area Value', 'W/K') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb deleted file mode 100644 index 5f2df57538..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerTwoSpeed.rb +++ /dev/null @@ -1,83 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoolingTowerTwoSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoolingTowerTwoSpeed", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.CoolingTowerTwoSpeed", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design water flow rate as an optional double - def autosizedDesignWaterFlowRate - - return self.model.getAutosizedValue(self, 'Design Water Flow Rate', 'm3/s') - - end - - # returns the autosized fan power at high speed as an optional double - def autosizedHighFanSpeedFanPower - - return self.model.getAutosizedValue(self, 'Fan Power at High Fan Speed', 'W') - - end - - # returns the autosized reference design air flow rate as an optional double - def autosizedHighFanSpeedAirFlowRate - - return self.model.getAutosizedValue(self, 'Air Flow Rate at High Fan Speed', 'm3/s') - - end - - # returns the autosized u-factor times area value at high speed as an optional double - def autosizedHighFanSpeedUFactorTimesAreaValue - - return self.model.getAutosizedValue(self, 'U-Factor Times Area Value at High Fan Speed', 'W/C') - - end - - # returns the autosized reference low speed air flow rate as an optional double - def autosizedLowFanSpeedAirFlowRate - - return self.model.getAutosizedValue(self, 'Low Fan Speed Air Flow Rate', 'm3/s') - - end - - # returns the autosized fan power at low speed as an optional double - def autosizedLowFanSpeedFanPower - - return self.model.getAutosizedValue(self, 'Fan Power at Low Fan Speed', 'W') - - end - - # returns the autosized u-factor times area value at design air flow rate as an optional double - def autosizedLowFanSpeedUFactorTimesAreaValue - - return self.model.getAutosizedValue(self, 'U-Factor Times Area Value at Low Fan Speed', 'W/K') - - end - - # returns the autosized air flow rate in free convection regime as an optional double - def autosizedFreeConvectionRegimeAirFlowRate - - return self.model.getAutosizedValue(self, 'Free Convection Regime Air Flow Rate', 'm3/s') - - end - - # returns the autosized u-factor times area value in free convection as an optional double - def autosizedFreeConvectionRegimeUFactorTimesAreaValue - - return self.model.getAutosizedValue(self, 'Free Convection U-Factor Times Area Value', 'W/K') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb deleted file mode 100644 index 9cc982ef75..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.CoolingTowerVariableSpeed.rb +++ /dev/null @@ -1,57 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::CoolingTowerVariableSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - - self.autosizeDesignWaterFlowRate - self.autosizeDesignAirFlowRate - self.autosizeDesignFanPower - - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_water_flow_rate = self.autosizedDesignWaterFlowRate - if rated_water_flow_rate.is_initialized - self.setDesignWaterFlowRate(rated_water_flow_rate.get) - end - - rated_air_flow_rate = self.autosizedDesignAirFlowRate - if rated_air_flow_rate.is_initialized - self.setDesignAirFlowRate(rated_air_flow_rate.get) - end - - rated_fan_power = self.autosizedDesignFanPower - if rated_fan_power.is_initialized - self.setDesignFanPower(rated_fan_power.get) - end - - end - - # returns the autosized design water flow rate as an optional double - def autosizedDesignWaterFlowRate - - return self.model.getAutosizedValue(self, 'Design Water Flow Rate', 'm3/s') - - end - - # returns the autosized air flow rate as an optional double - def autosizedDesignAirFlowRate - - return self.model.getAutosizedValue(self, 'Design Air Flow Rate', 'm3/s') - - end - - # returns the autosized design fan power as an optional double - def autosizedDesignFanPower - - return self.model.getAutosizedValue(self, 'Fan Power at Design Air Flow Rate', 'W') - - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb b/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb deleted file mode 100644 index 5215d43f62..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.DistrictCooling.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::DistrictCooling - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeNominalCapacity - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - nominal_capacity = self.autosizedMaximumFlowRate - if nominal_capacity.is_initialized - self.setMaximumFlowRate(nominal_capacity.get) - end - - end - - # returns the autosized maximum flow rate as an optional double - def autosizedNominalCapacity - return self.model.getAutosizedValue(self, 'Design Size Nominal Capacity', 'W') - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb b/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb deleted file mode 100644 index 37d885d2d0..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.DistrictHeating.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::DistrictHeating - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeNominalCapacity - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - nominal_capacity = self.autosizedMaximumFlowRate - if nominal_capacity.is_initialized - self.setMaximumFlowRate(nominal_capacity.get) - end - - end - - # returns the autosized maximum flow rate as an optional double - def autosizedNominalCapacity - return self.model.getAutosizedValue(self, 'Design Size Nominal Capacity', 'W') - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb b/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb deleted file mode 100644 index c1cd13a46b..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerDirectResearchSpecial.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::EvaporativeCoolerDirectResearchSpecial - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.EvaporativeCoolerDirectResearchSpecial", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.EvaporativeCoolerDirectResearchSpecial", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb b/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb deleted file mode 100644 index 70bec8f7b3..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeCoolerIndirectResearchSpecial.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::EvaporativeCoolerIndirectResearchSpecial - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.EvaporativeCoolerIndirectResearchSpecial", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.EvaporativeCoolerIndirectResearchSpecial", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb deleted file mode 100644 index 405f91796c..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.EvaporativeFluidCoolerSingleSpeed.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::EvaporativeFluidCoolerSingleSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.EvaporativeFluidCoolerSingleSpeed", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.EvaporativeFluidCoolerSingleSpeed", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb b/lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb deleted file mode 100644 index e1b13782d3..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.FanConstantVolume.rb +++ /dev/null @@ -1,29 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::FanConstantVolume - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.FanConstantVolume", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - maximum_flow_rate = self.autosizedMaximumFlowRate - if maximum_flow_rate.is_initialized - self.setMaximumFlowRate(maximum_flow_rate.get) - end - - end - - # returns the autosized maximum flow rate as an optional double - def autosizedMaximumFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Flow Rate', 'm3/s') - - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb b/lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb deleted file mode 100644 index 40f76cbab7..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.FanOnOff.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::FanOnOff - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeMaximumFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - maximum_flow_rate = self.autosizedMaximumFlowRate - if maximum_flow_rate.is_initialized - self.setMaximumFlowRate(maximum_flow_rate.get) - end - - end - - # returns the autosized maximum flow rate as an optional double - def autosizedMaximumFlowRate - return self.model.getAutosizedValue(self, 'Design Size Maximum Flow Rate', 'm3/s') - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb b/lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb deleted file mode 100644 index 233f36d74c..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.FanVariableVolume.rb +++ /dev/null @@ -1,29 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::FanVariableVolume - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.FanVariableVolume", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - maximum_flow_rate = self.autosizedMaximumFlowRate - if maximum_flow_rate.is_initialized - self.setMaximumFlowRate(maximum_flow_rate.get) - end - - end - - # returns the autosized maximum flow rate as an optional double - def autosizedMaximumFlowRate - - return self.model.getAutosizedValue(self, 'Design Size Maximum Flow Rate', 'm3/s') - - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb deleted file mode 100644 index f641393635..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsConstantSpeed.rb +++ /dev/null @@ -1,55 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::HeaderedPumpsConstantSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeTotalRatedFlowRate - self.autosizeRatedPowerConsumption - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_flow_rate = self.autosizedTotalRatedFlowRate - if rated_flow_rate.is_initialized - self.setTotalRatedFlowRate(rated_flow_rate.get) - end - - rated_power_consumption = self.autosizedRatedPowerConsumption - if rated_power_consumption.is_initialized - self.setRatedPowerConsumption(rated_power_consumption.get) - end - - end - - # returns the autosized rated flow rate as an optional double - def autosizedTotalRatedFlowRate - - # In E+ 8.5, (OS 1.10.5 onward) the column name changed - col_name = nil - if self.model.version < OpenStudio::VersionString.new('1.10.5') - col_name = 'Rated Flow Rate' - else - col_name = 'Design Flow Rate' - end - - return self.model.getAutosizedValue(self, col_name, 'm3/s') - end - - # returns the autosized rated power consumption as an optional double - def autosizedRatedPowerConsumption - - # In E+ 8.5, (OS 1.10.5 onward) the column name changed - col_name = nil - if self.model.version < OpenStudio::VersionString.new('1.10.5') - col_name = 'Rated Power Consumption' - else - col_name = 'Design Power Consumption' - end - - return self.model.getAutosizedValue(self, col_name, 'W') - end -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb deleted file mode 100644 index 5af2137a86..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.HeaderedPumpsVariableSpeed.rb +++ /dev/null @@ -1,55 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::HeaderedPumpsVariableSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeTotalRatedFlowRate - self.autosizeRatedPowerConsumption - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_flow_rate = self.autosizedTotalRatedFlowRate - if rated_flow_rate.is_initialized - self.setTotalRatedFlowRate(rated_flow_rate.get) - end - - rated_power_consumption = self.autosizedRatedPowerConsumption - if rated_power_consumption.is_initialized - self.setRatedPowerConsumption(rated_power_consumption.get) - end - - end - - # returns the autosized rated flow rate as an optional double - def autosizedTotalRatedFlowRate - - # In E+ 8.5, (OS 1.10.5 onward) the column name changed - col_name = nil - if self.model.version < OpenStudio::VersionString.new('1.10.5') - col_name = 'Rated Flow Rate' - else - col_name = 'Design Flow Rate' - end - - return self.model.getAutosizedValue(self, col_name, 'm3/s') - end - - # returns the autosized rated power consumption as an optional double - def autosizedRatedPowerConsumption - - # In E+ 8.5, (OS 1.10.5 onward) the column name changed - col_name = nil - if self.model.version < OpenStudio::VersionString.new('1.10.5') - col_name = 'Rated Power Consumption' - else - col_name = 'Design Power Consumption' - end - - return self.model.getAutosizedValue(self, col_name, 'W') - end -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb b/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb deleted file mode 100644 index 6bfb1bc208..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerAirToAirSensibleAndLatent.rb +++ /dev/null @@ -1,38 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::HeatExchangerAirToAirSensibleAndLatent - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.HeatExchangerAirToAirSensibleAndLatent", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - nominal_supply_air_flow_rate = self.autosizedNominalSupplyAirFlowRate - if nominal_supply_air_flow_rate.is_initialized - self.setNominalSupplyAirFlowRate(nominal_supply_air_flow_rate.get) - end - - end - - # returns the autosized nominal supply air flow rate as an optional double - def autosizedNominalSupplyAirFlowRate - - # In E+ 8.4, (OS 1.9.3 onward) the variable name changed - supply_air_flow_rate_name = nil - if self.model.version < OpenStudio::VersionString.new('1.9.3') - supply_air_flow_rate_name = 'Nominal Supply Air Flow Rate' - else - supply_air_flow_rate_name = 'Design Size Nominal Supply Air Flow Rate' - end - - return self.model.getAutosizedValue(self, supply_air_flow_rate_name, 'm3/s') - - end - -end - diff --git a/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb b/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb deleted file mode 100644 index f5f4fde023..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.HeatExchangerFluidToFluid.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::HeatExchangerFluidToFluid - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.HeatExchangerFluidToFluid", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.HeatExchangerFluidToFluid", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb b/lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb deleted file mode 100644 index 3508c1a1c4..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.HumidifierSteamElectric.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::HumidifierSteamElectric - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.HumidifierSteamElectric", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.HumidifierSteamElectric", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.Model.rb b/lib/openstudio-standards/hvac_sizing/Siz.Model.rb index 598f38155e..7c0f82c8a6 100644 --- a/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +++ b/lib/openstudio-standards/hvac_sizing/Siz.Model.rb @@ -2,323 +2,24 @@ # open the class to add methods to size all HVAC equipment class OpenStudio::Model::Model - # Ensure that the version of OpenStudio is 1.6.0 or greater - # because the HVACSizing .autosizedFoo methods are currently built - # expecting the EnergyPlus 8.2 syntax. - min_os_version = "1.6.0" + # Ensure that the version of OpenStudio is 2.4.1 or greater + # because this is when the .autosizedFoo methods were added to C++. + min_os_version = "2.4.1" if OpenStudio::Model::Model.new.version < OpenStudio::VersionString.new(min_os_version) - OpenStudio::logFree(OpenStudio::Error, "openstudio.model.Model", "This measure requires a minimum OpenStudio version of #{min_os_version} because the HVACSizing .autosizedFoo methods expect EnergyPlus 8.2 output variable names.") + OpenStudio::logFree(OpenStudio::Error, "openstudio.model.Model", "This measure requires a minimum OpenStudio version of #{min_os_version} because this is when the .autosizedFoo methods were added to C++.") end - # Load the helper libraries for getting the autosized - # values for each type of model object. - require_relative 'Siz.AirTermSnglDuctParallelPIUReheat' - require_relative 'Siz.AirTermSnglDuctVAVReheat' - require_relative 'Siz.AirTermSnglDuctUncontrolled' + # Load the helper libraries for getting additional autosized + # values that aren't included in the C++ API. require_relative 'Siz.AirLoopHVAC' - require_relative 'Siz.AirLoopHVACUnitaryHeatPumpAirToAir' - require_relative 'Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed' - require_relative 'Siz.FanConstantVolume' - require_relative 'Siz.FanVariableVolume' - require_relative 'Siz.FanOnOff' - require_relative 'Siz.CoilHeatingElectric' - require_relative 'Siz.CoilHeatingGas' - require_relative 'Siz.CoilHeatingGasMultiStage' - require_relative 'Siz.CoilHeatingWater' - require_relative 'Siz.CoilHeatingDXSingleSpeed' - require_relative 'Siz.CoilHeatingDXMultiSpeed' - require_relative 'Siz.CoilHeatingWaterToAirHeatPumpEquationFit' - require_relative 'Siz.CoilCoolingWaterToAirHeatPumpEquationFit' - require_relative 'Siz.CoilCoolingDXMultiSpeed' - require_relative 'Siz.CoilCoolingDXSingleSpeed' - require_relative 'Siz.CoilCoolingDXTwoSpeed' require_relative 'Siz.CoilCoolingWater' - require_relative 'Siz.ControllerOutdoorAir' - require_relative 'Siz.DistrictHeating' - require_relative 'Siz.DistrictCooling' - require_relative 'Siz.HeatExchangerAirToAirSensibleAndLatent' - require_relative 'Siz.PlantLoop' - require_relative 'Siz.PumpConstantSpeed' - require_relative 'Siz.PumpVariableSpeed' - require_relative 'Siz.BoilerHotWater' - require_relative 'Siz.ChillerElectricEIR' - require_relative 'Siz.CoolingTowerSingleSpeed' - require_relative 'Siz.CoolingTowerTwoSpeed' - require_relative 'Siz.CoolingTowerVariableSpeed' - require_relative 'Siz.ControllerWaterCoil' - require_relative 'Siz.SizingSystem' require_relative 'Siz.ThermalZone' - require_relative 'Siz.ZoneHVACPackagedTerminalAirConditioner' - require_relative 'Siz.ZoneHVACPackagedTerminalHeatPump' - require_relative 'Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow' - require_relative 'Siz.AirConditionerVariableRefrigerantFlow' - require_relative 'Siz.CoilCoolingDXVariableRefrigerantFlow' - require_relative 'Siz.CoilHeatingDXVariableRefrigerantFlow' - require_relative 'Siz.HeaderedPumpsConstantSpeed' - require_relative 'Siz.HeaderedPumpsVariableSpeed' # Heating and cooling fuel methods require_relative 'Siz.HeatingCoolingFuels' - + # Component quantity methods require_relative 'Siz.HVACComponent' - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into all objects model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - # Ensure that the model has a sql file associated with it - if self.sqlFile.empty? - OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', 'Failed to apply sizing values because model is missing sql file containing sizing results.') - return false - end - - # @todo Sizing methods for these types of equipment are - # currently only stubs that need to be filled in. - self.getAirConditionerVariableRefrigerantFlows.sort.each {|obj| obj.applySizingValues} - self.getAirLoopHVACUnitaryHeatCoolVAVChangeoverBypasss.sort.each {|obj| obj.applySizingValues} - self.getAirLoopHVACUnitarySystems.sort.each {|obj| obj.applySizingValues} - self.getAirTerminalSingleDuctConstantVolumeCooledBeams.sort.each {|obj| obj.applySizingValues} - self.getAirTerminalSingleDuctConstantVolumeFourPipeInductions.sort.each {|obj| obj.applySizingValues} - self.getAirTerminalSingleDuctConstantVolumeReheats.sort.each {|obj| obj.applySizingValues} - self.getAirTerminalSingleDuctSeriesPIUReheats.sort.each {|obj| obj.applySizingValues} - self.getAirTerminalSingleDuctVAVHeatAndCoolNoReheats.sort.each {|obj| obj.applySizingValues} - self.getAirTerminalSingleDuctVAVHeatAndCoolReheats.sort.each {|obj| obj.applySizingValues} - self.getBoilerSteams.sort.each {|obj| obj.applySizingValues} - self.getCoilCoolingDXVariableRefrigerantFlows.sort.each {|obj| obj.applySizingValues} - self.getCoilCoolingWaterToAirHeatPumpEquationFits.sort.each {|obj| obj.applySizingValues} - self.getCoilHeatingWaterToAirHeatPumpEquationFits.sort.each {|obj| obj.applySizingValues} - self.getCoilHeatingDesuperheaters.sort.each {|obj| obj.applySizingValues} - self.getCoilHeatingDXVariableRefrigerantFlows.sort.each {|obj| obj.applySizingValues} - self.getCoilWaterHeatingDesuperheaters.sort.each {|obj| obj.applySizingValues} - self.getCoolingTowerTwoSpeeds.sort.each {|obj| obj.applySizingValues} - self.getCoolingTowerVariableSpeeds.sort.each {|obj| obj.applySizingValues} - self.getEvaporativeCoolerDirectResearchSpecials.sort.each {|obj| obj.applySizingValues} - self.getEvaporativeCoolerIndirectResearchSpecials.sort.each {|obj| obj.applySizingValues} - self.getEvaporativeFluidCoolerSingleSpeeds.sort.each {|obj| obj.applySizingValues} - self.getHeatExchangerFluidToFluids.sort.each {|obj| obj.applySizingValues} - self.getHumidifierSteamElectrics.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACBaseboardConvectiveElectrics.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACBaseboardConvectiveWaters.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACFourPipeFanCoils.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACHighTemperatureRadiants.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACIdealLoadsAirSystems.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACLowTemperatureRadiantElectrics.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACLowTempRadiantConstFlows.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACLowTempRadiantVarFlows.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACPackagedTerminalAirConditioners.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACPackagedTerminalHeatPumps.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACTerminalUnitVariableRefrigerantFlows.sort.each {|obj| obj.applySizingValues} - self.getZoneHVACWaterToAirHeatPumps.sort.each {|obj| obj.applySizingValues} - - # Zone equipment - - # Air terminals - self.getAirTerminalSingleDuctParallelPIUReheats.sort.each {|obj| obj.applySizingValues} - self.getAirTerminalSingleDuctVAVReheats.sort.each {|obj| obj.applySizingValues} - self.getAirTerminalSingleDuctUncontrolleds.sort.each {|obj| obj.applySizingValues} - - # AirLoopHVAC components - self.getAirLoopHVACs.sort.each {|obj| obj.applySizingValues} - self.getSizingSystems.sort.each {|obj| obj.applySizingValues} - - # Fans - self.getFanConstantVolumes.sort.each {|obj| obj.applySizingValues} - self.getFanVariableVolumes.sort.each {|obj| obj.applySizingValues} - self.getFanOnOffs.sort.each {|obj| obj.applySizingValues} - - # Heating coils - self.getCoilHeatingElectrics.sort.each {|obj| obj.applySizingValues} - self.getCoilHeatingGass.sort.each {|obj| obj.applySizingValues} - self.getCoilHeatingGasMultiStages.sort.each {|obj| obj.applySizingValues} - self.getCoilHeatingWaters.sort.each {|obj| obj.applySizingValues} - self.getCoilHeatingDXSingleSpeeds.sort.each {|obj| obj.applySizingValues} - self.getCoilHeatingDXMultiSpeeds.sort.each {|obj| obj.applySizingValues} - - # Cooling coils - self.getCoilCoolingDXSingleSpeeds.sort.each {|obj| obj.applySizingValues} - self.getCoilCoolingDXTwoSpeeds.sort.each {|obj| obj.applySizingValues} - self.getCoilCoolingWaters.sort.each {|obj| obj.applySizingValues} - self.getCoilCoolingDXMultiSpeeds.sort.each {|obj| obj.applySizingValues} - - # Outdoor air - self.getControllerOutdoorAirs.sort.each {|obj| obj.applySizingValues} - self.getHeatExchangerAirToAirSensibleAndLatents.sort.each {|obj| obj.applySizingValues} - - # PlantLoop components - self.getPlantLoops.sort.each {|obj| obj.applySizingValues} - - # Pumps - self.getPumpConstantSpeeds.sort.each {|obj| obj.applySizingValues} - self.getPumpVariableSpeeds.sort.each {|obj| obj.applySizingValues} - - # Heating equipment - self.getBoilerHotWaters.sort.each {|obj| obj.applySizingValues} - - # Cooling equipment - self.getChillerElectricEIRs.sort.each {|obj| obj.applySizingValues} - - # Condenser equipment - self.getCoolingTowerSingleSpeeds.sort.each {|obj| obj.applySizingValues} - - # Controls - self.getControllerWaterCoils.sort.each {|obj| obj.applySizingValues} - - # VRF components - - # Refrigeration components - - return true - - end - - # Changes all hard-sized HVAC values to Autosized - def autosize - - # @todo Sizing methods for these types of equipment are - # currently only stubs that need to be filled in. - self.getAirConditionerVariableRefrigerantFlows.sort.each {|obj| obj.autosize} - self.getAirLoopHVACUnitaryHeatCoolVAVChangeoverBypasss.sort.each {|obj| obj.autosize} - self.getAirLoopHVACUnitarySystems.sort.each {|obj| obj.autosize} - self.getAirTerminalSingleDuctConstantVolumeCooledBeams.sort.each {|obj| obj.autosize} - self.getAirTerminalSingleDuctConstantVolumeFourPipeInductions.sort.each {|obj| obj.autosize} - self.getAirTerminalSingleDuctConstantVolumeReheats.sort.each {|obj| obj.autosize} - self.getAirTerminalSingleDuctSeriesPIUReheats.sort.each {|obj| obj.autosize} - self.getAirTerminalSingleDuctVAVHeatAndCoolNoReheats.sort.each {|obj| obj.autosize} - self.getAirTerminalSingleDuctVAVHeatAndCoolReheats.sort.each {|obj| obj.autosize} - self.getBoilerSteams.sort.each {|obj| obj.autosize} - self.getCoilCoolingDXMultiSpeeds.sort.each {|obj| obj.autosize} - self.getCoilCoolingDXVariableRefrigerantFlows.sort.each {|obj| obj.autosize} - self.getCoilCoolingWaterToAirHeatPumpEquationFits.sort.each {|obj| obj.autosize} - self.getCoilHeatingWaterToAirHeatPumpEquationFits.sort.each {|obj| obj.autosize} - self.getCoilHeatingGasMultiStages.sort.each {|obj| obj.autosize} - self.getCoilHeatingDesuperheaters.sort.each {|obj| obj.autosize} - self.getCoilHeatingDXVariableRefrigerantFlows.sort.each {|obj| obj.autosize} - self.getCoilWaterHeatingDesuperheaters.sort.each {|obj| obj.autosize} - self.getCoolingTowerTwoSpeeds.sort.each {|obj| obj.autosize} - self.getCoolingTowerVariableSpeeds.sort.each {|obj| obj.autosize} - self.getEvaporativeCoolerDirectResearchSpecials.sort.each {|obj| obj.autosize} - self.getEvaporativeCoolerIndirectResearchSpecials.sort.each {|obj| obj.autosize} - self.getEvaporativeFluidCoolerSingleSpeeds.sort.each {|obj| obj.autosize} - self.getHeatExchangerFluidToFluids.sort.each {|obj| obj.autosize} - self.getHumidifierSteamElectrics.sort.each {|obj| obj.autosize} - self.getZoneHVACBaseboardConvectiveElectrics.sort.each {|obj| obj.autosize} - self.getZoneHVACBaseboardConvectiveWaters.sort.each {|obj| obj.autosize} - self.getZoneHVACFourPipeFanCoils.sort.each {|obj| obj.autosize} - self.getZoneHVACHighTemperatureRadiants.sort.each {|obj| obj.autosize} - self.getZoneHVACIdealLoadsAirSystems.sort.each {|obj| obj.autosize} - self.getZoneHVACLowTemperatureRadiantElectrics.sort.each {|obj| obj.autosize} - self.getZoneHVACLowTempRadiantConstFlows.sort.each {|obj| obj.autosize} - self.getZoneHVACLowTempRadiantVarFlows.sort.each {|obj| obj.autosize} - self.getZoneHVACPackagedTerminalAirConditioners.sort.each {|obj| obj.autosize} - self.getZoneHVACPackagedTerminalHeatPumps.sort.each {|obj| obj.autosize} - self.getZoneHVACTerminalUnitVariableRefrigerantFlows.sort.each {|obj| obj.autosize} - self.getZoneHVACWaterToAirHeatPumps.sort.each {|obj| obj.autosize} - - # Zone equipment - - # Air terminals - self.getAirTerminalSingleDuctParallelPIUReheats.sort.each {|obj| obj.autosize} - self.getAirTerminalSingleDuctVAVReheats.sort.each {|obj| obj.autosize} - self.getAirTerminalSingleDuctUncontrolleds.sort.each {|obj| obj.autosize} - - # AirLoopHVAC components - self.getAirLoopHVACs.sort.each {|obj| obj.autosize} - self.getSizingSystems.sort.each {|obj| obj.autosize} - - # Fans - self.getFanConstantVolumes.sort.each {|obj| obj.autosize} - self.getFanVariableVolumes.sort.each {|obj| obj.autosize} - self.getFanOnOffs.sort.each {|obj| obj.autosize} - - # Heating coils - self.getCoilHeatingElectrics.sort.each {|obj| obj.autosize} - self.getCoilHeatingGass.sort.each {|obj| obj.autosize} - self.getCoilHeatingWaters.sort.each {|obj| obj.autosize} - self.getCoilHeatingDXSingleSpeeds.sort.each {|obj| obj.autosize} - - # Cooling coils - self.getCoilCoolingDXSingleSpeeds.sort.each {|obj| obj.autosize} - self.getCoilCoolingDXTwoSpeeds.sort.each {|obj| obj.autosize} - self.getCoilCoolingWaters.sort.each {|obj| obj.autosize} - - # Outdoor air - self.getControllerOutdoorAirs.sort.each {|obj| obj.autosize} - self.getHeatExchangerAirToAirSensibleAndLatents.sort.each {|obj| obj.autosize} - - # PlantLoop components - self.getPlantLoops.sort.each {|obj| obj.autosize} - - # Pumps - self.getPumpConstantSpeeds.sort.each {|obj| obj.autosize} - self.getPumpVariableSpeeds.sort.each {|obj| obj.autosize} - - # Heating equipment - self.getBoilerHotWaters.sort.each {|obj| obj.autosize} - - # Cooling equipment - self.getChillerElectricEIRs.sort.each {|obj| obj.autosize} - - # Condenser equipment - self.getCoolingTowerSingleSpeeds.sort.each {|obj| obj.autosize} - - # Controls - self.getControllerWaterCoils.sort.each {|obj| obj.autosize} - - # VRF components - - # Refrigeration components - - return true - - end - - - # A helper method to get component sizes from the model - # returns the autosized value as an optional double - def getAutosizedValue(object, value_name, units) - - result = OpenStudio::OptionalDouble.new - - name = object.name.get.upcase.strip - - object_type = object.iddObject.type.valueDescription.gsub('OS:','') - - # Special logic for two coil types which are inconsistently - # uppercase in the sqlfile: - object_type = object_type.upcase if object_type == 'Coil:Cooling:WaterToAirHeatPump:EquationFit' - object_type = object_type.upcase if object_type == 'Coil:Heating:WaterToAirHeatPump:EquationFit' - object_type = 'Coil:Heating:GasMultiStage' if object_type == 'Coil:Heating:Gas:MultiStage' - object_type = 'Coil:Heating:Fuel' if object_type == 'Coil:Heating:Gas' - - sql = self.sqlFile - - if sql.is_initialized - sql = sql.get - - #SELECT * FROM ComponentSizes WHERE CompType = 'Coil:Heating:Gas' AND CompName = "COIL HEATING GAS 3" AND Description = "Design Size Nominal Capacity" - query = "SELECT Value - FROM ComponentSizes - WHERE CompType='#{object_type}' - AND CompName='#{name}' - AND Description='#{value_name.strip}' - AND Units='#{units}'" - - val = sql.execAndReturnFirstDouble(query) - - if val.is_initialized - result = OpenStudio::OptionalDouble.new(val.get) - else - # @todo comment following line (debugging new HVACsizing objects right now) - # OpenStudio::logFree(OpenStudio::Warn, "openstudio.model.Model", "QUERY ERROR: Data not found for query: #{query}") - end - else - OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', 'Model has no sql file containing results, cannot lookup data.') - end - - return result - end # A helper method to get component sizes from the Equipment Summary of the TabularDataWithStrings Report # returns the autosized value as an optional double diff --git a/lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb b/lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb deleted file mode 100644 index cf199e8c02..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.PlantLoop.rb +++ /dev/null @@ -1,42 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::PlantLoop - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.PlantLoop", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - maximum_loop_flow_rate = self.autosizedMaximumLoopFlowRate - if maximum_loop_flow_rate.is_initialized - self.setMaximumLoopFlowRate(maximum_loop_flow_rate.get) - end - - plant_loop_volume = self.autosizedPlantLoopVolume - if plant_loop_volume.is_initialized - self.setPlantLoopVolume(plant_loop_volume.get) - end - - end - - # returns the autosized maximum loop flow rate as an optional double - def autosizedMaximumLoopFlowRate - - return self.model.getAutosizedValue(self, 'Maximum Loop Flow Rate', 'm3/s') - - end - - # returns the autosized plant loop volume as an optional double - def autosizedPlantLoopVolume - - return self.model.getAutosizedValue(self, 'Plant Loop Volume', 'm3') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb deleted file mode 100644 index bbfcaeb714..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.PumpConstantSpeed.rb +++ /dev/null @@ -1,59 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::PumpConstantSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.PumpConstantSpeed", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_flow_rate = self.autosizedRatedFlowRate - if rated_flow_rate.is_initialized - self.setRatedFlowRate(rated_flow_rate.get) - end - - rated_power_consumption = self.autosizedRatedPowerConsumption - if rated_power_consumption.is_initialized - self.setRatedPowerConsumption(rated_power_consumption.get) - end - - - end - - # returns the autosized rated flow rate as an optional double - def autosizedRatedFlowRate - - # In E+ 8.5, (OS 1.10.5 onward) the column name changed - col_name = nil - if self.model.version < OpenStudio::VersionString.new('1.10.5') - col_name = 'Rated Flow Rate' - else - col_name = 'Design Flow Rate' - end - - return self.model.getAutosizedValue(self, col_name, 'm3/s') - - end - - # returns the autosized rated power consumption as an optional double - def autosizedRatedPowerConsumption - - # In E+ 8.5, (OS 1.10.5 onward) the column name changed - col_name = nil - if self.model.version < OpenStudio::VersionString.new('1.10.5') - col_name = 'Rated Power Consumption' - else - col_name = 'Design Power Consumption' - end - - return self.model.getAutosizedValue(self, col_name, 'W') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb b/lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb deleted file mode 100644 index 02cc170694..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.PumpVariableSpeed.rb +++ /dev/null @@ -1,59 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::PumpVariableSpeed - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.PumpVariableSpeed", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - rated_flow_rate = self.autosizedRatedFlowRate - if rated_flow_rate.is_initialized - self.setRatedFlowRate(rated_flow_rate.get) - end - - rated_power_consumption = self.autosizedRatedPowerConsumption - if rated_power_consumption.is_initialized - self.setRatedPowerConsumption(rated_power_consumption.get) - end - - - end - - # returns the autosized rated flow rate as an optional double - def autosizedRatedFlowRate - - # In E+ 8.5, (OS 1.10.5 onward) the column name changed - col_name = nil - if self.model.version < OpenStudio::VersionString.new('1.10.5') - col_name = 'Rated Flow Rate' - else - col_name = 'Design Flow Rate' - end - - return self.model.getAutosizedValue(self, col_name, 'm3/s') - - end - - # returns the autosized rated power consumption as an optional double - def autosizedRatedPowerConsumption - - # In E+ 8.5, (OS 1.10.5 onward) the column name changed - col_name = nil - if self.model.version < OpenStudio::VersionString.new('1.10.5') - col_name = 'Rated Power Consumption' - else - col_name = 'Design Power Consumption' - end - - return self.model.getAutosizedValue(self, col_name, 'W') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb b/lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb deleted file mode 100644 index b2e28bb34e..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.SizingSystem.rb +++ /dev/null @@ -1,48 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::SizingSystem - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeDesignOutdoorAirFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - # In OpenStudio, the design OA flow rates are calculated by the - # Controller:OutdoorAir object associated with this system. - # Therefore, this property will be retrieved from that object's sizing values - air_loop = self.airLoopHVAC - if air_loop.airLoopHVACOutdoorAirSystem.is_initialized - controller_oa = air_loop.airLoopHVACOutdoorAirSystem.get.getControllerOutdoorAir - # get the max oa flow rate from the controller:outdoor air sizing - maximum_outdoor_air_flow_rate = controller_oa.autosizedMaximumOutdoorAirFlowRate - if maximum_outdoor_air_flow_rate.is_initialized - self.setDesignOutdoorAirFlowRate(maximum_outdoor_air_flow_rate.get) - # Set the OA flow method to "ZoneSum" to avoid severe errors - # in the fully hard-sized model. - self.setSystemOutdoorAirMethod("ZoneSum") - end - end - - end - - # returns the autosized maximum outdoor air flow rate as an optional double - def autosizedMaximumOutdoorAirFlowRate - - return self.model.getAutosizedValue(self, 'Maximum Outdoor Air Flow Rate', 'm3/s') - - end - - # returns the autosized minimum outdoor air flow rate as an optional double - def autosizedMinimumOutdoorAirFlowRate - - return self.model.getAutosizedValue(self, 'Minimum Outdoor Air Flow Rate', 'm3/s') - - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb b/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb index 290903b9ac..172b2717f2 100644 --- a/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +++ b/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb @@ -2,48 +2,20 @@ # open the class to add methods to return sizing values class OpenStudio::Model::ThermalZone - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeDesignOutdoorAirFlowRate - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - # In OpenStudio, the design OA flow rates are calculated by the - # Controller:OutdoorAir object associated with this system. - # Therefore, this property will be retrieved from that object's sizing values - air_loop = self.airLoopHVAC - if air_loop.airLoopHVACOutdoorAirSystem.is_initialized - controller_oa = air_loop.airLoopHVACOutdoorAirSystem.get.getControllerOutdoorAir - # get the max oa flow rate from the controller:outdoor air sizing - maximum_outdoor_air_flow_rate = controller_oa.autosizedMaximumOutdoorAirFlowRate - if maximum_outdoor_air_flow_rate.is_initialized - self.setDesignOutdoorAirFlowRate(maximum_outdoor_air_flow_rate.get) - # Set the OA flow method to "ZoneSum" to avoid severe errors - # in the fully hard-sized model. - self.setSystemOutdoorAirMethod("ZoneSum") - end - end - - end - # returns the autosized maximum outdoor air flow rate as an optional double def autosizedMaximumOutdoorAirFlowRate - return self.model.getAutosizedValue(self, 'Maximum Outdoor Air Flow Rate', 'm3/s') - + return self.getAutosizedValue('Maximum Outdoor Air Flow Rate', 'm3/s') + end - + # returns the autosized minimum outdoor air flow rate as an optional double def autosizedMinimumOutdoorAirFlowRate - return self.model.getAutosizedValue(self, 'Minimum Outdoor Air Flow Rate', 'm3/s') - + return self.getAutosizedValue('Minimum Outdoor Air Flow Rate', 'm3/s') + end - + # returns the autosized cooling design air flow rate as an optional double def autosizedCoolingDesignAirFlowRate @@ -52,29 +24,29 @@ def autosizedCoolingDesignAirFlowRate name = self.name.get.upcase sql = self.model.sqlFile - + if sql.is_initialized sql = sql.get - + # In E+ 8.4, (OS 1.9.3 onward) the table name changed table_name = nil if self.model.version < OpenStudio::VersionString.new('1.9.3') table_name = 'Zone Cooling' else table_name = 'Zone Sensible Cooling' - end - - query = "SELECT Value + end + + query = "SELECT Value FROM tabulardatawithstrings - WHERE ReportName='HVACSizingSummary' - AND ReportForString='Entire Facility' + WHERE ReportName='HVACSizingSummary' + AND ReportForString='Entire Facility' AND TableName='#{table_name}' AND ColumnName='User Design Air Flow' AND RowName='#{name}' AND Units='m3/s'" val = sql.execAndReturnFirstDouble(query) - + if val.is_initialized result = OpenStudio::OptionalDouble.new(val.get) else @@ -97,29 +69,29 @@ def autosizedHeatingDesignAirFlowRate name = self.name.get.upcase sql = self.model.sqlFile - + if sql.is_initialized sql = sql.get - + # In E+ 8.4, (OS 1.9.3 onward) the table name changed table_name = nil if self.model.version < OpenStudio::VersionString.new('1.9.3') table_name = 'Zone Heating' else table_name = 'Zone Sensible Heating' - end - - query = "SELECT Value + end + + query = "SELECT Value FROM tabulardatawithstrings - WHERE ReportName='HVACSizingSummary' - AND ReportForString='Entire Facility' + WHERE ReportName='HVACSizingSummary' + AND ReportForString='Entire Facility' AND TableName='#{table_name}' AND ColumnName='User Design Air Flow' AND RowName='#{name}' AND Units='m3/s'" val = sql.execAndReturnFirstDouble(query) - + if val.is_initialized result = OpenStudio::OptionalDouble.new(val.get) else @@ -136,35 +108,35 @@ def autosizedHeatingDesignAirFlowRate # returns the calculated cooling design load as an optional double def coolingDesignLoad - + result = OpenStudio::OptionalDouble.new name = self.name.get.upcase sql = self.model.sqlFile - + if sql.is_initialized sql = sql.get - + # In E+ 8.4, (OS 1.9.3 onward) the table name changed table_name = nil if self.model.version < OpenStudio::VersionString.new('1.9.3') table_name = 'Zone Cooling' else table_name = 'Zone Sensible Cooling' - end - - query = "SELECT Value + end + + query = "SELECT Value FROM tabulardatawithstrings - WHERE ReportName='HVACSizingSummary' - AND ReportForString='Entire Facility' + WHERE ReportName='HVACSizingSummary' + AND ReportForString='Entire Facility' AND TableName='#{table_name}' AND ColumnName='User Design Load' AND RowName='#{name}' AND Units='W'" val = sql.execAndReturnFirstDouble(query) - + if val.is_initialized floor_area_no_multiplier_m2 = self.floorArea floor_area_m2 = floor_area_no_multiplier_m2 * self.multiplier @@ -178,10 +150,10 @@ def coolingDesignLoad OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', 'Model has no sql file containing results, cannot lookup data.') end - return result - + return result + end - + def designAirFlowRate result = OpenStudio::OptionalDouble.new @@ -189,17 +161,17 @@ def designAirFlowRate name = self.name.get.upcase sql = self.model.sqlFile - + if sql.is_initialized sql = sql.get - + table_name = 'Zone Sizing Information' # Get zone row name query = "SELECT RowName FROM tabulardatawithstrings - WHERE ReportName='Initialization Summary' - AND ReportForString='Entire Facility' + WHERE ReportName='Initialization Summary' + AND ReportForString='Entire Facility' AND TableName='#{table_name}' AND ColumnName='Zone Name' AND Value='#{name}'" @@ -217,32 +189,32 @@ def designAirFlowRate end htg_des_air_flow_rate = 0 clg_des_air_flow_rate = 0 - + # Get zone cooling design flow rate - query = "SELECT Value + query = "SELECT Value FROM tabulardatawithstrings - WHERE ReportName='Initialization Summary' - AND ReportForString='Entire Facility' + WHERE ReportName='Initialization Summary' + AND ReportForString='Entire Facility' AND TableName='#{table_name}' AND ColumnName='User Des Air Flow Rate {m3/s}' AND RowName='#{clg_id}'" val = sql.execAndReturnFirstDouble(query) - if val.is_initialized + if val.is_initialized clg_des_air_flow_rate = val else OpenStudio::logFree(OpenStudio::Warn, "openstudio.model.Model", "Data not found for query: #{query}") end # Get zone heating design flow rate - query = "SELECT Value + query = "SELECT Value FROM tabulardatawithstrings - WHERE ReportName='Initialization Summary' - AND ReportForString='Entire Facility' + WHERE ReportName='Initialization Summary' + AND ReportForString='Entire Facility' AND TableName='#{table_name}' AND ColumnName='User Des Air Flow Rate {m3/s}' AND RowName='#{htg_id}'" val = sql.execAndReturnFirstDouble(query) - if val.is_initialized + if val.is_initialized htg_des_air_flow_rate = val else OpenStudio::logFree(OpenStudio::Warn, "openstudio.model.Model", "Data not found for query: #{query}") @@ -263,16 +235,16 @@ def designAirFlowRate # returns the calculated heating design load as an optional double def heatingDesignLoad - + result = OpenStudio::OptionalDouble.new name = self.name.get.upcase sql = self.model.sqlFile - + if sql.is_initialized sql = sql.get - + # In E+ 8.4, (OS 1.9.3 onward) the table name changed table_name = nil if self.model.version < OpenStudio::VersionString.new('1.9.3') @@ -280,18 +252,18 @@ def heatingDesignLoad else table_name = 'Zone Sensible Heating' end - - query = "SELECT Value + + query = "SELECT Value FROM tabulardatawithstrings - WHERE ReportName='HVACSizingSummary' - AND ReportForString='Entire Facility' + WHERE ReportName='HVACSizingSummary' + AND ReportForString='Entire Facility' AND TableName='#{table_name}' AND ColumnName='User Design Load' AND RowName='#{name}' AND Units='W'" val = sql.execAndReturnFirstDouble(query) - + if val.is_initialized floor_area_no_multiplier_m2 = self.floorArea floor_area_m2 = floor_area_no_multiplier_m2 * self.multiplier @@ -305,8 +277,8 @@ def heatingDesignLoad OpenStudio::logFree(OpenStudio::Error, 'openstudio.model.Model', 'Model has no sql file containing results, cannot lookup data.') end - return result - + return result + end # Determine the zone heating fuels, including @@ -314,14 +286,14 @@ def heatingDesignLoad # the air loops serving the zone, and any plant loops # serving those air loops. # - # return [Array] An array. Possible values are + # return [Array] An array. Possible values are # Electricity, NaturalGas, Propane, PropaneGas, FuelOilNo1, FuelOilNo2, - # Coal, Diesel, Gasoline, DistrictCooling, DistrictHeating, + # Coal, Diesel, Gasoline, DistrictCooling, DistrictHeating, # and SolarEnergy. def heating_fuels - + fuels = [] - + # Special logic for models imported from Sefaira. # In this case, the fuels are listed as a comment # above the Zone object. @@ -338,7 +310,7 @@ def heating_fuels fuels.uniq.sort end end - + # Check the zone hvac heating fuels fuels += self.model.zone_equipment_heating_fuels(self) @@ -348,9 +320,9 @@ def heating_fuels OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.Model', "For #{name}, heating fuels = #{fuels.uniq.sort.join(', ')}.") return fuels.uniq.sort - + end - + # Determine the zone cooling fuels, including # any fuels used by zone equipment, reheat terminals, # the air loops serving the zone, and any plant loops @@ -358,12 +330,12 @@ def heating_fuels # # return [Array] An array. Possible values are # Electricity, NaturalGas, Propane, PropaneGas, FuelOilNo1, FuelOilNo2, - # Coal, Diesel, Gasoline, DistrictCooling, DistrictHeating, + # Coal, Diesel, Gasoline, DistrictCooling, DistrictHeating, # and SolarEnergy. def cooling_fuels - + fuels = [] - + # Check the zone hvac cooling fuels fuels += self.model.zone_equipment_cooling_fuels(self) @@ -373,7 +345,7 @@ def cooling_fuels OpenStudio::logFree(OpenStudio::Debug, 'openstudio.model.Model', "For #{name}, cooling fuels = #{fuels.uniq.sort.join(', ')}.") return fuels.uniq.sort - - end - + + end + end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb b/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb deleted file mode 100644 index 5638fa453c..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.WaterHeaterMixed.rb +++ /dev/null @@ -1,16 +0,0 @@ - -# open the class to add methods to return sizing values -# @todo currently OpenStudio is missing the WaterHeater:Sizing object, so unlikely to need it right now... -class OpenStudio::Model::WaterHeaterMixed - - - # returns the autosized Heater Maximum Capacity as an optional double - def autosizedHeaterMaximumCapacity - - # @todo check the correct syntax here - return self.model.getAutosizedValue(self, 'Design Size Nominal Capacity', 'W') - - end - - -end # close the class \ No newline at end of file diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb deleted file mode 100644 index 860e121841..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveElectric.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACBaseboardConvectiveElectric - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACBaseboardConvectiveElectric", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACBaseboardConvectiveElectric", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb deleted file mode 100644 index aa8b6a7db9..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACBaseboardConvectiveWater.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACBaseboardConvectiveWater - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACBaseboardConvectiveWater", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACBaseboardConvectiveWater", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb deleted file mode 100644 index 901fbf916d..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACFourPipeFanCoil.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACFourPipeFanCoil - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACFourPipeFanCoil", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACFourPipeFanCoil", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb deleted file mode 100644 index da62b78def..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACHighTemperatureRadiant.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACHighTemperatureRadiant - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACHighTemperatureRadiant", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACHighTemperatureRadiant", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb deleted file mode 100644 index 240b9e79fe..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACIdealLoadsAirSystem.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACIdealLoadsAirSystem - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACIdealLoadsAirSystem", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACIdealLoadsAirSystem", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb deleted file mode 100644 index a54526d76f..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantConstFlow.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACLowTempRadiantConstFlow - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACLowTempRadiantConstFlow", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACLowTempRadiantConstFlow", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb deleted file mode 100644 index 9c75f44725..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTempRadiantVarFlow.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACLowTempRadiantVarFlow - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACLowTempRadiantVarFlow", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACLowTempRadiantVarFlow", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb deleted file mode 100644 index a0fabcddeb..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACLowTemperatureRadiantElectric.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACLowTemperatureRadiantElectric - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACLowTemperatureRadiantElectric", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACLowTemperatureRadiantElectric", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb deleted file mode 100644 index db073bf18f..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalAirConditioner.rb +++ /dev/null @@ -1,88 +0,0 @@ -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACPackagedTerminalAirConditioner - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeSupplyAirFlowRateDuringCoolingOperation - self.autosizeSupplyAirFlowRateDuringHeatingOperation - self.autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - self.autosizeOutdoorAirFlowRateDuringCoolingOperation - self.autosizeOutdoorAirFlowRateDuringHeatingOperation - self.autosizeOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded - self.autosizeMaximumSupplyAirTemperaturefromSupplementalHeater - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - # Supply Air Flow Rate During Cooling Operation - supply_air_flow_cooling = self.autosizedSupplyAirFlowRateDuringCoolingOperation - if supply_air_flow_cooling.is_initialized - self.setSupplyAirFlowRateDuringCoolingOperation(supply_air_flow_cooling.get) - end - - # Supply Air Flow Rate During Heating Operation - supply_air_flow_heating = self.autosizedSupplyAirFlowRateDuringHeatingOperation - if supply_air_flow_heating.is_initialized - self.setSupplyAirFlowRateDuringHeatingOperation(supply_air_flow_heating.get) - end - - # Supply Air Flow Rate When No Cooling or Heating is Needed - supply_air_flow_noload = self.autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - if supply_air_flow_noload.is_initialized - self.setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(supply_air_flow_noload.get) - end - - # Outdoor Air Flow Rate During Cooling Operation - oa_air_flow_cooling = self.autosizedOutdoorAirFlowRateDuringCoolingOperation - if oa_air_flow_cooling.is_initialized - self.setOutdoorAirFlowRateDuringCoolingOperation(oa_air_flow_cooling.get) - end - - # Outdoor Air Flow Rate During Heating Operation - oa_air_flow_heating = self.autosizedOutdoorAirFlowRateDuringHeatingOperation - if oa_air_flow_heating.is_initialized - self.setOutdoorAirFlowRateDuringHeatingOperation(oa_air_flow_heating.get) - end - - # Outdoor Air Flow Rate When No Cooling or Heating is Needed - oa_air_flow_noload = self.autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded - if oa_air_flow_noload.is_initialized - self.setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(oa_air_flow_noload.get) - end - end - - - # Supply Air Flow Rate During Cooling Operation - def autosizedSupplyAirFlowRateDuringCoolingOperation - return self.model.getAutosizedValue(self, 'Design Size Cooling Supply Air Flow Rate', 'm3/s') - end - - # Supply Air Flow Rate During Heating Operation - def autosizedSupplyAirFlowRateDuringHeatingOperation - return self.model.getAutosizedValue(self, 'Design Size Heating Supply Air Flow Rate', 'm3/s') - end - - # Supply Air Flow Rate When No Cooling or Heating is Needed - def autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - return self.model.getAutosizedValue(self, 'Design Size No Load Supply Air Flow Rate', 'm3/s') - end - - # Outdoor Air Flow Rate During Cooling Operation - def autosizedOutdoorAirFlowRateDuringCoolingOperation - return self.model.getAutosizedValue(self, 'Design Size Outdoor Air Flow Rate During Cooling Operation', 'm3/s') - end - - # Outdoor Air Flow Rate During Heating Operation - def autosizedOutdoorAirFlowRateDuringHeatingOperation - return self.model.getAutosizedValue(self, 'Design Size Outdoor Air Flow Rate During Heating Operation', 'm3/s') - end - - # Outdoor Air Flow Rate When No Cooling or Heating is Needed - def autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded - return self.model.getAutosizedValue(self, 'Design Size Outdoor Air Flow Rate When No Cooling or Heating is Needed', 'm3/s') - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb deleted file mode 100644 index f9a1e08722..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACPackagedTerminalHeatPump.rb +++ /dev/null @@ -1,88 +0,0 @@ -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACPackagedTerminalHeatPump - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeSupplyAirFlowRateDuringCoolingOperation - self.autosizeSupplyAirFlowRateDuringHeatingOperation - self.autosizeSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - self.autosizeOutdoorAirFlowRateDuringCoolingOperation - self.autosizeOutdoorAirFlowRateDuringHeatingOperation - self.autosizeOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded - self.autosizeMaximumSupplyAirTemperaturefromSupplementalHeater - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - # Supply Air Flow Rate During Cooling Operation - supply_air_flow_cooling = self.autosizedSupplyAirFlowRateDuringCoolingOperation - if supply_air_flow_cooling.is_initialized - self.setSupplyAirFlowRateDuringCoolingOperation(supply_air_flow_cooling.get) - end - - # Supply Air Flow Rate During Heating Operation - supply_air_flow_heating = self.autosizedSupplyAirFlowRateDuringHeatingOperation - if supply_air_flow_heating.is_initialized - self.setSupplyAirFlowRateDuringHeatingOperation(supply_air_flow_heating.get) - end - - # Supply Air Flow Rate When No Cooling or Heating is Needed - supply_air_flow_noload = self.autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - if supply_air_flow_noload.is_initialized - self.setSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded(supply_air_flow_noload.get) - end - - # Outdoor Air Flow Rate During Cooling Operation - oa_air_flow_cooling = self.autosizedOutdoorAirFlowRateDuringCoolingOperation - if oa_air_flow_cooling.is_initialized - self.setOutdoorAirFlowRateDuringCoolingOperation(oa_air_flow_cooling.get) - end - - # Outdoor Air Flow Rate During Heating Operation - oa_air_flow_heating = self.autosizedOutdoorAirFlowRateDuringHeatingOperation - if oa_air_flow_heating.is_initialized - self.setOutdoorAirFlowRateDuringHeatingOperation(oa_air_flow_heating.get) - end - - # Outdoor Air Flow Rate When No Cooling or Heating is Needed - oa_air_flow_noload = self.autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded - if oa_air_flow_noload.is_initialized - self.setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(oa_air_flow_noload.get) - end - end - - - # Supply Air Flow Rate During Cooling Operation - def autosizedSupplyAirFlowRateDuringCoolingOperation - return self.model.getAutosizedValue(self, 'Design Size Cooling Supply Air Flow Rate', 'm3/s') - end - - # Supply Air Flow Rate During Heating Operation - def autosizedSupplyAirFlowRateDuringHeatingOperation - return self.model.getAutosizedValue(self, 'Design Size Heating Supply Air Flow Rate', 'm3/s') - end - - # Supply Air Flow Rate When No Cooling or Heating is Needed - def autosizedSupplyAirFlowRateWhenNoCoolingorHeatingisNeeded - return self.model.getAutosizedValue(self, 'Design Size No Load Supply Air Flow Rate', 'm3/s') - end - - # Outdoor Air Flow Rate During Cooling Operation - def autosizedOutdoorAirFlowRateDuringCoolingOperation - return self.model.getAutosizedValue(self, 'Design Size Outdoor Air Flow Rate During Cooling Operation', 'm3/s') - end - - # Outdoor Air Flow Rate During Heating Operation - def autosizedOutdoorAirFlowRateDuringHeatingOperation - return self.model.getAutosizedValue(self, 'Design Size Outdoor Air Flow Rate During Heating Operation', 'm3/s') - end - - # Outdoor Air Flow Rate When No Cooling or Heating is Needed - def autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded - return self.model.getAutosizedValue(self, 'Design Size Outdoor Air Flow Rate When No Cooling or Heating is Needed', 'm3/s') - end - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb deleted file mode 100644 index d58946159e..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACTerminalUnitVariableRefrigerantFlow.rb +++ /dev/null @@ -1,104 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACTerminalUnitVariableRefrigerantFlow - - # Sets all auto-sizeable fields to autosize - def autosize - self.autosizeSupplyAirFlowRateDuringCoolingOperation - self.autosizeSupplyAirFlowRateWhenNoCoolingisNeeded - self.autosizeSupplyAirFlowRateDuringHeatingOperation - self.autosizeSupplyAirFlowRateWhenNoHeatingisNeeded - self.autosizeOutdoorAirFlowRateDuringCoolingOperation - self.autosizeOutdoorAirFlowRateDuringHeatingOperation - self.autosizeOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - # Supply Air Flow Rate During Cooling Operation - supply_air_flow_cooling = self.autosizedSupplyAirFlowRateDuringCoolingOperation - if supply_air_flow_cooling.is_initialized - self.setSupplyAirFlowRateDuringCoolingOperation(supply_air_flow_cooling.get) - end - - # Supply Air Flow Rate During Heating Operation - supply_air_flow_heating = self.autosizedSupplyAirFlowRateDuringHeatingOperation - if supply_air_flow_heating.is_initialized - self.setSupplyAirFlowRateDuringHeatingOperation(supply_air_flow_heating.get) - end - - # Supply Air Flow Rate When No Cooling is Needed - supply_air_flow_no_cool = self.autosizedSupplyAirFlowRateWhenNoCoolingisNeeded - if supply_air_flow_no_cool.is_initialized - self.setSupplyAirFlowRateWhenNoCoolingisNeeded(supply_air_flow_no_cool.get) - end - - # Supply Air Flow Rate When No Heating is Needed - supply_air_flow_no_heat = self.autosizedSupplyAirFlowRateWhenNoHeatingisNeeded - if supply_air_flow_no_heat.is_initialized - self.setSupplyAirFlowRateWhenNoHeatingisNeeded(supply_air_flow_no_heat.get) - end - - # Outdoor Air Flow Rate During Cooling Operation - oa_air_flow_cooling = self.autosizedOutdoorAirFlowRateDuringCoolingOperation - if oa_air_flow_cooling.is_initialized - self.setOutdoorAirFlowRateDuringCoolingOperation(oa_air_flow_cooling.get) - end - - # Outdoor Air Flow Rate During Heating Operation - oa_air_flow_heating = self.autosizedOutdoorAirFlowRateDuringHeatingOperation - if oa_air_flow_heating.is_initialized - self.setOutdoorAirFlowRateDuringHeatingOperation(oa_air_flow_heating.get) - end - - # Outdoor Air Flow Rate When No Cooling or Heating is Needed - oa_air_flow_noload = self.autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded - if oa_air_flow_noload.is_initialized - self.setOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded(oa_air_flow_noload.get) - end - - end - - # Supply Air Flow Rate During Cooling Operation - def autosizedSupplyAirFlowRateDuringCoolingOperation - return self.model.getAutosizedValue(self, 'Design Size Cooling Supply Air Flow Rate', 'm3/s') - end - - # Supply Air Flow Rate During Heating Operation - def autosizedSupplyAirFlowRateDuringHeatingOperation - return self.model.getAutosizedValue(self, 'Design Size Heating Supply Air Flow Rate', 'm3/s') - end - - # Supply Air Flow Rate During No Cooling Operation - def autosizedSupplyAirFlowRateWhenNoCoolingisNeeded - return self.model.getAutosizedValue(self, 'Design Size No Cooling Supply Air Flow Rate', 'm3/s') - end - - # Supply Air Flow Rate During No Heating Operation - def autosizedSupplyAirFlowRateWhenNoHeatingisNeeded - return self.model.getAutosizedValue(self, 'Design Size No Heating Supply Air Flow Rate', 'm3/s') - end - - - # @todo verify on a fully autosize model that these three are actually named this way in the SQL file - - # Outdoor Air Flow Rate During Cooling Operation - def autosizedOutdoorAirFlowRateDuringCoolingOperation - return self.model.getAutosizedValue(self, 'Design Size Outdoor Air Flow Rate During Cooling Operation', 'm3/s') - end - - # Outdoor Air Flow Rate During Heating Operation - def autosizedOutdoorAirFlowRateDuringHeatingOperation - return self.model.getAutosizedValue(self, 'Design Size Outdoor Air Flow Rate During Heating Operation', 'm3/s') - end - - # Outdoor Air Flow Rate When No Cooling or Heating is Needed - def autosizedOutdoorAirFlowRateWhenNoCoolingorHeatingisNeeded - return self.model.getAutosizedValue(self, 'Design Size Outdoor Air Flow Rate When No Cooling or Heating is Needed', 'm3/s') - end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb deleted file mode 100644 index daa0d948c3..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACUnitHeater.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACUnitHeater - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACUnitHeater", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACUnitHeater", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end diff --git a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb b/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb deleted file mode 100644 index 402e1ecff6..0000000000 --- a/lib/openstudio-standards/hvac_sizing/Siz.ZoneHVACWaterToAirHeatPump.rb +++ /dev/null @@ -1,27 +0,0 @@ - -# open the class to add methods to return sizing values -class OpenStudio::Model::ZoneHVACWaterToAirHeatPump - - # Sets all auto-sizeable fields to autosize - def autosize - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACWaterToAirHeatPump", ".autosize not yet implemented for #{self.iddObject.type.valueDescription}.") - end - - # Takes the values calculated by the EnergyPlus sizing routines - # and puts them into this object model in place of the autosized fields. - # Must have previously completed a run with sql output for this to work. - def applySizingValues - - OpenStudio::logFree(OpenStudio::Warn, "openstudio.sizing.ZoneHVACWaterToAirHeatPump", ".applySizingValues not yet implemented for #{self.iddObject.type.valueDescription}.") - - end - - # returns the autosized design supply air flow rate as an optional double - # def autosizedDesignSupplyAirFlowRate - - # return self.model.getAutosizedValue(self, 'Design Supply Air Flow Rate', 'm3/s') - - # end - - -end From 134c888a3538668cd7ce46fd1c69382025e6c91c Mon Sep 17 00:00:00 2001 From: Andrew Parker Date: Fri, 20 Jan 2023 09:28:30 -0700 Subject: [PATCH 2/7] Switch to component-specific getAutosizedValue methods defined in OS C++ API --- .../standards/necb/ECMS/hvac_systems.rb | 2 +- .../standards/necb/NECB2011/hvac_systems.rb | 2 +- .../standards/necb/NECB2015/hvac_systems.rb | 8 ++++---- .../necb/unit_tests/tests/test_necb_pumppower_rules.rb | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb b/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb index cf641c94b3..5ff34e4dd3 100644 --- a/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +++ b/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb @@ -2613,7 +2613,7 @@ def reset_boiler_efficiency(model:, component:, eff:) component.setNormalizedBoilerEfficiencyCurve(part_load_curve) if component.isNominalCapacityAutosized - boiler_size_W = model.getAutosizedValue(component, 'Design Size Nominal Capacity', 'W').to_f + boiler_size_W = component.getAutosizedValue('Design Size Nominal Capacity', 'W').to_f else boiler_size_W = component.nominalCapacity.to_f end diff --git a/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb b/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb index 30c2819e8b..603abef5b2 100644 --- a/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +++ b/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb @@ -42,7 +42,7 @@ def air_loop_hvac_economizer_required?(air_loop_hvac) # puts air_loop_hvac.name.to_s # Design Supply Air Flow Rate: This method below reads the value from the sql file. - dsafr_m3_per_s = air_loop_hvac.model.getAutosizedValue(air_loop_hvac, 'Design Supply Air Flow Rate', 'm3/s') + dsafr_m3_per_s = air_loop_hvac.getAutosizedValue('Design Supply Air Flow Rate', 'm3/s') min_dsafr_l_per_s = 1500 unless dsafr_m3_per_s.empty? dsafr_l_per_s = dsafr_m3_per_s.get * 1000 diff --git a/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb b/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb index 0d9430560e..0900723da5 100644 --- a/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +++ b/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb @@ -125,18 +125,18 @@ def apply_maximum_loop_pump_power(model) max_powertoload = model_find_object(max_total_loop_pump_power_table, search_hash)['total_normalized_pump_power_wperkw'] when 'OS_Pump_VariableSpeed' pumps << supplycomp.to_PumpVariableSpeed.get - total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f when 'OS_Pump_ConstantSpeed' pumps << supplycomp.to_PumpConstantSpeed.get - total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f when 'OS_HeaderedPumps_ConstantSpeed' OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "A pump used in the plant loop named #{plantloop.name} is headered. This may result in an error and cause a failure.") pumps << supplycomp.to_HeaderedPumpsConstantSpeed.get - total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f when 'OS_HeaderedPumps_VariableSpeed' OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "A pump used in the plant loop named #{plantloop.name} is headered. This may result in an error and cause a failure.") pumps << supplycomp.to_HeaderedPumpsVariableSpeed.get - total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f end end # If no pumps were found then there is nothing to set so go to the next plant loop diff --git a/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb b/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb index 0078858e0a..96f78d2d9f 100644 --- a/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb +++ b/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb @@ -52,7 +52,7 @@ def test_NECB2015_pumppower model = BTAP::FileIO.load_osm(File.join(@resources_folder,"5ZoneNoHVAC.osm")) BTAP::Environment::WeatherFile.new('CAN_ON_Toronto.Pearson.Intl.AP.716240_CWEC2016.epw').set_weather_file(model) hw_loop = OpenStudio::Model::PlantLoop.new(model) - always_on = model.alwaysOnDiscreteSchedule + always_on = model.alwaysOnDiscreteSchedule standard.setup_hw_loop_with_components(model,hw_loop, boiler_fueltype, always_on) standard.add_sys6_multi_zone_built_up_system_with_baseboard_heating( model: model, @@ -96,16 +96,16 @@ def test_NECB2015_pumppower max_powertoload = 22 when 'OS_Pump_VariableSpeed' pumps << supplycomp.to_PumpVariableSpeed.get - total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f when 'OS_Pump_ConstantSpeed' pumps << supplycomp.to_PumpConstantSpeed.get - total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f when 'OS_HeaderedPumps_ConstantSpeed' pumps << supplycomp.to_HeaderedPumpsConstantSpeed.get - total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f when 'OS_HeaderedPumps_VariableSpeed' pumps << supplycomp.to_HeaderedPumpsVariableSpeed.get - total_pump_power += model.getAutosizedValue(supplycomp, 'Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f end end # If no pumps were found then there is nothing to set so go to the next plant loop From ffbe19f1539aa1d22e2c4992ed2f5387f4594050 Mon Sep 17 00:00:00 2001 From: Andrew Parker Date: Fri, 3 Feb 2023 06:09:06 -0700 Subject: [PATCH 3/7] Switch to direct component-level autosizedFoo methods --- .../standards/necb/ECMS/hvac_systems.rb | 2 +- .../standards/necb/NECB2011/hvac_systems.rb | 2 +- .../standards/necb/NECB2015/hvac_systems.rb | 8 ++++---- test/necb/unit_tests/tests/test_necb_pumppower_rules.rb | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb b/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb index 5ff34e4dd3..b9707fd77b 100644 --- a/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +++ b/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb @@ -2613,7 +2613,7 @@ def reset_boiler_efficiency(model:, component:, eff:) component.setNormalizedBoilerEfficiencyCurve(part_load_curve) if component.isNominalCapacityAutosized - boiler_size_W = component.getAutosizedValue('Design Size Nominal Capacity', 'W').to_f + boiler_size_W = component.autosizedNominalCapacity.get else boiler_size_W = component.nominalCapacity.to_f end diff --git a/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb b/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb index 603abef5b2..e996c88a31 100644 --- a/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +++ b/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb @@ -42,7 +42,7 @@ def air_loop_hvac_economizer_required?(air_loop_hvac) # puts air_loop_hvac.name.to_s # Design Supply Air Flow Rate: This method below reads the value from the sql file. - dsafr_m3_per_s = air_loop_hvac.getAutosizedValue('Design Supply Air Flow Rate', 'm3/s') + dsafr_m3_per_s = air_loop_hvac.autosizedDesignSupplyAirFlowRate.get min_dsafr_l_per_s = 1500 unless dsafr_m3_per_s.empty? dsafr_l_per_s = dsafr_m3_per_s.get * 1000 diff --git a/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb b/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb index 0900723da5..be363eb7e3 100644 --- a/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +++ b/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb @@ -125,18 +125,18 @@ def apply_maximum_loop_pump_power(model) max_powertoload = model_find_object(max_total_loop_pump_power_table, search_hash)['total_normalized_pump_power_wperkw'] when 'OS_Pump_VariableSpeed' pumps << supplycomp.to_PumpVariableSpeed.get - total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.autosizedRatedPowerConsumption.get when 'OS_Pump_ConstantSpeed' pumps << supplycomp.to_PumpConstantSpeed.get - total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.autosizedRatedPowerConsumption.get when 'OS_HeaderedPumps_ConstantSpeed' OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "A pump used in the plant loop named #{plantloop.name} is headered. This may result in an error and cause a failure.") pumps << supplycomp.to_HeaderedPumpsConstantSpeed.get - total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.autosizedRatedPowerConsumption.get when 'OS_HeaderedPumps_VariableSpeed' OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "A pump used in the plant loop named #{plantloop.name} is headered. This may result in an error and cause a failure.") pumps << supplycomp.to_HeaderedPumpsVariableSpeed.get - total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.autosizedRatedPowerConsumption.get end end # If no pumps were found then there is nothing to set so go to the next plant loop diff --git a/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb b/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb index 96f78d2d9f..87be4351da 100644 --- a/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb +++ b/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb @@ -96,16 +96,16 @@ def test_NECB2015_pumppower max_powertoload = 22 when 'OS_Pump_VariableSpeed' pumps << supplycomp.to_PumpVariableSpeed.get - total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.autosizedRatedPowerConsumption.get when 'OS_Pump_ConstantSpeed' pumps << supplycomp.to_PumpConstantSpeed.get - total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.autosizedRatedPowerConsumption.get when 'OS_HeaderedPumps_ConstantSpeed' pumps << supplycomp.to_HeaderedPumpsConstantSpeed.get - total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.autosizedRatedPowerConsumption.get when 'OS_HeaderedPumps_VariableSpeed' pumps << supplycomp.to_HeaderedPumpsVariableSpeed.get - total_pump_power += supplycomp.getAutosizedValue('Design Power Consumption', 'W').to_f + total_pump_power += supplycomp.autosizedRatedPowerConsumption.get end end # If no pumps were found then there is nothing to set so go to the next plant loop From a2f4016b00045c43820d00939a9568f7663ca785 Mon Sep 17 00:00:00 2001 From: Matthew Dahlhausen Date: Wed, 8 Feb 2023 14:55:57 -0700 Subject: [PATCH 4/7] autosizedDesignSupplyAirFlowRate optional lookup --- .../standards/necb/NECB2011/hvac_systems.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb b/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb index e996c88a31..8cf2482b3d 100644 --- a/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +++ b/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb @@ -42,7 +42,7 @@ def air_loop_hvac_economizer_required?(air_loop_hvac) # puts air_loop_hvac.name.to_s # Design Supply Air Flow Rate: This method below reads the value from the sql file. - dsafr_m3_per_s = air_loop_hvac.autosizedDesignSupplyAirFlowRate.get + dsafr_m3_per_s = air_loop_hvac.autosizedDesignSupplyAirFlowRate min_dsafr_l_per_s = 1500 unless dsafr_m3_per_s.empty? dsafr_l_per_s = dsafr_m3_per_s.get * 1000 From 0e157288e06556874be81dad6849927572878f89 Mon Sep 17 00:00:00 2001 From: Matthew Dahlhausen Date: Wed, 8 Feb 2023 15:07:29 -0700 Subject: [PATCH 5/7] Add a tolerance check to necb regression tests --- lib/openstudio-standards/btap/fileio.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/openstudio-standards/btap/fileio.rb b/lib/openstudio-standards/btap/fileio.rb index c107112be3..ccbac6e1d1 100644 --- a/lib/openstudio-standards/btap/fileio.rb +++ b/lib/openstudio-standards/btap/fileio.rb @@ -834,6 +834,15 @@ def self.compare_osm_files(model_true, model_compare) # Move to the next field if no difference was found next if true_value == compare_value + # Check numeric values if numeric + if (compare_value.is_a? Numeric) && (true_value.is_a? Numeric) + diff = true_value.to_f - compare_value.to_f + unless true_value.zero? + # next if absolute value is less than a tenth of a percent difference + next if (diff / true_value.to_f).abs < 0.001 + end + end + # Report the difference diffs << "For #{true_object.iddObject.name} called '#{true_object.name}' field '#{field_name}': before model = #{true_value}, after model = #{compare_value}" From 8355cb0c71d675c7a3a36f41991e1ba644064fd2 Mon Sep 17 00:00:00 2001 From: Matthew Dahlhausen Date: Thu, 9 Feb 2023 11:08:34 -0700 Subject: [PATCH 6/7] correct pump autosizedRatedPowerConsumption lookup --- .../standards/necb/NECB2015/hvac_systems.rb | 20 +++++++++++-------- .../tests/test_necb_pumppower_rules.rb | 20 +++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb b/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb index be363eb7e3..ab7db73f51 100644 --- a/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb +++ b/lib/openstudio-standards/standards/necb/NECB2015/hvac_systems.rb @@ -124,19 +124,23 @@ def apply_maximum_loop_pump_power(model) search_hash = { 'hydronic_system_type' => 'WSHP' } max_powertoload = model_find_object(max_total_loop_pump_power_table, search_hash)['total_normalized_pump_power_wperkw'] when 'OS_Pump_VariableSpeed' - pumps << supplycomp.to_PumpVariableSpeed.get - total_pump_power += supplycomp.autosizedRatedPowerConsumption.get + pump = supplycomp.to_PumpVariableSpeed.get + pumps << pump + total_pump_power += pump.autosizedRatedPowerConsumption.get when 'OS_Pump_ConstantSpeed' - pumps << supplycomp.to_PumpConstantSpeed.get - total_pump_power += supplycomp.autosizedRatedPowerConsumption.get + pump = supplycomp.to_PumpConstantSpeed.get + pumps << pump + total_pump_power += pump.autosizedRatedPowerConsumption.get when 'OS_HeaderedPumps_ConstantSpeed' OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "A pump used in the plant loop named #{plantloop.name} is headered. This may result in an error and cause a failure.") - pumps << supplycomp.to_HeaderedPumpsConstantSpeed.get - total_pump_power += supplycomp.autosizedRatedPowerConsumption.get + pump = supplycomp.to_HeaderedPumpsConstantSpeed.get + pumps << pump + total_pump_power += pump.autosizedRatedPowerConsumption.get when 'OS_HeaderedPumps_VariableSpeed' OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "A pump used in the plant loop named #{plantloop.name} is headered. This may result in an error and cause a failure.") - pumps << supplycomp.to_HeaderedPumpsVariableSpeed.get - total_pump_power += supplycomp.autosizedRatedPowerConsumption.get + pump = supplycomp.to_HeaderedPumpsVariableSpeed.get + pumps << pump + total_pump_power += pump.autosizedRatedPowerConsumption.get end end # If no pumps were found then there is nothing to set so go to the next plant loop diff --git a/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb b/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb index 87be4351da..a5f7da5597 100644 --- a/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb +++ b/test/necb/unit_tests/tests/test_necb_pumppower_rules.rb @@ -95,17 +95,21 @@ def test_NECB2015_pumppower when 'OS_HeatPump_WaterToWater_EquationFit_Heating' max_powertoload = 22 when 'OS_Pump_VariableSpeed' - pumps << supplycomp.to_PumpVariableSpeed.get - total_pump_power += supplycomp.autosizedRatedPowerConsumption.get + pump = supplycomp.to_PumpVariableSpeed.get + pumps << pump + total_pump_power += pump.autosizedRatedPowerConsumption.get when 'OS_Pump_ConstantSpeed' - pumps << supplycomp.to_PumpConstantSpeed.get - total_pump_power += supplycomp.autosizedRatedPowerConsumption.get + pump = supplycomp.to_PumpConstantSpeed.get + pumps << pump + total_pump_power += pump.autosizedRatedPowerConsumption.get when 'OS_HeaderedPumps_ConstantSpeed' - pumps << supplycomp.to_HeaderedPumpsConstantSpeed.get - total_pump_power += supplycomp.autosizedRatedPowerConsumption.get + pump = supplycomp.to_HeaderedPumpsConstantSpeed.get + pumps << pump + total_pump_power += pump.autosizedRatedPowerConsumption.get when 'OS_HeaderedPumps_VariableSpeed' - pumps << supplycomp.to_HeaderedPumpsVariableSpeed.get - total_pump_power += supplycomp.autosizedRatedPowerConsumption.get + pump = supplycomp.to_HeaderedPumpsVariableSpeed.get + pumps << pump + total_pump_power += pump.autosizedRatedPowerConsumption.get end end # If no pumps were found then there is nothing to set so go to the next plant loop From 92c013c5222d0bbdfd8c37f5e27a9a39ed69b896 Mon Sep 17 00:00:00 2001 From: Matthew Dahlhausen Date: Mon, 13 Feb 2023 08:50:21 -0700 Subject: [PATCH 7/7] increase error percentage to above rounding tolerance --- test/helpers/create_doe_prototype_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/helpers/create_doe_prototype_helper.rb b/test/helpers/create_doe_prototype_helper.rb index 935a611d40..b532aa56c1 100644 --- a/test/helpers/create_doe_prototype_helper.rb +++ b/test/helpers/create_doe_prototype_helper.rb @@ -247,7 +247,7 @@ def CreateDOEPrototypeBuildingTest.create_building(building_type, model.setSqlFile(sql_file) end - acceptable_error_percentage = 0.001 + acceptable_error_percentage = 0.1 rounding_tolerance = 3 # Get the legacy simulation results