LEGACY_CYL_HT

Provides a backward-compatible wrapper for multilayer cylindrical wall heat-transfer calculations. It evaluates conduction through each layer with inside/outside convection and returns a table of thermal results.

The governing resistance-network form is:

Q = \frac{T_i - T_o}{R_{i,\text{conv}} + \sum R_{\text{layer}} + R_{o,\text{conv}}}

Excel Usage

=LEGACY_CYL_HT(Ti, To, hi, ho, Di, ts, ks)
  • Ti (float, required): Inside temperature (K).
  • To (float, required): Outside bulk temperature (K).
  • hi (float, required): Inside heat transfer coefficient (W/m^2/K).
  • ho (float, required): Outside heat transfer coefficient (W/m^2/K).
  • Di (float, required): Inside diameter (m).
  • ts (list[list], required): Layer thicknesses (m).
  • ks (list[list], required): Layer thermal conductivities (W/m/K).

Returns (list[list]): Table of heat transfer results and layer properties.

Example 1: Two-layer cylinder example

Inputs:

Ti To hi ho Di ts ks
453.15 301.15 1000000000000 22.697193 0.0779272 0.0054864 0.05 56.045 0.0598535265

Excel formula:

=LEGACY_CYL_HT(453.15, 301.15, 1000000000000, 22.697193, 0.0779272, {0.0054864,0.05}, {56.045,0.0598535265})

Expected output:

Result
Q 73.12
UA 0.481053
U_inner 1.96496
U_outer 0.810608
q 123.212
Rs 0.00022201 1.18936
Ts 453.15 453.123 306.579
Example 2: Single layer cylinder

Inputs:

Ti To hi ho Di ts ks
400 300 200 50 0.1 0.02 15

Excel formula:

=LEGACY_CYL_HT(400, 300, 200, 50, 0.1, {0.02}, {15})

Expected output:

Result
Q 1539.45
UA 15.3945
U_inner 49.0021
U_outer 35.0015
q 3500.15
Rs 0.0015702
Ts 400 394.504
Example 3: Moderate coefficients and two layers

Inputs:

Ti To hi ho Di ts ks
350 290 500 60 0.08 0.01 0.03 12 0.2

Excel formula:

=LEGACY_CYL_HT(350, 290, 500, 60, 0.08, {0.01,0.03}, {12,0.2})

Expected output:

Result
Q 143.509
UA 2.39182
U_inner 9.51675
U_outer 4.75838
q 285.503
Rs 0.00148762 0.188001
Ts 350 349.575 295.9
Example 4: Higher outside transfer coefficient

Inputs:

Ti To hi ho Di ts ks
375 295 800 150 0.12 0.015 0.02 20 0.5

Excel formula:

=LEGACY_CYL_HT(375, 295, 800, 150, 0.12, {0.015,0.02}, {20,0.5})

Expected output:

Result
Q 874.268
UA 10.9284
U_inner 28.9884
U_outer 18.3084
q 1464.67
Rs 0.00105993 0.0449139
Ts 375 373.448 307.663

Python Code

Show Code
from ht.conduction import cylindrical_heat_transfer as ht_cylindrical_heat_transfer

def legacy_cyl_ht(Ti, To, hi, ho, Di, ts, ks):
    """
    Deprecated alias for cyl_heat_transfer.

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

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

    Args:
        Ti (float): Inside temperature (K).
        To (float): Outside bulk temperature (K).
        hi (float): Inside heat transfer coefficient (W/m^2/K).
        ho (float): Outside heat transfer coefficient (W/m^2/K).
        Di (float): Inside diameter (m).
        ts (list[list]): Layer thicknesses (m).
        ks (list[list]): Layer thermal conductivities (W/m/K).

    Returns:
        list[list]: Table of heat transfer results and layer properties.
    """
    try:
        def to2d(x):
            return [[x]] if not isinstance(x, list) else x

        def flatten_numeric(x, name):
            data = to2d(x)
            if not isinstance(data, list) or not all(isinstance(row, list) for row in data):
                return None, f"Error: {name} must be a 2D list"
            flat = []
            for row in data:
                for val in row:
                    try:
                        flat.append(float(val))
                    except (TypeError, ValueError):
                        return None, f"Error: {name} must contain only numbers"
            if not flat:
                return None, f"Error: {name} must contain at least one value"
            return flat, None

        ts_list, err = flatten_numeric(ts, "ts")
        if err:
            return err
        ks_list, err = flatten_numeric(ks, "ks")
        if err:
            return err
        if len(ts_list) != len(ks_list):
            return "Error: ts and ks must have the same length"

        result = ht_cylindrical_heat_transfer(
            Ti=Ti,
            To=To,
            hi=hi,
            ho=ho,
            Di=Di,
            ts=ts_list,
            ks=ks_list,
        )

        rows = [
            ["Q", result.get("Q")],
            ["UA", result.get("UA")],
            ["U_inner", result.get("U_inner")],
            ["U_outer", result.get("U_outer")],
            ["q", result.get("q")],
            ["Rs"] + list(result.get("Rs", [])),
            ["Ts"] + list(result.get("Ts", [])),
        ]
        max_len = max(len(row) for row in rows)
        return [row + [""] * (max_len - len(row)) for row in rows]
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Inside temperature (K).
Outside bulk temperature (K).
Inside heat transfer coefficient (W/m^2/K).
Outside heat transfer coefficient (W/m^2/K).
Inside diameter (m).
Layer thicknesses (m).
Layer thermal conductivities (W/m/K).