Home | Mathematics | * Applied Mathematics | * Storage Tank Modeling |     Share This Page
User inquiries about TankCalc
Common questions about tank volume computation

Copyright © 2009, Paul LutusMessage Page

Poor accuracy in table listing | Tank wider than tall | 80% Filling Rule

(double-click any word to see its definition)


If you have a question about TankCalc that might prove useful to others,
post it here and I will add it to this list.

Poor accuracy in table listing
I have used TankCalc for horizontal tank satisfactorily. But in vertical tank, calculated result shows same volume for different height/length. For me when I have entered Radius 94.7, Length 150 and r 11.5 all in cm. Then on computation [table generation], result for height 14 & 15 give same volume 63.34 [liters].

(The original post included a sample table with some random successive identical volume results for different height indices)
Okay, I see the problem. Please increase the number of cylinder integration steps to 400 (or more). The higher the number of integration steps, the more accurate the result. Go to the "Tune" tab and change the entry for "Cylinder integration steps" to a value substantially greater than 100.

In general, if you see table results of questionable accuracy or (as in this case) paired volume results in a table, changing the number of integration steps should be the first applied remedy.

The only reason for the default value of 100 is that this produces satisfactory accuracy in the majority of cases with reasonable program speed. Higher integration step entries improve accuracy but take more time to generate a table. If you have a fast computer, this issue may never come up for you, and you may want to use a larger default value.

The worst case involves the use of the slower inverse computation mode (height from volume) and a large integration steps entry. In such a case I might be offering the opposite advice — a smaller entry to save computation time.
Tank wider than tall
We are trying to calculate the volume in an Elliptical fuel vessel. The horizontal cylinder vessel Length is 2560mm. The vertical diameter is 1470mm, the Horizontal diameter is 2255mm, the Hemisphere caps left and right are, radius "r" is 175mm. Can this type of vessel be calculated on your tank calculator? Yes, sort of. Take the vertical dimension of the tank and perform all the usual computations. Then create a scaling factor (sf) created by dividing the horizontal by the vertical dimension:

sf = h/v (greater than one).

Then create a table of TankCalc results and multiply all the volume results by this ratio.

Worked example:
"The horizontal cylinder vessel Length is 2560mm. The vertical diameter is 1470mm, the Horizontal diameter is 2255mm, the Hemisphere caps left and right are, radius "r" is 175mm."

TankCalc entries for this tank (all millimeters):
  • L = 2560
  • R = 735 (diameter divided by 2)
  • r = 175 (both left and right)
Full volume result: 4740.75 liters

Scaling Factor sf = 2255 / 1470 = 1.534

Adjusted full volume result: 7272.31 liters (4740.75 * 1.534)

Table procedure: Create a table of results in TankCalc, transfer the table to a spreadsheet, and multiply the volume results by the computed correction factor.
TankCalc versions 7.3 and higher have a scaling factor entry to accommodate this tank type. Use the above instructions, but enter the computed ratio into TankCalc itself.
80% Filling Rule

[ This exchange, which continues a conversation on other topics, refers to the liquid-phase storage safety rule that requires no more than 80% fill by volume. ]

Yes — with regard to the "80% filling rule.....", I would appreciate it if you could advise how to set this up. Okay. The first thing you need to know is that the equations I have written that give a volume for a sensor height have no reciprocal symbolic form — they can't be restated to provide a sensor height for a given volume. But that's exactly what we need. So we use a method called Root Finding internal to TankCalc. Root finding is a numerical and approximate method, but you can get any degree of numerical accuracy you require.

For this example, and just so we get the same numerical results, go to the TankCalc "Input" tab and select "Defaults" just under the tank picture. This resets all values to their defaults.

Now go to the "Compute" tab and click the "Height -> Volume" button at the upper left. The last result, at the bottom of the table, is for a completely filled tank, i.e. 100%, and for a sensor height of 72 inches that volume is 2115.07 gallons.

With a hand calculator, compute 80% of 2115.07 = 1692.06. Now, to get sensor heights for volumes, change modes by pressing the "Volume -> Height" button at the upper left. This mode uses the aforementioned root finder method to acquire sensor heights for volume arguments.

Now enter 1692.06 into the window that should be marked "Enter volume gallons" at the bottom of the display and press Enter. Directly adjacent to this entry will appear "53.20", which is the sensor height for 80% volume.

To test the accuracy of this result, reverse the process — press "Height -> Volume" again at the upper left to return to the default mode, and enter 53.20 into the single result window at the bottom of the display marked "Enter Height Inches" and press Enter. The result will be 1691.93.

Notice that this result isn't exactly the same as the original argument — this arises from the errors inherent in the numerical root finding method. I mention this now for two reasons — one, this error can be reduced, but two, that refinement has little practical significance, because it's already a small fraction of one percent:

1692.06 / 1691.93 = 1.000077

You can get a more accurate result by changing the "Cylinder integration steps", "End cap integration steps" and "Root finder epsilon" values on the "Input" tab, as well as the number of displayed decimal places, but there's really no point, because the default result is already much better than one can expect to get using field-acquired tank measurements and sensor readings.

The important thing about this exercise is not getting a particular result, but understanding why it works. Also it's important to know that most spreadsheets and programming languages can be configured to provide a root finder-derived result. So if you take the equations for tank volume from sensor height and put them into another environment, you should be able to get root-finder numerical results there also.

Home | Mathematics | * Applied Mathematics | * Storage Tank Modeling |     Share This Page