Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple air loops in calculations of ZoneAirMassFlowConservation #10493

Open
3 tasks
rraustad opened this issue May 3, 2024 · 0 comments
Open
3 tasks
Labels
Defect Includes code to repair a defect in EnergyPlus

Comments

@rraustad
Copy link
Contributor

rraustad commented May 3, 2024

Issue overview

EnergyPlus now allows multiple air loops per zone and there are many places that have updated the code to accommodate that new feature. There are also places where this update is still needed. One place is the calculation of a zone return air mass flow rate when ZoneAirMassFlowConservation is used.

Work on #10469 discovered this need for an update to the calculation.

The code in question is found in ZoneEquipmentManager::CalcZoneMassBalance. The calculation of AdjustedTotalReturnMassFlow does not account for multiple air loops serving the same zone. Also, use of the air loop air flow rate to limit a zone air flow rate could likely be improved by summing the zone air flow rate attached to all zones served by an air loop's specific return node and making an adjustment at that time (i.e., after all zones have been sized). The sizing calculations simply place a mass flow rate on the zone return node and when all zones have sized another look at mass flow rates could be performed to more accurately determine if the sum of the returns actually exceed the air loop flow rate. After sizing is complete the calculations for zone air mass balance during the simulation would include multiple air loops.

        if (state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance) {
            // set mass conservation variables
            massConservation.InMassFlowRate = TotInletAirMassFlowRate;
            massConservation.ExhMassFlowRate = TotExhaustAirMassFlowRate;

            if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustMixingOnly ||
                state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustMixingThenReturn) {
                massConservation.RetMassFlowRate = FinalTotalReturnMassFlow;
                ZoneReturnAirMassFlowRate = FinalTotalReturnMassFlow;
                if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustMixingThenReturn) {

                    // Calculate return air flow rate using mass conservation equation
                    Real64 AdjustedTotalReturnMassFlow =
                        max(0.0, TotInletAirMassFlowRate - TotExhaustAirMassFlowRate + ZoneMixingNetAirMassFlowRate);
                    if (!state.dataGlobal->DoingSizing) {
                        AdjustedTotalReturnMassFlow = min(AdjustedTotalReturnMassFlow, zoneEquipConfig.AirLoopDesSupply);
                    }
                    // add adjust zone return node air flow calc
                    CalcZoneReturnFlows(state, ZoneNum, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow);
                    massConservation.RetMassFlowRate = FinalTotalReturnMassFlow;
                    ZoneReturnAirMassFlowRate = FinalTotalReturnMassFlow;
                }
                // Set zone infiltration air flow rate
                CalcZoneInfiltrationFlows(state, ZoneNum, ZoneReturnAirMassFlowRate);
            } else if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustReturnOnly ||
                       state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustReturnThenMixing) {

            // more similar changes here

Details

Some additional details for this issue (if relevant):

  • Platform (Operating system, version)
  • Version of EnergyPlus (if using an intermediate build, include SHA)
  • Unmethours link or helpdesk ticket number

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Defect file added (list location of defect file here)
  • Ticket added to Pivotal for defect (development team task)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)
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

No branches or pull requests

1 participant