Finite difference temperature distribution with TDMA

24 views (last 30 days)
A stainless steel (thermal conductivity, k = 20 W/mK) fin has a circular cross-sectional area (diameter, D=4 cm) and length L=16 cm. The wing is attached to a wall with a temperature of 200C. The ambient temperature of the fluid surrounding the fin is 20C and the heat transfer coefficient is h=10 W/m2K. Fin tip is insulated. Determine the following by applying finite differences with TDMA.
1. Temperatures inside the fin and the amount of heat radiated from the fin. Plot the temperature distribution.
2. Discuss the effect of the number of element dimensions for N = 5, 10, 50, and 100. Plot the temperature distribution.
The temperature distribution from the analitic solution is like this: T1=150.54, T2=111.107, T3=78.671, T4=50.741, T5=25.172, my code does not give these values.
clear all
L=0.16; %lenght
N=6; %number of nodes
dx=L/(N-1); %lenght between nodes
Tb=200; %the wall temperature (boundary condition)
k=6; %number of iterations
for j=1:1:k
T(5,1)=T(7,1); %the second boundary condition due to the isulation on the tip of the fin
for i=2:1:N
T(i,1)=(T(i+1,1)+T(i-1,1)+1.536)/2.0768; %FDE narrowed down
hold on
hold off
If I can get some help with my code.
Cubii4 on 30 Nov 2022
Thank you very much I really appreciated Your help. Can you write it as an answer so I can accept it.

Sign in to comment.

Accepted Answer

Torsten on 30 Nov 2022
Moved: Torsten on 30 Nov 2022
You solve the system iteratively. But you were told to solve it with the Thomas-Algorithm. So apply this algorithm to the matrix A below.
k = 20;
T_inf = 20;
h = 10;
D = 0.04;
L = 0.16;
T_at_wall = 200;
N = 6;
dL = L/(N-1);
A = zeros(N+1);
b = zeros(N+1,1);
A(1,1) = 1.0;
b(1) = T_at_wall;
for i = 2:N
A(i,i-1) = k/dL^2;
A(i,i) = -(2*k/dL^2 + 4/D*h);
A(i,i+1) = k/dL^2;
b(i) = -4/D*h*T_inf;
A(N+1,N-1) = -1.0;
A(N+1,N+1) = 1.0;
b(N+1) = 0;
T = A\b;
T = T(1:N)
T = 6×1
200.0000 171.3794 150.5095 136.3216 128.0894 125.3914

More Answers (0)




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by