Integrate velocity field over a (cylindrical coordinate) disk
조회 수: 9 (최근 30일)
이전 댓글 표시
I have a velocity vector field specified over a disk having radius r. In order to determine the average velocity, i would like to integrate the velocity over this disk. The local velocity values are stored in a matrix. These values correspond to a cylindrical coordinate grid. Therefore, i have a m,n matrix of velocity, a m,n matrix of corresponding theta and m,n matrix of corresponding r.
the function quad2d seems to be able to perform cylindrical integration, however i cant find a function which is able to interpolate my gridded data points (in cylindrical coordinates) as input. The other option would be to use Cartesian coordinates, but in that way the grid is unstructured and i'm not able to define a boundary since the boundary is a circle. Moreover, cartesian coordinates would be less accurate.
This should not be hard but i just can't find the simple solution, any suggestions?
댓글 수: 0
답변 (2개)
supernoob
2018년 7월 2일
Hi there, I think intergal2 in polar coordinates should do the trick. https://www.mathworks.com/help/matlab/ref/integral2.html I think you can just put your matrix in in the place of the function.
댓글 수: 0
Miguel
2018년 12월 16일
편집: Miguel
2018년 12월 26일
Might be SOLVED: SEE EDIT
I am also interested in this:
my data points are just an axissymetric vector of data points across a radius of a circle, and those points are sweeped in a revolution to for a symmetric flow passing through a circle.
I don't think my interpolation of those points is working so far, it is not being straightforward to compute integrals as you would in cylindrical.
EDIT:
My Program to solve this:
https://www.mathworks.com/matlabcentral/fileexchange/69824-numerical-integration-cylindrical-coordinates-volume?s_tid=prof_contriblnk
- I loaded the data points for the values collected across the radius;
- I used polyfit, but after that, by hand so far, I multiplied my vector with another variable, say, r, to elevate the degree of the polynomial, because I am going to use a cylindrical ingtegration, in which you need to use the infinitesimal area dS = r.*dtheta.*dr; So that elevates the degree;
- afterwards, by hand on calculator, I was able to calculate a correct value for the integration over the circle by multiplying by 2.*PI;
I've yet to make this into a MatLab script.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Least Squares에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!