METRO MEtallurgical TRaining On-line
Education and Culture
Spatial discretization techniques
Arkadiusz NagórkaCzUT
2METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Introduction
• Many physical phenomena are described by partial differential equations (PDEs).
• Analytical solutions are impossible to obtain except for linear equations on simple geometries.
• Since the computer memory is limited, discretization of the problem is necessary. Numerical methods can give approximate solutions of PDEs.
• Spatial discretization - obtain the solution in a set of points rather that in the entire domain.
3METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Discretization of a simple problem
Simple one-dimensional Poisson equation
with Dirichlet boundary conditions
will be solved numerically using– the finite difference method (FDM),– the finite element method (FEM),– the finite volume method (FVM).
10 ,222
4METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using the finite difference method
• Introduce a grid
0xa = 1x 2x 3x 4x 5x 1−Nx bxN =
h
1,1,0 ,1 −==−= + Nihxxh iii K
• Approximate the differential equation at each grid point• Solve the resulting system of algebraic equations
5METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FDM, cont.
hxuhxu
dxdu
h
)()(lim0
−+=
→• By definition the derivative
ix• Finite difference approximation at point
huu
hxuhxu
dxdu iiii
i
−=
−+≈⎟
⎠⎞
⎜⎝⎛ +1)()( forward difference
huu
dxdu ii
i
1−−≈⎟⎠⎞
⎜⎝⎛
huu
dxdu ii
i 211 −+ −≈⎟
⎠⎞
⎜⎝⎛
backward difference central difference
6METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FDM, cont.
• Forward, backward and central differences
• Central difference is the most accurate1−ix ix 1+ix
exact derivative
backwardforward
central
x
u
7METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FDM, cont.
• Approximation of second derivative
hxdxduhxdxdu
dxdu
dxd
dxud ))(/())(/(2
2 −+≈⎟
⎠⎞
⎜⎝⎛=
• Use central differences for dxdu /
21111
2
2 21h
uuuhuu
huu
hdxud iiiiiii +−−+ +−=⎥⎦
⎤⎢⎣⎡ −−
−≈
8METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FDM, cont.
• In our problem assume three grid points
0.5h ,1 ,5.0 ,0 210 ==== xxx
22 2210 =
+−h
uuu• Difference equation for the point 1x
25.0
0202
1 =+− u
or
• One equation is needed for one unknown
25.01 −=u• The solution is
9METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using the finite element method
Subdivide the domain into finite elements (e.g. line segments in 1D, triangles or quadrilaterals in 2D, tetrahedra in 3D)
)( 0e )( 1−Ne
h
ax = bx =
0x 1−Nx Nx)( 1e1x )( 2e2x
10METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
xxu h 21)0( )( αα +=
• Assume approximating function in each element, e.g. a linear polynomial
for the element 0
• Parameters jα can be determined easily
021)0( 0)0( uu h =+= αα
121)0( )( uhhu h =+= αα , hence ,01 u=α h
uu 012
−=α
110010)0( )()(1)( uxNuxNu
hxu
hxxu h +=+⎟⎠⎞
⎜⎝⎛ −=
• Substituting yields
11METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
The function is a trial function. It has the property)( xN j
⎩⎨⎧
=elsewhere
at 01
)( jjx
xNj
N
jjh uxNxu ∑
=
=0
)()(Then
2N 3N
0x Nx
1
1x 2x 3x 1−Nx
12METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
0x 1x 2x 3x 1−Nx Nx
3N2N
Trial function is called shape function when restricted to a finite element
)( 2e
2)2(
0 NN =3
)2(1 NN =
2x 3x x
trial functions
shape functions
1
13METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
Obtain an integral form of the problem, for example using the weighted residual method
2)( 22
−=dxudxR hMake the residual “vanish”, e.g.
,0)()(∫Ω
=ΩdxRxW )( xW is a test or weighting function
is a possible choice. Then)()( xNxW =
,N,,idxRxN i K10 ,0)()( ==Ω∫Ω
Galerkin finite element method
14METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
Assumed solution is piecewise linear and doesnot have second-order derivative. Integrate by parts
∫∫ +⎟⎠⎞
⎜⎝⎛ −−=⎟⎟
⎠
⎞⎜⎜⎝
⎛−
b
a
b
a
hii
hib
a
hi dx
duNdxNdxdu
dxdNdx
dxudN 222
2
Now only the first derivative is necessary
)1()( and 1)( −⋅⋅dxadu
dxbdu hh are normal fluxes nq
imposed in Neumann boudary conditions
15METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
• The weak form of the problem reads
( ) ( ) ( )∫ ∫ ++−=b
anini
b
ai
hi bqNaqNdxNdxdxdu
dxdN 2
,N,,i K10=
• Derivative of the solution is also approximated
j
N
j
jh udxdN
dxdu ∑
=
=0
j
N
jjh uNu ∑
=
=0
16METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
Ni ,,1,0 K=Substituting and shifting sum gives for
( ) ( ) ( )bqNaqNdxNudxdxdN
dxdN
nini
b
aij
N
j
b
a
ji ++−=⎟⎟⎠
⎞⎜⎜⎝
⎛∫∑ ∫
=
20
which is a system of linear algebraic equations
∑=
=+=N
jiijij Nigfuk
0,,1,0 , K or gfKu +=
- stiffness matrix- source vector
K ug
- unknown nodal values- flux vectorf
17METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
• Integrals can be evaluated by summing contributions from individual elements
( ) ( )∑ ∫∫ΩΩ
Ω⋅=Ω⋅elements
e
dd
• Integrals involving are nonzero only in elements containing the node , e.g.
iNi
( ) ( ) ( )∫∫∫+Ω
+
ΩΩ
Ω−+Ω−=Ω−1
)1(0
)(1 222
ii
dNdNdN iii
18METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
This leads to a local system of equations for each element e
)()()()( eeee gfuK +=
∫Ω
==e
jidxdxdN
dxdNk
ej
eie
ij 1,0, ,)()(
)(
( ) dxNfe
ei
ei ∫
Ω
−= )()( 2
nei
ei qNg
)()( = (only in elements with Neumann boundary condition)
19METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
• The element integrals can be evaluated easily
⎥⎦
⎤⎢⎣
⎡−
−=
11111)(
heK ⎥
⎦
⎤⎢⎣
⎡−=
11)( hef
• Assuming the mesh with 3 nodes and 2 elements, the local systems are
⎥⎦
⎤⎢⎣
⎡−=
⎭⎬⎫
⎩⎨⎧⎥⎦
⎤⎢⎣
⎡−
−⎥⎦
⎤⎢⎣
⎡−=
⎭⎬⎫
⎩⎨⎧⎥⎦
⎤⎢⎣
⎡−
−11
11111 ,
11
11111
)1(1
)1(0
)0(1
)0(0 h
uu
hh
uu
h
20METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
Using global indices and augmenting gives
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡−=
⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡−
−
011
000011011
1
2
1
0
huuu
hfor element (0)
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡−=
⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−−
110
110110
0001
2
1
0
huuu
hfor element (1)
21METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
• Assemble the global system by summing up local systems
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡+−=
⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−−+−
−
111
1
1101111
0111
2
1
0
huuu
h
• Local contributions are overlapped (superimposed)
22METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FEM, cont.
• In our example 020 == uu
• Equation for the node 1
5.025.0
2 210 ⋅−=−+− uuu hence 25.01 −=u
• The solution is identical to that of FDM (for this simple problem and geometry)
23METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using the finite volume method
• Partial differential equations that we solve express conservation of a quantity (energy, mass,etc.)
• Conservation equations can be written in integral form, e.g. for the Poisson equation
∫∫ =1
0
1
02
2
2dxdxdxud
• Change the volume integral to a surface integral
Balance: flux of a quantity entering and leaving the domain equals the amount produced internally by the source∫=
1
0
1
0
2dxdxdu
24METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FVM, cont.
The method utilises control volumes (finite volumes) and control surfaces
ax =0 bxN =1x 2x
CV0 CV1 CV2
h
CS0 CS1 CS2
CV1 around node 1 has control surfaces CS0 and CS1. Control surfaces are located at line midpoints.
25METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FVM, cont.
Balance equation is valid for each control volume
∫=0
0
2CV
CS
a
dxdxdu for control volume 0
∫=1
1
0
2CV
CS
CS
dxdxdu
for control volume 1
∫=2
2
1
2CV
CS
CS
dxdxdu
for control volume 2
26METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FVM, cont.
• Flux is evaluated at control surfaces using e.g. finite differences
• By summing up equations for control volumes we obtain the global equation
b
a
b
CS
CS
CS
CS
CS
CS
a dxdu
dxdu
dxdu
dxdu
dxdu
N
=+++−1
2
1
1
0
0
K
∫∫ ∫∫Ω
⋅=⋅++⋅+⋅ dxdxdxdxVC VCVC N
)()()()(10
K
(since fluxes through control surfaces cancel out)
27METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FVM, cont.
• Flux is conserved between CV0 and CV1 through CS0 and between CV1 and CV2 through CS1 etc. provided approximation of du/dx is the same on both sides
Automatic conservation of a physical quantity is a distinct feature of FVM
• Flux at the control surface can be approximated in many ways, e.g.
huu
dxdu ii
CSx i
−≈ +
=
1
28METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Solution of a simple problem using FVM, cont.
• Assume three nodes and three control volumes for our problem. Balance equation for the volume 1 is
∫∫ =−⇒=== 1011
1
0
22CVCSxCSxCV
CS
CS
dxdxdu
dxdudx
dxdu
• Approximate derivatives with finite differences
hh
uuuhhuu
huu 222 2100112 =+−⇒=−−−
• The solution is the same as in FDM and FEM (for this simple problem and geometry)
29METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Imposing the Neumann condition
Consider again the Poisson equation
10 ,2)(22
30METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Imposing the Neumann condition in FDM
• One approach is to add a fictitious node on the right
1−Nx2−Nx Nx 1+Nx
extra nodenqdxdu =/
),(2 211
NNNN xf
huuu
=+− +−
nNN q
huu
=− −+2
11
• By eliminating we obtain the equation for the node N
hqxf
huu n
NNN −=
−− )(21
21
1Nu +
31METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Imposing the Neumann condition in FDM, cont.
• Us usual, assume 3 nodes in our problem
• Difference equation for the internal node 1
22 2210 =
+−h
uuu 25.0
202
21 =+− uuor
• Equation for the node on the Neumann boundary
5.01
22
5.0 221 −=
−uu
• The solution is 0 ,25.0 21 =−= uu
32METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Imposing the Neumann condition in FEM
• Neumann condition apears “naturally” in FEM equations as the result of integration by parts
• Since u0 is known (Dirichlet b.c.) it can be eliminated from the system of equations
• In our two-element mesh only the last element (e1) contributes to the flux vector g
⎥⎦
⎤⎢⎣
⎡+⎥
⎦
⎤⎢⎣
⎡−=
⎭⎬⎫
⎩⎨⎧⎥⎦
⎤⎢⎣
⎡−
−10
12
11121
2
1 huu
h
11)(2 =⋅= nn qqbN
• The solution is the same like in FDM (for this problem)
33METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Imposing the Neumann condition in FVM
• Neumann data qn appears explicitly in the balance equation for the boundary volume
∫∫ =−⇒== 212
221 CVCSx
nCV
b
CS
dxdxduqdx
dxdu
• The system of equations is then
,20112 hhuu
huu
=−
−−
2212 h
huuqn =
−−
• The solution is the same as in FDM and FEM (for this problem)
34METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
FDM, FEM and FVM for a 1D equation - conclusions
• FDM is the easiest to understand.
• Derivation of FEM equations is tedious.
• Only FVM has inherent conservative property.
• Neumann conditions are approximated in FDM, but appear directly in the formulation in FEM and FVM.
• All the methods gave identical solution. However, this happens only for simple problems and geometries.
35METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Two-dimensional problems
Consider the Poisson equation
Ωf(x,y)ukuk in yyxx
=⎟⎟⎠
⎞⎜⎜⎝
⎛∂∂
∂∂
−⎟⎠⎞
⎜⎝⎛
∂∂
∂∂
−
with boundary conditions
DDuu Ω= on (Dirichlet)
Nnyx qnyun
xuk
nuk Ω=⎟⎟
⎠
⎞⎜⎜⎝
⎛∂∂
+∂∂
−=∂∂
− on (Neumann)
Ωf(x,y)uuk in yx 22
2
2
=⎟⎟⎠
⎞⎜⎜⎝
⎛∂∂
+∂∂
−
For constant k
DΓ
NΓn
Ω
36METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite difference method in 2D
Each grid point has two indices
xi hixx 0 +=
xh
ji, ji ,1+ji ,1−
1, −ji
1, +ji 1,1 ++ ji1,1 +− ji
1,1 −− ji 1,1 −+ ji
yj hjyy 0 +=yh
( )jiji yxuu ,, =
37METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite difference method in 2D, cont.
Finite difference formulas used for 1D problems can be used to approximate the partial derivatives at i,j, e.g.
x
jiji
h huu
hyxuyhxu
xu ,,1
0
),(),(lim−
≈−+
=∂∂ +
→
y
jiji
h huu
hyxuhyxu
yu ,1,
0
),(),(lim−
≈−+
=∂∂ +
→
(forward differences)
38METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite difference method in 2D, cont.
Approximation of partial derivatives
x
jiji
ji h
ukukuk ,2/1,2/1
,
xxxx
−+
⎟⎠⎞
⎜⎝⎛
∂∂
−⎟⎠⎞
⎜⎝⎛
∂∂
≈⎥⎦
⎤⎢⎣
⎡⎟⎠⎞
⎜⎝⎛
∂∂
∂∂ (central difference)
x
x
jijiji
x
jijiji
ji hhuu
khuu
kuk
,1,,2/1
,,1,2/1
,xx
−−
++
−−
−
≈⎥⎦
⎤⎢⎣
⎡⎟⎠⎞
⎜⎝⎛
∂∂
∂∂
(central differences)
⎟⎠⎞
⎜⎝⎛ +=+ jxiji yhxkk ,2
1,2/1 evaluated at the midpoint
39METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite difference method in 2D, cont.
• Approximation of the Poisson equation at i,j
Kx
x
jijiji
x
jijiji
hhuu
khuu
k ,1,,2/1,,1
,2/1−
−+
+
−−
−
−
jiy
y
jijiji
y
jijiji
fh
huu
khuu
k
,
1,,2/1,
,1,2/1,
=
−−
−
−
−−
++
for each grid point except on the boundary
ji,• Five unknowns per an equation
40METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite difference method in 2D, cont.
• FDM is the best suited for structured grids, where it is possible for the grid point i,j to
– compute its coordinates,– determine its neighbours.
• In a structured grid all internal the nodes – have the same number of neighbours,– have the same number of cells around them.
• A grid point is located at intersection of two lines, each belonging to one of the two families of lines.
• The lines are not limited to horizontal/vertical.
41METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Structured and unstructured grids
Unstructured grids are more flexible but connectivitymust be given explicitly
112
3
4
109
11
(10)(1)
(2)(3)
(4)
(5)(7)
(8) (9)(6)
connectivity6elem (1): 5 7 10 11elem (2): 11 6 5elem (3): 4 6 11
etc.
5
7
8 213
structured grid(can compute indices
of element nodes)
unstructured grid(no pattern in numbering)
42METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite element method in 2D, cont.
• Finite element method shows its advantages on unstructured grids and complex geometries
• A great variety of shapes can be used
1D
2D
3D
43METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite element method in 2D, cont.
• Derivation of the weak problem and finite element equations is similiar to that for 1D
• The weak form
NidsqNfdNdyu
yN
xu
xNk niiii ,,1,0 , K=−Ω=Ω⎟⎟
⎠
⎞⎜⎜⎝
⎛∂∂
∂∂
+∂∂
∂∂
∫∫∫ΓΩΩ
• Approximate solution in a triangular element (e) in terms of shape functions and nodal values
( )∑= ∂
∂=
∂∂ 2
0
)()()( ,
j
ej
ej
eh u
xyxN
xu( )∑
=
=2
0
)()()( ,j
ej
ej
eh uyxNu
44METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite element method in 2D, cont.
• Finite element equations for the element (e)
∫∫∫Ω∂∩ΓΩΩ
−Ω=Ω⎟⎟⎠
⎞⎜⎜⎝
⎛
∂∂
∂∂
+∂
∂∂
∂
eNee
dsqNfdNdyN
yN
xN
xNk n
ei
ei
ej
ei
ej
ei )()(
)()()()(
2,1,0, =ji
• It is a local system of equation. The size equals the number of nodes in the element (3 - triangle, 4 -quadrilateral, 6 - a second-order triangle)
• As usual, the global system of equations is assembled from such local systems
45METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite element method in 2D, cont.
• Numerical integration is used for evaluation of volume and surface integrals
• It is much easier to integrate over regular triangles or squares. This involves mapping
y
1
2
x1
2
3η
(0,0)
eΩ (0,1)
3
ξ(1,0)
[ ] ξηηξηξηξξ
ddyxfdyxfe
),(),(),,(),(1
0
1
0
J∫ ∫∫−
Ω
=Ω
46METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Shape functions of the linear triangular element
),( 00 yx
),( 11 yx
),( 22 yx
),( yx1A 0A
2A
• Area coordinates
AAyxLAAyxLAAyxL
22
11
00
),(),(),(
===
A - element area
⎩⎨⎧
=nodesother at 0
),( node at the1 iii
yxL
• Shape functions are the area coordinates2,1,0 , == iLN ii
47METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
Coordinate mapping for the linear triangular element
ξ
1
2
3x
12
3η
(0,0) (1,0)
(0,1)eΩy
ηξ
ηξ
====
−−==
22
11
00 1
LNLNLN
ηξηξηξηξ)()(),(
)()(),(
02010
02010
yyyyyyxxxxxx−+−+=−+−+=
const ,const =∂∂
=∂∂
yN
xN iiA2=J
48METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite volume method in 2D
• Derivation of the balance equation is similiar to that for 1D
• Invoking the divergence theorem
( )dsqdsnunukdukuk nyx ∫∫∫ΓΓΩ
−=⎟⎠⎞
⎜⎝⎛
∂∂
+∂∂
=Ω⎥⎦
⎤⎢⎣
⎡⎟⎟⎠
⎞⎜⎜⎝
⎛∂∂
∂∂
+⎟⎠⎞
⎜⎝⎛∂∂
∂∂
xxyyxx
• Integral conservation equation for the Poisson equation is simply
∫∫ΩΓ
Ω= fddsqn
49METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite volume method in 2D, cont.
Dual mesh is the mesh of finite volumes around nodes of a mesh of triangles or quadrilaterals
Voronoi region(midpoints and circumcenters)
Median dual element(midpoints and centers of gravity)
50METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite volume method in 2D, cont.
Balance equation for a finite volume around node i
i
CV 3CS
2CS
4CS
1CS
5CS
n
∫∫ΩΩ∂
Ω=ii
fddsqn
∫∑ ∫ Ω== CVi CS
n fddsqi,...2,1
∫∑ ∫ Ω=⎟⎟⎠
⎞⎜⎜⎝
⎛∂∂
+∂∂
−= CVi CS
yx fddsnyun
xuk
i,...2,1
51METRO – MEtallurgical TRaining On-line Copyright © 2005 Arkadiusz Nagórka - CzUT
The finite volume method in 2D, cont.
• Integrals are evaluated numerically.
)Volume( ),( CSyxffd iiCV
⋅≈Ω∫
)(Area)middle( CSqdsq nCS
n ⋅≈∫
• Interpolation of partial derivatives in the middle of the control surface
– central finite differences– using finite element shape functions
Spatial discretization techniquesIntroductionDiscretization of a simple problemSolution of a simple problem using the finite difference methodSolution of a simple problem using FDM, cont.Solution of a simple problem using FDM, cont.Solution of a simple problem using FDM, cont.Solution of a simple problem using FDM, cont.Solution of a simple problem using the finite element methodSolution of a simple problem using FEM, cont.Solution of a simple problem using FEM, cont.Solution of a simple problem using FEM, cont.Solution of a simple problem using FEM, cont.Solution of a simple problem using FEM, cont.Solution of a simple problem using FEM, cont.Solution of a simple problem using FEM, cont.