# Tank draining with piston

I am trying to solve a problem which is close to the tank draining (as here Fuel tank draining) but with a piston a the top of the tank which means $p_A$ different of $p_B$.

I search the velocity $V_A$ at which I have to push the piston to have an out flow rate Q (which is imposed).

$$p_A+ \rho g z_A + 1/2 \rho V_A^2 = p_B+ \rho g z_B + 1/2 \rho V_B^2 \\ z_A - z_B = h \\ p_B=0\\ V_AS_A=V_BS_B=Q \\ p_A+ \rho g h + 1/2 \rho (V_A^2 - Q^2/S_B^2) = 0 \\$$ But I have two unknows $V_A$ and $P_A$... Should I use something else to link the pressure to the velocity ? Thank you.

Your equations are correct. It's just that you have a degree of freedom. You can obtain a relationship between the force you exert and the velocity you obtain by modeling the piston itself: $M_p\frac{\partial^2 V_a}{\partial t^2}=S_ap_a$, where $M_p$ is the velocity of the pistol and assuming the friction forces are negligible.