Skip to content

Correct AirloopHVAC:OutdoorAirSystem water heating coil control for second HW coil - #11759

Merged
mitchute merged 6 commits into
developfrom
6934-AirLoopHVAC-OASys-does-not-control-second-heating-coil
Sep 9, 2026
Merged

Correct AirloopHVAC:OutdoorAirSystem water heating coil control for second HW coil#11759
mitchute merged 6 commits into
developfrom
6934-AirLoopHVAC-OASys-does-not-control-second-heating-coil

Conversation

@rraustad

@rraustad rraustad commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Pull request overview

Description of the purpose of this PR

Corrected logic to allow more than 1 water heating coil in outdoor air system to operate

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

@rraustad rraustad self-assigned this Aug 20, 2026
@rraustad rraustad added the Defect Includes code to repair a defect in EnergyPlus label Aug 20, 2026
RatedVolFlowPerRatedTotCap = DesVolFlow / this->autoSizedValue;
}
if (RatedVolFlowPerRatedTotCap < HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) {
if (RatedVolFlowPerRatedTotCap > 0.0 && RatedVolFlowPerRatedTotCap < HVAC::MinRatedVolFlowPerRatedTotCap[(int)state.dataHVACGlobal->DXCT]) {

@rraustad rraustad Aug 20, 2026

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.

Fixes a divide by 0 error where this->autoSizedValue = 0 = coil capacity. When air flow sizes to 0, capacity will also be 0. There is no reason to show a flow limiting warning if air flow = 0.

", DataFlowUsedForSizing and DataCapacityUsedForSizing " + this->sizingString +
" must both be greater than 0.";
this->errorType = AutoSizingResultType::ErrorType1;
// this->errorType = AutoSizingResultType::ErrorType1;

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.

A fatal when SHR can't be calculated because capacity = 0. Go ahead and show the message, but don't fatal out the simulation. For large models it is likely that some coils would size to 0, this defect file included.

Comment thread src/EnergyPlus/DXCoils.cc Outdated
state,
std::format("Sizing: {} {} has zero rated total capacity", HVAC::coilTypeNames[(int)thisDXCoil.coilType], thisDXCoil.Name));
ErrorsFound = true;
//ErrorsFound = true;

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.

A few more warnings for 0 air flow stopped the program. I could revert these out but there is no good reason not to allow a coil to size to 0. A user should see this result in err, eio and table files.

Comment thread tst/EnergyPlus/unit/Autosizing/CoolingSHRSizing.unit.cc
@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 58c9351

Regression Summary
  • ESO Small Diffs: 710
  • Table Small Diffs: 348
  • MTR Small Diffs: 525
  • Table String Diffs: 177
  • EIO: 360
  • JSON Small Diffs: 2
  • ZSZ Small Diffs: 71
  • Table Big Diffs: 37
  • ERR: 28
  • MTR Big Diffs: 3
  • EDD: 4
  • ESO Big Diffs: 10
  • SSZ Small Diffs: 13
  • JSON Big Diffs: 2

@rraustad

rraustad commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator Author

Defect file transitioned and modified (not all errors were corrected) as 6934-NTC PROP AEM 100 nopreheat test.zip

The defect file works correctly now. The air loops have complex OA system equipment lists with more than 1 HW coil in some of these lists. The second HW coil never turns on. This boils down to the logic used to check the controllers attached to each water coil. Those in the air loop and those in the OA system equipment list.

AirLoopHVAC:OutdoorAirSystem:EquipmentList,
  CAHU-17 OA System Equipment,  !- Name
  Fan:VariableVolume,      !- Component 1 Object Type
  CAHU-17 HR Supply Fan,   !- Component 1 Name
  Coil:Heating:Water,      !- Component 2 Object Type
  CAHU-17 Preheat Coil,    !- Component 2 Name
  HeatExchanger:AirToAir:SensibleAndLatent,  !- Component 4 Object Type
  CAHU-17 Heat Recovery,   !- Component 4 Name
  Coil:Cooling:Water,      !- Component 5 Object Type
  CAHU-17 HR Cooling Coil, !- Component 5 Name
  Coil:Heating:Water,      !- Component 6 Object Type
  CAHU-17 HR Heating Coil, !- Component 6 Name
  Humidifier:Steam:Gas,    !- Component 7 Object Type
  CAHU-17 Humidifier,      !- Component 7 Name
  OutdoorAir:Mixer,        !- Component 8 Object Type
  CAHU-17 OA Mixing Box,   !- Component 8 Name
  Fan:VariableVolume,      !- Component 3 Object Type
  CAHU-17 HR Return Fan;   !- Component 3 Name

In develop, the second HW coil does not turn on. Since these water coils are in the OA system, the coils should still turn on when economizer is active (existing assumption). The logic only looked for the first HW coil. This was changed to check each coil in the list. The right figure at the bottom shows the economizer is active.

image

This branch shows both HW coils turning on. And the 2nd HW coil tracking it's outlet node set point temperature.

image

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 58c9351

Regression Summary
  • Table Big Diffs: 3

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 58c9351

Regression Summary
  • Table Big Diffs: 3

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit d591b6b

Regression Summary
  • Table Big Diffs: 3

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit d591b6b

Regression Summary
  • Table Big Diffs: 3

nonLockoutCoilFound = true;
break;
}
break;

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.

Existing logic skipped any HW coils after the first was found, regardless if nodes matched.

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 815a617

Regression Summary
  • Table Big Diffs: 3

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 815a617

Regression Summary
  • Table Big Diffs: 3

@rraustad

rraustad commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator Author

Here is a raw view of many OA sys HW coils. In develop, no HR coils operate. The increase in coil capacity is likely due to increased economizer flow rate. Will have to check that.

develop:

image

This branch:

image

OA flow rate did increase and preheat coil outlet temperature hits set point in both cases as needed. So because mixed air temperature was higher due to HR coil operation, the economizer opened a little more to meet the mixed air temperature set point. I'm not sure why the preheat coil outlet temperature is lower now when the only component between the preheat coil and OA node is a fan. I would think the higher OA flow rate would mean more fan heat and a higher preheat coil outlet temperature when the HW coil is off. It may be that the Fan Power Minimum Flow Fraction causes a lower fan deltaT at higher flow rates below the minimum power limit of 0.25. That does make sense.

Fan:VariableVolume,
  CAHU-7 HR Supply Fan,    !- Name
  0.25,                    !- Fan Power Minimum Flow Fraction

AirLoopHVAC:OutdoorAirSystem:EquipmentList,
  CAHU-7 OA System Equipment,  !- Name
  Fan:VariableVolume,      !- Component 1 Object Type
  CAHU-7 HR Supply Fan,    !- Component 1 Name
  Coil:Heating:Water,      !- Component 2 Object Type
  CAHU-7 Preheat Coil,     !- Component 2 Name
image

.

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 801fbfd

Regression Summary
  • Table Big Diffs: 3

@github-actions

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 801fbfd

Regression Summary
  • Table Big Diffs: 3

@rraustad

Copy link
Copy Markdown
Collaborator Author

@mitchute this is ready unless there is desire to stop the simulation if coil flow rate or capacity = 0. I don't think the simulation should care if a coil sizes to 0. There is no energy penalty whether this system is present or not. And it would be a lot of unnecessary work to remove those 0-sized systems from an input file of this size, just to see results.

@rraustad rraustad changed the title Correct AirloopHVAC:OutdoorAirSystem water heating coil control for s… Correct AirloopHVAC:OutdoorAirSystem water heating coil control for second coil Aug 20, 2026
@rraustad rraustad changed the title Correct AirloopHVAC:OutdoorAirSystem water heating coil control for second coil Correct AirloopHVAC:OutdoorAirSystem water heating coil control for second HW coil Aug 20, 2026
@rraustad

Copy link
Copy Markdown
Collaborator Author

Diff from UnitarySystem_Multispeed_EconoStaging:

image

@mitchute

Copy link
Copy Markdown
Collaborator

unless there is desire to stop the simulation if coil flow rate or capacity = 0. I don't think the simulation should care if a coil sizes to 0.

I agree

@mitchute mitchute left a comment

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.

Thanks @rraustad.

Comment thread src/EnergyPlus/DXCoils.cc
Comment on lines +6990 to +6991
RatedVolFlowPerRatedTotCap =
(thisDXCoil.RatedTotCap(Mode) > 0.0) ? (thisDXCoil.RatedAirVolFlowRate(Mode) / thisDXCoil.RatedTotCap(Mode)) : 0.0;

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.

I added this guard in a couple other similar places.

Comment thread src/EnergyPlus/DXCoils.cc
} else if (thisDXCoil.coilType == HVAC::CoilType::CoolingVRFFluidTCtrl) {
CalcVRFCoolingCoil_FluidTCtrl(
state, DXCoilNum, HVAC::CompressorOp::On, false, 1.0, HVAC::FanOp::Cycling, 1.0, _, _, Constant::MaxCap);
if (thisDXCoil.RatedTotCap(Mode) > 0.0) {

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.

Another similar guard since we're not fataling out early now.

Comment on lines +1110 to 1111
break;
}

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.

Makes sense to me.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit eeb9a2c

Regression Summary
  • Table Big Diffs: 3

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit eeb9a2c

Regression Summary
  • Table Big Diffs: 3

@mitchute

mitchute commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

This one is ready. Merging.

@mitchute
mitchute merged commit fe45c1e into develop Sep 9, 2026
8 checks passed
@mitchute
mitchute deleted the 6934-AirLoopHVAC-OASys-does-not-control-second-heating-coil branch September 9, 2026 20:16
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

3 participants