Пример #1
0
def sigmaMax(Mach, gamma=1.4):
    """ computes the MAXIMUM shock angle (always subsonic downstream flow)
    """
    M2 = np.square(Mach)
    ka = (M2-1.)*(1.+.5*(gamma-1.)*M2)
    kb = .25*((gamma+1.)*M2-(3.-gamma))*M2 + 1.
    return degree.atan(np.sqrt((kb+np.sqrt(kb**2+ka))/ka))
Пример #2
0
def strongsigma_Mach_deflection(Mach, deflection, gamma=1.4):
    ka = (1. + .5*(gamma+1.)*Mach**2)*degree.tan(deflection)
    kb = 1. - Mach**2
    kc = (1. + .5*(gamma-1.)*Mach**2)*degree.tan(deflection)
    kd = (ka**2/3. - kb)/3.
    ke = 2.*ka**3/27. - ka*kb/3. + kc
    if ke**2 - 4.*kd**3 > 0:
        print "no strong shock wave solution"
        return 90.
    else:
        phi = math.acos(-.5*ke/math.sqrt(kd**3)) + 4*math.pi
        kf  = 2.*math.sqrt(kd)*math.cos(phi/3.) - ka/3.
        return degree.atan(1./kf)