• No results found

Introduction to the Finite Element Method

N/A
N/A
Protected

Academic year: 2021

Share "Introduction to the Finite Element Method"

Copied!
25
0
0

Loading.... (view fulltext now)

Full text

(1)

Intro to FEM

oren Boettcher

Introduction to the Finite Element Method

S¨ oren Boettcher

09.06.2009

(2)

Intro to FEM

oren Boettcher

Outline

Motivation

Partial Differential Equations (PDEs)

Finite Difference Method (FDM)

Finite Element Method (FEM)

References

(3)

Intro to FEM

oren Boettcher

Motivation

Figure: cross section of the room

(cf. A. J¨ungel, Das kleine Finite-Elemente-Skript)

Situation:

Ω ⊂ R

2

- room D

1

- window D

2

- heating

N

1

- isolated walls, ceiling

N

2

- totally isolated floor

θ - temperature

(4)

Intro to FEM

oren Boettcher

Motivation

Conservation of energy:

Z

T 0

Z

ρ

0

c

e

∂θ

∂t dx dt = − Z

T

0

Z

∂Ω

κ ∂θ

∂ν d σ

x

dt + Z

T

0

Z

f dx dt

Heat equation:

ρ

0

c

e

∂θ

∂t − div(κ∇θ) = f in Ω for t > 0 Assumptions:

no time rate of change of the temperature, i.e.

∂θ∂t

= 0 no interior heat source/sink, i.e. f = 0

κ = 1

(5)

Intro to FEM

oren Boettcher

Motivation

Model:

∆θ = 0 in Ω θ = θ

W

on D

1

θ = θ

H

on D

2

∇θ · ν = 0 on N

2

∇θ · ν + α(θ − θ

W

) = 0 on N

1

Example:

θ

W

= 10

C θ

H

= 70

C α = 0.05

Figure: temperature distribution in the heated room

(cf. A. J¨ungel, Das kleine Finite-Elemente-Skript)

(6)

Intro to FEM

oren Boettcher

Partial Differential Equations (PDEs)

Second-order PDEs

Elliptic PDE (stationary) e.g. Poisson Equation (scalar)

−∆u = f in Ω or stationary elasticity (vector-valued)

− div(σ) = f in Ω

Parabolic PDE e.g. heat equation

θ

0

− div(κ∇θ) = f in Ω × (0, T ) Hyperbolic PDE e.g. instationary elasticity

u

00

− div(σ) = f in Ω × (0, T )

(7)

Intro to FEM

oren Boettcher

Classification of PDEs

Linear PDE

θ

0

− ∆θ = f in Ω × (0, T ) Semilinear PDE

θ

0

− ∆θ = f (θ) in Ω × (0, T ) Quasilinear PDE

θ

0

− div(α(∇θ)) = f in Ω × (0, T ) Fully nonlinear PDE

θ

0

− g (∆θ) = f in Ω × (0, T )

(8)

Intro to FEM

oren Boettcher

Boundary Conditions (BCs)

Dirichlet BC (first kind, essential BC) u = g on ∂Ω Neumann BC (second kind, natural BC)

∇u · ν = ∂u

∂ν = g on ∂Ω Robin BC (Cauchy BC, third kind)

∂u

∂ν + σu = g on ∂Ω

(9)

Intro to FEM

oren Boettcher

Methods for solving PDEs

Analytical Methods for PDEs / Existence and Uniqueness Method of Separation of Variables

Method of Eigenfunction Expansion

Method of Diagonalisation (Fourier Transformation) Method of Laplace Transformation

Method of Green’s Functions Method of Characteristics Method of Semigroups

Variational Methods (e.g. Galerkin Approximation)

(10)

Intro to FEM

oren Boettcher

Methods for solving PDEs

Numerical Methods for PDEs

Finite Difference Method (FDM)

pointwise approximation of the differential equation geometry is divided into an orthogonal grid Finite Element Method (FEM)

powerful computational technique for the solution of differential and integral equations that arise in various fields of engineering and applied sciences

differential equations will be solved with an equivalent variation problem

geometry must be divided into small elements

problem is solved by choosing basis functions which are

supposed to approximate the problem

(11)

Intro to FEM

oren Boettcher

FDM

Consider

−∆u = f in Ω, u = 0 on ∂Ω Idea:

approximate differential quotients by difference quotients reduce differential equation to algebraic system

Assumptions:

Ω = (0, 1)

2

equidistant nodes (x

i

, y

j

) ∈ Ω (i , j = 0, . . . , N) with h = x

i +1

− x

i

= y

i +1

− y

i

Taylor Expansion

u(x

i +1

, y

j

) = u(x

i

, y

j

) + ∂u

∂x (x

i

, y

j

)h + 1 2

2

u

∂x

2

(x

i

, y

j

)h

2

+ O(h

3

) u(x

i −1

, y

j

) = u(x

i

, y

j

) − ∂u

∂x (x

i

, y

j

)h + 1 2

2

u

∂x

2

(x

i

, y

j

)h

2

+ O(h

3

)

(12)

Intro to FEM

oren Boettcher

FDM

Second-order centered difference

2

u

∂x

2

= 1

h

2

u(x

i +1

, y

j

) − 2u(x

i

, y

j

) + u(x

i −1

, y

j

) + O(h)

2

u

∂y

2

= 1

h

2

u(x

i

, y

j +1

) − 2u(x

i

, y

j

) + u(x

i

, y

j −1

) + O(h) Approximation of ∆u

∆u(x

i

, y

j

) ≈ 1

h

2

u

i +1,j

+ u

i −1,j

+ u

i ,j +1

+ u

i ,j −1

− 4u

ij



Find u

ij

= u(x

i

, y

j

) s.t.

−u

i +1,j

− u

i −1,j

− u

i ,j +1

− u

i ,j −1

+ 4u

ij

= h

2

f

ij

, (x

i

, y

j

) ∈ Ω

u

ij

= 0, (x

i

, y

j

) ∈ ∂Ω

whereas f

ij

= f (x

i

, y

j

)

(13)

Intro to FEM

oren Boettcher

FDM

Linear system of equations:

U

k

:= u

ij

, F

k

:= f

ij

with k = iN + j leads to AU = F

A = 1 h2

A0 I 0

I A0 I

... ...

...

I A0 I

0 I A0

, A0= 1 h2

4 −1 0

−1 4 −1

... ...

...

−1 4 −1

0 −1 4

Disadvantages of FDM

complex (or changing) geometries and BCs existence of third derivatives

f not continuous

(14)

Intro to FEM

oren Boettcher

FEM

Consider

−∆u = f in Ω, u = 0 on ∂Ω Trick: transform PDE into equivalent variational form Multiplication with arbitrary v ∈ X and integration over Ω

Z

fv dx = − Z

div(∇u)v dx

= − Z

∂Ω

v ∇u · ν dx

| {z }

=0

+ Z

∇u∇v dx

Find u ∈ X : ∀ v ∈ X Z

∇u∇v dx = Z

fv dx

(15)

Intro to FEM

oren Boettcher

FEM

Approximation: Find solution of a finite dimensional problem Let (X

h

)

h≥0

a sequence of finite dimensional spaces with X

h

→ X (h → 0) and elements of X

h

vanish on ∂Ω Find u

h

∈ X

h

s.t. ∀ v ∈ X

h

Z

∇u

h

∇v dx = Z

fv dx

Let {ϕ

i

}

i =1,...,N

a basis of X

h

. The ansatz u

h

(x ) = P

N

i =1

y

i

ϕ

i

(x ) and the choice v = ϕ

j

lead to

N

X

i =1

y

i

Z

∇ϕ

i

∇ϕ

j

dx

| {z }

=:Aij

= Z

f ϕ

j

dx

| {z }

=:Fj

, j = 1, . . . , N

(16)

Intro to FEM

oren Boettcher

FEM

Linear system of equations:

N

X

i =1

A

ij

y

i

= F

j

, j = 1, . . . , N

Notation:

A - stiffness matrix F - force vector

y

i

= u

h

(x

i

) - solution vector

Questions: What about X , X

h

, {ϕ

i

}

i =1,...,N

? Hint: choose basis s.t. as much as possible A

ij

= 0!

(A less costly to form, Ay = F can be solved more efficiently)

(17)

Intro to FEM

oren Boettcher

FEM

Idea: discretise the domain into finite elements and define basis functions which vansih on most of these elements

1D: interval

2D: triangular/quadrilateral shape 3D: tetrahedral, hexahedral forms Ansatz functions:

support of basis functions as small as possible and number of basis functions whose supports intersect as small as possible

use of piecewise (images of) polynomials

(18)

Intro to FEM

oren Boettcher

FEM

Example:

Ω ⊂ R

2

bounded Lipschitz domain, f ∈ L

2

(Ω) X = H

01

(Ω)

Triangulation of Ω by subdividing Ω into a set

T

h

= {K

1

, . . . , K

n

} of non-overlapping triangles K

i

s.t. no vertex of a triangle lies on the edge of another triangle Ω = ∪

K ∈Th

K

Mesh parameter h = max

K ∈Th

diam(K )

X

h

:= {u

h

∈ C (Ω, R): u

h

piecewise linear, u

h

= 0 on ∂Ω}

Linear elements in 1D:

ϕ

i

(x ) =

 

 

x −xi −1

xi−xi −1

, x

i −1

≤ x ≤ x

i

xi +1−x

xi +1−xi

, x

i −1

≤ x ≤ x

i

0 , otherwise

, i = 1, . . . , N − 1

(19)

Intro to FEM

oren Boettcher

FEM

Figure: basis of 1D linear finite elements

(cf. T. M. Wagner, A very short introduction to the FEM)

Figure: linear finite elements in 1D

(cf. T. M. Wagner, A very short introduction to the FEM)

(20)

Intro to FEM

oren Boettcher

FEM

Figure: basis function of 2D linear finite elements

(cf. T. M. Wagner, A very short introduction to the FEM)

Linear or high-order elements?

Advantages: small error, better approximation, fast error convergence, less computing time for same error

Disadvantages: larger matrix for same grid, no

conservation of algebraic sign

(21)

Intro to FEM

oren Boettcher

FEM

Matrix A is large, but sparse: only a few matrix elements are not equal to zero

(intersection of the support of basis function is mostly empty) A symmetric, positive definit unique solution

Linear system of equations: many methods in numerical linear algebra exist to solve linear systems of equations

direct solvers (Gaussian elemination, LU decomposition, Cholesky decomposition): for N × N matrix ≈ N

3

operations

iterative solvers (CG, GMRES, . . . ): ≈ N operations for each iteration

Runge-Kutta methods (ODEs for unsteady problems)

(22)

Intro to FEM

oren Boettcher

FEM

Standard Error Estimation (P

k

-elements, u sufficiently smooth):

Z

|u − u

h

|

2

dx



12

≤ c h

k+1

Z

|D

k+1

u|

2

dx



12

Z

|∇u − ∇u

h

|

2

dx



12

≤ c h

k

Z

|D

k+1

u|

2

dx



12

Consistency: exact solution solves approximate problem but for error that vanishes as h → 0

Stability: errors remain bounded as h → 0

Convergence: approximate solution must converge to a solution of the original problem for h → 0

suitable for adaptive method

(23)

Intro to FEM

oren Boettcher

Model Algorithm of the FEM

1

Transformation of the given PDE via the variational principle

2

Selection of a finite element type

3

Discretization of the domain of interest into elements

4

Derivation of the basis from the discretisation and the chosen ansatz function

5

Calculation of the stiffness matrix and the right-hand side

6

Solution of the linear system of equations

7

Obtainment (and visualisation) of the approximation

Software: ALBERTA, COMSOL, MATLAB, SYSWELD

(24)

Intro to FEM

oren Boettcher

References

K. Atkinson, W. Han; Theoretical Numerical Analysis.

D. Braess; Finite Elements.

R. Dautray, J.-L. Lions; Mathematical Analysis and Numerical Methods for Science and Technology,

Vol. 6: Evolution Problems II.

C. Grossmann, H.-G. Roos; Numerical Treatment of PDEs.

K. Knothe, H. Wessels; Finite elements.

G. R. Liu, S. S. Quek; The FEM.

M. Renardy, R. C. Rogers; An Introduction to PDEs.

E. G. Thompson; Introduction to the FEM.

(25)

Intro to FEM

oren Boettcher

Thank you for your attention.

References

Related documents

Keeler [1974] and Gollier [1987] show that this constraint might well bind: insured could get higher expected utility if insurance contracts would allow payments from the insured to

(b) Aggregate ability is calculated using principal component analysis on the literacy and numeracy evaluation domains (for CAPS) and the memory, numeracy, attention, and

In the conducted research in the field of Macro-ergonomics , implementation of one Macro-ergonomics method in special types of industries and its effect on some

To control the rigid part of the motion, nonlinear equations of the motion of a two link rigid manipulator is replaced by a family of uncertain linear time-invariant

This shows that cauchy based and mutation techique proposed in ICS technique converge faster compared to levy flight and gaussian distribution used in GA.. On the other

Using the computed link change rate, we combine the MANET IDS performance over different.

For identification and mapping of QTLs, the reference desi genome- based high-quality GBS SNP genotyping data and genetic linkage map information of SNPs mapped on eight desi LGs