Professional Documents
Culture Documents
Finite Volume Method
Finite Volume Method
Finite Volume Method
The nite volume method is based on (I) rather than (D). The integral conservation law is enforced for small control volumes dened by the computational mesh:
N
f = vu du
f
V =
i=1
Vi , 1 |Vi |
Vi Vj = , u dV
Vi
i = j
Z
dS
ux function f dV = Z q dV
V
ui =
mean value
u dV + t
To be specied concrete choice of control volumes type of approximation inside them numerical methods for evaluation of integrals and uxes
u + f = q t In steady state
u t
in V
= 0 so that
(uv) = (du) + q
Cell-centered FVM 1D
2D
2D
Dierent grids / control volumes can be used for dierent variables (v, p, . . .)
ui =
1 |Vi |
u dV,
Vi
qi =
1 |Vi |
q dV
Vi
the integral conservation law is satised for each CV and for the entire domain to obtain a linear system, integrals must be expressed in terms of mean values
Numerical integration
n
f (x) dV
V i=0
wi f (xi )
where wi 0 are the weights and xi are the nodes of the quadrature rule
x12 =
x1 +x2 , 2
V = (x1 , x2 ),
|V | = x2 x1
Midpoint rule
V
f1 + f2 2 f1 + 4f12 + f2 6
f (x) dV |V |
use a mapping onto a unit square and apply 1D quadrature rules in each coordinate direction
x13 = x123
f (x) dV |V |
V
f (x) dV |V |
V
Center of gravity
x1234 =
f (x) dV |V |f1234
V
x1 + x2 + x3 + x4 4
f (x) dV |V |
V
f1 + f2 + f3 + f4 4 f1 + f2 + f3 + f4 + 16f1234 20
f (x) dV |V |
V
Interpolation techniques
Problem: the solution is available only at computational nodes (CV centers) Interpolation is needed to obtain the function values at quadrature points Volume integrals Surface integrals Ic = 1 |Vi | ui =
1 |Vi | Vi
u dV u( i ) midpoint rule x
1 |Vi | k Sk
f = vu du (v nk )u dS,
k Sk
f nk dS = Ic + Id d(nk u) dS
Id =
1 |Vi |
Sk
vertex-centered FVM
xi = ix v = const
ui+1/2 ui1/2 , Ic = v x
ui1/2 ui , ui+1 ui x
Ic v
forward dierence
(x)2 v 8
2u x2
+ ...
i+1/2
a rst-order accurate ux approximation, the leading truncation error resembles a diusive ux d u with d = vx being the numerical diusion coecient x 2
Interpolation polynomial x xL xR x + uR p1 (x) = uL xR xL xR xL Averaged interface values ui1/2 ui1 + ui , 2 ui+1/2 ui + ui+1 2
Ic v
ui+1 ui1 2x
central dierence
+ +
(x)2 8 (x)2 8
2 u x2 2 u x2
i+1/2 i+1/2
ui + ui+1 (x)2 = 2 8
2u x2
+ ...
i+1/2
Ic v
v<0 Ic v
The matrix is no longer tridiagonal (shifted, upper/lower triangular if Id = 0) Defect correction: ILU DS = IU DS + [ILU DS IU DS ],
(m+1) (m+1) (m) (m)
m = 0, 1, 2, . . .
+ uM xxxLL xxR x + uR xxxLL xxxM M x R xM R x R xM Upwind-biased interface values v>0 ui1/2 ui+1/2
3ui +6ui1 ui2 8 3ui+1 +6ui ui1 8
Ic v
third-order ux approximation second-order overall accuracy (because of the midpoint rule) marginally better than LUDS
v<0
Ic v
ui ui1 , x
u x
i+1/2
ui+1 ui x
u x i1/2
T (T ) = 0 t Dimensionless numbers: Pe =
v0 L0 d
Peclet number
Reynolds number
Convection-dominated transport equations (such that P e 1 or Re 1) are essentially hyperbolic, which may give rise to numerical diculties.
u(0) = 0,
u(1) = 1
u x i1/2
x x =
=0
xi = ix,
1 N,
i = 0, 1, . . . N
P e = 40 x = 0.1
exact solution
upwind dierence
central dierence
Central dierence scheme ui1 2ui + ui+1 ui+1 ui1 = 0, Pe 2x (x)2 Boundary conditions Linear system u0 = 0, uN = 1 A RN 1N 1 u1 u2 u3 uN 1
i = 1, . . . , N 1
Au = F
u, F RN 1 0 0 0
b c 1 a b c A= , a b c (x)2 ... a b
u=
F =
c (x)2
ui = + ri ,
(a + c)2 4ac (a + c) (a c) = , 2c 2c r=
a c
u0 = + = 0, Hence, ui =
1( a ) c 1(
a c i
uN = + =
P Q
=1
= =
1 1
a N c
c<0
a < 0,
a c
>0
>1
a c
P < 0, P > 0,
Q<0 Q>0
a c
0<
<1
< 0;
a + c = b < 0
c < a
nonphysical oscillations uN = 1
u0 = 0,
Moreover, A is an M-matrix so that all the entries of its inverse are nonnegative Central dierence scheme c = 1 + Pe x 0 2 Pe x 2
this condition is very restrictive for large Pe wiggles occur just in the vicinity of steep gradients local mesh renement is useful for moderate Pe
ui1 = ui x
3u x3 2u x2
+...
i
2u x2 i
+ O(x)2
i
The truncation error is O(x) for the original equation but O(x)2 for the so-called modied equation vx u d+ v x 2 where
vx 2
2u =0 x2