Skip to content

Commit

Permalink
SaveCompressorPLR, CurrentModuleObject
Browse files Browse the repository at this point in the history
  • Loading branch information
jmythms committed Mar 2, 2021
1 parent 57d6c5b commit fda1f51
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 32 deletions.
49 changes: 22 additions & 27 deletions src/EnergyPlus/Furnaces.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,6 @@ namespace Furnaces {

// MODULE VARIABLE DECLARATIONS:

// starting add variables for variable speed water source heat pump
Real64 SaveCompressorPLR(0.0); // holds compressor PLR from active DX coil
std::string CurrentModuleObject; // Object type for getting and error messages
// ending varibles for variable speed water source heat pump

// Subroutine Specifications for the Module
// Driver/Manager Routines

Expand Down Expand Up @@ -5464,7 +5459,7 @@ namespace Furnaces {
NumOfSpeedHeating = state.dataFurnaces->Furnace(FurnaceNum).NumOfSpeedHeating;
// IF MSHP system was not autosized and the fan is autosized, check that fan volumetric flow rate is greater than MSHP flow rates
if (state.dataFurnaces->Furnace(FurnaceNum).CheckFanFlow) {
CurrentModuleObject = "AirLoopHVAC:UnitaryHeatPump:VariableSpeed";
state.dataFurnaces->CurrentModuleObject = "AirLoopHVAC:UnitaryHeatPump:VariableSpeed";
GetFanVolFlow(state.dataFurnaces->Furnace(FurnaceNum).FanIndex, state.dataFurnaces->Furnace(FurnaceNum).FanVolFlow);

if (state.dataFurnaces->Furnace(FurnaceNum).bIsIHP) // set max fan flow rate to the IHP collection
Expand All @@ -5478,12 +5473,12 @@ namespace Furnaces {
ShowWarningError(state,
format("{} - air flow rate = {:.7T} in fan object is less than the MSHP system air flow rate when cooling "
"is required ({:.7T}).",
CurrentModuleObject,
state.dataFurnaces->CurrentModuleObject,
state.dataFurnaces->Furnace(FurnaceNum).FanVolFlow,
state.dataFurnaces->Furnace(FurnaceNum).CoolVolumeFlowRate(NumOfSpeedCooling)));
ShowContinueError(state,
" The MSHP system flow rate when cooling is required is reset to the fan flow rate and the simulation continues.");
ShowContinueError(state, " Occurs in " + CurrentModuleObject + " = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
ShowContinueError(state, " Occurs in " + state.dataFurnaces->CurrentModuleObject + " = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
state.dataFurnaces->Furnace(FurnaceNum).CoolVolumeFlowRate(NumOfSpeedCooling) = state.dataFurnaces->Furnace(FurnaceNum).FanVolFlow;

if (state.dataFurnaces->Furnace(FurnaceNum).bIsIHP) // set max fan flow rate to the IHP collection
Expand All @@ -5499,7 +5494,7 @@ namespace Furnaces {
format(" The MSHP system flow rate when cooling is required is reset to the flow rate at higher "
"speed and the simulation continues at Speed{}.",
i));
ShowContinueError(state, " Occurs in " + CurrentModuleObject + " = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
ShowContinueError(state, " Occurs in " + state.dataFurnaces->CurrentModuleObject + " = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
state.dataFurnaces->Furnace(FurnaceNum).CoolVolumeFlowRate(i) = state.dataFurnaces->Furnace(FurnaceNum).CoolVolumeFlowRate(i + 1);
}
}
Expand All @@ -5509,12 +5504,12 @@ namespace Furnaces {
ShowWarningError(state,
format("{} - air flow rate = {:.7T} in fan object is less than the MSHP system air flow rate when "
"heating is required ({:.7T}).",
CurrentModuleObject,
state.dataFurnaces->CurrentModuleObject,
state.dataFurnaces->Furnace(FurnaceNum).FanVolFlow,
state.dataFurnaces->Furnace(FurnaceNum).HeatVolumeFlowRate(NumOfSpeedHeating)));
ShowContinueError(state,
" The MSHP system flow rate when heating is required is reset to the fan flow rate and the simulation continues.");
ShowContinueError(state, " Occurs in " + CurrentModuleObject + " = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
ShowContinueError(state, " Occurs in " + state.dataFurnaces->CurrentModuleObject + " = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
state.dataFurnaces->Furnace(FurnaceNum).HeatVolumeFlowRate(NumOfSpeedHeating) = state.dataFurnaces->Furnace(FurnaceNum).FanVolFlow;

if (state.dataFurnaces->Furnace(FurnaceNum).bIsIHP) // set max fan flow rate to the IHP collection
Expand All @@ -5530,7 +5525,7 @@ namespace Furnaces {
format(" The MSHP system flow rate when heating is required is reset to the flow rate at "
"higher speed and the simulation continues at Speed{}.",
i));
ShowContinueError(state, " Occurs in " + CurrentModuleObject + " system = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
ShowContinueError(state, " Occurs in " + state.dataFurnaces->CurrentModuleObject + " system = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
state.dataFurnaces->Furnace(FurnaceNum).HeatVolumeFlowRate(i) = state.dataFurnaces->Furnace(FurnaceNum).HeatVolumeFlowRate(i + 1);
}
}
Expand All @@ -5540,12 +5535,12 @@ namespace Furnaces {
ShowWarningError(state,
format("{} - air flow rate = {:.7T} in fan object is less than the MSHP system air flow rate when no "
"heating or cooling is needed ({:.7T}).",
CurrentModuleObject,
state.dataFurnaces->CurrentModuleObject,
state.dataFurnaces->Furnace(FurnaceNum).FanVolFlow,
state.dataFurnaces->Furnace(FurnaceNum).IdleVolumeAirRate));
ShowContinueError(state, " The MSHP system flow rate when no heating or cooling is needed is reset to the fan flow rate and the "
"simulation continues.");
ShowContinueError(state, " Occurs in " + CurrentModuleObject + " = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
ShowContinueError(state, " Occurs in " + state.dataFurnaces->CurrentModuleObject + " = " + state.dataFurnaces->Furnace(FurnaceNum).Name);
state.dataFurnaces->Furnace(FurnaceNum).IdleVolumeAirRate = state.dataFurnaces->Furnace(FurnaceNum).FanVolFlow;
}
RhoAir = state.dataEnvrn->StdRhoAir;
Expand Down Expand Up @@ -9916,7 +9911,7 @@ namespace Furnaces {
// zero DX coils, and supplemental electric heater electricity consumption
DXElecHeatingPower = 0.0;
DXElecCoolingPower = 0.0;
SaveCompressorPLR = 0.0;
state.dataFurnaces->SaveCompressorPLR = 0.0;
ElecHeatingCoilPower = 0.0;

SystemSensibleLoad = QZnReq;
Expand Down Expand Up @@ -10030,14 +10025,14 @@ namespace Furnaces {
}

if (state.dataFurnaces->Furnace(FurnaceNum).FurnaceType_Num == UnitarySys_HeatCool) {
SaveCompressorPLR = PartLoadFrac;
state.dataFurnaces->SaveCompressorPLR = PartLoadFrac;
} else {
if (SpeedNum > 1) {
SaveCompressorPLR = 1.0;
state.dataFurnaces->SaveCompressorPLR = 1.0;
}

if (PartLoadFrac == 1.0 && SaveCompressorPLR < 1.0) {
PartLoadFrac = SaveCompressorPLR;
if (PartLoadFrac == 1.0 && state.dataFurnaces->SaveCompressorPLR < 1.0) {
PartLoadFrac = state.dataFurnaces->SaveCompressorPLR;
}
}

Expand Down Expand Up @@ -10167,7 +10162,7 @@ namespace Furnaces {
state.dataFurnaces->Furnace(FurnaceNum).HeatingCoilSensDemand = 0.0;
}

state.dataFurnaces->Furnace(FurnaceNum).CompPartLoadRatio = SaveCompressorPLR;
state.dataFurnaces->Furnace(FurnaceNum).CompPartLoadRatio = state.dataFurnaces->SaveCompressorPLR;
if (state.dataFurnaces->Furnace(FurnaceNum).OpMode == CycFanCycCoil) {
if (SupHeaterLoad > 0.0) {
state.dataFurnaces->Furnace(FurnaceNum).FanPartLoadRatio = 1.0;
Expand Down Expand Up @@ -10668,7 +10663,7 @@ namespace Furnaces {
OutletNode = state.dataFurnaces->Furnace(FurnaceNum).FurnaceOutletNodeNum;

HeatCoilLoad = 0.0;
SaveCompressorPLR = 0.0;
state.dataFurnaces->SaveCompressorPLR = 0.0;
SavePartloadRatio = 0.0;
ErrorToler = 0.001;

Expand Down Expand Up @@ -10740,7 +10735,7 @@ namespace Furnaces {
SavePartloadRatio = PartLoadFrac;
SaveSpeedRatio = SpeedRatio;

SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).CoolingCoilIndex).PartLoadRatio;
state.dataFurnaces->SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).CoolingCoilIndex).PartLoadRatio;
} else {
if (state.dataFurnaces->Furnace(FurnaceNum).bIsIHP) {
SimIHP(state,
Expand Down Expand Up @@ -10816,7 +10811,7 @@ namespace Furnaces {
SavePartloadRatio = PartLoadFrac;
SaveSpeedRatio = SpeedRatio;

SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).HeatingCoilIndex).PartLoadRatio;
state.dataFurnaces->SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).HeatingCoilIndex).PartLoadRatio;
} else {
if (state.dataFurnaces->Furnace(FurnaceNum).bIsIHP) {
SimIHP(state,
Expand Down Expand Up @@ -10907,7 +10902,7 @@ namespace Furnaces {

SavePartloadRatio = PartLoadFrac;
SaveSpeedRatio = SpeedRatio;
SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).CoolingCoilIndex).PartLoadRatio;
state.dataFurnaces->SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).CoolingCoilIndex).PartLoadRatio;
} else {

if (state.dataFurnaces->Furnace(FurnaceNum).bIsIHP) {
Expand Down Expand Up @@ -10983,7 +10978,7 @@ namespace Furnaces {

SavePartloadRatio = PartLoadFrac;
SaveSpeedRatio = SpeedRatio;
SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).HeatingCoilIndex).PartLoadRatio;
state.dataFurnaces->SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).HeatingCoilIndex).PartLoadRatio;
} else {
if (state.dataFurnaces->Furnace(FurnaceNum).bIsIHP) {
SimIHP(state,
Expand Down Expand Up @@ -11080,7 +11075,7 @@ namespace Furnaces {
SavePartloadRatio = PartLoadFrac;
SaveSpeedRatio = SpeedRatio;

SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).CoolingCoilIndex).PartLoadRatio;
state.dataFurnaces->SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).CoolingCoilIndex).PartLoadRatio;
} else {
if (state.dataFurnaces->Furnace(FurnaceNum).bIsIHP) {
SimIHP(state,
Expand Down Expand Up @@ -11156,7 +11151,7 @@ namespace Furnaces {

SavePartloadRatio = PartLoadFrac;
SaveSpeedRatio = SpeedRatio;
SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).HeatingCoilIndex).PartLoadRatio;
state.dataFurnaces->SaveCompressorPLR = state.dataVariableSpeedCoils->VarSpeedCoil(state.dataFurnaces->Furnace(FurnaceNum).HeatingCoilIndex).PartLoadRatio;
} else {
if (state.dataFurnaces->Furnace(FurnaceNum).bIsIHP) {
SimIHP(state,
Expand Down
5 changes: 0 additions & 5 deletions src/EnergyPlus/Furnaces.hh
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@ namespace Furnaces {

// used for Coil:Gas:Heating and Coil:Electric:Heating coils only.

// starting add variables for variable speed water source heat pump
extern Real64 SaveCompressorPLR; // holds compressor PLR from active DX coil
extern std::string CurrentModuleObject; // Object type for getting and error messages
// ending varibles for variable speed water source heat pump

// Subroutine Specifications for the Module
// Driver/Manager Routines

Expand Down

5 comments on commit fda1f51

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

Globals-Furnaces (jmythms) - x86_64-Linux-Ubuntu-18.04-gcc-7.5: Build Failed

Messages:\n

  • 13 tests had: AUD diffs.
  • 21 tests had: MTD diffs.
  • 23 tests had: RDD diffs.
  • 1 test had: EIO diffs.
  • 1 test had: ERR diffs.
  • 2 tests had: ESO big diffs.
  • 1 test had: MTR big diffs.
  • 1 test had: ZSZ big diffs.
  • 2 tests had: Table big diffs.
  • 1 test had: MDD diffs.

Failures:\n

regression Test Summary

  • Passed: 739
  • Failed: 3

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.

Globals-Furnaces (jmythms) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-UnitTestsCoverage-Debug: Build Failed

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

Globals-Furnaces (jmythms) - x86_64-MacOS-10.15-clang-11.0.0: Build Failed

Messages:\n

  • 13 tests had: AUD diffs.
  • 21 tests had: MTD diffs.
  • 23 tests had: RDD diffs.
  • 1 test had: EIO diffs.
  • 1 test had: ERR diffs.
  • 2 tests had: ESO big diffs.
  • 1 test had: MTR big diffs.
  • 1 test had: ZSZ big diffs.
  • 2 tests had: Table big diffs.
  • 1 test had: MDD diffs.

Failures:\n

regression Test Summary

  • Passed: 719
  • Failed: 3

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.

Globals-Furnaces (jmythms) - x86_64-Linux-Ubuntu-18.04-gcc-7.5-IntegrationCoverage-Debug: Build Failed

Failures:\n

integration Test Summary

  • Passed: 726
  • Timeout: 1

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.

Globals-Furnaces (jmythms) - Win64-Windows-10-VisualStudio-16: Build Failed

Build Badge Test Badge

Please sign in to comment.