Skip to content

Fix FanPerformance:NightVentilation across fan types - #11883

Merged
mitchute merged 33 commits into
developfrom
fanperf-nightvent2
Oct 29, 2026
Merged

mitchute merged 33 commits into
developfrom
fanperf-nightvent2

Conversation

@joseph-robertson

@joseph-robertson joseph-robertson commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Pull request overview

  • Fixes Inconsistent/inaccurate FanPerformance:NightVentilation handling across fan types #11808
  • Removes “Maximum Flow Rate” from FanPerformance:NightVentilation. The field was enforced only by Fan:VariableVolume; other fan types ignored it. For VAV fans, the local cap could reduce fan outlet flow without reducing the upstream flow request, leaving inlet and outlet flows inconsistent. Applying the cap consistently would require coordinating flow limits across fan models and their connected systems, so this change removes the VAV-only cap. The transition warns when it discards a nonblank value.
  • Fan:ConstantVolume: Air loop behavior is unchanged; zone equipment uses the scoped night ventilation state.
  • Fan:VariableVolume: Uses alternate night pressure and efficiency, bypasses the normal part load curve, and calculates power from actual airflow, including at low flow.
  • Fan:OnOff: Applies alternate night settings without the normal speed ratio curves.
  • Fan:SystemModel: Uses its night pressure when specified, otherwise falls back to design pressure. In continuous mode, night power scales with actual flow. Its built-in “Night Ventilation Mode Flow Fraction” input remains unused.
  • Scopes night ventilation state to the relevant equipment: zone equipment follows its component’s AvailabilityManager:NightVentilation status; air distribution units follow their connected air loop; coupled Fan:ZoneExhaust fans follow a serving air loop, while decoupled exhaust fans do not enter night mode.
  • For primary air loops, the night venting flow fraction requests a fraction of design flow. For zone equipment, the manager controls availability and does not scale component flow.
  • Fouled-filter airflow reduction is calculated against rated fan pressure while the selected night pressure is retained for operating calculations.
  • Updates the IDD, transition rules, documentation, examples, and regression tests to cover these changes and resolving an air distribution unit’s serving loop before its first simulation.

The figure below shows before (blue, orange) and after (red, black) for 5ZoneNightVent3.idf (Fan:SystemModel) and 5ZoneNightVent4.idf (FanPerformance:NightVentilation) simulation results for the run period:

image

Description of the purpose of this PR

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

@joseph-robertson joseph-robertson self-assigned this Oct 23, 2026
@joseph-robertson joseph-robertson added Defect Includes code to repair a defect in EnergyPlus IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) labels Oct 23, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Valid fouling curves can lose airflow reductions, and newly enabled zone-equipment night mode can produce zero fan power for Fan:SystemModel.

2 open issues
What changed in this PR

Addresses #11808 by making night-ventilation fan performance consistent across supported fan types and scoping night-mode state to the relevant equipment.

Changes:

  • Removes the night-ventilation maximum-flow field and adds input transition support.
  • Updates fan calculations and equipment-specific night-mode handling.
  • Adds regression coverage and updates documentation and example inputs.
File Description
tst/​EnergyPlus/​unit/​ZoneEquipmentManager.unit.cc Tests equipment-specific night-mode selection and isolation.
tst/​EnergyPlus/​unit/​SimAirServingZones.unit.cc Tests global night-mode cleanup.
tst/​EnergyPlus/​unit/​Fans.unit.cc Tests night performance, fouling, and low-flow behavior.
testfiles/​5ZoneNightVent4.idf Removes the obsolete flow field.
src/​Transition/​tests/​27_1_0/​test_fan_performance_night_ventilation.py Tests removal of the flow field during transition.
src/​Transition/​InputRulesFiles/​Rules26-2-0-to-27-1-0.md Documents the input transition.
src/​Transition/​CreateNewIDFUsingRulesV27_1_0.f90 Removes the old field while preserving motor settings.
src/​EnergyPlus/​ZoneEquipmentManager.hh Declares the equipment night-status helper.
src/​EnergyPlus/​ZoneEquipmentManager.cc Scopes night mode to components and serving loops.
src/​EnergyPlus/​SystemAvailabilityManager.hh Adds per-assignment availability status.
src/​EnergyPlus/​SystemAvailabilityManager.cc Resets and records component manager statuses.
src/​EnergyPlus/​SimAirServingZones.cc Clears transient night mode after air-loop simulation.
src/​EnergyPlus/​Fans.hh Removes obsolete night-flow members.
src/​EnergyPlus/​Fans.cc Updates night-performance and fouling calculations.
idd/​Energy+.idd.in Removes the flow field and clarifies flow-fraction scope.
doc/​input-output-reference/​src/​overview/​group-system-availability-managers.tex Clarifies air-loop versus zone-equipment flow control.
doc/​input-output-reference/​src/​overview/​group-fans.tex Documents supported night behavior and revised inputs.

Review effort: Balanced

Comment thread src/EnergyPlus/Fans.cc Outdated
Comment thread src/EnergyPlus/ZoneEquipmentManager.cc

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Cross-equipment state handling and input migration need verified simulation and transition results, with unresolved low-flow power and regression-coverage concerns.

1 open issue
1 previously missed issue

In code that hasn't changed since last review

Medium severity Add end-to-end regression for zone fan night performance selection

src/​EnergyPlus/​SystemAvailabilityManager.cc:283

The zone-fan regressions assign availManagers(1).availStatus manually, so they would still pass if this production assignment were removed and zone equipment stopped selecting night performance. Add a regression that runs ManageSystemAvailability through actual manager evaluation, changes night ventilation from CycleOn to NoAction, and checks the stored component-specific status and resulting fan performance.

2 resolved since last review

Review effort: Balanced

Comment thread src/EnergyPlus/Fans.cc
Use the fixed-speed night power multiplier in both low-flow heat-safeguard branches instead of reapplying the normal fan power curve. Add a cubic-curve regression that verifies expected night power at very low flow.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Cross-system control changes, revised fan-energy calculations, and input migration warrant human confirmation of simulation and transition regression results.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@joseph-robertson
joseph-robertson marked this pull request as ready for review October 28, 2026 19:40
- Add ZoneAirLoopEquipmentManager::getAirDistUnitIndex and use it in
  both ManageZoneAirLoopEquipment and SimZoneEquipment instead of
  duplicating the lazy input load and name lookup
- Delete any stale Transition.audit before each transition test run and
  return the audit text from the fixture
- Assert that a blank FanPerformance:NightVentilation Maximum Flow Rate
  does not produce a discard warning
- Document that continuous-speed Fan:SystemModel night-ventilation power
  uses actual airflow, pressure rise, and total efficiency, without the
  power curve or low-flow fan heat adjustment

@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 for all the work on this @joseph-robertson. I ran all tests locally - no diffs or failures, so all good. I believe this is ready.

Comment thread idd/Energy+.idd.in
Comment on lines -53076 to -53079
N3 , \field Maximum Flow Rate
\units m3/s
\minimum 0.0
\autosizable

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.

Field removed to be more consistent with autosizing approaches, as discussed.

Comment on lines +19 to +25
# Object Change: FanPerformance:NightVentilation

Remove the Maximum Flow Rate field.
It limited night-ventilation flow for Fan:VariableVolume, but other fan types ignored it.
When the VAV limit reduced fan flow, the connected inlet-side flow was not necessarily reduced with it, which could cause a mass-balance issue across the fan.
The transition discards the field's value and preserves the following Motor Efficiency and Motor in Airstream Fraction values.
If the field is nonblank, the transition writes a warning to Transition.audit identifying the discarded value.

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.

👍

# POSSIBILITY OF SUCH DAMAGE.


def test_fan_performance_night_ventilation_removes_maximum_flow_rate(prepare_and_run_transition):

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.

Good test

Comment on lines +434 to +443
CASE('FANPERFORMANCE:NIGHTVENTILATION')
CALL GetNewObjectDefInIDD(ObjectName,NwNumArgs,NwAorN,NwReqFld,NwObjMinFlds,NwFldNames,NwFldDefaults,NwFldUnits)
IF (TRIM(InArgs(4)) /= Blank) THEN
CALL ShowWarningError('For FanPerformance:NightVentilation="'//TRIM(InArgs(1))// &
'", Maximum Flow Rate was removed; input value "'//TRIM(InArgs(4))//'" was discarded.',Auditf)
ENDIF
OutArgs(1:3)=InArgs(1:3)
OutArgs(4:CurArgs - 1)=InArgs(5:CurArgs)
CurArgs = CurArgs - 1
nodiff=.false.

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.

Transition rule to remove the old field. Good.

EXPECT_EQ(0.004, designDaySizing.OutHumRatAtHeatPeak);
}

// Verify an ADU follows only its connected air loop's night state, including reversed and disconnected cases.

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.

Lots of tests. Good.

@mitchute mitchute added the Staged By adding the "Staged" label, some expensive checks needed before merge are run. label Oct 29, 2026
@mitchute
mitchute merged commit 37efc43 into develop Oct 29, 2026
15 of 16 checks passed
@mitchute
mitchute deleted the fanperf-nightvent2 branch October 29, 2026 05:35
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 IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) Staged By adding the "Staged" label, some expensive checks needed before merge are run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent/inaccurate FanPerformance:NightVentilation handling across fan types

4 participants