Skip to content

Commit

Permalink
Fix #8328 - Calculate CompOnFlowRatio so that the Fan:OnOff FanSpeedR…
Browse files Browse the repository at this point in the history
…atio can be calculated
  • Loading branch information
jmarrec committed Dec 1, 2020
1 parent b62881b commit dbb3e70
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
8 changes: 8 additions & 0 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6448,6 +6448,8 @@ namespace HVACVariableRefrigerantFlow {
if (VRFTU(VRFTUNum).ActualFanVolFlowRate > 0.0) {
VRFTU(VRFTUNum).HeatingSpeedRatio = VRFTU(VRFTUNum).MaxHeatAirVolFlow / VRFTU(VRFTUNum).ActualFanVolFlowRate;
VRFTU(VRFTUNum).CoolingSpeedRatio = VRFTU(VRFTUNum).MaxCoolAirVolFlow / VRFTU(VRFTUNum).ActualFanVolFlowRate;
VRFTU(VRFTUNum).NoHeatingSpeedRatio = VRFTU(VRFTUNum).MaxNoHeatAirVolFlow / VRFTU(VRFTUNum).ActualFanVolFlowRate;
VRFTU(VRFTUNum).NoCoolingSpeedRatio = VRFTU(VRFTUNum).MaxNoCoolAirVolFlow / VRFTU(VRFTUNum).ActualFanVolFlowRate;
}

MyVRFFlag(VRFTUNum) = false;
Expand Down Expand Up @@ -7070,31 +7072,37 @@ namespace HVACVariableRefrigerantFlow {
CompOffMassFlow = VRFTU(VRFTUNum).MaxNoCoolAirMassFlow;
OACompOnMassFlow = VRFTU(VRFTUNum).CoolOutAirMassFlow;
OACompOffMassFlow = VRFTU(VRFTUNum).NoCoolHeatOutAirMassFlow;
CompOnFlowRatio = VRFTU(VRFTUNum).CoolingSpeedRatio;
} else if (TerminalUnitList(TUListIndex).HRHeatRequest(IndexToTUInTUList)) {
CompOnMassFlow = VRFTU(VRFTUNum).MaxHeatAirMassFlow;
CompOffMassFlow = VRFTU(VRFTUNum).MaxNoHeatAirMassFlow;
OACompOnMassFlow = VRFTU(VRFTUNum).HeatOutAirMassFlow;
OACompOffMassFlow = VRFTU(VRFTUNum).NoCoolHeatOutAirMassFlow;
CompOnFlowRatio = VRFTU(VRFTUNum).HeatingSpeedRatio;
} else if (CoolingLoad(VRFCond) && QZnReq != 0.0) {
CompOnMassFlow = VRFTU(VRFTUNum).MaxCoolAirMassFlow;
CompOffMassFlow = VRFTU(VRFTUNum).MaxNoCoolAirMassFlow;
OACompOnMassFlow = VRFTU(VRFTUNum).CoolOutAirMassFlow;
OACompOffMassFlow = VRFTU(VRFTUNum).NoCoolHeatOutAirMassFlow;
CompOnFlowRatio = VRFTU(VRFTUNum).CoolingSpeedRatio;
} else if (HeatingLoad(VRFCond) && QZnReq != 0.0) {
CompOnMassFlow = VRFTU(VRFTUNum).MaxHeatAirMassFlow;
CompOffMassFlow = VRFTU(VRFTUNum).MaxNoHeatAirMassFlow;
OACompOnMassFlow = VRFTU(VRFTUNum).HeatOutAirMassFlow;
OACompOffMassFlow = VRFTU(VRFTUNum).NoCoolHeatOutAirMassFlow;
CompOnFlowRatio = VRFTU(VRFTUNum).HeatingSpeedRatio;
} else {
if (LastModeCooling(VRFCond)) {
CompOnMassFlow = VRFTU(VRFTUNum).MaxNoCoolAirMassFlow;
CompOffMassFlow = VRFTU(VRFTUNum).MaxNoCoolAirMassFlow;
OACompOnMassFlow = VRFTU(VRFTUNum).CoolOutAirMassFlow;
CompOnFlowRatio = VRFTU(VRFTUNum).NoCoolingSpeedRatio;
}
if (LastModeHeating(VRFCond)) {
CompOnMassFlow = VRFTU(VRFTUNum).MaxNoHeatAirMassFlow;
CompOffMassFlow = VRFTU(VRFTUNum).MaxNoHeatAirMassFlow;
OACompOnMassFlow = VRFTU(VRFTUNum).HeatOutAirMassFlow;
CompOnFlowRatio = VRFTU(VRFTUNum).NoHeatingSpeedRatio;
}
OACompOffMassFlow = VRFTU(VRFTUNum).NoCoolHeatOutAirMassFlow;
}
Expand Down
30 changes: 16 additions & 14 deletions src/EnergyPlus/HVACVariableRefrigerantFlow.hh
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,10 @@ namespace HVACVariableRefrigerantFlow {
Real64 ParasiticElec; // parasitic electric for VRF terminal unit
Real64 ParasiticOffElec; // parasitic electric for VRF terminal unit when off
Real64 HeatingSpeedRatio; // Fan speed ratio in heating mode
Real64 NoHeatingSpeedRatio; // Fan speed ratio when no heating
Real64 HeatingCapacitySizeRatio; // Ratio of heating to cooling when autosizing
Real64 CoolingSpeedRatio; // Fan speed ratio in cooling mode
Real64 NoCoolingSpeedRatio; // Fan speed ratio when no cooling
Real64 ParasiticCoolElecPower; // Terminal unit cooling parasitic electric power [W]
Real64 ParasiticHeatElecPower; // Terminal unit heating parasitic electric power [W]
Real64 ParasiticElecCoolConsumption; // Terminal unit parasitic electric consumption in cooling [J]
Expand Down Expand Up @@ -766,20 +768,20 @@ namespace HVACVariableRefrigerantFlow {
SuppHeatPartLoadRatio(0.0), SuppHeatingCoilLoad(0.0), fanType_Num(0), FanOpModeSchedPtr(0), FanAvailSchedPtr(-1), FanIndex(0),
FanPower(0.0), OpMode(0), FanPlace(0), ActualFanVolFlowRate(0.0), OAMixerIndex(0), OAMixerUsed(false), CoolCoilIndex(0),
HeatCoilIndex(0), SuppHeatCoilIndex(0), DXCoolCoilType_Num(0), DXHeatCoilType_Num(0), SuppHeatCoilType_Num(0), ParasiticElec(0.0),
ParasiticOffElec(0.0), HeatingSpeedRatio(1.0), HeatingCapacitySizeRatio(1.0), CoolingSpeedRatio(1.0), ParasiticCoolElecPower(0.0),
ParasiticHeatElecPower(0.0), ParasiticElecCoolConsumption(0.0), ParasiticElecHeatConsumption(0.0), CoolingCoilPresent(true),
HeatingCoilPresent(true), SuppHeatingCoilPresent(false), AvailStatus(0), TerminalUnitSensibleRate(0.0), TerminalUnitLatentRate(0.0),
TotalCoolingRate(0.0), TotalHeatingRate(0.0), SensibleCoolingRate(0.0), SensibleHeatingRate(0.0), LatentCoolingRate(0.0),
LatentHeatingRate(0.0), TotalCoolingEnergy(0.0), TotalHeatingEnergy(0.0), SensibleCoolingEnergy(0.0), SensibleHeatingEnergy(0.0),
LatentCoolingEnergy(0.0), LatentHeatingEnergy(0.0), EMSOverridePartLoadFrac(false), EMSValueForPartLoadFrac(0.0), IterLimitExceeded(0),
FirstIterfailed(0), HVACSizingIndex(0), ATMixerExists(false), ATMixerIndex(0), ATMixerType(0), ATMixerPriNode(0), ATMixerSecNode(0),
ATMixerOutNode(0), SuppHeatCoilAirInletNode(0), SuppHeatCoilAirOutletNode(0), SuppHeatCoilFluidInletNode(0),
SuppHeatCoilFluidOutletNode(0), firstPass(true), SuppHeatCoilLoopNum(), SuppHeatCoilLoopSide(), SuppHeatCoilBranchNum(),
SuppHeatCoilCompNum(), coilInNodeT(0.0), coilInNodeW(0.0), fanInletNode(0), fanOutletNode(0), MySuppCoilPlantScanFlag(true),
airLoopNum(0), isInOASys(false), isInAirLoop(false), isInZone(false), isSetPointControlled(false), coolSPActive(false),
heatSPActive(false), coolLoadToSP(0.0), heatLoadToSP(0.0), coilTempSetPoint(0.0), suppTempSetPoint(0.0), controlZoneMassFlowFrac(1.0),
zoneSequenceCoolingNum(0), zoneSequenceHeatingNum(0), coolCoilAirInNode(0), coolCoilAirOutNode(0), heatCoilAirInNode(0),
heatCoilAirOutNode(0)
ParasiticOffElec(0.0), HeatingSpeedRatio(1.0), NoHeatingSpeedRatio(0.0), HeatingCapacitySizeRatio(1.0), CoolingSpeedRatio(1.0),
NoCoolingSpeedRatio(1.0), ParasiticCoolElecPower(0.0), ParasiticHeatElecPower(0.0), ParasiticElecCoolConsumption(0.0),
ParasiticElecHeatConsumption(0.0), CoolingCoilPresent(true), HeatingCoilPresent(true), SuppHeatingCoilPresent(false), AvailStatus(0),
TerminalUnitSensibleRate(0.0), TerminalUnitLatentRate(0.0), TotalCoolingRate(0.0), TotalHeatingRate(0.0), SensibleCoolingRate(0.0),
SensibleHeatingRate(0.0), LatentCoolingRate(0.0), LatentHeatingRate(0.0), TotalCoolingEnergy(0.0), TotalHeatingEnergy(0.0),
SensibleCoolingEnergy(0.0), SensibleHeatingEnergy(0.0), LatentCoolingEnergy(0.0), LatentHeatingEnergy(0.0),
EMSOverridePartLoadFrac(false), EMSValueForPartLoadFrac(0.0), IterLimitExceeded(0), FirstIterfailed(0), HVACSizingIndex(0),
ATMixerExists(false), ATMixerIndex(0), ATMixerType(0), ATMixerPriNode(0), ATMixerSecNode(0), ATMixerOutNode(0),
SuppHeatCoilAirInletNode(0), SuppHeatCoilAirOutletNode(0), SuppHeatCoilFluidInletNode(0), SuppHeatCoilFluidOutletNode(0),
firstPass(true), SuppHeatCoilLoopNum(), SuppHeatCoilLoopSide(), SuppHeatCoilBranchNum(), SuppHeatCoilCompNum(), coilInNodeT(0.0),
coilInNodeW(0.0), fanInletNode(0), fanOutletNode(0), MySuppCoilPlantScanFlag(true), airLoopNum(0), isInOASys(false),
isInAirLoop(false), isInZone(false), isSetPointControlled(false), coolSPActive(false), heatSPActive(false), coolLoadToSP(0.0),
heatLoadToSP(0.0), coilTempSetPoint(0.0), suppTempSetPoint(0.0), controlZoneMassFlowFrac(1.0), zoneSequenceCoolingNum(0),
zoneSequenceHeatingNum(0), coolCoilAirInNode(0), coolCoilAirOutNode(0), heatCoilAirInNode(0), heatCoilAirOutNode(0)
{
}

Expand Down

4 comments on commit dbb3e70

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

8328_FanOnOff_VRFTU (jmarrec) - x86_64-MacOS-10.15-clang-11.0.0: OK (2995 of 2995 tests passed, 0 test warnings)

Build Badge Test Badge

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

8328_FanOnOff_VRFTU (jmarrec) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: OK (3034 of 3035 tests passed, 0 test warnings)

Messages:\n

  • 1 test had: EIO diffs.
  • 1 test had: ESO small diffs.
  • 1 test had: MTR small diffs.
  • 1 test had: Table big diffs.

Failures:\n

regression Test Summary

  • Passed: 736
  • Failed: 1

Build Badge Test Badge

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

8328_FanOnOff_VRFTU (jmarrec) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: OK (1559 of 1559 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

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

8328_FanOnOff_VRFTU (jmarrec) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: Coverage Too Low

Failures:\n

integration Test Summary

  • Passed: 721
  • Timeout: 1

Build Badge Test Badge Coverage Badge

Please sign in to comment.