Repository navigation
Conversation
Simple duct leakage from ZoneHVAC:AirDistributionUnit was always added to AirLoopFlow.LeakFlow, and therefore to SysRetFlow, even when the leaked air never reaches a return node. Only a connected AirLoopHVAC:ReturnPlenum adds the leak flow back into the return path. Without one, MixedAir computed the exhaust flow from the inflated SysRetFlow but the mixed flow from the actual return node flow, so the mixed air flow came up short by the leak flow on every HVAC iteration. The shortfall fed back through the available-flow limits on the supply fan and terminal, and the ADU leakage was then applied to the already reduced flow. In a VAV model with 26% leakage, delivered airflow fell by up to ~86% and annual site energy dropped by ~17% instead of rising. - CalcZoneMassBalance now counts upstream and downstream duct leakage in LeakFlow only if the ADU's zone has a return node feeding a return plenum (new ZonePlenum::zoneReturnFeedsPlenum). Leakage stays active and is replaced through the outdoor air path. - Remove the check in InitAirZoneReturnPlenum that zeroed leakage for ADUs without a plenum. It only ran when a model had a plenum, and only tested downstream leakage, so models with no plenum never reached it. - Add a one-time warning per ADU (upstream or downstream leakage, any model) when the ADU's zone has no return plenum, stating that the leaked air is treated as lost from the air loop. Results are unchanged for models whose leaking ADUs have a return plenum. Models with duct leakage and no plenum will change, and ADUs without a plenum in models that do have one no longer have downstream leakage disabled. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
added 2 commits
October 9, 2026 16:37
ZonePlenum_zoneReturnFeedsPlenumTest covers no plenum, a plenum on one zone, and invalid zone indices. ZoneEquipmentManager_CalcZoneMassBalance_DuctLeakReturnFlowTest covers LeakFlow and SysRetFlow in three cases. With no plenum, leakage is excluded. With a plenum on one of two zones, only that zone's ADU counts (0.15 of 0.30 kg/s). With plenums on both zones, all leakage counts, as before. ZoneAirLoopEquipment_DuctLeakNoReturnPlenumWarningTest checks the exact warning for upstream-only, downstream-only and both. It also checks that there is no warning with zero fractions or with a plenum, and that the leak flags stay set.
With ADU duct leakage no longer counted in the system return flow when the zone has no return plenum, loops without outdoor air to replace the leaked air now report "Supply is > return plus outdoor air" in CheckAirLoopFlowBalance. Add the total unrecovered simple duct leakage to that message so the cause is visible.
yujiex
marked this pull request as draft
October 10, 2026 00:08
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request overview
Description of the purpose of this PR
Simple duct leakage from ZoneHVAC:AirDistributionUnit was always added to AirLoopFlow.LeakFlow, and therefore to SysRetFlow, even when the leaked air never reaches a return node. Only a connected AirLoopHVAC:ReturnPlenum adds the leak flow back into the return path. Without one, MixedAir computed the exhaust flow from the inflated SysRetFlow but the mixed flow from the actual return node flow, so the mixed air flow came up short by the leak flow on every HVAC iteration. The shortfall fed back through the available-flow limits on the supply fan and terminal, and the ADU leakage was then applied to the already reduced flow. In a VAV model with 26% leakage, delivered airflow fell by up to ~86% and annual site energy dropped by ~17% instead of rising.
Results are unchanged for models whose leaking ADUs have a return plenum. Models with duct leakage and no plenum will change, and ADUs without a plenum in models that do have one no longer have downstream leakage disabled.
Pull Request Author
Reviewer