From 0e0005b7f9e69d9722b72bc97fce55fa8344e6fa Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Thu, 17 Oct 2024 13:49:00 -0500 Subject: [PATCH 1/5] Warn if chiller chills when off --- src/EnergyPlus/ChillerElectricEIR.cc | 41 +++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index 4ffc4585300..23a47a96409 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -2583,7 +2583,24 @@ void ElectricEIRChillerSpecs::update(EnergyPlusData &state, Real64 const MyLoad, Real64 ReportingConstant = state.dataHVACGlobal->TimeStepSysSec; if (MyLoad >= 0 || !RunFlag) { // Chiller not running so pass inlet states to outlet states - // Set node conditions + // if (MyLoad >= 0 || !RunFlag || this->QEvaporator <= 0.0) { // Chiller not running so pass inlet states to outlet states + // if ((MyLoad < 0 && RunFlag) && (this->CondMassFlowRate >= DataBranchAirLoopPlant::MassFlowTolerance || + // this->EvapMassFlowRate >= DataBranchAirLoopPlant::MassFlowTolerance)) { + // if (!state.dataGlobal->WarmupFlag && !state.dataGlobal->DoingHVACSizingSimulations && + // state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock == DataPlant::FlowLock::Locked) + // { ShowWarningError(state, "Chiller off due to this->QEvaporator <= 0.0 rule"); ShowContinueErrorTimeStamp( + // state, + // format("MyLoad={}, RunFlag={}, this->QEvaporator={}, this->QCondenser={}, this->EvapMassFlowRate={}, + // this->CondMassFlowRate={}", + // MyLoad, + // RunFlag, + // this->QEvaporator, + // this->QCondenser, + // this->EvapMassFlowRate, + // this->CondMassFlowRate)); + // } + // } + // Set node conditions state.dataLoopNodes->Node(this->EvapOutletNodeNum).Temp = state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp; state.dataLoopNodes->Node(this->CondOutletNodeNum).Temp = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; if (this->CondenserType != DataPlant::CondenserType::WaterCooled) { @@ -2680,6 +2697,28 @@ void ElectricEIRChillerSpecs::update(EnergyPlusData &state, Real64 const MyLoad, this->HeatRecMassFlow = state.dataLoopNodes->Node(this->HeatRecInletNodeNum).MassFlowRate; } } + if (((this->EvapMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) || + (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance)) && + (this->EvapInletTemp != this->EvapOutletTemp)) { + if (!state.dataGlobal->WarmupFlag && !state.dataGlobal->DoingHVACSizingSimulations && + state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock == DataPlant::FlowLock::Locked) { + ShowWarningError(state, + format("Chiller should be off, evap flow rate={}, but EvapInletTemp={} is != EvapOutletTemp={}", + this->EvapMassFlowRate, + this->EvapInletTemp, + this->EvapOutletTemp)); + ShowContinueErrorTimeStamp(state, + format("MyLoad={}, RunFlag={}, QEvaporator={}, QCondenser={}, EvapMassFlowRate={}, " + "CondMassFlowRate = {}, Power={} ", + MyLoad, + RunFlag, + this->QEvaporator, + this->QCondenser, + this->EvapMassFlowRate, + this->CondMassFlowRate, + this->Power)); + } + } } bool ElectricEIRChillerSpecs::thermosiphonDisabled(EnergyPlusData &state) From e827c6283f1b9507cd2c008ad8717a2c5628cc7d Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Thu, 17 Oct 2024 14:00:29 -0500 Subject: [PATCH 2/5] Warn if chiller chills when off --- src/EnergyPlus/ChillerElectricEIR.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index 23a47a96409..1bdf902b2d2 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -2703,10 +2703,13 @@ void ElectricEIRChillerSpecs::update(EnergyPlusData &state, Real64 const MyLoad, if (!state.dataGlobal->WarmupFlag && !state.dataGlobal->DoingHVACSizingSimulations && state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock == DataPlant::FlowLock::Locked) { ShowWarningError(state, - format("Chiller should be off, evap flow rate={}, but EvapInletTemp={} is != EvapOutletTemp={}", + format("Chiller should be off, evap flow rate={}, but EvapInletTemp={} is != EvapOutletTemp={}, EvapInletNodeNum.Temp " + "={}, EvapOutletNodeNum).Temp={}", this->EvapMassFlowRate, this->EvapInletTemp, - this->EvapOutletTemp)); + this->EvapOutletTemp, + state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, + state.dataLoopNodes->Node(this->EvapOutletNodeNum).Temp)); ShowContinueErrorTimeStamp(state, format("MyLoad={}, RunFlag={}, QEvaporator={}, QCondenser={}, EvapMassFlowRate={}, " "CondMassFlowRate = {}, Power={} ", From 394a2c7a6b39758a4392a8165e08cfce4633eb07 Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Thu, 17 Oct 2024 16:10:06 -0500 Subject: [PATCH 3/5] Fix chiller off when condenser flow is zero --- src/EnergyPlus/ChillerElectricEIR.cc | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index 1bdf902b2d2..ff63cdca937 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -1962,6 +1962,8 @@ void ElectricEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, b state, this->CWPlantLoc, this->CondMassFlowIndex, this->CDPlantLoc, DataPlant::CriteriaType::MassFlowRate, this->CondMassFlowRate); if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) { + // Shut chiller off if there is no condenser water flow + MyLoad = 0.0; if (this->EvapMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) { // Use PlantUtilities::SetComponentFlowRate to decide actual flow PlantUtilities::SetComponentFlowRate( @@ -2583,23 +2585,6 @@ void ElectricEIRChillerSpecs::update(EnergyPlusData &state, Real64 const MyLoad, Real64 ReportingConstant = state.dataHVACGlobal->TimeStepSysSec; if (MyLoad >= 0 || !RunFlag) { // Chiller not running so pass inlet states to outlet states - // if (MyLoad >= 0 || !RunFlag || this->QEvaporator <= 0.0) { // Chiller not running so pass inlet states to outlet states - // if ((MyLoad < 0 && RunFlag) && (this->CondMassFlowRate >= DataBranchAirLoopPlant::MassFlowTolerance || - // this->EvapMassFlowRate >= DataBranchAirLoopPlant::MassFlowTolerance)) { - // if (!state.dataGlobal->WarmupFlag && !state.dataGlobal->DoingHVACSizingSimulations && - // state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock == DataPlant::FlowLock::Locked) - // { ShowWarningError(state, "Chiller off due to this->QEvaporator <= 0.0 rule"); ShowContinueErrorTimeStamp( - // state, - // format("MyLoad={}, RunFlag={}, this->QEvaporator={}, this->QCondenser={}, this->EvapMassFlowRate={}, - // this->CondMassFlowRate={}", - // MyLoad, - // RunFlag, - // this->QEvaporator, - // this->QCondenser, - // this->EvapMassFlowRate, - // this->CondMassFlowRate)); - // } - // } // Set node conditions state.dataLoopNodes->Node(this->EvapOutletNodeNum).Temp = state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp; state.dataLoopNodes->Node(this->CondOutletNodeNum).Temp = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; From 172283ac3b6fb18abb847a7fb9a2f47e041faf6c Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Fri, 18 Oct 2024 14:16:39 -0500 Subject: [PATCH 4/5] Revert Warn if chiller chills when off --- src/EnergyPlus/ChillerElectricEIR.cc | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/src/EnergyPlus/ChillerElectricEIR.cc b/src/EnergyPlus/ChillerElectricEIR.cc index ff63cdca937..405aa4fc57b 100644 --- a/src/EnergyPlus/ChillerElectricEIR.cc +++ b/src/EnergyPlus/ChillerElectricEIR.cc @@ -2585,7 +2585,7 @@ void ElectricEIRChillerSpecs::update(EnergyPlusData &state, Real64 const MyLoad, Real64 ReportingConstant = state.dataHVACGlobal->TimeStepSysSec; if (MyLoad >= 0 || !RunFlag) { // Chiller not running so pass inlet states to outlet states - // Set node conditions + // Set node conditions state.dataLoopNodes->Node(this->EvapOutletNodeNum).Temp = state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp; state.dataLoopNodes->Node(this->CondOutletNodeNum).Temp = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; if (this->CondenserType != DataPlant::CondenserType::WaterCooled) { @@ -2682,31 +2682,6 @@ void ElectricEIRChillerSpecs::update(EnergyPlusData &state, Real64 const MyLoad, this->HeatRecMassFlow = state.dataLoopNodes->Node(this->HeatRecInletNodeNum).MassFlowRate; } } - if (((this->EvapMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) || - (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance)) && - (this->EvapInletTemp != this->EvapOutletTemp)) { - if (!state.dataGlobal->WarmupFlag && !state.dataGlobal->DoingHVACSizingSimulations && - state.dataPlnt->PlantLoop(this->CWPlantLoc.loopNum).LoopSide(this->CWPlantLoc.loopSideNum).FlowLock == DataPlant::FlowLock::Locked) { - ShowWarningError(state, - format("Chiller should be off, evap flow rate={}, but EvapInletTemp={} is != EvapOutletTemp={}, EvapInletNodeNum.Temp " - "={}, EvapOutletNodeNum).Temp={}", - this->EvapMassFlowRate, - this->EvapInletTemp, - this->EvapOutletTemp, - state.dataLoopNodes->Node(this->EvapInletNodeNum).Temp, - state.dataLoopNodes->Node(this->EvapOutletNodeNum).Temp)); - ShowContinueErrorTimeStamp(state, - format("MyLoad={}, RunFlag={}, QEvaporator={}, QCondenser={}, EvapMassFlowRate={}, " - "CondMassFlowRate = {}, Power={} ", - MyLoad, - RunFlag, - this->QEvaporator, - this->QCondenser, - this->EvapMassFlowRate, - this->CondMassFlowRate, - this->Power)); - } - } } bool ElectricEIRChillerSpecs::thermosiphonDisabled(EnergyPlusData &state) From c894587d9257067cc05f15681daa0142f8c1fe4d Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Mon, 28 Oct 2024 20:02:50 -0500 Subject: [PATCH 5/5] Fix chiller off when condenser flow is zero for all other chillers --- src/EnergyPlus/ChillerAbsorption.cc | 1 + src/EnergyPlus/ChillerElectricASHRAE205.cc | 7 ++++++- src/EnergyPlus/ChillerIndirectAbsorption.cc | 3 ++- src/EnergyPlus/ChillerReformulatedEIR.cc | 5 ++++- src/EnergyPlus/PlantChillers.cc | 20 ++++++++++++++++---- 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/EnergyPlus/ChillerAbsorption.cc b/src/EnergyPlus/ChillerAbsorption.cc index 879e1725eda..ab707456f3f 100644 --- a/src/EnergyPlus/ChillerAbsorption.cc +++ b/src/EnergyPlus/ChillerAbsorption.cc @@ -1728,6 +1728,7 @@ void BLASTAbsorberSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, bool R this->CondOutletTemp = state.dataLoopNodes->Node(this->CondInletNodeNum).Temp; this->CondMassFlowRate = 0.0; this->QCondenser = 0.0; + MyLoad = 0.0; return; // V7 plant upgrade, no longer fatal here anymore, set some things and return } diff --git a/src/EnergyPlus/ChillerElectricASHRAE205.cc b/src/EnergyPlus/ChillerElectricASHRAE205.cc index 77786d58266..00fc1e5a1d2 100644 --- a/src/EnergyPlus/ChillerElectricASHRAE205.cc +++ b/src/EnergyPlus/ChillerElectricASHRAE205.cc @@ -1337,7 +1337,12 @@ void ASHRAE205ChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoad, boo PlantUtilities::PullCompInterconnectTrigger( state, this->CWPlantLoc, this->CondMassFlowIndex, this->CDPlantLoc, DataPlant::CriteriaType::MassFlowRate, this->CondMassFlowRate); - if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) return; + if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) { + MyLoad = 0.0; + this->Power = standbyPower; + this->AmbientZoneGain = standbyPower; + return; + } } Real64 EvapOutletTempSetPoint(0.0); // Evaporator outlet temperature setpoint [C] switch (state.dataPlnt->PlantLoop(PlantLoopNum).LoopDemandCalcScheme) { diff --git a/src/EnergyPlus/ChillerIndirectAbsorption.cc b/src/EnergyPlus/ChillerIndirectAbsorption.cc index 9a60e43c688..3f9c435d173 100644 --- a/src/EnergyPlus/ChillerIndirectAbsorption.cc +++ b/src/EnergyPlus/ChillerIndirectAbsorption.cc @@ -1604,7 +1604,7 @@ void IndirectAbsorberSpecs::sizeChiller(EnergyPlusData &state) } } -void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 const MyLoad, bool const RunFlag) +void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 MyLoad, bool const RunFlag) { // SUBROUTINE INFORMATION: // AUTHOR R. Raustad (FSEC) @@ -1999,6 +1999,7 @@ void IndirectAbsorberSpecs::calculate(EnergyPlusData &state, Real64 const MyLoad this->CondOutletTemp = CondInletTemp; this->CondMassFlowRate = 0.0; this->QCondenser = 0.0; + MyLoad = 0.0; return; // V7 plant upgrade, no longer fatal here anymore... set some things and return } diff --git a/src/EnergyPlus/ChillerReformulatedEIR.cc b/src/EnergyPlus/ChillerReformulatedEIR.cc index d1922a404c9..dedf512b681 100644 --- a/src/EnergyPlus/ChillerReformulatedEIR.cc +++ b/src/EnergyPlus/ChillerReformulatedEIR.cc @@ -2147,7 +2147,10 @@ void ReformulatedEIRChillerSpecs::calculate(EnergyPlusData &state, Real64 &MyLoa PlantUtilities::PullCompInterconnectTrigger( state, this->CWPlantLoc, this->CondMassFlowIndex, this->CDPlantLoc, DataPlant::CriteriaType::MassFlowRate, this->CondMassFlowRate); - if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) return; + if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) { + MyLoad = 0.0; + return; + } } Real64 FRAC = 1.0; Real64 EvapOutletTempSetPoint(0.0); // Evaporator outlet temperature setpoint [C] diff --git a/src/EnergyPlus/PlantChillers.cc b/src/EnergyPlus/PlantChillers.cc index b5ebfc224c5..7c1311fc15f 100644 --- a/src/EnergyPlus/PlantChillers.cc +++ b/src/EnergyPlus/PlantChillers.cc @@ -1468,7 +1468,10 @@ namespace PlantChillers { PlantUtilities::SetComponentFlowRate(state, this->CondMassFlowRate, this->CondInletNodeNum, this->CondOutletNodeNum, this->CDPlantLoc); PlantUtilities::PullCompInterconnectTrigger( state, this->CWPlantLoc, this->CondMassFlowIndex, this->CDPlantLoc, DataPlant::CriteriaType::MassFlowRate, this->CondMassFlowRate); - if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) return; + if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) { + MyLoad = 0.0; + return; + } } // LOAD LOCAL VARIABLES FROM DATA STRUCTURE (for code readability) @@ -3593,7 +3596,10 @@ namespace PlantChillers { PlantUtilities::SetComponentFlowRate(state, this->CondMassFlowRate, this->CondInletNodeNum, this->CondOutletNodeNum, this->CDPlantLoc); PlantUtilities::PullCompInterconnectTrigger( state, this->CWPlantLoc, this->CondMassFlowIndex, this->CDPlantLoc, DataPlant::CriteriaType::MassFlowRate, this->CondMassFlowRate); - if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) return; + if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) { + MyLoad = 0.0; + return; + } } // LOAD LOCAL VARIABLES FROM DATA STRUCTURE (for code readability) @@ -5605,7 +5611,10 @@ namespace PlantChillers { PlantUtilities::PullCompInterconnectTrigger( state, this->CWPlantLoc, this->CondMassFlowIndex, this->CDPlantLoc, DataPlant::CriteriaType::MassFlowRate, this->CondMassFlowRate); - if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) return; + if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) { + MyLoad = 0.0; + return; + } } // LOAD LOCAL VARIABLES FROM DATA STRUCTURE (for code readability) @@ -7313,7 +7322,10 @@ namespace PlantChillers { PlantUtilities::PullCompInterconnectTrigger( state, this->CWPlantLoc, this->CondMassFlowIndex, this->CDPlantLoc, DataPlant::CriteriaType::MassFlowRate, this->CondMassFlowRate); - if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) return; + if (this->CondMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) { + MyLoad = 0.0; + return; + } } // If FlowLock is True, the new resolved mdot is used to update Power, QEvap, Qcond, and