need help for plotting of data
Mostrar comentarios más antiguos
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
2 comentarios
KSSV
el 13 de En. de 2021
REad about pcolor and Surf.
shantanu lanke
el 15 de En. de 2021
Respuesta aceptada
Más respuestas (1)
Deniz Savas
el 13 de En. de 2021
0 votos
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 comentarios
Deniz Savas
el 13 de En. de 2021
I ran your simulation.
Here are some pictures from my visualization app.

Deniz Savas
el 13 de En. de 2021

Deniz Savas
el 13 de En. de 2021
Is this the sort of visualization you are looking for ?
There is also an option to animate these graphs
shantanu lanke
el 15 de En. de 2021
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
