Curl in Polar Coordinates
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (3)
Bjorn Gustavsson
le 13 Juin 2011
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...
0 commentaires
Wiky
le 24 Déc 2018
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
0 commentaires
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!