Filter löschen
Filter löschen

help me on plotting of curl

4 Ansichten (letzte 30 Tage)
Rizwana
Rizwana am 14 Feb. 2014
Beantwortet: ahmed alhinai am 3 Dez. 2017
I have velocity data for u,v,w. There is just x and y data which is m* n in size. No z data
u =VarName1; % please refer to xls file i have attached to see VarName1 as 1st column data(220*1)
>> v=VarName2; % please refer to xls file i have attached to see VarName2 as column data(220*1)
>> w =VarName3; % please refer to xls file i have attached to see VarName3 data as 3rd column(220*1)
x = VarName4 % Circumferential angle in degrees data
y = linspace(24.3,27.30,length(x)); % radius in inches.
These are velocity components i have calculated from experimental data.
I have to calculate curl(vorticity) of these u,v and w along radius(y-axis) and circumferential angle of the blade(x-axis).
I don't have z-data.
how to plot something which is in 3d(curl generated by doing curl(u,v,w) which is m*n*p) on 2d(x which is m*n and y which is m*n)
(please note : I have asked my guide to provide me with z data, he said it is just axial direction of flow. There is no data for it.)
  2 Kommentare
Jan
Jan am 14 Feb. 2014
What does this title mean:
One hour passed passed and no takers for my question :(
Do you want to push us? A lack of answers is usually a secure hint for an unclear question. As in your other threads, the attached file is not clearly connected to the contents of the question.
Rizwana
Rizwana am 15 Feb. 2014
Bearbeitet: Rizwana am 15 Feb. 2014
I was desperate to get help from matlab centre. My apologies if my title sounded rude and stupid. Can you please read my question once again and give me hint to solve it or provide an idea that can help me. I have attached more clear excel sheet. I shall be grateful and thankful to you.
Thanks and Regards
Rizwana

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Roger Stafford
Roger Stafford am 15 Feb. 2014
In your description, Rizwana, you haven't made it clear what components of velocity the variables u, v, and w represent. Apparently you have cylindrical coordinates x, y, and z where y is the radial direction, z is the axial direction, and x is the angular direction. What is the correspondence between these latter three directions and u, v, and w? Which corresponds to which? (Note: It is inadvisable to use x and y for radius and angle notation, since these symbols are so commonly used for cartesian coordinates.)
You say "it is just axial direction of flow", but what does that mean? Are you (or your guide) saying that u, v, and w are constant in the axial direction? If so, it is still quite possible to have nonzero curl components in all three directions even with constant values along the z-direction.
It is important to realize that matlab's 'curl' function is valid only for cartesian coordinates. Here is what curl looks like in cylindrical coordinates according to one of my textbooks:
curl A = er*(1/r*dAz/dt-dAt/dz) + et*(dAr/dz-dAz/dr) ...
+ ez*(1/r*d(r*At)/dr-1/r*dAr/dt)
where r is the radius, t is the angle in radians, and z is the distance along the axial direction. Presumably what you called y is called r here, what you called x is called t here, and your z is this z. The vectors er, et, and ez are unit vectors in the r, t, and z directions and Ar, At, and Az are corresponding components of the field vector A.
You described your u, v, and w quantities as being 220-element column vectors. It is to be hoped that these actually represent some kind of two-dimensional grid. Otherwise you will never be able to compute all the partial derivatives you need.
  3 Kommentare
Roger Stafford
Roger Stafford am 15 Feb. 2014
The quantities 'beta' and 'alpha' you use in defining u, v, and w are those associated with the spherical coordinate system, not cylindrical coordinates. In computing the curl of any vector field it is absolutely essential to use the appropriate formula for computing it, and the spherical coordinate system has its own special formula for curl. As I said earlier, matlab's 'curl' function works only for cartesian coordinates, so you cannot use it directly on the u, v, w components you have described.
Rizwana
Rizwana am 15 Feb. 2014
Bearbeitet: Rizwana am 15 Feb. 2014
I studied little about coordinate system today. I also went through the conversion of spherical to cartesian and vice versa. I came through a formula which was saying like this
(V,alpha,beta) in spherical coordinates are converted to (u,v,w) in Cartesian coordinate using this conversion formula
u = V * cos(beta)*cos(alpha).
v = V * cos(beta) * sin(alpha)
w = V * sin(beta);
so isn't my u,v and w are now in Cartesian form and i can use this curl function to compute its vorticity??
Please correct me if iam wrong as iam still trying to understand the coordinates system and curl.
Regards
Rizwana

Melden Sie sich an, um zu kommentieren.


ahmed alhinai
ahmed alhinai am 3 Dez. 2017
how solve this: Given a vector field A = y2 ax + x2 ay. Compute analytically the divergence of vector A. Write a MATLAB routine to plot vector A and its divergence. Compare analytical result with matlab.

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by