CompAero/IsentropecRelations.py
def calc_mach_from_A_Astar(
        A_Astar: float, gamma: float, flowType: FlowState = FlowState.SUPER_SONIC
    ) -> float:
        """Calculates the mach number for a flow given the nozzle area ratio and flow type

        Args:
            A_Astar (float): Ratio of nozzle area ratio to sonic area ratio
            gamma (float): ratio of specific heats
            flowType (FlowState, optional): Type of flow whether it is super sonic of subsonic. Defaults to FlowState.SUPER_SONIC.

        Returns:
            float: mach number
        """
        assert isinstance(flowType, FlowState)
        if A_Astar == 1.0:
            return A_Astar
        elif flowType == FlowState.SUPER_SONIC:
            return brenth(IsentropicRelations.calc_A_Astar, 1, 30, args=(gamma, A_Astar))
        elif flowType == FlowState.SUB_SONIC:
            return brenth(IsentropicRelations.calc_A_Astar, 0.001, 1, args=(gamma, A_Astar))
        else:
            print("Unsupported flow type passed to A/A* calculations. Type: {}".format(flowType.name))
            return nan
Calculates the mach number for a flow given the nozzle area ratio and flow type

        Args:
            A_Astar (float): Ratio of nozzle area ratio to sonic area ratio
            gamma (float): ratio of specific heats
            flowType (FlowState, optional): Type of flow whether it is super sonic of subsonic. Defaults to FlowState.SUPER_SONIC.

        Returns:
            float: mach number
        
Calculates the mach number for a flow given the nozzle area ratio and flow type
Calculates the mach number for a flow given the nozzle area ratio and flow type
def calc_mach_from_A_Astar(
        A_Astar: float, gamma: float, flowType: FlowState = FlowState.SUPER_SONIC
    ) -> float:
        assert isinstance(flowType, FlowState)
        if A_Astar == 1.0:
            return A_Astar
        elif flowType == FlowState.SUPER_SONIC:
            return brenth(IsentropicRelations.calc_A_Astar, 1, 30, args=(gamma, A_Astar))
        elif flowType == FlowState.SUB_SONIC:
            return brenth(IsentropicRelations.calc_A_Astar, 0.001, 1, args=(gamma, A_Astar))
        else:
            print("Unsupported flow type passed to A/A* calculations. Type: {}".format(flowType.name))
            return nan
def calc_mach_from_A_Astar ( A_Astar : float , gamma : float , flowType : FlowState = FlowState . SUPER_SONIC ) -> float : assert isinstance ( flowType , FlowState ) if A_Astar == 1.0 : return A_Astar elif flowType == FlowState . SUPER_SONIC : return brenth ( IsentropicRelations . calc_A_Astar , 1 , 30 , args = ( gamma , A_Astar ) ) elif flowType == FlowState . SUB_SONIC : return brenth ( IsentropicRelations . calc_A_Astar , 0.001 , 1 , args = ( gamma , A_Astar ) ) else : print ( "Unsupported flow type passed to A/A* calculations. Type: {}" . format ( flowType . name ) ) return nan
Calculates the mach number for a flow given the nozzle area ratio and flow type
Calculates the mach number for a flow given the nozzle area ratio and flow type
"""Calculates the mach number for a flow given the nozzle area ratio and flow type

        Args:
            A_Astar (float): Ratio of nozzle area ratio to sonic area ratio
            gamma (float): ratio of specific heats
            flowType (FlowState, optional): Type of flow whether it is super sonic of subsonic. Defaults to FlowState.SUPER_SONIC.

        Returns:
            float: mach number
        """
None
float
A_Astar
float
Ratio of nozzle area ratio to sonic area ratio
Ratio of nozzle area ratio to sonic area ratio
gamma
float
ratio of specific heats
ratio of specific heats
flowType
FlowState
Type of flow whether it is super sonic of subsonic. Defaults to FlowState.SUPER_SONIC.
Type of flow whether it is super sonic of subsonic . Defaults to FlowState . SUPER_SONIC .
FlowState.SUPER_SONIC