Assuming the tank is on it's side (so the circular ends lie in a vertical plane) then you need to calculate the area of a segment of a circle and use that to calculate the volume.
The area of a segment of a circle can be calculated by finding the area of a sector and subtracting the area of an isosceles triangle. There are lots of tutorials and videos online which show you how to do this if you know the angle of the sector. You can work out the angle of the sector by using trigonometry on the isosceles triangle (split it along its symmetry line to get two right angled triangles).
http://www.mathopenref.com/cylindervolpartial.htmlhttp://www.mathopenref.com/segmentareaht.htmlThe second link gives you a formula for the area of a segment. Using trigonometry on half of the isosceles triangle they can work out that that one of the angles, lets call it [tex]\theta[/tex], satisfies [tex]\cos \theta = (r-h)/r[/tex] (note that [tex]r-h[/tex] is the height of the triangle, [tex]r[/tex] is the hypotenuse). The angle of the sector is [tex]2\theta[/tex] or by substituting the previous formula we get [tex]2\cos^{-1}((r-h)/r)[/tex]. If we take the result in radians then the proportion of the circle this represents is [tex]2\cos^{-1}((r-h)/r) / 2\pi = \cos^{-1}((r-h)/r) / \pi[/tex], since the area of the entire circle is [tex]\pi r^2[/tex] the area of the sector is [tex]\pi r^2 \cos^{-1}((r-h)/r) / \pi = r^2\cos^{-1}((r-h)/r)[/tex]. Recall that we split the isosceles triangle into two right angled triangles, and that triangle had height [tex]r-h[/tex] and hypotenuse [tex]r[/tex]. By Pythagoras it must have a base of [tex]\sqrt{r^2-(r-h)^2} = \sqrt{r^2-r^2+2hr-h^2} = \sqrt{2hr-h^2}[/tex]. So the area of the right angle triangle is 1/2 times base times height [tex]=1/2\times (r-h)\sqrt{2hr-h^2}[/tex], and the area of the isosceles triangle is [tex](r-h)\sqrt{2hr-h^2}[/tex]. Subtracting the area of the segment from the area of the isosceles triangle gives the area of the segment
[tex]r^2\cos^{-1}((r-h)/r) - (r-h)\sqrt{2hr-h^2}[/tex]
(Multiply this by the length of the tank to get the volume.)
Hope this helped,
R. Baber.