Surface

Surface#

Model.surface(split, element, args, points=None, name=None, **kwds)#

Create a surface mesh of elements in the current model.

Parameters:
split: tuple of integers

The number of elements in the local \(x\) and \(y\) directions.

element: str

The name of the element type to use.

args: tuple or dict

The arguments to pass to the element constructor.

points: dict

The coordinates of the points in the mesh.

kwds: dict

The keyword arguments to pass to the element constructor.

order: int

The order of the elements to use. Default is 1 for linear elements.

shape: str

The shape of the elements to use. Can be “Q” for quadrilateral or “T” for triangular.

Returns:

Surface

This method is analogous to the Create_Block utility of FEDEASLab.

Examples#

The following snippet creates a \(8 \times 4\) mesh of linear (order = 1) quadrilateral elements.

import xara
model = xara.Model(ndm=2, ndf=2)
mesh = model.surface((8, 4),
              element="Quad",
              args={"section": 1},
              order=1,
              points={
                1: [  0.0,   0.0],
                2: [   L,    0.0],
                3: [   L,     d ],
                4: [  0.0,    d ]
        })