Worked example: the three-reservoir junction
The three-reservoir junction is the problem every hydraulics course uses to teach network analysis, because it looks simple and yet you cannot solve it by inspection. Three reservoirs sit at different water levels and feed a single common junction through three pipes, and the junction also draws a fixed demand. The catch is that you do not know in advance which way the water flows in each pipe. A high reservoir clearly supplies the junction, a low one might be supplied by it, and the middle reservoir could go either way depending on where the junction head settles. You solve for the junction head and the flows together.
The setup
This built-in example uses the classic arrangement. Three reservoirs are fixed at heads of 100 m, 85 m and 60 m. They connect to a common junction through three pipes, all at a roughness of 0.5 mm:
- From the 100 m reservoir: 2000 m of 300 mm pipe.
- From the 85 m reservoir: 1500 m of 250 mm pipe.
- From the junction to the 60 m reservoir: 3000 m of 250 mm pipe.
The junction itself is a flow boundary drawing a fixed demand of 0.06 cubic metres per second (60 L/s) at ground level. So the junction is both fed by the upper reservoirs and feeding the demand and, very likely, the lowest reservoir as well.
The physics and the method
Each pipe obeys the Darcy-Weisbach head-loss relation, with the friction factor from the Churchill (1977) correlation so the same expression holds smoothly from laminar through to fully rough turbulent flow. The unknown is the head at the junction. Once you fix that head, the flow in each pipe follows from the head difference between its reservoir and the junction, and the direction from the sign of that difference. The correct junction head is the one value that makes the four flows (three pipes plus the fixed demand) balance to zero at the node.
Fluid Network Studio does not guess the flow directions or hunt for them by hand. It assembles the whole network into the Global Gradient Algorithm (Todini and Pilati, 1988), the same incidence-matrix formulation EPANET uses, and solves the heads and flows simultaneously by Newton iteration. Continuity at the junction is satisfied as part of the solve, and the conservation residual is reported on every run so you can confirm the balance rather than take it on trust. This incompressible mode is cross-checked against EPANET in the published verification cases.
What you learn
When you solve it, the result tells you the junction head, the flow in each pipe, and crucially the direction of each one. You can see at a glance whether the middle reservoir is filling or draining, and whether the demand is met by the upper reservoirs alone or partly by drawing the lowest tank down. Changing a single diameter or reservoir level and re-solving shows how sensitive those directions are, which is the real lesson the problem teaches.
This example runs on the free Explorer tier, so you can open it and experiment without an account. To understand the head and friction terms behind it, see the glossary, and the how it works page walks through the solver method end to end.
Open this example in FNS and try changing a reservoir level or a pipe diameter to see the flow directions shift.