summaryrefslogtreecommitdiff
path: root/evaluator
diff options
context:
space:
mode:
Diffstat (limited to 'evaluator')
-rw-r--r--evaluator/__init__.py0
-rw-r--r--evaluator/evaluator.py41
2 files changed, 29 insertions, 12 deletions
diff --git a/evaluator/__init__.py b/evaluator/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/evaluator/__init__.py
diff --git a/evaluator/evaluator.py b/evaluator/evaluator.py
index 6c7f901..afbde9c 100644
--- a/evaluator/evaluator.py
+++ b/evaluator/evaluator.py
@@ -14,18 +14,11 @@ import matplotlib.pyplot as plt
class Evaluator:
"""Performs structural evaluations for the airfoil passed as argument."""
- def __init__(self, airfoil):
+ def __init__(self, aircraft):
# Evaluator knows all geometrical info from evaluated airfoil
- self.airfoil = airfoil
- self.spar = airfoil.spar
- self.stringer = airfoil.stringer
- # Global dimensions
- self.chord = airfoil.chord
- self.semi_span = airfoil.semi_span
- # Mass & spanwise distribution
- self.mass_total = float(airfoil.mass + airfoil.spar.mass +
- airfoil.stringer.mass)
- self.mass_dist = []
+ 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 = []
@@ -40,9 +33,33 @@ class Evaluator:
def __str__(self):
return type(self).__name__
+ 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."""
- name = ' EVALUATOR DATA FOR {} '.format(str(self).upper())
+ name = f' {print(self)} DATA FOR {str(self).upper()} '
num_of_dashes = len(name)
print(num_of_dashes * '-')
print(name)
Copyright 2019--2024 Marius PETER