Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Super high COP in VRFFluidTCtrl model #10752

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions src/EnergyPlus/FluidProperties.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3279,7 +3279,7 @@ namespace FluidProperties {
ReturnValue = this->getSatEnthalpy(state, Temperature, 1.0, fmt::format("{}:{}", routineName, CalledFrom));
// send warning
if (!state.dataGlobal->WarmupFlag) {
this->errors[(int)RefrigError::SatSupEnthalpy].count += df->SatErrCountGetSupHeatEnthalpyRefrig;
this->errors[(int)RefrigError::SatSupEnthalpy].count++;
// send warning
if (this->errors[(int)RefrigError::SatTempDensity].count <= df->RefrigErrorLimitTest) {
ShowWarningMessage(
Expand Down Expand Up @@ -3886,7 +3886,7 @@ namespace FluidProperties {
} else { // All data is at zero: we are completely inside the saturation dome. Best thing we can do is return saturation value
++df->SatErrCountGetSupHeatDensityRefrig;
// send warning
this->errors[(int)RefrigError::SatSupDensity].count += df->SatErrCountGetSupHeatDensityRefrig;
this->errors[(int)RefrigError::SatSupDensity].count++;
// send warning
if (this->errors[(int)RefrigError::SatSupDensity].count <= df->RefrigErrorLimitTest) {
ShowWarningMessage(
Expand Down
19 changes: 9 additions & 10 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1192,10 +1192,9 @@ void CalcVRFCondenser(EnergyPlusData &state, int const VRFCond)

vrf.ElecHeatingPower =
(vrf.RatedHeatingPower * TotHeatCapTempModFac) * TotHeatEIRTempModFac * EIRFPLRModFac * HREIRAdjustment * VRFRTF * InputPowerMultiplier;

// adjust defrost power based on heating RTF
vrf.DefrostPower *= VRFRTF;
}
// adjust defrost power based on RTF
vrf.DefrostPower *= VRFRTF;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct.

vrf.VRFCondRTF = VRFRTF;

// calculate crankcase heater power
Expand Down Expand Up @@ -11592,7 +11591,8 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c
Tdischarge = this->refrig->getSatTemperature(state, max(min(Pdischarge, RefPHigh), RefPLow), RoutineName);

// Evaporative capacity ranges_Min
CapMinPe = min(Pdischarge - this->CompMaxDeltaP, RefMinPe);
// suction pressure lower bound need to be no less than both terms in the following
CapMinPe = max(Pdischarge - this->CompMaxDeltaP, RefMinPe);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct. Not sure why this didn't show up during the original model develolpment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm surprised as well.

CapMinTe = this->refrig->getSatTemperature(state, max(min(CapMinPe, RefPHigh), RefPLow), RoutineName);
CompEvaporatingCAPSpdMin = this->CoffEvapCap * this->RatedEvapCapacity * CurveValue(state, this->OUCoolingCAPFT(1), Tdischarge, CapMinTe);
CompEvaporatingPWRSpdMin = this->RatedCompPower * CurveValue(state, this->OUCoolingPWRFT(1), Tdischarge, CapMinTe);
Expand Down Expand Up @@ -11664,8 +11664,7 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c
Tdischarge,
h_IU_cond_out_ave,
this->IUCondensingTemp,
// Te can't be smaller than user input lower bound
max(this->IUEvapTempLow, CapMinTe),
CapMinTe,
Tfs,
Pipe_Q_h,
Q_c_OU,
Expand Down Expand Up @@ -11697,7 +11696,6 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c
}

// Key outputs of this subroutine
Ncomp *= CyclingRatio;
Q_c_OU *= CyclingRatio;
this->CompActSpeed = max(CompSpdActual, 0.0);
this->Ncomp = max(Ncomp, 0.0) / this->EffCompInverter;
Expand Down Expand Up @@ -12237,6 +12235,7 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c
this->ElecHeatingPower = 0;
}
this->VRFCondRTF = VRFRTF;
this->DefrostPower *= VRFRTF;
Copy link
Contributor

@rraustad rraustad Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct. A plot of DefrostPower vs RTF or CyclingRatio would show it's working.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a plot of heat pump defrost power vs cycling ratio

image

When the defrost power is non-zero, it is proportional to cycling ratio

The output file is here:
eplusout_defrost_vs_cyclingRatio.xlsx

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is defrost electricity so small? at 6 E -9

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used this test file. Its "Resistive Defrost Heater Capacity" is 0.0000001
US+SF+CZ5B+hp+slab+IECC_2021_VRFPhysics_v2_hrdsize_V2420.expidf.zip


// Calculate CrankCaseHeaterPower: VRF Heat Pump Crankcase Heater Electric Power [W]
if (this->MaxOATCCHeater > OutdoorDryBulb) {
Expand Down Expand Up @@ -14136,7 +14135,7 @@ void VRFCondenserEquipment::VRFOU_CalcCompC(EnergyPlusData &state,
T_suction + 8,
T_discharge - 5);

Cap_Eva0 = (TU_load + Pipe_Q) * C_cap_operation; // New Pipe_Q & C_cap_operation
Cap_Eva0 = TU_load + Pipe_Q; // New Pipe_Q & C_cap_operation
Cap_Eva1 = this->CoffEvapCap * this->RatedEvapCapacity *
CurveValue(state, this->OUCoolingCAPFT(CounterCompSpdTemp), T_discharge, T_suction); // New Tc
CapDiff = std::abs(Cap_Eva1 - Cap_Eva0);
Expand Down Expand Up @@ -14337,7 +14336,7 @@ void VRFCondenserEquipment::VRFOU_CalcCompH(
T_suction + 8,
IUMaxCondTemp - 5);

Cap_Eva0 = Q_evap_req * C_cap_operation;
Cap_Eva0 = Q_evap_req;
Cap_Eva1 =
this->CoffEvapCap * this->RatedEvapCapacity * CurveValue(state, this->OUCoolingCAPFT(CounterCompSpdTemp), T_discharge, T_suction);
CapDiff = std::abs(Cap_Eva1 - Cap_Eva0);
Expand All @@ -14353,7 +14352,7 @@ void VRFCondenserEquipment::VRFOU_CalcCompH(
CyclingRatio = 1.0;
}

Ncomp = this->RatedCompPower * CurveValue(state, this->OUCoolingPWRFT(CounterCompSpdTemp), T_discharge, T_suction);
Ncomp = this->RatedCompPower * CurveValue(state, this->OUCoolingPWRFT(CounterCompSpdTemp), T_discharge, T_suction) * CyclingRatio;
// Cap_Eva1 is the updated compressor min speed capacity
OUEvapHeatExtract = Cap_Eva1;
this->EvaporatingTemp = T_suction;
Expand Down
4 changes: 2 additions & 2 deletions src/EnergyPlus/OutputReportPredefined.cc
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ namespace OutputReportPredefined {
s->pdchCoolCoilArea = newPreDefColumn(state, s->pdstCoolCoil, "Nominal Coil Surface Area [m2]");

s->pdstDXCoolCoil = newPreDefSubTable(state, s->pdrEquip, "DX Cooling Coil Standard Ratings 2017");
s->pdchDXCoolCoilType = newPreDefColumn(state, s->pdstDXCoolCoil, "Cooling Coil Type [1]");
s->pdchDXCoolCoilType = newPreDefColumn(state, s->pdstDXCoolCoil, "Cooling Coil Type (1)");
s->pdchDXCoolCoilNetCapSI = newPreDefColumn(state, s->pdstDXCoolCoil, "Standard Rating Net Cooling Capacity [W][2]");

s->pdchDXCoolCoilCOP = newPreDefColumn(state, s->pdstDXCoolCoil, "Standard Rating Net COP [W/W][2]");
Expand All @@ -363,7 +363,7 @@ namespace OutputReportPredefined {

// for DX Cooling Coil AHRI Standard 2023 Ratings | SEER2
s->pdstDXCoolCoil_2023 = newPreDefSubTable(state, s->pdrEquip, "DX Cooling Coil Standard Ratings 2023");
s->pdchDXCoolCoilType_2023 = newPreDefColumn(state, s->pdstDXCoolCoil_2023, "Cooling Coil Type [1]");
s->pdchDXCoolCoilType_2023 = newPreDefColumn(state, s->pdstDXCoolCoil_2023, "Cooling Coil Type (1)");
s->pdchDXCoolCoilNetCapSI_2023 = newPreDefColumn(state, s->pdstDXCoolCoil_2023, "Standard Rating Net Cooling Capacity [W][2]");

s->pdchDXCoolCoilCOP_2023 = newPreDefColumn(state, s->pdstDXCoolCoil_2023, "Standard Rating Net COP2 [W/W][2,4]");
Expand Down
12 changes: 6 additions & 6 deletions tst/EnergyPlus/unit/HVACVariableRefrigerantFlow.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2591,9 +2591,9 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_VRFOU_Compressor)

// Test
EXPECT_NEAR(1.0, CyclingRatio, 0.01);
EXPECT_NEAR(4654, OUEvapHeatExtract, 1); // low load calculation, min speed capacity should use the curve corresponding to the lowest speed
EXPECT_NEAR(3536, OUEvapHeatExtract, 1); // low load calculation, min speed capacity should use the curve corresponding to the lowest speed
EXPECT_NEAR(1500, CompSpdActual, 1);
EXPECT_NEAR(2080, Ncomp, 1);
EXPECT_NEAR(2082, Ncomp, 1);
EXPECT_EQ(state->dataLoopNodes->Node(state->dataHVACVarRefFlow->VRFTU(1).VRFTUInletNodeNum).MassFlowRate, 0.0);

// Inputs_condition for an even lower load, and a more strict Te lower bound
Expand Down Expand Up @@ -2625,14 +2625,14 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_VRFOU_Compressor)
Ncomp,
CyclingRatio);

EXPECT_NEAR(0.20, CyclingRatio, 0.01);
EXPECT_NEAR(0.22, CyclingRatio, 0.01);
Real64 x = T_discharge;
Real64 y = -5; // in low load modification
Real64 CurveValueEvap = 3.19E-01 - 1.26E-03 * x - 2.15E-05 * x * x + 1.20E-02 * y + 1.05E-04 * y * y - 8.66E-05 * x * y;
Real64 CurveValuePower = 8.79E-02 - 1.72E-04 * x + 6.93E-05 * x * x - 3.38E-05 * y - 8.10E-06 * y * y - 1.04E-05 * x * y;
EXPECT_NEAR(CurveValueEvap * state->dataHVACVarRefFlow->VRF(1).RatedEvapCapacity, OUEvapHeatExtract, 1);
EXPECT_NEAR(1500, CompSpdActual, 1);
EXPECT_NEAR(CurveValuePower * state->dataHVACVarRefFlow->VRF(1).RatedCompPower, Ncomp, 1);
EXPECT_NEAR(CurveValuePower * state->dataHVACVarRefFlow->VRF(1).RatedCompPower * CyclingRatio, Ncomp, 1);
EXPECT_EQ(state->dataLoopNodes->Node(state->dataHVACVarRefFlow->VRFTU(1).VRFTUInletNodeNum).MassFlowRate, 0.0);
}

Expand Down Expand Up @@ -2676,7 +2676,7 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_VRFOU_Compressor)
thisVRF.RatedEvapCapacity * CurveValue(*state, thisVRF.OUCoolingCAPFT(1), thisVRF.CondensingTemp, thisVRF.EvaporatingTemp);
Real64 CompEvaporatingPWRSpdMin =
thisVRF.RatedCompPower * CurveValue(*state, thisVRF.OUCoolingPWRFT(1), thisVRF.CondensingTemp, thisVRF.EvaporatingTemp);
EXPECT_NEAR(0.35, CyclingRatio, 0.01);
EXPECT_NEAR(0.33, CyclingRatio, 0.01);
EXPECT_NEAR(OUEvapHeatExtract, CompEvaporatingCAPSpdMin + Ncomp, 1e-4);
EXPECT_NEAR(1500, CompSpdActual, 1);
EXPECT_NEAR(Ncomp, CompEvaporatingPWRSpdMin, 1e-4);
Expand Down Expand Up @@ -13365,7 +13365,7 @@ TEST_F(EnergyPlusFixture, VRF_FluidTCtrl_ReportOutputVerificationTest)
EXPECT_NEAR(5645.5696, thisVRFTU.TotalCoolingRate, 0.0001);
EXPECT_NEAR(84.8359, thisFan->totalPower, 0.0001);
EXPECT_NEAR(thisDXCoolingCoil.TotalCoolingEnergyRate, (thisVRFTU.TotalCoolingRate + thisFan->totalPower), 0.0001);
EXPECT_NEAR(0.4124, state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio, 0.0001);
EXPECT_NEAR(0.4036, state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio, 0.0001);
EXPECT_NEAR(state->dataHVACVarRefFlow->VRF(1).OUFanPower,
state->dataHVACVarRefFlow->VRF(1).RatedOUFanPower * state->dataHVACVarRefFlow->VRF(1).VRFCondCyclingRatio,
0.0001);
Expand Down
Loading