GRAETZ_HEAT

Excel Usage

=GRAETZ_HEAT(V, D, x, rho, Cp, k, alpha)
  • V (float, required): Velocity [m/s]
  • D (float, required): Diameter [m]
  • x (float, required): Axial distance [m]
  • rho (float, optional, default: null): Density [kg/m^3]
  • Cp (float, optional, default: null): Heat capacity [J/kg/K]
  • k (float, optional, default: null): Thermal conductivity [W/m/K]
  • alpha (float, optional, default: null): Thermal diffusivity [m^2/s]

Returns (float): Graetz number [-]

Examples

Example 1: Example with rho, Cp, k

Inputs:

V D x rho Cp k
1.5 0.25 5 800 2200 0.6

Excel formula:

=GRAETZ_HEAT(1.5, 0.25, 5, 800, 2200, 0.6)

Expected output:

55000

Example 2: Example with alpha

Inputs:

V D x alpha
1.5 0.25 5 1e-7

Excel formula:

=GRAETZ_HEAT(1.5, 0.25, 5, 1e-7)

Expected output:

187500

Example 3: Smaller diameter case

Inputs:

V D x rho Cp k
2 0.1 3 1000 4200 0.6

Excel formula:

=GRAETZ_HEAT(2, 0.1, 3, 1000, 4200, 0.6)

Expected output:

46666.66667

Example 4: Longer axial distance

Inputs:

V D x alpha
1 0.3 10 2e-7

Excel formula:

=GRAETZ_HEAT(1, 0.3, 10, 2e-7)

Expected output:

45000

Python Code

from fluids.core import Graetz_heat as fluids_Graetz_heat

def graetz_heat(V, D, x, rho=None, Cp=None, k=None, alpha=None):
    """
    Calculate the Graetz number.

    See: https://fluids.readthedocs.io/fluids.core.html#fluids.core.Graetz_heat

    This example function is provided as-is without any representation of accuracy.

    Args:
        V (float): Velocity [m/s]
        D (float): Diameter [m]
        x (float): Axial distance [m]
        rho (float, optional): Density [kg/m^3] Default is None.
        Cp (float, optional): Heat capacity [J/kg/K] Default is None.
        k (float, optional): Thermal conductivity [W/m/K] Default is None.
        alpha (float, optional): Thermal diffusivity [m^2/s] Default is None.

    Returns:
        float: Graetz number [-]
    """
    try:
        V_val = float(V)
        D_val = float(D)
        x_val = float(x)
    except Exception:
        return "Error: V, D, and x must be numeric values."

    # Validate physical meaning
    if V_val < 0:
        return "Error: Velocity must be non-negative."
    if D_val <= 0:
        return "Error: Diameter must be positive."
    if x_val <= 0:
        return "Error: Axial distance must be positive."

    # If alpha is provided, use it
    if alpha is not None:
        try:
            alpha_val = float(alpha)
        except Exception:
            return "Error: alpha must be a numeric value."
        if alpha_val <= 0:
            return "Error: Thermal diffusivity must be positive."
        try:
            result = fluids_Graetz_heat(V_val, D_val, x_val, alpha=alpha_val)
            return float(result)
        except Exception as e:
            return f"Error: Failed to calculate Graetz number: {str(e)}"

    # Otherwise, need rho, Cp, k
    if None in (rho, Cp, k):
        return "Error: must provide either alpha or all of rho, Cp, and k."
    try:
        rho_val = float(rho)
        Cp_val = float(Cp)
        k_val = float(k)
    except Exception:
        return "Error: rho, Cp, and k must be numeric values."
    if rho_val <= 0 or Cp_val <= 0 or k_val <= 0:
        return "Error: rho, Cp, and k must all be positive."
    try:
        result = fluids_Graetz_heat(V_val, D_val, x_val, rho=rho_val, Cp=Cp_val, k=k_val)
        return float(result)
    except Exception as e:
        return f"Error: Failed to calculate Graetz number: {str(e)}"

Online Calculator