diff --git a/doc/engineering-reference/src/integrated-solution-manager/zone-air-mass-flow-conservation.tex b/doc/engineering-reference/src/integrated-solution-manager/zone-air-mass-flow-conservation.tex index bb2a4b9ccf2..c1cc6685b45 100644 --- a/doc/engineering-reference/src/integrated-solution-manager/zone-air-mass-flow-conservation.tex +++ b/doc/engineering-reference/src/integrated-solution-manager/zone-air-mass-flow-conservation.tex @@ -54,12 +54,17 @@ \subsubsection{Zone Return Air Node 1}\label{zone-return-air-node1} {\dot m_{R,1}} = ReturnFlowSchedule*{\dot m_{R}} \end{equation} -The zone air mass flow conservation calculation limits the zone the return node air flow rate with air loop design supply to protect from large number the solution may throw as follows: +In the zone air mass flow conservation calculation, the calculated zone total return flow rate is modified using return node flow schedule value when the zone air flow balancing is enforced and assigned to return node 1. \begin{equation} -{\dot m_{R,1}} = MIN\left( {{\dot m_{R,1}},\,{{\dot m}_{DesSupply,i}}} \right) +{\dot m_{R,1}} = ReturnFlowSchedule*{\dot m_{R}} \end{equation} - + +The zone air mass flow conservation calculation also limits the zone return node air flow rate with air loop design supply to protect from large number the solution may throw as follows: + +\begin{equation} +{\dot m_{R,1}} = MIN\left( {{\dot m_{R,1}},\,{{\dot m}_{DesSupply,i}}} \right) +\end{equation} \subsubsection{Allocation to Multiple Return Nodes}\label{allocation-to-multiple-return-nodes} @@ -75,11 +80,18 @@ \subsubsection{Allocation to Multiple Return Nodes}\label{allocation-to-multiple {\dot m_{R,i}} = {\dot m_{R,i}} \end{equation} -The zone air mass flow conservation calculation limits the zone the return node air flow rate with air loop design supply to protect from large number the solution may throw as follows: +In the zone air mass flow conservation calculation, the calculated zone total return flow rate is distributed to the zone return nodes proportional to the return nodes current mass flow rates as follows: + +\begin{equation} +{\dot m_{R,i,}} = {\dot m_{R,i}} * \left(\frac{ReturnFlowSchedule*{\dot m_{R}}} {\sum\nolimits_{i} {{{\dot m}_{R,i}}}} \right) +\end{equation} + +The zone air mass flow conservation calculation also limits the zone return node air flow rate with air loop design supply to protect from large number the solution may throw as follows: \begin{equation} {\dot m_{R,1}} = MIN\left( {{\dot m_{R,1}},\,{{\dot m}_{DesSupply, AirLoop}}} \right) \end{equation} + \subsubsection{Overall Return Air Balance}\label{overall-return-air-balance} @@ -178,7 +190,7 @@ \subsection{Zone Mixing Flow Rate Calculations}\label{zone-mixing-flow-rate-calc \end{equation} Zone air mass flow balance can be enforced using four options: \textit{AdjustMixingOnly}, \textit{AdjustReturnOnly}, \textit{AdjustMixingThenReturn}, or \textit{AdjustReturnThenMixing}. These options involve either adjusting zone mixing objects flows, adjusting the zone total return air flows, or a -combination of both. The zone air mass flow balance equation formulation is described next for each of the four options. +combination of both. The zone air mass flow balance equation formulation for each of the four options is described next. \textbf{AdjustMixingOnly:} adjusts the zone mixing object flows only to enforce zone air mass flow balance and the adjusted zone mixing mass flow rates are used to determine the zone total return air mass flow rate. Infiltration air flow can also adjusted if required depending on user preference as specified in Section \textit{Infiltration Flow rates Adjustments}. @@ -206,7 +218,7 @@ \subsection{Zone Mixing Flow Rate Calculations}\label{zone-mixing-flow-rate-calc {\dot m_{XR}} = \sum\nolimits_j {{{\dot m}_{XR,j}}} \end{equation} -If ZoneAirMassFlowConservation is active, then determine the total zone return air flow rate: +If ZoneAirMassFlowConservation is active, then determine the zone total return air flow rate: \begin{equation} {\dot m_{R}} = MAX\left( {0.0,\,{{\dot m}_S} - {{\dot m}_{EX,tot}} + [{{\dot m}_{XR}} - {{\dot m}_{XS}}]} \right) \end{equation} @@ -218,7 +230,7 @@ \subsection{Zone Mixing Flow Rate Calculations}\label{zone-mixing-flow-rate-calc \textbf{AdjustMixingThenReturn:} first adjusts the zone mixing air mass flow rates, then adjusts the zone total return air mass flow rate to enforce zone air mass flow balance. Infiltration air flow can also adjusted if required depending on user preference as specified in section \textit{Infiltration Flow rates Adjustments}. For adjusting the mixing mass flow rates the set of equations for \textit{AdjustMixingOnly} method described above are used and for adjusting the zone total return air mass flow rate the equation for \textit{AdjustReturnOnly} method is used. -\textbf{AdjustReturnThenMixing:} first adjusts the zone total return air mass flow rate, then adjusts the zone mixing mass flow rates to enforce zone air mass flow balance. Infiltration air flow can also adjusted if required depending on user preference as specified in section \textit{Infiltration Flow rates Adjustments}. For adjusting the zone total return air mass flow rates the equations for \textit{AdjustReturnOnly} method described above is used and for adjusting the zone mixing mass flow rates the set of equations for \textit{AdjustMixingOnly} method are used. +\textbf{AdjustReturnThenMixing:} first adjusts the zone total return air mass flow rate, then adjusts the zone mixing mass flow rates to enforce zone air mass flow balance. Infiltration air flow can also adjusted if required depending on user preference as specified in section \textit{Infiltration Flow rates Adjustments}. For adjusting the zone total return air mass flow rate the equation for \textit{AdjustReturnOnly} method described above is used and for adjusting the zone mixing mass flow rates the set of equations defined for \textit{AdjustMixingOnly} method are used. \subsection{Infiltration Flow Rate Adjustments}\label{infiltration-flow-rate-adjustments} diff --git a/src/EnergyPlus/DataHeatBalance.hh b/src/EnergyPlus/DataHeatBalance.hh index 82aa0593a66..8520673e0c1 100644 --- a/src/EnergyPlus/DataHeatBalance.hh +++ b/src/EnergyPlus/DataHeatBalance.hh @@ -208,13 +208,14 @@ namespace DataHeatBalance { constexpr int MixingSourceZonesOnly(1); constexpr int AllZones(2); - // Parameter for zone air flow mass balancing method - constexpr int AdjustMixingOnly(1); - constexpr int AdjustReturnOnly(2); - constexpr int AdjustMixingThenReturn(3); - constexpr int AdjustReturnThenMixing(4); - constexpr int NoAdjustReturnAndMixing(0); - + enum class AdjustmentType { + // zone air flow balancing method + AdjustMixingOnly, + AdjustReturnOnly, + AdjustMixingThenReturn, + AdjustReturnThenMixing, + NoAdjustReturnAndMixing + }; constexpr int NumZoneIntGainDeviceTypes(54); extern Array1D_string const ZoneIntGainDeviceTypes; @@ -1050,8 +1051,7 @@ namespace DataHeatBalance { { // Members bool EnforceZoneMassBalance; // flag to enforce zone air mass conservation - int ZoneFlowAdjustment; // specifies how zone air flow balance is determined (AdjustMixingOnly, AdjustReturnOnly, AdjustMixingThenReturn, - // AdjustReturnThenMixing, None) + AdjustmentType ZoneFlowAdjustment; // determines how zone air flow is adjusted (AdjustMixingOnly, AdjustReturnOnly, AdjustMixingThenReturn, AdjustReturnThenMixing, None) int InfiltrationTreatment; // determines how infiltration is treated for zone mass balance int InfiltrationTreatment; // determines how infiltration is treated for zone mass balance int InfiltrationZoneType; // specifies which types of zones allow infiltration to be changed bool AdjustZoneMixingFlow; // used to adjust zone mixing air flows to enforce air flow balance @@ -1059,8 +1059,7 @@ namespace DataHeatBalance { // Note, unique global object // Default Constructor - ZoneAirMassFlowConservation() - : EnforceZoneMassBalance(false), ZoneFlowAdjustment(0), InfiltrationTreatment(0), InfiltrationZoneType(0), AdjustZoneMixingFlow(false), AdjustZoneInfiltrationFlow(false) + ZoneAirMassFlowConservation() : EnforceZoneMassBalance(false), ZoneFlowAdjustment(AdjustmentType::NoAdjustReturnAndMixing), InfiltrationTreatment(0), InfiltrationZoneType(0), AdjustZoneMixingFlow(false), AdjustZoneInfiltrationFlow(false) { } }; diff --git a/src/EnergyPlus/DataZoneEquipment.hh b/src/EnergyPlus/DataZoneEquipment.hh index d0fcde736f8..7634f8ab0d7 100644 --- a/src/EnergyPlus/DataZoneEquipment.hh +++ b/src/EnergyPlus/DataZoneEquipment.hh @@ -291,6 +291,7 @@ namespace DataZoneEquipment { bool ZoneHasAirLoopWithOASys; // true if zone is served by one or more airloops with an outdoor air system int ZoneAirDistributionIndex; // index to DesignSpecification:ZoneAirDistribution object int ZoneDesignSpecOAIndex; // index to DesignSpecification:OutdoorAir object + Real64 AirLoopDesSupply; // air lood design supply air flow rate [kg/s] // Default Constructor EquipConfiguration() @@ -298,7 +299,7 @@ namespace DataZoneEquipment { NumReturnNodes(0), NumReturnFlowBasisNodes(0), ReturnFlowSchedPtrNum(0), FlowError(false), ZonalSystemOnly(false), IsControlled(false), ZoneExh(0.0), ZoneExhBalanced(0.0), PlenumMassFlow(0.0), ExcessZoneExh(0.0), TotAvailAirLoopOA(0.0), TotInletAirMassFlowRate(0.0), TotExhaustAirMassFlowRate(0.0), InFloorActiveElement(false), InWallActiveElement(false), InCeilingActiveElement(false), - ZoneHasAirFlowWindowReturn(false), ZoneHasAirLoopWithOASys(false), ZoneAirDistributionIndex(0), ZoneDesignSpecOAIndex(0) + ZoneHasAirFlowWindowReturn(false), ZoneHasAirLoopWithOASys(false), ZoneAirDistributionIndex(0), ZoneDesignSpecOAIndex(0), AirLoopDesSupply(0.0) { } }; diff --git a/src/EnergyPlus/Fans.cc b/src/EnergyPlus/Fans.cc index 98b1592c86a..456d32ff86c 100644 --- a/src/EnergyPlus/Fans.cc +++ b/src/EnergyPlus/Fans.cc @@ -593,7 +593,7 @@ namespace EnergyPlus::Fans { if (NumAlphas > 8 && !lAlphaFieldBlanks(9)) { - if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::NoAdjustReturnAndMixing) { + if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing) { // do not include adjusted for "balanced" exhaust flow in the zone total return calculation ShowWarningError(state, RoutineName + cCurrentModuleObject + ": invalid " + cAlphaFieldNames(9) + " = " + cAlphaArgs(9) + diff --git a/src/EnergyPlus/HeatBalFiniteDiffManager.cc b/src/EnergyPlus/HeatBalFiniteDiffManager.cc index be70cd8fc41..8532702dd80 100644 --- a/src/EnergyPlus/HeatBalFiniteDiffManager.cc +++ b/src/EnergyPlus/HeatBalFiniteDiffManager.cc @@ -106,7 +106,6 @@ namespace HeatBalFiniteDiffManager { using HeatBalanceMovableInsulation::EvalOutsideMovableInsulation; // MODULE PARAMETER DEFINITIONS: - constexpr Real64 Lambda(2500000.0); constexpr Real64 smalldiff(1.e-8); // Used in places where "equality" tests should not be used. constexpr int CrankNicholsonSecondOrder(1); // original CondFD scheme. semi implicit, second order in time diff --git a/src/EnergyPlus/HeatBalanceAirManager.cc b/src/EnergyPlus/HeatBalanceAirManager.cc index 244d22c0a59..8bf11910bf9 100644 --- a/src/EnergyPlus/HeatBalanceAirManager.cc +++ b/src/EnergyPlus/HeatBalanceAirManager.cc @@ -212,7 +212,7 @@ namespace EnergyPlus::HeatBalanceAirManager { // PURPOSE OF THIS SUBROUTINE : // This subroutine sets the zone mass conservation flag to true. - if (state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance && state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::NoAdjustReturnAndMixing) { + if (state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance && state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing) { for (int Loop = 1; Loop <= state.dataHeatBal->TotMixing; ++Loop) { state.dataHeatBalFanSys->ZoneMassBalanceFlag(state.dataHeatBal->Mixing(Loop).ZonePtr) = true; state.dataHeatBalFanSys->ZoneMassBalanceFlag(state.dataHeatBal->Mixing(Loop).FromZone) = true; @@ -3762,7 +3762,7 @@ namespace EnergyPlus::HeatBalanceAirManager { if (state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance) { // Check for infiltration in zone which are only a mixing source zone for (ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { - if ((state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::NoAdjustReturnAndMixing && state.dataHeatBal->MassConservation(ZoneNum).IsOnlySourceZone) && + if ((state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing && state.dataHeatBal->MassConservation(ZoneNum).IsOnlySourceZone) && (state.dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment != DataHeatBalance::NoInfiltrationFlow)) { if (state.dataHeatBal->MassConservation(ZoneNum).InfiltrationPtr == 0) { ShowSevereError(state, RoutineName + ": Infiltration object is not defined for zone = " + state.dataHeatBal->Zone(ZoneNum).Name); @@ -3790,7 +3790,7 @@ namespace EnergyPlus::HeatBalanceAirManager { "System", "Average", state.dataHeatBal->Zone(ZoneNum).Name); - if ((state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::NoAdjustReturnAndMixing) && + if ((state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing) && ((state.dataHeatBal->MassConservation(ZoneNum).NumSourceZonesMixingObject + state.dataHeatBal->MassConservation(ZoneNum).NumReceivingZonesMixingObject) > 0)) { SetupOutputVariable(state, "Zone Air Mass Balance Mixing Receiving Mass Flow Rate", OutputProcessor::Unit::kg_s, diff --git a/src/EnergyPlus/HeatBalanceManager.cc b/src/EnergyPlus/HeatBalanceManager.cc index 298107fa1f9..a6fae0db860 100644 --- a/src/EnergyPlus/HeatBalanceManager.cc +++ b/src/EnergyPlus/HeatBalanceManager.cc @@ -1222,31 +1222,31 @@ namespace HeatBalanceManager { { auto const SELECT_CASE_var(AlphaName(1)); if (SELECT_CASE_var == "ADJUSTMIXINGONLY") { - state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustMixingOnly; + state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustmentType::AdjustMixingOnly; state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance = true; AlphaName(1) = "AdjustMixingOnly"; } else if (SELECT_CASE_var == "ADJUSTRETURNONLY") { - state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustReturnOnly; + state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustmentType::AdjustReturnOnly; state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance = true; AlphaName(1) = "AdjustReturnOnly"; } else if (SELECT_CASE_var == "ADJUSTMIXINGTHENRETURN") { - state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustMixingThenReturn; + state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustmentType::AdjustMixingThenReturn; state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance = true; AlphaName(1) = "AdjustMixingThenReturn"; } else if (SELECT_CASE_var == "ADJUSTRETURNTHENMIXING") { - state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustReturnThenMixing; + state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustmentType::AdjustReturnThenMixing; state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance = true; AlphaName(1) = "AdjustReturnThenMixing"; } else if (SELECT_CASE_var == "NONE") { - state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = NoAdjustReturnAndMixing; + state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustmentType::NoAdjustReturnAndMixing; AlphaName(1) = "None"; } else { - state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = NoAdjustReturnAndMixing; + state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment = AdjustmentType::NoAdjustReturnAndMixing; AlphaName(1) = "None"; ShowWarningError(state, CurrentModuleObject + ": Invalid input of " + cAlphaFieldNames(1) + ". The default choice is assigned = None"); } } - if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::NoAdjustReturnAndMixing) state.dataHeatBal->ZoneAirMassFlow.AdjustZoneMixingFlow = true; + if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing) state.dataHeatBal->ZoneAirMassFlow.AdjustZoneMixingFlow = true; } if (NumAlpha > 1) { { diff --git a/src/EnergyPlus/SimAirServingZones.cc b/src/EnergyPlus/SimAirServingZones.cc index 16e37eda904..3609c8b189f 100644 --- a/src/EnergyPlus/SimAirServingZones.cc +++ b/src/EnergyPlus/SimAirServingZones.cc @@ -2100,6 +2100,17 @@ namespace EnergyPlus::SimAirServingZones { state.dataAirLoop->AirLoopFlow(AirLoopNum).SysToZoneDesFlowRatio = 1.0; } } + + for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) { + if (!state.dataZoneEquip->ZoneEquipConfig(ZoneNum).IsControlled) continue; + // sets design supply air flow rate in the ZoneEquipConfig struct for use with zone air mass balance + for (int returnNum = 1; returnNum <= state.dataZoneEquip->ZoneEquipConfig(ZoneNum).NumReturnNodes; ++returnNum) { + int airLoop = state.dataZoneEquip->ZoneEquipConfig(ZoneNum).ReturnNodeAirLoopNum(returnNum); + if (airLoop > 0) { + state.dataZoneEquip->ZoneEquipConfig(ZoneNum).AirLoopDesSupply = state.dataAirLoop->AirLoopFlow(airLoop).DesSupply; + } + } + } } // Do the Begin Environment initializations diff --git a/src/EnergyPlus/ZoneEquipmentManager.cc b/src/EnergyPlus/ZoneEquipmentManager.cc index 685cd621162..ac198e85175 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.cc +++ b/src/EnergyPlus/ZoneEquipmentManager.cc @@ -2673,7 +2673,7 @@ namespace EnergyPlus::ZoneEquipmentManager { CalcAirFlowSimple(state, 0); } else { CalcAirFlowSimple(state, 0, state.dataHeatBal->ZoneAirMassFlow.AdjustZoneMixingFlow, state.dataHeatBal->ZoneAirMassFlow.AdjustZoneInfiltrationFlow); - } + } } for (ControlledZoneNum = 1; ControlledZoneNum <= state.dataGlobal->NumOfZones; ++ControlledZoneNum) { @@ -3969,8 +3969,8 @@ namespace EnergyPlus::ZoneEquipmentManager { } } // Set zone mixing incoming mass flow rate - if ((Iteration == 0) || state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustReturnOnly || - state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustReturnThenMixing) { + if ((Iteration == 0) || state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustReturnOnly || + state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustReturnThenMixing) { ZoneMixingAirMassFlowRate = state.dataHeatBalFanSys->MixingMassFlowZone(ZoneNum); } else { ZoneMixingAirMassFlowRate = max(0.0, ZoneReturnAirMassFlowRate + TotExhaustAirMassFlowRate - @@ -4010,20 +4010,17 @@ namespace EnergyPlus::ZoneEquipmentManager { state.dataHeatBal->MassConservation(ZoneNum).InMassFlowRate = TotInletAirMassFlowRate; state.dataHeatBal->MassConservation(ZoneNum).ExhMassFlowRate = TotExhaustAirMassFlowRate; - if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustMixingOnly || - state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustMixingThenReturn) { + if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustMixingOnly || + state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustMixingThenReturn) { ZoneReturnAirMassFlowRate = FinalTotalReturnMassFlow; Real64 AdjustedTotalReturnMassFlow = 0; state.dataHeatBal->MassConservation(ZoneNum).RetMassFlowRate = FinalTotalReturnMassFlow; ZoneReturnAirMassFlowRate = FinalTotalReturnMassFlow; - if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustMixingThenReturn) { + if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustMixingThenReturn) { // Calculate return air flow rate using mass conservation equation - AdjustedTotalReturnMassFlow = TotInletAirMassFlowRate - TotExhaustAirMassFlowRate + ZoneMixingNetAirMassFlowRate; - AdjustedTotalReturnMassFlow = max(0.0, AdjustedTotalReturnMassFlow); - Real64 zoneReturnFlowMax = 0.0; - ZoneReturnFlowsMaximum(state, ZoneNum, zoneReturnFlowMax); - AdjustedTotalReturnMassFlow = min(AdjustedTotalReturnMassFlow, zoneReturnFlowMax); + AdjustedTotalReturnMassFlow = max(0.0, TotInletAirMassFlowRate - TotExhaustAirMassFlowRate + ZoneMixingNetAirMassFlowRate); + AdjustedTotalReturnMassFlow = min(AdjustedTotalReturnMassFlow, state.dataZoneEquip->ZoneEquipConfig(ZoneNum).AirLoopDesSupply); // add adjust zone return node air flow calc CalcZoneReturnFlows(state, ZoneNum, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow); state.dataHeatBal->MassConservation(ZoneNum).RetMassFlowRate = FinalTotalReturnMassFlow; @@ -4032,23 +4029,20 @@ namespace EnergyPlus::ZoneEquipmentManager { // Set zone infiltration air flow rate CalcZoneInfiltrationFlows(state, ZoneNum, ZoneReturnAirMassFlowRate); - } else if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustReturnOnly || - state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustReturnThenMixing) { + } else if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustReturnOnly || + state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustReturnThenMixing) { - Real64 zoneReturnFlowMax = 0.0; Real64 AdjustedTotalReturnMassFlow = 0; // Calculate return air flow rate using mass conservation equation - AdjustedTotalReturnMassFlow = TotInletAirMassFlowRate - TotExhaustAirMassFlowRate + ZoneMixingNetAirMassFlowRate; - AdjustedTotalReturnMassFlow = max(0.0, AdjustedTotalReturnMassFlow); - ZoneReturnFlowsMaximum(state, ZoneNum, zoneReturnFlowMax); - AdjustedTotalReturnMassFlow = min(AdjustedTotalReturnMassFlow, zoneReturnFlowMax); + AdjustedTotalReturnMassFlow = max(0.0, TotInletAirMassFlowRate - TotExhaustAirMassFlowRate + ZoneMixingNetAirMassFlowRate); + AdjustedTotalReturnMassFlow = min(AdjustedTotalReturnMassFlow, state.dataZoneEquip->ZoneEquipConfig(ZoneNum).AirLoopDesSupply); // add adjust zone return node air flow calculation CalcZoneReturnFlows(state, ZoneNum, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow); state.dataHeatBal->MassConservation(ZoneNum).RetMassFlowRate = FinalTotalReturnMassFlow; ZoneReturnAirMassFlowRate = FinalTotalReturnMassFlow; - if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustReturnThenMixing) { + if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment == DataHeatBalance::AdjustmentType::AdjustReturnThenMixing) { ZoneMixingAirMassFlowRate = max(0.0, ZoneReturnAirMassFlowRate + TotExhaustAirMassFlowRate - TotInletAirMassFlowRate + state.dataHeatBal->MassConservation(ZoneNum).MixingSourceMassFlowRate); @@ -4057,9 +4051,9 @@ namespace EnergyPlus::ZoneEquipmentManager { state.dataHeatBal->MassConservation(ZoneNum).MixingMassFlowRate - state.dataHeatBal->MassConservation(ZoneNum).MixingSourceMassFlowRate; // Calculate return air flow rate using mass conservation equation - AdjustedTotalReturnMassFlow = TotInletAirMassFlowRate - TotExhaustAirMassFlowRate + ZoneMixingNetAirMassFlowRate; - AdjustedTotalReturnMassFlow = max(0.0, AdjustedTotalReturnMassFlow); - AdjustedTotalReturnMassFlow = min(AdjustedTotalReturnMassFlow, zoneReturnFlowMax); + AdjustedTotalReturnMassFlow = max(0.0, TotInletAirMassFlowRate - TotExhaustAirMassFlowRate + ZoneMixingNetAirMassFlowRate); + AdjustedTotalReturnMassFlow = min(AdjustedTotalReturnMassFlow, state.dataZoneEquip->ZoneEquipConfig(ZoneNum).AirLoopDesSupply); + // add adjust zone return node air flow calc CalcZoneReturnFlows(state, ZoneNum, AdjustedTotalReturnMassFlow, FinalTotalReturnMassFlow); state.dataHeatBal->MassConservation(ZoneNum).RetMassFlowRate = FinalTotalReturnMassFlow; @@ -4260,10 +4254,6 @@ namespace EnergyPlus::ZoneEquipmentManager { returnNodeMassFlow = inletMassFlow; thisZoneEquip.FixedReturnFlow(returnNum) = true; } - // if zone mass balance true, set totReturnFlow to expected return flow - if (state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance ) { - returnNodeMassFlow = ExpTotalReturnMassFlow; - } } else { returnNodeMassFlow = 0.0; } @@ -4294,10 +4284,6 @@ namespace EnergyPlus::ZoneEquipmentManager { returnNodeMassFlow = max(0.0, (ExpTotalReturnMassFlow * returnSchedFrac * airLoopReturnFrac)); } } - // if zone mass balance true, set totReturnFlow to expected return flow - if (state.dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance ) { - returnNodeMassFlow = ExpTotalReturnMassFlow; - } } } totReturnFlow += returnNodeMassFlow; @@ -4307,41 +4293,71 @@ namespace EnergyPlus::ZoneEquipmentManager { } } - // Adjust return flows if greater than expected (i.e. there is exhaust or mixing flow reducing the total available for return) - if ((totReturnFlow > ExpTotalReturnMassFlow) && (totVarReturnFlow > 0.0)) { - Real64 newReturnFlow = 0.0; - Real64 returnAdjFactor = (1 - ((totReturnFlow - ExpTotalReturnMassFlow) / totVarReturnFlow)); // Return flow adjustment factor + // if zone mass balance true, set to expected return flow + if (state.dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment != DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing) { + // applies zone return flow schedule multiplier + ExpTotalReturnMassFlow = returnSchedFrac * ExpTotalReturnMassFlow; + // set air flow rate for each return node + Real64 zoneTotReturnFlow = 0.0; + Real64 returnNodeMassFlow = 0.0; for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { int retNode = thisZoneEquip.ReturnNode(returnNum); - Real64 curReturnFlow = state.dataLoopNodes->Node(retNode).MassFlowRate; if (retNode > 0) { - if (!thisZoneEquip.FixedReturnFlow(returnNum)) { - newReturnFlow = curReturnFlow * returnAdjFactor; - FinalTotalReturnMassFlow += newReturnFlow; - state.dataLoopNodes->Node(retNode).MassFlowRate = newReturnFlow; - } else { - FinalTotalReturnMassFlow += curReturnFlow; + if (numRetNodes == 1) { + returnNodeMassFlow = ExpTotalReturnMassFlow; + } else { // multiple return nodes + if (ExpTotalReturnMassFlow > 0.0) { + Real64 returnAdjFactor = state.dataLoopNodes->Node(retNode).MassFlowRate / ExpTotalReturnMassFlow; + returnNodeMassFlow = returnAdjFactor * ExpTotalReturnMassFlow; + } else { + returnNodeMassFlow = 0.0; + } } } + zoneTotReturnFlow += returnNodeMassFlow; + } + // Adjust return node flows if zone total return flow is > 0 + if (zoneTotReturnFlow > 0.0) { + for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { + int retNode = thisZoneEquip.ReturnNode(returnNum); + if (retNode > 0) { + if (numRetNodes == 1) { + // set it to expected return flows + state.dataLoopNodes->Node(retNode).MassFlowRate = ExpTotalReturnMassFlow; + FinalTotalReturnMassFlow = ExpTotalReturnMassFlow; + } else { // multiple return nodes, adjust nodes flow + Real64 newReturnFlow = 0.0; + Real64 returnAdjFactor = ExpTotalReturnMassFlow / zoneTotReturnFlow; + Real64 curReturnFlow = state.dataLoopNodes->Node(retNode).MassFlowRate; + newReturnFlow = curReturnFlow * returnAdjFactor; + state.dataLoopNodes->Node(retNode).MassFlowRate = newReturnFlow; + FinalTotalReturnMassFlow += newReturnFlow; + } + } + } + } else { + FinalTotalReturnMassFlow = ExpTotalReturnMassFlow; } } else { - FinalTotalReturnMassFlow = totReturnFlow; - } - } - - - void ZoneReturnFlowsMaximum(EnergyPlusData &state, - int const ZoneNum, - Real64 &MaximumZoneReturnMassFlow // maximum zone total return air mass flow rate - ) - { - MaximumZoneReturnMassFlow = 0.0; - // sets the zone return node maximum flow rate to the airloop design supply flow rate - for (int returnNum = 1; returnNum <= state.dataZoneEquip->ZoneEquipConfig(ZoneNum).NumReturnNodes; ++returnNum) { - int airLoop = state.dataZoneEquip->ZoneEquipConfig(ZoneNum).ReturnNodeAirLoopNum(returnNum); - if (airLoop > 0) { - auto &thisAirLoopFlow(state.dataAirLoop->AirLoopFlow(airLoop)); - MaximumZoneReturnMassFlow = thisAirLoopFlow.DesSupply; + // Adjust return flows if greater than expected (i.e. there is exhaust or mixing flow reducing the total available for return) + if ((totReturnFlow > ExpTotalReturnMassFlow) && (totVarReturnFlow > 0.0)) { + Real64 newReturnFlow = 0.0; + Real64 returnAdjFactor = (1 - ((totReturnFlow - ExpTotalReturnMassFlow) / totVarReturnFlow)); // Return flow adjustment factor + for (int returnNum = 1; returnNum <= numRetNodes; ++returnNum) { + int retNode = thisZoneEquip.ReturnNode(returnNum); + Real64 curReturnFlow = state.dataLoopNodes->Node(retNode).MassFlowRate; + if (retNode > 0) { + if (!thisZoneEquip.FixedReturnFlow(returnNum)) { + newReturnFlow = curReturnFlow * returnAdjFactor; + FinalTotalReturnMassFlow += newReturnFlow; + state.dataLoopNodes->Node(retNode).MassFlowRate = newReturnFlow; + } else { + FinalTotalReturnMassFlow += curReturnFlow; + } + } + } + } else { + FinalTotalReturnMassFlow = totReturnFlow; } } } diff --git a/src/EnergyPlus/ZoneEquipmentManager.hh b/src/EnergyPlus/ZoneEquipmentManager.hh index 0393f4de41d..d4cc5b8d00a 100644 --- a/src/EnergyPlus/ZoneEquipmentManager.hh +++ b/src/EnergyPlus/ZoneEquipmentManager.hh @@ -127,11 +127,6 @@ namespace ZoneEquipmentManager { Real64 &ZoneReturnAirMassFlowRate // zone total zone return air mass flow rate ); - void ZoneReturnFlowsMaximum(EnergyPlusData &state, - int const ZoneNum, - Real64 &MaximumZoneReturnMassFlow // maximum zone total return air mass flow rate - ); - void CalcAirFlowSimple(EnergyPlusData &state, int const SysTimestepLoop = 0, // System time step index bool const AdjustZoneMixingFlowFlag = false, // flags to adjust zone mxing mass flow rate diff --git a/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc b/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc index ccc0406dd67..d73c192c94c 100644 --- a/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalFiniteDiffManager.unit.cc @@ -237,13 +237,9 @@ TEST_F(EnergyPlusFixture, HeatBalFiniteDiffManager_adjustPropertiesForPhaseChang SurfaceFD.deallocate(); } - - -TEST_F(EnergyPlusFixture, HeatBalFiniteDiffManager_skipNotUsedConstructionAndAirLayer) +TEST_F(EnergyPlusFixture, DISABLED_HeatBalFiniteDiffManager_skipNotUsedConstructionAndAirLayer) { bool ErrorsFound(false); - int thisConstructNum; - int thisTotalLayers; // create three construction objects with one object not in use and another object assigned to surfaces, and one object as air wall. std::string const idf_objects = delimited_string( { @@ -311,16 +307,16 @@ TEST_F(EnergyPlusFixture, HeatBalFiniteDiffManager_skipNotUsedConstructionAndAir ASSERT_TRUE(process_idf(idf_objects)); ErrorsFound = false; - GetMaterialData(*state, ErrorsFound); // read material data + HeatBalanceManager::GetMaterialData(*state, ErrorsFound); // read material data EXPECT_FALSE(ErrorsFound); // expect no errors ErrorsFound = false; - GetConstructData(*state, ErrorsFound); // read construction data + HeatBalanceManager::GetConstructData(*state, ErrorsFound); // read construction data EXPECT_FALSE(ErrorsFound); // expect no errors // allocate properties for construction objects when it is used or not for building surfaces in the model - state->dataConstruction->Construct(1).IsUsed=false; + state->dataConstruction->Construct(1).IsUsed = false; state->dataConstruction->Construct(2).IsUsed = true; state->dataConstruction->Construct(3).IsUsed = true; diff --git a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc index 9996131cd9b..1798f6ad607 100644 --- a/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc +++ b/tst/EnergyPlus/unit/HeatBalanceManager.unit.cc @@ -394,7 +394,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceManager_ZoneAirMassFlowConservationData1) GetProjectControlData(*state, ErrorsFound); // returns ErrorsFound false, ZoneAirMassFlowConservation never sets it EXPECT_FALSE(ErrorsFound); EXPECT_TRUE(state->dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance); - EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, AdjustMixingOnly); + EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustmentType::AdjustMixingOnly); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment, AddInfiltrationFlow); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationZoneType, MixingSourceZonesOnly); } @@ -457,7 +457,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceManager_ZoneAirMassFlowConservationData2) GetProjectControlData(*state, ErrorsFound); // returns ErrorsFound false, ZoneAirMassFlowConservation never sets it EXPECT_FALSE(ErrorsFound); EXPECT_TRUE(state->dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance); - EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, NoAdjustReturnAndMixing); + EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment, AdjustInfiltrationFlow); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationZoneType, AllZones); @@ -604,7 +604,7 @@ TEST_F(EnergyPlusFixture, HeatBalanceManager_ZoneAirMassFlowConservationData3) GetProjectControlData(*state, ErrorsFound); // returns ErrorsFound false, ZoneAirMassFlowConservation never sets it EXPECT_FALSE(ErrorsFound); EXPECT_FALSE(state->dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance); - EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, NoAdjustReturnAndMixing); + EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustmentType::NoAdjustReturnAndMixing); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment, NoInfiltrationFlow); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationZoneType, 0); } diff --git a/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc b/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc index 146f4dd65f9..aaa273e0812 100644 --- a/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc +++ b/tst/EnergyPlus/unit/ZoneEquipmentManager.unit.cc @@ -66,6 +66,7 @@ #include #include #include +#include #include #include @@ -3062,7 +3063,7 @@ TEST_F(EnergyPlusFixture, ZoneEquipmentManager_ZoneMassBalance_wAdjustInfiltrati GetProjectControlData(*state, ErrorsFound); EXPECT_FALSE(ErrorsFound); EXPECT_TRUE(state->dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance); - EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustMixingOnly); + EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustmentType::AdjustMixingOnly); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment, DataHeatBalance::AdjustInfiltrationFlow); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationZoneType, DataHeatBalance::AllZones); GetSimpleAirModelInputs(*state, ErrorsFound); @@ -3306,7 +3307,7 @@ TEST_F(EnergyPlusFixture, ZoneAirMassFlowBalance_wAdjustReturnOnly) GetProjectControlData(*state, ErrorsFound); EXPECT_FALSE(ErrorsFound); EXPECT_TRUE(state->dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance); - EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustReturnOnly); + EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustmentType::AdjustReturnOnly); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment, DataHeatBalance::AdjustInfiltrationFlow); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationZoneType, DataHeatBalance::AllZones); GetSimpleAirModelInputs(*state, ErrorsFound); @@ -3328,6 +3329,8 @@ TEST_F(EnergyPlusFixture, ZoneAirMassFlowBalance_wAdjustReturnOnly) // set airloops design supply air flow rate to 1.0 state->dataAirLoop->AirLoopFlow(1).DesSupply = 1.0; state->dataAirLoop->AirLoopFlow(2).DesSupply = 1.0; + state->dataZoneEquip->ZoneEquipConfig(1).AirLoopDesSupply = state->dataAirLoop->AirLoopFlow(1).DesSupply; + state->dataZoneEquip->ZoneEquipConfig(2).AirLoopDesSupply = state->dataAirLoop->AirLoopFlow(2).DesSupply; // set airloop numbers state->dataZoneEquip->ZoneEquipConfig(1).ReturnNodeAirLoopNum(1) = 1; state->dataZoneEquip->ZoneEquipConfig(2).ReturnNodeAirLoopNum(1) = 2; @@ -3348,6 +3351,7 @@ TEST_F(EnergyPlusFixture, ZoneAirMassFlowBalance_wAdjustReturnOnly) state->dataLoopNodes->Node(state->dataZoneEquip->ZoneEquipConfig(2).ExhaustNode(1)).MassFlowRate = 0.0; state->dataLoopNodes->Node(state->dataZoneEquip->ZoneEquipConfig(2).ExhaustNode(2)).MassFlowRate = 1.0; ; + InitAirHeatBalance(*state); CalcAirFlowSimple(*state); CalcZoneMassBalance(*state, false); @@ -3568,7 +3572,7 @@ TEST_F(EnergyPlusFixture, ZoneAirMassFlowBalance_wAdjustReturnThenMixing) GetProjectControlData(*state, ErrorsFound); EXPECT_FALSE(ErrorsFound); EXPECT_TRUE(state->dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance); - EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustReturnThenMixing); + EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustmentType::AdjustReturnThenMixing); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment, DataHeatBalance::AdjustInfiltrationFlow); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationZoneType, DataHeatBalance::AllZones); GetSimpleAirModelInputs(*state, ErrorsFound); @@ -3590,6 +3594,8 @@ TEST_F(EnergyPlusFixture, ZoneAirMassFlowBalance_wAdjustReturnThenMixing) // set airloops design supply air flow rate to 1.0 state->dataAirLoop->AirLoopFlow(1).DesSupply = 1.0; state->dataAirLoop->AirLoopFlow(2).DesSupply = 1.0; + state->dataZoneEquip->ZoneEquipConfig(1).AirLoopDesSupply = state->dataAirLoop->AirLoopFlow(1).DesSupply; + state->dataZoneEquip->ZoneEquipConfig(2).AirLoopDesSupply = state->dataAirLoop->AirLoopFlow(2).DesSupply; // set airloop numbers state->dataZoneEquip->ZoneEquipConfig(1).ReturnNodeAirLoopNum(1) = 1; state->dataZoneEquip->ZoneEquipConfig(2).ReturnNodeAirLoopNum(1) = 2; @@ -3833,7 +3839,7 @@ TEST_F(EnergyPlusFixture, ZoneAirMassFlowBalance_wAdjustMixingThenReturn) GetProjectControlData(*state, ErrorsFound); EXPECT_FALSE(ErrorsFound); EXPECT_TRUE(state->dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance); - EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustMixingThenReturn); + EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustmentType::AdjustMixingThenReturn); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment, DataHeatBalance::AdjustInfiltrationFlow); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationZoneType, DataHeatBalance::AllZones); GetSimpleAirModelInputs(*state, ErrorsFound); @@ -3855,6 +3861,9 @@ TEST_F(EnergyPlusFixture, ZoneAirMassFlowBalance_wAdjustMixingThenReturn) // set airloops design supply air flow rate to 1.0 state->dataAirLoop->AirLoopFlow(1).DesSupply = 1.0; state->dataAirLoop->AirLoopFlow(2).DesSupply = 1.0; + state->dataZoneEquip->ZoneEquipConfig(1).AirLoopDesSupply = state->dataAirLoop->AirLoopFlow(1).DesSupply; + state->dataZoneEquip->ZoneEquipConfig(2).AirLoopDesSupply = state->dataAirLoop->AirLoopFlow(2).DesSupply; + // set airloop numbers state->dataZoneEquip->ZoneEquipConfig(1).ReturnNodeAirLoopNum(1) = 1; state->dataZoneEquip->ZoneEquipConfig(2).ReturnNodeAirLoopNum(1) = 2; @@ -4146,7 +4155,7 @@ TEST_F(EnergyPlusFixture, ZoneAirMassFlowBalance_wSourceAndReceivingZone) GetProjectControlData(*state, ErrorsFound); EXPECT_FALSE(ErrorsFound); EXPECT_TRUE(state->dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance); - EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustMixingOnly); + EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustmentType::AdjustMixingOnly); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment, DataHeatBalance::AdjustInfiltrationFlow); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationZoneType, DataHeatBalance::AllZones); GetSimpleAirModelInputs(*state, ErrorsFound); @@ -4389,7 +4398,7 @@ TEST_F(EnergyPlusFixture, ZoneAirMassFlowBalance_ZoneMixingInfiltrationFlowsFlag // ckeck zone mixing and infiltration flags EXPECT_FALSE(ErrorsFound); EXPECT_TRUE(state->dataHeatBal->ZoneAirMassFlow.EnforceZoneMassBalance); - EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustMixingOnly); + EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.ZoneFlowAdjustment, DataHeatBalance::AdjustmentType::AdjustMixingOnly); EXPECT_TRUE(state->dataHeatBal->ZoneAirMassFlow.AdjustZoneMixingFlow); EXPECT_EQ(state->dataHeatBal->ZoneAirMassFlow.InfiltrationTreatment, DataHeatBalance::NoInfiltrationFlow); EXPECT_FALSE(state->dataHeatBal->ZoneAirMassFlow.AdjustZoneInfiltrationFlow);