How to plot appropriate contour or quiver diagrams from given axisymmetric data?
5 次查看(过去 30 天)
显示 更早的评论
I'm trying to solve axisymmetric incompressible Navier Stokes Equation in cylindrical coordinate system using Sullivan vortex model in MATLAB.
Here is the sample code:
If r denotes radial distance and z denotes axial distance.
u, v & w are velocities in r, theta and z direction respectively, depending on 'r' and 'z' only, having no dependence on theta and hence are 2-D matrices.
p is pressure depending on 'r' and 'z' only, having no dependence on theta and hence is a 2-D matrix.
U, V, W & P are corrected data in r, theta and z direction respectively, depending on 'r' and 'z' only but are 3-D matrices as theta direction too is included but the parameters do not vary in theta direction.
I tried the following but none of it worked.
[x1,y1] = pol2cart(R,th);
contour(x1,y1,P(:,:,34),500)
%xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[x1,y1] = pol2cart(th,R);
contour(x1,y1,P(:,:,34),500)
quiver(x1,y1,U(:,:,34),V(:,:,34))
%xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
contour(R.*cos(th),R.*sin(th),P(:,:,34),500)
Now, I am trying to plot contour and quiver plots from this data but the plots tend to vary with theta also. While in some other cases, I got an incomplete circle.
Maybe, I am not able to assign proper direction to the velocity vectors.
Please suggest me some appropriate way of doing this.
Thank you!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Vector Fields 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!