Commit 721c2690 authored by Frederik Zahle's avatar Frederik Zahle

Merge branch 'airfoil_mod_merge' into 'master'

added airfoil shape mods

See merge request !35
parents 1d29a83c 68b3f541
Pipeline #20116 passed with stages
in 6 minutes and 24 seconds
......@@ -86,6 +86,7 @@ nosetests.xml
*.xyz
*.xyz.fvbnd
*.x2d
Icon?
ehthumbs.db
......
This diff is collapsed.
......@@ -120,6 +120,105 @@ class AirfoilShapeTests2(unittest.TestCase):
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,0.6714187425159088, places=5)
def test_wavy(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=True)
af.wavy(-100e-3, 100e-3, 40e-3, 0.5e-3, 20e-3, 128)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,1.0209455387348676, places=5)
def test_bite(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=True)
af.bite(-20e-3)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,0.7387984401323768, places=5)
af.bite(20e-3)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,0.6685177054337146, places=5)
def test_step(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=True)
af.step(-100e-3, 100e-3, 1e-3, 0.1e-3/3, 128)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,0.9917633146652349, places=5)
def test_moveLE(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=3)
af.moveLE(0.15, 15e-3)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,1.4250613036049513, places=5)
def test_flatsanding(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=True)
af.flatsanding(-10e-3, 25e-3, 128)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,0.18489494967820264, places=5)
def test_rough_paras(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=3)
af.rough_paras(100e-3, 1e-3)
box_ref = [-0.05001856, 0.06530538, -0.16562343, 0.17532873]
self.assertEqual(np.testing.assert_allclose(af.box, box_ref, 1E-06), None)
def test_roughpatch_paras(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=3)
af.roughpatch_paras(10e-3, 100e-3, 1e-3)
box_ref = [0.00099846, 0.06610987, 0.00825168, 0.07490293]
self.assertEqual(np.testing.assert_allclose(af.box_up, box_ref, 1E-06), None)
def test_smoothbite(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=3)
af.smoothbite(20e-3)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s, 0.8913207863514554, places=5)
def test_slot(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=3)
af.slot(-20e-3, 5e-3, 2e-3, 0.1e-3/3, 128)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,-1.6577561460630772, places=5)
def test_smoothslot_start(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=3)
af.smoothslot_start(-20e-3, 20e-3, 2e-3, 0.1e-3/3, 128)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,-2.8872653934553076, places=5)
def test_smoothslot_end(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=3)
af.smoothslot_end(-20e-3, 20e-3, 2e-3, 0.1e-3/3, 128)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,-1.8455353600696762, places=5)
def test_stallstrip(self):
af = AirfoilShape(points=np.loadtxt('data/ffaw3241.dat'))
af.redistribute(128, close_te=3)
af.stallstrip(0., 3e-3, 128, 0.1e-3/5, 90.)
s = np.sum(af.points[:,1])
self.assertAlmostEqual(s,1.1306133840208155, places=5)
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment