Ejemplo n.º 1
0
# Author(s): Andrew Liew (github.com/andrewliew)

# Structure

mdl = Structure(name='block_bridge', path='C:/Temp/')

# Tetrahedrons

blender.add_tets_from_mesh(mdl,
                           name='elset_tets',
                           mesh=get_object_by_name('elset_tets'))

# Elements

blender.add_nodes_elements_from_layers(
    mdl,
    layers=['elset_top_plate', 'elset_bot_plate'],
    mesh_type='ShellElement')
blender.add_nodes_elements_from_layers(mdl,
                                       layers='elset_ties',
                                       line_type='TrussElement')

# 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),
])
Ejemplo n.º 2
0
from compas_fea.structure import Structure
from compas_fea.structure import TrussSection

__author__ = ['Andrew Liew <*****@*****.**>']
__copyright__ = 'Copyright 2018, BLOCK Research Group - ETH Zurich'
__license__ = 'MIT License'
__email__ = '*****@*****.**'

# Structure

mdl = Structure(name='truss_tower', path='/home/al/temp/')

# Elements

blender.add_nodes_elements_from_layers(mdl,
                                       line_type='TrussElement',
                                       layers=[0])

# Sets

blender.add_elset_from_bmeshes(mdl, layer=0, name='elset_struts')
blender.add_nset_from_objects(mdl, layer=1, name='nset_pins')
blender.add_nset_from_objects(mdl, layer=2, name='nset_top')

# Materials

mdl.add_material(
    ElasticIsotropic(name='mat_elastic', E=200 * 10**9, v=0.3, p=7850))

# Sections
Ejemplo n.º 3
0
from compas_fea.structure import GeneralStep
from compas_fea.structure import PinnedDisplacement
from compas_fea.structure import PointLoad
from compas_fea.structure import Structure
from compas_fea.structure import TrussSection

# Author(s): Andrew Liew (github.com/andrewliew)

# Structure

mdl = Structure(name='truss_tower', path='C:/Temp/')

# Elements

blender.add_nodes_elements_from_layers(mdl,
                                       line_type='TrussElement',
                                       layers='elset_truss')

# Sets

blender.add_nsets_from_layers(mdl, layers=['nset_pins', 'nset_top'])

# Materials

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

# Sections

mdl.add(TrussSection(name='sec_truss', A=0.0001))

# Properties
Ejemplo n.º 4
0
from compas_fea.structure import Structure
from compas_fea.structure import TributaryLoad
from compas_fea.structure import TrussSection

__author__ = ['Andrew Liew <*****@*****.**>']
__copyright__ = 'Copyright 2018, BLOCK Research Group - ETH Zurich'
__license__ = 'MIT License'
__email__ = '*****@*****.**'

# Structure

mdl = Structure(name='mesh_floor', path='/home/al/temp/')

# Elements

blender.add_nodes_elements_from_layers(mdl, layers=0, mesh_type='ShellElement')
blender.add_nodes_elements_from_layers(mdl, layers=1, line_type='TrussElement')

# Sets

blender.add_elset_from_bmeshes(mdl, layer=0, name='elset_concrete')
blender.add_elset_from_bmeshes(mdl, layer=1, name='elset_ties')
blender.add_nset_from_objects(mdl, layer=3, name='nset_corners')
blender.add_nset_from_objects(mdl, layer=4, name='nset_corner1')
blender.add_nset_from_objects(mdl, layer=5, name='nset_corner2')

# Materials

mdl.add_materials(
    [Concrete(name='mat_concrete', fck=90),
     Steel(name='mat_steel', fy=355)])
Ejemplo n.º 5
0
from compas_fea.structure import Structure
from compas_fea.structure import TributaryLoad
from compas_fea.structure import TrussSection

from math import pi

# Author(s): Andrew Liew (github.com/andrewliew)

# Structure

mdl = Structure(name='mesh_floor', path='C:/Temp/')

# Elements

blender.add_nodes_elements_from_layers(mdl,
                                       layers='elset_floor',
                                       mesh_type='ShellElement')
blender.add_nodes_elements_from_layers(mdl,
                                       layers='elset_ties',
                                       line_type='TrussElement')

# Sets

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]),
Ejemplo n.º 6
0
from compas_blender.utilities import get_objects

__author__ = ['Andrew Liew <*****@*****.**>']
__copyright__ = 'Copyright 2018, BLOCK Research Group - ETH Zurich'
__license__ = 'MIT License'
__email__ = '*****@*****.**'

# Structure

mdl = Structure(name='mesh_mould', path='/home/al/temp/')

# Elements

blender.add_nodes_elements_from_layers(mdl,
                                       layers=[0, 1],
                                       mesh_type='ShellElement')

# Sets

blender.add_elset_from_bmeshes(mdl, layer=0, name='elset_wall')
blender.add_elset_from_bmeshes(mdl, layer=1, name='elset_plinth')
blender.add_nset_from_bmeshes(mdl, layer=3, name='nset_fixed')

# Materials

mdl.add_materials([
    Concrete(name='mat_concrete', fck=40),
    Steel(name='mat_rebar', fy=500, id='r')
])
Ejemplo n.º 7
0
from compas_fea.structure import GravityLoad
from compas_fea.structure import PointLoad
from compas_fea.structure import ShellSection
from compas_fea.structure import Steel
from compas_fea.structure import Structure

# Author(s): Andrew Liew (github.com/andrewliew)

# Structure

mdl = Structure(name='mesh_mould', path='C:/Temp/')

# Elements

blender.add_nodes_elements_from_layers(mdl,
                                       layers=['elset_wall', 'elset_plinth'],
                                       mesh_type='ShellElement')

# Sets

blender.add_nsets_from_layers(mdl, layers='nset_loads')
blender.add_nset_from_meshes(mdl, layer='nset_fixed')

# Materials

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

# Sections
Ejemplo n.º 8
0
from compas_fea.structure import PointLoad
from compas_fea.structure import Structure

from math import pi
deg = pi / 180

# Author(s): Andrew Liew (github.com/andrewliew)

# Structure

mdl = Structure(name='beam_simple', path='C:/Temp/')

# Elements

blender.add_nodes_elements_from_layers(mdl,
                                       line_type='BeamElement',
                                       layers='elset_beam')

# Sets

blender.add_nsets_from_layers(
    mdl, layers=['nset_left', 'nset_right', 'nset_weights'])

# Materials

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

# Sections

mdl.add(CircularSection(name='sec_circular', r=0.030))