Skip to content

Add Flow Mode to HeatPump:AirToWater for variable water flow - #11893

Draft
yujiex wants to merge 1 commit into
developfrom
hpwh_flow_modulation
Draft

yujiex wants to merge 1 commit into
developfrom
hpwh_flow_modulation

Conversation

@yujiex

@yujiex yujiex commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Pull request overview

Description of the purpose of this PR

HeatPump:AirToWater never set its flowMode, so whenever it ran it requested its full rated water flow, even at part load on a loop with a variable speed pump. Compared with an equivalent air-cooled chiller using LeavingSetpointModulated, it pumped much more water and used more pump energy (issue #11520, configuration 1).

This PR adds an optional Flow Mode field at the end of HeatPump:AirToWater:

  • ConstantFlow (default): unchanged behavior, requests rated flow whenever the heat pump operates.
  • LeavingSetpointModulated: on non-first HVAC iterations, flow = |load| / (cp · ΔT), where ΔT is between the load-side inlet temperature and the loop leaving setpoint. On dual-setpoint loops it uses the high setpoint for cooling and the low setpoint for heating. Flow is capped at the rated flow, and kept at or above the minimum flow of a variable speed pump on the heat pump's branch. This follows Chiller:Electric:EIR LeavingSetpointModulated.

The field applies to both the hot water and chilled water sides.

Code changes

  • idd/Energy+.idd.in: new A60, \field Flow Mode (ConstantFlow / LeavingSetpointModulated, default ConstantFlow).
  • HeatPumpAirToWater::processInputForEIRPLHP: read flow_mode.
  • New HeatPumpAirToWater::setOperatingFlowRatesASHP override. It calls the base implementation first (off, out-of-range and no-load handling are unchanged), then modulates flow in LeavingSetpointModulated mode. With ConstantFlow it returns immediately, so the default path runs the same code as before.
  • EIRPlantLoopHeatPump::onInitLoopEquip: compute the branch VS pump minimum flow for an AWHP in LeavingSetpointModulated mode. This is limited to the AWHP because MinFlowIfBranchHasVSPump also sets the component's flow priority, and HeatPump:AirToWater:FuelFired:* already uses LeavingSetpointModulated with its own logic.

Results

The issue's configuration 1 files were transitioned to the current version and run for Apr–Jul in Chicago:

Chiller (1a) AWHP, ConstantFlow AWHP, LeavingSetpointModulated
Mean water flow when on 6.08 kg/s 7.39 kg/s 3.01 kg/s
Mean flow at <30% of peak load 4.03 kg/s 6.90 kg/s 1.43 kg/s
Pump electricity 6667 kBtu 8693 kBtu 2683 kBtu
Occupied cooling hours setpoint not met 18 40 40

The modulated AWHP meets its leaving setpoint whenever it runs, and unmet hours don't change. Hourly-average supply temperature reads higher in modulated mode, because there are now substeps where the coils request no flow and the whole loop sits at zero flow. At constant flow, the AWHP's request kept water circulating.

The modulated AWHP's flow ends up below the chiller's. The chiller sizes flow from its delivered capacity, which its minimum unloading ratio keeps above the load. The AWHP sizes flow to the actual load, and the test file's AWHP Minimum Part Load Ratio is 0.

Known limitation

If Minimum Part Load Ratio > 0, the AWHP delivers at least the minimum load, but flow is sized to the actual load, so at very low loads the leaving water may be colder than setpoint. Sizing flow from the minimum load needs the available capacity, which isn't calculated yet when flow is set. This can be a follow-up.

Out of scope

Configurations 2 and 3 of #11520 are not changed here:

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies
  • If adding/removing any output files (e.g., eplustbl.*)
    • Update ..\scripts\Epl-run.bat
    • Update ..\scripts\RunEPlus.bat
    • Update ..\src\EPLaunch\ MainModule.bas, epl-ui.frm, and epl.vbp (VersionComments)
    • Update ...github\workflows\energyplus.py

Reviewer

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

HeatPump:AirToWater never set flowMode, so it always requested its rated
water flow whenever it ran, even at part load on loops with variable
speed pumps. Pump energy was higher than an equivalent chiller using
LeavingSetpointModulated.

Add an optional Flow Mode field at the end of the object, with choices
ConstantFlow (default) and LeavingSetpointModulated. With
LeavingSetpointModulated, flow is set to |load| / (cp * dT) to meet the
loop leaving setpoint (high setpoint for cooling, low setpoint for
heating on dual setpoint loops). Flow is capped at the rated flow and
kept at or above the branch variable speed pump's minimum flow.

The default keeps the previous behavior, so no transition is needed.

- IDD: new A60 Flow Mode field on HeatPump:AirToWater
- Read flow_mode in HeatPumpAirToWater::processInputForEIRPLHP
- Override setOperatingFlowRatesASHP for HeatPumpAirToWater
- Compute branch VS pump minimum flow for modulated AWHP in init
- Add LeavingSetpointModulatedFlow_AWHP unit test; check the default
  flow mode in HeatingSimulate_AirSource_AWHP
- Document the field in the Input Output Reference

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yujiex yujiex self-assigned this Oct 29, 2026
@yujiex yujiex added the Defect Includes code to repair a defect in EnergyPlus label Oct 29, 2026
@yujiex
yujiex marked this pull request as draft October 29, 2026 00:01
@rraustad

Copy link
Copy Markdown
Collaborator

These changes look good to me.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HeatPump:AirToWater has higher pump energy usage than chiller with similar cooling rate

2 participants