Skip to content

Conversation

@rraustad
Copy link
Collaborator

@rraustad rraustad commented Jan 14, 2026

Pull request overview

Description of the purpose of this PR

The AirLoopHVAC:DedicatedOutdoorAirSystem did not allow an exhaust fan connected to the outlet of the DOAS system's AirLoopHVAC:Mixer object. These changes also check if the fan(s) are autosized or if not, use a maximum air volumetric flow rate that differs by more than 1% from the sum of the connected systems. If the flow rates differ a warning is issued but the fan flow rate is not changed.

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 added the Defect Includes code to repair a defect in EnergyPlus label Jan 14, 2026
@rraustad
Copy link
Collaborator Author

Defect file that includes a DOAS exhaust fan now operates correctly. Review of results show that the fan mass flow rate report variable does not correctly show flow while the node mass flow rate report show proper operation.

image

@mitchute
Copy link
Collaborator

Thanks @rraustad - looks good. I transitioned the test file to 26.1 and tested. That is added it here. What are your thoughts on adding it to the test suite? Based on the issue description, I would bet we don't have any tests that cover this use case either in the test files or the unit tests.

10280-SmallOffice_CentralDOAS_2Fans.idf.txt

@rraustad
Copy link
Collaborator Author

I can add this as an example file.

errorsFound = true;
}
thisDOAS.m_CompPointerAirLoopMixer = AirLoopMixer::factory(state, thisDOAS.m_AirLoopMixerIndex, thisDOAS.AirLoopMixerName);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The DOAS mixer code (old line 763) was moved here to read in mixer data and identify the mixer outlet node number. The following code can then check the fan inlet node to see if it matches a mixer outlet node. If so, then the fan is an exhaust fan. This is also the reason the unit test node numbers changed.

thisDOAS.FanName = CompName;
thisDOAS.m_FanTypeNum = SimAirServingZones::CompType::Fan_System_Object;
thisDOAS.m_FanIndex = fanNum;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The above variables are reserved for the DOAS supply fan. This new logic tries to isolate the first fan read in such that these variables are not overwritten by a second fan object.

state.dataLoopNodes->NodeID(thisOutsideAirSys.InletNodeNum(CompNum)),
state.dataLoopNodes->NodeID(thisOutsideAirSys.OutletNodeNum(CompNum - 1))));
errorsFound = true;
if (isFan && thisOutsideAirSys.InletNodeNum(CompNum) == thisDOAS.m_CompPointerAirLoopMixer->OutletNodeNum) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And this new logic tests for a 2nd fan and updates new exhaust fan variables for use elsewhere. If there is no exhaust fan then the mismatched node warning is issued as before (else at 763).

state.dataLoopNodes->Node(this->m_exhaustFanInletNodeNum).MassFlowRateMaxAvail = this->SumMassFlowRate;
state.dataLoopNodes->Node(this->m_exhaustFanOutletNodeNum).MassFlowRateMaxAvail = this->SumMassFlowRate;
state.dataLoopNodes->Node(this->m_exhaustFanOutletNodeNum).MassFlowRateMax = this->SumMassFlowRate;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And then the rest of the changes are just accounting for a 2nd fan in the equipment list (i.e.,. this->m_exhaustFanUsed = true).

@rraustad rraustad added the NotIDDChange Code does not impact IDD (can be merged after IO freeze) label Jan 16, 2026
@rraustad rraustad added this to the EnergyPlus 26.1 IOFreeze milestone Jan 16, 2026
if (this->m_FanIndex > 0 && (this->m_FanTypeNum == SimAirServingZones::CompType::Fan_System_Object ||
this->m_FanTypeNum == SimAirServingZones::CompType::Fan_ComponentModel)) {
Real64 supplyFanVolFlow = state.dataFans->fans(this->m_FanIndex)->maxAirFlowRate;
if (supplyFanVolFlow != DataSizing::AutoSize) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Check if fan is autosized before stomping on flow rate inputs. If not autosized then provide warning but don't set fan flow. If autosized then jump to else at 1032 and set air flow.

state.dataLoopNodes->Node(this->m_FanInletNodeNum).MassFlowRateMaxAvail = this->SizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMaxAvail = this->SizingMassFlow;
state.dataLoopNodes->Node(this->m_FanOutletNodeNum).MassFlowRateMax = this->SizingMassFlow;
if (this->m_exhaustFanUsed) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And then use same sizing logic for the new exhaust fan.

Copy link
Collaborator

@mitchute mitchute left a comment

Choose a reason for hiding this comment

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

Thanks @rraustad. I think this is ready.

@mitchute
Copy link
Collaborator

Thanks @rraustad. Merging.

@mitchute mitchute merged commit 151da59 into develop Jan 24, 2026
11 checks passed
@mitchute mitchute deleted the 10280-DOAS-Return-Fan branch January 24, 2026 22: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 NotIDDChange Code does not impact IDD (can be merged after IO freeze)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AirloopHVAC:DedicatedOutdoorAirSystem does not allow an exhaust fan

5 participants