-
Notifications
You must be signed in to change notification settings - Fork 397
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
Follow up to #10617 and allow other ZoneHVAC:*
component with Airflow Network simulations
#10637
Conversation
…WAHP). Missing unit test for the latter.
…and docs, and address comments from #10617.
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.
Code change walk-through.
bool getVRFTUNodeNumber(EnergyPlusData &state, int const nodeNumber) | ||
{ | ||
for (int vrfTUIndex = 1; vrfTUIndex <= state.dataHVACVarRefFlow->NumVRFTU; ++vrfTUIndex) { | ||
auto &vrfTU = state.dataHVACVarRefFlow->VRFTU(vrfTUIndex); | ||
|
||
bool noVrfTUOutdoorAir = false; | ||
if (vrfTU.CoolOutAirVolFlow == 0 && vrfTU.HeatOutAirVolFlow == 0 && vrfTU.NoCoolHeatOutAirVolFlow == 0) { | ||
noVrfTUOutdoorAir = true; | ||
} | ||
|
||
if (noVrfTUOutdoorAir && | ||
(nodeNumber == vrfTU.VRFTUInletNodeNum || nodeNumber == vrfTU.VRFTUOutletNodeNum || nodeNumber == vrfTU.fanInletNode || | ||
nodeNumber == vrfTU.fanOutletNode || nodeNumber == vrfTU.heatCoilAirOutNode || nodeNumber == vrfTU.coolCoilAirOutNode || | ||
nodeNumber == vrfTU.VRFTUOAMixerOANodeNum || nodeNumber == vrfTU.VRFTUOAMixerRelNodeNum || nodeNumber == vrfTU.VRFTUOAMixerRetNodeNum || | ||
nodeNumber == vrfTU.VRFTUOAMixerMixedNodeNum || nodeNumber == vrfTU.SuppHeatCoilAirInletNode || | ||
nodeNumber == vrfTU.SuppHeatCoilAirOutletNode)) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
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.
New function to identify nodes used by VRF terminal units that don't use any OA so they can be excluded from the AFN distribution validation.
bool getUnitarySystemNodeNumber(EnergyPlusData &state, int const nodeNumber) | ||
{ | ||
for (int unitarySysIndex = 0; unitarySysIndex <= state.dataUnitarySystems->numUnitarySystems - 1; ++unitarySysIndex) { | ||
auto &unitarySys = state.dataUnitarySystems->unitarySys[unitarySysIndex]; | ||
|
||
int FanInletNodeIndex = state.dataFans->fans(unitarySys.m_FanIndex)->inletNodeNum; | ||
int FanOutletNodeIndex = state.dataFans->fans(unitarySys.m_FanIndex)->outletNodeNum; | ||
|
||
bool noUnitarySysOutdoorAir = false; | ||
if (unitarySys.m_CoolOutAirVolFlow == 0 && unitarySys.m_HeatOutAirVolFlow == 0 && unitarySys.m_NoCoolHeatOutAirVolFlow == 0) { | ||
noUnitarySysOutdoorAir = true; | ||
} | ||
|
||
if (unitarySys.m_sysType == UnitarySys::SysType::PackagedWSHP || unitarySys.m_sysType == UnitarySys::SysType::PackagedAC || | ||
unitarySys.m_sysType == UnitarySys::SysType::PackagedHP) { | ||
if (noUnitarySysOutdoorAir && (nodeNumber == FanInletNodeIndex || nodeNumber == FanOutletNodeIndex || | ||
nodeNumber == unitarySys.AirInNode || nodeNumber == unitarySys.m_OAMixerNodes[0] || | ||
nodeNumber == unitarySys.m_OAMixerNodes[1] || nodeNumber == unitarySys.m_OAMixerNodes[2]) || | ||
nodeNumber == unitarySys.m_OAMixerNodes[3] || nodeNumber == unitarySys.CoolCoilOutletNodeNum || | ||
nodeNumber == unitarySys.HeatCoilOutletNodeNum) { | ||
return true; | ||
} | ||
} | ||
} | ||
return false; | ||
} | ||
|
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.
New function to identify nodes used by PTAC/PTHP/WSHP that don't use any OA so they can be excluded from the AFN distribution validation.
bool GetWindowACNodeNumber(EnergyPlusData &state, int const NodeNumber) | ||
bool getWindowACNodeNumber(EnergyPlusData &state, int const nodeNumber) | ||
{ | ||
if (state.dataWindowAC->GetWindowACInputFlag) { | ||
GetWindowAC(state); | ||
state.dataWindowAC->GetWindowACInputFlag = false; | ||
} | ||
|
||
bool windowACOutdoorAir = false; | ||
|
||
for (int windowACIndex = 1; windowACIndex <= state.dataWindowAC->NumWindAC; ++windowACIndex) { | ||
auto &windowAC = state.dataWindowAC->WindAC(windowACIndex); | ||
if (windowAC.OutAirVolFlow == 0) { | ||
windowACOutdoorAir = true; | ||
} else { | ||
windowACOutdoorAir = false; | ||
} | ||
int FanInletNodeIndex = 0; | ||
int FanOutletNodeIndex = 0; | ||
FanInletNodeIndex = state.dataFans->fans(windowAC.FanIndex)->inletNodeNum; | ||
FanOutletNodeIndex = state.dataFans->fans(windowAC.FanIndex)->outletNodeNum; | ||
|
||
if (windowACOutdoorAir && | ||
(NodeNumber == windowAC.OutsideAirNode || NodeNumber == windowAC.MixedAirNode || NodeNumber == windowAC.AirReliefNode || | ||
NodeNumber == FanInletNodeIndex || NodeNumber == FanOutletNodeIndex || NodeNumber == windowAC.AirInNode)) { | ||
int FanInletNodeIndex = state.dataFans->fans(windowAC.FanIndex)->inletNodeNum; | ||
int FanOutletNodeIndex = state.dataFans->fans(windowAC.FanIndex)->outletNodeNum; | ||
|
||
if (windowAC.OutAirVolFlow == 0 && | ||
(nodeNumber == windowAC.OutsideAirNode || nodeNumber == windowAC.MixedAirNode || nodeNumber == windowAC.AirReliefNode || | ||
nodeNumber == FanInletNodeIndex || nodeNumber == FanOutletNodeIndex || nodeNumber == windowAC.AirInNode || | ||
nodeNumber == windowAC.CoilOutletNodeNum || nodeNumber == windowAC.AirOutNode || nodeNumber == windowAC.ReturnAirNode)) { |
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.
Address review comments from #10617.
if (state.afn->distribution_simulated && this->m_sysType != SysType::PackagedAC && this->m_sysType != SysType::PackagedHP && | ||
this->m_sysType != SysType::PackagedWSHP) { |
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.
Exclude PTHP/PTAC/WSHP since they are excluded from AFN simulation with distribution.
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.
This appears to be following the pattern that was set out in previous PRs. I guess if I have a concern it's that some of the logical conditions are getting a little on the long side, but I'm not sure what we can do to help there. Maybe a comment on what the conditions all mean? I'm not sure about that. Anyway, no objections from me.
Thanks for looking this over @jasondegraw ! This is on track to merge then. |
This is still all happy with develop pulled in, thanks @lymereJ and @jasondegraw |
Pull request overview
This PR is a follow up to #10617, it adds support for other types of zonal systems such as VRF terminals, PTHP, PTAC, and WSHP. The PR also address some of the review comments from #10617.
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.