1D dimensional transient heat transfer model

조회 수: 2 (최근 30일)
Lindsay Mau
Lindsay Mau 2020년 7월 29일
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개)

카테고리

Help CenterFile Exchange에서 Heat and Mass Transfer에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by