help me on plotting of curl
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
Jan
2014-2-14
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.
回答(2 个)
Roger Stafford
2014-2-15
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 个评论
Roger Stafford
2014-2-15
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.
ahmed alhinai
2017-12-3
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Parallel for-Loops (parfor) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!