Example #1
0
    def _NACA5cambercurve(self, MaxCamberLocFracChord, DesignLiftCoefficient):
        # Generates the camber curve of a NACA 5-digit airfoil

        xmc = MaxCamberLocFracChord

        # Determine the transition point m that separates the polynomial
        # forward section from the linear aft section
        R = act.cubic(-3, 6 * xmc, -3 * xmc**2)
        m = R[2].real

        # Sampling the chord line
        ChordCoord, NCosPoints = act.coslin(xmc)

        # As per equation (A-13) in Bill Mason's Geometry for
        # Aerodynamicists
        QQ = (3 * m - 7 * m**2 + 8 * m**3 - 4 * m**4) / (math.sqrt(
            m * (1 - m))) - 3 / 2 * (1 - 2 * m) * (math.pi / 2 -
                                                   math.asin(1 - 2 * m))
        k1 = 6 * DesignLiftCoefficient / QQ

        # Compute the two sections of the camber curve and its slope
        zcam = []
        dzcamdx = []
        for cc in ChordCoord[0:NCosPoints]:
            list.append(zcam, (1 / 6) * k1 * (cc**3 - 3 * m * cc**2 + m**2 *
                                              (3 - m) * cc))
            list.append(dzcamdx, (1 / 6) * k1 *
                        (3 * cc**2 - 6 * m * cc + m**2 * (3 - m)))
        for cc in ChordCoord[NCosPoints:]:
            list.append(zcam, (1 / 6) * k1 * m**3 * (1 - cc))
            list.append(dzcamdx, -(1 / 6) * m**3)
        return ChordCoord, zcam, dzcamdx
Example #2
0
    def _NACA5cambercurve(self, MaxCamberLocFracChord, DesignLiftCoefficient):
        # Generates the camber curve of a NACA 5-digit airfoil
        
        xmc = MaxCamberLocFracChord

        # Determine the transition point m that separates the polynomial
        # forward section from the linear aft section
        R = act.cubic(-3, 6*xmc, -3*xmc**2)
        m = R[2].real
    
        # Sampling the chord line
        ChordCoord, NCosPoints = act.coslin(xmc)
        
        # As per equation (A-13) in Bill Mason's Geometry for
        # Aerodynamicists
        QQ = (3*m-7*m**2+8*m**3-4*m**4) / (math.sqrt(m*(1-m))) - 3/2*(1-2*m)*(math.pi/2-math.asin(1-2*m))
        k1 = 6*DesignLiftCoefficient/QQ
    
        # Compute the two sections of the camber curve and its slope
        zcam = []
        dzcamdx = []
        for cc in ChordCoord[0:NCosPoints]:
            list.append(zcam, (1/6)*k1*(cc**3 - 3*m*cc**2 + m**2*(3-m)*cc))
            list.append(dzcamdx, (1/6)*k1*(3*cc**2-6*m*cc+m**2*(3-m)))
        for cc in ChordCoord[NCosPoints:]:
            list.append(zcam, (1/6)*k1*m**3*(1-cc))
            list.append(dzcamdx, -(1/6)*m**3);
        return ChordCoord, zcam, dzcamdx
Example #3
0
    def _NACA4cambercurve(self, MaxCamberLocTenthChord, MaxCamberPercChord):
        """ Generates the camber curve of a NACA 4-digit airfoil
        """

        # Using the original notation of Jacobs et al.(1933)
        xmc = MaxCamberLocTenthChord / 10.0
        zcammax = MaxCamberPercChord / 100.0

        # Protect against division by zero on airfoils like NACA0012
        if xmc == 0:
            xmc = 0.2

        # Sampling the chord line
        ChordCoord, NCosPoints = act.coslin(xmc)

        # Compute the two sections of the camber curve and its slope
        zcam = []
        dzcamdx = []
        for cc in ChordCoord[0:NCosPoints]:
            list.append(zcam, (zcammax / (xmc**2)) * (2 * xmc * cc - cc**2))
            list.append(dzcamdx, (zcammax / xmc**2) * (2 * xmc - 2 * cc))
        for cc in ChordCoord[NCosPoints:]:
            list.append(zcam, (zcammax / ((1 - xmc)**2)) *
                        (1 - 2 * xmc + 2 * xmc * cc - (cc**2)))
            list.append(dzcamdx, (zcammax / (1 - xmc)**2) * (2 * xmc - 2 * cc))
        return ChordCoord, zcam, dzcamdx
Example #4
0
    def _NACA4cambercurve(self, MaxCamberLocTenthChord, MaxCamberPercChord):
        """ Generates the camber curve of a NACA 4-digit airfoil
        """
        
        # Using the original notation of Jacobs et al.(1933)
        xmc     = MaxCamberLocTenthChord /10.0;
        zcammax = MaxCamberPercChord    /100.0;
        
        # Protect against division by zero on airfoils like NACA0012
        if xmc==0:
            xmc = 0.2 

        # Sampling the chord line
        ChordCoord, NCosPoints = act.coslin(xmc)
        
        # Compute the two sections of the camber curve and its slope
        zcam = []
        dzcamdx = []
        for cc in ChordCoord[0:NCosPoints]:
            list.append(zcam, (zcammax/(xmc ** 2))*(2*xmc*cc - cc ** 2))
            list.append(dzcamdx, (zcammax/xmc ** 2)*(2*xmc - 2*cc))
        for cc in ChordCoord[NCosPoints:]:
            list.append(zcam, (zcammax/((1-xmc) ** 2))*(1-2*xmc+2*xmc*cc-(cc ** 2)))
            list.append(dzcamdx, (zcammax/(1-xmc) ** 2)*(2*xmc - 2*cc));
        return ChordCoord, zcam, dzcamdx