Re: Calculating Tank Volume
Well, the volume of a cylinder is pi*r^2*h where r is the radius and h is the height. Your "V = pir^2" is at leaving off the h.
Re: Calculating Tank Volume
The h in the formula V = pir^2l is the l at the end since the cylinder is lying down.
Re: Calculating Tank Volume
You don't show your work, but I would assume perhaps you're not squaring the radius first, before multiplying by pi, then length, then your units to gallons conversion value.
It seems to work fine for me, i.e. using feet.
Code:
r * r * pi l (length, aka h) cubic ft to gal
2.5*2.5 = 6.25 * pi = 19.63495408 * 10 = 196.34954 * 7.48 = 1468.69456
Re: Calculating Tank Volume
Quote:
Originally Posted by
Dillinger4
...V = pir^2l...
Huh, I apparently missed that "l" repeatedly, sorry about that. You didn't give the important details so I suppose I latched onto a perceived typo instead.
Re: Calculating Tank Volume
Ugh. I see what I was doing wrong. I squared the diameter and didn't multiply the result by 7.48. :sick: Thanks for the help jemidiah.