Professional Documents
Culture Documents
9
8
7
6
Temperature
5
4
3
2
1
0
-1
3
2.8
2.6
2.4
2.2
1.8
time
1.6
1.4
1.2
1.5
2.5
3.5
ylabel('time');
zlabel('Temperature');
One dimensional heat equation-finite difference method
1.5
Temperature
0.5
0
2
1.9
1.8
1.7
1.6
1.5
1.4
time
1.3
1.2
1.1
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
0.5
end
p=1;
for ti=1:3
figure(p)
surf(f,e,c(:,:,ti))
p=p+1;
title('Two dimensional heat equation-analytical method');
xlabel('X');
ylabel('Y');
zlabel('Temperature');
end
Two dimensional heat equation-analytical method
60
Temperature
50
40
30
20
10
0
5
4
3
2
Y
2
X
50
Temperature
40
30
20
10
0
5
4
3
2
1
40
Temperature
30
20
10
0
5
4
3
2
Y
2
X
end
figure(t)
surf(x,y,u(:,:,t))
end
title('Two dimensional heat equation-finite difference method');
xlabel('X');
ylabel('Y');
zlabel('Temperature');
Two dimensional heat equation-finite difference method
20
Temperature
15
10
5
0
4
3
2
1
Y
1
X
20
Temperature
15
10
5
0
4
3
2
1
0
20
Temperature
15
10
5
0
4
3
2
1
Y
1
X
20
Temperature
15
10
5
0
4
3
2
1
Y
Inference:
In analytical method, accurate and absolute results are obtained. If the model is complex and if it is
very difficult to obtain the model of the system, then numerical method is preferred where
approximate results are sufficient.