summaryrefslogtreecommitdiff
path: root/evaluator.py
diff options
context:
space:
mode:
Diffstat (limited to 'evaluator.py')
-rw-r--r--evaluator.py79
1 files changed, 44 insertions, 35 deletions
diff --git a/evaluator.py b/evaluator.py
index afbde9c..aac7f61 100644
--- a/evaluator.py
+++ b/evaluator.py
@@ -13,49 +13,58 @@ import matplotlib.pyplot as plt
class Evaluator:
- """Performs structural evaluations for the airfoil passed as argument."""
- def __init__(self, aircraft):
- # Evaluator knows all geometrical info from evaluated airfoil
- self.airfoil = self.get_airfoil(aircraft)
- self.spars = self.get_spars(aircraft)
- self.stringers = self.get_stringers(aircraft)
- # Lift
- self.lift_rectangular = []
- self.lift_elliptical = []
- self.lift_total = []
- # Drag
- self.drag = []
- # centroid
- self.centroid = []
+ """Performs structural evaluations on aircrafts.
+ Individual aircrafts must claim an Evaluator object as parent."""
+ def __init__(self):
+ self.aircrafts = []
+ # # Evaluator knows all geometrical info from evaluated airfoil
+ # self.airfoil = self.get_airfoil(aircraft)
+ # self.spars = self.get_spars(aircraft)
+ # self.stringers = self.get_stringers(aircraft)
+ # # Lift
+ # self.lift_rectangular = []
+ # self.lift_elliptical = []
+ # self.lift_total = []
+ # # Drag
+ # self.drag = []
+ # # centroid
+ # self.centroid = []
# Inertia terms:
self.I_ = {'x': 0, 'z': 0, 'xz': 0}
def __str__(self):
return type(self).__name__
- def get_airfoil(self, aircraft):
- """Get data of spars belonging to aircraft."""
+ def update(self):
+ """Get all aircrafts' data."""
try:
- pass
+ print(self.aircrafts)
except:
- pass
- pass
-
- def get_spars(self, aircraft):
- """Get data of spars belonging to aircraft."""
- try:
- pass
- except:
- pass
- pass
-
- def get_stringers(self, aircraft):
- """Get data of spars belonging to aircraft."""
- try:
- pass
- except:
- pass
- pass
+ print("failed!")
+
+ # def get_airfoil(self, aircraft):
+ # """Get data of spars belonging to aircraft."""
+ # try:
+ # pass
+ # except:
+ # pass
+ # pass
+
+ # def get_spars(self, aircraft):
+ # """Get data of spars belonging to aircraft."""
+ # try:
+ # pass
+ # except:
+ # pass
+ # pass
+
+ # def get_stringers(self, aircraft):
+ # """Get data of spars belonging to aircraft."""
+ # try:
+ # pass
+ # except:
+ # pass
+ # pass
def info_print(self, round):
"""Print all the component's evaluated data to the terminal."""
Copyright 2019--2024 Marius PETER