Skip to content

Fix load dispatch for variable-flow chillers with a low leaving temperature limit - #11770

Open
dareumnam wants to merge 8 commits into
developfrom
fix_10965
Open

Fix load dispatch for variable-flow chillers with a low leaving temperature limit#11770
dareumnam wants to merge 8 commits into
developfrom
fix_10965

Conversation

@dareumnam

@dareumnam dareumnam commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Pull request overview

Description of the purpose of this PR

  • Multiple chillers on a SequentialLoad / SequentialUniformPLR scheme all run at an identical PLR instead of staging up, when they use LeavingSetpointModulated flow mode, sit on pumped branches, and have a Leaving Chilled Water Lower Temperature Limit at or near the loop setpoint.
  • AdjustChangeInLoadByHowServed() truncates the dispatched load for a ByNominalCapLowOutLimit component using the flow present at its inlet node:
    QdotTmp = CurMassFlowRate * Cp * (Tinlet - ToutLowLimit)
  • The branch pump runs before the chiller, so that flow is still the pump minimum. But a LeavingSetpointModulated chiller sets its own flow rate, so this understates its capacity. Chiller 1 is capped well below what it can do and the remainder cascades down the equipment list. The chiller model already enforces the low outlet limit internally, so this outer truncation is redundant for variable-flow machines.
  • So I added CompData::ModulatedFlow, set by each chiller in LeavingSetpointModulated mode. When set, capacity is evaluated at MassFlowRateMaxAvail instead of the current flow. Constant-flow behavior is unchanged.
  • Also updated both truncation branches in PlantCondLoopOperation.cc and the chiller modules that register a low outlet limit (ChillerElectricEIR, ChillerReformulatedEIR, ChillerIndirectAbsorption, PlantChillers).
  • Defect idf file: I ran the file from the original issue (HVACTemplate-5ZoneVAVWaterCooled_V2420_rev_exp_CHWLimit7.22.idf), which has four Chiller:Electric:EIR on parallel pumped branches, SequentialUniformPLR, and both the loop setpoint and the low limit at 7.22C. (RunPeriod: May).
image image image image image
  • On develop the load splits into exact quarters every hour. With the fix, chiller 1 carries the base load and chiller 4 runs only 16 hours on the hottest days. Equal PLR among running chillers is expected under SequentialUniformPLR. Chiller 1 peaks at 0.78 rather than 1.0 because the low limit equals the setpoint, capping usable delta T at about half the design value.

  • Annual run of RefBldgLargeOfficeNew2004_Chicago

    • The regression suite only runs design days, so I enabled the weather file run period and compared a full year on both branches.
    • Annual totals are unchanged. Cooling electricity differs by 0.0003 percent, unmet hours are identical, and chiller autosizing is identical.
    • What did change is worth showing. This model runs two identical chillers (both autosized to 2.086 MW) under UniformLoad, so they always share the load at the same PLR. On develop they still report different electricity use in 13 hours of the year, up to 92 percent apart:
    • image
    • With the fix the two chillers match exactly in all 2741 operating hours. The truncation was applied at each chiller's own branch flow rate, so identical machines given identical loads landed on different flow and outlet temperature solutions. The underlying cause is the same as Variable CHW Flow Chillers Operate unexpectedly #10965: capacity judged at the current branch flow. Here it shows up as an efficiency mismatch rather than a load distribution problem, because this model splits load evenly to begin with.

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

@dareumnam dareumnam self-assigned this Aug 29, 2026
@dareumnam dareumnam added the Defect Includes code to repair a defect in EnergyPlus label Aug 29, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 9a48904

Regression Summary
  • EIO: 85
  • ESO Small Diffs: 92
  • MTR Small Diffs: 105
  • Table Small Diffs: 55
  • ESO Big Diffs: 32
  • Table Big Diffs: 25
  • Table String Diffs: 11
  • JSON Big Diffs: 1
  • MTR Big Diffs: 13
  • ERR: 6

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 9a48904

Regression Summary
  • EIO: 85
  • ESO Small Diffs: 92
  • MTR Small Diffs: 104
  • Table Small Diffs: 56
  • ESO Big Diffs: 32
  • Table Big Diffs: 25
  • JSON Big Diffs: 1
  • Table String Diffs: 11
  • MTR Big Diffs: 13
  • ERR: 6

@dareumnam
dareumnam marked this pull request as draft August 30, 2026 04:04
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit acaf7b0

Regression Summary
  • EIO: 85
  • ESO Small Diffs: 92
  • MTR Small Diffs: 105
  • Table Small Diffs: 55
  • ESO Big Diffs: 32
  • Table Big Diffs: 25
  • Table String Diffs: 11
  • JSON Big Diffs: 1
  • MTR Big Diffs: 13
  • ERR: 6

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit acaf7b0

Regression Summary
  • EIO: 85
  • ESO Small Diffs: 92
  • MTR Small Diffs: 104
  • Table Small Diffs: 56
  • ESO Big Diffs: 32
  • Table Big Diffs: 25
  • JSON Big Diffs: 1
  • Table String Diffs: 11
  • MTR Big Diffs: 13
  • ERR: 6

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit bdc9a07

Regression Summary
  • EIO: 86
  • ESO Small Diffs: 93
  • MTR Small Diffs: 106
  • Table Small Diffs: 56
  • ESO Big Diffs: 32
  • Table Big Diffs: 25
  • Table String Diffs: 11
  • JSON Big Diffs: 1
  • MTR Big Diffs: 13
  • ERR: 6

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit bdc9a07

Regression Summary
  • EIO: 86
  • ESO Small Diffs: 93
  • MTR Small Diffs: 105
  • Table Small Diffs: 57
  • ESO Big Diffs: 32
  • Table Big Diffs: 25
  • JSON Big Diffs: 1
  • Table String Diffs: 11
  • MTR Big Diffs: 13
  • ERR: 6

@dareumnam
dareumnam marked this pull request as ready for review September 11, 2026 05:44
@dareumnam

dareumnam commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

I went through the regression results in detail. Every file that differs uses a variable-flow chiller, and the differences are small.

  • I pulled all 25 files with Table Big Diffs and all 32 with ESO Big Diffs and checked their chiller inputs. Every one of them has a chiller in LeavingSetpointModulated mode, across all three modules this PR touches (Chiller:Electric, Chiller:Electric:ReformulatedEIR, Chiller:Absorption:Indirect). No file outside that combination differs.

  • The count is high because ExpandObjects writes LeavingSetpointModulated whenever the primary chilled water pump is variable speed, and many test files also set a low outlet limit close to the loop setpoint. For example the 25 Table files all use a 5 C limit against a 7.22 C setpoint, which is the condition described in Variable CHW Flow Chillers Operate unexpectedly #10965.

  • ERR diffs: All 6 use a LeavingSetpointModulated chiller. No new warnings or severe errors. Two warnings disappear: a SolveAirLoopControllers max-iteration warning in VSHeatPumpWaterHeater, and a cooling tower approach out-of-range warning in CT_VS_ideal.

  • Table diffs: I looked at two files in detail. Only the Energy Meters tables differ, and every flagged value moves by 0.01 in the last displayed digit, for example Chillers:EnergyTransfer from about 1.62 to 1.63 GJ. These files run design days only, so the totals are small and one digit trips the 0.5 percent threshold. End Uses, Component Sizing, Equipment Summary Chillers, and Setpoint Not Met are unchanged in both, and peak values and timestamps are identical.

  • ESO diffs: Checked against RefBldgLargeOfficeNew2004_Chicago. The largest relative difference anywhere is 0.82 percent, on plant supply side inlet mass flow rate, and only 3 of 144 hours exceed the relative threshold. Chiller PLR differs by 0.18 percent, cooling electricity by 0.06 percent, facility electricity by 0.008 percent, and zone mean air temperatures by less than 1e-6 C.

The big counts here come from the absolute threshold, not the relative one. For energy fields in joules it is 0.001 J, which floating point noise exceeds on a building using hundreds of megajoules per hour. count_of_big_rel_diff is 0 for cooling electricity, chiller PLR, and every zone temperature.

@rraustad

Copy link
Copy Markdown
Collaborator

@dareumnam nice job on the diff review and graphs. It does look like the chillers are working better now, however, the defect file uses SequentialUniformPLR and I would expect any chillers that do operate would operate at the same PLR.

PlantLoop,
   Chilled Water Loop Chilled Water Loop,  !- Name
   SequentialUniformPLR,    !- Load Distribution Scheme

Yes, the first chiller would need to be fully loaded before any other chiller turns on, but after that any chillers operating would operate at the same PLR. I can't tell in the figures if that is happening now or not. Are the active chillers now operating at the same PLR in the defect file? Were they operating that way before this change? I think, from the IORef description, what should happen is a single chiller will meet the load up to PLR = 1, then 2 chillers will turn on and operate at the same PLR up to PLR = 1, then 3 chillers turn on and operate at the same PLR, etc. Is that your interpretation of this control?

From the IORef for PlantLoop Load Distribution Scheme:

SequentialUniformPLR loads all equipment on the PlantEquipmentList to a uniform part load ratio (PLR).
Components are loaded sequentially based on the order specified in the PlantEquipmentList until each
component is fully loaded, at which point the next subsequent component is added and the load is
distributed uniformly based on PLR between the components.

// sitting at the branch pump minimum, understates it and spills load onto the next machine in the list.
if (this_component.ModulatedFlow) {
CurMassFlowRate = max(CurMassFlowRate, state.dataLoopNodes->Node(this_component.NodeNumIn).MassFlowRateMaxAvail);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You could add an else here and avoid setting CurMassFlowRate twice (i.e., move line 3606 to the else at 3612 since the conditional at line 3610 will always execute).

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.

Variable CHW Flow Chillers Operate unexpectedly

4 participants