1 _____________________________________________________________________________ 2-Dimensional Transient Conduction ____________________________________________________________________________ We have discussed basic finite volume methodology applied to 1-dimensional steady and transient conduction. It was noted that steady state formulation is a special case of transient formulation and that transient numerical model does not require any significant changes over the steady state model. When the temperature variation in a system under consideration is appreciable in more than one space dimensions, conduction becomes multidimensional. Majority of our discussion in extending 1-D formulation to multidimensional formulation will be limited to 2-D conduction in Cartesian coordinates (x, y) for the simplicity of presentation. Two dimensional conduction in other orthogonal coordinate systems, such as cylindrical and polar coordinates, are straight forward. Finite Volume Equation The general form of two dimensional transient conduction equation in the Cartesian coordinate system is Following the procedures used to integrate one dimensional transient conduction equation, we integrate Eq.(1) over a control volume as shown in Figure 1. Integrating the second term, we have C T t = x (k T x )+ y (k T y )+S (1) 0 1 s n w e t t 0 1 s n w e t t P 0 1 s n w e P 1 P 0 P P 0 0 1 0 1 ( C T t ) dtdxdydz = C T t dt dxdydz = C T t dz dy dx = C( T -T ) t(1) = C (T -T ) t t t yx xy (2)
27
Embed
2-Dimensional Transient Conduction - Welcome — TTU …shan/numerical heat transfer note(ME4730_5730... · 2-Dimensional Transient Conduction _____ We have discussed basic finite
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
We have discussed basic finite volume methodology applied to 1-dimensional steady and
transient conduction. It was noted that steady state formulation is a special case of transient
formulation and that transient numerical model does not require any significant changes over the
steady state model.
When the temperature variation in a system under consideration is appreciable in more
than one space dimensions, conduction becomes multidimensional. Majority of our discussion in
extending 1-D formulation to multidimensional formulation will be limited to 2-D conduction in
Cartesian coordinates (x, y) for the simplicity of presentation. Two dimensional conduction in
other orthogonal coordinate systems, such as cylindrical and polar coordinates, are straight
forward.
Finite Volume Equation
The general form of two dimensional transient conduction equation in the Cartesian
coordinate system is
Following the procedures used to integrate one dimensional transient conduction equation, we
integrate Eq.(1) over a control volume as shown in Figure 1.
Integrating the second term, we have
CT
t=
x(k
T
x) +
y(k
T
y) + S
(1)
0
1
s
n
w
e
t
t
0
1
s
n
w
e
t
t
P0
1
s
n
w
eP1
P0
P P0
0
1
0
1
( CT
t) dtdxdydz = C
T
tdt dxdydz
= CT
tdz dy dx = C(
T - T) t(1)
= C (T - T )
tt
t y x
x y
(2)
2
Figure 1 Control volume in the x-y coordinate
Integrating the third term, we get
Finally, integrating the linearized source term, we obtain
0
1
0
1
0
1
t
t
0
1
s
n
w
e
0
1
s
n
w
e
t
t
s
n
e w e wt
t
eE P
e
wP W
w
x(k
T
x) dxdydzdt = dz d(k
T
x) dydt
(1) (kT
x) - (k
T
x) dydt = (1) (k
T
x) - (k
T
x) dt
= ( )( ) kT - T
( x )- k
T - T
( x )
= y
y t
(3)
0
1
t
t
0
1
w
e
s
n
nN P
n
sP S
sy(k
T
y) dydxdzdt = k
T - T
( y )- k
T - T
( y )
x t
(4)
0
1
t
t
0
1
s
n
w
e
C P C P P(S + S T) dxdydzdt = (S + S T ) x y t (5)
3
Collecting terms, we get a finite volume representation of Eq.(1):
where
and
In deriving these expressions, the fully implicit scheme is used to evaluate the average values
during a given time step t as discussed.
Inspection of Eq.(6) shows that temperature TP is influenced by temperatures in the
neighboring four control volumes, TE, TW, TN and TS plus temperature at the immediate previous
time level, T0. Extension of 1-D to 2-D formulation is simply to add influences coming from two
additional control volumes in the y-direction. All coefficients appearing in Eq.(6) are positive.
In evaluating interface conductivities at the north and south sides of control volume, we
employ the same method as discussed for the east and west interfaces.
xk+xk
ykk2=
)x(
yk=a
1i+j,i1i+,
j1i+,,
e
eE
ij
jij
(9a)
P P E E W W N N S Sa T = a T + a T + a T + a T + b (6)
Ee
e
Ww
w
a =k
( x ); a =
k
( x )
y y
(7a; 7b)
Nn
n
Ss
s
a =k
( y ); a =
k
( y )
x x
(7c; 7d)
P0
C P0
P0a =
C; b = S + a T
x y
tx y (7e; 7f)
P E W N S P0
Pa = a + a + a + a + a - S x y (7g)
4
Figure 2 Index notations in x-y coordinate
5
Tj+1,i • N
(n)
x
Tj,i-1 • W x Tj,i • P x Tj,i+1• E
(w) (e)
x (s)
j (y) Tj-1,i • S
I (x)
Figure 2 continued
and
Expressions for aW and aS are similar to Eq.(9a) and Eq.(9b), respectively.
Solution Method
If we write Eq.(6) for all i’s (2 i N+1) and j’s (2 j M+1) , there result in (N x
M) simultaneous equations for (N x M) unknowns. A direct solution of this large sparse matrix
could take considerable computing time. Since many conduction problems are inherently
nonlinear due to number of factors as discussed in previous chapter, many iteration are usually
needed before reaching a converged solution. Therefore direct solution of nonlinear problem
may require too excessive computing time and is not recommended.
yk+yk
xkk2=
)y(
xk=a
1j+i,ji,1
i,1,
n
nN
jj
ijij
(9b)
t
yxC=a=a
ji,,0,
0P
ijij
ij
(9c)
TaxS=b 0,
0,+iC ji, ijijjy (9d)
P E E N S P0
Pa = a + a + a + a + a - S i, j x yi j (9e)
6
An alternative method is to use an alternate-direction-implicit (ADI) method [1]. The
most common practice is to use TDMA to solve dependent variable along one direction of spatial
coordinate implicitly while treating the dependent variable in the remaining spatial coordinate
explicitly. Fig. 3 shows such an approach called "line-by line" method. In the first step (Fig.3a),
TDMA is used to solve temperatures along the x-direction implicitly while treating temperatures
in the adjacent y-direction as a part of source terms. Thus
Using the index notation, Eq.(10) can be expressed as
Eq.(11) is solved for all j’s (2 j M+1) sweeping in the y-direction (Fig. 3a). After
completing y-direction sweep, we may now treat y-direction implicitly (Fig.3b) to speed up the
convergence. That is
or, in index notation
for all i’s (2 i N+1) (x-direction sweep). Sweeping along the x- and y-direction continues
until the solution converges within a given time step. To bring a faster convergence, it is
recommended that sweeping should start from the boundaries where perturbations originate. In
this way, computation will bring the changes into the calculation domain faster resulting in a
faster convergence.
Boundary Conditions
Treatment of boundary conditions for 2-dimensional conduction is similar to those of 1-
dimensional conduction. In addition to boundary conditions at x=0 and x=L, boundary
conditions are needed at y=0 and y=H, where L and H are the length and height of 2-
dimensional domain. At the boundaries, either one of three boundary conditions, known
temperatures, known heat flux and periodic or combination of these conditions are to be
prescribed. Heat flux is in general nonlinear function of boundary temperature. Detailed
P P E E W W N*
N*
S S*a T = a T + a T + a T + a T + b (10)
d+Tc+Tb=Ta ,1,,1,,j ,, ijijijijijiij (11)
P P N N S S E*
E*
W*
W*a T = a T + a T + a T + a T + b (12)
d+Tc+Tb=Ta ,1,j-,1,j+j,,, ijiijiiijij (13)
7
discussions on the treatment of boundary conditions along the x-direction are presented
previously.
Figure 3 Line-by-line TDMA Solution Scheme
8
. Following the same procedures, we can treat boundary conditions along the y-direction.
If the boundary temperatures are known, boundary conditions are given by
T1,i= T0
TM+1,i = TH (14)
where T0 and TH are given boundary temperatures at y=0 and y=H, respectively at “i” in x-
direction.
If a boundary heat flux is given at y=0, as shown in Fig. 4, energy balance shows that
]qk
y[
2
1+T=T
"
,2
2i,21, y
i
i
(15)
where is the heat flux along y-direction at y=0.
y
T1,i T2,I T3,i
x
• • •
Figure 4 Energy balance at y=0
Similarly, at y=H, we have
where heat flux is positive if directed to the positive y-direction.
]qk
y[
2
1-T=T y
1,M+
1M+1,M+2,M+
i
ii (16)
9
Treatment of all nominal boundary conditions on the surface of 2-dimensional geometry
can be handled for all types of boundary conditions; known temperature, known heat flux and
periodic in both x- and y-directions.
Sometimes in the 2-dimensional conduction, one has to deal with internal boundary
conditions to handle the effects of islands as shown in Fig. 5. The temperatures of the interior
region or regions are known. This could happen if interior region carries fluid and has a very
large convective heat transfer coefficient such that temperature at the interface between the fluid
and the solid is equal to the fluid temperature. We do not break up the calculation domain into
many regions and treat the effects of island as nominal boundary for the divided calculation
domains. Using the concept of interfacial conductivity and source term linearization, we can
handle islands very effectively [1]. We let the conductivity of the island be very large so as to
ensure temperature in the island prevails all the way to the interface between the island and the
control volumes adjacent to it. Next let the linearlized source term be represented by
where Tisland is the temperature of the island region.
If the temperature at the interface between the fluid and solid is different from the fluid
temperature, Eq.(17) can not be used. This is the case when the convective coefficient is
moderate and the temperature at the interface is different from the fluid temperature. A more
general treatment of such cases is presented in a later chapter [4].
Figure 5 Island region with known temperatures
Other 2-D Orthogonal Coordinate Systems
C20
island P20S = 10 T and S = -10 (17)
10
Three-dimensional transient conduction equation in the cylindrical coordinate is given by
where r is the radial, z, axial and , angular coordinate, respectively as shown in Fig. 6.
Axisymmetric Conduction
First consider a 2-D conduction for the axisymmetric case. For this case, temperature
variation is independent of angular angle () and Eq.(18) reduces to
Figure 6 Cylindrical coordinate system
Finite volume representation of Eq.(19) can be obtained by integrating the equation about
a control volume as defined in Fig. 7. This is left as an exercise. The resulting finite volume
equation is
where
CT
t=
1
r r(rk
T
r) +
1
r(k
1
r
T) +
z(k
T
z) + S
(18)
CT
t=
1
r r(rk
T
r) +
z(k
T
z) + S
(19)
P P E E W W N N S Sa T = a T + a T + a T + a T + b (20)
11
)z(
rk=a;
)z(
rk=a
w
Pw
W
e
Pe
E
rr (21a,b)
)r(
rk=a;
)r(
rk=a
s
ssS
n
nnN
zz (21c,d)
t
zrrp
C=a
0P
(21e)
zrrp S-a+a+a+a+a=a P0PSNWEP (21f)
and
Ta+S=b 0P
0PC zrrp (21g)
Comparing the finite volume equations of axisymmetric case and those of Cartesian
coordinate case, we observe the difference is due to geometry of control volume as shown in
Fig. 8. With some modifications in evaluating diffusion conductance and source term, therefore,
we can treat both situations similar way.
Figure 7 Control volume in axisymmetric case
12
Figure 8 Comparison of control volumes in x-y and z-r coordinates
Two dimensional conduction program for the axisymmetric case can be obtained from a
2-dimensional Cartesian program by noting the difference in the control volume shapes.
Polar Coordinate
In the polar coordinate, Eq.(18) reduces to
Integrating Eq.(22) over a control volume as shown in Fig. 9 we obtain
where
S+)T
r
1(k
r
1+)
r
T(rk
rr
1=
t
TC
(22)
P P E E W W N N S Sa T = a T + a T + a T + a T + b (23)
)r(
rk=a;
)r(
rk=a
w
wwW
e
eeE
(24a,b)
)(
k=a;
)(
k=a
s
s
S
n
nN
pp r
r
r
r (24c,d)
13
t
rrp
C=a
0P (24e)
rrS-a+a+a+a+a=a PP0PSNWEP (24f)
and
In these expressions, angles are in radians.
Again we observe that minor changes in the coefficients and source terms due to the
geometry change are all needed to modify the program written for the Cartesian coordinate
system. A general-purpose 2-dimensional transient as well as steady conduction program that can
be used for all three coordinate systems can be created.
One additional consideration is needed for the boundary condition in the polar coordinate.
The conduction flux along the -direction in the polar coordinate is
Taking energy balance at the fictitious control volume (Fig.10) at =0, we have
Solving for T1,i, we have
Likewise at =max , we have
Ta+S=b 0P
0PC rrp (24g)
T
r-=Jk
(25)
)+(2
1
T-Tk=J=q=q
21
1,,2
,2ondc
p
ii
i
r
(26)
q
k2
1+T=T
2,
2
2,1,
i
p
ii
r (27)
q
k2
1-T=T
1,M+
1M+
1,M+2,M+
i
p
ii
r (28)
14
Again heat flux along the positive angular direction is taken positive heat flux.
Figure 9 Control volume in polar coordinate
Figure 10 Energy balance at the boundary (=0)
15
General Purpose 2-D Conduction Program
A general purpose 2-dimensional conduction program (cond2d.m) that can handle three
orthogonal geometries is created by extending cond1d.m, that is the general purpose program
created in previous section. Extension of cond1d.m to cond2d.m is straightforward. Cond2d.m
has the same structure and follows the same logic in handling boundary conditions and solution
schemes. No new additional ideas are required. Listing of cond2d.m is shown below and
functions associated with the following example is in webpage.
Familiarity with cond2d.m can be best obtained by applying the program to few example
problems.
Listing of cond2d.m %cond2d.m %transient, 2-dimensional conduction (thickness is assumed to be 1) %,nonuniform condutivity and sources. Finite volume formulation %using matlab program. (By Dr. S. Han, Feb 15, 2007). modified on May 2012. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %functions called in main program % function grid2d_modified % function inital2d % function propty2d % function boundy2d_modified % function source2d % function solve2d_modified (function tdma or ctdma is called in this
x=z,y=r), % geo=3 (polar ,x=r,y=theta (in radian)) % clear all close all clc %specify the geometry geo=3; %specified cyclic boundary or not %x-direction. 0=non periodic, 1=periodic iperiodic=0; %y-direction. 0=non-periodic, 1=periodic jperiodic=0; %specify the number of control volumes n=10;%number of control volumes in x-direction m=10;%number of control volumes in y-direction np1=n+1; np2=n+2; np3=n+3;
16
mp1=m+1; mp2=m+2; mp3=m+3; maxiter=100;%maximum iteration number %assign time step and maximum time tstop=2500; %time to stop calculation dt=1.0e10; %time increment, dt=1.0e10 for steady state calculation only mwrite=0; %time iteration to print the results. If dt>tstop set mwrite=0 re=1;%relaxation coefficient %define calculation domain (problem dependent) [x,y,dx,dy]=grid2d(geo,m,n,iperiodic,jperiodic); %prescribe intitial temperatures for all control volumes (problem dependent) [te,tep,te0]=inital2d(m,n); %%%%%%%%%%%%%%% %time loop begins here t=0;%starting time plotte=[te]; %save data for plot iwrite=1;%printout counter, iwrtie<mwrite means skip print out while t<tstop % calculation continues until t>tstop%%%%%%%%%%%%%%%OUTER LOOP %iteration for convergence in each time step iter=0; iflag=1; %iflag=1 means convergence is not met %iteration loop for the convergence while iflag==1 % end is at the end of program ***************INNER LOOP %prescribe thermal conductivity, density and specific heat (problem %dependent) [tk,ro,cp]=propty2d(m,n); %prescribe boundary temperature (problem dependent) [te,bx0,qx0c,qx0p,qx0,bx1,qx1c,qx1p,qx1,... by0,qy0c,qy0p,qy0,by1,qy1c,qy1p,qy1]=boundy2d(geo,te,tk,dx,dy,m,n,t,dt); %evaluate sourec terms (problem dependent) [sp,sc]=source2d(geo,te,m,n,x,dx,y,dy,t); %evaluate the coefficients and source and solve equations by function tdma %or ctdma (THIS FUNCTION NEED NOT BE CHANGED !!!!) [te,qx0,qx1,qy0,qy1]=solve2d(geo,x,dx,y,dy,tk,te,tep,te0,ro,cp,dt,m,n,sp,sc,r
e,...
bx0,qx0c,qx0p,qx0,bx1,qx1c,qx1p,qx1,by0,qy0c,qy0p,qy0,by1,qy1c,qy1p,qy1); %check the convergence(DO NOT CHANGE!!) [iflag,iter,tep]=convcheck2d(te,tep,m,n,iter); if iter>maxiter break %if iteration goes beyond maximum set iteration number stop the
computation end end % this end goes with the while iflag==1 at the top************INNER LOOP %solution converged within time step or iter > maxiter %advance to the next time level t=t+dt; %increase time %reinitialize dependent variable for i=1:np2 for j=1:mp2 te0(j,i)=te(j,i);%new temperature becomes old temperature tep(j,i)=te0(j,i); end end %write the results at this time?
17
if iwrite>mwrite %print the results fprintf('iteration number is %i \n',iter) fprintf('time is %9.3f\n',t) % disp('temperatures are') % fprintf('%9.3f\n',te) iwrite=0; end iwrite=iwrite+1; end %this end goes with while t<tstop%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%OUTER LOOP %plot the result figure2d(geo,x,y,m,n,te);%2-D contour plot %additional calculations %energy balance qx_0=0; qx_1=0; qy_0=0; qy_1=0; for j=1:mp2 if geo==1 dae=dy(j); daw=dae; end if geo==2 dae=0.5*(y(j)+y(j+1))*dy(j); daw=dae; end if geo==3 dae=x(np3)*dy(j); daw=x(1)*dy(j); end qx_0=qx_0+qx0(j)*daw; qx_1=qx_1+qx1(j)*dae; end for i=1:np2 if geo==1 dan=dx(i); das=dan; end if geo==2 dan=y(mp3)*dx(i); das=y(1)*dx(i); end if geo==3 dan=dx(i); das=dan; end qy_0=qy_0+qy0(i)*das; qy_1=qy_1+qy1(i)*dan; end qin=-qy_1 qout=-qy_0-qx_0+qx_1