finite elements method

Upload: fatabass

Post on 30-May-2018

248 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Finite Elements Method

    1/13

    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 codeprovided to see if the results verify each other. Plane Stress conditions are considered. Only crucialsteps 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/mm2and Poissons 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 coordinatesin 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 )| B

    eT( ri,si ) D

    e B

    e( ri,si )

  • 8/9/2019 Finite Elements Method

    2/13

    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

    rowy 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 theopposite direction, since our shape is linear, and displacement at node 3 at y direction is slightlylarger than the displacement in y direction at node 4 as expected.

  • 8/9/2019 Finite Elements Method

    3/13

    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-dirH = 1000; ny = 1; % dimension and number of elements in y-dir

    W = 1; % dimension in third directionE = 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 correspondingdisplacements 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 aboutfinite elements method, the same system will be solved with the commercial software calledSAP2000, 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 codemin(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 millimetreswhich 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.4982millimetres for the system for the node considered which is the top right one.

    It is seen that with fourfour noded quadratic elements, the displacement is closer to the one withone mesh higher order element. It can be concluded from this little experiment that, thedisadvantage of four-noded element is that the stiffness is too high, so the displacement was toolow. 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.

  • 8/9/2019 Finite Elements Method

    4/13

    Cantilever Beam Solution

    L = 6 meters, H = 0.4 meters, F = 10kN and E=200 103MPa = 0. W=0.2 meters. (With the values

    given G = Shear Modulus = 100 103

    MPa)

    Getting the displacement using the beam theory

    P L E I G A

    -10000 6000 200000 1067000000 100000 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 axesof 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 isvery 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 planestress solids zz is not zero.

    Plane strain solids are solids with a very large thickness in the zdirection 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 alongthe z direction is not.

  • 8/9/2019 Finite Elements Method

    5/13

    Solving the Cantilever with Plane Stress Assumption

    The given cantilever above in the figure in the previous page will be solved using the Matlab Codegiven and SAP2000.

    The table below gives the displacements at the top right corner in millimetres.

    30 x 2 60 x 4 120 x 8 240 x 16

    Displacement Displacement Displacement Displacement

    SAP2000 -3.382 -3.384 -3.385 -3.386

    MATLAB -3.007 -3.281 -3.357 -3.379

    The meshes are chosen in this way, to keep the aspect ratio at 1:1 which gives the best results withFEM.

    The conclusions we can get from this is, with a 30 2 we get a close enough result, a result that wehave expected. But we also examine that the result is actually not converging, but increasing withthe more meshes we have.

    To examine this situation and get a better understanding of the FEM, a different cantilever will besolved and the results will be examined by using SAP2000 in detail. A cantilever with a same value ofYoungs Modulus, and a Poissons ratio = 0 will be used, but this time the length and the height ofthe beam will be taken as 1000 millimetres and 500 millimetres. The thickness of the beam will be50 millimetres and the loading at the tip will be 10 10

    6Newton in they 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 keygiven at the right hand side of the picture. It can be clearly seen that, the displacements are on theleft side where the cantilever is fixed is zero, but there is something wrong going on at the top rightcorner as we get smaller meshes.

  • 8/9/2019 Finite Elements Method

    6/13

    Also in this picture it is clearly seen that there is also something terribly going wrong at the top rightcorner, 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 thestress 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 ofdisplacements and stress in Y direction. The stress values are given in kN/mm and the displacementsare in mm.

    Top Middle Node Top Right Node Middle Right Node

    y-y Displacement y-y Displacement y-y Displacement

    Element 1 11.8355 -10.6714 -50.3999 -34.9637 -33.2614 -33.7037

    Element 2 -4.3064 -11.9362 -120.1124 -38.1282 -52.6211 -35.6778

    Element 3 0.3881 -12.2146 -246.5981 -40.0747 -60.1088 -36.1768

    Element 4 0.1314 -12.3018 -494.1331 -41.6944 -62.5381 -36.2983

    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 ismaximum at the fixed end. So before making any conclusions, the stresses in x x direction will betaken 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.

  • 8/9/2019 Finite Elements Method

    7/13

    The detailed table in the means of stresses in the x x direction and the displacements for the fixednodes is :

    Top Left Node Middle Left Node Bottom Left Node

    x-x x-x x-x Moment

    Element 1 180.1991 -0.1991 -179.8001 7.50 106

    Element 2 217.1891 0.4502 -217.3285 9.04 106

    Element 3 240.2552 0.0562 -240.3025 10.04 106

    Element 4 255.5249 0.04085 -256.6101 10.64 106

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

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

    A 64 64 mesh gives a moment value of 11.25 106

    N.m where as we have an exact value of10.0010

    6.

    32

    34

    36

    38

    40

    42

    44

    2 x 2 4 x 4 8 x 8 16 x 16

    Diplacements

    Middle Right Node

    Exact Solution

    Top Right Node

    7

    7.5

    8

    8.5

    9

    9.5

    10

    10.5

    11

    2 x 2 4 x 4 8 x 8 16 x 16

    Moment Values at the Fixed End

    Moment Values

    Exact Solution

  • 8/9/2019 Finite Elements Method

    8/13

    Conclusions and an Understanding of the FEM

    From this second cantilever example we can see the problems in a much bigger detail. Now theerrors inherent in FEM will tried to be explained.

    From the strength of materials, it is known that the first derivate of the displacements gives us the

    relative displacements, and the derivate of the , gives us the stresses, . (We have examined theresults in our SAP2000 outputs, where as our displacement vectors were linear, but our stresseswere constant lines.)

    In the finite elements method, we basically know the material properties, and where our forces are,and where our structure cannot move, i.e. has restraints. These are called boundary conditions.What we do not know is the displacements we have. Once we find the displacements, we can findthe stresses.

    For finding the displacements, comes the shape functions to help. A structure, (explanation will bekept in 2D for simplicity) just like the first example solved in this paper will be considered. The shapefunction of a particular structure gives us the displacements (or any other function) in the area ofour structure, in respect to the nodes on it.

    In the first example, we saw that using a higher-order element, i.e. a structure with a shape functioncontributed by more nodes, gives us a much better solution. We got the same answer with a 4 meshsolution, which we got with one element with a higher order.

    Also, even if we had the perfect shape functions, it is still impossible to solve the differentialequations, that is why these equations are solved numerically. This is a great opportunity for non100% accurate solutions too.

    Solving the cantilever examples, it is seen that the displacements at the nodes we have taken intoaccount, (which are the important ones) tend to go to infinity. Also, the stresses in y-y direction atthese nodes, at the stress values we got at the fixed ends tend to go to infinity too.

    So if we had a very powerful computer, and had 1000x1000 mashes, we would probably have anincredible amount of a displacement at the top right corner, which would result in a shear failure,and a very large moment value which should not be.

    But how is this possible?

    This is because the smaller meshes we have, the greater stresses we have in that particular mesh.Let us just visualise the mesh element we have at the top right corner only. We have a point load atthe top right node, and (roughly speaking, simplifying the FEM procedure greatly) that load mustsomehow be transported to the nodes on that particular element, and then to the nodes of themeshes those nodes are on until they the force vectors find a node where they can get the reactionso that they have nowhere else to go anymore. With this bearing in mind, it is now easier tounderstand, that with the smaller mesh we have, with the load value on that particular node notchanging, the stress will always increase and increase, and the deflection will follow the behaviour ofstress.

    One possible way to avoid this can be not using only one point load, which causes this problem in

    the first place. Although this procedure is based on simplification mainly, we never have point loadsin real life either. So say, if we were to design a load standing on a cantilever beam, instead of usinga point load at the end of the beam, we might as well find the base length of the load, and spreadthe load on the nodes, on the meshes we have.

    Also as can be seen from the note below the last table, even though we had a 64 x 64 mesh and anextreme displacement at the top right corner, the displacement on the axes, at the right point neverpassed the exact solution. So instead of using that node, the node at the axes could be used.

  • 8/9/2019 Finite Elements Method

    9/13

    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 109m

    4

    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/nxtugayy=H/nyxdisplacement=displacements(ny*2+3)strain=xdisplacement/tugayxsigma=strain*E*Wmoment=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 belowcorner 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) == 0tugaydisp=displacements(((ny+1)*(nx+1)*2-ny)+0) elsetugaydisp=displacements(((ny+1)*(nx+1)*2-ny)+1) end

  • 8/9/2019 Finite Elements Method

    10/13

    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 48x8

    Displacement 2.20 1.71 1.95 2.12 2.18

    Moment 3.00 2.20 2.55 2.88 3.02

    Exact Displacement / FEM 1.00 1.29 1.13 1.04 1.01

    Exact Moment / FEM 1.00 1.36 1.18 1.04 0.99

    The displacement values are in millimetres and the Moment values are 107

    N.cm.

    The relevant graphs are as follows:

    1.60

    1.70

    1.80

    1.90

    2.00

    2.10

    2.20

    2.30

    8x4 12x2 24x4 48x8

    (mm)

    Displacements

    Displacement Exact Solution

    1.50

    2.00

    2.50

    3.00

    3.50

    8x4 12x2 24x4 48x8

    (107 N.cm)

    Moment

    Moment Exact Solution

  • 8/9/2019 Finite Elements Method

    11/13

    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 thesafe side, so the perfect meshing for this situation can be chosen as 48x8.

    3D Numerical Analysis

    Since we have deformations on the y direction, and no stresses in the z direction, when doing the 3Danalysis, 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. Alsomeshing along the z axis is not as important for us too. Using 100 elements best results can beobtained 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 NumericalAnalysis with the 24x4 meshes.

    The deformed shapes of 48x8 mesh. Deformed shape has a scale factor of 50.

  • 8/9/2019 Finite Elements Method

    12/13

    Effect of the Poissons 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 forcomparison.

    In order to obtain the moment values we need to find the stresses in x direction in 3D analysis is towhich 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:

    dispxx1 dispyy1 dispzz1 dispxx2 dispyy2 dispzz2 dizpxx3 dispyy3 dispzz3

    0.10 -0.0021 -0.0007 -0.0002 -0.002 -0.0007 0 -0.0021 -0.0007 0.0002

    0.15 -0.002 -0.0008 -0.0003 -0.002 -0.0008 0 -0.002 -0.0008 0.0003

    0.20 -0.002 -0.0008 -0.0004 -0.0019 -0.0009 0 -0.002 -0.0008 0.0004

    0.25 -0.002 -0.0008 -0.0004 -0.0019 -0.0009 0 -0.002 -0.0008 0.0004

    0.30 -0.0018 -0.0008 -0.0006 -0.0017 -0.0009 0 -0.0018 -0.0008 0.0006

    x-x y-y z-z

    0.10 -0.000175 -0.000028 -0.00002

    0.15 -0.000166667 -0.000032 -0.00003

    0.20 -0.000166667 -0.000032 -0.00004

    0.25 -0.000166667 -0.000032 -0.00004

    0.30 -0.00015 -0.000032 -0.00006

    x-x

    0.10 -3278.79

    0.15 -3088.83

    0.20 -3077.78

    0.25 -3050.67

    0.30 -2914.29

    Moment ( x109

    N.cm) Tip Displacement (cm)

    0.10 -2.730 -0.2129

    0.15 -2.574 -0.2123

    0.20 -2.565 -0.2111

    0.25 -2.542 -0.2110

    0.30 -2.429 -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)

  • 8/9/2019 Finite Elements Method

    13/13

    A mesh of 25 x 2 will be used for 2D analysis. Both plane stress and plane strain assumptions will bemade. Moment values shown here are in x10

    9N.cm. The code was already written to get the

    moments and the tip displacement before.

    Plane Stress Plane Strain

    v Tip Disp Moment Tip Disp Moment

    0.10 -0.2130 -2.8473 -0.2108 -2.8115

    0.15 -0.2126 -2.8284 -0.2075 -2.7514

    0.20 -0.2118 -2.8000 -0.2023 -2.6524

    0.25 -0.2107 -2.7629 -0.1950 -2.5119

    0.30 -0.2092 -2.7161 -0.1850 -2.3199

    A General Comparison:

    Moment Values (x109 N.cm)

    Poisson 0.10 0.15 0.20 0.25 0.303D -2.730 -2.570 -2.560 -2.540 -2.420

    Plane Stress -2.840 -2.820 -2.800 -2.763 -2.716

    Plane Strain -2.812 -2.751 -2.652 -2.512 -2.320

    Tip Displacements (cm)

    Poisson 0.100 0.150 0.200 0.250 0.300

    3D -0.2129 -0.2123 -0.2111 -0.2110 -0.2065

    Plane Stress -0.2130 -0.2126 -0.2118 -0.2107 -0.2092

    Plane Strain -0.2108 -0.2075 -0.2023 -0.1950 -0.1850

    First thing we notice is that the displacement in the z direction on the axis of the beam is zero. Thatis an expected conclusion , since the load is at the centre. Also that the displacements relative to x-yplane are symmetrical. The Poissons ratios effect can clearly be seen in the 3D analysis, with anincreasing displacement of the nodes at the side in the z direction.

    The second observation that can be made easily is that, with an increasing Poissons ratio thedisplacements 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 hasincreased with a greater Poissons ratio.