Skip to content

Commit

Permalink
Expand Series Active Branch Logic in SetComponentFlowRate
Browse files Browse the repository at this point in the history
  • Loading branch information
EnergyArchmage committed Oct 30, 2024
1 parent ec7398a commit 5c78535
Showing 1 changed file with 7 additions and 1 deletion.
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;
// 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

4 comments on commit 5c78535

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

SetComponentFlowRate-series-active-change (EnergyArchmage) - 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.

SetComponentFlowRate-series-active-change (EnergyArchmage) - 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-2
Copy link

Choose a reason for hiding this comment

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

SetComponentFlowRate-series-active-change (EnergyArchmage) - x86_64-Linux-Ubuntu-22.04-gcc-11.4: Tests Failed (0 of 0 tests passed, 0 test warnings)

Build Badge Test 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.

SetComponentFlowRate-series-active-change (EnergyArchmage) - Win64-Windows-10-VisualStudio-16: OK (2894 of 2894 tests passed, 0 test warnings)

Build Badge Test Badge

Please sign in to comment.