You are on page 1of 3

Untitledc Page 1 of 3

% Name mebrahtu kidanu id eitm/pr068/10


clear all
clc
% solve for steady problem using direct matrix method
%--------------------------------------------------------------
% first write the matrix of the equasiotns
A=[1,-.2,0,0,0,-0.05,0,0,0,0,0,0,0,0;-0.2,1,-0.2,0,0,0,-0.1,0,0,0,0,0,0,0;
0,-0.2,1.2,-0.1,0,0,0,-0.15,0,0,0,0,0,0;0,0,-0.1,1.4,-0.1,0,0,0,-0.2,0,0,0,0,0;
0,0,0,-0.2,1.4,0,0,0,0,-0.2,0,0,0,0;-0.05,0,0,0,0,1.5,-0.4,0,0,0,-0.05,0,0,0;
0,-0.1,0,0,0,0.-0.4,1,-0.4,0,0,0,-0.1,0,0;0,0,-0.15,0,0,0,-0.4,0.9,-0.2,0,0,0,0,0;
0,0,0,-0.2,0,0,0,-0.2,0.8,-0.2,0,0,0,0;0,0,0,0,-0.5,0,0,0,-0.4,0.8,0,0,0,0;
0,0,0,0,0,-0.05,0,0,0,0,1.5,-0.4,-0.05,0;0,0,0,0,0,0,-0.1,0,0,0,-0.4,1,0,-0.1;
0,0,0,0,0,0,0,0,0,0,-0.2,0,1.5,-0.4;0,0,0,0,0,0,0,0,0,0,0,-0.2,-0.4,1] % this is the stif
fness matrix in kJ/deg.cel
% this is the temperature to find
Q=[15;10;15;20;20;20;0;75;100;100;20;200;20;200] %This value amount of heat in kJ
% for simple analysis convert matrix A to its inverse
C=inv(A)
T=C*Q %this is the nodal temperature temperature as T=[T1;T2;T3;T4;T5;T6;T7;T8;T9;T10;T11;T12
;T13;T14]

A =

Columns 1 through 7

1.0000 -0.2000 0 0 0 -0.0500 0


-0.2000 1.0000 -0.2000 0 0 0 -0.1000
0 -0.2000 1.2000 -0.1000 0 0 0
0 0 -0.1000 1.4000 -0.1000 0 0
0 0 0 -0.2000 1.4000 0 0
-0.0500 0 0 0 0 1.5000 -0.4000
0 -0.1000 0 0 0 -0.4000 1.0000
0 0 -0.1500 0 0 0 -0.4000
0 0 0 -0.2000 0 0 0
0 0 0 0 -0.5000 0 0
0 0 0 0 0 -0.0500 0
0 0 0 0 0 0 -0.1000
0 0 0 0 0 0 0
0 0 0 0 0 0 0

Columns 8 through 14

0 0 0 0 0 0 0
0 0 0 0 0 0 0
-0.1500 0 0 0 0 0 0
0 -0.2000 0 0 0 0 0
0 0 -0.2000 0 0 0 0
0 0 0 -0.0500 0 0 0
-0.4000 0 0 0 -0.1000 0 0
0.9000 -0.2000 0 0 0 0 0
-0.2000 0.8000 -0.2000 0 0 0 0
0 -0.4000 0.8000 0 0 0 0
0 0 0 1.5000 -0.4000 -0.0500 0

file:///C:/Users/mebrye/Documents/MATLAB/html/Untitledc.html 18/06/2018
Untitledc Page 2 of 3

0 0 0 -0.4000 1.0000 0 -0.1000


0 0 0 -0.2000 0 1.5000 -0.4000
0 0 0 0 -0.2000 -0.4000 1.0000

Q =

15
10
15
20
20
20
0
75
100
100
20
200
20
200

C =

Columns 1 through 7

1.0472 0.2236 0.0420 0.0049 0.0015 0.0503 0.0572


0.2236 1.1036 0.2014 0.0213 0.0059 0.0572 0.1857
0.0420 0.2014 0.9018 0.0793 0.0150 0.0352 0.1263
0.0048 0.0210 0.0788 0.7689 0.0856 0.0117 0.0431
0.0017 0.0067 0.0195 0.1419 0.8123 0.0066 0.0245
0.0503 0.0573 0.0353 0.0122 0.0069 0.7768 0.4014
0.0572 0.1858 0.1264 0.0450 0.0257 0.4014 1.4904
0.0350 0.1257 0.2267 0.0936 0.0551 0.1979 0.7338
0.0117 0.0431 0.0907 0.2718 0.1852 0.0611 0.2263
0.0069 0.0257 0.0575 0.2246 0.6003 0.0347 0.1285
0.0037 0.0079 0.0053 0.0019 0.0011 0.0418 0.0615
0.0074 0.0223 0.0151 0.0054 0.0031 0.0584 0.1780
0.0010 0.0025 0.0017 0.0006 0.0003 0.0097 0.0198
0.0019 0.0055 0.0037 0.0013 0.0008 0.0156 0.0435

Columns 8 through 14

0.0350 0.0116 0.0033 0.0037 0.0074 0.0004 0.0009


0.1256 0.0428 0.0122 0.0080 0.0223 0.0010 0.0026
0.2263 0.0895 0.0261 0.0053 0.0151 0.0006 0.0018
0.0895 0.2575 0.0858 0.0018 0.0051 0.0002 0.0006
0.0523 0.1715 0.2459 0.0010 0.0029 0.0001 0.0003
0.1978 0.0610 0.0170 0.0419 0.0583 0.0033 0.0072
0.7338 0.2262 0.0630 0.0619 0.1780 0.0076 0.0208
1.5832 0.4870 0.1355 0.0305 0.0876 0.0038 0.0103
0.4873 1.6719 0.4643 0.0094 0.0270 0.0012 0.0032
0.2763 0.9431 1.6359 0.0053 0.0153 0.0007 0.0018
0.0303 0.0093 0.0026 0.7581 0.3188 0.0378 0.0470
0.0876 0.0270 0.0075 0.3211 1.1735 0.0470 0.1362
0.0098 0.0030 0.0008 0.1323 0.1176 0.7547 0.3137

file:///C:/Users/mebrye/Documents/MATLAB/html/Untitledc.html 18/06/2018
Untitledc Page 3 of 3

0.0214 0.0066 0.0018 0.1172 0.2818 0.3113 1.1527

T =

25.5574
39.1836
50.7855
61.0149
65.9428
54.4137
139.1503
213.3622
268.7404
300.5844
93.6510
281.2155
105.3936
298.4005

Published with MATLAB® R2013a

file:///C:/Users/mebrye/Documents/MATLAB/html/Untitledc.html 18/06/2018

You might also like