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 3 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 @@ -617,9 +617,9 @@

This output field is the operating total cooling capacity of the variable refrigerant flow heat pump in Watts. 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 Cooling Rate.

\paragraph{VRF Heat Pump Total Heating Rate {[}W{]}}\label{vrf-heat-pump-total-heating-rate-w}

Check warning on line 620 in doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex

View workflow job for this annotation

GitHub Actions / build

Label `vrf-heat-pump-total-heating-rate-w' multiply defined.

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

It thought this should say "sum of the individual zone terminal unit heating coil output variables for Heating Coil Heating Rate less any piping loss."

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 might just be the total of heating coil heating rate rather than total coil heating rate - piping loss.

in CalcVRFCondenser, vrf.TotalHeatingCapacity (VRF Heat Pump Total Heating Rate output variable) is computed like this

vrf.TotalHeatingCapacity = TotalCondHeatingCapacity * HeatingPLR * CyclingRatio;

And in HeatingPLR is like this

if (TotalCondHeatingCapacity > 0.0) {
    HeatingPLR = min(1.0, (TUHeatingLoad / vrf.PipingCorrectionHeating) / TotalCondHeatingCapacity);
} else {
    HeatingPLR = 0.0;
}

For normal cases where TotalCondHeatingCapacity > 0.0,

vrf.TotalHeatingCapacity would just be

TotalCondHeatingCapacity * ((TUHeatingLoad / vrf.PipingCorrectionHeating) / TotalCondHeatingCapacity) * CyclingRatio 
= TUHeatingLoad / vrf.PipingCorrectionHeating * CyclingRatio

TUHeatingLoad / vrf.PipingCorrectionHeating would be coil heating rate plus the 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.

Right, I meant coil heating rates plus piping loss is the output from the outdoor unit.

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. Sorry I misunderstood earlier. I will modify the description.


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

Expand Down Expand Up @@ -1153,6 +1153,10 @@

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}

Check warning on line 1156 in doc/input-output-reference/src/overview/group-variable-refrigerant-flow-equipment.tex

View workflow job for this annotation

GitHub Actions / build

Label `vrf-heat-pump-total-heating-rate-w' multiply defined.
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs a unique label (there are duplicate label warnings when file changes are viewed in github).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch. I'll add a suffix to it


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.
Expand Down
37 changes: 33 additions & 4 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
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like a big change, unrelated to the heating rate outputs. Does this branch include some changes from another branch?

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 might have left it in by accident. Just reverted it.


if (QCoil == 0) {
// No Heating or Cooling
Expand Down Expand Up @@ -17481,12 +17481,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);
};
General::SolveRoot(state, 1.0e-3, MaxIter, SolFla, Ratio1, f, FanSpdRatioMin, FanSpdRatioMax);
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

// 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 @@ -17767,6 +17775,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
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;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

TotalHeatingCapacity should match the sum of the TU capacity + piping losses. So isn't it just that? TotalHeatingCapacity = Q_h_TU_PL = TU_HeatingLoad + Pipe_Q_h?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, it is matching this.


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}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does including OA flow cause a difference between the sum of TU heating capacity + piping losses and condenser total heating 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.

it does cause some more difference

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@rraustad Here is the output file when the heating cooling air flow rate is autosize
eplusout_when heating cooling air flow rate autosize.xlsx

The following is a snapshot sorted with column O in descending order

image

Copy link
Contributor

Choose a reason for hiding this comment

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

If L x M = 9083.83288 * 0.98793126 = 8974.2, which closely matches column K at 8973.19993, then why is the TU heating coil "allowed" to provide more than that "max" heating rate? Is the TU heating coil capacity getting limited by the MaxHeatingCapacity variable? I recall discussing that function LimitTUCapacity should include piping losses.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Coil capacity should have been limited. Maybe there's some lingering issues there. I will check on that.

Copy link
Collaborator Author

@yujiex yujiex Aug 29, 2024

Choose a reason for hiding this comment

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

@rraustad I've changed to just using TU_HeatingLoad for this->TotalHeatingCapacity. Now the total "Heating Coil Heating Rate" and the "VRF Heat Pump Total Heating Rate" equals (regardless of whether the "Heating/Cooling Outdoor Air Flow Rate" is autosize or 0). The following are the outputs for these two cases.

eplusout_0 heating cooling air flow.csv
eplusout_autosize heating cooling air flow.csv

The coil capacity is indeed limited. I set the OU evaporative capacity to 5000W (coil capacity is 10023W). Coil heating rate is less than OU capacity at max speed.

image

0, !- No Load Outdoor Air Flow Rate {m3/s}
VRFFanModeSchedule, !- Supply Air Fan Operating Mode Schedule Name
drawthrough, !- Supply Air Fan Placement
Expand Down
Loading