FVM in Heat and Fluid Problem
FVM in Heat and Fluid Problem
ME 532: Assignment4
Problem 1:
Part a)
The general integral equation for steady diffusion is:
(1)
10( 15) = 0
(2)
= 10( 15)
(3)
Part b)
First, discretizing the source term:
= +
= , = 10 , = 150
(4)
= (10 + 150)
(5)
(6)
(7)
(8)
For the current problem, the values of the several coefficients are:
= = 1
=
=
= 1
1
=
=4
. 25
1
= . 25 = 8
2
2
(9)
= 50
| = 0
= 2.5
= 37.5
Using Eqs. 7 and 4, and the values of Eq. 9, the discrete equation for cell
1 is:
4 (2.5 8)1 42 = 37.5 + 8 50
(10)
14.51 42 = 437.5
Using Eqs. 6 and 4, and the values of Eq. 9, the discrete equation for cell
2 is:
(4 + 4 (2.5) ) 2 41 43 = 37.5
10.52 41 43 = 37.5
(11)
(12)
Using Eqs. 8 and 4, and the values of Eq. 9, the discrete equation for cell
4 is:
4 (2.5)4 43 = 37.5
(13)
6.54 43 = 37.5
4 10.5 4
0
37.5
2 =
3
0
4 10.5 4
37.5
4
0
0
4 6.5
37.5
(14)
Part c)
The solution of the discretized equations i.e. Eq. 14 using Gauss-Seidel
iteration is:
1
37.1874
2
25.4294
=
3
20.1897
4
18.1937
(15)
Part d)
To check whether the solution obtained in Eq. 15 satisfies the
conservation laws, the residue of the discretized equations need to be
checked. The residue for all cells can be obtained by substituting the
solution in Eq. 15 into Eq. 14, namely:
14.5
4
0
0
4
10.5
4
0
0
4
10.5
4
1
37.1874
0
437.5
2
0
25.4294
37.5
3
4
20.1897
37.5
6.5
18.1937
37.5
4
(16)
1
0
2
0
= 1 10 13
3
. 1421
4
.1421
Results of Eq.16 show that the residue of each cell is extremely small. This
suggests that the conservation laws are satisfied for each cell. In addition,
the sum root mean square of the residue for all cells is essentially zero
indicating global satisfying of conservation laws on the whole domain.
Notice that in computing the residue of Eq. 16, the solution was used with
all the digits available and not what is just presented in this paper.
Part e)
The original differential equation can be written as:
=
(0) = ,
(1)
(17)
=0
(18)
(19)
() =
cosh ( 1) +
cosh
(20)
The error between the numerical solution and the exact solution is defined
as:
% =
| |
100
(21)
Below are two figures. The first shows comparison between the numerical
and exact solution at each computed node. The second shows the error %
for each cell as calculated from Eq. 21.
45
Rod Temperature
40
35
Numerical
30
Exact
25
20
15
10
5
0
1
Node
4
3.5
3
Error %
2.5
2
1.5
1
0.5
0
1
Node
Problem 2:
(22)
=
=
For this problem, is zero. The node T15 has two boundaries, hence, two
of the a coefficients will be set to zero and the flux boundary will be
added to the source term. The left boundary, which is an insulated
boundary, wont add anything to the source term. The equations for T15
are:
= = 25 + 14
25 =
14 =
25 25
=
25
14 14
=
14
(23)
(24)
15
25
14 =
(25)
(26)
= = 31 + 42 ( )
31 =
42 =
=
31 31
=
31
42 42
=
42
10
(27)
(28)
+
+ 2
41
31
42 = +
(29)
11
(30)
Problem 3:
The differential equation is:
= 2 2
(31)
+1
= ( 2 ) +1 2 +1
+1 = + ( 2 ) +1 2 +1
+1 (1 + 2) = + ( 2 ) +1
+1 =
(32)
+ ( 2 ) +1
(1 + 2)
+1
= ( 2 ) 2
+1 = + ( 2 ) 2
(33)
+1 = (1 2 ) + ( 2 )
The Figure below shows comparison between the implicit and the explicit
solution.
12
0.3
0.25
Implicit
Explicit
0.2
0.15
0.1
0.05
0
0
0.2
13
0.8
Problem 4:
Discretizing the diffusion term:
(34)
| =
(35)
(36)
14
(37)
+ ( outflow face)
+ + ( inflow face)
15
(38)
For the current problem, the values of the several coefficients are:
= .1
= 1
= 1
= .1 , 2.5
= .1 , 2.5
= .2
=
= .5
(39)
= 1
= 0 , 1
= 0
= 0
The exact solution of the 1-D steady advection diffusion is given by:
1
( 0 )
0 +
1
=
(40)
Note that Pe number for the exact solution is different from the grid Pe
number.
The distribution of as function of x is given in the below two figures.
The first figure is for u=.1. The second figure is for u=2.5. Notice that for
the first figure, the results for hybrid and central schemes are exactly the
same. Similarly, the hybrid and the upwind schemes for the second figure
are the same. For the second figure, the central scheme does not converge.
16
1
0.9
Exact
Central
Upwind
Hybrid
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
0.2
0.4
0.6
0.8
0.6
0.8
1
0.8
Exact
Central
Upwind
Hybrid
0.6
0.4
0.2
0
0
-0.2
0.2
0.4
-0.4
-0.6
17
Problem 5:
The discrete equation for the interior nodes:
(41)
+ ( outflow face)
+ + ( inflow face)
18
(42)
+ + + +
Boundary at the upper left corner:
+ + +
Boundary at the upper right corner:
+ +
Boundary at the lower right corner:
+ + +
19
For the current problem, the values of the several coefficients are:
= 10 (assuming C=1)
= .1
= .1
= .002
= .0002
= 1
= .02
= .04
= 300
=
= 0
( ) 2+( )2
.12
10
The three contours below shows the temperature distribution for the three
cases.
20
1950-2100
1800-1950
1650-1800
1500-1650
1350-1500
1200-1350
1050-1200
900-1050
750-900
600-750
450-600
300-450
800-850
750-800
700-750
650-700
600-650
550-600
500-550
450-500
400-450
350-400
300-350
750-800
700-750
650-700
600-650
550-600
500-550
450-500
400-450
350-400
300-350
21
Problem 6:
The discrete equation for the interior nodes using fully implicit scheme:
= +
(43)
=
= +
(44)
+ +
22
(45)
0
| +
For the current problem, the values of the several coefficients are:
= 10
= 1
= 1(assumed)
= 107
= .02
= 106
= .001
= .002
= 0
= 0
= 0
= .001
23
(46)
Temperature (C)
The figure below shows the solution for the 1-D unsteady diffusion for
several times.
200
180
160
140
120
100
80
60
40
20
0
t=40s
t=80s
t=120s
0.5
1
Length (cm)
24
1.5
Problem 7:
The velocity field I selected is the derived by L. I. G. Kovasznay. The
velocity represents an exact two-dimensional solution of the Navier-Stokes
equations with a periodicity in one direction, which may represent the
wake of a two dimensional uniform grid. The velocity field is given by:
= 1 sin
=
sin
(47)
+ 4 2
=
2
2
=
The negative value of represents the wake behind the uniform grid.
25
(48)