• Tidak ada hasil yang ditemukan

METHOD OF WEIGHTED RESIDUALS

Dalam dokumen Basic Concepts of the Finite Element Method (Halaman 142-151)

Flexure Elements

5.2 METHOD OF WEIGHTED RESIDUALS

131

Method of Weighted

Residuals

prescribed boundary conditions and an integral formulation to minimize error, in an average sense, over the problem domain. The general concept is described here in terms of the one-dimensional case but, as is shown in later chapters, extension to two and three dimensions is relatively straightforward. Given a differential equation of the general form

D[y(x),x]=0 a<x <b (5.1) subject to homogeneous boundary conditions

y(a)= y(b) =0 (5.2)

the method of weighted residuals seeks an approximate solution in the form y*(x)=

n i=1

ciNi(x) (5.3)

wherey* is the approximate solution expressed as the product of ciunknown, constant parameters to be determined and Ni(x) trial functions. The major requirement placed on the trial functions is that they be admissible functions;

that is, the trial functions are continuous over the domain of interest and satisfy the specified boundary conditions exactly. In addition, the trial functions should be selected to satisfy the “physics” of the problem in a general sense. Given these somewhat lax conditions, it is highly unlikely that the solution represented by Equation 5.3 is exact. Instead, on substitution of the assumed solution into the differential Equation 5.1, a residual error (hereafter simply called residual) results such that

R(x)= D[y*(x),x]=0 (5.4)

where R(x) is the residual. Note that the residual is also a function of the unknown parameters ci. The method of weighted residuals requires that the unknown parameters cibe evaluated such that

b a

wi(x)R(x) dx =0 i =1,n (5.5) where wi(x) represents n arbitrary weighting functions. We observe that, on integration, Equation 5.5 results innalgebraic equations, which can be solved for thenvalues ofci. Equation 5.5 expresses that the sum (integral) of the weighted residual error over the domain of the problem is zero. Owing to the requirements placed on the trial functions, the solution is exact at the end points (the boundary conditions must be satisfied) but, in general, at any interior point the residual error is nonzero. As is subsequently discussed, the MWR may capture the exact solution under certain conditions, but this occurrence is the exception rather than the rule.

Several variations of MWR exist and the techniques vary primarily in how the weighting factors are determined or selected. The most common techniques are point collocation, subdomain collocation, least squares, and Galerkin’s

method [1]. As it is quite simple to use and readily adaptable to the finite element method, we discuss only Galerkin’s method.

In Galerkin’s weighted residual method, the weighting functions are chosen to be identical to the trial functions; that is,

wi(x)= Ni(x) i =1,n (5.6)

Therefore, the unknown parameters are determined via b

a

wi(x)R(x) dx = b a

Ni(x)R(x)=0 i =1,n (5.7) again resulting in nalgebraic equations for evaluation of the unknown param- eters. The following examples illustrate details of the procedure.

Use Galerkin’s method of weighted residuals to obtain an approximate solution of the differential equation

d2y

dx210x2=5 0x1 with boundary conditions y(0)=y(1)=0.

Solution

The presence of the quadratic term in the differential equation suggests that trial functions in polynomial form are suitable. For homogeneous boundary conditions at x=aand x=b,the general form

N(x) =(xxa)p(xxb)q

withpandqbeing positive integers greater than zero, automatically satisfies the bound- ary conditions and is continuous in xax xb. Using a single trial function, the sim- plest such form that satisfies the stated boundary conditions is

N1(x) =x(x1)

Using this trial function, the approximate solution per Equation 5.3 is y*(x)=c1x(x1)

and the first and second derivatives are dy*

dx =c1(2x1) d2y*

dx2 =2c1

respectively. (We see, at this point, that the selected trial solution does not satisfy the physics of the problem, since we have obtained a constant second derivative. The differ- ential equation is such that the second derivative must be a quadratic function ofx. Never- theless, we continue the example to illustrate the procedure.)

EXAMPLE 5.1

Substitution of the second derivative of y*(x) into the differential equation yields the residual as

R(x;c1) =2c110x25 which is clearly nonzero. Substitution into Equation 5.7 gives

1 0

x(x1)(2c110x25) dx=0

which after integration yields c1=4, so the approximate solution is obtained as y*(x) =4x(x1)

For this relatively simple example, we can compare the approximate solution result with the exact solution, obtained by integrating the differential equation twice as follows:

dy dx =

d2y dx2dx =

(10x2+5) dx= 10x3

3 +5x+C1

y(x)= dy

dx dx = 10x3

3 +5x+C1

dx= 5x4 6 +5x2

2 +C1x+C2

Applying the boundary condition y(0)=0 givesC2=0, while the condition y(1)=0 becomes

5 6+5

2+C1=0

from which C1= −10/3.Hence, the exact solution is given by y(x) =5

6x4+5 2x210

3 x

00 0.1 0.2 0.3 0.4 0.5 x

y(x)

0.6 0.7 0.8 0.9 1.0

0.2 0.4 0.6 0.8 1.0 1.2

Exact Galerkin

Figure 5.1 Solutions to Example 5.1.

A graphical comparison of the two solutions is depicted in Figure 5.1, which shows that the approximate solution is in reasonable agreement with the exact solution. However, note that the one-term approximate solution is symmetric over the interval of interest.

That this is not correct can be seen by examining the differential equation. The prime driving “force” is the quadratic term in x; therefore, it is unlikely that the solution is symmetric. The following example expands the solution and shows how the method approaches the exact solution.

Obtain a two-term Galerkin solution for the problem of Example 5.1 using the trial functions

N1(x)=x(x1) N2(x)=x2(x1)

Solution

The two-term approximate solution is

y*=c1x(x1)+c2x2(x1) and the second derivative is

d2y*

dx2 =2c1+2c2(3x1) Substituting into the differential equation, we obtain the residual

R(x;c1,c2)=2c1+2c2(3x1)10x25

Using the trial functions as the weighting functions per Galerkin’s method, the residual equations become

1 0

x(x1)[2c1+2c2(3x1)10x25] dx =0 1

0

x2(x1)[2c1+2c2(3x1)10x25] dx =0 After integration and simplification, we obtain the algebraic equations

c1 3 c2

6 +4 3 =0

c1

6 2c2

15 +3 4 =0 Simultaneous solution results in

c1= 19

6 c2= 5 3

EXAMPLE 5.2

so the two-term approximate solution is y*= 19

6 x(x1)+5

3x2(x1)= 5 3x3+3

2x219 6x

For comparison, the exact, one-term and two-term solutions are plotted in Figure 5.2. The differences in the exact and two-term solutions are barely discernible.

Use Galerkin’s method of weighted residuals to obtain a one-term approximation to the solution of the differential equation

d2y

dx2+y=4x 0x1 with boundary conditions y(0)=0,y(1)=1.

Solution

Here the boundary conditions are not homogeneous, so a modification is required. Unlike the case of homogeneous boundary conditions, it is not possible to construct a trial solu- tion of the form c1N1(x) that satisfies both stated boundary conditions. Instead, we as- sume a trial solution as

y*=c1N1(x)+ f(x)

where N1(x) satisfies the homogeneous boundary conditions and f(x) is chosen to satisfy the nonhomogeneous condition. (Note that, if both boundary conditions were nonhomogeneous, two such functions would be included.) One such solution is

y*=c1x(x1)+x which satisfies y(0)=0 andy(1)=1 identically.

EXAMPLE 5.3

00 0.1 0.2 0.3 0.4 0.5 x

y(x)

0.6 0.7 0.8 0.9 1.0

0.2 0.4 0.6 0.8 1.0 1.2

Exact 1 term 2 terms

Figure 5.2 Solutions to Example 5.2.

Substitution into the differential equation results in the residual

R(x;c1)= d2y*

dx2 +y*4x =2c1+c1x2c1x+x4x =c1x2c1x+2c13x and the weighted residual integral becomes

1 0

N1(x)R(x;c1) dx = 1 0

x(x1)(c1x2+c1x2c13x) dx =0

While algebraically tedious, the integration is straightforward and yields c1=5/6

so the approximate solution is y*(x) =5

6x(x1)+x= 5 6x2+1

6x

As in the previous example, we have the luxury of comparing the approximate solution to the exact solution, which is

y(x)=4x3.565 sinx

The 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 a second 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? This question of convergence must be addressed in all approximate solution tech- niques. If we do not know the exact solution, and we seldom do, we must

1.2

0.1

0 0.2 0.3 0.4 0.5

x y(x)

0.6 0.7 0.8 0.9 1.0 1.0

0.8 0.6 0.4 0.2 0

Exact Galerkin

Figure 5.3 Solutions to Example 5.3.

develop some criterion to determine accuracy. In general, for the method of weighted residuals, the procedure is to continue obtaining solutions while increasing the number of trial functions and note the behavior of the solution. If the solution changes very little as we increase the number of trial functions, we can say that the solution converges. Whether the solution converges to the cor- rect solution is yet another question. While beyond the scope of this book, a large body of theoretical mathematics addresses the questions of convergence and whether the convergence is to the correct solution. In the context of this work, we assume that a converging solution converges to the correct solution. Certain checks, external to the solution procedure, can be made to determine the “reason- ableness” of a numerical solution in the case of physical problems. These checks include equilibrium, energy balance, heat and fluid flow balance, and others dis- cussed in following chapters.

In the previous examples, we used trial functions “concocted” to satisfy boundary conditions automatically but not based on a systematic procedure.

While absolutely nothing is wrong with this approach, we now present a proce- dure, based on polynomial trial functions, that gives a method for increasing the number of trial functions systematically and, hence, aids in examining conver- gence. The procedure is illustrated in the context of the following example.

Solve the problem of Examples 5.1 and 5.2 by assuming a general polynomial form for the solution as

y*(x) =c0+c1x+c2x2+ · · ·

Solution

For a first trial, we take only the quadratic form

y*(x) =c0+c1x+c2x2 and apply the boundary conditions to obtain

y*(0)=0=c0

y*(1)=0=c1+c2

The second boundary condition equations show that c1andc2are not independent if the homogeneous boundary condition is to be satisfied exactly. Instead, we obtain the con- straintrelationc2= −c1. The trial solution becomes

y*(x) =c1x+c2x2=c1xc1x2=c1x(1x) and is the same as the solution obtained in Example 5.1.

Next we add the cubic term and write the trial solution as y*(x)=c0+c1x+c2x2+c3x3 EXAMPLE 5.4

Application of the boundary conditions results in y*(0)=0=c0

y*(1)=0=c1+c2+c3

so we have the constraint relation

c1+c2+c3=0

Expressing the constraint as c3= −(c1+c2), the trial solution becomes

y*(x)=c1x+c2x2+c3x3=c1x+c2x2(c1+c2)x3=c1x(1x2)+c2x2(1x) and we have obtained two trial functions, each identically satisfying the boundary condi- tions. Determination of the constants for the two-term solution is left as and end-of- chapter exercise. Instead, we add the quartic term and examine the trial solution

y*(x)=c0+c1x+c2x2+c3x3+c4x4 and the boundary conditions give

c0=0 c1+c2+c3+c4=0

We use the constraint relation to eliminate (arbitrarily) c4to obtain y*(x) =c1x+c2x2+c3x3(c1+c2+c3)x4

=c1x(1x3)+c2x2(1x2)+c3x3(1x) Substituting into the differential equation, the residual is found to be

R(x;c1,c2,c3)= −12c1x2+c2(212x2)+c3(6x12x2)10x25 If we set the residual expression equal to zero and equate coefficients of powers of x, we find that the residual is exactly zero if

c1= −10 3 c2= 5

2 c3=0 c4= 5 6 so that y*(x)= 5

6x4+5 2x210

3 x and we have obtained the exact solution.

The procedure detailed in the previous example represents a systematic pro- cedure for developing polynomial trial functions and is also applicable to the case of nonhomogeneous boundary conditions. Algebraically, the process is straightforward but becomes quite tedious as the number of trial functions is increased (i.e., the order of the polynomial). Having outlined the general tech- nique of Galerkin’s method of weighted residuals, we now develop Galerkin’s finite element method based on MWR.

Dalam dokumen Basic Concepts of the Finite Element Method (Halaman 142-151)