T_STAG_IDEAL

This function returns ideal stagnation temperature from static temperature, velocity, and constant-pressure heat capacity. It models conversion of kinetic energy into thermal energy in adiabatic deceleration.

T_0=T+\frac{V^2}{2C_p}

Excel Usage

=T_STAG_IDEAL(temp, velocity, cp)
  • temp (float, required): Static temperature [K]
  • velocity (float, required): Velocity [m/s]
  • cp (float, required): Heat capacity at constant pressure [J/kg/K]

Returns (float): Stagnation temperature [K]

Example 1: Textbook example from Cengel

Inputs:

temp velocity cp
255.7 250 1005

Excel formula:

=T_STAG_IDEAL(255.7, 250, 1005)

Expected output:

286.795

Example 2: High speed aircraft

Inputs:

temp velocity cp
220 300 1005

Excel formula:

=T_STAG_IDEAL(220, 300, 1005)

Expected output:

264.776

Example 3: Low speed flow

Inputs:

temp velocity cp
300 50 1005

Excel formula:

=T_STAG_IDEAL(300, 50, 1005)

Expected output:

301.244

Example 4: Different gas (helium, high Cp)

Inputs:

temp velocity cp
300 200 5193

Excel formula:

=T_STAG_IDEAL(300, 200, 5193)

Expected output:

303.851

Python Code

Show Code
from fluids.compressible import T_stagnation_ideal as fluids_t_stag_ideal

def t_stag_ideal(temp, velocity, cp):
    """
    Calculate ideal stagnation temperature from velocity and heat capacity.

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

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

    Args:
        temp (float): Static temperature [K]
        velocity (float): Velocity [m/s]
        cp (float): Heat capacity at constant pressure [J/kg/K]

    Returns:
        float: Stagnation temperature [K]
    """
    try:
        temp = float(temp)
        velocity = float(velocity)
        cp = float(cp)

        if temp <= 0:
            return "Error: Invalid input: temp must be positive."
        if cp <= 0:
            return "Error: Invalid input: cp must be positive."

        result = fluids_t_stag_ideal(T=temp, V=velocity, Cp=cp)
        return float(result)
    except Exception as e:
        return f"Error: {str(e)}"

Online Calculator

Static temperature [K]
Velocity [m/s]
Heat capacity at constant pressure [J/kg/K]