def create_deck_stiffener_local(b_sup, b_inf, h, t, t_deck): assert b_sup >= b_inf, "width out of bound or wrong way around" #assumption: b_sup is equal to distance between stiffeners #create points a = point.point(b_sup,0) b = point.point(-b_sup, 0) c = point.point(0.5*b_sup, 0) d = point.point(-0.5*b_sup, 0) e = point.point(-0.5*b_inf, h) f = point.point(0.5*b_inf, h) #create plates code_1 = plate_code.plate_code(1,0,0,0,0) line_1 = line.line(code_1, a, b, t_deck) code_2 = plate_code.plate_code(2,0,0,0,0) line_2 = line.line(code_2, d, e, t) code_3 = plate_code.plate_code(3,0,0,0,0) line_3 = line.line(code_3, e, f, t) code_4 = plate_code.plate_code(4,0,0,0,0) line_4 = line.line(code_4, f, c, t) deck_stiffener = crosssection.crosssection(b_sup, b_inf, h) #add the lines to itself deck_stiffener.addline(line_1) deck_stiffener.addline(line_2) deck_stiffener.addline(line_3) deck_stiffener.addline(line_4) return deck_stiffener
def create_stiffener_local(b_sup, b_inf, h, t): #assert b_sup >= b_inf, "width out of bound or wrong way around" half_width_diff = b_sup - b_inf length_side = math.sqrt(half_width_diff**2 + h**2) own_angle = math.atan(half_width_diff / h) #create plate 2 a2 = point.point(-b_sup / 2, 0) b2 = point.point(a2.y + math.sin(own_angle) * length_side, math.cos(own_angle) * length_side) code2 = plate_code.plate_code(0, 1, 0, 0, 2) line2 = line.line(code2, a2, b2, t) #create plate 3 a3 = b2 b3 = point.point(a3.y + b_inf, a3.z) code3 = plate_code.plate_code(0, 1, 0, 0, 3) line3 = line.line(code3, a3, b3, t) #create plate 4 a4 = b3 b4 = point.point(b_sup / 2, 0) code4 = plate_code.plate_code(0, 1, 0, 0, 4) line4 = line.line(code4, a4, b4, t) stiffener_local = crosssection.crosssection(b_sup, b_inf, h) #add the lines to itself stiffener_local.addline(line2) stiffener_local.addline(line3) stiffener_local.addline(line4) return stiffener_local
def remove_stiffener(self, st_number): to_remove = [] #going to the plates of this stiffener (all lines have this number) for line1 in self.lines(): if line1.code.st_number is st_number: #if the line is a trapezoid line, it has to be removed and the adjecent ones fused if line1.code.pl_type == 0: #trapezoid plate of the stiffener left_tr_pl = None right_tr_pl = None for line_tr in self.lines(): if line_tr.code.pl_type == 0 and line_tr.code.tpl_number == line1.code.tpl_number - 1: left_tr_pl = line_tr elif line_tr.code.p1_type == 0 and line_tr.code.tpl_number == line1.tpl_number + 1: right_tr_pl = line_tr #creating a new line that spans over the length of all 3 new_code = plate_code.plate_code(line1.code.pl_position, 0, line1.code.tpl_number - 1, 0, 0) new_tr_pl = line.line(new_code, left_tr_pl.a, right_tr_pl.b, line1.t) new_tr_pl.t_stress = line1.t_stress self.lines.append(new_tr_pl) to_remove.append(rigth_tr_pl) to_remove.append(left_tr_pl) to_remove.append(line1) #if the line is a stiffener line (not trapezoid) it can be removed directly elif line.code.pl_type == 1: to_remove.append(line) #after the trapezoid line is added and all the ones to go are added to to_remove, all in to_removed can be removed for pl in to_remove: self.lines.remove(pl)
def test_area(self): a = point.point(2000, 0) b = point.point(-2000, 3000) code = plate_code.plate_code(1, 0, 0, 0, 0) t = 5 plate = line.line(code, a, b, t) area = plate.get_area_tot() self.assertEqual(area, 25000)
def test_length(self): a = point.point(2000, 0) b = point.point(-2000, 3000) code = plate_code.plate_code(1, 0, 0, 0, 0) t = 5 plate = line.line(code, a, b, t) length = plate.get_length_tot() self.assertEqual(length, 5000)
def test_center(self): a = point.point(2000, 0) b = point.point(-1000, 1000) code = plate_code.plate_code(1, 0, 0, 0, 0) t = 5 horizontal = line.line(code, a, b, t) y = horizontal.get_center_y_tot() z = horizontal.get_center_z_tot() self.assertEqual(y, 500) self.assertEqual(z, 500)
def create_stiffener_global(pl_position, st_number, center_y, center_z, angle, b_sup, b_inf, h, t): y_corr = center_y - math.cos(angle) * b_sup * 0.5 z_corr = center_z - math.sin(angle) * b_sup * 0.5 assert b_sup >= b_inf, "width out of bound or wrong way around" half_width_diff = (b_sup - b_inf) / 2 length_side = math.sqrt(half_width_diff**2 + h**2) if half_width_diff > 0: own_angle = math.atan(h / half_width_diff) else: own_angle = math.pi / 2 #create plate 2 a2 = point.point(y_corr, z_corr) b2 = point.point(y_corr + math.cos(own_angle + angle) * length_side, z_corr + math.sin(own_angle + angle) * length_side) code2 = plate_code.plate_code(pl_position, 1, 0, st_number, 2) line2 = line.line(code2, a2, b2, t) #create plate 3 a3 = point.point(y_corr + math.cos(own_angle + angle) * length_side, z_corr + math.sin(own_angle + angle) * length_side) b3 = point.point(a3.y + math.cos(angle) * b_inf, a3.z + math.sin(angle) * b_inf) code3 = plate_code.plate_code(pl_position, 1, 0, st_number, 3) line3 = line.line(code3, a3, b3, t) #create plate 4 a4 = point.point(a3.y + math.cos(angle) * b_inf, a3.z + math.sin(angle) * b_inf) b4 = point.point(y_corr + math.cos(angle) * b_sup, z_corr + math.sin(angle) * b_sup) code4 = plate_code.plate_code(pl_position, 1, 0, st_number, 4) line4 = line.line(code4, a4, b4, t) stiffener_global = crosssection.crosssection(b_sup, b_inf, h) #add the lines to itself stiffener_global.addline(line2) stiffener_global.addline(line3) stiffener_global.addline(line4) return stiffener_global
def test_i_along_tot(self): pl_position = 0 st_number = 1 center_y = 0 center_z = 0 angle = 0 b_sup = 10000 b_inf = 8000 h = 5000 t = 20 #creation of cs horizontally cs_y = stiffener.create_stiffener_global(pl_position, st_number, center_y, center_z, angle, b_sup, b_inf, h, t) plate_between_code_y = plate_code.plate_code(0,0,1,1,1) plate_between_y = line.line(plate_between_code_y, copy.deepcopy(cs_y.get_line(st_pl_position = 4).b), copy.deepcopy(cs_y.get_line(st_pl_position = 2).a), t) cs_y.addline(plate_between_y) cs_y_i_y= cs_y.get_i_y_tot() cs_y_i_y_red = cs_y.get_i_y_red() #creation of cs rotated angle = math.pi*5/3 cs_rot = cs_y.get_cs_rot(angle) cs_rot_plate_between = cs_rot.get_line(pl_type = 0) cs_rot_i_along = cs_rot.get_i_along_tot(cs_rot_plate_between) cs_rot_i_along_red = cs_rot.get_i_along_red(cs_rot_plate_between) self.assertTrue(cs_rot_i_along/cs_y_i_y - 1 < 0.001) self.assertTrue(cs_rot_i_along_red/cs_y_i_y_red - 1 < 0.001) angle = math.pi*3.453 cs_rot = cs_y.get_cs_rot(angle) cs_rot_plate_between = cs_rot.get_line(pl_type = 0) cs_rot_i_along = cs_rot.get_i_along_tot(cs_rot_plate_between) cs_rot_i_along_red = cs_rot.get_i_along_red(cs_rot_plate_between) self.assertTrue(cs_rot_i_along/cs_y_i_y - 1 < 0.001) self.assertTrue(cs_rot_i_along_red/cs_y_i_y_red - 1 < 0.001) angle = math.pi*(-2.34) cs_rot = cs_y.get_cs_rot(angle) cs_rot_plate_between = cs_rot.get_line(pl_type = 0) cs_rot_i_along = cs_rot.get_i_along_tot(cs_rot_plate_between) cs_rot_i_along_red = cs_rot.get_i_along_red(cs_rot_plate_between) self.assertTrue(cs_rot_i_along/cs_y_i_y - 1 < 0.001) self.assertTrue(cs_rot_i_along_red/cs_y_i_y_red - 1 < 0.001)
from classes import plate_code as plcd from classes import merge from classes import crosssection as cs from proofs import global_plate_buckling as glb import data import math data.input_data.update({"M_Ed": -45000 * 10**6}) initial_cs = ics.create_initial_cs(4000, 3000, 2000, 10, 10, 5) stiffener_1 = st.create_stiffener_global(3, 1, -1000, 2000, math.pi, 200, 150, 100, 5) stiffener_2 = st.create_stiffener_global(3, 2, 1000, 2000, math.pi, 200, 150, 100, 5) stiffener_list = [stiffener_1, stiffener_2] final_cs = merge.merge(initial_cs, stiffener_list) final_cs = initial_cs point_a = pt.point(-1500, 2000) point_b = pt.point(1500, 2000) code = plcd.plate_code(3, 0, 3, 0, 0) plate = ln.line(code, point_a, point_b, 5) x_sec = ics.create_initial_cs(4000, 3000, 2000, 10, 10, 5) stiffened_plate = merge.merge(x_sec, stiffener_list) x_sec.lines.remove(x_sec.get_line(pl_position=1, pl_type=0)) x_sec.lines.remove(x_sec.get_line(pl_position=2, pl_type=0)) x_sec.lines.remove(x_sec.get_line(pl_position=4, pl_type=0)) glb.global_plate_buckling(final_cs, stiffened_plate)
import matplotlib.pyplot as plt import numpy as np import initial_cs as ics from classes import crosssection as cs from classes import point from classes import line as ln from output import geometry_output as go test_cs = ics.create_initial_cs(1000, 500, 400) stiffener = cs.crosssection() code = (0, 0, 0, 0, 0) a = point.point(100, 0) b = point.point(50, 50) c = point.point(-50, 50) d = point.point(-100, 0) e = point.point(100, 400) f = point.point(50, 350) g = point.point(-50, 350) h = point.point(-100, 400) stiffener.addline(ln.line(code, a, b, 1)) stiffener.addline(ln.line(code, b, c, 1)) stiffener.addline(ln.line(code, c, d, 1)) stiffener.addline(ln.line(code, e, f, 1)) stiffener.addline(ln.line(code, f, g, 1)) stiffener.addline(ln.line(code, g, h, 1)) go.print_cs(test_cs, stiffener)
def dis_lines_lines(lines1, lines2): #to find the corner of lines1 points1 = [] for lines in lines1: points1.append(lines.a) points1.append(lines.b) seen = set() corner1 = 0 for x in points1: if x not in seen: seen.add(x) if x in seen: corner1 = x #to find the corner of lines2 points2 = [] for lines in lines2: points2.append(lines.a) points2.append(lines.b) seen = set() corner2 = 0 for x in points2: if x not in seen: seen.add(x) if x in seen: corner2 = x help_line = line.line([0, 0, 0, 0, 0], corner1, corner2, 1) dis = help_line.get_length_tot() angle = help_line.get_angle_y() """ smallest = 10000 angle = 0 for line in lines2: #calculates the minimal width of a bar that fits between two corners created each by two lines #list of points in lines1 #lines2 stays a list of lines #unit vector of line from a to b (one is corner, but not important weather in plus or minus direction) l_y = line.b.y - line.a.y l_z = line.b.z - line.a.z length = math.sqrt(l_y**2 + l_z**2) #unit vector perpendicular to line l_y_norm = -l_y / length l_z_norm = -l_z / length for point in points1: #dot product #vector from corner to point d_y = point.y - corner.y d_z = point.z - corner.z dis_new = abs((l_y_norm * d_y + l_z_norm * d_z)) if dis_new < smallest: dis = dis_new if d_y != 0: angle = math.atan(d_z / d_y) if angle < 0: angle += math.pi elif angle > math.pi / 2: angle -= math.pi else: angle = math.pi/2 smallest = dis_new""" dis_angle = [dis, angle] return dis_angle
pl_position = 0 st_number = 1 center_y = 0 center_z = 0 angle = 0 b_sup = 10000 b_inf = 8000 h = 5000 t = 20 #creation of cs horizontally cs_y = stiffener.create_stiffener_global(pl_position, st_number, center_y, center_z, angle, b_sup, b_inf, h, t) plate_between_code_y = plate_code.plate_code(0, 0, 1, 1, 1) plate_between_y = line.line(plate_between_code_y, copy.deepcopy(cs_y.get_line(st_pl_position=4).b), copy.deepcopy(cs_y.get_line(st_pl_position=2).a), t) cs_y.addline(plate_between_y) geometry_output.print_cs_red(cs_y) print("angle of cs_y:", plate_between_y.get_angle_y_true() / math.pi) cs_y_i_y = cs_y.get_i_y_tot() print("i_y of cs_y", cs_y_i_y) #creation of cs rotated angle = math.pi * 5 / 3 cs_rot = cs_y.get_cs_rot(angle) geometry_output.print_cs_red(cs_rot) cs_rot_plate_between = cs_rot.get_line(pl_type=0) print("angle of cs_rot", cs_rot_plate_between.get_angle_y_true() / math.pi)
def global_plate_buckling(total_cs, plate_glob): string = "\n 4.5.2 Plate type behaviour" printing.printing(string) stiffened_plate = copy.deepcopy(plate_glob) #identify the border plates a and b and numbers of end stiffeners plate_a = None plate_b = None min_tpl = -1 max_tpl = -1 max_stn = 0 min_stn = 1000 for plate in stiffened_plate.lines: if plate.code.pl_type == 0: if min_tpl == -1 and max_tpl == -1: min_tpl = plate.code.tpl_number max_tpl = plate.code.tpl_number if plate.code.tpl_number <= min_tpl: plate_a = plate if plate.code.tpl_number >= max_tpl: plate_b = plate else: if plate.code.st_number <= min_stn and plate.code.st_number != 0: min_stn = plate.code.st_number if plate.code.st_number >= max_stn and plate.code.st_number != 0: max_stn = plate.code.st_number assert plate_a != None and plate_b != None, "For-Loop failed." ### Get Stresses ### sigma_a = stress_cal.get_sigma_a_red(total_cs, plate_a, data.input_data.get("M_Ed")) sigma_b = stress_cal.get_sigma_b_red(total_cs, plate_b, data.input_data.get("M_Ed")) if abs(sigma_a) <= 0.1: sigma_a = sigma_a / abs(sigma_a) * 0.1 if abs(sigma_b) <= 0.1: sigma_b = sigma_b / abs(sigma_b) * 0.1 if abs(sigma_a) > 1000: sigma_a = sigma_a / abs(sigma_a) * 1000 if abs(sigma_b) > 1000: sigma_b = sigma_b / abs(sigma_b) * 1000 psi = min(sigma_a, sigma_b) / max(sigma_a, sigma_b) if sigma_a <= 0 and sigma_b <= 0: rho_glob = 1 sigma_cr_p = 10**10 ### Get Plate Geometry ### else: h = 0 for plate in stiffened_plate.lines: if plate.code.pl_type == 0: h += plate.get_length_tot() t = plate_a.t b = data.input_data.get("a") #find borders of compression zone comp = None if sigma_a > 0 and sigma_b > 0: comp = (0, h) elif sigma_a > 0 and sigma_b <= 0: h_red = h * sigma_a / (sigma_a - sigma_b) comp = (0, h_red) elif sigma_b > 0 and sigma_a <= 0: h_red = h * -sigma_a / (sigma_b - sigma_a) comp = (h_red, h) else: assert True, "This should never happen!" #coordinate transformation (a+b)/2 is the new origin and baseplate is horizontal #set new origin move_z = 0.5 * (plate_a.a.z + plate_b.b.z) move_y = 0.5 * (plate_a.a.y + plate_b.b.y) for plate in stiffened_plate.lines: plate.a.y -= move_y plate.a.z -= move_z plate.b.y -= move_y plate.b.z -= move_z plate.p1.y -= move_y plate.p1.z -= move_z plate.p2.y -= move_y plate.p2.z -= move_z #find rotation angle if plate_a.a.z == plate_b.b.z: #horizontal plate angle = 0 if plate_a.a.y == plate_b.b.y: #vertical plate angle = math.pi / 2 else: #inclined plate angle = -math.atan( (plate_b.b.z - plate_a.a.z) / (plate_b.b.y - plate_a.a.y)) #perform rotation for plate in stiffened_plate.lines: ay = plate.a.y az = plate.a.z by = plate.b.y bz = plate.b.z p1y = plate.p1.y p1z = plate.p1.z p2y = plate.p2.y p2z = plate.p2.z plate.a.y = math.cos(angle) * ay - math.sin(angle) * az plate.a.z = math.sin(angle) * ay + math.cos(angle) * az plate.b.y = math.cos(angle) * by - math.sin(angle) * bz plate.b.z = math.sin(angle) * by + math.cos(angle) * bz plate.p1.y = math.cos(angle) * p1y - math.sin(angle) * p1z plate.p1.z = math.sin(angle) * p1y + math.cos(angle) * p1z plate.p2.y = math.cos(angle) * p2y - math.sin(angle) * p2z plate.p2.z = math.sin(angle) * p2y + math.cos(angle) * p2z #claculate A of stiffened plate A_tot = h * t #create a list of all stiffeners stiffener_list = [] plate_num_list = [] corresp_tpl = -2 for st_number in range(min_stn, max_stn + 1, 1): stiffener_list.insert(st_number - min_stn, crosssection.crosssection(0, 0, 0)) #find three plates of stiffener for plate in stiffened_plate.lines: if plate.code.st_number == st_number: stiffener_list[st_number - min_stn].addline(plate) #find middle part of the trapezoid if plate.code.tpl_number != 0: corresp_tpl = plate.code.tpl_number plate_num_list.insert(st_number - min_stn, corresp_tpl) else: corresp_tpl = -2 #find adjacent parts of the trapezoid for plate in stiffened_plate.lines: if plate.code.tpl_number == corresp_tpl - 1 or plate.code.tpl_number == corresp_tpl + 1: stiffener_list[st_number - min_stn].addline(plate) ###calculate adimensional parameters for each stiffener### stiffeners_ebp = [] compression_stiffener = False for i in range(len(stiffener_list)): #extract the useful plates stiffener = stiffener_list[i] corresp_tpl = plate_num_list[i] center_plate = None top_plate = None top_plate_tpl = 0 bottom_plate = None for plate in stiffened_plate.lines: if plate.code.tpl_number == corresp_tpl and plate.code.pl_type == 0: center_plate = plate if plate.code.tpl_number == corresp_tpl + 1: bottom_plate = plate bottom_plate_tpl = plate.code.tpl_number elif plate.code.tpl_number == corresp_tpl - 1: top_plate = plate top_plate_tpl = plate.code.tpl_number #find distance to point a delta_z = center_plate.get_center_z_tot() - plate_a.a.z delta_y = center_plate.get_center_y_tot() - plate_a.a.y distance = math.sqrt(delta_z**2 + delta_y**2) #calculate theta b_sup_st = stiffener.get_line(st_pl_position=1).get_length_tot() b_inf_st = stiffener.get_line(st_pl_position=3).get_length_tot() t_st = stiffener.get_line(st_pl_position=3).t diag = stiffener.get_line(st_pl_position=2).get_length_tot() diff = (b_sup_st - b_inf_st) / 2 h_st = math.sqrt(diag**2 - diff**2) A_0 = 0.5 * (b_sup_st + b_inf_st) * h_st integral = b_sup_st / t + (2 * diag + b_inf_st) / t_st J_T = 4 * A_0**2 / integral J_T_ref = 1 / 3 * h * t**3 theta = J_T / J_T_ref #calculate delta unit_vec_to_a = (top_plate.a.y - top_plate.b.y) / top_plate.get_length_tot() unit_vec_to_b = (bottom_plate.b.y - bottom_plate.a.y) / bottom_plate.get_length_tot() #find additional parts of top plate top_original = total_cs.get_line(tpl_number=top_plate_tpl) sigma_a_top = stress_cal.get_sigma_a(total_cs, top_original, data.input_data.get("M_Ed")) sigma_b_top = stress_cal.get_sigma_b(total_cs, top_original, data.input_data.get("M_Ed")) psi_top = min(sigma_a_top, sigma_b_top) / max( sigma_a_top, sigma_b_top) length_top = 0 if sigma_b_top > 0: if sigma_a_top > 0: if sigma_a_top < sigma_b_top: #high stress side length_top = top_plate.get_length_tot() * 2 / (5 - psi_top) else: #low stress side length_top = top_plate.get_length_tot() * ( 3 - psi_top) / (5 - psi_top) else: #point a in tension zone b_comp = top_plate.get_length_tot() / (1 - psi_top) length_top = 0.4 * b_comp else: #tension zone pass #find additional parts of bottom plate bottom_original = total_cs.get_line(tpl_number=bottom_plate_tpl) sigma_a_bottom = stress_cal.get_sigma_a( total_cs, bottom_original, data.input_data.get("M_Ed")) sigma_b_bottom = stress_cal.get_sigma_b( total_cs, bottom_original, data.input_data.get("M_Ed")) psi_bottom = min(sigma_a_bottom, sigma_b_bottom) / max( sigma_a_bottom, sigma_b_bottom) length_bottom = 0 if sigma_a_bottom > 0: if sigma_b_bottom > 0: if sigma_b_bottom < sigma_a_bottom: #high stress side length_bottom = bottom_plate.get_length_tot() * 2 / ( 5 - psi_bottom) else: #low stress side length_bottom = bottom_plate.get_length_tot() * ( 3 - psi_bottom) / (5 - psi_bottom) else: #point a in tension zone b_comp = bottom_plate.get_length_tot() / (1 - psi_bottom) length_bottom = 0.4 * b_comp else: #tension zone pass #add additional parts of plate to stiffener new_top_point = point.point( top_plate.b.y + unit_vec_to_a * length_top, top_plate.b.z) new_top_plate = line.line(top_plate.code, new_top_point, top_plate.b, top_plate.t) new_bottom_point = point.point( bottom_plate.a.y + unit_vec_to_b * length_bottom, bottom_plate.a.z) new_bottom_plate = line.line(bottom_plate.code, bottom_plate.a, new_bottom_point, top_plate.t) stiffener.lines.append(new_top_plate) stiffener.lines.append(new_bottom_plate) delta = stiffener.get_area_tot() / A_tot #calculate gamma length_gamma = defaults.effective_width_parameter * center_plate.t if length_gamma > 0.5 * center_plate.get_length_tot(): new_top_plate.a = point.point( new_top_plate.b.y + unit_vec_to_a * length_gamma, new_top_plate.b.z) new_bottom_plate.b = point.point( new_bottom_plate.a.y + unit_vec_to_b * length_gamma, new_bottom_plate.a.z) else: stiffener.lines.remove(center_plate) new_top_plate.a = point.point( new_top_plate.b.y + unit_vec_to_a * length_gamma, new_top_plate.b.z) new_top_plate.b = point.point( new_top_plate.b.y + unit_vec_to_b * length_gamma, new_top_plate.b.z) new_bottom_plate.b = point.point( new_bottom_plate.a.y + unit_vec_to_b * length_gamma, new_bottom_plate.a.z) new_bottom_plate.a = point.point( new_bottom_plate.a.y + unit_vec_to_a * length_gamma, new_bottom_plate.a.z) gamma = stiffener.get_i_y_tot() * 12 * (1 - 0.3**2) / (h * t**3) ### USE EBPlate ### #assure that there is at least on stiffener in compression zone if distance > comp[0] and distance < comp[1]: compression_stiffener = True if gamma > 1000: gamma = 1000 if theta > 1000: theta = 1000 if delta > 1000: delta = 1000 assert gamma <= 1000 and gamma >= 0, "gamma too high or low" assert theta <= 1000 and theta >= 0, "theta too high or low" assert delta <= 1000 and delta >= 0, "theta too high or low" stiffeners_ebp.insert(i, (distance, gamma, theta, delta)) assert t >= 3, "\nError: Plate too thin." if 100 > b: b = 100 if 100 > h: h = 100 #finding critical buckling load phi_cr_p = 0 if compression_stiffener == True and abs(sigma_a) >= 0.1 and abs( sigma_a) <= 1000 and abs(sigma_b) >= 0.1 and abs( sigma_b) <= 1000 and 3 <= t and 100 <= b and 100 <= h: phi_cr_p = ebplate.ebplate(b, h, t, sigma_a, sigma_b, stiffeners_ebp) elif compression_stiffener == False: string = "\nno compression stiffener" printing.printing(string) return 1, 0 else: assert True, "Error: Calculation of phi_cr_p not possible." sigma_max = max(sigma_a, sigma_b) sigma_cr_p = sigma_max * phi_cr_p string = "\n sigma_cr_plate = " + str( math.floor(1000 * sigma_cr_p) / 1000) printing.printing(string) ### Calculation according to EC3, 1-5, 4.5.2 ### #calculating plate slenderness beta_a_c = get_beta_ac(plate_glob) lambda_p_glob_bar = math.sqrt(beta_a_c * data.constants.get("f_y") / sigma_cr_p) string = "\n Lambda: " + str( math.floor(1000 * lambda_p_glob_bar) / 1000) printing.printing(string) #calculate rho_glob for plate buckling #assumption: cross section parts always supported on both sides rho_glob = 0 #held on both sides if lambda_p_glob_bar <= 0.673: rho_glob = 1.0 elif lambda_p_glob_bar > 0.673 and (3 + psi) >= 0: rho_glob = (lambda_p_glob_bar - 0.055 * (3 + psi)) / lambda_p_glob_bar**2 if rho_glob > 1.0: rho_glob = 1.0 else: string = "\n plate slenderness or stress ratio out of range" printing.printing(string) pass string = " Rho_Global: " + str(math.floor(1000 * rho_glob) / 1000) printing.printing(string) return rho_glob, sigma_cr_p
def merge(initial_cs, stiffener_list): assert len(initial_cs.lines ) == 4, "Merge does not accept crosssections with stiffeners" stiffeners1 = [] stiffeners2 = [] stiffeners3 = [] stiffeners4 = [] for stiffener in stiffener_list: pos = stiffener.lines[0].code.pl_position if pos == 1: stiffeners1.append(stiffener) elif pos == 2: stiffeners2.append(stiffener) elif pos == 3: stiffeners3.append(stiffener) elif pos == 4: stiffeners4.append(stiffener) #side 1 new_tpl_lines_1 = [] if stiffeners1 != []: stiffeners1 = sorted(stiffeners1, key=lambda st: st.lines[0].code.st_number) old_plate_1 = initial_cs.get_line(pl_position=1, pl_type=0) tpl_number_1_min = initial_cs.get_line(pl_position=1, pl_type=0).code.tpl_number initial_cs.lines.remove(initial_cs.get_line(pl_position=1, pl_type=0)) t_1 = old_plate_1.t side = 1 st_number_1_min = stiffeners1[0].lines[0].code.st_number st_number_1_max = st_number_1_min for stiffener in stiffeners1: this_st_number = stiffener.lines[0].code.st_number if this_st_number < st_number_1_min: st_number_1_min = this_st_number elif this_st_number > st_number_1_max: st_number_1_max = this_st_number i = st_number_1_min j = tpl_number_1_min next_tpl_a = None initial_point_1 = old_plate_1.a end_point_1 = old_plate_1.b while i <= st_number_1_max: new_plate_1_a = initial_point_1 new_plate_1_b = copy.deepcopy( stiffeners1[i - st_number_1_min].get_line(pl_position=side, st_pl_position=4).b) new_plate_2_a = copy.deepcopy(new_plate_1_b) new_plate_2_b = copy.deepcopy( stiffeners1[i - st_number_1_min].get_line(pl_position=side, st_pl_position=2).a) next_tpl_a = copy.deepcopy(new_plate_2_b) code_1 = plate_code.plate_code(side, 0, j, 0, 0) code_2 = plate_code.plate_code(side, 0, j + 1, i, 1) new_plate_1 = line.line(code_1, new_plate_1_a, new_plate_1_b, t_1) new_plate_2 = line.line(code_2, new_plate_2_a, new_plate_2_b, t_1) new_tpl_lines_1.append(new_plate_1) new_tpl_lines_1.append(new_plate_2) j += 2 i += 1 initial_point_1 = copy.deepcopy(new_plate_2_b) code_1 = plate_code.plate_code(side, 0, j, 0, 0) new_plate_1 = line.line(code_1, next_tpl_a, end_point_1, t_1) new_tpl_lines_1.append(new_plate_1) initial_cs.get_line(pl_position=2, pl_type=0).code.tpl_number = j + 1 initial_cs.get_line(pl_position=3, pl_type=0).code.tpl_number = j + 2 initial_cs.get_line(pl_position=4, pl_type=0).code.tpl_number = j + 3 #side 2 new_tpl_lines_2 = [] if stiffeners2 != []: stiffeners2 = sorted(stiffeners2, key=lambda st: st.lines[0].code.st_number) old_plate_2 = initial_cs.get_line(pl_position=2, pl_type=0) tpl_number_2_min = initial_cs.get_line(pl_position=2, pl_type=0).code.tpl_number initial_cs.lines.remove(initial_cs.get_line(pl_position=2, pl_type=0)) t_2 = old_plate_2.t side = 2 st_number_2_min = stiffeners2[0].lines[0].code.st_number st_number_2_max = st_number_2_min for stiffener in stiffeners2: this_st_number = stiffener.lines[0].code.st_number if this_st_number < st_number_2_min: st_number_2_min = this_st_number elif this_st_number > st_number_2_max: st_number_2_max = this_st_number i = st_number_2_min j = tpl_number_2_min next_tpl_a = None initial_point_2 = old_plate_2.a end_point_2 = old_plate_2.b while i <= st_number_2_max: new_plate_1_a = initial_point_2 new_plate_1_b = copy.deepcopy( stiffeners2[i - st_number_2_min].get_line(pl_position=side, st_pl_position=4).b) new_plate_2_a = copy.deepcopy(new_plate_1_b) new_plate_2_b = copy.deepcopy( stiffeners2[i - st_number_2_min].get_line(pl_position=side, st_pl_position=2).a) next_tpl_a = copy.deepcopy(new_plate_2_b) code_1 = plate_code.plate_code(side, 0, j, 0, 0) code_2 = plate_code.plate_code(side, 0, j + 1, i, 1) new_plate_1 = line.line(code_1, new_plate_1_a, new_plate_1_b, t_2) new_plate_2 = line.line(code_2, new_plate_2_a, new_plate_2_b, t_2) new_tpl_lines_2.append(new_plate_1) new_tpl_lines_2.append(new_plate_2) j += 2 i += 1 initial_point_2 = copy.deepcopy(new_plate_2_b) code_2 = plate_code.plate_code(side, 0, j, 0, 0) new_plate_2 = line.line(code_2, next_tpl_a, end_point_2, t_2) new_tpl_lines_2.append(new_plate_2) initial_cs.get_line(pl_position=3, pl_type=0).code.tpl_number = j + 1 initial_cs.get_line(pl_position=4, pl_type=0).code.tpl_number = j + 2 #side 3 new_tpl_lines_3 = [] if stiffeners3 != []: stiffeners3 = sorted(stiffeners3, key=lambda st: st.lines[0].code.st_number) old_plate_3 = initial_cs.get_line(pl_position=3, pl_type=0) tpl_number_3_min = initial_cs.get_line(pl_position=3, pl_type=0).code.tpl_number initial_cs.lines.remove(initial_cs.get_line(pl_position=3, pl_type=0)) t_3 = old_plate_3.t side = 3 st_number_3_min = stiffeners3[0].lines[0].code.st_number st_number_3_max = st_number_3_min for stiffener in stiffeners3: this_st_number = stiffener.lines[0].code.st_number if this_st_number < st_number_3_min: st_number_3_min = this_st_number elif this_st_number > st_number_3_max: st_number_3_max = this_st_number i = st_number_3_min j = tpl_number_3_min next_tpl_a = None initial_point_3 = old_plate_3.a end_point_3 = old_plate_3.b while i <= st_number_3_max: new_plate_1_a = initial_point_3 new_plate_1_b = copy.deepcopy( stiffeners3[i - st_number_3_min].get_line(pl_position=side, st_pl_position=4).b) new_plate_2_a = copy.deepcopy(new_plate_1_b) new_plate_2_b = copy.deepcopy( stiffeners3[i - st_number_3_min].get_line(pl_position=side, st_pl_position=2).a) next_tpl_a = copy.deepcopy(new_plate_2_b) code_1 = plate_code.plate_code(side, 0, j, 0, 0) code_2 = plate_code.plate_code(side, 0, j + 1, i, 1) new_plate_1 = line.line(code_1, new_plate_1_a, new_plate_1_b, t_3) new_plate_2 = line.line(code_2, new_plate_2_a, new_plate_2_b, t_3) new_tpl_lines_3.append(new_plate_1) new_tpl_lines_3.append(new_plate_2) j += 2 i += 1 initial_point_3 = copy.deepcopy(new_plate_2_b) code_3 = plate_code.plate_code(side, 0, j, 0, 0) new_plate_3 = line.line(code_3, next_tpl_a, end_point_3, t_3) new_tpl_lines_3.append(new_plate_3) initial_cs.get_line(pl_position=4, pl_type=0).code.tpl_number = j + 1 #side 4 new_tpl_lines_4 = [] if stiffeners4 != []: stiffeners4 = sorted(stiffeners4, key=lambda st: st.lines[0].code.st_number) old_plate_4 = initial_cs.get_line(pl_position=4, pl_type=0) tpl_number_4_min = initial_cs.get_line(pl_position=4, pl_type=0).code.tpl_number initial_cs.lines.remove(initial_cs.get_line(pl_position=4, pl_type=0)) t_4 = old_plate_4.t side = 4 st_number_4_min = stiffeners4[0].lines[0].code.st_number st_number_4_max = st_number_4_min for stiffener in stiffeners4: this_st_number = stiffener.lines[0].code.st_number if this_st_number < st_number_4_min: st_number_4_min = this_st_number elif this_st_number > st_number_4_max: st_number_4_max = this_st_number i = st_number_4_min j = tpl_number_4_min next_tpl_a = None initial_point_4 = old_plate_4.a end_point_4 = old_plate_4.b while i <= st_number_4_max: new_plate_1_a = initial_point_4 new_plate_1_b = copy.deepcopy( stiffeners4[i - st_number_4_min].get_line(pl_position=side, st_pl_position=4).b) new_plate_2_a = copy.deepcopy(new_plate_1_b) new_plate_2_b = copy.deepcopy( stiffeners4[i - st_number_4_min].get_line(pl_position=side, st_pl_position=2).a) next_tpl_a = copy.deepcopy(new_plate_2_b) code_1 = plate_code.plate_code(side, 0, j, 0, 0) code_2 = plate_code.plate_code(side, 0, j + 1, i, 1) new_plate_1 = line.line(code_1, new_plate_1_a, new_plate_1_b, t_4) new_plate_2 = line.line(code_2, new_plate_2_a, new_plate_2_b, t_4) new_tpl_lines_4.append(new_plate_1) new_tpl_lines_4.append(new_plate_2) j += 2 i += 1 initial_point_4 = copy.deepcopy(new_plate_2_b) code_4 = plate_code.plate_code(side, 0, j, 0, 0) new_plate_4 = line.line(code_4, next_tpl_a, end_point_4, t_4) new_tpl_lines_4.append(new_plate_4) for plate in new_tpl_lines_1: initial_cs.addline(plate) for plate in new_tpl_lines_2: initial_cs.addline(plate) for plate in new_tpl_lines_3: initial_cs.addline(plate) for plate in new_tpl_lines_4: initial_cs.addline(plate) for stiffener in stiffener_list: for i in range(len(stiffener.lines)): initial_cs.addline(stiffener.lines[i]) return initial_cs
def get_m_rd_pl_eff(total_cs): #remove side stiffeners cs = crosssection.crosssection(total_cs.b_sup, total_cs.b_inf, total_cs.h) for plate in total_cs.lines: if (plate.code.pl_position == 2 or plate.code.pl_position == 4) and plate.code.pl_type == 1: pass else: cs.addline(plate) total_area = cs.get_area_red(stress=True) convergence = defaults.convergence_limit_m_rd_pl_eff * total_area continue_iteration = True area_top = 10**12 area_btm = 0 start = True z_min = 0 z = cs.h / 2 z_max = cs.h code = plate_code.plate_code(-1, -1, -1, -1, -1) counter = 0 #interation loop to find position of plastic zero line while abs(area_top - area_btm) > convergence and continue_iteration == True: counter += 1 start = False top_part = crosssection.crosssection(0, 0, 0) bottom_part = crosssection.crosssection(0, 0, 0) for plate in cs.lines: #plate is entirely below assumed plastic zero line if plate.a.z >= z and plate.b.z >= z: bottom_part.addline(plate) #plate is entirely above plastic zero line elif plate.a.z <= z and plate.b.z <= z: top_part.addline(plate) #plate crosses plastic zero line, a on top elif plate.a.z <= z and plate.b.z >= z: #case 1: pzl crosses a-p1 if plate.a.z < z and plate.p1.z > z: share = (z - plate.a.z) / (plate.p1.z - plate.a.z) y = plate.a.y + share * (plate.p1.y - plate.a.y) point_middle = point.point(y, z) line_a = line.line(code, plate.a, point_middle, plate.t) top_part.addline(line_a) line_b1 = line.line(code, point_middle, plate.p1, plate.t) bottom_part.addline(line_b1) line_b2 = line.line(code, plate.p2, plate.b, plate.t) bottom_part.addline(line_b2) #case 2: pzl crosses p2-b elif plate.p2.z < z and plate.b.z > z: share = (z - plate.p2.z) / (plate.b.z - plate.p2.z) y = plate.p2.y + share * (plate.b.y - plate.p2.y) point_middle = point.point(y, z) line_a1 = line.line(code, plate.a, plate.p1, plate.t) top_part.addline(line_a1) line_a2 = line.line(code, plate.p2, point_middle, plate.t) top_part.addline(line_a2) line_b = line.line(code, point_middle, plate.b, plate.t) bottom_part.addline(line_b) #case 3 pzl crosses p1-p2 else: line_a = line.line(code, plate.a, plate.p1, plate.t) top_part.addline(line_a) line_b = line.line(code, plate.p1, plate.b, plate.t) bottom_part.addline(line_b) elif plate.a.z >= z and plate.b.z <= z: #case 1: pzl crosses b-p2 if plate.b.z < z and plate.p2.z > z: share = (z - plate.b.z) / (plate.p2.z - plate.b.z) y = plate.b.y + share * (plate.p2.y - plate.b.y) point_middle = point.point(y, z) line_b = line.line(code, plate.b, point_middle, plate.t) top_part.addline(line_b) line_a1 = line.line(code, point_middle, plate.p2, plate.t) bottom_part.addline(line_a1) line_a2 = line.line(code, plate.p1, plate.a, plate.t) bottom_part.addline(line_a2) #case 2: pzl crosses p1-a elif plate.p1.z < z and plate.a.z > z: share = (z - plate.p1.z) / (plate.a.z - plate.p1.z) y = plate.p1.y + share * (plate.a.y - plate.p1.y) point_middle = point.point(y, z) line_b1 = line.line(code, plate.b, plate.p2, plate.t) top_part.addline(line_b1) line_b2 = line.line(code, plate.p1, point_middle, plate.t) top_part.addline(line_b2) line_a = line.line(code, point_middle, plate.a, plate.t) bottom_part.addline(line_a) #case 3 pzl crosses p1-p2 else: line_b = line.line(code, plate.b, plate.p2, plate.t) top_part.addline(line_b) line_a = line.line(code, plate.p2, plate.a, plate.t) bottom_part.addline(line_a) area_top = top_part.get_area_red(stress=True) area_btm = bottom_part.get_area_red(stress=True) if area_top > area_btm: z_max = z z = 0.5 * (z + z_min) else: z_min = z z = 0.5 * (z + z_max) counter += 1 if counter > 10: continue_iteration = False z_s_top = abs(z - top_part.get_center_z_red(stress=True)) z_s_btm = abs(z - bottom_part.get_center_z_red(stress=True)) m_pl_rd_eff = (z_s_top * area_top + z_s_btm * area_btm) * data.constants.get( "f_y") / data.constants.get("gamma_M1") return m_pl_rd_eff
def column_buckling(plate_glob, side, height_zero_pressure, height_max_pressure): string = "\n 4.5.3 Column type buckling behaviour" printing.printing(string) #add the lines to the right list stiffener_lines = [] tpl_lines_list = [] stiffeners_list = [] #points of max pressure and zero pressure; needed for extrapolation point_max = None sigma_max = 0 for plate in plate_glob.lines: if plate.code.tpl_number == 0: stiffener_lines.append(plate) elif plate.code.pl_type == 0: tpl_lines_list.append(plate) #for extrapolation b_c and the positions will be required if plate.sigma_a_red >= sigma_max: point_max = copy.deepcopy(plate.a) sigma_max = plate.sigma_a_red elif plate.sigma_b_red >= sigma_max: point_max = copy.deepcopy(plate.b) sigma_max = plate.sigma_b_red #case 1: stiffened plate if stiffener_lines != []: st_number_min = stiffener_lines[0].code.st_number st_number_max = stiffener_lines[0].code.st_number for plate in stiffener_lines: if plate.code.st_number < st_number_min: st_number_min = plate.code.st_number elif plate.code.st_number > st_number_max: st_number_max = plate.code.st_number number_of_stiffeners = int(len(stiffener_lines) / 3) for i in range(number_of_stiffeners): stiffeners_list.append(crosssection.crosssection(0, 0, 0)) for plate in stiffener_lines: if plate.code.st_number == i + st_number_min: stiffeners_list[i].lines.append(plate) #sort the lists tpl_lines_list = sorted(tpl_lines_list, key=lambda plate: plate.code.tpl_number) stiffeners_list = sorted( stiffeners_list, key=lambda stiffener: stiffener.lines[0].code.st_number) #create sets tpl_st_lines_set = {} tpl_betw_lines_set = {} j = 1 for plate in tpl_lines_list: #is the tpl_number even, (or odd, see correction) #meaning included in a stiffener if j % 2 == 0: st_number = st_number_min + int(j / 2) - 1 tpl_st_lines_set.update({st_number: plate}) else: st_number_before = st_number_min + int(j / 2) - 1 tpl_betw_lines_set.update({st_number_before: plate}) j += 1 stiffeners_set = {} stiffeners_set_length = 0 for stiffener in stiffeners_list: st_number = stiffener.lines[0].code.st_number stiffeners_set.update({st_number: stiffener}) stiffeners_set_length += 1 columns = {} i = st_number_min #a set of all columns (stiffener + carrying widths) is created -> see column_class #they carry the number of the stiffener and they have the stiffener number as a key while i < st_number_max + 1: stiffener_i = copy.deepcopy(stiffeners_set.get(i)) plate_before = copy.deepcopy(tpl_betw_lines_set.get(i - 1)) plate_between = copy.deepcopy(tpl_st_lines_set.get(i)) plate_after = copy.deepcopy(tpl_betw_lines_set.get(i)) code_before = plate_before.code code_between = plate_between.code code_after = plate_after.code plate_between_A_tot = plate_between.get_area_tot() plate_between_A_red = plate_between.get_area_red() plate_between_I_tot = plate_between.get_i_along_tot() #plate_before plate_before_gross_len = figure_Aone(plate_before, False, True) factor = plate_before_gross_len / plate_before.get_length_tot() point_a_y = plate_before.b.y + factor * (plate_before.a.y - plate_before.b.y) point_a_z = plate_before.b.z + factor * (plate_before.a.z - plate_before.b.z) border_before_gross = point.point(point_a_y, point_a_z) plate_before_gross = line.line(code_before, border_before_gross, plate_before.b, plate_before.t) plate_before_gross_I = plate_before_gross.get_i_along_tot() plate_before_gross_A = plate_before_gross.get_area_tot() sigma_border_before_gross = plate_before.sigma_b_red + factor * ( plate_before.sigma_a_red - plate_before.sigma_b_red) plate_before_gross.sigma_a_red = sigma_border_before_gross plate_before_gross.sigma_b_red = plate_before.sigma_b_red plate_before_eff_len = figure_Aone(plate_before, False, False) factor = plate_before_eff_len / plate_before.get_length_tot() point_a_y = plate_before.b.y + factor * (plate_before.a.y - plate_before.b.y) point_a_z = plate_before.b.z + factor * (plate_before.a.z - plate_before.b.z) border_before_eff = point.point(point_a_y, point_a_z) plate_before_eff = line.line(code_before, border_before_eff, plate_before.b, plate_before.t) plate_before_eff_I = plate_before_eff.get_i_along_tot() plate_before_eff_A = plate_before_eff.get_area_tot() sigma_border_before_eff = plate_before.sigma_b_red + factor * ( plate_before.sigma_a_red - plate_before.sigma_b_red) plate_before_eff.sigma_a_red = sigma_border_before_eff plate_before_eff.sigma_b_red = plate_before.sigma_b_red #plate_after plate_after_gross_len = figure_Aone(plate_after, True, True) factor = plate_after_gross_len / plate_after.get_length_tot() point_b_y = plate_after.a.y + factor * (plate_after.b.y - plate_after.a.y) point_b_z = plate_after.a.z + factor * (plate_after.b.z - plate_after.a.z) border_after_gross = point.point(point_b_y, point_b_z) plate_after_gross = line.line(code_after, plate_after.a, border_after_gross, plate_after.t) plate_after_gross_I = plate_after_gross.get_i_along_tot() plate_after_gross_A = plate_after_gross.get_area_tot() sigma_border_after_gross = plate_after.sigma_b_red + factor * ( plate_after.sigma_a_red - plate_after.sigma_b_red) plate_after_gross.sigma_a_red = plate_after.sigma_a_red plate_after_gross.sigma_b_red = sigma_border_after_gross plate_after_eff_len = figure_Aone(plate_after, True, False) factor = plate_after_eff_len / plate_after.get_length_tot() point_b_y = plate_after.a.y + factor * (plate_after.b.y - plate_after.a.y) point_b_z = plate_after.a.z + factor * (plate_after.b.z - plate_after.a.z) border_after_eff = point.point(point_b_y, point_b_z) plate_after_eff = line.line(code_after, plate_after.a, border_after_eff, plate_after.t) plate_after_eff_I = plate_after_eff.get_i_along_tot() plate_after_eff_A = plate_after_eff.get_area_tot() sigma_border_after_eff = plate_after.sigma_b_red + factor * ( plate_after.sigma_a_red - plate_after.sigma_b_red) plate_after_eff.sigma_a_red = plate_after.sigma_a_red plate_after_eff.sigma_b_red = sigma_border_after_eff #EC 1993 1-5 4.5.3 (3) A_sl = stiffener_i.get_area_tot( ) + plate_before_gross_A + plate_after_gross_A + plate_between_A_tot A_sl_eff = stiffener_i.get_area_red( ) + plate_before_eff_A + plate_after_eff_A + plate_between_A_red I_sl = stiffener_i.get_i_along_tot( plate_between ) + plate_before_gross_I + plate_after_gross_I + plate_between_I_tot sigma_cr_sl = (math.pi**2 * data.constants.get("E") * I_sl) / (A_sl * data.input_data.get("a")**2) ######calculation of sigma_cr_c################ #span of column b = dis_points(border_before_gross, border_after_gross) #stress ratio across the whole cross-section of the column stress_ratio = min( sigma_border_before_gross, sigma_border_after_gross) / max( sigma_border_before_gross, sigma_border_after_gross) column_as_cs = copy.deepcopy(stiffener_i) column_as_cs.addline(plate_before_gross) column_as_cs.addline(plate_after_gross) column_as_cs.addline(plate_between) #calculating stiffener center tpl_st_center = point.point( tpl_st_lines_set.get(i).get_center_y_tot(), tpl_st_lines_set.get(i).get_center_z_tot()) height_stiffener_center = tpl_st_center.z #calculating b_c and sigma_cr_c all_tension = False if sigma_border_before_gross < 0 and sigma_border_after_gross < 0: #all tension b_c = 0 sigma_cr_c = 10**8 all_tension = True elif abs(sigma_border_before_gross - sigma_border_after_gross) < 0.5: #same pressure; bottom stiffener; no extrapolation required b_c = b sigma_cr_c = sigma_cr_sl all_tension = False #different pressure; side stiffener; extrapolation required else: b_sl_1 = height_stiffener_center - height_zero_pressure b_c = height_max_pressure - height_zero_pressure if b_sl_1 == 0: sigma_cr_c = 10**8 all_tension = True factor = b_c / b_sl_1 if factor > 0: #stiffener in compression zone --> extrapolation sigma_cr_c = sigma_cr_sl * factor else: #stiffener in tension zone --> no proof required b_c = 0 sigma_cr_c = 10**8 all_tension = True #excentricities st_center = point.point(stiffener_i.get_center_y_tot(), stiffener_i.get_center_z_tot()) sl_cs = crosssection.crosssection(0, 0, 0) for plate in stiffener_i.lines: sl_cs.addline(plate) sl_cs.addline(plate_before_gross) sl_cs.addline(plate_after_gross) sl_cs.addline(plate_between) #center of the whole column sl_center = point.point(sl_cs.get_center_y_tot(), sl_cs.get_center_z_tot()) e2 = dis_plate_point(tpl_st_lines_set.get(i), sl_center) e1 = dis_plate_point(tpl_st_lines_set.get(i), st_center) - e2 column = column_class(i, A_sl, A_sl_eff, I_sl, sigma_cr_c, e1, e2, all_tension, column_as_cs) columns.update({i: column}) printing.printing(str(column)) i += 1 #all columns created Chi_c = 10**8 sigma_cr_c = 1 #searches for the single column buckling mechanism with the smallest Chi_c #this one will be the defining column mechanism #as not all our stiffeners will be the same, we can not conclude that it is one at a border (highest pressure) for key in columns: Chi_c_column = column_buckling_Chi_c(columns.get(key)) if Chi_c_column < Chi_c: Chi_c = Chi_c_column sigma_cr_c = columns.get(key).sigma_cr_c #case 2: unstiffened plate else: t_plate = tpl_lines_list[0].t sigma_cr_c = math.pi**2 * data.constants.get("E") * t_plate**2 / \ (12 * (1-data.constants.get("nu")**2)*data.input_data.get("a")**2) lambda_c_bar = math.sqrt(data.constants.get("f_y") / sigma_cr_c) alpha = 0.21 Phi_c = 0.5 * (1 + alpha * (lambda_c_bar - 0.2) + lambda_c_bar**2) Chi_c = 1 / (Phi_c + math.sqrt(Phi_c**2 - lambda_c_bar**2)) if Chi_c > 1: Chi_c = 1 string = "\n Unstiffened Plate" string += "\n sigma_cr_c: " + str( math.floor(1000 * sigma_cr_c) / 1000) #string += "\n lambda_c_bar ="+str(lambda_c_bar) #string += "\n Phi_c: "+str(Phi_c) string += "\n Chi_c: " + str( math.floor(1000 * Chi_c) / 1000) printing.printing(string) string = "\n Critical buckling values" string += " sigma_cr_c: " + str(math.floor(1000 * sigma_cr_c) / 1000) string += " Chi_c: " + str(math.floor(1000 * Chi_c) / 1000) printing.printing(string) return Chi_c, sigma_cr_c