0% found this document useful (0 votes)
146 views20 pages

Theory of The Finite Element Method

The document summarizes the theory behind the finite element method for linear elasticity problems. It describes how a finite element mesh is constructed and the displacements at nodes are approximated. Shape functions are used to interpolate displacements within each element. The strain and stress are related through constitutive equations to calculate strain energy. Element stiffness matrices are assembled into a global stiffness matrix, and loading is applied as a residual force vector. Minimizing the total potential energy results in a system of equations that can be solved for nodal displacements.

Uploaded by

Rahan Ozuari
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views20 pages

Theory of The Finite Element Method

The document summarizes the theory behind the finite element method for linear elasticity problems. It describes how a finite element mesh is constructed and the displacements at nodes are approximated. Shape functions are used to interpolate displacements within each element. The strain and stress are related through constitutive equations to calculate strain energy. Element stiffness matrices are assembled into a global stiffness matrix, and loading is applied as a residual force vector. Minimizing the total potential energy results in a system of equations that can be solved for nodal displacements.

Uploaded by

Rahan Ozuari
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

EN224: LINEAR ELASTICITY

GIKI logo

ME 466 : Introduction to Finite Element

Method 2. Theory of the Finite Element Method


We now have all the background material required to develop the finite element method. The idea is simple. We follow the procedures outlined in Section 2 to approximate the displacement field within a solid. We then minimize the potential energy to obtain the best approximation to the solution, as described in Section 8. We merely need to work out the details. Plane Strain FEM with constant strain, triangular elements. Consider a standard, linear elastic, plane strain boundary value problem. We wish to find a displacement field satisfying the usual field equations and boundary conditions. Begin by defining a finite element mesh to approximate the geometry of the solid, as discussed in Section 2.

2.1 The finite element mesh


For simplicity, we will assume that the elements are 3 noded triangles, as shown in the picture below (although this is a bad choice of elements for most problems).

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (1 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

2.2 The global displacement vector


We will approximate the displacement field by interpolating between values at the nodes, as described in Section 2. To this end, we need to find a convenient way to store the nodal denote the unknown displacement vector at nodes . In an displacements. Let FEM code, the displacements for a plane stress or plane strain problem are normally stored as a column vector like the one shown below:

The unknown displacement components will be determined by minimizing the potential energy of the solid with respect to the nodal displacements.

2.3 Element interpolation functions

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (2 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

To calculate the potential energy, we need to be able to compute the displacements within each element. This is done by interpolation. Consider a triangular element, with nodes a, b, c at its corners. Let denote the coordinates of the corners. Define the element interpolation functions (also known as shape functions) as follows

These shape functions are constructed so that They vary linearly with position within the element Each shape function has a value of one at one of the nodes, and is zero at the other two. We then write
file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (3 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

One can readily verify that this expression gives the correct values for triangle.

at each corner of the

2.4 Element strains, stresses and strain energy density


We can now compute the strain distribution within the element and hence determine the strain energy density. It is convenient to express the results in matrix form:

The factor of 2 multiplying the shear strains in the strain vector has been introduced for convenience. is constant. It Note that, for linear triangular elements, the matrix of shape function derivatives depends only on the coordinates of the corners of the element, and does not vary with position within the element. This is not the case for most elements for example, you may recall from Homework 2 that varies with position for a square element.

Now, we can compute the strain energy density within the element. Begin by computing the stresses within the element. For plane strain deformation, we have that

For plane stress, the result is

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (4 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

The strain energy density is

Now, express these results in terms of the nodal displacements for the element

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (5 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

We can now compute the total strain energy stored within the element. Because is constant, we merely need to multiply the strain energy density by the area of the element. Recall that the area of the triangle can be computed from the coordinates of its corners as follows

Hence, the total strain energy of the element is

2.5 The element stiffness matrix


We re-write this by defining the element stiffness matrix

so that

Observe that, because the material property matrix also symmetric. To see this, note that

is symmetric, the element stiffness matrix is

2.6 The Global stiffness matrix


The total strain energy of the solid may be computed by adding together the strain energy of each element:

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (6 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

It is more convenient to express W in terms of the vector

which contains all the nodal

displacements, rather than using for each element to describe the displacements. This is because several elements may share the same node. We will illustrate how this is done by considering the simplest possible finite element mesh, shown below

For the two elements, we would write

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (7 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

If we wanted to, we could add the missing terms to each element displacement vector:

We can now collect together corresponding terms in the two element stiffness matrices to express this as

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (8 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

We can therefore write

where

is known as the Global stiffness matrix. It is the sum of all the element stiffness matrices.

Because the element stiffness matrix is symmetric, the global stiffness matrix must also be symmetric. To assemble the global stiffness matrix for a plane strain or plane stress mesh with N nodes, we use the following procedure. 1. Note that for nodes, there will be unknown displacement components (2 at each global stiffness matrix,

node). Therefore, we start by setting up storage for a and set each term in the matrix to zero. 2. Next, begin a loop over the elements. 3. For the current element, assemble the element stiffness matrix

4. Add the element stiffness matrix to the global stiffness matrix, using the following procedure. Let a, b, c denote the numbers of the nodes on the 3 corners of the element. Let for

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (9 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

i=16, j=16 denote the terms in the the element stiffness matrix. Let for n=12N, m=12N denote the terms in the global stiffness matrix. Then,

Here, the symbol += means that the term on the left is incremented by the term on the right, following standard C syntax. 5. Proceed to the next element.

2.7 Boundary loading


We have now found a way to compute the strain energy for a finite element mesh. Next, we need to compute the boundary term in the potential energy. Boundary loading will be specified as follows:

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (10 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

1. The element on which the loading acts 2. The face of the element which is loaded 3. The traction vector t (force per unit area) that acts on the face of the element. The traction is assumed to be constant on the face of any one element.

Now, we compute the contribution to the potential energy due to the traction acting on the face of one element.

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (11 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

For the element shown, the contribution to the potential energy would be

Recall that the displacements vary linearly within a 3 noded triangle. Therefore, we can write

So, since the tractions are uniform

Abbreviate this as

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (12 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

The vector r is referred to as the `residual force vector Body Forces The same approach may be used to include the effects of external body forces. The details are left as an exercise.

2.8 Global residual force vector


The total contribution to the potential energy due to boundary loading on all element faces is

It is more convenient to express this in terms of the global displacement vector

where is the global residual force vector. The global residual force vector for a mesh with N nodes is assembled as follows. 1. The residual force vector has length 2N (2 entries per node). Reserve storage for a vector of length 2N and initialize to zero 2. Loop over elements 3. Determine which face of the element is loaded. Let a, b denote the node numbers attached to this face. Determine the residual force vector for the element face. Let the terms in the element face residual vector. Let , n=12N denote the terms in the global residual force vector. Then , i=14 denote

2.9 Minimizing the Potential Energy


We have set up the following expression for the potential energy of a finite element mesh
file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (13 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

Now, minimize V

where we have noted that

Simplify this by noting that

is symmetric

This is a system of 2N simultaneous linear equations for the 2N unknown nodal displacements. Standard computational techniques such as Gaussian elimination, Cholesky factorization or conjugate gradient methods may be used to solve the system of equations.

2.10 Eliminating prescribed displacements


So far, we have seen how to calculate displacements in a finite element mesh which is subjected to prescribed loading. What if displacements are prescribed instead? If this is the case, the stiffness matrix and residual are first assembled exactly as described in the preceding section. They are then modified to enforce the constraint. Suppose that the finite element equations after assembly have the form
file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (14 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

To prescribe displacements for any node, we simply replace the equation for the appropriate degrees of freedom with the constraint. For example, to force equations to , we could modify the finite element

Thus, the equation for

has been replaced with the constraint

This procedure works, but has the disadvantage that the modified stiffness matrix is no longer symmetric. It is preferable to modify the stiffness and residual further, to retain symmetry. To do so, we eliminate the constrained degrees of freedom from all rows of the stiffness matrix. This is best illustrated by example. Suppose our modified stiffness matrix has the form

Now, we wish to set each entry in the second column (apart from the diagonal) to zero, so that the stiffness is symmetric. Recall that we can add and subtract equations in the system from one another without affecting the solution. Therefore, to symmetrize the stiffness matrix in our example, we can subtract appropriate multiples of the second row so as to set each entry in the second column to zero.

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (15 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

2.11 Example FEM code using constant strain triangles.


To illustrate just how simple the FEM algorithm is, we give a complete listing of a FEM code using constant strain triangular elements. The code is quite general, in that it can handle an arbitrary number of elements, and can handle arbitrary stress and displacement boundary conditions. For clarity, it has been coded using MAPLE, so you dont need to know any programming language to understand it. You can also play with the code yourself. You could even use MAPLE to convert the code into C or FORTRAN, and develop the code further for your own use. We will begin by describing what the code does, and then give a full listing. The code reads an input file which specifies the material properties , the coordinates of all the nodes, the element connectivity, and the boundary conditions. The input file must have the following format. Do not separate numbers with commas! Title of the Job Youngs Modulus E, Poissons ratio Number of nodes N, Node#, coordinate, coordinate,

Node#, coordinate, coordinate, Number of elements M, Element#, Node number for 1st node, 2nd node,3rd node Element#, Node number for 1st node, 2nd node,3rd node Number of prescribed displacements L, Node number of 1st prescribed displacement, component (1 or 2), value of the displacement, Node number of 2nd prescribed displacement, component (1 or 2), value of the displacement, Node number of Lth prescribed displacement, component (1 or 2), value of the displacement, Number of loaded element faces K,

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (16 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

Number of first loaded element, face number (1,2,or3), traction

, traction , traction

, ,

Number of second loaded element, face number (1,2,or3), traction Number of Kth loaded element, face number (1,2,or3), traction

, traction

The code produces an output file, which lists all the nodal displacements, as well as the stresses and strains within each element. As an example, we will solve the simple 2 element, 4 node problem shown below

The input file for this problem is listed below: Test 10. 0.33 4 1 0.0 0.0 2 1.0 0.0 3 1.0 1.0 4 0.0 1.0 2 1123 2134 3 1 1 0.0 1 2 0.0 2 2 0.0
file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (17 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

1 2 2 0.0 2.0 The output file produced after running the program looks like this: Test ********************************* Number of Nodes and Elements: 4 2 Young's Modulus 10.0000 Poisson's Ratio .3300 ********* Nodal Coordinates *********** Node# x1 x2 1 0.0000 0.0000 2 1.0000 0.0000 3 1.0000 1.0000 4 0.0000 1.0000 ********* Element Connectivity ********** Element Node 1 Node 2 Node3 1123 2134 ********* Presecribed Displacements *********** Node# Component Value 1 1 0.0000 1 2 0.0000 2 2 0.0000 ********* Presecribed Loads *********** Element Side# Node 1 Node 2 P1 P2 2 2 3 4 0.0000 2.0000 ******** Computed Nodal Displacements ********* Node u1 u2 1 0.0000 0.0000 2 -.0660 0.0000 3 -.0660 .2000 4 -.0000 .2000 ******** Element Strains and Stresses *********

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (18 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

Element e_11 e_22 e_12 s_11 s_22 s_12 1 -.0660 .2000 -.0000 .0000 2.0000 -.0000 2 -.0660 .2000 0.0000 .0000 2.0000 0.0000 Now, well take a detailed look at the FEM code. It is divided into 7 main sections: 1. Read the input file and set up data structures to store nodal coordinates, element connectivity and boundary conditions 2. Print the input data and plot the mesh on the screen 3. Define the element stiffness matrix 4. Define the element residual vector 5. Assemble the global stiffness matrix 6. Assemble the residual force vector 7. Modify the stiffness to account for constrained degrees of freedom 8. Solve the FEM equations 9. Plot the deformed mesh on the screen 10. Write results to a file. A listing of the MAPLE program, with comments, is given here. Dowload by right clicking here and using 'Save as...'; call the file FEM.mws. You can download a copy of the input file for the simple example above file by right clicking here. You should use "save target as..." to save the file as FEM.txt. You can load it into MAPLE by starting MAPLE, then using the fileopen(specify file name) to read the Maple file. It should appear within a MAPLE window. You will need to change two lines of the file to make it run properly. First, find the line that reads
s

infilename :=`D:/JABfiles/classes/en175_2001/FEM_prog/femdat.txt`:

and change the path to the full path of a directory on your filespace, i.e. infile := fopen(`your directory/fem.dat`,READ): Note that you must use forward slashes / to denote directory roots, even on an NT system. The results will be printed in an outfile called fem dat.out.txt. You can click here to download the sample input file for the 2 element problem described earlier (make sure you save the file to your directory/fem.dat so that MAPLE can read it). And here is the input file for this mesh:

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (19 of 20)22.01.2006 17:42:08

EN224: LINEAR ELASTICITY

You can try a number of tests to understand how the program works. You can add print() commands to print out any intermediate variables you like for example, you could examine each element stiffness matrix as it is added to the global stiffness. You can also do tests like computing the determinant of the global stiffness (The determinant should be zero before the boundary constraints are added. Can you see why?)

file:///E|/calisma/FEM/Downloads%20-%20FEM/Theory%20of%20the%20Finite%20Element%20Method.htm (20 of 20)22.01.2006 17:42:08

You might also like