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
 Albert Chan Senior Member Posts: 1,785 Joined: Jul 2018
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.
06-16-2020, 12:35 PM (This post was last modified: 06-16-2020 04:07 PM by Albert Chan.)
Post: #22
 Albert Chan Senior Member Posts: 1,785 Joined: Jul 2018
RE: Volume of a bead with square hole- Program approach?
(06-11-2020 06:53 PM)Albert Chan Wrote:  Solve with A=0.1, B=0.1, we have hole = 0.00996658845699, about 2% of sphere

For small square hole, we can estimate with simple formula
For unit diameter (d=1), with square hole, b=a

XCas> k := sqrt(1-2*b*b)
XCas> hv2(b) := b*b*k/3 - atan(b*b/k)/3 + b*(1-b*b/3)*atan(b/k)
XCas> hv2(0.1) ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿// just to confirm square hole formula
→ 0.00996658845699

XCas> taylor(hv2(b),b,10)
→ b^2 - b^4/3 + -7*b^6/90 + -3*b^8/70 + -83*b^10/2520 + b^12*order_size(b)

Since taylor series all have even powers, let dimensionless x = b^2

XCas> pade(x - x^2/3 - 7*x^3/90, x, 3,3)
→ (17*x^2-30*x)/(7*x-30)

XCas> r(x) := x*(17*x-30)/(7*x-30)
XCas> r(0.1^2) ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿ ﻿// rough estimate for small 0.1×0.1 hole
→ 0.00996658870698
 « Next Oldest | Next Newest »

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