Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to calculate volume of the tank.

Status
Not open for further replies.

newtofoxpro

Programmer
Sep 16, 2007
301
IN
My Client provide me the following details.

Diameter (CM)
Length (CM)

With this I have to calculate Volume In Liters.

Another question is Client would provide DIPS by stick/scale by CM
Then I have to calculate the product.

 
Well, depends on the geometry. Cylinder? Box?
Lookup the formula in your favorite math book ;)

I don't know what DIPS would mean. Ask your client, perhaps? If they don't know, who else would?

Bye, Olaf.
 
This is egg shape type Oil tank. DIPS means it is check Oil by dip stick.
 
You can run a Google search for your algorithm.

I just did a Google search for cylinder volume formula and found a lot of 'finds'.

And I too have never heard of "DIPS".

If you can get your dimension values put into standardized units, then you should be able to use a 'normal' algorithm

Good Luck,
JRB-Bldr
 
The dips is a bit trickier, but the total capacity is easy enough.

It is implicitly a cylinder so the volume would be pi * radius ^2 * length

The dips would depend on the orientation of the tank - on end is easy, just recalculate having deducted the dip.

On it's side is outside of my schoolboy maths

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
When you say egg shape, exactly what do you mean? Spherical? Tubular with rounded top and bottom? Extended spherical? Or?

If it is a perfect sphere, just calculate using spherical math formulae to get the volume. Otherwise you will need to calculate different sections of the tank and add the results together to get the volume.

As far as DIPS is concerned, you will need to re-calculate the volume at every division on your dipstick using the same formulae.

mmerlinn


Poor people do not hire employees. If you soak the rich, who are you going to work for?

"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Raymond
 
Here is a website which will give you volume algorithms for a variety of shapes

I do not see 'egg-shape' as one of those.

If your tank shape is not one of the 'standard' shapes, then I'd recommend that you post your question to some Math Forum where they can help you better.

Good Luck,
JRB-Bldr
 
I think he means his tank is a cylinder, with domed ends...

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
DIPS means it is check Oil by dip stick.

Well that is nothing more than the Height of the Cylinder.

Unfortunately measuring by Dip Stick is not terribly accurate since a Dip Stick can be inserted into a tank at an angle rather than at precisely parallel to the cylinder walls.

Consequently the Dip Stick quite often gives a non-precise measurement of the Height of the tank contents. That non-precision may be too small to matter, but it does exist.

Also if your tank is a 'standard' oil tank it is a Cylinder which may or may not have a domed top.
I have never seen one with a domed bottom as well.

Due to the non-precision of the Height measurement caused by using a Dip Stick, I'd guess that a 'standard' Cylinder Volume algorithm would work close enough to worry about about the slightly less volume due to the domed-top.

Otherwise your algorithm will get more complicated by having to calculate the cylindrical volume plus separately calculate the volume of the dome (if and only if the contents Height exceeds the Height of the cylindrical part of the tank) and then add the two together.

Good Luck,
JRB-Bldr

 
If it's really egg-shaped (a cylinder with domed ends, as Griff rightly says), then we would also need to know the radius of each of the domes.

If the domes are vey shallow (to the point where they can be ignored), then it's just a question of applying the normal formula for a cylinder. Again, with reference to Griff's post: it's the area of the cross-section (pi * radius ^ 2) multiplied by the length.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
egg? Do you really mean like a chicken egg? Or rather an oval ( or an ellipsoid ( or a domed cylinder.

As others said measuring dip may not be the best measurement, it depends where the tank has the probe stick and how easily it bends of course, but besides that you could of course compute a more or less accurate value.

Are we talking about big tanks, like on oil trucks, rather like a flattened lying cylinder?

All I can say so far is, the rule ground area x height also applies to geometry where the ground area changes with the height, you can just approximate the cuts through each layer and integrate this over the height.

I'd say the manufacturer of the vehicles or of the tank should be able to hand out some formula for tank filling in litres depending on the height of the liquid surface.

If you can specify the exact geometry I could give you a formula. I studied physics, this kind of geometry math is not among the hard stuff for me.

Bye, Olaf.
 
Thank you all,

Sorry, I am confused about the shape of the tank. I asked to my client about shape and he said it's like chicken egg. I went to client's site but I could not see because it is fitted in under the ground. Further I asked him to provide tank size & how he measure the oil with dip-stick. And he has provided following..

Tank Inside Length = 671.80 CM
Tank Inside Diameter = 200.00 CM
Tank Capacity = 20000 Ltr.
DIP Reading in CM 0.5 = 04.47 (Product Vol. in Ltrs)
DIP Reading in CM 0.1 = 12.64 (Product Vol. in Ltrs)
DIP Reading in CM 1.5 = 23.21 (Product Vol. in Ltrs)

these are examples he read from his paper-chart which is available to him. And he does not know how it is calculated.

Thanks again.
 
Are you trying to find the volume of this specific tank? Or are you looking for a general formula for calculating the volume of all tanks that are "like a chicken egg"?

If the former, then you already know the answer: it's 20,000 litres.

If the latter, then it's not possible without knowing more details of the geometry of the tank.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
This is an interesting, non-vfp related, puzzle.

You can actually *estimate* a general formula but it's not going to be very accurate - the tank clearly isn't a cylinder with domed ends - because the sizes you've given would make it at least 21,000 litres. Three measurements for dipping, however would enable you to calculate a reasonable estimate for all other dips based on two assumptions; 1) the 'egg shape' is basically sitting horizontally and 2) the dips are being taken on or near the largest diameter.

Also, I assume you have mistyped the second dip reading, or the dip is being taken in Dr Who's Tardis.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
This is an interesting, non-vfp related, puzzle. "

Yes, I realized this, as I am developing software in VFP, I thought there must be some calculations in VFP like time,date etc., I may not be first person who is developing inventory software in VFP for oil/petrol/diesel etc., so other member should know it.

Sorry for if it is not non-vfp related.... Quitting now.
Thank you all supported member to this thread.
 
newtofoxpro said:
DIP Reading in CM 0.5 = 04.47 (Product Vol. in Ltrs)
DIP Reading in CM 0.1 = 12.64 (Product Vol. in Ltrs) && that should rather be 1.0 CM, souldn't it?
you wouldn't have more with a lower filling in any geomatry, that would be magic)
DIP Reading in CM 1.5 = 23.21 (Product Vol. in Ltrs)

these are examples he read from his paper-chart which is available to him. And he does not know how it is calculated.

So it seems he has a lookup table of how certain heights mean certain volumes.

Ask him the whole lookup table.

As you can't measure the geometry of the buried tank you have no exact geometry on which you or anyone could create a formula for volume of height vol(h), but you could simply interpolate between the known values.

simple linear interpolation: You have a height h between 0.5 and 1.0 cm then the interpolated volume is v(0.5)+((h-0.5)/(1.0-0.5))*(v(1.0)-v(0.5)) that is easier to understand in words:

1. for h=0.5 you have v(0.5) = 04.47 litres
2. for h=1.0 you have v(1.0) = 12.64 litres

The difference of volumens between these two heights is (v(1.0)-v(0.5) = 12.64-4.47 = 8.17 litres, so in average each 0.1 cm between 0.5 cm and 1.0 cm adds 8.17/5 litres = 1.63 litres to the volume.

This slope (in this case 1.63 litres per 0.1 cm) is what you need to compute for each pair of heights you have in that lookup table and can use to interpolate the volume between the known volumes.

That's all you can do. If you know the exact geometry of that "egg" you can do better, but that would already be better than that lookup table with 0.5 cm steps only.

Bye, Olaf.
 
Another though (again):

If the measurement of the dip height (or depth) is like with those flexible dip sticks you have at gas stations or built into a car to measure oil, then the accury of the table up to 0.5 cms may already be enough and every interpolation or "exact" calculation knowing the geometry would not lead to a better value than you can lookup in that lookup table. So eg if you need to take into account the dip measurement +/- 0.5 cm then that lookup table would give you a good measurement at the lookup of the height nearest to what you measure already and you could hardly get closer to the true volume by any formula.

If this is an oil tank of a house for heating, than what normally better measures the volume filled in is measuring the flow of oil during filling, even though these flow meters also have their inaccuracy.

This is not to discourage you, but one very fundamental rule of experimental physics is "Who measures, measures rubbish". The german version of that being a pun with the words Mist (dung, muck) and mißt (he/she/it measures) sounding very similar: "Wer mißt, mißt Mist".

Bye, Olaf.
 
Well, DSummZZZ it up very short.

I see it this way: The lookup table already is a compromise of the accuracy of measured height and filled tank volume and putting that into a lookup table is maybe the easiest and best thing to do.

Then you only need to find the nearest multiple of .5 cm, which can be done by ROUND() and lookup the volumne for that height.

Bye, Olaf.
 
Why has this become YOUR guessing game?

Since this involves a non-standardized tank profile with a number of unknowns either the client provides you with the information to do the work or not.
If not then they can NOT realistically expect that the job can be done (albeit they may have to be 'educated'/informed about this).

these are examples he read from his paper-chart which is available to him

Obviously someone has an algorithm or they made definitive measurements themselves to develop the reference chart.

Either they give you the whole reference chart which you could input into a table and utilize (extrapolating between points) or you should have THEM get the algorithm from the someone.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top