diff --git a/src/model/ChillerElectricEIR.cpp b/src/model/ChillerElectricEIR.cpp index 19e30135d5..74eb9e5517 100644 --- a/src/model/ChillerElectricEIR.cpp +++ b/src/model/ChillerElectricEIR.cpp @@ -999,6 +999,16 @@ namespace model { ChillerElectricEIR::ChillerElectricEIR(const Model& model) : WaterToWaterComponent(ChillerElectricEIR::iddObjectType(), model) { OS_ASSERT(getImpl()); + // Both of the following test files have capft and eirft curves with the ctor values below: + // - DOAS_wNeutralSupplyAir_wFanCoilUnits.idf + // - WaterCooledChillerWithVSCondenserControl.idf + // But the curves are unused in the test files. + + // The following test files have curve values shown in the E+ documentation: + // - ElectricEIRChiller.idf (WaterCooled) + // - ElectricEIRChillerHeatRecoveryAuto.idf (WaterCooled) + // - ElectricEIRChiller_EvapCooledCondenser.idf (EvaporativelyCooled) + CurveBiquadratic ccFofT(model); ccFofT.setCoefficient1Constant(1.0215158); ccFofT.setCoefficient2x(0.037035864); diff --git a/src/model/test/ChillerElectricEIR_GTest.cpp b/src/model/test/ChillerElectricEIR_GTest.cpp index d0d16d5e47..f4b1e7127a 100644 --- a/src/model/test/ChillerElectricEIR_GTest.cpp +++ b/src/model/test/ChillerElectricEIR_GTest.cpp @@ -1117,3 +1117,23 @@ TEST_F(ModelFixture, ChillerElectricEIR_HeatRecoverySetpointNode) { ASSERT_TRUE(chiller.heatRecoveryLeavingTemperatureSetpointNode()); EXPECT_EQ(hrOutletNode, chiller.heatRecoveryLeavingTemperatureSetpointNode().get()); } + +TEST_F(ModelFixture, ChillerElectricEIR_referenceConditionsCurveOutput) { + + // Test for #2093, #2957 + Model model; + ChillerElectricEIR chiller(model); + + double ref_lchwt = chiller.referenceLeavingChilledWaterTemperature(); + double ref_ecnwt = chiller.referenceEnteringCondenserFluidTemperature(); + + Curve capft = chiller.coolingCapacityFunctionOfTemperature(); + Curve eirft = chiller.electricInputToCoolingOutputRatioFunctionOfTemperature(); + Curve eirfplr = chiller.electricInputToCoolingOutputRatioFunctionOfPLR(); + + EXPECT_NEAR(1.0, capft.evaluate(ref_lchwt, ref_ecnwt), 0.01); // 85F (water cooled) + EXPECT_NEAR(1.0, eirft.evaluate(ref_lchwt, ref_ecnwt), 0.01); // 85F (water cooled) + EXPECT_NEAR(1.0, capft.evaluate(ref_lchwt, 35.0), 0.01); // 95F (air cooled) + EXPECT_NEAR(1.0, eirft.evaluate(ref_lchwt, 35.0), 0.01); // 95F (air cooled) + EXPECT_NEAR(1.0, eirfplr.evaluate(1.0), 0.01); +} diff --git a/src/model/test/ChillerElectricReformulatedEIR_GTest.cpp b/src/model/test/ChillerElectricReformulatedEIR_GTest.cpp index 413f61c5fd..44eb8d8484 100644 --- a/src/model/test/ChillerElectricReformulatedEIR_GTest.cpp +++ b/src/model/test/ChillerElectricReformulatedEIR_GTest.cpp @@ -914,3 +914,21 @@ TEST_F(ModelFixture, ChillerElectricReformulatedEIR_PlantLoopConnections_addToNo ASSERT_TRUE(chiller.heatRecoveryLoop()); EXPECT_EQ(hrLoop, chiller.heatRecoveryLoop().get()); } + +TEST_F(ModelFixture, ChillerElectricReformulatedEIR_referenceConditionsCurveOutput) { + + // Test for #2093, #2957 + Model model; + ChillerElectricReformulatedEIR chiller(model); + + double ref_lchwt = chiller.referenceLeavingChilledWaterTemperature(); + double ref_lcnwt = chiller.referenceLeavingCondenserWaterTemperature(); + + Curve capft = chiller.coolingCapacityFunctionOfTemperature(); + Curve eirft = chiller.electricInputToCoolingOutputRatioFunctionOfTemperature(); + Curve eirfplr = chiller.electricInputToCoolingOutputRatioFunctionOfPLR(); + + EXPECT_NEAR(1.0, capft.evaluate(ref_lchwt, ref_lcnwt), 0.01); + EXPECT_NEAR(1.0, eirft.evaluate(ref_lchwt, ref_lcnwt), 0.01); + EXPECT_NEAR(1.0, eirfplr.evaluate(35.0, 1.0), 0.01); +} \ No newline at end of file