Make a vector plot of the velocity field in polar coordinates
조회 수: 47 (최근 30일)
이전 댓글 표시
After plotting contour lines of the pressure, which I did easily, I am asked to make a vector plot of the velocity field. The pressure is given as P=(c*(R1/R2)-(1-c))*log((X.^2+Y.^2).^(1/2))/log(R2/R1)+1-c and P=(c*(R1/R2)-(1-c))*log(r)/log(R2/R1)+1-c in polar coordinates, where c, R1 and R2 are constants. I was able to make the vector plots of the cartesian part using this code but I do not know how to do it in polar coordinates. Thank you.
c=0.1;
R1=1;
R2=10;
x = 1:10;
y = 1:10;
[X,Y] = meshgrid(x,y);
P=(c*(R1/R2)-(1-c))*log((X.^2+Y.^2).^(1/2))/log(R2/R1)+1-c;
p_x=(c*(R1/R2)-(1-c))*(X/(X.^2+Y.^2))/log(R2/R1);
p_y=(c*(R1/R2)-(1-c))*(Y/(X.^2+Y.^2))/log(R2/R1);
figure;
quiver(X,Y,p_x,p_y)
title('Velocity field plot')
댓글 수: 0
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!