Skip to content

Commit

Permalink
Merge pull request #10515 from NREL/VRFHeatRecovery10514
Browse files Browse the repository at this point in the history
Fix VRF HeatRecovery Check
  • Loading branch information
Myoldmopar authored May 28, 2024
2 parents 9a34ab8 + eba06fd commit c58bbbf
Show file tree
Hide file tree
Showing 2 changed files with 1,198 additions and 16 deletions.
33 changes: 17 additions & 16 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4618,27 +4618,28 @@ void GetVRFInputData(EnergyPlusData &state, bool &ErrorsFound)
} // end Number of VRF Terminal Unit Loop

// perform additional error checking
for (int NumList = 1; NumList <= state.dataHVACVarRefFlow->NumVRFTULists; ++NumList) {
for (int VRFTUNum = 1; VRFTUNum <= state.dataHVACVarRefFlow->TerminalUnitList(NumList).NumTUInList; ++VRFTUNum) {
if (state.dataHVACVarRefFlow->TerminalUnitList(NumList).ZoneTUPtr(VRFTUNum) == 0) {
for (auto const &thisTUList : state.dataHVACVarRefFlow->TerminalUnitList) {
for (int VRFTUNum = 1; VRFTUNum <= thisTUList.NumTUInList; ++VRFTUNum) {
int const tuPtr = thisTUList.ZoneTUPtr(VRFTUNum);
if (tuPtr == 0) {
// TU name in zone terminal unit list not found
ShowSevereError(state, format("ZoneTerminalUnitList \"{}\"", state.dataHVACVarRefFlow->TerminalUnitList(NumList).Name));
ShowContinueError(state,
"...Zone Terminal Unit = " + state.dataHVACVarRefFlow->TerminalUnitList(NumList).ZoneTUName(VRFTUNum) +
" improperly connected to system.");
ShowSevereError(state, format("ZoneTerminalUnitList \"{}\"", thisTUList.Name));
ShowContinueError(state, format("...Zone Terminal Unit = {} improperly connected to system.", thisTUList.ZoneTUName(VRFTUNum)));
ShowContinueError(state, "...either the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object does not exist,");
ShowContinueError(state, "...the ZoneHVAC:TerminalUnit:VariableRefrigerantFlow object name is misspelled,");
ShowContinueError(state, "...or the ZoneTerminalUnitList object is not named in an AirConditioner:VariableRefrigerantFlow object.");
ErrorsFound = true;
}
if (state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFSysNum > 0) {
if (state.dataHVACVarRefFlow->TerminalUnitList(NumList).NumTUInList == 1 &&
state.dataHVACVarRefFlow->VRF(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFSysNum).VRFAlgorithmType == AlgorithmType::SysCurve) {
if (state.dataHVACVarRefFlow->VRF(state.dataHVACVarRefFlow->VRFTU(VRFTUNum).VRFSysNum).HeatRecoveryUsed) {
ShowWarningError(state, "ZoneTerminalUnitList \"" + state.dataHVACVarRefFlow->TerminalUnitList(NumList).Name + "\"");
ShowWarningError(state, "...Only 1 Terminal Unit connected to system and heat recovery is selected.");
ShowContinueError(state, "...Heat recovery will be disabled.");
state.dataHVACVarRefFlow->VRF(VRFTUNum).HeatRecoveryUsed = false;
} else {
int const sysNum = state.dataHVACVarRefFlow->VRFTU(tuPtr).VRFSysNum;
if (sysNum > 0) {
auto &thisVRFSys = state.dataHVACVarRefFlow->VRF(sysNum);
if (thisTUList.NumTUInList == 1 && thisVRFSys.VRFAlgorithmType == AlgorithmType::SysCurve) {
if (thisVRFSys.HeatRecoveryUsed) {
ShowWarningError(state, format("ZoneTerminalUnitList \"{}\"", thisTUList.Name));
ShowWarningError(state, "...Only 1 Terminal Unit connected to system and heat recovery is selected.");
ShowContinueError(state, format("...Heat recovery will be disabled for {}.", thisVRFSys.Name));
thisVRFSys.HeatRecoveryUsed = false;
}
}
}
}
Expand Down
Loading

5 comments on commit c58bbbf

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2799 of 2799 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-3
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-MacOS-10.18-clang-15.0.0: OK (2778 of 2778 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - Win64-Windows-10-VisualStudio-16: OK (2777 of 2777 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2b
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1989 of 1989 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

@nrel-bot-2
Copy link

Choose a reason for hiding this comment

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

develop (Myoldmopar) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (791 of 791 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.