Post Reply 
Volume of a bead with square hole- Program approach?
06-11-2020, 06:53 PM (This post was last modified: 06-16-2020 04:16 PM by Albert Chan.)
Post: #21
RE: Volume of a bead with square hole- Program approach?
Here is a simplied version of Werner's code, assumed diameter = 1

I like dimensionless version because you can get a sense of results.
Example, with diameter of 1, sphere volume = Pi/6 ≈ 0.523598775598 ≈ ½
You can sense how big the hole is ...

Also, A, B is limited to inside a unit circle.

Code:
00 { 83-Byte Prgm }
01▸LBL "RB1"
02 MVAR "A"
03 MVAR "B"
04 MVAR "V"
05 1
06 RCL "A"
07 X↑2
08 -
09 RCL "B"
10 X↑2
11 -
12 SQRT
13 LSTO "K"
14 RCL "A"
15 RCL× "B"
16 STO× ST Y
17 RCL÷ "K"
18 ATAN
19 -
20 3
21 ÷
22 RCL "A"
23 RCL "B"
24 XEQ 10
25 RCL- "V"
26 RCL "B"
27 RCL "A"
28▸LBL 10
29 RCL÷ "K"
30 ATAN
31 X<>Y
32 STO× ST Y
33 X↑2
34 3
35 -
36 6
37 ÷
38 ×
39 -
40 END

Example, to get sphere - hole, diameter = 20, hole = 2x2

Solve with A=0.1, B=0.1, we have hole = 0.00996658845699, about 2% of sphere

Pi/6 - V = 0.513632187141

Scale up by D^3 => sphere - hole = 0.513632187141 * 20^3 = 4109.05749713

Update:
Perhaps we should compare volume against maximum possible volume
Solve with sphere - 4 caps, or simply solve with A = B = √(0.5), we get

V(max) ≈ 0.402001836518

So, above hole ≈ 2½ % of maximum possible volume.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Volume of a bead with square hole- Program approach? - Albert Chan - 06-11-2020 06:53 PM



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