Exemplo n.º 1
0
 def test_get_naca_wing(self):
     dx = 0.15
     c = 1.5
     span = 3.0
     airfoils = ['23014', '22112', '0012', '2410']
     for airfoil in airfoils:
         x, y, z = G.get_naca_wing(dx, airfoil, span, c)
         assert not np.any(z) > (span / dx + dx)
Exemplo n.º 2
0
 def test_get_naca_wing(self):
     dx = (10)**(np.random.uniform(-2, -1))
     c = np.random.uniform(0.5, 2.0)
     span = np.random.uniform(1.0, 4.0)
     series = np.random.choice(
         ['210', '220', '230', '240', '250', '221', '231', '241', '251'])
     t = np.random.randint(10, 24)
     airfoil_1 = series + str(t)
     camber = str(2 + np.random.randint(5)) + str(2 + np.random.randint(6))
     airfoil_2 = np.random.choice(['00', camber]) + str(t)
     airfoil = np.random.choice([airfoil_1, airfoil_2])
     x, y, z = get_naca_wing(dx, airfoil, span, c)
     count = 0
     for zi in z:
         if abs(zi) > (span + dx) / 2.0:
             count += 1
     assert count == 0