-
Notifications
You must be signed in to change notification settings - Fork 461
Fix chiller chilling when it is off #10793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
0e0005b
e827c62
394a2c7
172283a
c894587
85be6e1
ba3f01d
a87f0ad
dfcd0c1
4f9f8b1
7d3063a
1ecc79e
bbcd4ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1962,11 +1962,11 @@ 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) { | ||
| if (this->EvapMassFlowRate < DataBranchAirLoopPlant::MassFlowTolerance) { | ||
| // Use PlantUtilities::SetComponentFlowRate to decide actual flow | ||
| PlantUtilities::SetComponentFlowRate( | ||
| state, this->EvapMassFlowRate, this->EvapInletNodeNum, this->EvapOutletNodeNum, this->CWPlantLoc); | ||
| } | ||
| // Shut chiller off if there is no condenser water flow | ||
| MyLoad = 0.0; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does look like it boils down to this. I looked at PullCompInterconnectTrigger to see what that was trying to accomplish. This code looks like it can be deleted. I'm not asking for that to happen here but it's extra clock cycles. Removed in #10794, |
||
| this->EvapMassFlowRate = 0.0; | ||
| // Use PlantUtilities::SetComponentFlowRate to decide actual flow | ||
| PlantUtilities::SetComponentFlowRate(state, this->EvapMassFlowRate, this->EvapInletNodeNum, this->EvapOutletNodeNum, this->CWPlantLoc); | ||
| return; | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -563,13 +563,46 @@ TEST_F(EnergyPlusFixture, ChillerElectricEIR_WaterCooledChillerVariableSpeedCond | |
| Real64 ActualCondFlow = 3.0 * std::abs(MyLoad) / (Cp * 10.0); | ||
| EXPECT_NEAR(thisChiller.CondMassFlowRate, ActualCondFlow, 0.00001); | ||
|
|
||
| thisChiller.CondenserFlowControl = DataPlant::CondenserFlowControl::ConstantFlow; | ||
| thisChiller.calculate(*state, MyLoad, RunFlag); | ||
| EXPECT_NEAR(thisChiller.CondMassFlowRate, thisChiller.CondMassFlowRateMax, 0.00001); | ||
|
|
||
| // Test the minimum condenser flow rate | ||
| MyLoad = -500; | ||
| thisChiller.CondenserFlowControl = DataPlant::CondenserFlowControl::ModulatedChillerPLR; | ||
| thisChiller.calculate(*state, MyLoad, RunFlag); | ||
| EXPECT_NEAR(thisChiller.CondMassFlowRate, thisChiller.CondMassFlowRateMax * 0.35, 0.00001); | ||
|
|
||
| // Test constant flow condenser | ||
| thisChiller.CondenserFlowControl = DataPlant::CondenserFlowControl::ConstantFlow; | ||
| MyLoad = -10000; | ||
| Real64 savedMyLoad = MyLoad; | ||
|
|
||
| // test with condenser flow available | ||
| thisChiller.initialize(*state, RunFlag, MyLoad); | ||
| thisChiller.calculate(*state, MyLoad, RunFlag); | ||
| thisChiller.update(*state, MyLoad, RunFlag); | ||
| Real64 chWOutletTemp = thisChiller.EvapInletTemp + savedMyLoad / (Cp * thisChiller.EvapMassFlowRate); | ||
| Real64 condOutletTemp = thisChiller.CondInletTemp + thisChiller.QCondenser / (Cp * thisChiller.CondMassFlowRate); | ||
| EXPECT_EQ(MyLoad, savedMyLoad); | ||
| EXPECT_NEAR(thisChiller.CondMassFlowRate, thisChiller.CondMassFlowRateMax, 0.00001); | ||
| EXPECT_NEAR(thisChiller.EvapMassFlowRate, thisChiller.EvapMassFlowRateMax, 0.00001); | ||
| EXPECT_NEAR(thisChiller.EvapOutletTemp, chWOutletTemp, 0.1); | ||
| EXPECT_NEAR(thisChiller.CondOutletTemp, condOutletTemp, 0.1); | ||
| EXPECT_NEAR(thisChiller.QEvaporator, -savedMyLoad, 1.0); | ||
| EXPECT_NEAR(thisChiller.QCondenser, (-savedMyLoad + thisChiller.Power), 1.0); | ||
| EXPECT_NEAR(thisChiller.Power, 20987, 1.0); | ||
|
|
||
| // test with no condenser flow available - chiller should be off | ||
| state->dataLoopNodes->Node(thisChiller.CondInletNodeNum).MassFlowRate = 0.0; | ||
| state->dataLoopNodes->Node(thisChiller.CondInletNodeNum).MassFlowRateMaxAvail = 0.0; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MaxAvail does need to be set to 0 here, at the inlet node, but I wonder why. It's a limit. If the chiller requests 0 then it should set to 0 if not in series with another component? FlowCtrl = Invalid in this unit test so it's not series active. I tested this unit test both ways, with this line commented out and with the MaxAvail = 1. It failed both times. I guess the plant manager will set MaxAvail as necessary, at the condenser inlet, and this line is needed for that reason. The chiller can be off and still have flow at the condenser and/or evaporator if the plant requests it (e.g., no bypass loop).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just wanted to be sure the chiller saw that there was no condenser flow. Anyways, the extended unit test fails with develop. I'm going to add the evap mass flow = 0 change now to the other chiller types. |
||
| thisChiller.initialize(*state, RunFlag, MyLoad); | ||
| thisChiller.calculate(*state, MyLoad, RunFlag); | ||
| thisChiller.update(*state, MyLoad, RunFlag); | ||
| EXPECT_EQ(MyLoad, 0.0); | ||
| EXPECT_EQ(thisChiller.CondMassFlowRate, 0.0); | ||
| EXPECT_EQ(thisChiller.EvapMassFlowRate, 0.0); | ||
| EXPECT_EQ(thisChiller.EvapOutletTemp, thisChiller.EvapInletTemp); | ||
| EXPECT_EQ(thisChiller.CondOutletTemp, thisChiller.CondInletTemp); | ||
| EXPECT_EQ(thisChiller.QEvaporator, 0.0); | ||
| EXPECT_EQ(thisChiller.QCondenser, 0.0); | ||
| EXPECT_EQ(thisChiller.Power, 0.0); | ||
|
|
||
| // Test | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks right.