-
Notifications
You must be signed in to change notification settings - Fork 0
/
MOIIterator.py
82 lines (65 loc) · 2.3 KB
/
MOIIterator.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 20 09:49:58 2019
@author: daanv
"""
import numpy as np
import matplotlib.pyplot as plt
from Centroid import *
from DiscretizationV2 import *
#from InternalLoads import *
from MomentOfInertia import *
#from ReactionForcesV2 import *
#from ShapeOfAileron import *
#from ShearFlows import *
from Stiffeners import *
from UniversalConstants import *
Izzactual=1.252E+07
Iyyactual=9.934E+07
##50 Booms
#Iyy= 97028265.30805449
#Izz= 12556285.832960596
##100 Booms
#Iyy= 97176018.87363233
#Izz= 12545621.129745593
##150 Booms
#Iyy= 97226010.9787685
#Izz= 12542104.797035603
#
#print(Izzactual/Izz)
#print(Iyyactual/Iyy)
Izzlist=[]
Iyylist=[]
max_booms = 500
for i in range(10,max_booms):
booms_between=i #The amount of booms between each centre
#Generate stiffener locations
Stiffeners = generateStiffeners(h_a, c_a, n_st, A_st, t_sk, t_sp, Ybar_st, 0)
Stiffeners_corrected = generateStiffeners(h_a, c_a, n_st, A_st, t_sk, t_sp, Ybar_st, 1)
#Finding the centroid (small letter due to reference system)
y_bar,z_bar=findCentroid(Stiffeners_corrected)
##Discretize cross-section
cross_disc=discretizeCrossSection(Stiffeners, Stiffeners_corrected, h_a, c_a, n_st, A_st, t_sk, t_sp, y_bar, z_bar, booms_between, Ybar_st, 1)
##Calc MOI
I_zz,I_yy = momentOfInertia(cross_disc)
Izzlist.append(I_zz)
Iyylist.append(I_yy)
#plt.subplot(211)
#plt.plot(range(10,max_booms),Izzlist)
#plt.grid()
#plt.xlabel('Number of Booms', fontsize=20)
#plt.ylabel('I_zz (mm^4)', fontsize=20)
#plt.tick_params(labelsize=13)
##plt.plot(range(max_booms),Izzactual*np.ones((max_booms,1)))
#plt.subplot(212)
#plt.plot(range(10,max_booms),Iyylist)
#plt.grid()
#plt.xlabel('Number of Booms', fontsize=20)
#plt.ylabel('I_yy (mm^4)', fontsize=20)
#plt.tick_params(labelsize=13)
#plt.plot(range(max_booms),Iyyactual*np.ones((max_booms,1)))
#plt.show()
# plot discretizations
#B = discretizeCrossSection(Stiffeners, Stiffeners_corrected, h_a, c_a, n_st, A_st, t_sk, t_sp, y_bar, z_bar, booms_between, Ybar_st, 0)
#Balt = discretizeCrossSection(Stiffeners, Stiffeners_corrected, h_a, c_a, n_st, A_st, t_sk, t_sp, y_bar, z_bar, booms_between, Ybar_st, 1)
#plotCrossSection(B, Balt)