예제 #1
0
name = 'shell_example'
s = Structure(name=name, path=compas_fea.TEMP)
shell_keys = s.add_nodes_elements_from_mesh(mesh, element_type='ShellElement')
s.add_set('shell', 'element', shell_keys)

# add supports from rhino layer-------------------------------------------------

pts = rs.ObjectsByLayer('pts')
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'])
예제 #2
0
# 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

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_fixed']),
    GeneralStep(name='step_load', loads=['load_point'])])
mdl.steps_order = ['step_bc', 'step_load']

# Summary

mdl.summary()
예제 #3
0
# 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

mdl.add_load(PointLoad(name='load_top', nodes='top', y=1000, z=1000))

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_pinned']),
    GeneralStep(name='step_load', loads=['load_top'])
])
mdl.steps_order = ['step_bc', 'step_load']

# Summary
예제 #4
0
# 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

mdl.add_load(PointLoad(name='load_top', nodes='nset_top', z=-100000))

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements='disp_pinned'),
    GeneralStep(name='step_load', loads='load_top', nlmat=False)
])
mdl.steps_order = ['step_bc', 'step_load']

# Summary
예제 #5
0
# 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_displacement(
            GeneralDisplacement(name=name, nodes=name, y=0, z=0, xx=0))
    if 'Y' in beam:
        mdl.add_displacement(
            GeneralDisplacement(name=name, nodes=name, x=0, z=0, yy=0))
    bc.append(name)
mdl.add_displacement(
    GeneralDisplacement(name='disp_lift', nodes='lift_points', z=0.250))

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=bc),
    GeneralStep(name='step_lift', displacements=['disp_lift'])
])
mdl.steps_order = ['step_bc', 'step_lift']
예제 #6
0
               material='mat_steel',
               section='sec_plate',
               elsets=['elset_top_plate', 'elset_bot_plate']),
    Properties(name='ep_ties',
               material='mat_steel',
               section='sec_tie',
               elsets='elset_ties'),
    Properties(name='ep_concrete',
               material='mat_concrete',
               section='sec_solid',
               elsets='elset_tets')
])

# Displacements

mdl.add_displacement(
    RollerDisplacementY(name='disp_rollers', nodes='nset_supports'))

# Loads

mdl.add_loads([
    GravityLoad(name='load_gravity', elements='elset_tets'),
    PointLoad(name='load_point', nodes='nset_load', z=-5)
])

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_rollers']),
    GeneralStep(name='step_loads',
                loads=['load_gravity', 'load_point'],
                factor=1.35)