How to write 2D heat conduction exact solution for Inf n?
Show older comments
Hi, I'm Currently going to perform numberical analysis with a Exact solution of the 2-D heat conduction equation.

That, H is y-grid length, L is x-grid Length, T1 is bottom Temperature. I try to write code like this.
However, the figure in the code is wrong and the figure I want is as follows.

how can i derive that equations? Thank you for your reply.
clc;
clear;
close all;
%% grid input
xnum = 51;
ynum = 101;
%% Given Data
xmax = 1; % L
ymax = 2; % H
T1 = 100; % bottom Temperature
T2 = 0;
T3 = 0;
T4 = 0;
%% Data
dx = xmax/(xnum-1);
dy = ymax/(ynum-1);
beta = dx/dy;
alpha = -2*(1+beta^2);
k = 1;
%% Boundary Condition
T = zeros(xnum,ynum,k); % Initial Condition Temperature = 0
for i = 1:1:xnum
T(i,1,1) = T1;
T(i,ynum,1) = T3;
end
for j = 2:1:ynum-1
T(1,j,1) = T2;
T(xnum,j,1) = T4;
end
% Calcultae T = T_1 * [2*sum( f(sinh) )]
for j = 2 : 1: ynum-1
for i = 1 : 1 : xnum
for n = 1 : 1 : 100
T(i,j) = T(i,j) + 2*T1*(1 -(-1)^n)/(n*pi) * sinh(n*pi*(ymax-j*dy)/1) / sinh(n*pi*ymax/1) * sinh(n*pi*i*dx);
end
end
end
figure(1)
contourf(T(:,:,1));
% contourf(T(:,:,1),'ShowText','on');
hold on;
view(90,270);
grid on
hold on
axis('equal')
xticks([1 0.25*(ynum-1)+1 0.5*(ynum-1)+1 0.75*(ynum-1)+1 ynum])
xticklabels({'0','0.5','1','1.5','2'})
yticks([1 0.5*(xnum-1)+1 xnum])
yticklabels({'0','0.5','1'})
xlabel('y [ ft ]')
ylabel('x [ ft ]')
colormap jet
colorbar
1 Comment
Torsten
on 5 Jun 2023
I doubt your formula to compute T is correct.
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
