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
- Wouldn't that take an extremely long time for small enough $\Delta y$ and large enough $t$ ?
- What kind of integration methods would be used to do this ?
- 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.