blender.add_nodes_elements_from_layers( mdl, layers=['elset_top_plate', 'elset_bot_plate'], mesh_type='ShellElement') blender.add_nodes_elements_from_layers(mdl, layers='elset_ties', line_type='TrussElement') # Sets blender.add_nsets_from_layers(mdl, layers=['nset_supports', 'nset_load']) # Materials mdl.add([ Steel(name='mat_steel', fy=355), Concrete(name='mat_concrete', fck=90), ]) # Sections mdl.add([ ShellSection(name='sec_plate', t=0.005), TrussSection(name='sec_tie', A=0.25 * 3.142 * 0.008**2), SolidSection(name='sec_solid'), ]) # Properties mdl.add([ Properties(name='ep_plate1',
rhino.add_nodes_elements_from_layers(mdl, mesh_type='ShellElement', layers=['elset_mesh', 'elset_plates']) rhino.add_nodes_elements_from_layers(mdl, line_type='TrussElement', layers=['elset_tie']) # Sets rhino.add_sets_from_layers(mdl, layers=['nset_pin', 'nset_roller']) # Materials mdl.add([ Concrete(name='mat_concrete', fck=50), Steel(name='mat_steel', fy=460), ]) # Sections mdl.add([ ShellSection(name='sec_planar', t=0.050), TrussSection(name='sec_tie', A=0.0001), ]) # Properties mdl.add([ Properties(name='ep_planar', material='mat_concrete', section='sec_planar',
mdl = Structure(name='mesh_mould', path='C:/Temp/') # Elements rhino.add_nodes_elements_from_layers(mdl, mesh_type='ShellElement', layers=['elset_wall', 'elset_plinth']) # Sets rhino.add_sets_from_layers(mdl, layers=['nset_fixed']) # Materials mdl.add_materials([ Concrete(name='mat_concrete', fck=40), Steel(name='mat_rebar', fy=500, id='r')]) # Sections mdl.add_sections([ ShellSection(name='sec_wall', t=0.150), ShellSection(name='sec_plinth', t=0.300)]) # Properties reb_plinth = { 'p_u1': {'pos': +0.130, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 0}, 'p_u2': {'pos': +0.120, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 90}, 'p_l2': {'pos': -0.120, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 90}, 'p_l1': {'pos': -0.130, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 0}}
# Structure mdl = Structure(name='beam_frame', path='C:/Temp/') # Elements rhino.add_nodes_elements_from_layers(mdl, line_type='BeamElement', layers='elset_lines') # Sets layers = ['nset_pins', 'nset_load_v', 'nset_load_h', 'nset_rollers', 'elset_top'] rhino.add_sets_from_layers(mdl, layers=layers) # Materials mdl.add_material(Steel(name='mat_steel')) # Sections mdl.add_section(PipeSection(name='sec_pipe', r=0.100, t=0.005)) # Properties ep = Properties(name='ep', material='mat_steel', section='sec_pipe', elsets='elset_lines') mdl.add_element_properties(ep) # Displacements mdl.add_displacements([ PinnedDisplacement(name='disp_pins', nodes='nset_pins'), RollerDisplacementXZ(name='disp_rollers', nodes='nset_rollers')])
# Elements rhino.add_nodes_elements_from_layers(mdl, mesh_type='ShellElement', layers=['elset_wall', 'elset_plinth']) # Sets rhino.add_sets_from_layers(mdl, layers=['nset_fixed', 'nset_loads']) # Materials mdl.add([ Concrete(name='mat_concrete', fck=40), Steel(name='mat_rebar', fy=500), ]) # Sections mdl.add([ ShellSection(name='sec_wall', t=0.150), ShellSection(name='sec_plinth', t=0.300), ]) # Properties reb_plinth = { 'p_u1': { 'pos': +0.130, 'spacing': 0.100,
xyz = [[0, 0, 0], [1, 0, 0], [2, 0, 0], [0, 1, 0], [1, 1, 0], [2, 1, 0], [0, 2, 0], [1, 2, 0], [2, 2, 0]] nodes = mdl.add_nodes(xyz) shells = [[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]] shells = [mdl.add_element(shell, 'ShellElement') for shell in shells] # Sets elset_shells = mdl.add_set('elset_shells', 'element', shells) # Materials mdl.add(Steel(name='mat_steel')) # Sections mdl.add(ShellSection(name='sec_shell', t=0.01)) # Properties mdl.add( Properties(name='ep_shell', material='mat_steel', section='sec_shell', elset='elset_shells')) # Displacements
# Elements layers = ['elset_main', 'elset_diag', 'elset_stays'] rhino.add_nodes_elements_from_layers(mdl, line_type='TrussElement', layers=layers) # Sets rhino.add_sets_from_layers(mdl, layers=['nset_pins', 'nset_load_v', 'nset_load_h']) # Materials mdl.add_material(Steel(name='mat_steel', fy=355)) # Sections mdl.add_sections([ TrussSection(name='sec_main', A=0.0008), TrussSection(name='sec_diag', A=0.0005), TrussSection(name='sec_stays', A=0.0001) ]) # Properties mdl.add_element_properties([ Properties(name='ep_main', material='mat_steel', section='sec_main',
# print(mdl.check_node_exists(xyz=[5, 5, 0])) # print(mdl.node_bounds()) # print(mdl.elements[3]) # print(mdl.elements[3].nodes) # print(mdl.element_count()) # print(mdl.element_index) # print(mdl.check_element_exists(nodes=[2, 3])) rhino.add_sets_from_layers(mdl, layers=['supports', 'loads']) # print(mdl.sets['trusses']) # print(mdl.sets['supports']) # print(mdl.sets['loads']) mdl.add(Steel(name='steel', fy=355)) # print(mdl.materials['steel']) mdl.add(TrussSection(name='section', A=0.001)) # print(mdl.sections['section']) mdl.add( ElementProperties(name='property', material='steel', section='section', elset='trusses')) # print(mdl.element_properties['property'])
mdl = Structure(name='truss_frame', path='C:/Temp/') # Elements rhino.add_nodes_elements_from_layers(mdl, line_type='TrussElement', layers='elset_main', pL=A1*p) rhino.add_nodes_elements_from_layers(mdl, line_type='TrussElement', layers='elset_diag', pL=A2*p) rhino.add_nodes_elements_from_layers(mdl, line_type='TrussElement', layers='elset_stays', pL=A3*p) # Sets rhino.add_sets_from_layers(mdl, layers=['nset_pins', 'nset_load_v', 'nset_load_h']) # Materials mdl.add(Steel(name='mat_steel', fy=355, p=p)) # Sections mdl.add([ TrussSection(name='sec_main', A=A1), TrussSection(name='sec_diag', A=A2), TrussSection(name='sec_stays', A=A3), ]) # Properties mdl.add([ Properties(name='ep_main', material='mat_steel', section='sec_main', elset='elset_main'), Properties(name='ep_diag', material='mat_steel', section='sec_diag', elset='elset_diag'), Properties(name='ep_stays', material='mat_steel', section='sec_stays', elset='elset_stays'),