-
Notifications
You must be signed in to change notification settings - Fork 425
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
Add plant worker function to get current equipment capacity #10804
Changes from 1 commit
72122ce
3664d38
a286787
b39d24b
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 |
---|---|---|
|
@@ -126,5 +126,11 @@ namespace DataPlant { | |
return state.dataPlnt->PlantLoop(plantLoc.loopNum).LoopSide(plantLoc.loopSideNum).Branch(plantLoc.branchNum).Comp(plantLoc.compNum); | ||
} | ||
|
||
Real64 CompData::getDynamicMaxCapacity(EnergyPlusData &state) const | ||
{ | ||
if (this->compPtr == NULL) return this->MaxLoad; | ||
Real64 possibleLoad = this->compPtr->getDynamicMaxCapacity(state); | ||
return (possibleLoad == 0) ? this->MaxLoad : possibleLoad; | ||
} | ||
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 function will call the virtual function in PlantComponent.hh if a model does not have the override function (if that equipment's maximum capacity does not change this function is not needed) or will call the override function in the equipment model. If this function does not exist in an equipment model the virtual function will return 0 and MaxLoad will be used just as it is now. Otherwise the equipment model will return the current max capacity and that value will be used instead. |
||
} // namespace DataPlant | ||
} // namespace EnergyPlus |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,11 @@ public: | |
{ | ||
} | ||
|
||
virtual Real64 getDynamicMaxCapacity([[maybe_unused]] EnergyPlusData &state) | ||
{ | ||
return 0.0; | ||
} | ||
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. Virtual function returns 0 if equipment model does not have an override function. |
||
|
||
virtual void getCurrentPower([[maybe_unused]] EnergyPlusData &state, [[maybe_unused]] Real64 &power) | ||
{ | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,7 +107,7 @@ using HVAC::SmallLoad; | |
|
||
void ManagePlantLoadDistribution(EnergyPlusData &state, | ||
PlantLocation const &plantLoc, // PlantLoop data structure Location struct | ||
Real64 &LoopDemand, | ||
Real64 const LoopDemand, | ||
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. CppCheck suggestion |
||
Real64 &RemLoopDemand, | ||
bool const FirstHVACIteration, | ||
bool &LoopShutDownFlag, // EMS flag to tell loop solver to shut down pumps | ||
|
@@ -3673,7 +3673,7 @@ void FindCompSPLoad(EnergyPlusData &state, | |
|
||
// load local variables from the data structures | ||
CompMinLoad = this_component.MinLoad; | ||
CompMaxLoad = this_component.MaxLoad; | ||
CompMaxLoad = this_component.getDynamicMaxCapacity(state); | ||
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. Down at line 3763 is code that will cap MyLoad if the component design capacity cannot meet the load. Calling this function provides a more accurate full load capacity for use in plant manager calculations.
|
||
CompOptLoad = this_component.OptLoad; | ||
DemandNode = state.dataPlnt->PlantLoop(plantLoc.loopNum).OpScheme(OpSchemePtr).EquipList(ListPtr).Comp(CompPtr).DemandNodeNum; | ||
SetPtNode = state.dataPlnt->PlantLoop(plantLoc.loopNum).OpScheme(OpSchemePtr).EquipList(ListPtr).Comp(CompPtr).SetPointNodeNum; | ||
|
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.
Tower calculations for current maximum capacity