CompAero/ObliqueShockRelations.py
def calc_mach_normal_ahead_shock(mach: float, beta: float) -> float:
        """ Calculates the normal component of the mach number ahead of the shock wave

        Args:
            mach (float): Mach number of flow ahead of shock wave
            beta (float): Angle of oblique shock in radians

        Raises:
            ValueError: Raised if mach number is less than 1.0

        Returns:
            float: Normal component of upstream mach number
        """
        if mach < 1.0:
            raise ValueError("Normal Shocks Require a mach greater than 1")

        machWave = ObliqueShockRelations.calc_mach_wave_angle(mach)

        if abs(beta - machWave) < 1e-5:
            return 1.0

        if beta < machWave:
            return nan

        return mach * sin(beta)
 Calculates the normal component of the mach number ahead of the shock wave

        Args:
            mach (float): Mach number of flow ahead of shock wave
            beta (float): Angle of oblique shock in radians

        Raises:
            ValueError: Raised if mach number is less than 1.0

        Returns:
            float: Normal component of upstream mach number
        
Calculates the normal component of the mach number ahead of the shock wave
Calculates the normal component of the mach number ahead of the shock wave
def calc_mach_normal_ahead_shock(mach: float, beta: float) -> float:
        if mach < 1.0:
            raise ValueError("Normal Shocks Require a mach greater than 1")
        machWave = ObliqueShockRelations.calc_mach_wave_angle(mach)
        if abs(beta - machWave) < 1e-5:
            return 1.0
        if beta < machWave:
            return nan
        return mach * sin(beta)
def calc_mach_normal_ahead_shock ( mach : float , beta : float ) -> float : if mach < 1.0 : raise ValueError ( "Normal Shocks Require a mach greater than 1" ) machWave = ObliqueShockRelations . calc_mach_wave_angle ( mach ) if abs ( beta - machWave ) < 1e-5 : return 1.0 if beta < machWave : return nan return mach * sin ( beta )
Calculates the normal component of the mach number ahead of the shock wave
Calculates the normal component of the mach number ahead of the shock wave
""" Calculates the normal component of the mach number ahead of the shock wave

        Args:
            mach (float): Mach number of flow ahead of shock wave
            beta (float): Angle of oblique shock in radians

        Raises:
            ValueError: Raised if mach number is less than 1.0

        Returns:
            float: Normal component of upstream mach number
        """
Normal component of upstream mach number
Normal component of upstream mach number
float
Raised if mach number is less than 1.0
Raised if mach number is less than 1 . 0
ValueError
mach
float
Mach number of flow ahead of shock wave
Mach number of flow ahead of shock wave
beta
float
Angle of oblique shock in radians
Angle of oblique shock in radians