Skip to content

Fix 5ZoneNightVent3.idf, and test FanPerformance:NightVentilation#11595

Open
joseph-robertson wants to merge 10 commits into
developfrom
avm-nightvent
Open

Fix 5ZoneNightVent3.idf, and test FanPerformance:NightVentilation#11595
joseph-robertson wants to merge 10 commits into
developfrom
avm-nightvent

Conversation

@joseph-robertson
Copy link
Copy Markdown
Collaborator

@joseph-robertson joseph-robertson commented May 19, 2026

Pull request overview

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 May 19, 2026
@joseph-robertson joseph-robertson added Defect Includes code to repair a defect in EnergyPlus Documentation Related primarily on the LaTeX-based EnergyPlus documentation IDDChange Code changes impact the IDD file (cannot be merged after IO freeze) labels May 19, 2026
@rraustad
Copy link
Copy Markdown
Collaborator

Looks good.

@joseph-robertson
Copy link
Copy Markdown
Collaborator Author

joseph-robertson commented May 20, 2026

The notes toward the beginning of the test file with AvailabilityManager:NightVentilation state that "Successful night ventilation modeling depends critically on getting the ventilation fan consumption right. In this case, we see no benefit with night ventilation compared to the base case (5ZoneNightVent1.idf)."

This would certainly explain the indifference described in #11475 and the unmethours link, but it's still not clear whether the statement is true because there is truly no benefit or whether there is an underlying bug. I think intuitively you'd expect at least some benefit given the scenario.

After some digging (i.e., adjusting night ventilation's schedules, limits, control zones, etc., and fan performance's total efficiency, pressure rise, etc.), it doesn't look like any combination actually affects the zone air temperature during the period when night ventilation is available. Maybe there are some key output variables to compare with 5ZoneNightVent2.idf's use of ZoneVentilation:DesignFlowRate which actually shows some night ventilation benefit? For example, "Air System Natural Ventilation Flow Rate" is nonzero for ZoneVentilation:DesignFlowRate but always zero for AvailabilityManager:NightVentilation.

@rraustad
Copy link
Copy Markdown
Collaborator

It looks to me as if the example file 5ZoneNightVent3 is working correctly (latest develop). If there is an issue with a defect file that could be handled separate from this change.

image

@joseph-robertson joseph-robertson changed the title Update and test FanPerformance:NightVentilation Fix 5ZoneNightVent3.idf, and test FanPerformance:NightVentilation May 21, 2026
AirTerminal:SingleDuct:VAV:Reheat,
SPACE1-1 VAV Reheat, !- Name
FanAvailSched, !- Availability Schedule Name
AlwaysOn, !- Availability Schedule Name
Copy link
Copy Markdown
Collaborator Author

@joseph-robertson joseph-robertson May 21, 2026

Choose a reason for hiding this comment

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

This is the fix to see nonzero airflow on the demand side of the loop during night ventilation.

See https://unmethours.com/question/103089/how-to-model-night-purge/ for more information.

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.

This does reveal an issue with system control that was not noticed until now. This example file shows that the TU availability schedule affects night cycle operation, and system operation for that matter if the TU avail sch was more restrictive than the parent and fan avail schedules. In a parent object (e.g., UnitarySystem) the fan is controlled based on parent availability schedule and fan availability schedule. It appears that TU availability schedule also matters (and there are multiple TUs for air systems, at least 1 would need to be available). This was never noticed before maybe because TU avail schedules are typically always on or at least using the least restrictive schedule or maybe because night ventilation/cycle is used less often.

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.

I'm throwing out a possible fix of TUs don't have avail schedules, they are always ON/available. Would that break anything? Would that restrict anything? Would that have less flexibility than is provided now?

Comment thread idd/Energy+.idd.in
Comment on lines -51492 to -51493
\object-list FansCVandVAV
\object-list FansComponentModel
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.

The docs say "At this time, it can be used with Fan:ConstantVolume, Fan:VariableVolume, Fan:ZoneExhaust, Fan:OnOff and Fan:SystemModel fans, but not with Fan:ComponentModel fans."

! object. We ventilate the building in the early morning hours.
! The runperiod is a summer week in Fresno. We assume a ventilation rate of 1/3 the
! supply air design value and adjust the night ventilation fan performance
! (FanPerformance:NightVentilation) object inputs accordingly.
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.

This did not get updated starting with v8.7.0 when Fan:SystemModel was introduced and this test file was updated Fan:VariableVolume/FanPerformance:NightVentilation -> Fan:SystemModel.

Comment thread testfiles/CMakeLists.txt
add_simulation_test(IDF_FILE 5ZoneNightVent1.idf EPW_FILE USA_CA_Fresno.Air.Terminal.723890_TMY3.epw)
add_simulation_test(IDF_FILE 5ZoneNightVent2.idf EPW_FILE USA_CA_Fresno.Air.Terminal.723890_TMY3.epw)
add_simulation_test(IDF_FILE 5ZoneNightVent3.idf EPW_FILE USA_CA_Fresno.Air.Terminal.723890_TMY3.epw)
add_simulation_test(IDF_FILE 5ZoneNightVent4.idf EPW_FILE USA_CA_Fresno.Air.Terminal.723890_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.

Bring back the original night ventilation test file using FanPerformance:NightVentilation -- without it, this object is not tested anywhere.

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 01efc9b

Regression Summary
  • Audit: 1

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 01efc9b

Regression Summary
  • Audit: 1

@joseph-robertson joseph-robertson marked this pull request as ready for review May 21, 2026 20:42
@joseph-robertson joseph-robertson requested a review from Copilot May 21, 2026 20:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses the reported night ventilation example problem in 5ZoneNightVent3.idf and reintroduces a companion example (5ZoneNightVent4.idf) to exercise FanPerformance:NightVentilation using a Fan:VariableVolume, along with corresponding IDD and documentation updates.

Changes:

  • Fix 5ZoneNightVent3.idf night ventilation behavior by ensuring VAV terminals remain available during night ventilation and by aligning the example narrative with Fan:SystemModel.
  • Add 5ZoneNightVent4.idf and register it as a simulation test to cover FanPerformance:NightVentilation with Fan:VariableVolume.
  • Update the IDD object-list restrictions for FanPerformance:NightVentilation, plus related Input Output Reference text.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
testfiles/CMakeLists.txt Adds a simulation test entry for the new 5ZoneNightVent4.idf.
testfiles/5ZoneNightVent4.idf New example file using Fan:VariableVolume + FanPerformance:NightVentilation for night ventilation testing.
testfiles/5ZoneNightVent3.idf Adjusts terminal availability and adds an AlwaysOn schedule; updates example narrative for Fan:SystemModel.
src/EnergyPlus/SystemAvailabilityManager.cc Removes an unnecessary using namespace DataAirLoop; within night ventilation availability manager logic.
idd/Energy+.idd.in Updates FanPerformance:NightVentilation allowed fan object-lists.
doc/input-output-reference/src/overview/group-system-availability-managers.tex Minor wording tweak clarifying indoor/outdoor temperature difference description.
doc/input-output-reference/src/overview/group-fans.tex Updates narrative/examples for FanPerformance:NightVentilation and cross-references.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread idd/Energy+.idd.in
Comment thread doc/input-output-reference/src/overview/group-fans.tex
Comment thread testfiles/5ZoneNightVent3.idf Outdated
Comment on lines +10 to +13
!
! Simulation Location/Run: FRESNO_CA_USA TMY2-93193, 2 design days, 1 run period,
! Run Control executes the run period using the weather file
!
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.

Only flagged because this file is new. The others don't have this update. Seems unnecessary.

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 01efc9b

Regression Summary
  • Audit: 1

@joseph-robertson joseph-robertson requested a review from mitchute May 22, 2026 15:12
@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on ubuntu-24.04 for commit 864adf5

Regression Summary
  • Audit: 1

@github-actions
Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit 864adf5

Regression Summary
  • Audit: 1

Copy link
Copy Markdown
Collaborator

@rraustad rraustad left a comment

Choose a reason for hiding this comment

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

This looks good to me. Anything else can be a follow up issue.

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 Documentation Related primarily on the LaTeX-based EnergyPlus documentation IDDChange Code changes impact the IDD file (cannot be merged after IO freeze)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AvailabilityManager:NightVentilation does not work

5 participants