Monday, March 15, 2021

How a FEM software package assemble elements?

One of the strengths that makes the FEM a tool of choice is its generalized way of assembling the elements in the form global stiffness [K], and the global nodal displacement vector {U} and the global nodal load vector {F}, to build a set of simultaneous algebraic equations i.e. [K]{U} = {F}, to be solved for unknown variables.

In this article, we will go through an example problem to explain how a FEM software performs the element assembly process. The problem chosen is a linear 1D bar with legs. One of the legs is subjected to an axial tensile load while others are fixed, as shown in Figure 1.

Figure 1. A linear 1D example problem.

Let’s begin with the decomposition of the problem into small segments. Say the spatial domain of the problem is discretized into 4 subdomains so that we can easily managed their computation as shown in Figure 2. Each subdomain is assigned with an element model of a linear spring type element with two nodes, where each node has one displacement dof, as shown in Figure 3. We will not go into details of how to get this element model. Just assume that we selected it from an existing element library of the FEM software and want to use it to solve our problem.

Also, do remember that the nodes in the element model shown are local in nature. In other words, they are based on local or element coordinate system which was used to build the element model. To distinguish them from the global node numbers which we will see in the coming section, we are using a pair of braces to represent these local node numbers.

Figure 2. Discretization of the example problem.

Figure 3. A linear spring element model with local nodes to be assigned.

Now, we need to specify the global node number and element number for the discretized domain. This numbering can be arbitrary. Here is Figure 4, in which the global node number and element number used current problem are shown. The global node numbers are enclosed in circles, while, element numbers are mentioned in rectangles for distinction. Let me emphasis again, you can have your own number sequence, just do not duplicate any number.

Figure 4. Specification of global node number and element number.

After that, we have to build an element connectivity table, which simply shows the connection between the local node number, enclosed in braces, and the global node number, enclosed in circles, for each element having element number enclosed in rectangle, as shown in Table 1. This table should be read as, say for an element # 1, the local node 1 of element model is linked with the global node 4. Similarly, the second local node 2 of the element #1 is linked to the global node number 2, and so on.

Table 1. Element connectivity table.

Before starting the assembly in the form of global matrix and global vectors, we need to define the size of system. The size of system depends on the number of global nodes and number of dof per node.

Figure 5. Initialization of global stiffness matrix, and global nodal displacement and force vectors.

Finally, here begins the assembly process…

For this element we have the local stiffness matrix [k], the local nodal displacement vector {u} and the local force vector {f}, having the local size of 2x2, 2x1 and 2x1, respectively, as there are two local nodes, with each having 1 dof, as shown in Figure 6.

Figure 6. Element stiffness matrix, and element nodal displacement and load vectors.

We have to place each element of [k], {u} and {f} into their respective positions in [K], {U} and {F} initialized earlier. The positions are determined using the element connectivity Table 1, which we covered earlier. Here is the mapping of local and global positions for each entry for the element # 1.

As a consequence of above connectivity, we can see the populated global stiffness matrix [K], and global nodal displacement vector {U} and global nodal load vector {F}, with the entries of element # 1 in Figure 7 as following.

Figure 7. Global stiffness matrix, and global nodal displacement and force vectors populated with entries of element # 1.

Exactly the same process is repeated for element # 2, 3 and 4, as shown in Figure 8, 9 and 10, respectively.
Figure 8. Assembly process for element # 2.

Figure 9. Assembly process for element # 3.

                                                  Figure 10. Assembly process for element # 4.

Once assembly of all element is done, the final form of global stiffness matrix [K], global nodal displacement vector {U} and global nodal load vector {F}, can be presented in the form of [K]{U}={F}, as shown in Figure 11. This is a set of simultaneous algebraic equations, a so-called presentation of the differential equation of the system, we are looking for.

Figure 11. Final assembled form of all 4 elements.

After the element assembly, we need to apply load and boundary conditions, followed by the solving for unknown global nodal displacement. Once these unknown primary/state variables are determined, we can then compute the dependent variables as per our requirement.

About the Author: Dr. Khazar Hayat is a professional engineer with almost 15+ year of experience in research, design, analysis and development of products made of fiber reinforced plastics composites (FRPCs). Currently, he is working as an Associate Professor at Mechanical Engineering Department, The University of Lahore, Pakistan, can be reaching by emailing at khazarhayat@gmail.com.

No comments:

Post a Comment

Applications of Finite Element Methods (FEM)

In this article, we will explore various applications of FEM in the field of Mechanical Engineering. Structural Analysis In structural analy...