PRANDTL
Excel Usage
=PRANDTL(Cp, k, mu, nu, rho, alpha)
Cp(float, optional, default: null): Heat capacity [J/kg/K]k(float, optional, default: null): Thermal conductivity [W/m/K]mu(float, optional, default: null): Dynamic viscosity [Pa*s]nu(float, optional, default: null): Kinematic viscosity [m^2/s]rho(float, optional, default: null): Density [kg/m^3]alpha(float, optional, default: null): Thermal diffusivity [m^2/s]
Returns (float): Prandtl number [-]
Examples
Example 1: Prandtl number with heat capacity, thermal conductivity, and dynamic viscosity
Inputs:
| Cp | k | mu |
|---|---|---|
| 1637 | 0.01 | 0.00000461 |
Excel formula:
=PRANDTL(1637, 0.01, 0.00000461)
Expected output:
0.75466
Example 2: Prandtl number with kinematic viscosity and thermal diffusivity
Inputs:
| nu | alpha |
|---|---|
| 6.3e-7 | 9e-7 |
Excel formula:
=PRANDTL(6.3e-7, 9e-7)
Expected output:
0.7
Example 3: Prandtl number with heat capacity, thermal conductivity, kinematic viscosity, and density
Inputs:
| Cp | k | nu | rho |
|---|---|---|---|
| 1637 | 0.01 | 6.4e-7 | 7.1 |
Excel formula:
=PRANDTL(1637, 0.01, 6.4e-7, 7.1)
Expected output:
0.74385
Example 4: Prandtl number for different fluid
Inputs:
| Cp | k | mu |
|---|---|---|
| 2000 | 0.015 | 0.000005 |
Excel formula:
=PRANDTL(2000, 0.015, 0.000005)
Expected output:
0.66667
Python Code
from fluids.core import Prandtl as fluids_Prandtl
def prandtl(Cp=None, k=None, mu=None, nu=None, rho=None, alpha=None):
"""
Calculate the Prandtl number.
See: https://fluids.readthedocs.io/fluids.core.html#fluids.core.Prandtl
This example function is provided as-is without any representation of accuracy.
Args:
Cp (float, optional): Heat capacity [J/kg/K] Default is None.
k (float, optional): Thermal conductivity [W/m/K] Default is None.
mu (float, optional): Dynamic viscosity [Pa*s] Default is None.
nu (float, optional): Kinematic viscosity [m^2/s] Default is None.
rho (float, optional): Density [kg/m^3] Default is None.
alpha (float, optional): Thermal diffusivity [m^2/s] Default is None.
Returns:
float: Prandtl number [-]
"""
try:
# Check that at least one valid parameter set is provided
if Cp is not None and k is not None and mu is not None:
Cp_val = float(Cp)
k_val = float(k)
mu_val = float(mu)
return float(fluids_Prandtl(Cp=Cp_val, k=k_val, mu=mu_val))
if nu is not None and alpha is not None:
nu_val = float(nu)
alpha_val = float(alpha)
return float(fluids_Prandtl(nu=nu_val, alpha=alpha_val))
if Cp is not None and k is not None and nu is not None and rho is not None:
Cp_val = float(Cp)
k_val = float(k)
nu_val = float(nu)
rho_val = float(rho)
return float(fluids_Prandtl(Cp=Cp_val, k=k_val, nu=nu_val, rho=rho_val))
return "Error: One of the following parameter sets must be provided: (Cp, k, mu), (nu, alpha), or (Cp, k, nu, rho)"
except Exception as e:
return f"Error: {str(e)}"