Find volume when thank isn't level

ken121

New member
Joined
Jan 8, 2013
Messages
2
Hello,

I built a level sensor to find the amountof liquid in a tank. I am using a float to measure the hight of oil in a tank.The thank is in the shape of an obround. It holds around 275 gallon and thedimensions are approximations width a depth of 48", height = 70",Length 60". The top and bottom are semi circular. I used r^2arcCos((r-h)/r)-(r-h)sqrt(2*r*h-h^2)were r = radius and h is height to find the coard. The sensor can be locatedanywhere along the apex of the tank. The float is a ball tether to take up reelattached to this take up reel which in turn is attached to gear. Each time atooth from the gear passes a hall fixed effect sensor it sends a pulse to amicroprocessor, when the liquid increases or decreases. And from the count Ican now determine the volume in the tank, if the tank is level. What I amlooking is to find volume of liquid if the tank ins't level. If the tank off onthe x axis or the z axis (or both the both x and y axis). The formula I amlooking for is to find out the actual volume in the tankif it's off level. I'veattached a PDF drawing that may help in what I am trying to do. If anyone can'thelp me or point me in the right direction, I would be most appreciative. I amout of depth on this. I'm in my mid fifty's and math never came easy to me. Soany help in any way would be appreciated. Does anyone have a formula for this?

Thank you for any and all help,

Ken

P.S. I have two sensors, One X and one Z
 

Attachments

  • Oil Tank Model (1) (2).pdf
    8.5 KB · Views: 6
Last edited:
If the top surface of the fluid is the straight-sided section of the tank, then the distance to the fluid measured parallel to the sides of the tank (i.e., what would be the vertical axis if the tank were level) does not change as the tank is tilted slightly, as long as the surface remains bounded by the straight sides. If top surface of the fluid is out of these bounds, then this statement is not true, but it will not be far off as long as the degree of tilt is reasonably small.

When the statement IS true, with theta as the angle by which the tank is out of level, then the distance as measured by your float ball hanging plumb is a leg of a right triangle with hypotenuse the distance measured along the "vertical axis". Theta is the angle between the plumb leg and the hypotenuse, and the length of the hypotenuse h is d*sec(theta) where d is the length of the plumb leg.

Your sensor will be measuring d, and if we leveled the tank it would measure h. You can correct the "d" reading to get the h that you would read if the tank were level by multiplying by sec(theta). This is a small correction--if the tank is 5 degrees out of level (a lot), the correction would be 1.004 times the sensor reading. Intuitively, the correction is so small because when you tip the tank, the ball hangs at an angle to the tank axis. If the tank were filled with concrete, the length of the tether would increase. However the tank is filled with oil, which rises on the side where the ball hangs, making the tether shorter. The two effects tend to balance out.

When the fluid surface is in the curved part of the tank, this correction will be off. It is a very messy problem to determine exact corrections for every possible case. The shape of the surface can be a parallelogram, trapezoid, or be made up of elliptical curves and straight lines. But if you assume that the tank will not be dramatically out of level, the sec(theta) correction is probably good enough.
 
Thank you for your reply, I am in my mid fifty's and math never came easy to me.
your float ball hanging plumb is a leg of a right triangle with hypotenuse the distance measured along the "vertical axis". Theta is the angle between the plumb leg and the hypotenuse, and the length of the hypotenuse h is d*sec(theta) where d is the length of the plumb leg.
This is outside my capability. I was hoping for a formula. If this is to much woke and if your willing to write one, please quote a price. Ken
 
Thank you for your reply, I am in my mid fifty's and math never came easy to me. This is outside my capability. I was hoping for a formula. If this is to much woke and if your willing to write one, please quote a price. Ken

I suggest - you contact a university math professor. This is a nice little project for undergraduate engineering class (Junior/Senior level).
 
Top