Skip to content

Commit

Permalink
Merge pull request #10525 from NREL/10355_CompressorRack_WalkIn_InZone
Browse files Browse the repository at this point in the history
Fix #10355 - Correctly Set up Zone Internal Gains when Refrigeration:CompressorRack serves a Refrigeration:WalkIn object with "Zone" Heat Transfer Location
  • Loading branch information
mjwitte authored May 30, 2024
2 parents 1b333b5 + 8bd98c2 commit 6cccca9
Show file tree
Hide file tree
Showing 3 changed files with 758 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/EnergyPlus/RefrigeratedCase.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8634,8 +8634,9 @@ void SetupReportInput(EnergyPlusData &state)
OutputProcessor::StoreType::Sum,
rack.Name);

// If CoilFlag is true and Location is Zone, GetRefrigerationInput ensures you must have a Heat Rejection Zone provided already
SetupZoneInternalGain(state,
RefrigCase(rack.CaseNum(1)).ActualZoneNum,
rack.HeatRejectionZoneNum,
rack.Name,
DataHeatBalance::IntGainType::RefrigerationCompressorRack,
&rack.SensZoneCreditHeatRate,
Expand Down Expand Up @@ -8794,8 +8795,18 @@ void SetupReportInput(EnergyPlusData &state)
OutputProcessor::TimeStepType::Zone,
OutputProcessor::StoreType::Sum,
rack.Name);

// if Location is Zone, GetRefrigerationInputEither checks that you have at least one load and that either:
// * You have only cases, and they must be all in the same zone
// * Or you must have a Heat Rejection Zone provided
int rackZoneNum = -1;
if (rack.HeatRejectionZoneNum > 0) {
rackZoneNum = rack.HeatRejectionZoneNum;
} else {
rackZoneNum = RefrigCase(rack.CaseNum(1)).ActualZoneNum;
}
SetupZoneInternalGain(state,
RefrigCase(rack.CaseNum(1)).ActualZoneNum,
rackZoneNum,
rack.Name,
DataHeatBalance::IntGainType::RefrigerationCompressorRack,
&rack.SensZoneCreditHeatRate,
Expand Down
1 change: 1 addition & 0 deletions tst/EnergyPlus/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ set(test_src
Psychrometrics.unit.cc
Pumps.unit.cc
PurchasedAirManager.unit.cc
RefrigeratedCase.unit.cc
ReportCoilSelection.unit.cc
ResultsFramework.unit.cc
RoomAirModelUserTempPattern.unit.cc
Expand Down
Loading

5 comments on commit 6cccca9

@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 (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2783 of 2783 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 (mjwitte) - x86_64-MacOS-10.18-clang-15.0.0: OK (2784 of 2784 tests passed, 0 test warnings)

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

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

Build Badge Test Badge

@nrel-bot-2c
Copy link

Choose a reason for hiding this comment

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

develop (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1995 of 1995 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 (mjwitte) - 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.