def modal(geom_file, num_modes, path):
    # add shell elements from mesh ---------------------------------------------
    with open(geom_file, 'rb') as fh:
        geom_data = json.load(fh)
    mesh = Mesh.from_data(geom_data['mesh'])
    s = structure.Structure()
    s.add_nodes_elements_from_mesh(mesh, element_type='ShellElement')

    # add displacements --------------------------------------------------------
    pts = geom_data['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 -----------------------------------------------
    E35 = 35 * 10**9
    concrete = ElasticIsotropic(name='MAT_CONCRETE', E=E35, v=0.2, p=2400)
    s.add_material(concrete)
    section = ShellSection(name='SEC_CONCRETE', t=0.020)
    s.add_section(section)
    prop = ElementProperties(type='SHELL', material='MAT_CONCRETE', section='SEC_CONCRETE', elsets=['ELSET_ALL'])
    s.add_element_properties(prop)

    # add modal step -----------------------------------------------------------

    step = ModalStep(name='modal_analysis', displacements=['supports'], num_modes=num_modes)
    s.add_step(step)
    fnm = path + 'modal.inp'
    ansys.inp_generate(s, filename=fnm)
    # temp = path + '_Temp/'
    s.analyse(path=path, name='modal.inp', temp=None, software='ansys')
    return s
예제 #2
0
def harmonic_pressure(mesh, pts, freq_list, path, name, damping):
    # add shell elements from mesh ---------------------------------------------
    s = structure.Structure()
    s.add_nodes_elements_from_mesh(mesh, element_type='ShellElement')
    s.add_set(name='all_elements', type='element', selection=s.elements.keys())

    # add virtual elements -----------------------------------------------------

    for fkey in list(mesh.faces()):
        face = [
            s.check_node_exists(mesh.vertex_coordinates(i))
            for i in mesh.face[fkey]
        ]
        s.add_virtual_element(nodes=face, type='FaceElement')

    # add displacements --------------------------------------------------------
    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 -----------------------------------------------
    E35 = 35 * 10**9
    concrete = ElasticIsotropic(name='MAT_CONCRETE', E=E35, v=0.2, p=2400)
    s.add_material(concrete)
    section = ShellSection(name='SEC_CONCRETE', t=0.020)
    s.add_section(section)
    prop = ElementProperties(name='shell_props',
                             material='MAT_CONCRETE',
                             section='SEC_CONCRETE',
                             elsets=['all_elements'])
    s.add_element_properties(prop)

    # add loads ----------------------------------------------------------------

    load = HarmonicPressureLoad(name='pressureload',
                                elements=['virtual_elements'],
                                pressure=3.,
                                phase=math.pi / 2.)
    s.add_load(load)

    # add modal step -----------------------------------------------------------
    step = HarmonicStep(name='harmonic_analysis',
                        displacements=['supports'],
                        loads=['pressureload'],
                        freq_list=freq_list,
                        damping=damping)
    s.add_step(step)
    s.set_steps_order(['harmonic_analysis'])

    # analysis -----------------------------------------------------------------
    s.path = path
    s.name = name
    fields = ['all']
    s.write_input_file('ansys', fields=fields)
    s.analyse(software='ansys', cpus=4)
    s.extract_data(software='ansys', fields=fields, steps='last')
    return s
예제 #3
0
def harmonic(geom_file, freq_range, freq_steps, damping):
    # add shell elements from mesh ---------------------------------------------
    with open(geom_file, 'rb') as fh:
        geom_data = json.load(fh)
    mesh = Mesh.from_data(geom_data['mesh'])
    s = structure.Structure()
    s.add_nodes_elements_from_mesh(mesh, element_type='ShellElement')

    # add displacements --------------------------------------------------------
    pts = geom_data['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 -----------------------------------------------
    E35 = 35 * 10**9
    concrete = ElasticIsotropic(name='MAT_CONCRETE', E=E35, v=0.2, p=2400)
    s.add_material(concrete)
    section = ShellSection(name='SEC_CONCRETE', t=0.020)
    s.add_section(section)
    prop = ElementProperties(type='SHELL',
                             material='MAT_CONCRETE',
                             section='SEC_CONCRETE',
                             elsets=['ELSET_ALL'])
    s.add_element_properties(prop)

    # add loads ----------------------------------------------------------------
    f_pts = geom_data['f_pts']
    nodes = [s.check_node_exists(pt) for pt in f_pts]
    s.add_set(name='load_nodes', type='NODE', selection=nodes)
    load = PointLoad(name='hload',
                     nodes='load_nodes',
                     x=0,
                     y=0,
                     z=1,
                     xx=0,
                     yy=0,
                     zz=0)
    s.add_load(load)

    # add modal step -----------------------------------------------------------
    step = HarmonicStep(name='harmonic_analysis',
                        displacements=['supports'],
                        loads=['hload'],
                        freq_range=freq_range,
                        freq_steps=freq_steps,
                        damping=damping)
    s.add_step(step)
    fnm = path + 'harmonic.inp'
    ansys.inp_generate(s, filename=fnm)
    # temp = path+'_Temp/'
    s.analyse(path=path, name='harmonic.inp', temp=None, software='ansys')
    return s
예제 #4
0
def harmonic(mesh, pts, lpts, freq_range, freq_steps, damping, path, filename):
    # add shell elements from mesh ---------------------------------------------
    s = structure.Structure()
    s.add_nodes_elements_from_mesh(mesh, element_type='ShellElement')

    # add displacements --------------------------------------------------------
    nkeys = []
    for pt in pts:
        nkeys.append(s.check_node_exists(pt))
    s.add_set(name='support_nodes', type='NODE', selection=nkeys)
    supports = PinnedDisplacement(name='supports', nodes='support_nodes')
    s.add_displacement(supports)

    # add materials and sections -----------------------------------------------
    E35 = 35 * 10**9
    concrete = ElasticIsotropic(name='MAT_CONCRETE', E=E35, v=0.2, p=2400)
    s.add_material(concrete)
    section = ShellSection(name='SEC_CONCRETE', t=0.050)
    s.add_section(section)
    prop = ElementProperties(material='MAT_CONCRETE',
                             section='SEC_CONCRETE',
                             elsets=['ELSET_ALL'])
    s.add_element_properties(prop)

    # add loads ----------------------------------------------------------------
    nkeys = []
    for lpt in lpts:
        nkeys.append(s.check_node_exists(lpt))
    load = HarmonicPointLoad(name='harmonic_load', nodes=nkeys, z=-1)
    s.add_load(load)

    # add modal step -----------------------------------------------------------
    step = HarmonicStep(name='harmonic_analysis',
                        displacements=['supports'],
                        loads=['harmonic_load'],
                        freq_range=freq_range,
                        freq_steps=freq_steps,
                        damping=damping)
    s.add_step(step)
    fnm = path + filename
    ansys.inp_generate(s, filename=fnm, output_path=path)
    s.analyse(path=path, name=filename, fields=None, software='ansys')
    return s
예제 #5
0
def modal(mesh, pts, num_modes, path, name):
    # add shell elements from mesh ---------------------------------------------
    s = structure.Structure(name=name, path=path)
    s.add_nodes_elements_from_mesh(mesh, element_type='ShellElement')

    # add displacements --------------------------------------------------------
    nkeys = []
    for pt in pts:
        nkeys.append(s.check_node_exists(pt))
    s.add_set(name='support_nodes', type='NODE', selection=nkeys)
    supports = PinnedDisplacement(name='supports', nodes='support_nodes')
    s.add_displacement(supports)

    # add materials and sections -----------------------------------------------
    E35 = 35 * 10**9
    concrete = ElasticIsotropic(name='MAT_CONCRETE', E=E35, v=0.2, p=2400)
    s.add_material(concrete)
    section = ShellSection(name='SEC_CONCRETE', t=0.050)
    s.add_section(section)
    prop = ElementProperties(material='MAT_CONCRETE',
                             section='SEC_CONCRETE',
                             elsets=['ELSET_ALL'])
    s.add_element_properties(prop)

    # add modal step -----------------------------------------------------------

    step = ModalStep(name='modal_analysis',
                     displacements=['supports'],
                     modes=num_modes)
    s.add_step(step)
    s.set_steps_order(['modal_analysis'])

    # analyse ------------------------------------------------------------------
    fields = 'all'
    s.write_input_file(software='ansys', fields=fields)
    s.analyse(software='ansys', cpus=4)
    s.extract_data(software='ansys', fields=fields, steps='last')
    return s
예제 #6
0
rhino.add_nodes_elements_from_layers(mdl,
                                     mesh_type='ShellElement',
                                     layers='elset_mesh')

# Sets

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

# Materials

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

# Sections

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

# Properties

mdl.add(
    Properties(name='ep_plate',
               material='mat_elastic',
               section='sec_plate',
               elset='elset_mesh'))

# Displacements

mdl.add([
    PinnedDisplacement(name='disp_left', nodes='nset_left'),
    RollerDisplacementX(name='disp_right', nodes='nset_right'),
])
예제 #7
0
rhino.add_nodes_elements_from_layers(mdl, mesh_type='ShellElement', layers=['elset_wall', 'elset_plinth'])

# Sets

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

# Materials

mdl.add_materials([
    Concrete(name='mat_concrete', fck=40),
    Steel(name='mat_rebar', fy=500, id='r')])

# Sections

mdl.add_sections([
    ShellSection(name='sec_wall', t=0.150),
    ShellSection(name='sec_plinth', t=0.300)])

# Properties

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}}
예제 #8
0
nodes_top = [i for i, node in mdl.nodes.items() if node.y > ymax - 0.01]
nodes_bot = [i for i, node in mdl.nodes.items() if node.y < ymin + 0.01]
mdl.add_set(name='nset_top', type='node', selection=nodes_top)
mdl.add_set(name='nset_bot', type='node', selection=nodes_bot)

# Materials

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

# Sections

mdl.add([
    ShellSection(name='sec_mesh', t=0.004),
    TrussSection(name='sec_ties', A=0.25 * pi * 0.010**2),
    RectangularSection(name='sec_ends', b=0.030, h=0.030),
])

# Properties

mdl.add([
    Properties(name='ep_mesh',
               material='mat_concrete',
               section='sec_mesh',
               elset='elset_mesh'),
    Properties(name='ep_ties',
               material='mat_steel',
               section='sec_ties',
               elset='elset_ties'),
예제 #9
0
# 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('Set: nset_base: ', mdl.sets['nset_base'])
# print('Set: elset_shell: ', mdl.sets['elset_shell'])

# Add sections

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

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

# Add materials

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

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

# Add element properties

mdl.add([
    Properties(name='ep_circ',
               material='mat_elastic',
# Elements

rhino.add_nodes_elements_from_layers(mdl, mesh_type='ShellElement', layers='elset_concrete', pA=100)
rhino.add_nodes_elements_from_layers(mdl, mesh_type='MassElement', layers='elset_mass',pA=1000)

# Sets

rhino.add_sets_from_layers(mdl, layers='nset_pins')

# Materials

mdl.add(ElasticIsotropic(name='mat_concrete', E=40*10**9, v=0.2, p=2400))

# Sections

mdl.add([ShellSection(name='sec_concrete', t=0.250),
        MassSection(name='sec_mass')])

# Properties

mdl.add([Properties(name='ep_concrete', material='mat_concrete', section='sec_concrete', elset='elset_concrete'),
        Properties(name='ep_mass', section='sec_mass', elset='elset_mass')])

# Displacements

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

# Steps

mdl.add([
    GeneralStep(name='step_bc', displacements=['disp_pinned']),
예제 #11
0
nodes = mdl.add_nodes(xyz)
shells = [[0, 1, 4, 3], [1, 2, 5, 4], [3, 4, 7, 6], [4, 5, 8, 7]]

shells = [mdl.add_element(shell, 'ShellElement') for shell in shells]

# Sets

elset_shells = mdl.add_set('elset_shells', 'element', shells)

# Materials

mdl.add(Steel(name='mat_steel'))

# Sections

mdl.add(ShellSection(name='sec_shell', t=0.01))

# Properties

mdl.add(
    Properties(name='ep_shell',
               material='mat_steel',
               section='sec_shell',
               elset='elset_shells'))

# Displacements

mdl.add(FixedDisplacement(name='disp_pins', nodes=[0, 2, 8, 6]))

# Loads
예제 #12
0
# Materials

MPa = 10**6
GPa = 10**9

mdl.add([
    ElasticPlastic(name='mat_1', E=100*GPa, v=0.3, p=1, f=[100*MPa, 100*MPa], e=[0, 1]),
    ElasticPlastic(name='mat_2', E=150*GPa, v=0.3, p=1, f=[150*MPa, 150*MPa], e=[0, 1]),
    ElasticPlastic(name='mat_3', E=200*GPa, v=0.3, p=1, f=[900*MPa, 900*MPa], e=[0, 1]),
])

# Sections

mdl.add([
    SolidSection(name='sec_solid'),
    ShellSection(name='sec_membrane', t=0.002),
    RectangularSection(name='sec_rectangle', b=0.002, h=0.002),
])

# Properties

rebar = {
    'top': {'pos': +0.001, 'spacing': 0.010, 'material': 'mat_3', 'dia': 0.002, 'angle': 0},
    'bot': {'pos': -0.001, 'spacing': 0.010, 'material': 'mat_3', 'dia': 0.002, 'angle': 90},
}

mdl.add([
    Properties(name='ep_solid_4', material='mat_2', section='sec_solid', elset='elset_blocks_layer_4'),
    Properties(name='ep_solid_3', material='mat_1', section='sec_solid', elset='elset_blocks_layer_3'),
    Properties(name='ep_solid_2', material='mat_2', section='sec_solid', elset='elset_blocks_layer_2'),
    Properties(name='ep_solid_1', material='mat_1', section='sec_solid', elset='elset_blocks_layer_1'),
예제 #13
0
# Sets

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

# Materials

mdl.add([
    Concrete(name='mat_concrete', fck=50),
    Steel(name='mat_steel', fy=460),
])

# Sections

mdl.add([
    ShellSection(name='sec_planar', t=0.050),
    TrussSection(name='sec_tie', A=0.0001),
])

# Properties

mdl.add([
    Properties(name='ep_planar',
               material='mat_concrete',
               section='sec_planar',
               elset='elset_mesh'),
    Properties(name='ep_plate',
               material='mat_steel',
               section='sec_planar',
               elset='elset_plates'),
    Properties(name='ep_tie',
예제 #14
0
blender.add_nsets_from_layers(mdl, layers=['nset_corner1', 'nset_corner2'])
edges = [i for i in mdl.nodes if mdl.nodes[i].z < 0.001]
mdl.add_set(name='nset_edges', type='node', selection=edges)

# Materials

mdl.add([
    Concrete(name='mat_concrete', fck=90, fr=[1.16, 0.15]),
    Steel(name='mat_steel', fy=355),
])

# Sections

mdl.add([
    ShellSection(name='sec_floor', t=0.050),
    TrussSection(name='sec_ties', A=pi * 0.25 * 0.030**2),
])

# Properties

mdl.add([
    Properties(name='ep_floor',
               material='mat_concrete',
               section='sec_floor',
               elset='elset_floor'),
    Properties(name='ep_ties',
               material='mat_steel',
               section='sec_ties',
               elset='elset_ties'),
])
예제 #15
0
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',
                   nlgeom=False,
예제 #16
0
rhino.add_nodes_elements_from_layers(mdl,
                                     mesh_type='ShellElement',
                                     layers='elset_mesh')

# Sets

rhino.add_sets_from_layers(mdl, layers='nset_pins')

# Materials

mdl.add(ElasticIsotropic(name='mat_elastic', E=10**12, v=0.3, p=1000))

# Sections

mdl.add(ShellSection(name='sec_plate', t=1))

# Properties

mdl.add(
    Properties(name='ep_plate',
               material='mat_elastic',
               section='sec_plate',
               elset='elset_mesh'))

# Displacements

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

# Loads
예제 #17
0
rhino.add_sets_from_layers(mdl, layers=['nset_corner1', 'nset_corner2'])
edges = [i for i in mdl.nodes if mdl.nodes[i].z < 0.001]
mdl.add_set(name='nset_edges', type='node', selection=edges)

# Materials

mdl.add([
    Concrete(name='mat_concrete', fck=90, fr=[1.16, 0.15]),
    Stiff(name='mat_stiff', E=10**12),
    Steel(name='mat_steel', fy=355),
])

# Sections

mdl.add([
    ShellSection(name='sec_ribs', t=0.020),
    ShellSection(name='sec_vault', t=0.050),
    RectangularSection(name='sec_stiff', b=1, h=1),
    TrussSection(name='sec_ties', A=pi*0.25*0.030**2),
])

# Properties

mdl.add([
    Properties(name='ep_ribs', material='mat_concrete', section='sec_ribs', elset='elset_ribs'),
    Properties(name='ep_vault', material='mat_concrete', section='sec_vault', elset='elset_vault'),
    Properties(name='ep_stiff', material='mat_stiff', section='sec_stiff', elset='elset_stiff'),
    Properties(name='ep_ties', material='mat_steel', section='sec_ties', elset='elset_ties'),
])

# Displacements
예제 #18
0
mdl.add_nodes_elements_from_mesh(mesh=mesh,
                                 element_type='ShellElement',
                                 elset='elset_concrete')

# Sets

nodes = [i for i, node in mdl.nodes.items() if node.z < 0.01]
mdl.add_set(name='nset_pins', type='node', selection=nodes)

# Materials

mdl.add(ElasticIsotropic(name='mat_concrete', E=40 * 10**9, v=0.2, p=2400))

# Sections

mdl.add(ShellSection(name='sec_concrete', t=0.050))

# Properties

mdl.add(
    Properties(name='ep_concrete',
               material='mat_concrete',
               section='sec_concrete',
               elset='elset_concrete'))

# Displacements

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

# Steps
예제 #19
0
# Sets

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

# Materials

mdl.add(ElasticIsotropic(name='mat_1', E=20*10**9, v=0.3, p=1500))
mdl.add(ElasticIsotropic(name='mat_2', E=30*10**9, v=0.3, p=1500))

# Sections

mdl.add(RectangularSection(name='bsec', b=0.1, h=.2))
mdl.add(Properties(name='ep_1', material='mat_1', section='bsec', elsets=['beams']))

mdl.add(ShellSection(name='ssec', t=.1))
mdl.add(Properties(name='ep_2', material='mat_2', section='ssec', elsets=['shell']))

# Displacements

mdl.add([FixedDisplacement(name='supports', nodes='supports')])

# Loads

mdl.add(GravityLoad(name='load_gravity', elements=['beams', 'shell']))

# Steps

mdl.add([
    GeneralStep(name='step_bc', displacements=['supports']),
    GeneralStep(name='step_load', loads=['load_gravity']),
예제 #20
0
# 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',
                 section='sec_circ',
예제 #21
0
# Sets

blender.add_nsets_from_layers(mdl, layers=['nset_supports', 'nset_load'])

# Materials

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

# Sections

mdl.add([
    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([
    Properties(name='ep_plate1',
               material='mat_steel',
               section='sec_plate',
               elset='elset_top_plate'),
    Properties(name='ep_plate2',
               material='mat_steel',
               section='sec_plate',
               elset='elset_bot_plate'),
예제 #22
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
mdl = Structure(name='example_shell', path='C:/Temp/')

rhino.add_nodes_elements_from_layers(mdl,
                                     mesh_type='ShellElement',
                                     layers='mesh')
rhino.add_sets_from_layers(mdl, layers=['loads', 'supports', 'area'])

#print(mdl.sets['loads'])
#print(mdl.sets['supports'])
#print(mdl.sets['area'])

mdl.add(Concrete(name='concrete', fck=50))

#print(mdl.materials['concrete'])

mdl.add(ShellSection(name='shell', t=0.100))

#print(mdl.sections['shell'])

mdl.add(
    ElementProperties(name='ep',
                      material='concrete',
                      section='shell',
                      elset='mesh'))

#print(mdl.element_properties['ep'])

mdl.add(PinnedDisplacement(name='pinned', nodes='supports'))

#print(mdl.displacements['pinned'])
예제 #24
0
# Sets

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

# 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)])