示例#1
0
# 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')])

# Loads

mdl.add_loads([
示例#2
0
# 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
for pt in pts:
    nkeys.append(s.check_node_exists(pt))
s.add_set(name='support_nodes', type='NODE', selection=nkeys)
supppots = FixedDisplacement(name='supports', nodes='support_nodes')
s.add_displacement(supppots)

# add materials and sections -----------------------------------------------
E = 40 * 10**9
v = .02
p = 2400
thickness = .02
matname = 'concrete'
concrete = ElasticIsotropic(name=matname, E=E, v=v, p=p)
s.add_material(concrete)
section = ShellSection(name='concrete_sec', t=thickness)
s.add_section(section)
prop = ElementProperties(name='floor',
                         material=matname,
                         section='concrete_sec',
                         elsets=['shell'])
s.add_element_properties(prop)

# add gravity load -------------------------------------------------------------

s.add_load(GravityLoad(name='load_gravity', elements=['shell']))

# add steps --------------------------------------------------------------------

step = GeneralStep(name='gravity_step',
                   nlgeom=False,
                   displacements=['supports'],
示例#4
0
                                       layers=[0])

# Sets

blender.add_elset_from_bmeshes(mdl, layer=0, name='elset_struts')
blender.add_nset_from_objects(mdl, layer=1, name='nset_pins')
blender.add_nset_from_objects(mdl, layer=2, name='nset_top')

# Materials

mdl.add_material(
    ElasticIsotropic(name='mat_elastic', E=200 * 10**9, v=0.3, p=7850))

# Sections

mdl.add_section(TrussSection(name='sec_truss', A=0.00010))

# Properties

ep = Properties(name='ep_strut',
                material='mat_elastic',
                section='sec_truss',
                elsets='elset_struts')
mdl.add_element_properties(ep)

# Displacements

mdl.add_displacement(PinnedDisplacement(name='disp_pinned', nodes='nset_pins'))

# Loads
                            name='elset_tets',
                            bmesh=get_objects(layer=0)[0])

# Sets

blender.add_nset_from_bmeshes(mdl, layer=1, name='base')
blender.add_nset_from_bmeshes(mdl, layer=2, name='top')

# Materials

mdl.add_material(
    ElasticIsotropic(name='mat_elastic', E=100 * 10**9, v=0.3, p=1))

# Sections

mdl.add_section(SolidSection(name='sec_solid'))

# Properties

mdl.add_element_properties(
    Properties(name='ep_tets',
               material='mat_elastic',
               section='sec_solid',
               elsets='elset_tets'))

# Displacementss

mdl.add_displacement(PinnedDisplacement(name='disp_pinned', nodes='base'))

# Loads
springs = [
    'spring_bot_left', 'spring_bot_right', 'spring_top_left',
    'spring_top_right'
]
rhino.add_nodes_elements_from_layers(mdl,
                                     line_type='SpringElement',
                                     layers=springs)

# Sets

rhino.add_sets_from_layers(mdl, layers=['pins', 'middle'])

# Sections

mdl.add_section(
    SpringSection(name='spring_elastic', stiffness={'axial': 10000}))
mdl.add_section(SpringSection(name='spring_soft', stiffness={'axial': 1000}))

# Properties

mdl.add_element_properties([
    Properties(name='ep_bl',
               section='spring_elastic',
               elsets='spring_bot_left'),
    Properties(name='ep_br', section='spring_soft', elsets='spring_bot_right'),
    Properties(name='ep_tl',
               section='spring_elastic',
               elsets='spring_top_left'),
    Properties(name='ep_tr',
               section='spring_elastic',
               elsets='spring_top_right')
示例#7
0
rhino.add_nodes_elements_from_layers(mdl,
                                     mesh_type='ShellElement',
                                     layers='elset_mesh')

# Sets

rhino.add_sets_from_layers(mdl, layers=['nset_corners'])

# Materials

mdl.add_material(
    ElasticIsotropic(name='mat_elastic', E=100 * 10**9, v=0.3, p=1000))

# Sections

mdl.add_section(ShellSection(name='sec_plate', t=0.010))

# Properties

ep = Properties(name='ep_plate',
                material='mat_elastic',
                section='sec_plate',
                elsets='elset_mesh')
mdl.add_element_properties(ep)

# Displacements

mdl.add_displacement(
    PinnedDisplacement(name='disp_pinned', nodes='nset_corners'))

# Loads
示例#8
0
# Materials

mdl.add_material(
    ElasticIsotropic(name='mat_elastic', E=20 * 10**9, v=0.3, p=1500))

# Sections

_, ekeys, L, Lt = rhino.ordered_network(mdl,
                                        network=network,
                                        layer='nset_left')
for ekey, Li in zip(ekeys, L):
    ri = (1 + Li / Lt) * 0.020
    sname = 'sec_{0}'.format(ekey)
    pname = 'ep_{0}'.format(ekey)
    ename = 'element_{0}'.format(ekey)
    mdl.add_section(CircularSection(name=sname, r=ri))
    ep = Properties(name=pname,
                    material='mat_elastic',
                    section=sname,
                    elsets=ename)
    mdl.add_element_properties(ep)

# Displacements

deg = pi / 180
mdl.add_displacements([
    PinnedDisplacement(name='disp_bc_left', nodes='nset_left'),
    GeneralDisplacement(name='disp_bc_right',
                        nodes='nset_right',
                        y=0,
                        z=0,
示例#9
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:
示例#10
0
# print('Element index: ', mdl.element_index)
# print('Check element with nodes 1-4: ', mdl.check_element_exists([1, 4]))
# print('Check element with nodes 0-1: ', mdl.check_element_exists([0, 1]))

# Add sets

mdl.add_set(name='nset_base', type='node', selection=[0, 1, 2, 3])
mdl.add_set(name='nset_top', type='node', selection=[4])
mdl.add_set(name='elset_beams', type='element', selection=[0, 1, 2, 3])
mdl.add_set(name='elset_shell', type='element', selection=[4])

# print('Structure sets: ', mdl.sets)

# Add sections

mdl.add_section(CircularSection(name='sec_circ', r=0.010))
mdl.add_section(ShellSection(name='sec_shell', t=0.005))

# print('Section geometry: ', mdl.sections['sec_circ'].geometry)

# Add materials

mdl.add_material(
    ElasticIsotropic(name='mat_elastic', E=10 * 10**9, v=0.3, p=1500))

# print('Material E: ', mdl.materials['mat_elastic'].E)

# Add element properties

ep1 = Properties(name='ep_circ',
                 material='mat_elastic',