1D dimensional transient heat transfer model
2 次查看(过去 30 天)
显示 更早的评论
I am using the implicit method to solve T=[A]^-1[B]. So far I have a code that displays the intial temperatures for 11 nodes. For example, node 10 is 61.51 degrees C after 30 seconds. However, how do I update the code to determine the temperature distribution after 1 hour. I need to find T0-T10. I know I need a for loop. Somehow I need to update the B matrix inside the for-loop so that it changes as time increases.
n= 120; %number of iterations
t=0;
dt=30; %change in time [seconds]
tmax=3600;
A=[-230,50,0,0,0,0,0,0,0,0,0;
50,-460,50,0,0,0,0,0,0,0,0;
0,50,-460,50,0,0,0,0,0,0,0;
0,0,50,-460,50,0,0,0,0,0,0;
0,0,0,50,-460,50,0,0,0,0,0;
0,0,0,0,50,-460,50,0,0,0,0;
0,0,0,0,0,50,-460,50,0,0,0;
0,0,0,0,0,0,50,-460,50,0,0;
0,0,0,0,0,0,0,50,-460,50,0;
0,0,0,0,0,0,0,0,50,-460,50;
0,0,0,0,0,0,0,0,0,50,-330];
rows=11;
B=[-14400;-28800;-28800;-28800;-28800;-28800;-28800;-28800;-28800;-28800;-16400];
%initial
%initial
for i=1:n
T = A\B (:,:);
end
disp (T)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Heat and Mass Transfer 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!