Core

Overview

The core heat-transfer utilities group provides small but essential helpers that underpin the more elaborate correlation sets elsewhere in the catalogue. These functions perform basic thermodynamic consistency checks, fin analysis, simple heating‑direction classification, and wall‑property correction factors. They are intended for pre‑flight validation, quick screening, and property‑based adjustment of more complex models.

At a conceptual level the group leans on temperature ordering for exchangers, efficiency metrics for extended surfaces, property ratios to infer heat flow direction, and dimensionless correction factors that modify constant‑property friction or Nusselt‑number predictions. Engineers routinely use these ideas when setting up lumped‑parameter analyses, interpreting CFD results, or coding their own design routines.

Implementation is provided by the Python ht library, specifically the ht.core module. This package collects foundational formulas and logical utilities that are reused across the broader ht heat‑transfer ecosystem; links to its documentation appear with each function below.

The temperature‑consistency tool CC_HX_TEMP_CHECK evaluates whether four terminal temperatures correspond to a physically plausible counter‑current heat exchanger configuration. Designers often call it before performing area or LMTD calculations to catch inadvertent input reversals or unrealistic process states.

A group of directional indicators comprises IS_HEATING_TEMP and IS_HEATING_PROPERTY. The former uses bulk and wall temperatures, while the latter compares a transport property (viscosity or Prandtl number) at those two locations. Both return a boolean stating whether heat flows from wall to fluid. These are handy in heuristics for selecting property evaluation points or adjusting correlations for heating vs. cooling.

The fin performance tool FIN_EFFICIENCY_KK computes the efficiency of an annular (constant‑thickness) circular fin using the Kern–Kraus formulation. Efficiency is defined as the ratio of actual fin heat transfer to the ideal transfer if the entire surface remained at base temperature; it declines when convective resistance dominates. This function is a quick way to size fins or check the impact of material, thickness, or surface coefficient on auxiliary surface performance.

Finally, the wall correction factors WALL_FACTOR_FD and WALL_FACTOR_NU adjust friction-factor (or pressure-drop) and Nusselt-number correlations, respectively, for property variations between bulk and wall conditions. Both follow a simple power law with an exponent n chosen based on flow regime (laminar/turbulent) and phase (liquid/gas). They let users retrofit constant-property formulas to situations where viscosity or Prandtl number changes across the boundary layer, a common need in high‑temperature or cryogenic applications.

Figure 1: Wall factor correction curves (left) illustrate the power-law dependence on viscosity ratio. Fin efficiency trends (right) show the influence of the conduction-convection parameter m.

CC_HX_TEMP_CHECK

This function evaluates whether four terminal temperatures are physically plausible for a countercurrent heat exchanger. It checks the inlet and outlet temperatures of two streams and returns whether the specified temperature pattern can occur for countercurrent operation.

In a valid countercurrent exchanger, the hot stream cools while the cold stream warms, and the temperature ordering at both ends must remain thermodynamically consistent.

If the temperature crossover or terminal ordering violates those constraints, the configuration is considered implausible and the function returns False.

Excel Usage

=CC_HX_TEMP_CHECK(T_zero_in, T_zero_out, T_one_in, T_one_out)
  • T_zero_in (float, required): Inlet temperature of fluid zero (K).
  • T_zero_out (float, required): Outlet temperature of fluid zero (K).
  • T_one_in (float, required): Inlet temperature of fluid one (K).
  • T_one_out (float, required): Outlet temperature of fluid one (K).

Returns (bool): True when the countercurrent temperature set is plausible.

Example 1: Plausible countercurrent temperatures

Inputs:

T_zero_in T_zero_out T_one_in T_one_out
400 300 250 350

Excel formula:

=CC_HX_TEMP_CHECK(400, 300, 250, 350)

Expected output:

true

Example 2: Small temperature approach at one end

Inputs:

T_zero_in T_zero_out T_one_in T_one_out
370 320 310 360

Excel formula:

=CC_HX_TEMP_CHECK(370, 320, 310, 360)

Expected output:

true

Example 3: Larger hot-side temperature drop

Inputs:

T_zero_in T_zero_out T_one_in T_one_out
500 280 260 430

Excel formula:

=CC_HX_TEMP_CHECK(500, 280, 260, 430)

Expected output:

true

Example 4: Mild heating of the cold stream

Inputs:

T_zero_in T_zero_out T_one_in T_one_out
330 300 280 320

Excel formula:

=CC_HX_TEMP_CHECK(330, 300, 280, 320)

Expected output:

true

Python Code

Show Code
from ht.core import countercurrent_hx_temperature_check as ht_cc_hx_temperature_check

def cc_hx_temp_check(T_zero_in, T_zero_out, T_one_in, T_one_out):
    """
    Check whether two fluid temperature profiles are plausible for countercurrent exchange.

    See: https://ht.readthedocs.io/en/latest/ht.core.html

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

    Args:
        T_zero_in (float): Inlet temperature of fluid zero (K).
        T_zero_out (float): Outlet temperature of fluid zero (K).
        T_one_in (float): Inlet temperature of fluid one (K).
        T_one_out (float): Outlet temperature of fluid one (K).

    Returns:
        bool: True when the countercurrent temperature set is plausible.
    """
    try:
        return ht_cc_hx_temperature_check(T_zero_in, T_zero_out, T_one_in, T_one_out)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Inlet temperature of fluid zero (K).
Outlet temperature of fluid zero (K).
Inlet temperature of fluid one (K).
Outlet temperature of fluid one (K).

FIN_EFFICIENCY_KK

This function computes the efficiency of a circular constant-thickness fin attached to a tube using the Kern-Kraus formulation. Fin efficiency represents the ratio of actual heat transfer from the fin to the ideal heat transfer if the entire fin were at base temperature.

The model is based on modified Bessel-function solutions for radial conduction in annular fins, with the key conduction-convection parameter:

m = \sqrt{\frac{2h}{k_{fin} t_{fin}}}

Efficiency decreases as convective resistance drops relative to conduction resistance, and increases with higher fin conductivity or thickness.

Excel Usage

=FIN_EFFICIENCY_KK(Do, D_fin, t_fin, k_fin, h)
  • Do (float, required): Outer diameter of the bare tube (m).
  • D_fin (float, required): Outer diameter of the fin (m).
  • t_fin (float, required): Fin thickness (m).
  • k_fin (float, required): Thermal conductivity of the fin (W/m/K).
  • h (float, required): Heat transfer coefficient at the fin surface (W/m^2/K).

Returns (float): Fin efficiency for a circular fin on a tube (-).

Example 1: Reference fin efficiency

Inputs:

Do D_fin t_fin k_fin h
0.0254 0.05715 0.00038 200 58

Excel formula:

=FIN_EFFICIENCY_KK(0.0254, 0.05715, 0.00038, 200, 58)

Expected output:

0.841259

Example 2: Thinner fin increases conduction resistance

Inputs:

Do D_fin t_fin k_fin h
0.02 0.05 0.0002 180 45

Excel formula:

=FIN_EFFICIENCY_KK(0.02, 0.05, 0.0002, 180, 45)

Expected output:

0.776471

Example 3: Higher fin conductivity

Inputs:

Do D_fin t_fin k_fin h
0.03 0.07 0.0005 250 60

Excel formula:

=FIN_EFFICIENCY_KK(0.03, 0.07, 0.0005, 250, 60)

Expected output:

0.839039

Example 4: Higher heat transfer coefficient

Inputs:

Do D_fin t_fin k_fin h
0.03 0.07 0.0005 180 120

Excel formula:

=FIN_EFFICIENCY_KK(0.03, 0.07, 0.0005, 180, 120)

Expected output:

0.661053

Python Code

Show Code
from ht.core import fin_efficiency_Kern_Kraus as ht_fin_efficiency_Kern_Kraus

def fin_efficiency_kk(Do, D_fin, t_fin, k_fin, h):
    """
    Compute circular fin efficiency using the Kern-Kraus correlation.

    See: https://ht.readthedocs.io/en/latest/ht.core.html

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

    Args:
        Do (float): Outer diameter of the bare tube (m).
        D_fin (float): Outer diameter of the fin (m).
        t_fin (float): Fin thickness (m).
        k_fin (float): Thermal conductivity of the fin (W/m/K).
        h (float): Heat transfer coefficient at the fin surface (W/m^2/K).

    Returns:
        float: Fin efficiency for a circular fin on a tube (-).
    """
    try:
        return ht_fin_efficiency_Kern_Kraus(Do, D_fin, t_fin, k_fin, h)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Outer diameter of the bare tube (m).
Outer diameter of the fin (m).
Fin thickness (m).
Thermal conductivity of the fin (W/m/K).
Heat transfer coefficient at the fin surface (W/m^2/K).

IS_HEATING_PROPERTY

This function determines whether a fluid is being heated by a wall using a temperature-sensitive transport property such as viscosity or Prandtl number. It compares the bulk-fluid property to the wall-condition property and classifies the thermal direction.

For common liquids where viscosity decreases as temperature increases, a lower wall viscosity than bulk viscosity indicates heating. Conversely, a higher wall viscosity indicates cooling.

The result is a boolean indicator: True for heating of the bulk fluid and False for cooling.

Excel Usage

=IS_HEATING_PROPERTY(prop, prop_wall)
  • prop (float, required): Property of the flowing fluid away from the wall (Pa*s).
  • prop_wall (float, required): Property of the fluid at the wall (Pa*s).

Returns (bool): True when the bulk fluid is being heated.

Example 1: Heating from viscosity comparison

Inputs:

prop prop_wall
0.001 0.0012

Excel formula:

=IS_HEATING_PROPERTY(0.001, 0.0012)

Expected output:

false

Example 2: Heating when wall property decreases

Inputs:

prop prop_wall
0.002 0.0015

Excel formula:

=IS_HEATING_PROPERTY(0.002, 0.0015)

Expected output:

true

Example 3: No change in property across wall

Inputs:

prop prop_wall
0.001 0.001

Excel formula:

=IS_HEATING_PROPERTY(0.001, 0.001)

Expected output:

false

Example 4: Large property increase at the wall

Inputs:

prop prop_wall
0.0008 0.002

Excel formula:

=IS_HEATING_PROPERTY(0.0008, 0.002)

Expected output:

false

Python Code

Show Code
from ht.core import is_heating_property as ht_is_heating_property

def is_heating_property(prop, prop_wall):
    """
    Determine whether a wall heats or cools a flow from a property ratio.

    See: https://ht.readthedocs.io/en/latest/ht.core.html

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

    Args:
        prop (float): Property of the flowing fluid away from the wall (Pa*s).
        prop_wall (float): Property of the fluid at the wall (Pa*s).

    Returns:
        bool: True when the bulk fluid is being heated.
    """
    try:
        return ht_is_heating_property(prop, prop_wall)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Property of the flowing fluid away from the wall (Pa*s).
Property of the fluid at the wall (Pa*s).

IS_HEATING_TEMP

This function determines the direction of heat transfer between a wall and a flowing fluid using bulk and wall temperatures. It returns whether the wall causes net heating of the bulk stream.

The criterion is based on the temperature difference:

\Delta T = T_{wall} - T

When \Delta T > 0, heat flows from wall to fluid and the function returns True; otherwise it returns False.

Excel Usage

=IS_HEATING_TEMP(T, T_wall)
  • T (float, required): Temperature of the flowing fluid away from the wall (K).
  • T_wall (float, required): Temperature of the wall (K).

Returns (bool): True when the bulk fluid is being heated.

Example 1: Wall hotter than bulk fluid

Inputs:

T T_wall
298.15 350

Excel formula:

=IS_HEATING_TEMP(298.15, 350)

Expected output:

true

Example 2: Wall cooler than bulk fluid

Inputs:

T T_wall
350 300

Excel formula:

=IS_HEATING_TEMP(350, 300)

Expected output:

false

Example 3: Equal wall and bulk temperatures

Inputs:

T T_wall
320 320

Excel formula:

=IS_HEATING_TEMP(320, 320)

Expected output:

false

Example 4: Slight temperature rise at the wall

Inputs:

T T_wall
310 315

Excel formula:

=IS_HEATING_TEMP(310, 315)

Expected output:

true

Python Code

Show Code
from ht.core import is_heating_temperature as ht_is_heating_temperature

def is_heating_temp(T, T_wall):
    """
    Determine whether a wall heats or cools a flow from temperatures.

    See: https://ht.readthedocs.io/en/latest/ht.core.html

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

    Args:
        T (float): Temperature of the flowing fluid away from the wall (K).
        T_wall (float): Temperature of the wall (K).

    Returns:
        bool: True when the bulk fluid is being heated.
    """
    try:
        return ht_is_heating_temperature(T, T_wall)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Temperature of the flowing fluid away from the wall (K).
Temperature of the wall (K).

WALL_FACTOR_FD

This function computes a wall-property correction factor for pressure-drop or friction-factor correlations. It modifies constant-property friction predictions based on the ratio of bulk to wall viscosity (or Prandtl number analog).

The correction is expressed as:

\frac{f_d}{f_{d,cp}} = \left(\frac{\mu}{\mu_{wall}}\right)^n

The exponent n is selected from empirical values based on flow regime (laminar or turbulent) and phase model (liquid or gas).

Excel Usage

=WALL_FACTOR_FD(mu, mu_wall, turbulent, liquid)
  • mu (float, required): Viscosity of fluid away from the wall (Pa*s).
  • mu_wall (float, required): Viscosity of the fluid at the wall (Pa*s).
  • turbulent (bool, optional, default: true): Whether turbulent coefficients are used.
  • liquid (bool, optional, default: false): Whether liquid-phase coefficients are used.

Returns (float): Wall correction factor for friction factor or pressure drop (-).

Example 1: Turbulent liquid pressure drop factor

Inputs:

mu mu_wall turbulent liquid
0.0008 0.0003 true true

Excel formula:

=WALL_FACTOR_FD(0.0008, 0.0003, TRUE, TRUE)

Expected output:

0.782542

Example 2: Laminar liquid pressure drop factor

Inputs:

mu mu_wall turbulent liquid
0.0008 0.0003 false true

Excel formula:

=WALL_FACTOR_FD(0.0008, 0.0003, FALSE, TRUE)

Expected output:

0.566159

Example 3: Turbulent gas pressure drop factor

Inputs:

mu mu_wall turbulent liquid
0.000015 0.000013 true false

Excel formula:

=WALL_FACTOR_FD(0.000015, 0.000013, TRUE, FALSE)

Expected output:

1.01441

Example 4: Laminar gas pressure drop factor

Inputs:

mu mu_wall turbulent liquid
0.000015 0.000013 false false

Excel formula:

=WALL_FACTOR_FD(0.000015, 0.000013, FALSE, FALSE)

Expected output:

0.866667

Python Code

Show Code
from ht.core import wall_factor_fd as ht_wall_factor_fd

def wall_factor_fd(mu, mu_wall, turbulent=True, liquid=False):
    """
    Compute a wall correction factor for frictional pressure loss.

    See: https://ht.readthedocs.io/en/latest/ht.core.html

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

    Args:
        mu (float): Viscosity of fluid away from the wall (Pa*s).
        mu_wall (float): Viscosity of the fluid at the wall (Pa*s).
        turbulent (bool, optional): Whether turbulent coefficients are used. Default is True.
        liquid (bool, optional): Whether liquid-phase coefficients are used. Default is False.

    Returns:
        float: Wall correction factor for friction factor or pressure drop (-).
    """
    try:
        return ht_wall_factor_fd(mu, mu_wall, turbulent=turbulent, liquid=liquid)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Viscosity of fluid away from the wall (Pa*s).
Viscosity of the fluid at the wall (Pa*s).
Whether turbulent coefficients are used.
Whether liquid-phase coefficients are used.

WALL_FACTOR_NU

This function computes a wall-property correction factor for convective heat-transfer correlations. It adjusts constant-property Nusselt-number predictions using a viscosity (or Prandtl) ratio evaluated at bulk and wall conditions.

The correction uses a power-law form:

\frac{Nu}{Nu_{cp}} = \left(\frac{\mu}{\mu_{wall}}\right)^n

The exponent n depends on whether the flow is laminar or turbulent and whether liquid or gas coefficients are selected.

Excel Usage

=WALL_FACTOR_NU(mu, mu_wall, turbulent, liquid)
  • mu (float, required): Viscosity of fluid away from the wall (Pa*s).
  • mu_wall (float, required): Viscosity of the fluid at the wall (Pa*s).
  • turbulent (bool, optional, default: true): Whether turbulent coefficients are used.
  • liquid (bool, optional, default: false): Whether liquid-phase coefficients are used.

Returns (float): Wall correction factor for heat transfer (-).

Example 1: Turbulent liquid example

Inputs:

mu mu_wall turbulent liquid
0.0008 0.0003 true true

Excel formula:

=WALL_FACTOR_NU(0.0008, 0.0003, TRUE, TRUE)

Expected output:

1.11393

Example 2: Laminar liquid example

Inputs:

mu mu_wall turbulent liquid
0.0008 0.0003 false true

Excel formula:

=WALL_FACTOR_NU(0.0008, 0.0003, FALSE, TRUE)

Expected output:

1.14719

Example 3: Turbulent gas example

Inputs:

mu mu_wall turbulent liquid
0.000015 0.000013 true false

Excel formula:

=WALL_FACTOR_NU(0.000015, 0.000013, TRUE, FALSE)

Expected output:

1.07417

Example 4: Laminar gas example

Inputs:

mu mu_wall turbulent liquid
0.000015 0.000013 false false

Excel formula:

=WALL_FACTOR_NU(0.000015, 0.000013, FALSE, FALSE)

Expected output:

1

Python Code

Show Code
from ht.core import wall_factor_Nu as ht_wall_factor_Nu

def wall_factor_Nu(mu, mu_wall, turbulent=True, liquid=False):
    """
    Compute a wall correction factor for Nusselt number calculations.

    See: https://ht.readthedocs.io/en/latest/ht.core.html

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

    Args:
        mu (float): Viscosity of fluid away from the wall (Pa*s).
        mu_wall (float): Viscosity of the fluid at the wall (Pa*s).
        turbulent (bool, optional): Whether turbulent coefficients are used. Default is True.
        liquid (bool, optional): Whether liquid-phase coefficients are used. Default is False.

    Returns:
        float: Wall correction factor for heat transfer (-).
    """
    try:
        return ht_wall_factor_Nu(mu, mu_wall, turbulent=turbulent, liquid=liquid)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Viscosity of fluid away from the wall (Pa*s).
Viscosity of the fluid at the wall (Pa*s).
Whether turbulent coefficients are used.
Whether liquid-phase coefficients are used.