CHECK_TUBING_TEMA

This function checks whether a nominal tube size and Birmingham Wire Gauge combination is listed as acceptable by TEMA tubing standards. It returns a boolean validity flag for quick design-rule validation.

Conceptually, it evaluates membership in an approved set: (\text{NPS}, \text{BWG}) \in \mathcal{S}_{\text{TEMA}}.

Excel Usage

=CHECK_TUBING_TEMA(NPS, BWG)
  • NPS (float, optional, default: null): Nominal pipe size (in).
  • BWG (int, optional, default: null): Birmingham wire gauge (-).

Returns (bool): True if the tubing combination is valid, otherwise false.

Example 1: Invalid tubing size and gauge

Inputs:

NPS BWG
2 22

Excel formula:

=CHECK_TUBING_TEMA(2, 22)

Expected output:

false

Example 2: Valid tubing size and gauge

Inputs:

NPS BWG
0.375 22

Excel formula:

=CHECK_TUBING_TEMA(0.375, 22)

Expected output:

true

Example 3: Invalid tubing size with thicker gauge

Inputs:

NPS BWG
0.5 14

Excel formula:

=CHECK_TUBING_TEMA(0.5, 14)

Expected output:

false

Example 4: Invalid small tubing size and gauge

Inputs:

NPS BWG
0.25 16

Excel formula:

=CHECK_TUBING_TEMA(0.25, 16)

Expected output:

false

Python Code

Show Code
from ht.hx import check_tubing_TEMA as hx_check_tubing_TEMA

def check_tubing_TEMA(NPS=None, BWG=None):
    """
    Check whether a tubing size and gauge are valid per TEMA.

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

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

    Args:
        NPS (float, optional): Nominal pipe size (in). Default is None.
        BWG (int, optional): Birmingham wire gauge (-). Default is None.

    Returns:
        bool: True if the tubing combination is valid, otherwise false.
    """
    try:
        result = hx_check_tubing_TEMA(NPS=NPS, BWG=BWG)
        return bool(result)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Nominal pipe size (in).
Birmingham wire gauge (-).