0% found this document useful (0 votes)
85 views19 pages

Finite Element Method: Foundations: Lecture Notes

This document provides lecture notes on the finite element method. It begins with an introduction to numerical methods for solving partial differential equations, including the finite difference method and finite element method. It then classifies partial differential equations of second order as either elliptic, hyperbolic, or parabolic. The notes go on to cover the finite difference method in one and two dimensions, the calculus of variations, and the linear finite element method.

Uploaded by

Anuraag Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views19 pages

Finite Element Method: Foundations: Lecture Notes

This document provides lecture notes on the finite element method. It begins with an introduction to numerical methods for solving partial differential equations, including the finite difference method and finite element method. It then classifies partial differential equations of second order as either elliptic, hyperbolic, or parabolic. The notes go on to cover the finite difference method in one and two dimensions, the calculus of variations, and the linear finite element method.

Uploaded by

Anuraag Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Lecture Notes

Finite Element Method: Foundations

Prof. Dr.-Ing. habil. Jörg Schröder


University Duisburg-Essen
Faculty of Engineering Sciences, Department of Civil Engineering
Institute of Mechanics

Summer term 2013

Lecturer: Dr.-Ing. Alexander Schwarz


Assistant: Dipl.-Ing. (FH) Serdar Serdas, MSc

(These lecture notes are based on the translated version of the script
“Numerische Methoden der Mechanik I”, Jörg Schröder,
and the monograph
“Tensor Calculus for Engineers with Applications to Continuum and Computational
Mechanics”, (to appear 2014), Reint de Boer, Jörg Schröder)
Finite Element Method: Foundations, 
c J. Schröder I

Contents

1 Introduction 1

2 Classification of partial differential equations of second order 2

3 Finite-Difference-Method 5
3.1 One-dimensional Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.1 Discretization and Differential quotients in 1D . . . . . . . . . . . . 5
3.1.2 Example: Beam with constant cross section. . . . . . . . . . . . . . 8
3.1.3 Parabolic problems: equation of heat conduction . . . . . . . . . . . 11
3.2 Two-dimensional problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.1 Discretization 2D . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.2 Difference quotients 2D . . . . . . . . . . . . . . . . . . . . . . . . . 15

4 Foundations of the Calculus of Variations 20


4.1 Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2 Classical Method, Euler-Lagrange Equation . . . . . . . . . . . . . . . . . 22
4.2.1 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2.2 Constraint Conditions . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3 Direct Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3.1 Ritz’s Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3.2 Weighted Residual Methods . . . . . . . . . . . . . . . . . . . . . . 32

5 Linear Finite Element Method 38


5.1 Illustration of the Finite Element Concept . . . . . . . . . . . . . . . . . . 38
5.1.1 Idealization of the Physical System . . . . . . . . . . . . . . . . . . 39
5.1.2 The Assembly Procedure . . . . . . . . . . . . . . . . . . . . . . . . 41
5.1.3 Remarks Concerning the Implementation . . . . . . . . . . . . . . . 44
5.2 Generalizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.3 Isoparametric Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.4 Quadrilateral Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
5.4.1 Variational Formulation . . . . . . . . . . . . . . . . . . . . . . . . 63
5.4.2 Finite-Element-Discretization . . . . . . . . . . . . . . . . . . . . . 65
5.5 Numerical Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.6 Beam Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
5.6.1 Beam Theory according to Euler-Bernoulli for simple bending . . . 75
Finite Element Method: Foundations, 
c J. Schröder 1

1 Introduction

Due to the rapid developments in the field of computer technology and the methods of
calculation, respectively, the application of numerical simulations becomes more and more
significant in all areas of engineering and research. Generally, typical mechanical problems
are examined as follows:

1. An appropriate mathematical model of the problem is derived. Usually, this re-


sults in a continuous problem, which is for example formulated in the framework
of continuum mechanics. The problem is then described by a system of (partial)
differential equations.

2. The continuous system is approximated by an appropriate discrete problem. There


the field variables, which have to be computed, are approximated by a finite number
of values. This process is referred to as disretization; in this context we distinguish
between disretization of the physical space and disretization of the system of differ-
ential equations.

3. As a result of the discretization process we obtain algebraic systems of equations,


which are solved by direct or iterative algorithms.

4. After the solution of the discrete problem often several millions of computed quan-
tities are available, which have to be visualized for interpretation.

Well-known discretization methods are:

• Finite-Difference-Method

• Finite-Element-Method

• Finite-Volume-Method

• Boundary-Element-Method

• Meshfree Method

In the lecture “Finite Element Method: Foundations” we are dealing with the Finite-
Difference-Method and the Finite-Element-Method for linear problems. In the field of solid
mechanics the Finite-Element-Method is of particular significance due to its flexibility
enabling the handling of complex problems for the numerical solution of elliptic and
parabolic problems. Compared to the Finite-Difference-Method and the Finite-Volume-
Method the Finite-Element-Method is specific to the variational formulation of differential
equations.
Finite Element Method: Foundations, 
c J. Schröder 2

2 Classification of partial differential equations of second order

In this chapter some foundations and definitions are repeated in the context of partial
differential equations with view to mechanical engineering problems. In the sequel we clas-
sify partial differential equations of second order and present prototypes of the particular
classes.
The linear partial differential equation in the two variables x := (x1 , x2 )T and the unknown
function u(x) is given by
A(x)u,11 +2B(x)u,12 +C(x)u,22 + . . . = F (x) (1)
for all x in the considered domain B. Herein, we have used the abbreviations
∂u ∂2u ∂2u
u,1 := ; u,11 := ; u,12 := ; ... (2)
∂x1 ∂x1 ∂x1 ∂x1 ∂x2
The type of partial differential equation depends on the sign of the discriminant
δ := AC − B 2 (3)
in the considered domain. We distinguish between the following four cases:

1. δ < 0 : hyperbolic DE ⎪


2. δ = 0 : parabolic DE
. (4)
3. δ > 0 : elliptic DE ⎪


4. δ modifies its sign: mixed type
The sign of the discriminant is invariant to any transformations of the independent vari-
ables. Hence, the type of the differential equation is an invariant with respect to the
independent variables.
In case of the classification of partial differential equations with more than two indepen-
dent variables we consider the description
 ∂ 2 u(x)
aik + ... = 0 (5)
i,k
∂xi ∂xk

with the symmetric real matrix A = (aik ). If the coefficients aik are no functions of
the x, we refer to the differential equation as linear differential equation of second order
with constant coefficients. By the use of a linear transformation, Equation (5) can be
reformulated by
 ∂ 2 u(x)
κi + ... = 0, (6)
i
∂x2i
in such a way that all coefficients κi take the values +1, −1 or 0.
Depending on the signs we consider the following cases:

1. The DE is hyperbolic, if all coefficients κi differ from zero ⎪



and one κi has a converse sign with respect to the others. ⎪



2. The DE is parabolic, if one of the coefficients κi vanishes ⎪


and the others differ from zero and have the same sign.
(7)
3. The DE is elliptic, if all coefficients differ from zero ⎪



and have the same sign. ⎪



4. An equation is called parabolic, hyperbolic or elliptic, if it ⎪


exhibits the corresponding characteristics for all points of the domain.
Finite Element Method: Foundations, 
c J. Schröder 3

Prototype of a hyperbolic differential equation: wave equation


The motion of a string B with B ∈ [0, l], with given (zero) displacements at both ends, is
described by
1 ⎫
PDE : u, −u, = 0 x ∈ B , t ≥ 0 ⎪

c2
tt 11 ⎪

Boundary conditions: u(0, t) = u(l, t) = 0 t ≥ 0 (8)
u(x, 0) = u0 (x) x ∈ B ⎪

Initial state: ⎪

Initial velocity u,t (x, 0) = v0 (x) x ∈ B

Herein, the parameter c > 0 characterizes the velocity of wave propagation. We consider
the transformed partial differential equation

c2 u,11 −u,tt = 0 (9)

and identify the values of the coefficients A = c2 , B = 0 and C = −1. The discriminant

δ = −c2 < 0 , (10)

shows that the wave equation is hyperbolic.


Prototype of a parabolic differential equation: equation of heat conduction
Parabolic problems describe equalizing processes like diffusion or heat conduction. With
proceeding time these processes exhibit a smoothing effect. Let ϑ(x, t) be the distribution
of temperature in points x = (x1 , x2 )T of the body B ⊂ IR2 with the boundary ∂B at a
time t. The heat flux h results from the Fourier law
   
h1 ϑ,1
h = −κ gradϑ(x, t) bzw. = −κ , (11)
h2 ϑ,2

where κ is the heat conductivity constant. From the law of conservation of energy we
obtain the classical equation of the heat flux (without thermomechanical coupling)

ρcp ϑ,t = κϑ + ρr (12)

with a constant density ρ, a constant specific heat capacity cp , the available heat source
∂2ϑ
r and the Laplace operator ϑ = j 2 . In case of parabolic problems we deal with
∂xj
initial boundary value problems. The system is described by

PDE : ρcp ϑ,t = κϑ + ρr x ∈ B , t > 0 ⎬
Boundary conditions: ϑ(x, t) = ϑ0 (x) x ∈ ∂B , t ≥ 0 (13)

Initial temperature: ϑ(x, 0) = ϑ1 (x) x ∈ B , t = 0

Let us consider the one-dimensional case of equation (13)1 we obtain

ρcp ϑ,t = κϑ,11 +ρr . (14)

With A = κ, B = 0 and C = 0 we obtain from Equation (3) the discriminant

δ = 0, (15)
Finite Element Method: Foundations, 
c J. Schröder 4

i.e. the diffusion equation is parabolic.


Prototype of an elliptic differential equation: potential equation
A classical example of an elliptic differential equation is the potential equation. We con-
sider a domain B ⊂ IR2 , in which a function u(x) is searched for satisfying the differential
equation of 2nd Order
u,11 +u,22 = 0 . (16)
In order to solve such problems corresponding boundaries u have to be formulated, for
example
u=0 auf ∂B . (17)
Identifying the coefficients in equation (1), i.e. A = C = 1 and B = 0, the discriminant
of equation (3) yields

δ = 1 > 0, (18)

and we find that Equation (16) is elliptic.


Remark: The potential equation u = 0 is a special case of the Poisson equation

u(x) = −f (x) . (19)

Summary: Classification in n variables in case of linear differential equations


of second order
The general partial differential equation of 2nd order has the form

n 
n
− aik (x)u,ik + bi (x)u,i +c(x)u = f (x) . (20)
i,k=1 i=1

If u(x) is two times consistently differentiable, we are able to conclude from u,ik = u,ki
the symmetry aik = aki . The corresponding coefficient matrix A is symmetric.
Following classifications are valid:

1. The DE in equation (20) is hyperbolic in a point x, if A(x) ⎪



has one negative eigenvalue and n − 1 positive eigenvalues. ⎪



2. The DE in equation (20) is parabolic in a point x, if A(x) ⎪


is positive semidefinite.
(21)
3. The DE in equation (20) is elliptic in a point x, if A(x) ⎪



is positive definite. ⎪


4. The DE has the property 1., 2. or 3., if it has the associated properties ⎪



for all points of the area.

In general, the partial differential equation can be transformed to the representation



ü + Lu = f hyperbolic case ⎬
u̇ + Lu = f parabolic case . (22)

Lu = f elliptic case

Herein, L is an elliptic differential operator, see Braess [?].


Finite Element Method: Foundations, 
c J. Schröder 5

3 Finite-Difference-Method

In this chapter we consider the numerical solution of common and partial differential
equations by the Finite-Difference-Method. There, we compute approximated values of
the solution at grid points by replacing the derivatives in the differential equations with
difference quotients. This leads to a discrete problem resulting in an algebraic system
of equations of the form Ax = f . The solution x are the approximated values of the
continuous problem at the grid points.

3.1 One-dimensional Problem

In this section we want to figure out the way of solving ordinary differential equations of
2nd order with the Finite-Difference-Method in one-dimensional problems. We are looking
for a scalar-valued function

u : B ∪ ∂B → IR (23)

in the domain B ⊂ IR with the boundary ∂B, which satisfies for given

f : B → IR and g : ∂B → IR (24)

the differential equation in the domain B with the boundary conditions


u (x) = −f (x) in B


. (25)
u = g on ∂B

3.1.1 Discretization and Differential quotients in 1D At first we consider one-


dimensional problems, in which the considered area B ⊂ IR is defined by

B := [0, l] with l > 0. (26)

For the discretization we choose the constant increment h > 0 in order to satisfy

l =n·h with n ∈ IN . (27)

1
0
11
00 0
1
h

00
11 0
1
0
1
00
11 1 2 3 x
0 n
Figure 1: Spatial discretization of the one-dimensional problem with constant increment h.

The grid points of the area B are defined by

Bh := {ih | i = 1, . . . , n − 1} . (28)

The points of the boundary ∂B result from

∂Bh := {ih | i = 0 and i = n} . (29)


Finite Element Method: Foundations, 
c J. Schröder 6

Differential quotients: First of all we consider the Taylor series expansion of an one-
dimensional function u(x + h) in the point x
1 1 1
u(x + h) = u(x) + u (x)h + u (x)h2 + u (x)h3 + . . . . (30)
1! 2! 3!
Then the first derivative is computed from solving Equation (30) with respect to u (x)

u(x + h) − u(x) 1  1 

u (x) = − u (x)h − u (x)h − . . . ⎪
2 ⎬
h 2! 3! . (31)
 u(x + h) − u(x) ⎪

u (x) = + O(h)
h
Equation (31)2 is referred to as difference quotient.
u(x)

CDQ
F DQ
BDQ

x−h x x+h x

Figure 2: Visualization of the central difference quotient (CDQ), the backward difference
quotient (BDQ) and the forward difference quotient (FDQ) of a function u(x).

From the development of u(x − h) at point x we receive analogously


1 1 1
u(x − h) = u(x) − u (x)h + u (x)h2 − u (x)h3 + . . . . (32)
1! 2! 3!
Then, the first derivative yields

u(x) − u(x − h) 1  1 

u (x) = + u (x)h − u (x)h + . . . ⎪
2 ⎬
h 2! 3! , (33)
 u(x) − u(x − h) ⎪

u (x) = + O(h)
h
Here, Equation (33)2 is referred to as backward difference quotient.
By summing up Equations (31) and (33) yields the central difference quotient being the
approximation of the first derivative of u(x)

u(x + h) − u(x − h) 1 

u (x) = − u (x)h + . . . ⎪
2 ⎬
2h 3!2 . (34)
 u(x + h) − u(x − h) 2 ⎪

u (x) = + O(h )
2h
For the approximaion of the second derivative we sum the Equations (30) and (32)
u(x + h) + u(x − h) = 2u(x) + u (x)h2 + O(h4 ) (35)
and obtain directly
u(x + h) − 2u(x) + u(x − h)
u (x) = 2
+ O(h2 ) . (36)
h
Finite Element Method: Foundations, 
c J. Schröder 7

Table 1: Differential quotients for an one-dimensional function

u(x + h) − u(x)
1. forward DQ u (x) =
h
 u(x) − u(x − h)
2. backward DQ u (x) =
h
 u(x + h) − u(x − h)
3. central DQ u (x) =
2h
u(x + h) − 2u(x) + u(x − h)
4. 2nd derivative u (x) =
h2

Example: We consider the function

u(x) = ex (37)

and compute the first derivative on the point x = 0 with the increment h = 0.1. The
approximations yield

u (x = 0) = 1, 05 forward dq ⎪ ⎪

u (x = 0) = 0, 95 backward dq
. (38)
u (x = 0) = 1, 0017 central dq ⎪


u (x = 0) = 1, 0 exact dq

A graphical representation of the function (37) and its derivative is given in Fig. 3.

8
x x
u(x)=e , u’(x)=e
7

5
f(x)

1
0 0.5 1 1.5 2
x

Figure 3: Graphical representation of the function u(x) = ex and its derivative.


Finite Element Method: Foundations, 
c J. Schröder 8

3.1.2 Example: Beam with constant cross section. As a numerical example we


consider a beam fixed at both sides, loaded by p(x), wich has a constant cross-sectional
area A and a constant Young’s modulus E, see Fig. 4.

p0 +Δp

11
00
00
11
p0

00
11 11
00
00
11
00
11
00
11 00
11 x

l
00
11
Figure 4: Model problem: beam with constant stiffness EA and distributed loading p(x).

The model problem is described by an ordinary differential equation of 2nd order in the
domain B and a given displacement on ∂B

EAu (x) = −p(x) ⎬
u(x = 0) = 0 . (39)

u(x = l) = 0

With p(x) = p0 + Δ p · x/l and with the integration of Equation (39)1 we get the general
solution
Δp 3 p0 2
u(x) = − x − x + c1 x + c2 . (40)
6EAl 2EA
After incorporating the boundary conditions (39)2,3 we obtain

Δp 3 p0 2 p0 l Δpl
u(x) = − x − x + + x. (41)
6EAl 2EA 2EA 6EA

In the framework of the Finite-Difference-Method a discretization of the problem is re-


quired. We consider a discretization with n + 1 grid points of equidistant increments h.
The this leads to the domain discretization Bh as shown in Fig. 5.

11
00 1
0
h

00
11 0
1
0
1
00
11 1 2 3 x
0 n
Figure 5: Spatial discretization of the beam.

We consider the case p(x) = p0 and approximate the second derivative by using Table 1.
Then we achieve the approximation of the field equations for the individual grid points
by
ui+1 − 2ui + ui−1
EA = −p0 for i = 1, . . . , n − 1 . (42)
h2
Finite Element Method: Foundations, 
c J. Schröder 9

The discrete displacements on the boundary are

u0 = 0 und un = 0 . (43)

We write Equation (42) for every grid point and obtain


p0 2 ⎫
u0 − 2u1 + u2 = − h ⎪

EA ⎪

p0 2 ⎪

u1 − 2u2 + u3 = − h ⎬
EA . (44)
.. ⎪

. ⎪

p0 2 ⎪

un−2 − 2un−1 + un = − h ⎭
EA
Taking into account the boundary conditions of Equation (43) the linear system of equa-
tions can be reformulated in matrix notation by
⎡ ⎤⎡ ⎤ ⎡ ⎤
2 −1 0 0 0 ... 0 u1 1
⎢ −1 2 −1 0 0 . . . 0 ⎥ ⎢ u2 ⎥ ⎢ 1 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 0 −1 2 −1 0 . . . 0 ⎥ ⎢ u3 ⎥ ⎢ 1 ⎥
⎢ ⎥⎢ ⎥ 2 ⎢ ⎥
⎢ 0 0 −1 2 −1 . . . 0 ⎥ ⎢ ⎥ h ⎢ ⎥
⎢ ⎥ ⎢ u4 ⎥ = p0 ⎢ 1 ⎥ (45)
⎢ .. .. ⎥ ⎢ .. ⎥ EA ⎢ .. ⎥
⎢ . . ⎥ ⎢ ⎥ ⎢ . ⎥
⎢ ⎥⎢ . ⎥ ⎢ ⎥
⎣ 0 0 0 0 0 . . . −1 ⎦ ⎣ un−2 ⎦ ⎣ 1 ⎦
0 0 0 0 0 ... 2 un−1 1

or in absolute representation

A·u =f. (46)

The solution of the problem with different discretizations is depicted in Fig. 6. Specific
values of the system and the material are l = 1, A = 1, p0 = 1, E = 1.

Exercise: Calculate the displacement u(x) of the beam shown in Fig. 4 for the loading
conditions p0 = 1 and Δp = 0. For this purpose consider the discretizations n = 2, n = 4,
n = 11 and compare the results with the exact analytical solution given in Equation (41).
Finite Element Method: Foundations, 
c J. Schröder 10

Solution:
0.14
analy
n=2
n=4
n=11
0.12

displacement u(x)
Verschiebung u(x)
0.1

0.08

0.06

0.04

0.02

0
0 0.2 0.4 0.6 0.8 1
Stablaenge l

length of the beam l


Figure 6: Displacement u(x) of the beam with constant cross section for the discretizations
n = 2, n = 4, n = 11 and the analytical solution.
Finite Element Method: Foundations, 
c J. Schröder 11

3.1.3 Parabolic problems: equation of heat conduction In the previous sections


an elliptic differential equation was considered. Using the equation of heat conduction as
an example we now analyze the numerical solution of the parabolic differential equation

ϑ,t (x, t) = c2 ϑ,xx (x, t) ∀ x ∈ B and t>0 (47)

in a one-dimensional domain

B := (0, l) with l > 0 . (48)

The temperature boundary conditions are

ϑ(0, t) = ϑ(l, t) = 0 for t > 0 (49)

and the initial temperature is given by

ϑ(x, 0) = ϑ̄(x) for x ∈ B and t = 0. (50)

The spatial discretization results analogously from Section 3.1.1, i.e. with the constant
increment h

Bh := {ih | i = 1, . . . , n − 1} and ∂Bh := {ih | i = 0 and i = n} . (51)

In addition to a spatial discretization a discretization in time is needed. Therefore, we


choose the grid-increment Δt and get the discrete times tj by

tj = jΔt for j = 0, 1, 2, . . . . (52)

We calculate the Taylor polynom in t at a discrete time tj according to the results from
the previous section by using the forward difference quotient and obtain

∂ϑ(xi , tj ) ϑ(xi , tj + Δt) − ϑ(xi , tj ) Δt ∂ 2 ϑ(xi , μj )


= − −... , (53)
∂t Δt 2 ∂t2
where μj ∈ (tj , tj+1 ) describes the continuous time in the discrete time-increment. By
inserting the approximation for the second derivative of ϑ with respect to x at a point xi
yields the difference quotient

∂ 2 ϑ(xi , tj ) ϑ(xi+1 , tj ) − 2ϑ(xi , tj ) + ϑ(xi−1 , tj ) h2 ∂ 4 ϑ(ξi , tj )


= − − ... (54)
∂x2 h2 12 ∂x4
with ξi ∈ (xi−1 , xi+1 ). We disregard the last terms in Equations (53) and (54) and insert
the difference quotients in (47) in order to obtain the discretized equation

ϑ(xi , tj+1) − ϑ(xi , tj ) ϑ(xi+1 , tj ) − 2ϑ(xi , tj ) + ϑ(xi−1 , tj )


− c2 = 0. (55)
Δt h2
In the sequel we denote ϑ(xi , tj ) with ϑij . After solving Equation (55) with respect to
ϑi,j+1 we obtain

2c2 Δt c2 Δt
ϑi,j+1 = 1 − ϑ ij + (ϑi+1,j + ϑi−1,j ) (56)
h2 h2
Finite Element Method: Foundations, 
c J. Schröder 12

for all i = 1, . . . , (n − 1) and j = 1, 2, . . .. For the solution of the discrete problem we


proceed as follows; with given initial temperature ϑ(x, 0) = ϑ1 (x) the values

ϑi0 = ϑ̄(xi ) ∀ i = 0, 1, . . . , n (57)

are well-known. Furthermore, with given boundary conditions (49) we obtain

ϑ0j = ϑnj = 0 ∀ j = 1, 2, . . . . (58)

The abbreviation α = c2 Δt/h2 leads to the discretized equation for j = 0

ϑi1 = (1 − 2α)ϑi0 + α(ϑi+1,0 + ϑi−1,0 ) . (59)

With the unknown temperature vector for the general discrete time tj with j = 1, 2, ...

ϑ(j) := [ ϑ1j ϑ2j . . . ϑn−1,j ]T (60)

and the given vector of the initial temperature distribution (j = 0)

ϑ(0) := [ ϑ̄1 ϑ̄2 . . . ϑ̄n−1 ]T (61)

the difference scheme (59) results for time t1 and all positions xi in the system of equations

ϑ(1) = Aϑ(0) . (62)

Here, A ∈ IR(n−1)×(n−1) is a tri-diagonal matrix of the form


⎡ ⎤
(1 − 2α) α 0 ... 0
⎢ α (1 − 2α) α ... 0 ⎥
⎢ ⎥
⎢ (1 − 2α) ⎥
A=⎢ 0 α ... 0 ⎥. (63)
⎢ .. .. .. .. .. ⎥
⎣ . . . . . ⎦
0 0 0 α (1 − 2α)

With Equation (62) we know the temperatures at all spatial grid-points at time t1 . Re-
peating this process for j = 2 yields the system of equations

ϑ(j) = Aϑ(j−1) with j = 2 , (64)

which can be computed directly. A repeated evaluation of (64) for j = 3, 4, ... yields
the unknown temperature ϑ(j) for all discrete points (xi , tj ). The temperatures can be
computed by the known values of the previous time steps. This explicit difference method
is referred to as forward difference method.
Remark: The forward method is only stable, if the condition
Δt 1
c2 2
≤ (65)
h 2
holds. Hence, the time increment Δt is constrained with given increment h. More stable
methods are the implicit difference methods. Such methods are e.g. obtained by inserting
the backward difference quotient
∂ϑ(xi , tj ) ϑ(xi , tj ) − ϑ(xi , tj−1)
≈ . (66)
∂t Δt
Finite Element Method: Foundations, 
c J. Schröder 13

Introducing Equation (66) and (54) in the differential equation yields by disregarding
terms of higher order the backward difference method
ϑij − ϑi,j−1 ϑi+1,j − 2ϑij + ϑi−1,j
− c2 = 0, (67)
Δt h2
for all i = 1, . . . , n − 1 and j = 1, 2, . . .. The repeated application of this procedure yields

Aϑ(j) = ϑ(j−1) (68)

with the tri-diagonal matrix


⎡ ⎤
(1 + 2α) −α 0 ... 0
⎢ −α (1 + 2α) −α ... 0 ⎥
⎢ ⎥
⎢ −α ⎥
A=⎢ 0 (1 + 2α) ... 0 ⎥. (69)
⎢ .. .. .. .. .. ⎥
⎣ . . . . . ⎦
0 0 0 −α (1 + 2α)

This is an implicit method (backward difference method) since this linear system of equa-
tions has to be solved.
Finite Element Method: Foundations, 
c J. Schröder 14

3.2 Two-dimensional problem

In the sequel the Finite-Difference-Method (FDM) is considered by means of the Poisson


equation (elliptic equation) for a two-dimensional, rectangular domain B, whose boundary
is identified by ∂B. The precise problem can be reformulated as follows:
Determine a function
u : B ∪ ∂B → IR (70)
with given functions
g : ∂B → IR and f : B → IR , (71)
such that


d=2 2
∂ u ⎪

− = f in B
∂x2i (72)
i=1 ⎪

u = g on ∂B
is fulfilled. The unknown function u(x1 , x2 ) can be interpreted as an electromagnetic
potential, displacement of an elastic membrane or the planar equilibrium temperature
distribution. An alternative notation for the right hand side of Equation (72)1 is

2
∂2u
Δu = u,11 +u,22 = , (73)
i=1
∂x2i
with the Laplace operator Δ(·).

3.2.1 Discretization 2D In the framework of the FDM the numerical solution of the
boundary value problem is computed based on a finite number of grid points in B ∪ ∂B.
For this purpose, the derivatives are approximated by difference quotients evaluated as
discrete function values at the grid points. From this an algebraic system of equations
follows for the approximate solution. This process is called discretization.

Bh
∂Bh
distant from the boundary
close to the boundary

hy

hx

Figure 7: Discretization of the domain B = (0, lx ) × (0, ly ) yields the discretized domain
Bh with (nx + 1) · (ny + 1) grid points.

Here, we consider a two-dimensional problem (d = 2) and choose for the discretization


the increments hx , hy > 0 in both directions. In Fig. 7 a rectangular domain
B := (0, lx ) × (0, ly ) with lx , ly > 0 (74)
Finite Element Method: Foundations, 
c J. Schröder 15

is illustrated. For simplification an equidistant increment hx is chosen in x-direction and


hy in y-direction, respectively, i.e.

lx = nx hx and ly = ny hy with nx , ny ∈ IN . (75)

The grid points in the domain B are defined by

Bh := {(ihx , jhy ) | i = 1, . . . , nx − 1; j = 1, . . . , ny − 1} (76)

and the grid points on the boundary ∂B by

∂Bh := {(ihx , jhy ) | i ∈ {0, nx }, j ∈ {0, . . . , ny } or i ∈ {0, . . . , nx }, j ∈ {0, ny }} . (77)

Please note that here we focus on a boundary value problem which is rate-independent,
thus, here no time discretization is required.

3.2.2 Difference quotients 2D The approximation formula for each point in the
domain Bh is computed by
∂ 2 u(xi , yj ) u(xi+1 , yj ) − 2u(xi , yj ) + u(xi−1 , yj ) h2x ∂ 4 u(ξi , yj )
= − − ... (78)
∂x2 h2x 12 ∂x4
for ξi ∈ [xi−1 , xi+1 ]. With the Taylor polynom for y at a point yj we get analogously

∂ 2 u(xi , yj ) u(xi , yj+1) − 2u(xi , yj ) + u(xi , yj−1) h2y ∂ 4 u(xi , ηj )


= − − ... (79)
∂y 2 h2y 12 ∂y 4

for ηj ∈ [yj−1 , yj+1]. Inserting Equation (78) and (79) in the Poisson equation yields

u(xi+1 , yj ) − 2u(xi , yj ) + u(xi−1 , yj ) ⎪



h2x ⎪

u(xi , yj+1) − 2u(xi , yj ) + u(xi , yj−1) ⎬
∀ i = 1, 2, . . . , (nx − 1) and
+ (80)
h2y ⎪
⎪ j = 1, 2, . . . , (ny − 1).

h2x ∂ 4 u(ξi , yj ) h2y ∂ 4 u(xi , ηj ) ⎪


= f (xi , yj ) + 4
+ 4

12 x 12 y
We set the boundary conditions

u(xi , y0) = g(xi , y0 ) and u(xi , ym ) = g(xi , ym ) ∀ i = 1, 2, . . . , (nx − 1) (81)

and
u(x0 , yj ) = g(x0 , yj ) and u(xn , yj ) = g(xn , yj ) ∀ j = 0, 1, . . . , ny . (82)

Let us denote the approximation of u(xi , yj ) as uij , then a straighforward transformation


leads to the discrete form
  2 ⎫
2
hx hx ⎪
2 + 1 uij − (ui+1,j + ui−1,j ) − (ui,j+1 + ui,j−1) = −h2x f (xi , yj ) ⎪


hy hy ⎪



∀ i = 1, 2, . . . , (nx − 1) and j = 1, 2, . . . , (ny − 1) . (83)




u0j = g(x0 , yj ) , unj = g(xn , yj ) , ui0 = g(xi , y0) , uim = g(xi , ym ) ⎪



∀ i = 1, 2, . . . , (nx − 1) ; j = 1, 2, . . . , (ny − 1)
Finite Element Method: Foundations, 
c J. Schröder 16

For hx = hy = h we get the standard five-point stencil


⎡ ⎤
0 −1 0
1 ⎣
−1 4 −1 ⎦ . (84)
h2
0 −1 0

Example: Computation of the stationary temperature distribution in a slim, quadratic


metal plate with a length of lx = ly = l = 0, 5 m. The given boundary temperatures are
illustrated in Fig. 8.

ϑ = 100◦C

l = 0, 5 m

y
x

l = 0, 5 m
Figure 8: Quadratic plate with given boundary temperature.

The physical problem is described by the mathematical formulation

∂2ϑ ∂2ϑ
(x, y) + (x, y) = 0 ∀ (x, y) ∈ B , (85)
∂x2 ∂y 2
which is referred to as Laplace equation. The domain B is defined by

B := {(x, y)|0 < x < 0.5 , 0 < y < 0.5} (86)

and the boundary temperatures are

ϑ(0, y) = 0 , ϑ(x, 0) = 0 , ϑ(x, 0, 5) = 200x , ϑ(0, 5, y) = 200y . (87)

In this example we are interested in the solution of the boundary value problem for the
number of grid points given by nx = ny = 4, see Fig. 9.
Compare the numerical results with the exact analytical solution

ϑ(x, y) = 400xy . (88)

At the boundary nodes the temperature is known, whereas the temperature at the internal
grid points has to be computed. These remaining 9 grid points are numbered according
to Fig. 9.
Regarding equation (83)1 we get for hx = hy = h with ϑ ≡ u the expression

4ϑi,j − (ϑi+1,j + ϑi−1,j ) − (ϑi,j+1 + ϑi,j−1) = −h2 f (xi , yj ) . (89)


Finite Element Method: Foundations, 
c J. Schröder 17

ϑ(x; 0, 5) = 200x

21 22 23 24 25

16 17 18 19 20
ϑ=0 ϑ(0, 5; y) = 200y
11 12 13 14 15

6 7 8 9 10

1 2 3 4 5
ϑ=0
Figure 9: Discretization of the metal plate with 9 grid points in the domain and 16 boundary
points.

Utilizing the Equation (89) for point 7 with i = 1 and j = 1 yields

4ϑ1,1 − (ϑ2,1 + ϑ0,1 ) − (ϑ1,2 + ϑ1,0 ) = 0 . (90)

For simplification we use the transformation ϑ1,1 =: ϑ7 , ϑ1,2 =: ϑ12 , ϑ2,1 =: ϑ8 and obtain

4ϑ7 − (ϑ8 + 0) − (ϑ12 + 0) = 0 , (91)

respectively. The system of equations, which has to be solved, is given by application of


the difference sheme for all inner grid points
⎡ ⎤⎡ ⎤ ⎡ ⎤
4 −1 0 −1 0 0 0 0 0 ϑ7 0
⎢ −1 4 −1 0 −1 0 0 0 0 ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ϑ8 ⎥ ⎢ 0 ⎥
⎢ 0 −1 4 0 0 −1 0 0 ⎥ ⎢ ⎥ ⎢
0 ⎥ ⎢ ϑ9 ⎥ ⎢ 25 ⎥
⎢ ⎥
⎢ −1 0 0 4 −1 0 −1 0 0 ⎥ ⎢ ϑ12 ⎥ ⎢ 0 ⎥
⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ 0 −1 0 −1 4 −1 0 −1 0 ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ϑ13 ⎥ = ⎢ 0 ⎥ . (92)
⎢ 0 0 −1 0 −1 4 0 ⎥ ⎢ ⎥ ⎢
0 −1 ⎥ ⎢ ϑ14 ⎥ ⎢ 50 ⎥ ⎥

⎢ 0 0 0 −1 0 0 4 −1 0 ⎥ ⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ϑ17 ⎥ ⎢ 25 ⎥
⎣ 0 0 0 0 −1 0 −1 4 −1 ⎦ ⎣ ϑ18 ⎦ ⎣ 50 ⎦
0 0 0 0 0 −1 0 −1 4 ϑ19 150

The solution of this system of equations is


⎡ ⎤
6, 25
⎢ 12, 5 ⎥
⎢ ⎥
⎢ 18, 75 ⎥
⎢ ⎥
⎢ 12, 5 ⎥
⎢ ⎥
ϑ=⎢
⎢ 25, 0 ⎥

⎢ 37, 5 ⎥
⎢ ⎥
⎢ 18, 75 ⎥
⎢ ⎥
⎣ 37, 5 ⎦
56, 25

You might also like