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 __init__(self, code, a, b, t, p1 = None, p2 = None): self.code = code self.a = a self.b = b self.p1 = p1 if p1 is not None else point.point(a.y + 1/2*(b.y - a.y), a.z + 1/2*(b.z-a.z)) self.p2 = p2 if p2 is not None else point.point(a.y + 1/2*(b.y - a.y), a.z + 1/2*(b.z-a.z)) self.t = float(t) #shear lag is accounted for by reducing the area in stress calculation, this is done by mindering the thickness self.t_stress = self.t self.beta = 1 self.rho_c_a = 1 self.rho_c_b = 1 #normal stress with tension being negative at point a and point b for the effective crosssection self.sigma_a_red = 0 self.sigma_b_red = 0 self.sigma_p1_red = 0 self.sigma_p2_red = 0 #ratio of sigma at a and b, smaller/larger with tension being negative self.psi = 1 #local plate buckling reduction factor self.rho_loc = 1 #global plate buckling reduction factors self.chi_c = 1 self.sigma_cr_c = 0 self.rho_p = 1 self.sigma_cr_p = 0
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_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_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
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)
#imports 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))
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 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