-
Notifications
You must be signed in to change notification settings - Fork 378
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
Changes from 1 commit
3aa02d6
63442e6
03f4064
ac463cb
a674053
1b8245c
69211ef
ce7d093
b2f4106
5bd6ae1
2ec3bcf
9792e73
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 |
---|---|---|
|
@@ -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); | ||
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); | ||
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. 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) { | ||
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. 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); | ||
|
@@ -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); | ||
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. 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. 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 guess I should read the Eng. Ref. to get better acquainted. |
||
//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); | ||
|
@@ -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); | ||
|
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.
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.
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.
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.
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.
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.