def spar_crit_stress(y): #ks needs to be determined manually if y <= 10: ks = 9.8 if 10 < y <= 20: ks = 9.5 if y > 20: ks = 9.5 b = (points[1][1] - points[2][1]) * chord_function(y) stress = (((pi**2) * ks * E) / (12 * (1 - (pois**2)))) * ((t / b)**2) return stress
def string_stress_normal(y): M_z = z_moment(y) M_x = x_moment(y) I = inertia(y) I_zz = I[1] I_xx = I[0] I_xz = 0 centroid = get_centroid(y) wingbox_point = [i * chord_function(y) for i in wingbox_points[1]] x = wingbox_point[0] - centroid[0] z = wingbox_point[1] - centroid[1] sigma = ((((M_x * I_zz) - (M_z * I_xz)) * z) + (((M_z * I_xx) - (M_x * I_xz)) * x)) / (((I_xx * I_zz) - I_xz**2)) return sigma
def dtheta_multi(y): chord = chord_function(y) matrix = np.array( [[2 * Area_first * chord * chord, 2 * Area_second * chord * chord, 0], [(((((a_one + a_two) * chord) / t2) + (b_one * chord / t1) + (b_three * chord / t3)) / (2 * Area_first * chord * chord * G)), -1 * ((b_three * chord / t3) / (2 * Area_first * chord * chord * G)), -1], [ -1 * ((b_three * chord / t3) / (2 * Area_second * chord * chord * G)), (((((c_one + c_two) * chord / t2) + (b_two * chord / t1) + (b_three * chord / t3)) / (2 * Area_second * chord * chord * G))), -1 ]]) solution_vector = np.array([torsion(y), 0, 0]) q1, q2, dtheta = np.linalg.solve(matrix, solution_vector) return q1, q2, dtheta
def single_cell_stiffness(y): chord = chord_function(y) line_int = ((a_one + c_one + a_two + c_two) * chord) / t2 + ( (b_one + b_two) * chord) / t1 return (4 * ((Area_second * chord * chord)**2)) / line_int
def stringer_spacing_bottom(y): if y <= bot_lim1: spacing = (sqrt((points[1][0] - points[0][0])**2 + (points[1][1] - points[0][1])**2) * chord_function(y)) / (bot_num_1+2) if bot_lim1 < y <= bot_lim2: spacing = (sqrt((points[1][0] - points[0][0])**2 + (points[1][1] - points[0][1])**2) * chord_function(y)) / (bot_num_2+1) else: spacing = (sqrt((points[1][0] - points[0][0])**2 + (points[1][1] - points[0][1])**2) * chord_function(y)) / (bot_num_3+1) return spacing