Integrate velocity field over a (cylindrical coordinate) disk
9 views (last 30 days)
Show older comments
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 Comments
Answers (2)
supernoob
on 2 Jul 2018
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 Comments
Miguel
on 16 Dec 2018
Edited: Miguel
on 26 Dec 2018
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 Comments
See Also
Categories
Find more on Least Squares in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!