Filter löschen
Filter löschen

Integrate velocity field over a (cylindrical coordinate) disk

5 Ansichten (letzte 30 Tage)
Daan
Daan am 5 Sep. 2016
Bearbeitet: Miguel am 26 Dez. 2018
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?

Antworten (2)

supernoob
supernoob am 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.

Miguel
Miguel am 16 Dez. 2018
Bearbeitet: Miguel am 26 Dez. 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
  1. I loaded the data points for the values collected across the radius;
  2. 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;
  3. 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.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by