Hutton - Fundamentals of Finite Element Analysis (523155), страница 26
Текст из файла (страница 26)
The primedriving “force” is the quadratic term in x; therefore, it is unlikely that the solution issymmetric. The following example expands the solution and shows how the methodapproaches the exact solution.EXAMPLE 5.2Obtain a two-term Galerkin solution for the problem of Example 5.1 using the trialfunctionsN 1 (x ) = x (x − 1)N 2 (x ) = x 2 (x − 1)■ SolutionThe two-term approximate solution isy* = c1 x (x − 1) + c2 x 2 (x − 1)and the second derivative isd2 y*= 2c1 + 2c2 (3x − 1)dx 2Substituting into the differential equation, we obtain the residualR(x ; c1 , c2 ) = 2c1 + 2c2 (3x − 1) − 10x 2 − 5Using the trial functions as the weighting functions per Galerkin’s method, the residualequations become1x (x − 1)[2c1 + 2c2 (3x − 1) − 10x 2 − 5] dx = 001x 2 (x − 1)[2c1 + 2c2 (3x − 1) − 10x 2 − 5] dx = 00After integration and simplification, we obtain the algebraic equationsc1c24−+ =0363c12c23− −+ =06154−Simultaneous solution results inc1 =196c2 =53Hutton: Fundamentals ofFinite Element Analysis1365.
Method of WeightedResidualsCHAPTER 5Text© The McGraw−HillCompanies, 2004Method of Weighted Residuals000.10.20.30.4x0.50.60.70.80.91.00.20.4y(x) 0.60.81.0Exact1 term2 terms1.2Figure 5.2 Solutions to Example 5.2.so the two-term approximate solution isy* =1953195x (x − 1) + x 2 (x − 1) = x 3 + x 2 −x63326For comparison, the exact, one-term and two-term solutions are plotted in Figure 5.2. Thedifferences in the exact and two-term solutions are barely discernible.EXAMPLE 5.3Use Galerkin’s method of weighted residuals to obtain a one-term approximation to thesolution of the differential equationd2 y+ y = 4xdx 20≤x ≤1with boundary conditions y(0) = 0, y(1) = 1 .■ SolutionHere the boundary conditions are not homogeneous, so a modification is required.
Unlikethe case of homogeneous boundary conditions, it is not possible to construct a trial solution of the form c1 N 1 (x ) that satisfies both stated boundary conditions. Instead, we assume a trial solution asy* = c1 N 1 (x ) + f (x )where N 1 (x ) satisfies the homogeneous boundary conditions and f(x) is chosen tosatisfy the nonhomogeneous condition.
(Note that, if both boundary conditions werenonhomogeneous, two such functions would be included.) One such solution isy* = c1 x (x − 1) + xwhich satisfies y(0) = 0 and y(1) = 1 identically.Hutton: Fundamentals ofFinite Element Analysis5. Method of WeightedResidualsText© The McGraw−HillCompanies, 20045.2 Method of Weighted Residuals1.2ExactGalerkin1.00.8y(x) 0.60.40.2000.10.20.30.40.5x0.60.70.80.91.0Figure 5.3 Solutions to Example 5.3.Substitution into the differential equation results in the residualR(x ; c1 ) =d2 y*+ y* − 4x = 2c1 + c1 x 2 − c1 x + x − 4x = c1 x 2 − c1 x + 2c1 − 3xdx 2and the weighted residual integral becomes11N 1 (x ) R(x ; c1 ) dx =0x (x − 1)(c1 x 2 + c1 x − 2c1 − 3x ) dx = 00While algebraically tedious, the integration is straightforward and yieldsc1 = 5/6so the approximate solution isy*(x ) =515x (x − 1) + x = x 2 + x666As in the previous example, we have the luxury of comparing the approximate solutionto the exact solution, which isy(x ) = 4x − 3.565 sin xThe approximate solution and the exact solution are shown in Figure 5.3 for comparison.Again, the agreement is observed to be reasonable but could be improved by adding asecond trial function.How does one know when the MWR solution is accurate enough? That is,how do we determine whether the solution is close to the exact solution? Thisquestion of convergence must be addressed in all approximate solution techniques.
If we do not know the exact solution, and we seldom do, we must137Hutton: Fundamentals ofFinite Element Analysis1385. Method of WeightedResidualsCHAPTER 5Text© The McGraw−HillCompanies, 2004Method of Weighted Residualsdevelop some criterion to determine accuracy.
In general, for the method ofweighted residuals, the procedure is to continue obtaining solutions whileincreasing the number of trial functions and note the behavior of the solution. Ifthe solution changes very little as we increase the number of trial functions, wecan say that the solution converges. Whether the solution converges to the correct solution is yet another question.
While beyond the scope of this book, a largebody of theoretical mathematics addresses the questions of convergence andwhether the convergence is to the correct solution. In the context of this work, weassume that a converging solution converges to the correct solution. Certainchecks, external to the solution procedure, can be made to determine the “reasonableness” of a numerical solution in the case of physical problems. These checksinclude equilibrium, energy balance, heat and fluid flow balance, and others discussed in following chapters.In the previous examples, we used trial functions “concocted” to satisfyboundary conditions automatically but not based on a systematic procedure.While absolutely nothing is wrong with this approach, we now present a procedure, based on polynomial trial functions, that gives a method for increasing thenumber of trial functions systematically and, hence, aids in examining convergence.
The procedure is illustrated in the context of the following example.EXAMPLE 5.4Solve the problem of Examples 5.1 and 5.2 by assuming a general polynomial form forthe solution asy*(x ) = c0 + c1 x + c2 x 2 + · · ·■ SolutionFor a first trial, we take only the quadratic formy*(x ) = c0 + c1 x + c2 x 2and apply the boundary conditions to obtainy*(0) = 0 = c0y*(1) = 0 = c1 + c2The second boundary condition equations show that c1 and c2 are not independent if thehomogeneous boundary condition is to be satisfied exactly. Instead, we obtain the constraint relation c2 = −c1 . The trial solution becomesy*(x ) = c1 x + c2 x 2 = c1 x − c1 x 2 = c1 x (1 − x )and is the same as the solution obtained in Example 5.1.Next we add the cubic term and write the trial solution asy*(x ) = c0 + c1 x + c2 x 2 + c3 x 3Hutton: Fundamentals ofFinite Element Analysis5.
Method of WeightedResidualsText© The McGraw−HillCompanies, 20045.2 Method of Weighted ResidualsApplication of the boundary conditions results iny*(0) = 0 = c0y*(1) = 0 = c1 + c2 + c3so we have the constraint relationc1 + c2 + c3 = 0Expressing the constraint as c3 = −(c1 + c2 ), the trial solution becomesy*(x ) = c1 x + c2 x 2 + c3 x 3 = c1 x + c2 x 2 − (c1 + c2 )x 3 = c1 x (1 − x 2 ) + c2 x 2 (1 − x )and we have obtained two trial functions, each identically satisfying the boundary conditions. Determination of the constants for the two-term solution is left as and end-ofchapter exercise. Instead, we add the quartic term and examine the trial solutiony*(x ) = c0 + c1 x + c2 x 2 + c3 x 3 + c4 x 4and the boundary conditions givec0 = 0c1 + c2 + c3 + c4 = 0We use the constraint relation to eliminate (arbitrarily) c4 to obtainy*(x ) = c1 x + c2 x 2 + c3 x 3 − (c1 + c2 + c3 )x 4= c1 x (1 − x 3 ) + c2 x 2 (1 − x 2 ) + c3 x 3 (1 − x )Substituting into the differential equation, the residual is found to beR(x ; c1 , c2 , c3 ) = −12c1 x 2 + c2 (2 − 12x 2 ) + c3 (6x − 12x 2 ) − 10x 2 − 5If we set the residual expression equal to zero and equate coefficients of powers of x, wefind that the residual is exactly zero ifc1 = −10352c3 = 0c2 =c4 =so that y*(x ) =565 4510x + x2 −x and we have obtained the exact solution.623The procedure detailed in the previous example represents a systematic procedure for developing polynomial trial functions and is also applicable to thecase of nonhomogeneous boundary conditions.
Algebraically, the process isstraightforward but becomes quite tedious as the number of trial functions isincreased (i.e., the order of the polynomial). Having outlined the general technique of Galerkin’s method of weighted residuals, we now develop Galerkin’sfinite element method based on MWR.139Hutton: Fundamentals ofFinite Element Analysis1405. Method of WeightedResidualsCHAPTER 5Text© The McGraw−HillCompanies, 2004Method of Weighted Residuals5.3 THE GALERKIN FINITE ELEMENT METHODThe classic method of weighted residuals described in the previous sectionutilizes trial functions that are global; that is, each trial function must apply overthe entire domain of interest and identically satisfy the boundary conditions. Particularly in the more practical cases of two- and three-dimensional problemsgoverned by partial differential equations, “discovery” of appropriate trial functions and determination of the accuracy of the resulting solutions are formidable tasks.
However, the concept of minimizing the residual error is readilyadapted to the finite element context using the Galerkin approach as follows. Forillustrative purposes, we consider the differential equationd2 y+ f (x ) = 0dx 2a≤x ≤b(5.8)subject to boundary conditionsy(a) = yay(b) = yb(5.9)The problem domain is divided into M “elements” (Figure 5.4a) bounded byM + 1 values xi of the independent variable, so that x 1 = x a and x M+1 = x b ton1(x)10x1x2x3x4x5x1x2x3x4x5x1x2x3x4x5x1x2x3x4x5n2(x)10n3(x)10n4(x)1x12x23x3xM(xa)1MxM 1(xb)(a)0(b)Figure 5.4(a) Domain xa ≤ x ≤ xb discretized into M elements. (b) First four trial functions.
Note the overlapof only two trial functions in each element domain.Hutton: Fundamentals ofFinite Element Analysis5. Method of WeightedResidualsText© The McGraw−HillCompanies, 20045.3 The Galerkin Finite Element Methodensure inclusion of the global boundaries. An approximate solution is assumedin the formM+1y*(x ) =yi n i (x )(5.10)i=1where yi is the value of the solution function at x = xi and n i (x ) is a corresponding trial function. Note that, in this approach, the unknown constant parametersci of the method of weighted residuals become unknown discrete values of thesolution function evaluated at specific points in the domain.
There also exists amajor difference in the trial functions. As used in Equation 5.10, the trial functions ni(x) are nonzero over only a small portion of the global problem domain.Specifically, a trial function n i (x ) is nonzero only in the interval x i−1 < x < x i+1 ,and for ease of illustration, we use linear functions defined as follows:n i (x ) =x − x i−1x i − x i−1x i−1 ≤ x ≤ x in i (x ) =x i+1 − xx i+1 − x ix i ≤ x ≤ x i+1n i (x ) = 0x < x i−1(5.11)x > x i+1Clearly, in this case, the trial functions are simply linear interpolation functionssuch that the value of the solution y(x ) in x i < x < x i+1 is a linear combinationof adjacent “nodal” values yi and yi+1 .
The first four trial functions are as shownin Figure 5.4b, and we observe that, in the interval x 2 ≤ x ≤ x 3 , for example, theapproximate solution as given by Equation 5.10 isy*(x ) = y2 n 2 (x ) + y3 n 3 (x ) = y2x3 − xx − x2+ y3x3 − x2x3 − x2(5.12)(The trial functions used here are linear but higher-order functions can also beused, as is subsequently demonstrated by application of the technique to a beamelement.)Substitution of the assumed solution (5.10) into the governing Equation 5.8yields the residualR(x ; yi ) =M+1 2i=1 M+1 d2d y*+ f (x ) ={yi n i (x )} + f (x )dx 2dx 2i=1(5.13)to which we apply Galerkin’s weighted residual method, using each trial functionas a weighting function, to obtainxbxbn j (x ) R(x ; yi ) dx =xan j (x )xaM+1i=1d2{yi n i (x )} + f (x ) dx = 0dx 2j = 1, M + 1(5.14)141Hutton: Fundamentals ofFinite Element Analysis1425. Method of WeightedResidualsCHAPTER 5Text© The McGraw−HillCompanies, 2004Method of Weighted ResidualsIn light of Equation 5.11 and Figure 5.4b, we observe that, in any intervalx j ≤ x ≤ x j+1 , only two of the trial functions are nonzero.