diff options
author | blendoit <blendoit@gmail.com> | 2019-10-20 19:33:53 -0700 |
---|---|---|
committer | blendoit <blendoit@gmail.com> | 2019-10-20 19:33:53 -0700 |
commit | 5e82dedea4c56eafc1bba4f3ec8677b15f51c03f (patch) | |
tree | d754b30ae1f7a892cd22ce092b5c1a8f5ebca847 /evaluator/lift.py | |
parent | 87f2d5da23a0bb7159d64827390b5083b80f1375 (diff) |
Commence declassification of Evaluator
Pointless to have a separate object for the Evaluator when a collection
of evaluator.py methods does the trick.
Diffstat (limited to 'evaluator/lift.py')
-rw-r--r-- | evaluator/lift.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/evaluator/lift.py b/evaluator/lift.py new file mode 100644 index 0000000..6b4363e --- /dev/null +++ b/evaluator/lift.py @@ -0,0 +1,30 @@ +import numpy as np +from math import sqrt + + +def _get_lift_rectangular(aircraft, lift=50): + L_prime = np.array([ + lift / (aircraft.wing.semi_span * 2) + for _ in range(aircraft.wing.semi_span) + ]) + return L_prime + + +def _get_lift_elliptical(aircraft, L_0=3.2): + L_prime = np.array([ + 0.5 * L_0 / (aircraft.wing.semi_span * 2) * + sqrt(1 - (y / aircraft.wing.semi_span)**2) + for y in range(aircraft.wing.semi_span) + ]) + return L_prime + + +def get_lift_total(self, aircraft): + """Combination of rectangular and elliptical lift.""" + # F_z = self._get_lift_rectangular(aircraft) + self._get_lift_elliptical( + # aircraft) + # F_z = self._get_lift_rectangular( + # aircraft) + self._get_lift_elliptical(aircraft) / 2 + # F_z = [i + j for i, j in self._get_lift_rectangular] + # return F_z + return 420 |