Curl in Polar Coordinates

Hello All,
I was wondering if anyone knows of an m-file that can calculate the curl in polar coordinates. I have all x,y,z,u,v,w data in Cartesian coordinates and should be able to convert it to polar without a problem, but I don't know where to go from there.
Thanks,
Spence

回答 (3 件)

Paulo Silva
Paulo Silva 2011 年 6 月 13 日

0 投票

doc cart2pol
Bjorn Gustavsson
Bjorn Gustavsson 2011 年 6 月 13 日

0 投票

I think it is easiest to calculate the curl in Cartesian coordinates and then transform the result to polar coordinates. Especially as you have the data in Cartesian coordinates. Then you avoid the hassle of doing the non-Cartesian curl, and one interpolation...
Wiky
Wiky 2018 年 12 月 24 日

0 投票

The below function calculates the "CURL" of a vector field in all three coordinate systems.i.e Rectangular, Cylindrical and Spherical.
Where V is field vector, X spacial vector.
%%%%%%%%%%%%%% Code of Curl in Polar Coordinates %%%%%%%%%%%%%%%
function Curl = Curl_sym(V,X,coordinate_system)
switch coordinate_system
case {'cartesian','Cartesian'}
Curl=curl(V,X);
case {'cylindrical','Cylindrical'}
Curl = [(1/X(1))*diff(V(3),X(2))-diff(V(2),X(3)), diff(V(1),X(3))-diff(V(3),X(1)), (1/X(1))*diff(X(1)*V(2),X(1))-diff(V(1),X(2))];
case {'spherical','Spherical'}
Curl = [(1./X(1)*diff(V(3),X(2))-diff(V(2),X(3))) (diff(V(1),X(3))-diff(V(3),X(1))) 1./X(1)*(diff(X(1).*V(2),X(1))-diff(V(1),X(2)))];
end
end

カテゴリ

ヘルプ センター および File ExchangeGeology についてさらに検索

質問済み:

2011 年 6 月 13 日

回答済み:

2018 年 12 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by