FEEngine

The FEEngine interface is dedicated to handle the finite-element approximations and the numerical integration of the weak form. As we will see in Chapter Solid Mechanics Model, Model creates its own FEEngine object so the explicit creation of the object is not required.

Mathematical Operations

Using the FEEngine object, one can compute a interpolation, an integration or a gradient.A simple example is given below:

// having a FEEngine object
auto fem = std::make_unique<FEEngineTemplate<IntegratorGauss, ShapeLagrange>>(my_mesh, dim, "my_fem");
// instead of this, a FEEngine object can be get using the model:
// model.getFEEngine()

// compute the gradient
Array<Real> u;       // append the values you want
Array<Real> nablauq; // gradient array to be computed
// compute the gradient
fem->gradientOnIntegrationPoints(const Array<Real> & u, Array<Real> & nablauq,
             const UInt nb_degree_of_freedom,
             ElementType type);

// interpolate
Array<Real> uq; // interpolated array to be computed
                // compute the interpolation
fem->interpolateOnIntegrationPoints(const Array<Real> & u, Array<Real> & uq,
             UInt nb_degree_of_freedom,
             ElementType type);

// interpolated function can be integrated over the elements
Array<Real> int_val_on_elem;
// integrate
fem->integrate(const Array<Real> & uq, Array<Real> & int_uq,
             UInt nb_degree_of_freedom, ElementType type);

Another example below shows how to integrate stress and strain fields over elements assigned to a particular material:

UInt sp_dim{3};                  // spatial dimension
UInt m{1};                       // material index of interest
const auto type{_tetrahedron_4}; // element type

// get the stress and strain arrays associated to the material index m
const auto & strain_vec = model.getMaterial(m).getGradU(type);
const auto & stress_vec = model.getMaterial(m).getStress(type);

// get the element filter for the material index
const auto & elem_filter = model.getMaterial(m).getElementFilter(type);

// initialize the integrated stress and strain arrays
Array<Real> int_strain_vec(elem_filter.getSize(), sp_dim * sp_dim,
             "int_of_strain");
Array<Real> int_stress_vec(elem_filter.getSize(), sp_dim * sp_dim,
             "int_of_stress");

// integrate the fields
model.getFEEngine().integrate(strain_vec, int_strain_vec, sp_dim * sp_dim, type,
             _not_ghost, elem_filter);
model.getFEEngine().integrate(stress_vec, int_stress_vec, sp_dim * sp_dim, type,
             _not_ghost, elem_filter);

Elements

The base for every Finite-Elements computation is its mesh and the elements that are used within that mesh. The element types that can be used depend on the mesh, but also on the dimensionality of the problem (1D, 2D or 3D). In Akantu, several iso-parametric Lagrangian element types are supported (and one serendipity element). Each of these types is discussed in some detail below, starting with the 1D-elements all the way to the 3D-elements. More detailed information (shape function, location of Gaussian quadrature points, and so on) can be found in Appendix app:elements.

Iso-parametric Elements

1D

There are two types of iso-parametric elements defined in 1D. These element types are called _segment_2 and _segment_3, and are depicted schematically in Fig. 1. Some of the basic properties of these elements are listed in Table 1.

../_images/segments.svg

Fig. 1 Schematic overview of the two 1D element types in Akantu. In each element, the node numbering as used in Akantu is indicated and also the quadrature points are highlighted (gray circles).

Table 1 Some basic properties of the two 1D iso-parametric elements in Akantu

Element type

Order

#nodes

#quad points

_segment_2

linear

2

1

_segment_3

quadratic

3

2

2D

There are four types of iso-parametric elements defined in 2D. These element types are called _triangle_3, _triangle_6, _quadrangle_4 and _quadrangle_8, and all of them are depicted in Fig. 2. As with the 1D elements, some of the most basic properties of these elements are listed in Table 2. It is important to note that the first element is linear, the next two quadratic and the last one cubic. Furthermore, the last element type (_quadrangle_8) is not a Lagrangian but a serendipity element.

../_images/elements_2d.svg

Fig. 2 Schematic overview of the four 2D element types in Akantu. In each element, the node numbering as used in Akantu is indicated and also the quadrature points are highlighted (gray circles).

Table 2 Some basic properties of the 2D iso-parametric elements in Akantu

Element type

Order

#nodes

#quad points

_triangle_3

linear

3

1

_triangle_6

quadratic

6

3

_quadrangle_4

linear

4

4

_quadrangle_8

quadratic

8

9

3D

In Akantu, there are three types of iso-parametric elements defined in 3D. These element types are called _tetrahedron_4, _tetrahedron_10 and _hexadedron_8, and all of them are depicted schematically in Fig. 3. As with the 1D and 2D elements some of the most basic properties of these elements are listed in Table 3.

../_images/elements_3d.svg

Fig. 3 Schematic overview of the three 3D element types in Akantu. In each element, the node numbering as used in Akantu is indicated and also the quadrature points are highlighted (gray circles).

Table 3 Some basic properties of the 3D iso-parametric elements in Akantu

Element type

Order

#nodes

#quad points

_tetrahedron_4

linear

4

1

_tetrahedron_10

quadratic

10

4

_hexadedron_8

cubic

8

8

Cohesive Elements

The cohesive elements that have been implemented in Akantu are based on the work of Ortiz and Pandolfi [ortiz1999]. Their main properties are reported in Table 4.

../_images/cohesive_2d_6.svg

Fig. 4 Cohesive element in 2D for quadratic triangular elements T6.

Table 4 Some basic properties of the cohesive elements in Akantu.

Element type

Facet type

Order

#nodes

#quad points

_cohesive_1d_2

_point_1

linear

2

1

_cohesive_2d_4

_segment_2

linear

4

1

_cohesive_2d_6

_segment_3

quadratic

6

2

_cohesive_3d_6

_triangle_3

linear

6

1

_cohesive_3d_12

_triangle_6

quadratic

12

3

Structural Elements

Bernoulli Beam Elements

These elements allow to compute the displacements and rotations of structures constituted by Bernoulli beams. Akantu defines them for both 2D and 3D problems respectively in the element types _bernoulli_beam_2 and _bernoulli_beam_3. A schematic depiction of a beam element is shown in Fig. 5 and some of its properties are listed in Table 5.

Note

Beam elements are of mixed order: the axial displacement is linearly interpolated while transverse displacements and rotations use cubic shape functions.

../_images/bernoulli_2.svg

Fig. 5 Schematic depiction of a Bernoulli beam element (applied to 2D and 3D) in Akantu. The node numbering as used in Akantu is indicated, and also the quadrature points are highlighted (gray circles).

Table 5 Some basic properties of the beam elements in Akantu

Element type

Dimension

# nodes

# quad. points

# d.o.f.

_bernoulli_beam_2

2D

2

3

6

_bernoulli_beam_3

3D

2

3

12