One of the new programs in the software library (Thanks, Don, for pointing them out to us) is a small HP-42S program that calculates the volume of a horizontal cylindrical tank, given its current fluid level, by Ken Delsnider:

http://www.hpmuseum.org/software/42tankv.htm

Perhaps the following could be a companion program to it, but some discussion is required. Years ago at work my chief, also an electrical engineer, gave me a book on Fluid Mechanics and asked me to try to solve this problem. I had not been an outstanding student in that discipline (quite the contrary!), but after an hour or so I managed to find a formula (by following a solved example for a vertical tank in the book). I tested it with a 20-liter water bottle and a small piece of a plastic pen body as a nozzle and it worked. I guess it may work for diesel oil as well (that was the fluid in the original problem) given its low viscosity, but I don't know what discrepancy one could expect when using the formula below. The constant in line 21 has to be recalculated for British units.

Formula

t = 4*L*(sqrt((D - h2)^3) - sqrt((D - h1)^3))/(3*S*c*sqrt(2*g))where

t = time do drain from upper to lower level [s]

L = length of the tank [m]

D = diameter of the tank [m]

h1 = upper level of fluid [m]

h2 = lower level of fluid [m]

S = cross-sectional area of the nozzle [m^2]

g = acceleration of gravity [m/s^2]

c = nozzle coefficient (dimensionless)

Gerson.

---------------------------------------------------------------------------------------------(*) The nozzle constant is a dimensionless constant

TIME TO DRAIN A HORIZONTAL CYLINDRICAL TANK FROM AN INITIAL LEVEL TO A FINAL LEVEL OF STORAGE00 { 103-Byte Prgm }

01>LBL "T2MT"

02 MVAR "DIA"

03 MVAR "HT"

04 MVAR "HTF"

05 MVAR "LEN"

06 MVAR "NDIA"

07 MVAR "NC"

08 MVAR "T"

09 RCL "DIA"

10 RCL- "HTF"

11 3

12 Y^X

13 SQRT

14 RCL "DIA"

15 RCL- "HT"

16 3

17 Y^X

18 SQRT

19 -

20 RCL× "LEN"

21 383330.627104 ; (8/15)*10^7/(pi*sqrt(2*9.80665))

22 ×

23 RCL "NDIA"

24 X^2

25 RCL× "NC"

26 ÷

27 RCL- "T"

28 ENDDIA = Diameter [m]

HT = Initial level of storage [m]

HTF = Final level of storage [m]

LEN = Length of tank [m]

NDIA = Nozzle diameter [mm]

NC = Nozzle constant (*)

T = Time [s]

related to the ratio of the length and diameter

of the nozzle, according to the following table:

| NCThe formula doesn't take the fluid viscosity into account. This works for water and other low viscosity fluids.

-------------

l<d | 0.62

l=2d | 0.82

l=3d | 0.82

l=12d | 0.76

l=24d | 0.73

l=48d | 0.63

l=60d | 0.60

l=100d | 0.50

Example:

Given the following data, calculate the time to empty a horizontal cylindrical water tank.

DIA = Diameter 1.488 m

HT = Initial level of storage 0.177 m

HTF = Final level of storage 0.000 m

LEN = Length of tank 2.988 m

NDIA = Nozzle diameter 50.800 mm

NC = Nozzle constant (*) 0.620

Shift SOLVER T2MT

1.488 DIA

0.177 HT

0 HFT

2.988 LEN

50.8 NDIA

0.62 NC

\/ T --> 224.808926919 seconds3600 / Shift CONVERT ->HMS --> 00h 03m 45s

---------------------------------------------------------------------------------------------