def test_save(self):
        ae = AEFile()

        ae.add_set(
            radius=[0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
            chord=[1.1, 1.0, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1],
            thickness=[
                100.0, 100.0, 90.0, 80.0, 70.0, 60.0, 50.0, 40.0, 30.0, 20.0,
                10.0
            ],
            pc_set_id=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])
        fn = testfilepath + "tmp/ae_file.txt"
        ae.save(fn)
        ae2 = AEFile(fn)
        assert str(ae) == str(ae2)
    def test_add_set(self):
        ae = AEFile(testfilepath + "NREL_5MW_ae.txt")

        ae.add_set(
            radius=[0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0],
            chord=[1.1, 1.0, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1],
            thickness=[
                100.0, 100.0, 90.0, 80.0, 70.0, 60.0, 50.0, 40.0, 30.0, 20.0,
                10.0
            ],
            pc_set_id=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])

        ae.add_set(radius=[0.0, 0.1],
                   chord=[1.1, 1.0],
                   thickness=[100.0, 100.0],
                   pc_set_id=[1.0, 1.0],
                   set_id=4)

        self.assertEqual(ae.thickness(38.950), 21)
        self.assertEqual(ae.chord(38.950), 3.256)
        self.assertEqual(ae.pc_set_nr(38.950), 1)
        np.testing.assert_array_equal(ae.chord(
            None, 2), [1.1, 1.0, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1])
        np.testing.assert_array_equal(ae.ae_sets[2][:2], ae.ae_sets[4])