Plotting Temperature profile as a function of x,y and z.
Show older comments
Hello,
I have a temperature function, which is a function of all 3 co-ordinates x,y and z. It is just one equation which iterates in for loops. But I am unable to plot this temperature function in 3D space.
I would really appreciate some help with the plotting aspect. I don't know how exactly to use isosurface or slicing even though I went through a couple of questions posted here.
Thanks in advance!
%Properties of the system
eta = 0.5;
P = 200;
v = 0.1;
k = 42.7;
d = 0.0038;
rho = 7850;
Cp = 477;
T0 = 300;
fileID = fopen('myfile.txt','w');
Q=eta*P/v;
alpha = k/Cp;
for t = 1:1:100
for x = 1:1:10
for y = 1:1:10
for z = 1:1:10
psi = x - v*t;
R = sqrt(psi^2 + y^2 + z^2);
T(:) = (Q/(2*pi*k*d))*exp(-v*psi/(2*alpha))*exp(-(v*R)/(2*alpha))/R + T0;
fprintf('%f\n', T)
fprintf(fileID,'%d\t%d\t%d\t%f\n',x,y,z,T);
end % z loop end
fprintf(fileID,'\n');
end % y loop end
fprintf(fileID,'\n');
end % x loop end
fprintf(fileID,'\n');
end % t loop end
Accepted Answer
More Answers (0)
Categories
Find more on Scalar Volume Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!