Question

1- Temperature distribution in a part of a heat exchanger in the steady state condition should be determined. The part is shown in Figure-l has a thermal conductivity of k-25W/m.K and dimensions and boundary conditions are specified in Figure-1 and Figure-2 respectively Develop a computer code to find the temperature distribution in the part (use Δ-Δ-1 mm). Under operating conditions for which ho-1000 W/m2K, T-o-1 700 K. h= 200 W/m2 K, and T 400 K. Also, at what location is the temperature a maximum? 5mm 2mm 3mm 2mm Figure-I. Dimensions


Please post with matlab code asap!

0 0
Add a comment Improve this question Transcribed image text
Answer #1
clear all
close all
%Specify grid size
Nx = 10;
Ny = 10;
%Specify boundary conditions
Tbottom = 100
Ttop = 150
Tleft = 250
Tright = 300
% initialize coefficient matrix and constant vector with zeros
A = zeros(Nx*Ny);
C = zeros(Nx*Ny,1);
% initial 'guess' for temperature distribution
T(1:Nx*Ny,1) = 100;
% Build coefficient matrix and constant vector
% inner nodes
for n = 2:(Ny-1)
for m = 2:(Nx-1)
i = (n-1)*Nx + m;
A(i,i+Nx) = 1;
A(i,i-Nx) = 1;
A(i,i+1) = 1;
A(i,i-1) = 1;
A(i,i) = -4;
end
end
% Edge nodes
% bottom
for m = 2:(Nx-1)
%n = 1
i = m;
A(i,i+Nx) = 1;
A(i,i+1) = 1;
A(i,i-1) = 1;
A(i,i) = -4;
C(i) = -Tbottom;
end
%top:
for m = 2:(Nx-1)
% n = Ny
i = (Ny-1)*Nx + m;
A(i,i-Nx) = 1;
A(i,i+1) = 1;
A(i,i-1) = 1;
A(i,i) = -4;
C(i) = -Ttop;
end
%left:
for n=2:(Ny-1)
%m = 1
i = (n-1)*Nx + 1;
A(i,i+Nx) = 1;
A(i,i+1) = 1;
A(i,i-Nx) = 1;
A(i,i) = -4;
end
%right:
for n=2:(Ny-1)
%m = Nx
i = (n-1)*Nx + Nx;
A(i,i+Nx) = 1;
A(i,i-1) = 1;
A(i,i-Nx) = 1;
A(i,i) = -4;
C(i) = -Tright;
end
% Corners
%bottom left (i=1):
i=1;
A(i,Nx+i) = 1;
A(i,2) = 1;
A(i,1) = -4;
C(i) = -(Tbottom + Tleft);
%bottom right:
i = Nx;
A(i,i+Nx) = 1;
A(i,i-1) = 1;
A(i,i) = -4;
C(i) = -(Tbottom + Tright);
%top left:
i = (Ny-1)*Nx + 1;
A(i,i+1) = 1;
A(i,i) = -4;   
A(i,i-Nx) = 1;
C(i) = -(Ttop + Tleft);
%top right:
i = Nx*Ny;
A(i,i-1) = 1;
A(i,i) = -4;
A(i,i-Nx) = 1;
C(i) = -(Tright + Ttop);
%Solve using Gauss-Seidel
residual = 100;
iterations = 0;
while (residual > 0.0001) % The residual criterion is 0.0001 in this example
% You can test different values
iterations = iterations+1;
%Transfer the previously computed temperatures to an array Told
Told = T;
%Update estimate of the temperature distribution
for n=1:Ny
for m=1:Nx
i = (n-1)*Nx + m;
Told(i) = T(i);
end
end
% iterate through all of the equations
for n=1:Ny
for m=1:Nx
i = (n-1)*Nx + m;
%sum the terms based on updated temperatures
sum1 = 0;
for j=1:i-1
sum1 = sum1 + A(i,j)*T(j);
end
%sum the terms based on temperatures not yet updated
sum2 = 0;
for j=i+1:Nx*Ny
sum2 = sum2 + A(i,j)*Told(j);
end
% update the temperature for the current node
T(i) = (1/A(i,i)) * (C(i) - sum1 - sum2);
end
end
residual = max(T(i) - Told(i));
end
%compute residual
deltaT = abs(T - Told);
residual = max(deltaT);
iterations; % report the number of iterations that were executed
%Now transform T into 2-D network so it can be plotted.
delta_x = 0.03/(Nx+1);
delta_y = 0.03/(Ny+1);
for n=1:Ny
for m=1:Nx
i = (n-1)*Nx + m;
T2d(m,n) = T(i);
x(m) = m*delta_x;
y(n) = n*delta_y;
end
end
T2d;
surf(x,y,T2d)
figure
contour(x,y,T2d)
Add a comment
Know the answer?
Add Answer to:
Please post with matlab code asap! 1- Temperature distribution in a part of a heat exchanger...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • You will need to use program like Matlab. The upper and lower sides of the rectangular aluminum block(L-10mm, D-3mm)...

    You will need to use program like Matlab. The upper and lower sides of the rectangular aluminum block(L-10mm, D-3mm) are insulated as shown below. The left and right sides have temperature boundary conditions and convective boundary conditions, respectively. Surface temperature T 100 C, Outside te Heat transfer coefficent h 120W/(m2k) mperatureT -20 C Alumium thermal conductivity K-220 W ( Specific heat C-896J/ (kg K) k), density p 2707kg/m3, Assuming the aluminum block is a two-dimensional shape, calculate the temperature on...

  • Write a code in MATLAB to solve for part a. Hint: ? = (1/4) ∑ ?(neighbors)...

    Write a code in MATLAB to solve for part a. Hint: ? = (1/4) ∑ ?(neighbors) + (?̇ ∆?∆?)/4k A long conducting rod of rectangular cross section (20 mm x 30 mm) and thermal conductivity k= 20 W/m.K experiences uniform heat generation at a rate 9 = 5 x 107W/m², while its surfaces are main- tained at 300 K. (a) Using a finite-difference method with a grid spac- ing of 5 mm, determine the temperature distribution in the rod.

  • Help me!! Please solve (1) and (2). And I desperately want to know how to solve (2) by using MATLAB. Please teach me Ma...

    Help me!! Please solve (1) and (2). And I desperately want to know how to solve (2) by using MATLAB. Please teach me Matlab code in detail. a rectangular shape Aluminum block (L=10mm, D=3mm) has well insulated top and bottom. The left surface has thermal boundary condition, and the right surface has convection boundary condition. * the surface temperature Ts=100℃, the ambient air temperature Ta=20℃, heat transfer coefficient h=120 W/(m^2*K) * thermal conductivity of Aluminum = 220 W/m*K, density of...

  • The wall of a liquid-to-gas heat exchanger has a surface area on the liquid side of...

    The wall of a liquid-to-gas heat exchanger has a surface area on the liquid side of 1.8 m2 (0.6 m * 3.0 m) with a heat transfer coefficient of 255 W/m2K. On the other side of the heat exchanger wall a gas flows, and the wall has 96 thin rectangular steel fins 0.5 cm thick and 1.25 cm high (k = 3 W/m K) as shown in the figure below. The fins are 3 m long and the heat transfer...

  • The wall of a liquid-to-gas heat exchanger has a surface area on the liquid side of...

    The wall of a liquid-to-gas heat exchanger has a surface area on the liquid side of 1.8 m2 (0.6 m 3.0 m) with a heat transfer coefficient of 255 W/m2K. On the other side of the heat exchanger wall a gas flows, and the wall has 96 thin rectangular steel fins 0.5 cm thick and 1.25 cm high (k = 3 W/m K) as shown in the figure below. The fins are 3 m long and the heat transfer coefficient...

  • Problem 2(30 points) Consider the steady-state temperature distribution in a square plate with dimensions 2 m...

    Problem 2(30 points) Consider the steady-state temperature distribution in a square plate with dimensions 2 m x 2 m. There is a heat generation of ġ(x.y)=6x [W/my], and the thermal conductivity of k=1[W/(m-°C)]. The temperature on the top boundary is given by a piecewise function, f(x), which is defined below. x(4- x²)+10 0<x<1 | x(4- x?) + 20, 1<x<2 The bottom boundary is insulated. The temperatures on left-handed and right-handed boundary are maintained at constants 10[°C] and 20 [°C] as...

  • The heat exchanger in a heat lung machine is constructed so that blood flows through an...

    The heat exchanger in a heat lung machine is constructed so that blood flows through an array of tubes controlled temperature water circulated through an outer exterior shell. e heat exchanger in a heat lung machine is constructed so that blood flows through an array of tubes with controlled temperature water circulated through an outer exterior shell. Although the temperature of the blood varies as it passed through the heat exchanger, during the cool down cycle when a patient is...

  • Question 11 (15 points) The wall of a liquid-to-gas heat exchanger has a surface area on...

    Question 11 (15 points) The wall of a liquid-to-gas heat exchanger has a surface area on the liquid side of 1.8 m2 (0.6 m * 3.0 m) with a heat transfer coefficient of 255 W/m2 K. On the other side of the heat exchanger wall a gas flows, and the wall has 96 thin rectangular steel fins 0.5 cm thick and 1.25 cm high (k = 3 W/m K) as shown in the figure below. The fins are 3 m...

  • The wall of a heat exchanger separates hot water at Tin 90 C with h." 80 w/m2.K from cold water a...

    The wall of a heat exchanger separates hot water at Tin 90 C with h." 80 w/m2.K from cold water at Tout 10 C with h,ut 60 W/m2.K. The thermal conductivity of the heat exchanger is 180 W/m.K To extend the heat transfer area, two-dimensional ridges are machined on the cold side of the wall. This geometry causes non-uniform thermal stresses, which may become critical for crack initiation along the lines between two ridges. To predict thermal stresses, the temperature...

  • The upper and lower sides of the rectangular aluminum block L-10mm, D 3mm) are insulated as shown below. The left and r...

    The upper and lower sides of the rectangular aluminum block L-10mm, D 3mm) are insulated as shown below. The left and right sides have temperature boundary conditions and convective boundary conditions, respectively Surface temperature T 100 C, Outside temperature T-20 C Heat transfer coefficent h 120W/(m2 k) Alumium thermal conductivity K-220 W/(m k), density p-2707kg/m Specific heat C896J/(kg K) Assuming the aluminum block is a two-dimensional shape, calculate the temperature on the plane(x-y) as follows. 1) Calculate the temperature of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT