franc-bord et brouillon¶
Définition des paramètres:
rho_k = 870. # kg / m3 - wood density
rho_f = 1000. # kg / m3 - water density
g = 9.81 # N / kg - gravitational acceleration
b_x = 1.5 # m - box width
b_y = 2.0 # m - box length
h = 1.5 # m - box height
w = 0.01 # m - wall thicknessCalcul de la force de poids :
V_k = b_x * b_y * h - (b_x - 2 * w) * (b_y - 2 * w) * (h - w)
F_g = V_k * rho_k * g
print(f'Body volume V_k = {V_k:.2f} m3\nWeight force: {F_g:.2f} N')Body volume V_k = 0.13 m3
Weight force: 1141.12 N
Calcul du volume déplacé :
V_v = F_g / (rho_f * g)
print(f'Displaced volume: {V_v:.2f} m3')Displaced volume: 0.12 m3
Calcul du projet (profondeur d’immersion) et du franc-bord :
d = V_v / b_x * b_y
f = h - d
print(f'Draft d = {d:.2f} m\nFreeboard f = {f:.2f} m')
if f >= 0:
print("The body floats.")
if f < 0:
print("The body sinks.")Draft d = 0.16 m
Freeboard f = 1.34 m
The body floats.
Stabilité flottante¶
Deuxième minute de la zone¶
Calcul du deuxième moment de la zone par rapport à 0:
I_0 = b_x**3 * b_y / 12
print(f'Second moment of area I_0 = {I_0:.2f} m4')Second moment of area I_0 = 0.56 m4
Elévations¶
Hauteur du centre de gravité:
V_k_side_walls = 2 * (b_y - 2 * w) * (h - w) * w
V_k_front_back = 2 * b_x * (h - w) * w
V_k_bottom = b_x * b_y * w
h_g = ((V_k_side_walls + V_k_front_back) * (w + h / 2) + V_k_bottom * w / 2) / V_k
print(f'h_g = {h_g:.2f} m')h_g = 0.59 m
Hauteur du centre de flottabilité:
h_v = d / 2
print(f'Height of the center of buoyancy h_v = {h_v:.2f} m')Height of the center of buoyancy h_v = 0.08 m
Différence de hauteur entre le centre de gravité et le centre de flottabilité:
h_gv = h_g - h_v
print(f'Height difference h_gv = {h_gv:.2f} m')Height difference h_gv = 0.51 m
Hauteur métacentrique et stabilité flottante :
h_M = I_0 / V_v - h_gv
print(f'Metacentric height h_M = {h_M:.2f} m')
if h_M > 0:
print("Stable equilibrium.")
elif h_M < 0:
print("Unstable equilibrium.")
else:
print("Neutral equilibrium.")Metacentric height h_M = 4.32 m
Stable equilibrium.