Azzera filtri
Azzera filtri

How to plot appropriate contour or quiver diagrams from given axisymmetric data?

5 visualizzazioni (ultimi 30 giorni)
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!

Risposte (0)

Categorie

Scopri di più su Vector Fields in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by