CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   particleTracks to Matlab (https://www.cfd-online.com/Forums/openfoam-post-processing/160241-particletracks-matlab.html)

Gerrit October 4, 2015 12:13

particleTracks to Matlab
 
Hi

I need to put the particle tracks to put to Matlab or Scilab. My only problem is, that the particleTracks.vtk is basically only a list of all particle positions.

The beginning is something like this:
Code:

# vtk DataFile Version 2.0
particleTracks
ASCII
DATASET POLYDATA
POINTS 10442 float
-2.24536432e-08 0.986388977 0.00383200466
-5.19153517e-08 0.982761592 0.00767320536
-8.83598122e-08 0.97915399 0.0114858042

...


the end a list of lines:
Code:

LINES 55 10497
168 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33....

Paraview can somehow see, when a new particle starts. How does that work, only knowing these data? I have to put that in Malab or Scilab.
My particles are following in y-direction, so it would be easy to say something like:
if y(i)>y(i-1) than make new vector for a new particle. But for the case a particle makes a step backwards (turbulences) this idea is non-sense...

I am open for all suggestions :D


All times are GMT -4. The time now is 03:58.