# Water flow thorugh pipes

## Homework Statement

I'm going to regulate a tank using a PID-controller. I want to simulate this in MATLAB though and met a problem while calculating the mathematical model.

The problem is the following: The three valves are either fully open or fully closed. The diameter in the pipes are all equal. If I use Bernoullis equation on the tank if only one of the valves are open, it's pretty straight forward to calculate the water flow. But how do the waterflow change if one or two more valves are opened? My intuition says the flow changes, but my calculations say they dont. Any help or push in the right direction is greatly appreciated!

http://imgur.com/yYzAB9v

## Homework Equations

Bernoulli:
https://en.wikipedia.org/wiki/Bernoulli's_principle
Darcy-Weisbach
https://en.wikipedia.org/wiki/Darcy–Weisbach_equation

## The Attempt at a Solution

I used bernoulli and calculated the flow through the pipes with only one valve fully opened. When multiple ones are open at the same time I dont know how to fit that in the equation to calculate the sum of waterflow out of the tank depending on the hight of the water in the tank.

Related Introductory Physics Homework Help News on Phys.org
haruspex
Homework Helper
Gold Member
Consider a straight pipe that expands at some point from a radius r to a radius R>r, then contracts back again to r.
According to Bernoulli, the flow rate is not affected by R.
Opening all your valves is like increasing R.
To model a consequence you need to take into account the viscosity.

lurifax1
Thank you, that makes sense! The fluid in the tanks are just water though. Do you think the viscosity will have an effect on the system? In this experiment I'm going to make a PID-regulator and looking at when the system is stationary with just one of the valves are open. Then we are going to open all of the three valves, and this should make a pretty observable difference.
Maybe I'm overlooking something in the physical model.

This is the tank in question. We are only looking at one of the tanks, so I've highlighted the pipes that are running. The other ones are closed in this part of the project, so no water is flowing through them.
http://imgur.com/N4s6j10

haruspex
Homework Helper
Gold Member
It's hard to tell from the diagram and the photograph. It would be more useful to know all the pipe lengths and internal diameters. Your diagram suggests the sections with valves are the same diameter as the preceding and following sections, and those sections are not especially short. That being so I would expect opening the valves to make little difference.
There is also the question of whether the flow will be laminar or turbulent.

Edit: I note you list the Darcy-Weisbach equation. That allows for viscosity.

lurifax1
So if we have all the pipe lengths and internal diameter of the pipes we can calculate flow depending on the height? It would be really nice if a good approxiamation would be that if two valves are opened, it would be twice as much flow than if just one are opened, but that would be to much of a stretch? In about a month I will be able to watch the flow rate through a flow-sensor, so I can get a partially answer then, but that won't help the mathematical model much.

Thanks for the help by the way, really appreciate it.

billy_joule