Vous êtes sur la page 1sur 20

Finite Volume Method

MEL 807
Computational Heat Transfer (2-0-4)
Dr. Prabal Talukdar
Assistant Professor
Department of Mechanical Engineering
IIT Delhi

Finite Volume Method


d d
+ S = 0
dx dx

Consider the diffusion


equation

Integrate over the control volume


e

d d
dx + Sdx = 0
dx
dx

w
w

Insulated

Cell
xw

BC

W
Face

xe

1D solution domain
E
P
Control volume central point

BC

FVM (contd)
e
d d
+ Sdx = 0
dx e dx w w

Average value of
S over a CV

Make linear profile assumption


e ( E P ) w ( P W )
between cell centroids for .

+ S x = 0
(x e )
(x w )
Assume S varies linearly over CV
Rearranging the terms results
the algebraic equation

a P P = a E E + a W W + b
a E = e /(x e )

a W = w /(x w )

aP = aE + aW

b = S x

Comments
Process starts with conservation statement over cell. We
find such that it satisfies conservation. Thus,
regardless of how coarse the mesh is, the finite volume
scheme always gives perfect conservation
This does not guarantee accuracy, however.
Profile assumption for and S need not be the same
Similar to FDM, we need to solve a set of algebraic
equations
Same techniques can be used to solve the algebraic
equations.

Finite Element Method


Consider diffusion equation

d 2
2 +S = 0
dx

Let is an approximation to
Since is an approximation, it does not satisfy the
diffusion equation, and leaves a residual R:

d2
2 +S = R
dx

Galerkin finite element method minimizes R with


respect to a weight function:

WRdx = 0

domain

FEM (contd)
A family of weight functions Wi, I = 1,---N (N: number of
grid points) is used. This generates N discrete equations
for the N unknown

Wi Rdx = 0,

i = 1,2, N

domain

Weight function is local


i.e. zero everywhere
except close to i
i-1

i
Element i-1

Wi

i+1
Element i

FEM (contd)
In addition a local shape function Ni is used to discretize
R. Under Galerkin formulation, the weight and shape
functions are chosen to be the same.

Shape function is
non-zero only in
the vicinity of node i
Ni

Ni-1
i-1

Element i-1

Element i

i+1

FEM (contd)
The discretization process again leads to a set
of algebraic equation:

a i ,i i = a i ,i +1 i +1 + a i ,i 1 i ,i 1 + b i
Comments
Note how the use of a local basis restricts the

between a point I and its neighbours


neighbours

relationship
to only nearest

Algebraic equations can be solved with the same


solver as used for FDM or FVM

Comparison of methods
All three yield discrete algebraic equation sets
which much be solved
Local basis-only near-neighbor dependence
Finite volume method is conservative; others are
not.
Order or accuracy of scheme depends on
Taylor series truncation in finite difference schemes
Profile assumption in finite volume schemes
Order of shape functions in finite element schemes

Solution of Discretization
Equations
Solution techniques are independent of
discretization method.
For linear algebraic sets, it is guaranteed
there is only one solution and all the
solution methods give same solution
For non-linear problem (when coefficients
are function of ) we dont have this
gurantee
Solution depends on factors like initial
guess etc.

Solution Methods (contd)


Broadly divided into two: Direct and iterative
All discretization schemes lead to

A = B
Coefficient matrix

Solution vector

Matrix inversion gives = A-1B


A solution is guaranteed if A-1can be found
Needs O(N2) operation for inversion
Large storage and operation count
For N grid points, must store NxN matrix

Not very popular in CFD

Vector resulting
From source term

Solution Methods (contd)


Iterative methods
Guess and correct philosophy
Gauss-Seidel method is typical
Guess the discrete values of at all grid points
Visit each grid point and update using

(a E E + a W W + b )
P =
aP
E and W are assumed known at prevailing values
Sweep repeatedly through grid points until convergence criteria
is met
In each sweep, points already visited have new values; points
not yet visited have old values

Solution Methods (contd)


Jacobi scheme is similar to Gauss-Siedel scheme but
does not use latest available values
All values are updated at the end of the sweep

The iterative procedure is not guaranteed to converge a


solution unless Scarborough criterion is satisfied

aE + aW
aP

1
<1

for all grid points


for at least one grid point

Matrix which satisfy the Scarborough criterion have


diagonal dominance

Solution Method (contd)


No need to store coefficient matrix
Only storage of discrete values of at grid
points is required
The coefficients can be computed on the fly
when required
Suitable for non-linear problem because of
iterative scheme
However, convergence, even when guaranteed
is slow for large meshes

Consistency
A discretization scheme is consistence if the truncation
error (TE) vanishes as x0

Exact

d 2
1 + 3 2 2
2
2 =
+
0
(
(

x
)
)
2
dx
(x )

discretized

TE

The difference between the discretized equation and the


exact one is called the truncation error
If the most important term is proportional to (x)n or (t)n,
the method is called nth order approximation
Convective term in high Re flows or diffusive term in low
Re flows should be treated with more accuracy

Consistency (contd)
If the TE error of a method is O (x/ t), the consistency
is not guaranteed unless x is decreased faster than t.
Without consistency, there is no guarantee that a mesh
refinement will improve the solution.
Tin +1 Tin 1

n
n +1
n 1
n
(
T
T
T
T

+
=
i +1
i
i
i 1 )
2
2t
(x )
2

2 T t 1 3T
2T
2
2
+ 4 (x ) 2
3 ( t )
12 x n ,i
t n ,i x 6 t n ,i
144444444444244444444444
3
Truncation Error

All is well if

t
lim
=0
t , x 0 x

Stability
Concept of stability in the strict sense is applicable to
marching problems only
A numerical solution is said to be stable if it does not
magnify the errors that appear in the course of numerical
solution process
For temporal problem-stability guarantees that the
method produces bounded solution if the solutions of the
exact equations are bounded
For iterative problem, stability guarantees that the
solution does not diverge
Stability analysis is difficult for non-linear problem and
problems with boundary conditions
Take guidance from linear analysis in appropriate
parameter range; intuition

Stability (contd)

The DuFort-Frankel scheme for the heat conduction equation


Tin +1 Tin 1

n
n +1
n 1
n
(
T

T
+
T
=
i +1
i
i
i 1 )
2
2t
(x )

is unconditionally stable whereas the simple explicit scheme would


be stable only if r = t/(x)20.5
This restriction limits the size of the marching step for any specified
spatial mesh
A scheme using a central time difference and having a more
favorable truncation error O[(t)2, (x)2],
Tin +1 Tin 1

n
n
n
=
(
T

2
T
+
T
i +1
i
i 1 )
2
2t
(x )

is unconditionally unstable

Stability (contd)
Sometimes instability can be identified with a physical
implausibility
T n +1 T n (T n 2T n + T n )
i

i +1

i 1

(x )

Tin +1 = r (Tin+1 + Tin1 ) + (1 2r )Tin


200 C
t+t

n+1

Tin +1 = (Tin+1 + Tin1 ) Tin


= 100 + 100 0

100C
t

j-1

0C
j

= 200

100C
j+1

Any value of r > 1/2, temperature at j at time level n+1 will exceed
the temperature at the two surrounding points at time level n

Convergence
Lax equivalence theoremGiven a properly posed linear value problem and a
finite difference approximation to it that satisfies
the consistency condition, stability is the necessary
and sufficient condition for convergence

Two uses of the term:


Convergence to a mesh-independent solution
through mesh refinement
Convergence of an iterative scheme to a final
unchanging answer

Vous aimerez peut-être aussi