Skip to content

Fix SetpointManager:SingleZone:Reheat with Fan:SystemModel#11331

Merged
mitchute merged 2 commits intodevelopfrom
FixFanSZRHWithFanSystemModel11327
Nov 13, 2025
Merged

Fix SetpointManager:SingleZone:Reheat with Fan:SystemModel#11331
mitchute merged 2 commits intodevelopfrom
FixFanSZRHWithFanSystemModel11327

Conversation

@mjwitte
Copy link
Contributor

@mjwitte mjwitte commented Nov 12, 2025

Pull request overview

Description of the purpose of this PR

During init, SetpointManager:SingleZone:Reheat searches the airloop branch(es) for the supply fan to retrieve the fan inlet and outlet node nums. Fan:SystemModel wasn't included in the valid component types, so the fan nodes were never set.

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

@mjwitte mjwitte added the Defect Includes code to repair a defect in EnergyPlus label Nov 12, 2025
Comment on lines +1856 to +1859
if (comp.CompType_Num == SimAirServingZones::CompType::Fan_ComponentModel ||
comp.CompType_Num == SimAirServingZones::CompType::Fan_Simple_CV ||
comp.CompType_Num == SimAirServingZones::CompType::Fan_Simple_VAV ||
comp.CompType_Num == SimAirServingZones::CompType::Fan_System_Object) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the enum instead of a string compare. Also, Fan:OnOff is not included, because it is not in this enum class, because it's not valid on an airloop.

Copy link
Collaborator

@mitchute mitchute Nov 13, 2025

Choose a reason for hiding this comment

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

What was going on with comp.TypeOf? Was it different it string casing causing these to not be caught?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, that's it. Good to go here.

@mjwitte
Copy link
Contributor Author

mjwitte commented Nov 12, 2025

ABUPs results for the defect files.

Base run with Fan:ConstantVolume
image

Defect run with Fan:SystemModel, develop branch
image

Fixed run with Fan:SystemModel, this branch
image

@mjwitte
Copy link
Contributor Author

mjwitte commented Nov 12, 2025

Hmm, there's a unit test failure, need to look into that.

[ RUN      ] EnergyPlusFixture.SZRHOAFractionImpact
C:\MJWGit\EnergyPlus\tst\EnergyPlus\unit\SetPointManager.unit.cc(862): error: The difference between state->dataLoopNodes->Node(7).TempSetPoint and 18.20035 is 0.17520048500529484, which exceeds 0.001, where
state->dataLoopNodes->Node(7).TempSetPoint evaluates to 18.025149514994705,
18.20035 evaluates to 18.20035, and
0.001 evaluates to 0.001.

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 609919b

Regression Summary
  • EIO: 1
  • ESO Small Diffs: 1
  • MTR Small Diffs: 1
  • Table Small Diffs: 1

@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit 609919b

Regression Summary
  • EIO: 1
  • ESO Small Diffs: 1
  • MTR Small Diffs: 1
  • Table Small Diffs: 1

@github-actions
Copy link

⚠️ Regressions detected on ubuntu-24.04 for commit 07cb583

Regression Summary
  • EIO: 1
  • ESO Small Diffs: 1
  • MTR Small Diffs: 1
  • Table Small Diffs: 1

@github-actions
Copy link

⚠️ Regressions detected on macos-14 for commit 07cb583

Regression Summary
  • EIO: 1
  • ESO Small Diffs: 1
  • MTR Small Diffs: 1
  • Table Small Diffs: 1

@mjwitte
Copy link
Contributor Author

mjwitte commented Nov 12, 2025

Regressions show small diffs in UnitarySystem_DXCoilSystemAuto which does have Fan:SystemModel with SPM:SZRH.
Tested this as annual runs.

ABUPS with 25.2RC2:
image

with this branch:
image

The change here is not at large as the defect file, because this one doesn't have economizer operation (which seems to exaggerate the impact of the bug).

@rraustad
Copy link
Collaborator

It's very hard to think through what NOT having fan delta T does for energy use for SPM:SZR (i.e., what the results show with and without fan delta T). What is easy to understand is that energy use should not change (significantly). The code change looks correct and there is no Fan:OnOff called in SimAirLoopComponent:

case CompType::Fan_Simple_CV:        // 'Fan:ConstantVolume'
case CompType::Fan_Simple_VAV:       // 'Fan:VariableVolume'
case CompType::Fan_ComponentModel: { // 'Fan:ComponentModel'
    state.dataFans->fans(CompIndex)->simulate(state, FirstHVACIteration);
} break;
case CompType::Fan_System_Object: { // "Fan:SystemModel" new for V8.6
    state.dataFans->fans(CompIndex)->simulate(state, FirstHVACIteration, _, _); // vector is 0 based, but CompIndex is 1 based so shift

@mitchute mitchute merged commit 35aed6e into develop Nov 13, 2025
11 checks passed
@mitchute mitchute deleted the FixFanSZRHWithFanSystemModel11327 branch November 13, 2025 20:30
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.

Constant volume system uses more heating and cooling energy with Fan:SystemModel vs Fan:ConstantVolume

5 participants