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

Defrost Model Improvements #1674

Merged
merged 30 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0b08c5f
change E+ defrost inputs
yzhou601 Mar 25, 2024
dc68b98
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Apr 4, 2024
152071e
first cut of defrost EMS and other equipment objects
yzhou601 Apr 4, 2024
1596977
bugfix, default, and more test files
yzhou601 Apr 4, 2024
6330e3c
docs and hvac unit test added.
yzhou601 Apr 4, 2024
94b7513
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Apr 25, 2024
b35a7b6
unit multiplier bugfix, update q_dot p_dot calculation
yzhou601 Apr 25, 2024
ef48fd2
p_dot_blower and p_dot_odu_fan
yzhou601 Apr 25, 2024
af7ab86
bugfix
yzhou601 Apr 25, 2024
f186290
unit multiplier fix with blower and fan power accounted
yzhou601 Apr 25, 2024
502f687
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 May 1, 2024
bb25da0
updates for ductless systems
yzhou601 May 1, 2024
a4c855c
Latest results.
May 1, 2024
280d3ca
address a few comments
yzhou601 May 6, 2024
b12ba51
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit May 7, 2024
82d5f84
Latest results.
May 7, 2024
cba595e
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 May 8, 2024
a5b0fcc
refactor inputs
yzhou601 May 14, 2024
27b02b3
bugfix and docs
yzhou601 May 14, 2024
9c7249b
Latest results.
May 14, 2024
079f029
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 May 17, 2024
e2710bb
update measures
yzhou601 May 17, 2024
0f7604c
Merge branch 'defrost_improvements' of https://github.com/NREL/OpenSt…
yzhou601 May 17, 2024
f242ee1
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
shorowit May 17, 2024
ed22b0e
Misc language suggestions.
shorowit May 17, 2024
7305b3c
Latest results.
May 17, 2024
3da62e2
address comments
yzhou601 May 17, 2024
1953ddf
oops
yzhou601 May 17, 2024
dfadcfb
Fix error.
shorowit May 18, 2024
512a071
Throw error if old TCM input is used.
shorowit May 18, 2024
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
11 changes: 11 additions & 0 deletions BuildResidentialHPXML/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2470,6 +2470,17 @@ Heat Pump crankcase heater power consumption in Watts. Applies only to air-to-ai

<br/>

**Heat Pump: Advanced Defrost Approach**

Whether to apply advanced defrost approach.

- **Name:** ``heat_pump_advanced_defrost_approach``
- **Type:** ``Boolean``

- **Required:** ``false``

<br/>

**HVAC Detailed Performance Data: Capacity Type**

Type of capacity values for detailed performance data if available. Applies only to variable-speed air-source HVAC systems (central air conditioners, mini-split air conditioners, air-to-air heat pumps, and mini-split heat pumps).
Expand Down
12 changes: 12 additions & 0 deletions BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,11 @@ def arguments(model) # rubocop:disable Lint/UnusedMethodArgument
arg.setUnits('W')
args << arg

arg = OpenStudio::Measure::OSArgument::makeBoolArgument('heat_pump_advanced_defrost_approach', false)
arg.setDisplayName('Heat Pump: Advanced Defrost Approach')
arg.setDescription('Whether to apply advanced defrost approach.')
args << arg

perf_data_capacity_type_choices = OpenStudio::StringVector.new
perf_data_capacity_type_choices << 'Absolute capacities'
perf_data_capacity_type_choices << 'Normalized capacity fractions'
Expand Down Expand Up @@ -5584,6 +5589,12 @@ def self.set_heat_pumps(hpxml_bldg, args)
end
end

if args[:heat_pump_advanced_defrost_approach].is_initialized
if [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpMiniSplit, HPXML::HVACTypeHeatPumpPTHP, HPXML::HVACTypeHeatPumpRoom].include?(heat_pump_type)
heat_pump_advanced_defrost_approach = args[:heat_pump_advanced_defrost_approach].get
end
end

fraction_heat_load_served = args[:heat_pump_fraction_heat_load_served]
fraction_cool_load_served = args[:heat_pump_fraction_cool_load_served]

Expand Down Expand Up @@ -5630,6 +5641,7 @@ def self.set_heat_pumps(hpxml_bldg, args)
airflow_defect_ratio: airflow_defect_ratio,
charge_defect_ratio: charge_defect_ratio,
crankcase_heater_watts: heat_pump_crankcase_heater_watts,
advanced_defrost_approach: heat_pump_advanced_defrost_approach,
primary_heating_system: primary_heating_system,
primary_cooling_system: primary_cooling_system)

Expand Down
26 changes: 22 additions & 4 deletions BuildResidentialHPXML/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>build_residential_hpxml</name>
<uid>a13a8983-2b01-4930-8af2-42030b6e4233</uid>
<version_id>b782d66b-066c-47f5-90db-b397e3392d3e</version_id>
<version_modified>2024-04-29T21:40:42Z</version_modified>
<version_id>85a6fd2e-890f-43c0-a857-f3a2bbe318d2</version_id>
<version_modified>2024-05-01T18:16:59Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -3027,6 +3027,24 @@
<required>false</required>
<model_dependent>false</model_dependent>
</argument>
<argument>
<name>heat_pump_advanced_defrost_approach</name>
<display_name>Heat Pump: Advanced Defrost Approach</display_name>
<description>Whether to apply advanced defrost approach.</description>
<type>Boolean</type>
<required>false</required>
<model_dependent>false</model_dependent>
<choices>
<choice>
<value>true</value>
<display_name>true</display_name>
</choice>
<choice>
<value>false</value>
<display_name>false</display_name>
</choice>
</choices>
</argument>
<argument>
<name>hvac_perf_data_capacity_type</name>
<display_name>HVAC Detailed Performance Data: Capacity Type</display_name>
Expand Down Expand Up @@ -7325,7 +7343,7 @@
<filename>README.md</filename>
<filetype>md</filetype>
<usage_type>readme</usage_type>
<checksum>54A95546</checksum>
<checksum>0B9494DA</checksum>
</file>
<file>
<filename>README.md.erb</filename>
Expand All @@ -7342,7 +7360,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>A4FCB77B</checksum>
<checksum>FD10031B</checksum>
</file>
<file>
<filename>geometry.rb</filename>
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ __New Features__
- Allows autosizing with detailed performance data inputs for variable-speed HVAC systems using `CapacityFractionOfNominal`.
- Adds maximum power ratio detailed schedule for variable-speed HVAC systems to model shedding controls per [AHRI 1380](https://www.ahrinet.org/search-standards/ahri-1380-i-p-demand-response-through-variable-capacity-hvac-systems-residential-and-small).
- Now defaults to -20F for `CompressorLockoutTemperature` for variable-speed heat pump systems.
- Allow an optional boolean input `HeatPump/extension/AdvancedDefrostApproach` for heat pump advanced defrost model.
- Ground source heat pump enhancements:
- Allows optional detailed inputs related to geothermal loop (`HVACPlant/GeothermalLoop`).
- Allows optional ground diffusivity input.
Expand Down
9 changes: 6 additions & 3 deletions HPXMLtoOpenStudio/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1599,7 +1599,8 @@ def add_cooling_system(model, runner, weather, spaces, airloop_map)

airloop_map[sys_id] = HVAC.apply_air_source_hvac_systems(model, runner, cooling_system, heating_system, sequential_cool_load_fracs, sequential_heat_load_fracs,
weather.data.AnnualMaxDrybulb, weather.data.AnnualMinDrybulb,
conditioned_zone, @hvac_unavailable_periods, @schedules_file, @hpxml_bldg)
conditioned_zone, @hvac_unavailable_periods, @schedules_file, @hpxml_bldg,
spaces[HPXML::LocationConditionedSpace], @hpxml_bldg.building_construction.number_of_units)

elsif [HPXML::HVACTypeEvaporativeCooler].include? cooling_system.cooling_system_type

Expand Down Expand Up @@ -1644,7 +1645,8 @@ def add_heating_system(runner, model, weather, spaces, airloop_map)

airloop_map[sys_id] = HVAC.apply_air_source_hvac_systems(model, runner, nil, heating_system, [0], sequential_heat_load_fracs,
weather.data.AnnualMaxDrybulb, weather.data.AnnualMinDrybulb,
conditioned_zone, @hvac_unavailable_periods, @schedules_file, @hpxml_bldg)
conditioned_zone, @hvac_unavailable_periods, @schedules_file, @hpxml_bldg,
spaces[HPXML::LocationConditionedSpace], @hpxml_bldg.building_construction.number_of_units)

elsif [HPXML::HVACTypeBoiler].include? heating_system.heating_system_type

Expand Down Expand Up @@ -1707,7 +1709,8 @@ def add_heat_pump(runner, model, weather, spaces, airloop_map)

airloop_map[sys_id] = HVAC.apply_air_source_hvac_systems(model, runner, heat_pump, heat_pump, sequential_cool_load_fracs, sequential_heat_load_fracs,
weather.data.AnnualMaxDrybulb, weather.data.AnnualMinDrybulb,
conditioned_zone, @hvac_unavailable_periods, @schedules_file, @hpxml_bldg)
conditioned_zone, @hvac_unavailable_periods, @schedules_file, @hpxml_bldg,
spaces[HPXML::LocationConditionedSpace], @hpxml_bldg.building_construction.number_of_units)
elsif [HPXML::HVACTypeHeatPumpGroundToAir].include? heat_pump.heat_pump_type

airloop_map[sys_id] = HVAC.apply_ground_to_air_heat_pump(model, runner, weather, heat_pump,
Expand Down
18 changes: 9 additions & 9 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>b55edf04-941c-413c-bb54-af96ee6e3aac</version_id>
<version_modified>2024-04-29T21:40:45Z</version_modified>
<version_id>c515278b-e434-40b1-a058-92abdf42c122</version_id>
<version_modified>2024-05-01T18:17:49Z</version_modified>
<xml_checksum>D8922A73</xml_checksum>
<class_name>HPXMLtoOpenStudio</class_name>
<display_name>HPXML to OpenStudio Translator</display_name>
Expand Down Expand Up @@ -142,7 +142,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>50FE267E</checksum>
<checksum>3CD37C24</checksum>
</file>
<file>
<filename>airflow.rb</filename>
Expand All @@ -160,7 +160,7 @@
<filename>constants.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>2568BDAC</checksum>
<checksum>24150618</checksum>
</file>
<file>
<filename>constructions.rb</filename>
Expand Down Expand Up @@ -304,13 +304,13 @@
<filename>hpxml.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>6B0D03F0</checksum>
<checksum>542D9000</checksum>
</file>
<file>
<filename>hpxml_defaults.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>7DD4B643</checksum>
<checksum>A0F41798</checksum>
</file>
<file>
<filename>hpxml_schema/HPXML.xsd</filename>
Expand All @@ -328,7 +328,7 @@
<filename>hpxml_schematron/EPvalidator.xml</filename>
<filetype>xml</filetype>
<usage_type>resource</usage_type>
<checksum>2DB8CF14</checksum>
<checksum>6AC00EE1</checksum>
</file>
<file>
<filename>hpxml_schematron/iso-schematron.xsd</filename>
Expand All @@ -340,7 +340,7 @@
<filename>hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>5C9FA161</checksum>
<checksum>4F07D423</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
Expand Down Expand Up @@ -622,7 +622,7 @@
<filename>test_hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>1F2A5548</checksum>
<checksum>8CDA3FA3</checksum>
</file>
<file>
<filename>test_hvac_sizing.rb</filename>
Expand Down
4 changes: 4 additions & 0 deletions HPXMLtoOpenStudio/resources/constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,10 @@ def self.ObjectNamePTAC
return 'packaged terminal air conditioner'
end

def self.ObjectNameBackupSuppHeat
return 'back up supp heat'
end

def self.ObjectNameMiscGrill
return 'misc grill'
end
Expand Down
4 changes: 3 additions & 1 deletion HPXMLtoOpenStudio/resources/hpxml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4812,7 +4812,7 @@ def initialize(hpxml_object, *args)
:heating_airflow_cfm, :cooling_airflow_cfm, :location, :primary_heating_system, :primary_cooling_system,
:heating_capacity_retention_fraction, :heating_capacity_retention_temp, :crankcase_heater_watts,
:geothermal_loop_idref, :cooling_autosizing_factor, :heating_autosizing_factor, :backup_heating_autosizing_factor,
:cooling_autosizing_limit, :heating_autosizing_limit, :backup_heating_autosizing_limit]
:cooling_autosizing_limit, :heating_autosizing_limit, :backup_heating_autosizing_limit, :advanced_defrost_approach]
attr_accessor(*ATTRS)
attr_reader(:cooling_detailed_performance_data)
attr_reader(:heating_detailed_performance_data)
Expand Down Expand Up @@ -4997,6 +4997,7 @@ def to_doc(building)
XMLHelper.add_extension(heat_pump, 'CoolingAutosizingLimit', @cooling_autosizing_limit, :float, @cooling_autosizing_limit_isdefaulted) unless @cooling_autosizing_limit.nil?
XMLHelper.add_extension(heat_pump, 'HeatingAutosizingLimit', @heating_autosizing_limit, :float, @heating_autosizing_limit_isdefaulted) unless @heating_autosizing_limit.nil?
XMLHelper.add_extension(heat_pump, 'BackupHeatingAutosizingLimit', @backup_heating_autosizing_limit, :float, @backup_heating_autosizing_limit_isdefaulted) unless @backup_heating_autosizing_limit.nil?
XMLHelper.add_extension(heat_pump, 'AdvancedDefrostApproach', @advanced_defrost_approach, :boolean, @advanced_defrost_approach_isdefaulted) unless @advanced_defrost_approach.nil?
XMLHelper.add_extension(heat_pump, 'HeatingSeedId', @htg_seed_id, :string) unless @htg_seed_id.nil?
XMLHelper.add_extension(heat_pump, 'CoolingSeedId', @clg_seed_id, :string) unless @clg_seed_id.nil?
if @primary_heating_system
Expand Down Expand Up @@ -5064,6 +5065,7 @@ def from_doc(heat_pump)
@cooling_autosizing_limit = XMLHelper.get_value(heat_pump, 'extension/CoolingAutosizingLimit', :float)
@heating_autosizing_limit = XMLHelper.get_value(heat_pump, 'extension/HeatingAutosizingLimit', :float)
@backup_heating_autosizing_limit = XMLHelper.get_value(heat_pump, 'extension/BackupHeatingAutosizingLimit', :float)
@advanced_defrost_approach = XMLHelper.get_value(heat_pump, 'extension/AdvancedDefrostApproach', :boolean)
@htg_seed_id = XMLHelper.get_value(heat_pump, 'extension/HeatingSeedId', :string)
@clg_seed_id = XMLHelper.get_value(heat_pump, 'extension/CoolingSeedId', :string)
primary_heating_system = HPXML::get_idref(XMLHelper.get_element(heat_pump, '../PrimarySystems/PrimaryHeatingSystem'))
Expand Down
9 changes: 9 additions & 0 deletions HPXMLtoOpenStudio/resources/hpxml_defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1429,6 +1429,15 @@ def self.apply_hvac(runner, hpxml, hpxml_bldg, weather, convert_shared_systems)
heat_pump.backup_heating_lockout_temp_isdefaulted = true
end

# Default advanced defrost
hpxml_bldg.heat_pumps.each do |heat_pump|
next unless heat_pump.advanced_defrost_approach.nil?
next unless [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpMiniSplit, HPXML::HVACTypeHeatPumpRoom, HPXML::HVACTypeHeatPumpPTHP].include? heat_pump.heat_pump_type

heat_pump.advanced_defrost_approach = false
heat_pump.backup_heating_lockout_temp_isdefaulted = true
end

# Default electric resistance distribution
hpxml_bldg.heating_systems.each do |heating_system|
next unless heating_system.heating_system_type == HPXML::HVACTypeElectricResistance
Expand Down
3 changes: 3 additions & 0 deletions HPXMLtoOpenStudio/resources/hpxml_schematron/EPvalidator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1269,6 +1269,7 @@
<sch:assert role='ERROR' test='number(h:extension/h:ChargeDefectRatio) &lt;= 9 or not(h:extension/h:ChargeDefectRatio)'>Expected extension/ChargeDefectRatio to be less than or equal to 9</sch:assert>
<sch:assert role='ERROR' test='count(h:extension/h:CrankcaseHeaterPowerWatts) &lt;= 1'>Expected 0 or 1 element(s) for xpath: extension/CrankcaseHeaterPowerWatts</sch:assert>
<sch:assert role='ERROR' test='number(h:extension/h:CrankcaseHeaterPowerWatts) &gt;= 0.0 or not(h:extension/h:CrankcaseHeaterPowerWatts)'>Expected extension/CrankcaseHeaterPowerWatts to be greater than or equal to 0.0.</sch:assert>
<sch:assert role='ERROR' test='count(h:extension/h:AdvancedDefrostApproach) &lt;= 1'>Expected 0 or 1 element(s) for xpath: extension/AdvancedDefrostApproach</sch:assert>
<!-- Warnings -->
<sch:report role='WARN' test='number(h:AnnualCoolingEfficiency[h:Units="SEER"]/h:Value) &lt; 8'>SEER should typically be greater than or equal to 8.</sch:report>
<sch:report role='WARN' test='number(h:AnnualCoolingEfficiency[h:Units="SEER2"]/h:Value) &lt; 8'>SEER2 should typically be greater than or equal to 8.</sch:report>
Expand Down Expand Up @@ -1314,6 +1315,7 @@
<sch:assert role='ERROR' test='number(h:extension/h:ChargeDefectRatio) &lt;= 9 or not(h:extension/h:ChargeDefectRatio)'>Expected extension/ChargeDefectRatio to be less than or equal to 9</sch:assert>
<sch:assert role='ERROR' test='count(h:extension/h:CrankcaseHeaterPowerWatts) &lt;= 1'>Expected 0 or 1 element(s) for xpath: extension/CrankcaseHeaterPowerWatts</sch:assert>
<sch:assert role='ERROR' test='number(h:extension/h:CrankcaseHeaterPowerWatts) &gt;= 0.0 or not(h:extension/h:CrankcaseHeaterPowerWatts)'>Expected extension/CrankcaseHeaterPowerWatts to be greater than or equal to 0.0.</sch:assert>
<sch:assert role='ERROR' test='count(h:extension/h:AdvancedDefrostApproach) &lt;= 1'>Expected 0 or 1 element(s) for xpath: extension/AdvancedDefrostApproach</sch:assert>
<!-- Warnings -->
<sch:report role='WARN' test='number(h:AnnualCoolingEfficiency[h:Units="SEER"]/h:Value) &lt; 8'>SEER should typically be greater than or equal to 8.</sch:report>
<sch:report role='WARN' test='number(h:AnnualCoolingEfficiency[h:Units="SEER2"]/h:Value) &lt; 8'>SEER2 should typically be greater than or equal to 8.</sch:report>
Expand Down Expand Up @@ -1409,6 +1411,7 @@
<sch:assert role='ERROR' test='count(h:FractionCoolLoadServed) = 1'>Expected 1 element(s) for xpath: FractionCoolLoadServed</sch:assert>
<sch:assert role='ERROR' test='count(h:extension/h:CrankcaseHeaterPowerWatts) &lt;= 1'>Expected 0 or 1 element(s) for xpath: extension/CrankcaseHeaterPowerWatts</sch:assert>
<sch:assert role='ERROR' test='number(h:extension/h:CrankcaseHeaterPowerWatts) &gt;= 0.0 or not(h:extension/h:CrankcaseHeaterPowerWatts)'>Expected extension/CrankcaseHeaterPowerWatts to be greater than or equal to 0.0.</sch:assert>
<sch:assert role='ERROR' test='count(h:extension/h:AdvancedDefrostApproach) &lt;= 1'>Expected 0 or 1 element(s) for xpath: extension/AdvancedDefrostApproach</sch:assert>
<!-- Warnings -->
<sch:report role='WARN' test='number(h:HeatingCapacity) &lt;= 1000 and number(h:HeatingCapacity) &gt; 0 and h:HeatingCapacity'>Heating capacity should typically be greater than or equal to 1000 Btu/hr.</sch:report>
<sch:report role='WARN' test='number(h:CoolingCapacity) &lt;= 1000 and number(h:CoolingCapacity) &gt; 0 and h:CoolingCapacity'>Cooling capacity should typically be greater than or equal to 1000 Btu/hr.</sch:report>
Expand Down