diff options
author | Marius Peter <blendoit@gmail.com> | 2019-07-04 10:26:55 -0700 |
---|---|---|
committer | Marius Peter <blendoit@gmail.com> | 2019-07-04 10:26:55 -0700 |
commit | 7d0859d55a984a0c42111a620b3bb1ed7982c38e (patch) | |
tree | ab0218e93333e87b78294e8b134d2110ad2147c5 /creator.py | |
parent | 0e6e5f026ed443e40af2d20d37e90f6e16a0e722 (diff) |
remove sqrt operator from creator
Diffstat (limited to 'creator.py')
-rw-r--r-- | creator.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -29,7 +29,7 @@ Functions: import sys import os.path import numpy as np -from math import sin, cos, atan, sqrt +from math import sin, cos, atan import bisect as bi import matplotlib.pyplot as plt @@ -64,6 +64,8 @@ class Airfoil: @classmethod def from_dimensions(cls, chord, semi_span): + """Create airfoil from its chord and semi-span.""" + if chord > 20: cls.chord = chord else: @@ -114,8 +116,8 @@ class Airfoil: """Returns thickness from 1 'x' along the airfoil chord.""" x = 0 if x < 0 else x z_t = 5 * t * self.chord * ( - + 0.2969 * sqrt(x / self.chord) - - 0.1260 * (x / self.chord) + + 0.2969 * (x / self.chord) ** 0.5 + - 0.1260 * (x / self.chord) ** 1 - 0.3516 * (x / self.chord) ** 2 + 0.2843 * (x / self.chord) ** 3 - 0.1015 * (x / self.chord) ** 4) |