Skip to content

Fix GHP experimental model rated conditions#2204

Open
yzhou601 wants to merge 36 commits into
masterfrom
GHP_experimental_rated_conditions
Open

Fix GHP experimental model rated conditions#2204
yzhou601 wants to merge 36 commits into
masterfrom
GHP_experimental_rated_conditions

Conversation

@yzhou601
Copy link
Copy Markdown
Collaborator

@yzhou601 yzhou601 commented Apr 30, 2026

Pull Request Description

GHP experimental models now directly use user-provided COP/EER in E+ coil objects, however, E+ coil rated conditions are different from GLHP rated conditions. We should convert user-provided GLHP COP/EER/capacities before adding coil inputs.

Checklist

Not all may apply:

  • Schematron validator (EPvalidator.sch) has been updated
  • Sample files have been added/updated (openstudio tasks.rb update_hpxmls)
  • Tests have been added/updated (e.g., HPXMLtoOpenStudio/tests/test*.rb and/or workflow/tests/test*.rb)
  • Documentation has been updated
  • Changelog has been updated
  • openstudio tasks.rb update_measures has been run
  • No unexpected changes to simulation results of sample files

@shorowit shorowit added this to the 1.13.0 milestone May 5, 2026
@shorowit shorowit moved this from Triage to In progress in OpenStudio-HPXML May 12, 2026
# E+ Capacity and EIR as function of temperature curves(bi-quadratic) generated using E+ HVACCurveFitTool
# See: https://bigladdersoftware.com/epx/docs/24-2/auxiliary-programs/hvac-performance-curve-fit-tool.html#hvac-performance-curve-fit-tool
# Catalog data from : https://files.climatemaster.com/Genesis-GS-Series-Product-Catalog.pdf, p180
# Catalog data from : https://www.climatemaster.com/download/18.274be999165850ccd5b5b73/1535543867815/lc377-climatemaster-commercial-tranquility-20-single-stage-ts-series-water-source-heat-pump-submittal-set.pdf
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Update outdated product links

GroundSourceCoolRatedWET = 85.0 # degF, Rated water entering temperature for ground-source systems, cooling
GroundSourceCoolRatedIDB = 80.0 # degF, Rated indoor drybulb for ground-source systems, cooling
GroundSourceCoolRatedIWB = 67.0 # degF, Rated indoor wetbulb for ground-source systems, cooling
GroundSourceHeatGLHPRatedEWT = 32.0 # degF, Rated water entering temperature for ground-source systems, heating
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

These variables are used to convert E+ rated conditions to GLHP rated conditions

Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
)
speed = OpenStudio::Model::CoilCoolingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.new(model, cap_ft_curve, cap_faf_curve, cap_fwf_curve, eir_ft_curve, eir_faf_curve, eir_fwf_curve, waste_heat_ft)
# convert GLHP rated COPs/capacities to E+ rated
rated_capacity_eplus = UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W') / get_experimental_ghp_rated_condition_conversion(:clg, hp_ap.cool_cap_ft_spec[i]) * hp_ap.cool_capacity_ratios[i]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Convert HPXML rated inputs (GLHP rated conditions) to E+ rated inputs

# Need to adjust the capacity to GLHP rated conditions
total_cap_curve_value_design = MathTools.biquadratic(UnitConversions.convert(mj.cool_indoor_wetbulb, 'F', 'C'), UnitConversions.convert(entering_temp, 'F', 'C'), clg_ap.cool_cap_ft_spec[hvac_cooling_speed])
total_cap_curve_value_glhp_rated = MathTools.biquadratic(UnitConversions.convert(HVAC::GroundSourceCoolRatedIWB, 'F', 'C'), UnitConversions.convert(HVAC::GroundSourceCoolGLHPRatedEWT, 'F', 'C'), clg_ap.cool_cap_ft_spec[hvac_cooling_speed])
total_cap_curve_value = total_cap_curve_value_design / total_cap_curve_value_glhp_rated
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Uses E+ performance curves to convert design condition to GLHP rated conditions (not E+ rated condition, so here we need to do curve calculation twice).

This will make the heat pumps sized at GLHP rated conditions, consistent with what user provides. Then the capacities will be converted to E+ rated inputs later when we creates E+ models.

Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb Outdated
cool_eir_ft_spec = [1.1828664909, -0.0450835550, 0.0009273315, 0.0056194113, 0.0006683467, -0.0007256237]
cool_capacity_curve_value = MathTools.biquadratic(UnitConversions.convert(HVAC::GroundSourceCoolRatedIWB, 'F', 'C'), UnitConversions.convert(HVAC::GroundSourceCoolGLHPRatedEWT, 'F', 'C'), cool_cap_ft_spec)
cool_eir_curve_value = MathTools.biquadratic(UnitConversions.convert(HVAC::GroundSourceCoolRatedIWB, 'F', 'C'), UnitConversions.convert(HVAC::GroundSourceCoolGLHPRatedEWT, 'F', 'C'), cool_eir_ft_spec)
expected_clg_capacity = standard_clg_capacity / cool_capacity_curve_value
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Unit test to make sure the rated conditions are converted correctly.
The experimental model should have the consistent rated inputs as standard models before conversion.

@yzhou601 yzhou601 marked this pull request as ready for review May 23, 2026 01:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ground-to-air heat pump experimental (GHP) implementation so that user-provided GLHP-rated COP/EER/capacities are converted to EnergyPlus coil rated-condition inputs, and updates autosizing/test baselines accordingly.

Changes:

  • Converts experimental GHP rated COP/capacity inputs from GLHP rated conditions to EnergyPlus rated conditions when populating E+ coil speed data.
  • Adjusts GHP experimental autosizing so capacities are sized back to GLHP-rated conditions (consistent with HPXML inputs) while using E+ curve forms.
  • Updates unit tests, changelog, and expected workflow baseline CSV outputs for the new rated-condition behavior.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
HPXMLtoOpenStudio/resources/hvac.rb Adds GLHP-rated EWT constants and converts experimental coil rated COP/capacity inputs to E+ rated conditions.
HPXMLtoOpenStudio/resources/hvac_sizing.rb Adjusts experimental GSHP sizing curve application to account for GLHP vs E+ rated-condition differences.
HPXMLtoOpenStudio/tests/test_hvac.rb Updates GSHP tests to validate the new rated-condition conversion behavior.
HPXMLtoOpenStudio/resources/defaults.rb Updates documentation links/wording for GSHP curve source comments.
workflow/tests/base_results/results_sizing.csv Updates expected sizing results for GSHP experimental cases.
workflow/tests/base_results/results_simulations_misc.csv Updates expected simulation summary outputs for GSHP experimental cases.
workflow/tests/base_results/results_simulations_loads.csv Updates expected load outputs for GSHP experimental cases.
workflow/tests/base_results/results_simulations_energy.csv Updates expected energy outputs for GSHP experimental cases.
workflow/tests/base_results/results_simulations_bills.csv Updates expected bill outputs for GSHP experimental cases.
Changelog.md Adds a bugfix entry for GSHP experimental rated-condition inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb Outdated
Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb Outdated
Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb Outdated
Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
Comment on lines +726 to +730
# convert GLHP rated COPs/capacities to E+ rated
rated_capacity_eplus = UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W') / get_experimental_ghp_rated_condition_conversion(:clg, hp_ap.cool_cap_ft_spec[i]) * hp_ap.cool_capacity_ratios[i]
rated_cop_eplus = hp_ap.cool_rated_cops[i] * get_experimental_ghp_rated_condition_conversion(:clg, hp_ap.cool_eir_ft_spec[i])
# TODO: Add net to gross conversion after RESNET PR: https://github.com/NatLabRockies/OpenStudio-HPXML/pull/1879
speed.setReferenceUnitGrossRatedTotalCoolingCapacity(UnitConversions.convert(heat_pump.cooling_capacity, 'Btu/hr', 'W') * hp_ap.cool_capacity_ratios[i])
speed.setReferenceUnitGrossRatedTotalCoolingCapacity(rated_capacity_eplus)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This hurts my brain to think about this AI's question. I think using airflow rates and water flow rates that are based on GLHP capacities is reasonable here, we don't want those curves to adjust capacities/COPs because the coil is not running at WLHP conditions, right? @jmaguire1 any thoughts?

Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
Comment on lines 804 to 811
# convert GLHP rated COPs/capacities to E+ rated
speed = OpenStudio::Model::CoilHeatingWaterToAirHeatPumpVariableSpeedEquationFitSpeedData.new(model, cap_ft_curve, cap_faf_curve, cap_fwf_curve, eir_ft_curve, eir_faf_curve, eir_fwf_curve, waste_heat_ft)
rated_capacity_eplus = UnitConversions.convert(heat_pump.heating_capacity, 'Btu/hr', 'W') / get_experimental_ghp_rated_condition_conversion(:htg, hp_ap.heat_cap_ft_spec[i]) * hp_ap.heat_capacity_ratios[i]
rated_cop_eplus = hp_ap.heat_rated_cops[i] * get_experimental_ghp_rated_condition_conversion(:htg, hp_ap.heat_eir_ft_spec[i])
# TODO: Add net to gross conversion after RESNET PR: https://github.com/NatLabRockies/OpenStudio-HPXML/pull/1879
speed.setReferenceUnitGrossRatedHeatingCapacity(UnitConversions.convert(heat_pump.heating_capacity, 'Btu/hr', 'W') * hp_ap.heat_capacity_ratios[i])
speed.setReferenceUnitGrossRatedHeatingCOP(hp_ap.heat_rated_cops[i])
speed.setReferenceUnitGrossRatedHeatingCapacity(rated_capacity_eplus)
speed.setReferenceUnitGrossRatedHeatingCOP(rated_cop_eplus)
speed.setReferenceUnitRatedAirFlow(UnitConversions.convert(UnitConversions.convert(heat_pump.heating_capacity, 'Btu/hr', 'ton') * hp_ap.heat_capacity_ratios[i] * hp_ap.heat_rated_cfm_per_ton, 'cfm', 'm^3/s'))
Comment thread HPXMLtoOpenStudio/resources/hvac.rb
Comment thread HPXMLtoOpenStudio/resources/hvac_sizing.rb Outdated
Comment thread HPXMLtoOpenStudio/resources/hvac_sizing.rb
Comment thread Changelog.md Outdated
yzhou601 and others added 9 commits May 28, 2026 12:08
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 10 comments.

Comment thread workflow/tests/util.rb
Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb
Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb Outdated
Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb
Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb Outdated
Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb
Comment thread HPXMLtoOpenStudio/tests/test_hvac.rb Outdated
Comment thread HPXMLtoOpenStudio/resources/hvac.rb
Comment thread HPXMLtoOpenStudio/resources/hvac_sizing.rb
Comment thread HPXMLtoOpenStudio/resources/hvac_sizing.rb
yzhou601 and others added 5 commits June 1, 2026 15:11
indentation fix by AI

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Comment thread HPXMLtoOpenStudio/resources/hvac.rb Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@yzhou601 yzhou601 requested a review from jmaguire1 June 1, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants