Beruflich Dokumente
Kultur Dokumente
Boundary layers,
impingement,
separation/reattachment,
streamline curvature, . . .
U(y)
Contents:
Review of basic FV method
Pressure-velocity coupling
Body-fitted coordinate systems
Unsteady problems
Turbulence and other physical
modelling
Reading:
J. Ferziger, M. Peric, Computational Methods for Fluid
Dynamics
H.K. Versteeg, W. Malalasekara, An Introduction to
Computational Fluid Dynamics: The Finite Volume
Method
S.V. Patankar, Numerical Heat Transfer and Fluid Flow
Notes: http://cfd.mace.manchester.ac.uk/tmcfd
- People - T. Craft - Online Teaching Material
Heat/mass transfer
Thot
Rather than teach how to use a particular CFD code, the course aims to
give an understanding of the approximations and numerical treatments
found in most general CFD codes.
2 / 24
The transport equation(s) are then integrated over each control volume.
2010/11
Tcold
2010/11
3 / 24
2010/11
4 / 24
or
(Uj )
+ S
=
xj
xj
xj
(1)
.(U ) = .( ) + S
(2)
.(U ) dV =
.( ) dV +
S dV
.(U ) dV =
5 / 24
S dV
(6)
Provided the same expressions are used for fluxes across faces in
neighbouring cells, this approach ensures that the conservation
properties will also be satisfied globally over the flow domain.
n
S
U .ndS is the convective flux of across the part of the boundary edge
dS, and .ndS is the diffusive flux across the same boundary part.
(5)
2010/11
The left hand side of equation (6) is thus simply the total net convective
and diffusive flux of into the control volume.
(4)
S dV
(U ).ndS =
(3)
The divergence theorem can be used to convert the left hand side volume
integral to an integral around the boundary, , of the control volume:
dV + S dV
dV =
xj
xj
xj
or
2010/11
6 / 24
In fact, when is taken as the mid-point of the face then the above
approximation has leading order term of O((s)3 ), and the approximation
is third order.
The source terms in the volume integral of equation (6) are approximated
as
Z
(9)
S dV S Vol (S )P Vol
for any point lying somewhere on the line being integrated along.
The integration of terms on the right hand side of equation (8) can then
be carried out, using a suitable change of variable, to give
Z
f (s) ds = f ( )
ds + f ( ) (s ) ds +
= f ( )s + O((s) )
2
2010/11
7 / 24
2010/11
8 / 24
This leads to
e Z
n ZZ
Z
e Z
n Z
P
U
U
dy +
dx
dxdy
U 2 dy +
UVdx =
x
y
V x
w
s
w
s
(11)
N
n
W
dxdy
x y
(12)
x P
V x
s
S
x
P
E
P
e
( U 2 ) +
( UV )dxdy =
dxdy
x
y
V x
ZZ
U
U
dxdy
+
x
y
y
V x
ZZ
EE
2010/11
(10)
9 / 24
(13)
(16)
where Cxe , Cxw , Cyn and Cys are simply the mass fluxes through the east,
west, north and south faces.
The scheme used to interpolate these values affects both the stability
and accuracy of the overall solution, and a few commonly-used
alternatives are outlined below.
(15)
where
adw = ( y /x )w
= ( Uy )e Ue ( Uy )w Uw + ( V x )n Un ( V x )s Us
UE UP
U UW
U UP
U US
( y )w P
+ ( x )n N
( x )s P
x
x
y
y
(14)
ade = ( y /x )e
10 / 24
dy +
dx
y +
x
x
y
x
y
w
s
w
s
( y )e
2010/11
ads = ( x /y )s
2010/11
11 / 24
2010/11
12 / 24
A very simple scheme for approximating cell face values for the
convective terms is the first-order upwind convection scheme:
(
UP for Cxe > 0
P e
(17)
Ue =
UE for Cxe 0
ap UP = ae UE + aw UW + an UN + as US + su
Having obtained the coefficients and source terms for each grid cell, the
resulting system of equations can be solved by a suitable numerical
algorithm.
To illustrate this, we assume that Cxe > 0. Then the scheme approximates
U
Cxe Ue Cxe UP = Cxe Ue + (xP xe )
+ O((xP xe )2 )
(20)
x e
(18)
acw = max(Cxw , 0)
acs = max(Cys , 0)
and acp = ace + acw + acn + acs + (Cxe Cxw + Cyn Cys )
Note that the coefficients ace , etc are all positive, as is acp . The final set of
terms in acp is the net mass flux into the cell, which should be zero, so in
practice acp can simply be taken as the sum ace + acw + acn + acs .
(19)
where
2010/11
13 / 24
14 / 24
The central difference scheme is thus more accurate than the first order
upwind scheme, although it can produce oscillatory solutions.
Ue = 0.5(UE + UP )
For this reason, whilst first order schemes are often used, it is usually
preferable to employ a higher order scheme.
2010/11
2010/11
15 / 24
(21)
Ue = 0.5(UE + UP ) + O(x 2)
(24)
2010/11
16 / 24
QUICK Scheme
e = P +
E P 1
(E 2P + W )
2
8
(25)
Note that the discretization stencil associated with the QUICK scheme is
larger than that of the first and second order schemes outlined earlier,
since contributions from UEE , UWW , UNN and USS now appear.
This maintains the five point stencil of points treated implicitly, and the
positivity of the coefficient matrix.
EE
2010/11
17 / 24
2010/11
18 / 24
2010/11
20 / 24
U V
+
=0
x
y
(26)
on the box 0 < x < 1 and 0 < y < 2 with velocities U and V constant and
prescribed as a step function at y = 0 and / x = 0 at x = 0 and x = 1.
V = 1, U = 0
U >0
2010/11
19 / 24
In the U = 0 case the flow is aligned with the grid lines and all the
schemes perform reasonably well (obviously resolving the step change
better as the grid is refined).
In this case the numerical diffusion introduced by the first order upwind
scheme is clearly present.
The centred scheme captures the steep gradient better, but shows
significant oscillations.
The QUICK scheme also represents the steep gradients quite well, and
improves rapidly as the grid is refined. However, it does show some overand under-shoots at the base and crest of the step.
V = 1, U = 0.2
2010/11
21 / 24
or
22 / 24
At this stage it is not clear how the pressure field is updated, since we do
not have a transport equation for the pressure. This issue is addressed in
the following section.
/ x = 0 at xE
xE
(27)
Fixed flux conditions (eg. prescribed heat flux) can also be implemented
by setting ae to zero and adding the desired flux to the source term s .
2010/11
= 0 at xE
2010/11
23 / 24
2010/11
24 / 24