Beispiel #1
0
def Beam_objective_funciton_BD(depths):
    #def fn(*args):
    #beam1 = Beam(depth,breadth,Asc,Ast,15,415,415,3.14*10**2/4,spacing);
    #beam1.moment_capcity()
    #beam1.min_spacing()
    #beam1.max_spacing()
    FS = SystemElements()

    # Add beams to the system.
    FS.add_element(location=[0, 5], EA=15000, EI=5000)
    FS.add_element(location=[[0, 5], [5, 5]], EA=15000, EI=5000)
    FS.add_element(location=[[5, 5], [5, 0]], EA=15000, EI=5000)

    # Add a fixed support at node 1.
    FS.add_support_fixed(node_id=1)

    # Add a rotational spring support at node 4.
    FS.add_support_spring(node_id=4, translation=3, k=4000)

    # Add loads.
    FS.point_load(Fx=30, node_id=2)
    FS.q_load(q=-10, element_id=2)
    FS.q_load(q=-10, element_id=1)
    #ss.q_load(q=-10, element_id=4)
    #print(ss.node_ranges())

    # Solve
    FS.solve()
    FS.get_element_results(element_id=1)['length']
    FS.get_element_results(element_id=1)['Mmin']
    deno = FS.get_element_results(element_id=1)['Mmax']

    #breadth = randgen(300,600)
    #Asc = 0
    #Ast = 0
    #spacing = 150
    #beam = Beam(depth,breadth,Asc,Ast,15,415,415,3.14*10**2/4,spacing)
    #Asc = beam.p_min()
    #Ast = beam.p_min()
    #beam1 = Beam(depth,breadth,Asc,Ast,15,415,415,3.14*10**2/4,spacing)
    #beam1.moment_capcity()
    #beam1.min_spacing()
    #beam1.max_spacing()

    #print(beam1.moment_capcity()*10**(-3))
    #print(FS.get_element_results(element_id=1)['Mmax'])
    res, depth_f = Beam_gene(depths, deno)
    C_D = res / deno
    #print()
    return C_D
def Beam_objective_funciton(breadth):
    depth = randgen(300,600)
    Asc = 0 
    Ast = 0
    spacing = 150
    beam = Beam(depth,breadth,Asc,Ast,15,415,415,3.14*10**2/4,spacing);
    Asc = beam.p_min 
    Ast = beam.p_min
    beam1 = Beam(depth,breadth,Asc,Ast,15,415,415,3.14*10**2/4,spacing);
    beam1.moment_capcity()
    beam1.min_spacing()
    beam1.max_spacing()


    FS = SystemElements()

    # Add beams to the system.
    FS.add_element(location=[0, 5],EA=15000, EI=5000)
    FS.add_element(location=[[0, 5], [5, 5]],EA=15000, EI=5000)
    FS.add_element(location=[[5, 5], [5, 0]],EA=15000, EI=5000)
    
    # Add a fixed support at node 1.
    FS.add_support_fixed(node_id=1)
    
    # Add a rotational spring support at node 4.
    FS.add_support_spring(node_id=4, translation=3, k=4000)
    
    # Add loads.
    FS.point_load(Fx=30, node_id=2)
    FS.q_load(q=-10, element_id=2)
    FS.q_load(q=-10, element_id=1)
    #ss.q_load(q=-10, element_id=4)
    #print(ss.node_ranges())
    
    # Solve
    FS.solve()

    FS.get_element_results(element_id=1)['length']
    FS.get_element_results(element_id=1)['Mmin']
    FS.get_element_results(element_id=1)['Mmax']


    print(beam1.moment_capcity()*10**(-3))
    print(FS.get_element_results(element_id=1)['Mmax'])
Beispiel #3
0
ss.q_load(q=-10, element_id=1)
#ss.q_load(q=-10, element_id=4)
#print(ss.node_ranges())

# Solve
ss.solve()
#print(ss.get_element_results(element_id=1))
#result = (ss.get_element_results(element_id=0, verbose=False))
##for el_result in result:
##	print(el_result['length'])
##	print(el_result['Mmin'])
##	print(el_result['Mmax'])

for i in range(1, 4):
    print("element_id" + str(i))
    print(ss.get_element_results(element_id=i))
    print(ss.get_element_results(element_id=i)['length'])
    print(ss.get_element_results(element_id=i)['Mmin'])
    print(ss.get_element_results(element_id=i)['Mmax'])
    print(ss.get_element_results(element_id=i))

# Get visual results.
ss.show_structure()
ss.show_reaction_force()
ss.show_axial_force()
ss.show_shear_force()
ss.show_bending_moment()
ss.show_displacement()


class Beam:
Beispiel #4
0
def shear_design(Ast, B, D, Vu, fck, fy):
    FS = SystemElements()

    # Add beams to the system.
    FS.add_element(location=[0, 5], EA=15000, EI=5000)
    FS.add_element(location=[[0, 5], [5, 5]], EA=15000, EI=5000)
    FS.add_element(location=[[5, 5], [5, 0]], EA=15000, EI=5000)

    # Add a fixed support at node 1.
    FS.add_support_fixed(node_id=1)

    # Add a rotational spring support at node 4.
    FS.add_support_spring(node_id=4, translation=3, k=4000)

    # Add loads.
    FS.point_load(Fx=30, node_id=2)
    FS.q_load(q=-10, element_id=2)
    FS.q_load(q=-10, element_id=1)
    #ss.q_load(q=-10, element_id=4)
    #print(ss.node_ranges())

    # Solve
    FS.solve()

    FS.get_element_results(element_id=1)['length']
    FS.get_element_results(element_id=1)['Mmin']
    deno = FS.get_element_results(element_id=1)['shear']

    #breadth = randgen(300,600)
    #Asc = 0
    #Ast = 0
    #spacing = 150
    #beam = Beam(depth,breadth,Asc,Ast,15,415,415,3.14*10**2/4,spacing)
    #Asc = beam.p_min()
    #Ast = beam.p_min()
    #beam1 = Beam(depth,breadth,Asc,Ast,15,415,415,3.14*10**2/4,spacing)
    #beam1.moment_capcity()
    #beam1.min_spacing()
    #beam1.max_spacing()

    #print(beam1.moment_capcity()*10**(-3))
    #print(FS.get_element_results(element_id=1)['Mmax'])
    res = Beam_gene(depths)

    beam1 = Beam(depth, breadth, Asc, Ast, 15, 415, 415, 3.14 * 10**2 / 4,
                 spacing)
    beam1.moment_capcity()
    beam1.min_spacing()
    beam1.max_spacing()
    # Add a fixed support at node 1.
    FS.add_support_fixed(node_id=1)

    # Add a rotational spring support at node 4.
    FS.add_support_spring(node_id=4, translation=3, k=4000)

    # Add loads.
    FS.point_load(Fx=30, node_id=2)
    FS.q_load(q=-10, element_id=2)
    FS.q_load(q=-10, element_id=1)
    #ss.q_load(q=-10, element_id=4)
    #print(ss.node_ranges())

    # Solve
    FS.solve()

    FS.get_element_results(element_id=1)['length']
    FS.get_element_results(element_id=1)['Mmin']
    FS.get_element_results(element_id=1)['Mmax']
    FS.get_element_results(element_id=1)['shear']

    #print(beam1.moment_capcity()*10**(-3))
    #print(FS.get_element_results(element_id=1)['Mmax'])
    C_D = ((beam1.moment_capcity()) *
           10**(-3)) / (FS.get_element_results(element_id=1)['Mmax'])
    print(C_D)
Beispiel #5
0
# Add loads.
ss.point_load(Fx=10, node_id=2)
ss.point_load(Fx=20, node_id=7)
ss.point_load(Fx=30, node_id=10)
ss.q_load(q=-10, element_id=2)
ss.q_load(q=-10, element_id=4)
ss.q_load(q=-10, element_id=7)
ss.q_load(q=-10, element_id=9)
ss.q_load(q=-10, element_id=12)
ss.q_load(q=-10, element_id=14)
ss.solve()
ss.show_structure()
##Edge Columns
print('shear results')
#Column shear due to plastic hinge formation in longitudinal beams
hst = (ss.get_element_results(element_id=1)['length'] + ss.get_element_results(element_id=6)['length'])/2
V21 =  1.4*(ss.get_element_results(element_id=2)['Mmax'])/(hst)
print(V21)
hst = (ss.get_element_results(element_id=6)['length'] + ss.get_element_results(element_id=11)['length'])/2
V67 =  1.4*(ss.get_element_results(element_id=7)['Mmax'])/(hst)
print(V67)
hst = (ss.get_element_results(element_id=11)['length'])/2
V1112 =  1.4*(ss.get_element_results(element_id=12)['Mmax'])/(hst)
print(V1112)
##Interior Columns
hst = (ss.get_element_results(element_id=3)['length'] + ss.get_element_results(element_id=8)['length'])/2
Mas = ss.get_element_results(element_id=2)['Mmax']
Mah = ss.get_element_results(element_id=2)['Mmin']
Mbs = ss.get_element_results(element_id=4)['Mmax']
Mbh = ss.get_element_results(element_id=4)['Mmin']
V34 =  max(1.4*(Mah+Mbs)/(hst),1.4*(Mas+Mbh)/(hst))
Beispiel #6
0
ss.q_load(q=-10, element_id=2)
ss.q_load(q=-10, element_id=5)
ss.q_load(q=-10, element_id=8)
#ss.q_load(q=-10, element_id=4)
#print(ss.node_ranges())

# Solve
ss.solve()

#print(ss.get_element_results(element_id=1))
#result = (ss.get_element_results(element_id=0, verbose=False))
##for el_result in result:
##	print(el_result['length'])
##	print(el_result['Mmin'])
##	print(el_result['Mmax'])
print(ss.get_element_results(element_id=2)['length'])
print(ss.get_element_results(element_id=2)['Mmin'])
print(ss.get_element_results(element_id=2)['Mmax'])
print(ss.get_element_results(element_id=5)['length'])
print(ss.get_element_results(element_id=5)['Mmin'])
print(ss.get_element_results(element_id=5)['Mmax'])
print(ss.get_element_results(element_id=8)['length'])
print(ss.get_element_results(element_id=8)['Mmin'])
print(ss.get_element_results(element_id=8)['Mmax'])

#for i in range(1,4):
#	print("element_id"+str(i))
#	print(ss.get_element_results(element_id=i))
#	print(ss.get_element_results(element_id=i)['length'])
#	print(ss.get_element_results(element_id=i)['Mmin'])
#	print(ss.get_element_results(element_id=i)['Mmax'])
Beispiel #7
0
ss.point_load(Fx=20.477, node_id=11)
ss.point_load(Fx=32.991, node_id=13)
ss.point_load(Fx=48.032, node_id=15)
#ss.point_load(Fx=48.032, node_id=19)
# Solve
ss.solve()
ss.show_structure()
ss.show_bending_moment()
ss.show_axial_force()
#print(ss.get_element_results(element_id=1))
#result = (ss.get_element_results(element_id=0, verbose=False))
##for el_result in result:
##	print(el_result['length'])
##	print(el_result['Mmin'])
##	print(el_result['Mmax'])
print(ss.get_element_results(element_id=2)['Mmax'])
print(ss.get_element_results(element_id=2)['Mmin'])
print(ss.get_element_results(element_id=2)['Mmax'])
print(ss.get_element_results(element_id=5)['length'])
print(ss.get_element_results(element_id=5)['Mmin'])
print(ss.get_element_results(element_id=5)['Mmax'])
print(ss.get_element_results(element_id=8)['length'])
print(ss.get_element_results(element_id=8)['Mmin'])
print(ss.get_element_results(element_id=8)['Mmax'])
print(ss.get_element_results(element_id=11)['length'])
print(ss.get_element_results(element_id=11)['Mmin'])
print(ss.get_element_results(element_id=11)['Mmax'])
print(ss.get_element_results(element_id=14)['length'])
print(ss.get_element_results(element_id=14)['Mmin'])
print(ss.get_element_results(element_id=14)['Mmax'])
#for i in range(1,4):