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 documentation of VRF Heat Pump Total Heating Rate, should equal the sum of coil heating rate, not air terminal heating rate #10627

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 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
Original file line number Diff line number Diff line change
Expand Up @@ -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 plus any piping loss.
Copy link
Contributor

Choose a reason for hiding this comment

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

This does seem like the correct definition for the VRF heating capacity.


\paragraph{VRF Heat Pump Cooling Electricity Rate {[}W{]}}\label{vrf-heat-pump-cooling-electric-power-w}

Expand Down Expand Up @@ -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-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 plus any piping loss.

\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.
Expand Down
35 changes: 32 additions & 3 deletions src/EnergyPlus/DXCoils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17483,12 +17483,20 @@ 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);
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not saying to change this but it just seems odd to me when meeting a load to modulate the fan based on suction temperature (which meets the load using air flow) instead of modulating the compressor at some known fan speed. I guess this is an artifact of using VS fan. I would hope in the case of a VS fan that the refrigerant suction T is relatively constant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seems that modulating the compressor is at the next step after the calculation of the TU's are finished. In this function, I don't think refrigerant suction temperature changes

};
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 Expand Up @@ -17769,6 +17777,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;
Copy link
Contributor

@rraustad rraustad Aug 26, 2024

Choose a reason for hiding this comment

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

Do you really need to iterate on this? There's only 1 unknown.., FanSpdRto.

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 guess not. I will change it to directly calculate FanSpdRto

}

void SetMSHPDXCoilHeatRecoveryFlag(EnergyPlusData &state, int const DXCoilNum)
{

Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/DXCoils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11725,12 +11725,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 @@ -12219,7 +12221,8 @@ 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 = TU_HeatingLoad;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not actually correct. The TU_HeatingLoad is the target (coil load + piping loss) that the model will iterate on to find a solution. The TotalHeatingCapacity is the result. With a tolerance on the iterations these 2 variables should not match. They should be very close (like within 0.001%), but not match. How far off TotalHeatingCapacity is from TU_HeatingLoad tells you how well the model did to calculate the final result. To equate these at the end will hide any issues with the model. TU_HeatingLoad should match exactly with the coil loads + piping loss. TotalHeatingCapacity should represent the refrigerant side heating capacity. Since this model has refrigerant properties could TotalHeatingCapacity = Mdot deltaH on the refrigerant side? Then you would know how well the model did to meet the load.

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 see.

I think the piping correction is not consistent in the IU and OU calculation, which might have partly caused the discrepancy. See comment here: #10625 (comment)

There might be other places contributing to it as well. I've been playing around with adjusting stuff but so far I've not been able to figure out how to effectively resolve the discrepancy.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just revert this one change and revisit how different these 2 results are. TotalHeatingCapacity versus TU_HeatingLoad. Maybe also add another report for refrigerant side capacity?

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 will do that


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
Loading