0% found this document useful (0 votes)
45 views10 pages

Counter Current Heat Exchanger

Counter current heat exchanger.
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)
45 views10 pages

Counter Current Heat Exchanger

Counter current heat exchanger.
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/ 10

Solution of Partial Differential Equations 359

8.3 UNSTEADY-STATE COUNTERCURRENT


HEAT EXCHANGER: IMPLICIT
CENTERED-DIFFERENCE PROBLEM

The system to be considered is the dynamnic response of a countercurrent


plug-low heat exchanger as shown in Figure 8.6.

T.(z=0) V', Te-L)

Tg-0)' ,v V', TË-L)

Figure 8.6: Countercurrent Heat Exchanger.

We are interested in computing the dynamic response of the axial


temperature profile for both the tube-side (superscript t) and the shell
side (superscript s) fluids to a step change in the inlet tube temperature,
T"(z = 0).
The energy balance on the tube side gives

8t = P(T° -T') (8.3.1)


where
p=US/pA (8.3.2)
and
T = tube-side temperature
Ts = shell-side temperature
V= tube-side velocity
U overall heat-transfer coefficient
S = inside perimeter of inner pipe
A'= cross-sectional area available for flow on tube side
The energy balance on the shell side gives
OTS
= P"(T'-T") (8.3.3)
where
P= US/A (8.3.4)
Copyrighted material
362 Computational Methods for Process Simulation

To+ fT, (Ti + Ti)


Ii+1,0|
T'
-a'Ti+1,0
i+1,1
a'bcdt TS
i+1,1 fTi+ f4T;, ¢TË, - aTh1
abcds 6T +f2Tiy - (T+T)
a'bcd T+12 f:T + f4Ti; cT;
a°b°c°ds TË12
fT+ fTintl -b (T, + Tin+1)
fsTi, + faTint1 - c°Tn
a'b'cd
ab°c° d
T.i+1,19
a'b'at T it1,19| fT9 + f.Ti0 b(T20 + T.20)
abc LT1,20 -d'Ii120
LsT,19 + f4Ti20 cT9 d'T1.20J
Figure 8.8: Matrix Formulation.

Notice that all the nonzero entries in the matrix are grouped around
the diagonal elements. In fact., we have no more than two elements on
either side of the diagonal for this problem. In order to solve for the
unknown time level temperatures, this matrix must be inverted. Very
efficient algorithms have been developed for the solution of linear alge
braic equations with band type matrices (Von Rosenberg, 1969).
Consider the set of simultaneous equations of the form

A(J, M)XJ-M+ A(J, M-1)XJ-(M-1)


++A(J, 2)XJ-2tA(J,1)XJ-1
+B(J)XJ +C(J, 1)X,41 +C(J, 2)XJ42
++C(J, M)XJ-M = D(J) (8.3.9)

where each A(J, K) is a vector of coefficients to the left of the diagonal of


length egqual to the number of unknowns, N; B(J) is a vector of diagonal
coefficients of length N; and C(J, K) is a vector of coefficients to the right
of the diagonal of length N. The maximum value of K is M, which is
the maximum number of nonzero entries either to the left or right of the
diagonal element.
For our countercurrent heat-exchanger problem, M=2, and Figure
8.9 gives the entries for each of the A. B, and C vectors.
The band algorithm proceeds in a straightforward fashion according
to the following equations for J = 1,...,N, where N = the number of
Copyrighted matcrnal
364 Computational Methods for Process Simulation

Figure 8.10 gives MATLAB m-file Band.m for implementing the band al
gorithm. An alternative formulation of the problem is possible in MAT
LAB. Rather than using the band algorithm directly, we can use the
sparse matrix capability of MATLAB. The matrix to be inverted can be
defined and stored in the sparse or band format (see Chapter 2, section
2.2.3.3). This option is particularly efficient in MATLAB.
Using the sparse matrix formulation, the shell and tube temperatures
for all distance grid points are computed for an unknown time level, t
+ At. This procedure is continued until enough time steps are taken so
that a steady-state condition is reached. A MATLAB program ex83.m
(Figure 8.11) has been developed to solve this problem. The dynamic
response results for this countercurrent heat exchanger are shown in Fig
ure 8.12. It should be noted that some numerical oscillations are present
on the shell side. This is due to not matching the convective flow on this
side but using the nearest neighbor assumption (Eqn. (8.3.6)).
Figure 8.10: m-file Band.
function x = band (a,b,c,d,n,m)
% This file implements the band inversion algorithm
%
W = zeros (n,m) ;
al = zeros (n ,m);
beta = zeros (n,1);
gam = zeros(n,1);
for J = 1:n
for IK = 1:m
K = (m+1) - IK;
sum = 0;
KP1 = K+1;
if ((K+1) -m) <= 0;
for IP = KP1:m
JLP = J-IP;
MPK = IP -K;
if (IP - J) < 0;
sum = sum +al(J,IP) *(JLP,MPK);
else
end
end
else
al(J,K) = a(J,K) -sum;
end
end

% Computation of Beta
%
Sum = 0:
for IP = 1:m
JLP = J - IP;
if JLP> 0
Copyrighted material
Solution of Partial Diferential Equations 365

sum+al (J ,IP) *w (JLP, IP);


else
end
end
beta(J) = b(J) - sum;
if beta(J) 0
beta(J)
else
end

% Computation of w
for K = 1:m
sum = 0:
IK = K+1;
if (m-IK) >= 0
for IP = IK:m
IMK = IP - K;
JLPMK = J - IMK;
if (J-IMK) > 0
sum = sumtal(J,IMK) * w(JLPMK, IP);
else
end
end
else
w(J,K) = (c(J,K) - sum) /beta(J);
end
end

%Computation of gam
sum = 0:
for IP = 1:m
JLP = J-IP;
if (IP-J) < 0
sum = sumtal(J,IP) * gam(JLP);
else
end
end
gam(J) = (d(J) - sum)/beta(J);
end

%Computation of solution vector


for IJ = 1:n
J= n+1-IJ;
sum = 0;
for IP = 1:m
JPP J +IP;
if (n-JPP) >= 0
sum = sumt w(J,IP) *z(JPP);
else
end

Copyrighted material
366 Computational Methods for Process Simulation

end
x(J) = gam(J) Sum;
end

Figure 8.11: MATLAB file ex83.m which uses the sparse


matrix formulation to solve for heat exchanger dynamics.
2 This program uses implicit centered-difference technique to solve the
% unsteady-state countercurrent heat exchanger problem in section 8.3.

global Pt Ps Vt Vs;
% simulation parameters

Pt = 0.2; Ps = 0.6; % no values specified in the book


Vt = 2.5; Vs = 8; % these numbers are assumed
L =10; % length of the heat exchanger
N = 20; % number of grid points
delta_x = L/N; % divide the distance grid into N element s .
delta_t =delta_x/Vt;
time = 20; % simulation time in minutes
iteration = time/delta_t;
% solve for the initial steady state temperature profile. In order to
%get temp, values on the N distance grid points, integration is
. divided into N small steps.
%Note that the initial steady state problem is a split boundary value
%problem and superposition technique is used.
%generate one particular solution:
%
x0 = 0.0; x£ = L;
Tp0 = [45 50]';
for i = 2:1:N+1,
xf = x0 + delta_x;
[xp, Tp] = ode45 (' Model83', x0, xf, Tp0, 1.e-8, 1);
Tpt (i) Tp(length (Tp),1);
Tps(i) = Tp(length (Tp) ,2);
x(i) = xp (length (xp));
Tp0 = [Tpt (i) Tps (i)]';
x0 = xf;
end
x(1) = 0;
Tpt (1) = 45;
Tps (1) = 50;
%plot (x, Tpt, - , x, Tps, -.);
%title('Particular Solut ion ):
%pause;
% generate two homogene ous solutions. In this special case, the
% different ial equations used for the particular solution and
7, homogeneous solutions are the same, which is defined in Model83.m.

Copyrighted matcrial
Solution of Partial Differential Equations 367

x0 = 0.0; x£ = L;
Th10 = [45 0]';
for i = 2:1:N+1,
xf = x0 + delta_x;
[xh1, Th1] = ode45(' Model83', x0, xf, Th10, 1.e-8, 1);
Th1t(i) = Th1(1length(Th1),1);
This(i) = Th1(length (Th1) ,2);
x(i) =xh1 (length(xh1));
Th10 = [Thit (i) This(i)]';
x0 = xf;
end
x(1) = 0;
Thit (1) =45;
This(1) = 0;
plot (x, Thit, -) x, Thls, -. ');
%title('Homogeneous Solution#1);
%pause;
x0 = 0.0; xf L;
Th20 = [O 50];
for i = 2:1:N+1,
xf x0 + delta_x;
[xh2, Th2] = ode45(' Model83, xo, xf, Th20, 1.e-8, 1);
Th2t (i) Th2 (length (Th2),1);
Th2s(i) - Th2(length (Th2) ,2);
x(i) = xh2 (length (xh2) );
Th20 = [Th2t (i) Th2s (i)];
x0 = xf;
end
x(1) = 0;
Th2t (1) = 0;
Th2s(1) = 50;
%plot (x, Th2t, - , x, Th2s, -.');
%title('Homogeneous Solution#2);
%pause;
% solve linear equation set to get the constants that satisfy the real
% boundary conditions .
A = [Th1t (1) Th2t (1);
This (N+1) Th2s (N+1)];

B= [45-Tpt (1) 75-Tps (N+1)] ';


const =A\B;

% compose the final solution.


Tt (1,:) = Tpt t const (1) *Thít + const (2) *Th2t;
Ts(1,:) = Tps + const (1) *Thls + const (2)*Th2s;
plot (x, Tt(1,:));

Copyrighted matcrial
Solution of Partial Differential Equations 369

V8 = v7;
r9 =[37 37 37 37 38 38 38 38 39 39 39 40 40 40];
c9 =[36 37 38 39 36 37 38 39 38 39 40 38 39 40]:
v9 =[at bt ct dt as bs cs ds at bt ct as bs cs];
r (r1 r2 r3 r4 r5 r6 r7 r8 r9];
c =[c1 c2 c3 c4 c5 c6 c7 c8 c9]:
v =[v1 v2 v22 v3 v4 v5 vÓ v7 v8 v9];
aa = sparse (r, c,v,40,40);
% define B.C.2:
%
Ttnew = 35;

% define B.C.3:
Tsold = 75;

% generate the right hand side vector


for j=1:iteration,
B(1) = f1*Tt (j,1) + f2*Tt(j,2) - bt* (Ts(j,1) +Ts (j,2)) - at*Ttnev;
B(2) = f3+Ts (j, 1) + f4*Ts(j,2) - cs«Tt(j,1);
B(3) = f1*Tt (j,2) + f2+Tt (j,3) - bt (Ts(j,2) +Ts (j,3));
B(4) = f3+Ts (j,2) + f4*Ts(#,3) - cs+Tt (j,2);
for k=3:2:37,
B(k) = f1+Tt (j, (k+1) /2) + 12+Tt(j,(k+1) /2+1)
- bt*(Ts(j, (k+1)/2) +Ts (j, (k+1) /2+1));
B(k+1) = f3*Ts (j, (k+1)/2) + f4*Ts(j, (k+1)/2+1) - cs+Tt (j, (k+1) /2);
end

B(39) = fi*Tt (j ,20) + f2+Tt (j, 21) - bt*(Ts (j,21)+Tsold) - dt*Tsold;


B(40) = f3*Ts (j,20) + f4*Ts (j,21) - ds*Tsold - cs+Tt(j,20);
% generate the solution vector
TT = aa\B;

% update the right hand side


Tt (j+1,1) = 35;
for m=1:N,
Tt (j+1, n+1) = TT (2*m);
Ts (j+1,m) = TT(2*m-1);
end
Ts (j+1,m+1) = 75;
end

for n=1:5:iteration+1
plot (x, Tt (n,:));
hold on;
end

Copyrighted matcrial
Solution of Partial Differential Equations 371

Dynamic Response of Tube Side to Step Disturbance


60

F)
(degree
L 55
Temperature
50
Water
Side 46
Tube

40

355 1 2 3 5 7 8 10
Length (ft)
Figure 8.12a: Dynamic Response of Countercurrent Heat
Exchange: Tube Side.

Dynamic Response of Shell Side to Step Disturbance


76

F) 74
(degree
72
Temperature
70

68}
Water
Side66
Shell
g64

60

58
1 2 3 5 6 8 10
Length (t)
Figure 8.12b: Dynamic Response of Countercurrent Heat
Exchange: Shell Side.

Copyrighted matcrial
Solution of Partial Diferential Equations 373

x=0 X=L

T, is the initial rod temperature


T, is the new rod temperature at x = 0

Figure 8.14: Heat Conduction in Rod.

Applying the microscopic energy balance to this system gives


a2T
(8.5.1)
with boundary conditions
T(z,0) = T, (8.5.2)
T(0,t) = T (8.5.3)
T(L,t) = T, (8.5.4)
This being a diffusive system or a parabolic partial differential equa
tion, we apply the Crank-Nicolson finite difference analogs to equation
(8.5.1) and obtain
T41,n - Tin =a(ita+1 +Tin+) 2T;+1,n -27;n +Ti+1n-1 +Iin-l
At 2(Tn+1 Tn)?
(8.5.5)
Figure 8.13 shows the finite-difference grid for this heat-transfer prob
lem. We divide the distance grid into 20 elements. The At size is chosen
so that Ar"/At = a. When the rod temperature is specified via the
boundary condition, solid black dots are indicated in Figure 8.15.
Putting n = 1andi= 0, we have two unknown temperatures Ti.1
and Ti2but just one algebraic relation. However, if we formulate the
entire set of relations for this new time level, we get 19 equations in
19 unknowns. Since the equations are linear, we can express this set of
equations in the matrix notation shown in Figure 8.16, where
1 adt
a=
2 Ar?
(8.5.6)
adt
b=1+ (8.5.7)
1 Qdt
C=
2 Ar2 (8.5.8)
Copyrightcd maternal
374 Computational Methods for Process Simulation

Crank-Nicolson Finite-Difference Point

At
-/+ 1
i

X =0 n-1 n nt1 X=L

Figure 8.15: Finite Difference Grid.

bc T; -aT, + dË
abc de
abc
T2
abc
T3

abc
abc
ab Ti9 d18
-cT20 + d19 J
Figure 8.16: Matrix for Unsteady-State Heat
Conduetion Simulation.

QAt\
dn =(1-)Tin- a(Tin-1 +Tin+1) (8.5.9)

The matrix of Figure 8.16 is a band matrix and the band algorithm
provides an efficient calculational sequence for solution. File ex85.m,
available on the world wide web, presents a MATLAB solution to the
problem. Figure 8.17 shows the dynamic response curves for this heat
conduction problem.

8.6 TECHNIQUES FOR PROBLEMS WITH


BOTH CONVECTIVE AND DIFFUSION
EFFECTS: THE STATE-VARIABLE
FORMULATION

Partial differential equations which contain both diffusive and convective


terms pose special problems for numerical solution via finite differencing.
The basic partial differential equation of interest is given by
Copyrighted material

You might also like