Calculation of gas sold


Thread Starter

Randy Kelton

I am trying to write a program for the local convenience store. When they read the amount of sales on the pump each night, this program will calculate the numbers of gallons sold so they can check against their reading as error correction.

Now, when they stick the tanks, I want to convert the stick reading to gallons so they dont have to use a printed list and so that the program can predict the stick reading from the gallons sold.

I have been having problems locating a formula and have derived a couple, but they are cumbersome.

I have to admit, my math is about 30 years rusty. I would appreciate anything you can do to help.

I am writing this in an Excel spread sheet and need to be able to write the formula to a cell.

Thanks for any help you can give.

[email protected]

Steve Bailey

To calculate the volume of gas in the tank from the stick reading, you need to know the dimensions of the tank. A simpler solution would be to put the printed lookup table that they're currently using into the spreadsheet.
Correct me if I'm wrong.
I understand the convenience store has tanks burried, they are cylindrical, horizontal. Before closing, they read the total sold as accumulated from the pumps and they check versus the reading of the stick. This reading obviusly is interpreted via tables translating level into volume. So that they know from day to day what is left as reserve, before ordering.
A friend of mine has a service station, I never
realised He was doing that !

To simplify the start, let's ignore the dished
part of the tank, because this is a particular of the tank (it can be found from the tank supplier, as it may be a noramlised tank).

The problem may then be stated:
Given the level of fluid left in cylindrical tank , horizontaly oriented what is the volumetric content of the circular segment ?

This problem has no geometric solution. There are tables (cumbersome ...) there is also an approximation to the solution (which can be made as accurate as any table).
The formula for the area of the segment I gave in that forum to Luz Garcia , in that category under
Volume of tank. I don't see it yet because Ken has to review before.

At this point, from the level reading and the diameter and the length of the tank you just need to writte into an Excel cell. I have that in my compendium.
Pertaining to your tank c/w the end dishes, refining the formula is simple matter.

Note: This problem was solved by linearising through resistances in the analog age. Today one must go with methods that are technical (something like scratching the left ear with the left hand).
Remark: That formula is peanut in an Excel cell (I have formulas taking three editing lines).

By dimensionning the geometry of the tank, result will be in metric or at choice.
[email protected]