Skip to content

Commit

Permalink
Revert-Use Space conditions - DataSurfaces.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Sep 11, 2023
1 parent 7e58b2e commit a7da5f0
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/EnergyPlus/DataSurfaces.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ Real64 SurfaceData::getInsideAirTemperature(EnergyPlusData &state, const int t_S
Real64 RefAirTemp = 0;

// determine reference air temperature for this surface
auto &thisSpaceHB = state.dataZoneTempPredictorCorrector->spaceHeatBalance(this->spaceNum);
auto &thisZoneHB = state.dataZoneTempPredictorCorrector->zoneHeatBalance(this->Zone);
switch (state.dataSurface->SurfTAirRef(t_SurfNum)) {
case RefAirTemp::ZoneMeanAirTemp: {
RefAirTemp = thisSpaceHB.MAT;
RefAirTemp = thisZoneHB.MAT;
} break;
case RefAirTemp::AdjacentAirTemp: {
RefAirTemp = state.dataHeatBal->SurfTempEffBulkAir(t_SurfNum);
Expand All @@ -248,25 +248,24 @@ Real64 SurfaceData::getInsideAirTemperature(EnergyPlusData &state, const int t_S
// determine supply air conditions
Real64 SumSysMCp = 0;
Real64 SumSysMCpT = 0;
auto &inletNodes = (state.dataHeatBal->doSpaceHeatBalance) ? state.dataZoneEquip->spaceEquipConfig(this->spaceNum).InletNode
: state.dataZoneEquip->ZoneEquipConfig(Zone).InletNode;
for (int nodeNum : inletNodes) {
auto &inNode = state.dataLoopNodes->Node(state.dataZoneEquip->ZoneEquipConfig(Zone).InletNode(nodeNum));
Real64 CpAir = PsyCpAirFnW(thisSpaceHB.airHumRat);
SumSysMCp += inNode.MassFlowRate * CpAir;
SumSysMCpT += inNode.MassFlowRate * CpAir * inNode.Temp;
for (int NodeNum = 1; NodeNum <= state.dataZoneEquip->ZoneEquipConfig(Zone).NumInletNodes; ++NodeNum) {
Real64 NodeTemp = state.dataLoopNodes->Node(state.dataZoneEquip->ZoneEquipConfig(Zone).InletNode(NodeNum)).Temp;
Real64 MassFlowRate = state.dataLoopNodes->Node(state.dataZoneEquip->ZoneEquipConfig(Zone).InletNode(NodeNum)).MassFlowRate;
Real64 CpAir = PsyCpAirFnW(thisZoneHB.airHumRat);
SumSysMCp += MassFlowRate * CpAir;
SumSysMCpT += MassFlowRate * CpAir * NodeTemp;
}
// a weighted average of the inlet temperatures.
if (SumSysMCp > 0.0) {
// a weighted average of the inlet temperatures.
RefAirTemp = SumSysMCpT / SumSysMCp;
} else {
RefAirTemp = thisSpaceHB.MAT;
RefAirTemp = thisZoneHB.MAT;
}
} break;
default: {
// currently set to mean air temp but should add error warning here
RefAirTemp = thisSpaceHB.MAT;
RefAirTemp = thisZoneHB.MAT;
} break;
}

Expand Down

5 comments on commit a7da5f0

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

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

SpaceSizingHVACPart3 (mjwitte) - x86_64-MacOS-10.17-clang-14.0.0: OK (3502 of 3503 tests passed, 6 test warnings)

Messages:\n

  • 2 tests had: EIO diffs.
  • 6 tests had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: Table small diffs.
  • 1 test had: ERR diffs.
  • 1 test had: ESO big diffs.
  • 1 test had: MTR big diffs.
  • 1 test had: SSZ big diffs.
  • 1 test had: ZSZ big diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 783
  • Failed: 1

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.

SpaceSizingHVACPart3 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (3543 of 3544 tests passed, 7 test warnings)

Messages:\n

  • 2 tests had: EIO diffs.
  • 6 tests had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 2 tests had: Table small diffs.
  • 1 test had: ERR diffs.
  • 1 test had: ESO big diffs.
  • 1 test had: MTR big diffs.
  • 1 test had: SSZ big diffs.
  • 1 test had: ZSZ big diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 803
  • Failed: 1

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.

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

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

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

Build Badge Test Badge Coverage Badge

Please sign in to comment.