Skip to content

Commit

Permalink
MRT calc refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Oct 2, 2023
1 parent 7ee07cb commit 4f6f7fe
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/EnergyPlus/HeatBalanceSurfaceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5478,22 +5478,21 @@ void CalculateZoneMRT(EnergyPlusData &state,
}
} else {
for (auto &thisEnclosure : state.dataViewFactor->EnclRadInfo) {
thisEnclosure.sumAET = 0.0;
thisEnclosure.reCalcMRT = true;
}
}
for (int ZoneNum = 1; ZoneNum <= state.dataGlobal->NumOfZones; ++ZoneNum) {
if (present(ZoneToResimulate) && (ZoneNum != ZoneToResimulate)) continue;
Real64 zoneSumAET = 0.0;
for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
auto const &thisSpace = state.dataHeatBal->space(spaceNum);
for (int SurfNum = thisSpace.HTSurfaceFirst; SurfNum <= thisSpace.HTSurfaceLast; ++SurfNum) {
Real64 surfAET = state.dataHeatBalSurfMgr->SurfaceAE(SurfNum) * state.dataHeatBalSurf->SurfTempIn(SurfNum);
zoneSumAET += surfAET;
state.dataViewFactor->EnclRadInfo(state.dataSurface->Surface(SurfNum).RadEnclIndex).sumAET += surfAET;
}
}
if (state.dataHeatBalSurfMgr->ZoneAESum(ZoneNum) > 0.01) {
Real64 zoneSumAET = 0.0;
for (int spaceNum : state.dataHeatBal->Zone(ZoneNum).spaceIndexes) {
auto const &thisSpace = state.dataHeatBal->space(spaceNum);
for (int SurfNum = thisSpace.HTSurfaceFirst; SurfNum <= thisSpace.HTSurfaceLast; ++SurfNum) {
Real64 surfAET = state.dataHeatBalSurfMgr->SurfaceAE(SurfNum) * state.dataHeatBalSurf->SurfTempIn(SurfNum);
zoneSumAET += surfAET;
state.dataViewFactor->EnclRadInfo(state.dataSurface->Surface(SurfNum).RadEnclIndex).sumAET += surfAET;
}
}
state.dataHeatBal->ZoneMRT(ZoneNum) = zoneSumAET / state.dataHeatBalSurfMgr->ZoneAESum(ZoneNum);
} else {
if (state.dataHeatBalSurfMgr->CalculateZoneMRTfirstTime) {
Expand All @@ -5509,6 +5508,11 @@ void CalculateZoneMRT(EnergyPlusData &state,
for (auto &thisEnclosure : state.dataViewFactor->EnclRadInfo) {
if (!thisEnclosure.reCalcMRT) continue;
if (thisEnclosure.sumAE > 0.01) {
thisEnclosure.sumAET = 0.0;
for (int surfNum : thisEnclosure.SurfacePtr) {
Real64 surfAET = state.dataHeatBalSurfMgr->SurfaceAE(surfNum) * state.dataHeatBalSurf->SurfTempIn(surfNum);
thisEnclosure.sumAET += surfAET;
}
thisEnclosure.MRT = thisEnclosure.sumAET / thisEnclosure.sumAE;
} else {
if (state.dataHeatBalSurfMgr->CalculateZoneMRTfirstTime) {
Expand Down

5 comments on commit 4f6f7fe

@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.

9377MRTPart2 (mjwitte) - x86_64-MacOS-10.17-clang-14.0.0: OK (3535 of 3535 tests passed, 752 test warnings)

Messages:\n

  • 752 tests had: AUD diffs.
  • 738 tests had: RDD diffs.
  • 3 tests had: ERR diffs.
  • 26 tests had: EIO diffs.
  • 10 tests had: ESO small diffs.
  • 3 tests had: IDF diffs.

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.

9377MRTPart2 (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2749 of 2749 tests passed, 0 test warnings)

Build Badge Test 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.

9377MRTPart2 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3576 of 3576 tests passed, 756 test warnings)

Messages:\n

  • 756 tests had: AUD diffs.
  • 742 tests had: RDD diffs.
  • 3 tests had: ERR diffs.
  • 26 tests had: EIO diffs.
  • 10 tests had: ESO small diffs.
  • 3 tests had: IDF diffs.

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.

9377MRTPart2 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-Debug: OK (1963 of 1963 tests passed, 0 test warnings)

Build Badge Test Badge Coverage 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.

9377MRTPart2 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-Debug: OK (789 of 789 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.