From f5c51033699c4338de345524e47d5ab698982292 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Fri, 26 Jul 2024 16:53:06 -0700 Subject: [PATCH 01/14] update doc: HP total heating rate = sum coil heating rate previously it says HP total heating rate is the sum of air terminal heating rate (which includes supplemental heating coil heating rate). This is wrong for both the curve-based model and FluidTCtrl model. FluidTCtrl model doesn't have an entry to this output field, so one is added. --- .../overview/group-variable-refrigerant-flow-equipment.tex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex b/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex index 32ee79ca4da..6b7b8b696c8 100644 --- a/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex +++ b/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex @@ -619,7 +619,7 @@ \subsubsection{Outputs}\label{outputs-039} \paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w} -This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit output variables for Zone VRF Air Terminal Total Heating Rate. +This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate. \paragraph{VRF Heat Pump Cooling Electricity Rate {[}W{]}}\label{vrf-heat-pump-cooling-electric-power-w} @@ -1153,6 +1153,10 @@ \subsubsection{Outputs} Note: refer to the rdd file after a simulation for exact output variable names +\paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w} + +This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate. + \paragraph{VRF Heat Pump Compressor Rotating Speed {[}rev/min{]}}\label{vrf-heat-pump-compressor-rotating-speed-revmin} This output only applies for the VRF-FluidTCtrl model. This is the rotating speed of the compressor, which indicates the loading index. From 03d907036550b7a44a523d28fe82f3fe3d953caa Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Mon, 29 Jul 2024 15:39:18 -0700 Subject: [PATCH 02/14] change FanSpdRatio calculation to use enthalpy difference coil heating rate calculation is like the following AirMassFlow * (OutletAirEnthalpy - InletAirEnthalpy) * PartLoadRatio In the computation of fan speed ratio, the coil heating capacity is FanSpdRto * Garate * 1005.0 * (Tout - Tin) The difference between 1005.0 * (Tout - Tin) and (OutletAirEnthalpy - InletAirEnthalpy) can cause mismatches between coil heating rate and heating demand Here we change the fan speed ratio caculation to also use the enthalpy difference way to compute its heating capacity to match the demand --- src/EnergyPlus/DXCoils.cc | 27 +++++++++++++++++++++++++-- src/EnergyPlus/DXCoils.hh | 2 ++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 05ab55bc696..e0a340ab85f 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -17481,8 +17481,10 @@ void ControlVRFIUCoil(EnergyPlusData &state, if (QCoilSenHeatingLoad > QinSenMin1) { // Modulate fan speed to meet room sensible load; SC is not updated FanSpdRatioMax = 1.0; - auto f = [QCoilSenHeatingLoad, Ts_1, Tin, Garate, BF](Real64 FanSpdRto) { - return FanSpdResidualHeat(FanSpdRto, QCoilSenHeatingLoad, Ts_1, Tin, Garate, BF); + Tout = Tin + (Ts_1 - Tin) * (1 - BF); + Real64 RatedAirMassFlowRate = state.dataDXCoils->DXCoil(CoilIndex).RatedAirMassFlowRate[0]; + auto f = [QCoilSenHeatingLoad, RatedAirMassFlowRate, Tout, Tin, Win](Real64 FanSpdRto) { + return FanSpdResidualHeatUsingH(FanSpdRto, QCoilSenHeatingLoad, RatedAirMassFlowRate, Tout, Tin, Win); }; General::SolveRoot(state, 1.0e-3, MaxIter, SolFla, Ratio1, f, FanSpdRatioMin, FanSpdRatioMax); // this will likely cause problems eventually, -1 and -2 mean different things @@ -17767,6 +17769,27 @@ Real64 FanSpdResidualHeat(Real64 FanSpdRto, Real64 QCoilSenHeatingLoad, Real64 T return (TotCap - ZnSenLoad) / ZnSenLoad; } +Real64 FanSpdResidualHeatUsingH(Real64 FanSpdRto, Real64 QCoilSenHeatingLoad, Real64 RatedAirMassFlowRate, Real64 Tout, Real64 Tin, Real64 Win) +{ + + // FUNCTION INFORMATION: + // AUTHOR Yujie Xu (yujiex) + // DATE WRITTEN Jul 2024 + // + // PURPOSE OF THIS FUNCTION: + // Calculates residual function (desired zone heating load - actual heating coil capacity) + // This is used to modify the fan speed to adjust the coil heating capacity to match + // the zone heating load. This one uses Hin and Hout difference rather than Tin and Tout difference + // like in FanSpdResidualHeat + // + Real64 ZnSenLoad = QCoilSenHeatingLoad; + // +-100 W minimum zone load? + if (std::abs(ZnSenLoad) < 100.0) ZnSenLoad = sign(100.0, ZnSenLoad); + Real64 Wout = Win; + Real64 TotCap = FanSpdRto * RatedAirMassFlowRate * (PsyHFnTdbW(Tout, Wout) - PsyHFnTdbW(Tin, Win)); + return (TotCap - ZnSenLoad) / ZnSenLoad; +} + void SetMSHPDXCoilHeatRecoveryFlag(EnergyPlusData &state, int const DXCoilNum) { diff --git a/src/EnergyPlus/DXCoils.hh b/src/EnergyPlus/DXCoils.hh index af96c667b24..e2b0bb93f19 100644 --- a/src/EnergyPlus/DXCoils.hh +++ b/src/EnergyPlus/DXCoils.hh @@ -932,6 +932,8 @@ namespace DXCoils { Real64 FanSpdResidualHeat(Real64 FanSpdRto, Real64 QCoilSenHeatingLoad, Real64 Ts_1, Real64 Tin, Real64 Garate, Real64 BF); + Real64 FanSpdResidualHeatUsingH(Real64 FanSpdRto, Real64 QCoilSenHeatingLoad, Real64 RatedAirMassFlowRate, Real64 Tout, Real64 Tin, Real64 Win); + void SetMSHPDXCoilHeatRecoveryFlag(EnergyPlusData &state, int const DXCoilNum); // must match coil names for the coil type void SetDXCoilAirLoopNumber(EnergyPlusData &state, std::string const &CoilName, int const AirLoopNum); // must match coil names for the coil type From 098e584e0c6139f658a39c575d141a114cc496c8 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Thu, 15 Aug 2024 11:26:09 -0700 Subject: [PATCH 03/14] Fix non-matching HP heating rate and coil total heating rate --- src/EnergyPlus/DXCoils.cc | 10 ++++++++-- src/EnergyPlus/HVACVariableRefrigerantFlow.cc | 11 ++++++++++- src/EnergyPlus/HVACVariableRefrigerantFlow.hh | 12 +++++++----- testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf | 4 ++-- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index e0a340ab85f..bc3f5a9fa01 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -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 @@ -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; diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index 7cd77782189..0ad18673676 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -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 @@ -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; diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh index f7ee6e1a9ff..5d70adc539d 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh @@ -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) @@ -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 @@ -394,7 +396,7 @@ 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), @@ -402,10 +404,10 @@ namespace HVACVariableRefrigerantFlow { 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), diff --git a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf index 91ddad35a01..8273327d11e 100644 --- a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf +++ b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf @@ -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 From a75d23af7cb43b8aa18c9ff7fdac6f4d087153f8 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Fri, 16 Aug 2024 10:08:31 -0700 Subject: [PATCH 04/14] latex label add suffix, revert FanSpdRatioMin change --- .../src/overview/group-variable-refrigerant-flow-equipment.tex | 2 +- src/EnergyPlus/DXCoils.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex b/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex index 6b7b8b696c8..e39dc7ea58b 100644 --- a/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex +++ b/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex @@ -1153,7 +1153,7 @@ \subsubsection{Outputs} Note: refer to the rdd file after a simulation for exact output variable names -\paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w} +\paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w-fluidTCtrl} This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate. diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index bc3f5a9fa01..7bdd01d29ed 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -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.0), 1.0); // ensure that coil flow rate is higher than OA flow rate + FanSpdRatioMin = min(max(OAMassFlow / Garate, 0.65), 1.0); // ensure that coil flow rate is higher than OA flow rate if (QCoil == 0) { // No Heating or Cooling From 6379fdc352026d87f21ede2bb4b24541fe24256c Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Fri, 16 Aug 2024 11:11:04 -0700 Subject: [PATCH 05/14] Doc update, HP heating rate is coil + piping loss --- .../overview/group-variable-refrigerant-flow-equipment.tex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex b/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex index e39dc7ea58b..406db70715b 100644 --- a/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex +++ b/doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex @@ -619,7 +619,7 @@ \subsubsection{Outputs}\label{outputs-039} \paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w} -This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate. +This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate plus any piping loss. \paragraph{VRF Heat Pump Cooling Electricity Rate {[}W{]}}\label{vrf-heat-pump-cooling-electric-power-w} @@ -1155,7 +1155,7 @@ \subsubsection{Outputs} \paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w-fluidTCtrl} -This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate. +This output field is the operating total heating capacity of the variable refrigerant flow heat pump in Watts. The capacity includes any degradation due to defrost mode. This value is calculated for each HVAC system time step being simulated, and the results are averaged for the time step being reported. This value should match the sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate plus any piping loss. \paragraph{VRF Heat Pump Compressor Rotating Speed {[}rev/min{]}}\label{vrf-heat-pump-compressor-rotating-speed-revmin} From 94e3c1f9a43be812562f8af955482904dc802578 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Wed, 28 Aug 2024 17:54:25 -0700 Subject: [PATCH 06/14] change to directly use limited TU_HeatingLoad --- src/EnergyPlus/HVACVariableRefrigerantFlow.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index 419095b834f..d16604df10e 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -12222,13 +12222,7 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) this->TotalCoolingCapacity = TotalCondCoolingCapacity * CoolingPLR; // 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; - } + this->TotalHeatingCapacity = TU_HeatingLoad; if (this->MinPLR > 0.0) { bool const plrTooLow = this->VRFCondPLR < this->MinPLR; From ac4911c5d62f4072b2b3cd445b130381acfe6958 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Tue, 3 Sep 2024 13:07:09 -0700 Subject: [PATCH 07/14] revert test idf back to autosize heating cooling air flow TU1 --- testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf index 300082a0870..b766fbdc1a5 100644 --- a/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf +++ b/testfiles/US+SF+CZ4A+hp+crawlspace+IECC_2006_VRF.idf @@ -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} - 0, !- Cooling Outdoor Air Flow Rate {m3/s} - 0, !- Heating Outdoor Air Flow Rate {m3/s} + autosize, !- Cooling Outdoor Air Flow Rate {m3/s} + autosize, !- 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 From 3ba669a19a07b9f5305c5a3d5875963c84fc7f66 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Wed, 9 Oct 2024 15:05:37 -0700 Subject: [PATCH 08/14] Revert "change to directly use limited TU_HeatingLoad" This reverts commit 94e3c1f9a43be812562f8af955482904dc802578. --- src/EnergyPlus/HVACVariableRefrigerantFlow.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index 37e4cb7757d..3317ac6d183 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -12202,7 +12202,13 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c this->TotalCoolingCapacity = TotalCondCoolingCapacity * CoolingPLR; // adjustment for matching HP heating rate and coil heating rate - this->TotalHeatingCapacity = TU_HeatingLoad; + 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; From 303a5722cf1565e1b26b295f13f63ac373da3bd5 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Wed, 9 Oct 2024 15:15:06 -0700 Subject: [PATCH 09/14] Revert "Fix non-matching HP heating rate and coil total heating rate" This reverts commit 098e584e0c6139f658a39c575d141a114cc496c8. --- src/EnergyPlus/DXCoils.cc | 11 +++-------- src/EnergyPlus/HVACVariableRefrigerantFlow.cc | 11 +---------- src/EnergyPlus/HVACVariableRefrigerantFlow.hh | 12 +++++------- 3 files changed, 9 insertions(+), 25 deletions(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 7b7cebb603c..a5aec1d9a98 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -17253,7 +17253,8 @@ void ControlVRFIUCoil(EnergyPlusData &state, MaxSH = 15; MaxSC = 20; Garate = state.dataDXCoils->DXCoil(CoilIndex).RatedAirMassFlowRate(1); - FanSpdRatioMin = min(OAMassFlow / Garate, 1.0); // ensure that coil flow rate is higher than OA flow rate + // 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 if (QCoil == 0) { // No Heating or Cooling @@ -17395,13 +17396,7 @@ 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) { - if (f(FanSpdRatioMin) <= 0) { // capacity <= demand - Ratio1 = FanSpdRatioMax; // over capacity - } else { // capacity > demand even for the minimum fan speed - Ratio1 = FanSpdRatioMin; - } - } + if (SolFla < 0) Ratio1 = FanSpdRatioMax; // over capacity FanSpdRatio = Ratio1; CoilOnOffRatio = 1.0; diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index 3317ac6d183..80b40eaaddd 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -11705,14 +11705,12 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c 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 @@ -12201,14 +12199,7 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c } this->TotalCoolingCapacity = TotalCondCoolingCapacity * CoolingPLR; - // 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; - } + this->TotalHeatingCapacity = TotalCondHeatingCapacity * HeatingPLR; if (this->MinPLR > 0.0) { bool const plrTooLow = this->VRFCondPLR < this->MinPLR; diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh index b930f02774b..18069ff01e3 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.hh +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.hh @@ -171,7 +171,6 @@ 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) @@ -218,7 +217,6 @@ 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 @@ -395,7 +393,7 @@ 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), HeatingCapacityPrev(0.0), HeatingCapacitySizeRatio(1.0), LockHeatingCapacity(false), TotalHeatingCapacity(0.0), + HeatingCapacity(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), @@ -403,10 +401,10 @@ namespace HVACVariableRefrigerantFlow { 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), - 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), + 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), From 0ca1aa3eaab1fbfc7aa9348b8435e4ee9a23b035 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Wed, 9 Oct 2024 15:17:24 -0700 Subject: [PATCH 10/14] put back check on whether endpoints both positive or negative --- src/EnergyPlus/DXCoils.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index a5aec1d9a98..2ae9c801c35 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -17396,8 +17396,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 - FanSpdRatio = Ratio1; + if (SolFla < 0) { + if (f(FanSpdRatioMin) <= 0) { // capacity <= demand + Ratio1 = FanSpdRatioMax; // over capacity + } else { // capacity > demand even for the minimum fan speed + Ratio1 = FanSpdRatioMin; + } + } CoilOnOffRatio = 1.0; Tout = Tin + (Ts_1 - Tin) * (1 - BF); From fbcb90c6a775869b5fba1114bbd2df4c6f2c3e53 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Wed, 9 Oct 2024 15:18:24 -0700 Subject: [PATCH 11/14] remov piping loss in coil heating calculation for now --- src/EnergyPlus/HVACVariableRefrigerantFlow.cc | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index 80b40eaaddd..642b556567d 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -11705,15 +11705,19 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c this->VRFCondCyclingRatio = CyclingRatio; Tsuction = this->EvaporatingTemp; // Outdoor unit evaporating temperature - 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 + if (FirstHVACIteration) { + 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->PipingCorrectionHeating = TU_HeatingLoad / (TU_HeatingLoad + Pipe_Q_h); - state.dataHVACVarRefFlow->MaxHeatingCapacity(VRFCond) = - this->HeatingCapacity; // for report, maximum condensing capacity the system can provide + if (state.dataHVACVarRefFlow->MaxHeatingCapacity(VRFCond) == Constant::MaxCap) { + state.dataHVACVarRefFlow->MaxHeatingCapacity(VRFCond) = + this->HeatingCapacity; // for report, maximum condensing capacity the system can provide + } this->CoolingCapacity = 0.0; // Include the piping loss this->PipingCorrectionCooling = 1.0; @@ -12064,10 +12068,10 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state, c // From the VRF_FluidTCtrl model TotalCondHeatingCapacity = this->HeatingCapacity; - TotalTUHeatingCapacity = TotalCondHeatingCapacity * this->PipingCorrectionHeating; + TotalTUHeatingCapacity = TotalCondHeatingCapacity; if (TotalCondHeatingCapacity > 0.0) { - HeatingPLR = min(1.0, (this->TUHeatingLoad / this->PipingCorrectionHeating) / TotalCondHeatingCapacity); + HeatingPLR = min(1.0, (this->TUHeatingLoad) / TotalCondHeatingCapacity); HeatingPLR += (LoadDueToDefrost * HeatingPLR) / TotalCondHeatingCapacity; } else { HeatingPLR = 0.0; From bc5d7c92c746d32d03d7965a9441d51d5c1cf72a Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Wed, 9 Oct 2024 16:13:21 -0700 Subject: [PATCH 12/14] Wrongly removed a line, add back --- src/EnergyPlus/DXCoils.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 2ae9c801c35..95cf8d7617f 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -17403,6 +17403,7 @@ void ControlVRFIUCoil(EnergyPlusData &state, Ratio1 = FanSpdRatioMin; } } + FanSpdRatio = Ratio1; CoilOnOffRatio = 1.0; Tout = Tin + (Ts_1 - Tin) * (1 - BF); From 6161f8df00d30049be62ffc1eb3c2c82a7ea3a2f Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Wed, 9 Oct 2024 16:26:18 -0700 Subject: [PATCH 13/14] add back piping correction to heating coil heating rate --- src/EnergyPlus/HVACVariableRefrigerantFlow.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc index 642b556567d..bcc804bfce8 100644 --- a/src/EnergyPlus/HVACVariableRefrigerantFlow.cc +++ b/src/EnergyPlus/HVACVariableRefrigerantFlow.cc @@ -276,6 +276,9 @@ void SimulateVRF(EnergyPlusData &state, if (state.dataHVACVarRefFlow->VRF(VRFCondenser).CondenserType == DataHeatBalance::RefrigCondenserType::Water) UpdateVRFCondenser(state, VRFCondenser); + // add back piping correction to coil side + state.dataDXCoils->DXCoil(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).HeatCoilIndex).TotalHeatingEnergyRate *= + state.dataHVACVarRefFlow->VRF(VRFCondenser).PipingCorrectionHeating; } } From e1db7ed9c9b15f3d5456a01d7b6478da49f6ce11 Mon Sep 17 00:00:00 2001 From: Yujie Xu Date: Wed, 9 Oct 2024 17:01:07 -0700 Subject: [PATCH 14/14] revert back the FanSpdRatioMin bound as in develop --- src/EnergyPlus/DXCoils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EnergyPlus/DXCoils.cc b/src/EnergyPlus/DXCoils.cc index 95cf8d7617f..410053d8860 100644 --- a/src/EnergyPlus/DXCoils.cc +++ b/src/EnergyPlus/DXCoils.cc @@ -17254,7 +17254,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(OAMassFlow / Garate, 1.0); // ensure that coil flow rate is higher than OA flow rate if (QCoil == 0) { // No Heating or Cooling