Skip to content

Commit

Permalink
Fix non-matching HP heating rate and coil total heating rate
Browse files Browse the repository at this point in the history
  • Loading branch information
Yujie Xu committed Aug 15, 2024
1 parent 03d9070 commit 098e584
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
10 changes: 8 additions & 2 deletions src/EnergyPlus/DXCoils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17346,7 +17346,7 @@ void ControlVRFIUCoil(EnergyPlusData &state,
MaxSC = 20;
Garate = state.dataDXCoils->DXCoil(CoilIndex).RatedAirMassFlowRate(1);
// why always limit the minimum fan speed ratio to 0.65?
FanSpdRatioMin = min(max(OAMassFlow / Garate, 0.65), 1.0); // ensure that coil flow rate is higher than OA flow rate
FanSpdRatioMin = min(max(OAMassFlow / Garate, 0.0), 1.0); // ensure that coil flow rate is higher than OA flow rate

if (QCoil == 0) {
// No Heating or Cooling
Expand Down Expand Up @@ -17488,7 +17488,13 @@ void ControlVRFIUCoil(EnergyPlusData &state,
};
General::SolveRoot(state, 1.0e-3, MaxIter, SolFla, Ratio1, f, FanSpdRatioMin, FanSpdRatioMax);
// this will likely cause problems eventually, -1 and -2 mean different things
if (SolFla < 0) Ratio1 = FanSpdRatioMax; // over capacity
if (SolFla < 0) {
if (f(FanSpdRatioMin) <= 0) { // capacity <= demand
Ratio1 = FanSpdRatioMax; // over capacity
} else { // capacity > demand even for the minimum fan speed
Ratio1 = FanSpdRatioMin;
}
}
FanSpdRatio = Ratio1;
CoilOnOffRatio = 1.0;

Expand Down
11 changes: 10 additions & 1 deletion src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11740,12 +11740,14 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state)
this->VRFCondCyclingRatio = CyclingRatio;

Tsuction = this->EvaporatingTemp; // Outdoor unit evaporating temperature
this->HeatingCapacityPrev = this->HeatingCapacity;
this->HeatingCapacity =
this->CoffEvapCap * this->RatedEvapCapacity * CurveValue(state, this->OUCoolingCAPFT(NumOfCompSpdInput), Tdischarge, Tsuction) +
this->RatedCompPower * CurveValue(state,
this->OUCoolingPWRFT(NumOfCompSpdInput),
Tdischarge,
Tsuction); // Include the piping loss, at the highest compressor speed
this->PipingCorrectionHeatingPrev = this->PipingCorrectionHeating;
this->PipingCorrectionHeating = TU_HeatingLoad / (TU_HeatingLoad + Pipe_Q_h);
state.dataHVACVarRefFlow->MaxHeatingCapacity(VRFCond) =
this->HeatingCapacity; // for report, maximum condensing capacity the system can provide
Expand Down Expand Up @@ -12235,7 +12237,14 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state)
}

this->TotalCoolingCapacity = TotalCondCoolingCapacity * CoolingPLR;
this->TotalHeatingCapacity = TotalCondHeatingCapacity * HeatingPLR;
// adjustment for matching HP heating rate and coil heating rate
this->TotalHeatingCapacity = TotalCondHeatingCapacity * HeatingPLR * (this->RatedEvapCapacity / (this->RatedEvapCapacity + Pipe_Q_h));
if (this->VRFCondPLR < 1.0) {
this->TotalHeatingCapacity = TotalCondHeatingCapacity * HeatingPLR * this->PipingCorrectionHeating;
}
if (this->TUHeatingLoad / this->PipingCorrectionHeating > TotalCondHeatingCapacity) {
this->TotalHeatingCapacity = this->HeatingCapacityPrev * HeatingPLR * this->PipingCorrectionHeatingPrev;
}

if (this->MinPLR > 0.0) {
bool const plrTooLow = this->VRFCondPLR < this->MinPLR;
Expand Down
12 changes: 7 additions & 5 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.hh
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ namespace HVACVariableRefrigerantFlow {
Real64 OperatingCoolingCOP; // Operating VRF heat pump cooling COP (W/W)
Real64 RatedCoolingPower; // Rated cooling power = Rated Cooling Capacity / Rated COP (W)
Real64 HeatingCapacity; // Nominal VRF heat pump heating capacity (W)
Real64 HeatingCapacityPrev; // Nominal VRF heat pump heating capacity (W)
Real64 HeatingCapacitySizeRatio; // Ratio of heating to cooling when autosizing
bool LockHeatingCapacity; // used in sizing to size VRF heat cap to VRF cool cap
Real64 TotalHeatingCapacity; // Nominal VRF heat pump heating capacity (W)
Expand Down Expand Up @@ -219,6 +220,7 @@ namespace HVACVariableRefrigerantFlow {
Real64 PCFHeightHeat; // piping correction factor for height in heating mode
Real64 EquivPipeLngthHeat; // equivalent piping length for heating
Real64 PipingCorrectionHeating; // piping correction factor for heating
Real64 PipingCorrectionHeatingPrev; // piping correction factor for heating
Real64 CCHeaterPower; // crankcase heater power per compressor (W)
Real64 CompressorSizeRatio; // ratio of min compressor size to total capacity
int NumCompressors; // number of compressors in VRF condenser
Expand Down Expand Up @@ -394,18 +396,18 @@ namespace HVACVariableRefrigerantFlow {
WaterCondenserDesignMassFlow(0.0), WaterCondenserMassFlow(0.0), QCondenser(0.0), QCondEnergy(0.0), CondenserSideOutletTemp(0.0),
SchedPtr(-1), CoolingCapacity(0.0), TotalCoolingCapacity(0.0), CoolingCombinationRatio(1.0), VRFCondPLR(0.0), VRFCondRTF(0.0),
VRFCondCyclingRatio(0.0), CondenserInletTemp(0.0), CoolingCOP(0.0), OperatingCoolingCOP(0.0), RatedCoolingPower(0.0),
HeatingCapacity(0.0), HeatingCapacitySizeRatio(1.0), LockHeatingCapacity(false), TotalHeatingCapacity(0.0),
HeatingCapacity(0.0), HeatingCapacityPrev(0.0), HeatingCapacitySizeRatio(1.0), LockHeatingCapacity(false), TotalHeatingCapacity(0.0),
HeatingCombinationRatio(1.0), HeatingCOP(0.0), OperatingHeatingCOP(0.0), RatedHeatingPower(0.0), MinOATCooling(0.0), MaxOATCooling(0.0),
MinOATHeating(0.0), MaxOATHeating(0.0), CoolCapFT(0), CoolEIRFT(0), HeatCapFT(0), HeatEIRFT(0), CoolBoundaryCurvePtr(0),
HeatBoundaryCurvePtr(0), EIRCoolBoundaryCurvePtr(0), CoolEIRFPLR1(0), CoolEIRFPLR2(0), CoolCapFTHi(0), CoolEIRFTHi(0), HeatCapFTHi(0),
HeatEIRFTHi(0), EIRHeatBoundaryCurvePtr(0), HeatEIRFPLR1(0), HeatEIRFPLR2(0), CoolPLFFPLR(0), HeatPLFFPLR(0), MinPLR(0.0),
MasterZonePtr(0), MasterZoneTUIndex(0), ThermostatPriority(ThermostatCtrlType::Invalid), SchedPriorityPtr(0), ZoneTUListPtr(0),
HeatRecoveryUsed(false), VertPipeLngth(0.0), PCFLengthCoolPtr(0), PCFHeightCool(0.0), EquivPipeLngthCool(0.0),
PipingCorrectionCooling(1.0), PCFLengthHeatPtr(0), PCFHeightHeat(0.0), EquivPipeLngthHeat(0.0), PipingCorrectionHeating(1.0),
CCHeaterPower(0.0), CompressorSizeRatio(0.0), NumCompressors(0), MaxOATCCHeater(0.0), DefrostEIRPtr(0), DefrostFraction(0.0),
DefrostStrategy(StandardRatings::DefrostStrat::Invalid), DefrostControl(StandardRatings::HPdefrostControl::Invalid),
DefrostCapacity(0.0), DefrostPower(0.0), DefrostConsumption(0.0), MaxOATDefrost(0.0),
CondenserType(DataHeatBalance::RefrigCondenserType::Invalid), CondenserNodeNum(0), SkipCondenserNodeNumCheck(false),
PipingCorrectionHeatingPrev(1.0), CCHeaterPower(0.0), CompressorSizeRatio(0.0), NumCompressors(0), MaxOATCCHeater(0.0),
DefrostEIRPtr(0), DefrostFraction(0.0), DefrostStrategy(StandardRatings::DefrostStrat::Invalid),
DefrostControl(StandardRatings::HPdefrostControl::Invalid), DefrostCapacity(0.0), DefrostPower(0.0), DefrostConsumption(0.0),
MaxOATDefrost(0.0), CondenserType(DataHeatBalance::RefrigCondenserType::Invalid), CondenserNodeNum(0), SkipCondenserNodeNumCheck(false),
CondenserOutletNodeNum(0), WaterCondVolFlowRate(0.0), EvapCondEffectiveness(0.0), EvapCondAirVolFlowRate(0.0), EvapCondPumpPower(0.0),
CoolCombRatioPTR(0), HeatCombRatioPTR(0), OperatingMode(0), ElecPower(0.0), ElecCoolingPower(0.0), ElecHeatingPower(0.0),
CoolElecConsumption(0.0), HeatElecConsumption(0.0), CrankCaseHeaterPower(0.0), CrankCaseHeaterElecConsumption(0.0),
Expand Down
4 changes: 2 additions & 2 deletions testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,8 @@
0, !- No Cooling Supply Air Flow Rate {m3/s}
0.595, !- Heating Supply Air Flow Rate {m3/s}
0, !- No Heating Supply Air Flow Rate {m3/s}
autosize, !- Cooling Outdoor Air Flow Rate {m3/s}
autosize, !- Heating Outdoor Air Flow Rate {m3/s}
0, !- Cooling Outdoor Air Flow Rate {m3/s}
0, !- Heating Outdoor Air Flow Rate {m3/s}
0, !- No Load Outdoor Air Flow Rate {m3/s}
VRFFanModeSchedule, !- Supply Air Fan Operating Mode Schedule Name
drawthrough, !- Supply Air Fan Placement
Expand Down

5 comments on commit 098e584

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

fixDocVRFheatpumpHeatRate (Unknown) - x86_64-MacOS-10.18-clang-15.0.0: OK (3511 of 3654 tests passed, 455 test warnings)

Messages:\n

  • 592 tests had: AUD diffs.
  • 563 tests had: EIO diffs.
  • 283 tests had: RDD diffs.
  • 123 tests had: Table small diffs.
  • 142 tests had: Table big diffs.
  • 25 tests had: ERR diffs.
  • 22 tests had: Table string diffs.
  • 2 tests had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: MTD diffs.
  • 4 tests had: ESO big diffs.
  • 1 test had: IDF diffs.
  • 2 tests had: MTR big diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1576
  • Failed: 1

regression Test Summary

  • Passed: 649
  • Failed: 142

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

fixDocVRFheatpumpHeatRate (Unknown) - Win64-Windows-10-VisualStudio-16: OK (2861 of 2862 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1574
  • Failed: 1

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

fixDocVRFheatpumpHeatRate (Unknown) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3552 of 3695 tests passed, 456 test warnings)

Messages:\n

  • 593 tests had: AUD diffs.
  • 564 tests had: EIO diffs.
  • 283 tests had: RDD diffs.
  • 123 tests had: Table small diffs.
  • 142 tests had: Table big diffs.
  • 25 tests had: ERR diffs.
  • 22 tests had: Table string diffs.
  • 2 tests had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: MTD diffs.
  • 4 tests had: ESO big diffs.
  • 1 test had: IDF diffs.
  • 2 tests had: MTR big diffs.

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1576
  • Failed: 1

regression Test Summary

  • Passed: 669
  • Failed: 142

Build Badge Test Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

fixDocVRFheatpumpHeatRate (Unknown) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (795 of 795 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

fixDocVRFheatpumpHeatRate (Unknown) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (2069 of 2070 tests passed, 0 test warnings)

Failures:\n

EnergyPlusFixture Test Summary

  • Passed: 1576
  • Failed: 1

Build Badge Test Badge Coverage Badge

Please sign in to comment.