Fuel Left in an Ellipsoidal TankDate: 10/19/2002 at 01:33:03 From: Chris Wells Subject: How much fuel is left in a tank at any depth, given that the tank is ellipsoidal? While working for an oil company 25 years ago, I was encamped in the desert in western Argentina. It was about 6 hrs round-trip to the nearest gas station. We had a tanker truck that we used to supply fuel for our equipment. The tank was shaped like a flattened cigar with abruptly curved, symmetric ends. Early in the project we realized that we didn't have an accurate method of estimating volume as fuel was drawn, so we calibrated a gauging stick when first we refueled. That worked okay, but I always thought there must be a more elegant solution. I hope that you can provide me with a general solution, but I am also somewhat hopeful that you can guide me to a solution. On the other hand, this question hasn't exactly been burning in my soul. It just sort of sits there as an irritating, unfinished, unresolved mystery. Thanks for your time. - Chris Date: 10/19/2002 at 07:52:23 From: Doctor Jeremiah Subject: Re: How much fuel is left in a tank at any depth, given that the tank is ellipsoidal? Hi Chris, This can definitely be done, but the really easy way to solve it involves calculus, and you don't clearly say what level of mathematics you want to deal with here. Are you interested in a calculus-based answer? If we assume that the ends are not curved at all but actually vertical, we can find the partial area of an ellipse and then multiply it by the length. We certainly could calculate the answer with curved ends but it shouldn't be necessary for a first approximation. To calculate the partial area for an ellipse, first you need to imagine making the shape with sheets of paper. We stack a bunch of pieces of paper up and we get a 3d shape even though they are very thin. If the width of the paper gets wider and then narrower again as we stack them up, we will get something that looks like a elliptical tank made out of paper sheets. That's the way to calculate the partial area of an ellipse. The ellipse's equation can be used to figure out the width of the sheets as we stack them up, which means we need to have the equation for the ellipse. Since we don't know the truck's measurements, we should use a general equation: y^2/a^2 + x^2/b^2 = 1 The y value is the height of the liquid, but the tank's bottom is not located at zero: the center of the tank is located at zero. So the tank is 2a high, where y ranges from -a to a. We need to find the width (x) of the thin sheets based on the current height (y), so we need to solve that equation for x: y^2/a^2 + x^2/b^2 = 1 x^2/b^2 = 1 - y^2/a^2 x^2 = b^2 - b^2 y^2/a^2 x = sqrt(b^2 - b^2 y^2/a^2) The area of the tank is the sum of all the thin sheets. Each sheet has a width of 2x = 2sqrt(b^2 - b^2 y^2/a^2). (They are 2x wide because x is only the distance from the center of the tank to the edge). And the y value runs from y=-a to y=+a, so the whole integral looks like this: total_volume = tank_length times the sum from y=-a to y=a of (current_width times infinitely_thin_thickness) Or, written mathematically: L = tank length 2a = max tank height 2b = max tank width y=a / total_volume = L | 2x dy / y=-a which is: y=a / total_volume = L | 2 sqrt(b^2-b^2 y^2/a^2) dy / y=-a and that means the partial volume can be calculated like this: If the tank is 2a in height then when the liquid inside is "d" deep (where empty=0 and full=2a) d translates to a y value of: y=d-a So the partial volume of the tank is: y=d-a / partial_volume = L | 2 sqrt(b^2-b^2 y^2/a^2) dy / y=-a If you solve that integral and then substitute in the y values that are the boundaries (-a and d-a) you will get the equation that will work for any ellipse filled to some arbitrary depth. If you want help solving the integral or if you have any other questions then please write back. - Doctor Jeremiah, The Math Forum http://mathforum.org/dr.math/ Date: 10/21/2002 at 07:43:39 From: Chris Wells Subject: How much fuel is left in a tank at any depth, given that the tank is ellipsoidal? For mearly two decades I tried to solve it algebraically and after considerable struggle, I realized that I needed a way of summing an infinite number of infinitely thin intervals. My math background was starved at that point and would not budge, having never been fed that particular meal. Your explanation was very good, indeed. The path to the problem's solution lies before me, but like Moses' followers, entrance to Canaan is forbidden me because of my own shortcomings. I fear that I would have to take a calculus course to understand, else, yours would be a voice crying in the wilderness. I would love for you to take the time to explain this to me, but I would also hate for you to waste your time if a calculus background is required. Thanks for your time and effort. ---chris Date: 10/21/2002 at 18:54:07 From: Doctor Jeremiah Subject: Re: How much fuel is left in a tank at any depth, given that the tank is ellipsoidal? Hi Chris, Its really not as complicated as you are thinking. I am going to try to explain, but keep in mind that there are reasons that entire books are written about this so if I gloss over anything or you get too bogged down, just scroll to the end to get the final equation. The sum of the thin sheets makes up a cross section of the object. Each sheet has a width and a infinitely small thickness. So the total cross sectional area is the sum of all the infinitely thin areas. This sum of an infinite number of infinitely thin areas is called an integral. There are ways to do these integrals completely from scratch but everybody either uses a set of rules to solve integrals or a book with integrals and their solutions. Remember that this is the integral: y=d-a / partial_volume = L | 2b sqrt( 1-(y/a)^2 ) dy / y=-a Where L is the length, a and b are the axis of the ellipse and d is the depth of the fluid. Its really messy looking! If we want to make it easier we can substitute in something for y/a. It turns out that a trigonometric solution works well. Let's choose y/a = sin(z) which is the same as y = a sin(z) The dy isn't just there for show. It is an infinitely thin bit of y, so if we change variables we must change the dy as well. dy is actually the differential value of y (the slope of the graph of y) so if y = a sin(z) then dy = a cos(z) dz If we substitute y/a = sin(z) and dy = a cos(z) dz into the integral, we get: / partial_volume = L | 2b sqrt( 1-sin(z)^2 ) a cos(z) dz / But remember that sin(z)^2+cos(z)^2 = 1, which means that 1-sin(z)^2 = cos(z)^2 and that makes our integral: / partial_volume = 2Lab | cos(z)^2 dz / But the double angle formula cos(z)^2 = (1 + cos(2z))/2 fits right into things. If we do that we get: / partial_volume = 2Lab | (1 + cos(2z))/2 dz / And if you distribute everything through the parenthesis: / / partial_volume = Lab | 1 dz + Lab | cos(2z) dz / / Applying the "rules" of solving integrals at this point gives us this: partial_volume = Lab z + Lab sin(2z)/2 We can't solve this with an sin(2z) in the answer, but the double angle formula sin(2z) = 2sin(z)cos(z) can be used to make things work: partial_volume = Lab z + Lab 2sin(z)cos(z)/2 = Lab z + Lab sin(z)cos(z) And remember that sin(z)^2+cos(z)^2 = 1 which means: partial_volume = Lab z + Lab sin(z)sqrt(1 - sin(z)^2) Now remember that y/a = sin(z), which means that z = arcsin(y/a) partial_volume = Lab arcsin(y/a) + Lab (y/a)sqrt(1 - (y/a)^2) We are back to something with y in it. The value for y ranges from -a to d-a, so to find the volume we must subtract the partial volume value at the bottom (-a) from the partial volume value at the top (d-a) The value at the top is: partial_volume @ (d-a) = Lab arcsin((d-a)/a) Lab ((d-a)/a)sqrt(1 - ((d-a)/a)^2) partial_volume @ (d-a) = Lab arcsin(d/a - 1) Lab (d/a - 1)sqrt(1 - (d/a - 1)^2) partial_volume @ (d-a) = Lab arcsin(d/a - 1) Lab (d/a - 1)sqrt(1 - (d^2/a^2-2d/a+1)) partial_volume @ (d-a) = Lab arcsin(d/a - 1) Lab (d/a - 1)sqrt(2d/a-d^2/a^2) The value at the bottom is: partial_volume @ (-a) = Lab arcsin((-a)/a) Lab ((-a)/a)sqrt(1 - ((-a)/a)^2) partial_volume @ (-a) = Lab arcsin(-1) Lab (-1)sqrt(1 - (-1)^2) partial_volume @ (-a) = Lab arcsin(-1) partial_volume @ (-a) = Lab (-Pi/2) partial_volume @ (-a) = -Lab Pi/2 So the complete final formula is: partial_volume = partial_volume @ (d-a) - partial_volume @ (-a) partial_volume = Lab arcsin(d/a - 1) + Lab (d/a - 1)sqrt(2d/a-d^2/a^2) - -Lab Pi/2 Or this: partial_volume = Lab arcsin(d/a - 1) + Lab (d/a - 1)sqrt(2d/a-d^2/a^2) + Lab Pi/2 Lets say the tank is half full. Then d=a because a is the distance from the center to the bottom. That means: partial_volume @ 50% full = Lab arcsin(a/a - 1) + Lab (a/a - 1)sqrt(2a/a-a^2/a^2) + Lab Pi/2 partial_volume @ 50% full = Lab arcsin(0) + Lab Pi/2 partial_volume @ 50% full = Lab Pi/2 Lets say the tank is completely full. Then d=2a. That means: partial_volume @ 100% = Lab arcsin(2a/a - 1) + Lab (2a/a - 1)sqrt(2(2a)/a-(2a)^2/a^2) + Lab Pi/2 partial_volume @ 100% = Lab arcsin(1) + Lab Pi/2 partial_volume @ 100% = Lab Pi/2 + Lab Pi/2 partial_volume @ 100% = Lab Pi Don't worry if you didn't follow all of it. Like anything else, to understand it completely would mean writing an answer the size of a book. However, if you are interested in knowing more or if you have questions about the details I left out, please write back. In the end, the formula you seek is this: partial_volume = Lab arcsin(d/a - 1) + Lab (d/a - 1)sqrt(2d/a-d^2/a^2) + Lab Pi/2 Make sure that your arcsin does not return degrees; it must return radians (values from -Pi to Pi). - Doctor Jeremiah, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994- The Math Forum at NCTM. All rights reserved.
http://mathforum.org/dr.math/