Vous êtes sur la page 1sur 23

Convection and diffusion Convection and diffusion

assume a known flow field


generalize T and k as and I generalize T and k as and I
( ) ( ) S u +
|
|
|

|
c
I
c
=
c
+
c |
| | ( ) ( ) S
x x
u
x t
j j
j
j
+
|
|
.

\
c
I
c
=
c
+
c
| |
I II III IV
We know how to handle I, III and IV. Term II is new
Consider that u is given, and satisfies the continuity equation as:
( ) 0
c
+
c

( ) 0 =
c
+
c
j
j
u
x t

Steady1D convection and diffusion


convection-
( ) (1)
|
|

|
I
d d d |
|
diffusion
equation:
( ) (1)
|
.
|

\
|
I =
dx dx
u
dx
|
|
d
continuity
( ) const u u
dx
d
= = or 0
(o (ox) x)
ww
(o (ox) x)
ee
(Assume u is given)
PP
WW EE
xx
ww ee
AAxx
Discretization using central differences
Integrating eq (1) over the control volume (node `p)shown
( ) ( )


convection net
w e
w e
dx
d
dx
d
u u
|
.
|

\
|
I
|
.
|

\
|
I =
| |
| |
Integrating eq. (1) over the control volume (node p )shown
uu
u
central difference scheme central difference scheme

diffusion net
convection net
uu
u
P
u
W
u
E
central difference scheme central difference scheme
(piece (piece- -wise linear profile) wise linear profile)::
( ) | | | + =
1
xx
PP WW E E
ww ee
( )
( )
W P w
P E e
| | |
| | |
+ =
+ =
2
1
2
( )( ) ( )( )
( )
( )
( )
( )
W P w P E e
w W P e P E
x x
u u
o
| |
o
| |
| | | |
I

I
= + +
2
1
2
1
( ) ( )
w e
x x o o
Discretization using central
differences
Re-arranging the discretization equation g g q
W W E E P P
a a a | | | + =
w w w
e
e
e e
E
F
D
u
a
F
D
u
x
a
+ +
I
=
I
=
2 2

o
( )
w e W E
w w e e
P
w
w
w w
W
F F a a
u
x
u
x
a
D
x
a
+ + =
I
+ +
I
=
+ = + =
2 2
2 2

o
o
x x 2 2 o o
F = u represents the advection strength, while D = /x is the
diffusion strength. diffusion st ength.
Problems with central differences Problems with central differences
Example: let u
e
= u
w
= 4, I
e
/ox = I
w
/ox = 1
Let |
E
=200, |
W
=100, find |
P
1 2 1 = =
I
=
e e
u
a

3 2 1
2
1 2 1
2
= + +
I
=
= = =
w w
W
E
u
x
a
x
a

o
o
( ) 2
2
= + + =
w e W E P
u u a a a
x

o
100 100 ) 3 ( 200 ) 1 ( 2 = + = u
(?) 50
100 100 ) 3 ( 200 ) 1 ( 2
= u
= + = u
P
P
Similarly, let |
E
=100, |
W
=200, then |
P
= 250 (?)
Discretization using upwinding Discretization using upwinding
The central difference scheme is found to be suitable for flows in
which diffusion strength is high compared to the advection
strength
The relevant non-dimensional number representing the relative
strength of the two transport mechanisms is called the Peclet
b ( / ) h i i l h l d number (P = uL/), where L is a representative length scale and
is the diffusivity.
The central difference scheme assumes equal influence of the |
values of two adjacent grid points in determining the convective values of two adjacent grid points in determining the convective
flux at the interface of the control volume between those grid
points. This assumption will be valid only for low Peclet number
(Pe < 2) flows (Pe < 2) flows.
For very high Peclet number (Pe > 2)flows, the influence of the
upstream node will be dominant at the interface, and this is the
basis of the Upwind method. p
Discretization using upwind Discretization using upwind
In this scheme, the value of | at an interface is equal to that at the
node on the upstream side of the interface.
0 if
0 if
< =
> =
e E e
e P e
F
F
| |
| |
Accordingly, the advective flux at the interfaces e and w can be written as:
( ) | | | | 0 , 0 ,
e E e P e
u Max u Max u | | | =
( ) | | | | 0 , 0 ,
w P w W w
u Max u Max u | | | =
e
F D + +
I
0 0
W W E E P P
a a a | | | + =
w w w
w
W
e e e
e
E
F D u
x
a
F D u
x
a

o
+ = +
I
=
+ = + =
0 , 0 ,
0 , 0 ,
The discretized equation is
written as
( )
w e W E
w
w
e
e
P
u u a a
u
x
u
x
a

o
+ +
= +
I
+ +
I
= 0 , 0 ,
Exponential scheme (exact solution) p ( )
The Upwind scheme is ideal for high Peclet number flows (Pe >
2).
However to cover the entire range of Peclet number the However, to cover the entire range of Peclet number, the
analytical solution for variation of | over the length of a one-
dimensional control volume can be observed.
The steady state 1-D transport equation can be written as: The steady state 1 D transport equation can be written as:
Boundary conditions:
( )
|
.
|

\
|
I =
dx
d
dx
d
u
dx
d |
|
x | | = = 0
Boundary conditions:
L
o
L x
x
| |
| |
= =
0
| |
x
Solution:
( ) 1 exp
1 exp

|
.
|

\
|
=

P
L
x
P
o L
o
| |
| |
Exponential scheme (contd) p ( )
In the exponential scheme, the | solution above is used as the profile
assumption for | between successive grid points.
Considering the two neighboring grid points to be located at x = 0 and x = L Considering the two neighboring grid points to be located at x = 0 and x = L
respectively, in a local coordinate system where the origin corresponds to the
face at which the flux of | needs to be calculated, the discreization equation is:
F
w w w
W
e e
e
E
D F F
a
D F
F
a
=

=
) / exp(
1 ) / exp(
e e e
e
D
F x u
P =
I
=
) ( ) ( o
The exact solution gives the variation of | along the control
( )
w e W E P
w w
W
F F a a a
D F
a
+ + =
1 ) / exp(
e e
D I
The exact solution gives the variation of | along the control
volume length for any Peclet number.
However, approximate representations of | variations are required
in the context of a numerical solution for computational efficiency p y
The Hybrid and the Power Law schemes are two such examples
described subsequently.
The Hybrid Scheme y
The hybrid differencing scheme (Spalding, 1972) is based on a combination
of central and upwind differencing schemes. The central differencing
h h h bl f ll l b l d f l scheme, which is suitable for small Peclet number, is employed for Peclet
numbers (Pe < 2). The upwind scheme, which is more suitable for higher
Peclet number, (Pe 2). The hybrid scheme is essentially a piecewise linear
interpolation of the exponential scheme. A summary of the scheme is: p f p y f
, 2 For = <
e
E
e
P
D
a
P
2
1 , 2 2 For = s s
e
e
E
e
e
P
D
a
P
D
0 , 2 For = >
e
E
e
D
a
P
Power LawScheme Power Law Scheme
The Power-law differencing scheme of Patankar (1980) is a more accurate
approximation than the hybrid scheme. In the hybrid scheme, the influence of
diffusion is switched off for Pe>2, which may be too soon. In the power law
scheme, diffusion is set to zero when cell Pe exceeds 10. If 0 < Pe < 10, the
flux is evaluated by using a polynomial expression In summary the scheme is: flux is evaluated by using a polynomial expression. In summary, the scheme is:
, 10 For = <
e
E
e
P
D
a
P
( ) 1 . 0 1 , 0 10 For
5
+ = < s
e e
e
E
e
e
P P
D
a
P
D
( )
0 10 F
1 . 0 1 , 10 0 For
5
= s s
E
e
e
E
e
a
P
P
D
a
P
0 , 10 For = >
e
E
e
D
P
2DDiscretisation Equation 2D Discretisation Equation
( ) S J J
c c c
|
NN
( ) S J
y
J
x t
y x
=
c
+
c
+
c
|
NN
nn
u J
x
c
c
I =
|
|
PP WW EE
ww ee
ss
AAyy
y
v J
x
y
x
c
c
I =
c
|
|
|
yy
AAxx
SS
ss y c
xx
z=1 z=1
Discretized unsteady 2-D convection- y
diffusion equation (fully implicit)
old old old
T a y x S b
y x c
a + A A =
A A
=

b a a a a T a
S S N N W W E E P P
+ + + + = | | | |
t
n w e
P S N W E P
p p C p
x
D
y
D
y
D
y x S a a a a a
T a y x S b
t
a
A I A I A I
A A + + + =
+ A A =
A
=
( ) ( ) ( )
etc.
etc.
n
n
e
e
n
n
n
w
w
w
e
e
e
D
F
P
D
F
P
x
D
x
y
D
x
y
D
= =
= = =
o o o
( ) . assumption profile on depends
s
n e
P A
D D
The function for different schemes:
( )
s
P A
The function for different schemes:
( )
s
Scheme Formula for
Central difference 1- 0.5|P|
U i d 1
( )
S
P A
Upwind 1
Hybrid (0, 1- 0.5|P|)
Power law (0, (1- 0.1|P|)
5
) ( , ( ) )
Exponential |P|/ [exp(|P|)-1]
False diffusion
Commonly misinterpreted and controversial topic
Common view: - Central diff. is second order accurate
- Upwind causes severe false diffusion
Taylor series (central diff.): Truncation error (TE) O (Ax)
2
y ( ff ) ( ) ( )
Upwind: can be shown that TE O (Ax)
(uses value of upstream node only hence accuracy similar (uses value of upstream node only, hence accuracy similar
to forward or backward difference)
C d l Common notion: Upwind less accurate. However, since
| ~ x variation is exponential, Taylor series approx. is good
only for small Ax (not good for high Peclet number)
Upwind better in these circumstances
False diffusion (continued)
Compare coefficients:
Central diff. Upwind
Equivalently D in central diff is replaced by (D + F / 2)
2
e
e E
F
D a =
0 ,
e e E
F D a + =
Equivalently, D
e
in central diff. is replaced by (D
e
+ F
e
/ 2)
in Upwind i.e. I replaced by
2
x uo
+ I
Flaw in argument: we have assumed that central diff.
scheme is the most perfect
Conclusion:
Small Peclet No.: central accurate; UPWIND over-predicts
diff i l h b id ti l t d t t l diffusion; power law, hybrid, exponential tend to central
Large Peclet No.: central fails, others are correct
False diffusion (continued)
Make I = 0. Any effect of diffusion will be false diffusion.
100 C, Hot 100 C, Hot
0 C, Cold 0 C, Cold
I = 0
I = 0
Uniform flow in x direction
NN
Hot
PP WW EE
Cold
SS
UPWIND SCHEME
Since I = 0, and F
n
= F
s
= 0 a
N
= a
S
= 0.
Also, a
E
= 0 (UPWIND) ,
E
( )
a
P
= a
W
|
P
= |
W
Hence Temperature discontinuity is preserved Hence, Temperature discontinuity is preserved
NO FALSE DIFFUSION
Uniform flow at 45 to the grid lines
NN
UPWIND (or high Peclet No.)
W S upstream neighbours
PP WW EE
W, S upstream neighbours
N, E downstream neighbours
SS
Hot
Cold
Since I = 0, and a
E
= a
N
= 0.
Also, a
W
= a
S
|
P
= 0.5 |
W
+ 0.5 |
S
ARTIFICIAL (FALSE) DIFFUSION OCCURED
Quadratic Upstream Interpolation for
Convective Kinetics (QUICK scheme) Convective Kinetics (QUICK scheme)
Higher order differencing scheme: more accurate
minimise false diffusion: can take into account corner nodes
3 - point quadratic interpolation
|
|
E
|
EE
|
P
|
W
|
WW
WW WW
ww
PP WW EE EE EE
ee
| at interface is obtained from a quadratic function passing
Control volume Control volume boundary
through the two surrounding nodes (one on each side of the
face) and a node on the upstream side
Let u
e
> 0, u
w
>0
|
w
= |
w
(|
P
, |
W
,|
WW
) |
e
= |
e
(|
P
, |
E
,|
W
) |
w
|
w
(|
P
, |
W
,|
WW
) |
e
|
e
(|
P
, |
E
,|
W
)
for uniform grid, quadratic interpolation gives:
| = (6/8)| + (3/8) | (1/8) | |
w
= (6/8)|
W
+ (3/8) |
P
- (1/8) |
WW
|
e
= (6/8)|
P
+ (3/8) |
E
- (1/8) |
W
For the diffusion terms, use gradient of the appropriate parabola
WW WW W W E E P P
a a a a | | | | + + =
WW WW W W E E P P
| | | |
WW W E
F a F F D a F D a = + = =
1
;
1 6
;
3
( )
w e WW W E P
w WW e w w W e e E
F F a a a a
F a F F D a F D a
+ + + =
+
8
;
8 8
;
8
Stability: Conditionally stable (high Pe, negative coeff. possible)
MODULE 4 Review Questions
Define Peclet number in a convection-diffusion problem. Why is the significance of Peclet
number in a convection-diffusion problem? Why does the Central difference scheme fail for
high Peclet number problems?
Show that the exponential scheme is appropriate from a physical reasoning standpoint. p pp p p y g p
Show that the upwind scheme can introduce false diffusion in low Peclet number problems.
The power law scheme is a close appropriation of the exponential scheme, and is therefore
regarded as a very accurate scheme. However, the exponential scheme is a result of analytical
solution of a 1D problem Evaluate and discuss the inaccuracies that can come in 2D and 3D solution of a 1D problem. Evaluate and discuss the inaccuracies that can come in 2D and 3D
problems is you use power law scheme.
What is false diffusion? Can false diffusion occur because of the gridding system? What are
the remedies for false diffusion?
For various Peclet number values (Pe = -20, -7, 0, 5, 10), calculate the a
E
/D
e
from the power
law scheme and from the exponential scheme, and express the difference as a percentage of
the exact a
E
/D
e
value. Although you might get a rather large percentage difference for some
values of Pe, the power law scheme is expected to give good results. Why?
Why is the QUICK scheme more accurate than conventional schemes? Does it always
converge?

Vous aimerez peut-être aussi