예제 #1
0
def local_buckling(cs):
    string = "\n   Iteratively changing the widths until M_Rd_el_eff converges to a limit of " + str(
        defaults.convergence_limit_local_buckling)
    printing.printing(string)

    cs = cal_sigma_psi_red(cs)
    change = 1
    i = 1
    while change > defaults.convergence_limit_local_buckling:
        m_rd_el_eff_old = cs.get_m_rd_el_eff()
        for line in cs.lines:
            cs = local_buckling_plate(cs, line)
        cs = cal_sigma_psi_red(cs)
        m_rd_el_eff_new = cs.get_m_rd_el_eff()
        change = abs(abs(m_rd_el_eff_new / m_rd_el_eff_old) - 1)

        i += 1
    return cs
예제 #2
0
파일: shear_lag.py 프로젝트: muellvin/BA
def reduction_shear_lag(cs, flange):
    string = "\n   Shear lag reduction for flange " + str(flange)
    printing.printing(string)

    if flange == 1:
        b_0 = cs.b_sup / 2  #3.1 (2)
    elif flange == 3:
        b_0 = cs.b_inf / 2

    #check if necessary
    if b_0 < data.input_data.get("L_e") / 50:
        string = "\n      Shear Lag is neglectable for side " + str(flange)
        printing.printing(string)
        return cs

    string = "\n      Shear Lag is not neglectable for side " + str(flange)
    printing.printing(string)

    A_c_eff = 0
    for line in cs.lines:
        if line.code.pl_position == flange:
            #if the side is under tension, A_c_eff is the gross cross-sectional area as said in last remark in the EC after eq 3.5
            A_c_eff += line.get_area_red()
    A_sl = 0
    for line in cs.lines:
        if line.code.pl_position == flange and line.code.pl_type == 1:
            A_sl += line.get_area_tot()

    t_f = t = cs.get_line(pl_position=flange, pl_type=0).t
    alpha_0 = math.sqrt(1 + A_sl / (b_0 * t))

    kappa = alpha_0 * b_0 / data.input_data.get("L_e")
    beta = beta_from_kappa(kappa)
    #follow EC 3.3; ULS
    #recommended calculation from book design of plated structures (2.8):
    #also in EC 1993 1-5 3.3 eq 3.5
    #A_eff = beta**kappa * A_c_eff
    reduction_factor_shear_lag = beta**kappa
    reduction_factor_shear_lag = max(beta, reduction_factor_shear_lag)
    reduction_factor_shear_lag = min(reduction_factor_shear_lag, 1)

    string = "\n      alpha_0: " + str(math.floor(1000 * alpha_0) / 1000)
    string += "      Beta^kappa: " + str(math.floor(1000 * beta**kappa) / 1000)
    string += "      reduction_factor_shear_lag: " + str(
        math.floor(1000 * reduction_factor_shear_lag) / 1000)
    printing.printing(string)

    #the book recommends to apply this reduction to the thickness of the flange plates
    for line in cs.lines:
        if line.code.pl_position == flange:
            line.t_stress = line.t * reduction_factor_shear_lag

    return cs
예제 #3
0
def column_buckling_Chi_c(column):

    if column.all_tension == True:
        beta_A_c = column.A_sl_eff / column.A_sl
        lambda_c_bar = 0
        Phi_c = 0
        Chi_c = 1
        string = str(column)
        string += "\n         Buckling Values for column number " + str(
            column.st_number)
        #string += "\n            beta_A_c =" +str(beta_A_c)
        #string += "\n            lambda_c_bar =" +str(lambda_c_bar)
        #string += "\n            Phi_c ="+ str(Phi_c)
        string += "      Chi_c =" + str(math.floor(1000 * Chi_c) / 1000)
        printing.printing(string)
        return 1
    else:
        beta_A_c = column.A_sl_eff / column.A_sl
        lambda_c_bar = math.sqrt(beta_A_c * data.constants.get("f_y") /
                                 column.sigma_cr_c)

        i = math.sqrt(column.I_sl / column.A_sl)
        e = max(column.e1, column.e2)
        alpha = 0.34  #curve b for closed stiffeners
        alpha_e = alpha + 0.09 / (e / i)

        Phi_c = 0.5 * (1 + alpha_e * (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 = str(column)
        string += "\n         Buckling Values for column number " + str(
            column.st_number)
        #string += "\n            beta_A_c =" +str(beta_A_c)
        #string += "\n            lambda_c_bar =" +str(lambda_c_bar)
        #string += "\n            Phi_c ="+ str(Phi_c)
        string += "      Chi_c =" + str(math.floor(1000 * Chi_c) / 1000)
        printing.printing(string)

        return Chi_c
예제 #4
0
파일: interaction.py 프로젝트: muellvin/BA
def interaction_web(total_cs, web_plate, eta_3):

    #eta_3 is equal to eta_3_bar, as we always set V_bf_Rd = 0

    string = "\n   7.1 Interaction between shear force, bending moment and axial force"
    printing.printing(string)

    m_ed = data.input_data.get("M_Ed")
    m_f_rd = total_cs.get_m_f_rd_eff()
    if eta_3 <= 0.5 and m_ed < m_f_rd:
        #no interaction needed
        #what is a reasonable return value, -1?
        #following design of plated structures; doing interaction if one condition is not satisfied
        utilisation = -1
        string = "\n      eta_3 <= 0.5 and m_ed < m_f_rd; no interaction needed"
        #string += "\n      m_f_rd: "+str(math.floor(1000*m_f_rd)/1000)
        string += "\n      utilisation: -1"
        printing.printing(string)

        return utilisation
    else:
        string = "\n      eta_3 > 0.5; interaction needed"
        #interaction required
        plastic_cs = copy.deepcopy(total_cs)
        m_pl_rd = get_m_rd_pl_eff(plastic_cs)
        eta_1_bar = abs(m_ed) / m_pl_rd
        utilisation = eta_1_bar + (1 - m_f_rd / m_pl_rd) * (2 * eta_3 - 1)**2
        #string += "\n      m_f_rd: "+str(math.floor(1000*m_f_rd)/1000)
        #string += "\n      m_pl_rd: "+str(math.floor(1000*m_pl_rd)/1000)
        string += "\n      eta_1_bar: " + str(
            math.floor(1000 * eta_1_bar) / 1000)
        string += "\n      utilisation: " + str(utilisation)
        printing.printing(string)
        return utilisation
예제 #5
0
파일: interaction.py 프로젝트: muellvin/BA
def interaction_flange(total_cs, flange_plate, eta_3):
    string = "\n   7.1 Interaction between shear force, bending moment and axial force"
    string += "\n   Flange -> comment (5)"
    printing.printing(string)

    #choose correct shear stresses for calculation
    if eta_3 <= 0.5:
        #no interaction needed
        #what is a resonable return value, -1?
        utilisation = -1
        string = "\n      eta_3 <= 0.5; no interaction needed"
        string += "      utilisation: -1"
        printing.printing(string)
    else:
        eta_1_bar = abs(
            data.input_data.get("M_Ed") / total_cs.get_m_rd_el_eff())
        utilisation = eta_1_bar + (1 - m_f_rd / m_pl_rd) * (2 * eta_3 - 1)**2
        string = "\n      eta_3 > 0.5; interaction needed"
        string += "\n      eta_1_bar: " + str(
            math.floor(1000 * eta_1_bar) / 1000)
        string += "      utilisation: " + str(
            math.floor(1000 * utilisation) / 1000)
        printing.printing(string)

    #prove shear resistance for each subpanel
    string = "\n   Proofing Resistance to shear for each subpanel"
    printing.printing(string)
    for plate in flange_plate.lines:
        if plate.code.tpl_number != 0:
            v_ed_panel = stress_cal.get_tau_int_subpanel(total_cs, plate, data.input_data.get("V_Ed"),\
            data.input_data.get("T_Ed"))
            panel_cs = crosssection.crosssection(0, 0, 0)
            panel_cs.addline(plate)
            eta_3_panel = resistance_to_shear.resistance_to_shear(
                panel_cs, v_ed_panel)
            if eta_3_panel > 1:
                utilisation = 10
            else:
                assert True, "This is not possible"
    return utilisation
예제 #6
0
def buckling_proof(cs):
    string = "\n\nBuckling Proof according to EN1993-1-5"
    printing.printing(string)

    #3.3 Shear lag at the ultimate limit state
    string = "\n\n3.3 Shear lag at the ultimate limit state"
    printing.printing(string)
    if defaults.do_shear_lag == True:
        cs = shear_lag.shear_lag(cs)


    if data.input_data.get("M_Ed") == 0:
        string = "\n\n4.6 Verification"
        printing.printing(string)
        cs.eta_1 = 0
        string = "\n         eta_1 = " + str(0)
        printing.printing(string)
    else:
        #4.4 plate elements without longitudinal stiffeners
        string = "\n\n4.4 Plate elements without longitudinal stiffeners"
        printing.printing(string)
        cs = local_buckling.local_buckling(cs)

        #4.5 stiffened plate elements with longitudinal stiffeners
        string = "\n\n4.5 Stiffened plate elements with longitudinal stiffeners"
        printing.printing(string)
        cs = global_buckling.global_buckling(cs)

        #4.6 verification
        m_rd_eff = cs.get_m_rd_el_eff()
        cs.eta_1 = abs(data.input_data.get("M_Ed")/m_rd_eff)
        string = "\n\n4.6 Verification"
        string += "\n      eta_1: "+str(math.floor(1000*abs(data.input_data.get("M_Ed")/m_rd_eff))/1000)
        printing.printing(string)


    for side in range(1,5,1):
        line1 = "\n\nResistance to shear and interaction shear force and bending moment for side "+str(side)
        string = line1
        printing.printing(string)

        plate_glob = cs.get_stiffened_plate(side)
        if side == 1 or side == 3:

            #5. resistance to shear
            V_Ed_plate = stress_cal.get_tau_int_flange(cs, side, data.input_data.get("V_Ed"),\
            data.input_data.get("T_Ed"))
            eta_3 = resistance_to_shear.resistance_to_shear(plate_glob, V_Ed_plate)

            if side == 1:
                cs.eta_3_side_1 = eta_3
                #7.1 Interaction between shear forces, bending moment and axial force
                cs.interaction_1 = interaction.interaction_flange(cs, plate_glob, eta_3)

            if side == 3:
                cs.eta_3_side_3 = eta_3
                #7.1 Interaction between shear forces, bending moment and axial force
                cs.interaction_3 = interaction.interaction_flange(cs, plate_glob, eta_3)


        if side == 2 or side == 4:

            #5. resistance to shear
            V_Ed_plate = stress_cal.get_tau_int_web(cs, side, data.input_data.get("V_Ed"),\
            data.input_data.get("T_Ed"))
            eta_3 = resistance_to_shear.resistance_to_shear(plate_glob, V_Ed_plate)

            if side == 2:
                cs.eta_3_side_2 = eta_3
                #7.1 Interaction between shear forces, bending moment and axial force
                cs.interaction_2 = interaction.interaction_web(cs, plate_glob, eta_3)
            if side == 4:
                cs.eta_3_side_4 = eta_3
                #7.1 Interaction between shear forces, bending moment and axial force
                cs.interaction_4 = interaction.interaction_web(cs, plate_glob, eta_3)


    return cs
예제 #7
0
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
예제 #8
0
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
예제 #9
0
from proofs_and_stress_calculation import buckling_proof
from deck_and_initial_cs import initial_cs
from deck_and_initial_cs import deck
from data_and_defaults import data
from data_and_defaults import defaults
from cs_optimization_tool import optimization_value

#sys.path.append('C:/Users/Vinzenz Müller/Dropbox/ETH/6. Semester/BA')
#crosssection input and creation (only trapezoid plates)

if defaults.do_print_to_txt == True:
    file = open("user_interface/output/cs_analysis.txt", "w+")
    file.close()
defaults.do_deck_as_prop = True
cs_analysis_tool_terminal_input.set_defaults()
printing.printing(data.constants_tostring(), terminal=True)

cs_analysis_tool_terminal_input.set_cs_geometry()
#data.check_input_data_complete()
cs = initial_cs.create_initial_cs(data.input_data.get("b_sup"),
                                  data.input_data.get("b_inf"),
                                  data.input_data.get("h"),
                                  data.input_data.get("t_side"),
                                  data.input_data.get("t_deck"),
                                  data.input_data.get("t_bottom"))

printing.printing(data.input_data_tostring(), terminal=True)

#add the deck stiffeners
st_list_deck = deck.deck(data.input_data.get("b_sup"))
number_st_top = len(st_list_deck.stiffeners)
예제 #10
0
def resistance_to_shear(plate_glob, V_Ed_plate):
    string = "\n   5. Resistance to shear"
    printing.printing(string)

    #get values of constants
    f_y = data.constants.get("f_y")
    gamma_M1 = data.constants.get("gamma_M1")
    eta = defaults.eta
    side = plate_glob.lines[0].code.pl_position
    a = data.input_data.get("a")

    #import important geometry parameters
    #calculate lambda_w_bar for subpanels
    h_w = 0
    lambda_w_bar_3 = 0
    for plate in plate_glob.lines:
        if plate.code.pl_type == 0:
            k_tau_loc = 0
            h_w_i = plate.get_length_tot()
            if a / h_w_i >= 1:
                k_tau_loc = 5.34 + 4*(h_w_i/a)**2
            else:
                k_tau_loc = 4.0 + 5.34 * (h_w_i/a)**2
            lambda_w_bar_loc = h_w_i / (37.4*plate.t*math.sqrt(235/f_y)*math.sqrt(k_tau_loc))
            #if plate.code.pl_type == 0:
            #    string = "\n         lambda_w_bar_loc of the trapezoid line nr. "+str(plate.code.tpl_number)+": "+str(math.floor(lambda_w_bar_loc*1000)/1000)
            #else:
            #    string = "\n         lambda_w_bar_loc of the stiffener line nr. "+str(plate.code.st_number)+": "+str(math.floor(lambda_w_bar_loc*1000)/1000)
            #printing.printing(string)
            if lambda_w_bar_loc > lambda_w_bar_3:
                lambda_w_bar_3 = lambda_w_bar_loc
            h_w += plate.get_length_tot()
    t = plate_glob.get_line(pl_type = 0).t


    stiffened = True
    if len(plate_glob.lines) == 1:
        stiffened = False

    #calculate k_tau
    k_tau = 0
    if stiffened == False:
        string = "\n      unstiffened plate; (A.5)"
        if a / h_w >= 1:
            k_tau = 5.34 + 4*(h_w/a)**2

            string  += "      k_tau: "+str(math.floor(1000*k_tau)/1000)
        else:
            k_tau = 4.0 + 5.34 * (h_w/a)**2
            string  += "      k_tau: "+str(math.floor(1000*k_tau)/1000)
        printing.printing(string)

    else:
        string = "\n      stiffened plate; EBPlate"
        plate_a = None
        plate_b = None
        min_tpl = -1
        max_tpl = -1
        max_stn = 0
        min_stn = 1000
        stiffened_plate = copy.deepcopy(plate_glob)
        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."

        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

        #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
            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

        stiffener_list = []
        stiffeners_ebp = []
        for st_number in range(min_stn, max_stn+1, 1):
            i = st_number - min_stn
            stiffener_list.insert(i, 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)
            b_inf = stiffener_list[i].get_line(st_pl_position = 3).get_length_tot()
            b_sup = stiffener_list[i].get_line(st_pl_position = 1).get_length_tot()
            diff = (0.5*(b_sup - b_inf))
            diag = stiffener_list[i].get_line(st_pl_position = 2).get_length_tot()
            h = math.sqrt(diag**2-diff**2)
            t_stiff = stiffener_list[i].get_line(st_pl_position = 3).t
            center_y = stiffener_list[i].get_center_y_tot()
            distance = abs(center_y-plate_a.a.y)
            stiffeners_ebp.insert(i, (distance, h, b_sup, b_inf, t_stiff))
        tau = V_Ed_plate / (t*h_w)
        sigma_E = 190000*(t/h_w)**2
        if abs(tau) > 0.1 and 3 <= t:
            k_tau = ebplate.ebplate_shear(a, h_w, t, tau, stiffeners_ebp) * tau / sigma_E
            string += "\n      k_tau: "+str(math.floor(1000*k_tau)/1000)

        elif t<3:
            eta_3 = 10**2
            string += "\n      plate too thin; eta_3: "+ str(math.floor(1000*eta_3)/1000)
            return eta_3
        else:
            eta_3 = 0
            string += "\n      tau too small; eta_3: "+ str(0)
            return eta_3
        printing.printing(string)


    #pre_evaluation
    proof_required = True
    if stiffened == False:
        eval = 72 / eta * math.sqrt(235/f_y)
        if h_w/t < eval:
            proof_required = False
    else:
        eval = 31 / eta * math.sqrt(235 *k_tau/f_y)
        if h_w/t < eval:
            proof_required = False

    V_Rd = f_y*h_w*t/(math.sqrt(3)*gamma_M1)
    #calculate reduction factor chi_w if required
    if proof_required == True:
        #calculate tau_cr
        sigma_E = 190000*(t/h_w)**2
        tau_cr = k_tau * sigma_E
        lambda_w_bar_1 = 0.76 * math.sqrt(f_y / tau_cr) # formula 5.3
        lambda_w_bar_2 = h_w /(37.4*t*math.sqrt(235/f_y)*math.sqrt(k_tau)) #formula 5.6
        lambda_w_bar = min(lambda_w_bar_1, lambda_w_bar_2)
        lambda_w_bar = max(lambda_w_bar, lambda_w_bar_3)

        #string = "\n         (5.3) lambda_w_bar_1= "+str(math.floor(lambda_w_bar_1*1000)/1000)
        #string += "\n         (5.6) lambda_w_bar_2= "+str(math.floor(lambda_w_bar_2*1000)/1000)
        #string += "\n         (5.7) lambda_w_bar_3= "+str(math.floor(lambda_w_bar_3*1000)/1000)+" max single plate slenderness"
        #string = "      lambda_w_bar= "+str(math.floor(lambda_w_bar*1000)/1000)
        #printing.printing(string)

        assert lambda_w_bar > 0, "Strange value for lambda_w_bar"
        #assume a deformable support stiffener
        #no resistance due to plastic hinges in flanges
        chi_w = 0
        if lambda_w_bar < 0.83/eta:
            chi_w = eta
        else:
            chi_w = 0.83/lambda_w_bar

        assert chi_w <= eta, "value for chi_w too high"
        #calculate resistance
        V_Rd = chi_w*f_y*h_w*t/(math.sqrt(3)*gamma_M1)

    eta_3 = V_Ed_plate / V_Rd
    #string = "\n      V_Ed_plate: "+str(math.floor(V_Ed_plate*1000)/1000)
    #string += "\n      V_Rd: "+str(math.floor(V_Rd*1000)/1000)
    string = "      eta_3: "+str(math.floor(1000*eta_3)/1000)
    printing.printing(string)

    return eta_3
예제 #11
0
def reduction_global_buckling(cs, side):
    string = "\n   Side " + str(side)
    printing.printing(string)

    #extract the respective plate
    plate_glob = crosssection.crosssection(0, 0, 0)
    line_min = cs.get_line(pl_position=side, pl_type=0)
    line_max = line_min
    for plate in cs.lines:
        if plate.code.pl_position == side:
            plate_glob.addline(plate)
            if plate.code.tpl_number != 0 and plate.code.tpl_number < line_min.code.tpl_number:
                line_min = plate
            if plate.code.tpl_number != 0 and plate.code.tpl_number > line_max.code.tpl_number:
                line_max = plate

    #initialize buckling factors
    chi_c = 1
    rho_p = 1
    sigma_cr_c = 1
    sigma_cr_p = 1
    all_tension = False
    plate_stiffened = True

    #case 1: the whole plate is under tension
    if line_min.sigma_a_red < 0 and line_max.sigma_b_red < 0:
        rho_c = 1
        all_tension = True

    #case 2: unstiffened plate
    elif len(plate_glob.lines) == 1:
        rho_c = 1
        plate_stiffened = False

    #case 3: stiffened plate partly compressed
    else:
        #perform global buckling proof, EC3 1-5, 4.5.2
        if defaults.do_global_plate_buckling == True:
            rho_p, sigma_cr_p = global_plate_buckling.global_plate_buckling(
                cs, plate_glob)
        else:
            rho_p = 1
            sigma_cr_p = 0

        #perform column buckling proof, EC3 1-5, 4.5.3
        if defaults.do_column_plate_buckling == True:
            height_zero_pressure = cs.get_center_z_red(stress=True)
            if data.input_data.get("M_Ed") < 0:
                height_max_pressure = data.input_data.get("h")
            else:
                height_max_pressure = 0

            chi_c, sigma_cr_c = column_buckling.column_buckling(
                plate_glob, side, height_zero_pressure, height_max_pressure)
        else:
            chi_c = 1
            sigma_cr_c = 1

        #interaction according to EC3, 1-5, 4.5.4
        if defaults.do_column_plate_buckling == True and defaults.do_column_plate_buckling == True:
            eta = sigma_cr_p / sigma_cr_c - 1
            if eta > 1:
                eta = 1
            elif eta < 0:
                eta = 0
        elif defaults.do_column_plate_buckling == True and defaults.do_column_plate_buckling == False:
            eta = 0
        elif defaults.do_column_plate_buckling == False and defaults.do_column_plate_buckling == True:
            eta = 1
        else:
            eta = 1

        rho_c = (rho_p - chi_c) * eta * (2 - eta) + chi_c

    string = "\n      4.5.4 Interaction between plate and column buckling"
    string += "\n           all_tension: " + str(all_tension)
    string += "     rho_c = " + str(math.floor(1000 * rho_c) / 1000)
    printing.printing(string)

    #EC 1-5 (4.5) edge plates not reduced by rho_c
    plate_a = cs.get_plate_a(side)
    plate_b = cs.get_plate_b(side)

    #set values to the cross section
    for plate in cs.lines:
        if plate.code.pl_position == side:
            plate.chi_c = chi_c
            plate.sigma_cr_c = sigma_cr_c
            plate.rho_p = rho_p
            plate.sigma_cr_p = sigma_cr_p
            plate.rho_c_a = rho_c
            plate.rho_c_b = rho_c
            if plate == plate_a:
                plate.rho_c_a = 1
            if plate == plate_b:
                plate.rho_c_b = 1

    return cs