0% found this document useful (0 votes)
58 views25 pages

Single and Two Phase Thermal Hydraulics

The document contains lecture notes for a course on single and two-phase thermal hydraulics. It provides an overview of basic exercises on 1D transient heat conduction in a flat plate with imposed surface temperatures. It presents the partial differential equation that describes this physical problem and discusses how it can be discretized using finite differences or finite elements. A MATLAB routine is also presented for numerically solving the discretized equations to determine the temperature distribution over time.

Uploaded by

bertolo92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views25 pages

Single and Two Phase Thermal Hydraulics

The document contains lecture notes for a course on single and two-phase thermal hydraulics. It provides an overview of basic exercises on 1D transient heat conduction in a flat plate with imposed surface temperatures. It presents the partial differential equation that describes this physical problem and discusses how it can be discretized using finite differences or finite elements. A MATLAB routine is also presented for numerically solving the discretized equations to determine the temperature distribution over time.

Uploaded by

bertolo92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Lecture Notes for the Course on

SINGLE AND TWO-PHASE THERMAL-HYDRAULICS

Prof. Walter AMBROSINI


University of Pisa, Italy

Unit E1 – Basic Exercises on Heat Conduction

NOTICE: This material was personally prepared by Prof. Ambrosini specifically for this Course and is freely
distributed to its attendees or to anyone else requesting it. It has not the worth of a textbook and it is not intended to be
an official publication. It was conceived as the notes that the teacher himself would take of his own lectures in the
paradoxical case he could be both teacher and student at the same time (sometimes space and time stretch and fold in
strange ways). It is also used as slides to be projected during lectures to assure a minimum of uniform, constant quality
lecturing, regardless of the teacher’s good and bad days. As such, the material contains reference to classical textbooks
and material whose direct reading is warmly recommended to students in the Course Outline for a more accurate
understanding. In the attempt to make these notes as original as feasible and reasonable, considering their purely
educational purpose, most of the material has been completely re-interpreted in the teacher’s own view and personal
preferences about notation. In this effort, errors in details may have been introduced which will be promptly corrected
in further versions after discovery. Requests of clarification, suggestions, complaints or even sharp judgements in
relation to this material can be directly addressed to Prof. Ambrosini at the e-mail address:
[email protected] .

Basic Exercises – Heat Conduction 1/25


Basic Exercises – Heat Conduction 2/25
1D TRANSIENT HEAT CONDUCTION
IN A FLAT PLATE
WITH IMPOSED SURFACE TEMPERATURES

The partial differential problem is:

 1 ∂T ∂ 2T
 = 2
 α ∂ t ∂x
T ( 0, t ) = T
 f0
T ( s, t ) = T
 fs

T ( x,0 ) = Tin

This is discretised by the following relationships

o finite differences:
Tmn +1 − Tmn  Tmn−+11 − 2Tmn +1 + Tmn++11 Tmn−1 − 2Tmn + Tmn+1 
= α β + (1 − β ) 
∆t  ∆ x 2
∆x 2 
o finite elements:
1 ∆Tmn−+11 2 ∆Tmn +1 1 ∆Tmn++11  Tmn−+11 − 2Tmn +1 + Tmn++11 Tmn−1 − 2Tmn + Tmn+1 
+ + = α β + (1 − β ) 
6 ∆t 3 ∆t 6 ∆t  ∆x 2 ∆x 2 
In both cases, β = 0 represents an “explicit discretisation”
in time, β = 1 represents an “implicit discretisation” in time
and β = 0.5 represents a “Crank-Nicolson discretization” in
time.
In a compact form both methods can be written as:
ξ (Tmn−+11 − Tmn−1 ) + [1 − 2ξ ] (Tmn +1 − Tmn ) + ξ (Tmn++11 − Tmn+1 )
 T n +1 − 2Tmn +1 + Tmn++11 Tmn−1 − 2Tmn + Tmn+1 
= α  β m −1 + (1 − β )  ∆t
 ∆ x 2
∆ x 2

with ξ = 0 for finite differences and ξ = 1 6 for finite elements.

Basic Exercises – Heat Conduction 3/25


It is:
α ∆t
ξ Tmn−+11 + [1 − 2ξ ]Tmn +1 + ξ Tmn++11 − β
∆x 2 (T n +1
m −1 − 2Tmn +1 + Tmn++11 )

α∆t
= ξ Tmn−1 + [1 − 2ξ ] Tmn + ξ Tmn+1 + (1 − β )
∆x 2 (T n
m −1 − 2Tmn + Tmn+1 )

and then
 α∆t  n +1  α∆t  n +1  α∆t  n +1
ξ − β 2  Tm −1 + [1 − 2ξ ] + 2 β 2  Tm + ξ − β 2  Tm +1
 ∆x   ∆x   ∆x 
α ∆t
= ξ Tmn−1 + [1 − 2ξ ] Tmn + ξ Tmn+1 + (1 − β ) 2 (Tmn−1 − 2Tmn + Tmn+1 )
∆x
This has the form of a three point formula, i.e., a linear system
with tridiagonal matrix, e.g.:

 v1 w1 0 0 0 0 0 0   T1   S1 

u v2 w2 0 0 0 0 0  T2   
S
 2     2
0 u3 v3 w3 0 0 0 0  T3   S3 
     

0 0 u4 v4 w4 0 0 0  T4  S
 4
⋅ =
0 0 0 u5 v5 w5 0 0  T5  S 
5
     
0 0 0 0 u6 v6 w6 0  T6   S6 
0 0 0 0 0 u7 v7 w7  T7  S 
7
     
 0 0 0 0 0 0 u8 v8  T8   S8 
 

that can be solved by a variant of the Gaussian elimination method,


the so-called Three-Diagonal Matrix Algorithm (TDMA) or Thomas
Algorithm
1. for increasing index:
w1 wi
α1 = αi = (i = 2, ..., N − 1)
v1 v i − u i α i −1
S1 S i − u i β i −1
β1 = βi = (i = 2, ..., N )
v1 vi − u i α i −1
2. for decreasing index:
TN = β N Ti = βi − α iTi +1

Basic Exercises – Heat Conduction 4/25


A MATLAB ROUTINE
function PlaneTrans
% Program for heat conduction within a plate
clc, clear;
%
% Lettura dati di ingresso
%
% Thermal Conductivity [W/(mK)]
k=15;
% Volumetric Heat Capacity [J/(kgK)]
rhocp=4.3e6;
% Thickness of the plate [m]
alx=0.1;
% Number of Internal Nodes
nx=100;
% Time advancement Step[s]
dt=0.1;
% Interactive Input
imeth=input('Choose the solution method: 1-Finite Difference, 2-Finite Elements
');
beta=input('Choose the time discretisation: 0.-explicit; 1.-implicit, 0.5-Crank
Nicolson ');
ntime=input('Number of Time Steps ');
%
t0=input('Initial Temperature Value [°C]');
tleft=input('Left surface temperature value [°C] ');
tright=input('Right surface temperature value [°C] ');
%
dx=alx/(nx+1);
alpha=k/rhocp;
fo=alpha*dt/(dx*dx);
%
%
if (imeth==1)
xi=0.;
elseif (imeth==2)
xi=1./6.;
else
disp('Undefined Numerical Method ');
end
%
% Definition of coordinates and initial temperatures
%
x(1)=0.;
x(nx+2)=alx;
for i=2:nx+1
x(i)=(i-1)*dx;
t(i)=t0;
end
%
% Vectors a,b,c,d are assigned
%
a(1:nx+2)=xi-beta*fo;
b(1:nx+2)=1. -2.*xi + 2.*beta*fo;
c(1:nx+2)=xi-beta*fo;
d(1:nx+2)=0.;
alef(1:nx+2)=0.;
bet(1:nx+2)=0.;
%
% Time advancement Cycle

Basic Exercises – Heat Conduction 5/25


%
time=0.;
t(1)=tleft;
t(nx+2)=tright;
%
for itime=1:ntime
%
% Plotting temperature
%
plot(x,t)
xlabel('x [m]')
ylabel('Temperature [°C]')
title(sprintf('Time = %10.2f ',time) );
pause(0.0001);
time=time+dt;
%
for i=2:nx+1
oldsum=(1.-beta)*fo*( t(i-1)-2.*t(i)+t(i+1) );
d(i)= xi*t(i-1) + (1-2.*xi)*t(i) + xi*t(i+1) + oldsum;
end
%
d(2)=d(2)-a(1)*t(1);
d(nx+1)=d(nx+1)-a(nx+2)*t(nx+2);
%
% Solution of the tridiagonal system
%
ub=1.d00/b(2);
alef(2)=c(2)*ub;
bet(2)=d(2)*ub;
%
for i=3:nx+1
l=i-1;
qz=b(i)-a(i)*alef(l);
uqz=1.d00/qz;
alef(i)=c(i)*uqz;
bet(i)=(d(i)-a(i)*bet(l))*uqz;
end
%
t(nx+1)=bet(nx+1);
for i=1:nx-1
ii=nx+1-i;
l=ii+1;
t(ii)=bet(ii)-alef(ii)*t(l);
end
%
end

Basic Exercises – Heat Conduction 6/25


EXAMPLE OF STEADY-STATE
HEAT CONDUCTION

• Equations to discretise

div (k grad Τ) + S = 0 (1)


∂ T ∂ T
2 2
k  2 + 2 +S=0 (2)
 ∂x ∂y 
Basic choices:
♦ 2D square domain (x and y)

♦ finite difference discretisation according to the control

volume method
♦ discretisation increment equal to x and y

y
h =h =h
x y
i,j+1

i-1,j i,j i+1,j

i,j-1

x
The discretised form of (1) is expressed in the form:

+ incoming heat flux × lateral surface


- outcoming heat flux × lateral surface
+ volumetric source × node volume = 0

Basic Exercises – Heat Conduction 7/25


that is:

2 2 
Τi.j - Τi-½.j) + (Τ
- h k (Τ 
 Τi.j - Τi.j-½) 
 h h

2 2 

Τi+½.j - Τi.j) + (Τ
+ h k (Τ Τi.j+½ - Τi.j)  (3)
 h h
+ h2 Si.j = 0

(i = 2, ..., N-1) (j = 2, ..., N-1)

To eliminate the interfacial temperature, continuity of heat


fluxes is imposed. That it:
k k
Τ
- 2 (Τ - Τ ) = - 2 (Τ Τ -Τ ) (4)
h i+½.j i.j h i+1.j i+½.j
from which
Τi.j + Τi+1.j
Τi+½.j = (5)
2
and similar formulations for the other temperatures with
fractional index

From (3) it is:


i.j Τi.j = i.j Τi-1.j + i.j Τi+1.j + i.j Τi.j-1 + i.j Τi.j+1 + h2 Si.j (6)
where
i.j =k

i.j =k
(7)
i.j =k

i.j =k
and it is:
i.j = i.j + i.j + i.j + i.j =4k (8)

Basic Exercises – Heat Conduction 8/25


In the boundary nodes (i=1 o i=N o j=1 o j=N) from (3) we
impose a unique value of temperature, the previous
formulations can be used again, putting:

• i=1 i.j =2k T0.j = T0


• i=N i.j =2k T N+1.j = T0
(9)
• j=1 i.j =2k T i.0 = T0
• j=N i.j =2k T i.N+1 = T0
The factor 2 appearing in the previous equations is due to the
fact that the distance between the centre of a boundary node
and the boundary itself is h/2.
For instance, for i=1, it is:
5k Τ1.j = k Τ2.j + k Τ1.j-1 + k Τ1.j+1 +2k Τ0 + h2 S1.j
• Solution Methods:
1. Jacobi
(m+1) (m) (m) (m) (m)
i.j Τi.j = i.j Τi-1.j + i.j Τi+1.j + i.j Τi.j-1 + i.j Τi.j+1
+ h2 Si.j (1)
2. Gauss-Seidel
(m+1)
i.j Τi.j =
(m+1) (m) (m+1) (m)
i.j Τi-1.j + i.j Τi+1.j + i.j Τi.j-1 + i.j Τi.j+1 + h2 Si.j
(2)
3. SOR
(m+1)  (m+1) (m) (m)
Τi.j = ω Τi.j - Τi.j 
GS
+ Τi.j (3)

Basic Exercises – Heat Conduction 9/25


A MATLAB ROUTINE
function SquareSteady
% Program for solving 2D heat conduction in steady state conditions
clc, clear;
%
% Reading input data
%
k=input('Enter Thermal Conductivity W/(mK) ');
alx=input('Enter the lenght of the side alog x (m) ');
nx=input('Number of nodes along x ');
ny=input('Number of nodes along y ');
S0=input('Source in W/m3 ');
imeth=input('Solution method: 1-Jacobi, 2-GS, 3-SOR ');
omega=input('Enter omega (used only for SOR) ');
T0=input('Enter the value of temperature on the boundary ');
%
h=alx/nx;
%
% Assigning algebraic equation coefficiens
%
W(2:nx,1:ny) = k;
W(1,1:ny) = 2*k;
%
E(1:nx-1,1:ny) = k;
E(nx,1:ny) = 2*k;
%
S(1:nx,2:ny) = k;
S(1:nx,1) = 2*k;
%
N(1:nx,1:ny-1) = k;
N(1:nx,ny) = 2*k;
%
Sorg(1:nx,1:ny)=S0;
%
if (imeth==1)
[T,iter]=jaco(W,E,S,N,Sorg,h,T0,nx,ny);
elseif (imeth==2)
[T,iter]=gs(W,E,S,N,Sorg,h,T0,nx,ny);
elseif (imeth==3)
[T,iter]=sor(W,E,S,N,Sorg,h,T0,omega,nx,ny);
else
disp('Undefined Method');
end
%
% Nodal coordinate definition
%
for i=1:nx
x(i)=h/2+(i-1)*h;
end
for j=1:ny
y(j)=h/2+(j-1)*h;
end
%
disp('Number of iterations = '),iter
%
% Plotting a temperature surface
%
surf(x,y,T');
%
% Jacobi method
%

Basic Exercises – Heat Conduction 10/25


function [T,iter]=jaco(W,E,S,N,Sorg,h,T0,nx,ny);
nmaxit = 10000;
toll = 1.e-3;
T(1:nx,1:ny)=T0;
Told(1:nx,1:ny)=T0;
%
O=W+E+S+N;
%
% Iteration cycle
%
for iter = 1:nmaxit
%
for i= 1:nx
for j= 1:ny
T(i,j)= h * h * Sorg(i,j);
%
if (i==1)
T(i,j) = T(i,j) + W(i,j) * T0;
else
T(i,j) = T(i,j) + W(i,j) * Told(i-1,j);
end
%
if (i==nx)
T(i,j) = T(i,j) + E(i,j) * T0;
else
T(i,j) = T(i,j) + E(i,j) * Told(i+1,j);
end
%
if (j==1)
T(i,j) = T(i,j) + S(i,j) * T0;
else
T(i,j) = T(i,j) + S(i,j) * Told(i,j-1);
end
%
if (j==ny)
T(i,j) = T(i,j) + N(i,j) * T0;
else
T(i,j) = T(i,j) + N(i,j) * Told(i,j+1);
end
T(i,j) = T(i,j) / O(i,j);
end
end
Tdiff=T-Told;
error=norm(Tdiff,inf)
if (error<toll),return,end
Told=T;
end
%
%
% Gauss-Seidel Method
%
function [T,iter]=gs(W,E,S,N,Sorg,h,T0,nx,ny);
nmaxit = 10000;
toll = 1.e-3;
T(1:nx,1:ny)=T0;
Told(1:nx,1:ny)=T0;
%
O=W+E+S+N;
%
% Iteration Cycle
%
for iter = 1:nmaxit
%

Basic Exercises – Heat Conduction 11/25


for i= 1:nx
for j= 1:ny
T(i,j)= h * h * Sorg(i,j);
%
if (i==1)
T(i,j) = T(i,j) + W(i,j) * T0;
else
T(i,j) = T(i,j) + W(i,j) * T(i-1,j);
end
%
if (i==nx)
T(i,j) = T(i,j) + E(i,j) * T0;
else
T(i,j) = T(i,j) + E(i,j) * T(i+1,j);
end
%
if (j==1)
T(i,j) = T(i,j) + S(i,j) * T0;
else
T(i,j) = T(i,j) + S(i,j) * T(i,j-1);
end
%
if (j==ny)
T(i,j) = T(i,j) + N(i,j) * T0;
else
T(i,j) = T(i,j) + N(i,j) * T(i,j+1);
end
T(i,j) = T(i,j) / O(i,j);
end
end
Tdiff=T-Told;
error=norm(Tdiff,inf);
if (error<toll),return,end
Told=T;
end
%
%
% SOR Method
%
function [T,iter]=sor(W,E,S,N,Sorg,h,T0,omega,nx,ny);
nmaxit = 10000;
toll = 1.e-3;
T(1:nx,1:ny)=T0;
Told(1:nx,1:ny)=T0;
%
O=W+E+S+N;
%
% Iteration Cycle
%
for iter = 1:nmaxit
%
for i= 1:nx
for j= 1:ny
T(i,j)= h * h * Sorg(i,j);
%
if (i==1)
T(i,j) = T(i,j) + W(i,j) * T0;
else
T(i,j) = T(i,j) + W(i,j) * T(i-1,j);
end
%
if (i==nx)
T(i,j) = T(i,j) + E(i,j) * T0;

Basic Exercises – Heat Conduction 12/25


else
T(i,j) = T(i,j) + E(i,j) * T(i+1,j);
end
%
if (j==1)
T(i,j) = T(i,j) + S(i,j) * T0;
else
T(i,j) = T(i,j) + S(i,j) * T(i,j-1);
end
%
if (j==ny)
T(i,j) = T(i,j) + N(i,j) * T0;
else
T(i,j) = T(i,j) + N(i,j) * T(i,j+1);
end
T(i,j) = T(i,j) / O(i,j);
T(i,j) = Told(i,j) + omega * ( T(i,j) - Told(i,j) );
end
end
Tdiff=T-Told;
error=norm(Tdiff,inf);
if (error<toll),return,end
Told=T;
end

Basic Exercises – Heat Conduction 13/25


HEAT CONDUCTION IN A FUEL ROD
Statement of the problem
Fuel rods for LWRs but also for
T f ,max LMFBR and other reactor types are
made of cylindrical UO2 fuel pellets piled
T up inside cladding tubes with tolerances
T fo leaving a small gap between them.
Tci
Owing to the fission power
Tco
produced within the mass of the UO2,
Tcoolant thermal gradients are generated in it to
release this power to the coolant trough
the involved thermal resistances.
The figure shows a qualitative
R picture of the temperature distribution
fo
Rci
Rco
in the fuel rod, whose prediction is one
of the very basic abilities that a Nuclear
Engineer must achieve.
We will cope firstly with the steady-state problem and then we
will describe a procedure for the transient calculation of
temperature distribution under changing power and cooling
conditions.

Steady-state temperature distribution


Let us start considering heat conduction in the pellet. Since
UO2 has a conductivity strongly depending on the local
temperature, the heat conduction equation must be written as:
( ρC p ) fuel ∂∂Tt = ∇ ⋅ ( k fuel∇T ) + q′′′
Considering steady-state conditions in an elemental shell of a
cylindrical geometry

 dT   dT  d   dT 
q′′′2π rdr + 2π r  −k fuel = 2π r  −k fuel + 2π r − k   dr
 
 
dr  dr 
fuel
 dr    dr 
power generated
in the elemental shell heat flux at the inner surface heat flux at the outer surface
multiplied by the related area multiplied by the related area

Basic Exercises – Heat Conduction 14/25


It is therefore:
d   dT  d   dT 
q′′′2π rdr = 2π r  − k   dr ⇒ q′′′r = r  − k 
dr  dr  
fuel fuel
 dr  dr 
and then
1 d  dT 

r k fuel + q′′′ = 0 (°)
r dr  dr 
From the above, assuming a constant power in the pellet, it is:
d  dT  dT r2 dT r C
rk = − rq′′′ ⇒ r k fuel = − q′′′ + C1 ⇒ k fuel = −q′′′ + 1
dr  dr  dr 2 dr 2 r
It can be firstly noted that the constant C1 must be zero if
we require that the heat flux is limited at r = 0 .
It is therefore:
dT r
k fuel = − q′′′
dr 2
If conductivity is considered variable, we can write this
equation in the form:
r
k fuel dT = −q′′′ dr
2
Once the variables have been separated, we can integrate the
two sides of this equation in temperature and radial
coordinate
∫T f ,max k fuel dT = − ∫0 q′′′ dr = − q′′′∫ dr = −q′′′∫
2
T fo R fo r R fo r R fo r R fo
dr = − q′′′
2 0 2 0 2 4

∫T fo k fuel dT = q′′′ 4
T f ,max R 2fo
or
It is convenient to express the above relationship in terms of
linear power, considering that:
q′
q′′′π R 2fo = q′ ⇒ q′′′R 2fo =
π
thus leading to a well known relationship involving the
conductivity integral and the linear power
∫T fo
T f ,max q′
k fuel dT =

stating that the linear power determines the value of the
conductivity integral irrespective of the diameter of the pellet.
Basic Exercises – Heat Conduction 15/25
If the conductivity is assumed constant, e.g., equal to a
mean value, k fuel , the above relationship becomes:
q′
T f ,max − T fo =
4π k fuel
In this assumption of constant conductivity, the
temperature profile in the pellet can be calculated restarting
from eq. (°). It is:
1 d  dT  d  dT  q′′′ dT q′′′ r 2

r k fuel + q′′′ = 0 ⇒ r = − r ⇒ r =− + C1
r dr  dr  dr  dr  k fuel dr k fuel 2
dT q′′′ r C1
⇒ =− +
dr k fuel 2 r

and then
q′′′ r 2
T (r ) = − + C1 ln r + C2 (°°)
k fuel 4
The boundary conditions to be imposed are:
T ( 0 ) limited T ( R fo ) = T fo
obtaining
2
q′′′ R fo
C1 = 0 ( )
T R fo = T fo = −
k fuel 4
+ C2

2
q′′′ R fo
⇒ C2 = T fo +
k fuel 4
and finally
q′′′ R fo − r q′ R fo − r
2 2 2 2
T ( r ) = T fo + = T fo +
k fuel 4 4π k fuel R 2fo
showing that for constant power and thermal conductivity, the
temperature profile inside the pellets is parabolic.
As the gap is very thin, we can assume that, once an
effective gap conductivity, hgap , is known and the gap radius is
given, it is:
q′
(
q′′gap = hgap T fo − Tci =) 2π Rgap

Basic Exercises – Heat Conduction 16/25


and then
q′
T fo − Tci =
2π Rgap hgap

Then, in the cladding we can apply the previous


relationship (°°) with q′′′ = 0 :
T ( r ) = C1 ln r + C2
with the boundary conditions:
dT
−kclad 2π Rci = q′ and T ( Rci ) = Tci
dt r = Rci

It is:
dT C1 q′ q′
= =− ⇒ C1 = −
dr r = Rci Rci 2π Rci kclad 2π kclad
and then
q′ q′
T ( Rci ) = − ln Rci + C2 ⇒ C2 = T ( Rci ) + ln Rci
2π kclad 2π kclad
Finally
q′ q′
T (r ) = − ln r + T ( Rci ) + ln Rci
2π kclad 2π kclad
or
q′ R
T ( r ) = Tci + ln ci
2π kclad r
Therefore:
q′ R
Tci − Tco = ln co
2π kclad Rci
Finally, considering an heat transfer coefficient between
the cladding and the coolant, h , it is:
q′
h (Tco − Tcoolant ) = qco
′′ =
2π Rco
or
q′
Tco − Tcoolant =
2π Rco h

Basic Exercises – Heat Conduction 17/25


Therefore in the assumption of constant fuel conductivity
it is:
 1 1 ln ( Rco Rci ) 1 
T f ,max − Tcoolant = q′  + + + 


4π k fuel 2π Rgap hgap 2 π k clad 2π Rco h 

This shows a clear analogy between the 1st Ohm law,
applied to a series of resistances, where q′ replaces the current,
the overall ∆T replaces the voltage difference and each term in
the above summation represents a resistance.
As a manual exercise we will take appropriate values of
each involved constant and we will evaluate the maximum fuel
temperature, trying to evaluate the quantitative orders of
magnitude.

Transient behaviour
We will now try to set up a numerical algorithm suitable for
the transient analysis of the fuel rod.
We firstly subdivide the rod in axisymmetric shells (as in the
figure) centred on the coordinate
ri −1 2
ri +1 2 (
ri = ri −1 2 + ri +1 2 ) 2
A transient energy balance for each
shell is written between the time t n and
the time t n+1 , considering the change in
energy stored in the volume (per unit
height) Vi = π ( ri2+1 2 − ri2−1 2 ) , the heat flux
through the lateral surfaces (per unit
height) Ai±1 2 = 2π ri±1 2 and the volumetric
source. It is:
( ρC p )i ViTin+1 = ( ρC p )i ViTin + ( qi′′−1 2 ) ( )
n +1 n +1
Ai −1 2 ∆t − qi′′+1 2 Ai +1 2 ∆t + ( qi′′′) Vi ∆t
n

where the superscripts n and n + 1 denote values at time t n and


t n+1 . The choice to evaluate the heat fluxes at time t n+1 will lead
to an implicit discretisation.

Basic Exercises – Heat Conduction 18/25


We obtain:
( qi′′′)n
( ) ( )
n +1 Ai −1 2 n+1 Ai +1 2
Ti n+1 = Ti n + qi′′−1 2 ∆t − qi′′+1 2 ∆t + ∆t
( ρC p )i Vi ( ρC p )i Vi ( ρC p )i
For the heat fluxes at the interfaces we adopt the approximate
evaluation:
n +1
Ti n±1+12 − Ti
( qi′′±1 2 )
n +1 dT
= − ki ≈ −ki
dr ri ±1 2 ri ±1 2 − ri
In order to eliminate the interfacial temperature values, we
impose the continuity of heat flux at each interface between
nodes. For instance:
Ti n+1+12 − Ti n+1 Ti +n1+1 − Ti +n1+12
−ki = − ki +1
ri +1 2 − ri ri +1 − ri +1 2
and then:
ki
ri +1 2 −r
(T i
n+1
i +1 2 − Ti n+1 = ) ki +1
ri +1 − ri +1 2
(
Ti +n1+1 − Ti +n1+12 )
 ki ki +1   ki ki +1 
Ti +n1+12 =  Ti n+1 + Ti +n1+1   + 
r
 i +1 2
− ri ri +1 − ri +1 2 

r
 i +1 2
− ri ri +1 − ri +1 2 
Similarly:
 ki −1 ki   ki −1 ki 
Ti n−1+12 =  Ti −n1+1 + Ti n+1   + 
r
 i −1 2
− ri −1 ri − ri −1 2 

r
 i −1 2
− ri −1 ri − ri −1 2 
Introducing this expression in the relationships for heat fluxes,
it is:
( ) ( )
n +1 ki
qi′′−1 2 =− Ti n+1 − Ti −n1+12
ri − ri −1 2

ki   ki −1 ki   ki −1 ki 
n +1
=− Ti − Ti −n1+1 + Ti n+1   + 
ri − ri −1 2  r
 i −1 2
− ri −1 ri − ri −1 2 

r
 i −1 2
− ri −1 ri − ri −1 2  

ki
ri − ri −1 2  ki −1 ki 
n +1
 ki −1 ki 
=−  +  Ti − Ti −n1+1 + Ti n+1  
ki −1
+
ki 
r − ri −1 ri − ri −1 2  r − ri −1 ri − ri −1 2 

 i −1 2  i −1 2 
ri −1 2 − ri −1 ri − ri −1 2

Basic Exercises – Heat Conduction 19/25


and then
ki −1 ki
ri −1 2 − ri −1 ri − ri −1 2
( qi′′−1 2 )
n+1
=− T n+1 − T n+1 
 i i −1 
ki −1 ki
+
ri −1 2 − ri −1 ri − ri −1 2
putting
ki −1 ki
 k  ri −1 2 − ri −1 ri − ri −1 2
  =−
 ∆r i −1 2 ki −1
+
ki
ri −1 2 − ri −1 ri − ri −1 2
it is:
( qi′′−1 2 ) ( qi′′+1 2 )
n+1  k  n+1  k 
= − T n+1 − T n+1  = − T n+1 − T n+1 
  i i −1    i +1 
 ∆r i −1 2  ∆r i +1 2
i

The balance equation finally becomes:


Ti n +1  k
= Ti − 
n  Ai −1 2  k 
∆t Ti n+1 − Ti −n1+1  +  
Ai +1 2
∆t Ti+n1+1 − Tin +1  +
( qi′′′)n ∆t
( )  ∆r

i −1 2 ρ C p Vi
i
 ∆r i +1 2 ( ρC p )i Vi ( ρ C p )i
Finally, putting:
Wi =  ∆kr  Ai −1 2
∆t Ei =  ∆kr  Ai+1 2
∆t
 i −1 2 ( ρC p )i Vi  i +1 2 ( ρC p )i Vi
it is:
n +1
= Ti − W  n+1 − Ti−n1+1  + E  n +1 n +1  ( qi′′′)n
i Ti +1 − Ti + ∆t
n
Ti i Ti 
( ρ C p )i
or
( qi′′′)n
− W n +1
iTi −1 + (1 + Wi + Ei )Ti n+1
− E n +1
iTi +1 = Ti + n
∆t ( i = 2,…, N − 1)
( ρ C p )i
which represents a tridiagonal system of equations to be
solved by a well known algorithm (TDMA).
The above equation holds for “internal” shells. For the
first shell it is:
( q1′′′)n
( )
n+1 A3 2
T1n+1 = T1n − q3′′ 2 ∆t + ∆t
( ρC p )1 V1 ( ρ C p )1
as in the centreline the heat flux will be zero. Therefore, the
equation takes the form:
( q1′′′)n
(1 + E1 )T1n+1 − E1T2n+1 = T1n + ∆t
( ρ C p )1
Basic Exercises – Heat Conduction 20/25
For the N-th node, it is:
( q′′′N )n
( ) ( )
n +1 AN −1 2 n +1 AN +1 2
TNn+1 = TNn + q′′N −1 2 ∆t − q′′N +1 2 ∆t + ∆t
( ρ C p ) N VN ( ρ C p ) N VN ( ρC p )N
where it is:
TN +1 2 − TN
( q′′N +1 2 ) ( )
n +1
= −k N = hconv TN +1 2 − Tcoolant
rN +1 2 − rN
It is therefore:
kN
T + hconvTcoolant
rN +1 2 − rN N
TN +1 2 =
kN
hconv +
rN +1 2 − rN
and then
 kN 
r
TN + hconvTcoolant 

( )
n +1 N +1 2 r
q′′N +1 2 = hconv  − Tcoolant 
N
 kN 
h +


conv
rN +1 2 − rN 

kN
hconv
rN +1 2 − rN
=
kN
[TN − Tcoolant ]
hconv +
rN +1 2 − rN
Therefore, it is:
W ( qi′′′)n
− n +1
N TN −1 + (1 + WN + E ) n +1
N TN = Ti +
n
∆t + ENTcoolant
( ρC p ) i

with
kN
hconv
rN +1 2 − rN
EN =
AN +1 2
∆t
hconv +
kN ρ C p N NV ( )
rN +1 2 − rN

Basic Exercises – Heat Conduction 21/25


A MATLAB ROUTINE
function RodTrans
% Program for transient heat conduction in a nuclear fuel rod
clc, clear;
%
% Input data are assigned
%
% Rod dimensions [m]
rfo = 5.17e-3;
rci = 5.40e-3;
rco = 6.26e-3;
%
% Number of nodes in each region
nfuel = 50;
ngap = 10;
nclad = 10;
ntot = nfuel + ngap + nclad;
ntp1 = ntot + 1;
%
n1 = nfuel;
n2 = nfuel + ngap;
n3 = ntot;
%
% Material Thermal Conductivities [W/(mK)]
kfuel = 2.7;
kgap = 0.989;
kclad = 17.;
%
% Material Volumetric Heat Capacities [J/(m3K)]
rcfuel = 2.6e6;
rcgap = 5.0e4;
rcclad = 4.3e6;
%
% Space increments in the three regions
drfuel = rfo / nfuel;
drgap = ( rci - rfo ) / ngap;
drclad = ( rco - rci ) / nclad;
%
gpi = 4. * atan(1.)
%
% Interactive input
t0=input('Assign the initial temperature [°C] ');
dt=input('Assign the time step [s] ');
%
% Definition of coordinates and node parameters
%
r(1) = 0.;
ar(1) = 0.;
for i=2:ntp1
%
t(i-1) = t0;
%
if (i<=n1+1)
r(i) = r(i-1) + drfuel;
k(i-1) = kfuel;
rcp(i-1) = rcfuel;
elseif (i<=n2+1)
r(i) = r(i-1) + drgap;
k(i-1) = kgap;
rcp(i-1) = rcgap;

Basic Exercises – Heat Conduction 22/25


else
r(i) = r(i-1) + drclad;
k(i-1) = kclad;
rcp(i-1) = rcclad;
end
%
rm(i-1) = 0.5 * ( r(i) + r(i-1) );
ar(i) = 2. * gpi * r(i);
vol(i-1) = gpi * ( r(i)*r(i) - r(i-1)*r(i-1) );
end
%
% Loop for time advancement
%
% Auxiliary vectors are assigned (alef and bet)
%
alef(1:ntot)=0.;
bet(1:ntot)=0.;
%
time=0.;
tread=0.;
%
for itime=1:100000
if(time>=tread)
qprime=input('Assign the linear power [kW/m] ');
qthird = qprime * 1000. / ( gpi * rfo * rfo );
tcool=input('Assign the coolant temperature [°C] ');
hconv=input('Assign the convective HTC [W/(m2°C)] ');
tread=input('Assign the new break time [s] ');
for icool=1:10
tc(icool)=tcool;
rc(icool)=rco+1.e-4*(icool-1);
end
end
%
for i=1:ntot
%
if (i==1)
west(i) = 0.;
%
auxp1 = k(i) / ( r(i+1) - rm(i) );
auxp2 = k(i+1) / ( rm(i+1) - r(i+1) );
kovrp = auxp1 * auxp2 / ( auxp1 + auxp2 );
east(i) = kovrp * ar(i+1) * dt / ( rcp(i) * vol(i) );
%
a(i) = 0.;
b(i) = 1. + east(i);
c(i) = - east(i);
d(i) = t(i) + qthird / rcp(i) * dt;
% Fuel nodes
elseif (i<n1)
auxm1 = k(i-1) / ( r(i) - rm(i-1) );
auxm2 = k(i) / ( rm(i) - r(i) );
kovrm = auxm1 * auxm2 / ( auxm1 + auxm2 );
west(i) = kovrm * ar(i) * dt / ( rcp(i) * vol(i) );
%
auxp1 = k(i) / ( r(i+1) - rm(i) );
auxp2 = k(i+1) / ( rm(i+1) - r(i+1) );
kovrp = auxp1 * auxp2 / ( auxp1 + auxp2 );
east(i) = kovrp * ar(i+1) * dt / ( rcp(i) * vol(i) );
%
a(i) = - west(i);
b(i) = 1. + west(i) + east(i);
c(i) = - east(i);

Basic Exercises – Heat Conduction 23/25


d(i) = t(i) + qthird / rcp(i) * dt;
% Non-fuel nodes
elseif (i<=ntot-1)
auxm1 = k(i-1) / ( r(i) - rm(i-1) );
auxm2 = k(i) / ( rm(i) - r(i) );
kovrm = auxm1 * auxm2 / ( auxm1 + auxm2 );
west(i) = kovrm * ar(i) * dt / ( rcp(i) * vol(i) );
%
auxp1 = k(i) / ( r(i+1) - rm(i) );
auxp2 = k(i+1) / ( rm(i+1) - r(i+1) );
kovrp = auxp1 * auxp2 / ( auxp1 + auxp2 );
east(i) = kovrp * ar(i+1) * dt / ( rcp(i) * vol(i) );
%
a(i) = - west(i);
b(i) = 1. + west(i) + east(i);
c(i) = - east(i);
d(i) = t(i);
else
auxm1 = k(i-1) / ( r(i) - rm(i-1) );
auxm2 = k(i) / ( rm(i) - r(i) );
kovrm = auxm1 * auxm2 / ( auxm1 + auxm2 );
west(i) = kovrm * ar(i) * dt / ( rcp(i) * vol(i) );
%
auxp1 = k(i) / ( r(i+1) - rm(i) );
auxp2 = hconv;
kovrp = auxp1 * auxp2 / ( auxp1 + auxp2 );
east(i) = kovrp * ar(i+1) * dt / ( rcp(i) * vol(i) );
%
a(i) = - west(i);
b(i) = 1. + west(i) + east(i);
c(i) = 0.;
d(i) = t(i) + east(i) * tcool;
end
%
end
%
% A plot of temperature is generated
%
plot(rm(1:n1),t(1:n1),'r.',rm(n1+1:n2),t(n1+1:n2),'m.',rm(n2+1:ntot),t(n2+1:ntot
),'g.',rc(1:10),tc(1:10),'b.')
xlabel('Radius [m]')
ylabel('Temperature [°C]')
axis([0., 8.e-3, 200., 2300.])
title(sprintf('Time = %10.2f ',time) );
pause(0.0001);
%
time=time+dt;
%
% Solution of the tridiagonal matrix system
%
ub=1.d00/b(1);
alef(1)=c(1)*ub;
bet(1)=d(1)*ub;
%
for i=2:ntot
l=i-1;
qz=b(i)-a(i)*alef(l);
uqz=1.d00/qz;
alef(i)=c(i)*uqz;
bet(i)=(d(i)-a(i)*bet(l))*uqz;
end
%
nm1=ntot-1;

Basic Exercises – Heat Conduction 24/25


t(ntot)=bet(ntot);
for i=1:nm1
ii=ntot-i;
l=ii+1;
t(ii)=bet(ii)-alef(ii)*t(l);
end
%
end

Time = 49.90

2200

2000

1800

1600

1400
Temperature [°C]

1200

1000

800

600

400

200
0 1 2 3 4 5 6 7 8
Radius [m] -3
x 10

Basic Exercises – Heat Conduction 25/25

You might also like