# Computational Modelling (Finite Element Method)

## Introduction

The Finite Element Method (FEM) has developed into a key, indispensable technology in the modelling and simulation of advanced engineering systems in various fields like housing, transportation, communications, and so on. In building such advanced engineering systems, engineers and designers go through a sophisticated process of modelling, simulation, visualization, analysis, designing, prototyping, testing, and lastly, fabrication. Note that much work is involved before the fabrication of the final product or system. This is to ensure the workability of the finished product, as well as for cost effectiveness. The process is illustrated as a flowchart in Figure 1.1. This process is often iterative in nature, meaning that some of the procedures are repeated based on the results obtained at a current stage, so as to achieve an optimal performance at the lowest cost for the system to be built. Therefore, techniques related to modelling and simulation in a rapid and effective way play an increasingly important role, resulting in the application of the FEM being multiplied numerous times because of this.

This topic deals with topics related mainly to modelling and simulation, which are underlined in Figure 1.1. Under these topics, we shall address the computational aspects, which are also underlined in Figure 1.1. The focus will be on the techniques of physical, mathematical and computational modelling, and various aspects of computational simulation. A good understanding of these techniques plays an important role in building an advanced engineering system in a rapid and cost effective way.

So what is the FEM? The FEM was first used to solve problems of stress analysis, and has since been applied to many other problems like thermal analysis, fluid flow analysis, piezoelectric analysis, and many others. Basically, the analyst seeks to determine the distribution of some field variable like the displacement in stress analysis, the temperature or heat flux in thermal analysis, the electrical charge in electrical analysis, and so on. The FEM is a numerical method seeking an approximated solution of the distribution of field variables in the problem domain that is difficult to obtain analytically. It is done by dividing the problem domain into several elements, as shown in Figures 1.2 and 1.3. Known physical laws are then applied to each small element, each of which usually has a very simple geometry. Figure 1.4 shows the finite element approximation for a one-dimensional case schematically. Figure 1.2. Hemispherical section discretized into several shell elements.

A continuous function of an unknown field variable is approximated using piecewise linear functions in each sub-domain, called an element formed by nodes. The unknowns are then the discrete values of the field variable at the nodes. Next, proper principles are followed to establish equations for the elements, after which the elements are ‘tied’ to one another. This process leads to a set of linear algebraic simultaneous equations for the entire system that can be solved easily to yield the required field variable.

This topic aims to bring across the various concepts, methods and principles used in the formulation of FE equations in a simple to understand manner. Worked examples and case studies using the well known commercial software package ABAQUS will be discussed, and effective techniques and procedures will be highlighted.

## Physical Problems in Engineering

There are numerous physical engineering problems in a particular system. As mentioned earlier, although the FEM was initially used for stress analysis, many other physical problems can be solved using the FEM. Mathematical models of the FEM have been formulated for the many physical phenomena in engineering systems. Common physical problems solved using the standard FEM include:

•    Mechanics for solids and structures.

•    Heat transfer.

Figure 1.3. Mesh for the design of a scaled model of an aircraft for dynamic testing in the laboratory.

Figure 1.4. Finite element approximation for a one-dimensional case. A continuous function is approximated using piecewise linear functions in each sub-domain/element.

•    Acoustics.

•    Fluid mechanics.

•    Others.

This topic first focuses on the formulation of finite element equations for the mechanics of solids and structures, since that is what the FEM was initially designed for. FEM formulations for heat transfer problems are then described. The conceptual understanding of the methodology of the FEM is the most important, as the application of the FEM to all other physical problems utilizes similar concepts.

Computer modelling using the FEM consists of the major steps discussed in the next section.

## Computational Modelling Using the FEM

The behaviour of a phenomenon in a system depends upon the geometry or domain of the system, the property of the material or medium, and the boundary, initial and loading conditions. For an engineering system, the geometry or domain can be very complex. Further, the boundary and initial conditions can also be complicated. It is therefore, in general, very difficult to solve the governing differential equation via analytical means. In practice, most of the problems are solved using numerical methods. Among these, the methods of domain discretization championed by the FEM are the most popular, due to its practicality and versatility.

The procedure of computational modelling using the FEM broadly consists of four steps:

•    Modelling of the geometry.

•    Meshing (discretization).

•    Specification of material property.

### Modelling of the Geometry

Real structures, components or domains are in general very complex, and have to be reduced to a manageable geometry. Curved parts of the geometry and its boundary can be modelled using curves and curved surfaces. However, it should be noted that the geometry is eventually represented by a collection of elements, and the curves and curved surfaces are approximated by piecewise straight lines or flat surfaces, if linear elements are used. Figure 1.2 shows an example of a curved boundary represented by the straight lines of the edges of triangular elements. The accuracy of representation of the curved parts is controlled by the number of elements used. It is obvious that with more elements, the representation of the curved parts by straight edges would be smoother and more accurate. Unfortunately, the more elements, the longer the computational time that is required. Hence, due to the constraints on computational hardware and software, it is always necessary to limit the number of elements. As such, compromises are usually made in order to decide on an optimum number of elements used. As a result, fine details of the geometry need to be modelled only if very accurate results are required for those regions. The analysts have to interpret the results of the simulation with these geometric approximations in mind.

Depending on the software used, there are many ways to create a proper geometry in the computer for the FE mesh. Points can be created simply by keying in the coordinates. Lines and curves can be created by connecting the points or nodes. Surfaces can be created by connecting, rotating or translating the existing lines or curves; and solids can be created by connecting, rotating or translating the existing surfaces. Points, lines and curves, surfaces and solids can be translated, rotated or reflected to form new ones.

Graphic interfaces are often used to help in the creation and manipulation of the geometrical objects. There are numerous Computer Aided Design (CAD) software packages used for engineering design which can produce files containing the geometry of the designed engineering system. These files can usually be read in by modelling software packages, which can significantly save time when creating the geometry of the models. However, in many cases, complex objects read directly from a CAD file may need to be modified and simplified before performing meshing or discretization. It may be worth mentioning that there are CAD packages which incorporate modelling and simulation packages, and these are useful for the rapid prototyping of new products.

Knowledge, experience and engineering judgment are very important in modelling the geometry of a system. In many cases, finely detailed geometrical features play only an aesthetic role, and have negligible effects on the performance of the engineering system. These features can be deleted, ignored or simplified, though this may not be true in some cases, where a fine geometrical change can give rise to a significant difference in the simulation results.

An example of having sufficient knowledge and engineering judgment is in the simplification required by the mathematical modelling. For example, a plate has three dimensions geometrically. The plate in the plate theory of mechanics is represented mathematically only in two dimensions.Therefore, the geometry of a ‘mechanics’ plate is a two-dimensional flat surface. Plate elements will be used in meshing these surfaces. A similar situation can be found in shells. A physical beam has also three dimensions. The beam in the beam theory of mechanics is represented mathematically only in one dimension, therefore the geometry of a ‘mechanics’ beam is a one-dimensional straight line. Beam elements have to be used to mesh the lines in models. This is also true for truss structures.

### Meshing

Meshing is performed to discretize the geometry created into small pieces called elements or cells. Why do we discretize? The rational behind this can be explained in a very straightforward and logical manner. We can expect the solution for an engineering problem to be very complex, and varies in a way that is very unpredictable using functions across the whole domain of the problem. If the problem domain can be divided (meshed) into small elements or cells using a set of grids or nodes, the solution within an element can be approximated very easily using simple functions such as polynomials. The solutions for all of the elements thus form the solution for the whole problem domain.

How does it work? Proper theories are needed for discretizing the governing differential equations based on the discretized domains. The theories used are different from problem to problem, and will be covered in detail later in this topic for various types of problems. But before that, we need to generate a mesh for the problem domain.

Mesh generation is a very important task of the pre-process. It can be a very time consuming task to the analyst, and usually an experienced analyst will produce a more credible mesh for a complex problem. The domain has to be meshed properly into elements of specific shapes such as triangles and quadrilaterals. Information, such as element connectivity, must be created during the meshing for use later in the formation of the FEM equations. It is ideal to have an entirely automated mesh generator, but unfortunately this is currently not available in the market. A semi-automatic pre-processor is available for most commercial application software packages. There are also packages designed mainly for meshing. Such packages can generate files of a mesh, which can be read by other modelling and simulation packages.

Triangulation is the most flexible and well-established way in which to create meshes with triangular elements. It can be made almost fully automated for two-dimensional (2D) planes, and even three-dimensional (3D) spaces. Therefore, it is commonly available in most of the pre-processors. The additional advantage of using triangles is the flexibility of modelling complex geometry and its boundaries. The disadvantage is that the accuracy of the simulation results based on triangular elements is often lower than that obtained using quadrilateral elements. Quadrilateral element meshes, however, are more difficulty to generate in an automated manner. Some examples of meshes are given in Figures 1.3-1.7.

### Property of Material or Medium

Many engineering systems consist of more than one material. Property of materials can be defined either for a group of elements or each individual element, if needed. For different phenomena to be simulated, different sets of material properties are required. For example, Young’s modulus and shear modulus are required for the stress analysis of solids and structures, whereas the thermal conductivity coefficient will be required for a thermal analysis. Inputting of a material’s properties into a pre-processor is usually straightforward; all the analyst needs to do is key in the data on material properties and specify either to which region of the geometry or which elements the data applies. However, obtaining these properties is not always easy. There are commercially available material databases to choose from, but experiments are usually required to accurately determine the property of materials to be used in the system. This, however, is outside the scope of this topic, and here we assume that the material property is known.

Boundary, initial and loading conditions play a decisive role in solving the simulation. Inputting these conditions is usually done easily using commercial pre-processors, and it is often interfaced with graphics. Users can specify these conditions either to the geometrical identities (points, lines or curves, surfaces, and solids) or to the elements or grids. Again, to accurately simulate these conditions for actual engineering systems requires experience, knowledge and proper engineering judgments. The boundary, initial and loading conditions are different from problem to problem, and will be covered in detail in subsequent topics.

Figure 1.5. Mesh for a boom showing the stress distribution.

Figure 1.6. Mesh of a hinge joint.

## Simulation

### Discrete System Equations

Based on the mesh generated, a set of discrete simultaneous system equations can be formulated using existing approaches. There are a few types of approach for establishing the simultaneous equations.

Figure 1.7. Axisymmetric mesh of part of a dental implant.

The first is based on energy principles, such as Hamilton’s principle,the minimum potential energy principle, and so on. The traditional Finite Element Method (FEM) is established on these principles. The second approach is the weighted residual method.The third approach is based on the Taylor series, which led to the formation of the traditional Finite Difference Method (FDM). The fourth approach is based on the control of conservation laws on each finite volume (elements) in the domain. The Finite Volume Method (FVM) is established using this approach. Another approach is by integral representation, used in some mesh free methods.Engineering practice has so far shown that the first two approaches are most often used for solids and structures, and the other two approaches are often used for fluid flow simulation. However, the FEM has also been used to develop commercial packages for fluid flow and heat transfer problems, and FDM can be used for solids and structures. It may be mentioned without going into detail that the mathematical foundation of all these three approaches is the residual method. An appropriate choice of the test and trial functions in the residual method can lead to the FEM, FDM or FVM formulation.

This topic first focuses on the formulation of finite element equations for the mechanics of solids and structures based on energy principles. FEM formulations for heat transfer problems are then described, so as to demonstrate how the weighted residual method can be used for deriving FEM equations. This will provide the basic knowledge and key approaches into the FEM for dealing with other physical problems.

### Equation Solvers

After the computational model has been created, it is then fed to a solver to solve the discretized system, simultaneous equations for the field variables at the nodes of the mesh. This is the most computer hardware demanding process. Different software packages use different algorithms depending upon the physical phenomenon to be simulated. There are two very important considerations when choosing algorithms for solving a system of equations: one is the storage required, and another is the CPU (Central Processing Unit) time needed.

There are two main types of method for solving simultaneous equations: direct methods and iterative methods. Commonly used direct methods include the Gauss elimination method and the LU decomposition method. Those methods work well for relatively small equation systems. Direct methods operate on fully assembled system equations, and therefore demand larger storage space. It can also be coded in such a way that the assembling of the equations is done only for those elements involved in the current stage of equation solving. This can reduce the requirements on storage significantly.

Iterative methods include the Gauss-Jacobi method, the Gauss-Deidel method, the SOR method, generalized conjugate residual methods, the line relaxation method, and so on. These methods work well for relatively larger systems. Iterative methods are often coded in such a way as to avoid full assembly of the system matrices in order to save significantly on the storage. The performance in terms of the rate of convergence of these methods is usually very problem-dependent. In using iterative methods, pre-conditioning plays a very important role in accelerating the convergence process.

For nonlinear problems, another iterative loop is needed. The nonlinear equation has to be properly formulated into a linear equation in the iteration. For time-dependent problems, time stepping is also required, i.e. first solving for the solution at an initial time (or it could be prescribed by the analyst), then using this solution to march forward for the solution at the next time step, and so on until the solution at the desired time is obtained. There are two main approaches to time stepping: the implicit and explicit approaches. Implicit approaches are usually more stable numerically but less efficient computationally than explicit approaches.

## Visualization

The result generated after solving the system equation is usually a vast volume of digital data. The results have to be visualized in such a way that it is easy to interpolate, analyse and present. The visualization is performed through a so-called post-processor, usually packaged together with the software. Most of these processors allow the user to display 3D objects in many convenient and colourful ways on-screen. The object can be displayed in the form of wire-frames, group of elements, and groups of nodes. The user can rotate, translate and zoom into and out from the objects. Field variables can be plotted on the object in the form of contours, fringes, wire-frames and deformations. Usually, there are also tools available for the user to produce iso-surfaces, or vector fields of variable(s). Tools to enhance the visual effects are also available, such as shading, lighting and shrinking. Animations and movies can also be produced to simulate the dynamic aspects of a problem. Outputs in the form of tables, text files and x-y plots are also routinely available. Throughout this topic, worked examples with various post-processed results are given.

Advanced visualization tools, such as virtual reality, are available nowadays. These advanced tools allow users to display objects and results in a much realistic threedimensional form. The platform can be a goggle, inversion desk or even in a room. When the object is immersed in a room, analysts can walk through the object, go to the exact location and view the results. Figures 1.8 and 1.9 show an airflow field in virtually designed buildings.

Figure 1.8. Air flow field in a virtually designed building

Figure 1.9. Air flow field in a virtually designed building system

In a nutshell, this topic has briefly given an introduction to the steps involved in computer modelling and simulation. With rapidly advancing computer technology, use of the computer as a tool in the FEM is becoming indispensable. Nevertheless, subsequent topics discuss what is actually going on in the computer when performing a FEM analysis.