1
$\begingroup$

I am just curious to how I would go about integrating data points that I get from a simulation that I am running ? In this simulation I get velocity values along a line (i.e alonge the line $x=3$ and $0 \leq y \leq 1$) at discrete distance markers (say 0.5 step size) but the values for these are taken at a specific time step during the simulation. I am wondering how would I be able to integrate this line so I can get values for the velocity as a function of distance and time and then to plot it ?

Here would be an example of the data points I would be given (u,v,h are the variable for the velocities just for clarity):

$$ at \ \ t=0 : \begin{array}{|c|c|c|c|} \hline \Delta y& u & v & h \\ \hline 0& 0& 0& 0\\ \hline 0.5 & 1.0 & 0.5 & 0.5\\ \hline 1& 2.0 & 1.0& 1.0\\ \hline \end{array} \\ at \ \ t=0.5: \begin{array}{|c|c|c|c|} \hline \Delta y& u & v & h \\ \hline 0& 0& 0& 0\\ \hline 0.5 & 0.75 & 1.5 & 0.5\\ \hline 1& 2.0 & 1.0& 1.0\\ \hline \end{array} $$

These are not the exact values that I get from my simulation but rather an example of how my data is stored.

My first intuition is to integrate along the $\Delta y$ line at each time step and then to go back and integrate those lines for all time, i.e integrate along the line for $t=0$ and $t=0.5$ then integrate those lines for all time.

But the problem with my intuition that I am second guessing is

  1. Wouldn't that take an extremely long time for small enough $\Delta y$ and large enough $t$ ?
  2. What kind of integration methods would be used to do this ?
  3. Wouldn't that take up a lot of memory doing each integration independently ?

Any help would be greatly appreciated and any suggestions on either changing up my idea of thinking/suggesting a better way to do this would be greatly appreciated.

Note I can post a couple of actual data files on Github and share them if my example wasn't clear enough or you want to see exactly how the data is laid out in .txt files.

$\endgroup$
  • $\begingroup$ You indicate you have nine velocity variables at time $t=0.$ Velocities of what? And how would integration come into this--what should the integral tell you about? What problem really are you trying to solve? $\endgroup$ – David K Apr 1 '17 at 3:17
  • $\begingroup$ Could you explain the function a little more, is it like a vector function like $$f(t)=\langle u(x(t),y(t)), v(x(t),y(t)), h(x(t),y(t))\rangle $$ $\endgroup$ – marshal craft Apr 1 '17 at 3:30
  • $\begingroup$ And integrate is $$\int_a^b f(t)dt=\int_a^b u(t)dt + \int_a^b v(t)dt+\int_a^b h(t)dt$$ a vector? . Not clear why there are three values for a single $t$. $\endgroup$ – marshal craft Apr 1 '17 at 3:40
  • $\begingroup$ Or is $y=t$ and $x=3$? $\endgroup$ – marshal craft Apr 1 '17 at 3:45
  • 1
    $\begingroup$ It makes a big difference to know that these are velocities of fluids. It's a little unclear still why you are only interested in $0<y<1$ and $x=3,$ but if all you really need is to get the velocity $(u(x,y,t),v(x,y,t),h(x,y,t))$ as a continuous function along the segment from $(3,0)$ to $(3,1),$ I think interpolation (not integration!) is what you may be looking for. $\endgroup$ – David K Apr 1 '17 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.