From 78d7bfc49e8159423c6df01d44d7233cbfe0df08 Mon Sep 17 00:00:00 2001 From: amirroth Date: Mon, 8 Apr 2024 12:53:29 -0400 Subject: [PATCH 1/3] Fan cooling load in fan-coil sizing --- src/EnergyPlus/FanCoilUnits.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyPlus/FanCoilUnits.cc b/src/EnergyPlus/FanCoilUnits.cc index 6c7915294c5..18a411d7c90 100644 --- a/src/EnergyPlus/FanCoilUnits.cc +++ b/src/EnergyPlus/FanCoilUnits.cc @@ -512,7 +512,7 @@ namespace FanCoilUnits { if (!Util::SameString(fanCoil.FanType, "Fan:SystemModel")) { Fans::GetFanType(state, fanCoil.FanName, fanCoil.FanType_Num, errFlag, CurrentModuleObject, fanCoil.Name); // need to grab fan index here - // Fans::GetFanIndex(state, fanCoil.FanName, fanCoil.FanIndex, errFlag, fanCoil.FanType); + Fans::GetFanIndex(state, fanCoil.FanName, fanCoil.FanIndex, errFlag, fanCoil.FanType); fanCoil.fanAvailSchIndex = Fans::GetFanAvailSchPtr(state, fanCoil.FanType, fanCoil.FanName, errFlag); if (errFlag) { ShowContinueError(state, format("Occurs in {} = {}", CurrentModuleObject, fanCoil.Name)); From 207929f10198522807d1f917b541f5a847992fe9 Mon Sep 17 00:00:00 2001 From: amirroth Date: Mon, 8 Apr 2024 20:43:28 -0400 Subject: [PATCH 2/3] Fix unit test --- tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc index 2980e6cbaff..59c8ebd8180 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc @@ -7896,14 +7896,14 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimFCU_ATMInletSideTest) SecondaryAirMassFlowRate = state->dataLoopNodes->Node(thisFanCoil.AirInNode).MassFlowRate - PrimaryAirMassFlowRate; // check results in cooling mode operation EXPECT_NEAR(QZnReq, QUnitOut, 5.0); - EXPECT_NEAR(thisFanCoil.PLR, 0.78843, 0.00001); + EXPECT_NEAR(thisFanCoil.PLR, 0.76235, 0.00001); // Was 0.78843 // check mass flow rates EXPECT_NEAR(PrimaryAirMassFlowRate, 0.2, 0.000001); - EXPECT_NEAR(SecondaryAirMassFlowRate, 0.369714, 0.000001); + EXPECT_NEAR(SecondaryAirMassFlowRate, 0.350865, 0.000001); EXPECT_NEAR(state->dataLoopNodes->Node(thisFanCoil.AirInNode).MassFlowRate, thisFan.InletAirMassFlowRate, 0.000001); EXPECT_NEAR(state->dataLoopNodes->Node(thisFanCoil.ATMixerPriNode).MassFlowRate, 0.2, 0.0001); - EXPECT_NEAR(state->dataLoopNodes->Node(thisFanCoil.ATMixerSecNode).MassFlowRate, 0.369714, 0.000001); - EXPECT_NEAR(state->dataLoopNodes->Node(thisFanCoil.ATMixerOutNode).MassFlowRate, 0.569714, 0.000001); + EXPECT_NEAR(state->dataLoopNodes->Node(thisFanCoil.ATMixerSecNode).MassFlowRate, 0.350865, 0.000001); // Was 0.369714 + EXPECT_NEAR(state->dataLoopNodes->Node(thisFanCoil.ATMixerOutNode).MassFlowRate, 0.550865, 0.000001); // Was 0.569714 } TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_FCU_NightCycleTest) From 24ff5a2561a99059ce8abbad3a6ebb5d0565ef76 Mon Sep 17 00:00:00 2001 From: rraustad Date: Mon, 8 Apr 2024 21:43:10 -0400 Subject: [PATCH 3/3] Clang unit test --- tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc index 59c8ebd8180..342385e8059 100644 --- a/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc +++ b/tst/EnergyPlus/unit/AirTerminalSingleDuctMixer.unit.cc @@ -7896,7 +7896,7 @@ TEST_F(EnergyPlusFixture, AirTerminalSingleDuctMixer_SimFCU_ATMInletSideTest) SecondaryAirMassFlowRate = state->dataLoopNodes->Node(thisFanCoil.AirInNode).MassFlowRate - PrimaryAirMassFlowRate; // check results in cooling mode operation EXPECT_NEAR(QZnReq, QUnitOut, 5.0); - EXPECT_NEAR(thisFanCoil.PLR, 0.76235, 0.00001); // Was 0.78843 + EXPECT_NEAR(thisFanCoil.PLR, 0.76235, 0.00001); // Was 0.78843 // check mass flow rates EXPECT_NEAR(PrimaryAirMassFlowRate, 0.2, 0.000001); EXPECT_NEAR(SecondaryAirMassFlowRate, 0.350865, 0.000001);