# How to find the balance position of valve downstream a tank?

We have a tank which has a constant inflow of water (Qi). The level (h) of water in tank is controlled by opening/ closing (l) a valve downstream of the tank. Overflow height of the tank is 4 meter. I want to find the position (ls) of the valve, mathematically, such that inflow and outflow through tank becomes constant.

Also how can this be done using simulink.

• what have you attempted so far? What about "mass flow in = mass flow out"... – Solar Mike Jul 27 '18 at 14:47
• Doesn't sound like a dynamic process, so shouldn't need simulink. Should be simple hand calcs. Hint: en.wikipedia.org/wiki/Flow_coefficient – ericksonla Jul 27 '18 at 20:40
• i have done some math with the mass balance and have derived the differntial equation. i have also simulated it but the problem is as follows: the level becomes stable at any given valve opening but most of the time at more height than overflow height. there should be one value of valve opening at which the level stabelizes. i want to find that opening – abrar Jul 28 '18 at 4:59
• Sounds like the output pipe & valve need to be larger - in the situation you describe Qout must exceed Qin whatever the max value of the head... – Solar Mike Jul 28 '18 at 5:18

This post is a little dated but thought someone might benefit from another angle.

@Solar Mike is correct. The reason you overflow frequently is because your exit valve is undersized for in inlet flows you're specifying. The only remedy is to limit your inlet flows to the range that the exit valve can handle, OR, increase your valve size.

You don't specify if you're simulating a real exit valve or a virtual one. If real, then there should be a specification sheet where you can calculate the maximum flow, at 4m differential press and 100%Cv (maximum open valve position). Then limit your inlet flows to this value.

If the valve is virtual, and you're only approximating a plant scenario, then size your valve using a simplified valve equation, $$F_{Valve}= k \cdot C _{V} \cdot \sqrt {h}$$. For example, setting the max flow to 100% at 100%Cv, and at 4meters yields $$k=\frac {F_{Valve}}{C _{V} \cdot \sqrt {h}}= \frac {100}{100 \cdot \sqrt {4}}= \frac {1}{2}=0.5$$

This will insure against overflowing the tank. The following table shows how valve flow varies with both head and valve opening. It also shows that @kamran is correct in that flow is a function of 2 variables, so you can't really calculate the value directly.

Now, using water, a mass balance and volume balance are equivalent (in this context) due to incompressibility. And specifying steady-state mandates FlowIn = FlowOut = ValveFlow. You end up with FlowIn = ValveFlow. The mass balance equation becomes

$$FlowIn = \frac {1}{2} \cdot C_v \cdot \sqrt {h}$$.

The problem here is that there are 3 variables and only 1 equation. Thus, to specify the system you have to fix 2 values. Since you want to calculate the Cv, then you must fix FlowIn and TankLevel, h.

The final operational equation @Abrar is looking for is

$$C_{v}=\frac {F_{In}}{k \cdot \sqrt {h}}$$

Obviously, with the inlet flow seemingly fixed, you can also fix the valve opening, then calculate the tank height.

Let's say your valve output q is a function of hydrostatic head and valve's position between 100% to 0% open as $f_{valve}$ with n as its independent variable and, Y the dependant, the percentage of opening of its flow, plotted along q curves. And you need the water level stable at n meters.

$$Q_i = Y(n)$$ at the q = Qi curve

If you don't have the valve's graph, you can create one by setting some heads and positions of valve and by curve fitting stablish your graphs for range of heads.

• I am more interested in the percentage valve opening when Qin = Qout. height of the water column is only required to verify that the tank does not overflow with that opening. – abrar Jul 28 '18 at 4:55
• Yes, i know but the discharge flow of a valve is dependent on two variablles. Haed and area of opening. - Q = Cd A\sqrt{2gh} the A is area of valve opening and h is the head. – kamran Jul 29 '18 at 19:24

Becoming an engineer is learning when to trust your gut feeling & experience, and when to trust the math.

i have done some math with the mass balance and have derived the differntial equation. i have also simulated it but the problem is as follows: the level becomes stable at any given valve opening but most of the time at more height than overflow height.

This time, it seems your math checks out - congrats! - and you should trust it. It is indeed the case that for any Qin and valve setting, the level of the tank will stabilize seomwhere (unless there's an overflow): For any given valve setting, flow Q will result in a specific head loss. If the water level is high enough to provide that head for Qin, you have reached a stable level.

there should be one value of valve opening at which the level stabelizes. i want to find that opening

Not to sound harsh, but I think you confused yourelf here a little bit. You need to question why you think there sould be only one stable valve setting.

If you want to exercise your math-muscles by searching specific valve positions, find the valve position for a specific stable tank level (say 3.99 m).