MATLAB Answers

x,y,z coordinates and temperature-slice plot

14 views (last 30 days)
Dipti on 1 Nov 2013
Commented: Michela Longhi on 12 Dec 2017
I am interested in visualising temperature or heat distribution with surface plot like slice.
I have a 3d box of my heat tranfer simulation having around 30,000 small particles inside it.For each particle I have x,y,z coordinates for its position and corresponding temperature. I obtained a text file from my simulation results having four columns for my data, containing -"x" "y" "z" "temperature".
x,y,z coordinates vary in range from 0 to 7 and temperature varies from 0 to 1000 Kelvin. Out of these particles some are heated and very high in temperature and some have relatively low temperature. I am able to draw a 3d-scatter plot from these x,y,z and I am coloring them with my temperature value.
=scatter3(x,y,z,s,temperature) colorbar
So it shows hot particles as red colored.
But scatter plot is not good enough to see the heat transfer or temperature distribution in my case(due to many particles).I want to see heat transfer from hot to cold particles.I searched for some prevoius matlab answers for such questions but its not working here. I am intersted in plotting with x,y,z and coloring with temperature. I want to visualise this as a slice or suitable surface plot so that I can see inside of the dense box and ultimately heat transfer.


Wouter on 1 Nov 2013
You could create an interpolation function of the original data using scatteredInterp: interpolation_fnc = scatteredInterp(x,y,z,temperature); % takes a while!
And then find the values of temperature at a specific slice using:
[xn,yn,zn] = meshgrid(1:100,1:100,0) % slice at z=0; make sure that this xn,yn and zn are located INSIDE your original data
temperature_values_interpolated = interpolation_fnc(xn,yn,zn);
Dipti on 8 Nov 2013
Thanks,Wouter.This helps somewhat. But I am still searching the method which will help in this case by averaging and not by interpolating.
Michela Longhi
Michela Longhi on 12 Dec 2017
Dear Dipti,
how do you draw a 3d-scatter plot from these x,y,z and colored them with my temperature value?

Sign in to comment.

Answers (0)

Sign in to answer this question.

Translated by