You are on page 1of 10

ADVANCED COMPUTATIONAL FLUID

DYNAMICS

Document Identifier : Solving Example 5.4 on Page 159[1]


Student : Huynh Van Tinh
Student Number : 20205079
School of : Mechanical and Automotive Engineering
Description : HW#5
Date (dd / mm / yyyy) : 20 / 04 /2020
ADVANCED COMPUTATIONAL FLUID DYNAMICS - HW#5

EXAMPLE 5.4
THE HIGHER-ORDER DIFFERENCING SCHEMES FOR
CONVECTION-DIFFUSION PROBLEMS

Using the QUICK scheme solve the problem considered in Example 5.1 for
u = 0.2m/s on a five-point grid. Compare the QUICK solution with the exact and
the central differencing solution.
A property ϕ is transported by means of convection and diffusion through
the one-dimensional domain sketched in figure 1. The analytical solution:

  0 exp   ux /    1

L  0 exp   uL /    1
(1)
The boundary conditions are ϕ 0 = 1 at x = 0 and ϕ L = 0 at x = L. The
following data apply: length L = 1.0m, ρ = 1.0kg/m 3, Γ = 0.1kg/m.s
ϕ=1 ϕ=0
u

x=0 x=L
Figure 1. The one-dimensional domain sketched
SOLUTION
The grid shown in figure 2 is below used here for the discretization.
δx
A 1 2 u 3 u 4 5 B
ϕ=1 ϕ=0

x=0 x=L
W w P e E

δx δx
Figure 2. The grid used
We have

F  F  F   .u  0.2 kg
 w

e  s.m2 

D w  De  D    x  0.5

kg

s.m2 
Pe  Pe  F  0.4
 w e D

1. Original form of QUICK

© hvtinh97@gmail.com 1
ADVANCED COMPUTATIONAL FLUID DYNAMICS - HW#5

 Interior nodal points 3 and 4


The QUICK scheme for one-dimensional convection-diffusion problems can
be summarised as follows:
aPP  a W W  aEE  a WW WW  aEEEE (2)

With neighbour coefficients, where:  w  1 for Fw  0 and  e  1 for Fe  0


Table 1
aW a WW aE aEE
6 3 6
Dw   wFw De   eFe   1   e  Fe
8 1 8 8 1
1 3
 wFw
1
 1   e  Fe
8 8
  eFe   1   w  Fw   1   w  Fw
8 8 8
0.675 -0.025 0.425 0
And the central coefficient
aP  a W  aE  a WW  aEE   Fe  Fw 
 0.675  0.425  0.025  0  0
 1.075

Therefore, at node 3 and 4, the discretised equation becomes

 0.0251  0.6752  1.0753  0.4254  0



 0.0252  0.6753  1.0754  0.4255  0 (*)
 Nodes 1, 2 and 5
The discretised equations for node 1, 2 and 5 are now written to fit into the
standard form to give
aPP  a WWWW  aW W  aEE  Su (3)

aP  a WW  a W  aE   Fe  Fw   SP
With neighbour coefficients, where
Table 2
Nod
a WW aW aE SP Su
e
1 * 3 8 2  8 * 2 
0 0 De 
3
DA  Fe
8
  D*A  Fe  FA   3 DA  8 Fe  FA  A
3 8   
1 0 0 0.592 -1.583 1.583
aP  2.175
7 1 3 1 1
0 Dw  Fw  Fe De  Fe Fw  FwA
8 8 8 4 4
2
0 0.7 0.425 0.05 -0.05

© hvtinh97@gmail.com 2
ADVANCED COMPUTATIONAL FLUID DYNAMICS - HW#5

aP  1.075
1 1 6 8  8 * 
 Fw
8
D w  DB*  Fw
3 8
0   DB*  FB   3 DB  FB  B
3   
5 -0.025 0.817 0 -1.133 0
aP  1.925
Therefore, at node 1, 2 and 5, the discretised equation becomes

2.1751  0.5922  1.583



0.71  1.0752  0.4253  0.05
 0.025  0.817  1.925  0
 3 4 5 (**)
From (*) and (**)

 2.1751  0.5922  1.583



 0.71  1.0752  0.4253  0.05

  0.0253  0.8174  1.9255  0
 0.025  0.675  1.075  0.425 0
 1 2 3 4

  0.0252  0.6753  1.0754  0.4255  0

The matrix form of the equation set is

 2.175  0.592 0 0 0 1  1.583 


  
 0.7  1.075 0.425 0 0  2 
 0.05 
 
 0 0  0.025 0.817  1.925  3    0 
     
 0.025 0.675  1.075 0.425 0 4   0 
 0  0.025 0.675  1.075 0.425     0 
 5
The solution matrix form is

1  0.9648 
  0.8707 
2   
3   0.7309 
   
4  0.5226 
  0.2123 
 5
The resulting matrix equation can be solved with MATLAB software.

Figure 3. Code for


solving the matrix

© hvtinh97@gmail.com 3
ADVANCED COMPUTATIONAL FLUID DYNAMICS - HW#5

Figure 4. The solution


The original form of QUICK solution is almost indistinguishable from the
exact solution on figure 5. Table 3 confirms that the errors that the errors are very
small. The sum of absolute errors (0.0048) indicates that the QUICK scheme gives
a more accurate solution.
Table 3
Nod Analytical Original form of
Distance Difference
e solution QUICK solution
1 0.1 0.9653 0.9648 0.0005
2 0.3 0.8713 0.8707 0.0006
3 0.5 0.7311 0.7309 0.0002
4 0.7 0.5218 0.5226 -0.0008
5 0.9 0.2096 0.2123 -0.0027

The function plot(x,y) generates a plot with the x value_distance (m) on the
horizontal axis and the y values_property ϕ on the vertical axis. The session is:

Figure 5. Code for generating the plot

© hvtinh97@gmail.com 4
ADVANCED COMPUTATIONAL FLUID DYNAMICS - HW#5

u = 0.2 m/s

Numerical solution

Exact solution

Figure 6. A graphics window showing the plot


2. Deferred form of QUICK
 Interior nodal points 3 and 4
The Hayase et al. (1992) QUICK scheme can be summarised as follows:

w  W  1  3P  2W  WW  for Fw  0


8
e  P  1  3E  2P  W  for Fe  0
8
The discretisation equation takes the form

aPP  a WW  aEE  S (4)

With neighbour coefficients, where:  w  1 for Fw  0 and  e  1 for Fe  0


Table 4
aW aE S
1  3  2     F
8 P W WW w w

 1  W  2P  3E   eFe


8
Dw   wFw De   1   e  Fe
 1  3W  2P  E   1   w  Fw
8

8  E EE
 1 2    3P   1   e  Fe
0.7 0.5

© hvtinh97@gmail.com 5
ADVANCED COMPUTATIONAL FLUID DYNAMICS - HW#5

And the central coefficient


aP  a W  aE   Fe  Fw 
 0.7  0.5  0
 1.2

At node 3, with S  0.0251  0.0252  0.1253  0.0754 the discretised


equation becomes
0.0251  0.6752  1.0753  0.4254  0 (#)

At node 4, with S  0.0252  0.0253  0.1254  0.0755 the discretised


equation becomes
0.0252  0.6753  1.0754  0.4255  0 (##)
 Nodes 1, 2 and 5
The discretised equations for node 1, 2 and 5 are now written to fit into the
standard form to give
aPP  a WWWW  a WW  aEE  Su (5)

aP  a WW  a W  aE   Fe  Fw   SP
Where
The discretised equation at node 1 is

 8 8 8 
Fe 7 P  3 E  2 A  FAA  De  E  P   1 DA*  9P  8A  E 
3

The discretised equation at node 5 is

 8 8 8 3 
FBB  Fw w  3 P  2 W  1 WW  1 DB*  8B  9P  W   D w  P  W 

The discretised equation at node 2 is

 8 8 8 8  8  8 
Fe P  3 E  2 P  1 W  Fw 7 W  3 P  2 A  De  E  P   Dw  P  W 

Table 5
Nod
a WW aW aE SP Su
e
1 3 8 1  8 * 1 
0 0 De  D*A  Fe
3 8
  D*A  Fe  Fw   3 D A  4 Fe  FA  A
3 4   
1 0 0 0.592 -1.583 1.583
aP  2.175
7 1 3 1 1
0 D w  Fw  Fe De  Fe Fw  FwA
8 8 8 4 4
2
0 0.7 0.425 0.05 -0.05

© hvtinh97@gmail.com 6
ADVANCED COMPUTATIONAL FLUID DYNAMICS - HW#5

aP  1.075
1 1 3 8  8 * 
 Fw
8
D w  DB*  Fw
3 4
0   DB*  Fe   3 DB  FB  B
 3   
5 -0.025 0.817 0 -1.133 0
aP  1.925
Therefore, at node 1, 2 and 5, the discretised equation becomes

2.1751  0.5922  1.583



0.71  1.0752  0.4253  0.05
 0.025  0.817  1.925  0
 3 4 5 (###)
From (#), (##) and (###)

0.0251  0.6752  1.0753  0.4254 0



 0.0252  0.6753  1.0754  0.4255 0

2.1751  0.5922  1.583
  0.0253  0.8174  1.9255 0

 0.71  1.0752  0.4253  0.05

The matrix form of the equation set is

0.025  0.675 1.075  0.425 0 1   0 


  
 0 0.025  0.675 1.075  0.425  2 
 0 
 
 2.175  0.592 0 0 0 3   1.583 
     
 0 0  0.025 0.817  1.925  4   0 
 0.7  1.075 0.425 0 0     0.05 
 5
The solution matrix form is:

1  0.9648 
  0.8707 
2   
3   0.7309 
   
4  0.5226 
  0.2123 
 5
The resulting matrix equation can be solved with MATLAB software.

Figure 7. The solution

© hvtinh97@gmail.com 7
ADVANCED COMPUTATIONAL FLUID DYNAMICS - HW#5

Figure 8. Code for solving the matrix


3. Comparison original form of QUICK and deferred form of QUICK
The advantage of deferred correction is that the main coefficients are
positive and satisfy the requirements for conservativeness, boundedness and
transportiveness. After a sufficiently large number of iterations the correction
catches up with the rest of the solution, so all variations of QUICK, including the
one developed by Hayase et al., will give the same converged solution. The
original form of QUICK and deferred form of QUICK give the same matrix and
solution.

© hvtinh97@gmail.com 8
ADVANCED COMPUTATIONAL FLUID DYNAMICS - HW#5

BIBLIOGRAPHY
[1] H K Versteeg and W Malalasekera, 2007. An Introduction to Computational
Fluid Dynamics (The Finite Volume Method). Second Edition. Pearson Education
Limited.

© hvtinh97@gmail.com 9

You might also like