Ritz Method

8
1.9 Trial function method — Ritz’s method We consider the problem governed by the following Poisson’s equation 2 u(x, y)= ¯ f (x, y) in D (105) where u is the function to be determined and ¯ f is a given fuction. The boundary condition is given by u = 0 on the boudnary S. To solve eq.(105) is equivalent to find the function u by minimizing the functional J [u]= ∫∫ D (u 2 x + u 2 y +2 ¯ fu)dxdy (106) Now the variational problem is approximately solved by assuming that the function u is expressed by using the trial function as follows: u(x, y) c 1 w 1 (x, y)+ c 2 w 2 (x, y)+ ... + c n w n (x, y) (107) where c 1 ,...,c n are the coefficients and w 1 ,...,w n are linearly independent functions called trial bases. Note that each trial basis w i should satisfy w i = 0 on the boundary S. Substituting eq.(107) into eq.(106), the functional J [u] can be expressed in the following form J [u(c i )] n i=1 n k=1 c i c k J 2 [w i ,w k ]+2 n k=1 c k J 1 [w k ]+ J 0 (108) where J 2 [u, v] = ∫∫ D (u x v x + u y v y )dxdy (109) J 1 [u] = ∫∫ D ¯ fudxdy, J 0 =0 (110) The procedure for minimizing J [u] leads to ∂J ∂c i =0 (i =1,...,n) (111) which produces the system of equations to determine c k : n k=1 c k J 2 [w i ,w k ]+ J 1 [w i ]=0. (i =1,...,n) (112) The above-mentioned method is called the Ritz’s method. The keypoint of the Ritz’s method is how to select appropriate functions for trial basis w 1 ,...,w n . Example 1.9.1 Consider the following boundary value problem: xu 00 + u 0 + x 2 - 1 x u + x 2 =0, for 1 x 2 (113) subjected to the boundary condition u(1) = u(2) = 0. The exact solution to the above equation is given by u(x)=3.6072J 1 (x)+0.75195Y 1 (x) - x, where J 1 and Y 1 are Bessel function and Neumann function of the first order, respectively. For example, we have u(1.5) = 0.2024. The variational principle equivalent to the above boundary value problem is to find the solution to minimize the functional J [u]= 1 2 2 1 ( x(u 0 ) 2 - x 2 - 1 x u 2 - 2x 2 u ) dx (114) Now we approximate the function u by u c 1 w 1 = c 1 (x - 1)(2 - x). It then follows that J [u(c 1 )] = 1 2 2 1 { x(c 1 w 0 1 ) 2 - x 2 - 1 x (c 1 w 1 ) 2 - 2x 2 c 1 w 1 } dx (115) 14

description

Ritz method-Weak form

Transcript of Ritz Method

Page 1: Ritz Method

1.9 Trial function method — Ritz’s method

We consider the problem governed by the following Poisson’s equation

∇2u(x, y) = f(x, y) in D (105)

where u is the function to be determined and f is a given fuction. The boundary condition is given byu = 0 on the boudnary S.

To solve eq.(105) is equivalent to find the function u by minimizing the functional

J [u] =

∫ ∫D

(u2x + u2

y + 2fu)dxdy (106)

Now the variational problem is approximately solved by assuming that the function u is expressed byusing the trial function as follows:

u(x, y) ≈ c1w1(x, y) + c2w2(x, y) + . . .+ cnwn(x, y) (107)

where c1, . . . , cn are the coefficients and w1, . . . , wn are linearly independent functions called trial bases.Note that each trial basis wi should satisfy wi = 0 on the boundary S.

Substituting eq.(107) into eq.(106), the functional J [u] can be expressed in the following form

J [u(ci)] ≈n∑

i=1

n∑k=1

cickJ2[wi, wk] + 2n∑

k=1

ckJ1[wk] + J0 (108)

where

J2[u, v] =

∫ ∫D

(uxvx + uyvy)dxdy (109)

J1[u] =

∫ ∫D

fudxdy, J0 = 0 (110)

The procedure for minimizing J [u] leads to

∂J

∂ci= 0 (i = 1, . . . , n) (111)

which produces the system of equations to determine ck:

n∑k=1

ckJ2[wi, wk] + J1[wi] = 0. (i = 1, . . . , n) (112)

The above-mentioned method is called the Ritz’s method. The keypoint of the Ritz’s method is how toselect appropriate functions for trial basis w1, . . . , wn.

Example 1.9.1 Consider the following boundary value problem:

xu′′ + u′ +x2 − 1

xu+ x2 = 0, for 1 ≤ x ≤ 2 (113)

subjected to the boundary condition u(1) = u(2) = 0. The exact solution to the above equation isgiven by u(x) = 3.6072J1(x)+0.75195Y1(x)−x, where J1 and Y1 are Bessel function and Neumannfunction of the first order, respectively. For example, we have u(1.5) = 0.2024.

The variational principle equivalent to the above boundary value problem is to find the solution tominimize the functional

J [u] =1

2

∫ 2

1

(x(u′)2 − x2 − 1

xu2 − 2x2u

)dx (114)

Now we approximate the function u by u ≈ c1w1 = c1(x− 1)(2− x). It then follows that

J [u(c1)] =1

2

∫ 2

1

{x(c1w

′1)

2 − x2 − 1

x(c1w1)

2 − 2x2c1w1

}dx (115)

14

Page 2: Ritz Method

∂J [u(c1)]/∂c1 = 0 yields the following equation

c1

∫ 2

1

{x(w′

1)2 − x2 − 1

xw2

1

}dx−

∫ 2

1

x2w1dx = 0. (116)

Hence we have

c1 =

∫ 2

1x2w1dx∫ 2

1

{x(w′

1)2 − x2−1

x w21

}dx

= 0.8110. (117)

So the approximated solution is u ≈ 0.81110× w1(x), which gives u(1.5) ≈ 0.2027.

Problem 1.9.1 Consider the Laplace field satisfying ∇2u + 1 = 0 in the 2D domain 0 ≤ x ≤ 1,0 ≤ y ≤ 1, where the boundary condition is given by u = 0 on x = 0, 1, and y = 0, 1.Assuming u(x, y) =

∑∞i=1

∑∞j=1 sin(iπx) sin(jπy)uij , determine the coefficients uij .

Problem 1.9.2 Consider the beam with the unit length subjected to the distributed load perlength of q(x) = q0(1− x) and the following boundary conditions

u(0) = 0 and u′(0) = 0 at x = 0 (118)

u(1) = 0 and M(1) = −EIu′′(1) = 0 (119)

where u, M and EI are the deflection, the bending moment and the bending rigidity ofthe beam, respectively. For such a beam, the total potential energy U is given by

U =

∫ 1

0

(1

2

M2

EI− qu

)dx =

∫ 1

0

(EI

2(u′′)2 − qu

)dx. (120)

Assuming that the deflection u is approximated by u ≈ c1w1 + c2w2, where w1 = a1 +a2x+ a3x

2 + a4x3 and w2 = b1 + b2x+ b3x

2 + b4x3 + b5x

4, determine the deflection u.

Hint Using the rigidity boundary conditions of w1(0) = w2(0) = 0, w′1(0) = w′

2(0) = 0and w1(1) = w2(1) = 0, show that w1 and w2 are obtained as w1 = (x2 − x3)and w2 = x2 − 2x3 + x4. Then apply the variational principle by substitutingu = c1w1 + c2w2 into eq.(120).

15

Page 3: Ritz Method

2 Weighted Residual Methods

Fundamental equations Consider the problem governed by the differential equation:

Γu = −f in D. (121)

The above differential equation is solved by using the boundary conditions given as follows:

u = u on Su (122)

t ≡ Bu = t on St = S\St. (123)

where the boundary S consists of Su and St. The boundary conditions given in eqs.(122) and (123) arecalled rigid and natural boundary conditions, or Dirichlet and Neumann boundary conditions, respec-tively. In most engineering problems, Γ and B are differential operators in the forms of Γ = ∇ ·Σ andB = n ·Σ, where Σ is another differential operator and n is the normal vector on St.

For the Laplace problem, the governing equation is given by

∇2u = −f in D, (124)

and the Neumann boundary condition on St is given as t = n · ∇u = t. Then the differential operatorsΓ, B and Σ are defined by Γ = ∇2, B = n · ∇ and Σ = ∇, respectively.

Trial functions Suppose that u is approximated by trial function u of

u(x) =M∑J=1

NJ(x)uJ (125)

where uJ are coefficients and NJ (x) are linearly independent functions called trial bases, test functionsor shape functions.

Weighted residual Since the trial function u does not satisfy the governing equation and the boundarycondition rigorously, the residuals defined in the following are nonzero

RD(x) = −{Γu(x) + f(x)} 6= 0 in D (126)

RS(x) = u− u(x) 6= 0 on Su, or Bu(x)− t(x) 6= 0 on St. (127)

The problem is to find u to make zero the residuals weighted by the appropriate function w(x) asfollows: ∫

D

w(x) ·RD(x)dV +

∫S

w(x) ·RS(x)dS = 0 (128)

where w(x) is called the weight function. Eq.(128) is also called a weak form to the original differentiralequation (121), called a strong form, because the solution that satisfies eq.(128) does not always satisfythe original differential equation (121) and the boundary condition (123).

Substitution of eq.(125) into eq.(128) yields the following equation:∫D

wI ·RDdV +

∫S

wI ·RSdS

=

∫D

wI(x) · (−ΓNJ (x)uJ − f(x))dV

+

∫Su

wI(x) · (NJ (x)uJ − u(x))dS +

∫St

wI(x) · (BNJ(x)uJ − t(x))dS

=

{−∫D

wI(x) · ΓNJ(x)dV +

∫Su

wI(x)NJ(x)dS +

∫St

wI(x) ·BNJ(x)dS

}︸ ︷︷ ︸

KIJ

uJ

−{∫

D

wI(x) · f(x)dV +

∫Su

wI(x)u(x)dS +

∫St

wI(x) · t(x)dS}

︸ ︷︷ ︸f I

= 0 (129)

16

Page 4: Ritz Method

orKIJ u

J = f I . (130)

where M independent weight functions wI (I = 1, 2, . . . ,M) are chosen. This equation can be solvedfor uJ . As shown in the sequel, there are several residual methods depending on the selection of weightfunctions.

It is not difficult to find trial functions u satisfying the boundary condition u = u on Su. In such acase, no residual exists on Su and the integrals on Su disappear in eq.(129). In the following sections, itis assumed that trial functions u satisfy u = u on Su.

2.1 Point collocation method

In the point collocation method, we select at least the same number of collocation points as the unknownparameters and determine the parameters uJ such that the residual is zero at the selected points.

The collocation method is equivalent to the residual method in which the weight function is chosen as

wI = 1δ(x− xI) (131)

where 1 denotes the unit matrix and δ(x) is the Dirac delta function satisfying the equations∫D

δ(x− xI)R(x)dV = R(xI), for xI ∈ D (132)

or ∫St

δ(x− xI)R(x)dS = R(xI), for xI ∈ St (133)

In this case, the matrix KIJ and the vector f I in eq.(130) can be expressed by

KIJ = −ΓNJ(xI) or BNJ(xI), f I = f(xI) or t(xI) (134)

2.2 Least squares method

In the least squares method, the sum of the squares of the residuals defined by

I =

∫D

R2DdV +

∫St

R2SdS (135)

is minimized.The necessary condition to minimize I is

∂I

∂uI= 0, I = 1, 2, . . . (136)

yielding the system of equations:∫D

RD · ∂RD

∂uIdV +

∫St

RS · ∂RS

∂uIdS = 0 (137)

or [∫D

ΓN I(x) · ΓNJ(x)dV +

∫St

BN I(x) ·BNJ(x)dS

]︸ ︷︷ ︸

KIJ

uJ

−[−∫D

ΓN I(x) · f(x)dV +

∫St

BN I(x) · t(x)dS]

︸ ︷︷ ︸f I

= 0 (138)

As shown in the above equation, the least squares method is considered as a weighted residual methodwith the weight functions −ΓN I(x) in the domain D and BN I(x) on the boundary St.

17

Page 5: Ritz Method

2.3 Classical Galerkin method

If only the domain integral in eq.(129) is taken into account and the shape functions N I(x)wI are usedas the weight functions wI , where wI are arbitrary coefficients, then we have

M∑I=1

wI

M∑J=1

{−∫D

N I(x)ΓNJ (x)dV

}︸ ︷︷ ︸

KIJ

uJ −{∫

D

N I(x)f(x)dV

}︸ ︷︷ ︸

f I

= 0 (139)

2.4 Galerkin method

In the classical Galerkin method, the boundary condition is not considered. Therefore, the classicalGalerkin method is not convenient for practical use. Here the Galerkin method taking account of theboundary condition is formulated.

Consider the weighted residual as follows:∫D

w(x)(−Γu(x)− f(x))dV +

∫St

w(x)(Bu(x)− t(x))dS = 0. (140)

Here we assume that w is a weighted function satisfying w = 0 on Su and u satisfies the boundarycondition u = u on Su.

Since Γ = ∇ ·Σ, the first integral in eq.(140) is written as∫D

w(x)Γu(x)dV =

∫D

w(x)∇ ·Σu(x)dV

=

∫St

w(x)n ·Σu(x)dS −∫D

∇w(x) ·Σu(x)dV

=

∫St

w(x)Bu(x)dS −∫D

∇w(x) ·Σu(x)dV (141)

where the divergence theorem is used. Note that in the above equation, the integral on Su vanishes dueto w = 0 on Su. Then eq.(140) becomes∫

D

∇w(x) ·Σu(x)dV −∫D

w(x)f(x)dV −∫St

w(x)t(x)dS = 0. (142)

This equation has the weak form which involves the Neumann boundary condition on St, which can besolved under the Dirichlet boundary condition u = u and the constraint condition w = 0 on Su.

Now it is assumed that the trial function u is expressed by

u(x) =M∑J=1

NJ(x)uJ +N0(x)u (143)

where NJ(x) and N0(x) are the shape functions equal to zero and one on the boundary Su, respectively.Also the weight function w is selected as

w(x) = N I(x)wI (144)

where N I(x) is the same shape function used in eq.(143). Then the conditions u = u and w = 0 on Su

are satisfied.Substitution of eqs.(143) and (144) into eq.(142) yields

M∑I=1

wI

M∑J=1

∫D

∇N I(x) ·ΣNJ(x)dV︸ ︷︷ ︸KIJ

uJ

−(∫

D

N I(x)f(x)dV −∫D

∇N I(x) ·ΣN0(x)dV u+

∫St

N I(x)t(x)dS

)︸ ︷︷ ︸

fI

= 0. (145)

18

Page 6: Ritz Method

Example 2.1 Consider the solution u satisfying the equation

d2u

dx2+ f0 = 0 0 ≤ x ≤ l (146)

subjected to the boundary conditions

u = 0 at x = 0, du/dx = f0l at x = l. (147)

The exact solution for the above problem is u(x) = f0x(2l− x/2) and the value at x = l/2, u(l/2),is obtained as u(l/2) = f0l/2(2l − x/4) = f07l

2/8.

Now the boundary value problem mentioned above is solved by means of both the classical Galerkinmethod and the Galerkin method assuming that the solution is approximated by u(x) = N1(x)u1,where N1(x) = x(2l − x). Note that the approximated function is slightly different from the exactsolution.

Classical Galerkin method For N1(x) = x(2l − x) and ΓN1(x) = d2N1(x)/dx2 = −2, eq.(139)becomes ∫ l

0

x(2l − x)(−2)dxu1 +

∫ l

0

x(2l − x)f0dx = 0 (148)

From eq.(148), we obtained u1 = f0/2. The solution u(x) is obtained by u(x) = f0x(2l−x)/2.At x = l/2, u(l/2) = 3/8f0l

2, which is much different from the exact solution u(l/2) = 7/8f0l2.

Galerkin method From eq.(145), the following equation based on the Galerkin method is formu-lated. ∫ l

0

dN1

dx

dN1

dxdxu1 −

(∫ l

0

N1(x)f0dx+N1(1)f0l

)= 0 (149)

Substitution of N1(x) = x(2l − x) into the above equation yields∫ l

0

2(l − x)2(l − x)dxu1 −

(∫ l

0

(2xl − x2)f0dx+ l(2l − l)f0l

)= 0, (150)

from which u1 = 5f0/4. Hence, u(x) = 5f0x(2l − x)/4. Also at x = l/2, u(l/2) = 15/16f0l2.

Thus we can conclude that the Galerkin method with the boundary condition gives a valuecloser to the exact solution than the classical Galerkin method, in which no boundary conditionis considered.

Example 2.2 Solve the governing equation

d2u

dx2+ 1 = 0 0 ≤ x ≤ 1 (151)

by using the Galerkin method with the trial function u(x) =∑2

J=1 NJ(x)uJ , where NJ(x) = xJ .

The boundary conditions are given by u(0) = 0 and du/dx(1) = 20.

The Galerkin method yields the following equation for the above mentioned problem:

M∑I=1

wI

M∑J=1

∫ 1

0

dN I

dx

dNJ

dxdx︸ ︷︷ ︸

KIJ

uJ

−(∫ 1

0

N I(x)fdx−∫ 1

0

dN I

dx

dN0

dxdxu+N I(1)t

)︸ ︷︷ ︸

fI

= 0 (152)

where f = 1, u = 0, t = 20, M = 2, N1(x) = x and N2(x) = x2. The calculation of the matrixKIJ and the vector fI leads to the equations[

1 11 4/3

]{u1

u2

}=

{20 1

220 1

3

}(153)

which can be solved for uJ (J = 1, 2).

19

Page 7: Ritz Method

Problem 2.1 Consider the governing equation

d2u

dx2− u = 0 0 ≤ x ≤ 1 (154)

subjected to the boundary condition u(0) = 0 and du/dx(1) = 20. Solve the problem

by using the Galerkin method with the trial function u(x) =∑2

J=1 NJ (x)uJ , where

NJ(x) = xJ .

Problem 2.2 Derive the weak form based on the Galerkin method for the multi-dimensionalLaplace problem, for which the governing equation is given by

∇ · ∇u = −f in D (155)

and the boundary conditions are as follows.

u = u on Su (156)

t ≡ n · ∇u = t on St = S\Su (157)

Problem 2.3 Solve the same problem as Problem 1.9.1 using the weak form.

2.5 Weak form and variational method

In order to discuss the relation between the weak form and the variational method, let us consider theone dimensional Laplace problem governed by

d2u

dx2+ f(x) = 0, for 0 < x < 1 (158)

subjected to the boundary condition

u(0) = u, and t(1) ≡ du

dx(1) = t. (159)

Due to the weighted residual method, it follows that∫ 1

0

w(x)

(−d2u

dx2− f(x)

)dx+ w(1)

(du

dx(1)− t

)= 0 (160)

under the conditions w(0) = 0 and u(0) = u. Applying the integration by parts to the first integral inthe above equation, we have the weak form∫ 1

0

dw

dx

du

dxdx−

∫ 1

0

w(x)f(x)dx− w(1)t = 0 (161)

where w(0) = 0 and u(0) = u.On the other hand, the potential energy U for the one dimensional Laplace problem is given by

U =

∫ 1

0

{1

2

(du

dx

)2

− f(x)u(x)

}dx− u(1)t (162)

The first variation of U , δU , can be written as

δU =

∫ 1

0

(du

dx

d(δu)

dx− f(x)δu

)dx− δu(1)t = 0 (163)

where δu(0) = 0 since u(0) = u is given at x = 0. Eq.(163) has to be solved under the condition ofδu(0) = 0 and u(0) = u.

From the comparison between eqs.(161) and (163), the weak form gives the same equations as thevariational method, if the weight function w is replaced by δu.

Problem 2.5.1 Show that the weak form and the variational method are identical for the beamproblem governed by

EIu′′′′ − f = 0 for 0 < x < 1 (164)

subjected to the boundary condition

u = u′ = 0 at x = 0 (165)

Q = −EIu′′′ = Q and M = −EIu′′ = M at x = 1 (166)

20

Page 8: Ritz Method

Hint The weighted residual is evaluated by∫ 1

0

w(EIu′′′′ − f)dx− w′(1)(M(1)− M) + w(1)(Q(1)− Q) = 0 (167)

where w = w′ = 0 and u = u′ = 0 at x = 0.

In the variational method, the potential energy is given by

U =

∫ 1

0

(EI

2(u′′)2 − fu

)dx− (−u′(1))M − u(1)Q (168)

where u(0) = u′(0) = 0 (δu(0) = δu′(0) = 0).

21