# Calculating the volume in a tank with unknown parameter

Greeting, I am working on a problem that involves optimizing the shape of a tank so that the level drops at a constant rate. Working on the problem, here is what I know. There is an axially symmetrical tank whose wall shape is given by $f(z) = R(\frac{z}{H})^n$ which is shown in the figure. The spigot of the tank has cross-sectional area, a and there is no vena contracta. What I need to do is find $n$ so I can satisfy these conditions.

Here is what I have done so far to start on the problem. I am assuming that the area where the spigot is in the tank will not have any significant effects on the total volume of the tank if I integrate.

Doing a mass balance on the tank I get that

1. $In-out+Generation = Accumulation$ where $Generation; In = 0$

2. $-\rho Q_{out}=\frac{\rho dV}{dT}$ as a consequence of the mass balance. And since density is constant $-Q_{out}=\frac{dV}{dT}$

3. To get $Q_{out}$ use the fact that $u_2a = Q_{out}$

4. Using Bernoulli's Equation to get an expression for $u_2$. Between 1 and 2 I get $\frac{u_1^2}2+gz_1+\frac{P_1}{\rho}=\frac{u_2^2}2+gz_2+\frac{P_2}{\rho}$

5. Using the relation that $P_1=P_2=P_{atm}$ (4) can be simplified to $\frac{u_1^2}2+gz_1+=\frac{u_2^2}2+gz_2$ and saying that $u_1 = \frac{dz}{dt}$ I now have $\frac{\frac{dz}{dt}^2}2+gz_1+=\frac{u_2^2}2+gz_2$

6. Solving (5) for $u_2$ I get that $u_2 = \frac{dz}{dt} + \sqrt{2g(z_1-z_2)}$

This is where I start to run into issues relating what I know. I know that $\frac{dz}{dt} = constant$ and I know that I need to solve for $n$ in the $f(z)$ function. I am guess that do solve equation (2) for the volume of the tank which is $a_t\frac{dz}{dt}$. I assume since $\frac{dz}{dt}$ is present on both sides it will cancel out.

My real struggle is getting the area of the tank by just knowing $f(z)$. It has been a while since I've done calculus. The first thought in my mind is a solid of revolution. I think that $f(z)$ is a function that relates z and radius so $r = f(z) = R(\frac{z}{H})^n$ and if so, would I be doing $V = \int_a^b \pi r^2 dz$ which is $V = \int_a^b \pi R(\frac{z}{H})^n dz$? This integral seems very difficult to calculate though and leads me to believe that I have done something wrong. Any push in the right direction would be greatly appreciated!