*ARCHIVED* development moved to aircraft-studio.
elliptical and rectangular lift distributions
Changed files
creator.py
@@ -154,12 +154,12 @@
154
154
"""
155
155
y_c = float()
156
156
if 0 <= x < p_c:
157
Removed:
y_c = (m / (p**2)) * (2 * p * (x / self.chord)
158
Removed:
- (x / self.chord)**2)
157
Added:
y_c = (m / (p ** 2)) * (2 * p * (x / self.chord)
158
Added:
- (x / self.chord) ** 2)
159
159
elif p_c <= x <= self.chord:
160
Removed:
y_c = (m / ((1 - p)**2)) * ((1 - 2 * p)
161
Removed:
+ 2 * p * (x / self.chord)
162
Removed:
- (x / self.chord)**2)
160
Added:
y_c = (m / ((1 - p) ** 2)) * ((1 - 2 * p)
161
Added:
+ 2 * p * (x / self.chord)
162
Added:
- (x / self.chord) ** 2)
163
163
return (y_c * self.chord)
164
164
165
165
def get_thickness(x):
@@ -169,17 +169,17 @@
169
169
y_t = 5 * t * self.chord * (
170
170
+0.2969 * sqrt(x / self.chord)
171
171
- 0.1260 * (x / self.chord)
172
Removed:
- 0.3516 * (x / self.chord)**2
173
Removed:
+ 0.2843 * (x / self.chord)**3
174
Removed:
- 0.1015 * (x / self.chord)**4)
172
Added:
- 0.3516 * (x / self.chord) ** 2
173
Added:
+ 0.2843 * (x / self.chord) ** 3
174
Added:
- 0.1015 * (x / self.chord) ** 4)
175
175
return y_t
176
176
177
177
def get_theta(x):
178
178
dy_c = float()
179
179
if 0 <= x < p_c:
180
Removed:
dy_c = ((2 * m) / p**2) * (p - x / self.chord)
180
Added:
dy_c = ((2 * m) / p ** 2) * (p - x / self.chord)
181
181
elif p_c <= x <= self.chord:
182
Removed:
dy_c = (2 * m) / ((1 - p)**2) * (p - x / self.chord)
182
Added:
dy_c = (2 * m) / ((1 - p) ** 2) * (p - x / self.chord)
183
183
theta = atan(dy_c)
184
184
return theta
185
185
evaluator.py
@@ -13,9 +13,26 @@
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program. If not, see <https://www.gnu.org/licenses/>.
15
15
16
Removed:
# F_z =
16
Added:
from math import sin, cos, atan, sqrt
17
17
18
18
19
Added:
def get_total_mass(*component):
20
Added:
total_mass = float()
21
Added:
for _ in component:
22
Added:
total_mass += _.mass
23
Added:
return total_mass
24
Added:
25
Added:
26
Added:
def lift_rectangular(lift, semi_span):
27
Added:
L_prime = lift / (semi_span * 2)
28
Added:
return L_prime
29
Added:
30
Added:
31
Added:
def lift_elliptical(L_0, y, semi_span):
32
Added:
L_prime = L_0 * sqrt(1 - (y / semi_span) ** 2)
33
Added:
return L_prime
34
Added:
35
Added:
19
36
def get_centroid(airfoil):
20
37
area = airfoil.stringer.area
21
38
numerator = float()
@@ -25,10 +42,3 @@
25
42
numerator += _ * area
26
43
# denominator
27
44
# z_c =
28
Removed:
29
Removed:
30
Removed:
def get_total_mass(self, *component):
31
Removed:
total_mass = float()
32
Removed:
for _ in component:
33
Removed:
total_mass += _.mass
34
Removed:
return total_mass
main.py
@@ -76,6 +76,8 @@
76
76
af.stringer.add_mass(STRINGER_MASS)
77
77
# af.stringer.print_info(2)
78
78
79
Added:
print(evaluator.get_total_mass(af, af.spar, af.stringer))
80
Added:
79
81
# Plot components with matplotlib
80
82
creator.plot(af, af.spar, af.stringer)
81
83