lecture 2
DESCRIPTION
Numerical methods in heat transferTRANSCRIPT
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 1
SPATIAL DISCRETISATION OF A GEOMETRICAL DOMAIN
LECTURE_2
q CONTROL (FINITE) - VOLUME GRIDS
q PIECE - WISE FINITE ELEMENT INTERPLATION
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 2
COMP. SIMULATION MODEL & ITS CODE
DISCRETIZATION
NUMERICAL METHODS
COMPUTER SIMULATION
ALGEBRAIC EQUATIONS
SOLUTION MATHEMATICAL MODEL § PART. DIFFER. / INTEGRAL CONSERVATION EQUATION § INITIAL & BOUNDARY CONDS § CLOSURE RELATIONS
MODELLING: APPROXIMATIONS SIMPLIFCATIONS
From reality to its computer simulation
REALITY ANALYSED
PHENOMENA OBSERVATION,
MEASUREMENTS
PHYSICAL MODEL
LECTURE 2
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 3
FROM MATHEMATICAL MODEL TO ITS COMPUTER SIMULATION MODEL
MATHEMATICAL MODEL
(CONTINUOUS)
DISCRETISATION OF GEOMETRICAL
DOMAIN
SPATIAL DISCRETISATION OF MODEL EQUATIONS
FULLY-DICSRETE MODEL
(ALGEBRAIC)
STEADY-STATE
PROBLEM
TIME DISCRETISATION
COMPUTER SIMULATION MODEL
SEMI-DISCRETE MODEL
TRANSIENT PROBLEM
LECTURE 2
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 4
GEOMETRICAL DISCRETISATION
Node – a selected point in a domain or on a domain boundary Control volume, finite element – a sub-domain created by linking neigbouring nodes Discretisation - given by a number of nodes, their locations and the way they are connected to form a grid of sub-domains
Basic Definitions:
internal and boundary nodes
control volume finite elements
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 5
WHAT DETERMINES A PROPER DISCRETISATION Decisions involved: number of nodes, their locations, shapes and sizes of sub-domains (control-volumes, finite elements) Engineering art: no theoretical basis, the intuition and judgment based on experience
Ø the need for good approximation of complex shapes of a domain with curvilinear boundaries - solution of the field theory problems are sensitive to even minor changes of the domain shape
Some reasonable rules for a well- planned discretisation:
Ø a grid must distinguish interfaces of discontinuities in material properties and boundary conditions
Ø general knowledge on behaviour of calculated unknowns – helpful in creating a grid that can cope with local gradients, vortices, etc.
Ø the used method of discretisation of the conservation equations (FEM, finite difference, control volume, BEM – regular, irregular grids)
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 6
I. Finite Difference Grids q Classical Finite Difference Method – regular grids
Finite difference approximation of a second order derivative requires three nodes along a line parallel to the coordinate axis – a restriction to orthogonal grids and regular shapes of a discretised domain
q Control-Volume Method ü based on the integral formulation of mass, momentum and energy conservation equation - what implies a basic divison of the domain into balance sub-domains (control volumes)
ü two different practices of creating a control-volume grid
PRACTICE 1 For chosen nodes locations in the domain and on its boundaries; then a control volume is defined around each of the nodes
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 7
P
B
A
E e Control volume of a
boundary node
Control volume of an internal node
Characteristic features: 1. Node P does not lie in the geometric centre of the control volume 2. Point ‘e’, where an averaged diffusive flux through AB boundary
surface is calculated, does not lie at the geometric centre of this control volume face
3. Boundary node has a ‘half’ control volume
Faces (boundaries) of a control volume are placed midway between neighbouring grid points (nodes)
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 8
PRACTICE 2 First the control volumes are defined and then nodes are placed in their geometrical centres – faces do not lie midway between nodes
Characteristic features: 1. Node P lies in the geometrical centre of its control volume 2. Point ‘e’, where an averaged diffusive flux through AB
boundary surface is calculated, lies in the geometric centre of this control volume face
3. Control volume of a boundary node is ‘full’ – the node does not lie on the boundary surface
P
A
E e Control volume
of a boundary node
Control volume of an internal
node
B
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 9
Comparison of Practice_1 and Practice_2
2. In Practice_1, where the grid point may not be at the geometrical centre of the control volume, the nodal value φP cannot be regarded as a good representative of an averaged value of the unknown
3. In Practice_1, where the point ‘e’ may not be at the geometrical centre of the control volume face, the diffusive flux calculated at this location cannot be regarded as a good representative of an averaged value of the flux over the entire face
1. Both Practice_1 and Practice_2 are identical on uniform grids (uniform control volume sizes)
PP
BB
AA
ee×PP
BB
AA
ee×
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 10
5. Midway faces in Practice_1 do provide higher accuracy in calculating the diffusive flux across the face (the slope of the linear profile is the same as the slope of a less crude parabolic interpolation evaluated midway between grid points)
4. Practice_2 enables drawing the control volume boundaries along interfaces of different materials where the discontinuity in material properties occurs, and/or discontinuity of boundary conditions can be conveniently handled ( the control volume can be designed so as to avoid two different boundary conditions along a one face)
Isothermal boundary
surface MATERIAL 1
MATERIAL 2
Adiabatic boundary
surface
Composite solid
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 11
FINITE DIFFERENCE GRID FOR CURVILINEAR GEOMETRY
1. REGULAR GRID WITH BLOCKED-OFF CONTROL VOLUMES
Advantage: the possibility of using computationally efficient program written for a regular geometry
Drawbacks: ‘star-case’ approximation of the domain boundaries; waste of computing time and storage (computations must be performed for inactive zones and the results must be stored)
Ø Some control volumes are made inactive so the remaining sub- domains form good approximation of the irregular domain
Ø Blocking-off - establishing known values of φ in inactive control volumes through the use of large source terms or a large diffusivity in the conservation equation
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 12
2. ORTOGONAL CURVILINEAR COORDINATES
The method does not solve the problem of a good approximation of boundaries, which are not parallel to the curvilinear grid lines.
cylindrical, spherical or general orthogonal
curvilinear coordinates
The orthogonal property of the grid is essential - a diffusion flux across a control-volume face calculated in terms of the difference between two nodal values of φ – the face must be normal to the line joining the two grid points.
PE
ΩpΔΘ
Δr
nq
Γp
Θ
rx2
x1
PE
ΩpΔΘ
Δr
nq
Γp
Θ
rx2
x1
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 13
3. NON-ORTHOGONAL CONTROL-VOLUME GRIDS
More precise approximation of curvilinear boundaries but at the expense of a higher number of neighbouring nodes – less sparse matrices of a final set of algebraic equations, and thus more expensive calculations
Ø Grid points at 2D triangle (or 3D tetrahedra) vertices
Ø Control-volume faces obtained by joining respective segments of mid- perpendiculars of corresponding triangle sides – only acute triangles (midperpendiculars of an obtuse triangle do not intersect in a common point)
Fragment of PFragment of P-- control control volume in a trianglevolume in a triangle
PP
TTSS
Control volume of Control volume of internal node Pinternal node P
PP
SS
TT
Fragment of PFragment of P-- control control volume in a trianglevolume in a triangle
PP
TTSS
Control volume of Control volume of internal node Pinternal node P
PP
SS
TT
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 14
C’
B’
D’ E’
A’ F’ ζ η
F
η = const
ζ = const
x2
x1
C
B
D E
A
4. BOUNDARY FITTED CO-ORDINATES Numerical generation of curvilinear co-ordinates locally fitted to fragments of boundary surfaces
The need for solution of sets of coupled elliptic equations to determine local curvilinear co-ordinates (η ,ζ), complex partial differential equations – computationally intensive method
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 15
II. Finite Element geometrical discretisation
Ø THE MOST USEFUL, COMMONLY ACKNOWLEDGED FEATURE: the possibility of using various curvilinear elements for close approximation of local segments of complex boundaries
Ø A FUNDAMENTAL PRINCIPLE: arbitrary geometrical shape can be accurately modelled by an assemblage of locally simple shapes – finite elements
parabolic element
parabolic element
linear element ‘piece-wise’ interpolation
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 16
GLOBAL COORDINATE SYSTEM
l
A
B
C 2
3 1 P
lP
x1
x2 x1P x2P
ζ
1 2 3
LOCAL (NATURAL) COORDINATE SYSTEM
ζζ = −1 ζ = 1
LOCAL POLYNOMIAL INTERPOLATION - A KEY IDEA
Example - 1: one – dimensional parabolic element
( ) 2 for 1,2= + + =i i i ix a b c iζ ζ ζ
12 1 112
AC
AC
l l
lζ ζ
−= ⇒ − ≤ ≤
( ) 21 1 1 1 for 1= + + =x a b c iζ ζ ζ
( ) 22 2 2 2 for 2= + + =x a b c iζ ζ ζ
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 17
( )( )( )
( )( ) ( )
( ) ( ) ( ) ( )
2 21
2 3 12
23 3 1
1 2
( 1) ( 1)
(0) (0)2
(1) (1)
2
⎧=⎪⎫= + − + − ⎪⎪ −⎪ ⎪= + + ⇒ =⎬ ⎨
⎪ ⎪= + + ⎪ ⎪ −⎭
= − +⎪⎩
i ii i i i
i ii i i i i
i i i i i ii i i
a xx a b c
x xx a b c b
x a b c x xc x x
( ) ( )( ) ( )21 2 3
( ) (1 ) 1 + (1 ) for 1,22 2ζ ζζ ζ ζ ζ= − − + − + =i i i ix x x x i
( )
1
22
3
for 1,2,3
(1 )2
where:
(
1
(1 )2
) ( )
ζ ζ
ζζ ζ
ζ ζ =
⎧ = − −⎪⎪⎪ = −⎨⎪⎪ = +⎪⎩
=i k i kx
N
N k
N
N
x
OR Sum of products of interpolation functions and respective global coordinates of nodes
Interpolation functions – shape functions defined in the natural coordinate system associated with the element Number of shape functions equal to the number of nodes used in the interpolation
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 18
NATURAL COORDINATE SYSTEM
‘Piece-wise’nature of interpolation – local support of shape functions
( )( )
(1)1 12
(1)1 12
0 for el.(1)0 for el.(1)
ζ ζζ ζ
⎫≠ ∈ ⎪⎬
= ∉ ⎪⎭
NN
( )( )
(2)2 24
(2)2 24
0 for el.(2)0 for el.(2)
ζ ζζ ζ
⎫≠ ∈ ⎪⎬
= ∉ ⎪⎭
NN
( ) ( )
( )
2( ) ( )
3 31
1 2
3
0
for el.(1) el.(2)
0 outside el.(1) and el.(2)
ζ ζ
ζ ζζ
=
=
= ≠
∈ ∈
=
∑U
ee e
e
N N
N
Characteristic features of shape functions
1 for( )
0 forζ
=⎧= ⎨ ≠⎩
k m
k mN
k m
Low order polynomials with:
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 19
Shape functions in the local natural coordinates
( ) ( )
( )
2( ) ( )
2 21
1 2
2
0
for el.(1) el.(2)
0 otherwise
ζ ζ
ζ ζζ
=
=
= ≠
∈ ∈
=
∑U
ee e
e
N N
N
Example- 2: interpolation of a curvilinear boundary with linear two-node elements
where ( )
( )
1
2
1 121 12
ζ
ζ
⎧ = −⎪⎪⎨⎪ = +⎪⎩
N
N
( ) ( )( ) for 1,2 and 1,2ζ ζ= = =i k i kx N x k i
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 20
ESSENTIAL FEATURES OF FINITE ELEMENT INTERPOLATION OF A GEOMETRICAL DOMAIN
Ø a ‘piece-wise’ polynomial interpolation of curved boundaries
Ø for a specified numer of nodes (a degree of interpolation) an element in the natural coordinate system – a parent element can map various shapes in the global coordinate system
Library of parent elements
ζ1ζ = − 1ζ =
211
21
2
1x
2x
PARENT ELEMENT
natural coordinate system global coordinate system
TWO-NODE LINEAR ELEMENT ‘REAL’ ELEMENTS
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 21
Ø assured continuity of global coordinates in a node shared by two elements, and no continuity of a tangential line across the elements
Ø shape functions defined in local curvilinear coordinates, where the parent element has simple shapes and always the same length
THREE-NODE PARABOLIC ELEMENT
global coordinate system natural coordinate system 1 2 3
PARENT ELEMENT ζ
1ζ = − 1ζ =
ζ
ζ1
2
3
1
2
31x
2x
‘REAL’ ELEMENTS
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 22
F O R M U L A FOR FINITE ELEMENT APPROXIMATION
OF A CURVILINEAR BOUNDARY 1. Divide the boundary into a finite number of segments –
finite elements 2. For each of these segments choose:
• order of the polynomial interpolation that satisfactory approximates a corresponding fragment of the curve • select a number and positions of nodes in the element, which match the chosen interpolation (a number of nodes must exceeds the polynomial order by one)
3. Assemble fragments of the piece-wise interpolation through the obvious fact that at common nodes the global coordinates must be continuous
( ) ( )( )( ) ( ) ( )e e ei i ik k
e e
x x N xζ ζ= =∑ ∑
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 23
LIBRARY OF TWO DIMENSIONAL ELEMENTS QUADRILATERAL BILINEAR ELEMENT
( , ) for 1,2; 1; 1= + + + = ≤ ≤i i i i ix r s a br c s d rs i r s
NATURAL COORDINATES
r
s
1 2
34
( )1, 1− − ( )1, 1−
( )1,1( )1,1−
( )( )( )( )
-1, -1 (-1) (-1) (-1)(-1)
1, -1 (1) (-1) (1)(-1)
1,1 (1) (1) (1)(1)
-1,1 (-1) (1) (-1)(1)
= + + + ⎫⎪
= + + + ⎪⎬
= + + + ⎪⎪= + + + ⎭
i i i i i
i i i i i
i i i i i
i i i i i
x a b c d
x a b c d
x a b c d
x a b c d
( )( , ) for 1,2,3,4= =i k i kx N r s x k
( )( )
( )( )
( )( )
( )( )
1
2
3
4
1( , ) 1 141( , ) 1 141( , ) 1 141( , ) 1 14
⎧ = − −⎪⎪⎪ = + −⎪⎨⎪ = + +⎪⎪⎪ = − +⎩
N r s r s
N r s r s
N r s r s
N r s r s
where
GLOBAL COORDINATES
1x
2x
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 24
NATURAL COORDINATES
r
s
1 3
57
( )1, 1− − ( )1, 1−
( )1,1( )1,1−
( )0,0
2
4
6
89
GLOBAL COORDINATES
1x
2x
( )( , ) for 1,2,...,9= =i k i kx N r s x k
( )( )
( )( )
( )( )
( )( )
1
3
5
7
1( , ) 1 141( , ) 1 141( , ) 1 141( , ) 1 14
⎫= − − ⎪⎪⎪= + − ⎪⎬⎪= + +⎪⎪⎪= − +⎭
N r s r s r s
N r s r s r s
N r s r s r s
N r s r s r s
( )( )
( )( )
( )( )
( )( )
( )( )
22
24
26
28
2 29
1( , ) 1 121( , ) 1 121( , ) 1 121( , ) 1 12
( , ) 1 1
⎫= − − ⎪⎪⎪= − + ⎪⎪⎪= − + ⎬⎪⎪= − − ⎪⎪
= − − ⎪⎪⎭
N r s s r s
N r s r s r
N r s s r s
N r s r s r
N r s r s
QUADRILATERAL BI-QUADRATIC ELEMENT
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 25
LINEAR TRIANGULAR ELEMENT – AREA COORDINATES
231
123
312
123
123
123
Δ
Δ
Δ
Δ
Δ
Δ
⎫= = ⎪
⎪⎪
= ⎬⎪⎪
= ⎪⎭
P
P
P
SsLh SSLSSLS
Local (natural) area coordinates
x2
x1
1
3
P
2
L1
P
1 2
3 L1 =0
L1 =1
L1 =0,5
23 31 121 2 3
123
1Δ Δ Δ
Δ
+ ++ + = =P P PS S SL L LS
location of any point within a triangle is completely described by any two of this triple of the area coordinates
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 26
3
P
1 2
( ) ( )1 2
1,2,3
= + +
=k k k kk kL a b x c x
k
( )1 2 3 1 2 3( , , ) ( , , )=i k i kx L L L N L L L x
three-node linear element:
1 2 3( , , )1,2,3
=⎧⎨ =⎩
k kN L L L Lk
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 27
CURVILINEAR TRIANGLE – PARABOLIC ELEMENT
( )1 2 3( , , )=i k i kx N L L L x
( )( )( )
1 1 2 3 1 1
3 1 2 3 2 2
5 1 2 3 3 3
( , , ) 2 1
( , , ) 2 1
( , , ) 2 1
= −
= −
= −
N L L L L L
N L L L L L
N L L L L L
2 1 2 3 1 2
4 1 2 3 2 3
6 1 2 3 3 1
( , , ) 4( , , ) 4( , , ) 4
===
N L L L L LN L L L L LN L L L L L
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 28
t s
r
global coordinate system natural coordinate system
LINEAR (EIGHT-NODE) HEXAHEDRON ELEMENT
( , , ) ( , , )( ) for 1,2,...8= =i k i kx r s t N r s t x k
LIBRARY OF THREE-DIMENSIONAL ELEMENTS
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 29
t s
r
( , , ) ( , , )( ) for 1,2,...27= =i k i kx r s t N r s t x k
PARABOLIC (27-NODE) HEXAHEDRON ELEMENT
global coordinate system natural coordinate system
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 30
TETRAHEDRONS – VOLUME COORDINATES
( )1 2 3 4 1 2 3 4( , , , ) ( , , , )
for 1,2,3 and 1,2,3,... . .i k i kx L L L L N L L L L x
i k no of nodes
=
= =
Lm – volume coordinates, m=1,2,3,4 where 1 2 3 4 1L L L L+ + + =
LINEAR PARABOLIC
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 31
PENTAHEDRONS – AREA AND LINEAR COORDINATES
( )1 2 3 1 2 3( , , , ) ( , , , )i k i kx L L L t N L L L t x=
L1 , L2 and L3 – area coordinates, t – linear coordinate
LINEAR PARABOLIC
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 32
q an element shape uniquely defined by the element nodal coordinates and by an assumed interpolation between nodes
q types of elements and corresponding interpolations specified in local curvilinear coordinates – the mapping of simple shapes of parent elements into various complex shapes in global coordinates
q the possibility of using various irregular shapes of elements in different parts of the solution domain; Restrictions: elements cannot overlap and they must cover the whole analysed domain (no gaps between elements)
APPEALING FEATURES OF FINITE ELEMENT INTERPOLATION OF A GEOMETRICAL DOMAIN
NUMERICAL METHODS IN HEAT TRANSFER 2014/2015 L2 - 33
q one-to-one correspondence between global and local coordinates – calculation of line, surface and volume integrals in simple integration limits of local coordinates
[ ] [ ]
31 2
1 1 1
31 2
2 2 2
31 2
3 3 3
det 0 where: =
xx x
xx xJ
xx x
ζ ζ ζ
ζ ζ ζ
ζ ζ ζ
⎡ ⎤∂∂ ∂⎢ ⎥∂ ∂ ∂⎢ ⎥⎢ ⎥∂∂ ∂≠ ⎢ ⎥∂ ∂ ∂⎢ ⎥⎢ ⎥∂∂ ∂⎢ ⎥∂ ∂ ∂⎢ ⎥⎣ ⎦
J
[ ] 1 2 3detd d d dζ ζ ζΩ = J
differential length of arc
( )
2 21 2
( )i ki i k
dl dx dx
dx dNdx d x dd d
ζζ ζζ ζ
= +
⎛ ⎞= = ⎜ ⎟⎝ ⎠
differential surface element
J⎡⎣ ⎤⎦ =
∂x1
∂ζ1
∂x2
∂ζ1
∂x1
∂ζ 2
∂x2
∂ζ 2
⎡
⎣
⎢⎢⎢⎢⎢
⎤
⎦
⎥⎥⎥⎥⎥
and
∂xi∂ζ1
=∂Nk (ζ1,ζ 2 )
∂ζ1
xi( )k
∂xi∂ζ 2
=∂Nk (ζ1,ζ 2 )
∂ζ 2
xi( )k
Jacobi matrix and its determinant
differential volume element
[ ]1 2 1 2detd dx dx d dζ ζΓ = ⋅ = ⋅J( ) ( )2 2
1 2( ) ( )k k
k k
dN dNdl x x dd d
ζ ζ ζζ ζ
⎛ ⎞ ⎛ ⎞= +⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠