HP-42S - Time to drain a horizontal cylindrical tank - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: HP-42S - Time to drain a horizontal cylindrical tank (/thread-213222.html) |
HP-42S - Time to drain a horizontal cylindrical tank - Gerson W. Barbosa - 03-03-2012 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] Gerson.
---------------------------------------------------------------------------------------------(*) The nozzle constant is a dimensionless constant 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. Example:
Given the following data, calculate the time to empty a horizontal cylindrical water tank. DIA = Diameter 1.488 m
Re: HP-42S - Time to drain a horizontal cylindrical tank - Werner - 03-03-2012 As far as the TANK program goes, I've had a similar program in my library for several years. { 49-Byte Prgm }
Cheers, Werner Edited: 3 Mar 2012, 7:51 a.m.
Re: HP-42S - Time to drain a horizontal cylindrical tank - Gerson W. Barbosa - 03-03-2012 In my original problem I used this formula, derived from yours: V = L*(D^2*ACOS(1 - 2*H/D)/4 + (H - D/2)*sqrt(H*(D - H)))It has the advantage of using only one transcendental function, but it's longer. The following uses your formula and is slightly shorter, but takes up four more bytes:
00 { 53-Byte Prgm } Cheers,
Gerson.
|