Post Reply 
Volume of a bead with square hole- Program approach?
06-10-2020, 01:33 AM
Post: #10
RE: Volume of a bead with square hole- Program approach?
Problem: What is the volume of a sphere of radius r, with a rectangular hole (with edge lengths x and y) passing through the center?

[Image: h4UN7Gd.png]
Figure 1: Cross-sections through the center of the sphere, with horizontal and vertical spherical caps and their intersections.
Solution. The remaining volume of the sphere, with the rectangular hole removed, can be calculated as follows

\( V = 2V_{1} + 2V_{2} - 4\left ( V_x + V_y \right ) \)

where \(V_1\), \(V_2\), \(V_x\) and \(V_y\) are the volumes corresponding to the cross-section areas in Figure 1.

With the formulas for the individual volumes derived in the following sections, and with \( b = \sqrt{r^2-\frac{x^2+y^2}{4}} \) , the formula for the total volume is

\(V = \frac{2\pi}{3}\left ( r-\frac{x}{2} \right )^2\left ( 2r+\frac{x}{2} \right )+\frac{2\pi}{3}\left ( r-\frac{y}{2} \right )^2\left ( 2r+\frac{y}{2} \right )-\frac{2bxy}{3}-\frac{8r^3}{3}\left ( arctan\left ( \frac{bx}{ry} \right )+arctan\left ( \frac{by}{rx} \right ) \right )-2x\left ( \frac{x^2}{12}-r^2 \right )arctan\left ( \frac{2b}{y} \right )-2y\left ( \frac{y^2}{12}-r^2 \right )arctan\left ( \frac{2b}{x} \right ) \)

[Image: GuWOAWM.png]
Figure 2: Cross-section through the center of the sphere, with α and d as in the paper

Volumes \(V_1\) and \(V_2\). \(V_1\) and \(V_2\) correspond to spherical caps (see e.g. Wikipedia
page on spherical caps
), with heights \( h_1 = r − \frac{x}{2} \) and \( h_2 = r − \frac{y}{2} \) , respectively. Their volumes are

\(V_1=\frac{\pi h_1^2}{3}\left ( 3r-h_1 \right )=\frac{\pi}{3}\left ( r-\frac{x}{2} \right )^2\left ( 2r+\frac{x}{2} \right )\)

\(V_2=\frac{\pi h_2^2}{3}\left ( 3r-h_2 \right )=\frac{\pi}{3}\left ( r-\frac{y}{2} \right )^2\left ( 2r+\frac{y}{2} \right )\)

Volumes \(V_x\) and \(V_y\). A formula for the volume of segments of this type was derived in Section 4.3 of the paper Exact calculation of the overlap volume of spheres and mesh elements by Severin Strobl, Arno Formella and Thorsten P ̈oschel (Journal of Computational Physics, Volume 311, 2016, link). The relevant section is inserted at the end of this document (Figure 3).

In our case, sin(α), cos(α) and d can be calculated by considering the small blue triangle (see Figure 2): The edge lengths of this triangle are x2 and y2 and the angle between them is a right angle, so

\(sin\left ( \alpha \right )=\frac{y}{2d}\;\;, cos\left( \alpha \right)=\frac{x}{2d}\;\; and\;\;d=\sqrt{\frac{x^2+y^2}{4}}\)

With these equations, we can translate the notation of equation (5) of the paper into terms involving only r, x and y (and, for simplicity of notation, b):

\(a=d\;sin\left ( \alpha \right )\;=\frac{y}{2}\;,\)

\(b = \sqrt{r^2-d^2}\;=\;\sqrt{r^2-\frac{x^2+y^2}{4}}\;,\)

\(c=d\;cos\left ( \alpha \right )=\;\frac{x}{2}\)

\(V_y=\frac{abc}{3}+a\left ( \frac{a^2}{3}-r^2 \right )arctan\left ( \frac{b}{c} \right )+\frac{2r^3}{3}arctan\left ( \frac{b\;sin\left( \alpha \right)}{r\;cos\left ( \alpha \right )} \right ) =\frac{bxy}{12}+\frac{y}{2}\left ( \frac{y^2}{12}-r^2 \right )arctan\left ( \frac{2b}{x} \right )+\frac{2r^3}{3}arctan\left ( \frac{by}{rx}\right )\)

with \(b = \sqrt{r^2-\frac{x^2+y^2}{4}}\)

By swapping x and y in the formula for Vy, we can derive the corresponding formula for \(V_x\):

\(V_x=\frac{bxy}{12}+\frac{x}{2}\left ( \frac{x^2}{12}-r^2 \right )arctan\left ( \frac{2b}{y} \right )+\frac{2r^3}{3}arctan\left ( \frac{bx}{ry}\right )\)

with \(b = \sqrt{r^2-\frac{x^2+y^2}{4}}\)

Relevant section (4.3) of Exact calculation of the overlap volume of spheres and mesh elements by Severin Strobl, Arno Formella and Thorsten Po ̈schel (Journal of Computational Physics, Volume 311, 2016, link)

HP48GX, HP42s and DM42.
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? - DM48 - 06-10-2020 01:33 AM



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