Post Reply 
(41) Bulk Cylindrical Tank
10-13-2018, 11:38 AM (This post was last modified: 10-13-2018 11:39 AM by SlideRule.)
Post: #21
RE: (41) Bulk Cylindrical Tank
some excerpts (pgs 130-132 w/ illustrations) from the second edition;

[attachment=6451] [attachment=6450] [attachment=6449]

The illustrations add additional information.

Acquiring full access to the second edition is forthcoming.

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
10-13-2018, 11:43 AM
Post: #22
RE: (41) Bulk Cylindrical Tank
(10-11-2018 07:38 PM)Dieter Wrote:  The volume calculation is even easier, the formula is quite short.

We can use this equation for the ellipse:

\(\frac{x^2}{a^2}+\frac{y^2}{b^2}=1\)

When we set \(a=r\) and \(b=v_0\) this becomes:

\(\frac{x^2}{r^2}+\frac{y^2}{v_0^2}=1\)

From which we conclude:

\(x^2=r^2\left ( 1-\frac{y^2}{v_0^2} \right )\)

Then \(\pi x^2\) is the area of the surface of the water.
We can integrate that to get the volume of the water in the dome:

\(
\begin{align*}
V_d(v) &= \int_{0}^{v}\pi x^2dy \\
&= \pi \int_{0}^{v}r^2\left ( 1-\frac{y^2}{v_0^2} \right )dy \\
&= \pi r^2 \left ( y-\frac{y^3}{3v_0^2} \right )\bigg|_{y=0}^{y=v} \\
&= \pi r^2 \left ( v-\frac{v^3}{3v_0^2} \right ) \\
&= \pi r^2 v \left ( 1-\tfrac{1}{3}(\frac{v}{v_0})^2 \right )
\end{align*}
\)

In the given example \(r=72"\), \(h_0=12"\), \(d=180"\) and \(v_0=36"\)
For the JUICE LEVEL \(H_t=195"\) we get \(v=H_t-d-h_0=195"-180"-12"=3"\).
Thus: \(V_d(3)=211.0171\ gal\)
The rest of the tank is \(\pi r^2(d+\tfrac{h_0}{2})=13113.4157\ gal\).
Thus we end up with \(13324.4328 \ gal\).

For the JUICE LEVEL \(H_t=198"\) we get \(v=H_t-d-h_0=198"-180"-12"=6"\).
Thus: \(V_d(6)=419.0966\ gal\)
Here we end with \(13532.5124\ gal\).

Both results agree with Dieter's previous post#14.

Here's a program for the HP-42S:
Code:
00 { 38-Byte Prgm }
01▸LBL "DOME"
02 1
03 RCL ST Y
04 RCL÷ "v0"
05 X↑2
06 3
07 ÷
08 -
09 ×
10 RCL "r"
11 X↑2
12 ×
13 PI
14 ×
15 RCL÷ "in3/gal"
16 END

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
10-13-2018, 12:15 PM
Post: #23
RE: (41) Bulk Cylindrical Tank
(10-12-2018 10:41 PM)Thomas Klemm Wrote:  Instead this formula can be used:

\(V(x)=\left [ x(\pi-\cos^{-1}x)+\tfrac{1}{3}\sqrt{1-x^2}(2+x^2) \right ]Hr^2\)

For \(x=0\) this leads to \(V(0)=\tfrac{2}{3}Hr^2\) which surprised me because it doesn't contain \(\pi\).
This means the slanted part of the cylinder is exactly \(\frac{1}{6}\) of the square box that envelops it.

Kind regards
Thomas
Find all posts by this user
Quote this message in a reply
10-13-2018, 12:57 PM
Post: #24
RE: (41) Bulk Cylindrical Tank
(10-13-2018 09:37 AM)Dieter Wrote:  But I still don't understand why it's wrong. The liquid surface is a circle with a chopped of segment. If this area is known, why is the volume not area · h/2 ?

Imagine the situation where \(x=0\): The body formed by the water is completely different from the body that lies beneath.

[Image: attachment.php?aid=6452]

However for a rectangular cuboid both are the same. I assume that's the reason for the misconception.

Quote:You should add a RAD statement to make sure that radians mode is set.

You are right of course. I happen to just forget about that.

Quote:Maybe you can finally post the complete formula in terms of the variables in the paper, i.e. with h and h0 instead of x and H.
H = h0/2 and x = 2h/h0 – 1.

I suggest to use Wolfram|Alpha instead. You can use /. x = … to replace \(x\) with something in a formula.

HTH
Thomas


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
10-13-2018, 01:41 PM
Post: #25
RE: (41) Bulk Cylindrical Tank
Thanks Albert, but I think you misunderstand my confusion. I understand the formulas. It's the HP41C program at the end of the paper that I'm having trouble with.

(10-12-2018 10:34 PM)Albert Chan Wrote:  
(10-12-2018 08:34 PM)Dieter Wrote:  For the record: with R = 90" the results are 13318 and 13509 gallons.
Assuming an elliptical dome top yields 13324 and 13532 gallons.

The numbers look good ...
To get the upper limit, assume cylindrical tank.

1" slice = Pi * 72² * 1 / 231 = 70.50 gallons

195" - 6" => 189 * 70.50 ~ 13325 gallons
198" - 6" => 192 * 70.50 ~ 13536 gallons
---

Hi, David

I am guessing you have no problem with Eqn 25-13 first term.
It is just cyclindrical tank + slant bottom volume.

Volume of spherical cap = Pi h^2 (R - h/3), where h measured from top of cap.

So, volume of liquid in the cap
= volume of cap - volume of air
= Pi v0^2 (R - v0/3) - Pi h^2 (R - h/3)

We like to measure from the cap bottom. So, let v = v0 - h, we get h = v0 - v
Factor out the Pi, add unit conversion factor 231 in^3/gal ... you get the second term.

Using above R=90" example, and do the 198" level calculation:
First term = Pi * 72² * (180 + 12/2) = 3029199 in^3

h = 12 + 180 + 36 - 198 = 30 in
Volume of air = Pi h^2 (R - h/3) = Pi * 30² * (90 - 30/3) = 226195 in^3
Volume of cap = Pi v0^2 (R - v0/3) = Pi * 36² * (90 - 36/3) = 317577 in^3

Total volume = 3029199 + 317577 - 226195 = 3120581 in^3 = 13509 gallons
Find all posts by this user
Quote this message in a reply
10-13-2018, 04:02 PM (This post was last modified: 10-13-2018 04:10 PM by Dieter.)
Post: #26
RE: (41) Bulk Cylindrical Tank
(10-13-2018 01:41 PM)David Hayden Wrote:  Thanks Albert, but I think you misunderstand my confusion. I understand the formulas. It's the HP41C program at the end of the paper that I'm having trouble with.

The basic problem (yours as well as mine) is the fact that the program in appendix C is only loosely related to the formulas in chapter 25, including the example in table 25–3. The program expects the hatch height and hatch depth (the latter is not mentioned anywhere before) while there is no input for the radius R that is given in the example. I wonder if R is somehow calculated from the hatch position (cf. line 44...79). The program comment even says that the user enters "...the distances from the hatch to the juice level" (sic!) and not from the bottom – ?!?

What about a completely new program that implements some insights of this thread? I did a version for the HP41 that accepts the tank diameter and the heights of the three tank sections and returns the volume. The units can be metric (centimeters and liters) or imperial (inches and gallons), and the calculation can assume either an elliptical or a shperical dome top. In the latter case the calculated radius R is displayed and may be overwritten by the user. This way you can get the same values as in table 25–3. ;-) Except for the slant bottom part: Here I implemented the formula by Thomas Klemm, which I suppose is the correct one. OK, I used a slightly modified version that works in any angular mode so that the current user setting is maintained.

If someone is interested I'll do some more tests and post it here.

Dieter
Find all posts by this user
Quote this message in a reply
10-13-2018, 04:20 PM
Post: #27
RE: (41) Bulk Cylindrical Tank
(10-13-2018 09:37 AM)Dieter Wrote:  
(10-12-2018 10:41 PM)Thomas Klemm Wrote:  The slanted cylinder isn't a slanted cuboid. Top and bottom are not the same.
Thus we can't simply divide the whole volume by 2.

Instead this formula can be used:

\(V(x)=\left [ x(\pi-\cos^{-1}x)+\tfrac{1}{3}\sqrt{1-x^2}(2+x^2) \right ]Hr^2\)

The liquid surface is a circle with a chopped of segment. If this area is known, why is the volume not area · h/2 ?

Volume = area * h/2 is just an estimate. Actual volume require integration.

Let x = 2 h/h0 - 1, we get tan(θ) = r/1 = (r-y)/(1+x), thus y = -r x

Substitute y = -r x in equation 25-1, Vb = ∫ Aseg dx, you get this:

\(V(x)=\left [ {\pi x} / 2 + x sin^{-1}x + \sqrt{1-x^2}(2+x^2)/3 \right ]Hr^2\)

Result is in ArcSin , but is equivalent, since acos(x) = Pi/2 - asin(x)
---

ArcSin form is actual better for numerical estimation.
Except for the first term, others are even function, and can approximate as this:

\(V(x) = \left [ 1.571 x+ 0.667 + x^2 - 0.094 x^4 \right ]Hr^2\)

The curve match very well to exact V(x): http://m.wolframalpha.com/input/?i=plot+...om+-1+to+1

This is calculated volume (r = 72", H=12/2=6"), exact vs approx:
Code:
Inches   Exact   Approx (gallons)
3.       16.96    16.92
6.       89.77    89.81
8.      175.09   175.13
12.     423.01   423.34
Find all posts by this user
Quote this message in a reply
10-13-2018, 06:40 PM
Post: #28
RE: (41) Bulk Cylindrical Tank
(10-13-2018 11:43 AM)Thomas Klemm Wrote:  Both results agree with Dieter's previous post#14.

Sure, I used the same approach (with x and y swapped) and got the same result. ;-)

So the calculation is quite easy and straightforward. Which brings us back to the question whether an elliptical dome is realistic or not, better or worse than calculating a radius for a shperical dome top. If in real life an elliptical top is nonsense I'll drop that part of my already mentioned HP41 program.

Dieter
Find all posts by this user
Quote this message in a reply
10-13-2018, 06:42 PM
Post: #29
RE: (41) Bulk Cylindrical Tank
(10-13-2018 01:41 PM)David Hayden Wrote:  I understand the formulas. It's the HP41C program at the end of the paper that I'm having trouble with.

There's a typo in formula (25-11): the square on \(v_0\) is missing.
Instead it should be:

\(V_{seg\ sphere} = \pi v_0^2(3R - v_0)/693\)

Cf. Spherical Cap

This formula is then used twice. Once with \(h=v_0\) and then again with \(h=v_0-v\). The difference between them is formula (25-12).
In both cases the radius \(R\) of the sphere is used.

But we can do without: Spherical Segment

\(V=\tfrac{1}{6}\pi h(3a^2+3b^2+h^2)\)

We know \(a=r\) and \(h=v\) but we have to calculate \(b\).

Quote:The hatch depth is the distance from the lower lip of the hatch to the edge of the tank.

I assume that this is the horizontal distance from the hatch to the circumference of the cylinder.

In lines 44-48 the distance \(v\) from the upper border of the cylinder to the juice level is calculated.
In lines 49-53 this value is then multiplied by the hatch depth and divided by the hatch height.
We could interpret this as an approximation of the difference \(\Delta r = r - b\).
At least something like this is calculated in lines 56-58.

However there are these strange X≠0? commands and I assume that the X<>Y command in line 55 is a bug.
Or then it should rather be X=0? instead of X≠0? in the line prior to that.

Lines 59-68 calculate \(r^3-b^3=(r-b)(r^2+rb+b^2)=\Delta r(r^2+rb+b^2)\).
In line 69-70 this is multiplied by the hatch height and then in lines 75-77 it's divided again by the hatch depth.

Thus we have a somewhat convoluted way to calculate \(v(r^2+rb+b^2)\).
The third term \(\tfrac{1}{3}v^2\) is missing but we might consider \(v\) rather small compared to \(r\) and \(b\) and thus neglect the term.
But there's still the mixed term \(rb\). What should we do with that?

Lines 80-98 just calculate the rest of the tank.

Maybe I could shed some light on that program and the formulas that were used but I must admit that I still don't fully understand it.

Kind regards
Thomas
Find all posts by this user
Quote this message in a reply
10-13-2018, 07:04 PM
Post: #30
RE: (41) Bulk Cylindrical Tank
(10-11-2018 10:53 PM)Albert Chan Wrote:  The slant bottom equation can also rephrase as fractions of a cylinder volume (radius r, height h)

Let x = (2 h/h0 - 1), (so that x goes from -1 to 1),
Substitute x for equation 25.7, we get:

Vb / (Pi r^2 h / 231) = f(x) = 1/4 + (x*sqrt(1-x*x) + asin(x)) / (2 Pi)

(…)

Update: article volume formula is close, but wrong:
https://arachnoid.com/tank_slope_bottom/
http://www.hpmuseum.org/forum/thread-115...#pid105822

(10-13-2018 04:20 PM)Albert Chan Wrote:  Volume = area * h/2 is just an estimate.

I would call that neither close nor an estimate.
Here's the graph of both functions:

[Image: attachment.php?aid=6455]

Cheers
Thomas

PS: I scaled your function by the factor \(2\pi\) so that we can compare them.


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
10-13-2018, 07:37 PM (This post was last modified: 10-13-2018 08:19 PM by Albert Chan.)
Post: #31
RE: (41) Bulk Cylindrical Tank
(10-13-2018 07:04 PM)Thomas Klemm Wrote:  I scaled your function by the factor \(2\pi\) so that we can compare them.

Factor were applied wrong.
f(x) was fractions of cylinder volume, radius r, height h
Using your notation, x = 2 h/h0 - 1 = h/H - 1, so h = (x + 1) H

V(x) = f(x) * Pi r^2 h = (f(x) * Pi (x + 1)) r^2 H

For comparison, correct scaling factor should be (x + 1) Pi.
Find all posts by this user
Quote this message in a reply
10-13-2018, 08:12 PM (This post was last modified: 10-13-2018 08:12 PM by Thomas Klemm.)
Post: #32
RE: (41) Bulk Cylindrical Tank
(10-13-2018 07:37 PM)Albert Chan Wrote:  For comparison, correct scaling factor should be (x + 1) Pi.

This is much closer now:
[Image: attachment.php?aid=6456]

Please excuse that I didn't grasp the meaning of your function.
However for \(x=0\) there's still the difference between \(\frac{\pi}{4}\) and \(\frac{2}{3}\) which is about 17.8%.
But this might not be a problem in citrus juice management.

Cheers
Thomas


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
10-13-2018, 08:51 PM (This post was last modified: 10-16-2018 02:10 PM by Albert Chan.)
Post: #33
RE: (41) Bulk Cylindrical Tank
Hi, Thomas Klemm

I define f(x) this way because the curve can be fit nicely as a straight line.
With your corrected V(x), f(x) plot appeared amazingly straight

With slanted bottom 30% full or more, a very simple rule-of-thumb can be used.

Vb = Pi r^2 h f(x) ~ Pi r^2 h (57% (h/h0) - 7%))

Example, for h=8", h0=12", r=72", effective height = 8 * (57% (8/12) - 7%) = 2.48"

Vb = Pi * 72² * 2.48 = 40389 in^3 = 175 gallons (match post #27)
Find all posts by this user
Quote this message in a reply
10-13-2018, 10:35 PM
Post: #34
RE: (41) Bulk Cylindrical Tank
No reply, yet, from the author: til then, I rediscovered the article Simple Program Calculates Partial Liquid Volumes in Vessels in the Technology section of Oil & Gas Journal, 13 April 1992; pgs 54-57, by Pierre Koch which describes an HP-41 program to calculate volumes for a range of storage tanks. Although the program listing was not included with the article, the four attached figures / illustrations seem appropriate. Hopefully, they add value to the current discussion.
[attachment=6460] [attachment=6459] [attachment=6458] [attachment=6457]
BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
10-14-2018, 01:47 PM
Post: #35
RE: (41) Bulk Cylindrical Tank
Here's another approach for the HP-42S using numeric integration.
For the dome an ellipsoid is used.

Code:
00 { 60-Byte Prgm }
01▸LBL "AREA"
02 MVAR "t"
03 RCL "t"
04 RCL "h0"
05 X<Y?
06 GTO 00
07 ÷
08 2
09 ×
10 1
11 -
12 +/-
13 ACOS
14 LASTX
15 RCL ST Y
16 SIN
17 ×
18 -
19 RTN
20▸LBL 00
21 -
22 RCL "d"
23 X<Y?
24 GTO 00
25 PI
26 RTN
27▸LBL 00
28 -
29 RCL÷ "v0"
30 X↑2
31 1
32 X<>Y
33 -
34 PI
35 ×
36 END

Code:
00 { 44-Byte Prgm }
01▸LBL "TANK"
02 PGMINT "AREA"
03 STO "ULIM"
04 CLX
05 STO "LLIM"
06 INTEG "t"
07 RCL "r"
08 X↑2
09 ×
10 RCL÷ "in3/gal"
11 END

Make sure to initialise these variables and set the calculator to RAD mode:
Code:
h0=            12.0000
d=            180.0000
v0=            36.0000
r=             72.0000
in3/gal=      231.0000

Set the accuracy ACC to something reasonable like \(10^{-8}\).

Examples

3 XEQ "TANK"
16.9551

8 XEQ "TANK"
175.0894

112 XEQ "TANK"
7,473.2363

195 XEQ "TANK"
13,324.4312

198 XEQ "TANK"
13,532.5136

Compare this to the examples given in table 25-3 of the paper:

\(
\begin{matrix}
\textbf{Measurement #} & \textbf{H (total vertical level)} & \textbf{# Gallons} \\
1 & 3" & 21 \\
2 & 8" & 200 \\
3 & 112" & 7,473 \\
4 & 195" & 13,284 \\
5 & 198" & 13,444
\end{matrix}
\)

Kind regards
Thomas
Find all posts by this user
Quote this message in a reply
10-14-2018, 03:47 PM (This post was last modified: 10-14-2018 03:55 PM by Albert Chan.)
Post: #36
RE: (41) Bulk Cylindrical Tank
(10-13-2018 06:40 PM)Dieter Wrote:  So the calculation is quite easy and straightforward. Which brings us back to the question whether
an elliptical dome is realistic or not, better or worse than calculating a radius for a shperical dome top.

I like the elliptical dome approach, but I also like graphically matching dome volume.
So, I propose combining them ...

Let unit of 1" cyclinder volume = "slice = Pi * 72² * 1 = 5184 Pi in³ = 70.50 gallon
Assuming Kimball graphically fitted R were correct:

Vdome = volume of cap with R = 78, h = 78 - sqrt(78² - 72²) = 48
= Pi h^2 (R - h/3)
= 142848 Pi in³ (= 1943 gallon)
= 27.56 "slice

Since v0 = 36", ratio of 27.56/36 = 77% suggest the dome is very flat.
Even flatter than a elliptical dome (ratio = 2/3 ~ 67%)

To keep tank total height and total volume the same, adjust dome dimension.
Solve for a new v0, (throw away old v0 of 36"):

2/3 v0 = 27.56" + (v0 - 36")
v0 = 3 * (36" - 27.56") = 25.33"

Original tank: height = 12 + 180 + 36 = 228", volume = 6 + 180 + 27.56 = 213.56 "slice = 15056 gallon
Adjusted tank: height = 12 + 190.67 + 25.33 = 228", volume = 6 + 190.67 + 2/3*25.33 = 213.56 "slice

Example: liquid level of 220" (almost full)
v = 220 - 12 - 190.67 = 17.33", effective height = v*(1 - (v/v0)²/3) = 14.63"
Volume = 6 + 190.67 + 14.63 = 211.30 "slice = 14897 gallon
Find all posts by this user
Quote this message in a reply
10-14-2018, 10:01 PM
Post: #37
RE: (41) Bulk Cylindrical Tank
(10-14-2018 03:47 PM)Albert Chan Wrote:  I also like graphically matching dome volume...
In the first (leftmost) graphic attachment from Citrus Processing {pg 132} in post #21, the author's position of measuring the curve of the dome and transposing it to paper and graphically measuring the radius fig. 4-19 and your position seems to have a high degree of agreement.

BEST!
SlideRule
Find all posts by this user
Quote this message in a reply
10-14-2018, 10:15 PM (This post was last modified: 10-15-2018 07:50 AM by Dieter.)
Post: #38
RE: (41) Bulk Cylindrical Tank
(10-14-2018 01:47 PM)Thomas Klemm Wrote:  Here's another approach for the HP-42S using numeric integration.
For the dome an ellipsoid is used.
...

3 XEQ "TANK"
16.9551

8 XEQ "TANK"
175.0894

112 XEQ "TANK"
7,473.2363

195 XEQ "TANK"
13,324.4312

198 XEQ "TANK"
13,532.5136

My HP67 program and the HP41 version return the same values. OK, the last two results differ in the third decimal.

(10-14-2018 01:47 PM)Thomas Klemm Wrote:  Compare this to the examples given in table 25-3 of the paper:

The paper uses a "different" formula for the slant bottom section and assumes a spherical dome top with a given radius (which is different from the calculated radius). I can reproduce the results for the top section if mý HP41 program is set to assume a spherical dome top and the calculated radius is overwritten by R=78" as assumed in the paper.

Dieter
Find all posts by this user
Quote this message in a reply
10-14-2018, 10:50 PM (This post was last modified: 10-14-2018 10:52 PM by Albert Chan.)
Post: #39
RE: (41) Bulk Cylindrical Tank
(10-13-2018 06:42 PM)Thomas Klemm Wrote:  Spherical Segment

\(V=\tfrac{1}{6}\pi h(3a^2+3b^2+h^2)\)

We know \(a=r\) and \(h=v\) but we have to calculate \(b\) ...

Solving for b, Spherical Segment Volume is actually very simple.

Let d be shortest distance from sphere center to dome bottom (call this hatch depth ?)

b² = R² - (d + h)² = (r² + d²) - (d² + 2 d h + h²) = r² - 2 d h - h²
V = Pi h/6 (3r² + 3r² - 6 d h - 3h² + h²)

V = Pi h (r² - d h - h²/3)

Example, same tank, but assumed Spherical Segment Dome Top:
Using above formula, with Vdome = 1943 gallon, calculated d = 21.78" (R = 75.22")
Graphical fitted R is still useful. Its longer length is easier to measure. d can be easily calculated.

Code:
level  h   Liquid Volume (gallon)
195"   3"  13322
198"   6"  13525 
220"  28"  14756
Find all posts by this user
Quote this message in a reply
10-15-2018, 12:33 PM (This post was last modified: 10-15-2018 01:10 PM by Dieter.)
Post: #40
RE: (41) Bulk Cylindrical Tank
(10-14-2018 10:50 PM)Albert Chan Wrote:  Let d be shortest distance from sphere center to dome bottom (call this hatch depth ?)

"Hatch depth" ?!? Where do you see a hatch here ?-)

(10-14-2018 10:50 PM)Albert Chan Wrote:  Example, same tank, but assumed Spherical Segment Dome Top:
Using above formula, with Vdome = 1943 gallon, calculated d = 21.78" (R = 75.22")

1. Where do you get the 1943 gallons from? Why is this the volume of the dome top section?

2. If the dome top section is actually spherical there is exactly one solution: the radius R must be 90".
Take a look at this sketch which should be quite exactly to scale:

[Image: attachment.php?aid=6470]

Red solid line: elliptical dome top
Blue dotted line: spherical dome top

Now imagine a radius of 75,22". That's not much more than the tank radius r, so the dome top section would be much higher than v0 = 36" (53,4", to be precise). I do not think this makes any sense. But maybe I am misunderstanding your point: how would you say the 75,22" dome top would look like? A sketch would be helpful.

Dieter


Attached File(s) Thumbnail(s)
   
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 9 Guest(s)