Esempio n. 1
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')])
pts = [rs.PointCoordinates(pt) for pt in pts]
nkeys = []
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',
Esempio n. 3
0
    
# Structure

mdl = Structure(name='beam_bathe', path='C:/Temp/')

# 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
Esempio n. 4
0
mdl = Structure(name='block_tets', path='/home/al/temp/')

# Tetrahedrons

blender.add_tets_from_bmesh(mdl,
                            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
Esempio n. 5
0
# 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',
Esempio n. 6
0
mdl = Structure(name='mesh_strip', path='C:/Temp/')

# Elements

rhino.add_nodes_elements_from_layers(mdl,
                                     mesh_type='ShellElement',
                                     layers='elset_mesh')

# Sets

rhino.add_sets_from_layers(mdl,
                           layers=['nset_left', 'nset_right', 'nset_middle'])

# Materials

mdl.add_material(ElasticIsotropic(name='mat_alu', E=75 * 10**9, v=0.3, p=2700))

# Sections

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

# Properties

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

# Displacements