summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/main.py b/main.py
index bba67ce..17d081a 100644
--- a/main.py
+++ b/main.py
@@ -13,13 +13,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-import creator
+import creator # Create geometry
+import evaluator # Evaluate geometry
+import generator # Iteratevely evaluate instances of geometry
import random
import time
start_time = time.time()
-CHORD_LENGTH = 10
+CHORD_LENGTH = 40
SEMI_SPAN = 200
POP_SIZE = 1
@@ -27,7 +29,7 @@ SAVE_PATH = 'C:/Users/blend/github/UCLA_MAE_154B/save'
def main():
- # Create coordinate system specific to airfoil dimensions.
+ # Create coordinate system specific to our airfoil dimensions.
creator.Coordinates(CHORD_LENGTH, SEMI_SPAN)
# Interate through all wings in population.
@@ -35,27 +37,25 @@ def main():
# Create airfoil instance
af = creator.Airfoil()
# Define NACA airfoil coordinates
- af.naca(2412)
-
- print(af.coord)
+ af.add_naca(2412)
# Create spar instance
af.spar = creator.Spar()
- # Define the spar coordinates
- af.spar.add_spar(af.coord, 0.15)
- af.spar.add_spar(af.coord, 0.55)
+ # Define the spar coordinates, stored in single spar object
+ af.spar.add(af.coord, 0.15)
+ af.spar.add(af.coord, 0.55)
# Print coordinates of af.spar to terminal
- # # Create stringer instance
- # af.stringer = creator.Stringer()
- # # Define the stringer coordinates
- # af.stringer.add_stringer(af.coordinates, 0.15)
- # af.stringer.add_stringer(af.coordinates, 0.55)
- # # Print coordinates of af.stringer to terminal
- # af.stringer.print_coord(4)
+ # Create stringer instance
+ af.stringer = creator.Stringer()
+ # Define the stringer coordinates from airfoil's and spars'
+ af.stringer.add(af.coord, af.spar.coord, 0.2, 0.2, 0.2, 0.2)
+ # Print coordinates of af.stringer to terminal
+ # af.stringer.print_coord(2)
+ print(af.stringer.coord)
# Plot components with matplotlib
- creator.plot(af, af.spar)
+ creator.plot(af, af.spar, af.stringer)
# # Save component coordinates
# af.save_coord(SAVE_PATH)
Copyright 2019--2024 Marius PETER