FROUDE
Overview
The FROUDE
function calculates the Froude number (Fr), a dimensionless number used in fluid mechanics to characterize the influence of gravity on fluid motion. The Froude number is defined as the ratio of a characteristic velocity to the square root of the product of gravitational acceleration and a characteristic length:
where:
- is the characteristic velocity (m/s)
- is the characteristic length (m)
- is the acceleration due to gravity (m/s², default 9.80665)
The Froude number is important in the study of open channel flows, ship hydrodynamics, and other applications where gravity plays a significant role in fluid behavior. Optionally, the squared form of the Froude number can be returned.
For more information, see the fluids.core documentation and the fluids GitHub repository .
This example function is provided as-is without any representation of accuracy.
Usage
To use the function in Excel:
=FROUDE(V, L, [g], [squared])
V
(float, required): Characteristic velocity in m/s.L
(float, required): Characteristic length in meters.g
(float, optional, default=9.80665): Acceleration due to gravity in m/s².squared
(bool, optional, default=FALSE): If TRUE, returns the squared Froude number.
The function returns a single value (float): the Froude number (dimensionless), or its squared value if squared
is TRUE. If the input is invalid, an error message (string) is returned.
Examples
Example 1: Standard Froude Number
In Excel:
=FROUDE(1.83, 2)
Expected output:
Result |
---|
0.4116 |
Example 2: Froude Number with Custom Gravity
In Excel:
=FROUDE(1.83, 2, 1.63)
Expected output:
Result |
---|
1.0135 |
Example 3: Squared Froude Number
In Excel:
=FROUDE(1.83, 2, 9.80665, TRUE)
Expected output:
Result |
---|
0.1694 |
Example 4: Squared Froude Number with Custom Gravity
In Excel:
=FROUDE(1.83, 2, 1.63, TRUE)
Expected output:
Result |
---|
1.0272 |
Python Code
import micropip
await micropip.install('fluids')
from fluids.core import Froude as fluids_froude
def froude(V, L, g=9.80665, squared=False):
"""
Calculate the Froude number (Fr) for a given velocity, length, and gravity.
Args:
V: Characteristic velocity in m/s.
L: Characteristic length in meters.
g: Acceleration due to gravity in m/s² (default: 9.80665).
squared: If True, returns the squared Froude number (default: False).
Returns:
The Froude number (float, dimensionless), or its squared value if squared is True. Returns an error message (str) if input is invalid.
This example function is provided as-is without any representation of accuracy.
"""
try:
V = float(V)
L = float(L)
g = float(g)
squared = bool(squared)
except Exception:
return "Invalid input: could not convert arguments to float."
if L <= 0 or g <= 0:
return "Invalid input: L and g must be positive."
try:
result = fluids_froude(V, L=L, g=g, squared=squared)
except Exception as e:
return f"Error: {str(e)}"
return round(result, 4)
Live Notebook
Edit this function in a live notebook .