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

1 / 17
About This Presentation
Title:

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

Description:

rhos:PURELY SPECULAR COMPONENT. nhit=0; ralp=0; tcpu=cputime; ... rs=rand(1,1); % Random number for specular or diffuse reflectivity ... – PowerPoint PPT presentation

Number of Views:391
Avg rating:3.0/5.0
Slides: 18
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
Calculation of generalized exchange factor F1-2
in radiation problems using Monte Carlo
method This example shows the formulation and
computer algorithm for two identical parallel
disks using MC algorithm.
1) Emission position
2) Emission angle
3) Hit Miss
4) Absorption
5) Reflection
3
(No Transcript)
4
The following program is presented in MATLAB,
however, we will see that its translated program
into FORTRAN can be executed extremely faster!
THIS PROGRAM CALCULATES THE FRACTION OF THE
TOTAL EMITTED ENERGY FROM A CIRCULAR DISK WHICH
REACHES AND ABSORBED BY A PARALLEL DISK OF THE
SAME RADIUS AND RADIATIVE PROPERTIES. load
input.txt Nbinput(1) Rinput(2) Hinput(3)
epsinput(4) rhosinput(5) alphaeps
rhod1-alpha-rhos Nb NUMBER OF EMITTED
BUNDLES R DISKS RADII H
DISTANCE BETWEEN DISKS eps EMISSIVITY OF
DISKS (GRAY SURFACE) rhodDIFFUSE
REFLECTIVITY COMPONENT rhosPURELY SPECULAR
COMPONENT nhit0 ralp0 tcpucputime NB1
0 100 1000 10000 30000 60000 90000 120000 150000
180000 210000 250000 inb1
5
for i1Nb iray1 rfirand(1,1)
rrrand(1,1) Random numbers for the point
of emission fi,rppemis(rfi,rr,R)
Radial and angular position of emission
point xhrpcos(fi) X
position of emission point yhrpsin(fi)
Y position of emission point
rsirand(1,1) rtetrand(1,1) Random
numbers for the direction of emission
si,tetdemis(rsi,rtet) Angles of
emission direction while ralp1
xhxhirayHtan(tet)cos(si) X position
of hitting (missing) level yhyhirayHtan(te
t)sin(si) Y position of hitting
(missing) level zh0.5(HirayH) Z
position of hitting (missing) level, which can be
either of the disks if (xhxhyhyh)lt RR
Condition for hitting
ralprand(1,1) Random number
for absorption if (ralpltalpha iraygt0)
Condition for the absorption of the
bundle. Absorption only on the
upper disk is counted (iraygt0)
nhitnhit1 COUNT THE HIT!
ralp1 To avoid unnecessary reflection
elseif ralpgtalpha Condition
for reflection iray-iray Changing
the direction of beam (1 down to up, -1 up to
down) rsrand(1,1)
Random number for specular or diffuse
reflectivity rsirrand(1,1)
rtetrrand(1,1) Random numbers for
angles of reflection
sir,tetrreflect(rs,rsir,rtetr,rhos,rhod,si,tet)
Angles of reflection sisir
tettetr Reflection angles should be the
emission angles now end else
ralp1 To avoid unnecessary reflection
end end ralp0 To consider the while
loop for the next emission if
iNB(inb), F(inb)nhit/i
inbinb1 end end figure, semilogx(NB,F,'-',N
B,F,'o'), xlabel('N_shot'), ylabel('F'),
cputime-tcpu
6
The following figure shows the results of several
runs at different number of shots. Over 105 shots
the numbers approach a mean value.
NB250000, R1.0, H1.0, ?0.3, ?s0.35
7
Input file contains numerical values for 5
parameters
250000 1.0 0.1 0.3 0.35
8
In order to compare the results with analytical
solution we use the equation for a black body
case
250000 1.0 0.1 1.0 0.0
9
Postprocessing of heat conduction problem Using
the PDE toolbox, create and solve the following
problem. Some postprocessing of the results will
come upon the solution completed.
10
(No Transcript)
11
We export data from PDE, Mesh and Solve menus.
Then they will be known in MATLAB environment. As
already mentioned, these information are related
to the points and triangles (meshes) with the
solution. For example, we would like to see the
variation of heat flux over the two left and
right boundaries. The exported solution is only u
(temperature). We can calculate the flux vector
components in the center of triangles in
MATLAB cux,cuy pdecgrad(p,t,c,u) cux-cux
cuy-cuy
p data for points (x,y) t data for triangles
(indices) c data for conductivity u solution
(at nodes)
12
After exporting data from 'mesh', 'PDE' and
'Solve' menus we run this code. Assume that we
have already saved the exported data in a file.
So, we load them first. load sol1 cux,cuypdec
grad(p,t,c,u) cux-cux cuy-cuy We specify
x,y coordinates of the vertices of triangles for
i13 for j1length(t)
tx(i,j)p(1,t(i,j)) ty(i,j)p(2,t(i,j))
end end
Here, we determine the location of interest for
analysis and corresponding calculations ii0 fo
r i1length(tx) aatx(,i) pb1 aa
contains some key information of the boundary
of interest. pb represents
the position of
boundary. For various boundaries these must
change accordingly. Current
setting is for the
right boundary This is the place we specify
the right boundary (x1) as our boundary of
interest if (aa(1)pbaa(2)pb)
(aa(1)pbaa(3)pb) (aa(2)pbaa(3)pb)
iiii1 wall(ii,)cux(i),cuy(i),me
an(tx(,i)),mean(ty(,i))
end end figure,plot(wall(,4),wall(,1),'ko'),
xlabel('y'),ylabel('q_x-kgrad_x(T)') figure,plot
(wall(,4),wall(,2),'rs'), xlabel('y'),ylabel('q_
y-kgrad_y(T)')
13
mean(wall(,1)) ans -19.4305
14
If we change pb to 0 in the code, it will
represent the left boundary and we get the
following results
mean(wall(,1)) ans 119.3735
15
For the analysis of heat flux around the circle,
we may need to make changes in the previous code
load sol1 cux,cuypdecgrad(p,t,c,u) cux-cux
cuy-cuy for i13 for j1length(t)
tx(i,j)p(1,t(i,j)) ty(i,j)p(2,t(i,j))
end end ii0 for i1length(tx)
aasqrt((tx(,i)-0.5).2(ty(,i)-0.5).2)
pb0.20.005 if (aa(1)ltpbaa(2)ltpb)
(aa(1)ltpbaa(3)ltpb) (aa(2)ltpbaa(3)ltpb)
iiii1 wall(ii,)cux(i),cuy(i),me
an(tx(,i)),mean(ty(,i))
end end tetaangle(wall(,3)-0.5sqrt(-1)(wall(,
4)-0.5)) Qsqrt(wall(,1).2wall(,2).2) figur
e,polar(teta,Q,'ro')
16
Angular position
17
  • Homework 3 Using the PDE toolbox for the
    above-mentioned problem, investigate how the
    following parameters affect on the mean heat flux
    across the right boundary.
  • The temperature of the fluid inside the internal
    circular cylinder,
  • the conductivity of the right half of the domain
    as other conditions are fixed.
  • Calculate for specific values as given below,
    then plot the results

a)
Other parameters are as given in the figure (page
9).
b)
Other parameters and quantities are as given in
the figure (page 9).
Write a Comment
User Comments (0)
About PowerShow.com