STAIRLab logo
  • Docs 
  • Examples 
  •  

Extrusion with bricks

1 min read • 139 words
Solid  
Solid  

A hexahedral finite element mesh is generated with xara and executed with OpenSees.

Python Tcl
  • hexa.py
  • requirements.txt
  • hexa.tcl

In this example a plane quadrilateral mesh is extruded to create a 3D hexahedron finite element mesh. The plane mesh is created along the same lines as the beam with a hole from this example.

Given a float array nodes of node coordinates and an integer array cells where each row defines a quadrilateral with four indices into the nodes array, the extrusion generator is initialized:

ex = ExtrudeHexahedron(nodes, cells)

Next the Model is defined:

model = xara.Model(ndm=3, ndf=3)
model.material("ElasticIsotropic", 1, 29e3, 0.23)
model.pattern("Plain", 1, "Linear")

Finally, the extrusion is performed generating n=100 layers of bricks:

n = 100
for i in range(n):

    for tag, coords in ex.nodes():
        model.node(tag, tuple(coords))
        if i==0 and coords[-1] == 0:
            model.fix(tag, (1, 1, 1))
        elif i == n-1:
            model.load(tag, (1, -1, 0), pattern=1)

    for tag, cell in ex.cells():
        model.element("stdBrick", tag, tuple(cell), 1)

    ex.advance([0, 0, 10])
 Arch Instability
Finite Rotations 
Extrusion with bricks
Extrusion with bricks
A gallery of technical examples currated by the STAIRLab at UC Berkeley.
Code licensed BSD, docs CC BY-NC 4.0
 
Links
Home 
About 
Docs 
Examples
Working with solids 
Nonlinear dynamics 
Basic Statics 
Community
Issues   
Discussions   
Contribute 
STAIRLab
Code copied to clipboard