[Paraview] Plot number of points over time

Sergei D. dorofeenko at icp.ac.ru
Tue Sep 8 10:38:52 EDT 2009


>
> I have unstructured grid with points (particles from discrete element
> simulation).
> How can I plot over time number of points inside specified volume?
>   

As I found out through trials and errors it can be done as follows (for
ParaView 3.6):

1. Add to pipeline Clip in order to, ok, clipping a required volume.
2. Add to Clip a ProgrammableFilter with following script:

di=self.GetInput()

do=self.GetOutput()

nbPoints=di.GetNumberOfPoints()

a=vtk.vtkDoubleArray()

a.SetName('nbPoints')

a.SetNumberOfComponents(1)

a.InsertNextValue(nbPoints)

do.GetPointData().AddArray(a)


3. Open Sphreadsheet View for this ProgrammableFilter. The spreadsheet
will contain one row with the number of points at this time.  Select
this row.

4. Add to pipeline a PlotSelectionOverTime filter and click on Copy
Active Selection.

5. Open XY Plot View for this PlotSelectionOverTime.

6. Get Fun.


Best regards, Sergei D.




More information about the ParaView mailing list