Skip to content
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

Expand Series Active Branch Logic in SetComponentFlowRate #10808

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/EnergyPlus/PlantUtilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,13 @@ void SetComponentFlowRate(EnergyPlusData &state,
Real64 const MdotOldRequest = state.dataLoopNodes->Node(InletNode).MassFlowRateRequest;
auto &loop_side = state.dataPlnt->PlantLoop(plantLoc.loopNum).LoopSide(plantLoc.loopSideNum);
auto const &comp = loop_side.Branch(plantLoc.branchNum).Comp(plantLoc.compNum);

if (DataPlant::CompData::getPlantComponent(state, plantLoc).FlowCtrl == DataBranchAirLoopPlant::ControlType::SeriesActive) {
Real64 seriesFlowVal = state.dataLoopNodes->Node(DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumIn).MassFlowRate;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EnergyArchmage What about downstream components on a series active branch. For example, 2 chillers in series, the first chiller is off, but the second chiller is on. How does the first chiller find out there should be flow on the branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That situation is the main point the change is trying to address. The beginning iteration there isn't any flow yet, so yes, the first chiller is off and doesn't see any flow on the node. But the next iteration, the second chiller will come on and make a flow request, and if flow gets going then the first chiller will see flow on the node. The idea is for the first chiller to not keep requesting zero flow even when there is flow. That zero request seems to set up a fight between a zero flow request and some flow and isn't helpful when we know there is already flow. Series active branches are supposed to look at the last node on the branch but it seems that design is not completely implemented and mismatched flow requests on upstream nodes can cause problems, like more iterations before things settle down.

Copy link
Contributor

@rraustad rraustad Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use if (comp.FlowCtrl == DataBranchAirLoopPlant::ControlType::SeriesActive) on line 152 and comp.NodeNumIn on line 153

CompData &CompData::getPlantComponent(EnergyPlusData &state, PlantLocation const &plantLoc)
{
    return state.dataPlnt->PlantLoop(plantLoc.loopNum).LoopSide(plantLoc.loopSideNum).Branch(plantLoc.branchNum).Comp(plantLoc.compNum);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't clear to me if that "comp" is a real pointer

// we don't want to setup a zero MassFlowRateRequest if there is already flow in a series active branch.
if (CompFlow == 0.0 && seriesFlowVal > DataBranchAirLoopPlant::MassFlowTolerance) {
CompFlow = seriesFlowVal;
}
}
if (comp.CurOpSchemeType == DataPlant::OpScheme::Demand) {
// store flow request on inlet node
state.dataLoopNodes->Node(InletNode).MassFlowRateRequest = CompFlow;
Expand Down
Loading