Problem with the Bernoulli's equation for fluids Suppose we have a $U$ shaped hollow tube consisting of three parts as : $T_{v1}$, $T_{v2}$, and $T_{h}$ , representing two vertical tubes and one horizontal tube respectively. The configuration is kept fixed as such so that the horizontal tube acts as a base. Let $T_{v1}$ have a cross-sectional area $A$ and $T_{v2}$ have cross-sectional area $2A$ (The horizontal tube may have any small finite cross-sectional area). An ideal fluid is placed in the tube which starts executing a periodic motion (I'm not sure if this would be simple harmonic motion or not). Assume at a certain instant $h_1 >h_2$ and that the liquid is flowing from $T_{v1}$ to $T_{v2}$.    Now I apply Bernoulli's equation at the two liquid surfaces in $T_{v1}$ and $T_{v2}$. 
$$P_{atm} + 1/2{\rho}v_1^2 + {\rho}gh_1=P_{atm} +1/2{\rho} v_2^2 +{\rho}gh_2$$
Using equation of continuity $$v_1=2v_2$$ 
This would lead to 
$$3/2{\rho}v_2^2= {\rho}g(h_2 - h_1)$$
This gives me a complex solution for velocity. How is this possible? Please help me with this. Thanks in advance.
 A: I think that the problem here is that you cannot use Bernoulli's principle in this problem because the fluid motion is not steady. I think this document will help you. You could try to do the calculations as shown there, by using Newton's second law.
A: The problem is you cannot assume at a certain time $h_{1} > h_{2}$! How did you assume this condition?! I mean you don't know the height of fluid column in $T_{v1}$ and $T_{v2}$. In fact, the only thing you know certainly is that $v_{1} = 2v_{2}$ then we have:
$$\frac{1}{2} \rho v_{1}^{2} + \rho g h_{1} = \frac{1}{2} \rho v_{2}^{2} + \rho g h_{2}$$
or:
$$\frac{1}{2} \rho v_{2}^{2} + \rho g h_{2} = \frac{1}{2} \rho 4v_{2}^{2} + \rho g h_{1}$$
or again:
$$\frac{3}{2} \rho v_{2}^{2} = \rho g (h_{2} - h_{1})$$
or furthermore:
$$h_{2} - h_{1} = \frac{3}{2}\frac{v_{2}^{2}}{g}$$
So the only thing you could say that $h_{2} > h_{1}$ and that's the reason why your solution was incorrect. Note that you can always calculate the height difference $h_{2} - h_{1}$ not their absolute values because height also needs reference like pressure.
Also for those who suggested to use unsteady Bernoulli equation! Such a nice invention!? I mean there is not time-dependent or steady Bernoulli equation. Bernoulli equation is just energy balance and as long as there are no non-conservative forces should work no matter the flow is steady or unsteady!
A: If you are looking for when there are acceleration, we could solve this problem like this:
$$\int_{1}^{2} \rho \frac{d v}{d t} dl + \frac{1}{2}\rho v_{2}^{2} + \rho g h_{2} = \frac{1}{2} \rho v_{1}^{2} + \rho g h_{1}$$
Let's say the path between 1 and 2 includes three parts as $1 \rightarrow 3$, $3 \rightarrow 4$, and $4 \rightarrow 2$. In part $1 \rightarrow 3$ the velocity is $v_{1}$, in the path $3 \rightarrow 4$ if the cross section is $A_{34}$ and its length is $L_{34}$, then velocity is $v_{34} = \frac{A}{A_{34}}v_{1}$. In the path $4 \rightarrow 2$ the velocity is $v_{2}$. So the integral would be expanded as:
$$\int_{1}^{2} \rho \frac{d v}{d t} dl = \int_{1}^{3} \rho \frac{d v}{d t} dl + \int_{3}^{4} \rho \frac{d v}{d t} dl + \int_{4}^{2} \rho \frac{d v}{d t} dl = \rho \frac{d v_{1}}{d t} h_{1} + \rho \frac{d v_{1}}{d t}\frac{A}{A_{34}}L_{34} + \rho \frac{d v_{2}}{d t}h_{2}$$
Also, we know that $\frac{1}{2}v_{1} = v_{2}$, so:
$$\int_{1}^{2} \rho \frac{d v}{d t} dl = \rho \frac{d v_{1}}{d t} h_{1} + \rho \frac{d v_{1}}{d t}\frac{A}{A_{34}}L_{34} + \frac{1}{2}\rho \frac{d v_{1}}{d t}h_{2}$$
Finally:
$$\rho \frac{d v_{1}}{d t} h_{1} + \rho \frac{d v_{1}}{d t}\frac{A}{A_{34}}L_{34} + \frac{1}{2}\rho \frac{d v_{1}}{d t}h_{2} + \frac{1}{4} \rho v_{1}^{2} + \rho g h_{2} = \frac{1}{2} \rho v_{1}^{2} + \rho g h_{1} $$
If we take: $a = h_{1} + \frac{A}{A_{34}} L_{34} + \frac{1}{2}h_{2}$, then:
$$a \frac{d v_{1}}{d t} = \frac{1}{4} v_{1}^{2} + g (h_{1}-h_{2})$$
Then by solving this ODE, we have:
$$v_{1}(t) = 2\sqrt{g (h_{1}-h_{2})} \tanh\Big(\frac{t}{\tau}\Big)$$
Where the relaxation time is defined as: $$\tau = \frac{a}{\sqrt{g (h_{1}-h_{2})}}$$
