Problem 4' Solve the conduction heat transfer problem in a square of length 1 with the following BCs - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Problem 4' Solve the conduction heat transfer problem in a square of length 1 with the following BCs

Description:

kk=kk 1; T(jj,ii)=t(kk); end. end. end. x=0:dx:l; y=x; cs=contour(x,y,T,20,'k' ... Variable material property (thermal conductivity) T1. T2. T3. T4. T5. T6. T7. T8 ... – PowerPoint PPT presentation

Number of Views:125
Avg rating:3.0/5.0
Slides: 17
Provided by: JAL60
Category:

less

Transcript and Presenter's Notes

Title: Problem 4' Solve the conduction heat transfer problem in a square of length 1 with the following BCs


1
Advanced Topics in Heat, Momentum and Mass
Transfer
Lecturer Payman Jalali, Docent Faculty of
Technology Dept. Energy Environmental
Technology Lappeenranta University of Technology
2
If there is constant temperature boundary
condition over a portion of the boundary, no
ghost points are needed there. So we dont need
the ghost points at the left side of the boundary.
3
Ghost point
Real point
(1)
(2)
4
node
1
2
20
5
Input data are given in the first part of the
program. There are two options to choose the type
of fluids flowing around the structure in menu
command.
l0.0762 kc17.3 hw1417.4 T0150 Tinf1input(
'Ambient temperature ') ha28.3 N20
Number of nodes in each direction. dxl/(N-1) B
i1hwdx/kc Bi2hadx/kc ibmenu('What fluid is
flowing around the structure?','Water','Air') if
ib1 BiwBi1 elseif ib2
BiwBi2 end NN(N-1)N The number of Unknown
temperatures along the x direction, is (N-1)
Azeros(NN,NN) k0
6
for j1N for i2N kk1
A(k,k)-4 if i2 A(k,k1)1
if (jgt2 jlt(N-1))
A(k,k-N1)1 A(k,kN-1)1 B(k)-T0
elseif j1 A(k,kN-1)11
B(k)-T0-2BiwTinf1 A(k,k)A(k,k)-2Biw
elseif jN A(k,k-N1)11
B(k)-T0-2BiwTinf1 A(k,k)A(k,k)-2Biw
end elseif iN A(k,k-1)1
if (jgt2 jlt(N-1))
A(k,k-N1)1 A(k,kN-1)1 B(k)0
A(k,k-1)A(k,k-1)1 elseif j1
A(k,kN-1)11 A(k,k-1)A(k,k-1)1
A(k,k)A(k,k)-2Biw B(k)-2BiwTinf1
elseif jN A(k,k-1)A(k,k-1)1
A(k,k-N1)11 A(k,k)A(k,k)-2Biw
B(k)-2BiwTinf1 end elseif (igt2
iltN) A(k,k-1)1 A(k,k1)1
if j1 A(k,kN-1)11
A(k,k)A(k,k)-2Biw B(k)-2BiwTinf1
elseif jN A(k,k-N1)11
A(k,k)A(k,k)-2Biw B(k)-2BiwTinf1
else A(k,k-N1)1 A(k,kN-1)1
B(k)0 end end
end end Ainv(A) tAB'
For part A
For part C
For part B
t includes the nodal values of temperatures
from node 1 to (N-1)N
7
kk0 for jj1N for ii1N if ii1
T(jj,ii)T0 else kkkk1
T(jj,ii)t(kk) end end end x0dxl
yx cscontour(x,y,T,20,'k') clabel(cs,'manual')
,hold on pcolor(x,y,T), shading interp,
colorbar axis square xlabel('x') ylabel('y')
Heat transfer from sides Qout2hsum(dx.(T(1,2N
)-Tinf1)) Qinkcsum(T(,1)-T(,2))
Mapping the vector t to a plane matrix
Plotting commands of results
Inlet and Outlet heat flows
8
Practice If we want to change the design of the
combustion chamber so that the wall temperature
rises to 170 C. There are two options to remove
the same amount of heat from the combustion
chamber 1) change the material of the metal
structure, 2) change the cross-sectional area of
the structure. Give your suggestions for either
option based on CFD calculations for air and
water.
9
Variable material property (thermal conductivity)
10
The above equation can be arranged as (i the
iteration index, m the node index)
11
We assume a constant value function for initial
temperature (T(0)T0) and try to obtain the
solution. The function for conductivity can be
written in the following MATLAB function
function ykc(t1,t2) k010 k10.1 k20.01 t0.5
(t1t2) yk0k1tk2tt
Input data d0.01
Diameter of the rod(m) L0.1
Length of the rod(m) G0100000
Internal heat
generation(W/m3) T030
Wall temperature (C) Tinf100
Ambient temperature (C) h10
Convective heat
coefficient (W/m2.K) N8
Total number of nodes on the
rod acc1e-10 Desired accuracy for
convergence of the iterations. dxL/(N-1)
Longitudinal element Acpidd/4 Cross
sectional Area Aspiddx Lateral
surface dvpidddx/4 Volume of the
element b1 - (hAsTinfG0dv) NNN-2
Number of nodes with unknown
temperatures T1T0ones(N,1) Initial
temperature distribution Acc10 ii0
12
while Accgtacc iiii1 Bb1ones(NN,1)
Azeros(NN,NN) k0 for i2N-1
kk1 A(k,k) -(hAs(Ac/dx)(kc(T1(i),T1(i
-1))kc(T1(i),T1(i1)))) if i2
A(k,k1)kc(T1(i),T1(i1))Ac/dx
B(k)B(k)-kc(T1(i),T1(i-1))AcT0/dx
elseif i(N-1) A(k,k-1)kc(T1(i),T1(i-1)
)Ac/dx B(k)B(k)-kc(T1(i),T1(i1))AcT
0/dx else A(k,k1)kc(T1(i),T1(i1
))Ac/dx A(k,k-1)kc(T1(i),T1(i-1))Ac/d
x end end Ainv(A) tAB
T2T0tT0 dTT1-T2 Accsqrt(sum(dT.dT)
) clear A clear B clear t T1T2 end
Making the matrix of coefficients A, and
constant vector B
B.C.
I.N.
B.C. Boundary Conditions
I.N. Internal Node
13
Acc (Error) 35.1362
ii 1 A -0.2464 0.1210 0
0 0 0 0.1210
-0.2464 0.1210 0 0
0 0 0.1210 -0.2464
0.1210 0 0 0
0 0.1210 -0.2464 0.1210
0 0 0 0
0.1210 -0.2464 0.1210 0 0
0 0 0.1210
-0.2464
T2 30.0000 39.0301 44.8703 47.7372
47.7372 44.8703 39.0301 30.0000
B -4.1895 -0.5610 -0.5610 -0.5610
-0.5610 -4.1895
t
Acc (Error) 6.4756
ii 2 A -0.3187 0.1748 0
0 0 0 0.1748
-0.3776 0.1983 0 0
0 0 0.1983 -0.4093
0.2065 0 0 0
0 0.2065 -0.4093 0.1983
0 0 0 0
0.1983 -0.3776 0.1748 0 0
0 0 0.1748
-0.3187
T2 30.0000 38.0644 42.2660 44.0969
44.0969 42.2660 38.0644 30.0000
B -4.7444 -0.5610 -0.5610 -0.5610
-0.5610 -4.7444
t
The results of the first two iterations are shown
here. At the first iteration the square root of
the summation of squared temperature differences
between new and old steps which is denoted by
Acc is a high value and in next iterations its
value decreases very fast. This means that the
solution converges to the real solution. After 13
iteration the value of Acc reached to about 10-10
14
Acc (Error) 0.7944
ii 3 A -0.3076 0.1658 0
0 0 0 0.1658
-0.3515 0.1812 0 0
0 0 0.1812 -0.3718
0.1861 0 0 0
0 0.1861 -0.3718 0.1812 0
0 0 0
0.1812 -0.3515 0.1658 0
0 0 0 0.1658
-0.3076
T2 30.0000 38.1587 42.5687 44.5607
44.5607 42.5687 38.1587 30.0000
B -4.6819 -0.5610 -0.5610 -0.5610
-0.5610 -4.6819
t
This procedure is continued until the error
becomes less than acc which is 10-10 here.
Acc (Error) 3.6019e-011
ii 13 A -0.3087 0.1666 0
0 0 0 0.1666
-0.3542 0.1831 0 0
0 0 0.1831 -0.3759
0.1884 0 0 0
0 0.1884 -0.3759 0.1831
0 0 0 0
0.1831 -0.3542 0.1666 0
0 0 0 0.1666
-0.3087
T2 30.0000 38.1506 42.5390 44.5122
44.5122 42.5390 38.1506 30.0000
B -4.6874 -0.5610 -0.5610 -0.5610
-0.5610 -4.6874
t
15
d0.01 L0.1 G0100000 T030 Tinf100
h10 N8 acc1e-10
d0.01 L0.1 G00 T030 Tinf100 h10
N8 acc1e-10
kc100.1T0.01T2
kc100.1T0.01T2
16
We can increase the number of nodes to 50 and
also compare it with constant conductivity (k010
W/mK)
Write a Comment
User Comments (0)
About PowerShow.com