Skip to content

Commit

Permalink
Apply example method for adding fan heat in sizing PTUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
rraustad committed May 18, 2018
1 parent c025e0b commit 6f32653
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/EnergyPlus/DataSizing.cc
Expand Up @@ -301,6 +301,8 @@ namespace DataSizing {
Real64 DataWaterCoilSizCoolDeltaT(0.0); // used for sizing cooling coil water design flow rate
Real64 DataWaterCoilSizHeatDeltaT(0.0); // used for sizing heating coil water design flow rate
bool DataNomCapInpMeth(false); // True if heating coil is sized by CoilPerfInpMeth == NomCa
int DataFanEnumType(0); // Fan type used during sizing
int DataFanIndex(0); // Fan index used during sizing

// Object Data
Array1D<OARequirementsData> OARequirements;
Expand Down Expand Up @@ -446,6 +448,8 @@ namespace DataSizing {
DataFractionUsedForSizing = 0.0;
DataNonZoneNonAirloopValue = 0.0;
DataZoneNumber = 0;
DataFanEnumType = 0;
DataFanIndex = 0;
NumZoneHVACSizing = 0;
NumAirTerminalSizingSpec = 0;
NumAirTerminalUnits = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/EnergyPlus/DataSizing.hh
Expand Up @@ -301,6 +301,8 @@ namespace DataSizing {
extern Real64 DataWaterCoilSizCoolDeltaT; // used for sizing cooling coil water design flow rate
extern Real64 DataWaterCoilSizHeatDeltaT; // used for sizing heating coil water design flow rate
extern bool DataNomCapInpMeth; // True if heating coil is sized by CoilPerfInpMeth == NomCap
extern int DataFanEnumType; // Fan type used during sizing
extern int DataFanIndex; // Fan index used during sizing

// Types

Expand Down
8 changes: 8 additions & 0 deletions src/EnergyPlus/PackagedTerminalHeatPump.cc
Expand Up @@ -4303,6 +4303,12 @@ namespace PackagedTerminalHeatPump {
CompType = PTUnit(PTUnitNum).UnitType;
CompName = PTUnit(PTUnitNum).Name;
DataZoneNumber = PTUnit(PTUnitNum).ZonePtr;
if (PTUnit(PTUnitNum).FanType_Num == DataHVACGlobals::FanType_SystemModelObject) {
DataFanEnumType = DataAirSystems::objectVectorOOFanSystemModel;
} else {
DataFanEnumType = DataAirSystems::structArrayLegacyFanModels;
}
DataFanIndex = PTUnit(PTUnitNum).FanIndex;

if (CurZoneEqNum > 0) {
if (PTUnit(PTUnitNum).HVACSizingIndex > 0) {
Expand Down Expand Up @@ -5952,6 +5958,8 @@ namespace PackagedTerminalHeatPump {
ZoneEqSizing(CurZoneEqNum).Capacity = false;
ZoneEqSizing(CurZoneEqNum).CoolingCapacity = false;
ZoneEqSizing(CurZoneEqNum).HeatingCapacity = false;
DataFanEnumType = 0;
DataFanIndex = 0;
}
PTUnit(PTUnitNum).FirstPass = false;
}
Expand Down
17 changes: 17 additions & 0 deletions src/EnergyPlus/ReportSizingManager.cc
Expand Up @@ -1612,6 +1612,23 @@ namespace ReportSizingManager {
CoilOutTemp = -999.0;
}
}
if (DataFanEnumType > 0 && DataFanIndex > 0) {
switch (DataFanEnumType) {
case DataAirSystems::structArrayLegacyFanModels: {
FanCoolLoad = FanDesHeatGain(DataFanIndex, DesVolFlow);
break;
}
case DataAirSystems::objectVectorOOFanSystemModel: {
FanCoolLoad = HVACFan::fanObjs[DataFanIndex]->getFanDesignHeatGain(DesVolFlow);
break;
}
case DataAirSystems::fanModelTypeNotYetSet: {
// do nothing
break;
}
} // end switch
}
AutosizeDes += FanCoolLoad;
}
AutosizeDes = AutosizeDes * DataFracOfAutosizedCoolingCapacity;
if (DisplayExtraWarnings && AutosizeDes <= 0.0) {
Expand Down

2 comments on commit 6f32653

@nrel-bot
Copy link

Choose a reason for hiding this comment

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

New-Feature---Account-for-fan-heat-is-zone-cooling-coils (rraustad) - i386-Windows-7-VisualStudio-14: OK (2924 of 2924 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.

New-Feature---Account-for-fan-heat-is-zone-cooling-coils (rraustad) - Win64-Windows-7-VisualStudio-14: OK (2912 of 2924 tests passed, 11 test warnings)

Messages:

  • 11 tests had: AUD diffs.
  • 11 tests had: EIO diffs.
  • 10 tests had: ESO big diffs.
  • 12 tests had: Table big diffs.
  • 3 tests had: ERR diffs.
  • 1 test had: ESO small diffs.
  • 2 tests had: MTR big diffs.

Failures:

regression Test Summary

  • Passed: 611
  • Failed: 12

Build Badge Test Badge

Please sign in to comment.