Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commercial water heaters #1150

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 29 additions & 12 deletions BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1717,13 +1717,20 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
water_heater_efficiency_type_choices = OpenStudio::StringVector.new
water_heater_efficiency_type_choices << 'EnergyFactor'
water_heater_efficiency_type_choices << 'UniformEnergyFactor'
water_heater_efficiency_type_choices << 'ThermalEfficiency'
water_heater_efficiency_type_choices << 'HeatPumpCOP'

water_heater_usage_bin_choices = OpenStudio::StringVector.new
water_heater_usage_bin_choices << HPXML::WaterHeaterUsageBinVerySmall
water_heater_usage_bin_choices << HPXML::WaterHeaterUsageBinLow
water_heater_usage_bin_choices << HPXML::WaterHeaterUsageBinMedium
water_heater_usage_bin_choices << HPXML::WaterHeaterUsageBinHigh

water_heater_standby_loss_units_choices = OpenStudio::StringVector.new
water_heater_standby_loss_units_choices << HPXML::UnitsDegFPerHour
water_heater_standby_loss_units_choices << HPXML::UnitsPercentPerHour
water_heater_standby_loss_units_choices << HPXML::UnitsBtuPerHour

arg = OpenStudio::Measure::OSArgument::makeChoiceArgument('water_heater_type', water_heater_type_choices, true)
arg.setDisplayName('Water Heater: Type')
arg.setDescription("The type of water heater. Use 'none' if there is no water heater.")
Expand All @@ -1749,13 +1756,13 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument

arg = OpenStudio::Measure::OSArgument::makeChoiceArgument('water_heater_efficiency_type', water_heater_efficiency_type_choices, true)
arg.setDisplayName('Water Heater: Efficiency Type')
arg.setDescription('The efficiency type of water heater. Does not apply to space-heating boilers.')
arg.setDescription("The efficiency type of water heater. Does not apply to space-heating boilers. For commercial water heaters, 'ThermalEfficiency' must be used for non-heat pump water heaters and 'HeatPumpCOP' must be used for heat pump water heaters.")
arg.setDefaultValue('EnergyFactor')
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('water_heater_efficiency', true)
arg.setDisplayName('Water Heater: Efficiency')
arg.setDescription('Rated Energy Factor or Uniform Energy Factor. Does not apply to space-heating boilers.')
arg.setDescription('Rated Energy Factor or Uniform Energy Factor or Thermal Efficiency. Does not apply to space-heating boilers.')
arg.setDefaultValue(0.67)
args << arg

Expand All @@ -1776,10 +1783,14 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
arg.setUnits('Btu/hr')
args << arg

arg = OpenStudio::Measure::OSArgument::makeChoiceArgument('water_heater_standby_loss_units', water_heater_standby_loss_units_choices, false)
arg.setDisplayName('Water Heater: Standby Loss Units')
arg.setDescription("The standby loss units of water heater. Only applies to space-heating boilers and commercial water heaters w/ thermal efficiency inputs. Must be '#{HPXML::UnitsDegFPerHour}' for space-heating boilers and must be '#{HPXML::UnitsBtuPerHour}' or '#{HPXML::UnitsPercentPerHour}' (entered as a fraction, e.g., 1.20%/hr = 0.0120) for commercial water heaters w/ thermal efficiency inputs.")
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('water_heater_standby_loss', false)
arg.setDisplayName('Water Heater: Standby Loss')
arg.setDescription('The standby loss of water heater. Only applies to space-heating boilers. If not provided, the OS-HPXML default is used.')
arg.setUnits('deg-F/hr')
args << arg

arg = OpenStudio::Measure::OSArgument::makeDoubleArgument('water_heater_jacket_rvalue', false)
Expand Down Expand Up @@ -5200,6 +5211,19 @@ def self.set_water_heating_systems(hpxml, args)
if water_heater_type != HPXML::WaterHeaterTypeTankless
usage_bin = args[:water_heater_usage_bin].get if args[:water_heater_usage_bin].is_initialized
end
elsif args[:water_heater_efficiency_type] == 'ThermalEfficiency' && args[:water_heater_type] != HPXML::WaterHeaterTypeHeatPump
thermal_efficiency = args[:water_heater_efficiency]
if args[:water_heater_standby_loss_units].is_initialized && args[:water_heater_standby_loss].is_initialized
standby_loss_units = args[:water_heater_standby_loss_units].get
standby_loss_value = args[:water_heater_standby_loss].get
end
elsif args[:water_heater_efficiency_type] == 'HeatPumpCOP' && args[:water_heater_type] == HPXML::WaterHeaterTypeHeatPump
heat_pump_cop = args[:water_heater_efficiency]
end
else
if args[:water_heater_standby_loss].is_initialized
standby_loss_units = args[:water_heater_standby_loss_units].get
standby_loss_value = args[:water_heater_standby_loss].get
end
end

Expand All @@ -5225,15 +5249,6 @@ def self.set_water_heating_systems(hpxml, args)
end
end

if [HPXML::WaterHeaterTypeCombiTankless, HPXML::WaterHeaterTypeCombiStorage].include? water_heater_type
if args[:water_heater_standby_loss].is_initialized
if args[:water_heater_standby_loss].get > 0
standby_loss_units = HPXML::UnitsDegFPerHour
standby_loss_value = args[:water_heater_standby_loss].get
end
end
end

if not [HPXML::WaterHeaterTypeTankless, HPXML::WaterHeaterTypeCombiTankless].include? water_heater_type
if args[:water_heater_jacket_rvalue].is_initialized
if args[:water_heater_jacket_rvalue].get > 0
Expand Down Expand Up @@ -5288,6 +5303,8 @@ def self.set_water_heating_systems(hpxml, args)
fraction_dhw_load_served: 1.0,
energy_factor: energy_factor,
uniform_energy_factor: uniform_energy_factor,
thermal_efficiency: thermal_efficiency,
heat_pump_cop: heat_pump_cop,
usage_bin: usage_bin,
recovery_efficiency: recovery_efficiency,
uses_desuperheater: uses_desuperheater,
Expand Down
41 changes: 35 additions & 6 deletions BuildResidentialHPXML/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.0</schema_version>
<name>build_residential_hpxml</name>
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
<version_id>9a3394b8-30aa-4f07-a4c7-dfa6bbf1ba4b</version_id>
<version_modified>20220929T155118Z</version_modified>
<version_id>1c9724ae-7bd0-45d7-baa5-69e468fcd7d8</version_id>
<version_modified>20220929T200809Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -3580,7 +3580,7 @@
<argument>
<name>water_heater_efficiency_type</name>
<display_name>Water Heater: Efficiency Type</display_name>
<description>The efficiency type of water heater. Does not apply to space-heating boilers.</description>
<description>The efficiency type of water heater. Does not apply to space-heating boilers. For commercial water heaters, 'ThermalEfficiency' must be used for non-heat pump water heaters and 'HeatPumpCOP' must be used for heat pump water heaters.</description>
<type>Choice</type>
<required>true</required>
<model_dependent>false</model_dependent>
Expand All @@ -3594,12 +3594,20 @@
<value>UniformEnergyFactor</value>
<display_name>UniformEnergyFactor</display_name>
</choice>
<choice>
<value>ThermalEfficiency</value>
<display_name>ThermalEfficiency</display_name>
</choice>
<choice>
<value>HeatPumpCOP</value>
<display_name>HeatPumpCOP</display_name>
</choice>
</choices>
</argument>
<argument>
<name>water_heater_efficiency</name>
<display_name>Water Heater: Efficiency</display_name>
<description>Rated Energy Factor or Uniform Energy Factor. Does not apply to space-heating boilers.</description>
<description>Rated Energy Factor or Uniform Energy Factor or Thermal Efficiency. Does not apply to space-heating boilers.</description>
<type>Double</type>
<required>true</required>
<model_dependent>false</model_dependent>
Expand Down Expand Up @@ -3649,12 +3657,33 @@
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>water_heater_standby_loss_units</name>
<display_name>Water Heater: Standby Loss Units</display_name>
<description>The standby loss units of water heater. Only applies to space-heating boilers and commercial water heaters w/ thermal efficiency inputs. Must be 'F/hr' for space-heating boilers and must be 'Btu/hr' or '%/hr' (entered as a fraction, e.g., 1.20%/hr = 0.0120) for commercial water heaters w/ thermal efficiency inputs.</description>
<type>Choice</type>
<required>false</required>
<model_dependent>false</model_dependent>
<choices>
<choice>
<value>F/hr</value>
<display_name>F/hr</display_name>
</choice>
<choice>
<value>%/hr</value>
<display_name>%/hr</display_name>
</choice>
<choice>
<value>Btu/hr</value>
<display_name>Btu/hr</display_name>
</choice>
</choices>
</argument>
<argument>
<name>water_heater_standby_loss</name>
<display_name>Water Heater: Standby Loss</display_name>
<description>The standby loss of water heater. Only applies to space-heating boilers. If not provided, the OS-HPXML default is used.</description>
<type>Double</type>
<units>deg-F/hr</units>
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
Expand Down Expand Up @@ -6413,7 +6442,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>C00BFDD4</checksum>
<checksum>2E6C3073</checksum>
</file>
</files>
</measure>