How can I structure the path line source file so that it can be read by the Paraview

I have the raw result data from other simulations including:
the index (ID) of the particle and the x, y and z position of the particle at different time point. As in following example:

Index, x postion, y postion, z postion, time point
1 0 0 0 0
1 1 1 1 0.1
1 2 2 2 0.2
1 3 3 3 0.3

2 0 0 0 0
2 3 3 3 0.1
2 2 2 2 0.2
2 1 1 1 0.3

Is that possible to draw the path line of all these particles in Paraview? How should I structure the data file to make Paraview understand it?

No response yet…

Hi @Haijing

Please share your data

Best,

Hi, Mathieu, thank you for your reply. Here I paste a piece of it as an example. Thanks for your help.

VARIABLES=“Index”, “X”, “Y”, “Z”, “TIME”
1 8.000000 18.500000 63.300000 0.000000
6 8.000000 22.000000 63.300000 0.000000
3 8.000000 18.500000 64.500000 0.000000
5 8.000000 18.500000 65.700000 0.000000
8 8.000000 22.000000 64.500000 0.000000
9 8.000000 22.000000 65.100000 0.000000
4 8.000000 18.500000 65.100000 0.000000
1 8.000016 18.500001 63.299998 0.000000
7 8.000000 22.000000 63.900000 0.000000
10 8.000000 22.000000 65.700000 0.000000
6 8.000016 22.000002 63.299998 0.000000
3 8.000016 18.500001 64.499999 0.000000
5 8.000016 18.500001 65.700000 0.000000
8 8.000016 22.000002 64.499999 0.000000
9 8.000016 22.000002 65.099999 0.000000
4 8.000016 18.500001 65.099999 0.000000
1 8.000334 18.500037 63.299848 0.000001
2 8.000000 18.500000 63.900000 0.000000
7 8.000016 22.000002 63.899998 0.000000
6 8.020016 22.007048 63.291115 0.000037
3 8.000547 18.500037 64.499926 0.000001
5 8.000557 18.500037 65.699986 0.000001
8 8.000158 22.000044 64.499981 0.000000
9 8.000158 22.000044 65.099988 0.000000
10 8.000016 22.000002 65.700000 0.000000
4 8.000547 18.500037 65.099955 0.000001
1 8.020016 18.502297 63.290589 0.000043
2 8.000016 18.500001 63.899998 0.000000
7 8.000156 22.000044 63.899969 0.000000
6 8.027862 22.009818 63.287626 0.000052
3 8.019247 18.501315 64.497373 0.000019
5 8.019247 18.501289 65.699506 0.000018
8 8.019247 22.005641 64.497525 0.000017
9 8.019247 22.005641 65.098489 0.000017
10 8.000157 22.000044 65.699996 0.000000
4 8.019247 18.501315 65.098393 0.000019
1 8.026306 18.503021 63.287626 0.000056
2 8.000496 18.500037 63.899890 0.000001
7 8.015194 22.004518 63.896763 0.000016
6 8.028500 22.010044 63.287342 0.000053
3 8.038478 18.502635 64.494735 0.000038
5 8.038478 18.502582 65.699010 0.000035
8 8.038478 22.011300 64.495040 0.000034
9 8.038478 22.011300 65.096973 0.000034
10 8.019247 22.005646 65.699535 0.000016
4 8.038478 18.502635 65.096780 0.000038
1 8.040016 18.504601 63.281165 0.000085
2 8.014343 18.501085 63.896763 0.000018
7 8.019247 22.005727 63.895896 0.000021
6 8.040016 22.014115 63.282219 0.000074
3 8.057709 18.503960 64.492084 0.000058
5 8.057709 18.503881 65.698511 0.000053
8 8.057709 22.016980 64.492545 0.000051
9 8.057709 22.016980 65.095449 0.000051
10 8.038478 22.011309 65.699069 0.000031
4 8.057709 18.503960 65.095159 0.000058
1 8.060016 18.506912 63.271732 0.000128
2 8.019247 18.501457 63.895652 0.000024
7 8.038478 22.011470 63.891779 0.000042
6 8.060016 22.021195 63.273315 0.000112
3 8.076939 18.505291 64.489422 0.000077
5 8.076939 18.505185 65.698011 0.000071
8 8.065450 22.019275 64.491536 0.000058
9 8.065450 22.019275 65.094834 0.000058
10 8.057709 22.016993 65.698600 0.000047

data.csv (2.6 KB)

That is not easy to do in ParaView.

If you want to trace static lines, you should be able to create a simple programmable filter that will create polylines based on the ID.

If you want to animate the movement of your particles overtime, you need to create a much more complexe programmable reader that will provide only the particles at the right time.

If you want to make it easier, you need to modify your output, so it looks like that:

data_2.csv (462 Bytes)
data_1.csv (462 Bytes)
data_0.csv (462 Bytes)

This way ParaView will be able to open it as a fileseries and it will support animation.

Note: Your time column does not make much sense.

Thanks. Currently, tracing static lines is ok for me. I wish to fist figure this out.
Thank you for the data files. I am checking.
Note: Your time column does not make much sense ----- why?

The time are all over the place, and particles with the same ID and different locations have the same time.

yeah, I found it. You are right. I should fix this.

Could you give a hint on how to create the programmable filter to trace static lines?

Here is the doc: 5. Programmable Filter — ParaView Documentation 5.10.0 documentation

Please note this may be complex for a beginner.

Thanks for the document and note. this indeed makes me headache :joy: