need help for plotting of data
古いコメントを表示
Below is 3d heat conduction equation code. The data is visible in excel format but i want to plot for better visualization and understanding.
can someone please help me with this any suggestions will do!
xlength = 0.173; % Width (m)
ylength = 0.125; % High (m)
zlength = 0.045;
nx = 10; % Number of nodes on the x axis
ny = 10; % Number of nodes on the y axis
nz = 10;
sx = nx-1; % Number of segments on the x axis
sy = ny-1; % Number of segments on the y axis
sz = nz-1;
deltax = xlength/sx; % uniform nodal spacing on the x-axis
deltay = ylength/sy;
deltaz = zlength/sz;
c=nx/2; % centre cell x-axis
v=ny/2; % centre cell y-axis
b=nz/2;
xspan = linspace(0,xlength,nx);
yspan = linspace(0,ylength,ny);
zspan = linspace(0,zlength,nz);
T = zeros(nx);
T(1,1:nx,1:nz) = 28; % Temperature at top surface
T(ny,1:nx,1:nz) = 28; % Temperature at bottom surface
T(1:ny,1,1:nz) = 26; %Temperature at left surface
T(1:ny,nx,1:nz) = 26;
T(1:ny,1:nx,1) = 26; % Temperature at right surface
T(1:ny,1:nx,nz) = 26;
cond = 0.2; % Thermal conductivity
qdot_gen = 7043; % heat flux generation
qdot_node = qdot_gen; % uniform heat flux generation
p=10000; % No of itteration
for h=1:1:p
for i = 2:nx-1
for j = 2:ny-1
for k = 2:nz-1
T(i,j,k) = 1/6*(T(i,j+1,k) + T(i+1,j,k) + T(i,j-1,k) + T(i-1,j,k) + T(i,j,k-1) + T(i,j,k+1));
for x=c
for y=v
for z=b
T(x,y) = 1/6*(T(x,y+1,z) + T(x+1,y,z) + T(x,y-1,z) + T(x-1,y,z) + T(x,y,z+1) + T(x,y,z-1) + qdot_node*deltax^2/cond);
end
end
end
end
end
end
end
採用された回答
その他の回答 (1 件)
Deniz Savas
2021 年 1 月 13 日
0 投票
Dear Shantanu,
I think I might have just the right tool for you.
After I study your code I shall provide you with further information.
Deniz
4 件のコメント
Deniz Savas
2021 年 1 月 13 日
I ran your simulation.
Here are some pictures from my visualization app.

Deniz Savas
2021 年 1 月 13 日

Deniz Savas
2021 年 1 月 13 日
Is this the sort of visualization you are looking for ?
There is also an option to animate these graphs
shantanu lanke
2021 年 1 月 15 日
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
