summaryrefslogtreecommitdiff
path: root/creator.py
diff options
context:
space:
mode:
authorMarius Peter <blendoit@gmail.com>2019-07-04 10:26:55 -0700
committerMarius Peter <blendoit@gmail.com>2019-07-04 10:26:55 -0700
commit7d0859d55a984a0c42111a620b3bb1ed7982c38e (patch)
treeab0218e93333e87b78294e8b134d2110ad2147c5 /creator.py
parent0e6e5f026ed443e40af2d20d37e90f6e16a0e722 (diff)
remove sqrt operator from creator
Diffstat (limited to 'creator.py')
-rw-r--r--creator.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/creator.py b/creator.py
index 22449bd..15425bc 100644
--- a/creator.py
+++ b/creator.py
@@ -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)
Copyright 2019--2024 Marius PETER