Skip to content

Commit 5c78535

Browse files
Expand Series Active Branch Logic in SetComponentFlowRate
1 parent ec7398a commit 5c78535

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/EnergyPlus/PlantUtilities.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,13 @@ void SetComponentFlowRate(EnergyPlusData &state,
149149
Real64 const MdotOldRequest = state.dataLoopNodes->Node(InletNode).MassFlowRateRequest;
150150
auto &loop_side = state.dataPlnt->PlantLoop(plantLoc.loopNum).LoopSide(plantLoc.loopSideNum);
151151
auto const &comp = loop_side.Branch(plantLoc.branchNum).Comp(plantLoc.compNum);
152-
152+
if (DataPlant::CompData::getPlantComponent(state, plantLoc).FlowCtrl == DataBranchAirLoopPlant::ControlType::SeriesActive) {
153+
Real64 seriesFlowVal = state.dataLoopNodes->Node(DataPlant::CompData::getPlantComponent(state, plantLoc).NodeNumIn).MassFlowRate;
154+
// we don't want to setup a zero MassFlowRateRequest if there is already flow in a series active branch.
155+
if (CompFlow == 0.0 && seriesFlowVal > DataBranchAirLoopPlant::MassFlowTolerance) {
156+
CompFlow = seriesFlowVal;
157+
}
158+
}
153159
if (comp.CurOpSchemeType == DataPlant::OpScheme::Demand) {
154160
// store flow request on inlet node
155161
state.dataLoopNodes->Node(InletNode).MassFlowRateRequest = CompFlow;

0 commit comments

Comments
 (0)