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 23 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 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
ec12831
fix test validation
yzhou601 Jan 30, 2025
f7b74a3
Latest results.
Jan 30, 2025
00aa08d
Merge branch 'master' of https://github.com/NREL/OpenStudio-HPXML int…
yzhou601 Feb 27, 2025
130e448
Latest results.
Feb 27, 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 @@ -5765,7 +5765,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]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to update the argument description for heat_pump_cooling_compressor_type to include ground-to-air systems.

end

Expand Down
114 changes: 86 additions & 28 deletions HPXMLtoOpenStudio/resources/hvac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -594,34 +594,92 @@ def self.apply_ground_to_air_heat_pump(model, runner, weather, heat_pump, hvac_s
geothermal_loop.num_bore_holes *= unit_multiplier

# Cooling Coil
clg_total_cap_curve = Model.add_curve_quad_linear(
model,
name: "#{obj_name} clg total cap curve",
coeff: hp_ap.cool_cap_curve_spec[0]
)
clg_sens_cap_curve = Model.add_curve_quint_linear(
model,
name: "#{obj_name} clg sens cap curve",
coeff: hp_ap.cool_sh_curve_spec[0]
)
clg_power_curve = Model.add_curve_quad_linear(
model,
name: "#{obj_name} clg power curve",
coeff: hp_ap.cool_power_curve_spec[0]
)
clg_coil = OpenStudio::Model::CoilCoolingWaterToAirHeatPumpEquationFit.new(model, clg_total_cap_curve, clg_sens_cap_curve, clg_power_curve)
clg_coil.setName(obj_name + ' clg coil')
clg_coil.setRatedCoolingCoefficientofPerformance(hp_ap.cool_rated_cops[0])
clg_coil.setNominalTimeforCondensateRemovaltoBegin(1000)
clg_coil.setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity(1.5)
clg_coil.setRatedAirFlowRate(UnitConversions.convert(clg_cfm_rated, 'cfm', 'm^3/s'))
clg_coil.setRatedWaterFlowRate(UnitConversions.convert(geothermal_loop.loop_flow, 'gal/min', 'm^3/s'))
clg_coil.setRatedEnteringWaterTemperature(UnitConversions.convert(80, 'F', 'C'))
clg_coil.setRatedEnteringAirDryBulbTemperature(UnitConversions.convert(80, 'F', 'C'))
clg_coil.setRatedEnteringAirWetBulbTemperature(UnitConversions.convert(67, 'F', 'C'))
clg_coil.setRatedTotalCoolingCapacity(UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W'))
clg_coil.setRatedSensibleCoolingCapacity(UnitConversions.convert(hp_ap.cooling_capacity_sensible, 'Btu/hr', 'W'))
clg_coil.additionalProperties.setFeature('HPXML_ID', heat_pump.id) # Used by reporting measure
if heat_pump.compressor_type = HPXML::HVACCompressorTypeSingleStage
clg_total_cap_curve = Model.add_curve_quad_linear(
model,
name: "#{obj_name} clg total cap curve",
coeff: hp_ap.cool_cap_curve_spec[0]
)
clg_sens_cap_curve = Model.add_curve_quint_linear(
model,
name: "#{obj_name} clg sens cap curve",
coeff: hp_ap.cool_sh_curve_spec[0]
)
clg_power_curve = Model.add_curve_quad_linear(
model,
name: "#{obj_name} clg power curve",
coeff: hp_ap.cool_power_curve_spec[0]
)
clg_coil = OpenStudio::Model::CoilCoolingWaterToAirHeatPumpEquationFit.new(model, clg_total_cap_curve, clg_sens_cap_curve, clg_power_curve)
clg_coil.setRatedCoolingCoefficientofPerformance(hp_ap.cool_rated_cops[0])
clg_coil.setNominalTimeforCondensateRemovaltoBegin(1000)
clg_coil.setRatioofInitialMoistureEvaporationRateandSteadyStateLatentCapacity(1.5)
clg_coil.setRatedAirFlowRate(UnitConversions.convert(clg_cfm_rated, 'cfm', 'm^3/s'))
clg_coil.setRatedWaterFlowRate(UnitConversions.convert(geothermal_loop.loop_flow, 'gal/min', 'm^3/s'))
clg_coil.setRatedEnteringWaterTemperature(UnitConversions.convert(80, 'F', 'C'))
clg_coil.setRatedEnteringAirDryBulbTemperature(UnitConversions.convert(80, 'F', 'C'))
clg_coil.setRatedEnteringAirWetBulbTemperature(UnitConversions.convert(67, 'F', 'C'))
clg_coil.setRatedTotalCoolingCapacity(UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W'))
clg_coil.setRatedSensibleCoolingCapacity(UnitConversions.convert(hp_ap.cooling_capacity_sensible, 'Btu/hr', 'W'))
else
num_speeds = clg_ap.cool_capacity_ratios.size
# TODO: Curve placeholder
plf_fplr_curve = Model.add_curve_quadratic(
model,
name: "Cool-PLF-fPLR#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 1, min_y: 0.7, max_y: 1
)
clg_coil = OpenStudio::Model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFit.new(model, plf_fplr_curve)
Copy link
Contributor

@shorowit shorowit Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be sure to audit the code for references to e.g. CoilCoolingWaterToAirHeatPumpEquationFit. I'm seeing at least two places in our code (installation quality EMS program and desuperheaters) that presumably need to be updated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked about desuperheaters, the variable speed coil type is not yet supported by E+ to be connected with desuperheater, so we may have to temporarily ignore that feature (and document that only single speed gshp is currently supported).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shorowit @afontani The E+ IO freeze for March release is 2/12, is it still possible to add this capability to Coil:Cooling:WaterToAirHeatPump:VariableSpeedEquationFit for the upcoming release? There're 12 open PR for the E+ team to review before 2/12, so I'm not sure if it's possible to add this one and get someone's review. Also the date is overlapping with the two speed/var speed tasks (plan to be wrapped up before end of Feb). Is it fine if we prioritize the two/var speed system work, then if we still get some space we can add the capability to the E+ Oct release?

We can explicitly document that the 2/var speed is not currently supporting desuperheater, and if user still needs to model it, the workaround will be specifying a single speed system (instead of defaulting based on efficiency, or specifying it as two/var speed systems) with desuperheater, which will be handled in the same way as before.

Copy link
Contributor

@shorowit shorowit Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like it should be easy to review and there are many possible reviewers, I wouldn't worry about that.

As far as I'm aware, you are allowed to just make the IDD change before the IO freeze and complete the implementation later. So that could give you another 4-6 weeks? You could confirm by asking Edwin or Mike.

Documenting that we are introducing a breaking change is not a great solution. For a downstream software tool (like REM), it could be a lot of work -- adding a new compressor type input in their user interface for GSHPs, adding logic when there's a desuperheater, etc. And their user would get different heating/cooling results based on whether there is a desuperheater or not? That's confusing.

In my opinion, either we make it a non-breaking change or we defer this for a subsequent OS-HPXML release.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like it should be easy to review and there are many possible reviewers, I wouldn't worry about that.

As far as I'm aware, you are allowed to just make the IDD change before the IO freeze and complete the implementation later. So that could give you another 4-6 weeks? You could confirm by asking Edwin or Mike.

Documenting that we are introducing a breaking change is not a great solution. For a downstream software tool (like REM), it could be a lot of work -- adding a new compressor type input in their user interface for GSHPs, adding logic when there's a desuperheater, etc. And their user would get different heating/cooling results based on whether there is a desuperheater or not? That's confusing.

In my opinion, either we make it a non-breaking change or we defer this for a subsequent OS-HPXML release.

The IDD change before IO freeze and implement later sounds interesting, I'm fine with that, assuming we'll wrap up most of the 2/var speed system OS-HPXML changes before that. Do you mean that it's better to wait for the E+ release and this PR is non-breaking then we can merge it? @afontani Is it fine to do so? The E+ release is end of March, so probably the merge will be early April, but we can still have most functions being implemented so that ResStock can test the batch runs based on this branch.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another thought to make it non-breaking to merge early. So what about if we exclude the efficiency-based defaulting for now, and always default the compressor type to be single speed, and when the E+ capability is added then we add the efficiency-based defaulting approach?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems like a great idea/compromise to me!

for i in 0..(num_speeds - 1)
# TODO: Curve placeholder
cap_ft_curve = Model.add_curve_biquadratic(
model,
name: "Cool-CAP-fT#{i + 1}",
coeff: [1, 0, 0, 0, 0, 0]
)
cap_faf_curve = Model.add_curve_quadratic(
model,
name: "Cool-CAP-fAF#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 2, min_y: 0, max_y: 2
)
cap_fwf_curve = Model.add_curve_quadratic(
model,
name: "Cool-CAP-fWF#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 2, min_y: 0, max_y: 2
)
eir_ft_curve = Model.add_curve_biquadratic(
model,
name: "Cool-EIR-fT#{i + 1}",
coeff: [1, 0, 0, 0, 0, 0]
)
eir_faf_curve = Model.add_curve_quadratic(
model,
name: "Cool-EIR-fAF#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 2, min_y: 0, max_y: 2
)
eir_fwf_curve = Model.add_curve_quadratic(
model,
name: "Cool-EIR-fWF#{i + 1}",
coeff: [1, 0, 0],
min_x: 0, max_x: 2, min_y: 0, max_y: 2
)
# Recoverable heat modifier as a function of indoor wet-bulb and water entering temperatures.
waste_heat_ft = Model.add_curve_biquadratic(
model,
name: "WastHeat-FT#{i + 1}",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"WasteHeat" (I think there's a typo, missing the "e")

coeff: [1, 0, 0, 0, 0, 0]
)
speed = OpenStudio::Model::CoilCoolingDXMultiSpeedStageData.new(model, cap_ft_curve, cap_faf_curve, cap_fwf_curve, eir_ft_curve, eir_faf_curve, eir_fwf_curve, waste_heat_ft)
# TODO: Add speed property inputs
clg_coil.addSpeed(speed)
# TODO: Add coil inputs
end
clg_coil.additionalProperties.setFeature('HPXML_ID', heat_pump.id) # Used by reporting measure
end

# Heating Coil
htg_cap_curve = Model.add_curve_quad_linear(
Expand Down
33 changes: 23 additions & 10 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 @@ -2666,7 +2679,7 @@
"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",
"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
Expand Down Expand Up @@ -2933,7 +2946,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