mdl.add_set(name='nset_top', type='node', selection=nodes_top) mdl.add_set(name='nset_bot', type='node', selection=nodes_bot) # Materials mdl.add([ Concrete(name='mat_concrete', fck=90), Steel(name='mat_steel', fy=355), ]) # Sections mdl.add([ ShellSection(name='sec_mesh', t=0.004), TrussSection(name='sec_ties', A=0.25 * pi * 0.010**2), RectangularSection(name='sec_ends', b=0.030, h=0.030), ]) # Properties mdl.add([ Properties(name='ep_mesh', material='mat_concrete', section='sec_mesh', elset='elset_mesh'), Properties(name='ep_ties', material='mat_steel', section='sec_ties', elset='elset_ties'), Properties(name='ep_ends', material='mat_steel',
# Elements rhino.add_nodes_elements_from_layers(mdl, line_type='BeamElement', layers='elset_lines') # Sets rhino.add_sets_from_layers(mdl, layers=['nset_support', 'nset_load']) # Materials mdl.add_material(ElasticIsotropic(name='mat_elastic', E=10**7, v=0.0001, p=1)) # Sections mdl.add_section(RectangularSection(name='sec_rect', b=1, h=1)) # Properties ep = Properties(name='ep', material='mat_elastic', section='sec_rect', elsets='elset_lines') mdl.add_element_properties(ep) # Displacements mdl.add_displacement(FixedDisplacement(name='disp_fixed', nodes='nset_support')) # Loads mdl.add_load(PointLoad(name='load_point', nodes='nset_load', z=600)) # Steps
'struts_mushroom', 'struts_bamboo', 'joints_mushroom', 'joints_bamboo', 'joints_grid' ] rhino.add_nodes_elements_from_layers(mdl, line_type='BeamElement', layers=layers) # Sets rhino.add_sets_from_layers(mdl, layers=['supports_bot', 'supports_top']) # Sections mdl.add_sections([ TrapezoidalSection(name='sec_mushroom', b1=0.001, b2=0.150, h=0.225), RectangularSection(name='sec_bamboo', b=0.020, h=0.100), RectangularSection(name='sec_joints', b=0.020, h=0.075) ]) # Materials fm = [i * 10000 for i in [5, 9, 12, 14, 16, 18, 19, 20, 21, 22]] em = [0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09] mdl.add_materials([ ElasticIsotropic(name='mat_bamboo', E=20 * 10**9, v=0.35, p=1100), ElasticPlastic(name='mat_mushroom', E=5 * 10**6, v=0.30, p=350, f=fm, e=em) ]) # Properties s1 = ['struts_mushroom', 'joints_mushroom']
rhino.add_nodes_elements_from_layers(mdl, line_type='BeamElement', layers='elset_beams') # Sets rhino.add_sets_from_layers(mdl, layers=['nset_support', 'nset_load']) # Materials mdl.add(ElasticIsotropic(name='mat_elastic', E=10**7, v=10**(-5), p=1)) # Sections mdl.add(RectangularSection(name='sec_beam', b=1, h=1)) # Properties mdl.add( Properties(name='ep_beam', material='mat_elastic', section='sec_beam', elset='elset_beams')) # Displacements mdl.add(FixedDisplacement(name='disp_fixed', nodes='nset_support')) # Loads
MPa = 10**6 GPa = 10**9 mdl.add([ ElasticPlastic(name='mat_1', E=100*GPa, v=0.3, p=1, f=[100*MPa, 100*MPa], e=[0, 1]), ElasticPlastic(name='mat_2', E=150*GPa, v=0.3, p=1, f=[150*MPa, 150*MPa], e=[0, 1]), ElasticPlastic(name='mat_3', E=200*GPa, v=0.3, p=1, f=[900*MPa, 900*MPa], e=[0, 1]), ]) # Sections mdl.add([ SolidSection(name='sec_solid'), ShellSection(name='sec_membrane', t=0.002), RectangularSection(name='sec_rectangle', b=0.002, h=0.002), ]) # Properties rebar = { 'top': {'pos': +0.001, 'spacing': 0.010, 'material': 'mat_3', 'dia': 0.002, 'angle': 0}, 'bot': {'pos': -0.001, 'spacing': 0.010, 'material': 'mat_3', 'dia': 0.002, 'angle': 90}, } mdl.add([ Properties(name='ep_solid_4', material='mat_2', section='sec_solid', elset='elset_blocks_layer_4'), Properties(name='ep_solid_3', material='mat_1', section='sec_solid', elset='elset_blocks_layer_3'), Properties(name='ep_solid_2', material='mat_2', section='sec_solid', elset='elset_blocks_layer_2'), Properties(name='ep_solid_1', material='mat_1', section='sec_solid', elset='elset_blocks_layer_1'), Properties(name='ep_solid_0', material='mat_2', section='sec_solid', elset='elset_blocks_layer_0'),
xyzs = [network.vertex_coordinates(i) for i in network.leaves()] ends = [mdl.check_node_exists(i) for i in xyzs] mdl.add_set('{0}_ends'.format(beam), type='node', selection=ends) # Sets rhino.add_sets_from_layers(mdl, layers=['lift_points'] + beams) # Materials mdl.add_material( ElasticIsotropic(name='mat_elastic', E=5 * 10**9, v=0.3, p=1000)) # Sections mdl.add_section(RectangularSection(name='sec_rectangular', h=0.005, b=0.005)) # Properties ep = Properties(name='ep', material='mat_elastic', section='sec_rectangular', elsets=beams) mdl.add_element_properties(ep) # Displacements bc = [] for beam in beams: name = '{0}_ends'.format(beam) if 'X' in beam:
mdl.add_set(name='nset_edges', type='node', selection=edges) # Materials mdl.add([ Concrete(name='mat_concrete', fck=90, fr=[1.16, 0.15]), Stiff(name='mat_stiff', E=10**12), Steel(name='mat_steel', fy=355), ]) # Sections mdl.add([ ShellSection(name='sec_ribs', t=0.020), ShellSection(name='sec_vault', t=0.050), RectangularSection(name='sec_stiff', b=1, h=1), TrussSection(name='sec_ties', A=pi*0.25*0.030**2), ]) # Properties mdl.add([ Properties(name='ep_ribs', material='mat_concrete', section='sec_ribs', elset='elset_ribs'), Properties(name='ep_vault', material='mat_concrete', section='sec_vault', elset='elset_vault'), Properties(name='ep_stiff', material='mat_stiff', section='sec_stiff', elset='elset_stiff'), Properties(name='ep_ties', material='mat_steel', section='sec_ties', elset='elset_ties'), ]) # Displacements mdl.add([
xyz = [[0, 0, 0], [1, 0, 0]] nodes = mdl.add_nodes(xyz) beam = mdl.add_element(nodes, 'BeamElement', axes={'ex': [0, 1, 0]}) # Sets elset_beams = mdl.add_set('elset_beams', 'element', [beam]) # Materials mdl.add(Steel(name='mat_steel')) # Sections mdl.add(RectangularSection(name='sec_pipe', b=0.05, h=0.1)) # Properties mdl.add( Properties(name='ep_beam', material='mat_steel', section='sec_pipe', elset='elset_beams')) # Displacements mdl.add(FixedDisplacement(name='disp_pins', nodes=[0])) # Loads
# Elements layers = ['beams', 'shell'] rhino.add_nodes_elements_from_layers(mdl, line_type='BeamElement', mesh_type='ShellElement', layers=layers) # Sets rhino.add_sets_from_layers(mdl, layers=['supports']) # Materials mdl.add(ElasticIsotropic(name='mat_1', E=20*10**9, v=0.3, p=1500)) mdl.add(ElasticIsotropic(name='mat_2', E=30*10**9, v=0.3, p=1500)) # Sections mdl.add(RectangularSection(name='bsec', b=0.1, h=.2)) mdl.add(Properties(name='ep_1', material='mat_1', section='bsec', elsets=['beams'])) mdl.add(ShellSection(name='ssec', t=.1)) mdl.add(Properties(name='ep_2', material='mat_2', section='ssec', elsets=['shell'])) # Displacements mdl.add([FixedDisplacement(name='supports', nodes='supports')]) # Loads mdl.add(GravityLoad(name='load_gravity', elements=['beams', 'shell'])) # Steps