Skip to content

Set flow to 0 when load is 0 for air-source HeatPump:PlantLoop:EIR:*#11602

Open
lymereJ wants to merge 7 commits into
developfrom
awhp_no_load_no_flow
Open

Set flow to 0 when load is 0 for air-source HeatPump:PlantLoop:EIR:*#11602
lymereJ wants to merge 7 commits into
developfrom
awhp_no_load_no_flow

Conversation

@lymereJ
Copy link
Copy Markdown
Collaborator

@lymereJ lymereJ commented May 22, 2026

Pull request overview

Description of the purpose of this PR

Set flows (source and load side) to 0 when load is 0 for air-source HeatPump:PlantLoop:EIR:* objects.

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

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

@lymereJ lymereJ added the Defect Includes code to repair a defect in EnergyPlus label May 22, 2026
@lymereJ
Copy link
Copy Markdown
Collaborator Author

lymereJ commented May 22, 2026

On this branch, the cooling tower operates at the same flow rate as the boiler scenario, while the AWHP receives no flow—mirroring the boiler case results.

image

Comment thread tst/EnergyPlus/unit/PlantLoopHeatPumpEIR.unit.cc Outdated
Comment thread src/EnergyPlus/PlantLoopHeatPumpEIR.cc Outdated
void EIRPlantLoopHeatPump::setOperatingFlowRatesASHP(EnergyPlusData &state, bool FirstHVACIteration, [[maybe_unused]] Real64 const currentLoad)
{
if (!this->running) {
if ((std::abs(currentLoad) < HVAC::SmallLoad && this->companionHeatPumpCoil == nullptr) || !this->running) {
Copy link
Copy Markdown
Collaborator

@rraustad rraustad May 23, 2026

Choose a reason for hiding this comment

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

You can't do this. For a series branch, where multiple components are on a branch (e.g., 2 HPs in series), if 1 component is ON and this component is OFF, then water must still flow through the HP. As I say this I see the code is only looking at !running and may not give the expected result (unless there is some other code that handles this but I don't see any in this component's simulate). So I am guessing that there should also be a check for SeriesActive as in other chillers. Need a good test file to flesh this out.

void IndirectAbsorberSpecs::calculate()

//  If no loop demand or Absorber OFF, return
if (MyLoad >= 0.0 || !RunFlag) {          <-- so no cooling or plant manager said component is off
    if (this->EquipFlowCtrl == DataBranchAirLoopPlant::ControlType::SeriesActive)
        this->EvapMassFlowRate = state.dataLoopNodes->Node(this->EvapInletNodeNum).MassFlowRate;
    return;
}

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.

That makes sense. I see a check for SeriesActive for the EIRFuelFiredHeatPump. I'll push some changes.

@NatLabRockies NatLabRockies deleted a comment from github-actions Bot May 26, 2026
@NatLabRockies NatLabRockies deleted a comment from github-actions Bot May 26, 2026
@NatLabRockies NatLabRockies deleted a comment from github-actions Bot May 26, 2026
@NatLabRockies NatLabRockies deleted a comment from github-actions Bot May 26, 2026
@NatLabRockies NatLabRockies deleted a comment from github-actions Bot May 26, 2026
@NatLabRockies NatLabRockies deleted a comment from github-actions Bot May 26, 2026
Copy link
Copy Markdown
Collaborator Author

@lymereJ lymereJ left a comment

Choose a reason for hiding this comment

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

Code walk-through:

Comment on lines +303 to +312
auto &comp = DataPlant::CompData::getPlantComponent(state, this->loadSidePlantLoc);
bool loadIndicator = false;
if (this->sysControlType == ControlType::Setpoint) {
Real64 leavingSetpoint = this->getLoadSideOutletSetPointTemp(state);
loadIndicator = std::abs(leavingSetpoint - this->loadSideInletTemp) < HVAC::SmallTempDiff;
} else {
loadIndicator = std::abs(currentLoad) < HVAC::SmallLoad;
}
bool lowLoadCondition = loadIndicator && comp.FlowCtrl != DataBranchAirLoopPlant::ControlType::SeriesActive;
if ((tempOutOfRange || lowLoadCondition) && !this->heatRecoveryAvailable) {
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.

Revised approach to: 1) ensure equipment in series maintains flow even with no load, and 2) allow flow to pass through the unit when heat recovery is available.

Comment thread testfiles/CMakeLists.txt
add_simulation_test(IDF_FILE PlantLoopChainDualDeadband.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantLoopChainHeating.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantLoopHeatPump_EIR_AirSource.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
add_simulation_test(IDF_FILE PlantLoopHeatPump_EIR_AirSource_Parallel.idf EPW_FILE USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw)
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.

As requested, this is a new test file, based on PlantLoopHeatPump_EIR_AirSource.idf, that includes AWHPs in parallel (only one AWHP is used in PlantLoopHeatPump_EIR_AirSource.idf).

When running this file with develop we see that AWHP HEATING COIL 2 has flow even when it does not provide any heating:

Image

With this branch, we only see flow when the AWHP is providing heating:

Image

@lymereJ lymereJ marked this pull request as ready for review May 27, 2026 04:49
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.

Load side mass flow rate > 0 when HeatPump:PlantLoop:EIR:Heating object has no load

3 participants