# FINITE ELEMENTS METHOD Purpose : To see how accurate FEM is, to find the errors inherent, and to provide suggestions

. Verification: First a simple model with one mesh will be solved by hand and by the MATLAB code provided to see if the results verify each other. Plane Stress conditions are considered. Only crucial steps are shown for the handmade solution.

Node 1 and Node 4 will be the fixed nodes and a load of 1000N will be acted on node 3 acting in the – y direction. Young Modulus will be taken 10000 N/mm2 and Poisson’s ratio ν will be 0. Solution by Hand: x and y values are in meters here: Node1 = ( 0,0 ) Node2 = ( 2,0 ) Node3 = ( 2,1 ) Node4 = ( 0,1 ) Shape Functions N1 ( r,s ) = 0.25 × ( 1 – r ) × ( 1 – s ) N2 ( r,s ) = 0.25 × ( 1 + r ) × ( 1 – s ) N3 ( r,s ) = 0.25 × ( 1 + r ) × ( 1 + s ) N4 ( r,s ) = 0.25 × ( 1 – r ) × ( 1 + s ) Jacobian Matrix = [ 1,0 ; 0,0.5 ] Inverse of Jacobian Matrix = [ 1,0 ; 0,2] Determinant of Jacobian Matrix = 0.5 With Plane Stress Conditions the D Matrix is = [ 10,0,0 ; 0,10,0 ; 0,0,5 ] The element matrices will be integrated using 2 × 2 Gauss quadrature with the following coordinates in the parent element and weights : r1 = –1 / ( 30.5 ), r2 = 1 / ( 30.5 ) s1 = –1 / ( 30.5 ), s2 = 1 / ( 30.5 )

The stiffness matrix given by: K=K(1)=∑∑Wi ×Wj ×|Je( ri,si )| × BeT ( ri,si ) × De × Be ( ri,si )

Repeating the process for four times for each Gauss Points we get the element stiffness matrix, which is the Global stiffness matrix for this structure which is given by: 5.0008 1.2500 -0.0008 -1.2500 -2.4992 -1.2500 -2.5008 1.2500 1.2500 7.5012 1.2500 2.4988 -1.2500 -3.7488 -1.2500 -6.2512 -0.0008 1.2500 5.0008 -1.2500 -2.5008 -1.2500 -2.4992 1.2500 -1.2500 2.4988 -1.2500 7.5012 1.2500 -6.2512 1.2500 -3.7488 -2.4992 -1.2500 -2.5008 1.2500 5.0008 1.2500 -0.0008 -1.2500 -1.2500 -3.7488 -1.2500 -6.2512 1.2500 7.5012 1.2500 2.4988 -2.5008 -1.2500 -2.4992 1.2500 -0.0008 1.2500 5.0008 -1.2500 1.2500 -6.2512 1.2500 -3.7488 -1.2500 2.4988 -1.2500 7.5012

The force matrix is = [ 0 ; 0 ; 0 ; 0 ; 0 ; -1 ; 0 ; 0 ] The boundary conditions matrix is = [ 0 ; 0 ; ux ; uy ; ux ; uy ; 0 ; 0 ] From 3rd row to 6th row and 3rd column to 6th column of the stiffness matrix is required. Solving K × U = D by Matlab gives the displacements: ans = -0.3998 -1.1631 0.3998 -1.2359 corresponding to 2nd Node x displacement, 2nd node y displacement, 3rd node x displacement, 3rd row y displacement in order. The final displacement vector is = [ 0 ; 0 ; -0.3998 ; -1.1631 ; 0.3998 ; -1.2359 ; 0 ; 0 ] Validation: The results make sense since the displacement at node 2 and 3 in x directions are equal but in the opposite direction, since our shape is linear, and displacement at node 3 at y direction is slightly larger than the displacement in y direction at node 4 as expected.

Solving the same system with the MATLAB Codes provided for the coursework Modified Inputs :
L = 2000; nx = 1; % dimension and number of elements in x-dir H = 1000; ny = 1; % dimension and number of elements in y-dir W = 1; % dimension in third direction E = 10000; v = 0; fglobal(nodnum*2) = -1000;

And the displacements given by the code are : displacements = 0 0 0 0 -0.4000 -1.1636 0.4000 -1.2364 Since the numbering is different, the displacement vectors are not exactly same. But corresponding displacements are same so this verifies that we are on the right track.

(The deformed shape above has a scale factor of 250.) Here we have used a rectangular element with four nodes only. To use in our final conclusions about finite elements method, the same system will be solved with the commercial software called SAP2000, which uses high-order quadratic elements and the finite elements method. The displacement at the right top corner will be used for comparison. From hereafter the code min(min(displacements)) is added to the given Matlab Code to gather the top right displacement. With the necessary modelling a displacement of -2.8212 millimetres is given at the top right corner. (With the hand solution and the Matlab code given we had a displacement of -1.1636 millimetres which is a difference of more than 100%) By a little experiment, a mesh of 2 × 2 on the Matlab Code Provided we get a displacement of -2.4982 millimetres for the system for the node considered which is the top right one. It is seen that with four – four noded quadratic elements, the displacement is closer to the one with one mesh higher order element. It can be concluded from this little experiment that, the disadvantage of four-noded element is that the stiffness is too high, so the displacement was too low. The more meshes we got, the closer we got to the result we got with the higher order element. The conclusions derived from this little experiment will be used later.

Cantilever Beam Solution

L = 6 meters, H = 0.4 meters, F = 10kN and E=200 × 103 MPa ν = 0. W=0.2 meters. (With the values given G = Shear Modulus = 100 × 103 MPa) Getting the displacement using the beam theory P -10000 L 6000 E I 200000 1067000000 G 100000 A 80000

(All the units are in N and millimetres.) Assuming the cantilever to be 1D and beam theory gives the displacement of the node on the axes of the element at far right side: =P × L3 / 3 / E / I + 6/5 × P × L / A / G =-3.384 millimetres.

Plane Stress and Plane Strain:

Plane stress solids are solids whose thickness in z direction is very small compared with dimensions in the x and y directions. External forces are applied only in the x – y plane and the stresses in the z direction σzz, σxz and σyz are all zero. For plane stress solids εzz is not zero.

Plane strain solids are solids with a very large thickness in the z direction compared to x and y. When this assumption is made, only a very small cross section is taken in account and solved. With plane strain assumption, εzz is zero, but the stress along the z direction is not.

Solving the Cantilever with Plane Stress Assumption The given cantilever above in the figure in the previous page will be solved using the Matlab Code given and SAP2000. The table below gives the displacements at the top right corner in millimetres. 30 x 2 Displacement SAP2000 -3.382 MATLAB -3.007 60 x 4 Displacement -3.384 -3.281 120 x 8 Displacement -3.385 -3.357 240 x 16 Displacement -3.386 -3.379

The meshes are chosen in this way, to keep the aspect ratio at 1:1 which gives the best results with FEM. The conclusions we can get from this is, with a 30 × 2 we get a close enough result, a result that we have expected. But we also examine that the result is actually not converging, but increasing with the more meshes we have. To examine this situation and get a better understanding of the FEM, a different cantilever will be solved and the results will be examined by using SAP2000 in detail. A cantilever with a same value of Young’s Modulus, and a Poisson’s ratio ν = 0 will be used, but this time the length and the height of the beam will be taken as 1000 millimetres and 500 millimetres. The thickness of the beam will be 50 millimetres and the loading at the tip will be 10 × 106 Newton in the –y direction. The beam theory gives us a displacement of -36.8 millimetres under this loading condition.

In the picture the displacement at y direction counters on the area objects are shown, with the key given at the right hand side of the picture. It can be clearly seen that, the displacements are on the left side where the cantilever is fixed is zero, but there is something wrong going on at the top right corner as we get smaller meshes.

Also in this picture it is clearly seen that there is also something terribly going wrong at the top right corner, in the means of stresses in y – y direction. From these two pictures, we can also see that the displacement counters are linear, where as the stress counters are constant. To this will be returned in the conclusion. We will examine the top middle node, top right node, middle right node in detail in the means of displacements and stress in Y direction. The stress values are given in kN/mm and the displacements are in mm. Top Middle Node σy-y Displacement 11.8355 -10.6714 -4.3064 -11.9362 0.3881 -12.2146 0.1314 -12.3018 Top Right Node σy-y Displacement -50.3999 -34.9637 -120.1124 -38.1282 -246.5981 -40.0747 -494.1331 -41.6944 Middle Right Node σy-y Displacement -33.2614 -33.7037 -52.6211 -35.6778 -60.1088 -36.1768 -62.5381 -36.2983

Element 1 Element 2 Element 3 Element 4

If this was a real situation we would be interested in the displacement of the tip, the shear failure, and of course, we would like to know if our beam could support the moment on it, which is maximum at the fixed end. So before making any conclusions, the stresses in x – x direction will be taken into account too, at the fixed ends, which eventually will give us the moments. Here is what the stresses look like in x – x direction, units being in kN/mm.

The detailed table in the means of stresses in the x – x direction and the displacements for the fixed nodes is : Top Left Node Element 1 Element 2 Element 3 Element 4 σ x-x 180.1991 217.1891 240.2552 255.5249 Middle Left Node σ x-x -0.1991 0.4502 0.0562 0.04085 Bottom Left Node σ x-x Moment -179.8001 7.50 × 106 -217.3285 9.04 × 106 -240.3025 10.04 × 106 -256.6101 10.64 × 106

Now let us try to visualise these values we have. We will first start with the displacements:

Diplacements
44 42 40 38 36 34 32 2x2 4x4 8x8 16 x 16 Middle Right Node Exact Solution Top Right Node

A 64 × 64 mesh gives a displacement of 44 millimetres at the top right node and a 36.40 millimetres in the middle right node which is not shown before.

Moment Values at the Fixed End
11 10.5 10 9.5 Moment Values Exact Solution

9
8.5 8 7.5 7 2x2 4x4 8x8 16 x 16

A 64 × 64 mesh gives a moment value of 11.25 ×106 N.m where as we have an exact value of 10.00×106.

Coursework Solution

Model Used: Since we are free to choose dimensions, I will be solving a cantilever beam with properties of: L = 3000 mm H = 500 mm W = 200 mm I = 2.083 ×109m4 A = 100000 mm2 E = 200000 N/mm2 Beam Theory Gives The Values: Displacement at the tip : -2.1996 mm Moment Value at the fixed end : 3 × 107 N.cm A Matlab Code has been written to get the Moment Values at the fixed end:
tugayx=L/nx tugayy=H/ny xdisplacement=displacements(ny*2+3) strain=xdisplacement/tugayx sigma=strain*E*W moment=sigma*H/2*H/2*2/3

Also because with the beam theory we get the displacement at the centre, but not at the right below corner a code has been written to get the displacement at the y direction at that node: (The node that at H/2 at the very right corner) Coordinates = (300,25)
if mod(ny,2) == 0 tugaydisp=displacements(((ny+1)*(nx+1)*2-ny)+0) else tugaydisp=displacements(((ny+1)*(nx+1)*2-ny)+1) end

First Try: With a 8 x 4 Mesh we get the results: Tip Displacement = -1.711 mm Moment Value = -2.20 × 107 N.cm With a 8 x 4 mesh we are too far from the exact result. Three improved meshes are designed and results are as follows: Mesh Exact Solution 8x4 12x2 24x4 Displacement 2.20 1.71 1.95 2.12 Moment 3.00 2.20 2.55 2.88 Exact Displacement / FEM 1.00 1.29 1.13 1.04 Exact Moment / FEM 1.00 1.36 1.18 1.04 The displacement values are in millimetres and the Moment values are × 107 N.cm. The relevant graphs are as follows: 48x8 2.18 3.02 1.01 0.99

Displacements
(mm) 2.30 2.20 2.10 2.00 1.90 1.80

1.70
1.60 8x4 12x2 Displacement 24x4 Exact Solution 48x8

Moment
(107 N.cm)
3.50

3.00

2.50

2.00

1.50

8x4

12x2
Moment

24x4
Exact Solution

48x8

As can be seen, a 48x8 mesh where the moment value starts exceeding the exact value we have. This is where stresses start to increase more than they should. It is just 1% over so we are on the safe side, so the perfect meshing for this situation can be chosen as 48x8.

The deformed shapes of 48x8 mesh. Deformed shape has a scale factor of 50. 3D Numerical Analysis Since we have deformations on the y direction, and no stresses in the z direction, when doing the 3D analysis, the most important meshes will be the ones diving the length of the beam. Meshing will be chosen on this fact. The diving at parallel to x direction does not help as much as the meshing parallel to y direction. Also meshing along the z axis is not as important for us too. Using 100 elements best results can be obtained by: ( A mesh of 25 x 2 x 2 )

We get a displacement of 2.1375 millimetres, which is very close to we got with the 2D Numerical Analysis with the 24x4 meshes.

Effect of the Poisson’s Ratio A mesh of 25 x 2 x 2 for 3D and a 25 x 2 for 2D (both plane stress and plane stress) will be used for comparison. In order to obtain the moment values we need to find the stresses in x direction in 3D analysis is to which is given by = σx-x = [ E / ( 1 + ν ) / ( 1 – ν ) ]× [ ( 1 – ν ) × εx-x + ν × εy-y + ν × εz-z ) With the meshing we have the values : dx = 12 dy = 25 dz = 10 An Excel Spreadsheet has been used for the formulation and the tables are as follows: ν
0.10 0.15 0.20 0.25 0.30 dispxx1 -0.0021 -0.002 -0.002 -0.002 -0.0018 dispyy1 -0.0007 -0.0008 -0.0008 -0.0008 -0.0008 dispzz1 -0.0002 -0.0003 -0.0004 -0.0004 -0.0006 dispxx2 -0.002 -0.002 -0.0019 -0.0019 -0.0017 dispyy2 -0.0007 -0.0008 -0.0009 -0.0009 -0.0009 dispzz2 0 0 0 0 0 dizpxx3 -0.0021 -0.002 -0.002 -0.002 -0.0018 dispyy3 -0.0007 -0.0008 -0.0008 -0.0008 -0.0008 dispzz3 0.0002 0.0003 0.0004 0.0004 0.0006

ν 0.10 0.15 0.20 0.25 0.30

εx-x -0.000175 -0.000166667 -0.000166667 -0.000166667 -0.00015 ν 0.10 0.15 0.20 0.25 0.30

εy-y -0.000028 -0.000032 -0.000032 -0.000032 -0.000032 σx-x -3278.79 -3088.83 -3077.78 -3050.67 -2914.29

εz-z -0.00002 -0.00003 -0.00004 -0.00004 -0.00006

ν 0.10 0.15 0.20 0.25 0.30

Moment ( x109 N.cm) -2.730 -2.574 -2.565 -2.542 -2.429

Tip Displacement (cm) -0.2129 -0.2123 -0.2111 -0.2110 -0.2065

The nodes 1,2,3 mentioned here are the nodes on the below surface next to where the fixed ends are. Node1=(12,0,0) Node2=(12,0,10) Node3=(12,0,20)

A mesh of 25 x 2 will be used for 2D analysis. Both plane stress and plane strain assumptions will be made. Moment values shown here are in x109 N.cm. The code was already written to get the moments and the tip displacement before. v 0.10 0.15 0.20 0.25 0.30 A General Comparison: Moment Values (x109 N.cm) 0.15 0.20 0.25 -2.570 -2.560 -2.540 -2.820 -2.800 -2.763 -2.751 -2.652 -2.512 Tip Displacements (cm) 0.150 0.200 0.250 -0.2123 -0.2111 -0.2110 -0.2126 -0.2118 -0.2107 -0.2075 -0.2023 -0.1950 Plane Stress Tip Disp Moment -0.2130 -2.8473 -0.2126 -2.8284 -0.2118 -2.8000 -0.2107 -2.7629 -0.2092 -2.7161 Plane Strain Tip Disp Moment -0.2108 -2.8115 -0.2075 -2.7514 -0.2023 -2.6524 -0.1950 -2.5119 -0.1850 -2.3199

Poisson 3D Plane Stress Plane Strain

0.10 -2.730 -2.840 -2.812

0.30 -2.420 -2.716 -2.320

Poisson 3D Plane Stress Plane Strain

0.100 -0.2129 -0.2130 -0.2108

0.300 -0.2065 -0.2092 -0.1850

First thing we notice is that the displacement in the z direction on the axis of the beam is zero. That is an expected conclusion , since the load is at the centre. Also that the displacements relative to x-y plane are symmetrical. The Poisson’s ratio’s effect can clearly be seen in the 3D analysis, with an increasing displacement of the nodes at the side in the z direction. The second observation that can be made easily is that, with an increasing Poisson’s ratio the displacements and the moment values are decreasing. This is due to the energy stored in the structure. The energy stored in the structure due to strain has increased with a greater Poisson’s ratio.