Académique Documents
Professionnel Documents
Culture Documents
ROLL NO:-10ME70P03
ASSIGNMENT:- Programme for 2-D heat conduction analytical solution & plotting the
graph
INPUT TO MATLAB
clc
a=1;
nx=10;
ny=10;
X=1;
Y=a
intx=X/nx
inty=a/ny
for i=1:1:(nx+1);
for j=1:1:(ny+1);
T(i,j)=0;
end
end
X=0;
Y=0;
for i=1:1:(nx+1);
Y=0
for j=1:1:(ny+1);
for n=1:1:100 ;
T(i,j)=T(i,j)+((2/pi)*(1-cos(n*pi))*sin(n*pi*X)*sinh(n*pi*Y))/(n*sinh(n*pi*a));
end
b(j)=Y
Y=Y+inty
end
d(i)=X
X=X+intx
end
contour(d,b,T.')
title(' Contours of theta = T/Tm for 2D Heat conduction in Rectangular Plate')
xlabel('X'),ylabel('Y'),grid on
OUTPUT