Пример #1
0
# 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'],
                   loads=['load_gravity'],
                   type='static')

s.add_steps([step])
Пример #2
0
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([
    PointLoad(name='load_h', nodes='nset_load_h', x=4000),
    PointLoad(name='load_v', nodes='nset_load_v', z=-6000),
])

# Steps
Пример #3
0
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

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

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_pinned']),
Пример #4
0
reb_plinth = {
    'p_u1': {'pos': +0.130, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 0},
    'p_u2': {'pos': +0.120, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 90},
    'p_l2': {'pos': -0.120, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 90},
    'p_l1': {'pos': -0.130, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 0}}

reb_wall = {
    'w_u1': {'pos': +0.055, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 0},
    'w_u2': {'pos': +0.045, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 90},
    'w_l2': {'pos': -0.045, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 90},
    'w_l1': {'pos': -0.055, 'spacing': 0.100, 'material': 'mat_rebar', 'dia': 0.010, 'angle': 0}}

mdl.add_element_properties([
    Properties(name='ep_plinth', material='mat_concrete', section='sec_plinth', 
               elsets='elset_plinth', reinforcement=reb_plinth),
    Properties(name='ep_wall', material='mat_concrete', section='sec_wall',
               elsets='elset_wall', reinforcement=reb_wall)])

# Displacements

mdl.add_displacement(FixedDisplacement(name='disp_fixed', nodes='nset_fixed'))

# Loads

mdl.add_load(GravityLoad(name='load_gravity', elements=['elset_wall', 'elset_plinth']))
components = {}
for guid in rs.ObjectsByLayer('nset_loads'):
    px, py, pz = rs.ObjectName(guid).split(' ')
    components[mdl.check_node_exists(rs.PointCoordinates(guid))] = {'z': float(pz)*100}
mdl.add_load(PointLoads(name='load_points', components=components))
Пример #5
0
    ElasticIsotropic(name='mat_bamboo', E=20 * 10**9, v=0.35, p=1100),
    ElasticPlastic(name='mat_mushroom', E=5 * 10**6, v=0.30, p=350, f=fm, e=em)
])

# Properties

s1 = ['struts_mushroom', 'joints_mushroom']
s2 = ['struts_bamboo', 'joints_bamboo']
s3 = ['joints_grid']
mdl.add_element_properties([
    Properties(name='ep_mushroom',
               material='mat_mushroom',
               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
Пример #6
0
# Materials

mdl.add_materials([
    Concrete(name='mat_concrete', fck=90),
    Steel(name='mat_steel', fy=355)])

# 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),
Пример #7
0
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')
])

# Displacements

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

# Loads
Пример #8
0
mdl.add_sections([
    ShellSection(name='sec_plate', t=0.005),
    TrussSection(name='sec_tie', A=0.25 * 3.142 * 0.008**2),
    SolidSection(name='sec_solid')
])

# Properties

mdl.add_element_properties([
    Properties(name='ep_plates',
               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([
Пример #9
0
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',
               elsets='elset_main'),
    Properties(name='ep_diag',
               material='mat_steel',
               section='sec_diag',
               elsets='elset_diag'),
    Properties(name='ep_stays',
               material='mat_steel',
               section='sec_stays',
               elsets='elset_stays')
])

# Displacements

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

# Loads
# Note: GravityLoad doesnt activate for OpenSees

mdl.add_loads([