7. Choice of approximating for the FE-method
– scalar problems
Finite Element Method
Differential Equation
Weak Formulation Approximating
Functions
Weighted Residuals
FEM - Formulation
Weak form of heat flow
Approximating Functions
• Choose degree of approximation
– Choose polynomials
– Higher degree => higher accuracy – Number of terms = number of nodes
• Examples of approximations:
x x
T( ) 1 2
3 4 2
3 2
) 1
(x x x x
T y x
y x
T( , ) 1 2 3
Approximating functions, 1-dim
• Formulate approximation as function of geometry and nodal values
x x
T( )
1
2• C-matrix method
• Lagrange interpolation polynomial
2 1
1
2 1 ( )
) 1 (
)
( x x T
T L x
L x x
T
Shape funct. N1 Shape funct. N2 Nodal
value
Nodal value
Approximating functions, 1-dim.
– The C-matrix method
• Linear approximation
• Write on matrix form
• Insert nodal values
• Solve for
• Insert eq. (2) in eq.(1) x
x
T( ) 1 2
Nα
2 1 2
1 1
)
(
x x
x T
1 2 1
1 1)
(x T x
T
2 2 1
2 2)
(x T x
T 1 ;
; 1
2 1 2
1 2
1
x
x T
T ae Cα
ae
α C1 (1)
(2)
; )
(x 1 e e e
T NC a N a
L x x L
x N x
Ne e
e 2 1
2
N 1
x T
T2
T1
x1 x2
T(x)
L=x2-x1
α
Approximating functions, 1-dim.
• Shape functions N
e(linear functions)
e e
x e
T( ) NC1a N a
L
x x L
x N x
Ne e
e 2 1
2
N 1
1 1 2 22 1 2
) 1
( N T N T
T N T
N x
T e e e e
x Ne1
1
x1 x2
x Ne2
1
x1 x2
L x N1e x 2
L x N2e x 1
x T
T2
T1
x1 x2
T(x)
L=x2-x1
Approximating functions
0 1
i i
N
N
in node i
in all other nodes
Approximating functions, 1-dim.
L x Nie x j
L x Nej x i
x Nei
1
xi xj
x Nej
1
xi xj
Approximating functions in 1-dim. weak form
e
x e
T( ) N a
• Approximate the temperature in each element by
• Weak form contains a derivative
Approximating functions in 1-dim. weak form
• Introduce matrix Be
• and we can write
• For the one-dimensional element
• or if using the C-matrix method
Element shape functions
Approximation for entire body built up element by element
Global shape functions
Global shape functions
Global shape functions
• Temperature at nodal points
• Global shape function matrix
• Approximation can be written as
• Gradient is given by
• or as
where
Approximating functions, 1-dim.
• Formulate approximation as function of geometry and nodal values
x x
T( )
1
2• C-matrix method
• Lagrange interpolation polynomial
2 1 1
2 1 ( )
) 1 (
)
( x x T
T L x
L x x
T
Shape funct. N1 Shape funct. N2 Nodal
value
Nodal value
Approximating Functions
– Lagrange’s interpolation formula
• Cubic element approximation
• Lagrange’s interpolation formula
• Set
k = current shape function n = number of nodal points n-1 = degree of polynomial
Approximating functions, 2-dim.
• Write the approximation as
• Reformulate on the form
• where
Approximating functions, 2-dim.
y x
y x
T ( , )
1
2
3k e k j
e j i
e
i T N T N T
N y
x
T( , )
) , ( x y N
eT
are the nodal temperatures are the shape functionsk j i ,,
• Write the approximation as
• Approximation at the nodal points
• Approximation may be written
Approximating Functions, 2-dim.
Nα
k j i
y x y
x T
1
) , (
Cα
k j i
k k
j j
i i
k j i
y x
y x
y x
T T T
1
1 1
e
k j i
k j i
T T T
a C C1 1
Inverse:
C-matrix method
e e ek j i
T T T y
x y
x
T C NC a N a
1 1 1
) , (
• Inverse of C
• Determine area by
• Shape functions for 2-dim triangle element
Approximating Functions – 2-dim.
Approximating Functions – 2-dim.
• Gradient of the temperature
that may be written
• and we can write where
Approximating Functions – 2-dim.
• For triangle element with three shape functions
• Inserting shape function gives
• Be is a constant matrix for the triangle element
Global shape functions – 2-dim.
2-dim. triangle elements
Summary
Convergence criteria
• Convergence criteria = When elements are infinitely small the approximate solution is infinitely close to the exact solution
Completeness (sv. fullständighet)
Compatibility (sv. kompatibilitet)
• Two neighbouring elements must have the same
temperature variation along their common boundary
Compatibility
The approximation must be continuous over the element boundaries
Compatibility
• Example: 4-node rectangle element
• Four nodes four terms
• Shape functions as
• where
• Shape functions determined from Lagrange’s formula
Compatibility
• Study two connected elements
• Check lines x=const and y=const
• Check approximation along x=c
• Collect terms
=> Linear approximation along x=c and two nodes
• Check for y=c
=> Linear approximation along y=c and two nodes
cy y
c y
c
T( , ) 1 2 3 4
y y
c c
y c
T( , ) (1 2 )(3 4 ) 1 2
x x
c c
c x
T( , ) (1 3 ) (2 4 ) 1 2
Element compatible!
xy y
x y
x
T( , ) 1 2 3 4
Compatibility
• Study two connected elements
• Check approximation along y=ax+b
• Collect terms
=> quadratic approximation along y=ax+b and two nodes )
( )
( )
,
(x ax b 1 2x 3 ax b 4x ax b
T
2 3 2
1
2 4
4 2
2 3
1 ) ( )
( ) ,
(
x x
ax x
b a
b b
ax x T
Element NOT compatible!
y=ax+b
xy y
x y
x
T( , ) 1 2 3 4
Rate of Convergence
• How fast the solution gets closer to the exact solution with decreasing element size.
• Linear elements:
𝑇 𝑥, 𝑦 = 𝛼1 + 𝛼2𝑥 + 𝛼3𝑦 + C𝑟2
• Quadratic elements
𝑇 𝑥, 𝑦 = 𝛼1 + 𝛼2𝑥 + 𝛼3𝑦 + 𝛼4𝑥2 + 𝛼5𝑥𝑦 + 𝛼6𝑦2 + C𝑟3
• where C𝑟𝑛 is the error of order n and r a distance
• The error e = C 𝑟 𝑛
Linear elements: quadratic convergence, e = C 𝑟 2 Quadratic elements: cubic convergence, e = C 𝑟 3
Choosing polynomial
• Choose a complete polynomial
• Avoid parasitic terms
• examples
complete parasitic xy y
x
T 1 2 3 4
complete No parasitic!
2 6 5
2 4 3
2
1 x y x xy y
T
complete parasitic
y x xy
y xy
x y
x
T 1 2 3 4 2 5 6 2 7 2 8 2