Skip to content
Draft
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ \subsubsection{Common Pipe}\label{common-pipe}
The flow at the inlet node of the half loop is equal to the flow at the outlet node of the half loop.
\item
The pumps can have different schedules and any loop can be shut off when the other loop is still running.
\item
If the primary-side, or supply-side, inlet pump is a variable speed pump, the common pipe model does not vary the primary flow rate. EnergyPlus issues a warning and the primary side operates as if the pump were constant speed.
Comment on lines +669 to +670

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Doc updates to clarify behavior.

\end{itemize}

\begin{figure}[hbtp] % fig 125
Expand Down Expand Up @@ -709,6 +711,8 @@ \subsubsection{Two-Way Common Pipe}\label{two-way-common-pipe}
The mass flow rate at the Secondary Side Outlet Node is always equal to the mass flow rate at the Secondary Side Inlet Node.
\item
Only one additional node, either primary-side inlet or secondary-side inlet, (along with the primary-side/supply-side outlet node) can be controlled. The system of equations that describe the loop interface will be under specified if both the Primary and Secondary Inlet nodes have to be controlled.
\item
If the primary-side, or supply-side, inlet pump is a variable speed pump, the Two-Way Common Pipe model does not use the pump to vary primary flow for common pipe control. EnergyPlus issues a warning and the primary side operates as if the pump were constant speed. The Two-Way Common Pipe temperature control is resolved by the common pipe flow balances using the available primary and secondary flows.
\end{itemize}

Figure~\ref{fig:schematic-of-a-two-way-common-pipe-used-in} shows a schematic of the Two-Way Common Pipe. There are two common pipe legs, shown as broken lines, allow for some recirculation at the half loop level.~ The model allows for common pipe flow in either or both directions. The model determines flow rates in the common pipes and temperatures at nodes based on the following:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ \subsubsection{Inputs}\label{inputs-035}

This field specifies a primary-secondary plant loop simulation. When a common pipe option is specified, the plant side of the loop is the primary loop and the demand side of the loop is the secondary loop, and a pump object must be placed on the demand side inlet branch. The three options are ``\textbf{None}'', ``\textbf{CommonPipe}'' and ``\textbf{TwoWayCommonPipe}''. ``\textbf{None}'' means that there is no secondary loop and the plant loop is modeled as a single primary loop. ``\textbf{CommonPipe}'' means that the common pipe interface does not attempt any temperature control, it only satisfies secondary (demand side) flow requests. ``\textbf{TwoWayCommonPipe}'' allows control of the secondary (demand side) inlet temperature or the primary (plant side) inlet temperature by placing a setpoint on the corresponding node. If this field is left blank, it will default to ''None''. If the field is set to ``None'' and the program finds a pump on the demand side it will result in a fatal error.~ If the field is set to ``CommonPipe'' or ``TwoWayCommonPipe'' and the program does not find a pump on the demand side it will result in a fatal error. The common pipe simulation is currently limited to simulating loop pumps, i.e.~each pump should be placed on the inlet branch of the plant side or demand side of the loop.

If a variable speed pump is placed on the plant side inlet branch with ``\textbf{CommonPipe}'' or ``\textbf{TwoWayCommonPipe}'', EnergyPlus issues a warning and the common pipe model operates the primary (plant/supply) side as if it were constant speed. The common pipe calculation does not vary the primary flow rate to meet the common pipe interface conditions. For ``\textbf{TwoWayCommonPipe}'', inlet temperature control is resolved using the common pipe flow balance with the available primary and secondary flows, not by modulating the primary pump speed.

\paragraph{Field: Pressure Simulation Type}\label{field-pressure-simulation-type}

This field lets user to choose if this plant loop will be involved in a pressure drop calculation.~ This requires that at least one branch on the loop have pressure drop data.~ If not, an error will be thrown due to the input mismatch.~ Currently there are two pressure drop simulation types: ``PumpPowerCorrection'' and ``LoopFlowCorrection''.~ In both of these methods, branch pressure drop data is used to calculate a dynamic loop pressure drop and is used to update pumping power accordingly.~ The flow correction method allows the user to enter information regarding the pressure curve of a constant speed pump so that the simulation can dynamically resolve the pressure vs.~flow relationship in the plant loop.~ This is limited to constant speed pumps, as the variable speed pumps are expected to resolve as if it were controlled by a variable drive, so that they can inherently meet any pressure and flow demand required by the loop.~ This is also limited to ``loop pumps'', where there is a single pump on the plant loop. Common pipe simulations and ``branch pump'' simulations are not compatible with this level of pressure simulation.~ See the documentation for the \hyperref[pumpconstantspeed]{Pump:ConstantSpeed} in order to determine required inputs for this pressure simulation method to be performed.~ In the pressure drop system, parallel flow rates are not resolved (to match the pressure drop for the parallel system).~ Enhancements to this calculation are planned which will allow parallel branch flow resolution.~ See the Engineering Reference document for more information on how this works.
Expand Down
4 changes: 4 additions & 0 deletions idd/Energy+.idd.in
Original file line number Diff line number Diff line change
Expand Up @@ -83468,6 +83468,10 @@ PlantLoop,
\note TwoWayCommonPipe = Primary-secondary with control of secondary supply temperature or
\note primary return temperature (requires a setpoint be placed on the
\note plant side or demand side inlet node).
\note If a variable speed pump is placed on the plant side inlet branch with
\note CommonPipe or TwoWayCommonPipe, the common pipe model does not vary
\note primary/supply flow. A warning is issued and the primary/supply side
\note is simulated as constant speed.
\type choice
\key CommonPipe
\key TwoWayCommonPipe
Expand Down
5 changes: 4 additions & 1 deletion src/EnergyPlus/HVACInterfaceManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,7 @@ void ManageTwoWayCommonPipe(EnergyPlusData &state, PlantLocation const &plantLoc
MdotPri = MdotSec;
}
PlantLocation thisPlantLoc = {plantLoc.loopNum, DataPlant::LoopSideLocation::Supply, 1, 0};
PlantUtilities::SetPlantLocationLinks(state, thisPlantLoc);
PlantUtilities::SetActuatedBranchFlowRate(state, MdotPri, NodeNumPriIn, thisPlantLoc, false);
}

Expand Down Expand Up @@ -1178,6 +1179,7 @@ void ManageTwoWayCommonPipe(EnergyPlusData &state, PlantLocation const &plantLoc
MdotPri = MdotSec;
}
PlantLocation thisPlantLoc = {plantLoc.loopNum, DataPlant::LoopSideLocation::Supply, 1, 0};
PlantUtilities::SetPlantLocationLinks(state, thisPlantLoc);
PlantUtilities::SetActuatedBranchFlowRate(state, MdotPri, NodeNumPriIn, thisPlantLoc, false);
}

Expand Down Expand Up @@ -1262,6 +1264,7 @@ void SetupCommonPipes(EnergyPlusData &state)
thisPlantLoop.Name);

if (first_supply_component_type == DataPlant::PlantEquipmentType::PumpVariableSpeed) {
// thisCommonPipe.SupplySideInletPumpType = FlowType::Constant;
// If/when the model supports variable-pumping primary, this can be removed.
ShowWarningError(state, "SetupCommonPipes: detected variable speed pump on supply inlet of CommonPipe plant loop");
ShowContinueError(state, std::format("Occurs on plant loop name = {}", thisPlantLoop.Name));
Expand Down Expand Up @@ -1304,7 +1307,7 @@ void SetupCommonPipes(EnergyPlusData &state)
if (first_supply_component_type == DataPlant::PlantEquipmentType::PumpConstantSpeed) {
thisCommonPipe.SupplySideInletPumpType = FlowType::Constant;
} else if (first_supply_component_type == DataPlant::PlantEquipmentType::PumpVariableSpeed) {
thisCommonPipe.SupplySideInletPumpType = FlowType::Variable;
// thisCommonPipe.SupplySideInletPumpType = FlowType::Constant;
// If/when the model supports variable-pumping primary, this can be removed.
ShowWarningError(state, "SetupCommonPipes: detected variable speed pump on supply inlet of TwoWayCommonPipe plant loop");
ShowContinueError(state, std::format("Occurs on plant loop name = {}", thisPlantLoop.Name));
Expand Down
74 changes: 74 additions & 0 deletions tst/EnergyPlus/unit/HVACInterfaceManager.unit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,78 @@ TEST_F(EnergyPlusFixture, UpdateHVACInterface_Test)
EXPECT_TRUE(state->dataConvergeParams->AirLoopConvergence(1).HVACCO2NotConverged[2]);
EXPECT_TRUE(state->dataConvergeParams->AirLoopConvergence(1).HVACGenContamNotConverged[2]);
}

// TEST_F(EnergyPlusFixture, SetupCommonPipesCommonPipeVariablePrimaryPumpWarnsAndUsesConstantPrimaryFlow)
// {
// using namespace DataPlant;
// using namespace HVACInterfaceManager;
//
// constexpr int loopNum = 1;
// state->dataPlnt->TotNumLoops = 1;
// state->dataPlnt->PlantLoop.allocate(1);
//
// auto &plantLoop = state->dataPlnt->PlantLoop(loopNum);
// plantLoop.Name = "Test Plant Loop";
// plantLoop.CommonPipeType = CommonPipeType::Single;
//
// auto &supplySide = plantLoop.LoopSide(LoopSideLocation::Supply);
// supplySide.TotalBranches = 1;
// supplySide.Branch.allocate(1);
// supplySide.Branch(1).TotalComponents = 1;
// supplySide.Branch(1).Comp.allocate(1);
// supplySide.Branch(1).Comp(1).Type = PlantEquipmentType::PumpVariableSpeed;
//
// auto &demandSide = plantLoop.LoopSide(LoopSideLocation::Demand);
// demandSide.TotalBranches = 1;
// demandSide.Branch.allocate(1);
// demandSide.Branch(1).TotalComponents = 1;
// demandSide.Branch(1).Comp.allocate(1);
// demandSide.Branch(1).Comp(1).Type = PlantEquipmentType::PumpConstantSpeed;
//
// SetupCommonPipes(*state);
//
// auto const &commonPipe = state->dataHVACInterfaceMgr->PlantCommonPipe(loopNum);
// EXPECT_EQ(CommonPipeType::Single, commonPipe.CommonPipeType);
// EXPECT_EQ(FlowType::Constant, commonPipe.SupplySideInletPumpType);
// EXPECT_TRUE(compare_err_stream_substring("detected variable speed pump on supply inlet of CommonPipe plant loop", false, true));
// EXPECT_TRUE(compare_err_stream_substring("The primary/supply side will operate as if constant speed", true, true));
// }

// TEST_F(EnergyPlusFixture, SetupCommonPipesTwoWayVariablePrimaryPumpWarnsAndUsesConstantPrimaryFlow)
// {
// using namespace DataPlant;
// using namespace HVACInterfaceManager;
//
// constexpr int loopNum = 1;
// state->dataPlnt->TotNumLoops = 1;
// state->dataPlnt->PlantLoop.allocate(1);
//
// auto &plantLoop = state->dataPlnt->PlantLoop(loopNum);
// plantLoop.Name = "Test Plant Loop";
// plantLoop.CommonPipeType = CommonPipeType::TwoWay;
//
// auto &supplySide = plantLoop.LoopSide(LoopSideLocation::Supply);
// supplySide.TotalBranches = 1;
// supplySide.Branch.allocate(1);
// supplySide.Branch(1).TotalComponents = 1;
// supplySide.Branch(1).Comp.allocate(1);
// supplySide.Branch(1).Comp(1).Type = PlantEquipmentType::PumpVariableSpeed;
//
// auto &demandSide = plantLoop.LoopSide(LoopSideLocation::Demand);
// demandSide.TotalBranches = 1;
// demandSide.Branch.allocate(1);
// demandSide.Branch(1).TotalComponents = 1;
// demandSide.Branch(1).Comp.allocate(1);
// demandSide.Branch(1).Comp(1).Type = PlantEquipmentType::PumpConstantSpeed;
//
// SetupCommonPipes(*state);
//
// auto const &commonPipe = state->dataHVACInterfaceMgr->PlantCommonPipe(loopNum);
// EXPECT_EQ(CommonPipeType::TwoWay, commonPipe.CommonPipeType);
// EXPECT_EQ(FlowType::Constant, commonPipe.SupplySideInletPumpType);
// EXPECT_EQ(FlowType::Constant, commonPipe.DemandSideInletPumpType);
// EXPECT_TRUE(compare_err_stream_substring("detected variable speed pump on supply inlet of TwoWayCommonPipe plant loop", false, true));
// EXPECT_TRUE(compare_err_stream_substring("The primary/supply side will operate as if constant speed", true, true));
// }

} // namespace EnergyPlus
Loading