Skip to content

Commit

Permalink
Merge pull request #743 from NREL/relax_iecc_cz_years
Browse files Browse the repository at this point in the history
Relax IECC climate zone requirements
  • Loading branch information
shorowit authored Sep 7, 2024
2 parents 52c8a96 + cfa6102 commit 307b1d3
Show file tree
Hide file tree
Showing 329 changed files with 127 additions and 4,323 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ __New Features__
- Adds 2024 IECC ERI pathway calculation.
- **Breaking change**: Renamed `Emissions: <EmissionsType>: RESNET: XXX` to `Emissions: <EmissionsType>: ANSI301: XXX` in Annual Home CSV output files.
- Adds inputs for modeling skylight curbs and/or shafts.
- Relaxes IECC climate zone requirements.
- IECC climate zone years other than 2006 are now always optional; for programs that use specific IECC climate zone years (e.g., 2021 for ZERH SF 2.0), that year is used if provided, otherwise the next earliest provided year will be used with the assumption that the climate zone has not changed across the years.
- See [the documentation](https://openstudio-eri.readthedocs.io/en/latest/workflow_inputs.html#hpxml-climate-zones) for more information.

__Bugfixes__
- Adds error-checking for `NumberofConditionedFloorsAboveGrade`=0, which is not allowed per the documentation.
Expand Down
13 changes: 4 additions & 9 deletions docs/source/workflow_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,9 @@ One or more IECC climate zones are each entered as a ``/HPXML/Building/BuildingD

.. [#] Year choices are 2003, 2006, 2009, 2012, 2015, 2018, 2021, or 2024.
.. [#] The IECC climate zone for 2006 is always required.
Additional climate zones of other years may be required based on the programs selected for calculation:
IECC climate zone years other than 2006 are optional; for programs that use specific IECC climate zone years (e.g., 2021 for ZERH SF 2.0), that year is used if provided, otherwise the next earliest provided year will be used with the assumption that the climate zone has not changed across the years.
See below for the list of climate zone years used by different programs:
\- **IECC ERI 2015**: 2015
\- **IECC ERI 2018**: 2018
\- **IECC ERI 2021**: 2021
\- **IECC ERI 2024**: 2024
\- **ENERGY STAR SFNH National v3.2**: 2021
\- **ENERGY STAR MFNC National v1.2**: 2021
Expand All @@ -196,6 +189,8 @@ One or more IECC climate zones are each entered as a ``/HPXML/Building/BuildingD
\- **ZERH SF/MF 2.0**: 2021
\- **IECC ERI 20XX**: 20XX
.. [#] ClimateZone choices are "1A", "1B", "1C", "2A", "2B", "2C", "3A", "3B", "3C", "4A", "4B", "4C", "5A", "5B", "5C", "6A", "6B", "6C", "7", or "8".
HPXML Enclosure
Expand Down
12 changes: 6 additions & 6 deletions hpxml-measures/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>057ab6b7-cc47-4997-a94d-bfd8ce074486</version_id>
<version_modified>2024-09-06T15:48:09Z</version_modified>
<version_id>3b678540-7b41-4cda-8eb9-a829bb0c5fe4</version_id>
<version_modified>2024-09-06T17:17:54Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -363,7 +363,7 @@
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>0F6B9DD0</checksum>
<checksum>92BB7113</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand Down Expand Up @@ -621,7 +621,7 @@
<filename>waterheater.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>367FF6D6</checksum>
<checksum>20E8AE0A</checksum>
</file>
<file>
<filename>weather.rb</filename>
Expand Down Expand Up @@ -681,7 +681,7 @@
<filename>test_hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>84D82F35</checksum>
<checksum>A3E4F5E8</checksum>
</file>
<file>
<filename>test_hvac_sizing.rb</filename>
Expand Down Expand Up @@ -729,7 +729,7 @@
<filename>test_validation.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>ABE770EA</checksum>
<checksum>A0D2EEB9</checksum>
</file>
<file>
<filename>test_water_heater.rb</filename>
Expand Down
6 changes: 4 additions & 2 deletions hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2560,7 +2560,8 @@ def self.apply_hvac_location(hpxml_bldg)
end
elsif dist_type == HPXML::HVACDistributionTypeHydronic
# Assume same default logic as a water heater
hvac_system.location = Waterheater.get_default_location(hpxml_bldg, hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0])
iecc_zone = hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs.empty? ? nil : hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0].zone
hvac_system.location = Waterheater.get_default_location(hpxml_bldg, iecc_zone)
elsif dist_type == HPXML::HVACDistributionTypeDSE
# DSE=1 implies distribution system in conditioned space
has_dse_of_one = true
Expand Down Expand Up @@ -2754,7 +2755,8 @@ def self.apply_water_heaters(hpxml_bldg, nbeds, eri_version, schedules_file)
end
end
if water_heating_system.location.nil?
water_heating_system.location = Waterheater.get_default_location(hpxml_bldg, hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0])
iecc_zone = hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs.empty? ? nil : hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0].zone
water_heating_system.location = Waterheater.get_default_location(hpxml_bldg, iecc_zone)
water_heating_system.location_isdefaulted = true
end
next unless water_heating_system.usage_bin.nil? && (not water_heating_system.uniform_energy_factor.nil?) # FHR & UsageBin only applies to UEF
Expand Down
10 changes: 5 additions & 5 deletions hpxml-measures/HPXMLtoOpenStudio/resources/waterheater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1698,13 +1698,13 @@ def self.get_default_performance_adjustment(water_heating_system)
end
end

# TODO
# Returns the default location of the water heater based on the IECC climate zone.
#
# @param hpxml_bldg [HPXML::Building] HPXML Building object representing an individual dwelling unit
# @param climate_zone_iecc [TODO] TODO
# @return [TODO] TODO
def self.get_default_location(hpxml_bldg, climate_zone_iecc)
iecc_zone = (climate_zone_iecc.nil? ? nil : climate_zone_iecc.zone)
# @param iecc_zone [string] IECC climate zone
# @return [string] Water heater location (HPXML::LocationXXX)
def self.get_default_location(hpxml_bldg, iecc_zone = nil)
# ANSI/RESNET/ICC 301-2022C
if ['1A', '1B', '1C', '2A', '2B', '2C', '3A', '3B', '3C'].include? iecc_zone
location_hierarchy = [HPXML::LocationGarage,
HPXML::LocationConditionedSpace]
Expand Down
40 changes: 4 additions & 36 deletions hpxml-measures/HPXMLtoOpenStudio/tests/test_hvac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,7 @@ def test_air_to_air_heat_pump_1_speed

def test_air_to_air_heat_pump_multistage_backup_system
['base-hvac-air-to-air-heat-pump-1-speed-research-features.xml',
'base-hvac-air-to-air-heat-pump-2-speed-research-features.xml',
'base-hvac-air-to-air-heat-pump-var-speed-research-features.xml'].each do |hpxml_path|
'base-hvac-air-to-air-heat-pump-2-speed-research-features.xml'].each do |hpxml_path|
args_hash = {}
args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, hpxml_path))
model, _hpxml, hpxml_bldg = _test_measure(args_hash)
Expand Down Expand Up @@ -746,7 +745,7 @@ def test_air_to_air_heat_pump_var_speed_max_power_ratio
assert_equal(2, htg_coil.stages.size)

# Check supp heating coil
assert_equal(1, model.getCoilHeatingElectricMultiStages.size)
assert_equal(1, model.getCoilHeatingElectrics.size)

# Check EMS
assert_equal(1, model.getAirLoopHVACUnitarySystems.size)
Expand Down Expand Up @@ -809,7 +808,7 @@ def test_air_to_air_heat_pump_1_speed_onoff_thermostat

# Onoff thermostat with detailed setpoints
args_hash = {}
args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-hvac-room-ac-only-research-features-detailed-setpoints.xml'))
args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-hvac-room-ac-only-research-features.xml'))
model, hpxml, _hpxml_bldg = _test_measure(args_hash)

# Check cooling coil
Expand All @@ -827,37 +826,6 @@ def test_air_to_air_heat_pump_1_speed_onoff_thermostat
_check_onoff_thermostat_EMS(model, clg_coil, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0)
end

def test_air_to_air_heat_pump_2_speed_onoff_thermostat
args_hash = {}
args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-2-speed-research-features.xml'))
model, hpxml, _hpxml_bldg = _test_measure(args_hash)

# Check cooling coil
assert_equal(1, model.getCoilCoolingDXMultiSpeeds.size)
clg_coil = model.getCoilCoolingDXMultiSpeeds[0]

# Check heating coil
assert_equal(1, model.getCoilHeatingDXMultiSpeeds.size)
htg_coil = model.getCoilHeatingDXMultiSpeeds[0]

# Check supp heating coil
assert_equal(1, model.getCoilHeatingElectricMultiStages.size)

# E+ thermostat
onoff_thermostat_deadband = hpxml.header.hvac_onoff_thermostat_deadband
assert_equal(1, model.getThermostatSetpointDualSetpoints.size)
thermostat_setpoint = model.getThermostatSetpointDualSetpoints[0]
assert_in_epsilon(UnitConversions.convert(onoff_thermostat_deadband, 'deltaF', 'deltaC'), thermostat_setpoint.temperatureDifferenceBetweenCutoutAndSetpoint)

# Check EMS
assert_equal(1, model.getAirLoopHVACUnitarySystems.size)
_check_onoff_thermostat_EMS(model, htg_coil, 0.741, 0.379, -0.120, 2.154, -1.737, 0.584)
_check_onoff_thermostat_EMS(model, clg_coil, 0.655, 0.512, -0.167, 1.639, -0.999, 0.360)
# realistic staging EMS is hard to check values
program_values = get_ems_values(model.getEnergyManagementSystemPrograms, "#{model.getAirLoopHVACUnitarySystems[0].name} realistic cycling", true)
assert(!program_values.empty?) # Check EMS program
end

def test_heat_pump_advanced_defrost
# Var Speed heat pump test
args_hash = {}
Expand All @@ -871,7 +839,7 @@ def test_heat_pump_advanced_defrost
assert_equal(1, model.getCoilHeatingDXMultiSpeeds.size)
htg_coil = model.getCoilHeatingDXMultiSpeeds[0]
# q_dot smaller than backup capacity
_check_advanced_defrost(model, htg_coil, 4747.75, 4747.75, backup_fuel, 0.06667, 1067.05)
_check_advanced_defrost(model, htg_coil, 4747.75, 4747.75, backup_fuel, 0.06667, 1199.87)

# Single Speed heat pump test
args_hash = {}
Expand Down
2 changes: 1 addition & 1 deletion hpxml-measures/HPXMLtoOpenStudio/tests/test_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def test_schema_schematron_error_messages
'invalid-id2' => ["Element 'SystemIdentifier': The attribute 'id' is required but missing."],
'invalid-input-parameters' => ["Element 'Transaction': [facet 'enumeration'] The value 'modify' is not an element of the set {'create', 'update'}.",
"Element 'SiteType': [facet 'enumeration'] The value 'mountain' is not an element of the set {'rural', 'suburban', 'urban'}.",
"Element 'Year': [facet 'enumeration'] The value '2020' is not an element of the set {'2021', '2018', '2015', '2012', '2009', '2006', '2003'}.",
"Element 'Year': [facet 'enumeration'] The value '2020' is not an element of the set {'2024', '2021', '2018', '2015', '2012', '2009', '2006', '2003'}.",
"Element 'Azimuth': [facet 'maxExclusive'] The value '365' must be less than '360'.",
"Element 'RadiantBarrierGrade': [facet 'maxInclusive'] The value '4' is greater than the maximum value allowed ('3').",
"Element 'EnergyFactor': [facet 'maxInclusive'] The value '5.1' is greater than the maximum value allowed ('5')."],
Expand Down
2 changes: 1 addition & 1 deletion hpxml-measures/docs/source/workflow_inputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ Climate zone information can be optionally entered as an ``/HPXML/Building/Build
``ClimateZone`` string See [#]_ Yes IECC zone
================================= ======== ===== =========== ======== ======== ===============

.. [#] Year choices are 2003, 2006, 2009, 2012, 2015, 2018, or 2021.
.. [#] Year choices are 2003, 2006, 2009, 2012, 2015, 2018, 2021, or 2024.
.. [#] ClimateZone choices are "1A", "1B", "1C", "2A", "2B", "2C", "3A", "3B", "3C", "4A", "4B", "4C", "5A", "5B", "5C", "6A", "6B", "6C", "7", or "8".
If Climate zone information not provided, defaults according to the EPW weather file header.
Expand Down
41 changes: 2 additions & 39 deletions hpxml-measures/workflow/hpxml_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2005,19 +2005,8 @@
"hvac_control_heating_weekday_setpoint": "64, 64, 64, 64, 64, 64, 64, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 64, 64",
"hvac_control_heating_weekend_setpoint": "64, 64, 64, 64, 64, 64, 64, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 64, 64"
},
"sample_files/base-hvac-air-to-air-heat-pump-1-speed-lockout-temperatures-research-features.xml": {
"parent_hpxml": "sample_files/base-hvac-air-to-air-heat-pump-1-speed-lockout-temperatures.xml",
"site_iecc_zone": 7,
"site_state_code": "MN",
"weather_station_epw_filepath": "USA_MN_Duluth.Intl.AP.727450_TMY3.epw",
"simulation_control_timestep": 1,
"heat_pump_backup_heating_capacity": 34121.4,
"simulation_control_onoff_thermostat_deadband": 2,
"simulation_control_heat_pump_backup_heating_capacity_increment": 17060.71,
"simulation_control_defrost_model_type": "advanced"
},
"sample_files/base-hvac-air-to-air-heat-pump-1-speed-research-features.xml": {
"parent_hpxml": "sample_files/base-hvac-air-to-air-heat-pump-1-speed.xml",
"parent_hpxml": "sample_files/base-hvac-air-to-air-heat-pump-1-speed-lockout-temperatures.xml",
"site_iecc_zone": 7,
"site_state_code": "MN",
"weather_station_epw_filepath": "USA_MN_Duluth.Intl.AP.727450_TMY3.epw",
Expand All @@ -2040,17 +2029,6 @@
"heat_pump_cooling_efficiency": 18,
"heat_pump_cooling_compressor_type": "two stage"
},
"sample_files/base-hvac-air-to-air-heat-pump-2-speed-research-features.xml": {
"parent_hpxml": "sample_files/base-hvac-air-to-air-heat-pump-2-speed.xml",
"site_iecc_zone": 7,
"site_state_code": "MN",
"weather_station_epw_filepath": "USA_MN_Duluth.Intl.AP.727450_TMY3.epw",
"simulation_control_timestep": 1,
"simulation_control_onoff_thermostat_deadband": 2,
"heat_pump_backup_heating_capacity": 34121.4,
"simulation_control_heat_pump_backup_heating_capacity_increment": 17060.71,
"simulation_control_defrost_model_type": "advanced"
},
"sample_files/base-hvac-air-to-air-heat-pump-var-speed.xml": {
"parent_hpxml": "sample_files/base-hvac-air-to-air-heat-pump-1-speed.xml",
"heat_pump_heating_efficiency": 10,
Expand Down Expand Up @@ -2109,13 +2087,8 @@
},
"sample_files/base-hvac-air-to-air-heat-pump-var-speed-research-features.xml": {
"parent_hpxml": "sample_files/base-hvac-air-to-air-heat-pump-var-speed.xml",
"site_iecc_zone": 7,
"site_state_code": "MN",
"weather_station_epw_filepath": "USA_MN_Duluth.Intl.AP.727450_TMY3.epw",
"schedules_filepaths": "../../HPXMLtoOpenStudio/resources/schedule_files/hvac-variable-system-maximum-power-ratios-varied.csv",
"simulation_control_timestep": 1,
"heat_pump_backup_heating_capacity": 34121.4,
"simulation_control_heat_pump_backup_heating_capacity_increment": 17060.71,
"simulation_control_timestep": 60,
"simulation_control_defrost_model_type": "advanced"
},
"sample_files/base-hvac-air-to-air-heat-pump-var-speed-max-power-ratio-schedule-two-systems.xml": {
Expand Down Expand Up @@ -2261,11 +2234,6 @@
"cooling_system_cooling_efficiency": 18,
"cooling_system_cooling_compressor_type": "two stage"
},
"sample_files/base-hvac-central-ac-only-2-speed-research-features.xml": {
"parent_hpxml": "sample_files/base-hvac-central-ac-only-2-speed.xml",
"simulation_control_timestep": 1,
"simulation_control_onoff_thermostat_deadband": 2
},
"sample_files/base-hvac-central-ac-only-var-speed.xml": {
"parent_hpxml": "sample_files/base-hvac-central-ac-only-1-speed.xml",
"cooling_system_cooling_efficiency": 24,
Expand Down Expand Up @@ -2929,11 +2897,6 @@
"schedules_filepaths": "../../HPXMLtoOpenStudio/resources/schedule_files/setpoints-cooling-only.csv"
},
"sample_files/base-hvac-room-ac-only-research-features.xml": {
"parent_hpxml": "sample_files/base-hvac-room-ac-only.xml",
"simulation_control_timestep": 1,
"simulation_control_onoff_thermostat_deadband": 2
},
"sample_files/base-hvac-room-ac-only-research-features-detailed-setpoints.xml": {
"parent_hpxml": "sample_files/base-hvac-room-ac-only-detailed-setpoints.xml",
"simulation_control_timestep": 1,
"simulation_control_onoff_thermostat_deadband": 2
Expand Down
Loading

0 comments on commit 307b1d3

Please sign in to comment.