BEJAN
Computes the Bejan number as a pressure-drop-based dimensionless group using either a characteristic length or permeability form.
Excel Usage
=BEJAN(bejan_type, dP, L_or_K, mu, alpha)
bejan_type(str, required): Calculation type for Bejan number (length-based or permeability-based)dP(float, required): Pressure drop in Pascals (Pa)L_or_K(float, required): Characteristic length (m) for length-based or permeability (m²) for permeability-basedmu(float, required): Dynamic viscosity in Pa·salpha(float, required): Thermal diffusivity in m²/s
Returns (float): Bejan number (float), or error message string.
Example 1: Length-based Bejan number with unit length
Inputs:
| bejan_type | dP | L_or_K | mu | alpha |
|---|---|---|---|---|
| length | 10000 | 1 | 0.001 | 0.000001 |
Excel formula:
=BEJAN("length", 10000, 1, 0.001, 0.000001)
Expected output:
10000000000000
Example 2: Permeability-based Bejan number with unit permeability
Inputs:
| bejan_type | dP | L_or_K | mu | alpha |
|---|---|---|---|---|
| permeability | 10000 | 1 | 0.001 | 0.000001 |
Excel formula:
=BEJAN("permeability", 10000, 1, 0.001, 0.000001)
Expected output:
10000000000000
Example 3: Length-based Bejan number at smaller scale
Inputs:
| bejan_type | dP | L_or_K | mu | alpha |
|---|---|---|---|---|
| length | 500 | 0.5 | 0.002 | 0.00001 |
Excel formula:
=BEJAN("length", 500, 0.5, 0.002, 0.00001)
Expected output:
6250000000
Example 4: Permeability-based Bejan number with low permeability
Inputs:
| bejan_type | dP | L_or_K | mu | alpha |
|---|---|---|---|---|
| permeability | 2000 | 0.05 | 0.005 | 0.00002 |
Excel formula:
=BEJAN("permeability", 2000, 0.05, 0.005, 0.00002)
Expected output:
1000000000
Python Code
Show Code
from fluids import core as fluids_core
def bejan(bejan_type, dP, L_or_K, mu, alpha):
"""
Compute the Bejan number (length-based or permeability-based).
See: https://fluids.readthedocs.io/fluids.core.html#dimensionless-numbers
This example function is provided as-is without any representation of accuracy.
Args:
bejan_type (str): Calculation type for Bejan number (length-based or permeability-based) Valid options: Length, Permeability.
dP (float): Pressure drop in Pascals (Pa)
L_or_K (float): Characteristic length (m) for length-based or permeability (m²) for permeability-based
mu (float): Dynamic viscosity in Pa·s
alpha (float): Thermal diffusivity in m²/s
Returns:
float: Bejan number (float), or error message string.
"""
try:
if not isinstance(bejan_type, str):
return "Error: bejan_type must be a string."
bejan_type_lower = bejan_type.lower()
if bejan_type_lower not in ["length", "permeability"]:
return "Error: bejan_type must be 'length' or 'permeability'."
try:
dP_val = float(dP)
length_or_perm = float(L_or_K)
mu_val = float(mu)
alpha_val = float(alpha)
except (TypeError, ValueError):
return "Error: dP, L_or_K, mu, and alpha must be numeric."
if mu_val <= 0:
return "Error: mu (dynamic viscosity) must be positive."
if alpha_val <= 0:
return "Error: alpha (thermal diffusivity) must be positive."
if bejan_type_lower == "length":
return fluids_core.Bejan_L(dP_val, length_or_perm, mu_val, alpha_val)
return fluids_core.Bejan_p(dP_val, length_or_perm, mu_val, alpha_val)
except Exception as e:
return f"Error: {str(e)}"Online Calculator
Calculation type for Bejan number (length-based or permeability-based)
Pressure drop in Pascals (Pa)
Characteristic length (m) for length-based or permeability (m²) for permeability-based
Dynamic viscosity in Pa·s
Thermal diffusivity in m²/s