Sinking Depth
Theory: Sinking Depth of a Spherical Object in a Fluid
Introduction
When a homogeneous spherical object of radius $ R $ and density $ \rho_s $ is placed in a fluid of density $ \rho_f $, it sinks until the buoyant force balances its weight. The goal is to determine the depth $ h $ to which the sphere submerges.
Forces Acting on the Sphere
Gravitational Force (Weight of the Sphere):
\[W = m g = \rho_s V_s g\]where $ V_s = \frac{4}{3} :nbsphinx-math:`pi `R^3 $ is the total volume of the sphere.
Buoyant Force (Archimedes’ Principle):
\[B = \rho_f V_f g\]where $ V_f(h) $ is the volume of the sphere submerged in the fluid, given by:
\[V_f(h) = \frac{\pi h^2 (3R - h)}{3}\]
Equilibrium Condition
At equilibrium, the forces balance:
\[B = W\]
Expanding:
\[\rho_f \cdot V_f(h) \cdot g = \rho_s \cdot V_s \cdot g\]
Canceling $ g $:
\[\rho_f V_f(h) = \rho_s V_s\]
Substituting the volume expressions:
\[\rho_f \frac{\pi h^2 (3R - h)}{3} = \rho_s \frac{4}{3} \pi R^3\]
Simplifying:
\[\rho_f h^2 (3R - h) = 4 \rho_s R^3\]
Numerical Solution
Since this equation is nonlinear, it is solved using a numerical root-finding technique such as the Newton-Raphson method or bisection method.
Bisection Method
[1]:
import numpy as np
def submerged_volume_eq(h, R, rho_s, rho_f):
return rho_f * (h**2 * (3*R - h)) - 4 * rho_s * R**3
def bisection_method(f, a, b, tol=1e-6, max_iter=100):
if f(a) * f(b) > 0:
raise ValueError("Function must have opposite signs at a and b")
for _ in range(max_iter):
c = (a + b) / 2
if abs(f(c)) < tol or (b - a) / 2 < tol:
return c
if f(c) * f(a) < 0:
b = c
else:
a = c
return (a + b) / 2 # Return the midpoint if max iterations reached
def find_sinking_depth(R, rho_s, rho_f):
f = lambda h: submerged_volume_eq(h, R, rho_s, rho_f)
return bisection_method(f, 0, 2*R)
# Example usage
R = 0.5 # Radius of the sphere (meters)
rho_s = 800 # Density of the sphere (kg/m^3)
rho_f = 1000 # Density of the fluid (kg/m^3)
h = find_sinking_depth(R, rho_s, rho_f)
print(f"The sphere sinks to a depth of {h:.4f} meters.")
The sphere sinks to a depth of 0.7129 meters.
Newton Raphson Method
[4]:
import numpy as np
def submerged_volume_eq(h, R, rho_s, rho_f):
return rho_f * (h**2 * (3*R - h)) - 4 * rho_s * R**3
def submerged_volume_derivative(h, R, rho_f):
return rho_f * (6*R*h - 3*h**2) # Derivative of the function
def newton_raphson_method(f, df, x0, tol=1e-6, max_iter=100):
x = x0
for _ in range(max_iter):
fx = f(x)
dfx = df(x)
if abs(fx) < tol:
return x
if dfx == 0:
raise ValueError("Derivative is zero. Newton-Raphson method fails.")
x -= fx / dfx
return x
def find_sinking_depth(R, rho_s, rho_f):
f = lambda h: submerged_volume_eq(h, R, rho_s, rho_f)
df = lambda h: submerged_volume_derivative(h, R, rho_f)
return newton_raphson_method(f, df, R)
# Example usage
R = 0.5 # Radius of the sphere (meters)
rho_s = 800 # Density of the sphere (kg/m^3)
rho_f = 1000 # Density of the fluid (kg/m^3)
h = find_sinking_depth(R, rho_s, rho_f)
print(f"The sphere sinks to a depth of {h:.4f} meters.")
The sphere sinks to a depth of 0.7129 meters.
Sectant Method
[5]:
import numpy as np
def submerged_volume_eq(h, R, rho_s, rho_f):
return rho_f * (h**2 * (3*R - h)) - 4 * rho_s * R**3
def secant_method(f, x0, x1, tol=1e-6, max_iter=100):
for _ in range(max_iter):
f_x0 = f(x0)
f_x1 = f(x1)
if abs(f_x1) < tol:
return x1
if f_x1 - f_x0 == 0:
raise ValueError("Zero denominator in secant method.")
x2 = x1 - f_x1 * (x1 - x0) / (f_x1 - f_x0)
x0, x1 = x1, x2
return x1
def find_sinking_depth(R, rho_s, rho_f):
f = lambda h: submerged_volume_eq(h, R, rho_s, rho_f)
return secant_method(f, 0, 2*R)
# Example usage
R = 0.5 # Radius of the sphere (meters)
rho_s = 800 # Density of the sphere (kg/m^3)
rho_f = 1000 # Density of the fluid (kg/m^3)
h = find_sinking_depth(R, rho_s, rho_f)
print(f"The sphere sinks to a depth of {h:.4f} meters.")
The sphere sinks to a depth of 0.7129 meters.