Ploting 3D flow data (4D plot)

조회 수: 10 (최근 30일)
Kamuran
Kamuran 2013년 4월 5일
Hi,
I will be doing CFD calculations with MATLAB in 3D. I have x,y,z coordinates and Temperature in each point. Assume I have 100 points in each direction I have 100*100*100 temperature points. I want to plot temperature (also make a movie) using color as the temperature intensity. Is there an easy way of doing it? I am not sure if scatter3 will work for me or not. ( I want to know if I need to invest time to learn paraview)
Thank you.
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 4월 5일
What is your display resolution? Although in theory 100*100*100 has the same number of pixels as a 1000 x 1000 display, in practice the projection angle is going to require a lot of those voxels to be visually on top of one another.
How far "into" the cube needs to be visible from the outside?

댓글을 달려면 로그인하십시오.

답변 (2개)

Ahmed A. Selman
Ahmed A. Selman 2013년 4월 5일
Logically, no 4-D plot can be made sensible to us (unfortunately, we are stuck to see and understand 3-D world, only). So even if you could plot it somehow, understanding it will be quite tricky. Yet, fortunately this time, we can imagine n-D world theoretically (with n = 0 to inf).
Now, suppose your data set is something like D(x,y,z,T). At each point of (x,y,z) space, there is a (T) value that changes the behavior. So you want to visualize the (x,y,z) space at a given (T). Thus, the answer is (fix one coordinate, and change the other 3). The rest is how to do it.
When I needed it, I used to fix z-coordinate and plot (x,y) horizontally, with (T) in the vertical axis, as in the example below:
clc
clear
close all
for x=1:20;
for y=1:20;
for z=1:20
for T=1:20
D(x,y,z,T)=sin((T.*x.*z)*0.1); % creating 4-D array
end
end
end
end
[nio, njo, nko, nTo]=size(D);
surfl(D(:,:,1)); % Initial snapshot
for k=1:nTo; % fixing the z-coordinates
surfl(D(:,:,k))
xlabel(' X - Axis');
ylabel(' Y - Axis');
zlabel(' T - Axis');
title({' Z is fixed at: ' k })
pause (0.1);
CF(k)=getframe;
end
figure;
movie(CF); % This is the movie of the frames just displayed.
Please modify it to your own convenience, this is NOT the code you exactly need, but the method is, I think.

Omid Adljuy
Omid Adljuy 2013년 4월 5일
편집: Omid Adljuy 2013년 4월 5일
Probably the isosurface command is what you're looking for.
See MATLAB Help for more details and examples.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by