コード例 #1
0
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([
    PointLoad(name='load_h', nodes='nset_load_h', x=4000),
    PointLoad(name='load_v', nodes='nset_load_v', z=-6000),
])

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_pins', 'disp_rollers']),
    GeneralStep(name='step_loads', loads=['load_h', 'load_v'], iterations=50)])
mdl.steps_order = ['step_bc', 'step_loads']
コード例 #2
0
# Sections

mdl.add_sections([
    ShellSection(name='sec_concrete', t=0.020),
    TrussSection(name='sec_ties', A=0.0004)])

# Properties

mdl.add_element_properties([
    Properties(name='ep_concrete', material='mat_concrete', section='sec_concrete', elsets='elset_concrete'),
    Properties(name='ep_steel', material='mat_steel', section='sec_ties', elsets='elset_ties')])

# Displacements

mdl.add_displacements([
    RollerDisplacementXY(name='disp_roller', nodes='nset_corners'),
    PinnedDisplacement(name='disp_pinned', nodes='nset_corner1'),
    GeneralDisplacement(name='disp_xdof', nodes='nset_corner2', x=0)])
    
# Loads

mesh = mesh_from_guid(Mesh(), rs.ObjectsByLayer('load_mesh')[0])
mdl.add_loads([
    GravityLoad(name='load_gravity', elements='elset_concrete'),
    PrestressLoad(name='load_prestress', elements='elset_ties', sxx=50*10**6),
    TributaryLoad(mdl, name='load_tributary', mesh=mesh, z=-2000)])

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_roller', 'disp_pinned', 'disp_xdof']),
    GeneralStep(name='step_prestress', loads=['load_prestress']),
コード例 #3
0
               section='sec_mushroom',
               elsets=s1),
    Properties(name='ep_bamboo',
               material='mat_bamboo',
               section='sec_bamboo',
               elsets=s2),
    Properties(name='ep_joints',
               material='mat_bamboo',
               section='sec_joints',
               elsets=s3)
])

# Displacements

mdl.add_displacements([
    PinnedDisplacement(name='disp_bot', nodes='supports_bot'),
    RollerDisplacementZ(name='disp_top', nodes='supports_top')
])

# Loads

mdl.add_load(GravityLoad(name='load_gravity', elements=layers))

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_bot', 'disp_top']),
    GeneralStep(name='step_loads', loads=['load_gravity'])
])
mdl.steps_order = ['step_bc', 'step_loads']

# Summary
コード例 #4
0
    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')
])

# Displacements

mdl.add_displacements([
    PinnedDisplacement(name='disp_pins', nodes='pins'),
    RollerDisplacementXZ(name='disp_roller', nodes='middle')
])

# Loads

mdl.add_load(PointLoad(name='load_middle', nodes='middle', z=-500))

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_pins', 'disp_roller']),
    GeneralStep(name='step_load', loads=['load_middle'])
])
mdl.steps_order = ['step_bc', 'step_load']

# Summary`
コード例 #5
0
    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,
                        xx=0),
    GeneralDisplacement(name='disp_left', nodes='nset_left', yy=30 * deg),
])

# Loads

mdl.add_load(PointLoad(name='load_weights', nodes='nset_weights', z=-200.0))

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc',
                displacements=['disp_bc_left', 'disp_bc_right']),
    GeneralStep(name='step_load',
コード例 #6
0
               section='sec_mesh',
               elsets='elset_mesh'),
    Properties(name='ep_steel',
               material='mat_steel',
               section='sec_ties',
               elsets='elset_ties'),
    Properties(name='ep_ends',
               material='mat_steel',
               section='sec_ends',
               elsets='elset_ends')
])

# Displacements

mdl.add_displacements([
    RollerDisplacementY(name='disp_top', nodes='nset_top'),
    RollerDisplacementY(name='disp_bot', nodes='nset_bot')
])
displacements = ['disp_top', 'disp_bot']

# Loads

mdl.add_load(GravityLoad(name='load_gravity', elements='elset_mesh'))
loads = ['load_gravity', 'load_points']

Gc = 2400 * 9.81
mesh = mesh_from_guid(Mesh(), rs.ObjectsByLayer('elset_mesh')[0])
surface = rs.ObjectsByLayer('surface')[0]
point_loads = {}

for key in mesh.vertices():
    xyz = mesh.vertex_coordinates(key)
コード例 #7
0
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

mdl.add_displacements([
    PinnedDisplacement(name='disp_left', nodes='nset_left'),
    RollerDisplacementX(name='disp_right', nodes='nset_right'),
    GeneralDisplacement(name='disp_stability', nodes='nset_stability', y=0),
    GeneralDisplacement(name='disp_middle', nodes='nset_middle', z=0.200)
])

# Loads

mdl.add_load(GravityLoad(name='load_gravity', elements='elset_mesh'))

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_left', 'disp_right']),
    GeneralStep(name='step_load',
                loads=['load_gravity'],
                displacements=['disp_middle'])
])
コード例 #8
0
# Sections

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

# Properties

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

# Displacements

mdl.add_displacements([
    PinnedDisplacement(name='disp_left', nodes='nset_left'),
    RollerDisplacementX(name='disp_right', nodes='nset_right')
])

# Loads

mdl.add_load(PointLoad(name='load_point', nodes='nset_load', y=100, z=-300))

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_left', 'disp_right']),
    GeneralStep(name='step_load',
                loads=['load_point'],
                tolerance=1,
                iterations=500)
])