From 0e0005b7f9e69d9722b72bc97fce55fa8344e6fa Mon Sep 17 00:00:00 2001 From: "Michael J. Witte" Date: Thu, 17 Oct 2024 13:49:00 -0500 Subject: [PATCH] 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)