summaryrefslogtreecommitdiff
path: root/creator.py
diff options
context:
space:
mode:
Diffstat (limited to 'creator.py')
-rw-r--r--creator.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/creator.py b/creator.py
index a2626d0..8b6b8ae 100644
--- a/creator.py
+++ b/creator.py
@@ -50,6 +50,8 @@ class Coordinates:
if chord < 10:
self.chord = 10
self.semi_span = semi_span
+ # mass
+ self.mass = float()
# Component material
self.material = str()
# Upper coordinates
@@ -60,6 +62,7 @@ class Coordinates:
self.y_l = []
# Coordinates x_u, y_u, x_l, y_l packed in single list
self.coord = []
+
# The airfoil components know the Coordinates instance's coords
global parent
parent = self
@@ -67,6 +70,9 @@ class Coordinates:
def __str__(self):
return type(self).__name__
+ def add_mass(self, mass):
+ self.mass = len(self.x_u) * mass
+
def print_coord(self, round):
"""
Print all the component's coordinates to the terminal.
@@ -249,7 +255,7 @@ class Spar(Coordinates):
def __init__(self):
super().__init__(parent.chord, parent.semi_span)
- def add(self, airfoil_coord, spar_x):
+ def add_coord(self, airfoil_coord, spar_x):
"""
Add a single spar at the % chord location given to function.
@@ -290,8 +296,8 @@ class Stringer(Coordinates):
def __init__(self):
super().__init__(parent.chord, parent.semi_span)
- def add(self, airfoil_coord, spar_coord, stringer_u_1, stringer_u_2,
- stringer_l_1, stringer_l_2):
+ def add_coord(self, airfoil_coord, spar_coord, stringer_u_1, stringer_u_2,
+ stringer_l_1, stringer_l_2):
"""
Add equally distributed stringers to four airfoil locations
(upper nose, lower nose, upper surface, lower surface).
Copyright 2019--2024 Marius PETER