mechanics_functions.fluid_funcs.calc_buoyant_force(rho_fluid, displaced_volume, gravity)

Calculate the buoyant force on an object in a fluid.

This function computes the buoyant force experienced by an object submerged in a fluid based on the principle of buoyancy.

Parameters:
  • rho_fluid (float) – Density of the fluid [kg/m^3].

  • displaced_volume (float) – Volume of fluid displaced by the object [m^3].

  • gravity (float) – Acceleration due to gravity [m/s^2].

Returns:

Buoyant force [N].

Return type:

float

Notes

The buoyant force is calculated using the following equation:

\[F_{B} = \rho V_{disp} g\]
where:
  • \(F_{B}\) is the buoyant force.

  • \(\rho\) is the fluid density.

  • \(V_{disp}\) is the volume of fluid displaced.

  • \(g\) is the acceleration due to gravity.

For more information on buoyant force, refer to the buoyant force info.

mechanics_functions.fluid_funcs.calc_corrected_water_depth(uncorrected_depth, velocity, gravity)

Calculate the corrected water depth using a Bernoulli’s type correction.

This function computes the corrected water depth based on the given uncorrected depth, velocity, and gravitational acceleration.

Parameters:
  • uncorrected_depth (float) – The uncorrected water depth [m].

  • velocity (float) – The velocity of the water [m/s].

  • gravity (float) – The acceleration due to gravity [m/s^2].

Returns:

The corrected water depth [m].

Return type:

float

Notes

The corrected water depth is calculated using the following equation:

\[h_{c} = h_{u} + \frac{v^{2}}{2g}\]
where:
  • \(h_{c}\) is the corrected water depth.

  • \(h_{u}\) is the uncorrected water depth.

  • \(v\) is the velocity of the water.

  • \(g\) is the acceleration due to gravity.

The equation is based on Bernoulli’s principle, as referenced in Jaber’s thesis.

mechanics_functions.fluid_funcs.calc_drag_force(rho_fluid, drag_coeff, velocity, frontal_area)

Calculate the drag force for a body.

This function computes the drag force experienced by a body moving through a fluid based on the drag equation.

Parameters:
  • rho_fluid (float) – Density of the fluid [kg/m^3].

  • drag_coeff (float) – Drag coefficient of the body.

  • velocity (float) – Velocity of the body [m/s].

  • frontal_area (float) – Frontal area of the body [m^2].

Returns:

Drag force [N].

Return type:

float

Notes

The drag force is calculated using the following equation:

\[F_{Drag} = \frac{1}{2} \rho_{fluid} v^{2} C_{D} A\]
where:
  • \(F_{Drag}\) is the drag force.

  • \(\rho_{fluid}\) is the density of the fluid.

  • \(v\) is the velocity of the body.

  • \(C_{D}\) is the drag coefficient.

  • \(A\) is the frontal area.

For more information on the drag equation, refer to the drag info.