Let's Do Some Element Integrals
Most functions of elements can be defined in either the physical (global) element or a reference (local) element. The change of basis transformation, the Jacobian matrix, provides the mapping between derivatives of the physical and reference element. Similarly, basis functions can be defined in physical or the reference space. I will consider basis functions in the reference space only.
Most of the entities of importance to an element are element matrix functions, which are matrix/vector-valued functions defined on the element. They can be expressed as being defined either on the reference element E or on the physical element e. I will use the following notation: the variable ranges over the reference element E, and the variable x ranges over the physical element e. The correspondence between them is denoted by , its inverse by , and the Jacobian of the map is written . In fact, is a matrix for each , and so is one of the matrix-valued functions of the element. In simple terms this says that, if you can express something on a nicely shaped simple element, then the Jacobian will help you translate into the very ugly-looking complex physical counterpart.
Imagine the physical variable x that is defined on the physical space. The basis functions of the element e are defined as , where m is the number of nodes of the element, the map is written as:
For example, is a temperature field defined as (just imagine that!), and the nodal temperatures are . Using one-dimensional element (, ), the mapping is obtained as . In the following example with , , , and , the temperature varies linearly in the element and can be plotted as:
Let's define this element and its nodes using the following framework.
These statements create two nodes,
This statement creates a
The Jacobian operator J of the element relates the physical coordinate derivatives to the reference coordinate derivatives:
Using the same one-dimensional element above, the Jacobian of the element can be computed by:
It is also possible to do all of these operations symbolically. Using the same problem as before, but with symbolic variables for coordinates and temperatures ( and ) at the nodes 1 and 2 respectively, the next example is obtained.
A more comprehensive list of the element matrix operations for the
J = jacobian[element]
JInv = inverseJacobian[element]
represents a Jacobian with a three-dimensional reference space and three-dimensional physical space .
R = shapeFunctions[element]
GradR = gradient[element]
GradR = physicalGradient[element]
The resulting equations, also called the governing FEM equations, are generally provided in the form of inner products in terms of other functions of the element, such as the basis functions, gradients, and so on, state variables in the problem, and material properties. The most common inner product that is utilized in FEM is the element integration.
A typical example is the Laplacian operator , where is a scalar field. FEM discretization of the Laplacian operator can be written as the following inner product:
where is the finite dimensional space test function space.
With some manipulation and using the standard Galerkin FEM discretization the Laplacian operator is written as the integral
where is a scalar value defined at each node
where is the error introduced by the approximation.
The standard Galerkin FEM suggests
Applying the divergence theorem
This can be evaluated by the following integral
where is the subdomain of the element in the physical space.
In the reference space the integral can be evaluated as:
then the integral is
The use of the Laplacian operator,
Let's define an instance of the Laplacian element by the following setup.
If x and y were set to as in the following example,
then the Laplacian operator for the element is:
Converted by Mathematica