Esempio n. 1
0
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']

# Summary

mdl.summary()

# Run (Sofistik)

mdl.write_input_file(software='sofistik')

# Run (Abaqus/OpenSees)

#mdl.analyse_and_extract(software='abaqus', fields=['u', 'ur', 'rf'])
mdl.analyse_and_extract(software='opensees', fields=['u', 'ur', 'rf'])
Esempio n. 2
0
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()

# Run (Sofistik)
# Note: Sofistik depends on input with correct SI units, model and data must be 
# converted from lbs and inches.

mdl.write_input_file(software='sofistik')

# Run (Abaqus)
                         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])

s.steps_order = ['gravity_step']

# analyse ----------------------------------------------------------------------

fields = 'all'
s.write_input_file(software='ansys', fields=fields)
s.analyse(software='ansys', cpus=4, delete=True)
s.extract_data(software='ansys', fields=fields, steps='last')

# visualise results ------------------------------------------------------------

rhino.plot_data(s,
                step='gravity_step',
                field='uz',
Esempio n. 4
0
    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

mdl.summary()

# Run (Abaqus)

exe = '/home/al/abaqus/Commands/abaqus cae '
mdl.analyse_and_extract(software='abaqus', exe=exe, fields=['u'])
blender.plot_voxels(mdl, step='step_load', field='ux', vdx=0.01)
Esempio n. 5
0
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))
loads = ['load_gravity', 'load_points']

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', nlgeom=False, displacements=['disp_fixed']),
    GeneralStep(name='step_loads', nlgeom=False, loads=loads)])
mdl.steps_order = ['step_bc', 'step_loads']

# Summary

mdl.summary()

# Run (Abaqus)

mdl.analyse_and_extract(software='abaqus', fields=['u', 's', 'rbfor'])

rhino.plot_data(mdl, step='step_loads', field='um', colorbar_size=0.3)
rhino.plot_data(mdl, step='step_loads', field='smaxp', colorbar_size=0.3)
rhino.plot_data(mdl, step='step_loads', field='sminp', colorbar_size=0.3)
rhino.plot_data(mdl, step='step_loads', field='rbfor', iptype='max', nodal='max', colorbar_size=0.3)
Esempio n. 6
0
    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']),
    GeneralStep(name='step_loads', loads=['load_gravity', 'load_tributary'], factor=1.1)])
mdl.steps_order = ['step_bc', 'step_prestress', 'step_loads']

# Summary

mdl.summary()

# Run (Abaqus)

mdl.analyse_and_extract(software='abaqus', fields=['u', 's'])

rhino.plot_data(mdl, step='step_prestress', field='uz', radius=0.02, colorbar_size=0.5)
rhino.plot_data(mdl, step='step_loads', field='uz', radius=0.02, colorbar_size=0.5)
rhino.plot_data(mdl, step='step_loads', field='smises', radius=0.02, colorbar_size=0.5,
                cbar=[0, 3*10**6], nodal='max', iptype='max')
Esempio n. 7
0
# 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

mdl.summary()

# Run (Abaqus)

mdl.analyse_and_extract(software='abaqus', fields=['u', 'sf'])

rhino.plot_data(mdl,
                step='step_loads',
                field='um',
                radius=0.05,
# 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`

mdl.summary()

# Run (Sofistik)

mdl.write_input_file(software='sofistik')

# Run (Abaqus/OpenSees)

mdl.analyse_and_extract(software='abaqus', fields=['u', 'spf'])
#mdl.analyse_and_extract(software='opensees', fields=['u', 'spf'])
Esempio n. 9
0
                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

mdl.summary()

# Run (Abaqus)

exe = '/home/al/abaqus/Commands/abaqus cae '
mdl.analyse_and_extract(software='abaqus', exe=exe, fields=['u', 'rf', 's'])

blender.plot_data(mdl, step='step_load', field='um', layer=3)
print(mdl.get_nodal_results(step='step_load', field='um', nodes='nset_top'))
Esempio n. 10
0
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']

# Summary

mdl.summary()

# Run (Abaqus)

mdl.analyse_and_extract(software='abaqus', fields=['u', 'sf', 'sm'])

rhino.plot_data(mdl,
                step='step_lift',
                field='um',
                radius=0.005,
Esempio n. 11
0
                        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',
                loads=['load_weights'],
                displacements=['disp_left'])
])
mdl.steps_order = ['step_bc', 'step_load']

# Summary

mdl.summary()

# Run (Sofistik)

mdl.write_input_file(software='sofistik')

# Run (Abaqus)
Esempio n. 12
0
point_loads = {}

for key in mesh.vertices():
    xyz = mesh.vertex_coordinates(key)
    node = mdl.check_node_exists(xyz)
    pt = rs.ProjectPointToSurface([xyz], surface, [0, 0, 1])[0]
    pz = mesh.vertex_area(key) * distance_point_point(xyz, pt) * Gc
    point_loads[node] = {'z': -pz}
mdl.add_load(PointLoads(name='load_points', components=point_loads))

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=displacements),
    GeneralStep(name='step_loads', loads=loads, increments=300, factor=1.35),
    BucklingStep(name='step_buckle',
                 loads=loads,
                 displacements=displacements,
                 modes=1)
])
mdl.steps_order = ['step_bc', 'step_loads', 'step_buckle']

# Summary

mdl.summary()

# Run (Abaqus)

mdl.analyse_and_extract(software='abaqus', fields=['u', 's'])

rhino.plot_data(mdl,
                step='step_loads',
Esempio n. 13
0
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)
])
mdl.steps_order = ['step_bc', 'step_loads']

# Summary

mdl.summary()

# Run (Abaqus)

exe = '/home/al/abaqus/Commands/abaqus cae '
mdl.analyse_and_extract(software='abaqus', exe=exe, fields=['u', 's'])

# Plot (VtkVoxels)
Esempio n. 14
0
# Loads
# Note: GravityLoad doesnt activate for OpenSees

mdl.add_loads([
    PointLoad(name='load_pl_v', nodes='nset_load_v', z=-15500),
    PointLoad(name='load_pl_h', nodes='nset_load_h', x=5000),
    GravityLoad(name='load_gravity', elements=['elset_diag', 'elset_main'])
])

# Steps

mdl.add_steps([
    GeneralStep(name='step_bc', displacements=['disp_pinned']),
    GeneralStep(name='step_loads',
                loads=['load_pl_v', 'load_pl_h', 'load_gravity'],
                factor=1.5,
                increments=200)
])
mdl.steps_order = ['step_bc', 'step_loads']

# Summary

mdl.summary()

# Run (Sofistik)

mdl.write_input_file(software='sofistik')

# Run (Abaqus)
Esempio n. 15
0
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'])
])
mdl.steps_order = ['step_bc', 'step_load']

# Summary

mdl.summary()

# Run (Abaqus)

mdl.analyse_and_extract(software='abaqus', fields=['u', 's'])

rhino.plot_data(mdl, step='step_load', field='um')
rhino.plot_data(mdl, step='step_load', field='smises')  # Abaqus results only
Esempio n. 16
0
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)
])
mdl.steps_order = ['step_bc', 'step_load']

# Summary

mdl.summary()

# Run (Sofistik)

mdl.write_input_file(software='sofistik')

# Run (Abaqus)