# Water flow thorugh pipes

1. Mar 5, 2016

### lurifax1

1. The problem statement, all variables and given/known data
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

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

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

2. Mar 5, 2016

### haruspex

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.

3. Mar 6, 2016

### 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

4. Mar 6, 2016

### haruspex

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.

5. Mar 6, 2016

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

6. Mar 6, 2016

### billy_joule

If the pipe lengths are short then minor losses could dominate.
http://www.engineeringtoolbox.com/minor-loss-coefficients-pipes-d_626.html

If the valves themselves (and their associated fittings & pipe) don't have a significant effect on the flow then the set-up isn't much use and you may as well just use one valve... If this set-up was designed by an instructor I would expect each valve will have a different flow rate, using this fact will result in an actual P(ID) controller.

If flow is the same regardless of which or how many valves are open then you can't have P control at all - only bang bang control, which probably defeats the purpose of the exercise.