Skip to content

Set MassFlowRateMaxAvail and MassFlowRateMinAvail for downstream leakage#11263

Merged
mitchute merged 1 commit intodevelopfrom
fix_downstream_leak
Oct 9, 2025
Merged

Set MassFlowRateMaxAvail and MassFlowRateMinAvail for downstream leakage#11263
mitchute merged 1 commit intodevelopfrom
fix_downstream_leak

Conversation

@lymereJ
Copy link
Collaborator

@lymereJ lymereJ commented Oct 8, 2025

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

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

…/MinAvail is set when `airDistUnit.DownStreamLeak` is true; Add unit test.
@lymereJ lymereJ added the Defect Includes code to repair a defect in EnergyPlus label Oct 8, 2025
@lymereJ
Copy link
Collaborator Author

lymereJ commented Oct 8, 2025

Here are the updated charts from the issue.

image

The changes from this branch and shown in maroon (top panel) and dark green (bottom). During the dead-band operations, the terminal damper is at its minimum, and the flow rate is at the minimum primary flow rate minus the leakage (about 30% lower). Similarly, during cooling operation, the terminal damper opens all the way to 100%, and the air flow leaving the terminal is at the maximum minus the leakage (about 30% lower).

Copy link
Collaborator Author

@lymereJ lymereJ left a comment

Choose a reason for hiding this comment

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

Walk-through:

// set the max and min avail flow rates taking into acount the upstream leak
if (airDistUnit.UpStreamLeak) {
// set the max and min avail flow rates taking into account the upstream leak
if (airDistUnit.UpStreamLeak || airDistUnit.DownStreamLeak) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adding airDistUnit.DownStreamLeak allows MassFlowRateMaxAvail to be set, without this the following would never be true:

https://github.com/NREL/EnergyPlus/blob/05a67847d0a2b7024e9ed5e92e2e6647ff315b67/src/EnergyPlus/ZoneAirLoopEquipmentManager.cc#L749

Copy link
Collaborator

@rraustad rraustad Oct 9, 2025

Choose a reason for hiding this comment

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

The code below (580 - 604) is only looking at the upstream leakage fraction. If it's 0, as in the defect file, then the local variable MassFlowRateMaxAvail wont get set without this change and line 749 jumps to the else. So this change seems correct.

Real64 NonAirSysOutput = 0.0;
Real64 LatOutputProvided = 0.0;
SimZoneAirLoopEquipment(*state, AirDistUnitNum, SysOutputProvided, NonAirSysOutput, LatOutputProvided, FirstHVACIteration, ZonePtr);
EXPECT_EQ(MassFlowRateMaxAvail * (1 - 0.29), state->dataLoopNodes->Node(thisAirTerminal.OutletNodeNum).MassFlowRate);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

New test; Checks that the terminal outlet is the inlet minus leakage.

@rraustad
Copy link
Collaborator

rraustad commented Oct 8, 2025

The TU leakage fractions are 0.05 and 0.07. The TU max flow is 0.35 m3/s (the no leakage case). So air entering the TU (or just after the TU entrance before the damper) should be 0.35 * (1 - 0.05) = 0.3325 m3/s. SPACE1-1 In Node is the node entering the zone so any downstream leakage would be happening within the TU or near the TU outlet node. 0.3325 * (1 - 0.07) = 0.3092 m3/s. So why does your figure show 0.25 m3/s? Questions: 1) where is this leakage going? 2) what is the magnitude of the leakage components (upstream and downstream output reports)? 3) What is the supply air flow rate leaving the air loop? 4) Which should equal the sum of the TU entering air flow rates? 5) What is the impact of leakage on zone air temperature if these TU dampers are at 100%.

ZoneHVAC:AirDistributionUnit,
  SPACE1-1 ATU,            !- Name
  SPACE1-1 In Node,        !- Air Distribution Unit Outlet Node Name
  AirTerminal:SingleDuct:VAV:Reheat,  !- Air Terminal Object Type
  SPACE1-1 VAV Reheat,     !- Air Terminal Name
  0.05,                    !- Nominal Upstream Leakage Fraction
  0.07;                    !- Constant Downstream Leakage Fraction

N1 , \field Nominal Upstream Leakage Fraction
   \note fraction at system design Flow; leakage Flow constant, leakage fraction
   \note varies with variable system Flow Rate.
   \type real
   \minimum 0
   \maximum 0.3
   \default 0
N2 , \field Constant Downstream Leakage Fraction
   \type real
   \minimum 0
   \maximum 0.3
   \default 0

This is what I see in the eio file:

Zone Sizing Information, SPACE1-1, Cooling, 2638.87262, 3430.53441, 0.22196, 0.28855
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE1-1 VAV REHEAT, Design Size Maximum Air Flow Rate [m3/s], 0.28855

@lymereJ
Copy link
Collaborator Author

lymereJ commented Oct 8, 2025

ZoneHVAC:AirDistributionUnit,
  SPACE1-1 ATU,            !- Name
  SPACE1-1 In Node,        !- Air Distribution Unit Outlet Node Name
  AirTerminal:SingleDuct:VAV:Reheat,  !- Air Terminal Object Type
  SPACE1-1 VAV Reheat,     !- Air Terminal Name
  0.05,                    !- Nominal Upstream Leakage Fraction
  0.07;                    !- Constant Downstream Leakage Fraction

@rraustad - Are you looking at the correct file? The defect file is setup as follows, there are no upstream leakage define in the model.

  ZoneHVAC:AirDistributionUnit,
    SPACE1-1 ATU,            !- Name
    SPACE1-1 In Node,        !- Air Distribution Unit Outlet Node Name
    AirTerminal:SingleDuct:VAV:Reheat,  !- Air Terminal Object Type
    SPACE1-1 VAV Reheat,     !- Air Terminal Name
    0.0,                    !- Nominal Upstream Leakage Fraction
    0.29;                    !- Constant Downstream Leakage Fraction

@rraustad
Copy link
Collaborator

rraustad commented Oct 9, 2025

Oh, I saw 5ZoneWarmest and looked at and ran the example file, in Chicago. 0.35 * (1-0.29) = 0.2485. Now the numbers make sense but I still would like to see the leakage plots just to make sure they do what we expect. I see what you did and why but we should make sure everything works correctly. I would think the SA flow rate equals the sum of TU entering air flow rate and suspect that would match because the simulation would go to max iterations if it didn't so you probably don't need to look at that. Does the leakage go to the zone (a cooling effect)? The plenum? Is it the correct flow rate?

Zone Sizing Information, SPACE1-1, Cooling, 2634.04754, 3424.26181, 0.26406, 0.34328
Component Sizing Information, AirTerminal:SingleDuct:VAV:Reheat, SPACE1-1 VAV REHEAT, Design Size Maximum Air Flow Rate [m3/s], 0.34328

Docs don't say where the leakage goes:

image

Here it is in the Eng Ref. Says the leakage goes to the plenum, but this is a downstream leak so where does that air go?

image

@rraustad
Copy link
Collaborator

rraustad commented Oct 9, 2025

Again from the Eng Ref, the leakage flows vanish. I suspect both upstream and downstream are added to the plenum but this suggests that at least the downstream leakage is not accounted for (because elsewhere it says upstream leakage goes to the plenum), which I think should either go to the zone of the plenum (if it exists). The last line says these leakage flows are added to the plenum.

image

@rraustad
Copy link
Collaborator

rraustad commented Oct 9, 2025

@mitchute I've looked at this from all angles. This change looks correct.

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, all. Merging.

@mitchute mitchute merged commit 41397f0 into develop Oct 9, 2025
12 checks passed
@mitchute mitchute deleted the fix_downstream_leak branch October 9, 2025 02:08
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.

Downstream leakage issue with simple duct leakage model

4 participants