T_CRITICAL_FLOW

Overview

Calculate critical flow temperature for a fluid at Mach 1.

Excel Usage

=T_CRITICAL_FLOW(temp_stag, k_isentropic)
  • temp_stag (float, required): Stagnation temperature of a fluid with Ma=1 [K]
  • k_isentropic (float, required): Isentropic exponent [-]

Returns (float): Critical flow temperature at Ma=1 [K]

Examples

Example 1: Textbook example (T=473K, k=1.289)

Inputs:

temp_stag k_isentropic
473 1.289

Excel formula:

=T_CRITICAL_FLOW(473, 1.289)

Expected output:

413.2809086937528

Example 2: Air at standard conditions (k=1.4)

Inputs:

temp_stag k_isentropic
300 1.4

Excel formula:

=T_CRITICAL_FLOW(300, 1.4)

Expected output:

250

Example 3: High temperature nozzle

Inputs:

temp_stag k_isentropic
800 1.3

Excel formula:

=T_CRITICAL_FLOW(800, 1.3)

Expected output:

695.6521739130435

Example 4: Steam conditions (k=1.135)

Inputs:

temp_stag k_isentropic
500 1.135

Excel formula:

=T_CRITICAL_FLOW(500, 1.135)

Expected output:

468.384074941452

Python Code

import micropip
await micropip.install(["fluids"])
from fluids.compressible import T_critical_flow as fluids_t_crit

def t_critical_flow(temp_stag, k_isentropic):
    """
    Calculate critical flow temperature for a fluid at Mach 1.

    See: https://fluids.readthedocs.io/fluids.compressible.html#fluids.compressible.T_critical_flow

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

    Args:
        temp_stag (float): Stagnation temperature of a fluid with Ma=1 [K]
        k_isentropic (float): Isentropic exponent [-]

    Returns:
        float: Critical flow temperature at Ma=1 [K]
    """
    # Validate and convert inputs
    try:
        temp_stag = float(temp_stag)
    except (ValueError, TypeError):
        return "Invalid input: temp_stag must be a number."

    try:
        k_isentropic = float(k_isentropic)
    except (ValueError, TypeError):
        return "Invalid input: k_isentropic must be a number."

    # Validation
    if temp_stag <= 0:
        return "Invalid input: temp_stag must be positive."
    if k_isentropic <= 1:
        return "Invalid input: k_isentropic must be greater than 1."

    try:
        result = fluids_t_crit(T=temp_stag, k=k_isentropic)
        return float(result)
    except Exception as e:
        return f"Error: Failed to compute critical flow temperature: {str(e)}"

Online Calculator