CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   3D vorticity contour (https://www.cfd-online.com/Forums/main/134537-3d-vorticity-contour.html)

shahzad_munir May 1, 2014 02:34

3D vorticity contour
 
Dear All,
I am using following code to calculate vorticity.
vort = zeros(nx,nj,ns); % initialize the matrix for the vorticity
for i = 1:size(u,3)
[dudx,dudy] = gradient(u(:,:,i),h);
[dvdx,dvdy] = gradient(v(:,:,i),h);
vort(:,:,i) = dvdx - dudy;
end
I can plot it by using contour(x,y,squeeze(vort(:,:,1))) to get a 2D map. As this vort is a 3D matrix this contour will show vorticity plot in z=1 plane and because z=1 to ns (no of files) I will get different contour plots for diff values of z.
I want to know is this right? Because I'm getting different contours of vorticity how will I know which one is truly representing the vorticity in the flow? Or can I use this vort(:,:,i) outside the loop in above routine? In literature authors shows only one vorticity contour map so I am confused a bit. Please guide me to the best.


All times are GMT -4. The time now is 04:29.