From 99362c09681f5382470f36fed4a6caf6948a84e1 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Thu, 13 Jun 2019 16:34:46 -0700 Subject: start work on evaluator for real though --- evaluator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'evaluator.py') diff --git a/evaluator.py b/evaluator.py index 6a87b7e..180d49a 100644 --- a/evaluator.py +++ b/evaluator.py @@ -13,4 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -import creator +# F_z = + + +def get_centroid(airfoil): + pass -- cgit v1.2.3 From ab880773c095e7e9249f14435a9e03f4af328364 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Thu, 13 Jun 2019 16:49:56 -0700 Subject: main.py function docstrings --- evaluator.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'evaluator.py') diff --git a/evaluator.py b/evaluator.py index 180d49a..f3a05f4 100644 --- a/evaluator.py +++ b/evaluator.py @@ -18,3 +18,8 @@ def get_centroid(airfoil): pass + + +def get_mass(*component): + for _ in len(component): + mass += component.mass -- cgit v1.2.3 From 18fd5385ec0ff1f303b38802d22cfec357f58b62 Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Thu, 13 Jun 2019 17:40:44 -0700 Subject: stringer areas --- evaluator.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'evaluator.py') diff --git a/evaluator.py b/evaluator.py index f3a05f4..4a65a4e 100644 --- a/evaluator.py +++ b/evaluator.py @@ -20,6 +20,8 @@ def get_centroid(airfoil): pass -def get_mass(*component): - for _ in len(component): - mass += component.mass +def get_total_mass(self, *component): + total_mass = float() + for _ in component: + total_mass += _.mass + return total_mass -- cgit v1.2.3 From 58c8a564e87f6325d66972d6c971eea8c465ba2e Mon Sep 17 00:00:00 2001 From: Marius Peter Date: Mon, 17 Jun 2019 18:07:25 -0700 Subject: commence work on centroid --- evaluator.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'evaluator.py') diff --git a/evaluator.py b/evaluator.py index 4a65a4e..69a589a 100644 --- a/evaluator.py +++ b/evaluator.py @@ -17,7 +17,14 @@ def get_centroid(airfoil): - pass + area = airfoil.stringer.area + numerator = float() + for _ in airfoil.stringer.x_u: + numerator += _ * area + for _ in airfoil.stringer.x_l: + numerator += _ * area + denominator + # z_c = def get_total_mass(self, *component): -- cgit v1.2.3