Skip to content

Commit

Permalink
Stub methods for returning water heater input capacity.
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-robertson committed Nov 11, 2024
1 parent a6a733e commit e2105d5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
8 changes: 4 additions & 4 deletions HPXMLtoOpenStudio/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>hpxm_lto_openstudio</name>
<uid>b1543b30-9465-45ff-ba04-1d1f85e763bc</uid>
<version_id>407c4252-0b8c-449f-8133-fc60cd57b161</version_id>
<version_modified>2024-11-08T21:18:51Z</version_modified>
<version_id>96a42644-93f3-4548-b2ee-bcb567050c61</version_id>
<version_modified>2024-11-11T20:31:29Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -327,7 +327,7 @@
<filename>defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>0E94E58B</checksum>
<checksum>37BCF629</checksum>
</file>
<file>
<filename>electric_panel.rb</filename>
Expand Down Expand Up @@ -363,7 +363,7 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>E1193114</checksum>
<checksum>92491A80</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand Down
16 changes: 5 additions & 11 deletions HPXMLtoOpenStudio/resources/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5975,7 +5975,8 @@ def self.get_panel_load_power_breaker_spaces_default_values(hpxml_bldg, panel_lo
watts += UnitConversions.convert(backup_heating_input_capacity, 'btu/hr', 'w') if heat_pump.backup_heating_fuel == HPXML::FuelTypeElectricity
else # max
# watts += [get_dx_coil_load_from_capacity(UnitConversions.convert(heat_pump.heating_capacity, 'btu/hr', 'kbtu/hr')), UnitConversions.convert(heat_pump.backup_heating_capacity, 'btu/hr', 'w')].max
watts += [UnitConversions.convert(heating_input_capacity, 'btu/hr', 'w'), UnitConversions.convert(backup_heating_input_capacity, 'btu/hr', 'w')].max
watts += [UnitConversions.convert(heating_input_capacity, 'btu/hr', 'w'),
UnitConversions.convert(backup_heating_input_capacity, 'btu/hr', 'w')].max
end
if heat_pump.backup_heating_fuel == HPXML::FuelTypeElectricity
if !distribution_system.nil?
Expand Down Expand Up @@ -6056,16 +6057,9 @@ def self.get_panel_load_power_breaker_spaces_default_values(hpxml_bldg, panel_lo
watts += UnitConversions.convert(water_heating_system.heating_capacity, 'btu/hr', 'w')
breaker_spaces += 1
elsif water_heating_system.water_heater_type == HPXML::WaterHeaterTypeHeatPump
if voltage == 120
watts += 1000
else
if water_heating_system.backup_heating_capacity.nil?
watts += UnitConversions.convert(water_heating_system.heating_capacity, 'btu/hr', 'w')
else # max
watts += [UnitConversions.convert(water_heating_system.heating_capacity, 'btu/hr', 'w'), UnitConversions.convert(water_heating_system.backup_heating_capacity, 'btu/hr', 'w')].max
end
breaker_spaces += 1
end
watts += [UnitConversions.convert(water_heating_system.heating_input_capacity, 'btu/hr', 'w'),
UnitConversions.convert(water_heating_system.backup_heating_input_capacity, 'btu/hr', 'w')].max
breaker_spaces += 1 if voltage == 240
elsif water_heating_system.water_heater_type == HPXML::WaterHeaterTypeTankless
if hpxml_bldg.building_construction.number_of_bathrooms == 1
watts += 18000
Expand Down
20 changes: 19 additions & 1 deletion HPXMLtoOpenStudio/resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7119,7 +7119,7 @@ def heating_input_capacity

# Returns the backup heating input capacity, calculated as the backup output capacity divided by the efficiency.
#
# @return [Double] The backuup heating input capacity (Btu/hr)
# @return [Double] The backup heating input capacity (Btu/hr)
def backup_heating_input_capacity
if not @backup_heating_efficiency_afue.nil?
return @backup_heating_capacity / @backup_heating_efficiency_afue
Expand Down Expand Up @@ -8632,6 +8632,24 @@ def panel_loads
return list
end

# Returns the heating input capacity, calculated as the output capacity divided by the efficiency.
#
# @return [Double] The heating input capacity (Btu/hr)
def heating_input_capacity
if not @additional_properties.cop.nil?
return @heating_capacity / UnitConversions.convert(@additional_properties.cop, 'btu/hr', 'w')
else
return @heating_capacity
end
end

# Returns the backup heating input capacity, calculated as the backup output capacity divided by the efficiency.
#
# @return [Double] The backup heating input capacity (Btu/hr)
def backup_heating_input_capacity
return @backup_heating_capacity
end

# Returns the HVAC system related to this water heating system (e.g., for
# a combination boiler that provides both water heating and space heating).
#
Expand Down

0 comments on commit e2105d5

Please sign in to comment.