Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/model/ChillerElectricEIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,16 @@ namespace model {
ChillerElectricEIR::ChillerElectricEIR(const Model& model) : WaterToWaterComponent(ChillerElectricEIR::iddObjectType(), model) {
OS_ASSERT(getImpl<detail::ChillerElectricEIR_Impl>());

// 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);
Expand Down
20 changes: 20 additions & 0 deletions src/model/test/ChillerElectricEIR_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
18 changes: 18 additions & 0 deletions src/model/test/ChillerElectricReformulatedEIR_GTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Loading