Skip to content

Commit

Permalink
Fix chiller off when condenser flow is zero for all other chillers
Browse files Browse the repository at this point in the history
  • Loading branch information
mjwitte committed Oct 29, 2024
1 parent 172283a commit c894587
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/EnergyPlus/ChillerAbsorption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
7 changes: 6 additions & 1 deletion src/EnergyPlus/ChillerElectricASHRAE205.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion src/EnergyPlus/ChillerIndirectAbsorption.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Expand Down
5 changes: 4 additions & 1 deletion src/EnergyPlus/ChillerReformulatedEIR.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
20 changes: 16 additions & 4 deletions src/EnergyPlus/PlantChillers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

4 comments on commit c894587

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

chillerEIRrepairs (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-UnitTestsCoverage-RelWithDebInfo: Tests Failed (0 of 0 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.

chillerEIRrepairs (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4-IntegrationCoverage-RelWithDebInfo: Tests Failed (0 of 0 tests passed, 0 test warnings)

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.

chillerEIRrepairs (mjwitte) - Win64-Windows-10-VisualStudio-16: Tests Failed (0 of 0 tests passed, 0 test warnings)

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.

chillerEIRrepairs (mjwitte) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: OK (2916 of 2916 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.