You are on page 1of 11

Comparison of Finite Volume Method (FVM) and Finite Element Method (FEM)

An assignment for CV7803-Numerical Methods


Name:Fakhrur Rozy Harnas
Matric No.: G1003079J

Summary
FEM & FVM are two classical methods in solving PDE. Both FEM and FVM used the weak or integral form of the
conservational laws. In theory, FVM is a special case of FEM. The weight function used in FVM is equal to one.
Historically, FEM come from structural mechanics and it is still the preferred method for structural mechanics
problem (load-deformation). In the other hand, FVM is very popular in computational fluid dynamics (CFD)
problems. This may be due to the fact that CFD problems need a larger grid points which favors simple lower order
approximation. FVM tries to combine the advantages of FEM i.e. geometric flexibility and FDM i.e. definition of
the fluid flow, however FVM tends to only have second order accuracy. Increase in accuracy is possible however the
formulation become more complicated. This is one of the challenge that FVM faces. An example of the use of FEM
and FVM in solving a one dimensional heat transfer problem is presented in the last part of the study.

INTRODUCTION
There are several important steps in computational modeling. The first step is the problem definition. The
second step is the problem modeling process. The problem is modeled using mathematical governing
equations of the problem. These equations (normally are partial differential equations(PDE)) are complex
and very difficult to solve analytically. The development of computer system increases the possibility of
using numerical methods to solve these equations. The classical choices of these numerical methods are
Finite Difference Method (FDM), Finite Element Method (FEM) and Finite Volume method (FVM)
(Peiro and Sherwin, 2005). The FDM is based on Taylor expansion series to expand the differential
equations. The FDM uses a topologically square network of lines to construct the discretization of the
PDE. This creates a limitation in handling complex geometries which motivated the use of integral form
and the development of FEM and FVM.
This study objective is to compare the FEM and FVM. This study is started by introducing the basis of
FEM and FVM of strong and weak form of a PDE, followed by the descriptions of the FEM and FVM.
The next section is the comparison between FEM and FVM which includes the advantages and
disadvantages, typical application, etc. Finally the study is ended using a simple example of a one
dimensional problem solved using FEM and FVM.
STRONG AND WEAK FORM OF PDE
The governing equations of continuum mechanics representing the kinematic and mechanical behavior of
general bodies are commonly referred as conservation laws. These laws can be written in the following
form:

Fakhrur Rozy Harnas G1003079J

( )
+ ( u )= ( grad ) + S (1)
t
Equation (1) can also be referred as the differential form of the equation or the strong form, because it
requires satisfaction of the equation in all points. In many problems, it is not practical to construct a
function which satisfies the boundary condition in all points, Hence an approximate solution is introduces
as expressed in the following equation
N

u^ = k u k (2)
k=1
This approximate solution will produce residuals. To minimize the residual, a weight function is used.
This is the basis of FEM and FVM. The weighted residual form is called as the weak formulation. Any
solution of the strong formulation satisfies the weak formulation whereas the reverse is not applicable.
The weak formulations allow solutions which have a lower degree of regularity than required for the
strong solution. This is the origin of the term weak and strong. The weak formulation formula is
explained in the description of FEM and FVM.
DESCRIPTION OF FEM AND FVM
Finite Element Method (FEM)
The domain under consideration is divided into finite number of sub-domains known as elements. A
simple function is assumed for the variation of each variable inside each element. The summation of
variation of the variable in each element is used to describe the whole field. Figure 1 shows a two nodded
element which variable u varies linearly inside the element. The end points of the element are called the
nodes of the element. For a linear variation of u, the first derivative of u with respect to x is simply a
constant. If u assumed to vary linearly inside an element, we cannot define a second derivative for it.
Therefore to overcome the problem, the following technique is used to overcome the problem. First, the
PDE is multiplied by an unknown function W or in other text book is called as weight function, and then
followed by integrating the whole equation over the domain which it applies. Finally the terms that need
to have the order of their derivatives reduced are integrated by parts (Green Theorem). This is known as
producing a variational formulation or weak formulation.

Fakhrur Rozy Harnas G1003079J

Figure 1. A two noded linear element

As an example we will develop the finite element formulation of the Laplaces Equation in one
dimensions:

d2u
=0(3)
d x2
Where velocity u is a function of the spatial coordinates x. We multiply equation (3) by some function W
and integrate it over the domain of interest denoted by

[ ]
2

d u
d=0(4)
2
dx

Equation (2) can be integrated by parts to result in:

dW du
du
d+ W
n d =0(5)
dx dx
dx x

Where denotes the boundary of the domain and n x is the unit outward normal vector to the boundary
. The second order derivative in Equation (4) is now transformed into products of first order derivatives.
Equation (5) is used to produce the discrete form of the PDE for the elements in the domains. Equation
(3) is known as the variational form of the PDE (3). Although this technique reduces the order of the
derivatives, it introduces the terms corresponding to the boundary of the domain into the governing
Equation (5).We will now divide the domain into several elements and assume a function for the variation
of the variable u in each element. If a two-noded linear element is assumes (Figure 1), the variation of u
in each element can be represented by

Fakhrur Rozy Harnas G1003079J

xi xi1
(6)
x i+1x i1
ui =ui1+

( i+ 1ui1 )

Or

ui=u i1

] [

x i+1x i
x x
+ui +1 i i1 (7)
xi +1x i1
x i+1x i1

The terms in the brackets are called the shape functions and are denoted as Nis.ui-1 and ui+1 are the nodal
values of the variable u and are denoted as uis. Therefore, therefore the variable u can be written in the
following form

ui=N i1 ui1+ N i+1 u i+1 (8)


Thus the shape functions corresponding to the two-nodal linear element, represented by Equation (6) are

x i+ 1xi
x i+1x i1

And,

xi xi1
x i+1x i1

(9)

(10)

The derivatives of the variable u can be determined using Equation (8)


m

d Ni
du
=
u (11)
dx i=1 dx i
where m is the number of nodes on the element. Note that uis are nodal values of u and they are not
variables, therefore, they are not differentiated. In order to solve Equation (5) we still need to describe the
function W. There are several methods, which are used for the specification of the variable W. However,
the most common method is the Galerkin method in which W is assumed to be the same as the shape
function for each element. Therefore, Equation (5) is discretized by using equations similar to Equation
(11) for the derivatives of the variable and equations similar to Equations (8) and (9) for W. For every
element, there can be several equations depending the number of nodes in that element. The set of
equations generated in this form are then solved together to find the solution. The above formulation is
based on linear variation of the variable in each element. If higher order variations are used, e.g. quadratic
or cubic, second derivatives will appear which requires more points to describe them.
Finite Volume method (FVM)

Fakhrur Rozy Harnas G1003079J

The finite volume method is currently the most popular method in Computational fluid dynamics (CFD)
(Ashgriz and Mostaghimi, 2002). The main reason is that because the FVM can resolve some of the
difficulties that the other two methods have. Generally, the FVM is a special case of FEM, when the
weight function W is equal to 1 everywhere in the domain.
A typical finite volume in one dimension or cell is shown in Figure 2. The centroid of the volume, point P,
is the reference point at which we want to discretize the PDE. The neighboring volumes are denoted as
W, volume to the west side and E, volume to the east side of volume of P. Two boundary faces at w and e
are the boundary of volume P as shown in Figure 2.

Figure 2 Typical finite volume method grid

The second derivative of a variable at P can be written as the difference between the 1 st derivatives of the
variable evaluated at the volume faces:

[( ) ( ) ]

du
du

dx e dx
d u
=
2
xe x w
dx p

[ ]
2

(12)

The first derivatives at the volume faces can be written as to be the difference in the values of the variable
at the neighboring volume.

u u
du
= E P (13)
dx e x E x p

[ ]
And

u u
du
= p W (14)
dx w x px w

[ ]

The above method is referred as the cell-centered (CC) method, where the flow variables are allocated at
the centre of the computational cell. Another method is called the cell-vertex method (CV), where the
flow variables are stored at the vertices of the grid. Figure 3 show these two methods. The CC method is
more popular than the CV method for finite volume formulation because it made a simpler
implementation however it also more susceptible to truncation errors.

Fakhrur Rozy Harnas G1003079J

Figure 3 (a) cell centered method, (b&c) cell vertex method

COMPARISON OF FEM AND FVM


FVM produces the numerical equations at a given point based on the values at neighboring points,
whereas the FEM produces equations for each element independently of all the other elements. It is only
when the finite element equations are collected together and assembled into the global matrices that the
interactions between elements are taken into account. FVM can apply fixed value boundary conditions
by inserting the values into the solution but modification should be performed to take account any
derivative boundary conditions. The FEM can handle derivative boundary condition when the element
equations are formed and then the fixed value of boundary condition is applied to the global matrices.
FEM write matrix for each element, which is then assembled to form the global equations before the
whole problem is solved while FVM is written to combine the setting up of the equations and their
solutions. In terms of programming, the above allows the programmer to modify more easily in FEM
program for new elements rather than in a FVM programming.
FVM tries to combine the best from the FEM i.e. the geometric flexibility with the best from the FDM i.e.
the flexibility in defining the discrete flow field (Dick, 2009). So, automatically FVM look to only have
the advantages against FEM and FDM. However, its not fully true. FVM has a difficulty in the accurate
definition of derivatives, unlike FEM that can convert high order of derivatives to lower ones. Therefore
FVM is best suited for flow problems in primitive variables, where the viscous terms are absent (Euler
equation) or are not dominant (high Reynolds number Navier-Stokes equations). FVM is only secondorder accurate and has difficulties in obtaining high-order accuracy. Although for many engineering
problems, this accuracy is sufficient.
The FEM is originated from the field of structural mechanics (for solving stress and deformation for solid
bodies) and currently still the method of choice in this field, while the FVM tend to be used in
computational fluid dynamics (CFD) problem because CFD problem usually require discretization of the
problem into larger cell/gridpoints, which favors simpler lower order approximation within each cell
(Dick, 2009).
Higher order accuracy in FVM is a challenge that the method faces. The use of Quick scheme or other
schemes is actively researched. FEM and FVM also have published problem in handling discontinuities
and this problem also being actively researched.
Example

Fakhrur Rozy Harnas G1003079J

Determine the temperature distribution in a plane wall of a thickness of 60mm, which has an internal
source of 0.3MW/m3 and the thermal conductivity of the material is 21 W/mC. The surface temperature
is 40oC. Solve with Finite Volume and Finite Element Method.
(Question taken from Lewis, et. al. the solution is independently solved)
FVM.
k=21 W/moC:q= 0.3 MW/m3= 300000 W/m3:Ta=Tb=40 oC:A=1 m2
Step 1 Grid generation

Use 8 Nodes, x=7.5mm=0.0075m


Step 2 Discretization

d
dt
k
dV + qdV =0
dx dx
V

( )

For non-boundary nodes, (e.g. node 2-7)

[( ) ( ) ]
kA

ke A

dt
dt
kA
dx e
dx

+q V =0

+qAx=0
( T xT )k A ( T T
x ) ]
E

For a general form of

a P T P=a W T W +a E T E +SU

aw

kA
x

Fakhrur Rozy Harnas G1003079J

aE

aP

kA a +a w
E
x
Sp

Sp

Su

qAx

For boundary node (e.g. node 1 and 8), similar discretization techniques can be applied with incorporating
the known temperature at the west boundary for node 1, and at the east boundary for node 8. For node 1
and 8 the coefficients are:
Node 1
aw

aE

aP

Sp

kA a +a w
E
x
Sp

2 kA
x

Su
qAx+

2 kA
x Ta

Node 8
aw

aE

kA
x

aP

Sp

aw+aESp

2 kA
x

Su
qAx+

2 kA
x Tb

By substituting the known values, the coefficient for each node can be calculated. The result are
summarized in the following table.
Nod
e

aw

1
2
3
4
5
6
7
8
The matrix form for the equation are:

0
280
0
280
0
280
0
280
0
280
0
280
0
280
0

8400 -2800 0
0
0
-2800 5600 -2800 0
0
0
-2800 5600 -2800 0

Fakhrur Rozy Harnas G1003079J

aE
aP
Sp
Su
280 840
- 2262
0
0 5600
50
280 560
0
0
0
2250
280 560
0
0
0
2250
280 560
0
0
0
2250
280 560
0
0
0
2250
280 560
0
0
0
2250
280 560
0
0
0
2250
840
- 2262
0
0 5600
50
0
0
0

0
0
0

0
0
0

T1
T2
T3

226250
2250
2250

0
0
0
0
0

0
-2800
0
0
0
0
0
0
0
0
226250

5600
-2800
0
0
0

-2800
5600
-2800
0
0

0
-2800
5600
-2800
0

0
0
-2800
5600
-2800

0
0
0
-2800
8400

T4 = 2250
T5
2250
T6
2250
T7
2250
T8

The solutions of the equation are tabulated as follow:


T1

T2

T3

T4

T5

T6

T7

T8

41.61

44.02

45.63

46.43

46.43

45.63

44.02

41.61

FEM
1

Ta

Tb

x=0.0075m

Grid Generation
Discretization

[ K ][ T ] ={ f }
Where [K] is the thermal stiffness matrix, [T] is the unknown temperature vector and {f} is the thermal
load
Element stiffness matrix

[ K ] e = [ B ] [ D ] [ B ] d
For a linear element;

Where B is the derivative or strain matrix and D is the thermal conductivity

][

[ K ] e = kA 1

1 = 2800 2800
L 1 1
2800 2800

Load

{ f }e= G [ N ] d q [ N ] dAs+ hTa [ N ] dAs

Fakhrur Rozy Harnas G1003079J

As

As

Where G is internal heat generation, q is heat surface boundary flux and Ta is atmospheric temperature.
As is the surface area, N is the shape function.

{ f }e=

{}{ }

qAL 1
1125
=
2 1
1125

Global assembly:
1

T1

40

5600

-2800

-2800

T2

114250

5600

-2800

T3

2250

-2800

5600

-2800

T4

2250

-2800

5600

-2800

-2800

5600

-2800

T6

2250

-2800

5600

-2800

T7

2250

-2800

5600

T8

114250

T9

40

T5

2250

Solution:
T1

T2

T3

T4

T5

T6

T7

T8

T9

40
Comment:

42.81

44.82

46.02

46.42

46.02

44.82

42.81

40

The FEM and FVM result for this example shows a good agreement as shown in the figure below. The
programming or solving time for the methods is almost similar. Both methods seem to be very capable
numerical tools.
48
46
44
Temperature (C)

42

FVM
FEM

40
38
0 0.02 0.04 0.06 0.08
X (m)

REFERENCE
Ashgriz and Mostaghimi (2002), Computational Fluid dynamics, Lecture notes.
Fakhrur Rozy Harnas G1003079J

10

Dick, E (2009) Introduction in Finite Element Methods in CFD, chapter 9 in Computational Fluid
Dynamics Edited by Wendt, J.F, Springer, Belgium
Dick, E (2009) Introduction in Finite volume methods in CFD, chapter 10 in Computational Fluid
Dynamics Edited by Wendt, J.F, Springer, Belgium
Peiro, J and Sherwin, S, (2005). Finite difference, finite element and finite volume methods for partial
differential equation. In Handbook of material modeling edited by S.Yip, Springer, Netherlands.
Lewis, R.W, Nithiarasu, P., Seetharamu, K.N (2004), Fundamentals of Finite element method for heat
transfer and fluid flow, Wiley & Sons.

Fakhrur Rozy Harnas G1003079J

11

You might also like