CompAero/RayleighFlowRelations.py
def calc_mach_from_To_ToStar(
        t_tSt: float, gamma: float, flowType: FlowState = FlowState.SUPER_SONIC
    ) -> float:
        """Calculates the mach number based of the ratio of total temperature to sonic total temperature T0/T0*

        Args:
            po_poSt (float): Ratio of total temperature to sonic total temperature T0/T0*
            gamma (float): ratio of specific heats
            flowType (FlowState, optional): States whether the flow is currently supersonic or subsonic. Defaults to FlowState.SUPER_SONIC.

        Returns:
            float: mach number
        """
        tolerance = 1e-5
        if t_tSt == 1.0:
            return 1
        elif flowType == FlowState.SUPER_SONIC:
            return brenth(RayleighFlowRelations.calc_To_ToSt, 1 + tolerance, 40, args=(gamma, t_tSt,))
        elif flowType == FlowState.SUB_SONIC:
            return brenth(RayleighFlowRelations.calc_To_ToSt, tolerance, 1 - tolerance, args=(gamma, t_tSt,))
        else:
            raise ValueError(
                Back.RED + Fore.BLACK + "Flow Type [{}] not supported for Fanno"
                " Flow! Accepted Types: 'Supersonic' & 'Subsonic'".format(flowType.name)
                + Back.RESET
                + Fore.RESET
            )
Calculates the mach number based of the ratio of total temperature to sonic total temperature T0/T0*

        Args:
            po_poSt (float): Ratio of total temperature to sonic total temperature T0/T0*
            gamma (float): ratio of specific heats
            flowType (FlowState, optional): States whether the flow is currently supersonic or subsonic. Defaults to FlowState.SUPER_SONIC.

        Returns:
            float: mach number
        
Calculates the mach number based of the ratio of total temperature to sonic total temperature T0/T0
Calculates the mach number based of the ratio of total temperature to sonic total temperature T0 / T0
def calc_mach_from_To_ToStar(
        t_tSt: float, gamma: float, flowType: FlowState = FlowState.SUPER_SONIC
    ) -> float:
        tolerance = 1e-5
        if t_tSt == 1.0:
            return 1
        elif flowType == FlowState.SUPER_SONIC:
            return brenth(RayleighFlowRelations.calc_To_ToSt, 1 + tolerance, 40, args=(gamma, t_tSt,))
        elif flowType == FlowState.SUB_SONIC:
            return brenth(RayleighFlowRelations.calc_To_ToSt, tolerance, 1 - tolerance, args=(gamma, t_tSt,))
        else:
            raise ValueError(
                Back.RED + Fore.BLACK + "Flow Type [{}] not supported for Fanno"
                " Flow! Accepted Types: 'Supersonic' & 'Subsonic'".format(flowType.name)
                + Back.RESET
                + Fore.RESET
            )
def calc_mach_from_To_ToStar ( t_tSt : float , gamma : float , flowType : FlowState = FlowState . SUPER_SONIC ) -> float : tolerance = 1e-5 if t_tSt == 1.0 : return 1 elif flowType == FlowState . SUPER_SONIC : return brenth ( RayleighFlowRelations . calc_To_ToSt , 1 + tolerance , 40 , args = ( gamma , t_tSt , ) ) elif flowType == FlowState . SUB_SONIC : return brenth ( RayleighFlowRelations . calc_To_ToSt , tolerance , 1 - tolerance , args = ( gamma , t_tSt , ) ) else : raise ValueError ( Back . RED + Fore . BLACK + "Flow Type [{}] not supported for Fanno" " Flow! Accepted Types: 'Supersonic' & 'Subsonic'" . format ( flowType . name ) + Back . RESET + Fore . RESET )
Calculates the mach number based of the ratio of total temperature to sonic total temperature T0/T0
Calculates the mach number based of the ratio of total temperature to sonic total temperature T0 / T0
"""Calculates the mach number based of the ratio of total temperature to sonic total temperature T0/T0*

        Args:
            po_poSt (float): Ratio of total temperature to sonic total temperature T0/T0*
            gamma (float): ratio of specific heats
            flowType (FlowState, optional): States whether the flow is currently supersonic or subsonic. Defaults to FlowState.SUPER_SONIC.

        Returns:
            float: mach number
        """
None
float
t_tSt
float
gamma
float
ratio of specific heats
ratio of specific heats
flowType
FlowState
States whether the flow is currently supersonic or subsonic. Defaults to FlowState.SUPER_SONIC.
States whether the flow is currently supersonic or subsonic . Defaults to FlowState . SUPER_SONIC .
FlowState.SUPER_SONIC
po_poSt
Ratio of total temperature to sonic total temperature T0/T0
Ratio of total temperature to sonic total temperature T0 / T0