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

Correct physics based VRF model to align inlet and outlet air flow rates #7295

Merged
merged 12 commits into from
May 17, 2019
41 changes: 22 additions & 19 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8663,34 +8663,35 @@ namespace HVACVariableRefrigerantFlow {
}

// Set inlet air mass flow rate based on PLR and compressor on/off air flow rates
SetAverageAirFlow(VRFTUNum, 1.0, temp);
//SetAverageAirFlow(VRFTUNum, 1.0, temp);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The TUs have already been simulated. At this point it appears the model want to know what the evap T and cond T are for use during the next time step. Anything that tried to resimulate the TUs is now commented out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note here that the original model did not set OA flow rate and therefore used the OA flow for the last TU simulated when SetAverageAirFlow was called. When I corrected this (lines 8671 and 8676), my new method matched the old method results.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also note that any calls to this and other functions updates the node flow rates. So data set when the TU was actually modelled is used here instead.

VRFInletNode = this->VRFTUInletNodeNum;
T_TU_in = Node(VRFInletNode).Temp;
W_TU_in = Node(VRFInletNode).HumRat;
T_coil_in = T_TU_in;
W_coil_in = W_TU_in;

// Simulation the OAMixer if there is any
if (this->OAMixerUsed) {
SimOAMixer(this->OAMixerName, false, this->OAMixerIndex);
//SimOAMixer(this->OAMixerName, false, this->OAMixerIndex);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mixer has already been simulated.


OAMixerNum = UtilityRoutines::FindItemInList(this->OAMixerName, OAMixer);
OAMixNode = OAMixer(OAMixerNum).MixNode;
T_coil_in = Node(OAMixNode).Temp;
W_coil_in = Node(OAMixNode).HumRat;
} else {
T_coil_in = T_TU_in;
W_coil_in = W_TU_in;
}
// Simulate the blow-through fan if there is any
if (this->FanPlace == BlowThru) {
if (this->fanType_Num == DataHVACGlobals::FanType_SystemModelObject) {
HVACFan::fanObjs[this->FanIndex]->simulate(1.0 / temp, ZoneCompTurnFansOn, ZoneCompTurnFansOff, _);
FanOutletNode = HVACFan::fanObjs[this->FanIndex]->outletNodeNum;
} else {
Fans::SimulateFanComponents("", false, this->FanIndex, FanSpeedRatio, ZoneCompTurnFansOn, ZoneCompTurnFansOff);
FanOutletNode = Fans::Fan(this->FanIndex).OutletNodeNum;
}
T_coil_in = Node(FanOutletNode).Temp;
W_coil_in = Node(FanOutletNode).HumRat;
}
//if (this->FanPlace == BlowThru) {
Copy link
Contributor Author

@rraustad rraustad May 9, 2019

Choose a reason for hiding this comment

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

Fan has already been simulated. If the intent here is to simulate at full flow then why weren't the coils simulated again?

// if (this->fanType_Num == DataHVACGlobals::FanType_SystemModelObject) {
// HVACFan::fanObjs[this->FanIndex]->simulate(1.0 / temp, ZoneCompTurnFansOn, ZoneCompTurnFansOff, _);
// FanOutletNode = HVACFan::fanObjs[this->FanIndex]->outletNodeNum;
// } else {
// Fans::SimulateFanComponents("", false, this->FanIndex, FanSpeedRatio, ZoneCompTurnFansOn, ZoneCompTurnFansOff);
// FanOutletNode = Fans::Fan(this->FanIndex).OutletNodeNum;
// }
// T_coil_in = Node(FanOutletNode).Temp;
// W_coil_in = Node(FanOutletNode).HumRat;
//}

Garate = CompOnMassFlow;
H_coil_in = PsyHFnTdbW(T_coil_in, W_coil_in);
Expand All @@ -8702,8 +8703,9 @@ namespace HVACVariableRefrigerantFlow {
if ((Garate > 0.0) && ((!VRF(VRFNum).HeatRecoveryUsed && CoolingLoad(VRFNum)) ||
(VRF(VRFNum).HeatRecoveryUsed && TerminalUnitList(TUListIndex).HRCoolRequest(IndexToTUInTUList)))) {
// 1.1) Cooling coil is running
QZnReqSenCoolingLoad = max(0.0, -1.0 * ZoneSysEnergyDemand(ZoneIndex).OutputRequiredToCoolingSP);
Tout = T_TU_in - QZnReqSenCoolingLoad * 1.2 / Garate / 1005;
//QZnReqSenCoolingLoad = max(0.0, -1.0 * ZoneSysEnergyDemand(ZoneIndex).OutputRequiredToCoolingSP);
Copy link
Contributor Author

@rraustad rraustad May 9, 2019

Choose a reason for hiding this comment

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

Here's the big question. What Tout is needed here? The Tout when the coil is operating I assume. Line 8706 is wrong since for that zone, the TU operated and probably met the load, so OutputRequiredToCoolingSP is probably 0. Instead I use the actual coil outlet temp, but this is premised on needing actual Tout.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I should read the Eng. Ref. to get better acquainted.
@nealkruis @mbadams5 @mjwitte @Myoldmopar @jasondegraw @kbenne this will need some serious thought and review because I don't know this model. What the heck should it do? Does it need full output conditions while coils are operating? Yet the coils can have different PLR's so how to average correctly to get condenser performance? Anyone recognize old line 8706 above? Q*1.2/Mdot/1005 ? Figuring out what this function needs will probably correct this issue. If Tout at full air flow is really needed then the coils will need to be simulated again, or better yet that information needs to be saved when the TUs model full flow and then used here. Is Xiufeng Pang or RP Zhang or anyone at LBNL available for consult on this model?

//Tout = T_TU_in - QZnReqSenCoolingLoad * 1.2 / Garate / 1005;
Tout = DXCoils::DXCoilOutletTemp(CoolCoilNum);
Th2 = T_coil_in - (T_coil_in - Tout) / (1 - BFC);
DeltaT = C3Tevap * SH * SH + C2Tevap * SH + C1Tevap;
EvapTemp = max(min((Th2 - DeltaT), EvapTempMax), EvapTempMin);
Expand All @@ -8717,8 +8719,9 @@ namespace HVACVariableRefrigerantFlow {
if ((Garate > 0.0) && ((!VRF(VRFNum).HeatRecoveryUsed && HeatingLoad(VRFNum)) ||
(VRF(VRFNum).HeatRecoveryUsed && TerminalUnitList(TUListIndex).HRHeatRequest(IndexToTUInTUList)))) {
// 2.1) Heating coil is running
QZnReqSenHeatingLoad = max(0.0, ZoneSysEnergyDemand(ZoneIndex).OutputRequiredToHeatingSP);
Tout = T_TU_in + QZnReqSenHeatingLoad / Garate / 1005;
//QZnReqSenHeatingLoad = max(0.0, ZoneSysEnergyDemand(ZoneIndex).OutputRequiredToHeatingSP);
//Tout = T_TU_in + QZnReqSenHeatingLoad / Garate / 1005;
Tout = DXCoils::DXCoilOutletTemp(HeatCoilNum);
Th2 = T_coil_in + (Tout - T_coil_in) / (1 - BFH);
DeltaT = C3Tcond * SC * SC + C2Tcond * SC + C1Tcond;
CondTemp = max(min((Th2 + DeltaT), CondTempMax), CondTempMin);
Expand Down