Skip to content

Commit

Permalink
Set ZoneEqSizing.OAFlow before coils size.
Browse files Browse the repository at this point in the history
  • Loading branch information
rraustad committed Jun 22, 2018
1 parent 6df2e42 commit 2752ebf
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 7 deletions.
19 changes: 13 additions & 6 deletions src/EnergyPlus/FanCoilUnits.cc
Expand Up @@ -1437,8 +1437,18 @@ namespace FanCoilUnits {
DataZoneNumber = FanCoil(FanCoilNum).ZonePtr;

if (CurZoneEqNum > 0) {
if (FanCoil(FanCoilNum).ATMixerExists) { // set up ATMixer conditions for use in component sizing
ZoneEqSizing(CurZoneEqNum).OAVolFlow = 0.0; // Equipment OA flow should always be 0 when ATMixer is used
SingleDuct::setATMixerSizingProperties(FanCoil(FanCoilNum).ATMixerIndex, ControlledZoneNum, CurZoneEqNum);
}
if (FanCoil(FanCoilNum).HVACSizingIndex > 0) {

// initialize OA flow for sizing other inputs (e.g., inlet temp, capacity, etc.)
if (FanCoil(FanCoilNum).OutAirVolFlow == AutoSize) {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FinalZoneSizing(CurZoneEqNum).MinOA;
} else {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FanCoil(FanCoilNum).OutAirVolFlow;
}

zoneHVACIndex = FanCoil(FanCoilNum).HVACSizingIndex;
FieldNum = 1;
PrintFlag = true;
Expand Down Expand Up @@ -1674,11 +1684,8 @@ namespace FanCoilUnits {
}
}
}
if (FanCoil(FanCoilNum).ATMixerExists) { // set up ATMixer conditions for use in component sizing
ZoneEqSizing(CurZoneEqNum).OAVolFlow = 0.0; // Equipment OA flow should always be 0 when ATMixer is used
SingleDuct::setATMixerSizingProperties(FanCoil(FanCoilNum).ATMixerIndex, ControlledZoneNum, CurZoneEqNum);
}
}
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FanCoil(FanCoilNum).OutAirVolFlow; // sets OA frac in sizing
}

if (FanCoil(FanCoilNum).HCoilType_Num == HCoil_Water) {
Expand Down Expand Up @@ -2055,7 +2062,7 @@ namespace FanCoilUnits {
if (CurZoneEqNum > 0) {
ZoneEqSizing(CurZoneEqNum).MaxHWVolFlow = FanCoil(FanCoilNum).MaxHotWaterVolFlow;
ZoneEqSizing(CurZoneEqNum).MaxCWVolFlow = FanCoil(FanCoilNum).MaxColdWaterVolFlow;
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FanCoil(FanCoilNum).OutAirVolFlow;
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FanCoil(FanCoilNum).OutAirVolFlow; // sets OA frac in sizing
ZoneEqSizing(CurZoneEqNum).AirVolFlow = FanCoil(FanCoilNum).MaxAirVolFlow;
ZoneEqSizing(CurZoneEqNum).DesCoolingLoad = FanCoil(FanCoilNum).DesCoolingLoad;
ZoneEqSizing(CurZoneEqNum).DesHeatingLoad = FanCoil(FanCoilNum).DesHeatingLoad;
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/HVACUnitarySystem.cc
Expand Up @@ -2166,6 +2166,8 @@ namespace HVACUnitarySystem {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = 0.0; // Equipment OA flow should always be 0 when ATMixer is used
SingleDuct::setATMixerSizingProperties(
UnitarySystem(UnitarySysNum).ATMixerIndex, UnitarySystem(UnitarySysNum).ControlZoneNum, CurZoneEqNum);
} else {

}
} else {
assert(false);
Expand Down
11 changes: 11 additions & 0 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Expand Up @@ -6220,6 +6220,16 @@ namespace HVACVariableRefrigerantFlow {
SingleDuct::setATMixerSizingProperties(VRFTU(VRFTUNum).ATMixerIndex, VRFTU(VRFTUNum).ZoneNum, CurZoneEqNum);
}
if (VRFTU(VRFTUNum).HVACSizingIndex > 0) {
// initialize OA flow for sizing other inputs (e.g., capacity)
if (VRFTU(VRFTUNum).CoolOutAirVolFlow == AutoSize) {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FinalZoneSizing(CurZoneEqNum).MinOA;
} else {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = VRFTU(VRFTUNum).CoolOutAirVolFlow;
}
if (VRFTU(VRFTUNum).HeatOutAirVolFlow != AutoSize) {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = max(ZoneEqSizing(CurZoneEqNum).OAVolFlow, VRFTU(VRFTUNum).HeatOutAirVolFlow);
}

zoneHVACIndex = VRFTU(VRFTUNum).HVACSizingIndex;

SizingMethod = CoolingAirflowSizing;
Expand Down Expand Up @@ -6567,6 +6577,7 @@ namespace HVACVariableRefrigerantFlow {
}
}
}
ZoneEqSizing(CurZoneEqNum).OAVolFlow = max(VRFTU(VRFTUNum).CoolOutAirVolFlow, VRFTU(VRFTUNum).HeatOutAirVolFlow);

IsAutoSize = false;
if (VRFTU(VRFTUNum).NoCoolHeatOutAirVolFlow == AutoSize) {
Expand Down
21 changes: 21 additions & 0 deletions src/EnergyPlus/PackagedTerminalHeatPump.cc
Expand Up @@ -4853,6 +4853,16 @@ namespace PackagedTerminalHeatPump {
SingleDuct::setATMixerSizingProperties(PTUnit(PTUnitNum).ATMixerIndex, PTUnit(PTUnitNum).ControlZoneNum, CurZoneEqNum);
}
if (PTUnit(PTUnitNum).HVACSizingIndex > 0) {
// initialize OA flow for sizing other inputs (e.g., capacity)
if (PTUnit(PTUnitNum).CoolOutAirVolFlow == AutoSize) {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FinalZoneSizing(CurZoneEqNum).MinOA;
} else {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = PTUnit(PTUnitNum).CoolOutAirVolFlow;
}
if (PTUnit(PTUnitNum).HeatOutAirVolFlow != AutoSize) {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = max(ZoneEqSizing(CurZoneEqNum).OAVolFlow, PTUnit(PTUnitNum).HeatOutAirVolFlow);
}

zoneHVACIndex = PTUnit(PTUnitNum).HVACSizingIndex;
SizingMethod = CoolingAirflowSizing;
FieldNum = 1; // N1, \field Supply Air Flow Rate During Cooling Operation
Expand Down Expand Up @@ -5027,6 +5037,17 @@ namespace PackagedTerminalHeatPump {
} else {
// no scalable sizing method has been specified. Sizing proceeds using the method
// specified in the zoneHVAC object

// initialize OA flow for sizing other inputs (e.g., capacity)
if (PTUnit(PTUnitNum).CoolOutAirVolFlow == AutoSize) {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FinalZoneSizing(CurZoneEqNum).MinOA;
} else {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = PTUnit(PTUnitNum).CoolOutAirVolFlow;
}
if (PTUnit(PTUnitNum).HeatOutAirVolFlow != AutoSize) {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = max(ZoneEqSizing(CurZoneEqNum).OAVolFlow, PTUnit(PTUnitNum).HeatOutAirVolFlow);
}

PrintFlag = false;
SizingMethod = CoolingAirflowSizing;
FieldNum = 1; // N1, \field Supply Air Flow Rate During Cooling Operation
Expand Down
8 changes: 7 additions & 1 deletion src/EnergyPlus/ReportSizingManager.cc
Expand Up @@ -1568,6 +1568,7 @@ namespace ReportSizingManager {
CoilInHumRat = FinalZoneSizing(CurZoneEqNum).ZoneHumRatAtCoolPeak;
}
} else if (ZoneEqFanCoil) {
// use fan coil flow (i.e., set by parent) or flow used during sizing?
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesCoolMassFlow;
CoilInTemp = setCoolCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
CoilInHumRat = setCoolCoilInletHumRatForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
Expand Down Expand Up @@ -1666,7 +1667,12 @@ namespace ReportSizingManager {
(TermUnitFinalZoneSizing(CurTermUnitSizingNum).ZoneTempAtHeatPeak * (1.0 - MinPriFlowFrac));
}
} else if (ZoneEqFanCoil) {
DesMassFlow = DesVolFlow * StdRhoAir;
// use fan coil flow (i.e., set by parent) or flow used during sizing?
if (DesVolFlow > 0.0) {
DesMassFlow = DesVolFlow * StdRhoAir;
} else {
DesMassFlow = FinalZoneSizing(CurZoneEqNum).DesHeatMassFlow;
}
CoilInTemp = setHeatCoilInletTempForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
CoilInHumRat = setHeatCoilInletHumRatForZoneEqSizing(setOAFracForZoneEqSizing(DesMassFlow));
} else if (TermUnitIU && (CurTermUnitSizingNum > 0)) {
Expand Down
9 changes: 9 additions & 0 deletions src/EnergyPlus/UnitVentilator.cc
Expand Up @@ -1729,6 +1729,14 @@ namespace UnitVentilator {
SingleDuct::setATMixerSizingProperties(UnitVent(UnitVentNum).ATMixerIndex, UnitVent(UnitVentNum).ZonePtr, CurZoneEqNum);
}
if (UnitVent(UnitVentNum).HVACSizingIndex > 0) {

// initialize OA flow for sizing other inputs (e.g., inlet temp, capacity, etc.)
if (UnitVent(UnitVentNum).OutAirVolFlow == AutoSize) {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = FinalZoneSizing(CurZoneEqNum).MinOA;
} else {
ZoneEqSizing(CurZoneEqNum).OAVolFlow = UnitVent(UnitVentNum).OutAirVolFlow;
}

zoneHVACIndex = UnitVent(UnitVentNum).HVACSizingIndex;
// N1 , \field Maximum Supply Air Flow Rate
FieldNum = 1;
Expand Down Expand Up @@ -2000,6 +2008,7 @@ namespace UnitVentilator {
}
}
}
ZoneEqSizing(CurZoneEqNum).OAVolFlow = UnitVent(UnitVentNum).OutAirVolFlow;
}

IsAutoSize = false;
Expand Down

8 comments on commit 2752ebf

@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 (2916 of 2932 tests passed, 18 test warnings)

Messages:

  • 8 tests had: AUD diffs.
  • 26 tests had: EIO diffs.
  • 12 tests had: ESO small diffs.
  • 8 tests had: MTR small diffs.
  • 9 tests had: Table small diffs.
  • 14 tests had: ESO big diffs.
  • 15 tests had: Table big diffs.
  • 4 tests had: ERR diffs.
  • 9 tests had: MTR big diffs.

Failures:

regression Test Summary

  • Passed: 607
  • Failed: 16

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 (2956 of 2972 tests passed, 21 test warnings)

Messages:

  • 11 tests had: AUD diffs.
  • 26 tests had: EIO diffs.
  • 12 tests had: ESO small diffs.
  • 8 tests had: MTR small diffs.
  • 9 tests had: Table small diffs.
  • 7 tests had: ERR diffs.
  • 14 tests had: ESO big diffs.
  • 15 tests had: Table big diffs.
  • 9 tests had: MTR big diffs.

Failures:

regression Test Summary

  • Passed: 627
  • Failed: 16

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
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 (2916 of 2932 tests passed, 21 test warnings)

Messages:

  • 11 tests had: AUD diffs.
  • 26 tests had: EIO diffs.
  • 12 tests had: ESO small diffs.
  • 8 tests had: MTR small diffs.
  • 9 tests had: Table small diffs.
  • 6 tests had: ERR diffs.
  • 14 tests had: ESO big diffs.
  • 15 tests had: Table big diffs.
  • 9 tests had: MTR big diffs.

Failures:

regression Test Summary

  • Passed: 607
  • Failed: 16

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-UnitTestsCoverage-Debug: OK (1684 of 1684 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-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.