From 0fbe564be31363e7ee827704c1a7b140486a34c9 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Mon, 18 Sep 2023 13:12:12 +0200 Subject: [PATCH] For #9878 - Update Unit test with proper behavior --- .../unit/ChillerExhaustAbsorption.unit.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc index c35b55ab15c..b5f52e7a6d9 100644 --- a/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc +++ b/tst/EnergyPlus/unit/ChillerExhaustAbsorption.unit.cc @@ -676,7 +676,7 @@ TEST_F(EnergyPlusFixture, ExhAbsorption_calcHeater_Fix_Test) constexpr Real64 exhaustInTemp = 350.0; constexpr Real64 absLeavingTemp = 176.667; constexpr Real64 exhaustInMassFlowRate = 0.5; - constexpr Real64 exhaustInHumRate = 0.000; // FIXME: use a non zero one + constexpr Real64 exhaustInHumRate = 0.005; state->dataLoopNodes->Node(thisChillerHeater.ExhaustAirInletNodeNum).Temp = exhaustInTemp; state->dataLoopNodes->Node(thisChillerHeater.ExhaustAirInletNodeNum).MassFlowRate = exhaustInMassFlowRate; state->dataLoopNodes->Node(thisChillerHeater.ExhaustAirInletNodeNum).HumRat = exhaustInHumRate; @@ -685,12 +685,11 @@ TEST_F(EnergyPlusFixture, ExhAbsorption_calcHeater_Fix_Test) bool const runflaginput = true; thisChillerHeater.calcHeater(*state, loadinput, runflaginput); - // FIXME: this shouldn't be zero - const Real64 CpHW = FluidProperties::GetSpecificHeatGlycol(*state, hwPlantLoop.FluidName, 0.0, hwPlantLoop.FluidIndex, "UnitTest"); - EXPECT_EQ(4217.0, CpHW); + const Real64 CpHW = FluidProperties::GetSpecificHeatGlycol(*state, hwPlantLoop.FluidName, hwReturnTemp, hwPlantLoop.FluidIndex, "UnitTest"); + EXPECT_EQ(4185.0, CpHW); const Real64 expectedHeatingLoad = (hwSupplySetpoint - hwReturnTemp) * hwMassFlow * CpHW; - EXPECT_NEAR(21085.0, expectedHeatingLoad, 1e-6); + EXPECT_NEAR(20925.0, expectedHeatingLoad, 1e-6); EXPECT_NEAR(thisChillerHeater.HeatingLoad, expectedHeatingLoad, 1e-6); EXPECT_NEAR(thisChillerHeater.HeatElectricPower, 400.0, 1e-6); @@ -705,8 +704,8 @@ TEST_F(EnergyPlusFixture, ExhAbsorption_calcHeater_Fix_Test) Real64 const CpAir = Psychrometrics::PsyCpAirFnW(exhaustInHumRate); Real64 const epectedExhHeatRecPotentialHeat = exhaustInMassFlowRate * CpAir * (exhaustInTemp - absLeavingTemp); - EXPECT_NEAR(87087.5769469, epectedExhHeatRecPotentialHeat, 1e-6); - EXPECT_NEAR(epectedExhHeatRecPotentialHeat, thisChillerHeater.ExhHeatRecPotentialHeat, 1e-6); + EXPECT_NEAR(87891.51, epectedExhHeatRecPotentialHeat, 0.01); + EXPECT_NEAR(epectedExhHeatRecPotentialHeat, thisChillerHeater.ExhHeatRecPotentialHeat, 0.01); } TEST_F(EnergyPlusFixture, ExhAbsorption_GetInput_Multiple_Objects_Test)