27
Finite Element Method Prof. C. S. Upadhyay Department of Mechanical Engineering Indian Institute of Technology, Kanpur Module – 3 Lecture - 2 In the previous lecture, we had seen how to do a quadratic or P equal to 2 approximations. We had defined the global basis functions which was piecewise quadratic in nature with the local support and then we went ahead and in an element talked about the quadratic shape function in the element. Piecing together the shape functions, patching them up, we got the global basis function as we have seen through the drawing in the previous lecture. (Refer Slide Time: 00:26)

Finite Element Method Mod-3 Lec-2.doc

Embed Size (px)

Citation preview

Finite Element MethodProf. C. S. UpadhyayDepartment of Mechanical Engineering Indian Institute of Technology, anpurModule ! " #ecture $ %In the previous lecture, we had seen how to do a quadratic or P equal to 2 approximations. Wehad defined the global basis functions which was piecewise quadratic in nature with the localsupport and then we went ahead and in an element talked about the quadratic shape function intheelement. Piecingtogetherthe shape functions,patching them up,we got theglobalbasisfunction as we have seen through the drawing in the previous lecture.(efer !lide "ime# $$#2%&'bviousl(, we should ask the question, wh( do we need to do a quadratic approximation, whenlinear approximationseemstobedoingagood)ob*+et usseethisthingthroughasimpleexample, this is m( domain. -ext, for exact solution to the problem do something like this (efer!lide "ime# $.#2/&. !o for this exact solution, we are going to make, for this domain let us makeatwoelement mesh. "hisism(point 0.0201. If I didalinear approximationusingthedifferential equation that we had defined then m( solution should be as we have seen, shouldgive us the exact solution at the nodes, we should get a figure like this. "he question is for thesame mesh that is fixing 0. 02 and 01 can I improve the solution* What should I do to improvethe solution* 2ixing the mesh. 'ne simple thing I can do is I can take a quadratic approximation.If I take a quadratic approximation, what most possibl( will happen is this. "he nodal value willbe exact again and then from here the quadratic will be something like this. If this was linear,possibl( this is going to be m( quadratic (efer !lide "ime# $1#2$& and this is obvious that thesolution to the approximate problem will be closer to the exact solution, if I took for the fixedmesh,a higher order approximation piecewise.If I went and get a higher than P equals to 2approximations so that next thing that we can talk of is the cubic approximation.(efer !lide "ime# $1#34&+et us do the cubic approximation or we said that the order of approximation is 1 and this isdefined b( the value of P. When I do the cubic approximation, let me take it through a simple twoelement mesh. When it is the cubic in an element that is c square is a cubic, we know that we candefine the cubic using four independent functions. We need to have, because we have to havelinear independence and completeness for the basis functions. We need to have in an elementfour such functions. +et us not bother about that now, let us draw. 5ow will I draw* "his will bepoint 0., this will be 02, 01, 03, 0/, 0% and 06. "his is m( element I.. "his is m( element I2 andextremities of the element have given b( 0., 03and 03and 06. 2or each of the element haveintroducedtwointerior nodes, fortheelement ., wehaveinterior nodes02and01fortheelement 2, we have 2 integer nodes, 0/ and 0% such that the( are equall( spaced in the element.If we have the uniform mesh, that is the mesh of the same si7e ever(where, so the h will be equalto + b( 2 in this case. What is the si7e of the element* "hat is the distance between 0. and 03 is hand between 03 and 06 is there. !o the distance between 0. and 02 will be equall( spaced, willbe h b( 1. "his distance is going to be h b( 1.2or this, let us through a picture define cubic functions, such that at the point ., 0., it has thevalue . and it has 02 01 03 and all other points, it has the value $. +et me )ust draw this function.If I want to draw this function, I can think of a function like this. "his will be a phi.. !imilarl(, Ican draw the function which has the value . at point 02and $ at all other points. What is thecubic functions which has value . at 02, $ at 0. 02 03. !o the cubic function is, if I draw, it willlook like this. "his is phi2. "he function which is . at the point 01, $ at 03, 01, 0. that functionwill be phi1 and then finall( the function which is . at the point 03 and $ at 0. 02 01.2irst is I am defining the function in the first element, and then I will continue to the secondelement. !o this function at least, it should look like, this is going to be part of phi3. "his functionis also non 7ero in this element. !o it should do the same )ob of vanishing at point 0/ 0% 06 inthe second element. "his is how we are going to define phi3. If I have to define phi/, phi/ have tovanish at 03 0% 06. !o it is going to be like this. "his is phi/. !imilarl(, phi% will be like this andphi6like this. !o if I had more elements in the mesh, I could have drawn the basis functions."hese are the globalbasis functions andas wehavebeendoingtill now,let us nowlook atrestriction to an element. !o what will do from the basis functions*(efer !lide "ime# $8#14&We know that u seven in this case, is equal to sigma i is equal to . to 6, uiphiiof x. I will notcarr( this upper subscript throughout m( presentation from now onwards. I will switch on to u29where u29will stand for the particular series that we are talking about. !o this is therepresentation of the finite element solution.5ow are (ou going to do this thing at the element level* In the element level, we have to definenow, the element level shape function. "his is 0.. "his is element k. !o this is 0. of element k. 02ofelement k, 01 ofelement k and 03 ofelement k. :t the element level, what is going to be the-.* "his is -. of element k, this is -2 of element k. !imilarl(, -1 of element k will be, it shouldbe . at the point 01. !imilarl(, I will have the -3 of element k.(efer !lide "ime# .2#$2&;( now, it should be obvious what the functional representation of these -ix)k&b( (xik>x)k&. 2or example, if I am talking of -., so in -., in this product, we are going to ignore )is equal to .. We have (x>x2k& into (x>x1k& into (x>x3k& divided b( (x.k>x2k& into (x.k>x1k& into(x.k>x3k&. "his is how we are going to define the generic ith shape function of an element which isof degree 1, so given this, now all the shape functions can be defined to the product rule. "his isthe+agrangiandefinitionaswehavepointedoutearlier."hesearecalled+agrangianshapefunction. When I give the definition of the +agrangian shape function, then we have to rememberthat we have to go from the element level definition to the global level definition. !o we have tohave the local to global numbering, how will it be done* 5ere, I will have i is equal to ., 2, 1, 3.If we check with the mesh that I had drawn the recipe is ver( simple that the element level i forthe element k, so we are talking of element Ikis equal to globall( which corresponds to 1(k>.&plus i, the wa( we have done the numbering of these points of the node that we have placed. Itgives up one to one correspondence like this, so the local i corresponds to global 1(k>.& plus i,we should check that.(efer !lide "ime# ./#.$&-ext is what is the element stiffness and load vector contribution to the global s(stem* 2or that,we are going to go back to our representation of the problem. 5ere, I am going to substitute thefinite element solution and the ith equation which we remember comes from 2 phii. !o this waswhat we had globall( and as we have done earlier, let me go back and point out a few morethings in terms of terminolog(. "his -.of the element and -3of the element are, as we havedone in the quadratic case, are called the 9dge or the ?orner !hape function. "his -2 and -1, ifwe see, onl( defined in the interior of the particular element. "he( are $ ever(where else while-. and -3 are alsonon>7ero in the neighboring element, that is wh( we call edge shape functionor vertex shape function and -2 and -1 are called internal bubble functions and if we see that this-2 k and -1 k is actuall( the total definition of the global basis function. +et us come back here.(efer !lide "ime# .6#$4&In this expression, we would like to get, this is the expression element level contribution. Weknow that at the element level this will get contribution from phi1 into k>. plus . to phi1 into k>. plus 3.When we make the element equation, we will have how man( element equations* ;ecause P isequal to 1, we have 3 shape functions in the element, we will have four equations at the elementlevel. What are these equations* "hese equations will be @i) of the kth element equal to integralover, I will go from x.of k to x3 of k 9: d-) of k divided b( dx into d-i of k divided b( dx intodx, I am not putting the distributed spring part. "his is onl( for the bar. If we have the spring, wewill have to add the additional contribution from the spring. !imilarl(, the 2i for the element k isx.of k to x3 of k f -ik dx. I am not adding the boundar( part because that will be added throughthe boundar( condition. "his is what I want to get at the boundar( level. "hese are going to bem( element level equations and we see that this one (efer !lide "ime# .8#1$& is 3 b( 3 s(stemmatrix and this one is the vector of si7e 3. We have done sufficient amount of assembl( to knowhow to assemble these things.(efer !lide "ime# 2$#$3&"o do the assembl( process for the element, we would start of b( defining the global stiffnessmatrix, @IA such that it is given the value $, this is initiali7ed and similarl(, 2I is equal to $. ?an(ou tell me what the si7e of this matrix is* "his global stiffness matrix will have a si7e, it will beequal to number of elements into 1 plus ., cross number of elements into 1 plus .. !o the matrixof si7e 1- plus ., similarl( 2I is a vector of dimension 1- plus .. When we got the kth element,we will take @IA global is equal to @IA global plus @i) of the kth element. +et me first do the loadvector part also, 2I is equal to 2I plus 2i of the element k. 5ere, I is equal to 1(k>.& plus i and A isequal to 1(k>.& plus ). We know which global entr(, which global row and column should mightelement level row and column entr( go to or assemble entr( and similarl(, for the load vector. !othis is the assembl( process.(efer !lide "ime# 22#2$&"he question is can I generali7e it* ?an I generali7e to an( P order approximation* -obod( tellsusthat theapproximationshouldbeof order ., 2, 1or 3. What governwhether I useanapproximation of order ., 2, 1 or even .$$ is* 2irst of all accurac( of the solution that we decideandalsotheeconom(ofthecomputation, soaccurac(andeconom(, thesearesomeoftheprimar( consideration that we have to have. Whatever ke( order whatever mesh si7e gives thebest solution is what we want and as quickl( as possible. ?an I generali7e what I have doneearlier for the P equal to 1 case, to a generic element of order P. !o generic element of order Pmean it should have P plus . independent shape functions. "his comes from the completeness inthe sense that, we would like to represent a pol(nomial which is degree P exactl(, using thesefunctions pol(nomial of degree P will have P plus . term. It will have P plus . independent termbecause monomial .x and so on x of P are independent monomial. !o when I want to represent itusing the shape functions, we need at least P plus . shape functions and thatx)of k& b( (xiof k >x) of k&. "his is for iequal to ., 2 up to P plus .. "his definition satisfies all the properties that is at the node x) of k,this function has a value . and all other nodes, it disappears and it is pol(nomial of order P ordegree P. "his is how we can construct generic peak order shape functions. We have to do theglobal to local or the local to global enumeration. "hat again is ver( eas(. We have the globalthere and local here. It should be quite obvious that this is going to be P(k>.& plus i global isequal to the local i, this for the element k. "his is all that we have as far as to the global to localenumeration is concerned. Provided we put the point in the wa( I had shown for P equal to 1case.(efer !lide "ime# 26#34&:fter this, once we have done this, the next )ob is to do the element calculation. !o at the elementlevel, element stiffness matrix will be of si7e P plus . b( P plus . and the element load vector isof si7e P plus .."hen I can talk of the i)th entr( of the element stiffness matrix. "his will be equaltointegral fromx. ofktoxpB.ofk. "hisoneshouldbever(careful about thelimit oftheintegration 9: d-) of k divided b( dx d-i of k divided b( dx into dx. !imilarl(, 2i of k is equal tointegral x. of k to xpB. of k, f d-i of k into dx.We have actuall( given the algorithm or a process or procedure b( which we can now constructthe element stiffness matrix and load vector for an element of an( order P. We are going be(ondP is equal to ., P is equal to 2, P is equal to 1, it could have an( P and after that obviousl(, theassembl( procedure and so on will follow.(efer !lide "ime# 1$#$8&:ssembl( from the element will be true, where we know that I is equal to P(k>.& plus i and b( )is equalto P(k>.& plus ). "hisishow thewhole assembl(will bedone. :fter we havedoneassembl(, then we will have to appl( the boundar( conditions. 5ow do we appl( the boundar(conditions*"heapproximationof theorder P,remember that wehavetalkingof Pdefineever(where, ever(where we have plain P in all element.(efer !lide "ime# 1.#.%&!oboundar(conditions, rememberhowdidweappl(theboundar(conditionsforthelinearapproximation*"hat isPisequal to., westartedof whilestartingtheCirichlet boundar(condition. 2or our problem we know that u is that at x is equal to $ is equal to u finite element,because the( have to be the same, is equal to $, so its equal to value $, which means this needsthat the coefficient u. has to be equal to $. 5ow did we go about enforcing it* "he first we didwas, we set that in the global stiffness matrix @ for the first row corresponds to u.. We are goingto set all the entries equal to $, for ) is equal to 2, 1 up to -P plus ., we should note that here wehave written that total number of unknown in the problem as, - is the number of element, P isthe order of approximation plus .. 'ne should check that this is what we get, total number ofunknown for the degrees of freedom, as the( are called for the problem or -P plus .. !o this weare going to do then we said that @.. is set equal to .. !imilarl(, 2. is equal to $. :fter that 7ero orequal to the value of the applied displacement at the end x is equal to $.(efer !lide "ime# 11#38&2or our problem, it is 7ero then we had gone and then the next part that is if I had a non 7erovalue of u. then I would have to correct the load vector as we have done in the case of the linearapproximation, but here it is not 2, u.is equal to $. I am going to now set @A. is equal to $ for A isequal to 2, 1 up to (-P plus .&. "his takes care of the Cirichlet boundar( condition. "he diagonalentr( of the first row is set to ., the load vector entr( of the first row is set to $. :ll other columnentr( in the first row is set to $ and all the first column entr( below the first row are also set to7ero."hat is wh(, we are @A.is equal to @.Ais equal to $. "his is all as far as the Cirichletboundar( condition is concerned then we have the -eumann boundar( condition. In the-eumann case, if we remember the weak form, we had ;(u, v& is equal to 2(v& which is actuall(equal to integral x is equal $ to +, fv dx plus P into v evaluated at +. Which of our global basisfunctions are going to be non 7ero at the point x equal to +* "he answer is simple which is goingto be the -P plus . global basis function. It has the value . at the point x is equal to + and allotherbasisfunctionsaregoingtodisappearat thepoint xisequal to+. Inthecaseofthe-eumann boundar( conditions, we simpl( go to the last entr(. +ast load vector entr( that wehave which is 2(-PB.&, this is set equal to 2(-PB.&plus to this I am going to add P. !o -eumannboundar(conditionsareapplied.Wehavethes(stemofequationwhichisofsi7e-PB.b(-PB., we can go use an( standard solver which can solve global problem, @ D is equal to 2.!olve it, find the values of this coefficient ui.(efer !lide "ime# 1%#/$&'ncewehavedoneit, let uslookat somefeaturesofthesesolutionsofthefiniteelementsolutions. What are the features* 'ne should note that all these uiu29(x&,the terms that for all the vu29(x&, if we take bilinear form of x which is equal to $. 5owdoes this propert( reall( help us* We see that out of this we are end of getting of ver( curiousthing.(efer !lide "ime# //#$6&2or our problem, can we choose v equal to u29 as the special case for our problem, the answer is(es, because the u29 is also $ at the point where we have given the Cirichlet boundar( conditionandever(thingelseissatisfied. Ifu29wasnot $, at thepoint wheretheCirichlet boundar(conditions are applied then this is not going to be true but for our problem this is going to betrue. If this is true, then I can also sa( from what we have done earlier which means that the ;(u,u29& is equal to ;(u29, u29&. What is this quantit(* If I go to the definition of the bilinear form, thisis equal to 9: du29 divided b( dx whole square dx. "his also remind us of ph(sical quantit(, atthe ph(sical quantit( remain with us is the strain energ( of the finite element solutions. !o thisstrain energ( as we can see is equal to . b( 2 of ; (u29, u29&.We will continue from here in the next lecture and using this definition of the strain energ( of thefinite element solution and similarl(, the strain energ( of the exact solution. !train energ( of theexact solution will be . b( 2 of the u, u. We will talk about how does the finite element solutionapproximate the exact solution with respect to the strain energ(. "hank (ou.