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

Allow Modeling Two Speed & Var Speed Geothermal Heat Pumps #1878

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
100e02a
added test files, create coil object with placeholders
yzhou601 Nov 8, 2024
6c0629b
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Nov 25, 2024
f41d4f1
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Dec 19, 2024
74e100c
fix issues, add heating coil object
yzhou601 Dec 19, 2024
0788320
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Dec 26, 2024
346d8c9
added performance curves for two speed gshp, more assumptions and inp…
yzhou601 Dec 27, 2024
2182a8f
updated performance curves, capacity ratios, cfm/tons based on E+ rat…
yzhou601 Dec 28, 2024
cba4f31
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Jan 9, 2025
4615f89
hvac sizing cleanups for two speed GSHP, added rated cop ratios at ea…
yzhou601 Jan 9, 2025
c883e62
bugfix
yzhou601 Jan 9, 2025
ed642d8
Added temperature max/min values to curves, fixed airflow and water f…
yzhou601 Jan 9, 2025
58e8142
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Jan 9, 2025
7facd88
bugfixes, installation quality program(haven't finished yet)
yzhou601 Jan 10, 2025
b1512e2
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Jan 10, 2025
d1d0cc8
oops, remove debugging statements
yzhou601 Jan 10, 2025
ab22fcc
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Jan 16, 2025
1010b16
fix sizing unit test
yzhou601 Jan 17, 2025
7cabcbc
iq ems
yzhou601 Jan 17, 2025
302d4a8
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BuildResidentialHPXML/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5767,7 +5767,7 @@ def self.set_heat_pumps(hpxml_bldg, args)
end
end

if [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpMiniSplit].include? heat_pump_type
if [HPXML::HVACTypeHeatPumpAirToAir, HPXML::HVACTypeHeatPumpMiniSplit, HPXML::HVACTypeHeatPumpGroundToAir].include? heat_pump_type
compressor_type = args[:heat_pump_cooling_compressor_type]
end

Expand Down
6 changes: 3 additions & 3 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>1fbc249e-108c-4567-82f0-a04bc6a3374c</version_id>
<version_modified>2025-01-15T22:36:22Z</version_modified>
<version_id>54f3be39-bbda-4b53-8238-20c4166edca5</version_id>
<version_modified>2025-01-16T23:01:22Z</version_modified>
<xml_checksum>2C38F48B</xml_checksum>
<class_name>BuildResidentialHPXML</class_name>
<display_name>HPXML Builder</display_name>
Expand Down Expand Up @@ -7544,7 +7544,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>DF604C07</checksum>
<checksum>89B21962</checksum>
</file>
<file>
<filename>constants.rb</filename>
Expand Down
16 changes: 8 additions & 8 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>ddf8813a-f35c-400b-890b-d26121d86506</version_id>
<version_modified>2025-01-17T00:21:50Z</version_modified>
<version_id>73c9cb1b-0673-4001-a005-df29d99cfc77</version_id>
<version_modified>2025-01-17T22:19:51Z</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>EB4D5A1A</checksum>
<checksum>EE5FDB35</checksum>
</file>
<file>
<filename>energyplus.rb</filename>
Expand Down Expand Up @@ -387,13 +387,13 @@
<filename>hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>4051AA19</checksum>
<checksum>0F7B3014</checksum>
</file>
<file>
<filename>hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>A079BB8E</checksum>
<checksum>59065A65</checksum>
</file>
<file>
<filename>internal_gains.rb</filename>
Expand Down Expand Up @@ -693,13 +693,13 @@
<filename>test_hvac.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>7954392A</checksum>
<checksum>01F47953</checksum>
</file>
<file>
<filename>test_hvac_sizing.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>DF5913B9</checksum>
<checksum>E2A21B6A</checksum>
</file>
<file>
<filename>test_lighting.rb</filename>
Expand Down Expand Up @@ -747,7 +747,7 @@
<filename>test_water_heater.rb</filename>
<filetype>rb</filetype>
<usage_type>test</usage_type>
<checksum>60CD4A1F</checksum>
<checksum>906475AB</checksum>
</file>
<file>
<filename>test_weather.rb</filename>
Expand Down
4 changes: 4 additions & 0 deletions HPXMLtoOpenStudio/resources/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5348,6 +5348,10 @@ def self.get_hvac_compressor_type(hvac_type, seer)
when HPXML::HVACTypeMiniSplitAirConditioner,
HPXML::HVACTypeHeatPumpMiniSplit
return HPXML::HVACCompressorTypeVariableSpeed
when HPXML::HVACTypeHeatPumpGroundToAir
# TODO: default GSHP compressor type based on COP?
# TODO: Leave it for now to avoid impacting desuperheater capability, update when var speed desuperheater is allowed in E+
return HPXML::HVACCompressorTypeSingleStage
when HPXML::HVACTypePTAC,
HPXML::HVACTypeHeatPumpPTHP,
HPXML::HVACTypeHeatPumpRoom,
Expand Down
452 changes: 377 additions & 75 deletions HPXMLtoOpenStudio/resources/hvac.rb

Large diffs are not rendered by default.

374 changes: 219 additions & 155 deletions HPXMLtoOpenStudio/resources/hvac_sizing.rb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions HPXMLtoOpenStudio/tests/test_hvac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ def test_mini_split_air_conditioner

def test_ground_to_air_heat_pump
args_hash = {}
args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-hvac-ground-to-air-heat-pump.xml'))
args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-hvac-ground-to-air-heat-pump-1-speed.xml'))
model, _hpxml, hpxml_bldg = _test_measure(args_hash)

# Get HPXML values
Expand Down Expand Up @@ -1495,7 +1495,7 @@ def test_install_quality_furnace_gas

def test_install_quality_ground_to_air_heat_pump
args_hash = {}
args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-hvac-install-quality-ground-to-air-heat-pump.xml'))
args_hash['hpxml_path'] = File.absolute_path(File.join(@sample_files_path, 'base-hvac-install-quality-ground-to-air-heat-pump-1-speed.xml'))
model, _hpxml, hpxml_bldg = _test_measure(args_hash)

# Get HPXML values
Expand Down
9 changes: 5 additions & 4 deletions HPXMLtoOpenStudio/tests/test_hvac_sizing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def test_hvac_configurations
args_hash = { 'hpxml_path' => File.absolute_path(@tmp_hpxml_path),
'skip_validation' => true }
Dir["#{@sample_files_path}/base-hvac*.xml"].each do |hvac_hpxml|
next if hvac_hpxml.include? 'ground-to-air-heat-pump-var-speed'
next if (hvac_hpxml.include? 'autosize')
next if hvac_hpxml.include? 'detailed-performance' # Autosizing not allowed

Expand Down Expand Up @@ -1777,30 +1778,30 @@ def test_gshp_geothermal_loop
args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)

# Base case
hpxml, _hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump.xml')
hpxml, _hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump-1-speed.xml')
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_model, _test_hpxml, test_hpxml_bldg = _test_measure(args_hash)
assert_equal(3, test_hpxml_bldg.geothermal_loops[0].num_bore_holes)
assert_in_epsilon(192.0, test_hpxml_bldg.geothermal_loops[0].bore_length, 0.01)

# Bore depth greater than the max -> increase number of boreholes
hpxml, hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump.xml')
hpxml, hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump-1-speed.xml')
hpxml_bldg.site.ground_conductivity = 0.18
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_model, _test_hpxml, test_hpxml_bldg = _test_measure(args_hash)
assert_equal(5, test_hpxml_bldg.geothermal_loops[0].num_bore_holes)
assert_in_epsilon(439.0, test_hpxml_bldg.geothermal_loops[0].bore_length, 0.01)

# Bore depth greater than the max -> increase number of boreholes until the max, set depth to the max, and issue warning
hpxml, hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump.xml')
hpxml, hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump-1-speed.xml')
hpxml_bldg.site.ground_conductivity = 0.07
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_model, _test_hpxml, test_hpxml_bldg = _test_measure(args_hash)
assert_equal(10, test_hpxml_bldg.geothermal_loops[0].num_bore_holes)
assert_in_epsilon(500.0, test_hpxml_bldg.geothermal_loops[0].bore_length, 0.01)

# Boreholes greater than the max -> decrease the number of boreholes until the max
hpxml, hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump.xml')
hpxml, hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump-1-speed.xml')
hpxml_bldg.heat_pumps[0].cooling_capacity *= 5
XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
_model, _test_hpxml, test_hpxml_bldg = _test_measure(args_hash)
Expand Down
2 changes: 1 addition & 1 deletion HPXMLtoOpenStudio/tests/test_water_heater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def test_dsh_var_speed

def test_dsh_gshp
args_hash = {}
args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-dhw-desuperheater-gshp.xml'))
args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-dhw-desuperheater-ghp.xml'))
model, _hpxml, hpxml_bldg = _test_measure(args_hash)

# Get HPXML values
Expand Down
4 changes: 2 additions & 2 deletions ReportSimulationOutput/measure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2857,7 +2857,7 @@ def get_object_outputs_by_key(model, object, class_name)
return { [to_ft[fuel], EUT::Heating] => ["Heating Coil #{fuel} Energy", "Heating Coil Ancillary #{fuel} Energy"] }
end

elsif object.to_CoilHeatingWaterToAirHeatPumpEquationFit.is_initialized
elsif object.to_CoilHeatingWaterToAirHeatPumpEquationFit.is_initialized || object.to_CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFit.is_initialized
return { [FT::Elec, EUT::Heating] => ["Heating Coil #{EPlus::FuelTypeElectricity} Energy"] }

elsif object.to_ZoneHVACBaseboardConvectiveElectric.is_initialized
Expand Down Expand Up @@ -2906,7 +2906,7 @@ def get_object_outputs_by_key(model, object, class_name)
end
return vars

elsif object.to_CoilCoolingWaterToAirHeatPumpEquationFit.is_initialized
elsif object.to_CoilCoolingWaterToAirHeatPumpEquationFit.is_initialized || object.to_CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.is_initialized
return { [FT::Elec, EUT::Cooling] => ["Cooling Coil #{EPlus::FuelTypeElectricity} Energy"] }

elsif object.to_EvaporativeCoolerDirectResearchSpecial.is_initialized
Expand Down
6 changes: 3 additions & 3 deletions ReportSimulationOutput/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>report_simulation_output</name>
<uid>df9d170c-c21a-4130-866d-0d46b06073fd</uid>
<version_id>5e609cb1-8e83-479b-afda-c1de10cd62ea</version_id>
<version_modified>2024-11-27T02:33:41Z</version_modified>
<version_id>615f4066-7143-42fb-a5df-3e75c61d42da</version_id>
<version_modified>2025-01-10T20:23:42Z</version_modified>
<xml_checksum>9BF1E6AC</xml_checksum>
<class_name>ReportSimulationOutput</class_name>
<display_name>HPXML Simulation Output Report</display_name>
Expand Down Expand Up @@ -1929,7 +1929,7 @@
<filename>measure.rb</filename>
<filetype>rb</filetype>
<usage_type>script</usage_type>
<checksum>4C7478A8</checksum>
<checksum>8265E27A</checksum>
</file>
<file>
<filename>test_report_sim_output.rb</filename>
Expand Down
41 changes: 30 additions & 11 deletions workflow/hpxml_inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1312,8 +1312,8 @@
"parent_hpxml": "sample_files/base-hvac-central-ac-only-2-speed.xml",
"water_heater_uses_desuperheater": true
},
"sample_files/base-dhw-desuperheater-gshp.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"sample_files/base-dhw-desuperheater-ghp.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"water_heater_uses_desuperheater": true
},
"sample_files/base-dhw-desuperheater-hpwh.xml": {
Expand Down Expand Up @@ -2554,7 +2554,7 @@
"sample_files/base-hvac-furnace-x3-dse.xml": {
"parent_hpxml": "sample_files/base.xml"
},
"sample_files/base-hvac-ground-to-air-heat-pump.xml": {
"sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml": {
"parent_hpxml": "sample_files/base.xml",
"heating_system_type": "none",
"heating_system_heating_efficiency": 0,
Expand All @@ -2563,6 +2563,7 @@
"cooling_system_cooling_efficiency": 0,
"cooling_system_fraction_cool_load_served": 0,
"heat_pump_type": "ground-to-air",
"heat_pump_cooling_compressor_type": "single stage",
"heat_pump_heating_efficiency_type": "COP",
"heat_pump_heating_efficiency": 3.6,
"heat_pump_cooling_efficiency_type": "EER",
Expand All @@ -2574,22 +2575,34 @@
"heat_pump_fraction_cool_load_served": 1,
"heat_pump_backup_type": "none"
},
"sample_files/base-hvac-ground-to-air-heat-pump-2-speed.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_heating_efficiency": 4.0,
"heat_pump_cooling_efficiency": 18,
"heat_pump_cooling_compressor_type": "two stage"
},
"sample_files/base-hvac-ground-to-air-heat-pump-var-speed.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_heating_efficiency": 4.5,
"heat_pump_cooling_efficiency": 19,
"heat_pump_cooling_compressor_type": "variable speed"
},
"sample_files/base-hvac-ground-to-air-heat-pump-backup-integrated.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_backup_type": "integrated",
"heat_pump_backup_heating_efficiency": 1,
"heat_pump_backup_heating_capacity": 36000
},
"sample_files/base-hvac-ground-to-air-heat-pump-backup-stove.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_backup_type": "separate",
"heating_system_2_type": "Stove",
"heating_system_2_fuel": "fuel oil",
"heating_system_2_heating_efficiency": 0.6,
"heating_system_2_heating_capacity": 60000
},
"sample_files/base-hvac-ground-to-air-heat-pump-detailed-geothermal-loop.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"geothermal_loop_configuration": "vertical",
"geothermal_loop_borefield_configuration": "Lopsided U",
"geothermal_loop_loop_flow": 10.0,
Expand All @@ -2604,14 +2617,14 @@
"site_soil_and_moisture_type": "sand, dry"
},
"sample_files/base-hvac-ground-to-air-heat-pump-cooling-only.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_heating_capacity": 0,
"heat_pump_fraction_heat_load_served": 0,
"heat_pump_backup_type": "none",
"heat_pump_backup_heating_efficiency": 0
},
"sample_files/base-hvac-ground-to-air-heat-pump-heating-only.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_cooling_capacity": 0,
"heat_pump_fraction_cool_load_served": 0
},
Expand Down Expand Up @@ -2665,8 +2678,14 @@
"heating_system_airflow_defect_ratio": -0.25,
"hvac_blower_fan_watts_per_cfm": 0.365
},
"sample_files/base-hvac-install-quality-ground-to-air-heat-pump.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"sample_files/base-hvac-install-quality-ground-to-air-heat-pump-1-speed.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_airflow_defect_ratio": -0.25,
"heat_pump_charge_defect_ratio": -0.25,
"hvac_blower_fan_watts_per_cfm": 0.365
},
"sample_files/base-hvac-install-quality-ground-to-air-heat-pump-2-speed.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-2-speed.xml",
"heat_pump_airflow_defect_ratio": -0.25,
"heat_pump_charge_defect_ratio": -0.25,
"hvac_blower_fan_watts_per_cfm": 0.365
Expand Down Expand Up @@ -2933,7 +2952,7 @@
"cooling_system_integrated_heating_system_fraction_heat_load_served": 1
},
"sample_files/base-hvac-pthp.xml": {
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump.xml",
"parent_hpxml": "sample_files/base-hvac-ground-to-air-heat-pump-1-speed.xml",
"heat_pump_type": "packaged terminal heat pump",
"heat_pump_cooling_efficiency": 11.4,
"heat_pump_cooling_sensible_heat_fraction": 0.65,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
<HeatPumpFuel>electricity</HeatPumpFuel>
<HeatingCapacity>36000.0</HeatingCapacity>
<CoolingCapacity>36000.0</CoolingCapacity>
<CompressorType>single stage</CompressorType>
<CoolingSensibleHeatFraction>0.73</CoolingSensibleHeatFraction>
<FractionHeatLoadServed>1.0</FractionHeatLoadServed>
<FractionCoolLoadServed>1.0</FractionCoolLoadServed>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
<HeatPumpFuel>electricity</HeatPumpFuel>
<HeatingCapacity>36000.0</HeatingCapacity>
<CoolingCapacity>36000.0</CoolingCapacity>
<CompressorType>single stage</CompressorType>
<CoolingSensibleHeatFraction>0.73</CoolingSensibleHeatFraction>
<FractionHeatLoadServed>1.0</FractionHeatLoadServed>
<FractionCoolLoadServed>1.0</FractionCoolLoadServed>
Expand Down
Loading
Loading