Exemplo n.º 1
0
# Weld

rhino.weld_meshes_from_layer(layer_input='mesh_discretised',
                             layer_output='mesh_welded')

# Tetrahedrons

mesh = rs.ObjectsByLayer('mesh_welded')[0]
rhino.add_tets_from_mesh(mdl, name='mesh_tets', mesh=mesh, volume=0.02)

#print(len(mdl.sets['mesh_tets'].selection))

# Analyse

zmin, zmax = mdl.node_bounds()[2]
nodes_top = [i for i, node in mdl.nodes.items() if node.z > zmax - 0.010]
nodes_bot = [i for i, node in mdl.nodes.items() if node.z < zmin + 0.010]

mdl.add_set(name='nset_top', type='node', selection=nodes_top)
mdl.add_set(name='nset_bot', type='node', selection=nodes_bot)

#print(mdl.sets['nset_top'])
#print(mdl.sets['nset_bot'])

mdl.add([
    ElasticIsotropic(name='mat_elastic', E=50 * 10**9, v=0.3, p=1),
    SolidSection(name='sec_solid'),
    ElementProperties(name='ep_tets',
                      material='mat_elastic',
                      section='sec_solid',
Exemplo n.º 2
0
# Elements

rhino.add_nodes_elements_from_layers(mdl,
                                     mesh_type='ShellElement',
                                     layers='elset_mesh')
rhino.add_nodes_elements_from_layers(mdl,
                                     line_type='TrussElement',
                                     layers='elset_ties')
rhino.add_nodes_elements_from_layers(mdl,
                                     line_type='BeamElement',
                                     layers='elset_ends')

# Sets

ymin, ymax = mdl.node_bounds()[1]
nodes_top = [i for i, node in mdl.nodes.items() if node.y > ymax - 0.01]
nodes_bot = [i for i, node in mdl.nodes.items() if node.y < ymin + 0.01]
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([