Skip to content

Commit

Permalink
ChillerElectricEIR remove flowlock for warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Oct 14, 2024
1 parent 8560a93 commit 37e676b
Showing 1 changed file with 50 additions and 57 deletions.
107 changes: 50 additions & 57 deletions src/EnergyPlus/ChillerElectricEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2034,27 +2034,26 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b
this->ChillerCapFT = Curve::CurveValue(state, this->ChillerCapFTIndex, EvapOutletTempSetPoint, AvgCondSinkTemp);

if (this->ChillerCapFT < 0) {
if (this->ChillerCapFTError < 1 &&
state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock != DataPlant::FlowLock::Unlocked &&
!state.dataGlobal->WarmupFlag) {
if (PlantUtilities::okToIssueWarning(state, this->CWPlantLoc)) {
++this->ChillerCapFTError;
ShowWarningError(state, format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name));
ShowContinueError(state, format(" Chiller Capacity as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerCapFT));
ShowContinueError(state,
format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.",
EvapOutletTempSetPoint,
condInletTemp));
ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation.");
} else if (state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock !=
DataPlant::FlowLock::Unlocked &&
!state.dataGlobal->WarmupFlag) {
++this->ChillerCapFTError;
ShowRecurringWarningErrorAtEnd(state,
"CHILLER:ELECTRIC:EIR \"" + this->Name +
"\": Chiller Capacity as a Function of Temperature curve output is negative warning continues...",
this->ChillerCapFTErrorIndex,
this->ChillerCapFT,
this->ChillerCapFT);
if (this->ChillerCapFTError < 1) {
ShowWarningError(state, format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name));
ShowContinueError(state,
format(" Chiller Capacity as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerCapFT));
ShowContinueError(state,
format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.",
EvapOutletTempSetPoint,
condInletTemp));
ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation.");
} else {
++this->ChillerCapFTError;
ShowRecurringWarningErrorAtEnd(state,
"CHILLER:ELECTRIC:EIR \"" + this->Name +
"\": Chiller Capacity as a Function of Temperature curve output is negative warning continues...",
this->ChillerCapFTErrorIndex,
this->ChillerCapFT,
this->ChillerCapFT);
}
}
this->ChillerCapFT = 0.0;
}
Expand Down Expand Up @@ -2314,51 +2313,45 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b

this->ChillerEIRFT = Curve::CurveValue(state, this->ChillerEIRFTIndex, this->EvapOutletTemp, AvgCondSinkTemp);
if (this->ChillerEIRFT < 0.0) {
if (this->ChillerEIRFTError < 1 &&
state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock != DataPlant::FlowLock::Unlocked &&
!state.dataGlobal->WarmupFlag) {
++this->ChillerEIRFTError;
ShowWarningError(state, format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name));
ShowContinueError(state, format(" Chiller EIR as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerEIRFT));
ShowContinueError(state,
format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.",
this->EvapOutletTemp,
condInletTemp));
ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation.");
} else if (state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock !=
DataPlant::FlowLock::Unlocked &&
!state.dataGlobal->WarmupFlag) {
if (PlantUtilities::okToIssueWarning(state, this->CWPlantLoc)) {
++this->ChillerEIRFTError;
ShowRecurringWarningErrorAtEnd(state,
"CHILLER:ELECTRIC:EIR \"" + this->Name +
"\": Chiller EIR as a Function of Temperature curve output is negative warning continues...",
this->ChillerEIRFTErrorIndex,
this->ChillerEIRFT,
this->ChillerEIRFT);
if (this->ChillerEIRFTError < 1) {
ShowWarningError(state, format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name));
ShowContinueError(state, format(" Chiller EIR as a Function of Temperature curve output is negative ({:.3R}).", this->ChillerEIRFT));
ShowContinueError(state,
format(" Negative value occurs using an Evaporator Outlet Temp of {:.1R} and a Condenser Inlet Temp of {:.1R}.",
this->EvapOutletTemp,
condInletTemp));
ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation.");
} else {
ShowRecurringWarningErrorAtEnd(state,
"CHILLER:ELECTRIC:EIR \"" + this->Name +
"\": Chiller EIR as a Function of Temperature curve output is negative warning continues...",
this->ChillerEIRFTErrorIndex,
this->ChillerEIRFT,
this->ChillerEIRFT);
}
}
this->ChillerEIRFT = 0.0;
}

this->ChillerEIRFPLR = Curve::CurveValue(state, this->ChillerEIRFPLRIndex, PartLoadRat);
if (this->ChillerEIRFPLR < 0.0) {
if (this->ChillerEIRFPLRError < 1 &&
state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock != DataPlant::FlowLock::Unlocked &&
!state.dataGlobal->WarmupFlag) {
++this->ChillerEIRFPLRError;
ShowWarningError(state, format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name));
ShowContinueError(state, format(" Chiller EIR as a function of PLR curve output is negative ({:.3R}).", this->ChillerEIRFPLR));
ShowContinueError(state, format(" Negative value occurs using a part-load ratio of {:.3R}.", PartLoadRat));
ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation.");
} else if (state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock !=
DataPlant::FlowLock::Unlocked &&
!state.dataGlobal->WarmupFlag) {
if (PlantUtilities::okToIssueWarning(state, this->CWPlantLoc)) {
++this->ChillerEIRFPLRError;
ShowRecurringWarningErrorAtEnd(state,
"CHILLER:ELECTRIC:EIR \"" + this->Name +
"\": Chiller EIR as a function of PLR curve output is negative warning continues...",
this->ChillerEIRFPLRErrorIndex,
this->ChillerEIRFPLR,
this->ChillerEIRFPLR);
if (this->ChillerEIRFPLRError < 1) {
ShowWarningError(state, format("CHILLER:ELECTRIC:EIR \"{}\":", this->Name));
ShowContinueError(state, format(" Chiller EIR as a function of PLR curve output is negative ({:.3R}).", this->ChillerEIRFPLR));
ShowContinueError(state, format(" Negative value occurs using a part-load ratio of {:.3R}.", PartLoadRat));
ShowContinueErrorTimeStamp(state, " Resetting curve output to zero and continuing simulation.");
} else {
ShowRecurringWarningErrorAtEnd(state,
"CHILLER:ELECTRIC:EIR \"" + this->Name +
"\": Chiller EIR as a function of PLR curve output is negative warning continues...",
this->ChillerEIRFPLRErrorIndex,
this->ChillerEIRFPLR,
this->ChillerEIRFPLR);
}
}
this->ChillerEIRFPLR = 0.0;
}
Expand Down

4 comments on commit 37e676b

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

flowlock1 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2916 of 2916 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.

flowlock1 (mjwitte) - Win64-Windows-10-VisualStudio-16: OK (2894 of 2894 tests passed, 0 test warnings)

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.

flowlock1 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: OK (801 of 801 tests passed, 0 test warnings)

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

flowlock1 (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: OK (2098 of 2098 tests passed, 0 test warnings)

Build Badge Test Badge Coverage Badge

Please sign in to comment.