-
Notifications
You must be signed in to change notification settings - Fork 421
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 VRF_FluidTCtrl heating round 2 #10331
Changes from 16 commits
34bef65
b9e8716
31d03bc
5746fbf
010fd51
b5b9122
3c2ca1c
cc209cd
e2e5927
3decf87
114ccb2
472513a
6f3ad16
0d7f6ec
f51b81d
a7a1178
a2a0441
82f2a31
9a5912e
444eee3
cff7ba0
93618cf
17442f0
43e441c
99dc744
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11361,7 +11361,6 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) | |
Real64 SH_Comp; // Temperature difference between compressor inlet node and Tsuction [C] | ||
Real64 T_comp_in; // temperature of refrigerant at compressor inlet, after piping loss (c) [C] | ||
Real64 TU_HeatingLoad; // Heating load from terminal units, excluding heating loss [W] | ||
Real64 TU_HeatingLoad_actual; // TU_HeatingLoad trimed to maximum system capacity[W] | ||
Real64 TU_CoolingLoad; // Cooling load from terminal units, excluding heating loss [W] | ||
Real64 Tdischarge; // VRF Compressor discharge refrigerant temperature [C] | ||
Real64 Tsuction; // VRF compressor suction refrigerant temperature [C] | ||
|
@@ -11430,7 +11429,6 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) | |
} | ||
this->TUCoolingLoad = TU_CoolingLoad; // this is cooling coil load, not terminal unit load | ||
this->TUHeatingLoad = TU_HeatingLoad; // this is heating coil load, not terminal unit load | ||
TU_HeatingLoad_actual = TU_HeatingLoad; | ||
|
||
// loop through TU's and calculate average inlet conditions for active coils | ||
for (NumTU = 1; NumTU <= NumTUInList; ++NumTU) { | ||
|
@@ -11787,8 +11785,7 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) | |
RoutineName); // Quality=0 | ||
h_IU_cond_out_ave = h_IU_cond_out; | ||
SC_IU_merged = 5; | ||
TU_HeatingLoad_actual = min(TU_HeatingLoad, CompEvaporatingCAPSpdMax + CompEvaporatingPWRSpdMax); | ||
m_ref_IU_cond = TU_HeatingLoad_actual / (h_IU_cond_in - h_IU_cond_out); | ||
m_ref_IU_cond = TU_HeatingLoad / (h_IU_cond_in - h_IU_cond_out); | ||
|
||
} else { | ||
for (NumTU = 1; NumTU <= NumTUInList; NumTU++) { | ||
|
@@ -11856,7 +11853,28 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) | |
CapMinTe + 8, | ||
this->IUCondensingTemp - 5); | ||
|
||
if ((Q_c_OU * C_cap_operation) <= CompEvaporatingCAPSpdMin) { | ||
Real64 CompEvaporatingCAPSpdMaxCurrentTsuc = this->CoffEvapCap * this->RatedEvapCapacity * | ||
CurveValue(state, this->OUCoolingCAPFT(NumOfCompSpdInput), Tdischarge, this->EvaporatingTemp); | ||
Real64 CompEvaporatingPWRSpdMaxCurrentTsuc = | ||
this->RatedCompPower * CurveValue(state, this->OUCoolingPWRFT(NumOfCompSpdInput), Tdischarge, this->EvaporatingTemp); | ||
if (CompEvaporatingCAPSpdMin > CompEvaporatingCAPSpdMaxCurrentTsuc) { | ||
ShowSevereMessage(state, format("{} \"{}\":", cVRFTypes(VRF_HeatPump), this->Name)); | ||
ShowContinueError(state, | ||
format(" Evaporative Capacity at max speed is smaller than evaporative capacity at min speed, " | ||
"{:.3T} < {:.3T}", | ||
CompEvaporatingCAPSpdMaxCurrentTsuc, | ||
CompEvaporatingCAPSpdMin)); | ||
} | ||
if ((Q_c_OU * C_cap_operation) > CompEvaporatingCAPSpdMaxCurrentTsuc) { | ||
// this branch resolves the issue of supplemental heating coil turning on when compressor speed is not at the highest | ||
Q_c_OU = CompEvaporatingCAPSpdMaxCurrentTsuc; | ||
CompSpdActual = this->CompressorSpeed(NumOfCompSpdInput); | ||
Ncomp = CompEvaporatingPWRSpdMaxCurrentTsuc; | ||
m_air = this->OUAirFlowRate * RhoAir; | ||
SH_OU = this->SH; | ||
this->VRFOU_TeTc( | ||
state, HXOpMode::EvapMode, Q_c_OU, SH_OU, m_air, OutdoorDryBulb, OutdoorHumRat, OutdoorPressure, Tfs, this->EvaporatingTemp); | ||
} else if ((Q_c_OU * C_cap_operation) <= CompEvaporatingCAPSpdMin) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't comment on the math here, but what if the curve result yields CompEvaporatingPWRSpdMaxCurrentTsuc that gives a value in the IF that is less than CompEvaporatingCAPSpdMin in the ELSE IF? Just pointing this out so you think about what that might mean. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, this part might also need some change as well. The intention was to match the calculation here (which computes the compressor speed) and previously in limitTUCapacity. Let me sort this through There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a error message to ensure that CompEvaporatingCAPSpdMin is less than CompEvaporatingCAPSpdMaxCurrentTsuc so the case when |
||
// Required heating load is smaller than the min heating capacity | ||
|
||
if (Q_c_OU == 0) { | ||
|
@@ -11875,6 +11893,7 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) | |
CompSpdActual = this->CompressorSpeed(1); | ||
|
||
} else { | ||
// CompEvaporatingCAPSpdMin < (Q_c_OU * C_cap_operation) <= CompEvaporatingCAPSpdMaxCurrentTsuc + CompEvaporatingPWRSpdMaxCurrentTsuc | ||
// Required heating load is greater than or equal to the min heating capacity | ||
|
||
// Iteration_Ncomp: Perform iterations to calculate Ncomp (Label20) | ||
|
@@ -11944,7 +11963,7 @@ void VRFCondenserEquipment::CalcVRFCondenser_FluidTCtrl(EnergyPlusData &state) | |
this->OUCoolingPWRFT(NumOfCompSpdInput), | ||
Tdischarge, | ||
Tsuction); // Include the piping loss, at the highest compressor speed | ||
this->PipingCorrectionHeating = TU_HeatingLoad_actual / (TU_HeatingLoad_actual + Pipe_Q_h); | ||
this->PipingCorrectionHeating = TU_HeatingLoad / (TU_HeatingLoad + Pipe_Q_h); | ||
state.dataHVACVarRefFlow->MaxHeatingCapacity(VRFCond) = | ||
this->HeatingCapacity; // for report, maximum condensing capacity the system can provide | ||
|
||
|
@@ -13012,6 +13031,9 @@ void VRFTerminalUnitEquipment::CalcVRF_FluidTCtrl(EnergyPlusData &state, | |
_, | ||
_, | ||
state.dataHVACVarRefFlow->MaxHeatingCapacity(VRFCond)); | ||
// yujie: update TU air mass flow | ||
state.dataLoopNodes->Node(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFTUInletNodeNum).MassFlowRate = | ||
state.dataDXCoils->DXCoil(this->HeatCoilIndex).InletAirMassFlowRate; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not standard practice to update another model's operating conditions. Why doesn't the VRF model know what air flow is being used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the original code, the air mass flow of the coil is updated here through There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I would delete the new lines at 13034- 13046 and then follow suggestion below. |
||
} else { | ||
SimDXCoil(state, "", DataHVACGlobals::CompressorOperation::Off, FirstHVACIteration, this->HeatCoilIndex, OpMode, 0.0, _); | ||
} | ||
|
@@ -13082,6 +13104,11 @@ void VRFTerminalUnitEquipment::CalcVRF_FluidTCtrl(EnergyPlusData &state, | |
} | ||
} | ||
// calculate sensible load met using delta enthalpy | ||
auto const &thisDXCoil = state.dataDXCoils->DXCoil(this->HeatCoilIndex); | ||
// yujie: correct mismatching in the air mass flow rate | ||
if (thisDXCoil.TotalHeatingEnergyRate > 0.0) { | ||
AirMassFlow = state.dataDXCoils->DXCoil(this->HeatCoilIndex).InletAirMassFlowRate; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is there a mismatch in AirMassFlow? AirMassFlow is used in the LoadMet calculation on line 13112. That calculation should include any supply side AT Mixer flow if used on the supply side of this TU which would be different than the AirMassFlow used by the coil. See line 13082 above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replace lines 13107 - 13111 with:
This is the code flow:
So now here each child component has passed air mass flow from it's inlet to outlet all the way through the TU. And the outlet node of the TU should be the mass flow rate used to calculate LoadMet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I moved the AirMassFlow updates to after |
||
LoadMet = AirMassFlow * PsyDeltaHSenFnTdb2W2Tdb1W1(TempOut, SpecHumOut, TempIn, SpecHumIn); // sensible {W} | ||
LatentLoadMet = AirMassFlow * (SpecHumOut - SpecHumIn); // latent {kgWater/s} | ||
if (present(LatOutputProvided)) { | ||
|
@@ -14546,6 +14573,7 @@ void VRFCondenserEquipment::VRFOU_CalcCompH( | |
RoutineName); | ||
C_cap_operation = this->VRFOU_CapModFactor( | ||
state, Pipe_h_comp_in, Pipe_h_out_ave, max(min(MinOutdoorUnitPe, RefPHigh), RefPLow), T_suction + this->SH, T_suction + 8, IUMaxCondTemp - 5); | ||
C_cap_operation = 1.0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line overwrites the calculation at line 14574, why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It was used for debugging things. I forgot to remove it afterward. Sorry for the confusion. |
||
|
||
// Perform iterations to find the compressor speed that can meet the required heating load, Iteration DoName2 | ||
for (CounterCompSpdTemp = 1; CounterCompSpdTemp <= NumOfCompSpdInput; CounterCompSpdTemp++) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add the recurring error format so this warning, however unlikely, does not fill the err file if it ever does report. Also, if this warning does report shouldn't the model use one of these capacities (CAPSpdMin?) to set other variables so that subsequent calculations can proceed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the recurring error format in commit a2a0441 "Fix recurring error"