Professional Documents
Culture Documents
Finite Volume Method: Integral Conservation Law (I) Ds Z QDV Vu D U Flux Function
Finite Volume Method: Integral Conservation Law (I) Ds Z QDV Vu D U Flux Function
V = Vi ,
[
Vi Vj = , i 6= j
dS f
flux function
i=1 Z Z Z
u
1
Z
dV + f dV = q dV
ui = u dV mean value V t V V
|Vi | Vi
Partial differential equation (D)
To be specified u
+ f = q in V
concrete choice of control volumes t
u
type of approximation inside them In steady state t
= 0 so that
1D ui 1D ui
ui+1 ui+1
ui 1 ui 1
Vi Vi
xi 1 xi xi+1 xi 1 xi 1=2 xi
xi 1=2 xi+1=2
2D 2D
Vi
Vi Vi
Vi
Different grids / control volumes can be used for different variables (v, p, . . .)
Discretization of local subproblems
1 X 1 1
Z Z Z
ui
+ f nk dS = qi , ui = u dV, qi = q dV
t |Vi | Sk |V i | Vi |Vi | Vi
k
the integral conservation law is satisfied for each CV and for the entire domain
to obtain a linear system, integrals must be expressed in terms of mean values
x1 +x2
1D x12 = 2 , V = (x1 , x2 ), |V | = x2 x1
x1 x12 x2
Z
Midpoint rule f (x) dV |V |f12 exact for f P1 (V )
V
f1 + f2
Z
Trapezoidal rule f (x) dV |V | exact for f P1 (V )
V 2
f1 + 4f12 + f2
Z
Simpsons rule f (x) dV |V | exact for f P3 (V )
V 6
f1 + f2 + f3
Z
f (x) dV |V | exact for f P1 (V )
V 3
f12 + f23 + f13
Z
f (x) dV |V | exact for f P2 (V )
V 3
3(f1 + f2 + f3 ) + 8(f12 + f23 + f13 ) + 27f123
Z
f (x) dV |V |
V 60
exact for f P3 (V )
Newton-Cotes quadrature rules for tetrahedra
3D x4
Center of gravity
x1234
x3 x1234 =
x1 + x2 + x3 + x4
4
x1
x2
Z
f (x) dV |V |f1234 exact for f P1 (V )
V
f1 + f2 + f3 + f4
Z
f (x) dV |V | exact for f P1 (V )
V 4
f1 + f2 + f3 + f4 + 16f1234
Z
f (x) dV |V | exact for f P2 (V )
V 20
Interpolation techniques
1
R
Volume integrals ui = |Vi | Vi
u dV u(
xi ) midpoint rule
1
P R
Surface integrals f = vu du |Vi | f nk dS = Ic + Id
k Sk
1 X 1 X
Z Z
Ic = (v nk )u dS, Id = d(nk u) dS
|Vi | Sk |Vi | Sk
k k
ui+1/2 ui1/2 Vi
Ic = v , v = const
x
xi 1 xi xi+1
How to define the interface values ui1/2 ? xi 1=2 xi+1=2
Upwind difference approximation (UDS)
ui 1=2 ui+1=2
v>0 ui1/2 ui1 , ui+1/2 ui
ui+1
ui ui ui1
Ic v backward difference
ui 1 x
xi 1 xi xi+1
ui+1 ui1
Ic v central difference
xi 1=2 xi+1=2
2x
ui + ui+1 (x)2 2u
Hence, ui+1/2 = + ... (second-order accuracy)
2 8 x2 i+1/2
Linear upwind difference scheme (LUDS)
ui 1=2 ui+1=2
Upwind-biased interface values
v ui+1
ui 3ui +6ui1 ui2
ui1/2 8
ui 1 v>0
ui 2 ui+1/2 3ui+1 +6ui ui1
8
x
3ui+1 + 3ui 7ui1 + ui2
xi 2 xi 1 xi xi+1
Ic v
8x
xi 1=2 xi+1=2
3ui1 +6ui ui+1
ui1/2 8
third-order flux approximation v<0 3ui +6ui+1 ui+2
ui+1/2 8
second-order overall accuracy
3ui1 + 3ui 7ui+1 + ui+2
(because of the midpoint rule) Ic v
8x
marginally better than LUDS
Evaluation of surface integrals
Approximation of convective fluxes
any second-order finite volume scheme is a linear combination of CDS and
LU DS approximations (e.g. IQU ICK = 34 ICDS + 41 ILU DS )
high-order schemes can be readily derived by polynomial fitting based on
pm (x), m > 2 but pay off only if the quadrature rule matches their accuracy
a high-order scheme is guaranteed to produce better results than a low-order
one only asymptotically i.e. for sufficiently fine meshes
Convective transport first derivatives x , y , z
+ (v) = 0 continuity equation (hyperbolic)
t
2 2 2
Diffusive transport second derivatives x2 , y 2 , z 2 , . . .
T
(T ) = 0 heat conduction (parabolic/elliptic)
t
P e = 40 smearing wiggles
x = 0.1
0 1 x 0 1 x 0 1 x
Boundary conditions u0 = 0, uN = 1
Linear system Au = F A RN 1N 1 u, F RN 1
b c u1 0
a b c u2 0
1
A=
a b c ,
u=
u3 ,
F =
0
(x)2
...
c
a b uN 1 (x) 2
a b c
upwind difference 1 Pe x 2 + Pe x 1
central difference 1 0.5 Pe x 2 1 + 0.5 Pe x
a i
Trial solution ui = + c subject to the boundary conditions
a N 1
u0 = + = 0, uN = + =1 = =
c a N
1 c
i
1( a
c) P
Hence, ui = N = Q is the exact solution of the difference scheme.
1( a
c )
a
a
c >1 P < 0, Q<0 ui > 0
c<0 a < 0, c >0
a
0<
c <1 P > 0, Q>0 ui > 0
positivity-preserving
a a
c>0 a < 0, c < 0; a + c = b < 0 c < a c < 1
P changes its sign so that sign(ui ) = sign(ui1 ) nonphysical oscillations
c=0 ui = ab ui1 = 0, i = 1, . . . , N 1 u0 = 0, uN = 1
no spurious oscillations but the accuracy leaves a lot to be desired
Evaluation of the central difference scheme
Moreover, A is an M-matrix so that all the entries of its inverse are nonnegative
(x)2 2 u (x)3 3 u
u
Taylor series ui1 = ui x + +...
x i 2 x2 i 6 x3 i
2
ui ui1 ui1 2ui + ui+1 Pe x 2 u
u u
Pe 2
= Pe 2
2
+ O(x)2
x (x) x i x i 2 x i
u
The truncation error is O(x) for the original equation 1
v
but O(x)2 for the so-called modified equation
smearing
vx 2 u
u
v d+ =0
x 2 x2
vx
where 2 is the numerical (artificial) diffusion coefficient 0 1 x