Skip to content

Commit

Permalink
Clean up commented lines for final pass, revert zone temp for zone re…
Browse files Browse the repository at this point in the history
…turn temp to check diffs.
  • Loading branch information
rraustad committed Jun 22, 2018
1 parent e124fef commit 6df2e42
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 93 deletions.
104 changes: 13 additions & 91 deletions src/EnergyPlus/ReportSizingManager.cc
Expand Up @@ -1334,14 +1334,6 @@ namespace ReportSizingManager {
} else {
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesHeatMassFlow;
}
// if (DesMassFlow > 0.0) {
// OutAirFrac = min(StdRhoAir * ZoneEqSizing(CurZoneEqNum).OAVolFlow / DesMassFlow, 1.0);
// } else {
// OutAirFrac = 0.0;
// }
// CoilInTemp = (1.0 - OutAirFrac) * FinalZoneSizing(CurZoneEqNum).ZoneTempAtHeatPeak +
// OutAirFrac * FinalZoneSizing(CurZoneEqNum).OutTempAtHeatPeak;
// this will change above CoilInTemp equation to use ZoneRetTempAtHeatPeak which accounts for lights to return fraction
CoilInTemp = setHeatCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
CoilOutTemp = FinalZoneSizing(CurZoneEqNum).HeatDesTemp;
CoilOutHumRat = FinalZoneSizing(CurZoneEqNum).HeatDesHumRat;
Expand Down Expand Up @@ -1378,14 +1370,6 @@ namespace ReportSizingManager {
} else {
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesHeatMassFlow;
}
// if (DesMassFlow > 0.0) {
// OutAirFrac = min(StdRhoAir * ZoneEqSizing(CurZoneEqNum).OAVolFlow / DesMassFlow, 1.0);
// } else {
// OutAirFrac = 0.0;
// }
// AutosizeDes = OutAirFrac * FinalZoneSizing(CurZoneEqNum).OutTempAtHeatPeak +
// (1.0 - OutAirFrac) * FinalZoneSizing(CurZoneEqNum).ZoneTempAtHeatPeak;
// this will change above CoilInTemp equation to use ZoneRetTempAtHeatPeak which accounts for lights to return fraction
AutosizeDes = setHeatCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
}
bCheckForZero = false;
Expand All @@ -1406,29 +1390,13 @@ namespace ReportSizingManager {
} else {
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesHeatMassFlow;
}
// if (DesMassFlow > 0.0) {
// OutAirFrac = min(StdRhoAir * ZoneEqSizing(CurZoneEqNum).OAVolFlow / DesMassFlow, 1.0);
// } else {
// OutAirFrac = 0.0;
// }
// AutosizeDes = OutAirFrac * FinalZoneSizing(CurZoneEqNum).OutHumRatAtHeatPeak +
// (1.0 - OutAirFrac) * FinalZoneSizing(CurZoneEqNum).ZoneHumRatAtHeatPeak;
AutosizeDes = setHeatCoilInletHumRatForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
}
bCheckForZero = false;
} else if (SizingType == CoolingWaterDesAirInletTempSizing) {
if (TermUnitIU) {
AutosizeDes = FinalZoneSizing(CurZoneEqNum).ZoneTempAtCoolPeak;
} else if (ZoneEqFanCoil) {
// if (FinalZoneSizing(CurZoneEqNum).DesCoolMassFlow > 0.0) {
// OutAirFrac = min(StdRhoAir * ZoneEqSizing(CurZoneEqNum).OAVolFlow /
// FinalZoneSizing(CurZoneEqNum).DesCoolMassFlow, 1.0);
// } else {
// OutAirFrac = 0.0;
// }
// AutosizeDes = OutAirFrac * FinalZoneSizing(CurZoneEqNum).OutTempAtCoolPeak +
// (1.0 - OutAirFrac) * FinalZoneSizing(CurZoneEqNum).ZoneTempAtCoolPeak;
// setCoolingOAFracAndInletTempForZoneEq(OutAirFrac, AutosizeDes, FinalZoneSizing(CurZoneEqNum).DesCoolMassFlow);
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesCoolMassFlow;
AutosizeDes = setCoolCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
} else {
Expand Down Expand Up @@ -1473,14 +1441,6 @@ namespace ReportSizingManager {
if (TermUnitIU) {
AutosizeDes = FinalZoneSizing(CurZoneEqNum).ZoneHumRatAtCoolPeak;
} else if (ZoneEqFanCoil) {
// if (FinalZoneSizing(CurZoneEqNum).DesCoolMassFlow > 0.0) {
// OutAirFrac = min(StdRhoAir * ZoneEqSizing(CurZoneEqNum).OAVolFlow /
// FinalZoneSizing(CurZoneEqNum).DesCoolMassFlow, 1.0);
// } else {
// OutAirFrac = 0.0;
// }
// AutosizeDes = OutAirFrac * FinalZoneSizing(CurZoneEqNum).OutHumRatAtCoolPeak +
// (1.0 - OutAirFrac) * FinalZoneSizing(CurZoneEqNum).ZoneHumRatAtCoolPeak;
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesCoolMassFlow;
AutosizeDes = setCoolCoilInletHumRatForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
} else {
Expand Down Expand Up @@ -1592,39 +1552,22 @@ namespace ReportSizingManager {
} else {
DesVolFlow = DataFlowUsedForSizing;
if (DesVolFlow >= SmallAirVolFlow) {
if (ZoneEqDXCoil) { // each of these IFs now seem the same and can be condensed to just CoilInTemp = set() and
// CoilInHumRat = set()
if (ZoneEqSizing(CurZoneEqNum).OAVolFlow > 0.0) {
CoilInTemp = FinalZoneSizing(CurZoneEqNum).DesCoolCoilInTemp;
CoilInHumRat = FinalZoneSizing(CurZoneEqNum).DesCoolCoilInHumRat;
} else if (ZoneEqSizing(CurZoneEqNum).ATMixerVolFlow > 0.0) { // NEW ATMixer coil sizing method
// OutAirFrac = min(ZoneEqSizing(CurZoneEqNum).ATMixerVolFlow /
// DesVolFlow, 1.0); CoilInTemp = (1.0 - OutAirFrac) *
// FinalZoneSizing(CurZoneEqNum).ZoneRetTempAtCoolPeak +
// OutAirFrac *
// ZoneEqSizing(CurZoneEqNum).ATMixerCoolPriDryBulb;
// CoilInHumRat = (1.0 - OutAirFrac) *
// FinalZoneSizing(CurZoneEqNum).ZoneHumRatAtCoolPeak +
// OutAirFrac *
// ZoneEqSizing(CurZoneEqNum).ATMixerCoolPriHumRat;
// each of these IFs now seem the same and can be condensed to just CoilInTemp = set() and CoilInHumRat = set()
if (ZoneEqDXCoil) {
// ATMixer has priority over Equipment OA vol flow
if (ZoneEqSizing(CurZoneEqNum).ATMixerVolFlow > 0.0) { // NEW ATMixer coil sizing method
DesMassFlow = DesVolFlow * StdRhoAir;
CoilInTemp = setCoolCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
CoilInHumRat = setCoolCoilInletHumRatForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
} else if (ZoneEqSizing(CurZoneEqNum).OAVolFlow > 0.0) {
CoilInTemp = FinalZoneSizing(CurZoneEqNum).DesCoolCoilInTemp;
CoilInHumRat = FinalZoneSizing(CurZoneEqNum).DesCoolCoilInHumRat;
} else {
CoilInTemp = FinalZoneSizing(CurZoneEqNum)
.ZoneRetTempAtCoolPeak; // Question whether zone equipment should use return temp for sizing
CoilInHumRat = FinalZoneSizing(CurZoneEqNum).ZoneHumRatAtCoolPeak;
}
} else if (ZoneEqFanCoil) {
// DesOAFlowFrac = FinalZoneSizing(CurZoneEqNum).DesCoolOAFlowFrac;
// CoilInTemp = DesOAFlowFrac * FinalZoneSizing(CurZoneEqNum).OutTempAtCoolPeak
// +
// (1.0 - DesOAFlowFrac) *
// FinalZoneSizing(CurZoneEqNum).ZoneTempAtCoolPeak;
// CoilInHumRat = DesOAFlowFrac *
// FinalZoneSizing(CurZoneEqNum).OutHumRatAtCoolPeak +
// (1.0 - DesOAFlowFrac) *
// FinalZoneSizing(CurZoneEqNum).ZoneHumRatAtCoolPeak;
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesCoolMassFlow;
CoilInTemp = setCoolCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
CoilInHumRat = setCoolCoilInletHumRatForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
Expand Down Expand Up @@ -1723,11 +1666,7 @@ namespace ReportSizingManager {
(TermUnitFinalZoneSizing(CurTermUnitSizingNum).ZoneTempAtHeatPeak * (1.0 - MinPriFlowFrac));
}
} else if (ZoneEqFanCoil) {
// DesOAFlowFrac = FinalZoneSizing(CurZoneEqNum).DesHeatOAFlowFrac;
// CoilInTemp = DesOAFlowFrac * FinalZoneSizing(CurZoneEqNum).OutTempAtHeatPeak +
// (1.0 - DesOAFlowFrac) * FinalZoneSizing(CurZoneEqNum).ZoneTempAtHeatPeak;
DesMassFlow = DesVolFlow * StdRhoAir;
// this will change above CoilInTemp equation to use ZoneRetTempAtHeatPeak which accounts for lights to return fraction
CoilInTemp = setHeatCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
CoilInHumRat = setHeatCoilInletHumRatForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
} else if (TermUnitIU && (CurTermUnitSizingNum > 0)) {
Expand Down Expand Up @@ -1822,14 +1761,6 @@ namespace ReportSizingManager {
} else {
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesHeatMassFlow;
}
// if (DesMassFlow > 0.0) {
// OutAirFrac = min(StdRhoAir * ZoneEqSizing(CurZoneEqNum).OAVolFlow / DesMassFlow, 1.0);
// } else {
// OutAirFrac = 0.0;
// }
// CoilInTemp = (1.0 - OutAirFrac) * FinalZoneSizing(CurZoneEqNum).ZoneTempAtHeatPeak +
// OutAirFrac * FinalZoneSizing(CurZoneEqNum).OutTempAtHeatPeak;
// this will change above CoilInTemp equation to use ZoneRetTempAtHeatPeak which accounts for lights to return fraction
CoilInTemp = setHeatCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
CoilOutTemp = FinalZoneSizing(CurZoneEqNum).HeatDesTemp;
CoilOutHumRat = FinalZoneSizing(CurZoneEqNum).HeatDesHumRat;
Expand Down Expand Up @@ -1897,16 +1828,6 @@ namespace ReportSizingManager {
} else {
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesHeatMassFlow;
}
// if (DesMassFlow > 0.0) {
// OutAirFrac = min(StdRhoAir * ZoneEqSizing(CurZoneEqNum).OAVolFlow / DesMassFlow, 1.0);
// } else {
// OutAirFrac = 0.0;
// }
// CoilInTemp = (1.0 - OutAirFrac) * FinalZoneSizing(CurZoneEqNum).ZoneTempAtHeatPeak +
// OutAirFrac * FinalZoneSizing(CurZoneEqNum).OutTempAtHeatPeak;
// CoilInHumRat = (1.0 - OutAirFrac) * FinalZoneSizing(CurZoneEqNum).ZoneHumRatAtHeatPeak +
// OutAirFrac * FinalZoneSizing(CurZoneEqNum).OutHumRatAtHeatPeak;
// this will change above CoilInTemp equation to use ZoneRetTempAtHeatPeak which accounts for lights to return fraction
CoilInTemp = setHeatCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
CoilInHumRat = setHeatCoilInletHumRatForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
CoilOutTemp = FinalZoneSizing(CurZoneEqNum).HeatDesTemp;
Expand Down Expand Up @@ -3645,8 +3566,9 @@ namespace ReportSizingManager {
coilInTemp = (1.0 - outAirFrac) * DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneTempAtHeatPeak +
outAirFrac * DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).OutTempAtHeatPeak;
} else {
// coilInTemp = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneRetTempAtHeatPeak;
coilInTemp = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneTempAtHeatPeak;
// default to one or the other of these choices
coilInTemp = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneRetTempAtHeatPeak;
// coilInTemp = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneTempAtHeatPeak;
}
return coilInTemp;
}
Expand Down Expand Up @@ -3679,9 +3601,9 @@ namespace ReportSizingManager {
coilInTemp = (1.0 - outAirFrac) * DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneTempAtCoolPeak +
outAirFrac * DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).OutTempAtCoolPeak;
} else {
// I believe this next calculation should use zone return temp to account for lighting to return
// coilInTemp = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneRetTempAtCoolPeak;
coilInTemp = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneTempAtCoolPeak;
// default to one or the other of these choices
coilInTemp = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneRetTempAtCoolPeak;
// coilInTemp = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneTempAtCoolPeak;
}
return coilInTemp;
}
Expand Down
4 changes: 2 additions & 2 deletions tst/EnergyPlus/unit/ReportSizingManager.unit.cc
Expand Up @@ -633,7 +633,7 @@ TEST_F(EnergyPlusFixture, setZoneCoilInletConditions)
// ATMixer flow rate = 0 and ZoneEqSizing.OAVolFlow = 0 so coilInlet condition = zone condition
DataSizing::ZoneEqSizing(DataSizing::CurZoneEqNum).ATMixerVolFlow = 0.0;
DataSizing::ZoneEqSizing(DataSizing::CurZoneEqNum).OAVolFlow = 0.0;
Real64 zoneCond = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneTempAtHeatPeak;
Real64 zoneCond = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneRetTempAtHeatPeak;
Real64 calcCoilInletCond = zoneCond;
Real64 coilInletCond = setHeatCoilInletTempForZoneEqSizing(oaFrac);
EXPECT_EQ(coilInletCond, calcCoilInletCond);
Expand Down Expand Up @@ -705,7 +705,7 @@ TEST_F(EnergyPlusFixture, setZoneCoilInletConditions)
// ATMixer flow rate = 0 and ZoneEqSizing.OAVolFlow = 0 so coilInlet condition = zone condition
DataSizing::ZoneEqSizing(DataSizing::CurZoneEqNum).ATMixerVolFlow = 0.0;
DataSizing::ZoneEqSizing(DataSizing::CurZoneEqNum).OAVolFlow = 0.0;
zoneCond = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneTempAtCoolPeak;
zoneCond = DataSizing::FinalZoneSizing(DataSizing::CurZoneEqNum).ZoneRetTempAtCoolPeak;
calcCoilInletCond = zoneCond;
coilInletCond = setCoolCoilInletTempForZoneEqSizing(oaFrac);
EXPECT_EQ(coilInletCond, calcCoilInletCond);
Expand Down

8 comments on commit 6df2e42

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - i386-Windows-7-VisualStudio-14: OK (2932 of 2932 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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-MacOS-10.9-clang: OK (2917 of 2932 tests passed, 18 test warnings)

Messages:

  • 8 tests had: AUD diffs.
  • 24 tests had: EIO diffs.
  • 11 tests had: ESO small diffs.
  • 8 tests had: MTR small diffs.
  • 9 tests had: Table small diffs.
  • 13 tests had: ESO big diffs.
  • 13 tests had: Table big diffs.
  • 5 tests had: ERR diffs.
  • 7 tests had: MTR big diffs.

Failures:

regression Test Summary

  • Passed: 608
  • Failed: 15

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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (2957 of 2972 tests passed, 20 test warnings)

Messages:

  • 11 tests had: AUD diffs.
  • 24 tests had: EIO diffs.
  • 11 tests had: ESO small diffs.
  • 8 tests had: MTR small diffs.
  • 9 tests had: Table small diffs.
  • 7 tests had: ERR diffs.
  • 13 tests had: ESO big diffs.
  • 13 tests had: Table big diffs.
  • 7 tests had: MTR big diffs.

Failures:

regression Test Summary

  • Passed: 628
  • Failed: 15

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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed, 0 test warnings)

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

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-UnitTestsCoverage-Debug: OK (1684 of 1684 tests passed, 0 test warnings)

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

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - Win64-Windows-7-VisualStudio-14: OK (2917 of 2932 tests passed, 20 test warnings)

Messages:

  • 11 tests had: AUD diffs.
  • 24 tests had: EIO diffs.
  • 11 tests had: ESO small diffs.
  • 8 tests had: MTR small diffs.
  • 9 tests had: Table small diffs.
  • 6 tests had: ERR diffs.
  • 13 tests had: ESO big diffs.
  • 13 tests had: Table big diffs.
  • 7 tests had: MTR big diffs.

Failures:

regression Test Summary

  • Passed: 608
  • Failed: 15

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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (2312 of 2312 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.

#6712-Zone-Coil-Autosizing-does-not-include-impact-of-AirTerminalSingleDuctMixer (rraustad) - x86_64-Linux-Ubuntu-14.04-custom_check: OK (0 of 0 tests passed, 0 test warnings)

Build Badge

Please sign in to comment.