(Galerkin) Finite element approximations - TU/e hulsen/cr/   (Galerkin) Finite element...

download (Galerkin) Finite element approximations - TU/e hulsen/cr/   (Galerkin) Finite element approximations

of 93

  • date post

    21-Feb-2019
  • Category

    Documents

  • view

    241
  • download

    1

Embed Size (px)

Transcript of (Galerkin) Finite element approximations - TU/e hulsen/cr/   (Galerkin) Finite element...

(Galerkin) Finite element approximations

The finite element method (FEM): special choice for the shape functions

.

x = a x = b

4

Ne = 5

2 3 51

Subdivide into elements e:

=Nee=1

e

e1 e2 =

Approximate u on each element separately by a polynomial of some degree p, forexample by Lagrangian interpolation (using p+ 1 nodal points per element). Theend points of an element must be nodal points.

Example: linear elements

Global shape functions:

x3 x4 x5x1 = a x6 = bx2

4

Ne = 5

2 3 51

3(x)1 uh(x) =

ni=1

uii(x) =

T (x)u

n: number of global nodal points.

Local element shape functions:

xe1 xe2 x

e1 x

e2

1

2(x)1(x)

1

ueh(x) = ue11(x)+u

e22(x) =

T (x)ue

with

T = [1(x), 2(x)] and

1(x) =x xe2xe1 xe2

, 2(x) =x xe1xe2 xe1

Example: quadratic elements

Local element shape functions:

1(x) 2(x) 3(x)

1

xe1 xe3x

e2 x

e1 x

e3 x

e1 x

e2 x

e3

1 1

xe2

ueh(x) = ue11(x) + u

e22(x) =

T (x)ue

with

T = [1(x), 2(x), 3(x)] and

1(x) =(x xe2)(x xe3)

(xe1 xe2)(xe1 xe3), 2(x) =

(x xe1)(x xe3)(xe2 xe1)(xe2 xe3)

,

3(x) =(x xe1)(x xe2)

(xe3 xe1)(xe3 xe2)

Example: higher-order elements

General polynomials of order p:

ueh(x) =p+1i=1

ueii(x) =

T (x)ue

with

T = [1, 2, . . . , p+1].

Various expansions possible:

B Gauss-Lobatto integration points (includes end points) and Lagrangianinterpolation (Spectral elements).

B Hierarchical base functions: end points are nodes but internal shape functionshave no nodes (similar to Legrende polynomials). (hp-FEM).

B Legrendre polynomials in discontinuous Galerkin methods.

Global numbering

1 2 3

x3x2x1 = a x4 = b

u1u3

u4

u2

Ne = 3 uh(x)

1

1

2 3

3(x)Ne = 3

x3x2x1 = a x4 = b

uh(x) =4i=1

uii(x) =

T (x)u

u

=

u1u2u3u4

, (x) =

1(x)2(x)3(x)4(x)

Local numbering in elements

Weak form: Find uh in Sh such that

(dvhdx

,Aduhdx

) + vh(b)hb = (vh, f) for all vh Vh

Split:Nee=1

(dvhdx

,Aduhdx

) + vh(b)hb =Nee=1

(vh, f) for all vh Vh

Write in each element e:

ueh(x) =2i=1

ueii(x) =

T (x)ue, v

eh(x) =

2i=1

veii(x) =

T (x)ve

where uTe = (u

e1, u

e2) and

T (x) = (1(x), 2(x)).

Element matrix and vector

We get:Nee=1

(vTeK

eue) + vnhb =

Nee=1

vTe f

e

where

Ke =

(ddx,Ad

T

dx

)e

=

e

ddxAd

T

dxdx

fe = (

, f)e =

e

f dx

are the element matrix Ke and element vector f

e.

Local global (assembling)

The local vectors ue and v

e are part of the global vectors:

ue = P

eu, v

e = P

ev,

So we get

Nee=1

vTeK

eue =

Nee=1

vT P

TeK

eP

e

Ke

u

= vT( Nee=1

Ke

)u

Nee=1

vTe f

e =

Nee=1

vT P

Te f

e

fe

= vT( Nee=1

fe

)

Weak form

Substitution into the weak form:

vTK

u

= vTf

for all v

orKu

= fwith

K

=Nee=1

Ke

f

=Nee=1

fe

+

00...0hb

Example (1)

For example:

u

2 =(u2u3

)=(

0 1 0 00 0 1 0

)

P

2

u1u2u3u4

= P 2u

K

2 = PT2K

2P

2 =

0 01 00 10 0

(K211 K212K221 K222)(

0 1 0 00 0 1 0

)

=

0 0 0 00 K211 K

212 0

0 K221 K222 0

0 0 0 0

Example (2)

Assembly of K

:

K

=

K111 K

112 0 0

K121 K122 0 0

0 0 0 00 0 0 0

+

0 0 0 00 K211 K

212 0

0 K221 K222 0

0 0 0 0

+

0 0 0 00 0 0 00 0 K311 K

312

0 0 K321 K322

=

K111 K

112 0 0

K121 K122 +K

211 K

212 0

0 K221 K222 +K

311 K

312

0 0 K321 K322

Similar for assembly of f

.

Exercise 5

The bandwidth of K

for linear shape functions is 3. How large is the bandwidthfor K

when using polynomial shape functions of order k, k 1?

Dirichlet conditions

Renumber and split vector and matrix (u unknown, p prescribed)

u

=(uu

up

), v

=(vu

vp

), K

=(Kuu K

up

Kpu K

pp

), f

=(fu

fp

)Note: u

p prescribed values, v

p = 0

. Weak form

vTK

u

= vTf

for all v

with vp = 0

leads to

vTu (K

uuu

u +K

upu

p) = v

Tuf

u for all v

u

orKuuu

u = f

u K

upu

p

1D convection-diffusion-reaction equation

1D convection-diffusion-reaction Eq.: find u(x) such that for x (a, b)u

t+ a

u

x x

(Au

x) + bu = f

and

u = ua(t), at x = a, t > 0 (D)

Adudx

= hb(t) at x = b, t > 0 (N)

Notes:

B Strong form; Classical (strong) solution u(x, t)B f(x, t) C0(a, b) (continuous) then u C2(a, b) (twice continuously

differentiable)

Oldroyd-B/UCM viscoelastic model

5 + = 2D

where5= L LT

or

tut

+ ~u aux

L LT +

bu

= 2

D f

Diffusion is missing (A = 0).

Dimensionless form (1)

Scaling:

t = tct tc : characteristic time

u = Uu U : characteristic value solution

x = Lx L : characteristic length scale

Dimensionless variables: O(1).U

tc

u

t+aU

L

u

x AUL2

2u

x2+ bUu = f

Relative to convection:

L

atc

u

t+u

x 1

Pe2u

x2+bL

au =

L

aUf

Pe =aL

A: Peclet number, convection/diffusion.

Dimensionless form (2)

Time scales:

B convection: La

B diffusion: L2

A

B source: 1b

(relaxation time)

B time scales in b.c.B externally or internally generated frequencies (von Karman vortex)

We choose tc = L/a (convection) and get

u

t+u

x 1

Pe2u

x2+ bu = f

with b =bL

aand f =

L

aUf . Pe > 1 : convection dominated

Exercise 6

Assume b = 0 and f = 0. We take for the typical time scale tc =L2

A(diffusion

time scale). Show that we now have the non-dimensional form

u

t+ Pe

u

x

2u

x2= 0

When will this non-dimensional form be preferable over the one on the previousslide?

Steady state 1D convection-diffusion-reaction equation

steady state: u/t = 0

L(u) = adudx ddx

(Adu

dx) + bu = f

L: linear operator, with b.c.

u = ua, at x = a (D)

Adudx

= hb at x = b (N)

Weak form

Multiply with test function v and integrate:

(v,Lu f) = 0 for all v

Partial integration of the diffusion term and inserting b.c. we get: Find u Ssuch that

(dv

dx,Adu

dx) + (v, a

du

dx) + (v, bu) + v(b)hb = (v, f) for all v V

where S and V are appropriate spaces.

Galerkin FEM approximations (1)

Approximation spaces Sh and Vh:

uh(x) =ni=1

uii(x) =

T (x)u

vh(x) =ni=1

vii(x) =

T (x)v

where (x) are global shape functions. Substituting this into the weak form gives:

Find uh Sh such that

(dvhdx

,Aduhdx

) + (vh, aduhdx

) + (vh, buh) + vh(b)hb = (vh, f) for all vh Vh

orvTK

u

= vTf

for all v

Galerkin FEM approximations (2)

and thusKu

= f

with

K

= (d

dx,Ad

T

dx) or Kij = (

didx

,Adjdx

)

+ (, ad

T

dx) + (i, a

djdx

)

+ (, b

T ) + (i, bj)

f

= (, f) hb

(b) fi = (i, f) hbi(b)

Galerkin FEM approximations (3)

Build from element matrices. For example with constant coefficients and linearelement shape functions:

(d

dx,d

T

dx)e =

1h

(1 11 1

)stiffness matrix

(,d

T

dx)e =

12

(1 11 1

)convection matrix

(,

T )e =h

6

(2 11 2

)mass matrix

where h is the element length.

Global stiffness matrix

Global stiffness matrix (uniform element size):

1h

1 1 0 . . . . . . . . . . . . . 01 2 1 0 . . . . . . . . 00 1 2 1 0 . . . 0... ...... ...... ...0 . . . 0 1 2 1 00 . . . . . . . . 0 1 2 10 . . . . . . . . . . . . . 0 1 1

Finite difference scheme: (divide by