PECLET_MASS
Excel Usage
=PECLET_MASS(V, L, D)
V(float, required): Velocity [m/s]L(float, required): Characteristic length [m]D(float, required): Diffusivity of a species [m^2/s]
Returns (float): Peclet number (mass) [-]
Examples
Example 1: Peclet number with standard parameters
Inputs:
| V | L | D |
|---|---|---|
| 1.5 | 2 | 1e-9 |
Excel formula:
=PECLET_MASS(1.5, 2, 1e-9)
Expected output:
3000000000
Example 2: Example from docstring
Inputs:
| V | L | D |
|---|---|---|
| 1.5 | 2 | 1e-9 |
Excel formula:
=PECLET_MASS(1.5, 2, 1e-9)
Expected output:
3000000000
Example 3: Higher velocity increases Peclet number
Inputs:
| V | L | D |
|---|---|---|
| 3 | 2 | 1e-9 |
Excel formula:
=PECLET_MASS(3, 2, 1e-9)
Expected output:
6000000000
Example 4: Larger characteristic length increases Peclet number
Inputs:
| V | L | D |
|---|---|---|
| 1.5 | 4 | 1e-9 |
Excel formula:
=PECLET_MASS(1.5, 4, 1e-9)
Expected output:
6000000000
Python Code
from fluids.core import Peclet_mass as fluids_Peclet_mass
def peclet_mass(V, L, D):
"""
Calculate the Peclet number for mass transfer.
See: https://fluids.readthedocs.io/fluids.core.html#fluids.core.Peclet_mass
This example function is provided as-is without any representation of accuracy.
Args:
V (float): Velocity [m/s]
L (float): Characteristic length [m]
D (float): Diffusivity of a species [m^2/s]
Returns:
float: Peclet number (mass) [-]
"""
try:
V_val = float(V)
L_val = float(L)
D_val = float(D)
except Exception:
return "Error: All parameters must be numeric values."
if D_val == 0:
return "Error: D must not be zero."
try:
result = fluids_Peclet_mass(V_val, L_val, D_val)
return float(result)
except Exception as e:
return f"Error: {str(e)}"