Скачиваний:
93
Добавлен:
22.08.2013
Размер:
2.51 Mб
Скачать

Figure 1: The Lagrange basis functions. On the left, for the boundary x = 0, on the right, for the middle point x = −0.5. The nodes are chosen to be xj−1 = −1, xj−1/2 = −0.5, xj = 0, xj+1 = 1.

We can also see that the constructed basis satisfies the Lagrange property:

φj(xk) =

0, for j 6= k

, j, k = 0, 1/2, 1, . . . N.

 

1, for j = k

 

The elemental functions

The elemental functions are the projection of the basis functions φj onto each element Kj. For the quadratic basis, there are three elemental functions:

Nj−1,j(x) = 1 − 3 x −hj j−1 + 2

x

hj j−1

2

,

 

 

 

 

x

 

 

 

 

 

 

 

 

x

 

 

 

 

Nj−1/2,j(x) = 1 − 4

 

hj

1/2

 

2

 

 

 

 

 

,

 

 

 

 

 

 

 

 

 

x

xj

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

hj

 

 

 

 

hj

 

 

2

 

 

 

j,j

 

 

 

 

 

 

 

N

 

(x) = 1 + 3

 

x − xj

 

+ 2

x − xj

.

 

 

 

 

 

 

In the general case, the elemental functions Nk,j are non-zero only on their own interval, or, in other words, only if the node k belongs to the element

Kj. This ensures the small overlap between di erent elemental functions. In order to define the elemental functions of the order p, let us introduce

the canonical element −1 ≤ ξ ≤ 1 which is connected to each physical element

29

xj−1+i/p

Figure 2: The Lagrange elemental functions on the interval [0,1].

through

1 − ξ

 

 

 

1 + ξ

 

 

 

 

 

x(ξ) =

x

 

+

x

 

 

K

.

2

j−1

2

 

 

 

 

 

j

j

 

Let us introduce p + 1 nodes on the canonical element

−1 = ξ0 < ξ1 < . . . < ξp−1 < ξp = 1.

The nodes on the physical element Kj can be easily derived as

= 1 −2 ξi xj−1 + 1 +2 ξi xj i = 0, 1, . . . p.

Now we define the elemental functions Nk,c on the canonical element as

 

p

 

 

 

 

Nk,c(ξ) =

Y6

ξ

− ξi

.

 

i

ξk

ξi

 

=0,i=k

 

It is clear that they satisfy the following properties

Nk,ci) = δki,

deg Nk,c(ξ) = p.

30

Figure 3: The Lagrange elemental function on the canonical element.

Here are few examples of the elemental functions on the canonical element

1. The linear functions, p = 1:

1 − ξ 1 + ξ N0,c(ξ) = 2 , N1,c(ξ) = 2 .

1. The quadratic functions, p = 2, ξ1 = 0:

N

 

(ξ) =

ξ(ξ − 1)

, N

 

(ξ) = 1

ξ2

, N

 

(ξ) =

ξ(ξ + 1)

.

0,c

2

1,c

2,c

2

 

 

 

 

 

 

 

 

The hierarchical basis.

For the Lagrange basis, we need to construct all the functions for each order p from the very beginning. The idea of the hierarchical basis is di erent: we construct the basis of the order p + 1 by adding a new function to the basis of the order p. This way, we keep our previous calculations meaningful and only need to add few matrix elements.

So, the quadratic hierarchical basis on Kj is constructed as

U2(x) = U1(x) + cj−1/2Nj2−1/2,j(x),

(37)

31

where U1(x) is the linear basis

U1(x) = cj−1Nj1−1,j(x) + cjNj,j1 (x),

Nj1−1,j(x) =

xj−x

,

for x Kj

 

hj

0,

for all other x

,

 

 

 

 

 

 

 

Figure 4: The elemental functions for the hierarchical basis on the interval [0,1].

We would like to stress that the quadratic function Nj2−1/2,j(x) here is not uniquely defined. The only properties it has to satisfy are:

1.It is the quadratic polynomial

2.It is continuous everywhere

3.It is zero outside the element Kj.

32

For example, we can choose it as

Nj−1/2,j(x) =

(

 

 

 

hj

 

2

for all other x .

(38)

 

 

0,

2

1

 

4

 

x−xj−1/2

 

,

for x Kj

 

It follows from representation (37) that

 

 

 

 

c

= U2(x ), c = U2(x ),

 

 

 

 

 

 

 

 

 

 

 

 

 

basises,

we

degrees of values of

Figure 5: The hierarchical elemental functions of the order 2, 3, 4, and 6 on the canonical element.

Def.2 The Hermite basis element is the element for which at least one degree of freedom is defined through the derivative value of the basis functions at some nodes.

33

There also exist other types of elements which do not connect their degrees of freedom with any values at nodes. As a rule, those are elements of the higher order, and that is a way to exclude the need for high derivative calculations.

The hierarchical elements of the higher order p are constructed similarly to the quadratic ones

p

X

U(ξ) = c−1N1 1(ξ) + c1N11(ξ) + ciNi(ξ).

i=2

The elemental functions N1 1(ξ) and N11(ξ) are defined as

N1 1(ξ) = 1 −2 ξ , N11(ξ) = 1 +2 ξ .

The requirements for Ni(ξ) are the correct polynomial degree and zero values at the interval ends.

34

Lecture 4

An example of the FEM for the one-dimensional boundary problem.

The approximation errors.

11An example of the FEM for the one-dimensional boundary problem

Let us consider the hierarchical basis of the order p on the canonical element. The elemental function on the interval [−1, 1] can be written as

 

p

 

U(ξ) = c−1N1

Xi

 

1(ξ) + c1N11(ξ) + ciNi(ξ).

(39)

 

=2

 

The values of the basis functions on the boundaries of the interval are equal to

N1

1

(−1)

= 1,

N1

1(1) = 0,

N11

(−1)

= 0,

N11(1) = 1,

 

Ni(−1) = 0,

Ni(1) = 0, i =

2...p.

The basis functions can be recalculated from the canonical element to an arbitrary physical element [xj−1, xj] with the linear transformation

x(ξ) =

1 −

ξ

xj−1 +

1 +

ξ

xj.

(40)

2

 

2

 

Let us consider the quadratic hierarchical basis

N1

(ξ) =

1 − ξ

,

N1

(ξ) =

1 + ξ

,

N2(ξ) =

3

 

2

1). (41)

 

 

 

 

−1

 

2

 

1

 

2

 

26

 

The quadratic function obviously meets the boundary conditions.

Example. We will analyze the following simple boundary problem:

−pu00(x) + qu(x) = f(x), p > 0, q > 0,

(42)

0 ≤ x ≤ 1, u(0) = u(1) = 0.

35

The functions p(x) and q(x) are chosen to be constants for sake of simplicity. We also prefer concentrate now on the ideas of the method rather than on the technical details. As we already did, let us first convert boundary problem (42) into the variational problem. Namely, we will look for the function u(x) such that for all functions v(x) the variational equation

1

1

 

 

Z0

(u0(x)pv0(x) + u(x)qv(x)) dx = Z0

f(x)v(x) dx

(43)

is satisfied.

Now we rewrite the integral over the interval [0, 1] as the sum over all intervals [xj−1, xj], and substitute instead of u(x) and v(x) the elemental functions (39) recalculated from the canonical element with transformation (40). As the result, we get

N

X

AjS(U, V ) + AjM (U, V ) − (f, V )j = 0 V.

(44)

j=1

In this expression we used the following notations: the internal energy ASj ,

AjS(U, V ) =

xj

 

 

hj

1

 

dξ;

Z

pU0(x)V 0(x) dx =

Z

 

 

 

 

 

 

2p

 

 

 

dU(ξ) dV (ξ)

xj−1

 

 

 

 

−1

 

 

 

the inertial (or “external”) energy AjM ,

 

 

 

 

 

 

 

 

 

AjM (U, V ) =

xj

qU(x)V (x) dx = 2

1

 

 

 

Z

Z U(ξ)V (ξ) dξ;

 

 

 

 

 

 

qhj

 

 

 

 

 

 

xj−1

 

 

 

 

 

 

−1

 

 

 

and the load vector,

 

 

 

 

 

 

 

 

 

 

 

 

 

(f, V )j =

xj

 

 

1

 

 

 

 

 

 

Z

f(x)V (x) dx = 2j

Z

f(x(ξ))V (ξ) dξ.

 

 

 

h

 

 

 

 

 

 

 

 

 

 

xj−1

 

 

−1

 

 

 

 

 

 

 

36

The functions U(ξ) and V (ξ) can be written as the scalar products in two

di erent ways:

 

N11

 

= N1 1, N11, N2

 

 

 

,

U(ξ) = cj−1, cj, cj−1/2

 

 

cj

 

 

N1 1

 

 

 

 

cj−1

 

N2

cj−1/2

V (ξ) = dj−1, dj, dj−1/2

N11

 

= N1 1, N11, N2

 

dj

.

 

 

 

N1 1

 

 

 

 

dj−1

 

 

N2

 

dj−1/2

With these representations, we can write the internal energy in a more convenient way

dj−1

ASj (U, V ) = cj−1, cj, cj−1/2 Kj dj ,

dj−1/2

where the matrix Kj is defined by the basis functions and can be easily calculated:

Kj = h

 

 

 

 

 

N11

 

N1 1, N11, N2 dξ =

 

 

 

 

 

2p

1

 

d

 

 

 

 

N1

 

 

 

 

d

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Z

 

 

 

 

 

−1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

j

 

 

 

 

N2

 

 

 

 

 

 

 

 

 

 

 

 

= h

 

 

 

 

 

−1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

1/2

 

 

 

 

1/2, 1/2, ξ 3/2 dξ =

 

 

2p

 

Z

 

 

 

−1/2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

j

 

 

 

ξ

3/2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

−1

 

 

p

 

 

 

 

h

 

 

 

 

 

 

 

 

 

p

i

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

h

 

 

1

 

 

 

 

 

 

 

 

 

1 4

 

 

 

 

p

 

 

 

 

 

Z

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2p

 

 

1/4

 

 

 

 

 

−1/4

 

 

−ξ 3/8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

j

 

 

 

 

 

 

 

 

 

2/2

 

 

 

 

 

 

ξ 3/8 ξ 3/8

 

 

=

 

 

 

−1

 

p

 

 

 

1 p

 

 

1 0

p

dξ =

 

 

 

 

 

 

 

 

 

 

1/4

 

 

 

 

/

 

 

 

 

 

ξ 3/8

 

 

 

 

 

 

 

 

 

 

 

= h

 

 

−1

 

 

 

1

 

 

0

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

p

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

j

0

 

 

 

 

0

 

 

2

 

 

In the same way, we can derive the expression for the energy AMj :

AjM (U, V ) = cj−1, cj, cj−1/2

Mj

 

dj

,

 

 

 

dj−1

 

dj−1/2

37

where the matrix Mj is calculated as

Mj

= 2

 

 

 

N11

 

N1 1, N11, N2 dξ =

 

 

 

1

 

 

N1

 

 

 

 

 

 

 

 

 

 

qhj

 

 

 

−1

 

 

 

 

 

 

 

 

 

 

 

 

Z

 

 

N2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

−1

 

 

 

p

 

 

=

qhj

 

 

 

 

 

 

 

 

 

 

.

 

 

 

 

 

 

 

 

 

 

1

 

 

 

2

3/2

 

 

 

 

 

 

6

 

 

2

 

 

 

1

 

 

 

 

 

 

p

 

 

 

 

 

p

 

 

 

 

 

 

 

 

 

 

 

p

 

 

 

 

 

 

 

 

 

 

 

 

3/2

 

3/2

6/5

 

 

The load vector can also be written as the scalar product:

(f, V )j = lj dj−1, dj, dj−1/2 > ,

where

lj = 2

1

f(x(ξ)) N1

1, N11, N2

dξ.

Z

 

hj

 

 

 

 

 

 

−1

 

In order to calculate the integral in the latter expression, we use the linear approximation for the function f(x):

−1

 

j−1

1

j

 

j−1 j

 

N11

 

j

j

f(x) N1

(ξ)f

 

+ N1(ξ)f

 

= [f

, f ]

 

N1

, where f

 

= f(x ).

 

 

 

−1

 

The required approximation order depends on the order p of the finite elements employed, and must be higher for the larger values of p. For the vector lj, we get

j 2

1

j−1 j

 

N11

 

−1 1

 

Z

 

 

hj

 

 

N1

 

N1 , N1, N2

 

l =

 

 

[f , f ]

 

−1

dξ =

 

 

−1

 

 

 

 

 

= 6j

 

fj−1 + 2fj

h

 

2fj−1 + fj

p

− 3/2(fj−1 + fj)

>

.

Now we have all the representations for the energy matrices Kj, Mj, and the load vector lj on the jth element. In order to get global matrices and vectors, we should take into account the boundary conditions in Eq.(42). In

38