Skip to content

Commit

Permalink
Space IV.6 - component loads rename reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Sep 25, 2024
1 parent cf45780 commit 227c141
Show file tree
Hide file tree
Showing 7 changed files with 166 additions and 149 deletions.
4 changes: 2 additions & 2 deletions src/EnergyPlus/HeatBalanceSurfaceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6571,7 +6571,7 @@ void ReportSurfaceHeatBalance(EnergyPlusData &state)
if (state.dataGlobal->ZoneSizingCalc && state.dataGlobal->CompLoadReportIsReq) {
// This is by surface, so it works for both space and zone component loads
int TimeStepInDay = (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->NumOfTimeStepInHour + state.dataGlobal->TimeStep;
auto &surfCLDayTS = state.dataOutRptTab->surfCompLoadsDays[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1];
auto &surfCLDayTS = state.dataOutRptTab->surfCompLoads[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1];
for (int zoneNum = 1; zoneNum <= state.dataGlobal->NumOfZones; ++zoneNum) {
for (int spaceNum : state.dataHeatBal->Zone(zoneNum).spaceIndexes) {
auto const &thisSpace = state.dataHeatBal->space(spaceNum);
Expand Down Expand Up @@ -9529,7 +9529,7 @@ void GatherComponentLoadsSurfAbsFact(EnergyPlusData &state)
// This is by surface, so it works for both space and zone component loads
if (state.dataGlobal->CompLoadReportIsReq && !state.dataGlobal->isPulseZoneSizing) {
int TimeStepInDay = (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->NumOfTimeStepInHour + state.dataGlobal->TimeStep;
auto &surfCLDayTS = state.dataOutRptTab->surfCompLoadsDays[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1];
auto &surfCLDayTS = state.dataOutRptTab->surfCompLoads[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1];
for (int jSurf = 1; jSurf <= state.dataSurface->TotSurfaces; ++jSurf) {
auto const &surface = state.dataSurface->Surface(jSurf);
if (!surface.HeatTransSurf || surface.Zone == 0) continue; // Skip non-heat transfer surfaces
Expand Down
8 changes: 5 additions & 3 deletions src/EnergyPlus/InternalHeatGains.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9509,19 +9509,21 @@ namespace InternalHeatGains {
if (state.dataGlobal->CompLoadReportIsReq && !state.dataGlobal->isPulseZoneSizing) {
int TimeStepInDay = (state.dataGlobal->HourOfDay - 1) * state.dataGlobal->NumOfTimeStepInHour + state.dataGlobal->TimeStep;
for (int iZone = 1; iZone <= state.dataGlobal->NumOfZones; ++iZone) {
auto &znCLDayTS = state.dataOutRptTab->znCompLoads[iZone - 1].day[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1];
auto &znCLDayTS = state.dataOutRptTab->znCompLoads[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1].spacezone[iZone - 1];
gatherCompLoadIntGain2(state, znCLDayTS, iZone);
}
if (state.dataHeatBal->doSpaceHeatBalanceSizing) {
for (int iSpace = 1; iSpace <= state.dataGlobal->NumOfZones; ++iSpace) {
auto &spCLDayTS = state.dataOutRptTab->spCompLoads[iSpace - 1].day[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1];
auto &spCLDayTS =
state.dataOutRptTab->spCompLoads[state.dataSize->CurOverallSimDay - 1].ts[TimeStepInDay - 1].spacezone[iSpace - 1];
gatherCompLoadIntGain2(state, spCLDayTS, state.dataHeatBal->space(iSpace).zoneNum, iSpace);
}
}
}
}

void gatherCompLoadIntGain2(EnergyPlusData &state, OutputReportTabular::compLoadsTimeStep &szCompLoadDayTS, int const zoneNum, int const spaceNum)
void
gatherCompLoadIntGain2(EnergyPlusData &state, OutputReportTabular::compLoadsSpaceZone &szCompLoadDayTS, int const zoneNum, int const spaceNum)
{
static constexpr std::array<DataHeatBalance::IntGainType, 1> IntGainTypesPeople = {DataHeatBalance::IntGainType::People};
static constexpr std::array<DataHeatBalance::IntGainType, 1> IntGainTypesLight = {DataHeatBalance::IntGainType::Lights};
Expand Down
6 changes: 4 additions & 2 deletions src/EnergyPlus/InternalHeatGains.hh
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,10 @@ namespace InternalHeatGains {

void GatherComponentLoadsIntGain(EnergyPlusData &state);

void
gatherCompLoadIntGain2(EnergyPlusData &state, OutputReportTabular::compLoadsTimeStep &szCompLoadDayTS, int const zoneNum, int const spaceNum = 0);
void gatherCompLoadIntGain2(EnergyPlusData &state,
OutputReportTabular::compLoadsSpaceZone &szCompLoadDayTS,
int const zoneNum,
int const spaceNum = 0);

} // namespace InternalHeatGains

Expand Down
Loading

4 comments on commit 227c141

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

spaceCompLoads (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2913 of 2913 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.

spaceCompLoads (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2891 of 2891 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.

spaceCompLoads (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (799 of 799 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.

spaceCompLoads (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2097 of 2097 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.