Integrating with a finite number of points

92 Views Asked by At

I have a matrix that I generate with MATLAB, then plot on a graph. The graph is belowenter image description here

I am having trouble with integration. I am trying to find the Kinetic energy of a fluid out of a pipe. In the graph above, I have calculated the velocity at each point with

$$V = \sqrt{V_x^2+V_y^2+V_z^2}$$

At each radius, the velocity is uniform around the "disk".

what is the proper way to find the Kinetic energy of a velocity varying fluid?

I understand i will need to integrate to get the overall velocity, but I am having a hard time doing this with a finite number of points, rather than a textbook given line.

1

There are 1 best solutions below

2
On BEST ANSWER

That's classic numerical integration, a straight-forward sum (Riemann sum) probably wouldn't be far off. Otherwise, consider any of equally-spaced numerical integration schemes, such as the Trapezoidal or Simpson's rule.

You should also consider how high order you need: no sense in doing it more "accurately" than your data can be trusted, otherwise you can get worse results with a nominally more accurate integration scheme.

Furthermore, you could consider fitting a curve over these points and integrating the analytical model instead. Especially if you have a reason to believe into a particular dependence of the velocity on the radius. In your case, a simple polynomial fit would do the trick (if not that, maybe a hyperbola with a linear asymptote, something like $b\sqrt{a^2+r^2}$, even though there is no physical model that would return such a solution).

EDIT:

Don't forget the Jacobi integrating factor for changing into polar coordinates. In a circular pipe, the "ring" of fluid gets bigger with radius, so the flux is

$$2\pi\int_0^R f(r) r\,dr$$ where $f$ is whatever you are integrating over the cross section. In your case, the kinetic energy.