evaluate wing & main file

Commit
27accf33cf89e4d6a19404887deefd76768b434c
Author
Marius Peter <blendoit@gmail.com>
Author date
Committer
Marius Peter <blendoit@gmail.com>
Committer date
Changed files
evaluate.py
index 00000000..8ea15797 000000..100644
@@ -0,0 +1,16 @@
1 Added: # This file is part of Marius Peter's airfoil analysis package (this program).
2 Added: #
3 Added: # This program is free software: you can redistribute it and/or modify
4 Added: # it under the terms of the GNU General Public License as published by
5 Added: # the Free Software Foundation, either version 3 of the License, or
6 Added: # (at your option) any later version.
7 Added: #
8 Added: # This program is distributed in the hope that it will be useful,
9 Added: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 Added: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 Added: # GNU General Public License for more details.
12 Added: #
13 Added: # You should have received a copy of the GNU General Public License
14 Added: # along with this program. If not, see <https://www.gnu.org/licenses/>.
15 Added:
16 Added: import airfoil as af
main.py
index 00000000..dd6b179a 000000..100644
@@ -0,0 +1,45 @@
1 Added: # This file is part of Marius Peter's airfoil analysis package (this program).
2 Added: #
3 Added: # This program is free software: you can redistribute it and/or modify
4 Added: # it under the terms of the GNU General Public License as published by
5 Added: # the Free Software Foundation, either version 3 of the License, or
6 Added: # (at your option) any later version.
7 Added: #
8 Added: # This program is distributed in the hope that it will be useful,
9 Added: # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 Added: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 Added: # GNU General Public License for more details.
12 Added: #
13 Added: # You should have received a copy of the GNU General Public License
14 Added: # along with this program. If not, see <https://www.gnu.org/licenses/>.
15 Added:
16 Added: import creator
17 Added: import random
18 Added:
19 Added: import time
20 Added: start_time = time.time()
21 Added:
22 Added: CHORD_LENGTH = 100
23 Added: SEMI_SPAN = 200
24 Added:
25 Added: POP_SIZE = 1
26 Added: SAVE_PATH = 'C:/Users/blend/Desktop/python/airfoils'
27 Added:
28 Added:
29 Added: def main():
30 Added: # Create coordinate system specific to airfoil dimensions.
31 Added: creator.Coordinates(CHORD_LENGTH, SEMI_SPAN)
32 Added: for airfoil_number in range(1, POP_SIZE + 1):
33 Added: foo = creator.Airfoil()
34 Added: foo.naca(2412)
35 Added: # foo.print_geometry(4)
36 Added: foo.spar = creator.Spar()
37 Added: foo.spar.add_spar(foo.coordinates, 'aluminium', 0.15)
38 Added: creator.plot(foo, foo.spar)
39 Added: # foo.save_values(airfoil_number, SAVE_PATH)
40 Added:
41 Added: print("--- %s seconds ---" % (time.time() - start_time))
42 Added:
43 Added:
44 Added: if __name__ == '__main__':
45 Added: main()