def Rate_of_twist(T): constant = T / (4 * Wing.Area_cell()**2 * WingStress.shear_modulus) integral = Wing.HSpar1 / Wing.ThSpar1 integral += 2 * Wing.length_Skin_x_c(Wing.ChSpar1, Wing.ChSpar2) / Wing.ThSkin integral += Wing.HSpar2 / Wing.ThSpar2 dthetadz = constant / integral return dthetadz
def Calc_spar_inertia( HSpar, TSpar, ChSpar, zs ): # Input height spar (m), thickness spar (m), location centroid w.r.t. chord and chordwise location (-) spar respectively (-) Ixx = (1 / 12) * TSpar * (HSpar**3) # Calculation of Ixx Iyy = (1 / 12) * HSpar * (TSpar**3) # Caclulation of Iyy w/o steiner term Iyysteiner = TSpar * HSpar * (abs((Wing.centroid * Wing.length_chord(zs)) - (ChSpar * Wing.length_chord(zs)))**2 ) # Calculation of steiner term Iyy Iyy = Iyy + Iyysteiner # Adding both Iyy moments of inertia together return Ixx, Iyy
def Calc_skin_inertia_Ixx(Spar1, Spar2): n = 100 # number of sections dx = ((Spar2 - Spar1) / n) x = Spar1 Ixx = 0 for i in range(n): x = x + dx dxlength = dx * Wing.Chordlength y = ((Wing.airfoilordinate(x - dx) + Wing.airfoilordinate(x)) / 2) * Wing.Chordlength dy = abs(Wing.airfoilordinate(x - dx) - Wing.airfoilordinate(x)) * Wing.Chordlength length = np.sqrt(dxlength**2 + dy**2) dIxx = length * Wing.ThSkin * (y**2) Ixx = Ixx + dIxx Ixx = Ixx * 2 return Ixx
def Calc_skin_inertia_Iyy(Spar1, Spar2): n = 100 # number of sections dx = ((Spar2 - Spar1) / n) x = Spar1 Iyy = 0 for i in range(n): x = x + dx xlength = x * Wing.Chordlength dxlength = dx * Wing.Chordlength y = ((Wing.airfoilordinate(x - dx) + Wing.airfoilordinate(x)) / 2) * Wing.Chordlength dy = abs(Wing.airfoilordinate(x - dx) - Wing.airfoilordinate(x)) * Wing.Chordlength length = np.sqrt(dxlength**2 + dy**2) dIyy = length * Wing.ThSkin * ( (abs(xlength - (Wing.centroid * Wing.Chordlength)))**2) Iyy = Iyy + dIyy Iyy = Iyy * 2 return Iyy
I_XX_TOT += loc_I_xx + stringer_area * (y_coords[i])**2 I_YY_TOT += loc_I_yy + stringer_area * ( x_coords[i] - Wing.centroid * Wing.Chordlength)**2 I_XY_TOT += loc_I_xy + stringer_area * ( x_coords[i] - Wing.centroid * Wing.Chordlength) * (y_coords[i] - Y_CEN) return I_XX_TOT, I_YY_TOT, I_XY_TOT # returns stiffener x,y locations and rotation # return z_y_angle_coords # [(stringer0 z,y,rot),(stringer1 x,y,rot)] m,m,rad #Ixx and Iyy of the clamps ClampsIxx = ((Wing.AreaClamps / 2) * ((Wing.airfoilordinate(Wing.ChSpar1) * Wing.Chordlength)**2)) * 2 ClampsIyy = ((Wing.AreaClamps / 2) * ((abs(Wing.ChSpar1 - Wing.centroid) * Wing.Chordlength)**2)) * 2 I_XX_TOT_str, I_YY_TOT_str, I_XY_TOT_str = calc_total_stringer_inertia( Wing.get_coord_from_perim(Wing.N_stringers / 2, Wing.ChSpar1, Wing.ChSpar2, Wing.Chordlength)[0], calc_stringer_inertia(Wing.h_str, Wing.w_str, Wing.t_str)) I_XX_Spar1, I_YY_Spar1 = Calc_spar_inertia(Wing.HSpar1, Wing.ThSpar1, Wing.ChSpar1, Wing.z) I_XX_Spar2, I_YY_Spar2 = Calc_spar_inertia(Wing.HSpar2, Wing.ThSpar2, Wing.ChSpar2, Wing.z) I_XX_Skin = Calc_skin_inertia_Ixx(Wing.ChSpar1, Wing.ChSpar2) I_YY_Skin = Calc_skin_inertia_Iyy(Wing.ChSpar1, Wing.ChSpar2)
def Calc_base_shear_flow(boom_areas, n): """ :param boom_areas: Return variable from Boom_area function :param n: Number of sections that divides the perimiter :return: Arrays with s's and qs's, seperated for L and D """ strs_x_coords, strs_y_coords, _ = Wing.x_y_angle_coords strs_x_coords.ito(ureg("m")) strs_y_coords.ito(ureg("m")) strs_x_coords = np.append(strs_x_coords, np.flip(strs_x_coords, 0)) strs_x_coords *= ureg('m') strs_y_coords = np.append(strs_y_coords, np.flip(-1 * strs_y_coords, 0)) strs_y_coords *= ureg('m') S_x = WingStress.D S_y = WingStress.L Ixx = Inertia.Ixx_wb Iyy = Inertia.Iyy_wb ## section 1 2 ds = Wing.HSpar1 / (2 * n) qs12L = np.array([]) qs12D = np.array([]) qs12L = np.append(qs12L, 0) qs12D = np.append(qs12D, 0) s1 = np.array([]) s1 = np.append(s1, 0) s = Q_("0 m") q_loc_L = 0 q_loc_D = 0 x = (Wing.ChSpar1 - Wing.centroid ) * Wing.Chordlength # x_coordinate of Spar 1 w.r.t. the centroid for _ in range(n - 1): s += ds y = s s1 = np.append(s1, s) # Lift q_loc_L += -(S_y / Ixx) * Wing.ThSpar1 * y * ds qs12L = np.append(qs12L, q_loc_L.to(ureg("N/m"))) # Drag q_loc_D += -(S_x / Iyy) * Wing.ThSpar1 * x * ds qs12D = np.append(qs12D, q_loc_D.to(ureg("N/m"))) s += ds y = s s1 = np.append(s1, s) # Lift q_loc_L += -(S_y / Ixx) * (Wing.ThSpar1 * y * ds + boom_areas[0] * Wing.HSpar1 / 2) qs12L = np.append(qs12L, q_loc_L.to(ureg("N/m"))) # Drag q_loc_D += -(S_x / Iyy) * (Wing.ThSpar1 * x * ds + boom_areas[0] * x) qs12D = np.append(qs12D, q_loc_D.to(ureg("N/m"))) ## section 2 3 ds = (Wing.skin_length) / n s = Q_("0 m") qs23L = np.array([]) qs23L = np.append(qs23L, qs12L[-1]) qs23D = np.array([]) qs23D = np.append(qs23D, qs12D[-1]) s2 = np.array([]) s2 = np.append(s2, s) str_counter = 0 for _ in range(n): s = np.add(ds, s) s2 = np.append(s2, s) x_coor, y_coor = Wing.get_xy_from_perim(s / Wing.Chordlength, Wing.ChSpar1) # RELATIVE!! # Lift q_loc_L += -(S_y / Ixx) * (Wing.ThSkin * y_coor * Wing.Chordlength * ds) # Drag q_loc_D += -(S_x / Iyy) * (Wing.ThSkin * (x_coor - Wing.centroid) * Wing.Chordlength * ds) if (np.sqrt( (x_coor * Wing.Chordlength - strs_x_coords[str_counter])**2 + (y_coor * Wing.Chordlength - strs_y_coords[str_counter])**2) < Q_("1 cm")): print("s2:", strs_x_coords[str_counter]) q_loc_L += -(S_y / Ixx) * Wing.A_stringer * strs_y_coords[str_counter] q_loc_D += -(S_x / Iyy) * Wing.A_stringer * ( strs_x_coords[str_counter] / Wing.Chordlength - Wing.centroid) * Wing.Chordlength str_counter += 1 qs23L = np.append(qs23L, q_loc_L.to(ureg("N/m"))) qs23D = np.append(qs23D, q_loc_D.to(ureg("N/m"))) ## Section 3 5 ds = Wing.HSpar2 / n qs35L = np.array([]) qs35D = np.array([]) qs35L = np.append(qs35L, qs23L[-1]) qs35D = np.append(qs35D, qs23D[-1]) s3 = np.array([]) s3 = np.append(s3, 0) s = Q_("0 m") x = (Wing.ChSpar2 - Wing.centroid ) * Wing.Chordlength # x_coordinate of Spar 1 w.r.t. the centroid for _ in range(n): s += ds y = Wing.HSpar2 / 2 - s s3 = np.append(s3, s) # Lift q_loc_L += -(S_y / Ixx) * Wing.ThSpar2 * y * ds qs35L = np.append(qs35L, q_loc_L.to(ureg("N/m"))) # Drag q_loc_D += -(S_x / Iyy) * Wing.ThSpar2 * x * ds qs35D = np.append(qs35D, q_loc_D.to(ureg("N/m"))) ## section 5 6 ds = (Wing.skin_length) / n s = Q_("0 m") qs56L = np.array([]) qs56L = np.append(qs56L, qs35L[-1]) qs56D = np.array([]) qs56D = np.append(qs56D, qs35D[-1]) s4 = np.array([]) s4 = np.append(s4, s) for _ in range(n): s = np.add(ds, s) s4 = np.append(s4, s) x_coor, y_coor = Wing.get_xy_from_perim(s / Wing.Chordlength, Wing.ChSpar2, reverse=True) # RELATIVE!! # Lift q_loc_L += -(S_y / Ixx) * (Wing.ThSkin * y_coor * Wing.Chordlength * ds) # Drag q_loc_D += -(S_x / Iyy) * (Wing.ThSkin * (x_coor - Wing.centroid) * Wing.Chordlength * ds) if (str_counter < Wing.N_stringers): if (abs(x_coor * Wing.Chordlength - strs_x_coords[str_counter]) < Q_("1 cm")): q_loc_L += -( S_y / Ixx) * Wing.A_stringer * strs_y_coords[str_counter] print(strs_x_coords[str_counter]) q_loc_D += -(S_x / Iyy) * Wing.A_stringer * ( strs_x_coords[str_counter] / Wing.Chordlength - Wing.centroid) * Wing.Chordlength str_counter += 1 qs56L = np.append(qs56L, q_loc_L.to(ureg("N/m"))) qs56D = np.append(qs56D, q_loc_D.to(ureg("N/m"))) ## section 6 1 ds = Wing.HSpar1 / (2 * n) qs61L = np.array([]) qs61D = np.array([]) qs61L = np.append(qs61L, qs56L[-1]) qs61D = np.append(qs61D, qs56D[-1]) s5 = np.array([]) s5 = np.append(s5, 0) s = Q_("0 m") x = (Wing.ChSpar1 - Wing.centroid ) * Wing.Chordlength # x_coordinate of Spar 1 w.r.t. the centroid y = -Wing.HSpar1 / 2 # Lift s5 = np.append(s5, 0) q_loc_L += -(S_y / Ixx) * (Wing.ThSpar1 * y * ds + boom_areas[-1] * y) qs61L = np.append(qs61L, q_loc_L.to(ureg("N/m"))) # Drag q_loc_D += -(S_x / Iyy) * (Wing.ThSpar1 * x * ds + boom_areas[-1] * x) qs61D = np.append(qs61D, q_loc_D.to(ureg("N/m"))) for _ in range(n - 1): s += ds y = -Wing.HSpar1 / 2 + s # x_coordinate of Spar 1 w.r.t. the centroid s5 = np.append(s5, s) # Lift q_loc_L += -(S_y / Ixx) * Wing.ThSpar1 * y * ds qs61L = np.append(qs61L, q_loc_L.to(ureg("N/m"))) # Drag q_loc_D += -(S_x / Iyy) * Wing.ThSpar1 * x * ds qs61D = np.append(qs61D, q_loc_D.to(ureg("N/m"))) s1 *= ureg("m") s2 *= ureg("m") s3 *= ureg("m") s4 *= ureg("m") s5 *= ureg("m") qs12L *= ureg("N/m") qs12D *= ureg("N/m") qs23L *= ureg("N/m") qs23D *= ureg("N/m") qs35L *= ureg("N/m") qs35D *= ureg("N/m") qs56L *= ureg("N/m") qs56D *= ureg("N/m") qs61L *= ureg("N/m") qs61D *= ureg("N/m") return s1, s2, s3, s4, s5, qs12L, qs23L, qs35L, qs56L, qs61L, qs12D, qs23D, qs35D, qs56D, qs61D
def Get_xy_components(s1, s2, s3, s4, s5, qs12, qs23, qs35, qs56, qs61): t_ys12 = np.array([]) x_coor_AC = 0.25 * Wing.Chordlength # Moments from section 1 -> 2 for i in range(0, len(qs12) - 1): t_y = qs12[i] / Wing.ThSpar1 t_ys12 = np.append(t_ys12, t_y.to(ureg("N/(m**2)"))) t_y = qs12L[-1] / Wing.ThSpar1 t_ys12 = np.append(t_ys12, t_y.to(ureg("N/(m**2)"))) # Moments from section 2 -> 3 t_xs23 = np.array([]) t_ys23 = np.array([]) for i in range(0, len(qs23) - 1): x_loc_1, y_loc_1 = Wing.get_xy_from_perim(s2[i] / Wing.Chordlength, Wing.ChSpar1) x_loc_2, y_loc_2 = Wing.get_xy_from_perim(s2[i + 1] / Wing.Chordlength, Wing.ChSpar1) x_loc_1 *= Wing.Chordlength x_loc_2 *= Wing.Chordlength y_loc_1 *= Wing.Chordlength y_loc_2 *= Wing.Chordlength Force_angle = np.arctan2(y_loc_2 - y_loc_1, x_loc_2 - x_loc_1) t_x = qs23[i] / Wing.ThSkin * np.cos(Force_angle) t_y = qs23[i] / Wing.ThSkin * np.sin(Force_angle) t_xs23 = np.append(t_xs23, t_x.to(ureg("N/(m**2)"))) t_ys23 = np.append(t_ys23, t_y.to(ureg("N/(m**2)"))) t_x = qs23[-1] / Wing.ThSkin * np.cos(Force_angle) t_y = qs23[-1] / Wing.ThSkin * np.sin(Force_angle) t_xs23 = np.append(t_xs23, t_x.to(ureg("N/(m**2)"))) t_ys23 = np.append(t_ys23, t_y.to(ureg("N/(m**2)"))) # Moments from section 3->5 t_ys35 = np.array([]) for i in range(0, len(qs35) - 1): t_y = qs35[i] / Wing.ThSpar2 t_ys35 = np.append(t_ys35, t_y.to(ureg("N/(m**2)"))) t_y = qs35[-1] / Wing.ThSpar2 t_ys35 = np.append(t_ys35, t_y.to(ureg("N/(m**2)"))) # Moments from section 5 -> 6 t_xs56 = np.array([]) t_ys56 = np.array([]) for i in range(0, len(qs56) - 1): x_loc_1, y_loc_1 = Wing.get_xy_from_perim(s4[i] / Wing.Chordlength, Wing.ChSpar2, reverse=True) x_loc_2, y_loc_2 = Wing.get_xy_from_perim(s4[i + 1] / Wing.Chordlength, Wing.ChSpar2, reverse=True) x_loc_1 *= Wing.Chordlength x_loc_1 -= x_coor_AC x_loc_2 *= Wing.Chordlength x_loc_2 -= x_coor_AC y_loc_1 *= Wing.Chordlength y_loc_2 *= Wing.Chordlength Force_angle = np.arctan2(y_loc_2 - y_loc_1, x_loc_2 - x_loc_1) t_x = qs56[i] / Wing.ThSkin * np.cos(Force_angle) t_y = qs56[i] / Wing.ThSkin * np.sin(Force_angle) t_xs56 = np.append(t_xs56, t_x.to(ureg("N/(m**2)"))) t_ys56 = np.append(t_ys56, t_y.to(ureg("N/(m**2)"))) t_x = qs56[-1] / Wing.ThSkin * np.cos(Force_angle) t_y = qs56[-1] / Wing.ThSkin * np.sin(Force_angle) t_xs56 = np.append(t_xs56, t_x.to(ureg("N/(m**2)"))) t_ys56 = np.append(t_ys56, t_y.to(ureg("N/(m**2)"))) # Moment 6 -> 1 t_ys61 = np.array([]) for i in range(0, len(qs61) - 1): t_y = qs61[i] / Wing.ThSpar1 t_ys61 = np.append(t_ys61, t_y.to(ureg("N/(m**2)"))) t_y = qs61[-1] / Wing.ThSpar1 t_ys61 = np.append(t_ys61, t_y.to(ureg("N/(m**2)"))) t_xs23 *= ureg("N/(m**2)") t_xs56 *= ureg("N/(m**2)") t_ys12 *= ureg("N/(m**2)") t_ys23 *= ureg("N/(m**2)") t_ys35 *= ureg("N/(m**2)") t_ys56 *= ureg("N/(m**2)") t_ys61 *= ureg("N/(m**2)") return t_xs23, t_xs56, t_ys12, t_ys23, t_ys35, t_ys56, t_ys61
def Calc_moment_due_to_shear(s1, s2, s3, s4, s5, qs12L, qs23L, qs35L, qs56L, qs61L): x_coor_AC = 0.25 * Wing.Chordlength Moment_L = 0 # Moments from section 1 -> 2 for i in range(0, len(qs12L) - 1): q_loc = (qs12L[i] + qs12L[i + 1]) / 2 s_loc = (s1[i] + s1[i + 1]) / 2 ds = s1[i + 1] - s1[i] x_loc = Wing.ChSpar1 * Wing.Chordlength - x_coor_AC F_y = q_loc * ds Moment_L += F_y * x_loc # Moments from section 2 -> 3 for i in range(0, len(qs23L) - 1): q_loc = (qs23L[i] + qs23L[i + 1]) / 2 s_loc = (s2[i] + s2[i + 1]) / 2 ds = s2[i + 1] - s2[i] x_loc_1, y_loc_1 = Wing.get_xy_from_perim(s2[i] / Wing.Chordlength, Wing.ChSpar1) x_loc_2, y_loc_2 = Wing.get_xy_from_perim(s2[i + 1] / Wing.Chordlength, Wing.ChSpar1) x_loc_1 *= Wing.Chordlength x_loc_2 *= Wing.Chordlength y_loc_1 *= Wing.Chordlength y_loc_2 *= Wing.Chordlength Force_angle = np.arctan2(y_loc_2 - y_loc_1, x_loc_2 - x_loc_1) x_loc_1 -= x_coor_AC x_loc_2 -= x_coor_AC F_x = q_loc * ds * np.cos(Force_angle) F_y = q_loc * ds * np.sin(Force_angle) Moment_L += -F_x * (y_loc_2 + y_loc_1) / 2 + F_y * (x_loc_2 + x_loc_1) / 2 # Moments from section 3->5 t_ys35 = np.array([]) for i in range(0, len(qs35L) - 1): q_loc = (qs35L[i] + qs35L[i + 1]) / 2 s_loc = (s3[i] + s3[i + 1]) / 2 ds = s3[i + 1] - s3[i] x_loc = Wing.ChSpar2 * Wing.Chordlength - x_coor_AC F_y = q_loc * ds Moment_L += -F_y * x_loc # Moments from section 5 -> 6 for i in range(0, len(qs56L) - 1): q_loc = (qs56L[i] + qs56L[i + 1]) / 2 s_loc = (s4[i] + s4[i + 1]) / 2 ds = s4[i + 1] - s4[i] x_loc_1, y_loc_1 = Wing.get_xy_from_perim(s4[i] / Wing.Chordlength, Wing.ChSpar2, reverse=True) x_loc_2, y_loc_2 = Wing.get_xy_from_perim(s4[i + 1] / Wing.Chordlength, Wing.ChSpar2, reverse=True) x_loc_1 *= Wing.Chordlength x_loc_1 -= x_coor_AC x_loc_2 *= Wing.Chordlength x_loc_2 -= x_coor_AC y_loc_1 *= Wing.Chordlength y_loc_2 *= Wing.Chordlength Force_angle = np.arctan2(y_loc_2 - y_loc_1, x_loc_2 - x_loc_1) F_x = q_loc * ds * np.cos(Force_angle) F_y = q_loc * ds * np.sin(Force_angle) Moment_L += -F_x * (y_loc_2 + y_loc_1) / 2 + F_y * (x_loc_2 + x_loc_1) / 2 # Moment 6 -> 1 for i in range(0, len(qs61L) - 1): q_loc = (qs61L[i] + qs61L[i + 1]) / 2 s_loc = (s5[i] + s5[i + 1]) / 2 ds = s5[i + 1] - s5[i] x_loc = Wing.ChSpar1 * Wing.Chordlength - x_coor_AC F_y = q_loc * ds Moment_L += F_y * x_loc return Moment_L
def Moment_shearflow(n): qmoment = WingStress.M / (2 * Wing.Area_cell()) q_moment = np.array([]) for _ in range(n + 1): q_moment = np.append(q_moment, qmoment) return q_moment * ureg("N/m")
def computeloads(z): Sectioncenters = np.array([]) dLlist = np.array([]) dDlist = np.array([]) L = 0 D = 0 M = 0 L_moment = 0 D_moment = 0 Llist = np.array([]) Dlist = np.array([]) Lmomentlist = np.array([]) Dmomentlist = np.array([]) L_momentlist = np.array([]) zs = b - (sectionlength / 2) dL = Q_("0 N") dD = Q_("0 N") dM = Q_("0 N*m") while zs > z: #zs is measured is m from Areaofsection = sectionlength * Wing.length_chord(zs) Sectioncenters = np.append(Sectioncenters, zs) '''Lift drag and moment for the section''' dL = (cl * 0.5 * rho * (V**2) * Areaofsection).magnitude #lift of the section dD = (cd * 0.5 * rho * (V**2) * Areaofsection).magnitude #drag of the section dM = (cm * 0.5 * rho * (V**2) * Areaofsection * Wing.length_chord(zs)).magnitude #moment of the section dL *= Q_('kg * m / s**2') dD *= Q_('kg * m / s**2') dM *= Q_('kg * m**2 / s**2') if zs < Geometry.Fuselage.b_f * 0: dL = 0 dD = 0 dM = 0 dLlist = np.append(dLlist, dL) dDlist = np.append(dDlist, dD) '''Total lift, drag and moment for the wing''' L = L + dL # Total lift for one wing D = D + dD # Total drag for one wing M = M + dM # Total moment for one wing Llist = np.append(Llist, L) # put the values in a list so we can plot them Dlist = np.append(Dlist, D) zs = zs - sectionlength # Select other section for the next loop for i in range(0, len(Sectioncenters)): arm = (Sectioncenters[i] - z.magnitude) dLmoment = (arm * dLlist[i]) dDmoment = (arm * dDlist[i]) L_moment = L_moment + dLmoment D_moment = D_moment + dDmoment Lmomentlist = np.append(Lmomentlist, L_moment) Dmomentlist = np.append(Dmomentlist, D_moment) '''For the 20G manoeuver''' MTOW = Geometry.Masses.W_MTOW Max_20G_N = MTOW * 9.81 * 20 Tot_L = 2 * totallift if Tot_L.magnitude > 0.: fac_20G = Max_20G_N / Tot_L fac_20G = fac_20G.magnitude else: fac_20G = 0 L_moment = L_moment * fac_20G D_moment = D_moment * fac_20G L = L * fac_20G D = D * fac_20G M = M * fac_20G return L, D, M, L_moment, D_moment, dL, dD, dM
Lmomentlist = np.array([]) Dmomentlist = np.array([]) dLlist = np.array([]) dDlist = np.array([]) Llist = np.array([]) Dlist = np.array([]) Sectioncenters = np.array([]) sectionlength = (b.magnitude - 0 * Geometry.Fuselage.b_f.magnitude) / n * ureg.meter zs = b - (sectionlength / 2) while zs.magnitude > 0: # zs is measured is m from Areaofsection = sectionlength * Wing.length_chord(zs) Sectioncenters = np.append(Sectioncenters, zs) '''Lift drag and moment for the section''' dL = cl * 0.5 * rho * (V**2) * Areaofsection.magnitude * Q_( "m**2") # lift of the section if zs < Geometry.Fuselage.b_f * 0: dL = Q_('0 kg * m / s**2') '''Total lift, drag and moment for the wing''' L = L + dL # Total lift for one wing zs = zs - sectionlength # Select other section for the next loop totallift = L
Vol_mat_skin = Q_('0 m**3') Vol_mat_string = Q_('0 m**3') Vol_mat_clamp = Q_('0 m**3') Vol_mat_wing = Q_('0 m**3') Old_N_stringers = Wing.N_stringers Lmomentlist = np.array([]) Ixxlist = np.array([]) Iyylist = np.array([]) zarray = np.array([]) Farray = np.array([]) z = 0 while z <= b.magnitude: NS = WingStress.Normal_stress_due_to_bending(0.18, Wing.airfoilordinate(0.18))[0] Normalstress = np.append(Normalstress, NS.magnitude) zarray = np.append(zarray, z) F = Shear.F Farray = np.append(Farray, F) z *= Q_('m') L_moment = WingStress.computeloads(z)[3] z = z.magnitude '''Calculate all the subweights of the wing ''' Vol_mat_spar1 = Vol_mat_spar1 + Wing.AreaSpar1*(b/n) Vol_mat_spar2 = Vol_mat_spar2 + Wing.AreaSpar2 * (b / n) Vol_mat_skin = Vol_mat_skin + Wing.Area_Skin(Wing.ChSpar1, Wing.ChSpar2) * (b / n) Vol_mat_string = Vol_mat_string + Wing.AreaStringers * (b / n) Vol_mat_wing = Vol_mat_wing + Wing.Area * (b / n) Lmomentlist = np.append(Lmomentlist, L_moment) Ixxlist = np.append(Ixxlist, Inertia.Ixx_wb)