Curl in Polar Coordinates
11 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (3)
Bjorn Gustavsson
el 13 de Jun. de 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 comentarios
Wiky
el 24 de Dic. de 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 comentarios
Ver también
Categorías
Más información sobre Geology en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!