# How do I derive a formula for the water level inside a container when it is filled up at a constant flow rate? [closed]

When a container (e.g. Vase, Water Glass etc.) is filled up at a constant flow rate the water height changes differently over time depending on the shape of the container. This video shows some examples: https://youtu.be/GCjHRdcmd7Y . When I fill up a container (e.g. a bottle), described by a solid of rotation with a certain function describing the bottle radius depending on the bottle height, there must be a way of deriving the function of the water height ober time. But how do I do that? Did someone ever do this or something similar? Best Regards from Berlin

If the cross sectional area is $$A(h)$$ as a function of height $$h$$, then the change in volume $$dV$$ of liquid associated with a small change in the height of the surface $$dh$$ is $$dV=A(h)dh$$. So, from this, I hope you can deduce a relationship between $$dV/dt$$ and $$dh/dt$$, and setting $$dV/dt=$$ constant will give a differential equation which you may be able to solve for $$h(t)$$.

Mass conservation says that the rate of mass accumulated in the tank equals the mass flow rate $$\dot{m}_{in}$$ into the tank:

$$\frac{dM_{tank}}{dt} = \dot{m}_{in}$$

where the mass in the tank at time $$t$$ is given by

$$M_{tank} = \rho \pi \int_0^{h(t)}r^2(z)dz$$

and $$r(z)$$ is the radius of your solid of tank shape as a function of height $$z$$, and $$h(t)$$ is the height of the fluid.

You can therefore easily calculate $$h(t)$$ and $$dh/dt$$ (how fast the height is changing) by solving

$$\rho \pi\frac{d}{dt} \left( \int_0^{h(t)}r^2(z)dz\right) = \dot{m}_{in}$$

where $$h(t)$$ is the only variable changing with time.

If you want a more rigorous account of where these formulas come from, or how to do this more generally (e.g., for fluids entering and leaving, changing density, etc.), look up the Reynolds transport theorem for mass conservation.

• Thank you very much! How may I credit you? Jan 18, 2019 at 16:53