View on GitHub

FinEtools.jl

Finite Element tools in Julia

Table of contents

FEM machines

The construction of the matrices and vectors of the discrete form of the weighted residual equation is performed in FEM machines. (FEM = Finite Element Method.)

As an example consider the weighted-residual form of the heat balance equation

where for .

The test function is taken to be one finite element basis function at a time, , and the trial function is

.

Here by we mean the basis function constructed on the mesh and associated with the node . We use the notation to mean node number at which the degree of freedom lives.

Now the test function and the trial function is substituted into the weighted residual equation.

Example: internal heat generation rate term

For instance, for the term

we obtain

This integral evaluates to a number, the heat load applied to the degree of freedom . When these numbers are evaluated for all the free degrees of freedom, they constitute the entries of the global heat load vector.

Evaluating integrals of this form is so common that there is a module FEMMBaseModule with the method distribloads that computes and assembles the global vector. For instance to evaluate this heat load vector on the mesh composed of three-node triangles, for a uniform heat generation rate Q, we can write

fi = ForceIntensity(FFlt[Q]);
F1 = distribloads(FEMMBase(IntegData(fes, TriRule(1))), geom, Temp, fi, 3);

IntegData(fes, TriRule(1)) constructs integration data for the finite elements fes using a triangular integration rule with a single point. FEMMBase is the base FEM machine, and all it needs at this point is the integration data. The method distribloads is defined for the base FEM machine, the geometry field geom, the numbering of the degrees of freedom is taken from the field Temp, the internal heat generation rate is defined as the force intensity fi, and the integrals are volume integrals (3).

Example: conductivity term

The conductivity term from the weighted residual equation

is rewritten with the test and trial functions as

The sum over the degree of freedom number should be split: some of the coefficients are for free degrees of freedom (, with being the total number of free degrees of freedom), while some are fixed (prescribed) for nodes which are located on the essential boundary condition surface ().

Thus the term splits into two pieces,

where the individual integrals are entries of the conductivity matrix, and

which will represent heat loads due to nonzero prescribed boundary condition.

The FEM machine for heat conduction can be created as

material = MatHeatDiff(thermal_conductivity)
femm = FEMMHeatDiff(IntegData(fes, TriRule(1)), material)

where we first create a material to deliver the thermal conductivity matrix , and then we create the FEM machine from the integration data for a mesh consisting of three node triangles, using one-point integration rule, and the material. This FEM machine can then be passed to a method

K = conductivity(femm, geom, Temp)

to evaluate the global conductivity matrix K, where the geometry comes from the geometry field geom, and the temperature field Temp provides the numbering of the degrees of freedom.

The heat load term due to the nonzero essential boundary conditions is evaluated with the method nzebcloadsconductivity

F2 = nzebcloadsconductivity(femm, geom, Temp);

where the geometry comes from the geometry field geom, and the temperature field Temp provides the numbering of the degrees of freedom and the values of the prescribed (fixed) degrees of freedom. The result is a contribution to the global heat load vector.

Base FEM machine

The following operations are provided by the base FEM machine:

Acoustics FEM machines

There is one for the interior integrals and one for boundary integrals. The machine for the interior integrals can be used to compute:

The machine for the boundary integrals can be used to compute:

Heat conduction FEM machines

There is one for the interior integrals and one for boundary integrals. The machine for the interior integrals can be used to compute:

The machine for the boundary integrals can be used to compute:

Linear deformation FEM machines

For the base machine for linear deformation, FEMMDeforLinearBase, assumes standard isoparametric finite elements. It evaluates the interior integrals:

Additionally:

The FEM machine FEMMDeforLinear simply stores the data required by the base FEMMDeforLinearBase.

The machine FEMMDeforWinkler is specialized for the boundary integrals for bodies supported on continuously distributed springs:

The mean-strain FEM machine FEMMDeforLinearMS implements advanced hexahedral and tetrahedral elements based on multi-field theory and energy-sampling stabilization. It provides functions to compute:

Additionally it defines: